Skip to content

Commit

Permalink
Core/Spells: Move Missile Barrage, Hot Streak and Brain Freeze mage t…
Browse files Browse the repository at this point in the history
…alents to proc system. Also implement T8 4P Bonus.

Closes #1536
  • Loading branch information
ariel- committed Sep 1, 2016
1 parent 9f15482 commit 81ec57b
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 8 deletions.
5 changes: 5 additions & 0 deletions sql/updates/world/3.3.5/2016_08_31_01_world_335.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
DELETE FROM `spell_proc_event` WHERE `entry` IN (44401, 48108, 57761);
INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `SpellFamilyMask0`, `SpellFamilyMask1`, `SpellFamilyMask2`, `procFlags`, `procEx`, `ppmRate`, `CustomChance`, `Cooldown`) VALUES
(44401, 0, 3, 0x00000800, 0x00000000, 0x00000000, 4096, 0, 0, 0, 0),
(48108, 0, 3, 0x00400000, 0x00000000, 0x00000000, 65536, 0, 0, 0, 0),
(57761, 0, 3, 0x00000001, 0x00001000, 0x00000000, 65536, 0, 0, 0, 0);
25 changes: 25 additions & 0 deletions src/server/game/Entities/Unit/Unit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7621,6 +7621,31 @@ bool Unit::HandleAuraProc(Unit* victim, uint32 damage, Aura* triggeredByAura, Sp
CastCustomSpell(this, 67545, &bp0, NULL, NULL, true, NULL, triggeredByAura->GetEffect(EFFECT_0), GetGUID());
return true;
}
case 44401: //Missile Barrage
case 48108: //Hot Streak
case 57761: //Fireball!
{
*handled = true;

// Prevent double proc for Arcane missiles
if (this == victim)
return false;

if (HasAura(70752)) // Item - Mage T10 2P Bonus
CastSpell((Unit*)nullptr, 70753, true);

// Proc chance is unknown, we'll just use dummy aura amount
if (AuraEffect const* aurEff = GetAuraEffect(64869, EFFECT_0)) // Item - Mage T8 4P Bonus
if (roll_chance_i(aurEff->GetAmount())) // do not proc charges
return false;

// @workaround: We'll take care of removing the aura on next update tick
// This is needed for 44401 to affect Arcane Missiles, else the spellmod will not be applied
// it only works because EventProcessor will always update first scheduled event,
// as cast is already in progress the SpellEvent for Arcane Missiles is already in queue.
triggeredByAura->DropChargeDelayed(1);
return false;
}
}
break;
}
Expand Down
8 changes: 0 additions & 8 deletions src/server/game/Spells/Auras/SpellAuras.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1406,14 +1406,6 @@ void Aura::HandleAuraSpecificMods(AuraApplication const* aurApp, Unit* caster, b
// Remove the IGNORE_AURASTATE aura
target->RemoveAurasDueToSpell(44544);
break;
case 44401: //Missile Barrage
case 48108: //Hot Streak
case 57761: //Fireball!
if (removeMode != AURA_REMOVE_BY_EXPIRE || aurApp->GetBase()->IsExpired())
break;
if (target->HasAura(70752)) //Item - Mage T10 2P Bonus
target->CastSpell(target, 70753, true);
break;
default:
break;
}
Expand Down

0 comments on commit 81ec57b

Please sign in to comment.