]> jfr.im git - irc/gameservirc.git/blobdiff - gameserv/player.h
Implemented the definitions for the new items class and added some declarations into...
[irc/gameservirc.git] / gameserv / player.h
index 48fb67e478a99581e0b321d39ff88c4a48876af7..096bb45c1112ec2c9c3fca4ee3583c6bdb93cdf5 100644 (file)
@@ -2,19 +2,23 @@
 #define PLAYER_H
 
 #include <string>
-#include "aClient.h"
+
 #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 Player {
 public:
     Player();
-    Player(aClient *);
     Player(char *);
     Player(string);
     ~Player();
@@ -28,6 +32,14 @@ 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; };
+
+    void setWeapon (weapon &);  // Set a player's weapon to some item
+    void setArmor (armor &);    // Set a player's weapon to some item
 
     string name;               // Player's Name
     int level;                 // Player's level (1-12)
@@ -38,8 +50,6 @@ public:
     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
     string password;           // Player's encrypted password
@@ -54,6 +64,8 @@ public:
 
 private:
     long int flags;            // Player's current flags
+    weapon *w;                  // Player's weapon
+    armor *a;                   // Player's armor
 };
 
 struct monster_ {