summaryrefslogtreecommitdiff
path: root/src/statuseffect.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2008-12-07 03:14:31 +0100
committerBjørn Lindeijer <bjorn@lindeijer.nl>2008-12-07 13:45:44 +0100
commitb9cacafcad8b515c1c65aee804a3ce08411b73c9 (patch)
tree8a82fabf08b322de8b31b97bc356caccc33f90f6 /src/statuseffect.cpp
parent3fcd6a549fc825f4185a6dc248922e02988caed5 (diff)
downloadmana-client-b9cacafcad8b515c1c65aee804a3ce08411b73c9.tar.gz
mana-client-b9cacafcad8b515c1c65aee804a3ce08411b73c9.tar.bz2
mana-client-b9cacafcad8b515c1c65aee804a3ce08411b73c9.tar.xz
mana-client-b9cacafcad8b515c1c65aee804a3ce08411b73c9.zip
Some small updates and reformatting
Diffstat (limited to 'src/statuseffect.cpp')
-rw-r--r--src/statuseffect.cpp37
1 files changed, 16 insertions, 21 deletions
diff --git a/src/statuseffect.cpp b/src/statuseffect.cpp
index 564d26f0..eeae45d8 100644
--- a/src/statuseffect.cpp
+++ b/src/statuseffect.cpp
@@ -30,25 +30,25 @@
#define STATUS_EFFECTS_FILE "status-effects.xml"
-StatusEffect::StatusEffect() {};
-StatusEffect::~StatusEffect() {};
+StatusEffect::StatusEffect()
+{}
-void
-StatusEffect::playSFX()
+StatusEffect::~StatusEffect()
+{}
+
+void StatusEffect::playSFX()
{
if (mSFXEffect != "")
sound.playSfx(mSFXEffect);
}
-void
-StatusEffect::deliverMessage()
+void StatusEffect::deliverMessage()
{
if (mMessage != "")
chatWindow->chatLog(mMessage, BY_SERVER);
}
-Particle *
-StatusEffect::getParticle()
+Particle *StatusEffect::getParticle()
{
if (mParticleEffect == "")
return NULL;
@@ -56,13 +56,13 @@ StatusEffect::getParticle()
return particleEngine->addEffect(mParticleEffect, 0, 0);
}
-AnimatedSprite *
-StatusEffect::getIcon()
+AnimatedSprite *StatusEffect::getIcon()
{
if (mIcon == "")
return NULL;
else {
- AnimatedSprite * sprite = AnimatedSprite::load("graphics/sprites/" + mIcon);
+ AnimatedSprite *sprite = AnimatedSprite::load(
+ "graphics/sprites/" + mIcon);
if (false && sprite) {
sprite->play(ACTION_DEFAULT);
sprite->reset();
@@ -71,8 +71,7 @@ StatusEffect::getIcon()
}
}
-SpriteAction
-StatusEffect::getAction()
+SpriteAction StatusEffect::getAction()
{
if (mAction == "")
return ACTION_INVALID;
@@ -90,23 +89,20 @@ static status_effect_map statusEffects;
static status_effect_map stunEffects;
static std::map<int, int> blockEffectIndexMap;
-int
-StatusEffect::blockEffectIndexToEffectIndex(int blockIndex)
+int StatusEffect::blockEffectIndexToEffectIndex(int blockIndex)
{
if (blockEffectIndexMap.find(blockIndex) == blockEffectIndexMap.end())
return -1;
return blockEffectIndexMap[blockIndex];
}
-StatusEffect *
-StatusEffect::getStatusEffect(int index, bool enabling)
+StatusEffect *StatusEffect::getStatusEffect(int index, bool enabling)
{
load();
return statusEffects[enabling][index];
}
-StatusEffect *
-StatusEffect::getStunEffect(int index, bool enabling)
+StatusEffect *StatusEffect::getStunEffect(int index, bool enabling)
{
load();
return stunEffects[enabling][index];
@@ -116,8 +112,7 @@ static bool status_effects_loaded = false;
-void
-StatusEffect::load()
+void StatusEffect::load()
{
if (status_effects_loaded)
return;