00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef PLAYER_H
00023 #define PLAYER_H
00024
00025 #include "being.h"
00026
00027 class FlashText;
00028 class Graphics;
00029 class Map;
00030 #ifdef TMWSERV_SUPPORT
00031 class Guild;
00032 #endif
00033
00039 class Player : public Being
00040 {
00041 public:
00045 Player(int id, int job, Map *map);
00046
00047 ~Player();
00048
00052 virtual void setName(const std::string &name);
00053
00054 #ifdef EATHENA_SUPPORT
00055 virtual void logic();
00056 #endif
00057
00058 virtual Type getType() const;
00059
00060 virtual void setGender(Gender gender);
00061
00072 void setHairStyle(int style, int color);
00073
00077 virtual void setSprite(int slot, int id, const std::string &color = "");
00078
00082 void flash(int time);
00083
00084 #ifdef TMWSERV_SUPPORT
00085
00088 Guild* addGuild(short guildId, short rights);
00089
00093 void removeGuild(int id);
00094
00098 Guild* getGuild(const std::string &guildName);
00099
00103 Guild* getGuild(int id);
00104
00108 short getNumberOfGuilds();
00109
00110 #endif
00111
00115 void setInParty(bool value);
00116
00120 bool getInParty() const { return mInParty; }
00121
00125 virtual unsigned char getWalkMask() const
00126 { return 0x82; }
00127
00128 protected:
00132 virtual Map::BlockType getBlockType() const
00133 { return Map::BLOCKTYPE_CHARACTER; }
00134
00135 virtual void updateCoords();
00136
00137 #ifdef TMWSERV_SUPPORT
00138
00139 std::map<int, Guild*> mGuilds;
00140 #endif
00141
00142 FlashText *mName;
00143
00144 private:
00145 bool mInParty;
00146 };
00147
00148 #endif