Mana
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
Being Class Reference

#include <being.h>

Inheritance diagram for Being:
ActorSprite EventListener Actor LocalPlayer

Classes

struct  SpriteState
 

Public Types

enum  Action {
  STAND , MOVE , ATTACK , SIT ,
  DEAD , HURT
}
 Action the being is currently performing WARNING: Has to be in sync with the same enum in the Being class of the server! More...
 
enum  Speech { NO_SPEECH = 0 , TEXT_OVERHEAD , NO_NAME_IN_BUBBLE , NAME_IN_BUBBLE }
 
enum  AttackType {
  HIT = 0x00 , CRITICAL = 0x0a , MULTI = 0x08 , REFLECT = 0x04 ,
  FLEE = 0x0b
}
 
enum  BeingDirection { DOWN = 1 , LEFT = 2 , UP = 4 , RIGHT = 8 }
 Directions, to be used as bitmask values. More...
 
- Public Types inherited from ActorSprite
enum  Type {
  UNKNOWN , PLAYER , NPC , MONSTER ,
  FLOOR_ITEM , PORTAL
}
 
enum  TargetCursorSize { TC_SMALL = 0 , TC_MEDIUM , TC_LARGE , NUM_TC }
 
enum  TargetCursorType { TCT_NONE = -1 , TCT_NORMAL = 0 , TCT_IN_RANGE , NUM_TCT }
 

Public Member Functions

 Being (int id, Type type, int subtype, Map *map)
 Constructor.
 
 ~Being () override
 
Type getType () const final
 Returns the type of the ActorSprite.
 
void setType (Type type, int subtype)
 Can be used to change the type of the being.
 
void clearPath ()
 Removes all path nodes from this being.
 
void setDestination (int ex, int ey)
 Creates a path for the being from current position to ex and ey.
 
const VectorgetDestination () const
 Returns the destination for this being.
 
int getTileX () const override
 Returns the tile x coord.
 
int getTileY () const override
 Returns the tile y coord.
 
void setSpeech (const std::string &text, int time=5000)
 Puts a "speech balloon" above this being for the specified amount of time.
 
void takeDamage (Being *attacker, int damage, AttackType type, int attackId=1)
 Puts a damage bubble above this being.
 
void handleAttack (Being *victim, int damage, int attackId=1)
 Handles an attack of another being by this being.
 
const ItemInfogetEquippedWeapon () const
 
const std::string & getName () const
 Returns the name of the being.
 
void setName (const std::string &name)
 Sets the name for the being.
 
bool getShowName () const
 
void setShowName (bool doShowName)
 
void setPartyName (const std::string &name)
 Sets the name of the party the being is in.
 
const std::string & getPartyName () const
 
void setGuildName (const std::string &name)
 Sets the name of the primary guild the being is in.
 
void setGuildPos (const std::string &pos)
 
void addGuild (Guild *guild)
 Adds a guild to the being.
 
void removeGuild (int id)
 Removers a guild from the being.
 
GuildgetGuild (const std::string &guildName) const
 Returns a pointer to the specified guild that the being is in.
 
GuildgetGuild (int id) const
 Returns a pointer to the specified guild that the being is in.
 
const std::map< int, Guild * > & getGuilds () const
 Returns all guilds the being is in.
 
void clearGuilds ()
 Removes all guilds the being is in.
 
short getNumberOfGuilds () const
 Get number of guilds the being belongs to.
 
bool isInParty () const
 
void setParty (Party *party)
 
PartygetParty () const
 
void setSprite (unsigned slot, int id, const std::string &color=std::string(), bool isWeapon=false)
 Sets visible equipments for this being.
 
void setSpriteID (unsigned slot, int id)
 
void setSpriteColor (unsigned slot, const std::string &color=std::string())
 
unsigned getSpriteCount () const
 
bool drawnWhenBehind () const override
 Determines wether the actor should be drawn translucent when behind another object.
 
void logic () override
 Performs being logic.
 
void drawSpeech (int offsetX, int offsetY)
 Draws the speech text above the being.
 
uint16_t getSubType () const
 
const BeingInfogetInfo () const
 
bool isTargetSelection () const
 
TargetCursorSize getTargetCursorSize () const override
 Returns the required size of a target cursor for this being.
 
Cursor getHoverCursor () const
 
