From ffa8136f94cd7b5f6ba1b5498ec3a6fa281d0e1f Mon Sep 17 00:00:00 2001 From: trickerer Date: Wed, 30 Oct 2024 07:22:15 +0700 Subject: [PATCH] NPCBots: Fix TriggerCastFlags in bot_ai::CastBotItemCombatSpell --- src/server/game/AI/NpcBots/bot_ai.cpp | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/server/game/AI/NpcBots/bot_ai.cpp b/src/server/game/AI/NpcBots/bot_ai.cpp index a73a5a1b41621a..2f0a37949cda73 100644 --- a/src/server/game/AI/NpcBots/bot_ai.cpp +++ b/src/server/game/AI/NpcBots/bot_ai.cpp @@ -16243,11 +16243,7 @@ void bot_ai::CastBotItemCombatSpell(DamageInfo const& damageInfo, Item* item, It chance = me->GetWeaponProcChance(); if (roll_chance_f(chance)) - { - //CastSpellExtraArgs args(item); - //me->CastSpell(damageInfo.GetVictim(), spellInfo->Id, args); - me->CastSpell(damageInfo.GetVictim(), spellInfo, false, item); - } + me->CastSpell(damageInfo.GetVictim(), spellInfo, TriggerCastFlags(TRIGGERED_FULL_MASK & ~TRIGGERED_IGNORE_SPELL_AND_CATEGORY_CD), item); } } @@ -16319,11 +16315,7 @@ void bot_ai::CastBotItemCombatSpell(DamageInfo const& damageInfo, Item* item, It chance = 100.0f; if (roll_chance_f(chance)) - { - //CastSpellExtraArgs args(item); - //me->CastSpell(spellInfo->IsPositive() ? me : damageInfo.GetVictim(), spellInfo->Id, args); - me->CastSpell(spellInfo->IsPositive() ? me : damageInfo.GetVictim(), spellInfo->Id, false, item); - } + me->CastSpell(spellInfo->IsPositive() ? me : damageInfo.GetVictim(), spellInfo, TriggerCastFlags(TRIGGERED_FULL_MASK & ~TRIGGERED_IGNORE_SPELL_AND_CATEGORY_CD), item); } } }