summaryrefslogtreecommitdiff
path: root/src/net/tmwa
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/tmwa')
-rw-r--r--src/net/tmwa/beinghandler.cpp8
-rw-r--r--src/net/tmwa/charserverhandler.cpp4
2 files changed, 8 insertions, 4 deletions
diff --git a/src/net/tmwa/beinghandler.cpp b/src/net/tmwa/beinghandler.cpp
index 5eb02d299..61924f1f4 100644
--- a/src/net/tmwa/beinghandler.cpp
+++ b/src/net/tmwa/beinghandler.cpp
@@ -49,6 +49,8 @@
#include "net/tmwa/protocol.h"
#include "resources/colordb.h"
+#include "resources/itemdb.h"
+#include "resources/iteminfo.h"
#include <iostream>
@@ -325,8 +327,8 @@ void BeingHandler::processBeingChangeLook(Net::MessageIn &msg, bool look2)
player_node->imitateOutfit(dstBeing, SPRITE_TOPCLOTHES);
break;
case 6: // eAthena LOOK_HAIR_COLOR
- dstBeing->setSpriteColor(SPRITE_HAIR,
- ColorDB::getHairColor(id));
+ dstBeing->setSpriteColor(SPRITE_HAIR, ItemDB::get(
+ dstBeing->getSpriteID(SPRITE_HAIR)).getDyeColorsString(id));
break;
case 7: // Clothes color
// ignoring it
@@ -540,7 +542,7 @@ void BeingHandler::processPlayerMoveUpdate(Net::MessageIn &msg, int msgType)
//dstBeing->setSprite(SPRITE_MISC1, misc1);
//dstBeing->setSprite(SPRITE_MISC2, misc2);
dstBeing->setSprite(SPRITE_HAIR, hairStyle * -1,
- ColorDB::getHairColor(hairColor));
+ ItemDB::get(-hairStyle).getDyeColorsString(hairColor));
player_node->imitateOutfit(dstBeing);
diff --git a/src/net/tmwa/charserverhandler.cpp b/src/net/tmwa/charserverhandler.cpp
index 04274a70b..e18c33a5a 100644
--- a/src/net/tmwa/charserverhandler.cpp
+++ b/src/net/tmwa/charserverhandler.cpp
@@ -38,6 +38,8 @@
#include "net/tmwa/protocol.h"
#include "resources/colordb.h"
+#include "resources/itemdb.h"
+#include "resources/iteminfo.h"
#include "utils/dtor.h"
@@ -214,7 +216,7 @@ void CharServerHandler::readPlayerData(Net::MessageIn &msg,
int topClothes = msg.readInt16();
tempPlayer->setSprite(SPRITE_HAIR, hairStyle * -1,
- ColorDB::getHairColor(msg.readInt16()));
+ ItemDB::get(-hairStyle).getDyeColorsString(msg.readInt16()));
int misc2 = msg.readInt16();
tempPlayer->setName(msg.readString(24));