aboutsummaryrefslogtreecommitdiff
path: root/src/game/SpellAuras.cpp
diff options
context:
space:
mode:
authorQAston <none@none>2009-03-06 18:52:39 +0100
committerQAston <none@none>2009-03-06 18:52:39 +0100
commitab2fa2e52cc41aa980f5adb6dc808d9165c053f3 (patch)
treef7d6ebff3aa6cba97feb5cdb2872bcc33fec1475 /src/game/SpellAuras.cpp
parent81782e3470f3256bbea8ce1eb000fdd582b29161 (diff)
*Fix amount of paladin's spells damage.
*Fix problems with aurastate remove. --HG-- branch : trunk
Diffstat (limited to 'src/game/SpellAuras.cpp')
-rw-r--r--src/game/SpellAuras.cpp23
1 files changed, 12 insertions, 11 deletions
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index 0a462bc273a..c378c01371e 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -940,19 +940,20 @@ void Aura::_RemoveAura()
if(slot >= MAX_AURAS) // slot not set
return;
- AuraSlotEntry *entry = m_target->GetVisibleAura(slot);
- if(!entry) //slot already removed-shouldn't happen
- return;
-
- entry->m_slotAuras[GetEffIndex()]=NULL; //unregister aura
+ bool lastaura=true;
- bool lastaura = true;
- for(uint8 i = 0; i < 3; ++i) //check slot for more auras of the spell
+ AuraSlotEntry *entry = m_target->GetVisibleAura(slot);
+ if (entry)
{
- if(entry->m_slotAuras[i])
+ entry->m_slotAuras[GetEffIndex()]=NULL; //unregister aura
+ for(uint8 i = 0; i < 3; ++i) //check slot for more auras of the spell
{
- lastaura = false;
- break;
+ if(entry->m_slotAuras[i])
+ {
+ lastaura = false;
+ break;
+ }
+
}
}
@@ -977,7 +978,7 @@ void Aura::_RemoveAura()
foundMask|=(*i).second->GetAuraStateMask();
}
// Remove only aurastates which were not found
- foundMask&=~GetAuraStateMask();
+ foundMask = GetAuraStateMask() &~foundMask;
if (foundMask)
m_target->ApplyModFlag(UNIT_FIELD_AURASTATE, foundMask, false);
}