public void Update() { APIUser selectedUser = QuickMenu.Instance.SelectedUser; VRCPlayer vrcLocal = PlayerManager.GetCurrentPlayer().vrcPlayer; if (selectedUser != null && !Event.current.control) { VRCPlayer vrcSelected = PlayerManager.GetPlayer(selectedUser.id).vrcPlayer; if (Input.GetMouseButtonDown(1)) { System.Console.WriteLine("Copied {0}'s avatar!", selectedUser.displayName); User.CurrentUser.SetCurrentAvatar(vrcSelected.GetApiAvatar()); } if (Input.GetMouseButtonDown(2)) { ApiAvatar apiAvatar = vrcSelected.GetApiAvatar(); ApiAvatar apiAvatar2 = new ApiAvatar(); Cheat.SetForegroundWindow(Cheat.GetConsoleWindow()); System.Console.Write("Enter avatar's name: "); string avatarName = System.Console.ReadLine(); System.Console.Write("Enter image URL: "); string avatarImageURL = System.Console.ReadLine(); System.Console.Write("Enter avatar description: "); string avatarDesc = System.Console.ReadLine(); apiAvatar2.Init(User.CurrentUser, avatarName, avatarImageURL, apiAvatar.assetUrl, avatarDesc, apiAvatar.tags, apiAvatar.unityPackageUrl); apiAvatar2.Save(MainClass.avatarSaved, MainClass.avatarError); } if (Input.GetKeyDown(KeyCode.T)) { PlayerManager.GetCurrentPlayer().transform.position = vrcSelected.transform.position; PlayerManager.GetCurrentPlayer().transform.rotation = vrcSelected.transform.rotation; } if (Input.GetKeyDown(KeyCode.N)) { PhotonNetwork.playerName = selectedUser.displayName; Hashtable propertiesToSet = new Hashtable { { "userId", User.CurrentUser.id } }; PhotonNetwork.player.SetCustomProperties(propertiesToSet, null, false); } } else if (Event.current.control) { if (Input.GetKeyDown(KeyCode.N)) { Cheat.SetForegroundWindow(Cheat.GetConsoleWindow()); System.Console.Write("Enter new name: "); PhotonNetwork.playerName = System.Console.ReadLine(); Hashtable propertiesToSet2 = new Hashtable { { "userId", User.CurrentUser.id } }; PhotonNetwork.player.SetCustomProperties(propertiesToSet2, null, false); } if (Input.GetKeyDown(KeyCode.B)) { ApiAvatar apiAvatar = vrcLocal.GetApiAvatar(); System.Console.Write("Enter image URL: "); apiAvatar.imageUrl = System.Console.ReadLine(); apiAvatar.Save(MainClass.avatarSaved, MainClass.avatarError); selectedUser.SetCurrentAvatar(apiAvatar); } if (Input.GetKeyDown(KeyCode.G)) { Cheat.Class6 @class = new Cheat.Class6(); System.Console.Clear(); System.Console.WriteLine(string.Join(", ", PlayerManager.GetAllPlayers().Select(new Func <Player, string>(Cheat.MainClass.getDisplayName)).ToArray <string>())); Cheat.SetForegroundWindow(Cheat.GetConsoleWindow()); System.Console.Write("Teleport to: "); @class.string_0 = System.Console.ReadLine().ToLower(); if (@class.string_0 != string.Empty) { Player player = PlayerManager.GetAllPlayers().FirstOrDefault(new Func <Player, bool>(@class.method_0)); if (player != null) { System.Console.WriteLine("Teleporting to {0}", player.user.displayName); PlayerManager.GetCurrentPlayer().transform.position = player.transform.position; PlayerManager.GetCurrentPlayer().transform.rotation = player.transform.rotation; } } } if (Input.GetKeyDown(KeyCode.Delete)) { System.Console.WriteLine("Avatar(\"{0}\", {1}) deleted!", User.CurrentUser.apiAvatar.name, User.CurrentUser.apiAvatar.id); ApiAvatar.Delete(User.CurrentUser.apiAvatar.id, new Action(Cheat.MainClass.avatarDel), new Action <string>(Cheat.MainClass.avatarDelError)); } if (Input.GetKeyDown(KeyCode.M)) { new Thread(new ThreadStart(Cheat.MainClass.pickupItemsToMe)).Start(); } if (Input.GetKeyDown(KeyCode.B)) { ApiAvatar avatar = vrcLocal.GetApiAvatar(); System.Console.WriteLine(avatar.name + ":" + avatar.assetUrl + ":" + avatar.assetVersion + ":" + avatar.authorId + ":" + avatar.authorName + ":" + avatar.id + ":" + avatar.imageUrl); } if (Input.GetMouseButtonDown(2)) { System.Console.Write("Enter avatar ID: "); Cheat.SetForegroundWindow(Cheat.GetConsoleWindow()); ApiAvatar.Fetch(System.Console.ReadLine(), Cheat.MainClass.saveAvatar, Cheat.MainClass.method_16); } if (Input.GetKeyDown(KeyCode.O)) { Cheat.FollowUser followUser = new Cheat.FollowUser(); Cheat.SetForegroundWindow(Cheat.GetConsoleWindow()); System.Console.Write("Follow: "); followUser.UserName = System.Console.ReadLine(); APIUser.FetchUsers(followUser.UserName, followUser.onSuccess, Cheat.MainClass.fetchUserErr); } if (Input.GetKeyDown(KeyCode.F)) { this.speedhack = !this.speedhack; if (this.speedhack) { this.vector3_0 = Physics.gravity; Physics.gravity = Vector3.zero; } else { Physics.gravity = this.vector3_0; } } if (Input.GetKeyDown(KeyCode.R)) { this.flyMode = !this.flyMode; } } if (this.locomotionInputController == null) { this.locomotionInputController = vrcLocal.GetComponent <LocomotionInputController>(); this.vrcmotionState = (VRCMotionState)typeof(LocomotionInputController).GetField("motionState", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(this.locomotionInputController); } bool key = Input.GetKey(KeyCode.LeftShift); if (this.speedhack) { this.vrcmotionState.Reset(); Vector3 position = vrcLocal.transform.position; if (Input.GetKey(KeyCode.E)) { vrcLocal.transform.position = new Vector3(position.x, position.y + (float)(key ? 15 : 4) * Time.deltaTime, position.z); } if (Input.GetKey(KeyCode.Q)) { vrcLocal.transform.position = new Vector3(position.x, position.y - (float)(key ? 15 : 4) * Time.deltaTime, position.z); } } this.locomotionInputController.strafeSpeed = (float)(this.speedhack ? (key ? 15 : 4) : (key ? 8 : 2)); this.locomotionInputController.runSpeed = (float)(this.speedhack ? 15 : 4); if (this.flyMode && DateTime.Now.Millisecond % 500 <= 10) { if (this.randomName) { PhotonNetwork.playerName = Path.GetRandomFileName(); Hashtable propertiesToSet3 = new Hashtable { { "userId", User.CurrentUser.id } }; PhotonNetwork.player.SetCustomProperties(propertiesToSet3, null, false); this.randomName = false; return; } } else { this.randomName = true; } }
static void smethod_51(string string_0, Action <List <APIUser> > action_0, Action <string> action_1) { APIUser.FetchUsers(string_0, action_0, action_1); }
// Token: 0x060061A1 RID: 24993 RVA: 0x002273B4 File Offset: 0x002257B4 protected override void FetchAndRenderElements(int page) { List <ApiModel> am = new List <ApiModel>(); switch (this.listType) { case UiUserList.ListType.InWorld: if (RoomManager.inRoom) { Player[] allPlayers = PlayerManager.GetAllPlayers(); List <string> inRoomUserIds = (from p in allPlayers select p.userId).ToList <string>(); PlayerManager.FetchUsersInWorldInstance(delegate(List <APIUser> users) { foreach (APIUser apiuser in users) { Player player = PlayerManager.GetPlayer(apiuser.id); bool flag = player != null && player.vrcPlayer != null && player.vrcPlayer.isInvisible; if (inRoomUserIds.Contains(apiuser.id) && !flag) { am.Add(apiuser); } } this.RenderPaginatedUsers(am.Cast <APIUser>().ToList <APIUser>(), page); }, delegate(string message) { Debug.LogError("Could not fetch users in current world - " + message); }); } break; case UiUserList.ListType.FriendRequests: ApiNotification.FetchAll(ApiNotification.NotificationType.Friendrequest, false, string.Empty, delegate(List <ApiNotification> notifications) { foreach (ApiNotification item in notifications) { am.Add(item); } this.RenderPaginatedNotifs(am.Cast <ApiNotification>().ToList <ApiNotification>(), page); }, delegate(string message) { Debug.LogError("Could not fetch users in current world - " + message); }); break; case UiUserList.ListType.OnlineFriends: APIUser.FetchFriends(delegate(List <APIUser> users) { foreach (APIUser apiuser in users) { Player player = PlayerManager.GetPlayer(apiuser.id); bool flag = player != null && player.vrcPlayer != null && player.vrcPlayer.isInvisible; if (apiuser.location != "offline" && !flag) { am.Add(apiuser); } } this.RenderPaginatedUsers(am.Cast <APIUser>().ToList <APIUser>(), page); }, delegate(string message) { Debug.LogError("Could not fetch users in current world - " + message); }); break; case UiUserList.ListType.OfflineFriends: APIUser.FetchFriends(delegate(List <APIUser> users) { foreach (APIUser apiuser in users) { Player player = PlayerManager.GetPlayer(apiuser.id); bool flag = player != null && player.vrcPlayer != null && player.vrcPlayer.isInvisible; if (apiuser.location == "offline" || flag) { am.Add(apiuser); } } this.RenderPaginatedUsers(am.Cast <APIUser>().ToList <APIUser>(), page); }, delegate(string message) { Debug.LogError("Could not fetch users in current world - " + message); }); break; case UiUserList.ListType.HelpRequests: ApiNotification.FetchAll(ApiNotification.NotificationType.Halp, false, string.Empty, delegate(List <ApiNotification> notifications) { foreach (ApiNotification item in notifications) { am.Add(item); } this.RenderPaginatedNotifs(am.Cast <ApiNotification>().ToList <ApiNotification>(), page); }, delegate(string message) { Debug.LogError("Could not fetch users in current world - " + message); }); break; case UiUserList.ListType.Search: APIUser.FetchUsers(this.searchQuery, delegate(List <APIUser> users) { foreach (APIUser item in users) { am.Add(item); } this.RenderPaginatedUsers(am.Cast <APIUser>().ToList <APIUser>(), page); }, delegate(string message) { Debug.LogError("Could not fetch users in current world - " + message); }); break; } }