Misc fixes

This commit is contained in:
hondacrx
2022-05-30 13:57:03 -04:00
parent d5b3bf6a5a
commit 3beab79944
6 changed files with 16 additions and 83 deletions
+13
View File
@@ -1444,6 +1444,19 @@ namespace Scripts.Spells.Generic
}
}
class spell_gen_despawn_aura : AuraScript
{
void OnRemove(AuraEffect aurEff, AuraEffectHandleModes mode)
{
GetTarget().ToCreature()?.DespawnOrUnsummon();
}
public override void Register()
{
AfterEffectRemove.Add(new EffectApplyHandler(OnRemove, SpellConst.EffectFirstFound, AuraType.Dummy, AuraEffectHandleModes.Real));
}
}
[Script]
class spell_gen_despawn_self : SpellScript
{
-50
View File
@@ -203,13 +203,6 @@ namespace Scripts.Spells.Quest
//Escapefromsilverbrook
public const uint SummonWorgen = 48681;
//BasicOrdersEmote
public const uint TestSalute = 73835;
public const uint TestRoar = 73836;
public const uint TestCheer = 73725;
public const uint TestDance = 73837;
public const uint TestStopDance = 73886;
//Deathcomesfromonhigh
public const uint ForgeCredit = 51974;
public const uint TownHallCredit = 51977;
@@ -1820,49 +1813,6 @@ namespace Scripts.Spells.Quest
OnDestinationTargetSelect.Add(new DestinationTargetSelectHandler(ModDest, 0, Targets.DestCasterSummon));
}
}
/*
73725 - [DND] Test Cheer
73835 - [DND] Test Salute
73836 - [DND] Test Roar
73837 - [DND] Test Dance
73886 - [DND] Test Stop Dance
*/
[Script]
class spell_q25199_emote : AuraScript
{
void HandlePeriodic(AuraEffect aurEff)
{
Unit target = GetTarget();
switch (GetSpellInfo().Id)
{
case SpellIds.TestSalute:
target.HandleEmoteCommand(Emote.OneshotSalute);
break;
case SpellIds.TestRoar:
target.HandleEmoteCommand(Emote.OneshotRoar);
break;
case SpellIds.TestCheer:
target.HandleEmoteCommand(Emote.OneshotCheer);
break;
case SpellIds.TestDance:
target.SetEmoteState(Emote.StateDance);
break;
case SpellIds.TestStopDance:
target.SetEmoteState(Emote.StateNone);
break;
default:
return;
}
Remove();
}
public override void Register()
{
OnEffectPeriodic.Add(new EffectPeriodicHandler(HandlePeriodic, 0, AuraType.PeriodicDummy));
}
}
[Script] // 51858 - Siphon of Acherus
class spell_q12641_death_comes_from_on_high : SpellScript
-28
View File
@@ -594,34 +594,6 @@ namespace Scripts.World.GameObjects
}
}
[Script]
class go_toy_train_set : GameObjectAI
{
uint _pulseTimer;
public go_toy_train_set(GameObject go) : base(go)
{
_pulseTimer = 3 * Time.InMilliseconds;
}
public override void UpdateAI(uint diff)
{
if (diff < _pulseTimer)
_pulseTimer -= diff;
else
{
me.CastSpell(null, SpellIds.ToyTrainPulse, true);
_pulseTimer = 6 * Time.InMilliseconds;
}
}
// triggered on wrecker'd
public override void DoAction(int action)
{
me.Delete();
}
}
[Script]
class go_brewfest_music : GameObjectAI
{