]> jfr.im git - irc/gameservirc.git/blobdiff - gameserv/player.h
updated the TODO
[irc/gameservirc.git] / gameserv / player.h
index 096bb45c1112ec2c9c3fca4ee3583c6bdb93cdf5..ad89b0c4e3172682617e5bea0f7345b6faff257a 100644 (file)
@@ -3,18 +3,17 @@
 
 #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:
@@ -32,14 +31,15 @@ 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)
@@ -53,7 +53,7 @@ public:
     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
 
@@ -64,8 +64,8 @@ public:
 
 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_ {