diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-03-21 16:52:59 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-03-21 16:52:59 +0300 |
commit | ac4e40a1408ad4d6fbcfce9d2bc6a0bc187ea5a4 (patch) | |
tree | 13314fbbb4945414b8be5d1d0236e1c41f88e8c8 /src/being/actorsprite.cpp | |
parent | 68857593b01b73d33fa1a12011cf9cb402db8a73 (diff) | |
download | plus-ac4e40a1408ad4d6fbcfce9d2bc6a0bc187ea5a4.tar.gz plus-ac4e40a1408ad4d6fbcfce9d2bc6a0bc187ea5a4.tar.bz2 plus-ac4e40a1408ad4d6fbcfce9d2bc6a0bc187ea5a4.tar.xz plus-ac4e40a1408ad4d6fbcfce9d2bc6a0bc187ea5a4.zip |
Split StatusEffect into StatusEffect and StatusEffectDB.
Diffstat (limited to 'src/being/actorsprite.cpp')
-rw-r--r-- | src/being/actorsprite.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/being/actorsprite.cpp b/src/being/actorsprite.cpp index f444bdd71..4424d4e07 100644 --- a/src/being/actorsprite.cpp +++ b/src/being/actorsprite.cpp @@ -40,6 +40,8 @@ #include "resources/sprite/imagesprite.h" #include "resources/sprite/spritereference.h" +#include "resources/db/statuseffectdb.h" + #include "utils/checkutils.h" #include "utils/delete2.h" #include "utils/timer.h" @@ -116,7 +118,7 @@ void ActorSprite::logic() FOR_EACH (std::set<int>::const_iterator, it, mStatusEffects) { const StatusEffect *const effect - = StatusEffect::getStatusEffect(*it, Enable_true); + = StatusEffectDB::getStatusEffect(*it, Enable_true); if (effect && effect->particleEffectIsPersistent()) updateStatusEffect(*it, Enable_true); } @@ -193,7 +195,7 @@ 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( + const int index = StatusEffectDB::blockEffectIndexToEffectIndex( offset + i); // block-id (offset + i) to id (index) if (index != -1) @@ -252,15 +254,15 @@ void ActorSprite::setStatusEffectOpiton0(const uint32_t option) void ActorSprite::updateStunMode(const int oldMode, const int newMode) { - handleStatusEffect(StatusEffect::getStatusEffect( + handleStatusEffect(StatusEffectDB::getStatusEffect( oldMode, Enable_false), -1); - handleStatusEffect(StatusEffect::getStatusEffect( + handleStatusEffect(StatusEffectDB::getStatusEffect( newMode, Enable_true), -1); } void ActorSprite::updateStatusEffect(const int index, const Enable newStatus) { - StatusEffect *const effect = StatusEffect::getStatusEffect( + StatusEffect *const effect = StatusEffectDB::getStatusEffect( index, newStatus); if (!effect) return; |