Skip to content

Commit

Permalink
NPCBots: Fix TriggerCastFlags in bot_ai::CastBotItemCombatSpell
Browse files Browse the repository at this point in the history
  • Loading branch information
trickerer committed Oct 30, 2024
1 parent ab685c9 commit ffa8136
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions src/server/game/AI/NpcBots/bot_ai.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down Expand Up @@ -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);
}
}
}
Expand Down

0 comments on commit ffa8136

Please sign in to comment.