Esempio n. 1
0
        public AccountOpResult UnlinkGameAccount(string gameAccountName)
        {
            uint gameAccountId = Global.AccountMgr.GetId(gameAccountName);

            if (gameAccountId == 0)
            {
                return(AccountOpResult.NameNotExist);
            }

            if (GetIdByGameAccount(gameAccountId) == 0)
            {
                return(AccountOpResult.BadLink);
            }

            PreparedStatement stmt = DB.Login.GetPreparedStatement(LoginStatements.UPD_BNET_GAME_ACCOUNT_LINK);

            stmt.AddNull(0);
            stmt.AddNull(1);
            stmt.AddValue(2, gameAccountId);
            DB.Login.Execute(stmt);
            return(AccountOpResult.Ok);
        }