예제 #1
0
        public static bool Start(UILobbyMainWndCtrl __instance)
        {
            PeSteamFriendMgr.Instance.Init(__instance.mTopLeftAuthor.transform, __instance.mUICenter.transform, __instance.mUICamera);

            if (GameClientLobby.Self == null)
            {
                return(false);
            }

            Traverse.Create(__instance).Field("mRoleInfo").SetValue(GameClientLobby.role);

            __instance.GetType().GetMethod("SetRoleInfo", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic).Invoke(__instance, new object[] { });

            var mRecentRoom_M = new RecentRoomDataManager(Traverse.Create(__instance).Field("mRoleInfo").Field("name").GetValue <string>());

            Traverse.Create(__instance).Field("mRecentRoom_M").SetValue(mRecentRoom_M);
            mRecentRoom_M.LoadFromFile();

            __instance.StartCoroutine((IEnumerator)__instance.GetType().GetMethod("UpdatePlayerInfo", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic).Invoke(__instance, new object[] { }));
            __instance.StartCoroutine((IEnumerator)__instance.GetType().GetMethod("UpdateRoomInfo", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic).Invoke(__instance, new object[] { }));

            SteamServerHandler.currentLanRequest =
                SteamMatchmakingServers.RequestLANServerList(new AppId_t(237870u),
                                                             new ISteamMatchmakingServerListResponse(SteamServerHandler.ServerResponded, SteamServerHandler.ServerFailedToRespond, SteamServerHandler.RefreshComplete));
            SteamServerHandler.currentInternetRequest =
                SteamMatchmakingServers.RequestInternetServerList(new AppId_t(237870u), new MatchMakingKeyValuePair_t[] { new MatchMakingKeyValuePair_t()
                                                                                                                          {
                                                                                                                              m_szKey = "gametagsand", m_szValue = "public"
                                                                                                                          } }, 1,
                                                                  new ISteamMatchmakingServerListResponse(SteamServerHandler.ServerResponded, SteamServerHandler.ServerFailedToRespond, SteamServerHandler.RefreshComplete));
            SteamServerHandler.lastUpdate = true;


            __instance.GetType().GetMethod("InitRoomListSort", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic).Invoke(__instance, new object[] { });


            return(false);
        }
예제 #2
0
        public static bool Update(UILobbyMainWndCtrl __instance)
        {
            __instance.GetType().GetMethod("UpdateLobbyLevel", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic).Invoke(__instance, new object[] { });

            return(false);
        }