mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-21 06:28:22 +00:00
Give ^copysettings/^defaultsettings more options, cleanup.
This commit is contained in:
@@ -31,7 +31,6 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
TODO bot rewrite:
|
TODO bot rewrite:
|
||||||
--implement spell type option to ^defaultsettings like ^copysettings, cleanup and add all options.
|
|
||||||
--command cleanup remaining commands (move to new help window, make more descriptive)
|
--command cleanup remaining commands (move to new help window, make more descriptive)
|
||||||
--Add quest methods for functions
|
--Add quest methods for functions
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -39,20 +39,32 @@ void bot_command_copy_settings(Client* c, const Seperator* sep)
|
|||||||
c->GetSpellTypeShortNameByID(BotSpellTypes::Nuke)
|
c->GetSpellTypeShortNameByID(BotSpellTypes::Nuke)
|
||||||
),
|
),
|
||||||
};
|
};
|
||||||
|
p.examples_three =
|
||||||
|
{
|
||||||
|
"To copy only spellsettings from BotA to BotB:",
|
||||||
|
fmt::format(
|
||||||
|
"{} BotA BotB spellsettings",
|
||||||
|
sep->arg[0]
|
||||||
|
),
|
||||||
|
fmt::format(
|
||||||
|
"{} BotA BotB spellsettings",
|
||||||
|
sep->arg[0]
|
||||||
|
),
|
||||||
|
};
|
||||||
p.actionables = { "target, byname, ownergroup, ownerraid, targetgroup, namesgroup, healrotationtargets, mmr, byclass, byrace, spawned" };
|
p.actionables = { "target, byname, ownergroup, ownerraid, targetgroup, namesgroup, healrotationtargets, mmr, byclass, byrace, spawned" };
|
||||||
p.options = { "[all], [misc], [spellsettings], [spelltypesettings], [spellholds], [spelldelays], [spellminthresholds], [spellmaxthresholds], [spellminmanapct], [spellmaxmanapct], [spellminhppct], [spellmaxhppct], [spellidlepriority], [spellengagedpriority], [spellpursuepriority], [spellaggrochecks], [spelltargetcounts], [sithppercent], [sitmanapercent], [blockedbuffs], [blockedpetbuffs]" };
|
p.options = { "all, misc, spellsettings, spelltypesettings, holds, delays, minthresholds, maxthresholds, minmanapct, maxmanapct, minhppct, maxhppct, idlepriority, engagedpriority, pursuepriority, aggrochecks, targetcounts, blockedbuffs, blockedpetbuffs" };
|
||||||
std::vector<std::string> options_one =
|
p.options_one =
|
||||||
{
|
{
|
||||||
"[spellsettings] will copy ^spellsettings options",
|
"[spellsettings] will copy ^spellsettings options",
|
||||||
"[spelltypesettings] copies all spell type settings",
|
"[spelltypesettings] copies all spell type settings",
|
||||||
"[all] copies all settings"
|
"[all] copies all settings"
|
||||||
};
|
};
|
||||||
std::vector<std::string> options_two =
|
p.options_two =
|
||||||
{
|
{
|
||||||
"[misc] copies all miscellaneous options such as:",
|
"[misc] copies all miscellaneous options such as:",
|
||||||
"- ^showhelm, ^followd, ^stopmeleelevel, ^enforcespellsettings, ^bottoggleranged, ^petsettype, ^behindmob, ^distanceranged, ^illusionblock, ^sitincombat, ^sithppercent, ^sitmanapercent, ^blockedbuffs, ^blockedpetbuffs"
|
"- ^showhelm, ^followd, ^stopmeleelevel, ^enforcespellsettings, ^bottoggleranged, ^petsettype, ^behindmob, ^distanceranged, ^illusionblock, ^sitincombat, ^sithppercent, ^sitmanapercent, ^blockedbuffs, ^blockedpetbuffs"
|
||||||
};
|
};
|
||||||
std::vector<std::string> options_three = { "The remaining options copy that specific type" };
|
p.options_three = { "The remaining options copy that specific type" };
|
||||||
|
|
||||||
std::string popup_text = c->SendBotCommandHelpWindow(p);
|
std::string popup_text = c->SendBotCommandHelpWindow(p);
|
||||||
popup_text = DialogueWindow::Table(popup_text);
|
popup_text = DialogueWindow::Table(popup_text);
|
||||||
@@ -73,8 +85,8 @@ void bot_command_copy_settings(Client* c, const Seperator* sep)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string arg1 = sep->arg[1];
|
int spell_type_arg_int = 4;
|
||||||
|
std::string spell_type_arg = sep->arg[spell_type_arg_int];
|
||||||
int ab_arg = 2;
|
int ab_arg = 2;
|
||||||
bool valid_option = false;
|
bool valid_option = false;
|
||||||
uint16 spell_type = UINT16_MAX;
|
uint16 spell_type = UINT16_MAX;
|
||||||
@@ -102,15 +114,40 @@ void bot_command_copy_settings(Client* c, const Seperator* sep)
|
|||||||
"blockedpetbuffs"
|
"blockedpetbuffs"
|
||||||
};
|
};
|
||||||
|
|
||||||
if (sep->IsNumber(4)) {
|
if (sep->IsNumber(spell_type_arg_int)) {
|
||||||
spell_type = atoi(sep->arg[4]);
|
spell_type = atoi(sep->arg[spell_type_arg_int]);
|
||||||
}
|
|
||||||
else {
|
|
||||||
spell_type = c->GetSpellTypeIDByShortName(sep->arg[4]);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (spell_type < BotSpellTypes::START || spell_type > BotSpellTypes::END) {
|
if (!c->IsValidSpellType(spell_type)) {
|
||||||
spell_type = UINT16_MAX;
|
c->Message(
|
||||||
|
Chat::Yellow,
|
||||||
|
fmt::format(
|
||||||
|
"You must choose a valid spell type. Use {} for information regarding this command.",
|
||||||
|
Saylink::Silent(
|
||||||
|
fmt::format("{} help", sep->arg[0])
|
||||||
|
)
|
||||||
|
).c_str()
|
||||||
|
);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (!spell_type_arg.empty()) {
|
||||||
|
if (c->GetSpellTypeIDByShortName(spell_type_arg) != UINT16_MAX) {
|
||||||
|
spell_type = c->GetSpellTypeIDByShortName(spell_type_arg);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
c->Message(
|
||||||
|
Chat::Yellow,
|
||||||
|
fmt::format(
|
||||||
|
"You must choose a valid spell type. Use {} for information regarding this command.",
|
||||||
|
Saylink::Silent(
|
||||||
|
fmt::format("{} help", sep->arg[0])
|
||||||
|
)
|
||||||
|
).c_str()
|
||||||
|
);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < options.size(); i++) {
|
for (int i = 0; i < options.size(); i++) {
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ void bot_command_default_settings(Client* c, const Seperator* sep)
|
|||||||
)
|
)
|
||||||
};
|
};
|
||||||
p.actionables = { "target, byname, ownergroup, ownerraid, targetgroup, namesgroup, healrotationtargets, mmr, byclass, byrace, spawned" };
|
p.actionables = { "target, byname, ownergroup, ownerraid, targetgroup, namesgroup, healrotationtargets, mmr, byclass, byrace, spawned" };
|
||||||
p.options = { "all, misc, spellsettings, spelltypesettings, holds, delays, minthresholds, maxthresholds minmanapct, maxmanapct, minhppct, maxhppct, idlepriority, engagedpriority, pursuepriority, aggrocheck, targetcounts" };
|
p.options = { "all, misc, spellsettings, spelltypesettings, spellholds, spelldelays, spellminthresholds, spellmaxthresholds, spellminmanapct, spellmaxmanapct, spellminhppct, spellmaxhppct, spellidlepriority, spellengagedpriority, spellpursuepriority, spellaggrocheck, spelltargetcounts" };
|
||||||
p.options_one =
|
p.options_one =
|
||||||
{
|
{
|
||||||
"[spellsettings] will restore ^spellsettings options",
|
"[spellsettings] will restore ^spellsettings options",
|
||||||
@@ -48,12 +48,13 @@ void bot_command_default_settings(Client* c, const Seperator* sep)
|
|||||||
p.options_two =
|
p.options_two =
|
||||||
{
|
{
|
||||||
"[misc] restores all miscellaneous options such as:",
|
"[misc] restores all miscellaneous options such as:",
|
||||||
"- ^showhelm, ^followd, ^stopmeleelevel",
|
"- ^showhelm, ^followd, ^stopmeleelevel, ^enforcespellsettings, ^bottoggleranged, ^petsettype, ^behindmob, ^distanceranged, ^illusionblock, ^sitincombat, ^sithppercent and ^sitmanapercent",
|
||||||
"- ^enforcespellsettings, ^bottoggleranged, ^petsettype",
|
};
|
||||||
"- ^behindmob, ^distanceranged, ^illusionblock",
|
p.options_three =
|
||||||
"- ^sitincombat, ^sithppercent and ^sitmanapercent",
|
{
|
||||||
|
"<br>",
|
||||||
|
"**The remaining options restore that specific type**"
|
||||||
};
|
};
|
||||||
p.options_three = { "The remaining options restore that specific type" };
|
|
||||||
|
|
||||||
std::string popup_text = c->SendBotCommandHelpWindow(p);
|
std::string popup_text = c->SendBotCommandHelpWindow(p);
|
||||||
popup_text = DialogueWindow::Table(popup_text);
|
popup_text = DialogueWindow::Table(popup_text);
|
||||||
@@ -74,62 +75,77 @@ void bot_command_default_settings(Client* c, const Seperator* sep)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string arg1 = sep->arg[1];
|
int spell_type_arg_int = 2;
|
||||||
|
std::string spell_type_arg = sep->arg[spell_type_arg_int];
|
||||||
int ab_arg = 2;
|
int ab_arg = 2;
|
||||||
bool valid_option = false;
|
bool valid_option = false;
|
||||||
uint16 spell_type = UINT16_MAX;
|
uint16 spell_type = UINT16_MAX;
|
||||||
|
uint16 setting_type = UINT16_MAX;
|
||||||
std::vector<std::string> options =
|
std::vector<std::string> options =
|
||||||
{
|
{
|
||||||
"all",
|
"all",
|
||||||
"misc"
|
"misc",
|
||||||
"spellsettings",
|
"spellsettings",
|
||||||
"spelltypesettings",
|
"spelltypesettings",
|
||||||
"holds",
|
"spellholds",
|
||||||
"delays",
|
"spelldelays",
|
||||||
"minthresholds",
|
"spellminthresholds",
|
||||||
"maxthresholds",
|
"spellmaxthresholds",
|
||||||
"aggrocheck",
|
"spellminmanapct",
|
||||||
"minmanapct",
|
"spellmaxmanapct",
|
||||||
"maxmanapct",
|
"spellminhppct",
|
||||||
"minhppct",
|
"spellmaxhppct",
|
||||||
"maxhppct",
|
"spellidlepriority",
|
||||||
"idlepriority",
|
"spellengagedpriority",
|
||||||
"engagedpriority",
|
"spellpursuepriority",
|
||||||
"pursuepriority",
|
"spellaggrochecks",
|
||||||
"targetcounts"
|
"spelltargetcounts"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (sep->IsNumber(spell_type_arg_int)) {
|
||||||
|
spell_type = atoi(sep->arg[spell_type_arg_int]);
|
||||||
|
|
||||||
|
if (!EQ::ValueWithin(spell_type, BotSpellTypes::START, BotSpellTypes::END)) {
|
||||||
|
c->Message(
|
||||||
|
Chat::Yellow,
|
||||||
|
fmt::format(
|
||||||
|
"You must choose a valid spell type. Use {} for information regarding this command.",
|
||||||
|
Saylink::Silent(
|
||||||
|
fmt::format("{} help", sep->arg[0])
|
||||||
|
)
|
||||||
|
).c_str()
|
||||||
|
);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
++ab_arg;
|
||||||
|
}
|
||||||
|
else if (!spell_type_arg.empty()) {
|
||||||
|
if (c->GetSpellTypeIDByShortName(spell_type_arg) != UINT16_MAX) {
|
||||||
|
spell_type = c->GetSpellTypeIDByShortName(spell_type_arg);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
c->Message(
|
||||||
|
Chat::Yellow,
|
||||||
|
fmt::format(
|
||||||
|
"You must choose a valid spell type. Use {} for information regarding this command.",
|
||||||
|
Saylink::Silent(
|
||||||
|
fmt::format("{} help", sep->arg[0])
|
||||||
|
)
|
||||||
|
).c_str()
|
||||||
|
);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
++ab_arg;
|
||||||
|
}
|
||||||
|
|
||||||
for (int i = 0; i < options.size(); i++) {
|
for (int i = 0; i < options.size(); i++) {
|
||||||
if (sep->arg[1] == options[i]) {
|
if (sep->arg[1] == options[i]) {
|
||||||
if (options[i] != "all" && options[i] != "misc" && options[i] != "spellsettings") {
|
setting_type = c->GetBotSpellCategoryIDByShortName(sep->arg[1]);
|
||||||
|
|
||||||
if (sep->IsNumber(2) || c->GetSpellTypeIDByShortName(sep->arg[2]) != UINT16_MAX) {
|
|
||||||
if (sep->IsNumber(2)) {
|
|
||||||
spell_type = atoi(sep->arg[2]);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (c->GetSpellTypeIDByShortName(sep->arg[2]) != UINT16_MAX) {
|
|
||||||
spell_type = c->GetSpellTypeIDByShortName(sep->arg[2]);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (spell_type < BotSpellTypes::START || spell_type > BotSpellTypes::END) {
|
|
||||||
c->Message(Chat::Yellow, "You must choose a valid spell type. Spell types range from %i to %i", BotSpellTypes::START, BotSpellTypes::END);
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
++ab_arg;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (
|
|
||||||
(options[i] == "all" || options[i] == "misc" || options[i] == "spellsettings") &&
|
|
||||||
((sep->IsNumber(2) || c->GetSpellTypeIDByShortName(sep->arg[2]) != UINT16_MAX))
|
|
||||||
) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
valid_option = true;
|
valid_option = true;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -151,11 +167,13 @@ void bot_command_default_settings(Client* c, const Seperator* sep)
|
|||||||
const int ab_mask = ActionableBots::ABM_Type1;
|
const int ab_mask = ActionableBots::ABM_Type1;
|
||||||
std::string class_race_arg = sep->arg[ab_arg];
|
std::string class_race_arg = sep->arg[ab_arg];
|
||||||
bool class_race_check = false;
|
bool class_race_check = false;
|
||||||
|
|
||||||
if (!class_race_arg.compare("byclass") || !class_race_arg.compare("byrace")) {
|
if (!class_race_arg.compare("byclass") || !class_race_arg.compare("byrace")) {
|
||||||
class_race_check = true;
|
class_race_check = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<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) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
@@ -174,12 +192,92 @@ void bot_command_default_settings(Client* c, const Seperator* sep)
|
|||||||
|
|
||||||
bot_stance = my_bot->GetBotStance();
|
bot_stance = my_bot->GetBotStance();
|
||||||
|
|
||||||
if (!strcasecmp(sep->arg[1], "misc")) {
|
if (setting_type != UINT16_MAX) {
|
||||||
|
if (spell_type != UINT16_MAX) {
|
||||||
|
my_bot->SetBotSetting(setting_type, spell_type, my_bot->GetDefaultSetting(setting_type, spell_type, bot_stance));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
for (uint16 i = BotSpellTypes::START; i <= BotSpellTypes::END; ++i) {
|
||||||
|
my_bot->SetBotSetting(setting_type, i, my_bot->GetDefaultSetting(setting_type, i, bot_stance));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
output = (spell_type != UINT16_MAX ? c->GetSpellTypeNameByID(spell_type) : "");
|
||||||
|
output += sep->arg[3];
|
||||||
|
}
|
||||||
|
else if (!strcasecmp(sep->arg[1], "misc")) {
|
||||||
for (uint16 i = BotBaseSettings::START; i <= BotBaseSettings::END; ++i) {
|
for (uint16 i = BotBaseSettings::START; i <= BotBaseSettings::END; ++i) {
|
||||||
my_bot->SetBotBaseSetting(i, my_bot->GetDefaultBotBaseSetting(i, bot_stance));
|
my_bot->SetBotBaseSetting(i, my_bot->GetDefaultBotBaseSetting(i, bot_stance));
|
||||||
output = "miscellanous settings";
|
output = "miscellanous settings";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (!strcasecmp(sep->arg[1], "spellsettings")) {
|
||||||
|
my_bot->ResetBotSpellSettings();
|
||||||
|
output = "^spellsettings";
|
||||||
|
}
|
||||||
|
else if (!strcasecmp(sep->arg[1], "spelltypesettings")) {
|
||||||
|
if (spell_type != UINT16_MAX) {
|
||||||
|
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));
|
||||||
|
my_bot->SetSpellTypeAggroCheck(spell_type, my_bot->GetDefaultSpellTypeAggroCheck(spell_type, bot_stance));
|
||||||
|
my_bot->SetSpellTypeMinManaLimit(spell_type, my_bot->GetDefaultSpellTypeMinManaLimit(spell_type, bot_stance));
|
||||||
|
my_bot->SetSpellTypeMaxManaLimit(spell_type, my_bot->GetDefaultSpellTypeMaxManaLimit(spell_type, bot_stance));
|
||||||
|
my_bot->SetSpellTypeMinHPLimit(spell_type, my_bot->GetDefaultSpellTypeMinHPLimit(spell_type, bot_stance));
|
||||||
|
my_bot->SetSpellTypeMaxHPLimit(spell_type, my_bot->GetDefaultSpellTypeMaxHPLimit(spell_type, bot_stance));
|
||||||
|
my_bot->SetSpellTypePriority(spell_type, BotPriorityCategories::Idle, my_bot->GetDefaultSpellTypePriority(spell_type, BotPriorityCategories::Idle, my_bot->GetClass(), bot_stance));
|
||||||
|
my_bot->SetSpellTypePriority(spell_type, BotPriorityCategories::Engaged, my_bot->GetDefaultSpellTypePriority(spell_type, BotPriorityCategories::Engaged, my_bot->GetClass(), bot_stance));
|
||||||
|
my_bot->SetSpellTypePriority(spell_type, BotPriorityCategories::Pursue, my_bot->GetDefaultSpellTypePriority(spell_type, BotPriorityCategories::Pursue, my_bot->GetClass(), bot_stance));
|
||||||
|
my_bot->SetSpellTypeAEOrGroupTargetCount(spell_type, my_bot->GetDefaultSpellTypeAEOrGroupTargetCount(spell_type, bot_stance));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
for (uint16 i = BotSpellTypes::START; i <= BotSpellTypes::END; ++i) {
|
||||||
|
my_bot->SetSpellHold(i, my_bot->GetDefaultSpellHold(i, bot_stance));
|
||||||
|
my_bot->SetSpellDelay(i, my_bot->GetDefaultSpellDelay(i, bot_stance));
|
||||||
|
my_bot->SetSpellMinThreshold(i, my_bot->GetDefaultSpellMinThreshold(i, bot_stance));
|
||||||
|
my_bot->SetSpellMaxThreshold(i, my_bot->GetDefaultSpellMaxThreshold(i, bot_stance));
|
||||||
|
my_bot->SetSpellTypeAggroCheck(i, my_bot->GetDefaultSpellTypeAggroCheck(i, bot_stance));
|
||||||
|
my_bot->SetSpellTypeMinManaLimit(i, my_bot->GetDefaultSpellTypeMinManaLimit(i, bot_stance));
|
||||||
|
my_bot->SetSpellTypeMaxManaLimit(i, my_bot->GetDefaultSpellTypeMaxManaLimit(i, bot_stance));
|
||||||
|
my_bot->SetSpellTypeMinHPLimit(i, my_bot->GetDefaultSpellTypeMinHPLimit(i, bot_stance));
|
||||||
|
my_bot->SetSpellTypeMaxHPLimit(i, my_bot->GetDefaultSpellTypeMaxHPLimit(i, bot_stance));
|
||||||
|
my_bot->SetSpellTypePriority(i, BotPriorityCategories::Idle, my_bot->GetDefaultSpellTypePriority(i, BotPriorityCategories::Idle, my_bot->GetClass(), bot_stance));
|
||||||
|
my_bot->SetSpellTypePriority(i, BotPriorityCategories::Engaged, my_bot->GetDefaultSpellTypePriority(i, BotPriorityCategories::Engaged, my_bot->GetClass(), bot_stance));
|
||||||
|
my_bot->SetSpellTypePriority(i, BotPriorityCategories::Pursue, my_bot->GetDefaultSpellTypePriority(i, BotPriorityCategories::Pursue, my_bot->GetClass(), bot_stance));
|
||||||
|
my_bot->SetSpellTypeAEOrGroupTargetCount(i, my_bot->GetDefaultSpellTypeAEOrGroupTargetCount(i, bot_stance));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
output = "spell type settings";
|
||||||
|
}
|
||||||
|
else if (!strcasecmp(sep->arg[1], "all")) {
|
||||||
|
for (uint16 i = BotBaseSettings::START; i <= BotBaseSettings::END; ++i) {
|
||||||
|
my_bot->SetBotBaseSetting(i, my_bot->GetDefaultBotBaseSetting(i, bot_stance));
|
||||||
|
}
|
||||||
|
|
||||||
|
for (uint16 i = BotSpellTypes::START; i <= BotSpellTypes::END; ++i) {
|
||||||
|
my_bot->SetSpellHold(i, my_bot->GetDefaultSpellHold(i, bot_stance));
|
||||||
|
my_bot->SetSpellDelay(i, my_bot->GetDefaultSpellDelay(i, bot_stance));
|
||||||
|
my_bot->SetSpellMinThreshold(i, my_bot->GetDefaultSpellMinThreshold(i, bot_stance));
|
||||||
|
my_bot->SetSpellMaxThreshold(i, my_bot->GetDefaultSpellMaxThreshold(i, bot_stance));
|
||||||
|
my_bot->SetSpellTypeAggroCheck(i, my_bot->GetDefaultSpellTypeAggroCheck(i, bot_stance));
|
||||||
|
my_bot->SetSpellTypeMinManaLimit(i, my_bot->GetDefaultSpellTypeMinManaLimit(i, bot_stance));
|
||||||
|
my_bot->SetSpellTypeMaxManaLimit(i, my_bot->GetDefaultSpellTypeMaxManaLimit(i, bot_stance));
|
||||||
|
my_bot->SetSpellTypeMinHPLimit(i, my_bot->GetDefaultSpellTypeMinHPLimit(i, bot_stance));
|
||||||
|
my_bot->SetSpellTypeMaxHPLimit(i, my_bot->GetDefaultSpellTypeMaxHPLimit(i, bot_stance));
|
||||||
|
my_bot->SetSpellTypePriority(i, BotPriorityCategories::Idle, my_bot->GetDefaultSpellTypePriority(i, BotPriorityCategories::Idle, my_bot->GetClass(), bot_stance));
|
||||||
|
my_bot->SetSpellTypePriority(i, BotPriorityCategories::Engaged, my_bot->GetDefaultSpellTypePriority(i, BotPriorityCategories::Engaged, my_bot->GetClass(), bot_stance));
|
||||||
|
my_bot->SetSpellTypePriority(i, BotPriorityCategories::Pursue, my_bot->GetDefaultSpellTypePriority(i, BotPriorityCategories::Pursue, my_bot->GetClass(), bot_stance));
|
||||||
|
my_bot->SetSpellTypeAEOrGroupTargetCount(i, my_bot->GetDefaultSpellTypeAEOrGroupTargetCount(i, bot_stance));
|
||||||
|
};
|
||||||
|
|
||||||
|
my_bot->ResetBotSpellSettings();
|
||||||
|
my_bot->ClearBotBlockedBuffs();
|
||||||
|
|
||||||
|
output = "settings";
|
||||||
|
|
||||||
|
}
|
||||||
else if (!strcasecmp(sep->arg[1], "holds")) {
|
else if (!strcasecmp(sep->arg[1], "holds")) {
|
||||||
if (spell_type != UINT16_MAX) {
|
if (spell_type != UINT16_MAX) {
|
||||||
my_bot->SetSpellHold(spell_type, my_bot->GetDefaultSpellHold(spell_type, bot_stance));
|
my_bot->SetSpellHold(spell_type, my_bot->GetDefaultSpellHold(spell_type, bot_stance));
|
||||||
@@ -336,76 +434,8 @@ void bot_command_default_settings(Client* c, const Seperator* sep)
|
|||||||
|
|
||||||
output = "target count settings";
|
output = "target count settings";
|
||||||
}
|
}
|
||||||
else if (!strcasecmp(sep->arg[1], "spellsettings")) {
|
|
||||||
my_bot->ResetBotSpellSettings();
|
|
||||||
output = "^spellsettings";
|
|
||||||
}
|
|
||||||
else if (!strcasecmp(sep->arg[1], "spelltypesettings")) {
|
|
||||||
if (spell_type != UINT16_MAX) {
|
|
||||||
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));
|
|
||||||
my_bot->SetSpellTypeAggroCheck(spell_type, my_bot->GetDefaultSpellTypeAggroCheck(spell_type, bot_stance));
|
|
||||||
my_bot->SetSpellTypeMinManaLimit(spell_type, my_bot->GetDefaultSpellTypeMinManaLimit(spell_type, bot_stance));
|
|
||||||
my_bot->SetSpellTypeMaxManaLimit(spell_type, my_bot->GetDefaultSpellTypeMaxManaLimit(spell_type, bot_stance));
|
|
||||||
my_bot->SetSpellTypeMinHPLimit(spell_type, my_bot->GetDefaultSpellTypeMinHPLimit(spell_type, bot_stance));
|
|
||||||
my_bot->SetSpellTypeMaxHPLimit(spell_type, my_bot->GetDefaultSpellTypeMaxHPLimit(spell_type, bot_stance));
|
|
||||||
my_bot->SetSpellTypePriority(spell_type, BotPriorityCategories::Idle, my_bot->GetDefaultSpellTypePriority(spell_type, BotPriorityCategories::Idle, my_bot->GetClass(), bot_stance));
|
|
||||||
my_bot->SetSpellTypePriority(spell_type, BotPriorityCategories::Engaged, my_bot->GetDefaultSpellTypePriority(spell_type, BotPriorityCategories::Engaged, my_bot->GetClass(), bot_stance));
|
|
||||||
my_bot->SetSpellTypePriority(spell_type, BotPriorityCategories::Pursue, my_bot->GetDefaultSpellTypePriority(spell_type, BotPriorityCategories::Pursue, my_bot->GetClass(), bot_stance));
|
|
||||||
my_bot->SetSpellTypeAEOrGroupTargetCount(spell_type, my_bot->GetDefaultSpellTypeAEOrGroupTargetCount(spell_type, bot_stance));
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
for (uint16 i = BotSpellTypes::START; i <= BotSpellTypes::END; ++i) {
|
|
||||||
my_bot->SetSpellHold(i, my_bot->GetDefaultSpellHold(i, bot_stance));
|
|
||||||
my_bot->SetSpellDelay(i, my_bot->GetDefaultSpellDelay(i, bot_stance));
|
|
||||||
my_bot->SetSpellMinThreshold(i, my_bot->GetDefaultSpellMinThreshold(i, bot_stance));
|
|
||||||
my_bot->SetSpellMaxThreshold(i, my_bot->GetDefaultSpellMaxThreshold(i, bot_stance));
|
|
||||||
my_bot->SetSpellTypeAggroCheck(i, my_bot->GetDefaultSpellTypeAggroCheck(i, bot_stance));
|
|
||||||
my_bot->SetSpellTypeMinManaLimit(i, my_bot->GetDefaultSpellTypeMinManaLimit(i, bot_stance));
|
|
||||||
my_bot->SetSpellTypeMaxManaLimit(i, my_bot->GetDefaultSpellTypeMaxManaLimit(i, bot_stance));
|
|
||||||
my_bot->SetSpellTypeMinHPLimit(i, my_bot->GetDefaultSpellTypeMinHPLimit(i, bot_stance));
|
|
||||||
my_bot->SetSpellTypeMaxHPLimit(i, my_bot->GetDefaultSpellTypeMaxHPLimit(i, bot_stance));
|
|
||||||
my_bot->SetSpellTypePriority(i, BotPriorityCategories::Idle, my_bot->GetDefaultSpellTypePriority(i, BotPriorityCategories::Idle, my_bot->GetClass(), bot_stance));
|
|
||||||
my_bot->SetSpellTypePriority(i, BotPriorityCategories::Engaged, my_bot->GetDefaultSpellTypePriority(i, BotPriorityCategories::Engaged, my_bot->GetClass(), bot_stance));
|
|
||||||
my_bot->SetSpellTypePriority(i, BotPriorityCategories::Pursue, my_bot->GetDefaultSpellTypePriority(i, BotPriorityCategories::Pursue, my_bot->GetClass(), bot_stance));
|
|
||||||
my_bot->SetSpellTypeAEOrGroupTargetCount(i, my_bot->GetDefaultSpellTypeAEOrGroupTargetCount(i, bot_stance));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
output = "spell type settings";
|
|
||||||
}
|
|
||||||
else if (!strcasecmp(sep->arg[1], "all")) {
|
|
||||||
for (uint16 i = BotBaseSettings::START; i <= BotBaseSettings::END; ++i) {
|
|
||||||
my_bot->SetBotBaseSetting(i, my_bot->GetDefaultBotBaseSetting(i, bot_stance));
|
|
||||||
}
|
|
||||||
|
|
||||||
for (uint16 i = BotSpellTypes::START; i <= BotSpellTypes::END; ++i) {
|
|
||||||
my_bot->SetSpellHold(i, my_bot->GetDefaultSpellHold(i, bot_stance));
|
|
||||||
my_bot->SetSpellDelay(i, my_bot->GetDefaultSpellDelay(i, bot_stance));
|
|
||||||
my_bot->SetSpellMinThreshold(i, my_bot->GetDefaultSpellMinThreshold(i, bot_stance));
|
|
||||||
my_bot->SetSpellMaxThreshold(i, my_bot->GetDefaultSpellMaxThreshold(i, bot_stance));
|
|
||||||
my_bot->SetSpellTypeAggroCheck(i, my_bot->GetDefaultSpellTypeAggroCheck(i, bot_stance));
|
|
||||||
my_bot->SetSpellTypeMinManaLimit(i, my_bot->GetDefaultSpellTypeMinManaLimit(i, bot_stance));
|
|
||||||
my_bot->SetSpellTypeMaxManaLimit(i, my_bot->GetDefaultSpellTypeMaxManaLimit(i, bot_stance));
|
|
||||||
my_bot->SetSpellTypeMinHPLimit(i, my_bot->GetDefaultSpellTypeMinHPLimit(i, bot_stance));
|
|
||||||
my_bot->SetSpellTypeMaxHPLimit(i, my_bot->GetDefaultSpellTypeMaxHPLimit(i, bot_stance));
|
|
||||||
my_bot->SetSpellTypePriority(i, BotPriorityCategories::Idle, my_bot->GetDefaultSpellTypePriority(i, BotPriorityCategories::Idle, my_bot->GetClass(), bot_stance));
|
|
||||||
my_bot->SetSpellTypePriority(i, BotPriorityCategories::Engaged, my_bot->GetDefaultSpellTypePriority(i, BotPriorityCategories::Engaged, my_bot->GetClass(), bot_stance));
|
|
||||||
my_bot->SetSpellTypePriority(i, BotPriorityCategories::Pursue, my_bot->GetDefaultSpellTypePriority(i, BotPriorityCategories::Pursue, my_bot->GetClass(), bot_stance));
|
|
||||||
my_bot->SetSpellTypeAEOrGroupTargetCount(i, my_bot->GetDefaultSpellTypeAEOrGroupTargetCount(i, bot_stance));
|
|
||||||
};
|
|
||||||
|
|
||||||
my_bot->ResetBotSpellSettings();
|
|
||||||
my_bot->ClearBotBlockedBuffs();
|
|
||||||
|
|
||||||
my_bot->Save();
|
|
||||||
|
|
||||||
output = "settings";
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
my_bot->Save();
|
||||||
++success_count;
|
++success_count;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user