aboutsummaryrefslogtreecommitdiff
path: root/src/player.cc
diff options
context:
space:
mode:
authorfusion32 <marcopuzziello@gmail.com>2025-05-30 10:32:29 -0300
committerfusion32 <marcopuzziello@gmail.com>2025-05-30 10:32:29 -0300
commitdff5e62f6ebb1b06c234b9144458788893b6ca86 (patch)
tree828c51278c906ad9e71dac3b54b7246a0c04706d /src/player.cc
parentf6c8c67094de3fe19f1e7871a7e78a91fb9bf3dd (diff)
downloadgame-dff5e62f6ebb1b06c234b9144458788893b6ca86.tar.gz
game-dff5e62f6ebb1b06c234b9144458788893b6ca86.zip
initial work on `crcombat.cc`
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;