summaryrefslogtreecommitdiff
path: root/src/actormanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/actormanager.cpp')
-rw-r--r--src/actormanager.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/actormanager.cpp b/src/actormanager.cpp
index 020d3a9f5..82be50ea8 100644
--- a/src/actormanager.cpp
+++ b/src/actormanager.cpp
@@ -2043,8 +2043,16 @@ Being *ActorManager::cloneBeing(const Being *const srcBeing,
const int hairSlot = charServerHandler->hairSprite();
const int hairStyle = -srcBeing->getSpriteID(hairSlot);
const ItemColor hairColor = srcBeing->getHairColor();
- dstBeing->setSprite(hairSlot, hairStyle * -1,
- ItemDB::get(-hairStyle).getDyeColorsString(hairColor));
+ if (hairStyle != 0)
+ {
+ dstBeing->setSprite(hairSlot,
+ hairStyle * -1,
+ ItemDB::get(-hairStyle).getDyeColorsString(hairColor));
+ }
+ else
+ {
+ dstBeing->setSprite(hairSlot, 0, std::string());
+ }
dstBeing->setHairColor(hairColor);
return dstBeing;
}