예제 #1
0
        /// <summary>
        /// </summary>
        /// <param name="client">
        /// </param>
        /// <param name="accountName">
        /// </param>
        /// <returns>
        /// </returns>
        public bool IsLoginAllowed(Client client, string accountName)
        {
            if (accountName.ToLower() != client.AccountName.ToLower())
            {
                return false;
            }

            this.ln.GetLoginName(accountName);
            this.lf.GetLoginFlags(accountName);

            if (this.ln.LoginN != null && accountName.ToLower() == this.ln.LoginN.ToLower()
                && this.lf.FlagsL == this.IFalse)
            {
                return true; // Login OK
            }

            return false; // Login Not Permitted
        }
예제 #2
0
        /// <summary>
        /// </summary>
        /// <param name="client">
        /// </param>
        /// <param name="characterId">
        /// </param>
        /// <returns>
        /// </returns>
        public bool IsCharacterOnAccount(Client client, int characterId)
        {
            var le = new LoginEncryption();

            return le.IsCharacterOnAccount(client.AccountName, (UInt32)characterId);
        }
예제 #3
0
        /// <summary>
        /// </summary>
        /// <param name="client">
        /// </param>
        /// <param name="loginKey">
        /// </param>
        /// <returns>
        /// </returns>
        public bool IsLoginCorrect(Client client, string loginKey)
        {
            var le = new LoginEncryption();

            this.lp.GetLoginPassword(client.AccountName);

            return le.IsValidLogin(loginKey, client.ServerSalt, client.AccountName, this.lp.PasswdL);
        }