summaryrefslogtreecommitdiff
path: root/src/being/being.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-06-21 20:18:38 +0300
committerAndrei Karas <akaras@inbox.ru>2016-06-21 21:45:47 +0300
commit95227e7c07251c8f59164050543c3c134aff238f (patch)
tree1b45789ca770f7251a557281da22892923470a68 /src/being/being.cpp
parentae351c43eca44c532404deb9f10bf3e4b97406bf (diff)
downloadplus-95227e7c07251c8f59164050543c3c134aff238f.tar.gz
plus-95227e7c07251c8f59164050543c3c134aff238f.tar.bz2
plus-95227e7c07251c8f59164050543c3c134aff238f.tar.xz
plus-95227e7c07251c8f59164050543c3c134aff238f.zip
Add support for items with cards in charcreation.xml
Diffstat (limited to 'src/being/being.cpp')
-rw-r--r--src/being/being.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/being/being.cpp b/src/being/being.cpp
index 618922fa3..4c750f5c8 100644
--- a/src/being/being.cpp
+++ b/src/being/being.cpp
@@ -3156,6 +3156,12 @@ void Being::setHairColor(const unsigned int slot,
}
}
+void Being::setSpriteSlot(const unsigned int slot,
+ const BeingSlot &beingSlot)
+{
+ mSlots[slot] = beingSlot;
+}
+
void Being::dumpSprites() const restrict2
{
std::vector<BeingSlot>::const_iterator it1 = mSlots.begin();
@@ -4429,6 +4435,14 @@ int Being::getSpriteID(const int slot) const restrict2
return mSlots[slot].spriteId;
}
+const BeingSlot &Being::getSpriteSlot(const int slot) const restrict2
+{
+ if (slot < 0 || CAST_SIZE(slot) >= mSlots.size())
+ return *emptyBeingSlot;
+
+ return mSlots[slot];
+}
+
ItemColor Being::getSpriteColor(const int slot) const restrict2
{
if (slot < 0 || CAST_SIZE(slot) >= mSlots.size())