fix(Core/Game): Rest & Inn Improvements (#3780)

This commit is contained in:
Meltie2013
2020-12-11 08:23:09 -06:00
committed by GitHub
parent aff02b0599
commit af53598fa2
5 changed files with 73 additions and 56 deletions

View File

@@ -766,6 +766,13 @@ enum ArenaTeamInfoType
class InstanceSave;
enum RestFlag
{
REST_FLAG_IN_TAVERN = 0x1,
REST_FLAG_IN_CITY = 0x2,
REST_FLAG_IN_FACTION_AREA = 0x4, // used with AREA_FLAG_REST_ZONE_*
};
enum TeleportToOptions
{
TELE_TO_GM_MODE = 0x01,
@@ -1251,6 +1258,10 @@ public:
uint32 GetXPRestBonus(uint32 xp);
[[nodiscard]] float GetRestBonus() const { return _restBonus; }
void SetRestBonus(float rest_bonus_new);
bool HasRestFlag(RestFlag restFlag) const { return (_restFlagMask & restFlag) != 0; }
void SetRestFlag(RestFlag restFlag, uint32 triggerId = 0);
void RemoveRestFlag(RestFlag restFlag);
[[nodiscard]] uint32 GetInnTriggerId() const { return _innTriggerId; }
[[nodiscard]] Pet* GetPet() const;
@@ -2901,6 +2912,7 @@ protected:
time_t _restTime;
uint32 _innTriggerId;
float _restBonus;
uint32 _restFlagMask;
////////////////////Rest System/////////////////////
uint32 m_resetTalentsCost;
time_t m_resetTalentsTime;