unsigned char getWalkMask () const
 Gets the way the object is blocked by other objects.
 
Map::BlockType getBlockType () const override
 Gets the way the monster blocks pathfinding for other objects.
 
void setMoveSpeed (const Vector &speed)
 Sets the move speed.
 
void setAttackSpeed (int speed)
 Sets the attack speed.
 
int getAttackSpeed () const
 Gets the attack speed.
 
virtual void setAction (Action action, int attackId=1)
 Sets the current action.
 
void setAction (const std::string &action)
 Sets the current action by name.
 
Action getCurrentAction () const
 Get the being's action currently performed.
 
bool isAlive () const
 Returns whether this being is still alive.
 
uint8_t getDirection () const
 Returns the current direction.
 
void setDirection (uint8_t direction)
 Sets the current direction.
 
SpriteDirection getSpriteDirection () const
 Returns the direction the being is facing.
 
void setPosition (const Vector &pos) final
 Sets the pixel position of this actor.
 
void setPosition (float x, float y, float z=0.0f)
 Overloaded method provided for convenience.
 
int getCollisionRadius () const
 Returns the being's pixel radius used to detect collisions.
 
void fireMissile (Being *target, const std::string &particle)
 Shoots a missile particle from this being, to target being.
 
void setStatusEffect (int id, bool active)
 
const PathgetPath () const
 Returns the path this being is following.
 
void flashName (int time)
 
int getDamageTaken () const
 
void updateName ()
 
void setGender (Gender gender)
 Sets the gender of this being.
 
Gender getGender () const
 
bool isGM () const
 Whether or not this player is a GM.
 
void setGM (bool gm)
 Triggers whether or not to show the name as a GM name.
 
void setIp (int ip)
 Sets the IP or an IP hash.
 
int getIp () const
 Returns the player's IP or an IP hash.
 
bool canTalk ()
 
void talkTo ()
 
void event (Event::Channel channel, const Event &event) override
 
void death (const gcn::Event &event) override
 
void setMap (Map *map) final
 
void lookAt (const Vector &destVec)
 Make the being look at a given pixel position.
 
void lookAt (const Position &destPos)
 
- Public Member Functions inherited from ActorSprite
 ActorSprite (int id)
 
 ~ActorSprite () override
 
int getId () const
 
void setId (int id)
 
int getDrawOrder () const override
 Returns the pixel Y coordinate that the actor should be drawn at.
 
bool draw (Graphics *graphics, int offsetX, int offsetY) const override
 Draws the Actor to the given graphics context.
 
bool drawSpriteAt (Graphics *graphics, int x, int y) const
 
void controlParticle (Particle *particle)
 Take control of a particle.
 
void setTargetType (TargetCursorType type)
 Sets the target animation for this actor.
 
void untarget ()
 Untargets the actor.
 
void setAlpha (float alpha) override
 Sets the alpha value used to draw the actor.
 
float getAlpha () const override
 Returns the current alpha value used to draw the actor.
 
int getWidth () const
 
int getHeight () const
 
- Public Member Functions inherited from Actor
 Actor ()
 
virtual ~Actor ()
 
const VectorgetPosition () const
 Returns the pixel position of this actor.
 
int getPixelX () const
 Returns the pixels X coordinate of the actor.
 
int getPixelY () const
 Returns the pixel Y coordinate of the actor.
 
MapgetMap () const
 
- Public Member Functions inherited from EventListener
virtual ~EventListener ()
 
void listen (Event::Channel channel)
 
void ignore (Event::Channel channel)
 

Protected Member Functions

void setPath (const Path &path)
 Sets the new path for this being.
 
void updateNamePosition ()
 Updates name's location.
 
void addSpriteParticles (SpriteState &spriteState, const SpriteDisplay &display)
 
void restoreAllSpriteParticles ()
 
void updateColors ()
 
void updatePlayerSprites ()
 Updates the visible sprite IDs of the player, taking into account the item replacements.
 
int getSpeechTextYPosition () const
 Gets the advised Y chat text position.
 
virtual void pathFinished ()
 Called when the being has reached the end of its path.
 
virtual void updateStatusEffect (int index, bool newStatus)
 Notify self that a status effect has flipped.
 
- Protected Member Functions inherited from ActorSprite
void setupSpriteDisplay (const SpriteDisplay &display, bool forceDisplay=true)
 

