From 239b147aba908f632e28814d2154c99c6f557a50 Mon Sep 17 00:00:00 2001 From: hondacrx Date: Wed, 1 Dec 2021 11:45:16 -0500 Subject: [PATCH] Misc fixes --- Source/Game/Conditions/DisableManager.cs | 6 +++--- Source/Game/Movement/Generators/ChaseMovementGenerator.cs | 2 +- Source/Game/Scripting/SpellScript.cs | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Source/Game/Conditions/DisableManager.cs b/Source/Game/Conditions/DisableManager.cs index 0aa889846..02b5ac898 100644 --- a/Source/Game/Conditions/DisableManager.cs +++ b/Source/Game/Conditions/DisableManager.cs @@ -31,7 +31,7 @@ namespace Game public class DisableData { - public byte flags; + public ushort flags; public List param0 = new(); public List param1 = new(); } @@ -68,7 +68,7 @@ namespace Game string params_1 = result.Read(4); DisableData data = new(); - data.flags = (byte)flags; + data.flags = (ushort)flags; switch (type) { @@ -284,7 +284,7 @@ namespace Game Log.outInfo(LogFilter.ServerLoading, "Checked {0} quest disables in {1} ms", m_DisableMap[DisableType.Quest].Count, Time.GetMSTimeDiffToNow(oldMSTime)); } - public bool IsDisabledFor(DisableType type, uint entry, WorldObject refe, byte flags = 0) + public bool IsDisabledFor(DisableType type, uint entry, WorldObject refe, ushort flags = 0) { Cypher.Assert(type < DisableType.Max); if (!m_DisableMap.ContainsKey(type) || m_DisableMap[type].Empty()) diff --git a/Source/Game/Movement/Generators/ChaseMovementGenerator.cs b/Source/Game/Movement/Generators/ChaseMovementGenerator.cs index c23ad1952..7250e5d40 100644 --- a/Source/Game/Movement/Generators/ChaseMovementGenerator.cs +++ b/Source/Game/Movement/Generators/ChaseMovementGenerator.cs @@ -168,7 +168,7 @@ namespace Game.Movement if (owner.IsHovering()) owner.UpdateAllowedPositionZ(x, y, ref z); - bool success = _path.CalculatePath(x, y, z, cOwner.CanFly()); + bool success = _path.CalculatePath(x, y, z, owner.CanFly()); if (!success || _path.GetPathType().HasAnyFlag(PathType.NoPath | PathType.Incomplete)) { if (cOwner) diff --git a/Source/Game/Scripting/SpellScript.cs b/Source/Game/Scripting/SpellScript.cs index 4c5038781..005a22f99 100644 --- a/Source/Game/Scripting/SpellScript.cs +++ b/Source/Game/Scripting/SpellScript.cs @@ -652,7 +652,7 @@ namespace Game.Scripting return null; } // returns: target of current effect if it was Item otherwise null - Item GetHitItem() + public Item GetHitItem() { if (!IsInTargetHook()) { @@ -1308,7 +1308,7 @@ namespace Game.Scripting public List AfterDispel = new(); // executed when aura effect is applied with specified mode to target - // should be used when when effect handler preventing/replacing is needed, do not use this hook for triggering spellcasts/removing auras etc - may be unsafe + // should be used when effect handler preventing/replacing is needed, do not use this hook for triggering spellcasts/removing auras etc - may be unsafe // example: OnEffectApply += AuraEffectApplyFn(class.function, EffectIndexSpecifier, EffectAuraNameSpecifier, AuraEffectHandleModes); // where function is: void function (AuraEffect aurEff, AuraEffectHandleModes mode); public List OnEffectApply = new(); @@ -1319,7 +1319,7 @@ namespace Game.Scripting public List AfterEffectApply = new(); // executed after aura effect is removed with specified mode from target - // should be used when when effect handler preventing/replacing is needed, do not use this hook for triggering spellcasts/removing auras etc - may be unsafe + // should be used when effect handler preventing/replacing is needed, do not use this hook for triggering spellcasts/removing auras etc - may be unsafe // example: OnEffectRemove += AuraEffectRemoveFn(class.function, EffectIndexSpecifier, EffectAuraNameSpecifier, AuraEffectHandleModes); // where function is: void function (AuraEffect aurEff, AuraEffectHandleModes mode); public List OnEffectRemove = new();