ManaPlus
Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes
ActorSprite Class Reference

#include <actorsprite.h>

Inheritance diagram for ActorSprite:
CompoundSprite Actor Sprite Being FloorItem LocalPlayer

Public Member Functions

 ActorSprite (const BeingId id)
 
virtual ~ActorSprite ()
 
BeingId getId () const
 
void setId (const BeingId id)
 
virtual ActorTypeT getType () const
 
virtual void logic ()
 
void setMap (Map *const map)
 
virtual BlockTypeT getBlockType () const
 
void controlAutoParticle (Particle *const particle)
 
void controlCustomParticle (Particle *const particle)
 
virtual TargetCursorSizeT getTargetCursorSize () const
 
virtual int getTargetOffsetX () const
 
virtual int getTargetOffsetY () const
 
void setTargetType (const TargetCursorTypeT type)
 
void untarget ()
 
void setStatusEffect (const int32_t index, const Enable active, const IsStart start)
 
void setStatusEffectOpitons (const uint32_t option, const uint32_t opt1, const uint32_t opt2, const uint32_t opt3)
 
void setStatusEffectOpitons (const uint32_t option, const uint32_t opt1, const uint32_t opt2)
 
void setStatusEffectOpiton0 (const uint32_t option)
 
void setAlpha (const float alpha)
 
float getAlpha () const
 
int getWidth () const
 
int getHeight () const
 
void addActorSpriteListener (ActorSpriteListener *const listener)
 
void removeActorSpriteListener (ActorSpriteListener *const listener)
 
int getActorX () const
 
int getActorY () const
 
void setPoison (const bool b)
 
bool getPoison () const
 
void setHaveCart (const bool b)
 
bool getHaveCart () const
 
virtual void setRiding (const bool b)
 
virtual void setTrickDead (const bool b)
 
bool isTrickDead () const
 
const std::set< int32_t > & getStatusEffects () const
 
std::string getStatusEffectsString () const
 
virtual void stopCast (const bool b)
 
size_t getParticlesCount () const
 
void controlParticleDeleted (const Particle *const particle)
 
- Public Member Functions inherited from CompoundSprite
 CompoundSprite ()
 
virtual ~CompoundSprite ()
 
bool reset ()
 
bool play (const std::string &action)
 
bool update (const int time)
 
void drawSimple (Graphics *const graphics, const int posX, const int posY) const
 
int getWidth () const
 
int getHeight () const
 
const ImagegetImage () const
 
bool setSpriteDirection (const SpriteDirection::Type direction)
 
int getNumberOfLayers () const
 
unsigned int getCurrentFrame () const
 
unsigned int getFrameCount () const
 
void addSprite (Sprite *const sprite)
 
void setSprite (const size_t layer, Sprite *const sprite)
 
void removeSprite (const int layer)
 
void clear ()
 
void ensureSize (const size_t layerCount)
 
void drawSprites (Graphics *const graphics, const int posX, const int posY) const
 
virtual void drawSpritesSDL (Graphics *const graphics, const int posX, const int posY) const
 
void setAlpha (float alpha)
 
bool updateNumber (const unsigned num)
 
int getLastTime () const
 
int getStartTime () const
 
- Public Member Functions inherited from Sprite
virtual ~Sprite ()
 
virtual void draw (Graphics *const graphics, const int posX, const int posY) const =0
 
virtual const void * getHash () const
 
virtual const void * getHash2 () const
 
- Public Member Functions inherited from Actor
virtual ~Actor ()
 
virtual void draw (Graphics *const graphics, const int offsetX, const int offsetY) const =0
 
const VectorgetPixelPositionF () const
 
virtual void setPixelPositionF (const Vector &pos)
 
int getPixelX () const
 
virtual int getPixelY () const
 
virtual int getSortPixelY () const
 
virtual int getTileX () const
 
virtual int getTileY () const
 
virtual int getNumberOfLayers () const
 
const MapgetMap () const
 

Static Public Member Functions

static void load ()
 
static void unload ()
 
- Static Public Member Functions inherited from CompoundSprite
static void setEnableDelay (bool b)
 

Protected Types

typedef std::list< ActorSpriteListener * > ActorSpriteListeners
 
typedef ActorSpriteListeners::iterator ActorSpriteListenerIterator
 
- Protected Types inherited from CompoundSprite
typedef std::list< CompoundItem * > ImagesCache
 

Protected Member Functions

void setStatusEffectBlock (const int offset, const uint16_t newEffects)
 
virtual void updateStatusEffect (const int32_t index, const Enable newStatus, const IsStart start)
 
virtual void handleStatusEffect (const StatusEffect *const effect, const int32_t effectId, const Enable newStatus, const IsStart start)
 
void setupSpriteDisplay (const SpriteDisplay &display, const ForceDisplay forceDisplay, const DisplayTypeT displayType, const std::string &color)
 
- Protected Member Functions inherited from CompoundSprite
void redraw () const
 
void updateImages () const
 
bool updateFromCache () const
 
void initCurrentCacheItem () const
 
- Protected Member Functions inherited from Sprite
 Sprite ()
 
- Protected Member Functions inherited from Actor
 Actor ()
 

Static Protected Member Functions

static void initTargetCursor ()
 
static void cleanupTargetCursors ()
 

Protected Attributes

std::set< int32_t > mStatusEffects
 
ParticleVector mStatusParticleEffects
 
ParticleList mChildParticleEffects
 
int mHorseId
 
BeingId mId
 
AnimatedSpritemUsedTargetCursor
 
ActorSpriteListeners mActorSpriteListeners
 
int mCursorPaddingX
 
int mCursorPaddingY
 
bool mMustResetParticles
 
bool mPoison
 
bool mHaveCart
 
bool mTrickDead
 
- Protected Attributes inherited from CompoundSprite
ImagesCache imagesCache
 
CompoundItemmCacheItem
 
ImagemImage
 
ImagemAlphaImage
 
int mOffsetX
 
int mOffsetY
 
int mStartTime
 
int mLastTime
 
int mNextRedrawTime
 
bool mNeedsRedraw
 
bool mEnableAlphaFix
 
bool mDisableAdvBeingCaching
 
bool mDisableBeingCaching
 
- Protected Attributes inherited from Sprite
float mAlpha
 
- Protected Attributes inherited from Actor
MapmMap
 
Vector mPos
 
int mYDiff
 

Static Protected Attributes

static AnimatedSpritetargetCursor [static_cast< size_t >(TargetCursorType::NUM_TCT)][static_cast< size_t >(TargetCursorSize::NUM_TC)]
 
