aboutsummaryrefslogtreecommitdiff
path: root/src/player.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/player.cc')
-rw-r--r--src/player.cc27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/player.cc b/src/player.cc
index 0ee78f3..04298c6 100644
--- a/src/player.cc
+++ b/src/player.cc
@@ -3,6 +3,33 @@
#include "stubs.hh"
+uint8 TPlayer::GetRealProfession(void){
+ return this->Profession;
+}
+
+uint8 TPlayer::GetEffectiveProfession(void){
+ uint8 Profession = this->Profession;
+ if(Profession >= 10){
+ Profession -= 10;
+ }
+ return Profession;
+}
+
+uint8 TPlayer::GetActiveProfession(void){
+ uint8 Profession;
+ if(CheckRight(this->ID, PREMIUM_ACCOUNT)){
+ Profession = this->Profession;
+ }else{
+ Profession = this->GetEffectiveProfession();
+ }
+ return Profession;
+}
+
+bool TPlayer::GetActivePromotion(void){
+ return CheckRight(this->ID, PREMIUM_ACCOUNT)
+ && this->Profession >= 10;
+}
+
void TPlayer::CheckState(void){
if(this->Connection != NULL){
uint8 State = 0;