mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-19 00:18:22 +00:00
Implement and rewrite stances
This commit is contained in:
+219
-35
@@ -1180,43 +1180,188 @@ void bot_command_stance(Client *c, const Seperator *sep)
|
||||
}
|
||||
|
||||
if (helper_is_help_or_usage(sep->arg[1])) {
|
||||
c->Message(Chat::White, "usage: %s [current | value: 1-9] ([actionable: target | byname | ownergroup | ownerraid | targetgroup | namesgroup | healrotationtargets | mmr | byclass | byrace | spawned] ([actionable_name]))", sep->arg[0]);
|
||||
c->Message(
|
||||
Chat::White,
|
||||
std::vector<std::string> description =
|
||||
{
|
||||
"Change a bot's stance to control the way it behaves."
|
||||
};
|
||||
|
||||
std::vector<std::string> notes =
|
||||
{
|
||||
"- <b>Changing a stance will reset all settings to match that stance type.</b>",
|
||||
"- Any changes made will only save to that stance for future use.",
|
||||
fmt::format(
|
||||
"Value: {} ({}), {} ({}), {} ({})",
|
||||
Stance::Passive,
|
||||
"- {} (#{}) will tell Non-Warrior classes to taunt automatically.",
|
||||
Stance::GetName(Stance::Aggressive),
|
||||
Stance::Aggressive
|
||||
),
|
||||
"<br>",
|
||||
"Available stances:",
|
||||
fmt::format(
|
||||
"{} (#{}), {} (#{}), {} (#{}), {} (#{}), {} (#{}), {} (#{}), {} (#{})",
|
||||
Stance::GetName(Stance::Passive),
|
||||
Stance::Balanced,
|
||||
Stance::Passive,
|
||||
Stance::GetName(Stance::Balanced),
|
||||
Stance::Balanced,
|
||||
Stance::GetName(Stance::Efficient),
|
||||
Stance::Efficient,
|
||||
Stance::GetName(Stance::Aggressive),
|
||||
Stance::Aggressive,
|
||||
Stance::GetName(Stance::Aggressive)
|
||||
).c_str()
|
||||
Stance::GetName(Stance::Assist),
|
||||
Stance::Assist,
|
||||
Stance::GetName(Stance::Burn),
|
||||
Stance::Burn,
|
||||
Stance::GetName(Stance::AEBurn),
|
||||
Stance::AEBurn
|
||||
),
|
||||
"<br>",
|
||||
fmt::format(
|
||||
"- {} (#{}) [Default] - Overall balance and casts most spell types by default.",
|
||||
Stance::GetName(Stance::Balanced),
|
||||
Stance::Balanced
|
||||
),
|
||||
fmt::format(
|
||||
"- {} (#{}) - Idle. Does not cast or engage in combat.",
|
||||
Stance::GetName(Stance::Passive),
|
||||
Stance::Passive
|
||||
),
|
||||
fmt::format(
|
||||
"- {} (#{}) - More mana and aggro efficient (SKs will still cast hate line). Longer delays between detrimental spells, thresholds adjusted to cast less often.",
|
||||
Stance::GetName(Stance::Efficient),
|
||||
Stance::Efficient
|
||||
),
|
||||
fmt::format(
|
||||
"- {} (#{}) - Much more aggressive in their cast times and thresholds. More DPS, debuffs and slow but a higher risk of snagging aggro.",
|
||||
Stance::GetName(Stance::Aggressive),
|
||||
Stance::Aggressive
|
||||
),
|
||||
fmt::format(
|
||||
"- {} (#{}) - Support role. Most offensive spell types are disabled. Focused on heals, cures, CC, debuffs and slows.",
|
||||
Stance::GetName(Stance::Assist),
|
||||
Stance::Assist
|
||||
),
|
||||
fmt::format(
|
||||
"- {} (#{}) - Murder. Doesn't care about aggro, just wants to kill. DPS Machine.",
|
||||
Stance::GetName(Stance::Burn),
|
||||
Stance::Burn
|
||||
),
|
||||
fmt::format(
|
||||
"- {} (#{}) - Murder EVERYTHING. Doesn't care about aggro, casts AEs. Everything must die ASAP.",
|
||||
Stance::GetName(Stance::AEBurn),
|
||||
Stance::AEBurn
|
||||
)
|
||||
};
|
||||
|
||||
std::vector<std::string> example_format =
|
||||
{
|
||||
fmt::format(
|
||||
"{} [current | value: {}-{}]",
|
||||
sep->arg[0],
|
||||
Stance::Passive,
|
||||
Stance::AEBurn
|
||||
)
|
||||
};
|
||||
std::vector<std::string> examples_one =
|
||||
{
|
||||
"To set all bots to BurnAE:",
|
||||
fmt::format(
|
||||
"{} {} spawned {}",
|
||||
sep->arg[0],
|
||||
Stance::Aggressive,
|
||||
Class::ShadowKnight
|
||||
)
|
||||
};
|
||||
std::vector<std::string> examples_two =
|
||||
{
|
||||
"To set all Shadowknights to Aggressive:",
|
||||
fmt::format(
|
||||
"{} {} byclass {}",
|
||||
sep->arg[0],
|
||||
Stance::Aggressive,
|
||||
Class::ShadowKnight
|
||||
)
|
||||
};
|
||||
std::vector<std::string> examples_three =
|
||||
{
|
||||
"To check the current stances of all bots:",
|
||||
fmt::format(
|
||||
"{} current spawned",
|
||||
sep->arg[0]
|
||||
)
|
||||
};
|
||||
|
||||
std::vector<std::string> actionables =
|
||||
{
|
||||
"target, byname, ownergroup, ownerraid, targetgroup, namesgroup, healrotationtargets, mmr, byclass, byrace, spawned"
|
||||
};
|
||||
|
||||
std::vector<std::string> options = { };
|
||||
std::vector<std::string> options_one = { };
|
||||
std::vector<std::string> options_two = { };
|
||||
std::vector<std::string> options_three = { };
|
||||
|
||||
std::string popup_text = c->SendCommandHelpWindow(
|
||||
c,
|
||||
description,
|
||||
notes,
|
||||
example_format,
|
||||
examples_one, examples_two, examples_three,
|
||||
actionables,
|
||||
options,
|
||||
options_one, options_two, options_three
|
||||
);
|
||||
|
||||
popup_text = DialogueWindow::Table(popup_text);
|
||||
|
||||
c->SendPopupToClient(sep->arg[0], popup_text.c_str());
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
const int ab_mask = ActionableBots::ABM_Type1;
|
||||
|
||||
std::string arg1 = sep->arg[1];
|
||||
bool currentCheck = false;
|
||||
int ab_arg = 1;
|
||||
bool current_check = false;
|
||||
uint32 value = 0;
|
||||
|
||||
std::string arg1 = sep->arg[1];
|
||||
|
||||
if (sep->IsNumber(1)) {
|
||||
++ab_arg;
|
||||
value = atoi(sep->arg[1]);
|
||||
if (value < 0 || value > 300) {
|
||||
c->Message(Chat::White, "You must enter a value within the range of 0 - 300.");
|
||||
if (
|
||||
value < Stance::Passive ||
|
||||
value > Stance::AEBurn ||
|
||||
value == Stance::Reactive ||
|
||||
value == Stance::Assist
|
||||
) {
|
||||
c->Message(
|
||||
Chat::Yellow,
|
||||
fmt::format(
|
||||
"You must choose a valid stance ID, use {} for information regarding this command.",
|
||||
Saylink::Silent(
|
||||
fmt::format("{} help", sep->arg[0])
|
||||
)
|
||||
).c_str()
|
||||
);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if (!arg1.compare("current")) {
|
||||
++ab_arg;
|
||||
current_check = true;
|
||||
currentCheck = true;
|
||||
}
|
||||
else {
|
||||
c->Message(Chat::White, "Incorrect argument, use %s help for a list of options.", sep->arg[0]);
|
||||
c->Message(
|
||||
Chat::Yellow,
|
||||
fmt::format(
|
||||
"Incorrect argument, use {} for information regarding this command.",
|
||||
Saylink::Silent(
|
||||
fmt::format("{} help", sep->arg[0])
|
||||
)
|
||||
).c_str()
|
||||
);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1232,26 +1377,56 @@ void bot_command_stance(Client *c, const Seperator *sep)
|
||||
return;
|
||||
}
|
||||
|
||||
if (!current_check && (value == Stance::Unknown || (value != Stance::Passive && value != Stance::Balanced && value != Stance::Aggressive))) {
|
||||
c->Message(Chat::White, "A [current] argument or valid numeric [value] is required to use this command");
|
||||
Bot* first_found = nullptr;
|
||||
int success_count = 0;
|
||||
for (auto bot_iter : sbl) {
|
||||
if (!first_found) {
|
||||
first_found = bot_iter;
|
||||
}
|
||||
|
||||
if (currentCheck) {
|
||||
c->Message(
|
||||
Chat::Green,
|
||||
fmt::format(
|
||||
"{} says, 'My current stance is {} ({}).'",
|
||||
bot_iter->GetCleanName(),
|
||||
Stance::GetName(bot_iter->GetBotStance()),
|
||||
bot_iter->GetBotStance()
|
||||
).c_str()
|
||||
);
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
bot_iter->Save();
|
||||
bot_iter->SetBotStance(value);
|
||||
bot_iter->LoadDefaultBotSettings();
|
||||
database.botdb.LoadBotSettings(bot_iter);
|
||||
bot_iter->Save();
|
||||
++success_count;
|
||||
}
|
||||
|
||||
if (currentCheck) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (auto bot_iter : sbl) {
|
||||
if (!bot_iter)
|
||||
continue;
|
||||
|
||||
if (!current_check) {
|
||||
bot_iter->SetBotStance(value);
|
||||
bot_iter->Save();
|
||||
}
|
||||
|
||||
Bot::BotGroupSay(
|
||||
bot_iter,
|
||||
if (success_count == 1 && first_found) {
|
||||
c->Message(
|
||||
Chat::Green,
|
||||
fmt::format(
|
||||
"My current stance is {} ({}).",
|
||||
Stance::GetName(bot_iter->GetBotStance()),
|
||||
bot_iter->GetBotStance()
|
||||
"{} says, 'I am now set to the stance [{}].'",
|
||||
first_found->GetCleanName(),
|
||||
Stance::GetName(value)
|
||||
).c_str()
|
||||
);
|
||||
}
|
||||
else {
|
||||
c->Message(
|
||||
Chat::Green,
|
||||
fmt::format(
|
||||
"{} of your bots are now set to the stance [{}].",
|
||||
success_count,
|
||||
Stance::GetName(value)
|
||||
).c_str()
|
||||
);
|
||||
}
|
||||
@@ -1278,7 +1453,7 @@ void bot_command_stop_melee_level(Client* c, const Seperator* sep)
|
||||
uint8 sml = RuleI(Bots, CasterStopMeleeLevel);
|
||||
bool sync_sml = false;
|
||||
bool reset_sml = false;
|
||||
bool current_check = false;
|
||||
bool currentCheck = false;
|
||||
|
||||
if (sep->IsNumber(1)) {
|
||||
ab_arg = 2;
|
||||
@@ -1294,14 +1469,23 @@ void bot_command_stop_melee_level(Client* c, const Seperator* sep)
|
||||
}
|
||||
else if (!arg1.compare("current")) {
|
||||
ab_arg = 2;
|
||||
current_check = true;
|
||||
currentCheck = true;
|
||||
}
|
||||
else if (!strcasecmp(sep->arg[1], "reset")) {
|
||||
ab_arg = 2;
|
||||
reset_sml = true;
|
||||
}
|
||||
else {
|
||||
c->Message(Chat::White, "Incorrect argument, use %s help for a list of options.", sep->arg[0]);
|
||||
c->Message(
|
||||
Chat::Yellow,
|
||||
fmt::format(
|
||||
"Incorrect argument, use {} for information regarding this command.",
|
||||
Saylink::Silent(
|
||||
fmt::format("{} help", sep->arg[0])
|
||||
)
|
||||
).c_str()
|
||||
);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1347,7 +1531,7 @@ void bot_command_stop_melee_level(Client* c, const Seperator* sep)
|
||||
sml = my_bot->GetDefaultBotBaseSetting(BotBaseSettings::StopMeleeLevel);
|
||||
}
|
||||
|
||||
if (current_check) {
|
||||
if (currentCheck) {
|
||||
c->Message(
|
||||
Chat::White,
|
||||
fmt::format(
|
||||
@@ -1364,7 +1548,7 @@ void bot_command_stop_melee_level(Client* c, const Seperator* sep)
|
||||
}
|
||||
}
|
||||
|
||||
if (!current_check) {
|
||||
if (!currentCheck) {
|
||||
if (success_count == 1 && first_found) {
|
||||
c->Message(
|
||||
Chat::White,
|
||||
|
||||
@@ -199,24 +199,28 @@ void bot_command_default_settings(Client* c, const Seperator* sep)
|
||||
Bot* first_found = nullptr;
|
||||
int success_count = 0;
|
||||
std::string output = "";
|
||||
for (auto my_bot : sbl) {
|
||||
uint8 botStance = 2;
|
||||
|
||||
for (auto myBot : sbl) {
|
||||
if (!first_found) {
|
||||
first_found = my_bot;
|
||||
first_found = myBot;
|
||||
}
|
||||
|
||||
botStance = myBot->GetBotStance();
|
||||
|
||||
if (!strcasecmp(sep->arg[1], "misc")) {
|
||||
for (uint16 i = BotBaseSettings::START; i <= BotBaseSettings::END; ++i) {
|
||||
my_bot->SetBotBaseSetting(i, my_bot->GetDefaultBotBaseSetting(i));
|
||||
myBot->SetBotBaseSetting(i, myBot->GetDefaultBotBaseSetting(i, botStance));
|
||||
output = "miscellanous settings";
|
||||
}
|
||||
}
|
||||
else if (!strcasecmp(sep->arg[1], "holds")) {
|
||||
if (spellType != UINT16_MAX) {
|
||||
my_bot->SetSpellHold(spellType, my_bot->GetDefaultSpellHold(spellType));
|
||||
myBot->SetSpellHold(spellType, myBot->GetDefaultSpellHold(spellType, botStance));
|
||||
}
|
||||
else {
|
||||
for (uint16 i = BotSpellTypes::START; i <= BotSpellTypes::END; ++i) {
|
||||
my_bot->SetSpellHold(i, my_bot->GetDefaultSpellHold(i));
|
||||
myBot->SetSpellHold(i, myBot->GetDefaultSpellHold(i, botStance));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -224,11 +228,11 @@ void bot_command_default_settings(Client* c, const Seperator* sep)
|
||||
}
|
||||
else if (!strcasecmp(sep->arg[1], "delays")) {
|
||||
if (spellType != UINT16_MAX) {
|
||||
my_bot->SetSpellDelay(spellType, my_bot->GetDefaultSpellDelay(spellType));
|
||||
myBot->SetSpellDelay(spellType, myBot->GetDefaultSpellDelay(spellType, botStance));
|
||||
}
|
||||
else {
|
||||
for (uint16 i = BotSpellTypes::START; i <= BotSpellTypes::END; ++i) {
|
||||
my_bot->SetSpellDelay(i, my_bot->GetDefaultSpellDelay(i));
|
||||
myBot->SetSpellDelay(i, myBot->GetDefaultSpellDelay(i, botStance));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -236,11 +240,11 @@ void bot_command_default_settings(Client* c, const Seperator* sep)
|
||||
}
|
||||
else if (!strcasecmp(sep->arg[1], "minthresholds")) {
|
||||
if (spellType != UINT16_MAX) {
|
||||
my_bot->SetSpellMinThreshold(spellType, my_bot->GetDefaultSpellMinThreshold(spellType));
|
||||
myBot->SetSpellMinThreshold(spellType, myBot->GetDefaultSpellMinThreshold(spellType, botStance));
|
||||
}
|
||||
else {
|
||||
for (uint16 i = BotSpellTypes::START; i <= BotSpellTypes::END; ++i) {
|
||||
my_bot->SetSpellMinThreshold(i, my_bot->GetDefaultSpellMinThreshold(i));
|
||||
myBot->SetSpellMinThreshold(i, myBot->GetDefaultSpellMinThreshold(i, botStance));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -248,11 +252,11 @@ void bot_command_default_settings(Client* c, const Seperator* sep)
|
||||
}
|
||||
else if (!strcasecmp(sep->arg[1], "maxthresholds")) {
|
||||
if (spellType != UINT16_MAX) {
|
||||
my_bot->SetSpellMaxThreshold(spellType, my_bot->GetDefaultSpellMaxThreshold(spellType));
|
||||
myBot->SetSpellMaxThreshold(spellType, myBot->GetDefaultSpellMaxThreshold(spellType, botStance));
|
||||
}
|
||||
else {
|
||||
for (uint16 i = BotSpellTypes::START; i <= BotSpellTypes::END; ++i) {
|
||||
my_bot->SetSpellMaxThreshold(i, my_bot->GetDefaultSpellMaxThreshold(i));
|
||||
myBot->SetSpellMaxThreshold(i, myBot->GetDefaultSpellMaxThreshold(i, botStance));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -260,11 +264,11 @@ void bot_command_default_settings(Client* c, const Seperator* sep)
|
||||
}
|
||||
else if (!strcasecmp(sep->arg[1], "aggrochecks")) {
|
||||
if (spellType != UINT16_MAX) {
|
||||
my_bot->SetSpellTypeAggroCheck(spellType, my_bot->GetDefaultSpellTypeAggroCheck(spellType));
|
||||
myBot->SetSpellTypeAggroCheck(spellType, myBot->GetDefaultSpellTypeAggroCheck(spellType, botStance));
|
||||
}
|
||||
else {
|
||||
for (uint16 i = BotSpellTypes::START; i <= BotSpellTypes::END; ++i) {
|
||||
my_bot->SetSpellTypeAggroCheck(i, my_bot->GetDefaultSpellTypeAggroCheck(i));
|
||||
myBot->SetSpellTypeAggroCheck(i, myBot->GetDefaultSpellTypeAggroCheck(i, botStance));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -272,11 +276,11 @@ void bot_command_default_settings(Client* c, const Seperator* sep)
|
||||
}
|
||||
else if (!strcasecmp(sep->arg[1], "minmanapct")) {
|
||||
if (spellType != UINT16_MAX) {
|
||||
my_bot->SetSpellTypeMinManaLimit(spellType, my_bot->GetDefaultSpellTypeMinManaLimit(spellType));
|
||||
myBot->SetSpellTypeMinManaLimit(spellType, myBot->GetDefaultSpellTypeMinManaLimit(spellType, botStance));
|
||||
}
|
||||
else {
|
||||
for (uint16 i = BotSpellTypes::START; i <= BotSpellTypes::END; ++i) {
|
||||
my_bot->SetSpellTypeMinManaLimit(i, my_bot->GetDefaultSpellTypeMinManaLimit(i));
|
||||
myBot->SetSpellTypeMinManaLimit(i, myBot->GetDefaultSpellTypeMinManaLimit(i, botStance));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -284,11 +288,11 @@ void bot_command_default_settings(Client* c, const Seperator* sep)
|
||||
}
|
||||
else if (!strcasecmp(sep->arg[1], "maxmanapct")) {
|
||||
if (spellType != UINT16_MAX) {
|
||||
my_bot->SetSpellTypeMaxManaLimit(spellType, my_bot->GetDefaultSpellTypeMaxManaLimit(spellType));
|
||||
myBot->SetSpellTypeMaxManaLimit(spellType, myBot->GetDefaultSpellTypeMaxManaLimit(spellType, botStance));
|
||||
}
|
||||
else {
|
||||
for (uint16 i = BotSpellTypes::START; i <= BotSpellTypes::END; ++i) {
|
||||
my_bot->SetSpellTypeMaxManaLimit(i, my_bot->GetDefaultSpellTypeMaxManaLimit(i));
|
||||
myBot->SetSpellTypeMaxManaLimit(i, myBot->GetDefaultSpellTypeMaxManaLimit(i, botStance));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -296,11 +300,11 @@ void bot_command_default_settings(Client* c, const Seperator* sep)
|
||||
}
|
||||
else if (!strcasecmp(sep->arg[1], "minhppct")) {
|
||||
if (spellType != UINT16_MAX) {
|
||||
my_bot->SetSpellTypeMinHPLimit(spellType, my_bot->GetDefaultSpellTypeMinHPLimit(spellType));
|
||||
myBot->SetSpellTypeMinHPLimit(spellType, myBot->GetDefaultSpellTypeMinHPLimit(spellType, botStance));
|
||||
}
|
||||
else {
|
||||
for (uint16 i = BotSpellTypes::START; i <= BotSpellTypes::END; ++i) {
|
||||
my_bot->SetSpellTypeMinHPLimit(i, my_bot->GetDefaultSpellTypeMinHPLimit(i));
|
||||
myBot->SetSpellTypeMinHPLimit(i, myBot->GetDefaultSpellTypeMinHPLimit(i, botStance));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -308,11 +312,11 @@ void bot_command_default_settings(Client* c, const Seperator* sep)
|
||||
}
|
||||
else if (!strcasecmp(sep->arg[1], "maxhppct")) {
|
||||
if (spellType != UINT16_MAX) {
|
||||
my_bot->SetSpellTypeMaxHPLimit(spellType, my_bot->GetDefaultSpellTypeMaxHPLimit(spellType));
|
||||
myBot->SetSpellTypeMaxHPLimit(spellType, myBot->GetDefaultSpellTypeMaxHPLimit(spellType, botStance));
|
||||
}
|
||||
else {
|
||||
for (uint16 i = BotSpellTypes::START; i <= BotSpellTypes::END; ++i) {
|
||||
my_bot->SetSpellTypeMaxHPLimit(i, my_bot->GetDefaultSpellTypeMaxHPLimit(i));
|
||||
myBot->SetSpellTypeMaxHPLimit(i, myBot->GetDefaultSpellTypeMaxHPLimit(i, botStance));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -320,11 +324,11 @@ void bot_command_default_settings(Client* c, const Seperator* sep)
|
||||
}
|
||||
else if (!strcasecmp(sep->arg[1], "idlepriority")) {
|
||||
if (spellType != UINT16_MAX) {
|
||||
my_bot->SetSpellTypePriority(spellType, BotPriorityCategories::Idle, my_bot->GetDefaultSpellTypePriority(spellType, BotPriorityCategories::Idle, my_bot->GetClass()));
|
||||
myBot->SetSpellTypePriority(spellType, BotPriorityCategories::Idle, myBot->GetDefaultSpellTypePriority(spellType, BotPriorityCategories::Idle, myBot->GetClass(), botStance));
|
||||
}
|
||||
else {
|
||||
for (uint16 i = BotSpellTypes::START; i <= BotSpellTypes::END; ++i) {
|
||||
my_bot->SetSpellTypePriority(i, BotPriorityCategories::Idle, my_bot->GetDefaultSpellTypePriority(i, BotPriorityCategories::Idle, my_bot->GetClass()));
|
||||
myBot->SetSpellTypePriority(i, BotPriorityCategories::Idle, myBot->GetDefaultSpellTypePriority(i, BotPriorityCategories::Idle, myBot->GetClass(), botStance));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -332,11 +336,11 @@ void bot_command_default_settings(Client* c, const Seperator* sep)
|
||||
}
|
||||
else if (!strcasecmp(sep->arg[1], "engagedpriority")) {
|
||||
if (spellType != UINT16_MAX) {
|
||||
my_bot->SetSpellTypePriority(spellType, BotPriorityCategories::Engaged, my_bot->GetDefaultSpellTypePriority(spellType, BotPriorityCategories::Engaged, my_bot->GetClass()));
|
||||
myBot->SetSpellTypePriority(spellType, BotPriorityCategories::Engaged, myBot->GetDefaultSpellTypePriority(spellType, BotPriorityCategories::Engaged, myBot->GetClass(), botStance));
|
||||
}
|
||||
else {
|
||||
for (uint16 i = BotSpellTypes::START; i <= BotSpellTypes::END; ++i) {
|
||||
my_bot->SetSpellTypePriority(i, BotPriorityCategories::Engaged, my_bot->GetDefaultSpellTypePriority(i, BotPriorityCategories::Engaged, my_bot->GetClass()));
|
||||
myBot->SetSpellTypePriority(i, BotPriorityCategories::Engaged, myBot->GetDefaultSpellTypePriority(i, BotPriorityCategories::Engaged, myBot->GetClass(), botStance));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -344,11 +348,11 @@ void bot_command_default_settings(Client* c, const Seperator* sep)
|
||||
}
|
||||
else if (!strcasecmp(sep->arg[1], "pursuepriority")) {
|
||||
if (spellType != UINT16_MAX) {
|
||||
my_bot->SetSpellTypePriority(spellType, BotPriorityCategories::Pursue, my_bot->GetDefaultSpellTypePriority(spellType, BotPriorityCategories::Pursue, my_bot->GetClass()));
|
||||
myBot->SetSpellTypePriority(spellType, BotPriorityCategories::Pursue, myBot->GetDefaultSpellTypePriority(spellType, BotPriorityCategories::Pursue, myBot->GetClass(), botStance));
|
||||
}
|
||||
else {
|
||||
for (uint16 i = BotSpellTypes::START; i <= BotSpellTypes::END; ++i) {
|
||||
my_bot->SetSpellTypePriority(i, BotPriorityCategories::Pursue, my_bot->GetDefaultSpellTypePriority(i, BotPriorityCategories::Pursue, my_bot->GetClass()));
|
||||
myBot->SetSpellTypePriority(i, BotPriorityCategories::Pursue, myBot->GetDefaultSpellTypePriority(i, BotPriorityCategories::Pursue, myBot->GetClass(), botStance));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -356,51 +360,51 @@ void bot_command_default_settings(Client* c, const Seperator* sep)
|
||||
}
|
||||
else if (!strcasecmp(sep->arg[1], "targetcounts")) {
|
||||
if (spellType != UINT16_MAX) {
|
||||
my_bot->SetSpellDelay(spellType, my_bot->GetDefaultSpellDelay(spellType));
|
||||
myBot->SetSpellDelay(spellType, myBot->GetDefaultSpellDelay(spellType, botStance));
|
||||
}
|
||||
else {
|
||||
for (uint16 i = BotSpellTypes::START; i <= BotSpellTypes::END; ++i) {
|
||||
my_bot->SetSpellTypeAEOrGroupTargetCount(i, my_bot->GetDefaultSpellTypeAEOrGroupTargetCount(i));
|
||||
myBot->SetSpellTypeAEOrGroupTargetCount(i, myBot->GetDefaultSpellTypeAEOrGroupTargetCount(i, botStance));
|
||||
}
|
||||
}
|
||||
|
||||
output = "ae/group count settings";
|
||||
}
|
||||
else if (!strcasecmp(sep->arg[1], "spellsettings")) {
|
||||
my_bot->ResetBotSpellSettings();
|
||||
myBot->ResetBotSpellSettings();
|
||||
output = "^spellsettings";
|
||||
}
|
||||
else if (!strcasecmp(sep->arg[1], "spelltypesettings")) {
|
||||
if (spellType != UINT16_MAX) {
|
||||
my_bot->SetSpellHold(spellType, my_bot->GetDefaultSpellHold(spellType));
|
||||
my_bot->SetSpellDelay(spellType, my_bot->GetDefaultSpellDelay(spellType));
|
||||
my_bot->SetSpellMinThreshold(spellType, my_bot->GetDefaultSpellMinThreshold(spellType));
|
||||
my_bot->SetSpellMaxThreshold(spellType, my_bot->GetDefaultSpellMaxThreshold(spellType));
|
||||
my_bot->SetSpellTypeAggroCheck(spellType, my_bot->GetDefaultSpellTypeAggroCheck(spellType));
|
||||
my_bot->SetSpellTypeMinManaLimit(spellType, my_bot->GetDefaultSpellTypeMinManaLimit(spellType));
|
||||
my_bot->SetSpellTypeMaxManaLimit(spellType, my_bot->GetDefaultSpellTypeMaxManaLimit(spellType));
|
||||
my_bot->SetSpellTypeMinHPLimit(spellType, my_bot->GetDefaultSpellTypeMinHPLimit(spellType));
|
||||
my_bot->SetSpellTypeMaxHPLimit(spellType, my_bot->GetDefaultSpellTypeMaxHPLimit(spellType));
|
||||
my_bot->SetSpellTypePriority(spellType, BotPriorityCategories::Idle, my_bot->GetDefaultSpellTypePriority(spellType, BotPriorityCategories::Idle, my_bot->GetClass()));
|
||||
my_bot->SetSpellTypePriority(spellType, BotPriorityCategories::Engaged, my_bot->GetDefaultSpellTypePriority(spellType, BotPriorityCategories::Engaged, my_bot->GetClass()));
|
||||
my_bot->SetSpellTypePriority(spellType, BotPriorityCategories::Pursue, my_bot->GetDefaultSpellTypePriority(spellType, BotPriorityCategories::Pursue, my_bot->GetClass()));
|
||||
my_bot->SetSpellTypeAEOrGroupTargetCount(spellType, my_bot->GetDefaultSpellTypeAEOrGroupTargetCount(spellType));
|
||||
myBot->SetSpellHold(spellType, myBot->GetDefaultSpellHold(spellType, botStance));
|
||||
myBot->SetSpellDelay(spellType, myBot->GetDefaultSpellDelay(spellType, botStance));
|
||||
myBot->SetSpellMinThreshold(spellType, myBot->GetDefaultSpellMinThreshold(spellType, botStance));
|
||||
myBot->SetSpellMaxThreshold(spellType, myBot->GetDefaultSpellMaxThreshold(spellType, botStance));
|
||||
myBot->SetSpellTypeAggroCheck(spellType, myBot->GetDefaultSpellTypeAggroCheck(spellType, botStance));
|
||||
myBot->SetSpellTypeMinManaLimit(spellType, myBot->GetDefaultSpellTypeMinManaLimit(spellType, botStance));
|
||||
myBot->SetSpellTypeMaxManaLimit(spellType, myBot->GetDefaultSpellTypeMaxManaLimit(spellType, botStance));
|
||||
myBot->SetSpellTypeMinHPLimit(spellType, myBot->GetDefaultSpellTypeMinHPLimit(spellType, botStance));
|
||||
myBot->SetSpellTypeMaxHPLimit(spellType, myBot->GetDefaultSpellTypeMaxHPLimit(spellType, botStance));
|
||||
myBot->SetSpellTypePriority(spellType, BotPriorityCategories::Idle, myBot->GetDefaultSpellTypePriority(spellType, BotPriorityCategories::Idle, myBot->GetClass(), botStance));
|
||||
myBot->SetSpellTypePriority(spellType, BotPriorityCategories::Engaged, myBot->GetDefaultSpellTypePriority(spellType, BotPriorityCategories::Engaged, myBot->GetClass(), botStance));
|
||||
myBot->SetSpellTypePriority(spellType, BotPriorityCategories::Pursue, myBot->GetDefaultSpellTypePriority(spellType, BotPriorityCategories::Pursue, myBot->GetClass(), botStance));
|
||||
myBot->SetSpellTypeAEOrGroupTargetCount(spellType, myBot->GetDefaultSpellTypeAEOrGroupTargetCount(spellType, botStance));
|
||||
}
|
||||
else {
|
||||
for (uint16 i = BotSpellTypes::START; i <= BotSpellTypes::END; ++i) {
|
||||
my_bot->SetSpellHold(i, my_bot->GetDefaultSpellHold(i));
|
||||
my_bot->SetSpellDelay(i, my_bot->GetDefaultSpellDelay(i));
|
||||
my_bot->SetSpellMinThreshold(i, my_bot->GetDefaultSpellMinThreshold(i));
|
||||
my_bot->SetSpellMaxThreshold(i, my_bot->GetDefaultSpellMaxThreshold(i));
|
||||
my_bot->SetSpellTypeAggroCheck(i, my_bot->GetDefaultSpellTypeAggroCheck(i));
|
||||
my_bot->SetSpellTypeMinManaLimit(i, my_bot->GetDefaultSpellTypeMinManaLimit(i));
|
||||
my_bot->SetSpellTypeMaxManaLimit(i, my_bot->GetDefaultSpellTypeMaxManaLimit(i));
|
||||
my_bot->SetSpellTypeMinHPLimit(i, my_bot->GetDefaultSpellTypeMinHPLimit(i));
|
||||
my_bot->SetSpellTypeMaxHPLimit(i, my_bot->GetDefaultSpellTypeMaxHPLimit(i));
|
||||
my_bot->SetSpellTypePriority(i, BotPriorityCategories::Idle, my_bot->GetDefaultSpellTypePriority(i, BotPriorityCategories::Idle, my_bot->GetClass()));
|
||||
my_bot->SetSpellTypePriority(i, BotPriorityCategories::Engaged, my_bot->GetDefaultSpellTypePriority(i, BotPriorityCategories::Engaged, my_bot->GetClass()));
|
||||
my_bot->SetSpellTypePriority(i, BotPriorityCategories::Pursue, my_bot->GetDefaultSpellTypePriority(i, BotPriorityCategories::Pursue, my_bot->GetClass()));
|
||||
my_bot->SetSpellTypeAEOrGroupTargetCount(i, my_bot->GetDefaultSpellTypeAEOrGroupTargetCount(i));
|
||||
myBot->SetSpellHold(i, myBot->GetDefaultSpellHold(i, botStance));
|
||||
myBot->SetSpellDelay(i, myBot->GetDefaultSpellDelay(i, botStance));
|
||||
myBot->SetSpellMinThreshold(i, myBot->GetDefaultSpellMinThreshold(i, botStance));
|
||||
myBot->SetSpellMaxThreshold(i, myBot->GetDefaultSpellMaxThreshold(i, botStance));
|
||||
myBot->SetSpellTypeAggroCheck(i, myBot->GetDefaultSpellTypeAggroCheck(i, botStance));
|
||||
myBot->SetSpellTypeMinManaLimit(i, myBot->GetDefaultSpellTypeMinManaLimit(i, botStance));
|
||||
myBot->SetSpellTypeMaxManaLimit(i, myBot->GetDefaultSpellTypeMaxManaLimit(i, botStance));
|
||||
myBot->SetSpellTypeMinHPLimit(i, myBot->GetDefaultSpellTypeMinHPLimit(i, botStance));
|
||||
myBot->SetSpellTypeMaxHPLimit(i, myBot->GetDefaultSpellTypeMaxHPLimit(i, botStance));
|
||||
myBot->SetSpellTypePriority(i, BotPriorityCategories::Idle, myBot->GetDefaultSpellTypePriority(i, BotPriorityCategories::Idle, myBot->GetClass(), botStance));
|
||||
myBot->SetSpellTypePriority(i, BotPriorityCategories::Engaged, myBot->GetDefaultSpellTypePriority(i, BotPriorityCategories::Engaged, myBot->GetClass(), botStance));
|
||||
myBot->SetSpellTypePriority(i, BotPriorityCategories::Pursue, myBot->GetDefaultSpellTypePriority(i, BotPriorityCategories::Pursue, myBot->GetClass(), botStance));
|
||||
myBot->SetSpellTypeAEOrGroupTargetCount(i, myBot->GetDefaultSpellTypeAEOrGroupTargetCount(i, botStance));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -408,26 +412,26 @@ void bot_command_default_settings(Client* c, const Seperator* sep)
|
||||
}
|
||||
else if (!strcasecmp(sep->arg[1], "all")) {
|
||||
for (uint16 i = BotBaseSettings::START; i <= BotBaseSettings::END; ++i) {
|
||||
my_bot->SetBotBaseSetting(i, my_bot->GetDefaultBotBaseSetting(i));
|
||||
myBot->SetBotBaseSetting(i, myBot->GetDefaultBotBaseSetting(i, botStance));
|
||||
}
|
||||
|
||||
for (uint16 i = BotSpellTypes::START; i <= BotSpellTypes::END; ++i) {
|
||||
my_bot->SetSpellHold(i, my_bot->GetDefaultSpellHold(i));
|
||||
my_bot->SetSpellDelay(i, my_bot->GetDefaultSpellDelay(i));
|
||||
my_bot->SetSpellMinThreshold(i, my_bot->GetDefaultSpellMinThreshold(i));
|
||||
my_bot->SetSpellMaxThreshold(i, my_bot->GetDefaultSpellMaxThreshold(i));
|
||||
my_bot->SetSpellTypeAggroCheck(i, my_bot->GetDefaultSpellTypeAggroCheck(i));
|
||||
my_bot->SetSpellTypeMinManaLimit(i, my_bot->GetDefaultSpellTypeMinManaLimit(i));
|
||||
my_bot->SetSpellTypeMaxManaLimit(i, my_bot->GetDefaultSpellTypeMaxManaLimit(i));
|
||||
my_bot->SetSpellTypeMinHPLimit(i, my_bot->GetDefaultSpellTypeMinHPLimit(i));
|
||||
my_bot->SetSpellTypeMaxHPLimit(i, my_bot->GetDefaultSpellTypeMaxHPLimit(i));
|
||||
my_bot->SetSpellTypePriority(i, BotPriorityCategories::Idle, my_bot->GetDefaultSpellTypePriority(i, BotPriorityCategories::Idle, my_bot->GetClass()));
|
||||
my_bot->SetSpellTypePriority(i, BotPriorityCategories::Engaged, my_bot->GetDefaultSpellTypePriority(i, BotPriorityCategories::Engaged, my_bot->GetClass()));
|
||||
my_bot->SetSpellTypePriority(i, BotPriorityCategories::Pursue, my_bot->GetDefaultSpellTypePriority(i, BotPriorityCategories::Pursue, my_bot->GetClass()));
|
||||
my_bot->SetSpellTypeAEOrGroupTargetCount(i, my_bot->GetDefaultSpellTypeAEOrGroupTargetCount(i));
|
||||
myBot->SetSpellHold(i, myBot->GetDefaultSpellHold(i, botStance));
|
||||
myBot->SetSpellDelay(i, myBot->GetDefaultSpellDelay(i, botStance));
|
||||
myBot->SetSpellMinThreshold(i, myBot->GetDefaultSpellMinThreshold(i, botStance));
|
||||
myBot->SetSpellMaxThreshold(i, myBot->GetDefaultSpellMaxThreshold(i, botStance));
|
||||
myBot->SetSpellTypeAggroCheck(i, myBot->GetDefaultSpellTypeAggroCheck(i, botStance));
|
||||
myBot->SetSpellTypeMinManaLimit(i, myBot->GetDefaultSpellTypeMinManaLimit(i, botStance));
|
||||
myBot->SetSpellTypeMaxManaLimit(i, myBot->GetDefaultSpellTypeMaxManaLimit(i, botStance));
|
||||
myBot->SetSpellTypeMinHPLimit(i, myBot->GetDefaultSpellTypeMinHPLimit(i, botStance));
|
||||
myBot->SetSpellTypeMaxHPLimit(i, myBot->GetDefaultSpellTypeMaxHPLimit(i, botStance));
|
||||
myBot->SetSpellTypePriority(i, BotPriorityCategories::Idle, myBot->GetDefaultSpellTypePriority(i, BotPriorityCategories::Idle, myBot->GetClass(), botStance));
|
||||
myBot->SetSpellTypePriority(i, BotPriorityCategories::Engaged, myBot->GetDefaultSpellTypePriority(i, BotPriorityCategories::Engaged, myBot->GetClass(), botStance));
|
||||
myBot->SetSpellTypePriority(i, BotPriorityCategories::Pursue, myBot->GetDefaultSpellTypePriority(i, BotPriorityCategories::Pursue, myBot->GetClass(), botStance));
|
||||
myBot->SetSpellTypeAEOrGroupTargetCount(i, myBot->GetDefaultSpellTypeAEOrGroupTargetCount(i, botStance));
|
||||
};
|
||||
|
||||
my_bot->ResetBotSpellSettings();
|
||||
myBot->ResetBotSpellSettings();
|
||||
|
||||
output = "settings";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user