[10600] Correct size of animprogress for GO Create()

Add a default define and use it instead of hard coded value.
Some additional minor corrections for transport GO's

Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
NoFantasy 2010-10-10 13:26:48 +02:00
parent 0205adfde1
commit 2fe45365c0
9 changed files with 28 additions and 21 deletions

View file

@ -92,7 +92,7 @@ void MapManager::LoadTransports()
x = t->m_WayPoints[0].x; y = t->m_WayPoints[0].y; z = t->m_WayPoints[0].z; mapid = t->m_WayPoints[0].mapid; o = 1;
// creates the Gameobject
if(!t->Create(entry, mapid, x, y, z, o, 100, 0))
if (!t->Create(entry, mapid, x, y, z, o, GO_ANIMPROGRESS_DEFAULT, 0))
{
delete t;
continue;
@ -138,7 +138,7 @@ Transport::Transport() : GameObject()
m_updateFlag = (UPDATEFLAG_TRANSPORT | UPDATEFLAG_HIGHGUID | UPDATEFLAG_HAS_POSITION | UPDATEFLAG_ROTATION);
}
bool Transport::Create(uint32 guidlow, uint32 mapid, float x, float y, float z, float ang, uint32 animprogress, uint32 dynflags)
bool Transport::Create(uint32 guidlow, uint32 mapid, float x, float y, float z, float ang, uint8 animprogress, uint16 dynamicHighValue)
{
Relocate(x,y,z,ang);
// instance id and phaseMask isn't set to values different from std.
@ -166,7 +166,7 @@ bool Transport::Create(uint32 guidlow, uint32 mapid, float x, float y, float z,
SetUInt32Value(GAMEOBJECT_FACTION, goinfo->faction);
//SetUInt32Value(GAMEOBJECT_FLAGS, goinfo->flags);
SetUInt32Value(GAMEOBJECT_FLAGS, MAKE_PAIR32(0x28, 0x64));
SetUInt32Value(GAMEOBJECT_FLAGS, (GO_FLAG_TRANSPORT | GO_FLAG_NODESPAWN));
SetUInt32Value(GAMEOBJECT_LEVEL, m_period);
SetEntry(goinfo->id);
@ -174,10 +174,12 @@ bool Transport::Create(uint32 guidlow, uint32 mapid, float x, float y, float z,
SetGoState(GO_STATE_READY);
SetGoType(GameobjectTypes(goinfo->type));
SetGoArtKit(0);
SetGoAnimProgress(animprogress);
if(dynflags)
SetUInt32Value(GAMEOBJECT_DYNAMIC, MAKE_PAIR32(0, dynflags));
// low part always 0, dynamicHighValue is some kind of progression (not implemented)
SetUInt16Value(GAMEOBJECT_DYNAMIC, 0, 0);
SetUInt16Value(GAMEOBJECT_DYNAMIC, 1, dynamicHighValue);
SetName(goinfo->name);