aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormegamage <none@none>2009-03-26 08:50:51 -0600
committermegamage <none@none>2009-03-26 08:50:51 -0600
commit1c2e62d2f4cf828cac5e48e20abd8876c2725c65 (patch)
tree5a13544c238682753ccd68608e8e4c96f6258ea3
parent9f27e0be867bd7e5d78defa28b25928decf71df3 (diff)
*Backport a missing function from TC2.
--HG-- branch : trunk
-rw-r--r--src/game/Object.cpp5
-rw-r--r--src/game/Object.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/src/game/Object.cpp b/src/game/Object.cpp
index 7966a79a84e..c0196c5a350 100644
--- a/src/game/Object.cpp
+++ b/src/game/Object.cpp
@@ -1556,6 +1556,11 @@ Map* WorldObject::GetMap() const
return MapManager::Instance().GetMap(GetMapId(), this);
}
+Map* WorldObject::FindMap() const
+{
+ return MapManager::Instance().FindMap(GetMapId(), GetInstanceId());
+}
+
Map const* WorldObject::GetBaseMap() const
{
return MapManager::Instance().GetBaseMap(GetMapId());
diff --git a/src/game/Object.h b/src/game/Object.h
index 7e18ea4db92..ef8a04c5c09 100644
--- a/src/game/Object.h
+++ b/src/game/Object.h
@@ -483,6 +483,7 @@ class TRINITY_DLL_SPEC WorldObject : public Object
void SendPlaySound(uint32 Sound, bool OnlySelf);
Map * GetMap() const;
+ Map * FindMap() const;
Map const* GetBaseMap() const;
Creature* SummonCreature(uint32 id, float x, float y, float z, float ang,TempSummonType spwtype,uint32 despwtime);
GameObject* SummonGameObject(uint32 entry, float x, float y, float z, float ang, float rotation0, float rotation1, float rotation2, float rotation3, uint32 respawnTime);