Correct pet buff type logic to catch DS/Resists with other spell effects in them

This commit is contained in:
nytmyr
2025-01-31 15:40:47 -06:00
parent c5aa1ea06f
commit e5bcb6acfc
4 changed files with 64 additions and 7 deletions
+4 -3
View File
@@ -11572,7 +11572,8 @@ bool Bot::IsValidSpellTypeBySpellID(uint16 spell_type, uint16 spell_id) {
case BotSpellTypes::PetBuffs:
if (
IsResistanceOnlySpell(spell_id) ||
IsDamageShieldOnlySpell(spell_id)
IsDamageShieldOnlySpell(spell_id) ||
IsDamageShieldAndResistSpell(spell_id)
) {
return false;
}
@@ -11580,14 +11581,14 @@ bool Bot::IsValidSpellTypeBySpellID(uint16 spell_type, uint16 spell_id) {
return true;
case BotSpellTypes::ResistBuffs:
case BotSpellTypes::PetResistBuffs:
if (IsResistanceOnlySpell(spell_id)) {
if (IsResistanceBuffSpell(spell_id)) {
return true;
}
return false;
case BotSpellTypes::DamageShields:
case BotSpellTypes::PetDamageShields:
if (IsDamageShieldOnlySpell(spell_id)) {
if (IsEffectInSpell(spell_id, SE_DamageShield)) {
return true;
}
+1 -4
View File
@@ -32,10 +32,7 @@ bool Bot::AICastSpell(Mob* tar, uint8 chance, uint16 spell_type, uint16 sub_targ
!AI_HasSpells() ||
(spell_type == BotSpellTypes::Pet && tar != this) ||
(IsPetBotSpellType(spell_type) && !tar->IsPet()) ||
(spell_type == BotSpellTypes::Buff && tar->IsPet()) ||
(spell_type == BotSpellTypes::InCombatBuffSong && tar->IsPet()) ||
(spell_type == BotSpellTypes::OutOfCombatBuffSong && tar->IsPet()) ||
(spell_type == BotSpellTypes::PreCombatBuffSong && tar->IsPet()) ||
(!IsPetBotSpellType(spell_type) && tar->IsPet()) ||
(!RuleB(Bots, AllowBuffingHealingFamiliars) && tar->IsFamiliar()) ||
(tar->IsPet() && tar->IsCharmed() && spell_type == BotSpellTypes::PetBuffs && !RuleB(Bots, AllowCharmedPetBuffs)) ||
(tar->IsPet() && tar->IsCharmed() && spell_type == BotSpellTypes::PetCures && !RuleB(Bots, AllowCharmedPetCures)) ||