mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 11:28:25 +00:00
Renamed EQEmu::Item_Struct to EQEmu::ItemBase to coincide with new inventory naming conventions (re-run shared_memory.exe)
This commit is contained in:
+13
-13
@@ -55,7 +55,7 @@ bool Mob::AttackAnimation(EQEmu::skills::SkillType &skillinuse, int Hand, const
|
||||
// Determine animation
|
||||
int type = 0;
|
||||
if (weapon && weapon->IsClassCommon()) {
|
||||
const EQEmu::Item_Struct* item = weapon->GetItem();
|
||||
const EQEmu::ItemBase* item = weapon->GetItem();
|
||||
|
||||
Log.Out(Logs::Detail, Logs::Attack, "Weapon skill : %i", item->ItemType);
|
||||
|
||||
@@ -788,9 +788,9 @@ int32 Client::GetMeleeMitDmg(Mob *attacker, int32 damage, int32 minhit,
|
||||
//Returns the weapon damage against the input mob
|
||||
//if we cannot hit the mob with the current weapon we will get a value less than or equal to zero
|
||||
//Else we know we can hit.
|
||||
//GetWeaponDamage(mob*, const Item_Struct*) is intended to be used for mobs or any other situation where we do not have a client inventory item
|
||||
//GetWeaponDamage(mob*, const ItemBase*) is intended to be used for mobs or any other situation where we do not have a client inventory item
|
||||
//GetWeaponDamage(mob*, const ItemInst*) is intended to be used for situations where we have a client inventory item
|
||||
int Mob::GetWeaponDamage(Mob *against, const EQEmu::Item_Struct *weapon_item) {
|
||||
int Mob::GetWeaponDamage(Mob *against, const EQEmu::ItemBase *weapon_item) {
|
||||
int dmg = 0;
|
||||
int banedmg = 0;
|
||||
|
||||
@@ -1116,7 +1116,7 @@ bool Client::Attack(Mob* other, int Hand, bool bRiposte, bool IsStrikethrough, b
|
||||
// Damage bonuses apply only to hits from the main hand (Hand == MainPrimary) by characters level 28 and above
|
||||
// who belong to a melee class. If we're here, then all of these conditions apply.
|
||||
|
||||
ucDamageBonus = GetWeaponDamageBonus( weapon ? weapon->GetItem() : (const EQEmu::Item_Struct*) nullptr );
|
||||
ucDamageBonus = GetWeaponDamageBonus(weapon ? weapon->GetItem() : (const EQEmu::ItemBase*) nullptr);
|
||||
|
||||
min_hit += (int) ucDamageBonus;
|
||||
max_hit += (int) ucDamageBonus;
|
||||
@@ -1127,7 +1127,7 @@ bool Client::Attack(Mob* other, int Hand, bool bRiposte, bool IsStrikethrough, b
|
||||
if (Hand == EQEmu::legacy::SlotSecondary) {
|
||||
if (aabonuses.SecondaryDmgInc || itembonuses.SecondaryDmgInc || spellbonuses.SecondaryDmgInc){
|
||||
|
||||
ucDamageBonus = GetWeaponDamageBonus(weapon ? weapon->GetItem() : (const EQEmu::Item_Struct*) nullptr, true );
|
||||
ucDamageBonus = GetWeaponDamageBonus(weapon ? weapon->GetItem() : (const EQEmu::ItemBase*) nullptr, true);
|
||||
|
||||
min_hit += (int) ucDamageBonus;
|
||||
max_hit += (int) ucDamageBonus;
|
||||
@@ -1595,7 +1595,7 @@ bool NPC::Attack(Mob* other, int Hand, bool bRiposte, bool IsStrikethrough, bool
|
||||
}
|
||||
|
||||
//figure out what weapon they are using, if any
|
||||
const EQEmu::Item_Struct* weapon = nullptr;
|
||||
const EQEmu::ItemBase* weapon = nullptr;
|
||||
if (Hand == EQEmu::legacy::SlotPrimary && equipment[EQEmu::legacy::SlotPrimary] > 0)
|
||||
weapon = database.GetItem(equipment[EQEmu::legacy::SlotPrimary]);
|
||||
else if (equipment[EQEmu::legacy::SlotSecondary])
|
||||
@@ -2517,7 +2517,7 @@ void Mob::DamageShield(Mob* attacker, bool spell_ds) {
|
||||
}
|
||||
}
|
||||
|
||||
uint8 Mob::GetWeaponDamageBonus(const EQEmu::Item_Struct *weapon, bool offhand)
|
||||
uint8 Mob::GetWeaponDamageBonus(const EQEmu::ItemBase *weapon, bool offhand)
|
||||
{
|
||||
// dev quote with old and new formulas
|
||||
// https://forums.daybreakgames.com/eq/index.php?threads/test-update-09-17-15.226618/page-5#post-3326194
|
||||
@@ -3548,12 +3548,12 @@ void Mob::TryWeaponProc(const ItemInst* weapon_g, Mob *on, uint16 hand) {
|
||||
}
|
||||
|
||||
if(!weapon_g) {
|
||||
TrySpellProc(nullptr, (const EQEmu::Item_Struct*)nullptr, on);
|
||||
TrySpellProc(nullptr, (const EQEmu::ItemBase*)nullptr, on);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!weapon_g->IsClassCommon()) {
|
||||
TrySpellProc(nullptr, (const EQEmu::Item_Struct*)nullptr, on);
|
||||
TrySpellProc(nullptr, (const EQEmu::ItemBase*)nullptr, on);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -3566,7 +3566,7 @@ void Mob::TryWeaponProc(const ItemInst* weapon_g, Mob *on, uint16 hand) {
|
||||
return;
|
||||
}
|
||||
|
||||
void Mob::TryWeaponProc(const ItemInst *inst, const EQEmu::Item_Struct *weapon, Mob *on, uint16 hand)
|
||||
void Mob::TryWeaponProc(const ItemInst *inst, const EQEmu::ItemBase *weapon, Mob *on, uint16 hand)
|
||||
{
|
||||
|
||||
if (!weapon)
|
||||
@@ -3619,7 +3619,7 @@ void Mob::TryWeaponProc(const ItemInst *inst, const EQEmu::Item_Struct *weapon,
|
||||
const ItemInst *aug_i = inst->GetAugment(r);
|
||||
if (!aug_i) // no aug, try next slot!
|
||||
continue;
|
||||
const EQEmu::Item_Struct *aug = aug_i->GetItem();
|
||||
const EQEmu::ItemBase *aug = aug_i->GetItem();
|
||||
if (!aug)
|
||||
continue;
|
||||
|
||||
@@ -3649,7 +3649,7 @@ void Mob::TryWeaponProc(const ItemInst *inst, const EQEmu::Item_Struct *weapon,
|
||||
return;
|
||||
}
|
||||
|
||||
void Mob::TrySpellProc(const ItemInst *inst, const EQEmu::Item_Struct *weapon, Mob *on, uint16 hand)
|
||||
void Mob::TrySpellProc(const ItemInst *inst, const EQEmu::ItemBase *weapon, Mob *on, uint16 hand)
|
||||
{
|
||||
float ProcBonus = static_cast<float>(spellbonuses.SpellProcChance +
|
||||
itembonuses.SpellProcChance + aabonuses.SpellProcChance);
|
||||
@@ -4506,7 +4506,7 @@ void Client::SetAttackTimer()
|
||||
else //invalid slot (hands will always hit this)
|
||||
continue;
|
||||
|
||||
const EQEmu::Item_Struct *ItemToUse = nullptr;
|
||||
const EQEmu::ItemBase *ItemToUse = nullptr;
|
||||
|
||||
//find our item
|
||||
ItemInst *ci = GetInv().GetItem(i);
|
||||
|
||||
Reference in New Issue
Block a user