diff options
Diffstat (limited to 'src/core/player.h')
-rw-r--r-- | src/core/player.h | 31 |
1 files changed, 27 insertions, 4 deletions
diff --git a/src/core/player.h b/src/core/player.h index 117de56..91d66c5 100644 --- a/src/core/player.h +++ b/src/core/player.h @@ -17,6 +17,7 @@ class Player; #include "core/uid.h" #include "core/zone.h" #include "core/netclient.h" +#include "core/reputation.h" #include "math/mathlib.h" #include <string> @@ -117,25 +118,45 @@ public: void print() const; /// player level - const int level() const { + inline const int level() const + { return player_level; } /// player admin level - const int admin_level() const { + inline const int admin_level() const + { return player_admin_level; } /// player global unique id - UID & guid() { + inline UID & guid() + { return player_guid; } /// network client associated with this player - NetClient *client() { + inline NetClient *client() + { return player_client; } + /** + * @brief player reputation + * */ + inline Reputation & reputation() + { + return player_reputation; + } + + /** + * @brief player reputation with a specific faction + * */ + inline const float reputation(const Info *faction) const + { + return player_reputation.reputation(faction); + } + /*----- server-side mesage functions ------------------------------ */ /// send a message to the player on one of the message channels @@ -282,6 +303,8 @@ private: bool player_zonechange; float player_warningtime; + + Reputation player_reputation; }; |