feat(Commands): Added cheat commands (#1412)

This commit is contained in:
Nefertumm
2019-02-24 14:35:08 -03:00
committed by Francesco Borzì
parent e659ca5fe9
commit 40f68ab026
10 changed files with 293 additions and 80 deletions

View File

@@ -912,6 +912,8 @@ Player::Player(WorldSession* session): Unit(true), m_mover(this)
SetPendingBind(0, 0);
_activeCheats = CHEAT_NONE;
m_achievementMgr = new AchievementMgr(this);
m_reputationMgr = new ReputationMgr(this);

View File

@@ -899,6 +899,16 @@ enum AdditionalSaving
ADDITIONAL_SAVING_QUEST_STATUS = 0x02,
};
enum PlayerCommandStates
{
CHEAT_NONE = 0x00,
CHEAT_GOD = 0x01,
CHEAT_CASTTIME = 0x02,
CHEAT_COOLDOWN = 0x04,
CHEAT_POWER = 0x08,
CHEAT_WATERWALK = 0x10
};
class PlayerTaxi
{
public:
@@ -1177,6 +1187,11 @@ class Player : public Unit, public GridObject<Player>
void InitStatsForLevel(bool reapplyMods = false);
// .cheat command related
bool GetCommandStatus(uint32 command) const { return _activeCheats & command; }
void SetCommandStatusOn(uint32 command) { _activeCheats |= command; }
void SetCommandStatusOff(uint32 command) { _activeCheats &= ~command; }
// Played Time Stuff
time_t m_logintime;
time_t m_Last_tick;
@@ -2938,6 +2953,8 @@ class Player : public Unit, public GridObject<Player>
uint32 _pendingBindId;
uint32 _pendingBindTimer;
uint32 _activeCheats;
// duel health and mana reset attributes
uint32 healthBeforeDuel;
uint32 manaBeforeDuel;