Protected Attributes

const BeingInfomInfo
 
Timer mActionTimer
 Time spent in current action.
 
Timer mSpeechTimer
 Time until the last speech sentence disappears.
 
int mAttackSpeed = 350
 Attack speed.
 
Action mAction = STAND
 Action the being is performing.
 
int mSubType = 0xFFFF
 Subtype (graphical view, basically)
 
uint8_t mDirection = DOWN
 Facing direction.
 
uint8_t mSpriteDirection = DIRECTION_DOWN
 Facing direction.
 
std::string mName
 Name of character.
 
std::string mPartyName
 
FlashTextmDispName = nullptr
 Holds a text object when the being displays its name, 0 otherwise.
 
const gcn::Color * mNameColor
 
bool mShowName = false
 
const ItemInfomEquippedWeapon = nullptr
 Engine-related infos about weapon.
 
Path mPath
 
std::string mSpeech
 
TextmText = nullptr
 
Vector mDest
 destination coordinates.
 
std::vector< SpriteStatemSpriteStates
 
bool mRestoreParticlesOnLogic = false
 
Gender mGender = Gender::Neutral
 
std::map< int, Guild * > mGuilds
 
PartymParty = nullptr
 
bool mIsGM = false
 
- Protected Attributes inherited from ActorSprite
int mId
 
std::vector< ParticleHandlemChildParticleEffects
 
CompoundSprite mSprites
 
- Protected Attributes inherited from Actor
MapmMap = nullptr
 
Vector mPos
 Position in pixels relative to map.
 

Private Member Functions

void updateMovement ()
 

Private Attributes

Type mType = UNKNOWN
 
std::set< int > mStatusEffects
 set of active status effects
 
std::map< int, ParticleHandlemStatusParticleEffects
 
SpeechBubblemSpeechBubble
 Speech Bubble components.
 
Vector mMoveSpeed
 Walk speed for x and y movement values.
 
Vector mSpeedPixelsPerSecond
 Being speed in pixel per second.
 
int mDamageTaken = 0
 
int mIp = 0
 

Additional Inherited Members

- Static Public Member Functions inherited from ActorSprite
static void load ()
 
static void unload ()
 

Detailed Description

Definition at line 64 of file being.h.

Member Enumeration Documentation

◆ Action

Action the being is currently performing WARNING: Has to be in sync with the same enum in the Being class of the server!

Enumerator
STAND 
MOVE 
ATTACK 
SIT 
DEAD 
HURT 

Definition at line 72 of file being.h.

◆ AttackType

Enumerator
HIT 
CRITICAL 
MULTI 
REFLECT 
FLEE 

Definition at line 90 of file being.h.

◆ BeingDirection

Directions, to be used as bitmask values.

Enumerator
DOWN 
LEFT 
UP 
RIGHT 

Definition at line 102 of file being.h.

◆ Speech

Enumerator
NO_SPEECH 
TEXT_OVERHEAD 
NO_NAME_IN_BUBBLE 
NAME_IN_BUBBLE 

Definition at line 82 of file being.h.

Constructor & Destructor Documentation

◆ Being()

Being::Being ( int  id,
Type  type,
int  subtype,
Map map 
)

Constructor.

Parameters
ida unique being id
typetype of being
subtyperefers to a specific npc, monster, species, etc.
mapthe map the being is on

Definition at line 65 of file being.cpp.

◆ ~Being()

Being::~Being ( )
override

Definition at line 81 of file being.cpp.

Member Function Documentation

◆ addGuild()

void Being::addGuild ( Guild guild)

Adds a guild to the being.

Definition at line 495 of file being.cpp.

◆ addSpriteParticles()

void Being::addSpriteParticles ( SpriteState spriteState,
const SpriteDisplay display 
)
protected

Definition at line 1078 of file being.cpp.

◆ canTalk()

bool Being::canTalk ( )

Definition at line 1355 of file being.cpp.

◆ clearGuilds()

void Being::clearGuilds ( )

Removes all guilds the being is in.

Definition at line 536 of file being.cpp.

◆ clearPath()

void Being::clearPath ( )

Removes all path nodes from this being.

Definition at line 254 of file being.cpp.

◆ death()

void Being::death ( const gcn::Event &  event)
override

Definition at line 1392 of file being.cpp.

◆ drawnWhenBehind()

