aboutsummaryrefslogtreecommitdiff
path: root/src/game/GameObject.cpp
diff options
context:
space:
mode:
authorKudlaty <none@none>2009-11-27 01:41:26 +0100
committerKudlaty <none@none>2009-11-27 01:41:26 +0100
commit9bd797d402c498d2e8f70aa916b3caf3956577af (patch)
tree5a9d8af6d4ddc76a9ab58c545148233d57f5595b /src/game/GameObject.cpp
parent0c8d51614716ef7df1da8ebf5bbabe0c665da4ed (diff)
Apply #412.
Add support to gameobject type Transport (11) that should stop like Orgrimmar arena Elevators or pilars. Patch by Spp and Opterman --HG-- branch : trunk
Diffstat (limited to 'src/game/GameObject.cpp')
-rw-r--r--src/game/GameObject.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/game/GameObject.cpp b/src/game/GameObject.cpp
index 00299792a5a..a005e5ddee1 100644
--- a/src/game/GameObject.cpp
+++ b/src/game/GameObject.cpp
@@ -194,6 +194,11 @@ bool GameObject::Create(uint32 guidlow, uint32 name_id, Map *map, uint32 phaseMa
case GAMEOBJECT_TYPE_DESTRUCTIBLE_BUILDING:
m_goValue->building.health = goinfo->building.intactNumHits + goinfo->building.damagedNumHits;
break;
+ case GAMEOBJECT_TYPE_TRANSPORT:
+ SetUInt32Value(GAMEOBJECT_LEVEL, goinfo->transport.pause);
+ if (goinfo->transport.startOpen)
+ SetGoState(GO_STATE_ACTIVE);
+ break;
}
SetZoneScript();
@@ -713,6 +718,16 @@ bool GameObject::IsTransport() const
return gInfo->type == GAMEOBJECT_TYPE_TRANSPORT || gInfo->type == GAMEOBJECT_TYPE_MO_TRANSPORT;
}
+// is Dynamic transport = non-stop Transport
+bool GameObject::IsDynTransport() const
+{
+ // If something is marked as a transport, don't transmit an out of range packet for it.
+ GameObjectInfo const * gInfo = GetGOInfo();
+ if(!gInfo) return false;
+ return gInfo->type == GAMEOBJECT_TYPE_MO_TRANSPORT || (gInfo->type == GAMEOBJECT_TYPE_TRANSPORT && !gInfo->transport.pause);
+}
+
+
Unit* GameObject::GetOwner(bool inWorld) const
{
if (inWorld)