From b2741a6c49eafb9f19f9cd6625836d85d31980b3 Mon Sep 17 00:00:00 2001 From: Erik Schilling Date: Thu, 11 Oct 2012 20:02:10 +0200 Subject: 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. --- src/common/manaserv_protocol.h | 8 ++++---- 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: -- cgit v1.2.3-70-g09d2