aboutsummaryrefslogtreecommitdiff
path: root/src/player.cc
diff options
context:
space:
mode:
authorfusion32 <marcopuzziello@gmail.com>2025-06-05 12:00:34 -0300
committerfusion32 <marcopuzziello@gmail.com>2025-06-05 12:00:34 -0300
commitebfa80ab573b1a0ef9aec65a45fd0ae751196207 (patch)
treee86ce77ae1f497b216861d763d92de57ec9e0490 /src/player.cc
parent3c8bcba6b540f5cb84572994d9ec2426dd348a93 (diff)
downloadgame-ebfa80ab573b1a0ef9aec65a45fd0ae751196207.tar.gz
game-ebfa80ab573b1a0ef9aec65a45fd0ae751196207.zip
merge creature headers
Diffstat (limited to 'src/player.cc')
-rw-r--r--src/player.cc73
1 files changed, 0 insertions, 73 deletions
diff --git a/src/player.cc b/src/player.cc
deleted file mode 100644
index 04298c6..0000000
--- a/src/player.cc
+++ /dev/null
@@ -1,73 +0,0 @@
-#include "player.hh"
-#include "enums.hh"
-
-#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;
-
- if(this->Skills[SKILL_POISON]->TimerValue() > 0){
- State |= 0x01;
- }
-
- if(this->Skills[SKILL_BURNING]->TimerValue() > 0){
- State |= 0x02;
- }
-
- if(this->Skills[SKILL_ENERGY]->TimerValue() > 0){
- State |= 0x04;
- }
-
- // TODO(fusion): Not sure about this one.
- if(this->Skills[SKILL_DRUNK]->TimerValue() > 0 && this->Skills[SKILL_DRUNK]->Get() == 0){
- State |= 0x08;
- }
-
- if(this->Skills[SKILL_MANASHIELD]->TimerValue() > 0 || this->Skills[SKILL_MANASHIELD]->Get() > 0){
- State |= 0x10;
- }
-
- if(this->Skills[SKILL_GO_STRENGTH]->MDAct < 0){
- State |= 0x20;
- }else if(this->Skills[SKILL_GO_STRENGTH]->MDAct > 0){
- State |= 0x40;
- }
-
- if(RoundNr < this->EarliestLogoutRound){
- State |= 0x80;
- }
-
- if(State != this->OldState){
- SendPlayerState(this->Connection, State);
- this->OldState = State;
- }
- }
-}