mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-19 12:48:20 +00:00
more command cleanup
This commit is contained in:
@@ -94,7 +94,7 @@ void bot_command_cast(Client* c, const Seperator* sep)
|
||||
popup_text = DialogueWindow::Table(popup_text);
|
||||
|
||||
c->SendPopupToClient(sep->arg[0], popup_text.c_str());
|
||||
SendSpellTypePrompts(c, true);
|
||||
c->SendSpellTypePrompts(true);
|
||||
|
||||
c->Message(
|
||||
Chat::Yellow,
|
||||
|
||||
@@ -97,7 +97,7 @@ void bot_command_copy_settings(Client* c, const Seperator* sep)
|
||||
popup_text = DialogueWindow::Table(popup_text);
|
||||
|
||||
c->SendPopupToClient(sep->arg[0], popup_text.c_str());
|
||||
SendSpellTypePrompts(c);
|
||||
c->SendSpellTypePrompts();
|
||||
|
||||
if (RuleB(Bots, SendClassRaceOnHelp)) {
|
||||
c->Message(
|
||||
|
||||
@@ -91,7 +91,7 @@ void bot_command_default_settings(Client* c, const Seperator* sep)
|
||||
popup_text = DialogueWindow::Table(popup_text);
|
||||
|
||||
c->SendPopupToClient(sep->arg[0], popup_text.c_str());
|
||||
SendSpellTypePrompts(c);
|
||||
c->SendSpellTypePrompts();
|
||||
|
||||
if (RuleB(Bots, SendClassRaceOnHelp)) {
|
||||
c->Message(
|
||||
|
||||
@@ -1,43 +0,0 @@
|
||||
#include "../bot_command.h"
|
||||
|
||||
void bot_command_lull(Client *c, const Seperator *sep)
|
||||
{
|
||||
bcst_list* local_list = &bot_command_spells[BCEnum::SpT_Lull];
|
||||
if (helper_spell_list_fail(c, local_list, BCEnum::SpT_Lull) || helper_command_alias_fail(c, "bot_command_lull", sep->arg[0], "lull"))
|
||||
return;
|
||||
if (helper_is_help_or_usage(sep->arg[1])) {
|
||||
c->Message(Chat::White, "usage: <enemy_target> %s", sep->arg[0]);
|
||||
helper_send_usage_required_bots(c, BCEnum::SpT_Lull);
|
||||
return;
|
||||
}
|
||||
|
||||
ActionableTarget::Types actionable_targets;
|
||||
Bot* my_bot = nullptr;
|
||||
std::list<Bot*> sbl;
|
||||
MyBots::PopulateSBL_BySpawnedBots(c, sbl);
|
||||
|
||||
for (auto list_iter : *local_list) {
|
||||
auto local_entry = list_iter;
|
||||
if (helper_spell_check_fail(local_entry))
|
||||
continue;
|
||||
|
||||
auto target_mob = actionable_targets.Select(c, local_entry->target_type, ENEMY);
|
||||
if (!target_mob)
|
||||
continue;
|
||||
|
||||
//if (spells[local_entry->spell_id].max[EFFECTIDTOINDEX(3)] && spells[local_entry->spell_id].max[EFFECTIDTOINDEX(3)] < target_mob->GetLevel())
|
||||
// continue;
|
||||
|
||||
my_bot = ActionableBots::Select_ByMinLevelAndClass(c, local_entry->target_type, sbl, local_entry->spell_level, local_entry->caster_class, target_mob);
|
||||
if (!my_bot)
|
||||
continue;
|
||||
|
||||
uint32 dont_root_before = 0;
|
||||
if (helper_cast_standard_spell(my_bot, target_mob, local_entry->spell_id, true, &dont_root_before))
|
||||
target_mob->SetDontRootMeBefore(dont_root_before);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
helper_no_available_bots(c, my_bot);
|
||||
}
|
||||
@@ -92,7 +92,7 @@ void bot_command_spell_aggro_checks(Client* c, const Seperator* sep)
|
||||
popup_text = DialogueWindow::Table(popup_text);
|
||||
|
||||
c->SendPopupToClient(sep->arg[0], popup_text.c_str());
|
||||
SendSpellTypePrompts(c);
|
||||
c->SendSpellTypePrompts();
|
||||
|
||||
if (RuleB(Bots, SendClassRaceOnHelp)) {
|
||||
c->Message(
|
||||
|
||||
@@ -98,7 +98,7 @@ void bot_command_spell_delays(Client* c, const Seperator* sep)
|
||||
popup_text = DialogueWindow::Table(popup_text);
|
||||
|
||||
c->SendPopupToClient(sep->arg[0], popup_text.c_str());
|
||||
SendSpellTypePrompts(c);
|
||||
c->SendSpellTypePrompts();
|
||||
|
||||
if (RuleB(Bots, SendClassRaceOnHelp)) {
|
||||
c->Message(
|
||||
|
||||
@@ -96,7 +96,7 @@ void bot_command_spell_engaged_priority(Client* c, const Seperator* sep)
|
||||
popup_text = DialogueWindow::Table(popup_text);
|
||||
|
||||
c->SendPopupToClient(sep->arg[0], popup_text.c_str());
|
||||
SendSpellTypePrompts(c);
|
||||
c->SendSpellTypePrompts();
|
||||
|
||||
if (RuleB(Bots, SendClassRaceOnHelp)) {
|
||||
c->Message(
|
||||
|
||||
@@ -82,7 +82,7 @@ void bot_command_spell_holds(Client* c, const Seperator* sep)
|
||||
popup_text = DialogueWindow::Table(popup_text);
|
||||
|
||||
c->SendPopupToClient(sep->arg[0], popup_text.c_str());
|
||||
SendSpellTypePrompts(c);
|
||||
c->SendSpellTypePrompts();
|
||||
|
||||
if (RuleB(Bots, SendClassRaceOnHelp)) {
|
||||
c->Message(
|
||||
|
||||
@@ -96,7 +96,7 @@ void bot_command_spell_idle_priority(Client* c, const Seperator* sep)
|
||||
popup_text = DialogueWindow::Table(popup_text);
|
||||
|
||||
c->SendPopupToClient(sep->arg[0], popup_text.c_str());
|
||||
SendSpellTypePrompts(c);
|
||||
c->SendSpellTypePrompts();
|
||||
|
||||
if (RuleB(Bots, SendClassRaceOnHelp)) {
|
||||
c->Message(
|
||||
|
||||
@@ -92,7 +92,7 @@ void bot_command_spell_max_hp_pct(Client* c, const Seperator* sep)
|
||||
popup_text = DialogueWindow::Table(popup_text);
|
||||
|
||||
c->SendPopupToClient(sep->arg[0], popup_text.c_str());
|
||||
SendSpellTypePrompts(c);
|
||||
c->SendSpellTypePrompts();
|
||||
|
||||
if (RuleB(Bots, SendClassRaceOnHelp)) {
|
||||
c->Message(
|
||||
|
||||
@@ -92,7 +92,7 @@ void bot_command_spell_max_mana_pct(Client* c, const Seperator* sep)
|
||||
popup_text = DialogueWindow::Table(popup_text);
|
||||
|
||||
c->SendPopupToClient(sep->arg[0], popup_text.c_str());
|
||||
SendSpellTypePrompts(c);
|
||||
c->SendSpellTypePrompts();
|
||||
|
||||
if (RuleB(Bots, SendClassRaceOnHelp)) {
|
||||
c->Message(
|
||||
|
||||
@@ -98,7 +98,7 @@ void bot_command_spell_max_thresholds(Client* c, const Seperator* sep)
|
||||
popup_text = DialogueWindow::Table(popup_text);
|
||||
|
||||
c->SendPopupToClient(sep->arg[0], popup_text.c_str());
|
||||
SendSpellTypePrompts(c);
|
||||
c->SendSpellTypePrompts();
|
||||
|
||||
if (RuleB(Bots, SendClassRaceOnHelp)) {
|
||||
c->Message(
|
||||
|
||||
@@ -92,7 +92,7 @@ void bot_command_spell_min_hp_pct(Client* c, const Seperator* sep)
|
||||
popup_text = DialogueWindow::Table(popup_text);
|
||||
|
||||
c->SendPopupToClient(sep->arg[0], popup_text.c_str());
|
||||
SendSpellTypePrompts(c);
|
||||
c->SendSpellTypePrompts();
|
||||
|
||||
if (RuleB(Bots, SendClassRaceOnHelp)) {
|
||||
c->Message(
|
||||
|
||||
@@ -92,7 +92,7 @@ void bot_command_spell_min_mana_pct(Client* c, const Seperator* sep)
|
||||
popup_text = DialogueWindow::Table(popup_text);
|
||||
|
||||
c->SendPopupToClient(sep->arg[0], popup_text.c_str());
|
||||
SendSpellTypePrompts(c);
|
||||
c->SendSpellTypePrompts();
|
||||
|
||||
if (RuleB(Bots, SendClassRaceOnHelp)) {
|
||||
c->Message(
|
||||
|
||||
@@ -100,7 +100,7 @@ void bot_command_spell_min_thresholds(Client* c, const Seperator* sep)
|
||||
popup_text = DialogueWindow::Table(popup_text);
|
||||
|
||||
c->SendPopupToClient(sep->arg[0], popup_text.c_str());
|
||||
SendSpellTypePrompts(c);
|
||||
c->SendSpellTypePrompts();
|
||||
|
||||
if (RuleB(Bots, SendClassRaceOnHelp)) {
|
||||
c->Message(
|
||||
|
||||
@@ -96,7 +96,7 @@ void bot_command_spell_pursue_priority(Client* c, const Seperator* sep)
|
||||
popup_text = DialogueWindow::Table(popup_text);
|
||||
|
||||
c->SendPopupToClient(sep->arg[0], popup_text.c_str());
|
||||
SendSpellTypePrompts(c);
|
||||
c->SendSpellTypePrompts();
|
||||
|
||||
if (RuleB(Bots, SendClassRaceOnHelp)) {
|
||||
c->Message(
|
||||
|
||||
@@ -92,7 +92,7 @@ void bot_command_spell_target_count(Client* c, const Seperator* sep)
|
||||
popup_text = DialogueWindow::Table(popup_text);
|
||||
|
||||
c->SendPopupToClient(sep->arg[0], popup_text.c_str());
|
||||
SendSpellTypePrompts(c);
|
||||
c->SendSpellTypePrompts();
|
||||
|
||||
if (RuleB(Bots, SendClassRaceOnHelp)) {
|
||||
c->Message(
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
#include "../bot_command.h"
|
||||
|
||||
void bot_command_summon_corpse(Client *c, const Seperator *sep)
|
||||
{
|
||||
// Same methodology as old command..but, does not appear to work... (note: didn't work there, either...)
|
||||
|
||||
// temp
|
||||
c->Message(Chat::White, "This command is currently unavailable...");
|
||||
return;
|
||||
|
||||
bcst_list* local_list = &bot_command_spells[BCEnum::SpT_SummonCorpse];
|
||||
if (helper_spell_list_fail(c, local_list, BCEnum::SpT_SummonCorpse) || helper_command_alias_fail(c, "bot_command_summon_corpse", sep->arg[0], "summoncorpse"))
|
||||
return;
|
||||
if (helper_is_help_or_usage(sep->arg[1])) {
|
||||
c->Message(Chat::White, "usage: <friendly_target> %s", sep->arg[0]);
|
||||
helper_send_usage_required_bots(c, BCEnum::SpT_SummonCorpse);
|
||||
return;
|
||||
}
|
||||
|
||||
Bot* my_bot = nullptr;
|
||||
std::list<Bot*> sbl;
|
||||
MyBots::PopulateSBL_BySpawnedBots(c, sbl);
|
||||
|
||||
bool cast_success = false;
|
||||
for (auto list_iter : *local_list) {
|
||||
auto local_entry = list_iter;
|
||||
if (helper_spell_check_fail(local_entry))
|
||||
continue;
|
||||
|
||||
auto target_mob = ActionableTarget::AsSingle_ByPlayer(c);
|
||||
if (!target_mob)
|
||||
continue;
|
||||
|
||||
if (spells[local_entry->spell_id].base_value[EFFECTIDTOINDEX(1)] < target_mob->GetLevel())
|
||||
continue;
|
||||
|
||||
my_bot = ActionableBots::Select_ByMinLevelAndClass(c, local_entry->target_type, sbl, local_entry->spell_level, local_entry->caster_class, target_mob);
|
||||
if (!my_bot)
|
||||
continue;
|
||||
|
||||
cast_success = helper_cast_standard_spell(my_bot, target_mob, local_entry->spell_id);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
helper_no_available_bots(c, my_bot);
|
||||
}
|
||||
Reference in New Issue
Block a user