Skip to content

Commit

Permalink
[10598] Create enum GameObjectDynamicLowFlags and use instead of hard…
Browse files Browse the repository at this point in the history
… coded

Signed-off-by: NoFantasy <nofantasy@nf.no>
  • Loading branch information
NoFantasy committed Oct 9, 2010
1 parent 437119e commit 9c0d767
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 12 deletions.
20 changes: 9 additions & 11 deletions src/game/Object.cpp
Expand Up @@ -570,7 +570,7 @@ void Object::BuildValuesUpdate(uint8 updatetype, ByteBuffer * data, UpdateMask *
IsActivateToQuest = true;

updateMask->SetBit(GAMEOBJECT_DYNAMIC);
updateMask->SetBit(GAMEOBJECT_BYTES_1);
updateMask->SetBit(GAMEOBJECT_BYTES_1); // why do we need this here?
}
else if (isType(TYPEMASK_UNIT))
{
Expand Down Expand Up @@ -687,33 +687,31 @@ void Object::BuildValuesUpdate(uint8 updatetype, ByteBuffer * data, UpdateMask *
// GAMEOBJECT_TYPE_DUNGEON_DIFFICULTY can have lo flag = 2
// most likely related to "can enter map" and then should be 0 if can not enter

// GO_DYNFLAG_ACTIVATE = 0x01
// GO_DYNFLAG_ANIMATE = 0x02
// GO_DYNFLAG_NO_INTERACT = 0x04
// GO_DYNFLAG_SPARKLE = 0x08

if (IsActivateToQuest)
{
switch(((GameObject*)this)->GetGoType())
{
case GAMEOBJECT_TYPE_QUESTGIVER:
*data << uint16(1);
// GO also seen with GO_DYNFLAG_LO_SPARKLE explicit, relation/reason unclear (192861)
*data << uint16(GO_DYNFLAG_LO_ACTIVATE);
*data << uint16(-1);
break;
case GAMEOBJECT_TYPE_CHEST:
*data << uint16(9); // 1 for client before 2.3.0
// GO_DYNFLAG_LO_ACTIVATE only, before client 2.3.0
*data << uint16(GO_DYNFLAG_LO_ACTIVATE | GO_DYNFLAG_LO_SPARKLE);
*data << uint16(-1);
break;
case GAMEOBJECT_TYPE_GENERIC:
*data << uint16(8); // unclear if 0x01 should be added
// unclear if GO_DYNFLAG_LO_ACTIVATE should be added
*data << uint16(GO_DYNFLAG_LO_SPARKLE);
*data << uint16(-1);
break;
case GAMEOBJECT_TYPE_SPELL_FOCUS:
*data << uint16(9);
*data << uint16(GO_DYNFLAG_LO_ACTIVATE | GO_DYNFLAG_LO_SPARKLE);
*data << uint16(-1);
break;
case GAMEOBJECT_TYPE_GOOBER:
*data << uint16(9);
*data << uint16(GO_DYNFLAG_LO_ACTIVATE | GO_DYNFLAG_LO_SPARKLE);
*data << uint16(-1);
break;
default:
Expand Down
8 changes: 8 additions & 0 deletions src/game/SharedDefines.h
Expand Up @@ -1219,6 +1219,14 @@ enum GameObjectFlags
GO_FLAG_UNK_11 = 0x00000400 //? Seen on type 33, possibly meaning "destructed"
};

enum GameObjectDynamicLowFlags
{
GO_DYNFLAG_LO_ACTIVATE = 0x01, // enables interaction with GO
GO_DYNFLAG_LO_ANIMATE = 0x02, // possibly more distinct animation of GO
GO_DYNFLAG_LO_NO_INTERACT = 0x04, // appears to disable interaction (not fully verified)
GO_DYNFLAG_LO_SPARKLE = 0x08, // makes GO sparkle
};

enum TextEmotes
{
TEXTEMOTE_AGREE = 1,
Expand Down
2 changes: 1 addition & 1 deletion src/shared/revision_nr.h
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "10597"
#define REVISION_NR "10598"
#endif // __REVISION_NR_H__

0 comments on commit 9c0d767

Please sign in to comment.