diff --git a/Source/Framework/Constants/CliDBConst.cs b/Source/Framework/Constants/CliDBConst.cs index 415bdfaf6..e90031f67 100644 --- a/Source/Framework/Constants/CliDBConst.cs +++ b/Source/Framework/Constants/CliDBConst.cs @@ -1465,7 +1465,11 @@ namespace Framework.Constants StateWasit04 = 986, OneshotBarsweepStand = 987, TorghastTalkingHeadMawCastSound = 989, - TorghastTalkingHeadMawCastSound2 = 990 + TorghastTalkingHeadMawCastSound2 = 990, + OneshotStandVar0 = 991, + OneshotFlycustomspell01 = 992, + OneshotSpelleffectDecay = 993, + CreatureSpecial = 994, } public enum GlyphSlotType diff --git a/Source/Game/Chat/Commands/DebugCommands.cs b/Source/Game/Chat/Commands/DebugCommands.cs index 8d746465e..402859ccb 100644 --- a/Source/Game/Chat/Commands/DebugCommands.cs +++ b/Source/Game/Chat/Commands/DebugCommands.cs @@ -36,15 +36,12 @@ namespace Game.Chat class DebugCommands { [Command("anim", RBACPermissions.CommandDebugAnim)] - static bool HandleDebugAnimCommand(CommandHandler handler, StringArguments args) + static bool HandleDebugAnimCommand(CommandHandler handler, uint emoteId) { - if (args.Empty()) - return false; - - uint animId = args.NextUInt32(); Unit unit = handler.GetSelectedUnit(); if (unit) - unit.HandleEmoteCommand((Emote)animId); + unit.HandleEmoteCommand((Emote)emoteId); + return true; } diff --git a/Source/Game/Handlers/ChatHandler.cs b/Source/Game/Handlers/ChatHandler.cs index c81d8f7e4..441fd7f8a 100644 --- a/Source/Game/Handlers/ChatHandler.cs +++ b/Source/Game/Handlers/ChatHandler.cs @@ -567,9 +567,9 @@ namespace Game if (em == null) return; - Emote emoteAnim = (Emote)em.EmoteId; + Emote emote = (Emote)em.EmoteId; - switch (emoteAnim) + switch (emote) { case Emote.StateSleep: case Emote.StateSit: @@ -578,13 +578,13 @@ namespace Game break; case Emote.StateDance: case Emote.StateRead: - GetPlayer().SetEmoteState(emoteAnim); + GetPlayer().SetEmoteState(emote); break; default: // Only allow text-emotes for "dead" entities (feign death included) if (GetPlayer().HasUnitState(UnitState.Died)) break; - GetPlayer().HandleEmoteCommand(emoteAnim, null, packet.SpellVisualKitIDs); + GetPlayer().HandleEmoteCommand(emote, null, packet.SpellVisualKitIDs); break; } @@ -608,7 +608,7 @@ namespace Game creature.GetAI().ReceiveEmote(GetPlayer(), (TextEmotes)packet.EmoteID); } - if (emoteAnim != Emote.OneshotNone) + if (emote != Emote.OneshotNone) _player.RemoveAurasWithInterruptFlags(SpellAuraInterruptFlags.Anim); } diff --git a/Source/Scripts/Spells/Generic.cs b/Source/Scripts/Spells/Generic.cs index 6365c74db..1b9e19280 100644 --- a/Source/Scripts/Spells/Generic.cs +++ b/Source/Scripts/Spells/Generic.cs @@ -2817,7 +2817,7 @@ namespace Scripts.Spells.Generic void HandleDummy(uint effIndex) { - GetCaster().HandleEmoteCommand(EmoteArray[RandomHelper.URand(0, 2)]); + GetCaster().HandleEmoteCommand(EmoteArray.SelectRandom()); } public override void Register()