#include <statuseffect.h>
Definition at line 30 of file statuseffect.h.
Public Member Functions | |
StatusEffect () | |
~StatusEffect () | |
void | playSFX () |
Plays the sound effect associated with this status effect, if possible. | |
void | deliverMessage () |
Delivers the chat message associated with this status effect, if possible. | |
Particle * | getParticle () |
Creates the particle effect associated with this status effect, if possible. | |
AnimatedSprite * | getIcon () |
Retrieves the status icon for this effect, if applicable. | |
SpriteAction | getAction () |
Retrieves an action to perform, or ACTION_INVALID. | |
bool | particleEffectIsPersistent () const |
Determines whether the particle effect should be restarted when the being changes maps. | |
Static Public Member Functions | |
static StatusEffect * | getStatusEffect (int index, bool enabling) |
Retrieves a status effect. | |
static StatusEffect * | getStunEffect (int index, bool enabling) |
Retrieves a stun effect. | |
static int | blockEffectIndexToEffectIndex (int blocKIndex) |
Maps a block effect index to its corresponding effect index. | |
static void | load () |
static void | unload () |
Private Attributes | |
std::string | mMessage |
std::string | mSFXEffect |
std::string | mParticleEffect |
std::string | mIcon |
std::string | mAction |
bool | mPersistentParticleEffect |
StatusEffect::StatusEffect | ( | ) |
Definition at line 35 of file statuseffect.cpp.
StatusEffect::~StatusEffect | ( | ) |
Definition at line 39 of file statuseffect.cpp.
void StatusEffect::playSFX | ( | ) |
Plays the sound effect associated with this status effect, if possible.
Definition at line 42 of file statuseffect.cpp.
void StatusEffect::deliverMessage | ( | ) |
Delivers the chat message associated with this status effect, if possible.
Definition at line 48 of file statuseffect.cpp.
Particle * StatusEffect::getParticle | ( | ) |
Creates the particle effect associated with this status effect, if possible.
Definition at line 54 of file statuseffect.cpp.
AnimatedSprite * StatusEffect::getIcon | ( | ) |
Retrieves the status icon for this effect, if applicable.
Definition at line 62 of file statuseffect.cpp.
SpriteAction StatusEffect::getAction | ( | ) |
bool StatusEffect::particleEffectIsPersistent | ( | ) | const [inline] |
Determines whether the particle effect should be restarted when the being changes maps.
Definition at line 67 of file statuseffect.h.
StatusEffect * StatusEffect::getStatusEffect | ( | int | index, | |
bool | enabling | |||
) | [static] |
Retrieves a status effect.
index | Index of the status effect. | |
enabling | Whether to retrieve the activating effect (true) or the deactivating effect (false). |
Definition at line 102 of file statuseffect.cpp.
StatusEffect * StatusEffect::getStunEffect | ( | int | index, | |
bool | enabling | |||
) | [static] |
Retrieves a stun effect.
index | Index of the stun effect. | |
enabling | Whether to retrieve the activating effect (true) or the deactivating effect (false). |
Definition at line 107 of file statuseffect.cpp.
int StatusEffect::blockEffectIndexToEffectIndex | ( | int | blocKIndex | ) | [static] |
Maps a block effect index to its corresponding effect index.
Block effect indices are used for opt2/opt3/status.option blocks; their mapping to regular effect indices is handled in the config file.
Returns -1 on failure.
Definition at line 95 of file statuseffect.cpp.
void StatusEffect::load | ( | ) | [static] |
Definition at line 112 of file statuseffect.cpp.
void StatusEffect::unload | ( | ) | [static] |
Definition at line 170 of file statuseffect.cpp.
std::string StatusEffect::mMessage [private] |
Definition at line 102 of file statuseffect.h.
std::string StatusEffect::mSFXEffect [private] |
Definition at line 103 of file statuseffect.h.
std::string StatusEffect::mParticleEffect [private] |
Definition at line 104 of file statuseffect.h.
std::string StatusEffect::mIcon [private] |
Definition at line 105 of file statuseffect.h.
std::string StatusEffect::mAction [private] |
Definition at line 106 of file statuseffect.h.
bool StatusEffect::mPersistentParticleEffect [private] |
Definition at line 107 of file statuseffect.h.