static bool loaded = false
 
- Static Protected Attributes inherited from CompoundSprite
static bool mEnableDelay = true
 

Additional Inherited Members

- Public Types inherited from CompoundSprite
typedef std::vector< Sprite * >::iterator SpriteIterator
 
typedef std::vector< Sprite * >::const_iterator SpriteConstIterator
 
- Data Fields inherited from CompoundSprite
std::vector< Sprite * > mSprites
 
- Data Fields inherited from Actor
int mPixelX
 
int mPixelY
 

Detailed Description

Definition at line 54 of file actorsprite.h.

Member Typedef Documentation

◆ ActorSpriteListenerIterator

typedef ActorSpriteListeners::iterator ActorSprite::ActorSpriteListenerIterator
protected

Definition at line 261 of file actorsprite.h.

◆ ActorSpriteListeners

Definition at line 260 of file actorsprite.h.

Constructor & Destructor Documentation

◆ ActorSprite()

ActorSprite::ActorSprite ( const BeingId  id)
explicit

Definition at line 71 of file actorsprite.cpp.

71  :
73  Actor(),
77  mHorseId(0),
78  mId(id),
79  mUsedTargetCursor(nullptr),
81  mCursorPaddingX(0),
82  mCursorPaddingY(0),
83  mMustResetParticles(false),
84  mPoison(false),
85  mHaveCart(false),
86  mTrickDead(false)
87 {
88 }
ParticleVector mStatusParticleEffects
Definition: actorsprite.h:252
ParticleList mChildParticleEffects
Definition: actorsprite.h:253
std::set< int32_t > mStatusEffects
Definition: actorsprite.h:250
int mCursorPaddingX
Definition: actorsprite.h:264
bool mMustResetParticles
Definition: actorsprite.h:268
bool mTrickDead
Definition: actorsprite.h:271
Actor()
Definition: actor.cpp:28
AnimatedSprite * mUsedTargetCursor
Definition: actorsprite.h:258
int mCursorPaddingY
Definition: actorsprite.h:265
ActorSpriteListeners mActorSpriteListeners
Definition: actorsprite.h:262
bool mHaveCart
Definition: actorsprite.h:270
BeingId mId
Definition: actorsprite.h:255

◆ ~ActorSprite()

ActorSprite::~ActorSprite ( )
virtual

Definition at line 90 of file actorsprite.cpp.

References ParticleContainer::clear(), FOR_EACH, LocalPlayer::getTarget(), localPlayer, mActorSpriteListeners, mChildParticleEffects, mMustResetParticles, mUsedTargetCursor, reportFalse, and LocalPlayer::setTarget().

91 {
93  mMustResetParticles = true;
94 
95  mUsedTargetCursor = nullptr;
96 
97  if (localPlayer != nullptr &&
98  localPlayer != this &&
99  localPlayer->getTarget() == this)
100  {
101  localPlayer->setTarget(nullptr);
102  }
103 
104  // Notify listeners of the destruction.
106  {
107  if (reportFalse(*iter))
108  (*iter)->actorSpriteDestroyed(*this);
109  }
110 }
#define FOR_EACH(type, iter, array)
Definition: foreach.h:24
ParticleList mChildParticleEffects
Definition: actorsprite.h:253
ActorSpriteListeners::iterator ActorSpriteListenerIterator
Definition: actorsprite.h:261
#define reportFalse(val)
Definition: checkutils.h:250
bool mMustResetParticles
Definition: actorsprite.h:268
AnimatedSprite * mUsedTargetCursor
Definition: actorsprite.h:258
LocalPlayer * localPlayer
ActorSpriteListeners mActorSpriteListeners
Definition: actorsprite.h:262
void setTarget(Being *const target)
Being * getTarget() const

Member Function Documentation

◆ addActorSpriteListener()

void ActorSprite::addActorSpriteListener ( ActorSpriteListener *const  listener)

Add an ActorSprite listener.

Definition at line 518 of file actorsprite.cpp.

References mActorSpriteListeners.

Referenced by getHeight().

519 {
520  mActorSpriteListeners.push_front(listener);
521 }
ActorSpriteListeners mActorSpriteListeners
Definition: actorsprite.h:262

◆ cleanupTargetCursors()

void ActorSprite::cleanupTargetCursors ( )
staticprotected

Remove the target cursors from memory

Definition at line 574 of file actorsprite.cpp.

References delete2, end_foreach, for_each_cursors, ServerCommandType::size, and targetCursor.

Referenced by getParticlesCount(), and unload().

575 {
577  {
578  delete2(targetCursor[type][size])
579  }
581 }
static AnimatedSprite * targetCursor[static_cast< size_t >(TargetCursorType::NUM_TCT)][static_cast< size_t >(TargetCursorSize::NUM_TC)]
Definition: actorsprite.h:245
#define delete2(var)
Definition: delete2.h:24
#define end_foreach
Definition: actorsprite.cpp:62
#define for_each_cursors()
Definition: actorsprite.cpp:53

◆ controlAutoParticle()

void ActorSprite::controlAutoParticle ( Particle *const  particle)

Take control of a particle. Particle can be auto deleted.

Definition at line 150 of file actorsprite.cpp.

References ParticleList::addLocally(), mChildParticleEffects, mId, and Particle::setActor().

Referenced by getBlockType(), setupSpriteDisplay(), and EffectManager::trigger().

151 {
152  if (particle != nullptr)
153  {
154  particle->setActor(mId);
156  }
157 }
void addLocally(Particle *const particle)
ParticleList mChildParticleEffects
Definition: actorsprite.h:253
void setActor(const BeingId actor)
Definition: particle.h:243
BeingId mId
Definition: actorsprite.h:255

◆ controlCustomParticle()

void ActorSprite::controlCustomParticle ( Particle *const  particle)

Take control of a particle. Owner must remove particle by self.

Definition at line 159 of file actorsprite.cpp.

References ParticleList::addLocally(), Particle::disableAutoDelete(), and mChildParticleEffects.

Referenced by Being::addItemParticles(), Being::addItemParticlesCards(), getBlockType(), Being::recreateItemParticles(), LocalPlayer::setTestParticle(), and EffectManager::triggerReturn().

160 {
161  if (particle != nullptr)
162  {
163  // The effect may not die without the beings permission or we segfault
164  particle->disableAutoDelete();
166  }
167 }
void addLocally(Particle *const particle)
ParticleList mChildParticleEffects
Definition: actorsprite.h:253
void disableAutoDelete()
Definition: particle.h:226

◆ controlParticleDeleted()

