[AI] Add Support to Heals to allow Trigger based spells (#2709)

This commit is contained in:
Aeadoin
2023-01-07 19:04:41 -05:00
committed by GitHub
parent 5f244c2dd2
commit 2253e43d2c
3 changed files with 119 additions and 23 deletions
+2 -2
View File
@@ -1801,7 +1801,7 @@ std::list<BotSpell> Bot::GetBotSpellsForSpellEffect(Bot* botCaster, int spellEff
continue;
}
if (IsEffectInSpell(botSpellList[i].spellid, spellEffect)) {
if (IsEffectInSpell(botSpellList[i].spellid, spellEffect) || GetTriggerSpellID(botSpellList[i].spellid, spellEffect)) {
BotSpell botSpell;
botSpell.SpellId = botSpellList[i].spellid;
botSpell.SpellIndex = i;
@@ -1833,7 +1833,7 @@ std::list<BotSpell> Bot::GetBotSpellsForSpellEffectAndTargetType(Bot* botCaster,
continue;
}
if (IsEffectInSpell(botSpellList[i].spellid, spellEffect)) {
if (IsEffectInSpell(botSpellList[i].spellid, spellEffect) || GetTriggerSpellID(botSpellList[i].spellid, spellEffect)) {
if (spells[botSpellList[i].spellid].target_type == targetType) {
BotSpell botSpell;
botSpell.SpellId = botSpellList[i].spellid;