summaryrefslogtreecommitdiff
path: root/src/net/manaserv/charhandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-06-11 00:02:37 +0300
committerAndrei Karas <akaras@inbox.ru>2012-06-11 01:14:28 +0300
commit78d804ba1751134120caca22f0cf5abcfd11f29d (patch)
tree6be477ca42a3e54861a21f121b5581af7058e409 /src/net/manaserv/charhandler.cpp
parent3a28edfb7ac991ad70a7baf76f48218d9db89bcb (diff)
downloadmanaverse-78d804ba1751134120caca22f0cf5abcfd11f29d.tar.gz
manaverse-78d804ba1751134120caca22f0cf5abcfd11f29d.tar.bz2
manaverse-78d804ba1751134120caca22f0cf5abcfd11f29d.tar.xz
manaverse-78d804ba1751134120caca22f0cf5abcfd11f29d.zip
Fix compilation for manaserv.
Diffstat (limited to 'src/net/manaserv/charhandler.cpp')
-rw-r--r--src/net/manaserv/charhandler.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/net/manaserv/charhandler.cpp b/src/net/manaserv/charhandler.cpp
index 7977df909..db2d03247 100644
--- a/src/net/manaserv/charhandler.cpp
+++ b/src/net/manaserv/charhandler.cpp
@@ -41,6 +41,8 @@
#include "net/manaserv/attributes.h"
#include "resources/colordb.h"
+#include "resources/itemdb.h"
+#include "resources/iteminfo.h"
#include "utils/dtor.h"
#include "utils/gettext.h"
@@ -376,8 +378,10 @@ void CharHandler::updateCharacters()
LocalPlayer *player = character->dummy = new LocalPlayer;
player->setName(info.name);
player->setGender(info.gender);
+
+ const ItemInfo &item = ItemDB::get(-info.hairStyle);
player->setSprite(SPRITE_HAIR, info.hairStyle * -1,
- ColorDB::getHairColor(info.hairColor));
+ item.getDyeColorsString(info.hairColor));
character->data.mAttributes[LEVEL] = info.level;
character->data.mAttributes[CHAR_POINTS] = info.characterPoints;
character->data.mAttributes[CORR_POINTS] = info.correctionPoints;