void ActorSprite::controlParticleDeleted ( const Particle *const  particle)

Definition at line 169 of file actorsprite.cpp.

References mChildParticleEffects, and ParticleList::removeLocally().

Referenced by getParticlesCount(), and Particle::~Particle().

170 {
171  if (particle != nullptr)
173 }
ParticleList mChildParticleEffects
Definition: actorsprite.h:253
void removeLocally(const Particle *const particle)

◆ getActorX()

int ActorSprite::getActorX ( ) const
inline

Definition at line 159 of file actorsprite.h.

References Actor::getPixelX(), and mapTileSize.

Referenced by FloorItem::draw().

160  { return getPixelX() - mapTileSize / 2; }
int getPixelX() const
Definition: actor.h:86
static const int mapTileSize
Definition: map.h:26

◆ getActorY()

int ActorSprite::getActorY ( ) const
inline

Definition at line 162 of file actorsprite.h.

References Actor::getPixelY(), and mapTileSize.

Referenced by FloorItem::draw().

163  { return getPixelY() - mapTileSize; }
virtual int getPixelY() const
Definition: actor.h:92
static const int mapTileSize
Definition: map.h:26

◆ getAlpha()

float ActorSprite::getAlpha ( ) const
inlinevirtual

Returns the current alpha value used to draw the actor.

Implements Actor.

Definition at line 136 of file actorsprite.h.

References Sprite::getAlpha().

137  { return CompoundSprite::getAlpha(); }
virtual float getAlpha() const
Definition: sprite.h:102

◆ getBlockType()

virtual BlockTypeT ActorSprite::getBlockType ( ) const
inlinevirtual

Gets the way the object blocks pathfinding for other objects

Reimplemented in Being.

Definition at line 82 of file actorsprite.h.

References controlAutoParticle(), controlCustomParticle(), and BlockType::NONE.

83  { return BlockType::NONE; }

◆ getHaveCart()

bool ActorSprite::getHaveCart ( ) const
inline

Definition at line 174 of file actorsprite.h.

References mHaveCart.

Referenced by Actions::showHideWindow(), and ShopWindow::updateButtonsAndLabels().

175  { return mHaveCart; }
bool mHaveCart
Definition: actorsprite.h:270

◆ getHeight()

int ActorSprite::getHeight ( ) const
inlinevirtual

Returns the vertical size of the actors graphical representation in pixels or 0 when it is undefined.

Reimplemented from Actor.

Reimplemented in Being.

Definition at line 142 of file actorsprite.h.

References addActorSpriteListener(), CompoundSprite::getHeight(), anonymous_namespace{itemlinkhandler.cpp}::listener, load(), removeActorSpriteListener(), and unload().

143  { return CompoundSprite::getHeight(); }
int getHeight() const

◆ getId()

BeingId ActorSprite::getId ( ) const
inline

Definition at line 63 of file actorsprite.h.

References mId.

Referenced by CharSelectDialog::action(), Being::addToCache(), EAthena::FamilyHandler::askForChild(), LocalPlayer::attack(), Being::botLogic(), EAthena::VendingHandler::buy(), EAthena::NpcHandler::buy(), TmwAthena::NpcHandler::buy(), EAthena::VendingHandler::buy2(), EAthena::VendingHandler::buyItems(), EAthena::PetHandler::catchPet(), EAthena::PartyHandler::changeLeader(), Actions::changeRelation(), ActorManager::clear(), ActorManager::cloneBeing(), EAthena::GameHandler::connect(), TmwAthena::GameHandler::connect(), ActorManager::createBeing(), ActorManager::createItem(), TmwAthena::CharServerHandler::deleteCharacter(), EAthena::CharServerHandler::deleteCharacter(), Actions::doSit(), ActorManager::erase(), ActorManager::findActor(), ActorManager::findBeing(), ActorManager::findItem(), PopupMenu::handleLink(), EAthena::PartyHandler::invite(), TmwAthena::PartyHandler::invite(), EAthena::GuildHandler::invite(), TmwAthena::PartyHandler::inviteResponse(), EAthena::PartyHandler::kick(), TmwAthena::PartyHandler::kick(), EAthena::GuildHandler::leave(), TargetDebugTab::logic(), ActorManager::logic(), EAthena::AdminHandler::mute(), EAthena::VendingHandler::open(), EAthena::BuyingStoreHandler::open(), FindBeingEqualFunctor::operator()(), SpellManager::parseCommand(), EAthena::PlayerHandler::pickUp(), TmwAthena::PlayerHandler::pickUp(), LocalPlayer::pingRequest(), ActorManager::printBeingsToChat(), EAthena::BeingRecv::processBeingChangeLookCards(), TmwAthena::BeingRecv::processBeingMove(), TmwAthena::BeingRecv::processBeingVisible(), EAthena::BuyingStoreRecv::processBuyingStoreItemsList(), EAthena::ChatRecv::processChatRoomCreateAck(), EAthena::MercenaryRecv::processMercenaryInfo(), Ea::BeingRecv::processNameResponse(), EAthena::BeingRecv::processNameResponse2(), Ea::PartyRecv::processPartyLeave(), EAthena::PlayerRecv::processPlayerGetExp(), EAthena::PlayerRecv::processPlayerGetExp2(), EAthena::BeingRecv::processPlayerGuilPartyInfo(), EAthena::PlayerRecv::processPlayerHeal(), Ea::BeingRecv::processPlayerStop(), EAthena::TradeHandler::request(), TmwAthena::TradeHandler::request(), EAthena::GuildHandler::requestAlliance(), EAthena::AdminHandler::requestLogin(), EAthena::GuildHandler::requestOpposition(), EAthena::BuyingStoreHandler::sell(), CharSelectDialog::setName(), PlayerInfo::setPetBeing(), ActorManager::setPlayer(), EAthena::PlayerHandler::setStat(), TmwAthena::PlayerHandler::setStat(), BeingPopup::show(), PopupMenu::showChatPopup(), PopupMenu::showPopup(), PopupMenu::showUndressPopup(), EAthena::NpcHandler::talk(), TmwAthena::NpcHandler::talk(), EAthena::AdminHandler::unequipAll(), Being::updateFromCache(), SkillDialog::useSkillDefault(), SkillDialog::useSkillPosition(), SkillDialog::useSkillTarget(), and EAthena::BeingHandler::viewPlayerEquipment().

64  { return mId; }
BeingId mId
Definition: actorsprite.h:255

◆ getParticlesCount()

size_t ActorSprite::getParticlesCount ( ) const
inline

◆ getPoison()

bool ActorSprite::getPoison ( ) const
inline