bool Being::drawnWhenBehind ( ) const
overridevirtual

Determines wether the actor should be drawn translucent when behind another object.

Reimplemented from Actor.

Definition at line 1307 of file being.cpp.

◆ drawSpeech()

void Being::drawSpeech ( int  offsetX,
int  offsetY 
)

Draws the speech text above the being.

Definition at line 963 of file being.cpp.

◆ event()

void Being::event ( Event::Channel  channel,
const Event event 
)
overridevirtual

Implements EventListener.

Reimplemented in LocalPlayer.

Definition at line 1365 of file being.cpp.

◆ fireMissile()

void Being::fireMissile ( Being target,
const std::string &  particle 
)

Shoots a missile particle from this being, to target being.

Definition at line 574 of file being.cpp.

◆ flashName()

void Being::flashName ( int  time)

Definition at line 1023 of file being.cpp.

◆ getAttackSpeed()

int Being::getAttackSpeed ( ) const
inline

Gets the attack speed.

Note
The attack speed is in milliseconds before next attack.

Definition at line 331 of file being.h.

◆ getBlockType()

Map::BlockType Being::getBlockType ( ) const
overridevirtual

Gets the way the monster blocks pathfinding for other objects.

Reimplemented from ActorSprite.

Definition at line 168 of file being.cpp.

◆ getCollisionRadius()

int Being::getCollisionRadius ( ) const

Returns the being's pixel radius used to detect collisions.

Definition at line 804 of file being.cpp.

◆ getCurrentAction()

Action Being::getCurrentAction ( ) const
inline

Get the being's action currently performed.

Definition at line 346 of file being.h.

◆ getDamageTaken()

int Being::getDamageTaken ( ) const
inline

Definition at line 401 of file being.h.

◆ getDestination()

const Vector & Being::getDestination ( ) const
inline

Returns the destination for this being.

Definition at line 140 of file being.h.

◆ getDirection()

uint8_t Being::getDirection ( ) const
inline

Returns the current direction.

Definition at line 356 of file being.h.

◆ getEquippedWeapon()

const ItemInfo * Being::getEquippedWeapon ( ) const
inline

Definition at line 184 of file being.h.

◆ getGender()

Gender Being::getGender ( ) const
inline

Definition at line 411 of file being.h.

◆ getGuild() [1/2]

Guild * Being::getGuild ( const std::string &  guildName) const

Returns a pointer to the specified guild that the being is in.

Definition at line 518 of file being.cpp.

◆ getGuild() [2/2]

Guild * Being::getGuild ( int  id) const

Returns a pointer to the specified guild that the being is in.

Definition at line 527 of file being.cpp.

◆ getGuilds()

const std::map< int, Guild * > & Being::getGuilds ( ) const
inline

Returns all guilds the being is in.

Definition at line 243 of file being.h.

◆ getHoverCursor()

Cursor Being::getHoverCursor ( ) const

Definition at line 158 of file being.cpp.

◆ getInfo()

const BeingInfo & Being::getInfo ( ) const
inline

Definition at line 294 of file being.h.

◆ getIp()

int Being::getIp ( ) const
inline

Returns the player's IP or an IP hash.

Value is 0 if not set by the server.

Definition at line 435 of file being.h.

◆ getName()

const std::string & Being::getName ( ) const
inline

Returns the name of the being.

Definition at line 190 of file being.h.

◆ getNumberOfGuilds()

short Being::getNumberOfGuilds ( ) const
inline

Get number of guilds the being belongs to.

Definition at line 254 of file being.h.

◆ getParty()

Party * Being::getParty ( ) const
inline

Definition at line 262 of file being.h.

◆ getPartyName()

const std::string & Being::getPartyName ( ) const
inline

Definition at line 210 of file being.h.

◆ getPath()

const Path & Being::getPath ( ) const
inline

Returns the path this being is following.

An empty path is returned when this being isn't following any path currently.

Definition at line 397 of file being.h.

◆ getShowName()

bool Being::getShowName ( ) const
inline

Definition at line 200 of file being.h.

◆ getSpeechTextYPosition()

int Being::getSpeechTextYPosition ( ) const
protected

Gets the advised Y chat text position.

Definition at line 182 of file being.cpp.

◆ getSpriteCount()

unsigned Being::getSpriteCount ( ) const
inline

