Logo Search packages:      
Sourcecode: mana version File versions  Download package

Public Types | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Static Protected Attributes

Player Class Reference

#include <player.h>

Inheritance diagram for Player:
Inheritance graph
Collaboration diagram for Player:
Collaboration graph

List of all members.

Public Types

enum  Action {
enum  AttackType {
  HIT = 0x00, CRITICAL = 0x0a, MULTI = 0x08, REFLECT = 0x04,
  FLEE = 0x0b
enum  BeingDirection { DOWN = 1, LEFT = 2, UP = 4, RIGHT = 8 }
enum  TargetCursorSize { TC_SMALL = 0, TC_MEDIUM, TC_LARGE, NUM_TC }

Public Member Functions

void addGuild (Guild *guild)
void clearGuilds ()
void clearPath ()
void controlParticle (Particle *particle)
virtual void draw (Graphics *graphics, int offsetX, int offsetY) const
void drawEmotion (Graphics *graphics, int offsetX, int offsetY)
void drawSpeech (int offsetX, int offsetY)
virtual void drawSpriteAt (Graphics *graphics, int x, int y) const
void fireMissile (Being *target, const std::string &particle)
void flashName (int time)
virtual float getAlpha () const
int getAttackSpeed () const
virtual int getCollisionRadius () const
Action getCurrentAction () const
int getCurrentFrame () const
int getDamageTaken () const
const VectorgetDestination () const
Uint8 getDirection () const
Uint8 getEmotion () const
Gender getGender () const
GuildgetGuild (int id) const
GuildgetGuild (const std::string &guildName) const
const std::map< int, Guild * > & getGuilds () const
virtual int getHeight () const
int getId () const
int getIp () const
const std::string & getName () const
short getNumberOfGuilds () const
int getNumberOfLayers () const
PartygetParty () const
const std::string & getPartyName () const
const Path & getPath () const
int getPixelX () const
int getPixelY () const
const VectorgetPosition () const
bool getShowName () const
virtual AnimatedSpritegetSprite (int index) const
SpriteDirection getSpriteDirection () const
Uint16 getSubType () const
virtual Being::TargetCursorSize getTargetCursorSize () const
int getTileX () const
int getTileY () const
virtual Type getType () const
virtual unsigned char getWalkMask () const
Vector getWalkSpeed () const
int getWalkTime () const
virtual int getWidth () const
int getXOffset () const
int getYOffset () const
virtual void handleAttack (Being *victim, int damage, AttackType type)
bool isAlive () const
bool isGM () const
bool isInParty () const
virtual void logic ()
virtual void nextTile ()
virtual void optionChanged (const std::string &value)
 Player (int id, int subtype, Map *map, bool isNPC=false)
void removeGuild (int id)
virtual void setAction (Action action, int attackType=0)
virtual void setAlpha (float alpha)
void setAttackSpeed (int speed)
void setDestination (int ex, int ey)
void setDirection (Uint8 direction)
void setEmote (Uint8 emotion, Uint8 emote_time)
void setFrame (int frame)
virtual void setGender (Gender gender)
virtual void setGM (bool gm)
virtual void setGuildName (const std::string &name)
virtual void setGuildPos (const std::string &pos)
void setId (int id)
void setIp (int ip)
void setMap (Map *map)
virtual void setName (const std::string &name)
void setParty (Party *party)
void setPartyName (const std::string &name)
void setPosition (float x, float y, float z=0.0f)
void setPosition (const Vector &pos)
virtual void setShowName (bool doShowName)
void setSpeech (const std::string &text, int time=500)
virtual void setSprite (int slot, int id, const std::string &color="", bool isWeapon=false)
virtual void setSpriteColor (unsigned int slot, const std::string &color="")
virtual void setSpriteID (unsigned int slot, int id)
void setStatusEffect (int index, bool active)
void setStatusEffectBlock (int offset, Uint16 flags)
void setStunMode (int stunMode)
virtual void setSubtype (Uint16 subtype)
void setTargetAnimation (SimpleAnimation *animation)
void setTileCoords (int x, int y)
void setWalkSpeed (Vector speed)
void setWalkTime (int walkTime)
virtual void takeDamage (Being *attacker, int damage, AttackType type)
virtual void triggerEffect (int effectId)
void untarget ()
void updateName ()

Static Public Member Functions

static int getNumOfHairstyles ()
static void load ()

Protected Types

typedef Sprites::const_iterator SpriteConstIterator
typedef Sprites::iterator SpriteIterator
typedef std::vector
< AnimatedSprite * > 

Protected Member Functions

virtual Map::BlockType getBlockType () const
virtual void handleStatusEffect (StatusEffect *effect, int effectId)
void internalTriggerEffect (int effectId, bool sfx, bool gfx)
void setPath (const Path &path)
virtual void showName ()
virtual void updateColors ()
virtual void updateCoords ()
virtual void updateStatusEffect (int index, bool newStatus)
virtual void updateStunMode (int oldMode, int newMode)

Protected Attributes

Action mAction
float mAlpha
int mAttackSpeed
ParticleList mChildParticleEffects
Vector mDest
Uint8 mDirection
int mEmotion
int mEmotionTime
const ItemInfomEquippedWeapon
int mFrame
Gender mGender
std::map< int, Guild * > mGuilds
int mId
int mIp
bool mIsGM
MapSprite mMapSprite
std::string mName
const gcn::Color * mNameColor
std::string mPartyName
Path mPath
bool mShowName
std::string mSpeech
int mSpeechTime
std::vector< std::string > mSpriteColors
Uint8 mSpriteDirection
std::vector< int > mSpriteIDs
Sprites mSprites
std::set< int > mStatusEffects
ParticleVector mStatusParticleEffects
Uint16 mStunMode
ParticleList mStunParticleEffects
Uint16 mSubType
const gcn::Color * mTextColor
int mWalkTime

Static Protected Attributes

static int mNumberOfHairstyles = 1

Detailed Description

A player being. Players have their name drawn beneath them. This class also implements player-specific loading of base sprite, hair sprite and equipment sprites.

Definition at line 44 of file player.h.

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

Generated by  Doxygen 1.6.0   Back to index