]> jfr.im git - irc/gameservirc.git/blobdiff - gameserv/player.h
Implemented the myString class in the player and monster classes. This should make...
[irc/gameservirc.git] / gameserv / player.h
index 9b643aaf049dc78d204c81bacf86b5f26d8a2cdb..e3cf445691b2a4a7f4afc1611014983b78cc767d 100644 (file)
@@ -1,9 +1,9 @@
 #ifndef PLAYER_H
 #define PLAYER_H
 
-#include <string.h>
 #include "aClient.h"
 #include "pouch.h"
+#include "myString.h"
 
 typedef struct monster_ Monster;
 
@@ -25,7 +25,7 @@ public:
     long int remFlag(long int);     // Removes a flag from the client's current flags
 
 
-    char *name;                        // Player's Name
+    myString name;             // Player's Name
     int level;                 // Player's level (1-12)
     long int exp;               // Player's experience
     long int gold;              // Gold on hand
@@ -38,7 +38,7 @@ public:
     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
+    myString password;         // Player's encrypted password
     Pouch inventory;           // This contains their potions, etc.
     long int lastcommand;      // timestamp for the last command typed
     long int lastlogin;                // timestamp for the last login
@@ -57,14 +57,14 @@ struct monster_ {
     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[]
+    myString name;     // The monster's name
+    myString weapon;   // A name for their weapon
     int strength;  // Their strength
     int gold;      // The gold you get when you kill them
     int exp;       // The experience you get when you kill them
     int hp;        // Their remaining hitpoints
     int maxhp;     // Their max hitpoints
-    char *death;   // What is said when they die
+    myString death;    // What is said when they are killed
 };
 
 #endif