|
@@ -1,101 +1,13 @@
|
|
|
using System;
|
|
using System;
|
|
|
|
|
+using System.Collections.Generic;
|
|
|
|
|
|
|
|
namespace ET
|
|
namespace ET
|
|
|
{
|
|
{
|
|
|
- public partial class FrameMessage
|
|
|
|
|
- {
|
|
|
|
|
- public bool Equals(FrameMessage other)
|
|
|
|
|
- {
|
|
|
|
|
- return this.PlayerId == other.PlayerId && this.Frame == other.Frame && this.V.Equals(other.V) && this.Button == other.Button;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- public override bool Equals(object obj)
|
|
|
|
|
- {
|
|
|
|
|
- if (ReferenceEquals(null, obj))
|
|
|
|
|
- {
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- if (ReferenceEquals(this, obj))
|
|
|
|
|
- {
|
|
|
|
|
- return true;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- if (obj.GetType() != this.GetType())
|
|
|
|
|
- {
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- return Equals((FrameMessage) obj);
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- public override int GetHashCode()
|
|
|
|
|
- {
|
|
|
|
|
- return HashCode.Combine(this.PlayerId, this.Frame, this.V, this.Button);
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- public static bool operator ==(FrameMessage a, FrameMessage b)
|
|
|
|
|
- {
|
|
|
|
|
- if (a.PlayerId != b.PlayerId)
|
|
|
|
|
- {
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- if (a.Frame != b.Frame)
|
|
|
|
|
- {
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- if (a.V != b.V)
|
|
|
|
|
- {
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- if (a.Button != b.Button)
|
|
|
|
|
- {
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- return true;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- public static bool operator !=(FrameMessage a, FrameMessage b)
|
|
|
|
|
- {
|
|
|
|
|
- return !(a == b);
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
public partial class OneFrameMessages
|
|
public partial class OneFrameMessages
|
|
|
{
|
|
{
|
|
|
- public bool Equals(OneFrameMessages other)
|
|
|
|
|
|
|
+ public OneFrameMessages()
|
|
|
{
|
|
{
|
|
|
- return this.Frame == other.Frame && Equals(this.Messages, other.Messages);
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- public override bool Equals(object obj)
|
|
|
|
|
- {
|
|
|
|
|
- if (ReferenceEquals(null, obj))
|
|
|
|
|
- {
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- if (ReferenceEquals(this, obj))
|
|
|
|
|
- {
|
|
|
|
|
- return true;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- if (obj.GetType() != this.GetType())
|
|
|
|
|
- {
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- return Equals((OneFrameMessages) obj);
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- public override int GetHashCode()
|
|
|
|
|
- {
|
|
|
|
|
- return HashCode.Combine(this.Frame, this.Messages);
|
|
|
|
|
|
|
+ this.InputInfos = new Dictionary<long, LSInputInfo>(LSConstValue.MatchCount);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public static bool operator==(OneFrameMessages a, OneFrameMessages b)
|
|
public static bool operator==(OneFrameMessages a, OneFrameMessages b)
|
|
@@ -105,24 +17,13 @@ namespace ET
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- if (a.Messages.Count != b.Messages.Count)
|
|
|
|
|
- {
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- foreach (var kv in a.Messages)
|
|
|
|
|
|
|
+ for (int i = 0; i < LSConstValue.MatchCount; ++i)
|
|
|
{
|
|
{
|
|
|
- if (!b.Messages.TryGetValue(kv.Key, out FrameMessage frameMessage))
|
|
|
|
|
- {
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- if (kv.Value != frameMessage)
|
|
|
|
|
|
|
+ if (a.InputInfos[i] != b.InputInfos[i])
|
|
|
{
|
|
{
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
return true;
|
|
return true;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -131,4 +32,16 @@ namespace ET
|
|
|
return !(a == b);
|
|
return !(a == b);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ public partial class Room2C_BattleStart
|
|
|
|
|
+ {
|
|
|
|
|
+ public Room2C_BattleStart()
|
|
|
|
|
+ {
|
|
|
|
|
+ this.UnitInfo = new List<LockStepUnitInfo>(LSConstValue.MatchCount);
|
|
|
|
|
+ for (int i = 0; i < LSConstValue.MatchCount; ++i)
|
|
|
|
|
+ {
|
|
|
|
|
+ this.UnitInfo.Add(null);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|