diff options
author | Erik Schilling <ablu.erikschilling@googlemail.com> | 2012-10-11 20:02:10 +0200 |
---|---|---|
committer | Erik Schilling <ablu.erikschilling@googlemail.com> | 2012-10-11 20:26:42 +0200 |
commit | b2741a6c49eafb9f19f9cd6625836d85d31980b3 (patch) | |
tree | 7d9c1a79e33675a240119afeee4dc99f5e6a22a9 | |
parent | 49762e3472fd4098fb3ae1a18f751024056e40df (diff) | |
download | manaserv-b2741a6c49eafb9f19f9cd6625836d85d31980b3.tar.gz manaserv-b2741a6c49eafb9f19f9cd6625836d85d31980b3.tar.bz2 manaserv-b2741a6c49eafb9f19f9cd6625836d85d31980b3.tar.xz manaserv-b2741a6c49eafb9f19f9cd6625836d85d31980b3.zip |
Moved order of sending gender
Gender is shared. There is no reason in duplicating code
*Breaks compatbility with old clients*
*Requires clientside patch*
Reviewed-by: Stefan Beller.
-rw-r--r-- | src/common/manaserv_protocol.h | 8 | ||||
-rw-r--r-- | src/game-server/state.cpp | 4 |
2 files changed, 5 insertions, 7 deletions
diff --git a/src/common/manaserv_protocol.h b/src/common/manaserv_protocol.h index 4bac0837..913a1268 100644 --- a/src/common/manaserv_protocol.h +++ b/src/common/manaserv_protocol.h @@ -126,10 +126,10 @@ enum { PGMSG_LOWER_ATTRIBUTE = 0x0170, // W attribute GPMSG_LOWER_ATTRIBUTE_RESPONSE = 0x0171, // B error, W attribute PGMSG_RESPAWN = 0x0180, // - - GPMSG_BEING_ENTER = 0x0200, // B type, W being id, B action, W*2 position, B direction - // character: S name, B hair style, B hair color, B gender, B sprite layers changed, { B slot type, W item id }* - // monster: W type id gender - // npc: W type id gender + GPMSG_BEING_ENTER = 0x0200, // B type, W being id, B action, W*2 position, B direction, B gender + // character: S name, B hair style, B hair color, B sprite layers changed, { B slot type, W item id }* + // monster: W type id + // npc: W type id GPMSG_BEING_LEAVE = 0x0201, // W being id GPMSG_ITEM_APPEAR = 0x0202, // W item id, W*2 position GPMSG_BEING_LOOKS_CHANGE = 0x0210, // B sprite layers changed, { B slot type, W item id }* diff --git a/src/game-server/state.cpp b/src/game-server/state.cpp index 249040a8..83417763 100644 --- a/src/game-server/state.cpp +++ b/src/game-server/state.cpp @@ -241,6 +241,7 @@ static void informPlayer(MapComposite *map, Character *p) enterMsg.writeInt16(opos.x); enterMsg.writeInt16(opos.y); enterMsg.writeInt8(o->getDirection()); + enterMsg.writeInt8(o->getGender()); switch (otype) { case OBJECT_CHARACTER: @@ -249,7 +250,6 @@ static void informPlayer(MapComposite *map, Character *p) enterMsg.writeString(q->getName()); enterMsg.writeInt8(q->getHairStyle()); enterMsg.writeInt8(q->getHairColor()); - enterMsg.writeInt8(q->getGender()); serializeLooks(q, enterMsg); } break; @@ -258,7 +258,6 @@ static void informPlayer(MapComposite *map, Character *p) Monster *q = static_cast< Monster * >(o); enterMsg.writeInt16(q->getSpecy()->getId()); enterMsg.writeString(q->getName()); - enterMsg.writeInt8(q->getGender()); } break; case OBJECT_NPC: @@ -266,7 +265,6 @@ static void informPlayer(MapComposite *map, Character *p) NPC *q = static_cast< NPC * >(o); enterMsg.writeInt16(q->getNPC()); enterMsg.writeString(q->getName()); - enterMsg.writeInt8(q->getGender()); } break; default: |