From 71b9e0d8de4d98fde3ca6440a4f8722ea090d5b8 Mon Sep 17 00:00:00 2001 From: QAston Date: Thu, 1 Sep 2011 09:06:24 +0200 Subject: Core/Spells: Make mind sear aoe no longet target unit at which caster is channeling the spell. --- src/server/game/Grids/Notifiers/GridNotifiers.h | 28 +++++++++++++++++++++++++ src/server/scripts/Spells/spell_priest.cpp | 3 ++- 2 files changed, 30 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/server/game/Grids/Notifiers/GridNotifiers.h b/src/server/game/Grids/Notifiers/GridNotifiers.h index 4d4f0bfe05e..32ef215a5ee 100755 --- a/src/server/game/Grids/Notifiers/GridNotifiers.h +++ b/src/server/game/Grids/Notifiers/GridNotifiers.h @@ -1274,6 +1274,34 @@ namespace Trinity bool _equals; }; + class ObjectGUIDCheck + { + public: + ObjectGUIDCheck(uint64 GUID) : _GUID(GUID) {} + bool operator()(WorldObject* object) + { + return object->GetGUID() == _GUID; + } + + private: + uint64 _GUID; + }; + + class UnitAuraCheck + { + public: + UnitAuraCheck(bool present, uint32 spellId, uint64 casterGUID = 0) : _present(present), _spellId(spellId), _casterGUID(casterGUID) {} + bool operator()(Unit* unit) + { + return unit->HasAura(_spellId, _casterGUID) == _present; + } + + private: + bool _present; + uint32 _spellId; + uint64 _casterGUID; + }; + // Player checks and do // Prepare using Builder localized packets with caching and send to player diff --git a/src/server/scripts/Spells/spell_priest.cpp b/src/server/scripts/Spells/spell_priest.cpp index 623bfe0a5da..77048d6ea29 100644 --- a/src/server/scripts/Spells/spell_priest.cpp +++ b/src/server/scripts/Spells/spell_priest.cpp @@ -23,6 +23,7 @@ #include "ScriptPCH.h" #include "SpellAuraEffects.h" +#include "GridNotifiers.h" enum PriestSpells { @@ -130,7 +131,7 @@ class spell_pri_mind_sear : public SpellScriptLoader void FilterTargets(std::list& unitList) { - unitList.remove(GetTargetUnit()); + unitList.remove_if(Trinity::ObjectGUIDCheck(GetCaster()->GetUInt64Value(UNIT_FIELD_CHANNEL_OBJECT))); } void Register() -- cgit v1.2.3