code cleanup 4

This commit is contained in:
nytmyr
2025-01-10 12:23:40 -06:00
parent 90e95572fd
commit f34a9470a8
11 changed files with 72 additions and 72 deletions
+1 -1
View File
@@ -9562,7 +9562,7 @@ bool Bot::CastChecks(uint16 spell_id, Mob* tar, uint16 spell_type, bool precheck
return false; return false;
} }
if (!AECheck && !IsValidSpellRange(spell_id, tar)) { if (!ae_check && !IsValidSpellRange(spell_id, tar)) {
LogBotPreChecksDetail("{} says, 'Cancelling cast of {} on {} due to IsValidSpellRange.'", GetCleanName(), GetSpellName(spell_id), tar->GetCleanName()); LogBotPreChecksDetail("{} says, 'Cancelling cast of {} on {} due to IsValidSpellRange.'", GetCleanName(), GetSpellName(spell_id), tar->GetCleanName());
return false; return false;
} }
+1 -1
View File
@@ -2037,7 +2037,7 @@ bool helper_no_available_bots(Client *bot_owner, Bot *my_bot)
return false; return false;
} }
void helper_send_available_subcommands(Client *bot_owner, const char* command_simile, const std::list<const char*>& subcommand_list) void helper_send_available_subcommands(Client* bot_owner, const char* command_simile, std::vector<const char*> subcommand_list)
{ {
bot_owner->Message(Chat::White, "Available %s management subcommands:", command_simile); bot_owner->Message(Chat::White, "Available %s management subcommands:", command_simile);
+1 -1
View File
@@ -1802,7 +1802,7 @@ bool helper_command_alias_fail(Client *bot_owner, const char* command_handler, c
void helper_command_depart_list(Client* bot_owner, Bot* druid_bot, Bot* wizard_bot, bcst_list* local_list, bool single_flag = false); void helper_command_depart_list(Client* bot_owner, Bot* druid_bot, Bot* wizard_bot, bcst_list* local_list, bool single_flag = false);
bool helper_is_help_or_usage(const char* arg); bool helper_is_help_or_usage(const char* arg);
bool helper_no_available_bots(Client *bot_owner, Bot *my_bot = nullptr); bool helper_no_available_bots(Client *bot_owner, Bot *my_bot = nullptr);
void helper_send_available_subcommands(Client *bot_owner, const char* command_simile, const std::list<const char*>& subcommand_list); void helper_send_available_subcommands(Client *bot_owner, const char* command_simile, std::vector<const char*> subcommand_list);
void helper_send_usage_required_bots(Client *bot_owner, BCEnum::SpType spell_type, uint8 bot_class = Class::None); void helper_send_usage_required_bots(Client *bot_owner, BCEnum::SpType spell_type, uint8 bot_class = Class::None);
bool helper_spell_check_fail(STBaseEntry* local_entry); bool helper_spell_check_fail(STBaseEntry* local_entry);
bool helper_spell_list_fail(Client *bot_owner, bcst_list* spell_list, BCEnum::SpType spell_type); bool helper_spell_list_fail(Client *bot_owner, bcst_list* spell_list, BCEnum::SpType spell_type);
+13 -13
View File
@@ -2,19 +2,19 @@
void bot_command_appearance(Client *c, const Seperator *sep) void bot_command_appearance(Client *c, const Seperator *sep)
{ {
std::vector<const char*> subcommand_list = {
std::list<const char*> subcommand_list; "botbeardcolor",
subcommand_list.push_back("botbeardcolor"); "botbeardstyle",
subcommand_list.push_back("botbeardstyle"); "botdetails",
subcommand_list.push_back("botdetails"); "botdyearmor",
subcommand_list.push_back("botdyearmor"); "boteyes",
subcommand_list.push_back("boteyes"); "botface",
subcommand_list.push_back("botface"); "bothaircolor",
subcommand_list.push_back("bothaircolor"); "bothairstyle",
subcommand_list.push_back("bothairstyle"); "botheritage",
subcommand_list.push_back("botheritage"); "bottattoo",
subcommand_list.push_back("bottattoo"); "botwoad"
subcommand_list.push_back("botwoad"); };
if (helper_command_alias_fail(c, "bot_command_appearance", sep->arg[0], "botappearance")) if (helper_command_alias_fail(c, "bot_command_appearance", sep->arg[0], "botappearance"))
return; return;
+19 -19
View File
@@ -2,25 +2,25 @@
void bot_command_bot(Client *c, const Seperator *sep) void bot_command_bot(Client *c, const Seperator *sep)
{ {
std::vector<const char*> subcommand_list = {
std::list<const char*> subcommand_list; "botappearance",
subcommand_list.push_back("botappearance"); "botcamp",
subcommand_list.push_back("botcamp"); "botclone",
subcommand_list.push_back("botclone"); "botcreate",
subcommand_list.push_back("botcreate"); "botdelete",
subcommand_list.push_back("botdelete"); "botfollowdistance",
subcommand_list.push_back("botfollowdistance"); "botinspectmessage",
subcommand_list.push_back("botinspectmessage"); "botlist",
subcommand_list.push_back("botlist"); "botoutofcombat",
subcommand_list.push_back("botoutofcombat"); "botreport",
subcommand_list.push_back("botreport"); "botspawn",
subcommand_list.push_back("botspawn"); "botstance",
subcommand_list.push_back("botstance"); "botstopmeleelevel",
subcommand_list.push_back("botstopmeleelevel"); "botsummon",
subcommand_list.push_back("botsummon"); "bottoggleranged",
subcommand_list.push_back("bottoggleranged"); "bottogglehelm",
subcommand_list.push_back("bottogglehelm"); "botupdate"
subcommand_list.push_back("botupdate"); };
if (helper_command_alias_fail(c, "bot_command_bot", sep->arg[0], "bot")) if (helper_command_alias_fail(c, "bot_command_bot", sep->arg[0], "bot"))
return; return;
+1 -1
View File
@@ -374,7 +374,7 @@ void bot_command_default_settings(Client* c, const Seperator* sep)
} }
else if (!strcasecmp(sep->arg[1], "spelltypesettings")) { else if (!strcasecmp(sep->arg[1], "spelltypesettings")) {
if (spell_type != UINT16_MAX) { if (spell_type != UINT16_MAX) {
my_bot->SetSpellHold(spell_type, my_bot->GetDefaultSpellHold(SpellType, bot_stance)); my_bot->SetSpellHold(spell_type, my_bot->GetDefaultSpellHold(spell_type, bot_stance));
my_bot->SetSpellDelay(spell_type, my_bot->GetDefaultSpellDelay(spell_type, bot_stance)); my_bot->SetSpellDelay(spell_type, my_bot->GetDefaultSpellDelay(spell_type, bot_stance));
my_bot->SetSpellMinThreshold(spell_type, my_bot->GetDefaultSpellMinThreshold(spell_type, bot_stance)); my_bot->SetSpellMinThreshold(spell_type, my_bot->GetDefaultSpellMinThreshold(spell_type, bot_stance));
my_bot->SetSpellMaxThreshold(spell_type, my_bot->GetDefaultSpellMaxThreshold(spell_type, bot_stance)); my_bot->SetSpellMaxThreshold(spell_type, my_bot->GetDefaultSpellMaxThreshold(spell_type, bot_stance));
+22 -22
View File
@@ -2,28 +2,28 @@
void bot_command_heal_rotation(Client *c, const Seperator *sep) void bot_command_heal_rotation(Client *c, const Seperator *sep)
{ {
std::vector<const char*> subcommand_list = {
std::list<const char*> subcommand_list; "healrotationadaptivetargeting",
subcommand_list.push_back("healrotationadaptivetargeting"); "healrotationaddmember",
subcommand_list.push_back("healrotationaddmember"); "healrotationaddtarget",
subcommand_list.push_back("healrotationaddtarget"); "healrotationadjustcritical",
subcommand_list.push_back("healrotationadjustcritical"); "healrotationadjustsafe",
subcommand_list.push_back("healrotationadjustsafe"); "healrotationcastoverride",
subcommand_list.push_back("healrotationcastoverride"); "healrotationchangeinterval",
subcommand_list.push_back("healrotationchangeinterval"); "healrotationclearhot",
subcommand_list.push_back("healrotationclearhot"); "healrotationcleartargets",
subcommand_list.push_back("healrotationcleartargets"); "healrotationcreate",
subcommand_list.push_back("healrotationcreate"); "healrotationdelete",
subcommand_list.push_back("healrotationdelete"); "healrotationfastheals",
subcommand_list.push_back("healrotationfastheals"); "healrotationlist",
subcommand_list.push_back("healrotationlist"); "healrotationremovemember",
subcommand_list.push_back("healrotationremovemember"); "healrotationremovetarget",
subcommand_list.push_back("healrotationremovetarget"); "healrotationresetlimits",
subcommand_list.push_back("healrotationresetlimits"); "healrotationsave",
subcommand_list.push_back("healrotationsave"); "healrotationsethot",
subcommand_list.push_back("healrotationsethot"); "healrotationstart",
subcommand_list.push_back("healrotationstart"); "healrotationstop"
subcommand_list.push_back("healrotationstop"); };
if (helper_command_alias_fail(c, "bot_command_heal_rotation", sep->arg[0], "healrotation")) if (helper_command_alias_fail(c, "bot_command_heal_rotation", sep->arg[0], "healrotation"))
return; return;
+6 -6
View File
@@ -2,12 +2,12 @@
void bot_command_inventory(Client *c, const Seperator *sep) void bot_command_inventory(Client *c, const Seperator *sep)
{ {
std::vector<const char*> subcommand_list = {
std::list<const char*> subcommand_list; "inventorygive",
subcommand_list.push_back("inventorygive"); "inventorylist",
subcommand_list.push_back("inventorylist"); "inventoryremove",
subcommand_list.push_back("inventoryremove"); "inventorywindow"
subcommand_list.push_back("inventorywindow"); };
if (helper_command_alias_fail(c, "bot_command_inventory", sep->arg[0], "inventory")) if (helper_command_alias_fail(c, "bot_command_inventory", sep->arg[0], "inventory"))
return; return;
+5 -5
View File
@@ -3,11 +3,11 @@
void bot_command_pet(Client *c, const Seperator *sep) void bot_command_pet(Client *c, const Seperator *sep)
{ {
std::vector<const char*> subcommand_list = {
std::list<const char*> subcommand_list; "petgetlost",
subcommand_list.push_back("petgetlost"); "petremove",
subcommand_list.push_back("petremove"); "petsettype"
subcommand_list.push_back("petsettype"); };
if (helper_command_alias_fail(c, "bot_command_pet", sep->arg[0], "pet")) if (helper_command_alias_fail(c, "bot_command_pet", sep->arg[0], "pet"))
return; return;
+1 -1
View File
@@ -167,7 +167,7 @@ void bot_command_sit_mana_percent(Client* c, const Seperator* sep)
fmt::format( fmt::format(
"{} of your bots will now sit in combat whem at or below [{}%%] mana.'", "{} of your bots will now sit in combat whem at or below [{}%%] mana.'",
success_count, success_count,
TypeValue type_value
).c_str() ).c_str()
); );
} }
+2 -2
View File
@@ -1161,8 +1161,8 @@ bool BotDatabase::SaveEquipmentColor(const uint32 bot_id, const int16 slot_id, c
if (all_flag) { if (all_flag) {
where_clause = fmt::format( where_clause = fmt::format(
"IN ({}, {}, {}, {}, {}, {}, {})", "IN ({}, {}, {}, {}, {}, {}, {})",
EQ::invslot::SlotHead, EQ::invslot::slotHead,
EQ::invslot::SlotArms, EQ::invslot::slotArms,
EQ::invslot::slotWrist1, EQ::invslot::slotWrist1,
EQ::invslot::slotHands, EQ::invslot::slotHands,
EQ::invslot::slotChest, EQ::invslot::slotChest,