Definition at line 168 of file actorsprite.h.

References mPoison.

Referenced by SocialPlayersTab::updateAvatar().

169  { return mPoison; }

◆ getStatusEffects()

const std::set<int32_t>& ActorSprite::getStatusEffects ( ) const
inline

Definition at line 186 of file actorsprite.h.

References getStatusEffectsString(), and mStatusEffects.

187  { return mStatusEffects; }
std::set< int32_t > mStatusEffects
Definition: actorsprite.h:250

◆ getStatusEffectsString()

std::string ActorSprite::getStatusEffectsString ( ) const

Definition at line 583 of file actorsprite.cpp.

References ServerCommandType::effect, Enable_true, FOR_EACH, StatusEffectDB::getStatusEffect(), StatusEffect::mName, and mStatusEffects.

Referenced by getStatusEffects(), TargetDebugTab::logic(), and BeingPopup::show().

584 {
585  std::string effectsStr;
586  if (!mStatusEffects.empty())
587  {
588  FOR_EACH (std::set<int32_t>::const_iterator, it, mStatusEffects)
589  {
590  const StatusEffect *const effect =
592  *it,
593  Enable_true);
594  if (effect == nullptr)
595  continue;
596  if (!effectsStr.empty())
597  effectsStr.append(", ");
598  effectsStr.append(effect->mName);
599  }
600  }
601  return effectsStr;
602 }
#define FOR_EACH(type, iter, array)
Definition: foreach.h:24
std::set< int32_t > mStatusEffects
Definition: actorsprite.h:250
std::string mName
Definition: statuseffect.h:82
const bool Enable_true
Definition: enable.h:29
StatusEffect * getStatusEffect(const int index, const Enable enabling)

◆ getTargetCursorSize()

virtual TargetCursorSizeT ActorSprite::getTargetCursorSize ( ) const
inlinevirtual

Returns the required size of a target cursor for this being.

Reimplemented in Being.

Definition at line 98 of file actorsprite.h.

References TargetCursorSize::MEDIUM.

Referenced by setTargetType().

◆ getTargetOffsetX()

virtual int ActorSprite::getTargetOffsetX ( ) const
inlinevirtual

Reimplemented in Being.

Definition at line 101 of file actorsprite.h.

102  { return 0; }

◆ getTargetOffsetY()

virtual int ActorSprite::getTargetOffsetY ( ) const
inlinevirtual

Reimplemented in Being.

Definition at line 104 of file actorsprite.h.

References setTargetType().

105  { return 0; }

◆ getType()

virtual ActorTypeT ActorSprite::getType ( ) const
inlinevirtual

◆ getWidth()

int ActorSprite::getWidth ( ) const
inlinevirtual

Returns the horizontal size of the actors graphical representation in pixels or 0 when it is undefined.

Reimplemented from Actor.

Reimplemented in Being.

Definition at line 139 of file actorsprite.h.

References CompoundSprite::getWidth().

140  { return CompoundSprite::getWidth(); }
int getWidth() const

◆ handleStatusEffect()

void ActorSprite::handleStatusEffect ( const StatusEffect *const  effect,
const int32_t  effectId,
const Enable  newStatus,
const IsStart  start 
)
protectedvirtual

Handle an update to a status or stun effect

Parameters
TheStatusEffect to effect
effectId-1 for stun, otherwise the effect index

Reimplemented in LocalPlayer.

Definition at line 403 of file actorsprite.cpp.

References ParticleVector::delLocally(), Enable_true, StatusEffect::getParticle(), StatusEffect::getStartParticle(), IsStart_true, mStatusParticleEffects, and ParticleVector::setLocally().

Referenced by getParticlesCount(), LocalPlayer::handleStatusEffect(), and updateStatusEffect().

407 {
408  if (effect == nullptr)
409  return;
410 
411  if (newStatus == Enable_true)
412  {
413  if (effectId >= 0)
414  {
415  Particle *particle = nullptr;
416  if (start == IsStart_true)
417  particle = effect->getStartParticle();
418  if (particle == nullptr)
419  particle = effect->getParticle();
420  if (particle != nullptr)
421  mStatusParticleEffects.setLocally(effectId, particle);
422  }
423  }
424  else
425  {
427  }
428 }
ParticleVector mStatusParticleEffects
Definition: actorsprite.h:252
const bool Enable_true
Definition: enable.h:29
void setLocally(const int index, Particle *const particle)
const bool IsStart_true
Definition: isstart.h:29
Particle * getParticle() const
Particle * getStartParticle() const
void delLocally(const int index)

◆ initTargetCursor()

void ActorSprite::initTargetCursor ( )
staticprotected

Load the target cursors into memory

Definition at line 558 of file actorsprite.cpp.

References cursorSize(), cursorType(), end_foreach, for_each_cursors, AnimatedSprite::load(), Theme::resolveThemePath(), ServerCommandType::size, strprintf(), and targetCursor.

Referenced by getParticlesCount(), and load().

559 {
560  static const std::string targetCursorFile("target-cursor-%s-%s.xml");
561 
562  // Load target cursors
564  {
567  targetCursorFile.c_str(),
568  cursorType(static_cast<TargetCursorTypeT>(type)),
569  cursorSize(static_cast<TargetCursorSizeT>(size)))));
570  }
572 }
static AnimatedSprite * targetCursor[static_cast< size_t >(TargetCursorType::NUM_TCT)][static_cast< size_t >(TargetCursorSize::NUM_TC)]
Definition: actorsprite.h:245
static const char * cursorSize(const TargetCursorSizeT size)
#define end_foreach
Definition: actorsprite.cpp:62
static AnimatedSprite * load(const std::string &filename, const int variant=0)
std::string strprintf(const char *const format,...)
Definition: stringutils.cpp:99
static const char * cursorType(const TargetCursorTypeT type)
#define for_each_cursors()
Definition: actorsprite.cpp:53
static std::string resolveThemePath(const std::string &path)
Definition: theme.cpp:626

◆ isTrickDead()

bool ActorSprite::isTrickDead ( ) const
inline

Definition at line 183 of file actorsprite.h.

References mTrickDead.

Referenced by InputManager::updateConditionMask().

184  { return mTrickDead; }
bool mTrickDead
Definition: actorsprite.h:271

◆ load()

void ActorSprite::load ( )
static

Definition at line 499 of file actorsprite.cpp.

References initTargetCursor(), loaded, and unload().

Referenced by anonymous_namespace{client.cpp}::LoginListener::action(), getHeight(), Client::loadData(), and DbManager::loadDb().

