Misc fixes

This commit is contained in:
hondacrx
2021-12-01 11:45:16 -05:00
parent a04e405383
commit 239b147aba
3 changed files with 7 additions and 7 deletions
+3 -3
View File
@@ -31,7 +31,7 @@ namespace Game
public class DisableData public class DisableData
{ {
public byte flags; public ushort flags;
public List<uint> param0 = new(); public List<uint> param0 = new();
public List<uint> param1 = new(); public List<uint> param1 = new();
} }
@@ -68,7 +68,7 @@ namespace Game
string params_1 = result.Read<string>(4); string params_1 = result.Read<string>(4);
DisableData data = new(); DisableData data = new();
data.flags = (byte)flags; data.flags = (ushort)flags;
switch (type) 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)); 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); Cypher.Assert(type < DisableType.Max);
if (!m_DisableMap.ContainsKey(type) || m_DisableMap[type].Empty()) if (!m_DisableMap.ContainsKey(type) || m_DisableMap[type].Empty())
@@ -168,7 +168,7 @@ namespace Game.Movement
if (owner.IsHovering()) if (owner.IsHovering())
owner.UpdateAllowedPositionZ(x, y, ref z); 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 (!success || _path.GetPathType().HasAnyFlag(PathType.NoPath | PathType.Incomplete))
{ {
if (cOwner) if (cOwner)
+3 -3
View File
@@ -652,7 +652,7 @@ namespace Game.Scripting
return null; return null;
} }
// returns: target of current effect if it was Item otherwise null // returns: target of current effect if it was Item otherwise null
Item GetHitItem() public Item GetHitItem()
{ {
if (!IsInTargetHook()) if (!IsInTargetHook())
{ {
@@ -1308,7 +1308,7 @@ namespace Game.Scripting
public List<AuraDispelHandler> AfterDispel = new(); public List<AuraDispelHandler> AfterDispel = new();
// executed when aura effect is applied with specified mode to target // 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); // example: OnEffectApply += AuraEffectApplyFn(class.function, EffectIndexSpecifier, EffectAuraNameSpecifier, AuraEffectHandleModes);
// where function is: void function (AuraEffect aurEff, AuraEffectHandleModes mode); // where function is: void function (AuraEffect aurEff, AuraEffectHandleModes mode);
public List<EffectApplyHandler> OnEffectApply = new(); public List<EffectApplyHandler> OnEffectApply = new();
@@ -1319,7 +1319,7 @@ namespace Game.Scripting
public List<EffectApplyHandler> AfterEffectApply = new(); public List<EffectApplyHandler> AfterEffectApply = new();
// executed after aura effect is removed with specified mode from target // 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); // example: OnEffectRemove += AuraEffectRemoveFn(class.function, EffectIndexSpecifier, EffectAuraNameSpecifier, AuraEffectHandleModes);
// where function is: void function (AuraEffect aurEff, AuraEffectHandleModes mode); // where function is: void function (AuraEffect aurEff, AuraEffectHandleModes mode);
public List<EffectApplyHandler> OnEffectRemove = new(); public List<EffectApplyHandler> OnEffectRemove = new();