Definition at line 277 of file being.h.

◆ getSpriteDirection()

SpriteDirection Being::getSpriteDirection ( ) const
inline

Returns the direction the being is facing.

Definition at line 366 of file being.h.

◆ getSubType()

uint16_t Being::getSubType ( ) const
inline

Definition at line 292 of file being.h.

◆ getTargetCursorSize()

ActorSprite::TargetCursorSize Being::getTargetCursorSize ( ) const
overridevirtual

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

Reimplemented from ActorSprite.

Definition at line 153 of file being.cpp.

◆ getTileX()

int Being::getTileX ( ) const
inlineoverridevirtual

Returns the tile x coord.

Reimplemented from Actor.

Definition at line 146 of file being.h.

◆ getTileY()

int Being::getTileY ( ) const
inlineoverridevirtual

Returns the tile y coord.

Reimplemented from Actor.

Definition at line 152 of file being.h.

◆ getType()

Type Being::getType ( ) const
inlinefinalvirtual

Returns the type of the ActorSprite.

Reimplemented from ActorSprite.

Definition at line 122 of file being.h.

◆ getWalkMask()

unsigned char Being::getWalkMask ( ) const

Gets the way the object is blocked by other objects.

Definition at line 163 of file being.cpp.

◆ handleAttack()

void Being::handleAttack ( Being victim,
int  damage,
int  attackId = 1 
)

Handles an attack of another being by this being.

Parameters
victimthe victim being
damagethe amount of damage dealt (0 means miss)
attackIdthe attack id

Definition at line 421 of file being.cpp.

◆ isAlive()

bool Being::isAlive ( ) const
inline

Returns whether this being is still alive.

Definition at line 351 of file being.h.

◆ isGM()

bool Being::isGM ( ) const
inline

Whether or not this player is a GM.

Definition at line 417 of file being.h.

◆ isInParty()

bool Being::isInParty ( ) const
inline

Definition at line 257 of file being.h.

◆ isTargetSelection()

bool Being::isTargetSelection ( ) const

Definition at line 148 of file being.cpp.

◆ logic()

void Being::logic ( )
overridevirtual

Performs being logic.

Reimplemented from ActorSprite.

Reimplemented in LocalPlayer.

Definition at line 810 of file being.cpp.

◆ lookAt() [1/2]

void Being::lookAt ( const Position destPos)
inline

Definition at line 453 of file being.h.

◆ lookAt() [2/2]

void Being::lookAt ( const Vector destVec)

Make the being look at a given pixel position.

Definition at line 702 of file being.cpp.

◆ pathFinished()

virtual void Being::pathFinished ( )
inlineprotectedvirtual

Called when the being has reached the end of its path.

Reimplemented in LocalPlayer.

Definition at line 488 of file being.h.

◆ removeGuild()

void Being::removeGuild ( int  id)

Removers a guild from the being.

Definition at line 504 of file being.cpp.

◆ restoreAllSpriteParticles()

void Being::restoreAllSpriteParticles ( )
protected

Definition at line 1092 of file being.cpp.

◆ setAction() [1/2]

void Being::setAction ( Action  action,
int  attackId = 1 
)
virtual

Sets the current action.

Reimplemented in LocalPlayer.

Definition at line 624 of file being.cpp.

◆ setAction() [2/2]

void Being::setAction ( const std::string &  action)

Sets the current action by name.

Definition at line 694 of file being.cpp.

◆ setAttackSpeed()

void Being::setAttackSpeed ( int  speed)
inline

Sets the attack speed.

Note
The attack speed is to be set in milliseconds before next attack.

Definition at line 325 of file being.h.

◆ setDestination()

void Being::setDestination ( int  ex,
int  ey 
)

Creates a path for the being from current position to ex and ey.

Definition at line 197 of file being.cpp.

◆ setDirection()

void Being::setDirection ( uint8_t  direction)

Sets the current direction.

Definition at line 782 of file being.cpp.

◆ setGender()

void Being::setGender ( Gender  gender)

Sets the gender of this being.

Definition at line 1313 of file being.cpp.

◆ setGM()

void Being::setGM ( bool  gm)

Triggers whether or not to show the name as a GM name.

Definition at line 1337 of file being.cpp.

◆ setGuildName()

void Being::setGuildName ( const std::string &  name)

Sets the name of the primary guild the being is in.

