Core/Spells: Fix glyph of stars (druid)
Port From (https://github.com/TrinityCore/TrinityCore/commit/56ef6c06eb165e9410a1f0af8b54492ad99eeced)
This commit is contained in:
@@ -1302,6 +1302,12 @@ namespace Game.Entities
|
||||
return 29414;
|
||||
case 35200: // Roc Form
|
||||
return 4877;
|
||||
case 24858: // Moonkin Form
|
||||
{
|
||||
if (HasAura(114301)) // Glyph of Stars
|
||||
return 0;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -62,6 +62,8 @@ namespace Scripts.Spells.Druid
|
||||
public const uint FormsTrinketNone = 37344;
|
||||
public const uint FormsTrinketTree = 37342;
|
||||
public const uint GalacticGuardianAura = 213708;
|
||||
public const uint GlyphOfStars = 114301;
|
||||
public const uint GlyphOfStarsVisual = 114302;
|
||||
public const uint GoreProc = 93622;
|
||||
public const uint IdolOfFeralShadows = 34241;
|
||||
public const uint IdolOfWorship = 60774;
|
||||
@@ -541,6 +543,33 @@ namespace Scripts.Spells.Druid
|
||||
}
|
||||
}
|
||||
|
||||
[Script] // 24858 - Moonkin Form
|
||||
class spell_dru_glyph_of_stars : AuraScript
|
||||
{
|
||||
public override bool Validate(SpellInfo spell)
|
||||
{
|
||||
return ValidateSpellInfo(SpellIds.GlyphOfStars, SpellIds.GlyphOfStarsVisual);
|
||||
}
|
||||
|
||||
void OnApply(AuraEffect aurEff, AuraEffectHandleModes mode)
|
||||
{
|
||||
Unit target = GetTarget();
|
||||
if (target.HasAura(SpellIds.GlyphOfStars))
|
||||
target.CastSpell(target, SpellIds.GlyphOfStarsVisual, true);
|
||||
}
|
||||
|
||||
void OnRemove(AuraEffect aurEff, AuraEffectHandleModes mode)
|
||||
{
|
||||
GetTarget().RemoveAurasDueToSpell(SpellIds.GlyphOfStarsVisual);
|
||||
}
|
||||
|
||||
public override void Register()
|
||||
{
|
||||
OnEffectApply.Add(new EffectApplyHandler(OnApply, 1, AuraType.ModShapeshift, AuraEffectHandleModes.Real));
|
||||
OnEffectRemove.Add(new EffectApplyHandler(OnRemove, 1, AuraType.ModShapeshift, AuraEffectHandleModes.Real));
|
||||
}
|
||||
}
|
||||
|
||||
[Script] // 210706 - Gore
|
||||
class spell_dru_gore : AuraScript
|
||||
{
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_dru_glyph_of_stars';
|
||||
INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
|
||||
(24858,'spell_dru_glyph_of_stars');
|
||||
Reference in New Issue
Block a user