]>
jfr.im git - irc/gameservirc.git/blob - gameserv/player.h
8 typedef struct monster_ Monster
;
10 class aClient
; // forward declaration
12 class item
; // forward declaration
13 class weapon
; // forward declaration
14 class armor
; // forward declaration
15 class potion
; // forward declaration
16 class pouch
; // forward declaration
24 void setData(Player
*);
25 void setPassword(const char *p
);
28 long int getFlags() { return flags
; }; // Returns the Client's current flags
29 // Functions also return the flags after modifying them
30 long int setFlags(long int); // Sets the clients flags to a new value
31 long int addFlag(long int); // Adds a flag to the client's flags
32 long int remFlag(long int); // Removes a flag from the client's current flags
35 int arm
; // delete soon
37 weapon
*getWeapon() { return w
; };
38 armor
*getArmor() { return a
; };
40 void setWeapon (weapon
&); // Set a player's weapon to some item
41 void setArmor (armor
&); // Set a player's weapon to some item
43 string name
; // Player's Name
44 int level
; // Player's level (1-12)
45 long int exp
; // Player's experience
46 long int gold
; // Gold on hand
47 long int bank
; // Gold in the bank
48 int hp
; // Current Hit Points (health)
49 int maxhp
; // Maximum Hit Points
50 int strength
; // Player's Strength
51 int defense
; // Player's defensive strength
52 int forest_fights
; // Amount of forest fights left today
53 int player_fights
; // Amount of player<->player fights for today
54 string password
; // Player's encrypted password
55 pouch
*inventory
; // This contains everything you're holding
56 long int lastcommand
; // timestamp for the last command typed
57 long int lastlogin
; // timestamp for the last login
59 aClient
*client
; // Pointer to the aClient this player is from
60 Monster
*fight
; // Pointer to the monster the player is currently fighting
61 Monster
*master
; // Pointer to the master the player is currently fighting
62 aClient
*battle
; // Pointer to the player this player is currently fighting
65 long int flags
; // Player's current flags
66 weapon
*w
; // Player's weapon
67 armor
*a
; // Player's armor
75 string name
; // The monster's name
76 string weapon
; // A name for their weapon. Doesn't have to be in weapons[]
77 int strength
; // Their strength
78 int gold
; // The gold you get when you kill them
79 int exp
; // The experience you get when you kill them
80 int hp
; // Their remaining hitpoints
81 int maxhp
; // Their max hitpoints
82 int defense
; // Only used seldomly
83 string death
; // What is said when they die