Ejemplo n.º 1
0
        public static async Task <KingdomInfo> GetKingdomInfo(uint index)
        {
            KingdomInfo kingdomInfo = new KingdomInfo((SAO_Kingdoms)index)
            {
                Index = index,
            };
            var Existing =
                await ThereIsServer.Actions.GetAllContentsByRef(ThereIsServer.ServersInfo.MyServers[index],
                                                                KingdomInfoFileName);

            await Task.Delay(300);

            if (Existing.IsDeadCallBack || ThereIsServer.ServerSettings.HasConnectionClosed)
            {
                NoInternetConnectionSandBox.PrepareConnectionClosedSandBox();
                return(null); // don't set ServerSettings.IsWaitingForServerChecking = false;
            }
            kingdomInfo.SetParams(Existing.Decode());
            return(kingdomInfo);
        }
Ejemplo n.º 2
0
        public static async Task <KingdomInfo> GetKingdomInfo(SAO_Kingdoms _kingdom_)
        {
            KingdomInfo kingdomInfo = new KingdomInfo(_kingdom_)
            {
                Index = (uint)_kingdom_,
            };
            //---------------------------------------------
            var _s        = ThereIsServer.ServersInfo.ServerManager.Get_Kingdom_Server(kingdomInfo.Provider);
            var _target   = KingdomInfo_LOC;
            var _existing = await ThereIsServer.Actions.GetAllContentsByRef(_s, _target);

            //---------------------------------------------
            if (_existing.IsDeadCallBack || ThereIsServer.ServerSettings.HasConnectionClosed)
            {
                NoInternetConnectionSandBox.PrepareConnectionClosedSandBox();
                return(null); // don't set ServerSettings.IsWaitingForServerChecking = false;
            }
            kingdomInfo.SetParams(_existing.Decode());
            kingdomInfo.Rankings = await KingdomRankings.GetKingdomRankings(kingdomInfo);

            kingdomInfo.Throne = await KingdomThrone.GetKingdomThrone(kingdomInfo);

            return(kingdomInfo);
        }