コード例 #1
0
        public static async Task <bool> DeletePlayerInfo(UID _uid_)
        {
            bool _r1, _r2;
            //---------------------------------------------
            var _target  = _uid_.GetValue() + PI_Server_LOC;
            var _s       = ThereIsServer.ServersInfo.ServerManager.Get_PlayerInfo_Server(_uid_.TheSocket);
            var existing = await ThereIsServer.Actions.GetAllContentsByRef(_s, _target);

            //---------------------------------------------
            if (existing.DoesNotExist)
            {
                _r1 = true;
            }
            else
            {
                if (existing.IsDeadCallBack || ThereIsServer.ServerSettings.HasConnectionClosed)
                {
                    NoInternetConnectionSandBox.PrepareConnectionClosedSandBox();
                    return(false);
                }
                //---------------------------------------------
                var _req_ = new DataBaseDeleteRequest(MESSAGE, existing.Sha.GetStrong());
                _r1 = await ThereIsServer.Actions.DeleteData(_s, _target, _req_);

                //---------------------------------------------
            }


            //---------------------------------------------
            _target  = _uid_.GetValue() + ThereIsServer.ServersInfo.EndCheckingFileName;
            _s       = ThereIsServer.ServersInfo.ServerManager.Get_Login_Server(_uid_.TheSocket);
            existing = await ThereIsServer.Actions.GetAllContentsByRef(_s, _target);

            //---------------------------------------------
            if (existing.DoesNotExist)
            {
                _r2 = true;
                return(_r1 && _r2);
            }
            if (existing.IsDeadCallBack || ThereIsServer.ServerSettings.HasConnectionClosed)
            {
                NoInternetConnectionSandBox.PrepareConnectionClosedSandBox();
                return(false);
            }
            //---------------------------------------------
            var _req = new DataBaseDeleteRequest(Player.LI_MESSAGE, existing.Sha.GetStrong());

            _r2 = await ThereIsServer.Actions.DeleteData(_s, _target, _req);

            //---------------------------------------------

            return(_r1 && _r2);
        }
コード例 #2
0
        private static async Task <bool> DeleteUID(UID _uid_)
        {
            bool _r1, _r2;
            //---------------------------------------------
            var _s       = ThereIsServer.ServersInfo.ServerManager.Get_UID_Server(_uid_);
            var _target  = _uid_.GetValue() + UID_Lcation_Name;
            var existing = await ThereIsServer.Actions.GetAllContentsByRef(_s, _target);

            //---------------------------------------------
            if (existing.DoesNotExist)
            {
                _r1 = true;
            }
            else
            {
                if (existing.IsDeadCallBack || ThereIsServer.ServerSettings.HasConnectionClosed)
                {
                    NoInternetConnectionSandBox.PrepareConnectionClosedSandBox();
                    return(false);
                }
                //---------------------------------------------
                var _req = new DataBaseDeleteRequest(UID_MESSAGE, existing.Sha.GetStrong());
                _r1 = await ThereIsServer.Actions.DeleteData(_s, _target, _req);

                //---------------------------------------------
            }
            //---------------------------------------------
            _s       = ThereIsServer.ServersInfo.ServerManager.Get_UID_Server(_uid_.PlayerUserName);
            _target  = _uid_.PlayerUserName + USERNAME_TO_UID;
            existing = await ThereIsServer.Actions.GetAllContentsByRef(_s, _target);

            //---------------------------------------------
            if (existing.DoesNotExist)
            {
                _r2 = true;
            }
            else
            {
                if (existing.IsDeadCallBack || ThereIsServer.ServerSettings.HasConnectionClosed)
                {
                    NoInternetConnectionSandBox.PrepareConnectionClosedSandBox();
                    return(false);
                }
                //---------------------------------------------
                var _req = new DataBaseDeleteRequest(UID_MESSAGE, existing.Sha.GetStrong());
                _r2 = await ThereIsServer.Actions.DeleteData(_s, _target, _req);

                //---------------------------------------------
            }
            return(_r1 && _r2);
        }
