summaryrefslogtreecommitdiff
path: root/src/statuseffect.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-11-07 20:57:15 +0300
committerAndrei Karas <akaras@inbox.ru>2015-11-07 21:14:40 +0300
commit36406c6ba43e804d0c2b1cb3632b6e909b55c55f (patch)
tree02b9bfd248de3df28bdbb2e95d6cd0dfbaf24144 /src/statuseffect.cpp
parent76a14ca6ff93deb86376780ded7c4ac1dd04e8ef (diff)
downloadmv-36406c6ba43e804d0c2b1cb3632b6e909b55c55f.tar.gz
mv-36406c6ba43e804d0c2b1cb3632b6e909b55c55f.tar.bz2
mv-36406c6ba43e804d0c2b1cb3632b6e909b55c55f.tar.xz
mv-36406c6ba43e804d0c2b1cb3632b6e909b55c55f.zip
Fix reporting about missing status effects.
Diffstat (limited to 'src/statuseffect.cpp')
-rw-r--r--src/statuseffect.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/statuseffect.cpp b/src/statuseffect.cpp
index eed1a307b..c3aed4ea0 100644
--- a/src/statuseffect.cpp
+++ b/src/statuseffect.cpp
@@ -30,6 +30,8 @@
#include "particle/particle.h"
+#include "listeners/debugmessagelistener.h"
+
#include "resources/beingcommon.h"
#include "resources/spriteaction.h"
@@ -124,7 +126,12 @@ StatusEffect *StatusEffect::getStatusEffect(const int index,
const std::map<int, StatusEffect *>::iterator it = effects.find(index);
if (it != effects.end())
return (*it).second;
- logger->log("Missing status effect: %d", index);
+ if (config.getBoolValue("unimplimentedLog"))
+ {
+ const std::string str = strprintf("Missing status effect: %d", index);
+ logger->log(str);
+ DebugMessageListener::distributeEvent(str);
+ }
return nullptr;
}