diff options
Diffstat (limited to 'src/game/Player.cpp')
-rw-r--r-- | src/game/Player.cpp | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 6485355a294..23b5434e1b0 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -7000,7 +7000,7 @@ void Player::CastItemCombatSpell(Item *item, CalcDamageInfo *damageInfo, ItemPro return; // Can do effect if any damage done to target - if (damageInfo->damage) + if (damageInfo->procVictim & PROC_FLAG_TAKEN_ANY_DAMAGE) { for (int i = 0; i < 5; i++) { @@ -7064,7 +7064,7 @@ void Player::CastItemCombatSpell(Item *item, CalcDamageInfo *damageInfo, ItemPro else { // Can do effect if any damage done to target - if (!(damageInfo->damage)) + if (!(damageInfo->procVictim & PROC_FLAG_TAKEN_ANY_DAMAGE)) continue; } @@ -11539,7 +11539,7 @@ void Player::RemoveEnchantmentDurations(Item *item) } } -void Player::RemoveAllEnchantments(EnchantmentSlot slot) +void Player::RemoveAllEnchantments(EnchantmentSlot slot, bool arena) { // remove enchantments from equipped items first to clean up the m_enchantDuration list for(EnchantDurationList::iterator itr = m_enchantDuration.begin(),next;itr != m_enchantDuration.end();itr=next) @@ -11547,6 +11547,19 @@ void Player::RemoveAllEnchantments(EnchantmentSlot slot) next = itr; if(itr->slot==slot) { + if(arena && itr->item) + { + uint32 enchant_id = itr->item->GetEnchantmentId(slot); + if(enchant_id) + { + SpellItemEnchantmentEntry const *pEnchant = sSpellItemEnchantmentStore.LookupEntry(enchant_id); + if(pEnchant && pEnchant->aura_id == ITEM_ENCHANTMENT_AURAID_POISON) + { + ++next; + continue; + } + } + } if(itr->item && itr->item->GetEnchantmentId(slot)) { // remove from stats |