diff options
author | megamage <none@none> | 2008-12-24 09:58:26 -0600 |
---|---|---|
committer | megamage <none@none> | 2008-12-24 09:58:26 -0600 |
commit | 3cb4e7c716b11f357b3265257c51e7b6cc5c36f9 (patch) | |
tree | ed8ffaba5cf5c5149c413935b76de800198b7903 /src/game/ObjectAccessor.cpp | |
parent | c81299e6536e249ca05eebf100f3f350522da7da (diff) |
*Update to Mangos 6938. (Only build for VC9)
--HG--
branch : trunk
Diffstat (limited to 'src/game/ObjectAccessor.cpp')
-rw-r--r-- | src/game/ObjectAccessor.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/game/ObjectAccessor.cpp b/src/game/ObjectAccessor.cpp index 7d51c4c0291..4e876d99418 100644 --- a/src/game/ObjectAccessor.cpp +++ b/src/game/ObjectAccessor.cpp @@ -134,6 +134,9 @@ ObjectAccessor::GetCreatureOrPet(WorldObject const &u, uint64 guid) if(Creature *unit = GetPet(guid)) return unit; + if(Creature *unit = GetVehicle(guid)) + return unit; + return GetCreature(u, guid); } @@ -351,6 +354,12 @@ ObjectAccessor::GetPet(uint64 guid) return GetObjectInWorld(guid, (Pet*)NULL); } +Vehicle* +ObjectAccessor::GetVehicle(uint64 guid) +{ + return GetObjectInWorld(guid, (Vehicle*)NULL); +} + Corpse* ObjectAccessor::GetCorpseForPlayerGUID(uint64 guid) { @@ -602,6 +611,7 @@ template <class T> ZThread::FastMutex HashMapHolder<T>::i_lock; template class HashMapHolder<Player>; template class HashMapHolder<Pet>; +template class HashMapHolder<Vehicle>; template class HashMapHolder<GameObject>; template class HashMapHolder<DynamicObject>; template class HashMapHolder<Creature>; @@ -609,6 +619,7 @@ template class HashMapHolder<Corpse>; template Player* ObjectAccessor::GetObjectInWorld<Player>(uint32 mapid, float x, float y, uint64 guid, Player* /*fake*/); template Pet* ObjectAccessor::GetObjectInWorld<Pet>(uint32 mapid, float x, float y, uint64 guid, Pet* /*fake*/); +template Vehicle* ObjectAccessor::GetObjectInWorld<Vehicle>(uint32 mapid, float x, float y, uint64 guid, Vehicle* /*fake*/); template Creature* ObjectAccessor::GetObjectInWorld<Creature>(uint32 mapid, float x, float y, uint64 guid, Creature* /*fake*/); template Corpse* ObjectAccessor::GetObjectInWorld<Corpse>(uint32 mapid, float x, float y, uint64 guid, Corpse* /*fake*/); template GameObject* ObjectAccessor::GetObjectInWorld<GameObject>(uint32 mapid, float x, float y, uint64 guid, GameObject* /*fake*/); |