ManaPlus
|
#include <effectmanager.h>
Public Member Functions | |
EffectManager () | |
~EffectManager () | |
void | loadXmlFile (const std::string &fileName, const SkipError skipError) |
bool | trigger (const int id, Being *const being, const int rotation) |
bool | triggerDirection (const int id, Being *const being, const SpriteDirection::Type &direction) |
Particle * | triggerReturn (const int id, Being *const being, const int rotation) |
bool | trigger (const int id, const int x, const int y, const time_t endTime, const int rotation) |
void | triggerDefault (int effectId, Being *const being, const int defaultEffectId) |
void | triggerDefault (int effectId, const int x, const int y, const time_t endTime, const int defaultEffectId) |
void | logic () |
void | clear () |
Private Attributes | |
std::vector< EffectDescription > | mEffects |
std::list< ParticleTimer > | mTimers |
Definition at line 44 of file effectmanager.h.
EffectManager::EffectManager | ( | ) |
Definition at line 41 of file effectmanager.cpp.
References Configuration::getStringValue(), loadXmlDir, loadXmlFile(), Logger::log1(), logger, paths, SkipError_false, and SkipError_true.
EffectManager::~EffectManager | ( | ) |
Definition at line 84 of file effectmanager.cpp.
void EffectManager::clear | ( | ) |
Definition at line 262 of file effectmanager.cpp.
References FOR_EACH, Particle::kill(), and mTimers.
Referenced by Game::~Game().
void EffectManager::loadXmlFile | ( | const std::string & | fileName, |
const SkipError | skipError | ||
) |
Definition at line 51 of file effectmanager.cpp.
References fileName, for_each_xml_child_node, XML::getProperty(), Logger::log(), logger, mEffects, XML::Document::rootNode(), and UseVirtFs_true.
Referenced by EffectManager().
void EffectManager::logic | ( | ) |
Definition at line 239 of file effectmanager.cpp.
References cur_time, ParticleTimer::endTime, FOR_EACH, Particle::kill(), mTimers, and ParticleTimer::particle.
Referenced by Game::slowLogic().
bool EffectManager::trigger | ( | const int | id, |
Being *const | being, | ||
const int | rotation | ||
) |
Triggers a effect with the id, at the specified being.
Definition at line 119 of file effectmanager.cpp.
References Being::addEffect(), ParticleEngine::addEffect(), BLOCK_END, BLOCK_START, ActorSprite::controlAutoParticle(), FOR_EACH, EffectDescription::gfx, EffectDescription::id, mEffects, particleEngine, SoundManager::playSfx(), reportAlways, EffectDescription::sfx, soundManager, and EffectDescription::sprite.
Referenced by EAthena::BeingRecv::processBeingSelfEffect(), TmwAthena::BeingRecv::processBeingSelfEffect(), EAthena::BeingRecv::processBeingSpecialEffect(), QuestsWindow::rebuild(), Being::setEmote(), Being::takeDamage(), triggerDefault(), and triggerDirection().
bool EffectManager::trigger | ( | const int | id, |
const int | x, | ||
const int | y, | ||
const time_t | endTime, | ||
const int | rotation | ||
) |
Triggers a effect with the id, at the specified x and y coordinate.
Definition at line 182 of file effectmanager.cpp.
References ParticleEngine::addEffect(), FOR_EACH, EffectDescription::gfx, EffectDescription::id, mEffects, mTimers, particleEngine, SoundManager::playSfx(), reportAlways, EffectDescription::sfx, soundManager, x, and y.
void EffectManager::triggerDefault | ( | int | effectId, |
Being *const | being, | ||
const int | defaultEffectId | ||
) |
Definition at line 215 of file effectmanager.cpp.
References trigger().
Referenced by Being::handleSkill(), Being::handleSkillCasting(), SkillDialog::playCastingDstTileEffect(), SkillDialog::playRemoveEffect(), and SkillDialog::playUpdateEffect().
void EffectManager::triggerDefault | ( | int | effectId, |
const int | x, | ||
const int | y, | ||
const time_t | endTime, | ||
const int | defaultEffectId | ||
) |
bool EffectManager::triggerDirection | ( | const int | id, |
Being *const | being, | ||
const SpriteDirection::Type & | direction | ||
) |
Definition at line 88 of file effectmanager.cpp.
References SpriteDirection::DEFAULT, SpriteDirection::DOWN, SpriteDirection::DOWNLEFT, SpriteDirection::DOWNRIGHT, SpriteDirection::INVALID, SpriteDirection::LEFT, SpriteDirection::RIGHT, trigger(), SpriteDirection::UP, SpriteDirection::UPLEFT, and SpriteDirection::UPRIGHT.
Referenced by Being::setAction().
Definition at line 152 of file effectmanager.cpp.
References Being::addEffect(), ParticleEngine::addEffect(), ActorSprite::controlCustomParticle(), FOR_EACH, EffectDescription::gfx, EffectDescription::id, mEffects, particleEngine, SoundManager::playSfx(), reportAlways, EffectDescription::sfx, soundManager, and EffectDescription::sprite.
Referenced by Being::addSpecialEffect(), and Being::addSpiritBalls().
|
private |
Definition at line 96 of file effectmanager.h.
Referenced by loadXmlFile(), trigger(), and triggerReturn().
|
private |
Definition at line 97 of file effectmanager.h.