Shown in BeingPopup (eventually).

Definition at line 482 of file being.cpp.

◆ setGuildPos()

void Being::setGuildPos ( const std::string &  pos)

Definition at line 489 of file being.cpp.

◆ setIp()

void Being::setIp ( int  ip)

Sets the IP or an IP hash.

The TMW-Athena server sends this information only to GMs.

Definition at line 1344 of file being.cpp.

◆ setMap()

void Being::setMap ( Map map)
finalvirtual

Reimplemented from ActorSprite.

Definition at line 1398 of file being.cpp.

◆ setMoveSpeed()

void Being::setMoveSpeed ( const Vector speed)

Sets the move speed.

in ticks per tile for eAthena, in tiles per second for Manaserv (0.1 precision).

Definition at line 173 of file being.cpp.

◆ setName()

void Being::setName ( const std::string &  name)

Sets the name for the being.

Parameters
nameThe name that should appear.

Definition at line 463 of file being.cpp.

◆ setParty()

void Being::setParty ( Party party)

Definition at line 549 of file being.cpp.

◆ setPartyName()

void Being::setPartyName ( const std::string &  name)
inline

Sets the name of the party the being is in.

Shown in BeingPopup.

Definition at line 208 of file being.h.

◆ setPath()

void Being::setPath ( const Path path)
protected

Sets the new path for this being.

Definition at line 259 of file being.cpp.

◆ setPosition() [1/2]

void Being::setPosition ( const Vector pos)
finalvirtual

Sets the pixel position of this actor.

Reimplemented from Actor.

Definition at line 187 of file being.cpp.

◆ setPosition() [2/2]

void Being::setPosition ( float  x,
float  y,
float  z = 0.0f 
)
inline

Overloaded method provided for convenience.

See also
setPosition(const Vector &pos)

Definition at line 376 of file being.h.

◆ setShowName()

void Being::setShowName ( bool  doShowName)

Definition at line 473 of file being.cpp.

◆ setSpeech()

void Being::setSpeech ( const std::string &  text,
int  time = 5000 
)

Puts a "speech balloon" above this being for the specified amount of time.

Parameters
textThe text that should appear.
timeThe amount of time the text should stay in milliseconds.

Definition at line 264 of file being.cpp.

◆ setSprite()

void Being::setSprite ( unsigned  slot,
int  id,
const std::string &  color = std::string(),
bool  isWeapon = false 
)

Sets visible equipments for this being.

Definition at line 1254 of file being.cpp.

◆ setSpriteColor()

void Being::setSpriteColor ( unsigned  slot,
const std::string &  color = std::string() 
)

Definition at line 1301 of file being.cpp.

◆ setSpriteID()

void Being::setSpriteID ( unsigned  slot,
int  id 
)

Definition at line 1295 of file being.cpp.

◆ setStatusEffect()

void Being::setStatusEffect ( int  id,
bool  active 
)

Definition at line 596 of file being.cpp.

◆ setType()

void Being::setType ( Type  type,
int  subtype 
)

Can be used to change the type of the being.

Practical use: players (usually GMs) can change into monsters and back.

Definition at line 93 of file being.cpp.

◆ takeDamage()

void Being::takeDamage ( Being attacker,
int  damage,
AttackType  type,
int  attackId = 1 
)

Puts a damage bubble above this being.

Parameters
attackerthe attacking being
damagethe amount of damage received (0 means miss)
typethe attack type
attackIdthe attack id (used for monsters)

Definition at line 316 of file being.cpp.

◆ talkTo()

void Being::talkTo ( )

Definition at line 1360 of file being.cpp.

◆ updateColors()

void Being::updateColors ( )
protected

Definition at line 1107 of file being.cpp.

◆ updateMovement()

void Being::updateMovement ( )
private

Definition at line 858 of file being.cpp.

◆ updateName()

void Being::updateName ( )

Definition at line 1029 of file being.cpp.

◆ updateNamePosition()

void Being::updateNamePosition ( )
protected

Updates name's location.

Definition at line 1011 of file being.cpp.

◆ updatePlayerSprites()

void Being::updatePlayerSprites ( )
protected

Updates the visible sprite IDs of the player, taking into account the item replacements.

Definition at line 1149 of file being.cpp.

◆ updateStatusEffect()

