]> jfr.im git - irc/gameservirc.git/blame - gameserv/player.h
added items to the tavern.dat, added the filename option to the config file
[irc/gameservirc.git] / gameserv / player.h
CommitLineData
85ce9d3e 1#ifndef PLAYER_H
2#define PLAYER_H
3
5c449fde 4#include <string>
26b17386 5
5c449fde 6using namespace std;
85ce9d3e 7
c8ada07e 8typedef struct monster_ Monster;
9d057db5 9
85ce9d3e 10class aClient; // forward declaration
37ed80a9 11
26b17386 12class item; // forward declaration
13class weapon; // forward declaration
14class armor; // forward declaration
15class potion; // forward declaration
37ed80a9 16class pouch; // forward declaration
85ce9d3e 17
18class Player {
19public:
85bcf836 20 Player();
85ce9d3e 21 Player(char *);
5c449fde 22 Player(string);
85ce9d3e 23 ~Player();
24 void setData(Player *);
1563e73b 25 void setPassword(const char *p);
e3c5fe46 26 void reset();
85ce9d3e 27
1af35752 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
33
26b17386 34 int wea;
35 int arm; // delete soon
36
37 weapon *getWeapon() { return w; };
38 armor *getArmor() { return a; };
39
40 void setWeapon (weapon &); // Set a player's weapon to some item
41 void setArmor (armor &); // Set a player's weapon to some item
1af35752 42
5c449fde 43 string name; // Player's Name
85ce9d3e 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
85ce9d3e 52 int forest_fights; // Amount of forest fights left today
53 int player_fights; // Amount of player<->player fights for today
5c449fde 54 string password; // Player's encrypted password
37ed80a9 55 pouch *inventory; // This contains everything you're holding
40251952 56 long int lastcommand; // timestamp for the last command typed
14e24ba1 57 long int lastlogin; // timestamp for the last login
e3c5fe46 58
85bcf836 59 aClient *client; // Pointer to the aClient this player is from
85ce9d3e 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
3662210f 63
1af35752 64private:
65 long int flags; // Player's current flags
26b17386 66 weapon *w; // Player's weapon
67 armor *a; // Player's armor
85ce9d3e 68};
69
70struct monster_ {
c8ada07e 71 monster_();
72 monster_(monster_ *);
bf3a2ff9 73 monster_(monster_ &);
c8ada07e 74 ~monster_();
8e800549 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
85ce9d3e 84};
85
86#endif