diff options
author | Thorbjørn Lindeijer <bjorn@lindeijer.nl> | 2024-03-04 16:29:14 +0100 |
---|---|---|
committer | Thorbjørn Lindeijer <bjorn@lindeijer.nl> | 2024-03-04 20:20:52 +0100 |
commit | 5c7f9d1d216fd1edca231ed274ac3077cb34909f (patch) | |
tree | 234405f8f9d0b422a02d8cc44854aaa6992cf2d9 /src/net/manaserv | |
parent | d5ebad4e74da011777f9ba1a13fbb37d18c827b9 (diff) | |
download | mana-5c7f9d1d216fd1edca231ed274ac3077cb34909f.tar.gz mana-5c7f9d1d216fd1edca231ed274ac3077cb34909f.tar.bz2 mana-5c7f9d1d216fd1edca231ed274ac3077cb34909f.tar.xz mana-5c7f9d1d216fd1edca231ed274ac3077cb34909f.zip |
Fixed character display
This change fixes hair style to take into account "race", which makes
the faces visible again. Hair colors should also be fixed now, with
partial support for itemcolors.xml added.
The Mana client now also supports per-character gender, and it now hides
the hair style and color buttons on character creation, when there are
none to choose from.
Closes #43
Diffstat (limited to 'src/net/manaserv')
-rw-r--r-- | src/net/manaserv/beinghandler.cpp | 10 | ||||
-rw-r--r-- | src/net/manaserv/charhandler.cpp | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/net/manaserv/beinghandler.cpp b/src/net/manaserv/beinghandler.cpp index 6193fed1..186239c1 100644 --- a/src/net/manaserv/beinghandler.cpp +++ b/src/net/manaserv/beinghandler.cpp @@ -115,12 +115,12 @@ void BeingHandler::handleBeingEnterMessage(MessageIn &msg) auto direction = (BeingDirection)msg.readInt8(); Gender gender; int genderAsInt = msg.readInt8(); - if (genderAsInt == ::GENDER_FEMALE) - gender = ::GENDER_FEMALE; - else if (genderAsInt == ::GENDER_MALE) - gender = ::GENDER_MALE; + if (genderAsInt == GENDER_FEMALE) + gender = Gender::FEMALE; + else if (genderAsInt == GENDER_MALE) + gender = Gender::MALE; else - gender = ::GENDER_UNSPECIFIED; + gender = Gender::UNSPECIFIED; Being *being; switch (type) diff --git a/src/net/manaserv/charhandler.cpp b/src/net/manaserv/charhandler.cpp index 61e44506..83919d4e 100644 --- a/src/net/manaserv/charhandler.cpp +++ b/src/net/manaserv/charhandler.cpp @@ -102,8 +102,8 @@ void CharHandler::handleCharacterInfo(MessageIn &msg) CachedCharacterInfo info; info.slot = msg.readInt8(); info.name = msg.readString(); - info.gender = msg.readInt8() == ManaServ::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(); |