500 {
501  if (loaded)
502  unload();
503 
505 
506  loaded = true;
507 }
static bool loaded
Definition: actorsprite.h:247
static void unload()
static void initTargetCursor()

◆ logic()

void ActorSprite::logic ( )
virtual

Reimplemented in Being, and LocalPlayer.

Definition at line 112 of file actorsprite.cpp.

References BLOCK_END, BLOCK_START, ServerCommandType::effect, Enable_true, FOR_EACH, StatusEffectDB::getStatusEffect(), IsStart_false, mChildParticleEffects, MILLISECONDS_IN_A_TICK, StatusEffect::mIsPersistent, mMustResetParticles, ParticleList::moveTo(), Actor::mPos, mStatusEffects, tick_time, CompoundSprite::update(), updateStatusEffect(), Vector::x, and Vector::y.

Referenced by getType(), and Being::logic().

113 {
114  BLOCK_START("ActorSprite::logic")
115  // Update sprite animations
117 
118  // Restart status/particle effects, if needed
120  {
121  mMustResetParticles = false;
122  FOR_EACH (std::set<int32_t>::const_iterator, it, mStatusEffects)
123  {
124  const StatusEffect *const effect
126  if (effect != nullptr &&
127  effect->mIsPersistent)
128  {
129  updateStatusEffect(*it,
130  Enable_true,
131  IsStart_false);
132  }
133  }
134  }
135 
136  // Update particle effects
138  BLOCK_END("ActorSprite::logic")
139 }
#define FOR_EACH(type, iter, array)
Definition: foreach.h:24
bool update(const int time)
volatile int tick_time
Definition: timer.cpp:52
ParticleList mChildParticleEffects
Definition: actorsprite.h:253
std::set< int32_t > mStatusEffects
Definition: actorsprite.h:250
#define BLOCK_START(name)
Definition: perfomance.h:78
Vector mPos
Definition: actor.h:139
virtual void updateStatusEffect(const int32_t index, const Enable newStatus, const IsStart start)
if(!vert) return
#define BLOCK_END(name)
Definition: perfomance.h:79
const bool Enable_true
Definition: enable.h:29
bool mMustResetParticles
Definition: actorsprite.h:268
static const int MILLISECONDS_IN_A_TICK
Definition: timer.h:29
const bool IsStart_false
Definition: isstart.h:29
bool mIsPersistent
Definition: statuseffect.h:83
float x
Definition: vector.h:208
void moveTo(const float x, const float y)
float y
Definition: vector.h:208
StatusEffect * getStatusEffect(const int index, const Enable enabling)

◆ removeActorSpriteListener()

void ActorSprite::removeActorSpriteListener ( ActorSpriteListener *const  listener)

Remove an ActorSprite listener.

Definition at line 523 of file actorsprite.cpp.

References mActorSpriteListeners.

Referenced by getHeight().

525 {
526  mActorSpriteListeners.remove(listener);
527 }
ActorSpriteListeners mActorSpriteListeners
Definition: actorsprite.h:262

◆ setAlpha()

void ActorSprite::setAlpha ( const float  alpha)
inlinevirtual

Sets the alpha value used to draw the actor.

Implements Actor.

Definition at line 133 of file actorsprite.h.

References CompoundSprite::setAlpha().

134  { CompoundSprite::setAlpha(alpha); }
void setAlpha(float alpha)

◆ setHaveCart()

void ActorSprite::setHaveCart ( const bool  b)
inline

Definition at line 171 of file actorsprite.h.

References mHaveCart.

Referenced by updateStatusEffect().

172  { mHaveCart = b; }
bool mHaveCart
Definition: actorsprite.h:270

◆ setId()

void ActorSprite::setId ( const BeingId  id)
inline

Definition at line 66 of file actorsprite.h.

References mId.

Referenced by EAthena::GameHandler::connect(), and TmwAthena::GameHandler::connect().

67  { mId = id; }
BeingId mId
Definition: actorsprite.h:255

◆ setMap()

void ActorSprite::setMap ( Map *const  map)
virtual

Reimplemented from Actor.

Reimplemented in Being, and LocalPlayer.

Definition at line 141 of file actorsprite.cpp.

References ParticleContainer::clear(), mChildParticleEffects, mMustResetParticles, and Actor::setMap().

Referenced by getType(), FloorItem::postInit(), and Being::setMap().

142 {
143  Actor::setMap(map);
144 
145  // Clear particle effect list because child particles became invalid
147  mMustResetParticles = true; // Reset status particles on next redraw
148 }
ParticleList mChildParticleEffects
Definition: actorsprite.h:253
bool mMustResetParticles
Definition: actorsprite.h:268
virtual void setMap(Map *const map)
Definition: actor.cpp:47

◆ setPoison()

void ActorSprite::setPoison ( const bool  b)
inline

Definition at line 165 of file actorsprite.h.

References mPoison.

Referenced by updateStatusEffect().

166  { mPoison = b; }

◆ setRiding()

virtual void ActorSprite::setRiding ( const bool  b)
inlinevirtual

Reimplemented in Being.

Definition at line 177 of file actorsprite.h.

References mHorseId.

Referenced by updateStatusEffect().

178  { mHorseId = b ? 1 : 0; }

◆ setStatusEffect()

void ActorSprite::setStatusEffect ( const int32_t  index,
const Enable  active,
const IsStart  start 
)

Definition at line 200 of file actorsprite.cpp.

References Enable_true, fromBool, mStatusEffects, and updateStatusEffect().

Referenced by applyEffectByOption(), applyEffectByOption1(), TmwAthena::BeingRecv::processBeingStatusChange(), EAthena::BeingRecv::processBeingStatusChange(), setStatusEffectBlock(), and untarget().

203 {
204  const Enable wasActive = fromBool(
205  mStatusEffects.find(index) != mStatusEffects.end(), Enable);
206 
207  if (active != wasActive)
208  {
209  updateStatusEffect(index, active, start);
210  if (active == Enable_true)
211  {
212  mStatusEffects.insert(index);
213  }
214  else
215  {
216  mStatusEffects.erase(index);
217  }
218  }
219 }
std::set< int32_t > mStatusEffects
Definition: actorsprite.h:250
virtual void updateStatusEffect(const int32_t index, const Enable newStatus, const IsStart start)
const bool Enable_true
Definition: enable.h:29
#define fromBool(val, name)
Definition: booldefines.h:48
bool Enable
Definition: enable.h:29

◆ setStatusEffectBlock()

void ActorSprite::setStatusEffectBlock ( const int  offset,
const uint16_t  newEffects 
)
protected

