[Bots] Correct helper message for forced casts (#4656)

* Fixed helper message for forced casts

* Update bot.cpp

---------

Co-authored-by: Kinglykrab <kinglykrab@gmail.com>
This commit is contained in:
nytmyr 2025-02-07 13:32:32 -06:00 committed by GitHub
parent 05c7e6409d
commit bc6b21f601
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -11278,7 +11278,13 @@ bool Bot::AttemptAACastSpell(Mob* tar, uint16 spell_id, AA::Rank* rank) {
} }
if (!CastChecks(spell_id, tar, UINT16_MAX)) { if (!CastChecks(spell_id, tar, UINT16_MAX)) {
GetBotOwner()->Message(Chat::Red, "%s says, 'Ability failed to cast. This could be due to this to any number of things: range, mana, immune, target type, etc.'", GetCleanName()); GetBotOwner()->Message(
Chat::Red,
fmt::format(
"{} says, 'Ability failed to cast. This could be due to any number of things: range, mana, line of sight, immune, target type, etc.'",
GetCleanName()
).c_str()
);
return false; return false;
} }
@ -11315,7 +11321,13 @@ bool Bot::AttemptAACastSpell(Mob* tar, uint16 spell_id, AA::Rank* rank) {
SetSpellRecastTimer(spell_id, timer_duration); SetSpellRecastTimer(spell_id, timer_duration);
} }
else { else {
GetBotOwner()->Message(Chat::Red, "%s says, 'Ability failed to cast. This could be due to this to any number of things: range, mana, immune, target type, etc.'", GetCleanName()); GetBotOwner()->Message(
Chat::Red,
fmt::format(
"{} says, 'Ability failed to cast. This could be due to any number of things: range, mana, line of sight, immune, target type, etc.'",
GetCleanName()
).c_str()
);
return false; return false;
} }
@ -11394,8 +11406,12 @@ bool Bot::AttemptForcedCastSpell(Mob* tar, uint16 spell_id, bool is_disc) {
if (!CastChecks(spell_id, tar, UINT16_MAX)) { if (!CastChecks(spell_id, tar, UINT16_MAX)) {
GetBotOwner()->Message( GetBotOwner()->Message(
Chat::Red, Chat::Red,
fmt::format("{} says, 'Ability failed to cast. This could be due to range, mana, immune, target type, etc.'", GetBotOwner()->GetCleanName()).c_str() fmt::format(
"{} says, 'Ability failed to cast. This could be due to any number of things: range, mana, line of sight, immune, target type, etc.'",
GetCleanName()
).c_str()
); );
return false; return false;
} }