mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 08:55:32 +01:00
Core/Spells: implement SPELL_AURA_PROC_TRIGGER_SPELL_COPY
* fixed proc for Dragonwrath, Tarecgosa's Rest
This commit is contained in:
3
sql/updates/world/custom/custom_2019_05_10_00_world.sql
Normal file
3
sql/updates/world/custom/custom_2019_05_10_00_world.sql
Normal file
@@ -0,0 +1,3 @@
|
||||
DELETE FROM `spell_proc` WHERE `SpellId`= 101056;
|
||||
INSERT INTO `spell_proc` (`SpellId`, `SpellFamilyName`, `SpellFamilyMask0`, `SpellFamilyMask1`, `SpellFamilyMask2`, `ProcFlags`, `SpellTypeMask`, `SpellPhaseMask`, `HitMask`, `AttributesMask`, `Chance`, `Cooldown`) VALUES
|
||||
(101056 , 0, 0, 0, 0, 0, 1, 2, 0, 0, 9, 0);
|
||||
@@ -424,7 +424,7 @@ pAuraEffectHandler AuraEffectHandler[TOTAL_AURAS]=
|
||||
&AuraEffect::HandleNULL, //357 SPELL_AURA_ENABLE_BOSS1_UNIT_FRAME
|
||||
&AuraEffect::HandleNULL, //358 SPELL_AURA_358
|
||||
&AuraEffect::HandleNULL, //359 SPELL_AURA_359
|
||||
&AuraEffect::HandleNULL, //360 SPELL_AURA_PROC_TRIGGER_SPELL_COPY
|
||||
&AuraEffect::HandleNoImmediateEffect, //360 SPELL_AURA_PROC_TRIGGER_SPELL_COPY implemented in AuraEffect::HandleProc
|
||||
&AuraEffect::HandleNULL, //361 SPELL_AURA_OVERRIDE_AUTOATTACK_WITH_MELEE_SPELL
|
||||
&AuraEffect::HandleUnused, //362 unused (4.3.4)
|
||||
&AuraEffect::HandleNULL, //363 SPELL_AURA_MOD_NEXT_SPELL
|
||||
@@ -1120,6 +1120,7 @@ bool AuraEffect::CheckEffectProc(AuraApplication* aurApp, ProcEventInfo& eventIn
|
||||
case SPELL_AURA_PROC_TRIGGER_SPELL:
|
||||
case SPELL_AURA_PROC_TRIGGER_SPELL_WITH_VALUE:
|
||||
case SPELL_AURA_PROC_ON_POWER_AMOUNT:
|
||||
case SPELL_AURA_PROC_TRIGGER_SPELL_COPY:
|
||||
{
|
||||
// Don't proc extra attacks while already processing extra attack spell
|
||||
uint32 triggerSpellId = GetSpellInfo()->Effects[GetEffIndex()].TriggerSpell;
|
||||
@@ -1171,6 +1172,9 @@ void AuraEffect::HandleProc(AuraApplication* aurApp, ProcEventInfo& eventInfo)
|
||||
case SPELL_AURA_PROC_ON_POWER_AMOUNT:
|
||||
HandleProcOnPowerAmountAuraProc(aurApp, eventInfo);
|
||||
break;
|
||||
case SPELL_AURA_PROC_TRIGGER_SPELL_COPY:
|
||||
HandleProcTriggerSpellCopyAuraProc(aurApp, eventInfo);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -6186,6 +6190,18 @@ void AuraEffect::HandleProcTriggerSpellAuraProc(AuraApplication* aurApp, ProcEve
|
||||
TC_LOG_ERROR("spells","AuraEffect::HandleProcTriggerSpellAuraProc: Could not trigger spell %u from aura %u proc, because the spell does not have an entry in Spell.dbc.", triggerSpellId, GetId());
|
||||
}
|
||||
|
||||
void AuraEffect::HandleProcTriggerSpellCopyAuraProc(AuraApplication* aurApp, ProcEventInfo& eventInfo)
|
||||
{
|
||||
Unit* triggerCaster = aurApp->GetTarget();
|
||||
Unit* triggerTarget = eventInfo.GetProcTarget();
|
||||
SpellInfo const* triggeredSpellInfo = eventInfo.GetSpellInfo();
|
||||
if (!triggeredSpellInfo)
|
||||
return;
|
||||
|
||||
TC_LOG_DEBUG("spells", "AuraEffect::HandleProcTriggerSpellAuraProc: Triggering spell %u from aura %u proc", triggeredSpellInfo->Id, GetId());
|
||||
triggerCaster->CastSpell(triggerTarget, triggeredSpellInfo, true, nullptr, this);
|
||||
}
|
||||
|
||||
void AuraEffect::HandleProcTriggerSpellWithValueAuraProc(AuraApplication* aurApp, ProcEventInfo& eventInfo)
|
||||
{
|
||||
Unit* triggerCaster = aurApp->GetTarget();
|
||||
|
||||
@@ -316,6 +316,7 @@ class TC_GAME_API AuraEffect
|
||||
// aura effect proc handlers
|
||||
void HandleBreakableCCAuraProc(AuraApplication* aurApp, ProcEventInfo& eventInfo);
|
||||
void HandleProcTriggerSpellAuraProc(AuraApplication* aurApp, ProcEventInfo& eventInfo);
|
||||
void HandleProcTriggerSpellCopyAuraProc(AuraApplication* aurApp, ProcEventInfo& eventInfo);
|
||||
void HandleProcTriggerSpellWithValueAuraProc(AuraApplication* aurApp, ProcEventInfo& eventInfo);
|
||||
void HandleProcTriggerDamageAuraProc(AuraApplication* aurApp, ProcEventInfo& eventInfo);
|
||||
void HandleRaidProcFromChargeAuraProc(AuraApplication* aurApp, ProcEventInfo& eventInfo);
|
||||
|
||||
Reference in New Issue
Block a user