A status effect block is a 16 bit mask of status effects. We assign each such flag a block ID of offset + bitnr.

These are NOT the same as the status effect indices.

Definition at line 222 of file actorsprite.cpp.

References StatusEffectDB::blockIdToId(), CAST_S32, config, DebugMessageListener::distributeEvent(), fromBool, Configuration::getBoolValue(), IsStart_true, Logger::log(), logger, setStatusEffect(), STATUS_EFFECTS, ServerCommandType::str, and strprintf().

Referenced by getParticlesCount(), setStatusEffectOpiton0(), and setStatusEffectOpitons().

224 {
225  for (unsigned i = 0; i < STATUS_EFFECTS; i++)
226  {
227  const bool val = (newEffects & (1 << i)) > 0;
228  const int32_t index = StatusEffectDB::blockIdToId(
229  offset + i); // block-id (offset + i) to id (index)
230 
231  if (index != -1)
232  {
233  setStatusEffect(index,
234  fromBool(val, Enable),
235  IsStart_true);
236  }
237  else if (val && config.getBoolValue("unimplimentedLog"))
238  {
239  const std::string str = strprintf(
240  "Error: unknown effect by block-index. "
241  "Offset: %d, effect int: %d, i: %u",
242  offset, CAST_S32(newEffects), i);
243  logger->log(str);
245  }
246  }
247 }
Configuration config
int blockIdToId(const int blocKIndex)
Logger * logger
Definition: logger.cpp:95
bool getBoolValue(const std::string &key) const
#define CAST_S32
Definition: cast.h:29
std::string strprintf(const char *const format,...)
Definition: stringutils.cpp:99
#define fromBool(val, name)
Definition: booldefines.h:48
const bool IsStart_true
Definition: isstart.h:29
static const unsigned int STATUS_EFFECTS
Definition: actorsprite.cpp:64
static void distributeEvent(const std::string &msg)
void log(const char *const log_text,...)
Definition: logger.cpp:243
void setStatusEffect(const int32_t index, const Enable active, const IsStart start)

◆ setStatusEffectOpiton0()

void ActorSprite::setStatusEffectOpiton0 ( const uint32_t  option)

Definition at line 367 of file actorsprite.cpp.

References applyEffectByOption(), CAST_U16, StatusEffectDB::getOptionMap(), Settings::legacyEffects, setStatusEffectBlock(), settings, and anonymous_namespace{statuseffectdb.cpp}::statusEffects.

Referenced by EAthena::BeingRecv::processPlayerStatusChange2(), and untarget().

368 {
369  if (settings.legacyEffects == false)
370  {
371  applyEffectByOption(this, option, "option",
373  }
374  else
375  {
376  const uint32_t statusEffects = option << 16;
378  CAST_U16((statusEffects >> 16) & 0xffff));
379  }
380 }
const OptionsMap & getOptionMap()
Settings settings
Definition: settings.cpp:31
void setStatusEffectBlock(const int offset, const uint16_t newEffects)
#define CAST_U16
Definition: cast.h:28
static void applyEffectByOption(ActorSprite *const actor, uint32_t option, const char *const name, const OptionsMap &options)
bool legacyEffects
Definition: settings.h:159

◆ setStatusEffectOpitons() [1/2]

void ActorSprite::setStatusEffectOpitons ( const uint32_t  option,
const uint32_t  opt1,
const uint32_t  opt2,
const uint32_t  opt3 
)

Definition at line 314 of file actorsprite.cpp.

References applyEffectByOption(), applyEffectByOption1(), CAST_U16, StatusEffectDB::getOpt1Map(), StatusEffectDB::getOpt2Map(), StatusEffectDB::getOpt3Map(), StatusEffectDB::getOptionMap(), Settings::legacyEffects, setStatusEffectBlock(), settings, and anonymous_namespace{statuseffectdb.cpp}::statusEffects.

Referenced by TmwAthena::BeingRecv::processBeingMove(), EAthena::BeingRecv::processBeingMove(), EAthena::BeingRecv::processBeingSpawn(), TmwAthena::BeingRecv::processBeingVisible(), EAthena::BeingRecv::processBeingVisible(), TmwAthena::BeingRecv::processPlayerMove(), TmwAthena::BeingRecv::processPlayerStatusChange(), EAthena::BeingRecv::processPlayerStatusChange(), TmwAthena::BeingRecv::processPlayerUpdate1(), TmwAthena::BeingRecv::processPlayerUpdate2(), and untarget().

