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;
}
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());
return false;
}
+1 -1
View File
@@ -2037,7 +2037,7 @@ bool helper_no_available_bots(Client *bot_owner, Bot *my_bot)
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);
+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);
bool helper_is_help_or_usage(const char* arg);
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);
bool helper_spell_check_fail(STBaseEntry* local_entry);
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)
{
std::list<const char*> subcommand_list;
subcommand_list.push_back("botbeardcolor");
subcommand_list.push_back("botbeardstyle");
subcommand_list.push_back("botdetails");
subcommand_list.push_back("botdyearmor");
subcommand_list.push_back("boteyes");
subcommand_list.push_back("botface");
subcommand_list.push_back("bothaircolor");
subcommand_list.push_back("bothairstyle");
subcommand_list.push_back("botheritage");
subcommand_list.push_back("bottattoo");
subcommand_list.push_back("botwoad");
std::vector<const char*> subcommand_list = {
"botbeardcolor",
"botbeardstyle",
"botdetails",
"botdyearmor",
"boteyes",
"botface",
"bothaircolor",
"bothairstyle",
"botheritage",
"bottattoo",
"botwoad"
};
if (helper_command_alias_fail(c, "bot_command_appearance", sep->arg[0], "botappearance"))
return;
+19 -19
View File
@@ -2,25 +2,25 @@
void bot_command_bot(Client *c, const Seperator *sep)
{
std::list<const char*> subcommand_list;
subcommand_list.push_back("botappearance");
subcommand_list.push_back("botcamp");
subcommand_list.push_back("botclone");
subcommand_list.push_back("botcreate");
subcommand_list.push_back("botdelete");
subcommand_list.push_back("botfollowdistance");
subcommand_list.push_back("botinspectmessage");
subcommand_list.push_back("botlist");
subcommand_list.push_back("botoutofcombat");
subcommand_list.push_back("botreport");
subcommand_list.push_back("botspawn");
subcommand_list.push_back("botstance");
subcommand_list.push_back("botstopmeleelevel");
subcommand_list.push_back("botsummon");
subcommand_list.push_back("bottoggleranged");
subcommand_list.push_back("bottogglehelm");
subcommand_list.push_back("botupdate");
std::vector<const char*> subcommand_list = {
"botappearance",
"botcamp",
"botclone",
"botcreate",
"botdelete",
"botfollowdistance",
"botinspectmessage",
"botlist",
"botoutofcombat",
"botreport",
"botspawn",
"botstance",
"botstopmeleelevel",
"botsummon",
"bottoggleranged",
"bottogglehelm",
"botupdate"
};
if (helper_command_alias_fail(c, "bot_command_bot", sep->arg[0], "bot"))
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")) {
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->SetSpellMinThreshold(spell_type, my_bot->GetDefaultSpellMinThreshold(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)
{
std::list<const char*> subcommand_list;
subcommand_list.push_back("healrotationadaptivetargeting");
subcommand_list.push_back("healrotationaddmember");
subcommand_list.push_back("healrotationaddtarget");
subcommand_list.push_back("healrotationadjustcritical");
subcommand_list.push_back("healrotationadjustsafe");
subcommand_list.push_back("healrotationcastoverride");
subcommand_list.push_back("healrotationchangeinterval");
subcommand_list.push_back("healrotationclearhot");
subcommand_list.push_back("healrotationcleartargets");
subcommand_list.push_back("healrotationcreate");
subcommand_list.push_back("healrotationdelete");
subcommand_list.push_back("healrotationfastheals");
subcommand_list.push_back("healrotationlist");
subcommand_list.push_back("healrotationremovemember");
subcommand_list.push_back("healrotationremovetarget");
subcommand_list.push_back("healrotationresetlimits");
subcommand_list.push_back("healrotationsave");
subcommand_list.push_back("healrotationsethot");
subcommand_list.push_back("healrotationstart");
subcommand_list.push_back("healrotationstop");
std::vector<const char*> subcommand_list = {
"healrotationadaptivetargeting",
"healrotationaddmember",
"healrotationaddtarget",
"healrotationadjustcritical",
"healrotationadjustsafe",
"healrotationcastoverride",
"healrotationchangeinterval",
"healrotationclearhot",
"healrotationcleartargets",
"healrotationcreate",
"healrotationdelete",
"healrotationfastheals",
"healrotationlist",
"healrotationremovemember",
"healrotationremovetarget",
"healrotationresetlimits",
"healrotationsave",
"healrotationsethot",
"healrotationstart",
"healrotationstop"
};
if (helper_command_alias_fail(c, "bot_command_heal_rotation", sep->arg[0], "healrotation"))
return;
+6 -6
View File
@@ -2,12 +2,12 @@
void bot_command_inventory(Client *c, const Seperator *sep)
{
std::list<const char*> subcommand_list;
subcommand_list.push_back("inventorygive");
subcommand_list.push_back("inventorylist");
subcommand_list.push_back("inventoryremove");
subcommand_list.push_back("inventorywindow");
std::vector<const char*> subcommand_list = {
"inventorygive",
"inventorylist",
"inventoryremove",
"inventorywindow"
};
if (helper_command_alias_fail(c, "bot_command_inventory", sep->arg[0], "inventory"))
return;
+5 -5
View File
@@ -3,11 +3,11 @@
void bot_command_pet(Client *c, const Seperator *sep)
{
std::list<const char*> subcommand_list;
subcommand_list.push_back("petgetlost");
subcommand_list.push_back("petremove");
subcommand_list.push_back("petsettype");
std::vector<const char*> subcommand_list = {
"petgetlost",
"petremove",
"petsettype"
};
if (helper_command_alias_fail(c, "bot_command_pet", sep->arg[0], "pet"))
return;
+1 -1
View File
@@ -167,7 +167,7 @@ void bot_command_sit_mana_percent(Client* c, const Seperator* sep)
fmt::format(
"{} of your bots will now sit in combat whem at or below [{}%%] mana.'",
success_count,
TypeValue
type_value
).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) {
where_clause = fmt::format(
"IN ({}, {}, {}, {}, {}, {}, {})",
EQ::invslot::SlotHead,
EQ::invslot::SlotArms,
EQ::invslot::slotHead,
EQ::invslot::slotArms,
EQ::invslot::slotWrist1,
EQ::invslot::slotHands,
EQ::invslot::slotChest,