diff options
| author | Shauren <shauren.trinity@gmail.com> | 2012-06-29 21:53:35 +0200 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2012-06-29 21:53:35 +0200 |
| commit | e0997874f5bf8d38b67ad3dee66e3d808dd1a059 (patch) | |
| tree | 6e4022cb7d178d7c5f034b4d2f8ceb9e40fb1acc /src/server/game/Grids/Notifiers | |
| parent | 6e4da3367aaea8494a903da63e5c009f752e5650 (diff) | |
Core/SpellScripts: Changed OnUnitTargetSelect hook to OnObjectAreaTargetSelect, it will now work with WorldObject instead of only Units and call it even for empty target lists
Diffstat (limited to 'src/server/game/Grids/Notifiers')
| -rwxr-xr-x | src/server/game/Grids/Notifiers/GridNotifiers.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/server/game/Grids/Notifiers/GridNotifiers.h b/src/server/game/Grids/Notifiers/GridNotifiers.h index 7bb4492f99c..072db578220 100755 --- a/src/server/game/Grids/Notifiers/GridNotifiers.h +++ b/src/server/game/Grids/Notifiers/GridNotifiers.h @@ -1325,11 +1325,16 @@ namespace Trinity { public: UnitAuraCheck(bool present, uint32 spellId, uint64 casterGUID = 0) : _present(present), _spellId(spellId), _casterGUID(casterGUID) {} - bool operator()(Unit* unit) + bool operator()(Unit* unit) const { return unit->HasAura(_spellId, _casterGUID) == _present; } + bool operator()(WorldObject* object) const + { + return object->ToUnit() && object->ToUnit()->HasAura(_spellId, _casterGUID) == _present; + } + private: bool _present; uint32 _spellId; |
