summaryrefslogtreecommitdiff
path: root/src/being
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-03-21 21:28:24 +0300
committerAndrei Karas <akaras@inbox.ru>2016-03-21 21:28:24 +0300
commit3b71334296de5b53d2a6fa64c33b283ca3fa2a71 (patch)
tree1cea04790aaaa3e6219dc052469d026ebb079b95 /src/being
parentd65b19913092fa0ebe8848c0c902e6ee487d55c9 (diff)
downloadplus-3b71334296de5b53d2a6fa64c33b283ca3fa2a71.tar.gz
plus-3b71334296de5b53d2a6fa64c33b283ca3fa2a71.tar.bz2
plus-3b71334296de5b53d2a6fa64c33b283ca3fa2a71.tar.xz
plus-3b71334296de5b53d2a6fa64c33b283ca3fa2a71.zip
Show effect names in debug window in target tab.
Diffstat (limited to 'src/being')
-rw-r--r--src/being/actorsprite.cpp25
-rw-r--r--src/being/actorsprite.h2
2 files changed, 25 insertions, 2 deletions
diff --git a/src/being/actorsprite.cpp b/src/being/actorsprite.cpp
index 5334bcb6a..b315a7c08 100644
--- a/src/being/actorsprite.cpp
+++ b/src/being/actorsprite.cpp
@@ -248,8 +248,8 @@ static void applyEffectByOption1(ActorSprite *const actor,
{
FOR_EACH (OptionsMapCIter, it, options)
{
- const int opt = (*it).first;
- const int id = (*it).second;
+ const uint32_t opt = (*it).first;
+ const uint32_t id = (*it).second;
if (opt == option)
{
actor->setStatusEffect(id, Enable_true);
@@ -544,3 +544,24 @@ void ActorSprite::cleanupTargetCursors()
}
end_foreach
}
+
+std::string ActorSprite::getStatusEffectsString() const
+{
+ std::string effectsStr;
+ if (!mStatusEffects.empty())
+ {
+ FOR_EACH (std::set<int>::const_iterator, it, mStatusEffects)
+ {
+ const StatusEffect *const effect =
+ StatusEffectDB::getStatusEffect(
+ *it,
+ Enable_true);
+ if (!effect)
+ continue;
+ if (!effectsStr.empty())
+ effectsStr.append(", ");
+ effectsStr.append(effect->mName);
+ }
+ }
+ return effectsStr;
+}
diff --git a/src/being/actorsprite.h b/src/being/actorsprite.h
index 0bc6eff00..06433628f 100644
--- a/src/being/actorsprite.h
+++ b/src/being/actorsprite.h
@@ -187,6 +187,8 @@ class ActorSprite notfinal : public CompoundSprite, public Actor
const std::set<int> &getStatusEffects() const A_WARN_UNUSED
{ return mStatusEffects; }
+ std::string getStatusEffectsString() const;
+
virtual void stopCast(const bool b A_UNUSED)
{ }