Rename SpellHold, SpellDelay, SpellMinThreshold, SpellMaxThreshold, SpellRecastDelay to fit SpellType style naming

This commit is contained in:
nytmyr
2025-01-31 17:05:50 -06:00
parent fef8c623ff
commit 980aa65ecc
9 changed files with 177 additions and 150 deletions
+28 -20
View File
@@ -219,10 +219,14 @@ void bot_command_default_settings(Client* c, const Seperator* sep)
}
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->SetSpellTypeHold(spell_type, my_bot->GetDefaultSpellTypeHold(spell_type, bot_stance));
my_bot->SetSpellTypeDelay(spell_type, my_bot->GetDefaultSpellTypeDelay(spell_type, bot_stance));
my_bot->SetSpellTypeMinThreshold(
spell_type,
my_bot->GetDefaultSpellTypeMinThreshold(spell_type, bot_stance));
my_bot->SetSpellTypeMaxThreshold(
spell_type,
my_bot->GetDefaultSpellTypeMaxThreshold(spell_type, bot_stance));
my_bot->SetSpellTypeAggroCheck(spell_type, my_bot->GetDefaultSpellTypeAggroCheck(spell_type, bot_stance));
my_bot->SetSpellTypeResistLimit(spell_type, my_bot->GetDefaultSpellTypeResistLimit(spell_type, bot_stance));
my_bot->SetSpellTypeMinManaLimit(spell_type, my_bot->GetDefaultSpellTypeMinManaLimit(spell_type, bot_stance));
@@ -237,10 +241,10 @@ void bot_command_default_settings(Client* c, const Seperator* sep)
}
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->SetSpellTypeHold(i, my_bot->GetDefaultSpellTypeHold(i, bot_stance));
my_bot->SetSpellTypeDelay(i, my_bot->GetDefaultSpellTypeDelay(i, bot_stance));
my_bot->SetSpellTypeMinThreshold(i, my_bot->GetDefaultSpellTypeMinThreshold(i, bot_stance));
my_bot->SetSpellTypeMaxThreshold(i, my_bot->GetDefaultSpellTypeMaxThreshold(i, bot_stance));
my_bot->SetSpellTypeAggroCheck(i, my_bot->GetDefaultSpellTypeAggroCheck(i, bot_stance));
my_bot->SetSpellTypeResistLimit(i, my_bot->GetDefaultSpellTypeResistLimit(i, bot_stance));
my_bot->SetSpellTypeMinManaLimit(i, my_bot->GetDefaultSpellTypeMinManaLimit(i, bot_stance));
@@ -263,10 +267,10 @@ void bot_command_default_settings(Client* c, const Seperator* sep)
}
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->SetSpellTypeHold(i, my_bot->GetDefaultSpellTypeHold(i, bot_stance));
my_bot->SetSpellTypeDelay(i, my_bot->GetDefaultSpellTypeDelay(i, bot_stance));
my_bot->SetSpellTypeMinThreshold(i, my_bot->GetDefaultSpellTypeMinThreshold(i, bot_stance));
my_bot->SetSpellTypeMaxThreshold(i, my_bot->GetDefaultSpellTypeMaxThreshold(i, bot_stance));
my_bot->SetSpellTypeAggroCheck(i, my_bot->GetDefaultSpellTypeAggroCheck(i, bot_stance));
my_bot->SetSpellTypeResistLimit(i, my_bot->GetDefaultSpellTypeResistLimit(i, bot_stance));
my_bot->SetSpellTypeMinManaLimit(i, my_bot->GetDefaultSpellTypeMinManaLimit(i, bot_stance));
@@ -288,11 +292,11 @@ void bot_command_default_settings(Client* c, const Seperator* sep)
}
else if (!strcasecmp(sep->arg[1], "holds")) {
if (spell_type != UINT16_MAX) {
my_bot->SetSpellHold(spell_type, my_bot->GetDefaultSpellHold(spell_type, bot_stance));
my_bot->SetSpellTypeHold(spell_type, my_bot->GetDefaultSpellTypeHold(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->SetSpellTypeHold(i, my_bot->GetDefaultSpellTypeHold(i, bot_stance));
}
}
@@ -300,11 +304,11 @@ void bot_command_default_settings(Client* c, const Seperator* sep)
}
else if (!strcasecmp(sep->arg[1], "delays")) {
if (spell_type != UINT16_MAX) {
my_bot->SetSpellDelay(spell_type, my_bot->GetDefaultSpellDelay(spell_type, bot_stance));
my_bot->SetSpellTypeDelay(spell_type, my_bot->GetDefaultSpellTypeDelay(spell_type, bot_stance));
}
else {
for (uint16 i = BotSpellTypes::START; i <= BotSpellTypes::END; ++i) {
my_bot->SetSpellDelay(i, my_bot->GetDefaultSpellDelay(i, bot_stance));
my_bot->SetSpellTypeDelay(i, my_bot->GetDefaultSpellTypeDelay(i, bot_stance));
}
}
@@ -312,11 +316,13 @@ void bot_command_default_settings(Client* c, const Seperator* sep)
}
else if (!strcasecmp(sep->arg[1], "minthresholds")) {
if (spell_type != UINT16_MAX) {
my_bot->SetSpellMinThreshold(spell_type, my_bot->GetDefaultSpellMinThreshold(spell_type, bot_stance));
my_bot->SetSpellTypeMinThreshold(
spell_type,
my_bot->GetDefaultSpellTypeMinThreshold(spell_type, bot_stance));
}
else {
for (uint16 i = BotSpellTypes::START; i <= BotSpellTypes::END; ++i) {
my_bot->SetSpellMinThreshold(i, my_bot->GetDefaultSpellMinThreshold(i, bot_stance));
my_bot->SetSpellTypeMinThreshold(i, my_bot->GetDefaultSpellTypeMinThreshold(i, bot_stance));
}
}
@@ -324,11 +330,13 @@ void bot_command_default_settings(Client* c, const Seperator* sep)
}
else if (!strcasecmp(sep->arg[1], "maxthresholds")) {
if (spell_type != UINT16_MAX) {
my_bot->SetSpellMaxThreshold(spell_type, my_bot->GetDefaultSpellMaxThreshold(spell_type, bot_stance));
my_bot->SetSpellTypeMaxThreshold(
spell_type,
my_bot->GetDefaultSpellTypeMaxThreshold(spell_type, bot_stance));
}
else {
for (uint16 i = BotSpellTypes::START; i <= BotSpellTypes::END; ++i) {
my_bot->SetSpellMaxThreshold(i, my_bot->GetDefaultSpellMaxThreshold(i, bot_stance));
my_bot->SetSpellTypeMaxThreshold(i, my_bot->GetDefaultSpellTypeMaxThreshold(i, bot_stance));
}
}
+6 -6
View File
@@ -220,12 +220,12 @@ void bot_command_spell_delays(Client* c, const Seperator* sep) {
"{} says, 'My [{}] spell delay is currently [{}] seconds.'",
my_bot->GetCleanName(),
Bot::GetSpellTypeNameByID(spell_type),
my_bot->GetSpellDelay(spell_type) / 1000.00
my_bot->GetSpellTypeDelay(spell_type) / 1000.00
).c_str()
);
}
else {
my_bot->SetSpellDelay(spell_type, type_value);
my_bot->SetSpellTypeDelay(spell_type, type_value);
++success_count;
}
}
@@ -238,7 +238,7 @@ void bot_command_spell_delays(Client* c, const Seperator* sep) {
"{} says, 'My [{}] spell delay was set to [{}] seconds.'",
first_found->GetCleanName(),
Bot::GetSpellTypeNameByID(spell_type),
first_found->GetSpellDelay(spell_type) / 1000.00
first_found->GetSpellTypeDelay(spell_type) / 1000.00
).c_str()
);
}
@@ -262,19 +262,19 @@ void bot_command_spell_delays(Client* c, const Seperator* sep) {
fmt::format(
"Your [{}] spell delay is currently [{}] seconds.",
Bot::GetSpellTypeNameByID(spell_type),
c->GetSpellDelay(spell_type) / 1000.00
c->GetSpellTypeDelay(spell_type) / 1000.00
).c_str()
);
}
else {
c->SetSpellDelay(spell_type, type_value);
c->SetSpellTypeDelay(spell_type, type_value);
c->Message(
Chat::Green,
fmt::format(
"Your [{}] spell delay was set to [{}] seconds.",
Bot::GetSpellTypeNameByID(spell_type),
c->GetSpellDelay(spell_type) / 1000.00
c->GetSpellTypeDelay(spell_type) / 1000.00
).c_str()
);
}
+3 -3
View File
@@ -157,12 +157,12 @@ void bot_command_spell_holds(Client* c, const Seperator* sep)
"{} says, 'My [{}] spell hold is currently [{}].'",
my_bot->GetCleanName(),
Bot::GetSpellTypeNameByID(spell_type),
my_bot->GetSpellHold(spell_type) ? "enabled" : "disabled"
my_bot->GetSpellTypeHold(spell_type) ? "enabled" : "disabled"
).c_str()
);
}
else {
my_bot->SetSpellHold(spell_type, type_value);
my_bot->SetSpellTypeHold(spell_type, type_value);
++success_count;
}
}
@@ -174,7 +174,7 @@ void bot_command_spell_holds(Client* c, const Seperator* sep)
"{} says, 'My [{}] spell hold was [{}].'",
first_found->GetCleanName(),
Bot::GetSpellTypeNameByID(spell_type),
first_found->GetSpellHold(spell_type) ? "enabled" : "disabled"
first_found->GetSpellTypeHold(spell_type) ? "enabled" : "disabled"
).c_str()
);
}
+6 -6
View File
@@ -216,12 +216,12 @@ void bot_command_spell_max_thresholds(Client* c, const Seperator* sep) {
"{} says, 'My [{}] maximum threshold is currently [{}%%].'",
my_bot->GetCleanName(),
Bot::GetSpellTypeNameByID(spell_type),
my_bot->GetSpellMaxThreshold(spell_type)
my_bot->GetSpellTypeMaxThreshold(spell_type)
).c_str()
);
}
else {
my_bot->SetSpellMaxThreshold(spell_type, type_value);
my_bot->SetSpellTypeMaxThreshold(spell_type, type_value);
++success_count;
}
}
@@ -234,7 +234,7 @@ void bot_command_spell_max_thresholds(Client* c, const Seperator* sep) {
"{} says, 'My [{}] maximum threshold was set to [{}%%].'",
first_found->GetCleanName(),
Bot::GetSpellTypeNameByID(spell_type),
first_found->GetSpellMaxThreshold(spell_type)
first_found->GetSpellTypeMaxThreshold(spell_type)
).c_str()
);
}
@@ -258,19 +258,19 @@ void bot_command_spell_max_thresholds(Client* c, const Seperator* sep) {
fmt::format(
"Your [{}] maximum threshold is currently [{}%%].",
Bot::GetSpellTypeNameByID(spell_type),
c->GetSpellMaxThreshold(spell_type)
c->GetSpellTypeMaxThreshold(spell_type)
).c_str()
);
}
else {
c->SetSpellMaxThreshold(spell_type, type_value);
c->SetSpellTypeMaxThreshold(spell_type, type_value);
c->Message(
Chat::Green,
fmt::format(
"Your [{}] maximum threshold was set to [{}%%].",
Bot::GetSpellTypeNameByID(spell_type),
c->GetSpellMaxThreshold(spell_type)
c->GetSpellTypeMaxThreshold(spell_type)
).c_str()
);
}
+6 -6
View File
@@ -218,12 +218,12 @@ void bot_command_spell_min_thresholds(Client* c, const Seperator* sep) {
"{} says, 'My [{}] minimum threshold is currently [{}%%].'",
my_bot->GetCleanName(),
Bot::GetSpellTypeNameByID(spell_type),
my_bot->GetSpellMinThreshold(spell_type)
my_bot->GetSpellTypeMinThreshold(spell_type)
).c_str()
);
}
else {
my_bot->SetSpellMinThreshold(spell_type, type_value);
my_bot->SetSpellTypeMinThreshold(spell_type, type_value);
++success_count;
}
}
@@ -236,7 +236,7 @@ void bot_command_spell_min_thresholds(Client* c, const Seperator* sep) {
"{} says, 'My [{}] minimum threshold was set to [{}%%].'",
first_found->GetCleanName(),
Bot::GetSpellTypeNameByID(spell_type),
first_found->GetSpellMinThreshold(spell_type)
first_found->GetSpellTypeMinThreshold(spell_type)
).c_str()
);
}
@@ -260,19 +260,19 @@ void bot_command_spell_min_thresholds(Client* c, const Seperator* sep) {
fmt::format(
"Your [{}] minimum threshold is currently [{}%%].",
Bot::GetSpellTypeNameByID(spell_type),
c->GetSpellMinThreshold(spell_type)
c->GetSpellTypeMinThreshold(spell_type)
).c_str()
);
}
else {
c->SetSpellMinThreshold(spell_type, type_value);
c->SetSpellTypeMinThreshold(spell_type, type_value);
c->Message(
Chat::Green,
fmt::format(
"Your [{}] minimum threshold was set to [{}%%].",
Bot::GetSpellTypeNameByID(spell_type),
c->GetSpellMinThreshold(spell_type)
c->GetSpellTypeMinThreshold(spell_type)
).c_str()
);
}