#include <string>
-#include "pouch.h"
-#include "item.h"
-
using namespace std;
typedef struct monster_ Monster;
class aClient; // forward declaration
+
class item; // forward declaration
class weapon; // forward declaration
class armor; // forward declaration
class potion; // forward declaration
+class pouch; // forward declaration
class Player {
public:
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
- int wea;
- int arm; // delete soon
- weapon *getWeapon() { return w; };
- armor *getArmor() { return a; };
+ 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 setWeapon (weapon &); // Set a player's weapon to some item
- void setArmor (armor &); // Set a player's weapon to some item
+ void clearWeapon () { w = NULL; }; // Remove a weapon
+ void clearArmor () { a = NULL; };
string name; // Player's Name
int level; // Player's level (1-12)
int forest_fights; // Amount of forest fights left today
int player_fights; // Amount of player<->player fights for today
string password; // Player's encrypted password
- Pouch inventory; // This contains their potions, etc.
+ pouch *inventory; // This contains everything you're holding
long int lastcommand; // timestamp for the last command typed
long int lastlogin; // timestamp for the last login
private:
long int flags; // Player's current flags
- weapon *w; // Player's weapon
- armor *a; // Player's armor
+ item *w; // Player's weapon
+ item *a; // Player's armor
};
struct monster_ {