mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
[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:
parent
0205adfde1
commit
2fe45365c0
9 changed files with 28 additions and 21 deletions
|
|
@ -95,7 +95,7 @@ void GameObject::RemoveFromWorld()
|
|||
Object::RemoveFromWorld();
|
||||
}
|
||||
|
||||
bool GameObject::Create(uint32 guidlow, uint32 name_id, Map *map, uint32 phaseMask, float x, float y, float z, float ang, float rotation0, float rotation1, float rotation2, float rotation3, uint32 animprogress, GOState go_state)
|
||||
bool GameObject::Create(uint32 guidlow, uint32 name_id, Map *map, uint32 phaseMask, float x, float y, float z, float ang, float rotation0, float rotation1, float rotation2, float rotation3, uint8 animprogress, GOState go_state)
|
||||
{
|
||||
MANGOS_ASSERT(map);
|
||||
Relocate(x,y,z,ang);
|
||||
|
|
@ -135,6 +135,9 @@ bool GameObject::Create(uint32 guidlow, uint32 name_id, Map *map, uint32 phaseMa
|
|||
SetUInt32Value(GAMEOBJECT_FACTION, goinfo->faction);
|
||||
SetUInt32Value(GAMEOBJECT_FLAGS, goinfo->flags);
|
||||
|
||||
if (goinfo->type == GAMEOBJECT_TYPE_TRANSPORT)
|
||||
SetFlag(GAMEOBJECT_FLAGS, (GO_FLAG_TRANSPORT | GO_FLAG_NODESPAWN));
|
||||
|
||||
SetEntry(goinfo->id);
|
||||
|
||||
SetUInt32Value(GAMEOBJECT_DISPLAYID, goinfo->displayId);
|
||||
|
|
@ -189,7 +192,7 @@ void GameObject::Update(uint32 /*p_time*/)
|
|||
if(caster && caster->GetTypeId()==TYPEID_PLAYER)
|
||||
{
|
||||
SetGoState(GO_STATE_ACTIVE);
|
||||
SetUInt32Value(GAMEOBJECT_FLAGS, GO_FLAG_NODESPAWN);
|
||||
// SetUInt32Value(GAMEOBJECT_FLAGS, GO_FLAG_NODESPAWN);
|
||||
|
||||
UpdateData udata;
|
||||
WorldPacket packet;
|
||||
|
|
@ -570,7 +573,7 @@ bool GameObject::LoadFromDB(uint32 guid, Map *map)
|
|||
float rotation2 = data->rotation2;
|
||||
float rotation3 = data->rotation3;
|
||||
|
||||
uint32 animprogress = data->animprogress;
|
||||
uint8 animprogress = data->animprogress;
|
||||
GOState go_state = data->go_state;
|
||||
|
||||
m_DBTableGuid = guid;
|
||||
|
|
@ -803,7 +806,7 @@ void GameObject::SummonLinkedTrapIfAny()
|
|||
|
||||
GameObject* linkedGO = new GameObject;
|
||||
if (!linkedGO->Create(sObjectMgr.GenerateLowGuid(HIGHGUID_GAMEOBJECT), linkedEntry, GetMap(),
|
||||
GetPhaseMask(), GetPositionX(), GetPositionY(), GetPositionZ(), GetOrientation(), 0.0f, 0.0f, 0.0f, 0.0f, 100, GO_STATE_READY))
|
||||
GetPhaseMask(), GetPositionX(), GetPositionY(), GetPositionZ(), GetOrientation(), 0.0f, 0.0f, 0.0f, 0.0f, GO_ANIMPROGRESS_DEFAULT, GO_STATE_READY))
|
||||
{
|
||||
delete linkedGO;
|
||||
linkedGO = NULL;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue