mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 01:37:00 +00:00
[11762] move IsCastEndProcModifierAura to more fitting place
This commit is contained in:
parent
43e45c2b35
commit
31e983a692
3 changed files with 37 additions and 35 deletions
|
|
@ -1404,6 +1404,41 @@ void SpellMgr::LoadSpellProcItemEnchant()
|
|||
sLog.outString( ">> Loaded %u proc item enchant definitions", count );
|
||||
}
|
||||
|
||||
bool IsCastEndProcModifierAura(SpellEntry const *spellInfo, SpellEffectIndex effecIdx, SpellEntry const *procSpell)
|
||||
{
|
||||
// modifier auras that can proc on cast end
|
||||
switch (AuraType(spellInfo->EffectApplyAuraName[effecIdx]))
|
||||
{
|
||||
case SPELL_AURA_ADD_FLAT_MODIFIER:
|
||||
case SPELL_AURA_ADD_PCT_MODIFIER:
|
||||
{
|
||||
switch (spellInfo->EffectMiscValue[effecIdx])
|
||||
{
|
||||
case SPELLMOD_RANGE:
|
||||
case SPELLMOD_RADIUS:
|
||||
case SPELLMOD_NOT_LOSE_CASTING_TIME:
|
||||
case SPELLMOD_CASTING_TIME:
|
||||
case SPELLMOD_COOLDOWN:
|
||||
case SPELLMOD_COST:
|
||||
case SPELLMOD_GLOBAL_COOLDOWN:
|
||||
return true;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
case SPELL_AURA_MOD_DAMAGE_PERCENT_DONE:
|
||||
{
|
||||
for (int32 i = 0; i < MAX_EFFECT_INDEX; ++i)
|
||||
if (IsEffectHandledOnDelayedSpellLaunch(procSpell, SpellEffectIndex(i)))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
struct DoSpellBonuses
|
||||
{
|
||||
DoSpellBonuses(SpellBonusMap& _spellBonusMap, SpellBonusEntry const& _spellBonus) : spellBonusMap(_spellBonusMap), spellBonus(_spellBonus) {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue