[Commands] [Hotfix] Fix Illusion Block (#4666)

* [Commands] [Hotfix] Fix Illusion Block

This wasn't properly being set or saved if bots were not enabled, moved to extended character profile for players.

* Move out of EPP

* ValueWithin

* I learned a new word today - idempotent

I'm dumb. Will forget it tomorrow.

* Move saving to ZoneDatabase, inline SetIllusionBlock
This commit is contained in:
nytmyr
2025-02-12 00:18:34 -06:00
committed by GitHub
parent ac4ffefa09
commit d9d2d5d47c
10 changed files with 54 additions and 11 deletions
+3 -3
View File
@@ -2346,8 +2346,8 @@ public:
inline bool SpellTypeRecastCheck(uint16 spellType) { return !m_bot_spell_settings[spellType].recast_timer.GetRemainingTime(); }
void SetSpellTypeRecastTimer(uint16 spell_type, uint32 recast_time) { m_bot_spell_settings[spell_type].recast_timer.Start(recast_time); }
void SetIllusionBlock(bool value) { _illusionBlock = value; }
bool GetIllusionBlock() const override { return _illusionBlock; }
void SetIllusionBlock(bool value) { _illusion_block = value; }
bool GetIllusionBlock() const override { return _illusion_block; }
private:
bool bot_owner_options[_booCount];
@@ -2355,7 +2355,7 @@ private:
bool m_bot_precombat;
uint32 bot_assistee;
std::vector<BotSpellSettings> m_bot_spell_settings;
bool _illusionBlock;
bool _illusion_block;
bool CanTradeFVNoDropItem();
void SendMobPositions();