mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 19:37:02 +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 );
|
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
|
struct DoSpellBonuses
|
||||||
{
|
{
|
||||||
DoSpellBonuses(SpellBonusMap& _spellBonusMap, SpellBonusEntry const& _spellBonus) : spellBonusMap(_spellBonusMap), spellBonus(_spellBonus) {}
|
DoSpellBonuses(SpellBonusMap& _spellBonusMap, SpellBonusEntry const& _spellBonus) : spellBonusMap(_spellBonusMap), spellBonus(_spellBonus) {}
|
||||||
|
|
|
||||||
|
|
@ -164,40 +164,7 @@ inline bool IsPeriodicRegenerateEffect(SpellEntry const *spellInfo, SpellEffectI
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool IsCastEndProcModifierAura(SpellEntry const *spellInfo, SpellEffectIndex effecIdx, SpellEntry const *procSpell)
|
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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
inline bool IsSpellHaveAura(SpellEntry const *spellInfo, AuraType aura)
|
inline bool IsSpellHaveAura(SpellEntry const *spellInfo, AuraType aura)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "11761"
|
#define REVISION_NR "11762"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue