|
@ -13,7 +13,7 @@ namespace GWConquest |
|
|
private GWNetworkList<NetworkBehaviourReference> formations = new GWNetworkList<NetworkBehaviourReference>(); |
|
|
private GWNetworkList<NetworkBehaviourReference> formations = new GWNetworkList<NetworkBehaviourReference>(); |
|
|
private NetworkVariable<int> zoneID = new NetworkVariable<int>(); |
|
|
private NetworkVariable<int> zoneID = new NetworkVariable<int>(); |
|
|
private NetworkVariable<FixedString128Bytes> battleName = new NetworkVariable<FixedString128Bytes>(); |
|
|
private NetworkVariable<FixedString128Bytes> battleName = new NetworkVariable<FixedString128Bytes>(); |
|
|
private GWNetworkList<NetworkBehaviourReference> flanks = new GWNetworkList<NetworkBehaviourReference>(); |
|
|
|
|
|
|
|
|
private GWNetworkList<NullableNetworkBehaviourReference> flanks = new GWNetworkList<NullableNetworkBehaviourReference>(); |
|
|
private NetworkVariable<int> flankCount = new NetworkVariable<int>(); |
|
|
private NetworkVariable<int> flankCount = new NetworkVariable<int>(); |
|
|
private NetworkVariable<bool> isOver = new NetworkVariable<bool>(); |
|
|
private NetworkVariable<bool> isOver = new NetworkVariable<bool>(); |
|
|
private NetworkVariable<int> victorID = new NetworkVariable<int>(); |
|
|
private NetworkVariable<int> victorID = new NetworkVariable<int>(); |
|
@ -85,7 +85,6 @@ namespace GWConquest |
|
|
|
|
|
|
|
|
public int FlankCount { |
|
|
public int FlankCount { |
|
|
get => flankCount.Value; |
|
|
get => flankCount.Value; |
|
|
set => flankCount.Value = value; |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public void SetFlank(ushort index, BattleFlank flank) |
|
|
public void SetFlank(ushort index, BattleFlank flank) |
|
@ -165,6 +164,11 @@ namespace GWConquest |
|
|
|
|
|
|
|
|
flankCount.Value = Zone.zoneType == ZoneType.Ground ? 6 : 2; |
|
|
flankCount.Value = Zone.zoneType == ZoneType.Ground ? 6 : 2; |
|
|
int maxUnitPerFlank = Zone.zoneType == ZoneType.Ground ? 9 : 20; |
|
|
int maxUnitPerFlank = Zone.zoneType == ZoneType.Ground ? 9 : 20; |
|
|
|
|
|
|
|
|
|
|
|
for(int i = 0; i < FlankCount; i++) |
|
|
|
|
|
{ |
|
|
|
|
|
flanks.Add(null); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
var allPlayers = AllPlayers.ToList(); |
|
|
var allPlayers = AllPlayers.ToList(); |
|
|
if(allPlayers.Count() >= 2) |
|
|
if(allPlayers.Count() >= 2) |
|
|