From 36406c6ba43e804d0c2b1cb3632b6e909b55c55f Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 7 Nov 2015 20:57:15 +0300 Subject: Fix reporting about missing status effects. --- src/statuseffect.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/statuseffect.cpp') 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::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; } -- cgit v1.2.3-60-g2f50