diff --git a/zone/bot.cpp b/zone/bot.cpp index 940e0ce27..2e4b3c368 100644 --- a/zone/bot.cpp +++ b/zone/bot.cpp @@ -8807,7 +8807,7 @@ void Bot::SetSpellRecastTimer(uint16 spell_id, int32 recast_delay) { } if (CheckSpellRecastTimer(spell_id)) { - BotTimer_Struct t; + BotTimer t; t.timer_id = spells[spell_id].timer_id; t.timer_value = (Timer::GetCurrentTime() + recast_delay); @@ -8913,7 +8913,7 @@ void Bot::SetDisciplineReuseTimer(uint16 spell_id, int32 reuse_timer) } if (CheckDisciplineReuseTimer(spell_id)) { - BotTimer_Struct t; + BotTimer t; t.timer_id = spells[spell_id].timer_id; t.timer_value = (Timer::GetCurrentTime() + reuse_timer); @@ -9010,7 +9010,7 @@ void Bot::SetItemReuseTimer(uint32 item_id, uint32 reuse_timer) } if (CheckItemReuseTimer(item_id)) { - BotTimer_Struct t; + BotTimer t; t.timer_id = (item->RecastType == NegativeItemReuse ? item->ID : item->RecastType); t.timer_value = ( @@ -10476,7 +10476,7 @@ void Bot::LoadDefaultBotSettings() { } for (uint16 i = BotSpellTypes::START; i <= BotSpellTypes::END; ++i) { - BotSpellSettings_Struct t; + BotSpellSettings t; t.spellType = i; t.shortName = GetSpellTypeShortNameByID(i); @@ -12035,7 +12035,7 @@ void Bot::CopyBotBlockedBuffs(Bot* to) { to->ClearBotBlockedBuffs(); - std::vector blocked_buffs = GetBotBlockedBuffs(); + std::vector blocked_buffs = GetBotBlockedBuffs(); if (!blocked_buffs.empty()) { for (auto& blocked_buff : blocked_buffs) { @@ -12051,7 +12051,7 @@ void Bot::CopyBotBlockedPetBuffs(Bot* to) { to->ClearBotBlockedBuffs(); - std::vector blocked_buffs = GetBotBlockedBuffs(); + std::vector blocked_buffs = GetBotBlockedBuffs(); if (!blocked_buffs.empty()) { for (auto& blocked_buff : blocked_buffs) { @@ -12225,7 +12225,7 @@ void Bot::SetBotBlockedBuff(uint16 spell_id, bool block) auto it = std::find_if( bot_blocked_buffs.begin(), bot_blocked_buffs.end(), - [spell_id](const BotBlockedBuffs_Struct& buff) { return buff.spell_id == spell_id; } + [spell_id](const BotBlockedBuffs& buff) { return buff.spell_id == spell_id; } ); if (it != bot_blocked_buffs.end()) { @@ -12272,7 +12272,7 @@ void Bot::SetBotBlockedPetBuff(uint16 spell_id, bool block) auto it = std::find_if( bot_blocked_buffs.begin(), bot_blocked_buffs.end(), - [spell_id](const BotBlockedBuffs_Struct& buff) { return buff.spell_id == spell_id; } + [spell_id](const BotBlockedBuffs& buff) { return buff.spell_id == spell_id; } ); if (it != bot_blocked_buffs.end()) { diff --git a/zone/bot.h b/zone/bot.h index 673bde3ff..71772bd5d 100644 --- a/zone/bot.h +++ b/zone/bot.h @@ -965,11 +965,11 @@ public: // New accessors for BotDatabase access bool DeleteBot(); - std::vector GetBotTimers() { return bot_timers; } - void SetBotTimers(std::vector timers) { bot_timers = timers; } - std::vector GetBotBlockedBuffs() { return bot_blocked_buffs; } - void SetBotBlockedBuffs(std::vector blocked_buffs) { bot_blocked_buffs = blocked_buffs; } - const std::map>& GetCommandedSpellTypesMinLevels() { return commanded_spells_min_level; } + std::vector GetBotTimers() { return bot_timers; } + void SetBotTimers(std::vector timers) { bot_timers = timers; } + std::vector GetBotBlockedBuffs() { return bot_blocked_buffs; } + void SetBotBlockedBuffs(std::vector blocked_buffs) { bot_blocked_buffs = blocked_buffs; } + const std::map>& GetCommandedSpellTypesMinLevels() { return commanded_spells_min_level; } uint32 GetLastZoneID() const { return _lastZoneId; } int32 GetBaseAC() const { return _baseAC; } int32 GetBaseATK() const { return _baseATK; } @@ -1076,10 +1076,10 @@ protected: std::vector AIBot_spells_enforced; std::unordered_map> AIBot_spells_by_type; - std::map> commanded_spells_min_level; + std::map> commanded_spells_min_level; - std::vector bot_timers; - std::vector bot_blocked_buffs; + std::vector bot_timers; + std::vector bot_blocked_buffs; private: // Class Members diff --git a/zone/bot_commands/blocked_buffs.cpp b/zone/bot_commands/blocked_buffs.cpp index c37bada86..8aa767368 100644 --- a/zone/bot_commands/blocked_buffs.cpp +++ b/zone/bot_commands/blocked_buffs.cpp @@ -154,7 +154,7 @@ void bot_command_blocked_buffs(Client* c, const Seperator* sep) bot_iter->SetBotBlockedBuff(spell_id, false); } else if (list) { - std::vector blocked_buffs = bot_iter->GetBotBlockedBuffs(); + std::vector blocked_buffs = bot_iter->GetBotBlockedBuffs(); bool found = false; if (!blocked_buffs.empty()) { @@ -391,7 +391,7 @@ void bot_command_blocked_pet_buffs(Client* c, const Seperator* sep) bot_iter->SetBotBlockedPetBuff(spell_id, false); } else if (list) { - std::vector blocked_buffs = bot_iter->GetBotBlockedBuffs(); + std::vector blocked_buffs = bot_iter->GetBotBlockedBuffs(); bool found = false; if (!blocked_buffs.empty()) { diff --git a/zone/bot_database.cpp b/zone/bot_database.cpp index 5313a2efb..6acd29f00 100644 --- a/zone/bot_database.cpp +++ b/zone/bot_database.cpp @@ -800,9 +800,9 @@ bool BotDatabase::LoadTimers(Bot* b) ) ); - std::vector v; + std::vector v; - BotTimer_Struct t{ }; + BotTimer t{ }; for (const auto& e : l) { if (e.timer_value < (Timer::GetCurrentTime() + e.recast_time)) { @@ -836,7 +836,7 @@ bool BotDatabase::SaveTimers(Bot* b) return false; } - std::vector v = b->GetBotTimers(); + std::vector v = b->GetBotTimers(); if (v.empty()) { return true; @@ -2422,9 +2422,9 @@ bool BotDatabase::LoadBotBlockedBuffs(Bot* b) ) ); - std::vector v; + std::vector v; - BotBlockedBuffs_Struct t{ }; + BotBlockedBuffs t{ }; for (const auto& e : l) { t.spell_id = e.spell_id; @@ -2451,7 +2451,7 @@ bool BotDatabase::SaveBotBlockedBuffs(Bot* b) return false; } - std::vector v = b->GetBotBlockedBuffs(); + std::vector v = b->GetBotBlockedBuffs(); if (v.empty()) { return true; diff --git a/zone/bot_structs.h b/zone/bot_structs.h index a9d336a21..47db1706d 100644 --- a/zone/bot_structs.h +++ b/zone/bot_structs.h @@ -99,7 +99,7 @@ struct BotSpells_Struct_wIndex { uint8 bucket_comparison; }; -struct BotTimer_Struct { +struct BotTimer { uint32 timer_id; uint32 timer_value; uint32 recast_time; @@ -115,14 +115,14 @@ struct BotSpellTypeOrder { uint16 priority; }; -struct BotBlockedBuffs_Struct { +struct BotBlockedBuffs { uint32_t bot_id; uint32_t spell_id; uint8_t blocked; uint8_t blocked_pet; }; -struct BotSpellTypesByClass_Struct { +struct BotSpellTypesByClass { uint8_t min_level = 255; std::string description; }; diff --git a/zone/client_bot.cpp b/zone/client_bot.cpp index 348c5ea41..679fbef00 100644 --- a/zone/client_bot.cpp +++ b/zone/client_bot.cpp @@ -228,7 +228,7 @@ void Client::LoadDefaultBotSettings() { 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_Struct t; + BotSpellSettings t; t.spellType = i; t.shortName = GetSpellTypeShortNameByID(i); diff --git a/zone/mob.h b/zone/mob.h index 312311a1d..84ff76c8a 100644 --- a/zone/mob.h +++ b/zone/mob.h @@ -93,7 +93,7 @@ struct AppearanceStruct { uint8 texture = UINT8_MAX; }; -struct BotSpellSettings_Struct { +struct BotSpellSettings { uint16 spellType; // type ID of bot category std::string shortName; // type short name of bot category std::string name; // type name of bot category @@ -231,7 +231,7 @@ public: // Bot attack flag Timer bot_attack_flag_timer; - std::vector m_bot_spell_settings; + std::vector m_bot_spell_settings; //Somewhat sorted: needs documenting!