318 {
319  if (settings.legacyEffects == false)
320  {
321  applyEffectByOption(this, option, "option",
323  applyEffectByOption1(this, opt1, "opt1",
325  applyEffectByOption(this, opt2, "opt2",
327  applyEffectByOption(this, opt3, "opt3",
329  }
330  else
331  {
332  uint32_t statusEffects = opt2;
333  statusEffects |= option << 16;
335  CAST_U16((statusEffects >> 16) & 0xffffU));
337  CAST_U16(statusEffects & 0xffffU));
339  CAST_U16(opt3));
340  }
341 }
const OptionsMap & getOpt2Map()
const OptionsMap & getOpt1Map()
const OptionsMap & getOptionMap()
Settings settings
Definition: settings.cpp:31
void setStatusEffectBlock(const int offset, const uint16_t newEffects)
#define CAST_U16
Definition: cast.h:28
static void applyEffectByOption1(ActorSprite *const actor, uint32_t option, const char *const name, const OptionsMap &options)
const OptionsMap & getOpt3Map()
static void applyEffectByOption(ActorSprite *const actor, uint32_t option, const char *const name, const OptionsMap &options)
bool legacyEffects
Definition: settings.h:159

◆ setStatusEffectOpitons() [2/2]

void ActorSprite::setStatusEffectOpitons ( const uint32_t  option,
const uint32_t  opt1,
const uint32_t  opt2 
)

Definition at line 343 of file actorsprite.cpp.

References applyEffectByOption(), applyEffectByOption1(), CAST_U16, StatusEffectDB::getOpt1Map(), StatusEffectDB::getOpt2Map(), StatusEffectDB::getOptionMap(), Settings::legacyEffects, setStatusEffectBlock(), settings, and anonymous_namespace{statuseffectdb.cpp}::statusEffects.

346 {
347  if (settings.legacyEffects == false)
348  {
349  applyEffectByOption(this, option, "option",
351  applyEffectByOption1(this, opt1, "opt1",
353  applyEffectByOption(this, opt2, "opt2",
355  }
356  else
357  {
358  uint32_t statusEffects = opt2;
359  statusEffects |= option << 16;
361  CAST_U16((statusEffects >> 16) & 0xffffU));
363  CAST_U16(statusEffects & 0xffffU));
364  }
365 }
const OptionsMap & getOpt2Map()
const OptionsMap & getOpt1Map()
const OptionsMap & getOptionMap()
Settings settings
Definition: settings.cpp:31
void setStatusEffectBlock(const int offset, const uint16_t newEffects)
#define CAST_U16
Definition: cast.h:28
static void applyEffectByOption1(ActorSprite *const actor, uint32_t option, const char *const name, const OptionsMap &options)
static void applyEffectByOption(ActorSprite *const actor, uint32_t option, const char *const name, const OptionsMap &options)
bool legacyEffects
Definition: settings.h:159

◆ setTargetType()

void ActorSprite::setTargetType ( const TargetCursorTypeT  type)

Sets the target animation for this actor.

Definition at line 175 of file actorsprite.cpp.

References CAST_S32, CAST_SIZE, getTargetCursorSize(), mapTileSize, mCursorPaddingX, mCursorPaddingY, mUsedTargetCursor, TargetCursorType::NONE, TargetCursorSize::NUM_TC, targetCursor, and untarget().

Referenced by getTargetOffsetY(), and LocalPlayer::logic().

176 {
177  if (type == TargetCursorType::NONE)
178  {
179  untarget();
180  }
181  else
182  {
183  const size_t sz = CAST_SIZE(getTargetCursorSize());
185  if (mUsedTargetCursor != nullptr)
186  {
187  static const int targetWidths[CAST_SIZE(
189  = {0, 0, 0};
190  static const int targetHeights[CAST_SIZE(
192  = {-mapTileSize / 2, -mapTileSize / 2, -mapTileSize};
193 
194  mCursorPaddingX = CAST_S32(targetWidths[sz]);
195  mCursorPaddingY = CAST_S32(targetHeights[sz]);
196  }
197  }
198 }
static AnimatedSprite * targetCursor[static_cast< size_t >(TargetCursorType::NUM_TCT)][static_cast< size_t >(TargetCursorSize::NUM_TC)]
Definition: actorsprite.h:245
int mCursorPaddingX
Definition: actorsprite.h:264
virtual TargetCursorSizeT getTargetCursorSize() const
Definition: actorsprite.h:98
#define CAST_S32
Definition: cast.h:29
AnimatedSprite * mUsedTargetCursor
Definition: actorsprite.h:258
int mCursorPaddingY
Definition: actorsprite.h:265
static const int mapTileSize
Definition: map.h:26
#define CAST_SIZE
Definition: cast.h:33
void untarget()
Definition: actorsprite.h:115

◆ setTrickDead()

virtual void ActorSprite::setTrickDead ( const bool  b)
inlinevirtual

Reimplemented in Being.

Definition at line 180 of file actorsprite.h.

References mTrickDead.

Referenced by updateStatusEffect().

181  { mTrickDead = b; }
bool mTrickDead
Definition: actorsprite.h:271

◆ setupSpriteDisplay()

void ActorSprite::setupSpriteDisplay ( const SpriteDisplay display,
const ForceDisplay  forceDisplay,
const DisplayTypeT  displayType,
const std::string &  color 
)
protected

Definition at line 430 of file actorsprite.cpp.

References ParticleEngine::addEffect(), CompoundSprite::addSprite(), ParticleContainer::clear(), CompoundSprite::clear(), combineDye2(), combineDye3(), controlAutoParticle(), Image::decRef(), AnimatedSprite::delayedLoad(), ParticleEngine::enabled, DisplayType::Floor, SpriteDisplay::floor, FOR_EACH, ForceDisplay_true, Loader::getImage(), Theme::getImageFromTheme(), Configuration::getStringValue(), SpriteDisplay::image, DisplayType::Item, mChildParticleEffects, mMustResetParticles, CompoundSprite::mSprites, particleEngine, SpriteDisplay::particles, pathJoin(), paths, and SpriteDisplay::sprites.

Referenced by getParticlesCount(), FloorItem::postInit(), and Being::setSubtype().

434 {
435  clear();
436 
437  FOR_EACH (SpriteRefs, it, display.sprites)
438  {
439  if (*it == nullptr)
440  continue;
441  const std::string file = pathJoin(paths.getStringValue("sprites"),
442  combineDye3((*it)->sprite, color));
443 
444  const int variant = (*it)->variant;
445  addSprite(AnimatedSprite::delayedLoad(file, variant));
446  }
447 
448  // Ensure that something is shown, if desired
449  if (mSprites.empty() && forceDisplay == ForceDisplay_true)
450  {
451  if (display.image.empty())
452  {
454  paths.getStringValue("sprites"),
455  paths.getStringValue("spriteErrorFile"))));
456  }
457  else
458  {
459  std::string imagePath;
460  switch (displayType)
461  {
462  case DisplayType::Item:
463  default:
464  imagePath = pathJoin(paths.getStringValue("itemIcons"),
465  display.image);
466  break;
467  case DisplayType::Floor:
468  imagePath = pathJoin(paths.getStringValue("itemIcons"),
469  display.floor);
470  break;
471  }
472  imagePath = combineDye2(imagePath, color);
473  Image *img = Loader::getImage(imagePath);
474 
475  if (img == nullptr)
476  img = Theme::getImageFromTheme("unknown-item.png");
477 
478  addSprite(new ImageSprite(img));
479  if (img != nullptr)
480  img->decRef();
481  }
482  }
483 
485 
486  // setup particle effects
487  if (ParticleEngine::enabled && (particleEngine != nullptr))
488  {
489  FOR_EACH (StringVectCIter, itr, display.particles)
490  {
491  Particle *const p = particleEngine->addEffect(*itr, 0, 0);
493  }
494  }
495 
496  mMustResetParticles = true;
497 }
#define FOR_EACH(type, iter, array)
Definition: foreach.h:24
static bool enabled
std::string getStringValue(const std::string &key) const
std::vector< SpriteReference * > sprites
Definition: spritedisplay.h:46
StringVect::const_iterator StringVectCIter
Definition: stringvector.h:30
ParticleList mChildParticleEffects
Definition: actorsprite.h:253
std::string combineDye3(std::string file, const std::string &dye)
std::string pathJoin(std::string str1, const std::string &str2)
void addSprite(Sprite *const sprite)
ParticleEngine * particleEngine
Particle * addEffect(const std::string &particleEffectFile, const int pixelX, const int pixelY, const int rotation=0)
void controlAutoParticle(Particle *const particle)
bool mMustResetParticles
Definition: actorsprite.h:268
const bool ForceDisplay_true
Definition: forcedisplay.h:29
static AnimatedSprite * delayedLoad(const std::string &filename, const int variant=0)
Image * getImage(const std::string &idPath)
Definition: imageloader.cpp:85
StringVect particles
Definition: spritedisplay.h:47
static Image * getImageFromTheme(const std::string &path)
Definition: theme.cpp:654
std::vector< Sprite * > mSprites
std::string floor
Definition: spritedisplay.h:45
Configuration paths
Definition: image.h:61
std::string combineDye2(std::string file, const std::string &dye)
void decRef()
Definition: image.cpp:521
std::string image
Definition: spritedisplay.h:44
std::vector< SpriteReference * >::const_iterator SpriteRefs

◆ stopCast()

virtual void ActorSprite::stopCast ( const bool  b)
inlinevirtual

Reimplemented in Being.

Definition at line 191 of file actorsprite.h.

Referenced by updateStatusEffect().

192  { }

◆ unload()

void ActorSprite::unload ( )
static

Definition at line 509 of file actorsprite.cpp.

References cleanupTargetCursors(), loaded, and reportTrue.

Referenced by getHeight(), Client::initConfigListeners(), and load().

510 {
511  if (reportTrue(!loaded))
512  return;
513 
515  loaded = false;
516 }
static bool loaded
Definition: actorsprite.h:247
static void cleanupTargetCursors()
#define reportTrue(val)
Definition: checkutils.h:251

◆ untarget()

void ActorSprite::untarget ( )
inline

◆ updateStatusEffect()

void ActorSprite::updateStatusEffect ( const int32_t  index,
const Enable  newStatus,
const IsStart  start 
)
protectedvirtual

Notify self that a status effect has flipped. The new flag is passed.

Definition at line 382 of file actorsprite.cpp.

References ServerCommandType::effect, Enable_true, StatusEffectDB::getStatusEffect(), getType(), handleStatusEffect(), localPlayer, StatusEffect::mIsCart, StatusEffect::mIsPoison, StatusEffect::mIsPostDelay, StatusEffect::mIsRiding, StatusEffect::mIsTrickDead, ActorType::Player, setHaveCart(), setPoison(), setRiding(), setTrickDead(), and stopCast().

Referenced by getParticlesCount(), logic(), and setStatusEffect().

385 {
387  index, newStatus);
388  if (effect == nullptr)
389  return;
390  if (effect->mIsPoison && getType() == ActorType::Player)
391  setPoison(newStatus == Enable_true);
392  else if (effect->mIsCart && localPlayer == this)
393  setHaveCart(newStatus == Enable_true);
394  else if (effect->mIsRiding)
395  setRiding(newStatus == Enable_true);
396  else if (effect->mIsTrickDead)
397  setTrickDead(newStatus == Enable_true);
398  else if (effect->mIsPostDelay)
399  stopCast(newStatus == Enable_true);
400  handleStatusEffect(effect, index, newStatus, start);
401 }
const bool Enable_true
Definition: enable.h:29
virtual void setTrickDead(const bool b)
Definition: actorsprite.h:180
virtual void stopCast(const bool b)
Definition: actorsprite.h:191
LocalPlayer * localPlayer
void setHaveCart(const bool b)
Definition: actorsprite.h:171
void setPoison(const bool b)
Definition: actorsprite.h:165
bool mIsTrickDead
Definition: statuseffect.h:87
virtual void setRiding(const bool b)
Definition: actorsprite.h:177
bool mIsPostDelay
Definition: statuseffect.h:88
StatusEffect * getStatusEffect(const int index, const Enable enabling)
virtual void handleStatusEffect(const StatusEffect *const effect, const int32_t effectId, const Enable newStatus, const IsStart start)
virtual ActorTypeT getType() const
Definition: actorsprite.h:72

Field Documentation

◆ loaded

bool ActorSprite::loaded = false
staticprotected

set of active status effects

Definition at line 247 of file actorsprite.h.

Referenced by load(), and unload().

◆ mActorSpriteListeners

ActorSpriteListeners ActorSprite::mActorSpriteListeners
protected

Definition at line 262 of file actorsprite.h.

Referenced by addActorSpriteListener(), removeActorSpriteListener(), and ~ActorSprite().

◆ mChildParticleEffects

ParticleList ActorSprite::mChildParticleEffects
protected

◆ mCursorPaddingX

int ActorSprite::mCursorPaddingX
protected

Definition at line 264 of file actorsprite.h.

Referenced by Being::drawBeingCursor(), and setTargetType().

◆ mCursorPaddingY

int ActorSprite::mCursorPaddingY
protected

Definition at line 265 of file actorsprite.h.

Referenced by Being::drawBeingCursor(), and setTargetType().

◆ mHaveCart

bool ActorSprite::mHaveCart
protected

Definition at line 270 of file actorsprite.h.

Referenced by getHaveCart(), and setHaveCart().

◆ mHorseId

int ActorSprite::mHorseId
protected

◆ mId

BeingId ActorSprite::mId
protected

◆ mMustResetParticles

bool ActorSprite::mMustResetParticles
protected

Reset particle status effects on next redraw?

Definition at line 268 of file actorsprite.h.

Referenced by logic(), setMap(), setupSpriteDisplay(), and ~ActorSprite().

◆ mPoison

bool ActorSprite::mPoison
protected

Definition at line 269 of file actorsprite.h.

Referenced by getPoison(), and setPoison().

◆ mStatusEffects

std::set<int32_t> ActorSprite::mStatusEffects
protected

Definition at line 250 of file actorsprite.h.

Referenced by getStatusEffects(), getStatusEffectsString(), logic(), and setStatusEffect().

◆ mStatusParticleEffects

ParticleVector ActorSprite::mStatusParticleEffects
protected

Definition at line 252 of file actorsprite.h.

Referenced by getParticlesCount(), and handleStatusEffect().

◆ mTrickDead

bool ActorSprite::mTrickDead
protected

◆ mUsedTargetCursor

AnimatedSprite* ActorSprite::mUsedTargetCursor
protected

Target cursor being used

Definition at line 258 of file actorsprite.h.

Referenced by Being::drawBeingCursor(), setTargetType(), untarget(), and ~ActorSprite().

◆ targetCursor

AnimatedSprite * ActorSprite::targetCursor
staticprotected

Animated target cursors.

Definition at line 245 of file actorsprite.h.

Referenced by cleanupTargetCursors(), getParticlesCount(), initTargetCursor(), and setTargetType().


The documentation for this class was generated from the following files: