diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-10-18 17:56:41 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-10-18 17:56:41 +0300 |
commit | cca1dbbcba03e5c50e92096503b612fba5b399a2 (patch) | |
tree | a03c2a7edb18aed3b5bff2b30f466605d5596496 /src/being/actorsprite.cpp | |
parent | 6d5d21de014f242f1929d6afdc72a52f61655df3 (diff) | |
download | manaverse-cca1dbbcba03e5c50e92096503b612fba5b399a2.tar.gz manaverse-cca1dbbcba03e5c50e92096503b612fba5b399a2.tar.bz2 manaverse-cca1dbbcba03e5c50e92096503b612fba5b399a2.tar.xz manaverse-cca1dbbcba03e5c50e92096503b612fba5b399a2.zip |
Add logging for not implimemted effects.
Diffstat (limited to 'src/being/actorsprite.cpp')
-rw-r--r-- | src/being/actorsprite.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/being/actorsprite.cpp b/src/being/actorsprite.cpp index 951243cc7..0518c82fa 100644 --- a/src/being/actorsprite.cpp +++ b/src/being/actorsprite.cpp @@ -30,6 +30,8 @@ #include "gui/theme.h" +#include "listeners/debugmessagelistener.h" + #include "particle/particle.h" #include "resources/resourcemanager.h" @@ -198,13 +200,22 @@ void ActorSprite::setStatusEffectBlock(const int offset, { for (unsigned i = 0; i < STATUS_EFFECTS; i++) { + const bool val = (newEffects & (1 << i)) > 0; const int index = StatusEffect::blockEffectIndexToEffectIndex( offset + i); if (index != -1) { - setStatusEffect(index, - fromBool((newEffects & (1 << i)) > 0, Enable)); + setStatusEffect(index, fromBool(val, Enable)); + } + else if (val && config.getBoolValue("unimplimentedLog")) + { + const std::string str = strprintf( + "Error: unknown effect by block-index. " + "Offset: %d, effect int: %d, i: %u", + offset, (int)newEffects, i); + logger->log(str); + DebugMessageListener::distributeEvent(str); } } } |