diff --git a/Source/Framework/Constants/SmartAIConst.cs b/Source/Framework/Constants/SmartAIConst.cs index 932da2f33..5f89ed93b 100644 --- a/Source/Framework/Constants/SmartAIConst.cs +++ b/Source/Framework/Constants/SmartAIConst.cs @@ -391,6 +391,8 @@ namespace Framework.Constants PlaySpellVisualKit = 137, // spellVisualKitId, kitType (unknown values, copypaste from packet dumps), duration OverrideLight = 138, // zoneId, overrideLightID, transitionMilliseconds OverrideWeather = 139, // zoneId, weatherId, intensity + SetAIAnimKit = 140, // DEPRECATED, DO REUSE (it was never used in any branch, treat as free action id) + SetHover = 141, // 0/1 CreateConversation = 143, // conversation_template.id SetImmunePC = 144, // 0/1 SetImmuneNPC = 145, // 0/1 diff --git a/Source/Game/AI/SmartScripts/SmartAIManager.cs b/Source/Game/AI/SmartScripts/SmartAIManager.cs index 4d6ea9714..f69546491 100644 --- a/Source/Game/AI/SmartScripts/SmartAIManager.cs +++ b/Source/Game/AI/SmartScripts/SmartAIManager.cs @@ -1510,6 +1510,11 @@ namespace Game.AI break; } + case SmartActions.SetAIAnimKit: + { + Log.outError(LogFilter.Sql, $"SmartAIMgr: Deprecated Event:({e}) skipped."); + break; + } case SmartActions.CreateConversation: { if (Global.ConversationDataStorage.GetConversationTemplate(e.Action.conversation.id) == null) @@ -1599,6 +1604,7 @@ namespace Game.AI case SmartActions.RemoveAllGameobjects: case SmartActions.SpawnSpawngroup: case SmartActions.DespawnSpawngroup: + case SmartActions.SetHover: case SmartActions.AddToStoredTargetList: break; case SmartActions.BecomePersonalCloneForPlayer: @@ -2654,6 +2660,9 @@ namespace Game.AI [FieldOffset(4)] public OverrideWeather overrideWeather; + [FieldOffset(4)] + public SetHover setHover; + [FieldOffset(4)] public Evade evade; @@ -3201,6 +3210,10 @@ namespace Game.AI public uint weatherId; public uint intensity; } + public struct SetHover + { + public uint enable; + } public struct Evade { public uint toRespawnPosition; diff --git a/Source/Game/AI/SmartScripts/SmartScript.cs b/Source/Game/AI/SmartScripts/SmartScript.cs index badd189e8..609fb403f 100644 --- a/Source/Game/AI/SmartScripts/SmartScript.cs +++ b/Source/Game/AI/SmartScripts/SmartScript.cs @@ -2429,6 +2429,13 @@ namespace Game.AI } break; } + case SmartActions.SetHover: + { + foreach (WorldObject target in targets) + if (IsUnit(target)) + target.ToUnit().SetHover(e.Action.setHover.enable != 0); + break; + } case SmartActions.PlaySpellVisualKit: { foreach (var target in targets)