Fix Vigilance.
Implements Glyph of Vigilance. Fixes issue #1134. Thanks Bodompelle for the idea, even thought the fix is rather different. --HG-- branch : trunk
This commit is contained in:
@@ -0,0 +1 @@
|
|||||||
|
DELETE FROM `spell_linked_spell` WHERE `spell_trigger`=50720;
|
||||||
@@ -6006,7 +6006,6 @@ INSERT INTO `spell_linked_spell` (`spell_trigger`,`spell_effect`,`type`,`comment
|
|||||||
( 32390, 60467, 2, 'Shadow Embrace Rank4'),
|
( 32390, 60467, 2, 'Shadow Embrace Rank4'),
|
||||||
( 32391, 60468, 2, 'Shadow Embrace Rank5'),
|
( 32391, 60468, 2, 'Shadow Embrace Rank5'),
|
||||||
( 33206, 44416, 2, 'Pain Suppression (threat)'),
|
( 33206, 44416, 2, 'Pain Suppression (threat)'),
|
||||||
( 50720, 59665, 0, 'Vigilance (redirect threat)'),
|
|
||||||
( 52610, 62071, 0, 'Savage Roar'),
|
( 52610, 62071, 0, 'Savage Roar'),
|
||||||
(-52610,-62071, 0, 'Savage Roar'),
|
(-52610,-62071, 0, 'Savage Roar'),
|
||||||
( 51209, 55095, 1, 'Hungering cold - frost fever'),
|
( 51209, 55095, 1, 'Hungering cold - frost fever'),
|
||||||
|
|||||||
@@ -1320,6 +1320,17 @@ void Aura::HandleAuraSpecificMods(AuraApplication const * aurApp, Unit * caster,
|
|||||||
// mods at aura apply or remove
|
// mods at aura apply or remove
|
||||||
switch (GetSpellProto()->SpellFamilyName)
|
switch (GetSpellProto()->SpellFamilyName)
|
||||||
{
|
{
|
||||||
|
case SPELLFAMILY_GENERIC:
|
||||||
|
switch(GetId())
|
||||||
|
{
|
||||||
|
case 50720: // Vigilance
|
||||||
|
if (apply)
|
||||||
|
target->CastSpell(caster, 59665, true, 0, 0, caster->GetGUID());
|
||||||
|
else
|
||||||
|
target->SetReducedThreatPercent(0,0);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
case SPELLFAMILY_ROGUE:
|
case SPELLFAMILY_ROGUE:
|
||||||
// Stealth
|
// Stealth
|
||||||
if (GetSpellProto()->SpellFamilyFlags[0] & 0x00400000)
|
if (GetSpellProto()->SpellFamilyFlags[0] & 0x00400000)
|
||||||
|
|||||||
@@ -384,9 +384,16 @@ void ThreatManager::addThreat(Unit* pVictim, float fThreat, SpellSchoolMask scho
|
|||||||
// must check > 0.0f, otherwise dead loop
|
// must check > 0.0f, otherwise dead loop
|
||||||
if (threat > 0.0f && pVictim->GetReducedThreatPercent())
|
if (threat > 0.0f && pVictim->GetReducedThreatPercent())
|
||||||
{
|
{
|
||||||
float reducedThreat = threat * pVictim->GetReducedThreatPercent() / 100;
|
uint32 reducedThreadPercent = pVictim->GetReducedThreatPercent();
|
||||||
|
|
||||||
|
Unit *unit = pVictim->GetMisdirectionTarget();
|
||||||
|
if (unit)
|
||||||
|
if (Aura* pAura = unit->GetAura(63326)) // Glyph of Vigilance
|
||||||
|
reducedThreadPercent += pAura->GetSpellProto()->EffectBasePoints[0];
|
||||||
|
|
||||||
|
float reducedThreat = threat * reducedThreadPercent / 100;
|
||||||
threat -= reducedThreat;
|
threat -= reducedThreat;
|
||||||
if (Unit *unit = pVictim->GetMisdirectionTarget())
|
if (unit)
|
||||||
_addThreat(unit, reducedThreat);
|
_addThreat(unit, reducedThreat);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user