コード例 #3
0
ファイル: KingdomThrone.cs プロジェクト: TeaInside/LTW-client
        public static async Task <bool> DeleteThrone(LTW_Kingdoms _kingdom_)
        {
            var _s      = ThereIsServer.ServersInfo.ServerManager.Get_Kingdom_Server(_kingdom_);
            var _target = KingdomThrone_LOC;

            if (await ThereIsServer.Actions.Exists(_s, _target))
            {
                var existing = await ThereIsServer.Actions.GetAllContentsByRef(_s, _target);

                var _req = new DataBaseDeleteRequest(MESSAGE, existing.Sha.GetStrong());
                return(await ThereIsServer.Actions.DeleteData(_s, _target, _req));
            }
            return(true);
        }
コード例 #4
0
        public static async Task <bool> Delete(LTW_Kingdoms _kingdom_)
        {
            var  _s = ThereIsServer.ServersInfo.ServerManager.Get_Kingdom_Server(_kingdom_);
            var  _target = KingdomInfo_LOC;
            bool _del1 = false, _del2, _del3;

            if (await ThereIsServer.Actions.Exists(_s, _target))
            {
                var _existing = await ThereIsServer.Actions.GetAllContentsByRef(_s, _target);

                var _req = new DataBaseDeleteRequest(MESSAGE, _existing.Sha.GetStrong());
                _del1 = await ThereIsServer.Actions.DeleteData(_s, _target, _req);
            }
            _del2 = await KingdomRankings.DeleteRankings(_kingdom_);

            _del3 = await KingdomThrone.DeleteThrone(_kingdom_);

            return(_del1 && _del2 && _del3);
        }
コード例 #5
0
ファイル: Player.cs プロジェクト: TeaInside/LTW-client
        //-------------------------------------------------
        #region static Method's Region
        public static async Task <bool> DeletePlayer(UID _uid_)
        {
            //---------------------------------------------
            var _s       = ThereIsServer.ServersInfo.ServerManager.Get_Player_Server(_uid_.TheSocket);
            var _target  = _uid_.GetValue() + EndFileName_Player;
            var existing = await ThereIsServer.Actions.GetAllContentsByRef(_s, _target);

            //---------------------------------------------
            if (existing.DoesNotExist)
            {
                return(true);
            }
            if (existing.IsDeadCallBack || ThereIsServer.ServerSettings.HasConnectionClosed)
            {
                NoInternetConnectionSandBox.PrepareConnectionClosedSandBox();
                return(false);
            }
            //---------------------------------------------
            var _req = new DataBaseDeleteRequest(PLAYER_MESSAGE, existing.Sha.GetStrong());

            return(await ThereIsServer.Actions.DeleteData(_s, _target, _req));

            //---------------------------------------------
        }
コード例 #6
0
ファイル: Hero.cs プロジェクト: ArthuriaDX/SAO
        public async Task <bool> DeleteHero(UID _uid_)
        {
            //---------------------------------------------
            var _target  = _uid_.GetValue() + LOC_SEPARATOR + HeroID + SERVER_LOC;
            var _s       = ThereIsServer.ServersInfo.ServerManager.Get_HeroInfo_Server(this);
            var existing = await ThereIsServer.Actions.GetAllContentsByRef(_s, _target);

            //---------------------------------------------
            if (existing.DoesNotExist)
            {
                return(true);
            }
            if (existing.IsDeadCallBack || ThereIsServer.ServerSettings.HasConnectionClosed)
            {
                NoInternetConnectionSandBox.PrepareConnectionClosedSandBox();
                return(false);
            }
            //---------------------------------------------
            var _req = new DataBaseDeleteRequest(HERO_MESSAGE, existing.Sha.GetStrong());

            return(await ThereIsServer.Actions.DeleteData(_s, _target, _req));

            //---------------------------------------------
        }