[c12546] Fix usage of SpellEquippedItems and SPELL_AURA_MOD_DAMAGE_DONE & SPELL_AURA_MOD_DAMAGE_PERCENT_DONE auras as a result

This commit is contained in:
Dramacydal 2013-03-25 16:31:55 +03:00 committed by Antz
parent 6b58a8674d
commit d4f3fed660
5 changed files with 514 additions and 229 deletions

View file

@ -4897,12 +4897,15 @@ void Spell::EffectProficiency(SpellEffectEntry const* /*effect*/)
SpellEquippedItemsEntry const* eqItems = m_spellInfo->GetSpellEquippedItems();
if (eqItems && eqItems->EquippedItemClass == ITEM_CLASS_WEAPON && !(p_target->GetWeaponProficiency() & eqItems->EquippedItemSubClassMask))
if (!eqItems)
return;
if (eqItems->EquippedItemClass == ITEM_CLASS_WEAPON && !(p_target->GetWeaponProficiency() & eqItems->EquippedItemSubClassMask))
{
p_target->AddWeaponProficiency(eqItems->EquippedItemSubClassMask);
p_target->SendProficiency(ITEM_CLASS_WEAPON, p_target->GetWeaponProficiency());
}
if (eqItems && eqItems->EquippedItemClass == ITEM_CLASS_ARMOR && !(p_target->GetArmorProficiency() & eqItems->EquippedItemSubClassMask))
if (eqItems->EquippedItemClass == ITEM_CLASS_ARMOR && !(p_target->GetArmorProficiency() & eqItems->EquippedItemSubClassMask))
{
p_target->AddArmorProficiency(eqItems->EquippedItemSubClassMask);
p_target->SendProficiency(ITEM_CLASS_ARMOR, p_target->GetArmorProficiency());