aboutsummaryrefslogtreecommitdiff
path: root/src/game/Player.cpp
diff options
context:
space:
mode:
authorraczman <none@none>2009-05-31 16:18:27 +0200
committerraczman <none@none>2009-05-31 16:18:27 +0200
commit76d10d9477880a19241e9041314bb979c1e27dd9 (patch)
tree5aeeff96bc562b61a3efb94444f9ea82ff67ccd5 /src/game/Player.cpp
parent700e0628865a646c37cb0d36f3f66cfd1b1b68d0 (diff)
parentae5f9ac22728f7f844becc6cc1b71cd4b901c79c (diff)
Merge
--HG-- branch : trunk
Diffstat (limited to 'src/game/Player.cpp')
-rw-r--r--src/game/Player.cpp19
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