diff options
author | Erik Schilling <ablu.erikschilling@googlemail.com> | 2011-12-27 05:40:16 +0800 |
---|---|---|
committer | Erik Schilling <ablu.erikschilling@googlemail.com> | 2012-01-02 19:59:51 +0800 |
commit | 440e43491c5abcfcd7bf502d68d4e0d83eb6790b (patch) | |
tree | 91e8ec7d5ba4df3c9eab5f7996e2aae0ddb00888 | |
parent | 4a4637fd522ed7702e9b1e4b970495d90f56e5cd (diff) | |
download | mana-440e43491c5abcfcd7bf502d68d4e0d83eb6790b.tar.gz mana-440e43491c5abcfcd7bf502d68d4e0d83eb6790b.tar.bz2 mana-440e43491c5abcfcd7bf502d68d4e0d83eb6790b.tar.xz mana-440e43491c5abcfcd7bf502d68d4e0d83eb6790b.zip |
Made the client capable of displaying gender of monsters and npcs
Reviewed-by: o11c, bjorn, Bertram.
-rw-r--r-- | src/net/manaserv/beinghandler.cpp | 2 | ||||
-rw-r--r-- | src/net/manaserv/manaserv_protocol.h | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/net/manaserv/beinghandler.cpp b/src/net/manaserv/beinghandler.cpp index 511cc770..91c7d621 100644 --- a/src/net/manaserv/beinghandler.cpp +++ b/src/net/manaserv/beinghandler.cpp @@ -158,6 +158,8 @@ void BeingHandler::handleBeingEnterMessage(Net::MessageIn &msg) ? ActorSprite::MONSTER : ActorSprite::NPC, subtype); std::string name = msg.readString(); if (name.length() > 0) being->setName(name); + being->setGender(msg.readInt8() == ManaServ::GENDER_MALE ? + ::GENDER_MALE : ::GENDER_FEMALE); } break; default: diff --git a/src/net/manaserv/manaserv_protocol.h b/src/net/manaserv/manaserv_protocol.h index 2b6322ff..2dc270c4 100644 --- a/src/net/manaserv/manaserv_protocol.h +++ b/src/net/manaserv/manaserv_protocol.h @@ -112,8 +112,8 @@ enum { 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 - // npc: W type id + // monster: W type id gender + // npc: W type id gender 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 }* |