diff --git a/Source/Game/AI/SmartScripts/SmartAIManager.cs b/Source/Game/AI/SmartScripts/SmartAIManager.cs index 458b83fba..1c920dbce 100644 --- a/Source/Game/AI/SmartScripts/SmartAIManager.cs +++ b/Source/Game/AI/SmartScripts/SmartAIManager.cs @@ -2021,7 +2021,7 @@ namespace Game.AI if (e.Action.activateGameObject.gameObjectAction >= (uint)GameObjectActions.Max) { - Log.outError(LogFilter.Sql, $"SmartAIMgr: {e} has gameObjectAction parameter out of range (max allowed {(uint)GameObjectActions.Max}, current value {e.Action.activateGameObject.gameObjectAction}), skipped."); + Log.outError(LogFilter.Sql, $"SmartAIMgr: {e} has gameObjectAction parameter out of range (max allowed {(uint)GameObjectActions.Max - 1}, current value {e.Action.activateGameObject.gameObjectAction}), skipped."); return false; } diff --git a/Source/Game/BattleGrounds/Zones/EyeofStorm.cs b/Source/Game/BattleGrounds/Zones/EyeofStorm.cs index 95fbc487f..7b79d59b1 100644 --- a/Source/Game/BattleGrounds/Zones/EyeofStorm.cs +++ b/Source/Game/BattleGrounds/Zones/EyeofStorm.cs @@ -1148,8 +1148,8 @@ namespace Game.BattleGrounds.Zones public const uint AllianceLostBloodElfTower = 17831; public const uint HordeLostBloodElfTower = 17832; - public const uint AllianceTakenDraeneiRuins = 17826; - public const uint HordeTakenDraeneiRuins = 17827; + public const uint AllianceTakenDraeneiRuins = 17827; + public const uint HordeTakenDraeneiRuins = 17826; public const uint AllianceLostDraeneiRuins = 17833; public const uint HordeLostDraeneiRuins = 17834; diff --git a/Source/Game/Chat/Commands/MiscCommands.cs b/Source/Game/Chat/Commands/MiscCommands.cs index b3da654d2..e94030dc9 100644 --- a/Source/Game/Chat/Commands/MiscCommands.cs +++ b/Source/Game/Chat/Commands/MiscCommands.cs @@ -111,8 +111,6 @@ namespace Game.Chat if (!playerTarget) playerTarget = player; - Log.outDebug(LogFilter.Server, Global.ObjectMgr.GetCypherString(CypherStrings.Additem), itemId, count); - ItemTemplate itemTemplate = Global.ObjectMgr.GetItemTemplate(itemId); if (itemTemplate == null) { diff --git a/Source/Scripts/Spells/Generic.cs b/Source/Scripts/Spells/Generic.cs index cc96465c1..b1b4efe07 100644 --- a/Source/Scripts/Spells/Generic.cs +++ b/Source/Scripts/Spells/Generic.cs @@ -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 { diff --git a/Source/Scripts/Spells/Quest.cs b/Source/Scripts/Spells/Quest.cs index ca58e903c..a074d8535 100644 --- a/Source/Scripts/Spells/Quest.cs +++ b/Source/Scripts/Spells/Quest.cs @@ -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 diff --git a/Source/Scripts/World/GameObject.cs b/Source/Scripts/World/GameObject.cs index d0e8ca9d8..b09cf5cbe 100644 --- a/Source/Scripts/World/GameObject.cs +++ b/Source/Scripts/World/GameObject.cs @@ -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 {