diff options
author | megamage <none@none> | 2009-04-11 13:42:34 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-04-11 13:42:34 -0500 |
commit | 9378a9cf211021c7a285026307f3a5f03af430dd (patch) | |
tree | 06949b2660debd43bab5db721b69cee663813ec7 /src/game/Unit.cpp | |
parent | 80e1a5faaccc30e121cb4f97c0be7f640ff59577 (diff) |
*Add function GetPlayer and GetCreature for scripts. Please try to not use GetUnit in the future.
--HG--
branch : trunk
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r-- | src/game/Unit.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 037945b896b..6e7a2302c9f 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -10436,6 +10436,16 @@ Unit* Unit::GetUnit(WorldObject& object, uint64 guid) return ObjectAccessor::GetUnit(object,guid); } +Player* Unit::GetPlayer(uint64 guid) +{ + return ObjectAccessor::FindPlayer(guid); +} + +Creature* Unit::GetCreature(WorldObject& object, uint64 guid) +{ + return ObjectAccessor::GetCreature(object, guid); +} + bool Unit::isVisibleForInState( Player const* u, bool inVisibleList ) const { return isVisibleForOrDetect(u, false, inVisibleList, false); |