public override void DoWrite(ByteWriter BW) { BW.AppendInt32(ActivePlayerIndex); BW.AppendInt32(ActiveSquadIndex); BW.AppendInt32(ActiveSquad.CurrentLeader.AttackIndex); BW.AppendInt32(ListAttackChoice.Count); for (int A = 0; A < ListAttackChoice.Count; ++A) { BW.AppendFloat(ListAttackChoice[A].X); BW.AppendFloat(ListAttackChoice[A].Y); BW.AppendInt32((int)ListAttackChoice[A].Z); } BW.AppendBoolean(BattlePreview != null); if (BattlePreview != null) { BW.AppendInt32(BattlePreview.PlayerIndex); BW.AppendInt32(BattlePreview.SquadIndex); } BW.AppendFloat(Map.CursorPosition.X); BW.AppendFloat(Map.CursorPosition.Y); BW.AppendFloat(Map.CursorPosition.Z); }
public override void DoWrite(ByteWriter BW) { BW.AppendInt32(ActivePlayerIndex); BW.AppendInt32(TransformingUnitIndex); BW.AppendInt32(Map.ListPlayer[ActivePlayerIndex].ListSquad.IndexOf(ActiveSquad)); BW.AppendBoolean(ShowSquadMembers); }
public override byte[] GetSnapshotData() { ByteWriter BW = new ByteWriter(); BW.AppendInt32(ListAllPlayer.Count); foreach (Player ActivePlayer in ListAllPlayer) { BW.AppendString(ActivePlayer.ConnectionID); BW.AppendString(ActivePlayer.Name); BW.AppendInt32(ActivePlayer.Team); BW.AppendBoolean(ActivePlayer.IsPlayerControlled); BW.AppendByte(ActivePlayer.Color.R); BW.AppendByte(ActivePlayer.Color.G); BW.AppendByte(ActivePlayer.Color.B); BW.AppendByte(ActivePlayer.LocalPlayerIndex); BW.AppendInt32(ActivePlayer.ListSquad.Count); foreach (Squad ActiveSquad in ActivePlayer.ListSquad) { BW.AppendFloat(ActiveSquad.X); BW.AppendFloat(ActiveSquad.Y); BW.AppendFloat(ActiveSquad.Z); BW.AppendBoolean(ActiveSquad.IsPlayerControlled); BW.AppendInt32(ActiveSquad.UnitsInSquad); for (int U = 0; U < ActiveSquad.UnitsInSquad; ++U) { Unit ActiveUnit = ActiveSquad.At(U); BW.AppendString(ActiveUnit.UnitTypeName); BW.AppendString(ActiveUnit.RelativePath); BW.AppendInt32(ActiveUnit.ArrayCharacterActive.Length); for (int C = 0; C < ActiveUnit.ArrayCharacterActive.Length; ++C) { BW.AppendString(ActiveUnit.ArrayCharacterActive[C].FullName); } } } } BW.AppendString(BattleMapPath); byte[] Data = BW.GetBytes(); BW.ClearWriteBuffer(); return(Data); }
public override void DoWrite(ByteWriter BW) { BW.AppendBoolean(BattlePreview != null); if (BattlePreview != null) { BW.AppendInt32(BattlePreview.PlayerIndex); BW.AppendInt32(BattlePreview.SquadIndex); } }
public override void DoWrite(ByteWriter BW) { BW.AppendBoolean(HasBeenSelected); BW.AppendInt32(StartingPlayerIndex); }
public override void DoWrite(ByteWriter BW) { BW.AppendString(AttackAnimationPath); BW.AppendBoolean(LeftSideAttackRightSide); }
public override void DoWrite(ByteWriter BW) { BW.AppendInt32(ActivePlayerIndex); BW.AppendInt32(ActiveSquadIndex); BW.AppendByte((byte)ActiveSquad.CurrentLeader.BattleDefenseChoice); BW.AppendInt32(ActiveSquad.CurrentLeader.AttackIndex); BW.AppendInt32(TargetPlayerIndex); BW.AppendInt32(TargetSquadIndex); BW.AppendByte((byte)TargetSquad.CurrentLeader.BattleDefenseChoice); BW.AppendInt32(TargetSquad.CurrentLeader.AttackIndex); BW.AppendBoolean(IsDefending); BW.AppendByte((byte)Map.BattleMenuStage); if (Map.IsServer) { BW.AppendInt32(AttackingResult.ArrayResult.Length); for (int R = 0; R < AttackingResult.ArrayResult.Length; ++R) { BW.AppendInt32(AttackingResult.ArrayResult[R].Accuracy); BW.AppendInt32(AttackingResult.ArrayResult[R].AttackAttackerFinalEN); BW.AppendInt32(AttackingResult.ArrayResult[R].AttackDamage); BW.AppendBoolean(AttackingResult.ArrayResult[R].AttackMissed); BW.AppendBoolean(AttackingResult.ArrayResult[R].AttackShootDown); BW.AppendBoolean(AttackingResult.ArrayResult[R].AttackSwordCut); BW.AppendBoolean(AttackingResult.ArrayResult[R].AttackWasCritical); BW.AppendString(AttackingResult.ArrayResult[R].Barrier); BW.AppendBoolean(AttackingResult.ArrayResult[R].Shield); BW.AppendInt32(AttackingResult.ArrayResult[R].TargetPlayerIndex); BW.AppendInt32(AttackingResult.ArrayResult[R].TargetSquadIndex); BW.AppendInt32(AttackingResult.ArrayResult[R].TargetUnitIndex); } BW.AppendInt32(DefendingResult.ArrayResult.Length); for (int R = 0; R < DefendingResult.ArrayResult.Length; ++R) { BW.AppendInt32(DefendingResult.ArrayResult[R].Accuracy); BW.AppendInt32(DefendingResult.ArrayResult[R].AttackAttackerFinalEN); BW.AppendInt32(DefendingResult.ArrayResult[R].AttackDamage); BW.AppendBoolean(DefendingResult.ArrayResult[R].AttackMissed); BW.AppendBoolean(DefendingResult.ArrayResult[R].AttackShootDown); BW.AppendBoolean(DefendingResult.ArrayResult[R].AttackSwordCut); BW.AppendBoolean(DefendingResult.ArrayResult[R].AttackWasCritical); BW.AppendString(DefendingResult.ArrayResult[R].Barrier); BW.AppendBoolean(DefendingResult.ArrayResult[R].Shield); BW.AppendInt32(DefendingResult.ArrayResult[R].TargetPlayerIndex); BW.AppendInt32(DefendingResult.ArrayResult[R].TargetSquadIndex); BW.AppendInt32(DefendingResult.ArrayResult[R].TargetUnitIndex); } } else { } }