diff options
author | Fate <fate.tmw@googlemail.com> | 2008-11-01 23:45:48 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2008-12-13 16:06:17 +0100 |
commit | ba02a23b63bf0a1fde2194d163ead365d2a4fdf0 (patch) | |
tree | 3fbaa733e43b270395b20418f71211b9a5b1fed2 /src/gui/char_select.cpp | |
parent | 16106cae769f485908c15ac39d0e017167099a48 (diff) | |
download | mana-client-ba02a23b63bf0a1fde2194d163ead365d2a4fdf0.tar.gz mana-client-ba02a23b63bf0a1fde2194d163ead365d2a4fdf0.tar.bz2 mana-client-ba02a23b63bf0a1fde2194d163ead365d2a4fdf0.tar.xz mana-client-ba02a23b63bf0a1fde2194d163ead365d2a4fdf0.zip |
* Use hair.xml to determine hair colours (#514)
* Auto-detect number of hair styles available (#514)
Conflicts:
ChangeLog
src/being.cpp
src/being.h
src/gui/char_select.cpp
(cherry picked from eAthena client)
Diffstat (limited to 'src/gui/char_select.cpp')
-rw-r--r-- | src/gui/char_select.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gui/char_select.cpp b/src/gui/char_select.cpp index 3adfbc08..67cb3c7b 100644 --- a/src/gui/char_select.cpp +++ b/src/gui/char_select.cpp @@ -266,7 +266,8 @@ CharCreateDialog::CharCreateDialog(Window *parent, int slot): Window(_("Create Character"), true, parent), mSlot(slot) { mPlayer = new Player(0, 0, NULL); - mPlayer->setHairStyle(rand() % NR_HAIR_STYLES, rand() % NR_HAIR_COLORS); + mPlayer->setHairStyle(rand() % Being::getHairStylesNr(), + rand() % Being::getHairColorsNr()); mPlayer->setGender(GENDER_MALE); mNameField = new TextField(""); @@ -422,13 +423,13 @@ CharCreateDialog::action(const gcn::ActionEvent &event) mPlayer->setHairStyle(-1, mPlayer->getHairColor() + 1); } else if (event.getId() == "prevcolor") { - mPlayer->setHairStyle(-1, mPlayer->getHairColor() + NR_HAIR_COLORS - 1); + mPlayer->setHairStyle(-1, mPlayer->getHairColor() + Being::getHairColorsNr() - 1); } else if (event.getId() == "nextstyle") { mPlayer->setHairStyle(mPlayer->getHairStyle() + 1, -1); } else if (event.getId() == "prevstyle") { - mPlayer->setHairStyle(mPlayer->getHairStyle() + NR_HAIR_STYLES - 1, -1); + mPlayer->setHairStyle(mPlayer->getHairStyle() + Being::getHairStylesNr() - 1, -1); } else if (event.getId() == "statslider") { UpdateSliders(); |