Move bot_list from std::list to std::unordered_map like other entities

This commit is contained in:
nytmyr
2024-12-23 20:50:36 -06:00
parent c7741efbe5
commit ef983c3d47
53 changed files with 266 additions and 275 deletions
+2 -2
View File
@@ -24,13 +24,13 @@ void bot_command_aggressive(Client* c, const Seperator* sep)
class_race_check = true;
}
std::list<Bot*> sbl;
std::vector<Bot*> sbl;
if (ActionableBots::PopulateSBL(c, sep->arg[ab_arg], sbl, ab_mask, !class_race_check ? sep->arg[ab_arg + 1] : nullptr, class_race_check ? atoi(sep->arg[ab_arg + 1]) : 0) == ActionableBots::ABT_None) {
return;
}
sbl.remove(nullptr);
sbl.erase(std::remove(sbl.begin(), sbl.end(), nullptr), sbl.end());
int success_count = 0;
int candidate_count = sbl.size();
+1 -1
View File
@@ -214,7 +214,7 @@ void bot_command_dye_armor(Client *c, const Seperator *sep)
uint32 rgb_value = ((uint32)red_value << 16) | ((uint32)green_value << 8) | ((uint32)blue_value);
std::list<Bot*> sbl;
std::vector<Bot*> sbl;
auto ab_type = ActionableBots::PopulateSBL(c, sep->arg[5], sbl, ab_mask);
if (ab_type == ActionableBots::ABT_None) {
return;
+2 -2
View File
@@ -34,7 +34,7 @@ void bot_command_attack(Client *c, const Seperator *sep)
class_race_check = true;
}
std::list<Bot*> sbl;
std::vector<Bot*> sbl;
if (ActionableBots::PopulateSBL(c, ab_arg.c_str(), sbl, ab_mask, !class_race_check ? sep->arg[2] : nullptr, class_race_check ? atoi(sep->arg[2]) : 0) == ActionableBots::ABT_None) {
return;
@@ -47,7 +47,7 @@ void bot_command_attack(Client *c, const Seperator *sep)
size_t attacker_count = 0;
Bot *first_attacker = nullptr;
sbl.remove(nullptr);
sbl.erase(std::remove(sbl.begin(), sbl.end(), nullptr), sbl.end());
for (auto bot_iter : sbl) {
if (bot_iter->GetAppearance() != eaDead && bot_iter->GetBotStance() != Stance::Passive) {
+2 -2
View File
@@ -118,12 +118,12 @@ void bot_command_behind_mob(Client* c, const Seperator* sep)
class_race_check = true;
}
std::list<Bot*> sbl;
std::vector<Bot*> sbl;
if (ActionableBots::PopulateSBL(c, sep->arg[ab_arg], sbl, ab_mask, !class_race_check ? sep->arg[ab_arg + 1] : nullptr, class_race_check ? atoi(sep->arg[ab_arg + 1]) : 0) == ActionableBots::ABT_None) {
return;
}
sbl.remove(nullptr);
sbl.erase(std::remove(sbl.begin(), sbl.end(), nullptr), sbl.end());
Bot* first_found = nullptr;
int success_count = 0;
+4 -4
View File
@@ -162,13 +162,13 @@ void bot_command_blocked_buffs(Client* c, const Seperator* sep)
class_race_check = true;
}
std::list<Bot*> sbl;
std::vector<Bot*> sbl;
if (ActionableBots::PopulateSBL(c, actionableArg, sbl, ab_mask, !class_race_check ? sep->arg[ab_arg + 1] : nullptr, class_race_check ? atoi(sep->arg[ab_arg + 1]) : 0) == ActionableBots::ABT_None) {
return;
}
sbl.remove(nullptr);
sbl.erase(std::remove(sbl.begin(), sbl.end(), nullptr), sbl.end());
bool isSuccess = false;
uint16 successCount = 0;
@@ -421,13 +421,13 @@ void bot_command_blocked_pet_buffs(Client* c, const Seperator* sep)
class_race_check = true;
}
std::list<Bot*> sbl;
std::vector<Bot*> sbl;
if (ActionableBots::PopulateSBL(c, actionableArg, sbl, ab_mask, !class_race_check ? sep->arg[ab_arg + 1] : nullptr, class_race_check ? atoi(sep->arg[ab_arg + 1]) : 0) == ActionableBots::ABT_None) {
return;
}
sbl.remove(nullptr);
sbl.erase(std::remove(sbl.begin(), sbl.end(), nullptr), sbl.end());
bool isSuccess = false;
uint16 successCount = 0;
+13 -13
View File
@@ -51,7 +51,7 @@ void bot_command_camp(Client *c, const Seperator *sep)
class_race_check = true;
}
std::list<Bot*> sbl;
std::vector<Bot*> sbl;
if (ActionableBots::PopulateSBL(c, sep->arg[1], sbl, ab_mask, !class_race_check ? sep->arg[2] : nullptr, class_race_check ? atoi(sep->arg[2]) : 0) == ActionableBots::ABT_None) {
return;
}
@@ -611,13 +611,13 @@ void bot_command_follow_distance(Client *c, const Seperator *sep)
class_race_check = true;
}
std::list<Bot*> sbl;
std::vector<Bot*> sbl;
if (ActionableBots::PopulateSBL(c, sep->arg[ab_arg], sbl, ab_mask, !class_race_check ? sep->arg[ab_arg + 1] : nullptr, class_race_check ? atoi(sep->arg[ab_arg + 1]) : 0) == ActionableBots::ABT_None) {
return;
}
sbl.remove(nullptr);
sbl.erase(std::remove(sbl.begin(), sbl.end(), nullptr), sbl.end());
int botCount = 0;
for (auto bot_iter : sbl) {
@@ -704,7 +704,7 @@ void bot_command_inspect_message(Client *c, const Seperator *sep)
return;
}
std::list<Bot*> sbl;
std::vector<Bot*> sbl;
auto ab_type = ActionableBots::PopulateSBL(c, sep->arg[2], sbl, ab_mask, sep->arg[3]);
if (ab_type == ActionableBots::ABT_None)
return;
@@ -947,7 +947,7 @@ void bot_command_report(Client *c, const Seperator *sep)
class_race_check = true;
}
std::list<Bot*> sbl;
std::vector<Bot*> sbl;
if (ActionableBots::PopulateSBL(c, sep->arg[ab_arg], sbl, ab_mask, !class_race_check ? sep->arg[ab_arg + 1] : nullptr, class_race_check ? atoi(sep->arg[ab_arg + 1]) : 0) == ActionableBots::ABT_None) {
return;
}
@@ -1377,7 +1377,7 @@ void bot_command_stance(Client *c, const Seperator *sep)
class_race_check = true;
}
std::list<Bot*> sbl;
std::vector<Bot*> sbl;
if (ActionableBots::PopulateSBL(c, sep->arg[ab_arg], sbl, ab_mask, !class_race_check ? sep->arg[ab_arg + 1] : nullptr, class_race_check ? atoi(sep->arg[ab_arg + 1]) : 0) == ActionableBots::ABT_None) {
return;
}
@@ -1519,13 +1519,13 @@ void bot_command_stop_melee_level(Client* c, const Seperator* sep)
class_race_check = true;
}
std::list<Bot*> sbl;
std::vector<Bot*> sbl;
if (ActionableBots::PopulateSBL(c, sep->arg[ab_arg], sbl, ab_mask, !class_race_check ? sep->arg[ab_arg + 1] : nullptr, class_race_check ? atoi(sep->arg[ab_arg + 1]) : 0) == ActionableBots::ABT_None) {
return;
}
sbl.remove(nullptr);
sbl.erase(std::remove(sbl.begin(), sbl.end(), nullptr), sbl.end());
Bot* first_found = nullptr;
int success_count = 0;
@@ -1614,12 +1614,12 @@ void bot_command_summon(Client *c, const Seperator *sep)
class_race_check = true;
}
std::list<Bot*> sbl;
std::vector<Bot*> sbl;
if (ActionableBots::PopulateSBL(c, sep->arg[ab_arg], sbl, ab_mask, !class_race_check ? sep->arg[ab_arg + 1] : nullptr, class_race_check ? atoi(sep->arg[ab_arg + 1]) : 0) == ActionableBots::ABT_None) {
return;
}
sbl.remove(nullptr);
sbl.erase(std::remove(sbl.begin(), sbl.end(), nullptr), sbl.end());
for (auto bot_iter : sbl) {
if (!bot_iter) {
@@ -1695,7 +1695,7 @@ void bot_command_toggle_ranged(Client *c, const Seperator *sep)
class_race_check = true;
}
std::list<Bot*> sbl;
std::vector<Bot*> sbl;
if (ActionableBots::PopulateSBL(c, sep->arg[ab_arg], sbl, ab_mask, !class_race_check ? sep->arg[ab_arg + 1] : nullptr, class_race_check ? atoi(sep->arg[ab_arg + 1]) : 0) == ActionableBots::ABT_None) {
return;
@@ -1747,7 +1747,7 @@ void bot_command_toggle_helm(Client *c, const Seperator *sep)
++ab_arg;
}
std::list<Bot*> sbl;
std::vector<Bot*> sbl;
auto ab_type = ActionableBots::PopulateSBL(c, sep->arg[ab_arg], sbl, ab_mask, sep->arg[(ab_arg + 1)]);
if (ab_type == ActionableBots::ABT_None)
return;
@@ -1844,7 +1844,7 @@ void bot_command_update(Client *c, const Seperator *sep)
return;
}
std::list<Bot*> sbl;
std::vector<Bot*> sbl;
MyBots::PopulateSBL_BySpawnedBots(c, sbl);
if (sbl.empty()) {
c->Message(Chat::White, "You currently have no spawned bots");
+2 -2
View File
@@ -466,13 +466,13 @@ void bot_command_cast(Client* c, const Seperator* sep)
class_race_check = true;
}
std::list<Bot*> sbl;
std::vector<Bot*> sbl;
if (ActionableBots::PopulateSBL(c, actionableArg, sbl, ab_mask, !class_race_check ? sep->arg[ab_arg + 1] : nullptr, class_race_check ? atoi(sep->arg[ab_arg + 1]) : 0) == ActionableBots::ABT_None) {
return;
}
sbl.remove(nullptr);
sbl.erase(std::remove(sbl.begin(), sbl.end(), nullptr), sbl.end());
BotSpell botSpell;
botSpell.SpellId = 0;
+2 -2
View File
@@ -39,13 +39,13 @@ void bot_command_click_item(Client* c, const Seperator* sep)
class_race_check = true;
}
std::list<Bot*> sbl;
std::vector<Bot*> sbl;
if (ActionableBots::PopulateSBL(c, sep->arg[ab_arg], sbl, ab_mask, !class_race_check ? sep->arg[ab_arg + 1] : nullptr, class_race_check ? atoi(sep->arg[ab_arg + 1]) : 0) == ActionableBots::ABT_None) {
return;
}
sbl.remove(nullptr);
sbl.erase(std::remove(sbl.begin(), sbl.end(), nullptr), sbl.end());
for (auto my_bot : sbl) {
if (my_bot->BotPassiveCheck()) {
+2 -2
View File
@@ -187,12 +187,12 @@ void bot_command_default_settings(Client* c, const Seperator* sep)
class_race_check = true;
}
std::list<Bot*> sbl;
std::vector<Bot*> sbl;
if (ActionableBots::PopulateSBL(c, sep->arg[ab_arg], sbl, ab_mask, !class_race_check ? sep->arg[ab_arg + 1] : nullptr, class_race_check ? atoi(sep->arg[ab_arg + 1]) : 0) == ActionableBots::ABT_None) {
return;
}
sbl.remove(nullptr);
sbl.erase(std::remove(sbl.begin(), sbl.end(), nullptr), sbl.end());
Bot* first_found = nullptr;
int success_count = 0;
+2 -2
View File
@@ -22,12 +22,12 @@ void bot_command_defensive(Client *c, const Seperator *sep)
class_race_check = true;
}
std::list<Bot*> sbl;
std::vector<Bot*> sbl;
if (ActionableBots::PopulateSBL(c, sep->arg[ab_arg], sbl, ab_mask, !class_race_check ? sep->arg[ab_arg + 1] : nullptr, class_race_check ? atoi(sep->arg[ab_arg + 1]) : 0) == ActionableBots::ABT_None) {
return;
}
sbl.remove(nullptr);
sbl.erase(std::remove(sbl.begin(), sbl.end(), nullptr), sbl.end());
int success_count = 0;
int candidate_count = sbl.size();
+2 -2
View File
@@ -147,13 +147,13 @@ void bot_command_depart(Client* c, const Seperator* sep)
class_race_check = true;
}
std::list<Bot*> sbl;
std::vector<Bot*> sbl;
if (ActionableBots::PopulateSBL(c, actionableArg, sbl, ab_mask, !class_race_check ? sep->arg[ab_arg + 1] : nullptr, class_race_check ? atoi(sep->arg[ab_arg + 1]) : 0) == ActionableBots::ABT_None) {
return;
}
sbl.remove(nullptr);
sbl.erase(std::remove(sbl.begin(), sbl.end(), nullptr), sbl.end());
BotSpell botSpell;
botSpell.SpellId = 0;
+2 -2
View File
@@ -46,12 +46,12 @@ void bot_command_distance_ranged(Client* c, const Seperator* sep)
class_race_check = true;
}
std::list<Bot*> sbl;
std::vector<Bot*> sbl;
if (ActionableBots::PopulateSBL(c, sep->arg[ab_arg], sbl, ab_mask, !class_race_check ? sep->arg[ab_arg + 1] : nullptr, class_race_check ? atoi(sep->arg[ab_arg + 1]) : 0) == ActionableBots::ABT_None) {
return;
}
sbl.remove(nullptr);
sbl.erase(std::remove(sbl.begin(), sbl.end(), nullptr), sbl.end());
Bot* first_found = nullptr;
int success_count = 0;
+2 -2
View File
@@ -117,12 +117,12 @@ void bot_command_follow(Client* c, const Seperator* sep)
class_race_check = true;
}
std::list<Bot*> sbl;
std::vector<Bot*> sbl;
if (ActionableBots::PopulateSBL(c, sep->arg[ab_arg], sbl, ab_mask, !class_race_check ? sep->arg[ab_arg + 1] : nullptr, class_race_check ? atoi(sep->arg[ab_arg + 1]) : 0) == ActionableBots::ABT_None) {
return;
}
sbl.remove(nullptr);
sbl.erase(std::remove(sbl.begin(), sbl.end(), nullptr), sbl.end());
auto botCount = sbl.size();
Mob* follow_mob = nullptr;
+2 -2
View File
@@ -30,12 +30,12 @@ void bot_command_guard(Client *c, const Seperator *sep)
class_race_check = true;
}
std::list<Bot*> sbl;
std::vector<Bot*> sbl;
if (ActionableBots::PopulateSBL(c, sep->arg[ab_arg], sbl, ab_mask, !class_race_check ? sep->arg[name_arg] : nullptr, class_race_check ? atoi(sep->arg[name_arg]) : 0) == ActionableBots::ABT_None) {
return;
}
sbl.remove(nullptr);
sbl.erase(std::remove(sbl.begin(), sbl.end(), nullptr), sbl.end());
for (auto bot_iter : sbl) {
if (clear) {
+20 -20
View File
@@ -63,7 +63,7 @@ void bot_command_heal_rotation_adaptive_targeting(Client* c, const Seperator* se
std::string adaptive_targeting_arg;
std::list<Bot*> sbl;
std::vector<Bot*> sbl;
MyBots::PopulateSBL_ByNamedBot(c, sbl, sep->arg[1]);
if (!sbl.empty()) {
adaptive_targeting_arg = sep->arg[2];
@@ -123,7 +123,7 @@ void bot_command_heal_rotation_add_member(Client* c, const Seperator* sep)
return;
}
std::list<Bot*> sbl;
std::vector<Bot*> sbl;
MyBots::PopulateSBL_ByNamedBot(c, sbl, sep->arg[1]);
if (sbl.empty()) {
c->Message(Chat::White, "You must [name] a new member as a bot that you own to use this command");
@@ -191,7 +191,7 @@ void bot_command_heal_rotation_add_target(Client* c, const Seperator* sep)
return;
}
std::list<Bot*> sbl;
std::vector<Bot*> sbl;
MyBots::PopulateSBL_ByNamedBot(c, sbl, sep->arg[2]);
if (sbl.empty()) {
MyBots::PopulateSBL_ByTargetedBot(c, sbl);
@@ -283,7 +283,7 @@ void bot_command_heal_rotation_adjust_critical(Client* c, const Seperator* sep)
return;
}
std::list<Bot*> sbl;
std::vector<Bot*> sbl;
MyBots::PopulateSBL_ByNamedBot(c, sbl, sep->arg[3]);
if (sbl.empty()) {
MyBots::PopulateSBL_ByTargetedBot(c, sbl);
@@ -383,7 +383,7 @@ void bot_command_heal_rotation_adjust_safe(Client* c, const Seperator* sep)
return;
}
std::list<Bot*> sbl;
std::vector<Bot*> sbl;
MyBots::PopulateSBL_ByNamedBot(c, sbl, sep->arg[3]);
if (sbl.empty()) {
MyBots::PopulateSBL_ByTargetedBot(c, sbl);
@@ -460,7 +460,7 @@ void bot_command_heal_rotation_casting_override(Client* c, const Seperator* sep)
std::string casting_override_arg;
std::list<Bot*> sbl;
std::vector<Bot*> sbl;
MyBots::PopulateSBL_ByNamedBot(c, sbl, sep->arg[1]);
if (!sbl.empty()) {
casting_override_arg = sep->arg[2];
@@ -534,7 +534,7 @@ void bot_command_heal_rotation_change_interval(Client* c, const Seperator* sep)
std::string change_interval_arg;
std::list<Bot*> sbl;
std::vector<Bot*> sbl;
MyBots::PopulateSBL_ByNamedBot(c, sbl, sep->arg[1]);
if (!sbl.empty()) {
change_interval_arg = sep->arg[2];
@@ -603,7 +603,7 @@ void bot_command_heal_rotation_clear_hot(Client* c, const Seperator* sep)
return;
}
std::list<Bot*> sbl;
std::vector<Bot*> sbl;
MyBots::PopulateSBL_ByNamedBot(c, sbl, sep->arg[1]);
if (sbl.empty()) {
MyBots::PopulateSBL_ByTargetedBot(c, sbl);
@@ -649,7 +649,7 @@ void bot_command_heal_rotation_clear_targets(Client* c, const Seperator* sep)
return;
}
std::list<Bot*> sbl;
std::vector<Bot*> sbl;
MyBots::PopulateSBL_ByNamedBot(c, sbl, sep->arg[1]);
if (sbl.empty()) {
MyBots::PopulateSBL_ByTargetedBot(c, sbl);
@@ -703,7 +703,7 @@ void bot_command_heal_rotation_create(Client* c, const Seperator* sep)
std::string adaptive_targeting_arg;
std::string casting_override_arg;
std::list<Bot*> sbl;
std::vector<Bot*> sbl;
MyBots::PopulateSBL_ByNamedBot(c, sbl, sep->arg[1]);
if (!sbl.empty()) {
interval_arg = sep->arg[2];
@@ -858,7 +858,7 @@ void bot_command_heal_rotation_delete(Client* c, const Seperator* sep)
return;
}
std::list<Bot*> sbl;
std::vector<Bot*> sbl;
MyBots::PopulateSBL_ByNamedBot(c, sbl, sep->arg[name_arg]);
if (sbl.empty()) {
MyBots::PopulateSBL_ByTargetedBot(c, sbl);
@@ -896,7 +896,7 @@ void bot_command_heal_rotation_fast_heals(Client* c, const Seperator* sep)
std::string fast_heals_arg;
std::list<Bot*> sbl;
std::vector<Bot*> sbl;
MyBots::PopulateSBL_ByNamedBot(c, sbl, sep->arg[1]);
if (!sbl.empty()) {
fast_heals_arg = sep->arg[2];
@@ -956,7 +956,7 @@ void bot_command_heal_rotation_list(Client* c, const Seperator* sep)
return;
}
std::list<Bot*> sbl;
std::vector<Bot*> sbl;
MyBots::PopulateSBL_ByNamedBot(c, sbl, sep->arg[1]);
if (sbl.empty()) {
MyBots::PopulateSBL_ByTargetedBot(c, sbl);
@@ -1076,7 +1076,7 @@ void bot_command_heal_rotation_remove_member(Client* c, const Seperator* sep)
return;
}
std::list<Bot*> sbl;
std::vector<Bot*> sbl;
MyBots::PopulateSBL_ByNamedBot(c, sbl, sep->arg[1]);
if (sbl.empty()) {
MyBots::PopulateSBL_ByTargetedBot(c, sbl);
@@ -1123,7 +1123,7 @@ void bot_command_heal_rotation_remove_target(Client* c, const Seperator* sep)
return;
}
std::list<Bot*> sbl;
std::vector<Bot*> sbl;
MyBots::PopulateSBL_ByNamedBot(c, sbl, sep->arg[2]);
if (sbl.empty()) {
MyBots::PopulateSBL_ByTargetedBot(c, sbl);
@@ -1181,7 +1181,7 @@ void bot_command_heal_rotation_reset_limits(Client* c, const Seperator* sep)
return;
}
std::list<Bot*> sbl;
std::vector<Bot*> sbl;
MyBots::PopulateSBL_ByNamedBot(c, sbl, sep->arg[1]);
if (sbl.empty()) {
MyBots::PopulateSBL_ByTargetedBot(c, sbl);
@@ -1223,7 +1223,7 @@ void bot_command_heal_rotation_save(Client* c, const Seperator* sep)
return;
}
std::list<Bot*> sbl;
std::vector<Bot*> sbl;
MyBots::PopulateSBL_ByNamedBot(c, sbl, sep->arg[1]);
if (sbl.empty()) {
MyBots::PopulateSBL_ByTargetedBot(c, sbl);
@@ -1272,7 +1272,7 @@ void bot_command_heal_rotation_set_hot(Client* c, const Seperator* sep)
return;
}
std::list<Bot*> sbl;
std::vector<Bot*> sbl;
MyBots::PopulateSBL_ByNamedBot(c, sbl, sep->arg[2]);
if (sbl.empty()) {
MyBots::PopulateSBL_ByTargetedBot(c, sbl);
@@ -1337,7 +1337,7 @@ void bot_command_heal_rotation_start(Client* c, const Seperator* sep)
return;
}
std::list<Bot*> sbl;
std::vector<Bot*> sbl;
MyBots::PopulateSBL_ByNamedBot(c, sbl, sep->arg[1]);
if (sbl.empty()) {
MyBots::PopulateSBL_ByTargetedBot(c, sbl);
@@ -1384,7 +1384,7 @@ void bot_command_heal_rotation_stop(Client* c, const Seperator* sep)
return;
}
std::list<Bot*> sbl;
std::vector<Bot*> sbl;
MyBots::PopulateSBL_ByNamedBot(c, sbl, sep->arg[1]);
if (sbl.empty()) {
MyBots::PopulateSBL_ByTargetedBot(c, sbl);
+2 -2
View File
@@ -30,12 +30,12 @@ void bot_command_hold(Client *c, const Seperator *sep)
class_race_check = true;
}
std::list<Bot*> sbl;
std::vector<Bot*> sbl;
if (ActionableBots::PopulateSBL(c, sep->arg[ab_arg], sbl, ab_mask, !class_race_check ? sep->arg[name_arg] : nullptr, class_race_check ? atoi(sep->arg[name_arg]) : 0) == ActionableBots::ABT_None) {
return;
}
sbl.remove(nullptr);
sbl.erase(std::remove(sbl.begin(), sbl.end(), nullptr), sbl.end());
for (auto bot_iter : sbl) {
if (clear) {
+2 -2
View File
@@ -118,12 +118,12 @@ void bot_command_illusion_block(Client* c, const Seperator* sep)
class_race_check = true;
}
std::list<Bot*> sbl;
std::vector<Bot*> sbl;
if (ActionableBots::PopulateSBL(c, sep->arg[ab_arg], sbl, ab_mask, !class_race_check ? sep->arg[ab_arg + 1] : nullptr, class_race_check ? atoi(sep->arg[ab_arg + 1]) : 0) == ActionableBots::ABT_None) {
return;
}
sbl.remove(nullptr);
sbl.erase(std::remove(sbl.begin(), sbl.end(), nullptr), sbl.end());
Bot* first_found = nullptr;
int success_count = 0;
+4 -4
View File
@@ -34,7 +34,7 @@ void bot_command_inventory_give(Client* c, const Seperator* sep)
int ab_mask = (ActionableBots::ABM_Target | ActionableBots::ABM_ByName);
std::list<Bot*> sbl;
std::vector<Bot*> sbl;
if (ActionableBots::PopulateSBL(c, sep->arg[1], sbl, ab_mask, sep->arg[2]) == ActionableBots::ABT_None) {
return;
}
@@ -67,7 +67,7 @@ void bot_command_inventory_list(Client* c, const Seperator* sep)
int ab_mask = (ActionableBots::ABM_Target | ActionableBots::ABM_ByName);
std::list<Bot*> sbl;
std::vector<Bot*> sbl;
if (ActionableBots::PopulateSBL(c, sep->arg[1], sbl, ab_mask, sep->arg[2]) == ActionableBots::ABT_None) {
return;
}
@@ -168,7 +168,7 @@ void bot_command_inventory_remove(Client* c, const Seperator* sep)
return;
}
std::list<Bot*> sbl;
std::vector<Bot*> sbl;
if (ActionableBots::PopulateSBL(c, sep->arg[2], sbl, ab_mask, sep->arg[3]) == ActionableBots::ABT_None) {
return;
}
@@ -311,7 +311,7 @@ void bot_command_inventory_window(Client* c, const Seperator* sep)
int ab_mask = ActionableBots::ABM_Target;
std::list<Bot*> sbl;
std::vector<Bot*> sbl;
if (ActionableBots::PopulateSBL(c, sep->arg[1], sbl, ab_mask, sep->arg[2]) == ActionableBots::ABT_None) {
return;
}
+2 -2
View File
@@ -136,13 +136,13 @@ void bot_command_item_use(Client* c, const Seperator* sep)
class_race_check = true;
}
std::list<Bot*> sbl;
std::vector<Bot*> sbl;
if (ActionableBots::PopulateSBL(c, actionableArg, sbl, ab_mask, !class_race_check ? sep->arg[ab_arg + 1] : nullptr, class_race_check ? atoi(sep->arg[ab_arg + 1]) : 0) == ActionableBots::ABT_None) {
return;
}
sbl.remove(nullptr);
sbl.erase(std::remove(sbl.begin(), sbl.end(), nullptr), sbl.end());
EQ::SayLinkEngine linker;
linker.SetLinkType(EQ::saylink::SayLinkItemData);
+2 -2
View File
@@ -117,12 +117,12 @@ void bot_command_max_melee_range(Client* c, const Seperator* sep)
class_race_check = true;
}
std::list<Bot*> sbl;
std::vector<Bot*> sbl;
if (ActionableBots::PopulateSBL(c, sep->arg[ab_arg], sbl, ab_mask, !class_race_check ? sep->arg[ab_arg + 1] : nullptr, class_race_check ? atoi(sep->arg[ab_arg + 1]) : 0) == ActionableBots::ABT_None) {
return;
}
sbl.remove(nullptr);
sbl.erase(std::remove(sbl.begin(), sbl.end(), nullptr), sbl.end());
Bot* first_found = nullptr;
int success_count = 0;
+5 -5
View File
@@ -25,7 +25,7 @@ void bot_command_pet_get_lost(Client *c, const Seperator *sep)
}
int ab_mask = ActionableBots::ABM_NoFilter;
std::list<Bot*> sbl;
std::vector<Bot*> sbl;
if (ActionableBots::PopulateSBL(c, sep->arg[1], sbl, ab_mask, sep->arg[2]) == ActionableBots::ABT_None)
return;
@@ -56,7 +56,7 @@ void bot_command_pet_remove(Client *c, const Seperator *sep)
}
int ab_mask = (ActionableBots::ABM_Target | ActionableBots::ABM_ByName);
std::list<Bot*> sbl;
std::vector<Bot*> sbl;
if (ActionableBots::PopulateSBL(c, sep->arg[1], sbl, ab_mask, sep->arg[2]) == ActionableBots::ABT_None)
return;
@@ -66,7 +66,7 @@ void bot_command_pet_remove(Client *c, const Seperator *sep)
c->Message(Chat::White, "You have no spawned bots capable of charming");
return;
}
sbl.remove(nullptr);
sbl.erase(std::remove(sbl.begin(), sbl.end(), nullptr), sbl.end());
int charmed_pet = 0;
int summoned_pet = 0;
@@ -241,13 +241,13 @@ void bot_command_pet_set_type(Client *c, const Seperator *sep)
class_race_check = true;
}
std::list<Bot*> sbl;
std::vector<Bot*> sbl;
if (ActionableBots::PopulateSBL(c, actionableArg, sbl, ab_mask, !class_race_check ? sep->arg[ab_arg + 1] : nullptr, class_race_check ? atoi(sep->arg[ab_arg + 1]) : 0) == ActionableBots::ABT_None) {
return;
}
sbl.remove(nullptr);
sbl.erase(std::remove(sbl.begin(), sbl.end(), nullptr), sbl.end());
std::string currentType;
uint16 reclaim_energy_id = RuleI(Bots, ReclaimEnergySpellID);
+1 -1
View File
@@ -11,7 +11,7 @@ void bot_command_pick_lock(Client *c, const Seperator *sep)
return;
}
std::list<Bot*> sbl;
std::vector<Bot*> sbl;
MyBots::PopulateSBL_BySpawnedBots(c, sbl);
float pick_lock_value = 0.0f;
+1 -1
View File
@@ -15,7 +15,7 @@ void bot_command_pickpocket(Client *c, const Seperator *sep)
return;
}
std::list<Bot *> sbl;
std::vector<Bot*> sbl;
MyBots::PopulateSBL_BySpawnedBots(c, sbl);
// Check for capable rogue
+2 -2
View File
@@ -28,13 +28,13 @@ void bot_command_pull(Client *c, const Seperator *sep)
class_race_check = true;
}
std::list<Bot*> sbl;
std::vector<Bot*> sbl;
if (ActionableBots::PopulateSBL(c, actionableArg, sbl, ab_mask, !class_race_check ? sep->arg[ab_arg + 1] : nullptr, class_race_check ? atoi(sep->arg[ab_arg + 1]) : 0) == ActionableBots::ABT_None) {
return;
}
sbl.remove(nullptr);
sbl.erase(std::remove(sbl.begin(), sbl.end(), nullptr), sbl.end());
auto target_mob = ActionableTarget::VerifyEnemy(c, BCEnum::TT_Single);
if (!target_mob) {
+2 -2
View File
@@ -10,11 +10,11 @@ void bot_command_release(Client *c, const Seperator *sep)
}
const int ab_mask = ActionableBots::ABM_NoFilter;
std::list<Bot*> sbl;
std::vector<Bot*> sbl;
if (ActionableBots::PopulateSBL(c, sep->arg[1], sbl, ab_mask, sep->arg[2]) == ActionableBots::ABT_None)
return;
sbl.remove(nullptr);
sbl.erase(std::remove(sbl.begin(), sbl.end(), nullptr), sbl.end());
for (auto bot_iter : sbl) {
bot_iter->WipeHateList();
bot_iter->SetPauseAI(false);
+2 -2
View File
@@ -117,12 +117,12 @@ void bot_command_sit_hp_percent(Client* c, const Seperator* sep)
class_race_check = true;
}
std::list<Bot*> sbl;
std::vector<Bot*> sbl;
if (ActionableBots::PopulateSBL(c, sep->arg[ab_arg], sbl, ab_mask, !class_race_check ? sep->arg[ab_arg + 1] : nullptr, class_race_check ? atoi(sep->arg[ab_arg + 1]) : 0) == ActionableBots::ABT_None) {
return;
}
sbl.remove(nullptr);
sbl.erase(std::remove(sbl.begin(), sbl.end(), nullptr), sbl.end());
Bot* first_found = nullptr;
int success_count = 0;
+2 -2
View File
@@ -117,12 +117,12 @@ void bot_command_sit_in_combat(Client* c, const Seperator* sep)
class_race_check = true;
}
std::list<Bot*> sbl;
std::vector<Bot*> sbl;
if (ActionableBots::PopulateSBL(c, sep->arg[ab_arg], sbl, ab_mask, !class_race_check ? sep->arg[ab_arg + 1] : nullptr, class_race_check ? atoi(sep->arg[ab_arg + 1]) : 0) == ActionableBots::ABT_None) {
return;
}
sbl.remove(nullptr);
sbl.erase(std::remove(sbl.begin(), sbl.end(), nullptr), sbl.end());
Bot* first_found = nullptr;
int success_count = 0;
+2 -2
View File
@@ -117,12 +117,12 @@ void bot_command_sit_mana_percent(Client* c, const Seperator* sep)
class_race_check = true;
}
std::list<Bot*> sbl;
std::vector<Bot*> sbl;
if (ActionableBots::PopulateSBL(c, sep->arg[ab_arg], sbl, ab_mask, !class_race_check ? sep->arg[ab_arg + 1] : nullptr, class_race_check ? atoi(sep->arg[ab_arg + 1]) : 0) == ActionableBots::ABT_None) {
return;
}
sbl.remove(nullptr);
sbl.erase(std::remove(sbl.begin(), sbl.end(), nullptr), sbl.end());
Bot* first_found = nullptr;
int success_count = 0;
+2 -2
View File
@@ -177,12 +177,12 @@ void bot_command_spell_aggro_checks(Client* c, const Seperator* sep)
class_race_check = true;
}
std::list<Bot*> sbl;
std::vector<Bot*> sbl;
if (ActionableBots::PopulateSBL(c, sep->arg[ab_arg], sbl, ab_mask, !class_race_check ? sep->arg[ab_arg + 1] : nullptr, class_race_check ? atoi(sep->arg[ab_arg + 1]) : 0) == ActionableBots::ABT_None) {
return;
}
sbl.remove(nullptr);
sbl.erase(std::remove(sbl.begin(), sbl.end(), nullptr), sbl.end());
Bot* first_found = nullptr;
int success_count = 0;
+2 -2
View File
@@ -183,12 +183,12 @@ void bot_command_spell_delays(Client* c, const Seperator* sep)
class_race_check = true;
}
std::list<Bot*> sbl;
std::vector<Bot*> sbl;
if (ActionableBots::PopulateSBL(c, sep->arg[ab_arg], sbl, ab_mask, !class_race_check ? sep->arg[ab_arg + 1] : nullptr, class_race_check ? atoi(sep->arg[ab_arg + 1]) : 0) == ActionableBots::ABT_None) {
return;
}
sbl.remove(nullptr);
sbl.erase(std::remove(sbl.begin(), sbl.end(), nullptr), sbl.end());
Bot* first_found = nullptr;
int success_count = 0;
+2 -2
View File
@@ -181,12 +181,12 @@ void bot_command_spell_engaged_priority(Client* c, const Seperator* sep)
class_race_check = true;
}
std::list<Bot*> sbl;
std::vector<Bot*> sbl;
if (ActionableBots::PopulateSBL(c, sep->arg[ab_arg], sbl, ab_mask, !class_race_check ? sep->arg[ab_arg + 1] : nullptr, class_race_check ? atoi(sep->arg[ab_arg + 1]) : 0) == ActionableBots::ABT_None) {
return;
}
sbl.remove(nullptr);
sbl.erase(std::remove(sbl.begin(), sbl.end(), nullptr), sbl.end());
Bot* first_found = nullptr;
int success_count = 0;
+2 -2
View File
@@ -167,12 +167,12 @@ void bot_command_spell_holds(Client* c, const Seperator* sep)
class_race_check = true;
}
std::list<Bot*> sbl;
std::vector<Bot*> sbl;
if (ActionableBots::PopulateSBL(c, sep->arg[ab_arg], sbl, ab_mask, !class_race_check ? sep->arg[ab_arg + 1] : nullptr, class_race_check ? atoi(sep->arg[ab_arg + 1]) : 0) == ActionableBots::ABT_None) {
return;
}
sbl.remove(nullptr);
sbl.erase(std::remove(sbl.begin(), sbl.end(), nullptr), sbl.end());
Bot* first_found = nullptr;
int success_count = 0;
+2 -2
View File
@@ -181,12 +181,12 @@ void bot_command_spell_idle_priority(Client* c, const Seperator* sep)
class_race_check = true;
}
std::list<Bot*> sbl;
std::vector<Bot*> sbl;
if (ActionableBots::PopulateSBL(c, sep->arg[ab_arg], sbl, ab_mask, !class_race_check ? sep->arg[ab_arg + 1] : nullptr, class_race_check ? atoi(sep->arg[ab_arg + 1]) : 0) == ActionableBots::ABT_None) {
return;
}
sbl.remove(nullptr);
sbl.erase(std::remove(sbl.begin(), sbl.end(), nullptr), sbl.end());
Bot* first_found = nullptr;
int success_count = 0;
+2 -2
View File
@@ -177,12 +177,12 @@ void bot_command_spell_max_hp_pct(Client* c, const Seperator* sep)
class_race_check = true;
}
std::list<Bot*> sbl;
std::vector<Bot*> sbl;
if (ActionableBots::PopulateSBL(c, sep->arg[ab_arg], sbl, ab_mask, !class_race_check ? sep->arg[ab_arg + 1] : nullptr, class_race_check ? atoi(sep->arg[ab_arg + 1]) : 0) == ActionableBots::ABT_None) {
return;
}
sbl.remove(nullptr);
sbl.erase(std::remove(sbl.begin(), sbl.end(), nullptr), sbl.end());
Bot* first_found = nullptr;
int success_count = 0;
+2 -2
View File
@@ -177,12 +177,12 @@ void bot_command_spell_max_mana_pct(Client* c, const Seperator* sep)
class_race_check = true;
}
std::list<Bot*> sbl;
std::vector<Bot*> sbl;
if (ActionableBots::PopulateSBL(c, sep->arg[ab_arg], sbl, ab_mask, !class_race_check ? sep->arg[ab_arg + 1] : nullptr, class_race_check ? atoi(sep->arg[ab_arg + 1]) : 0) == ActionableBots::ABT_None) {
return;
}
sbl.remove(nullptr);
sbl.erase(std::remove(sbl.begin(), sbl.end(), nullptr), sbl.end());
Bot* first_found = nullptr;
int success_count = 0;
+2 -2
View File
@@ -183,12 +183,12 @@ void bot_command_spell_max_thresholds(Client* c, const Seperator* sep)
class_race_check = true;
}
std::list<Bot*> sbl;
std::vector<Bot*> sbl;
if (ActionableBots::PopulateSBL(c, sep->arg[ab_arg], sbl, ab_mask, !class_race_check ? sep->arg[ab_arg + 1] : nullptr, class_race_check ? atoi(sep->arg[ab_arg + 1]) : 0) == ActionableBots::ABT_None) {
return;
}
sbl.remove(nullptr);
sbl.erase(std::remove(sbl.begin(), sbl.end(), nullptr), sbl.end());
Bot* first_found = nullptr;
int success_count = 0;
+2 -2
View File
@@ -177,12 +177,12 @@ void bot_command_spell_min_hp_pct(Client* c, const Seperator* sep)
class_race_check = true;
}
std::list<Bot*> sbl;
std::vector<Bot*> sbl;
if (ActionableBots::PopulateSBL(c, sep->arg[ab_arg], sbl, ab_mask, !class_race_check ? sep->arg[ab_arg + 1] : nullptr, class_race_check ? atoi(sep->arg[ab_arg + 1]) : 0) == ActionableBots::ABT_None) {
return;
}
sbl.remove(nullptr);
sbl.erase(std::remove(sbl.begin(), sbl.end(), nullptr), sbl.end());
Bot* first_found = nullptr;
int success_count = 0;
+2 -2
View File
@@ -177,12 +177,12 @@ void bot_command_spell_min_mana_pct(Client* c, const Seperator* sep)
class_race_check = true;
}
std::list<Bot*> sbl;
std::vector<Bot*> sbl;
if (ActionableBots::PopulateSBL(c, sep->arg[ab_arg], sbl, ab_mask, !class_race_check ? sep->arg[ab_arg + 1] : nullptr, class_race_check ? atoi(sep->arg[ab_arg + 1]) : 0) == ActionableBots::ABT_None) {
return;
}
sbl.remove(nullptr);
sbl.erase(std::remove(sbl.begin(), sbl.end(), nullptr), sbl.end());
Bot* first_found = nullptr;
int success_count = 0;
+2 -2
View File
@@ -185,12 +185,12 @@ void bot_command_spell_min_thresholds(Client* c, const Seperator* sep)
class_race_check = true;
}
std::list<Bot*> sbl;
std::vector<Bot*> sbl;
if (ActionableBots::PopulateSBL(c, sep->arg[ab_arg], sbl, ab_mask, !class_race_check ? sep->arg[ab_arg + 1] : nullptr, class_race_check ? atoi(sep->arg[ab_arg + 1]) : 0) == ActionableBots::ABT_None) {
return;
}
sbl.remove(nullptr);
sbl.erase(std::remove(sbl.begin(), sbl.end(), nullptr), sbl.end());
Bot* first_found = nullptr;
int success_count = 0;
+2 -2
View File
@@ -181,12 +181,12 @@ void bot_command_spell_pursue_priority(Client* c, const Seperator* sep)
class_race_check = true;
}
std::list<Bot*> sbl;
std::vector<Bot*> sbl;
if (ActionableBots::PopulateSBL(c, sep->arg[ab_arg], sbl, ab_mask, !class_race_check ? sep->arg[ab_arg + 1] : nullptr, class_race_check ? atoi(sep->arg[ab_arg + 1]) : 0) == ActionableBots::ABT_None) {
return;
}
sbl.remove(nullptr);
sbl.erase(std::remove(sbl.begin(), sbl.end(), nullptr), sbl.end());
Bot* first_found = nullptr;
int success_count = 0;
+2 -2
View File
@@ -177,12 +177,12 @@ void bot_command_spell_target_count(Client* c, const Seperator* sep)
class_race_check = true;
}
std::list<Bot*> sbl;
std::vector<Bot*> sbl;
if (ActionableBots::PopulateSBL(c, sep->arg[ab_arg], sbl, ab_mask, !class_race_check ? sep->arg[ab_arg + 1] : nullptr, class_race_check ? atoi(sep->arg[ab_arg + 1]) : 0) == ActionableBots::ABT_None) {
return;
}
sbl.remove(nullptr);
sbl.erase(std::remove(sbl.begin(), sbl.end(), nullptr), sbl.end());
Bot* first_found = nullptr;
int success_count = 0;
+2 -2
View File
@@ -11,12 +11,12 @@ void bot_command_suspend(Client *c, const Seperator *sep)
}
const int ab_mask = ActionableBots::ABM_NoFilter;
std::list<Bot*> sbl;
std::vector<Bot*> sbl;
if (ActionableBots::PopulateSBL(c, sep->arg[1], sbl, ab_mask, sep->arg[2]) == ActionableBots::ABT_None) {
return;
}
sbl.remove(nullptr);
sbl.erase(std::remove(sbl.begin(), sbl.end(), nullptr), sbl.end());
for (auto bot_iter : sbl) {
bot_iter->SetPauseAI(true);
}
+2 -2
View File
@@ -36,13 +36,13 @@ void bot_command_taunt(Client *c, const Seperator *sep)
class_race_check = true;
}
std::list<Bot*> sbl;
std::vector<Bot*> sbl;
if (ActionableBots::PopulateSBL(c, sep->arg[ab_arg], sbl, ab_mask, !class_race_check ? sep->arg[(ab_arg + 1)] : nullptr, class_race_check ? atoi(sep->arg[(ab_arg + 1)]) : 0) == ActionableBots::ABT_None) {
return;
}
sbl.remove(nullptr);
sbl.erase(std::remove(sbl.begin(), sbl.end(), nullptr), sbl.end());
int taunting_count = 0;
for (auto bot_iter : sbl) {
+2 -2
View File
@@ -95,13 +95,13 @@ void bot_command_timer(Client* c, const Seperator* sep)
class_race_check = true;
}
std::list<Bot*> sbl;
std::vector<Bot*> sbl;
if (ActionableBots::PopulateSBL(c, sep->arg[ab_arg], sbl, ab_mask, !class_race_check ? sep->arg[ab_arg + 1] : nullptr, class_race_check ? atoi(sep->arg[ab_arg + 1]) : 0) == ActionableBots::ABT_None) {
return;
}
sbl.remove(nullptr);
sbl.erase(std::remove(sbl.begin(), sbl.end(), nullptr), sbl.end());
for (auto my_bot : sbl) {
bool found = false;
+1 -1
View File
@@ -13,7 +13,7 @@ void bot_command_track(Client *c, const Seperator *sep)
std::string tracking_scope = sep->arg[1];
std::list<Bot*> sbl;
std::vector<Bot*> sbl;
MyBots::PopulateSBL_BySpawnedBots(c, sbl);
uint16 class_mask = (player_class_bitmasks[Class::Ranger] | player_class_bitmasks[Class::Druid] | player_class_bitmasks[Class::Bard]);