aboutsummaryrefslogtreecommitdiff
path: root/src/game/Player.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/Player.cpp')
-rw-r--r--src/game/Player.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index 6485355a294..8ee2c97e5fe 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -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