]> jfr.im git - irc/gameservirc.git/blobdiff - gameserv/player.h
Added a lot of functionality. Added player flags and save/load them in the players...
[irc/gameservirc.git] / gameserv / player.h
index 49e6ccf84948988c6543a6a65ad18d5df1f43e9d..9e8b2da7aed939b9dd39c058e56a6206f257d10f 100644 (file)
@@ -5,7 +5,7 @@
 #include <iostream.h>
 #include "aClient.h"
 
-typedef struct monster_  Monster;
+typedef struct monster_ Monster;
 
 class aClient; // forward declaration
 
@@ -15,8 +15,15 @@ public:
     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
+
 
-    const Player &operator=(const Player &);
     char *name;                        // Player's Name
     int level;                 // Player's level (1-12)
     long int exp;               // Player's experience
@@ -29,17 +36,23 @@ public:
     int armor;                  // Number for the player's armor
     int weapon;                 // Number for the player's weapon
     bool alive;                 // True/False: is the player alive?
-    bool started;               // True/False: has this player started?  - Possibly obsolete
     bool yourturn;             // True/False: is it your turn in battle?
     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
+
     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
+private:
+    long int flags;            // Player's current flags
 };
 
 struct monster_ {
+    monster_();
+    monster_(monster_ *);
+    ~monster_();
     char *name;    // The monster's name
     char *weapon;  // A name for their weapon. Doesn't have to be in weapons[]
     int strength;  // Their strength