Remove _Struct from struct declarations

This commit is contained in:
nytmyr
2025-01-26 20:05:36 -06:00
parent 72fb75a6a2
commit 41b8cb3e71
7 changed files with 30 additions and 30 deletions
+8 -8
View File
@@ -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<BotBlockedBuffs_Struct> blocked_buffs = GetBotBlockedBuffs();
std::vector<BotBlockedBuffs> 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<BotBlockedBuffs_Struct> blocked_buffs = GetBotBlockedBuffs();
std::vector<BotBlockedBuffs> 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()) {
+8 -8
View File
@@ -965,11 +965,11 @@ public:
// New accessors for BotDatabase access
bool DeleteBot();
std::vector<BotTimer_Struct> GetBotTimers() { return bot_timers; }
void SetBotTimers(std::vector<BotTimer_Struct> timers) { bot_timers = timers; }
std::vector<BotBlockedBuffs_Struct> GetBotBlockedBuffs() { return bot_blocked_buffs; }
void SetBotBlockedBuffs(std::vector<BotBlockedBuffs_Struct> blocked_buffs) { bot_blocked_buffs = blocked_buffs; }
const std::map<int32_t, std::map<int32_t, BotSpellTypesByClass_Struct>>& GetCommandedSpellTypesMinLevels() { return commanded_spells_min_level; }
std::vector<BotTimer> GetBotTimers() { return bot_timers; }
void SetBotTimers(std::vector<BotTimer> timers) { bot_timers = timers; }
std::vector<BotBlockedBuffs> GetBotBlockedBuffs() { return bot_blocked_buffs; }
void SetBotBlockedBuffs(std::vector<BotBlockedBuffs> blocked_buffs) { bot_blocked_buffs = blocked_buffs; }
const std::map<int32_t, std::map<int32_t, BotSpellTypesByClass>>& 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<BotSpells_Struct> AIBot_spells_enforced;
std::unordered_map<uint16, std::vector<BotSpells_Struct_wIndex>> AIBot_spells_by_type;
std::map<int32_t, std::map<int32_t, BotSpellTypesByClass_Struct>> commanded_spells_min_level;
std::map<int32_t, std::map<int32_t, BotSpellTypesByClass>> commanded_spells_min_level;
std::vector<BotTimer_Struct> bot_timers;
std::vector<BotBlockedBuffs_Struct> bot_blocked_buffs;
std::vector<BotTimer> bot_timers;
std::vector<BotBlockedBuffs> bot_blocked_buffs;
private:
// Class Members
+2 -2
View File
@@ -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<BotBlockedBuffs_Struct> blocked_buffs = bot_iter->GetBotBlockedBuffs();
std::vector<BotBlockedBuffs> 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<BotBlockedBuffs_Struct> blocked_buffs = bot_iter->GetBotBlockedBuffs();
std::vector<BotBlockedBuffs> blocked_buffs = bot_iter->GetBotBlockedBuffs();
bool found = false;
if (!blocked_buffs.empty()) {
+6 -6
View File
@@ -800,9 +800,9 @@ bool BotDatabase::LoadTimers(Bot* b)
)
);
std::vector<BotTimer_Struct> v;
std::vector<BotTimer> 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<BotTimer_Struct> v = b->GetBotTimers();
std::vector<BotTimer> v = b->GetBotTimers();
if (v.empty()) {
return true;
@@ -2422,9 +2422,9 @@ bool BotDatabase::LoadBotBlockedBuffs(Bot* b)
)
);
std::vector<BotBlockedBuffs_Struct> v;
std::vector<BotBlockedBuffs> 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<BotBlockedBuffs_Struct> v = b->GetBotBlockedBuffs();
std::vector<BotBlockedBuffs> v = b->GetBotBlockedBuffs();
if (v.empty()) {
return true;
+3 -3
View File
@@ -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;
};
+1 -1
View File
@@ -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);
+2 -2
View File
@@ -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<BotSpellSettings_Struct> m_bot_spell_settings;
std::vector<BotSpellSettings> m_bot_spell_settings;
//Somewhat sorted: needs documenting!