TrinityCore
RestMgr Class Reference

#include <RestMgr.h>

Public Member Functions

 RestMgr (Player *player)
 
 ~RestMgr ()
 
float GetRestBonus (RestTypes restType) const
 
void SetRestBonus (RestTypes restType, float restBonus)
 
void AddRestBonus (RestTypes restType, float restBonus)
 
bool HasRestFlag (RestFlag restFlag) const
 
void SetRestFlag (RestFlag restFlag, uint32 triggerId=0)
 
void RemoveRestFlag (RestFlag restFlag)
 
uint32 GetRestBonusFor (RestTypes restType, uint32 xp)
 
uint32 GetInnTriggerID () const
 
void Update (time_t now)
 
float CalcExtraPerSec (RestTypes restType, float bubble) const
 

Protected Member Functions

void LoadRestBonus (RestTypes restType, PlayerRestState state, float restBonus)
 

Private Attributes

Player_player
 
time_t _restTime
 
uint32 _innAreaTriggerId
 
float _restBonus [REST_TYPE_MAX]
 
uint32 _restFlagMask
 

Friends

class Player
 

Detailed Description

Definition at line 58 of file RestMgr.h.

Constructor & Destructor Documentation

◆ RestMgr()

RestMgr::RestMgr ( Player player)
explicit

Definition at line 26 of file RestMgr.cpp.

◆ ~RestMgr()

RestMgr::~RestMgr ( )
inline

Definition at line 63 of file RestMgr.h.

Member Function Documentation

◆ AddRestBonus()

void RestMgr::AddRestBonus ( RestTypes  restType,
float  restBonus 
)

Definition at line 85 of file RestMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CalcExtraPerSec()

float RestMgr::CalcExtraPerSec ( RestTypes  restType,
float  bubble 
) const

Definition at line 161 of file RestMgr.cpp.

+ Here is the caller graph for this function:

◆ GetInnTriggerID()

uint32 RestMgr::GetInnTriggerID ( ) const
inline

Definition at line 75 of file RestMgr.h.

◆ GetRestBonus()

float RestMgr::GetRestBonus ( RestTypes  restType) const
inline

Definition at line 65 of file RestMgr.h.

+ Here is the caller graph for this function:

◆ GetRestBonusFor()

uint32 RestMgr::GetRestBonusFor ( RestTypes  restType,
uint32  xp 
)

Definition at line 122 of file RestMgr.cpp.

+ Here is the call graph for this function:

◆ HasRestFlag()

bool RestMgr::HasRestFlag ( RestFlag  restFlag) const
inline

Definition at line 70 of file RestMgr.h.

◆ LoadRestBonus()

void RestMgr::LoadRestBonus ( RestTypes  restType,
PlayerRestState  state,
float  restBonus 
)
protected

Definition at line 154 of file RestMgr.cpp.

+ Here is the call graph for this function:

◆ RemoveRestFlag()

void RestMgr::RemoveRestFlag ( RestFlag  restFlag)

Definition at line 110 of file RestMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetRestBonus()

void RestMgr::SetRestBonus ( RestTypes  restType,
float  restBonus 
)

Definition at line 32 of file RestMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetRestFlag()

void RestMgr::SetRestFlag ( RestFlag  restFlag,
uint32  triggerId = 0 
)

Definition at line 95 of file RestMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Update()

void RestMgr::Update ( time_t  now)

Definition at line 139 of file RestMgr.cpp.

+ Here is the call graph for this function:

Friends And Related Function Documentation

◆ Player

friend class Player
friend

Definition at line 60 of file RestMgr.h.

Member Data Documentation

◆ _innAreaTriggerId

uint32 RestMgr::_innAreaTriggerId
private

Definition at line 87 of file RestMgr.h.

◆ _player

Player* RestMgr::_player
private

Definition at line 85 of file RestMgr.h.

◆ _restBonus

float RestMgr::_restBonus[REST_TYPE_MAX]
private

Definition at line 88 of file RestMgr.h.

◆ _restFlagMask

uint32 RestMgr::_restFlagMask
private

Definition at line 89 of file RestMgr.h.

◆ _restTime

time_t RestMgr::_restTime
private

Definition at line 86 of file RestMgr.h.


The documentation for this class was generated from the following files: