mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-28 00:57:15 +00:00
Cleanup some commands
This commit is contained in:
@@ -94,8 +94,16 @@ void bot_command_spell_aggro_checks(Client* c, const Seperator* sep)
|
|||||||
if (sep->IsNumber(1)) {
|
if (sep->IsNumber(1)) {
|
||||||
spell_type = atoi(sep->arg[1]);
|
spell_type = atoi(sep->arg[1]);
|
||||||
|
|
||||||
if (spell_type < BotSpellTypes::START || spell_type > BotSpellTypes::END) {
|
if (!EQ::ValueWithin(spell_type, BotSpellTypes::START, BotSpellTypes::END)) {
|
||||||
c->Message(Chat::Yellow, "You must choose a valid spell type. Spell types range from %i to %i", 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;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -106,13 +106,17 @@ void bot_command_spell_delays(Client* c, const Seperator* sep) {
|
|||||||
|
|
||||||
if (
|
if (
|
||||||
(clientSetting && !IsClientBotSpellType(spell_type)) ||
|
(clientSetting && !IsClientBotSpellType(spell_type)) ||
|
||||||
(!clientSetting && (spell_type < BotSpellTypes::START || spell_type > BotSpellTypes::END))
|
(!clientSetting && !EQ::ValueWithin(spell_type, BotSpellTypes::START, BotSpellTypes::END))
|
||||||
) {
|
) {
|
||||||
c->Message(
|
c->Message(
|
||||||
Chat::Yellow,
|
Chat::Yellow,
|
||||||
clientSetting ? "Invalid spell type for clients." : "You must choose a valid spell type. Spell types range from %i to %i",
|
fmt::format(
|
||||||
BotSpellTypes::START,
|
"{}. Use {} for information regarding this command.",
|
||||||
BotSpellTypes::END
|
(!clientSetting ? "You must choose a valid spell type" : "You must choose a valid client spell type"),
|
||||||
|
Saylink::Silent(
|
||||||
|
fmt::format("{} help", sep->arg[0])
|
||||||
|
)
|
||||||
|
).c_str()
|
||||||
);
|
);
|
||||||
|
|
||||||
if (clientSetting) {
|
if (clientSetting) {
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ void bot_command_spell_engaged_priority(Client* c, const Seperator* sep)
|
|||||||
if (sep->IsNumber(1)) {
|
if (sep->IsNumber(1)) {
|
||||||
spell_type = atoi(sep->arg[1]);
|
spell_type = atoi(sep->arg[1]);
|
||||||
|
|
||||||
if (spell_type < BotSpellTypes::START || spell_type > BotSpellTypes::END) {
|
if (!EQ::ValueWithin(spell_type, BotSpellTypes::START, BotSpellTypes::END)) {
|
||||||
c->Message(Chat::Yellow, "You must choose a valid spell type. Spell types range from %i to %i", BotSpellTypes::START, 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;
|
return;
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ void bot_command_spell_holds(Client* c, const Seperator* sep)
|
|||||||
if (sep->IsNumber(1)) {
|
if (sep->IsNumber(1)) {
|
||||||
spell_type = atoi(sep->arg[1]);
|
spell_type = atoi(sep->arg[1]);
|
||||||
|
|
||||||
if (spell_type < BotSpellTypes::START || spell_type > BotSpellTypes::END) {
|
if (!EQ::ValueWithin(spell_type, BotSpellTypes::START, BotSpellTypes::END)) {
|
||||||
c->Message(Chat::Yellow, "You must choose a valid spell type. Spell types range from %i to %i", BotSpellTypes::START, 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;
|
return;
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ void bot_command_spell_idle_priority(Client* c, const Seperator* sep)
|
|||||||
if (sep->IsNumber(1)) {
|
if (sep->IsNumber(1)) {
|
||||||
spell_type = atoi(sep->arg[1]);
|
spell_type = atoi(sep->arg[1]);
|
||||||
|
|
||||||
if (spell_type < BotSpellTypes::START || spell_type > BotSpellTypes::END) {
|
if (!EQ::ValueWithin(spell_type, BotSpellTypes::START, BotSpellTypes::END)) {
|
||||||
c->Message(Chat::Yellow, "You must choose a valid spell type. Spell types range from %i to %i", BotSpellTypes::START, 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;
|
return;
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ void bot_command_spell_max_hp_pct(Client* c, const Seperator* sep)
|
|||||||
if (sep->IsNumber(1)) {
|
if (sep->IsNumber(1)) {
|
||||||
spell_type = atoi(sep->arg[1]);
|
spell_type = atoi(sep->arg[1]);
|
||||||
|
|
||||||
if (spell_type < BotSpellTypes::START || spell_type > BotSpellTypes::END) {
|
if (!EQ::ValueWithin(spell_type, BotSpellTypes::START, BotSpellTypes::END)) {
|
||||||
c->Message(Chat::Yellow, "You must choose a valid spell type. Spell types range from %i to %i", BotSpellTypes::START, 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;
|
return;
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ void bot_command_spell_max_mana_pct(Client* c, const Seperator* sep)
|
|||||||
if (sep->IsNumber(1)) {
|
if (sep->IsNumber(1)) {
|
||||||
spell_type = atoi(sep->arg[1]);
|
spell_type = atoi(sep->arg[1]);
|
||||||
|
|
||||||
if (spell_type < BotSpellTypes::START || spell_type > BotSpellTypes::END) {
|
if (!EQ::ValueWithin(spell_type, BotSpellTypes::START, BotSpellTypes::END)) {
|
||||||
c->Message(Chat::Yellow, "You must choose a valid spell type. Spell types range from %i to %i", BotSpellTypes::START, 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;
|
return;
|
||||||
|
|||||||
@@ -102,13 +102,17 @@ void bot_command_spell_max_thresholds(Client* c, const Seperator* sep) {
|
|||||||
|
|
||||||
if (
|
if (
|
||||||
(clientSetting && !IsClientBotSpellType(spell_type)) ||
|
(clientSetting && !IsClientBotSpellType(spell_type)) ||
|
||||||
(!clientSetting && (spell_type < BotSpellTypes::START || spell_type > BotSpellTypes::END))
|
(!clientSetting && !EQ::ValueWithin(spell_type, BotSpellTypes::START, BotSpellTypes::END))
|
||||||
) {
|
) {
|
||||||
c->Message(
|
c->Message(
|
||||||
Chat::Yellow,
|
Chat::Yellow,
|
||||||
clientSetting ? "Invalid spell type for clients." : "You must choose a valid spell type. Spell types range from %i to %i",
|
fmt::format(
|
||||||
BotSpellTypes::START,
|
"{}. Use {} for information regarding this command.",
|
||||||
BotSpellTypes::END
|
(!clientSetting ? "You must choose a valid spell type" : "You must choose a valid client spell type"),
|
||||||
|
Saylink::Silent(
|
||||||
|
fmt::format("{} help", sep->arg[0])
|
||||||
|
)
|
||||||
|
).c_str()
|
||||||
);
|
);
|
||||||
|
|
||||||
if (clientSetting) {
|
if (clientSetting) {
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ void bot_command_spell_min_hp_pct(Client* c, const Seperator* sep)
|
|||||||
if (sep->IsNumber(1)) {
|
if (sep->IsNumber(1)) {
|
||||||
spell_type = atoi(sep->arg[1]);
|
spell_type = atoi(sep->arg[1]);
|
||||||
|
|
||||||
if (spell_type < BotSpellTypes::START || spell_type > BotSpellTypes::END) {
|
if (!EQ::ValueWithin(spell_type, BotSpellTypes::START, BotSpellTypes::END)) {
|
||||||
c->Message(Chat::Yellow, "You must choose a valid spell type. Spell types range from %i to %i", BotSpellTypes::START, 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;
|
return;
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ void bot_command_spell_min_mana_pct(Client* c, const Seperator* sep)
|
|||||||
if (sep->IsNumber(1)) {
|
if (sep->IsNumber(1)) {
|
||||||
spell_type = atoi(sep->arg[1]);
|
spell_type = atoi(sep->arg[1]);
|
||||||
|
|
||||||
if (spell_type < BotSpellTypes::START || spell_type > BotSpellTypes::END) {
|
if (!EQ::ValueWithin(spell_type, BotSpellTypes::START, BotSpellTypes::END)) {
|
||||||
c->Message(Chat::Yellow, "You must choose a valid spell type. Spell types range from %i to %i", BotSpellTypes::START, 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;
|
return;
|
||||||
|
|||||||
@@ -104,13 +104,17 @@ void bot_command_spell_min_thresholds(Client* c, const Seperator* sep) {
|
|||||||
|
|
||||||
if (
|
if (
|
||||||
(clientSetting && !IsClientBotSpellType(spell_type)) ||
|
(clientSetting && !IsClientBotSpellType(spell_type)) ||
|
||||||
(!clientSetting && (spell_type < BotSpellTypes::START || spell_type > BotSpellTypes::END))
|
(!clientSetting && !EQ::ValueWithin(spell_type, BotSpellTypes::START, BotSpellTypes::END))
|
||||||
) {
|
) {
|
||||||
c->Message(
|
c->Message(
|
||||||
Chat::Yellow,
|
Chat::Yellow,
|
||||||
clientSetting ? "Invalid spell type for clients." : "You must choose a valid spell type. Spell types range from %i to %i",
|
fmt::format(
|
||||||
BotSpellTypes::START,
|
"{}. Use {} for information regarding this command.",
|
||||||
BotSpellTypes::END
|
(!clientSetting ? "You must choose a valid spell type" : "You must choose a valid client spell type"),
|
||||||
|
Saylink::Silent(
|
||||||
|
fmt::format("{} help", sep->arg[0])
|
||||||
|
)
|
||||||
|
).c_str()
|
||||||
);
|
);
|
||||||
|
|
||||||
if (clientSetting) {
|
if (clientSetting) {
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ void bot_command_spell_pursue_priority(Client* c, const Seperator* sep)
|
|||||||
if (sep->IsNumber(1)) {
|
if (sep->IsNumber(1)) {
|
||||||
spell_type = atoi(sep->arg[1]);
|
spell_type = atoi(sep->arg[1]);
|
||||||
|
|
||||||
if (spell_type < BotSpellTypes::START || spell_type > BotSpellTypes::END) {
|
if (!EQ::ValueWithin(spell_type, BotSpellTypes::START, BotSpellTypes::END)) {
|
||||||
c->Message(Chat::Yellow, "You must choose a valid spell type. Spell types range from %i to %i", BotSpellTypes::START, 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;
|
return;
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ void bot_command_spell_target_count(Client* c, const Seperator* sep)
|
|||||||
if (sep->IsNumber(1)) {
|
if (sep->IsNumber(1)) {
|
||||||
spell_type = atoi(sep->arg[1]);
|
spell_type = atoi(sep->arg[1]);
|
||||||
|
|
||||||
if (spell_type < BotSpellTypes::START || spell_type > BotSpellTypes::END) {
|
if (!EQ::ValueWithin(spell_type, BotSpellTypes::START, BotSpellTypes::END)) {
|
||||||
c->Message(Chat::Yellow, "You must choose a valid spell type. Spell types range from %i to %i", BotSpellTypes::START, 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;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user