summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-03-21 17:03:45 +0300
committerAndrei Karas <akaras@inbox.ru>2016-03-21 17:03:45 +0300
commit800b0f0477ac00a447aa958d1974e2c01d4eaa6c (patch)
tree40bd91cef8f3890bfcaec92f0058d6a6027ac171
parentac4e40a1408ad4d6fbcfce9d2bc6a0bc187ea5a4 (diff)
downloadmanaverse-800b0f0477ac00a447aa958d1974e2c01d4eaa6c.tar.gz
manaverse-800b0f0477ac00a447aa958d1974e2c01d4eaa6c.tar.bz2
manaverse-800b0f0477ac00a447aa958d1974e2c01d4eaa6c.tar.xz
manaverse-800b0f0477ac00a447aa958d1974e2c01d4eaa6c.zip
Remove some getters from StatusEffect.
-rw-r--r--src/being/actorsprite.cpp12
-rw-r--r--src/gui/popups/beingpopup.cpp2
-rw-r--r--src/resources/db/statuseffectdb.cpp2
-rw-r--r--src/statuseffect.cpp2
-rw-r--r--src/statuseffect.h27
5 files changed, 10 insertions, 35 deletions
diff --git a/src/being/actorsprite.cpp b/src/being/actorsprite.cpp
index 4424d4e07..6c083b9ce 100644
--- a/src/being/actorsprite.cpp
+++ b/src/being/actorsprite.cpp
@@ -119,7 +119,7 @@ void ActorSprite::logic()
{
const StatusEffect *const effect
= StatusEffectDB::getStatusEffect(*it, Enable_true);
- if (effect && effect->particleEffectIsPersistent())
+ if (effect && effect->mIsPersistent)
updateStatusEffect(*it, Enable_true);
}
}
@@ -266,16 +266,16 @@ void ActorSprite::updateStatusEffect(const int index, const Enable newStatus)
index, newStatus);
if (!effect)
return;
- if (effect->isPoison() && getType() == ActorType::Player)
+ if (effect->mIsPoison && getType() == ActorType::Player)
setPoison(newStatus == Enable_true);
#ifdef EATHENA_SUPPORT
- else if (effect->isCart() && localPlayer == this)
+ else if (effect->mIsCart && localPlayer == this)
setHaveCart(newStatus == Enable_true);
- else if (effect->isRiding())
+ else if (effect->mIsRiding)
setRiding(newStatus == Enable_true);
- else if (effect->isTrickDead())
+ else if (effect->mIsTrickDead)
setTrickDead(newStatus == Enable_true);
- else if (effect->isPostDelay())
+ else if (effect->mIsPostDelay)
stopCast(newStatus == Enable_true);
#endif
handleStatusEffect(effect, index);
diff --git a/src/gui/popups/beingpopup.cpp b/src/gui/popups/beingpopup.cpp
index b5434eae0..f3d9195cc 100644
--- a/src/gui/popups/beingpopup.cpp
+++ b/src/gui/popups/beingpopup.cpp
@@ -353,7 +353,7 @@ void BeingPopup::show(const int x, const int y, Being *const b)
continue;
if (!effectsStr.empty())
effectsStr.append(", ");
- effectsStr.append(effect->getName());
+ effectsStr.append(effect->mName);
}
// TRANSLATORS: being popup label
label7->setCaption(strprintf(_("Effects: %s"),
diff --git a/src/resources/db/statuseffectdb.cpp b/src/resources/db/statuseffectdb.cpp
index 60ea6ea17..2c2dbeeff 100644
--- a/src/resources/db/statuseffectdb.cpp
+++ b/src/resources/db/statuseffectdb.cpp
@@ -149,7 +149,7 @@ void StatusEffectDB::loadXmlFile(const std::string &fileName)
startEffect->mIcon = XML::getProperty(node, "icon", "");
startEffect->mAction = XML::getProperty(node, "action", "");
- startEffect->mPersistentParticleEffect = (XML::getProperty(
+ startEffect->mIsPersistent = (XML::getProperty(
node, "persistent-particle-effect", "no")) != "no";
endEffect->mName = startEffect->mName;
diff --git a/src/statuseffect.cpp b/src/statuseffect.cpp
index 26e6d97b7..88bfc07a1 100644
--- a/src/statuseffect.cpp
+++ b/src/statuseffect.cpp
@@ -46,7 +46,7 @@ StatusEffect::StatusEffect() :
mIcon(),
mAction(),
mName(),
- mPersistentParticleEffect(false),
+ mIsPersistent(false),
mIsPoison(false),
mIsCart(false),
mIsRiding(false),
diff --git a/src/statuseffect.h b/src/statuseffect.h
index b1a2d1d3e..3e35860b1 100644
--- a/src/statuseffect.h
+++ b/src/statuseffect.h
@@ -69,38 +69,13 @@ class StatusEffect final
*/
std::string getAction() const A_WARN_UNUSED;
- std::string getName() const A_WARN_UNUSED
- { return mName; }
-
- /**
- * Determines whether the particle effect should be restarted when the
- * being changes maps
- */
- bool particleEffectIsPersistent() const A_WARN_UNUSED
- { return mPersistentParticleEffect; }
-
- bool isPoison() const A_WARN_UNUSED
- { return mIsPoison; }
-
- bool isCart() const A_WARN_UNUSED
- { return mIsCart; }
-
- bool isRiding() const A_WARN_UNUSED
- { return mIsRiding; }
-
- bool isTrickDead() const A_WARN_UNUSED
- { return mIsTrickDead; }
-
- bool isPostDelay() const A_WARN_UNUSED
- { return mIsPostDelay; }
-
std::string mMessage;
std::string mSFXEffect;
std::string mParticleEffect;
std::string mIcon;
std::string mAction;
std::string mName;
- bool mPersistentParticleEffect;
+ bool mIsPersistent;
bool mIsPoison;
bool mIsCart;
bool mIsRiding;