- Player(aClient *user = NULL);
- Player(char *);
- ~Player();
- void setData(Player *);
- void reset();
-
- long int getFlags() { return flags; }; // Returns the Client's current flags
- // Functions also return the flags after modifying them
- long int setFlags(long int); // Sets the clients flags to a new value
- long int addFlag(long int); // Adds a flag to the client's flags
- long int remFlag(long int); // Removes a flag from the client's current flags
-
-
- char *name; // Player's Name
- int level; // Player's level (1-12)
- long int exp; // Player's experience
- long int gold; // Gold on hand
- long int bank; // Gold in the bank
- int hp; // Current Hit Points (health)
- int maxhp; // Maximum Hit Points
- int strength; // Player's Strength
- int defense; // Player's defensive strength
- int armor; // Number for the player's armor
- int weapon; // Number for the player's weapon
- int forest_fights; // Amount of forest fights left today
- int player_fights; // Amount of player<->player fights for today
- char *password; // Player's encrypted password
- Pouch inventory; // This contains their potions, etc.
-
- aClient *user; // Pointer to the aClient this player is from
- Monster *fight; // Pointer to the monster the player is currently fighting
- Monster *master; // Pointer to the master the player is currently fighting
- aClient *battle; // Pointer to the player this player is currently fighting
+ Player();
+ Player(char *);
+ Player(string);
+ ~Player();
+ void setData(Player *);
+
+ void reset();
+
+ long int getFlags() { return flags; }; // Returns the Client's current flags
+ // Functions also return the flags after modifying them
+ long int setFlags(long int); // Sets the clients flags to a new value
+ long int addFlag(long int); // Adds a flag to the client's flags
+ long int remFlag(long int); // Removes a flag from the client's current flags
+
+
+ item *getWeapon() { return w; };
+ item *getArmor() { return a; };
+
+ void setWeapon (item &); // Set a player's weapon to some item
+ void setArmor (item &); // Set a player's weapon to some item
+
+ void clearWeapon () { w = NULL; }; // Remove a weapon
+ void clearArmor () { a = NULL; };
+
+ void setName (string &); // Set the player's name
+ void setName (const char *); // Set the player's name
+ void setLevel(int ); // Set the player's level
+ void setExp(long int); // Set the player's experience
+ void setGold(long int); // Set the player's gold
+ void setBank(long int); // Set the player's bank balance
+ void setHP(int); // Set the player's hit points (health)
+ void setMaxHP(int); // Set the player's maximum hit points
+ void setStrength(int); // Set the player's raw strength
+ void setDefense(int); // Set the player's raw defense
+ void setForestFights(int); // Set the player's forest fight limit
+ void setPlayerFights(int); // Set the player's player vs. player fight limit
+ void setPassword(const char *p); // Set the player's password while encrypting it
+ void setRawPassword(const char *p); //Set the player's password without encrypting it
+
+ void setClient(aClient *); // Set the pointer back to this player's IRC Client
+ void setMonster(Monster *); // Set the pointer to the monster this player is fighting
+ void setMyMaster(Monster *); // Set the pointer to the master this player is fighting
+ void setBattle(aClient *); // Set the pointer to the player this person is fighting
+
+ void addLevel(int); // Add to the player's level
+ void addExp(int); // Add to the player's experience
+ void addGold(int); // Add to the player's gold
+ void addBank(int); // Add to the player's bank account
+ void addHP(int); // Add to the player's hit points
+ void addMaxHP(int); // Add to the player's maximum hit points
+ void addStrength(int); // Add to the player's strength
+ void addDefense(int); // Add to the player's defense
+ void addForestFights(int); // Add to the player's forest fights
+ void addPlayerFights(int); // Add to the player's player vs. player fights
+
+ void subtractLevel(int); // Subtract from a player's level
+ void subtractExp(long int); // Subtract from a player's experience
+ void subtractGold(long int); // Subtract from a player's gold
+ void subtractBank(long int); // Subtract from a player's bank account
+ void subtractHP(int); // Subtract from a player's hit points
+ void subtractMaxHP(int); // Subtract from a player's maximum hit points
+ void subtractStrength(int); // Subtract from a player's strength
+ void subtractDefense(int); // Subtract from a player's defense
+ void subtractForestFights(int); // Subtract from a player's forest fights
+ void subtractPlayerFights(int); // Subtract from a player's player vs. player fights
+ pouch *inventory; // This contains everything you're holding
+
+ string getName() { return name; };
+ int getLevel() { return level; };
+ long int getExp() { return exp; };
+ long int getGold() { return gold; };
+ long int getBank() { return bank; };
+ int getHP() { return hp; };
+ int getMaxHP() { return maxhp; };
+ int getStrength() { return strength; };
+ int getDefense() { return defense; };
+ int getForestFights() { return forest_fights; };
+ int getPlayerFights() { return player_fights; };
+ string getPassword() { return password; };