mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-20 17:58:20 +00:00
add passive stance checks to commands and loading/saving. shouldn't be `
This commit is contained in:
@@ -130,9 +130,14 @@ void bot_command_behind_mob(Client* c, const Seperator* sep)
|
||||
Bot* first_found = nullptr;
|
||||
int success_count = 0;
|
||||
for (auto my_bot : sbl) {
|
||||
if (my_bot->BotPassiveCheck()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!first_found) {
|
||||
first_found = my_bot;
|
||||
}
|
||||
|
||||
if (current_check) {
|
||||
c->Message(
|
||||
Chat::Green,
|
||||
|
||||
@@ -1440,7 +1440,6 @@ void bot_command_stop_melee_level(Client* c, const Seperator* sep)
|
||||
|
||||
if (helper_is_help_or_usage(sep->arg[1])) {
|
||||
c->Message(Chat::White, "usage: %s [current | reset | sync | value: 0-255] ([actionable: target | byname | ownergroup | ownerraid | targetgroup | namesgroup | mmr | byclass | byrace | spawned] ([actionable_name]))", sep->arg[0]);
|
||||
c->Message(Chat::White, "note: Only caster or hybrid class bots may be modified");
|
||||
c->Message(Chat::White, "note: Use [reset] to set stop melee level to server rule");
|
||||
c->Message(Chat::White, "note: Use [sync] to set stop melee level to current bot level");
|
||||
return;
|
||||
@@ -1508,14 +1507,7 @@ void bot_command_stop_melee_level(Client* c, const Seperator* sep)
|
||||
int success_count = 0;
|
||||
|
||||
for (auto my_bot : sbl) {
|
||||
if (!IsCasterClass(my_bot->GetClass()) && !IsHybridClass(my_bot->GetClass())) {
|
||||
c->Message(
|
||||
Chat::White,
|
||||
fmt::format(
|
||||
"{} says, 'This command only works on caster or hybrid classes.'",
|
||||
my_bot->GetCleanName()
|
||||
).c_str()
|
||||
);
|
||||
if (my_bot->BotPassiveCheck()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -234,7 +234,7 @@ void bot_command_cast(Client* c, const Seperator* sep)
|
||||
NEED TO CHECK: precombat, AE Dispel, AE Lifetap
|
||||
DO I NEED A PBAE CHECK???
|
||||
*/
|
||||
if (bot_iter->GetHoldFlag() || bot_iter->GetAppearance() == eaDead || bot_iter->IsFeared() || bot_iter->IsStunned() || bot_iter->IsMezzed() || bot_iter->DivineAura() || bot_iter->GetHP() < 0) {
|
||||
if (bot_iter->GetBotStance() == Stance::Passive || bot_iter->GetHoldFlag() || bot_iter->GetAppearance() == eaDead || bot_iter->IsFeared() || bot_iter->IsStunned() || bot_iter->IsMezzed() || bot_iter->DivineAura() || bot_iter->GetHP() < 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -40,12 +40,18 @@ void bot_command_click_item(Client* c, const Seperator* sep)
|
||||
}
|
||||
|
||||
std::list<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);
|
||||
|
||||
for (auto my_bot : sbl) {
|
||||
if (my_bot->BotPassiveCheck()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (RuleI(Bots, BotsClickItemsMinLvl) > my_bot->GetLevel()) {
|
||||
c->Message(Chat::White, "%s must be level %i to use clickable items.", my_bot->GetCleanName(), RuleI(Bots, BotsClickItemsMinLvl));
|
||||
continue;
|
||||
|
||||
@@ -57,6 +57,10 @@ void bot_command_distance_ranged(Client* c, const Seperator* sep)
|
||||
int success_count = 0;
|
||||
|
||||
for (auto my_bot : sbl) {
|
||||
if (my_bot->BotPassiveCheck()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!first_found) {
|
||||
first_found = my_bot;
|
||||
}
|
||||
|
||||
@@ -130,9 +130,14 @@ void bot_command_illusion_block(Client* c, const Seperator* sep)
|
||||
Bot* first_found = nullptr;
|
||||
int success_count = 0;
|
||||
for (auto my_bot : sbl) {
|
||||
if (my_bot->BotPassiveCheck()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!first_found) {
|
||||
first_found = my_bot;
|
||||
}
|
||||
|
||||
if (current_check) {
|
||||
c->Message(
|
||||
Chat::Green,
|
||||
|
||||
@@ -129,9 +129,14 @@ void bot_command_max_melee_range(Client* c, const Seperator* sep)
|
||||
Bot* first_found = nullptr;
|
||||
int success_count = 0;
|
||||
for (auto my_bot : sbl) {
|
||||
if (my_bot->BotPassiveCheck()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!first_found) {
|
||||
first_found = my_bot;
|
||||
}
|
||||
|
||||
if (current_check) {
|
||||
c->Message(
|
||||
Chat::Green,
|
||||
|
||||
@@ -129,9 +129,14 @@ void bot_command_sit_hp_percent(Client* c, const Seperator* sep)
|
||||
Bot* first_found = nullptr;
|
||||
int success_count = 0;
|
||||
for (auto my_bot : sbl) {
|
||||
if (my_bot->BotPassiveCheck()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!first_found) {
|
||||
first_found = my_bot;
|
||||
}
|
||||
|
||||
if (current_check) {
|
||||
c->Message(
|
||||
Chat::Green,
|
||||
|
||||
@@ -129,9 +129,14 @@ void bot_command_sit_in_combat(Client* c, const Seperator* sep)
|
||||
Bot* first_found = nullptr;
|
||||
int success_count = 0;
|
||||
for (auto my_bot : sbl) {
|
||||
if (my_bot->BotPassiveCheck()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!first_found) {
|
||||
first_found = my_bot;
|
||||
}
|
||||
|
||||
if (current_check) {
|
||||
c->Message(
|
||||
Chat::Green,
|
||||
|
||||
@@ -129,9 +129,14 @@ void bot_command_sit_mana_percent(Client* c, const Seperator* sep)
|
||||
Bot* first_found = nullptr;
|
||||
int success_count = 0;
|
||||
for (auto my_bot : sbl) {
|
||||
if (my_bot->BotPassiveCheck()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!first_found) {
|
||||
first_found = my_bot;
|
||||
}
|
||||
|
||||
if (current_check) {
|
||||
c->Message(
|
||||
Chat::Green,
|
||||
|
||||
@@ -190,9 +190,14 @@ void bot_command_spell_aggro_checks(Client* c, const Seperator* sep)
|
||||
Bot* first_found = nullptr;
|
||||
int success_count = 0;
|
||||
for (auto my_bot : sbl) {
|
||||
if (my_bot->BotPassiveCheck()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!first_found) {
|
||||
first_found = my_bot;
|
||||
}
|
||||
|
||||
if (current_check) {
|
||||
c->Message(
|
||||
Chat::Green,
|
||||
|
||||
@@ -196,9 +196,14 @@ void bot_command_spell_delays(Client* c, const Seperator* sep)
|
||||
Bot* first_found = nullptr;
|
||||
int success_count = 0;
|
||||
for (auto my_bot : sbl) {
|
||||
if (my_bot->BotPassiveCheck()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!first_found) {
|
||||
first_found = my_bot;
|
||||
}
|
||||
|
||||
if (current_check) {
|
||||
c->Message(
|
||||
Chat::Green,
|
||||
|
||||
@@ -194,9 +194,14 @@ void bot_command_spell_engaged_priority(Client* c, const Seperator* sep)
|
||||
Bot* first_found = nullptr;
|
||||
int success_count = 0;
|
||||
for (auto my_bot : sbl) {
|
||||
if (my_bot->BotPassiveCheck()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!first_found) {
|
||||
first_found = my_bot;
|
||||
}
|
||||
|
||||
if (current_check) {
|
||||
c->Message(
|
||||
Chat::Green,
|
||||
|
||||
@@ -194,9 +194,14 @@ void bot_command_spell_idle_priority(Client* c, const Seperator* sep)
|
||||
Bot* first_found = nullptr;
|
||||
int success_count = 0;
|
||||
for (auto my_bot : sbl) {
|
||||
if (my_bot->BotPassiveCheck()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!first_found) {
|
||||
first_found = my_bot;
|
||||
}
|
||||
|
||||
if (current_check) {
|
||||
c->Message(
|
||||
Chat::Green,
|
||||
|
||||
@@ -190,9 +190,14 @@ void bot_command_spell_max_hp_pct(Client* c, const Seperator* sep)
|
||||
Bot* first_found = nullptr;
|
||||
int success_count = 0;
|
||||
for (auto my_bot : sbl) {
|
||||
if (my_bot->BotPassiveCheck()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!first_found) {
|
||||
first_found = my_bot;
|
||||
}
|
||||
|
||||
if (current_check) {
|
||||
c->Message(
|
||||
Chat::Green,
|
||||
|
||||
@@ -190,9 +190,14 @@ void bot_command_spell_max_mana_pct(Client* c, const Seperator* sep)
|
||||
Bot* first_found = nullptr;
|
||||
int success_count = 0;
|
||||
for (auto my_bot : sbl) {
|
||||
if (my_bot->BotPassiveCheck()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!first_found) {
|
||||
first_found = my_bot;
|
||||
}
|
||||
|
||||
if (current_check) {
|
||||
c->Message(
|
||||
Chat::Green,
|
||||
|
||||
@@ -196,9 +196,14 @@ void bot_command_spell_max_thresholds(Client* c, const Seperator* sep)
|
||||
Bot* first_found = nullptr;
|
||||
int success_count = 0;
|
||||
for (auto my_bot : sbl) {
|
||||
if (my_bot->BotPassiveCheck()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!first_found) {
|
||||
first_found = my_bot;
|
||||
}
|
||||
|
||||
if (current_check) {
|
||||
c->Message(
|
||||
Chat::Green,
|
||||
|
||||
@@ -190,9 +190,14 @@ void bot_command_spell_min_hp_pct(Client* c, const Seperator* sep)
|
||||
Bot* first_found = nullptr;
|
||||
int success_count = 0;
|
||||
for (auto my_bot : sbl) {
|
||||
if (my_bot->BotPassiveCheck()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!first_found) {
|
||||
first_found = my_bot;
|
||||
}
|
||||
|
||||
if (current_check) {
|
||||
c->Message(
|
||||
Chat::Green,
|
||||
|
||||
@@ -190,9 +190,14 @@ void bot_command_spell_min_mana_pct(Client* c, const Seperator* sep)
|
||||
Bot* first_found = nullptr;
|
||||
int success_count = 0;
|
||||
for (auto my_bot : sbl) {
|
||||
if (my_bot->BotPassiveCheck()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!first_found) {
|
||||
first_found = my_bot;
|
||||
}
|
||||
|
||||
if (current_check) {
|
||||
c->Message(
|
||||
Chat::Green,
|
||||
|
||||
@@ -198,9 +198,14 @@ void bot_command_spell_min_thresholds(Client* c, const Seperator* sep)
|
||||
Bot* first_found = nullptr;
|
||||
int success_count = 0;
|
||||
for (auto my_bot : sbl) {
|
||||
if (my_bot->BotPassiveCheck()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!first_found) {
|
||||
first_found = my_bot;
|
||||
}
|
||||
|
||||
if (current_check) {
|
||||
c->Message(
|
||||
Chat::Green,
|
||||
|
||||
@@ -194,9 +194,14 @@ void bot_command_spell_pursue_priority(Client* c, const Seperator* sep)
|
||||
Bot* first_found = nullptr;
|
||||
int success_count = 0;
|
||||
for (auto my_bot : sbl) {
|
||||
if (my_bot->BotPassiveCheck()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!first_found) {
|
||||
first_found = my_bot;
|
||||
}
|
||||
|
||||
if (current_check) {
|
||||
c->Message(
|
||||
Chat::Green,
|
||||
|
||||
@@ -190,9 +190,14 @@ void bot_command_spell_target_count(Client* c, const Seperator* sep)
|
||||
Bot* first_found = nullptr;
|
||||
int success_count = 0;
|
||||
for (auto my_bot : sbl) {
|
||||
if (my_bot->BotPassiveCheck()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!first_found) {
|
||||
first_found = my_bot;
|
||||
}
|
||||
|
||||
if (current_check) {
|
||||
c->Message(
|
||||
Chat::Green,
|
||||
|
||||
Reference in New Issue
Block a user