[Bots] Prevents casting on ineligible targets due to target type, stacking, etc. (#4680)

- Prevents casting on ineligible targets due to target type, stacking, etc.
- Adjust the rules Bots, MezChance, Bots, MezSuccessDelay and Bots, MezFailDelay
This commit is contained in:
nytmyr
2025-02-15 15:01:39 -06:00
committed by GitHub
parent 8a5f885558
commit b0c951bd6e
2 changed files with 4 additions and 8 deletions
+1 -5
View File
@@ -9711,10 +9711,6 @@ bool Bot::CastChecks(uint16 spell_id, Mob* tar, uint16 spell_type, bool precheck
return false;
}
if (IsCommandedSpell()) { //stop checks here for commanded spells
return true;
}
if (!IsValidTargetType(spell_id, GetSpellTargetType(spell_id), tar->GetBodyType())) {
LogBotSpellChecksDetail("{} says, 'Cancelling cast of {} on {} due to IsValidTargetType.'", GetCleanName(), GetSpellName(spell_id), tar->GetCleanName());
return false;
@@ -9751,7 +9747,7 @@ bool Bot::CastChecks(uint16 spell_id, Mob* tar, uint16 spell_type, bool precheck
return false;
}
if (spell_type == UINT16_MAX) { //AA/Forced cast checks, return here
if (IsCommandedSpell() || spell_type == UINT16_MAX) { //AA/Forced cast checks, return here
return true;
}