Pelf

Pelf acts of sacrifice 1

Apr 24th, 2012
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.43 KB | None | 0 0
  1. diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp
  2. index 9c6b1ed..046f1fe 100644
  3. --- a/src/server/game/Spells/SpellEffects.cpp
  4. +++ b/src/server/game/Spells/SpellEffects.cpp
  5. @@ -3765,7 +3765,30 @@ void Spell::EffectDispel(SpellEffIndex effIndex)
  6.      if (dispelMask & (1 << DISPEL_DISEASE) && unitTarget->HasAura(50536))
  7.          dispelMask &= ~(1 << DISPEL_DISEASE);
  8.  
  9. -    Unit::AuraMap const& auras = unitTarget->GetOwnedAuras();
  10. +   Unit::AuraMap const& auras = unitTarget->GetOwnedAuras();
  11. +
  12. +   switch (m_spellInfo->Id)
  13. +   {
  14. +   case 4987: //Cleanse, Acts of Sacrifice
  15. +       //Check for talents and target. Effect must dispel only once
  16. +       //but cleanse has more than one spelleffect. So proc only once at effect_0.
  17. +       if ((GetCaster()->HasAura(85795) || GetCaster()->HasAura(85446)) &&
  18. +           effIndex == EFFECT_0 && GetCaster()->GetGUID() == unitTarget->GetGUID())
  19. +       {
  20. +           uint32 mechanic_mask = (1<<MECHANIC_SNARE) | (1<<MECHANIC_ROOT);
  21. +           for (Unit::AuraMap::const_iterator itr = auras.begin(); itr != auras.end(); ++itr)
  22. +           {
  23. +               Aura * aura = itr->second;
  24. +               if (GetAllSpellMechanicMask(aura->GetSpellProto()) & mechanic_mask)
  25. +               {
  26. +                   unitTarget->RemoveAurasDueToSpell(aura->GetSpellProto()->Id);
  27. +                   break;
  28. +               }
  29. +           }
  30. +       }
  31. +       break;
  32. +   }
  33. +
  34.      for (Unit::AuraMap::const_iterator itr = auras.begin(); itr != auras.end(); ++itr)
  35.      {
  36.          Aura * aura = itr->second;
Advertisement
Add Comment
Please, Sign In to add comment