aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/game/SpellAuras.cpp41
-rw-r--r--src/game/SpellAuras.h1
2 files changed, 41 insertions, 1 deletions
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index 89d9752496f..b715b7811b6 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -532,7 +532,7 @@ void Aura::_ApplyEffectForTargets(uint8 effIndex)
UnitList targetList;
for (ApplicationMap::iterator appIter = m_applications.begin(); appIter != m_applications.end(); ++appIter)
{
- if ((appIter->second->GetEffectsToApply() & (1<<effIndex)) && !appIter->second->HasEffect(effIndex))
+ if ((appIter->second->GetEffectsToApply() & (1<<effIndex)) && CheckTarget(appIter->second->GetTarget()) && !appIter->second->HasEffect(effIndex))
targetList.push_back(appIter->second->GetTarget());
}
@@ -626,6 +626,45 @@ void Aura::Update(uint32 diff, Unit * caster)
}
}
+bool Aura::CheckTarget(Unit *target)
+{
+ // some special cases
+ switch(GetId())
+ {
+ case 45828: // AV Marshal's HP/DMG auras
+ case 45829:
+ case 45830:
+ case 45821:
+ case 45822: // AV Warmaster's HP/DMG auras
+ case 45823:
+ case 45824:
+ case 45826:
+ switch(target->GetEntry())
+ {
+ // alliance
+ case 14762: // Dun Baldar North Marshal
+ case 14763: // Dun Baldar South Marshal
+ case 14764: // Icewing Marshal
+ case 14765: // Stonehearth Marshal
+ case 11948: // Vandar Stormspike
+ // horde
+ case 14772: // East Frostwolf Warmaster
+ case 14776: // Tower Point Warmaster
+ case 14773: // Iceblood Warmaster
+ case 14777: // West Frostwolf Warmaster
+ case 11946: // Drek'thar
+ return true;
+ default:
+ break;
+ }
+ return false;
+ break;
+ default:
+ break;
+ return true;
+ }
+}
+
void Aura::SetDuration(int32 duration, bool withMods)
{
if (withMods)
diff --git a/src/game/SpellAuras.h b/src/game/SpellAuras.h
index a0eff82f278..be76b520bd9 100644
--- a/src/game/SpellAuras.h
+++ b/src/game/SpellAuras.h
@@ -163,6 +163,7 @@ class Aura
void SetNeedClientUpdateForTargets() const;
void HandleAuraSpecificMods(AuraApplication const * aurApp, Unit * caster, bool apply);
+ bool CheckTarget(Unit *target);
private:
void _DeleteRemovedApplications();
protected: