[Bot] Add Buff support for Bards under AI_IdleCastChecks (#2590)

* [Bot] Add Buff support for Bards under AI_IdleCastChecks

* Add InCombatBuffSong to Idle Bard cast Logic

* Fixes a number of Buffs that would fail to land on the Bot, causing casting loops

* Accidently removed If Statement added back.

* Update bot.cpp

Co-authored-by: Alex King <89047260+Kinglykrab@users.noreply.github.com>
This commit is contained in:
Aeadoin
2022-11-28 16:35:51 -05:00
committed by GitHub
parent 200c6cccaf
commit e928754df3
2 changed files with 32 additions and 94 deletions
+9 -8
View File
@@ -1291,7 +1291,6 @@ bool Bot::AI_IdleCastCheck() {
if (!AICastSpell(this, 100, SpellType_Buff)) {
if (!AICastSpell(GetPet(), 100, SpellType_Heal)) {
if (!entity_list.Bot_AICheckCloseBeneficialSpells(this, 100, BotAISpellRange, SpellType_Buff)) {
//
}
}
}
@@ -1313,7 +1312,6 @@ bool Bot::AI_IdleCastCheck() {
if (!AICastSpell(GetPet(), 100, SpellType_Heal)) {
if (!entity_list.Bot_AICheckCloseBeneficialSpells(this, 100, BotAISpellRange, SpellType_PreCombatBuff)) {
if (!entity_list.Bot_AICheckCloseBeneficialSpells(this, 100, BotAISpellRange, SpellType_Buff)) {
//
}
}
}
@@ -1331,7 +1329,6 @@ bool Bot::AI_IdleCastCheck() {
if (!AICastSpell(this, 100, SpellType_Buff)) {
if (!AICastSpell(GetPet(), 100, SpellType_Heal)) {
if (!entity_list.Bot_AICheckCloseBeneficialSpells(this, 100, BotAISpellRange, SpellType_Buff)) {
//
}
}
}
@@ -1347,17 +1344,21 @@ bool Bot::AI_IdleCastCheck() {
case BARD: {
if (pre_combat) {
if (!entity_list.Bot_AICheckCloseBeneficialSpells(this, 100, BotAISpellRange, SpellType_Cure)) {
if (!AICastSpell(this, 100, SpellType_PreCombatBuffSong)) {
if (!AICastSpell(this, 100, SpellType_InCombatBuffSong)) {
//
if (!AICastSpell(this, 100, SpellType_Buff)) {
if (!AICastSpell(this, 100, SpellType_PreCombatBuffSong)) {
if (!AICastSpell(this, 100, SpellType_InCombatBuffSong)) {
}
}
}
}
}
else {
if (!entity_list.Bot_AICheckCloseBeneficialSpells(this, 100, BotAISpellRange, SpellType_Cure)) {
if (!AICastSpell(this, 100, SpellType_OutOfCombatBuffSong)) {
//
if (!AICastSpell(this, 100, SpellType_Buff)) {
if (!AICastSpell(this, 100, SpellType_OutOfCombatBuffSong)) {
if (!AICastSpell(this, 100, SpellType_InCombatBuffSong)) {
}
}
}
}
}