Fix some issues with game object create according to last patch. Thx to NoFantasy and DearScorpion
--HG-- branch : trunk
This commit is contained in:
@@ -173,15 +173,16 @@ bool GameObject::Create(uint32 guidlow, uint32 name_id, Map *map, uint32 phaseMa
|
|||||||
|
|
||||||
SetUInt32Value(GAMEOBJECT_FACTION, goinfo->faction);
|
SetUInt32Value(GAMEOBJECT_FACTION, goinfo->faction);
|
||||||
SetUInt32Value(GAMEOBJECT_FLAGS, goinfo->flags);
|
SetUInt32Value(GAMEOBJECT_FLAGS, goinfo->flags);
|
||||||
SetUInt16Value(GAMEOBJECT_DYNAMIC, 1, uint16(-1));
|
|
||||||
|
|
||||||
SetEntry(goinfo->id);
|
SetEntry(goinfo->id);
|
||||||
|
|
||||||
SetUInt32Value(GAMEOBJECT_DISPLAYID, goinfo->displayId);
|
SetUInt32Value(GAMEOBJECT_DISPLAYID, goinfo->displayId);
|
||||||
|
|
||||||
|
// GAMEOBJECT_BYTES_1, index at 0, 1, 2 and 3
|
||||||
SetGoState(go_state);
|
SetGoState(go_state);
|
||||||
SetGoType(GameobjectTypes(goinfo->type));
|
SetGoType(GameobjectTypes(goinfo->type));
|
||||||
|
|
||||||
|
SetGoArtKit(0); // unknown what this is
|
||||||
SetGoAnimProgress(animprogress);
|
SetGoAnimProgress(animprogress);
|
||||||
|
|
||||||
SetByteValue(GAMEOBJECT_BYTES_1, 2, artKit);
|
SetByteValue(GAMEOBJECT_BYTES_1, 2, artKit);
|
||||||
|
|||||||
+15
-6
@@ -484,10 +484,10 @@ void Object::_BuildValuesUpdate(uint8 updatetype, ByteBuffer * data, UpdateMask
|
|||||||
if (isType(TYPEMASK_GAMEOBJECT) && !((GameObject*)this)->IsTransport())
|
if (isType(TYPEMASK_GAMEOBJECT) && !((GameObject*)this)->IsTransport())
|
||||||
{
|
{
|
||||||
if ( ((GameObject*)this)->ActivateToQuest(target) || target->isGameMaster())
|
if ( ((GameObject*)this)->ActivateToQuest(target) || target->isGameMaster())
|
||||||
{
|
|
||||||
IsActivateToQuest = true;
|
IsActivateToQuest = true;
|
||||||
|
|
||||||
updateMask->SetBit(GAMEOBJECT_DYNAMIC);
|
updateMask->SetBit(GAMEOBJECT_DYNAMIC);
|
||||||
}
|
|
||||||
if (((GameObject*)this)->GetGoArtKit())
|
if (((GameObject*)this)->GetGoArtKit())
|
||||||
updateMask->SetBit(GAMEOBJECT_BYTES_1);
|
updateMask->SetBit(GAMEOBJECT_BYTES_1);
|
||||||
}
|
}
|
||||||
@@ -662,18 +662,27 @@ void Object::_BuildValuesUpdate(uint8 updatetype, ByteBuffer * data, UpdateMask
|
|||||||
switch(((GameObject*)this)->GetGoType())
|
switch(((GameObject*)this)->GetGoType())
|
||||||
{
|
{
|
||||||
case GAMEOBJECT_TYPE_CHEST:
|
case GAMEOBJECT_TYPE_CHEST:
|
||||||
*data << uint32(0xFFFF0009); // enable quest object. Represent 9, but 1 for client before 2.3.0
|
// enable quest object. Represent 9, but 1 for client before 2.3.0
|
||||||
|
*data << uint16(9);
|
||||||
|
*data << uint16(-1);
|
||||||
break;
|
break;
|
||||||
case GAMEOBJECT_TYPE_GOOBER:
|
case GAMEOBJECT_TYPE_GOOBER:
|
||||||
*data << uint32(0xFFFF0001);
|
*data << uint16(1);
|
||||||
|
*data << uint16(-1);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
*data << uint32(0xFFFF0000); // unknown, not happen.
|
// unknown, not happen.
|
||||||
|
*data << uint16(0);
|
||||||
|
*data << uint16(-1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
*data << uint32(0xFFFF0000); // disable quest object
|
{
|
||||||
|
// disable quest object
|
||||||
|
*data << uint16(0);
|
||||||
|
*data << uint16(-1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
*data << m_uint32Values[ index ]; // other cases
|
*data << m_uint32Values[ index ]; // other cases
|
||||||
|
|||||||
Reference in New Issue
Block a user