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

This commit is contained in:
Aeadoin authored and GitHub committed 2023-01-07 19:04:41 -05:00
1 parent 5f244c2dd2
commit 2253e43d2c
3 files changed
+119 -23

No files matched your search

+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;