public static void Serialize(Stream stream, GameRoomDataView instance) { int mask = 0; using (var bytes = new MemoryStream()) { Int32Proxy.Serialize(bytes, instance.ConnectedPlayers); Int32Proxy.Serialize(bytes, instance.GameFlags); EnumProxy <GameModeType> .Serialize(bytes, instance.GameMode); if (instance.Guid != null) { StringProxy.Serialize(bytes, instance.Guid); } else { mask |= 1; } BooleanProxy.Serialize(bytes, instance.IsPasswordProtected); BooleanProxy.Serialize(bytes, instance.IsPermanentGame); Int32Proxy.Serialize(bytes, instance.KillLimit); ByteProxy.Serialize(bytes, instance.LevelMax); ByteProxy.Serialize(bytes, instance.LevelMin); Int32Proxy.Serialize(bytes, instance.MapID); if (instance.Name != null) { StringProxy.Serialize(bytes, instance.Name); } else { mask |= 2; } Int32Proxy.Serialize(bytes, instance.Number); Int32Proxy.Serialize(bytes, instance.PlayerLimit); if (instance.Server != null) { ConnectionAddressViewProxy.Serialize(bytes, instance.Server); } else { mask |= 4; } Int32Proxy.Serialize(bytes, instance.TimeLimit); Int32Proxy.Serialize(stream, ~mask); bytes.WriteTo(stream); } }
public static void Serialize(Stream stream, MapView instance) { var mask = 0; using (var bytes = new MemoryStream()) { if (instance.Description != null) { StringProxy.Serialize(bytes, instance.Description); } else { mask |= 1; } if (instance.DisplayName != null) { StringProxy.Serialize(bytes, instance.DisplayName); } else { mask |= 2; } BooleanProxy.Serialize(bytes, instance.IsBlueBox); Int32Proxy.Serialize(bytes, instance.MapId); Int32Proxy.Serialize(bytes, instance.MaxPlayers); Int32Proxy.Serialize(bytes, instance.RecommendedItemId); if (instance.SceneName != null) { StringProxy.Serialize(bytes, instance.SceneName); } else { mask |= 4; } if (instance.Settings != null) { DictionaryProxy <GameModeType, MapSettingsView> .Serialize(bytes, instance.Settings, EnumProxy <GameModeType> .Serialize, MapSettingsViewProxy.Serialize); } else { mask |= 8; } Int32Proxy.Serialize(bytes, instance.SupportedGameModes); Int32Proxy.Serialize(bytes, instance.SupportedItemClass); Int32Proxy.Serialize(stream, ~mask); bytes.WriteTo(stream); } }
public static void Serialize(Stream stream, LuckyDrawUnityView instance) { int mask = 0; using (var bytes = new MemoryStream()) { EnumProxy <BundleCategoryType> .Serialize(bytes, instance.Category); if (instance.Description != null) { StringProxy.Serialize(bytes, instance.Description); } else { mask |= 1; } if (instance.IconUrl != null) { StringProxy.Serialize(bytes, instance.IconUrl); } else { mask |= 2; } Int32Proxy.Serialize(bytes, instance.Id); BooleanProxy.Serialize(bytes, instance.IsAvailableInShop); if (instance.LuckyDrawSets != null) { ListProxy <LuckyDrawSetUnityView> .Serialize(bytes, instance.LuckyDrawSets, new ListProxy <LuckyDrawSetUnityView> .Serializer <LuckyDrawSetUnityView>(LuckyDrawSetUnityViewProxy.Serialize)); } else { mask |= 4; } if (instance.Name != null) { StringProxy.Serialize(bytes, instance.Name); } else { mask |= 8; } Int32Proxy.Serialize(bytes, instance.Price); EnumProxy <UberStrikeCurrencyType> .Serialize(bytes, instance.UberStrikeCurrencyType); Int32Proxy.Serialize(stream, ~mask); bytes.WriteTo(stream); } }
public static void Serialize(Stream stream, MemberAuthenticationResultView instance) { int mask = 0; using (var bytes = new MemoryStream()) { if (instance.AuthToken != null) { StringProxy.Serialize(bytes, instance.AuthToken); } else { mask |= 1; } BooleanProxy.Serialize(bytes, instance.IsAccountComplete); if (instance.LuckyDraw != null) { LuckyDrawUnityViewProxy.Serialize(bytes, instance.LuckyDraw); } else { mask |= 2; } EnumProxy <MemberAuthenticationResult> .Serialize(bytes, instance.MemberAuthenticationResult); if (instance.MemberView != null) { MemberViewProxy.Serialize(bytes, instance.MemberView); } else { mask |= 4; } if (instance.PlayerStatisticsView != null) { PlayerStatisticsViewProxy.Serialize(bytes, instance.PlayerStatisticsView); } else { mask |= 8; } DateTimeProxy.Serialize(bytes, instance.ServerTime); Int32Proxy.Serialize(stream, ~mask); bytes.WriteTo(stream); } }
public static void Serialize(Stream stream, AuthenticateApplicationView instance) { int mask = 0; using (var bytes = new MemoryStream()) { if (instance.CommServer != null) { PhotonViewProxy.Serialize(bytes, instance.CommServer); } else { mask |= 1; } if (instance.EncryptionInitVector != null) { StringProxy.Serialize(bytes, instance.EncryptionInitVector); } else { mask |= 2; } if (instance.EncryptionPassPhrase != null) { StringProxy.Serialize(bytes, instance.EncryptionPassPhrase); } else { mask |= 4; } if (instance.GameServers != null) { ListProxy <PhotonView> .Serialize(bytes, instance.GameServers, PhotonViewProxy.Serialize); } else { mask |= 8; } BooleanProxy.Serialize(bytes, instance.IsEnabled); BooleanProxy.Serialize(bytes, instance.WarnPlayer); Int32Proxy.Serialize(stream, ~mask); bytes.WriteTo(stream); } }
// Token: 0x060011AF RID: 4527 RVA: 0x0001D12C File Offset: 0x0001B32C public static Coroutine GetContactsByGroups(string authToken, bool populateFacebookIds, Action <List <ContactGroupView> > callback, Action <Exception> handler) { Coroutine result; using (MemoryStream memoryStream = new MemoryStream()) { StringProxy.Serialize(memoryStream, authToken); BooleanProxy.Serialize(memoryStream, populateFacebookIds); result = MonoInstance.Mono.StartCoroutine(SoapClient.MakeRequest("IRelationshipWebServiceContract", "RelationshipWebService", "GetContactsByGroups", memoryStream.ToArray(), delegate(byte[] data) { if (callback != null) { callback(ListProxy <ContactGroupView> .Deserialize(new MemoryStream(data), new ListProxy <ContactGroupView> .Deserializer <ContactGroupView>(ContactGroupViewProxy.Deserialize))); } }, handler)); } return(result); }
// Token: 0x060012D6 RID: 4822 RVA: 0x00020AE8 File Offset: 0x0001ECE8 public void SendIsInSniperMode(bool on) { using (MemoryStream memoryStream = new MemoryStream()) { BooleanProxy.Serialize(memoryStream, on); Dictionary <byte, object> customOpParameters = new Dictionary <byte, object> { { this.__id, memoryStream.ToArray() } }; if (this.sendOperation != null) { this.sendOperation(19, customOpParameters, true, 0, false); } } }
public static void Serialize(Stream stream, PublicProfileView instance) { int mask = 0; using (var bytes = new MemoryStream()) { EnumProxy <MemberAccessLevel> .Serialize(bytes, instance.AccessLevel); Int32Proxy.Serialize(bytes, instance.Cmid); EnumProxy <EmailAddressStatus> .Serialize(bytes, instance.EmailAddressStatus); if (instance.FacebookId != null) { StringProxy.Serialize(bytes, instance.FacebookId); } else { mask |= 1; } if (instance.GroupTag != null) { StringProxy.Serialize(bytes, instance.GroupTag); } else { mask |= 2; } BooleanProxy.Serialize(bytes, instance.IsChatDisabled); DateTimeProxy.Serialize(bytes, instance.LastLoginDate); if (instance.Name != null) { StringProxy.Serialize(bytes, instance.Name); } else { mask |= 4; } Int32Proxy.Serialize(stream, ~mask); bytes.WriteTo(stream); } }
// Token: 0x060012DD RID: 4829 RVA: 0x00020E74 File Offset: 0x0001F074 public void SendRemoveProjectile(int projectileId, bool explode) { using (MemoryStream memoryStream = new MemoryStream()) { Int32Proxy.Serialize(memoryStream, projectileId); BooleanProxy.Serialize(memoryStream, explode); Dictionary <byte, object> customOpParameters = new Dictionary <byte, object> { { this.__id, memoryStream.ToArray() } }; if (this.sendOperation != null) { this.sendOperation(26, customOpParameters, true, 0, false); } } }
// Token: 0x0600126A RID: 4714 RVA: 0x0001EC78 File Offset: 0x0001CE78 public void SendModerationMutePlayer(int durationInMinutes, int mutedCmid, bool disableChat) { using (MemoryStream memoryStream = new MemoryStream()) { Int32Proxy.Serialize(memoryStream, durationInMinutes); Int32Proxy.Serialize(memoryStream, mutedCmid); BooleanProxy.Serialize(memoryStream, disableChat); Dictionary <byte, object> customOpParameters = new Dictionary <byte, object> { { this.__id, memoryStream.ToArray() } }; if (this.sendOperation != null) { this.sendOperation(13, customOpParameters, true, 0, false); } } }
// Token: 0x060012DF RID: 4831 RVA: 0x00020F6C File Offset: 0x0001F16C public void SendActivateQuickItem(QuickItemLogic logic, int robotLifeTime, int scrapsLifeTime, bool isInstant) { using (MemoryStream memoryStream = new MemoryStream()) { EnumProxy <QuickItemLogic> .Serialize(memoryStream, logic); Int32Proxy.Serialize(memoryStream, robotLifeTime); Int32Proxy.Serialize(memoryStream, scrapsLifeTime); BooleanProxy.Serialize(memoryStream, isInstant); Dictionary <byte, object> customOpParameters = new Dictionary <byte, object> { { this.__id, memoryStream.ToArray() } }; if (this.sendOperation != null) { this.sendOperation(28, customOpParameters, true, 0, false); } } }
// Token: 0x060012DB RID: 4827 RVA: 0x00020D4C File Offset: 0x0001EF4C public void SendEmitProjectile(Vector3 origin, Vector3 direction, byte slot, int projectileID, bool explode) { using (MemoryStream memoryStream = new MemoryStream()) { Vector3Proxy.Serialize(memoryStream, origin); Vector3Proxy.Serialize(memoryStream, direction); ByteProxy.Serialize(memoryStream, slot); Int32Proxy.Serialize(memoryStream, projectileID); BooleanProxy.Serialize(memoryStream, explode); Dictionary <byte, object> customOpParameters = new Dictionary <byte, object> { { this.__id, memoryStream.ToArray() } }; if (this.sendOperation != null) { this.sendOperation(24, customOpParameters, true, 0, false); } } }
byte[] IUserWebServiceContract.IsDuplicateMemberName(byte[] data) { try { using (var bytes = new MemoryStream(data)) { var username = StringProxy.Deserialize(bytes); var result = OnIsDuplicateMemberName(username); using (var outBytes = new MemoryStream()) { BooleanProxy.Serialize(outBytes, result); return(outBytes.ToArray()); } } } catch (Exception ex) { Log.Error("Unable to handle IsDuplicateMemberName request:"); Log.Error(ex); return(null); } }
public static void Serialize(Stream stream, LuckyDrawSetUnityView instance) { int mask = 0; using (var bytes = new MemoryStream()) { Int32Proxy.Serialize(bytes, instance.CreditsAttributed); BooleanProxy.Serialize(bytes, instance.ExposeItemsToPlayers); Int32Proxy.Serialize(bytes, instance.Id); if (instance.ImageUrl != null) { StringProxy.Serialize(bytes, instance.ImageUrl); } else { mask |= 1; } Int32Proxy.Serialize(bytes, instance.LuckyDrawId); if (instance.LuckyDrawSetItems != null) { ListProxy <BundleItemView> .Serialize(bytes, instance.LuckyDrawSetItems, BundleItemViewProxy.Serialize); } else { mask |= 2; } Int32Proxy.Serialize(bytes, instance.PointsAttributed); Int32Proxy.Serialize(bytes, instance.SetWeight); Int32Proxy.Serialize(stream, ~mask); bytes.WriteTo(stream); } }
public static void Serialize(Stream stream, UberStrikeItemQuickView instance) { int mask = 0; using (var bytes = new MemoryStream()) { EnumProxy <QuickItemLogic> .Serialize(bytes, instance.BehaviourType); Int32Proxy.Serialize(bytes, instance.CoolDownTime); if (instance.CustomProperties != null) { DictionaryProxy <string, string> .Serialize(bytes, instance.CustomProperties, StringProxy.Serialize, StringProxy.Serialize); } else { mask |= 1; } if (instance.Description != null) { StringProxy.Serialize(bytes, instance.Description); } else { mask |= 2; } Int32Proxy.Serialize(bytes, instance.ID); BooleanProxy.Serialize(bytes, instance.IsConsumable); EnumProxy <UberStrikeItemClass> .Serialize(bytes, instance.ItemClass); if (instance.ItemProperties != null) { DictionaryProxy <ItemPropertyType, int> .Serialize(bytes, instance.ItemProperties, EnumProxy <ItemPropertyType> .Serialize, Int32Proxy.Serialize); } else { mask |= 4; } Int32Proxy.Serialize(bytes, instance.LevelLock); Int32Proxy.Serialize(bytes, instance.MaxDurationDays); Int32Proxy.Serialize(bytes, instance.MaxOwnableAmount); if (instance.Name != null) { StringProxy.Serialize(bytes, instance.Name); } else { mask |= 8; } if (instance.PrefabName != null) { StringProxy.Serialize(bytes, instance.PrefabName); } else { mask |= 16; } if (instance.Prices != null) { ListProxy <ItemPriceView> .Serialize(bytes, instance.Prices, ItemPriceViewProxy.Serialize); } else { mask |= 32; } EnumProxy <ItemShopHighlightType> .Serialize(bytes, instance.ShopHighlightType); Int32Proxy.Serialize(bytes, instance.UsesPerGame); Int32Proxy.Serialize(bytes, instance.UsesPerLife); Int32Proxy.Serialize(bytes, instance.UsesPerRound); Int32Proxy.Serialize(bytes, instance.WarmUpTime); Int32Proxy.Serialize(stream, ~mask); bytes.WriteTo(stream); } }
public static void Serialize(Stream stream, UberStrikeItemFunctionalView instance) { int mask = 0; using (var bytes = new MemoryStream()) { if (instance.CustomProperties != null) { DictionaryProxy <string, string> .Serialize(bytes, instance.CustomProperties, new DictionaryProxy <string, string> .Serializer <string>(StringProxy.Serialize), new DictionaryProxy <string, string> .Serializer <string>(StringProxy.Serialize)); } else { mask |= 1; } if (instance.Description != null) { StringProxy.Serialize(bytes, instance.Description); } else { mask |= 2; } Int32Proxy.Serialize(bytes, instance.ID); BooleanProxy.Serialize(bytes, instance.IsConsumable); EnumProxy <UberStrikeItemClass> .Serialize(bytes, instance.ItemClass); if (instance.ItemProperties != null) { DictionaryProxy <ItemPropertyType, int> .Serialize(bytes, instance.ItemProperties, EnumProxy <ItemPropertyType> .Serialize, Int32Proxy.Serialize); } else { mask |= 4; } Int32Proxy.Serialize(bytes, instance.LevelLock); Int32Proxy.Serialize(bytes, instance.MaxDurationDays); if (instance.Name != null) { StringProxy.Serialize(bytes, instance.Name); } else { mask |= 8; } if (instance.PrefabName != null) { StringProxy.Serialize(bytes, instance.PrefabName); } else { mask |= 16; } if (instance.Prices != null) { ListProxy <ItemPriceView> .Serialize(bytes, instance.Prices, ItemPriceViewProxy.Serialize); } else { mask |= 32; } EnumProxy <ItemShopHighlightType> .Serialize(bytes, instance.ShopHighlightType); Int32Proxy.Serialize(stream, ~mask); bytes.WriteTo(stream); } }
public static void Serialize(Stream stream, UberStrikeItemWeaponView instance) { int mask = 0; using (var bytes = new MemoryStream()) { Int32Proxy.Serialize(bytes, instance.AccuracySpread); Int32Proxy.Serialize(bytes, instance.CombatRange); Int32Proxy.Serialize(bytes, instance.CriticalStrikeBonus); if (instance.CustomProperties != null) { DictionaryProxy <string, string> .Serialize(bytes, instance.CustomProperties, new DictionaryProxy <string, string> .Serializer <string>(StringProxy.Serialize), new DictionaryProxy <string, string> .Serializer <string>(StringProxy.Serialize)); } else { mask |= 1; } Int32Proxy.Serialize(bytes, instance.DamageKnockback); Int32Proxy.Serialize(bytes, instance.DamagePerProjectile); Int32Proxy.Serialize(bytes, instance.DefaultZoomMultiplier); if (instance.Description != null) { StringProxy.Serialize(bytes, instance.Description); } else { mask |= 2; } BooleanProxy.Serialize(bytes, instance.HasAutomaticFire); Int32Proxy.Serialize(bytes, instance.ID); BooleanProxy.Serialize(bytes, instance.IsConsumable); EnumProxy <UberStrikeItemClass> .Serialize(bytes, instance.ItemClass); if (instance.ItemProperties != null) { DictionaryProxy <ItemPropertyType, int> .Serialize(bytes, instance.ItemProperties, EnumProxy <ItemPropertyType> .Serialize, Int32Proxy.Serialize); } else { mask |= 4; } Int32Proxy.Serialize(bytes, instance.LevelLock); Int32Proxy.Serialize(bytes, instance.MaxAmmo); Int32Proxy.Serialize(bytes, instance.MaxDurationDays); Int32Proxy.Serialize(bytes, instance.MaxZoomMultiplier); Int32Proxy.Serialize(bytes, instance.MinZoomMultiplier); Int32Proxy.Serialize(bytes, instance.MissileBounciness); Int32Proxy.Serialize(bytes, instance.MissileForceImpulse); Int32Proxy.Serialize(bytes, instance.MissileTimeToDetonate); if (instance.Name != null) { StringProxy.Serialize(bytes, instance.Name); } else { mask |= 8; } if (instance.PrefabName != null) { StringProxy.Serialize(bytes, instance.PrefabName); } else { mask |= 16; } if (instance.Prices != null) { ListProxy <ItemPriceView> .Serialize(bytes, instance.Prices, ItemPriceViewProxy.Serialize); } else { mask |= 32; } Int32Proxy.Serialize(bytes, instance.ProjectileSpeed); Int32Proxy.Serialize(bytes, instance.ProjectilesPerShot); Int32Proxy.Serialize(bytes, instance.RateOfFire); Int32Proxy.Serialize(bytes, instance.RecoilKickback); Int32Proxy.Serialize(bytes, instance.RecoilMovement); Int32Proxy.Serialize(bytes, instance.SecondaryActionReticle); EnumProxy <ItemShopHighlightType> .Serialize(bytes, instance.ShopHighlightType); Int32Proxy.Serialize(bytes, instance.SplashRadius); Int32Proxy.Serialize(bytes, instance.StartAmmo); Int32Proxy.Serialize(bytes, instance.Tier); Int32Proxy.Serialize(bytes, instance.WeaponSecondaryAction); Int32Proxy.Serialize(stream, ~mask); bytes.WriteTo(stream); } }