summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/being/being.cpp9
-rw-r--r--src/being/being.h5
2 files changed, 10 insertions, 4 deletions
diff --git a/src/being/being.cpp b/src/being/being.cpp
index 3e57c969c..855a081e9 100644
--- a/src/being/being.cpp
+++ b/src/being/being.cpp
@@ -27,6 +27,7 @@
#include "configuration.h"
#include "effectmanager.h"
#include "guild.h"
+#include "itemcolormanager.h"
#include "party.h"
#include "settings.h"
#include "soundmanager.h"
@@ -2486,9 +2487,10 @@ void Being::updateSprite(const unsigned int slot,
void Being::setSprite(const unsigned int slot,
const int id,
std::string color,
- const ItemColor colorId,
+ ItemColor colorId,
const IsWeapon isWeapon,
- const IsTempSprite isTempSprite) restrict2
+ const IsTempSprite isTempSprite,
+ const int *const cards) restrict2
{
if (!charServerHandler || slot >= charServerHandler->maxSprite())
return;
@@ -2549,6 +2551,9 @@ void Being::setSprite(const unsigned int slot,
addPet(pet);
}
+ if (cards != nullptr)
+ colorId = ItemColorManager::getColorFromCards(cards);
+
if (!filename.empty())
{
if (color.empty())
diff --git a/src/being/being.h b/src/being/being.h
index b71f38c0a..5c9f7115d 100644
--- a/src/being/being.h
+++ b/src/being/being.h
@@ -322,9 +322,10 @@ class Being notfinal : public ActorSprite,
void setSprite(const unsigned int slot,
const int id,
std::string color = "",
- const ItemColor colorId = ItemColor_one,
+ ItemColor colorId = ItemColor_one,
const IsWeapon isWeapon = IsWeapon_false,
- const IsTempSprite isTempSprite = IsTempSprite_false)
+ const IsTempSprite isTempSprite = IsTempSprite_false,
+ const int *const cards = nullptr)
restrict2;
void updateSprite(const unsigned int slot,