diff options
author | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer> | 2011-09-28 23:54:56 +0200 |
---|---|---|
committer | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer> | 2011-09-28 23:54:56 +0200 |
commit | 20ecfcc950208862d366c5c065319f423f3c7115 (patch) | |
tree | 7ed821a11f5ec96e558bbcb0b681f77d4712764e /src/net/manaserv | |
parent | 93c60c2b94b658e4839641c25f56859706cca921 (diff) | |
download | mana-20ecfcc950208862d366c5c065319f423f3c7115.tar.gz mana-20ecfcc950208862d366c5c065319f423f3c7115.tar.bz2 mana-20ecfcc950208862d366c5c065319f423f3c7115.tar.xz mana-20ecfcc950208862d366c5c065319f423f3c7115.zip |
Officially added the gender in the manaserv protocol - client part.
Diffstat (limited to 'src/net/manaserv')
-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 | 12 |
3 files changed, 16 insertions, 4 deletions
diff --git a/src/net/manaserv/beinghandler.cpp b/src/net/manaserv/beinghandler.cpp index 44c3d77b..511cc770 100644 --- a/src/net/manaserv/beinghandler.cpp +++ b/src/net/manaserv/beinghandler.cpp @@ -145,8 +145,8 @@ void BeingHandler::handleBeingEnterMessage(Net::MessageIn &msg) } int hs = msg.readInt8(), hc = msg.readInt8(); being->setSprite(SPRITE_LAYER_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 b1ddc96a..2bc76fa9 100644 --- a/src/net/manaserv/charhandler.cpp +++ b/src/net/manaserv/charhandler.cpp @@ -103,8 +103,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 49548132..46d46d5e 100644 --- a/src/net/manaserv/manaserv_protocol.h +++ b/src/net/manaserv/manaserv_protocol.h @@ -424,6 +424,18 @@ enum BeingDirection RIGHT = 8 }; +/** + * Beings Genders + * WARNING: Has to be in sync with the same enum in the Being class + * of the client! + */ +enum BeingGender +{ + GENDER_MALE = 0, + GENDER_FEMALE, + GENDER_UNSPECIFIED +}; + } // namespace ManaServ #endif // MANASERV_PROTOCOL_H |