Remove custom OptionalType and use the default c# nullable type.
This commit is contained in:
@@ -1233,9 +1233,9 @@ namespace Game.Movement
|
||||
|
||||
public float JumpGravity;
|
||||
|
||||
public Optional<uint> SpellVisualId;
|
||||
public Optional<uint> ProgressCurveId;
|
||||
public Optional<uint> ParabolicCurveId;
|
||||
public uint? SpellVisualId;
|
||||
public uint? ProgressCurveId;
|
||||
public uint? ParabolicCurveId;
|
||||
}
|
||||
|
||||
public struct ChaseRange
|
||||
|
||||
@@ -209,8 +209,8 @@ namespace Game.Movement
|
||||
{
|
||||
float t_passedf = MSToSec((uint)(time_point - effect_start_time));
|
||||
float t_durationf = MSToSec((uint)(Duration() - effect_start_time)); //client use not modified duration here
|
||||
if (spell_effect_extra.HasValue && spell_effect_extra.Value.ParabolicCurveId != 0)
|
||||
t_passedf *= Global.DB2Mgr.GetCurveValueAt(spell_effect_extra.Value.ParabolicCurveId, (float)time_point / Duration());
|
||||
if (spell_effect_extra != null && spell_effect_extra.ParabolicCurveId != 0)
|
||||
t_passedf *= Global.DB2Mgr.GetCurveValueAt(spell_effect_extra.ParabolicCurveId, (float)time_point / Duration());
|
||||
|
||||
el += (t_durationf - t_passedf) * 0.5f * vertical_acceleration * t_passedf;
|
||||
}
|
||||
@@ -362,8 +362,8 @@ namespace Game.Movement
|
||||
public int point_Idx;
|
||||
public int point_Idx_offset;
|
||||
public float velocity;
|
||||
public Optional<SpellEffectExtraData> spell_effect_extra;
|
||||
public Optional<AnimTierTransition> anim_tier;
|
||||
public SpellEffectExtraData spell_effect_extra;
|
||||
public AnimTierTransition anim_tier;
|
||||
#endregion
|
||||
|
||||
public class CommonInitializer : IInitializer
|
||||
|
||||
@@ -313,8 +313,8 @@ namespace Game.Movement
|
||||
public void SetAnimation(AnimType anim)
|
||||
{
|
||||
args.time_perc = 0.0f;
|
||||
args.animTier.Value = new();
|
||||
args.animTier.Value.AnimTier = (byte)anim;
|
||||
args.animTier = new();
|
||||
args.animTier.AnimTier = (byte)anim;
|
||||
args.flags.EnableAnimation();
|
||||
}
|
||||
|
||||
@@ -330,7 +330,7 @@ namespace Game.Movement
|
||||
|
||||
public void SetSpellEffectExtraData(SpellEffectExtraData spellEffectExtraData)
|
||||
{
|
||||
args.spellEffectExtra.Set(spellEffectExtraData);
|
||||
args.spellEffectExtra = spellEffectExtraData;
|
||||
}
|
||||
|
||||
public List<Vector3> Path() { return args.path; }
|
||||
|
||||
@@ -47,8 +47,8 @@ namespace Game.Movement
|
||||
public float time_perc;
|
||||
public uint splineId;
|
||||
public float initialOrientation;
|
||||
public Optional<SpellEffectExtraData> spellEffectExtra;
|
||||
public Optional<AnimTierTransition> animTier;
|
||||
public SpellEffectExtraData spellEffectExtra;
|
||||
public AnimTierTransition animTier;
|
||||
public bool walk;
|
||||
public bool HasVelocity;
|
||||
public bool TransformForTransport;
|
||||
@@ -77,15 +77,15 @@ namespace Game.Movement
|
||||
return false;
|
||||
if (!CHECK(_checkPathLengths(), false))
|
||||
return false;
|
||||
if (spellEffectExtra.HasValue)
|
||||
if (spellEffectExtra != null)
|
||||
{
|
||||
if (!CHECK(spellEffectExtra.Value.ProgressCurveId == 0 || CliDB.CurveStorage.ContainsKey(spellEffectExtra.Value.ProgressCurveId), false))
|
||||
if (!CHECK(spellEffectExtra.ProgressCurveId == 0 || CliDB.CurveStorage.ContainsKey(spellEffectExtra.ProgressCurveId), false))
|
||||
return false;
|
||||
if (!CHECK(spellEffectExtra.Value.ParabolicCurveId == 0 || CliDB.CurveStorage.ContainsKey(spellEffectExtra.Value.ParabolicCurveId), false))
|
||||
if (!CHECK(spellEffectExtra.ParabolicCurveId == 0 || CliDB.CurveStorage.ContainsKey(spellEffectExtra.ParabolicCurveId), false))
|
||||
return false;
|
||||
if (!CHECK(spellEffectExtra.Value.ProgressCurveId == 0 || CliDB.CurveStorage.ContainsKey(spellEffectExtra.Value.ProgressCurveId), true))
|
||||
if (!CHECK(spellEffectExtra.ProgressCurveId == 0 || CliDB.CurveStorage.ContainsKey(spellEffectExtra.ProgressCurveId), true))
|
||||
return false;
|
||||
if (!CHECK(spellEffectExtra.Value.ParabolicCurveId == 0 || CliDB.CurveStorage.ContainsKey(spellEffectExtra.Value.ParabolicCurveId), true))
|
||||
if (!CHECK(spellEffectExtra.ParabolicCurveId == 0 || CliDB.CurveStorage.ContainsKey(spellEffectExtra.ParabolicCurveId), true))
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user