diff --git a/sql/updates/world/custom/custom_2019_05_10_00_world.sql b/sql/updates/world/custom/custom_2019_05_10_00_world.sql new file mode 100644 index 00000000000..b44fd4dd541 --- /dev/null +++ b/sql/updates/world/custom/custom_2019_05_10_00_world.sql @@ -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); diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index 75f4fe6e43a..b88df9e49fd 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -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(); diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.h b/src/server/game/Spells/Auras/SpellAuraEffects.h index f2f808f832a..80359eb25c1 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.h +++ b/src/server/game/Spells/Auras/SpellAuraEffects.h @@ -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);