Implmenet PetCures, add some missing types for defaults/chance to cast

This commit is contained in:
nytmyr
2024-12-20 09:38:40 -06:00
parent 54b9825537
commit 322f8c5ffd
5 changed files with 157 additions and 118 deletions
+3 -1
View File
@@ -38,7 +38,7 @@ bool Bot::AICastSpell(Mob* tar, uint8 iChance, uint16 spellType, uint16 subTarge
(spellType == BotSpellTypes::PreCombatBuffSong && tar->IsPet()) ||
(!RuleB(Bots, AllowBuffingHealingFamiliars) && tar->IsFamiliar()) ||
(tar->IsPet() && tar->IsCharmed() && spellType == BotSpellTypes::PetBuffs && !RuleB(Bots, AllowCharmedPetBuffs)) ||
(tar->IsPet() && tar->IsCharmed() && (spellType == BotSpellTypes::Cure || spellType == BotSpellTypes::GroupCures) && !RuleB(Bots, AllowCharmedPetCures)) ||
(tar->IsPet() && tar->IsCharmed() && spellType == BotSpellTypes::PetCures && !RuleB(Bots, AllowCharmedPetCures)) ||
(tar->IsPet() && tar->IsCharmed() && IsHealBotSpellType(spellType) && !RuleB(Bots, AllowCharmedPetHeals))
) {
return false;
@@ -189,6 +189,7 @@ bool Bot::AICastSpell(Mob* tar, uint8 iChance, uint16 spellType, uint16 subTarge
return BotCastHeal(tar, botClass, botSpell, spellType);
case BotSpellTypes::GroupCures:
case BotSpellTypes::Cure:
case BotSpellTypes::PetCures:
if (!tar->IsOfClientBot() && !(tar->IsPet() && tar->GetOwner() && tar->GetOwner()->IsOfClientBot())) {
return false;
}
@@ -2093,6 +2094,7 @@ uint8 Bot::GetChanceToCastBySpellType(uint16 spellType)
case BotSpellTypes::Debuff:
return RuleI(Bots, PercentChanceToCastDebuff);
case BotSpellTypes::Cure:
case BotSpellTypes::PetCures:
return RuleI(Bots, PercentChanceToCastCure);
case BotSpellTypes::GroupCures:
return RuleI(Bots, PercentChanceToCastGroupCure);