diff options
author | Stijn Buys <ingar@osirion.org> | 2013-11-07 13:38:11 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2013-11-07 13:38:11 +0000 |
commit | 4896428eefa6e621523168a42dceda4f8f2b0097 (patch) | |
tree | 4b2d183b9d9f4054326f4fede778f05c0d2a9659 /src/core/player.h | |
parent | 66746168f710cfdfbb0853947985fa0c552e81fb (diff) |
Added core:: support for entity factions and player reputation (single-player only).
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; }; |