Add support to gameobject type Transport (11) that should stop like Orgrimmar arena Elevators or pilars.
Patch by Spp and Opterman

--HG--
branch : trunk
This commit is contained in:
Kudlaty
2009-11-27 01:41:26 +01:00
parent 0c8d516147
commit 9bd797d402
3 changed files with 17 additions and 1 deletions

View File

@@ -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)