mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 17:27:36 +01:00
Core/Spells: Make mind sear aoe no longet target unit at which caster is channeling the spell.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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<Unit*>& unitList)
|
||||
{
|
||||
unitList.remove(GetTargetUnit());
|
||||
unitList.remove_if(Trinity::ObjectGUIDCheck(GetCaster()->GetUInt64Value(UNIT_FIELD_CHANNEL_OBJECT)));
|
||||
}
|
||||
|
||||
void Register()
|
||||
|
||||
Reference in New Issue
Block a user