From 8e7806379dbf757c92ece45736c0947eb958c4cd Mon Sep 17 00:00:00 2001 From: Vincent_Michael Date: Thu, 31 Jan 2013 19:59:44 +0100 Subject: Core/Spells: Fix Gas Cloud Tracking stacking with other tracking spells --- src/server/game/Spells/Auras/SpellAuraEffects.cpp | 10 ++++++++-- src/server/game/Spells/SpellInfo.cpp | 3 +++ 2 files changed, 11 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index 05119af2582..918e4f3bfc3 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -2375,7 +2375,10 @@ void AuraEffect::HandleAuraTrackCreatures(AuraApplication const* aurApp, uint8 m if (target->GetTypeId() != TYPEID_PLAYER) return; - target->SetUInt32Value(PLAYER_TRACK_CREATURES, (apply) ? ((uint32)1)<<(GetMiscValue()-1) : 0); + if (apply) + target->SetFlag(PLAYER_TRACK_CREATURES, uint32(1) << (GetMiscValue() - 1)); + else + target->RemoveFlag(PLAYER_TRACK_CREATURES, uint32(1) << (GetMiscValue() - 1)); } void AuraEffect::HandleAuraTrackResources(AuraApplication const* aurApp, uint8 mode, bool apply) const @@ -2388,7 +2391,10 @@ void AuraEffect::HandleAuraTrackResources(AuraApplication const* aurApp, uint8 m if (target->GetTypeId() != TYPEID_PLAYER) return; - target->SetUInt32Value(PLAYER_TRACK_RESOURCES, (apply) ? ((uint32)1)<<(GetMiscValue()-1): 0); + if (apply) + target->SetFlag(PLAYER_TRACK_RESOURCES, uint32(1) << (GetMiscValue() - 1)); + else + target->RemoveFlag(PLAYER_TRACK_RESOURCES, uint32(1) << (GetMiscValue() - 1)); } void AuraEffect::HandleAuraTrackStealthed(AuraApplication const* aurApp, uint8 mode, bool apply) const diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp index 0c298efd83e..6323d2ea638 100644 --- a/src/server/game/Spells/SpellInfo.cpp +++ b/src/server/game/Spells/SpellInfo.cpp @@ -1922,6 +1922,9 @@ SpellSpecificType SpellInfo::GetSpellSpecific() const case SPELL_AURA_AOE_CHARM: return SPELL_SPECIFIC_CHARM; case SPELL_AURA_TRACK_CREATURES: + /// @workaround For non-stacking tracking spells (We need generic solution) + if (Id == 30645) // Gas Cloud Tracking + return SPELL_SPECIFIC_NORMAL; case SPELL_AURA_TRACK_RESOURCES: case SPELL_AURA_TRACK_STEALTHED: return SPELL_SPECIFIC_TRACKER; -- cgit v1.2.3