Core/Spells: Allow filtering procs in FINISH phase by SpellTypeMask
This commit is contained in:
1 parent
268f1df2f5
commit
a70d85e565
2 files changed
+8
-1
No files matched your search
@@ -651,6 +651,7 @@ m_caster((info->HasAttribute(SPELL_ATTR6_ORIGINATE_FROM_CONTROLLER) && caster->G
|
|||||||
m_procAttacker = PROC_FLAG_NONE;
|
m_procAttacker = PROC_FLAG_NONE;
|
||||||
m_procVictim = PROC_FLAG_NONE;
|
m_procVictim = PROC_FLAG_NONE;
|
||||||
m_hitMask = PROC_HIT_NONE;
|
m_hitMask = PROC_HIT_NONE;
|
||||||
|
m_procSpellType = PROC_SPELL_TYPE_NONE;
|
||||||
focusObject = nullptr;
|
focusObject = nullptr;
|
||||||
m_cast_count = 0;
|
m_cast_count = 0;
|
||||||
m_glyphIndex = 0;
|
m_glyphIndex = 0;
|
||||||
@@ -2828,6 +2829,7 @@ void Spell::TargetInfo::DoDamageAndTriggers(Spell* spell)
|
|||||||
|
|
||||||
// set hitmask for finish procs
|
// set hitmask for finish procs
|
||||||
spell->m_hitMask |= hitMask;
|
spell->m_hitMask |= hitMask;
|
||||||
|
spell->m_procSpellType |= procSpellType;
|
||||||
|
|
||||||
// Do not take combo points on dodge and miss
|
// Do not take combo points on dodge and miss
|
||||||
if (MissCondition != SPELL_MISS_NONE && spell->m_needComboPoints && spell->m_targets.GetUnitTargetGUID() == TargetGUID)
|
if (MissCondition != SPELL_MISS_NONE && spell->m_needComboPoints && spell->m_targets.GetUnitTargetGUID() == TargetGUID)
|
||||||
@@ -3905,7 +3907,10 @@ void Spell::handle_immediate()
|
|||||||
|
|
||||||
// consider spell hit for some spells without target, so they may proc on finish phase correctly
|
// consider spell hit for some spells without target, so they may proc on finish phase correctly
|
||||||
if (m_UniqueTargetInfo.empty())
|
if (m_UniqueTargetInfo.empty())
|
||||||
|
{
|
||||||
m_hitMask = PROC_HIT_NORMAL;
|
m_hitMask = PROC_HIT_NORMAL;
|
||||||
|
m_procSpellType = PROC_SPELL_TYPE_NO_DMG_HEAL;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
DoProcessTargetContainer(m_UniqueTargetInfo);
|
DoProcessTargetContainer(m_UniqueTargetInfo);
|
||||||
|
|
||||||
@@ -4107,7 +4112,7 @@ void Spell::_handle_finish_phase()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Unit::ProcSkillsAndAuras(m_originalCaster, nullptr, procAttacker, PROC_FLAG_NONE, PROC_SPELL_TYPE_MASK_ALL, PROC_SPELL_PHASE_FINISH, m_hitMask, this, nullptr, nullptr);
|
Unit::ProcSkillsAndAuras(m_originalCaster, nullptr, procAttacker, PROC_FLAG_NONE, m_procSpellType, PROC_SPELL_PHASE_FINISH, m_hitMask, this, nullptr, nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Spell::SendSpellCooldown()
|
void Spell::SendSpellCooldown()
|
||||||
|
|||||||
@@ -67,6 +67,7 @@ enum CurrentSpellTypes : uint8;
|
|||||||
enum LootType : uint8;
|
enum LootType : uint8;
|
||||||
enum ProcFlags : uint32;
|
enum ProcFlags : uint32;
|
||||||
enum ProcFlagsHit : uint32;
|
enum ProcFlagsHit : uint32;
|
||||||
|
enum ProcFlagsSpellType : uint32;
|
||||||
enum SpellTargetCheckTypes : uint8;
|
enum SpellTargetCheckTypes : uint8;
|
||||||
enum SpellTargetObjectTypes : uint8;
|
enum SpellTargetObjectTypes : uint8;
|
||||||
enum SpellValueMod : int32;
|
enum SpellValueMod : int32;
|
||||||
@@ -559,6 +560,7 @@ class TC_GAME_API Spell
|
|||||||
ProcFlags m_procAttacker; // Attacker trigger flags
|
ProcFlags m_procAttacker; // Attacker trigger flags
|
||||||
ProcFlags m_procVictim; // Victim trigger flags
|
ProcFlags m_procVictim; // Victim trigger flags
|
||||||
ProcFlagsHit m_hitMask;
|
ProcFlagsHit m_hitMask;
|
||||||
|
ProcFlagsSpellType m_procSpellType; // for finish procs
|
||||||
void prepareDataForTriggerSystem();
|
void prepareDataForTriggerSystem();
|
||||||
|
|
||||||
// *****************************************
|
// *****************************************
|
||||||
|
|||||||
Reference in new issue
Block a user