^cast adjustments for spellid casts

This commit is contained in:
nytmyr
2024-12-12 07:59:54 -06:00
parent 186b06ef47
commit 783a5f0adf
3 changed files with 10 additions and 1 deletions
+8
View File
@@ -11195,6 +11195,14 @@ bool Bot::AttemptForcedCastSpell(Mob* tar, uint16 spell_id) {
tar = this;
}
if ((IsCharmSpell(forcedSpellID) || IsPetSpell(forcedSpellID) && HasPet())) {
return false;
}
if (IsResurrectSpell(forcedSpellID) && (!tar->IsCorpse() || !tar->CastToCorpse()->IsPlayerCorpse())) {
return false;
}
if (IsBeneficialSpell(forcedSpellID)) {
if (
(tar->IsNPC() && !tar->GetOwner()) ||