diff options
author | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer> | 2011-10-22 23:57:01 +0200 |
---|---|---|
committer | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer> | 2011-10-22 23:57:01 +0200 |
commit | 659b1eac4fc9e733fcfd233020bac78701c30640 (patch) | |
tree | 71a989257a61f56d3788dec8008e87fc492c1bac | |
parent | 5d115b5fd4d9915c4e72c33d800ddbd8a48802b5 (diff) | |
download | mana-659b1eac4fc9e733fcfd233020bac78701c30640.tar.gz mana-659b1eac4fc9e733fcfd233020bac78701c30640.tar.bz2 mana-659b1eac4fc9e733fcfd233020bac78701c30640.tar.xz mana-659b1eac4fc9e733fcfd233020bac78701c30640.zip |
Officially added the gender in the manaserv protocol.
Reviewed-by: bjorn.
-rw-r--r-- | src/net/manaserv/beinghandler.cpp | 4 | ||||
-rw-r--r-- | src/net/manaserv/charhandler.cpp | 4 | ||||
-rw-r--r-- | src/net/manaserv/manaserv_protocol.h | 10 |
3 files changed, 14 insertions, 4 deletions
diff --git a/src/net/manaserv/beinghandler.cpp b/src/net/manaserv/beinghandler.cpp index 4d45da8a..3a7fde70 100644 --- a/src/net/manaserv/beinghandler.cpp +++ b/src/net/manaserv/beinghandler.cpp @@ -155,8 +155,8 @@ void BeingHandler::handleBeingEnterMessage(Net::MessageIn &msg) } int hs = msg.readInt8(), hc = msg.readInt8(); being->setSprite(SPRITE_HAIR, hs * -1, ColorDB::get(hc)); - being->setGender(msg.readInt8() == GENDER_MALE ? - GENDER_MALE : GENDER_FEMALE); + being->setGender(msg.readInt8() == ManaServ::GENDER_MALE ? + ::GENDER_MALE : ::GENDER_FEMALE); handleLooks(being, msg); } break; diff --git a/src/net/manaserv/charhandler.cpp b/src/net/manaserv/charhandler.cpp index 79f3b35a..33dd94ba 100644 --- a/src/net/manaserv/charhandler.cpp +++ b/src/net/manaserv/charhandler.cpp @@ -101,8 +101,8 @@ void CharHandler::handleCharacterInfo(Net::MessageIn &msg) CachedCharacterInfo info; info.slot = msg.readInt8(); info.name = msg.readString(); - info.gender = msg.readInt8() == GENDER_MALE ? GENDER_MALE : - GENDER_FEMALE; + info.gender = msg.readInt8() == ManaServ::GENDER_MALE ? + ::GENDER_MALE : ::GENDER_FEMALE; info.hairStyle = msg.readInt8(); info.hairColor = msg.readInt8(); info.level = msg.readInt16(); diff --git a/src/net/manaserv/manaserv_protocol.h b/src/net/manaserv/manaserv_protocol.h index 27d7c7b8..9bd94b3e 100644 --- a/src/net/manaserv/manaserv_protocol.h +++ b/src/net/manaserv/manaserv_protocol.h @@ -438,6 +438,16 @@ enum SpriteLayer SPRITE_VECTOREND }; +/** + * Beings Genders + */ +enum BeingGender +{ + GENDER_MALE = 0, + GENDER_FEMALE, + GENDER_UNSPECIFIED +}; + } // namespace ManaServ #endif // MANASERV_PROTOCOL_H |