mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-10 19:10:25 +00:00
[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:
+4
-4
@@ -223,9 +223,10 @@ void Client::CampAllBots(uint8 class_id) {
|
||||
void Client::LoadDefaultBotSettings() {
|
||||
m_bot_spell_settings.clear();
|
||||
|
||||
// Only illusion block supported currently
|
||||
/* No longer used, left as example.
|
||||
SetBotSetting(BotSettingCategories::BaseSetting, BotBaseSettings::IllusionBlock, GetDefaultBotSettings(BotSettingCategories::BaseSetting, BotBaseSettings::IllusionBlock));
|
||||
LogBotSettingsDetail("{} says, 'Setting default {} [{}] to [{}]'", GetCleanName(), CastToBot()->GetBotSettingCategoryName(BotBaseSettings::IllusionBlock), BotBaseSettings::IllusionBlock, GetDefaultBotSettings(BotSettingCategories::BaseSetting, BotBaseSettings::IllusionBlock));
|
||||
*/
|
||||
|
||||
for (uint16 i = BotSpellTypes::START; i <= BotSpellTypes::END; ++i) {
|
||||
BotSpellSettings t;
|
||||
@@ -263,7 +264,7 @@ int Client::GetDefaultBotSettings(uint8 setting_type, uint16 bot_setting) {
|
||||
int Client::GetBotSetting(uint8 setting_type, uint16 bot_setting) {
|
||||
switch (setting_type) {
|
||||
case BotSettingCategories::BaseSetting:
|
||||
return GetIllusionBlock(); // only setting supported currently
|
||||
return 0; // unused currently
|
||||
case BotSettingCategories::SpellDelay:
|
||||
return GetSpellTypeDelay(bot_setting);
|
||||
case BotSettingCategories::SpellMinThreshold:
|
||||
@@ -276,8 +277,7 @@ int Client::GetBotSetting(uint8 setting_type, uint16 bot_setting) {
|
||||
void Client::SetBotSetting(uint8 setting_type, uint16 bot_setting, uint32 setting_value) {
|
||||
switch (setting_type) {
|
||||
case BotSettingCategories::BaseSetting:
|
||||
SetIllusionBlock(setting_value); // only setting supported currently
|
||||
break;
|
||||
break; // unused currently
|
||||
case BotSettingCategories::SpellDelay:
|
||||
SetSpellTypeDelay(bot_setting, setting_value);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user