mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-24 14:16:31 +00:00
feat(Commands): Added cheat commands (#1412)
This commit is contained in:
committed by
Francesco Borzì
parent
e659ca5fe9
commit
40f68ab026
@@ -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);
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user