public static void WriteWeaponReferenceToPacket(MissionWeapon weapon) { GameNetworkMessage.WriteBoolToPacket(weapon.IsEmpty); if (weapon.IsEmpty) { return; } GameNetworkMessage.WriteObjectReferenceToPacket((MBObjectBase)weapon.Item, CompressionBasic.GUIDCompressionInfo); GameNetworkMessage.WriteIntToPacket((int)weapon.RawDataForNetwork, CompressionGeneric.ItemDataValueCompressionInfo); GameNetworkMessage.WriteIntToPacket((int)weapon.ReloadPhase, CompressionMission.WeaponReloadPhaseCompressionInfo); GameNetworkMessage.WriteIntToPacket(weapon.CurrentUsageIndex, CompressionMission.WeaponUsageIndexCompressionInfo); int num1 = weapon.Banner != null ? 1 : 0; GameNetworkMessage.WriteBoolToPacket(num1 != 0); if (num1 != 0) { GameNetworkMessage.WriteStringToPacket(weapon.Banner.Serialize()); } MissionWeapon ammoWeapon = weapon.AmmoWeapon; int num2 = !ammoWeapon.IsEmpty ? 1 : 0; GameNetworkMessage.WriteBoolToPacket(num2 != 0); if (num2 == 0) { return; } GameNetworkMessage.WriteObjectReferenceToPacket((MBObjectBase)ammoWeapon.Item, CompressionBasic.GUIDCompressionInfo); GameNetworkMessage.WriteIntToPacket((int)ammoWeapon.RawDataForNetwork, CompressionGeneric.ItemDataValueCompressionInfo); }
protected override void OnWrite() { foreach (MultiplayerOptions.MultiplayerOption option in this._optionList) { MultiplayerOptions.OptionType optionType = option.OptionType; MultiplayerOptionsProperty optionProperty = optionType.GetOptionProperty(); switch (optionProperty.OptionValueType) { case MultiplayerOptions.OptionValueType.Bool: GameNetworkMessage.WriteBoolToPacket(optionType.GetBoolValue()); continue; case MultiplayerOptions.OptionValueType.Integer: case MultiplayerOptions.OptionValueType.Enum: GameNetworkMessage.WriteIntToPacket(optionType.GetIntValue(), new CompressionInfo.Integer(optionProperty.BoundsMin, optionProperty.BoundsMax, true)); continue; case MultiplayerOptions.OptionValueType.String: GameNetworkMessage.WriteStringToPacket(optionType.GetStrValue()); continue; default: continue; } } }
protected override void OnWrite() { GameNetworkMessage.WriteMBTeamReferenceToPacket(this.Team, CompressionMission.TeamCompressionInfo); GameNetworkMessage.WriteIntToPacket((int)this.Side, CompressionMission.TeamSideCompressionInfo); GameNetworkMessage.WriteUintToPacket(this.Color, CompressionGeneric.ColorCompressionInfo); GameNetworkMessage.WriteUintToPacket(this.Color2, CompressionGeneric.ColorCompressionInfo); GameNetworkMessage.WriteStringToPacket(this.BannerCode); GameNetworkMessage.WriteBoolToPacket(this.IsPlayerGeneral); GameNetworkMessage.WriteBoolToPacket(this.IsPlayerSergeant); }
protected override void OnWrite() { GameNetworkMessage.WriteMissionObjectIdToPacket(this.ObjectId); GameNetworkMessage.WriteStringToPacket(this.Prefab); GameNetworkMessage.WriteMatrixFrameToPacket(this.Frame); GameNetworkMessage.WriteIntToPacket(this.ChildObjectIds.Count, CompressionBasic.EntityChildCountCompressionInfo); foreach (MissionObjectId childObjectId in this.ChildObjectIds) { GameNetworkMessage.WriteMissionObjectIdToPacket(childObjectId); } }
protected override void OnWrite() { GameNetworkMessage.WriteNetworkPeerReferenceToPacket(this.Peer); GameNetworkMessage.WriteUlongToPacket(this.ProvidedId.Part1, CompressionBasic.DebugULongNonCompressionInfo); GameNetworkMessage.WriteUlongToPacket(this.ProvidedId.Part2, CompressionBasic.DebugULongNonCompressionInfo); GameNetworkMessage.WriteUlongToPacket(this.ProvidedId.Part3, CompressionBasic.DebugULongNonCompressionInfo); GameNetworkMessage.WriteUlongToPacket(this.ProvidedId.Part4, CompressionBasic.DebugULongNonCompressionInfo); GameNetworkMessage.WriteStringToPacket(this.BannerCode); BodyProperties bodyProperties = this.BodyProperties; GameNetworkMessage.WriteBodyPropertiesToPacket(in bodyProperties); GameNetworkMessage.WriteIntToPacket(this.ChosenBadgeIndex, CompressionBasic.PlayerChosenBadgeCompressionInfo); GameNetworkMessage.WriteIntToPacket(this.ForcedAvatarIndex, CompressionBasic.ForcedAvatarIndexCompressionInfo); }
protected override void OnWrite() { GameNetworkMessage.WriteAgentReferenceToPacket(this.Agent); GameNetworkMessage.WriteStringToPacket(this.PrefabName); GameNetworkMessage.WriteIntToPacket((int)this.BoneIndex, CompressionMission.BoneIndexCompressionInfo); }
protected override void OnWrite() { GameNetworkMessage.WriteStringToPacket(this.Message); GameNetworkMessage.WriteBoolToPacket(this.IsMessageTextId); }
protected override void OnWrite() { GameNetworkMessage.WriteStringToPacket(this.GameType); GameNetworkMessage.WriteStringToPacket(this.Map); }
protected override void OnWrite() { GameNetworkMessage.WriteNetworkPeerReferenceToPacket(this.Player); GameNetworkMessage.WriteStringToPacket(this.Message); }
protected override void OnWrite() { GameNetworkMessage.WriteIntToPacket(this.PlayerIndex, CompressionBasic.PlayerCompressionInfo); GameNetworkMessage.WriteStringToPacket(this.PlayerName); }
protected override void OnWrite() { GameNetworkMessage.WriteIntToPacket(this.FormationIndex, CompressionOrder.FormationClassCompressionInfo); GameNetworkMessage.WriteTeamReferenceToPacket(this.Team); GameNetworkMessage.WriteStringToPacket(this.BannerCode); }