protected override bool OnRead() { bool bufferReadValid = true; this._optionList = new List <MultiplayerOptions.MultiplayerOption>(); for (MultiplayerOptions.OptionType optionType = MultiplayerOptions.OptionType.ServerName; optionType < MultiplayerOptions.OptionType.NumOfSlots; ++optionType) { MultiplayerOptionsProperty optionProperty = optionType.GetOptionProperty(); if (optionProperty.Replication == MultiplayerOptionsProperty.ReplicationOccurrence.AtMapLoad) { MultiplayerOptions.MultiplayerOption multiplayerOption = MultiplayerOptions.MultiplayerOption.CreateMultiplayerOption(optionType); switch (optionProperty.OptionValueType) { case MultiplayerOptions.OptionValueType.Bool: multiplayerOption.UpdateValue(GameNetworkMessage.ReadBoolFromPacket(ref bufferReadValid)); break; case MultiplayerOptions.OptionValueType.Integer: case MultiplayerOptions.OptionValueType.Enum: multiplayerOption.UpdateValue(GameNetworkMessage.ReadIntFromPacket(new CompressionInfo.Integer(optionProperty.BoundsMin, optionProperty.BoundsMax, true), ref bufferReadValid)); break; case MultiplayerOptions.OptionValueType.String: multiplayerOption.UpdateValue(GameNetworkMessage.ReadStringFromPacket(ref bufferReadValid)); break; } this._optionList.Add(multiplayerOption); } } return(bufferReadValid); }
protected override bool OnRead() { bool bufferReadValid = true; this.Message = GameNetworkMessage.ReadStringFromPacket(ref bufferReadValid); this.IsMessageTextId = GameNetworkMessage.ReadBoolFromPacket(ref bufferReadValid); return(bufferReadValid); }
protected override bool OnRead() { bool bufferReadValid = true; this.GameType = GameNetworkMessage.ReadStringFromPacket(ref bufferReadValid); this.Map = GameNetworkMessage.ReadStringFromPacket(ref bufferReadValid); return(bufferReadValid); }
protected override bool OnRead() { bool bufferReadValid = true; this.Player = GameNetworkMessage.ReadNetworkPeerReferenceFromPacket(ref bufferReadValid); this.Message = GameNetworkMessage.ReadStringFromPacket(ref bufferReadValid); return(bufferReadValid); }
protected override bool OnRead() { bool bufferReadValid = true; this.PlayerIndex = GameNetworkMessage.ReadIntFromPacket(CompressionBasic.PlayerCompressionInfo, ref bufferReadValid); this.PlayerName = GameNetworkMessage.ReadStringFromPacket(ref bufferReadValid); return(bufferReadValid); }
protected override bool OnRead() { bool bufferReadValid = true; this.Agent = GameNetworkMessage.ReadAgentReferenceFromPacket(ref bufferReadValid); this.PrefabName = GameNetworkMessage.ReadStringFromPacket(ref bufferReadValid); this.BoneIndex = (sbyte)GameNetworkMessage.ReadIntFromPacket(CompressionMission.BoneIndexCompressionInfo, ref bufferReadValid); return(bufferReadValid); }
protected override bool OnRead() { bool bufferReadValid = true; this.FormationIndex = GameNetworkMessage.ReadIntFromPacket(CompressionOrder.FormationClassCompressionInfo, ref bufferReadValid); this.Team = GameNetworkMessage.ReadTeamReferenceFromPacket(ref bufferReadValid); this.BannerCode = GameNetworkMessage.ReadStringFromPacket(ref bufferReadValid); return(bufferReadValid); }
protected override bool OnRead() { bool bufferReadValid = true; this.Team = GameNetworkMessage.ReadMBTeamReferenceFromPacket(CompressionMission.TeamCompressionInfo, ref bufferReadValid); this.Side = (BattleSideEnum)GameNetworkMessage.ReadIntFromPacket(CompressionMission.TeamSideCompressionInfo, ref bufferReadValid); this.Color = GameNetworkMessage.ReadUintFromPacket(CompressionGeneric.ColorCompressionInfo, ref bufferReadValid); this.Color2 = GameNetworkMessage.ReadUintFromPacket(CompressionGeneric.ColorCompressionInfo, ref bufferReadValid); this.BannerCode = GameNetworkMessage.ReadStringFromPacket(ref bufferReadValid); this.IsPlayerGeneral = GameNetworkMessage.ReadBoolFromPacket(ref bufferReadValid); this.IsPlayerSergeant = GameNetworkMessage.ReadBoolFromPacket(ref bufferReadValid); return(bufferReadValid); }
protected override bool OnRead() { bool bufferReadValid = true; this.Peer = GameNetworkMessage.ReadNetworkPeerReferenceFromPacket(ref bufferReadValid); ulong part1 = GameNetworkMessage.ReadUlongFromPacket(CompressionBasic.DebugULongNonCompressionInfo, ref bufferReadValid); ulong part2 = GameNetworkMessage.ReadUlongFromPacket(CompressionBasic.DebugULongNonCompressionInfo, ref bufferReadValid); ulong part3 = GameNetworkMessage.ReadUlongFromPacket(CompressionBasic.DebugULongNonCompressionInfo, ref bufferReadValid); ulong part4 = GameNetworkMessage.ReadUlongFromPacket(CompressionBasic.DebugULongNonCompressionInfo, ref bufferReadValid); this.BannerCode = GameNetworkMessage.ReadStringFromPacket(ref bufferReadValid); if (bufferReadValid) { this.ProvidedId = new PlayerId(part1, part2, part3, part4); } this.BodyProperties = GameNetworkMessage.ReadBodyPropertiesFromPacket(ref bufferReadValid); this.ChosenBadgeIndex = GameNetworkMessage.ReadIntFromPacket(CompressionBasic.PlayerChosenBadgeCompressionInfo, ref bufferReadValid); this.ForcedAvatarIndex = GameNetworkMessage.ReadIntFromPacket(CompressionBasic.ForcedAvatarIndexCompressionInfo, ref bufferReadValid); return(bufferReadValid); }
public static MissionWeapon ReadWeaponReferenceFromPacket( MBObjectManager objectManager, ref bool bufferReadValid) { if (GameNetworkMessage.ReadBoolFromPacket(ref bufferReadValid)) { return(MissionWeapon.Invalid); } MBObjectBase mbObjectBase1 = GameNetworkMessage.ReadObjectReferenceFromPacket(objectManager, CompressionBasic.GUIDCompressionInfo, ref bufferReadValid); int num1 = GameNetworkMessage.ReadIntFromPacket(CompressionGeneric.ItemDataValueCompressionInfo, ref bufferReadValid); int num2 = GameNetworkMessage.ReadIntFromPacket(CompressionMission.WeaponReloadPhaseCompressionInfo, ref bufferReadValid); short num3 = (short)GameNetworkMessage.ReadIntFromPacket(CompressionMission.WeaponUsageIndexCompressionInfo, ref bufferReadValid); int num4 = GameNetworkMessage.ReadBoolFromPacket(ref bufferReadValid) ? 1 : 0; Banner banner = (Banner)null; if (num4 != 0) { string bannerKey = GameNetworkMessage.ReadStringFromPacket(ref bufferReadValid); if (bufferReadValid) { banner = new Banner(bannerKey); } } ItemObject primaryItem1 = mbObjectBase1 as ItemObject; bool flag = GameNetworkMessage.ReadBoolFromPacket(ref bufferReadValid); MissionWeapon missionWeapon; if (bufferReadValid & flag) { MBObjectBase mbObjectBase2 = GameNetworkMessage.ReadObjectReferenceFromPacket(objectManager, CompressionBasic.GUIDCompressionInfo, ref bufferReadValid); int num5 = GameNetworkMessage.ReadIntFromPacket(CompressionGeneric.ItemDataValueCompressionInfo, ref bufferReadValid); ItemObject primaryItem2 = mbObjectBase2 as ItemObject; missionWeapon = new MissionWeapon(primaryItem1, (ItemModifier)null, banner, (short)num1, (short)num2, new MissionWeapon?(new MissionWeapon(primaryItem2, (ItemModifier)null, banner, (short)num5))); } else { missionWeapon = new MissionWeapon(primaryItem1, (ItemModifier)null, banner, (short)num1, (short)num2, new MissionWeapon?()); } missionWeapon.CurrentUsageIndex = (int)num3; return(missionWeapon); }
protected override bool OnRead() { bool bufferReadValid = true; this.ObjectId = GameNetworkMessage.ReadMissionObjectIdFromPacket(ref bufferReadValid); this.Prefab = GameNetworkMessage.ReadStringFromPacket(ref bufferReadValid); this.Frame = GameNetworkMessage.ReadMatrixFrameFromPacket(ref bufferReadValid); int capacity = GameNetworkMessage.ReadIntFromPacket(CompressionBasic.EntityChildCountCompressionInfo, ref bufferReadValid); if (bufferReadValid) { this.ChildObjectIds = new List <MissionObjectId>(capacity); for (int index = 0; index < capacity; ++index) { if (bufferReadValid) { this.ChildObjectIds.Add(GameNetworkMessage.ReadMissionObjectIdFromPacket(ref bufferReadValid)); } } } return(bufferReadValid); }