[8461] Correcting buildUpdateValues for GAMEOBJECT_DYNAMIC flag.

Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
Opterman 2009-09-04 00:51:26 +02:00 committed by NoFantasy
parent 62501d2e02
commit 26a104a05a
3 changed files with 18 additions and 9 deletions

View file

@ -150,9 +150,10 @@ bool GameObject::Create(uint32 guidlow, uint32 name_id, Map *map, uint32 phaseMa
SetUInt32Value(GAMEOBJECT_DISPLAYID, goinfo->displayId);
// GAMEOBJECT_BYTES_1, index at 0, 1, 2 and 3
SetGoState(go_state);
SetGoType(GameobjectTypes(goinfo->type));
SetGoArtKit(0); // unknown what this is
SetGoAnimProgress(animprogress);
//Notify the map's instance data.

View file

@ -592,10 +592,9 @@ void Object::_BuildValuesUpdate(uint8 updatetype, ByteBuffer * data, UpdateMask
if (isType(TYPEMASK_GAMEOBJECT) && !((GameObject*)this)->IsTransport())
{
if ( ((GameObject*)this)->ActivateToQuest(target) || target->isGameMaster())
{
IsActivateToQuest = true;
updateMask->SetBit(GAMEOBJECT_DYNAMIC);
}
updateMask->SetBit(GAMEOBJECT_DYNAMIC);
}
else if (isType(TYPEMASK_UNIT))
{
@ -711,18 +710,27 @@ void Object::_BuildValuesUpdate(uint8 updatetype, ByteBuffer * data, UpdateMask
switch(((GameObject*)this)->GetGoType())
{
case GAMEOBJECT_TYPE_CHEST:
*data << uint32(9); // 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;
case GAMEOBJECT_TYPE_GOOBER:
*data << uint32(1);
*data << uint16(1);
*data << uint16(-1);
break;
default:
*data << uint32(0); // unknown, not happen.
// unknown, not happen.
*data << uint16(0);
*data << uint16(-1);
break;
}
}
else
*data << uint32(0); // disable quest object
{
// disable quest object
*data << uint16(0);
*data << uint16(-1);
}
}
else
*data << m_uint32Values[ index ]; // other cases

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "8460"
#define REVISION_NR "8461"
#endif // __REVISION_NR_H__