void Being::updateStatusEffect ( int  index,
bool  newStatus 
)
protectedvirtual

Notify self that a status effect has flipped.

The new flag is passed.

Reimplemented in LocalPlayer.

Definition at line 612 of file being.cpp.

Member Data Documentation

◆ mAction

Action Being::mAction = STAND
protected

Action the being is performing.

Definition at line 505 of file being.h.

◆ mActionTimer

Timer Being::mActionTimer
protected

Time spent in current action.

TODO: Remove use of it

Definition at line 498 of file being.h.

◆ mAttackSpeed

int Being::mAttackSpeed = 350
protected

Attack speed.

Definition at line 503 of file being.h.

◆ mDamageTaken

int Being::mDamageTaken = 0
private

Definition at line 563 of file being.h.

◆ mDest

Vector Being::mDest
protected

destination coordinates.

Definition at line 527 of file being.h.

◆ mDirection

uint8_t Being::mDirection = DOWN
protected

Facing direction.

Definition at line 508 of file being.h.

◆ mDispName

FlashText* Being::mDispName = nullptr
protected

Holds a text object when the being displays its name, 0 otherwise.

Definition at line 516 of file being.h.

◆ mEquippedWeapon

const ItemInfo* Being::mEquippedWeapon = nullptr
protected

Engine-related infos about weapon.

Definition at line 521 of file being.h.

◆ mGender

Gender Being::mGender = Gender::Neutral
protected

Definition at line 532 of file being.h.

◆ mGuilds

std::map<int, Guild*> Being::mGuilds
protected

Definition at line 535 of file being.h.

◆ mInfo

const BeingInfo* Being::mInfo
protected

Definition at line 496 of file being.h.

◆ mIp

int Being::mIp = 0
private

Definition at line 564 of file being.h.

◆ mIsGM

bool Being::mIsGM = false
protected

Definition at line 538 of file being.h.

◆ mMoveSpeed

Vector Being::mMoveSpeed
private

Walk speed for x and y movement values.

In ticks per tile for eAthena, In tiles per second for Manaserv.

Definition at line 556 of file being.h.

◆ mName

std::string Being::mName
protected

Name of character.

Definition at line 510 of file being.h.

◆ mNameColor

const gcn::Color* Being::mNameColor
protected

Definition at line 517 of file being.h.

◆ mParty

Party* Being::mParty = nullptr
protected

Definition at line 536 of file being.h.

◆ mPartyName

std::string Being::mPartyName
protected

Definition at line 511 of file being.h.

◆ mPath

Path Being::mPath
protected

Definition at line 523 of file being.h.

◆ mRestoreParticlesOnLogic

bool Being::mRestoreParticlesOnLogic = false
protected

Definition at line 530 of file being.h.

◆ mShowName

bool Being::mShowName = false
protected

Definition at line 518 of file being.h.

◆ mSpeech

std::string Being::mSpeech
protected

Definition at line 524 of file being.h.

◆ mSpeechBubble

SpeechBubble* Being::mSpeechBubble
private

Speech Bubble components.

Definition at line 549 of file being.h.

◆ mSpeechTimer

Timer Being::mSpeechTimer
protected

Time until the last speech sentence disappears.

Definition at line 501 of file being.h.

◆ mSpeedPixelsPerSecond

Vector Being::mSpeedPixelsPerSecond
private

Being speed in pixel per second.

Used internally for the being logic.

Definition at line 561 of file being.h.

◆ mSpriteDirection

uint8_t Being::mSpriteDirection = DIRECTION_DOWN
protected

Facing direction.

Definition at line 509 of file being.h.

◆ mSpriteStates

std::vector<SpriteState> Being::mSpriteStates
protected

Definition at line 529 of file being.h.

◆ mStatusEffects

std::set<int> Being::mStatusEffects
private

set of active status effects

Definition at line 545 of file being.h.

◆ mStatusParticleEffects

std::map<int, ParticleHandle> Being::mStatusParticleEffects
private

Definition at line 546 of file being.h.

◆ mSubType

int Being::mSubType = 0xFFFF
protected

Subtype (graphical view, basically)

Definition at line 506 of file being.h.

◆ mText

Text* Being::mText = nullptr
protected

Definition at line 525 of file being.h.

◆ mType

Type Being::mType = UNKNOWN
private

Definition at line 543 of file being.h.


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