From 26a104a05aa092caaa4dfce469056e92d0d2655f Mon Sep 17 00:00:00 2001 From: Opterman Date: Fri, 4 Sep 2009 00:51:26 +0200 Subject: [PATCH] [8461] Correcting buildUpdateValues for GAMEOBJECT_DYNAMIC flag. Signed-off-by: NoFantasy --- src/game/GameObject.cpp | 3 ++- src/game/Object.cpp | 22 +++++++++++++++------- src/shared/revision_nr.h | 2 +- 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/src/game/GameObject.cpp b/src/game/GameObject.cpp index 6ddd5a22a..e4c631f1b 100644 --- a/src/game/GameObject.cpp +++ b/src/game/GameObject.cpp @@ -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. diff --git a/src/game/Object.cpp b/src/game/Object.cpp index 16017389a..71b691fdd 100644 --- a/src/game/Object.cpp +++ b/src/game/Object.cpp @@ -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 diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index e1729883f..af16414bb 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "8460" + #define REVISION_NR "8461" #endif // __REVISION_NR_H__