mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-26 03:42:37 +01:00
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
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user