aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormegamage <none@none>2008-11-27 11:54:27 -0600
committermegamage <none@none>2008-11-27 11:54:27 -0600
commit1c5fc7f5d68a82d9932dff93ffa53176e216bb5c (patch)
treead7ff895e42d4b753a97c561f9a1607bbebc3bac
parent4b4956f238a3af472a095710e1259c24254cd49f (diff)
*Fix the bug that devastate requires double rage.
*Fix the bug that cloak of shadows removes postive buffs. --HG-- branch : trunk
-rw-r--r--src/game/Spell.cpp7
-rw-r--r--src/game/SpellEffects.cpp9
2 files changed, 10 insertions, 6 deletions
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
index bcec22c8dca..57844782b8a 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -2496,8 +2496,11 @@ void Spell::cast(bool skipCheck)
// CAST SPELL
SendSpellCooldown();
- TakePower();
- TakeReagents(); // we must remove reagents before HandleEffects to allow place crafted item in same slot
+ if(!m_IsTriggeredSpell)
+ {
+ TakePower();
+ TakeReagents(); // we must remove reagents before HandleEffects to allow place crafted item in same slot
+ }
if(m_spellState == SPELL_STATE_FINISHED) // stop cast if spell marked as finish somewhere in Take*/FillTargetMap
{
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index abbd6214203..e7e1302ab58 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -1817,17 +1817,18 @@ void Spell::EffectTriggerSpell(uint32 i)
// Cloak of Shadows
case 35729 :
{
- m_caster->RemoveAurasWithDispelType(DISPEL_ALL);
+ uint32 dispelMask = GetDispellMask(DISPEL_ALL);
Unit::AuraMap& Auras = m_caster->GetAuras();
for(Unit::AuraMap::iterator iter = Auras.begin(); iter != Auras.end(); ++iter)
{
// remove all harmful spells on you...
- if(// only affect magic spells
- iter->second->GetSpellProto()->DmgClass == SPELL_DAMAGE_CLASS_MAGIC
+ SpellEntry const* spell = iter->second->GetSpellProto();
+ if((spell->DmgClass == SPELL_DAMAGE_CLASS_MAGIC // only affect magic spells
+ || ((1<<spell->Dispel) & dispelMask))
// ignore positive and passive auras
&& !iter->second->IsPositive() && !iter->second->IsPassive())
{
- m_caster->RemoveAurasDueToSpell(iter->second->GetSpellProto()->Id);
+ m_caster->RemoveAurasDueToSpell(spell->Id);
iter = Auras.begin();
}
}