diff options
Diffstat (limited to 'src/game-server/statuseffect.cpp')
-rw-r--r-- | src/game-server/statuseffect.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/game-server/statuseffect.cpp b/src/game-server/statuseffect.cpp index 4544bc17..f201927e 100644 --- a/src/game-server/statuseffect.cpp +++ b/src/game-server/statuseffect.cpp @@ -23,25 +23,25 @@ #include "scripting/script.hpp" #include "game-server/being.hpp" -StatusEffect::StatusEffect(int id) +StatusEffect::StatusEffect(int id): + mId(id), + mScript(0) { - mId = id; - mScript = NULL; } StatusEffect::~StatusEffect() { - if (mScript) delete mScript; + delete mScript; } void StatusEffect::tick(Being *target, int count) { - if (mScript) - { - mScript->setMap(target->getMap()); - mScript->prepare("tick"); - mScript->push(target); - mScript->push(count); - mScript->execute(); - } + if (mScript) + { + mScript->setMap(target->getMap()); + mScript->prepare("tick"); + mScript->push(target); + mScript->push(count); + mScript->execute(); + } } |