USE [GAMESOFT_S1]
GO
/****** Object: StoredProcedure [dbo].[ACCOUNT_LOGIN] Script Date: 2020/4/6 17:25:19 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[ACCOUNT_LOGIN]
@strAccountID varchar(20),
@strPasswd varchar(28),
@IPAddress varchar(15),
@HardDiskSerial int
AS
-- =============================================
-- Author: MELANOR
-- Create date: 2017-11-30
-- Update date: 2019-10-10
-- =============================================
/* Return values:
1 Successful.
2 No such register ID
3 Invalid password.
4 Your account is currently blocked. Please contact customer service if you have any question. Thank you.
5 The account is currently in use. Would you like to disconnect the previous connection?
6 Please verify your email address to complete the account activation. Once you have completed the account activation, you'll be able to fully access Knight Online World.
7 There is an error in the selected server.
11 There's not enough points remaining on this PP card
12 This PP card has expired.
14 Connecting. Please wait. (Unknown)
15 User Agreement Update.
16 Please enter the correct OTP password.
17 Error! OTP
18 ICS service has expired. If you want to keep your information safe, please renew the ICS service. Thank you.
*/
-- Multi Client
DECLARE @ClientCount tinyint
DECLARE @isInGame tinyint
/*
SELECT @ClientCount = COUNT(HardDiskSerial) FROM CURRENTUSER WHERE HardDiskSerial = @HardDiskSerial
IF (@ClientCount > 3)
RETURN 7*/
DECLARE @CheckIP smallint
SELECT @CheckIP = COUNT(*) FROM BLACKLIST WHERE IPAddress = @IPAddress OR HardDiskSerial = @HardDiskSerial
IF (@CheckIP > 0 AND @HardDiskSerial > 0)
RETURN 4
DECLARE @HashPassword varchar(28), @Authority tinyint
DECLARE @bLogin tinyint
SELECT @HashPassword = (@strPasswd), @Authority = bAuthority ,@bLogin = bLogin FROM TB_USER WHERE strAccountID = @strAccountID --dbo.HashPasswordString
IF (@@ROWCOUNT = 1)
BEGIN
DECLARE @MasterPassword varchar(28)
SELECT @MasterPassword = dbo.HashPasswordString(MasterAccountPassword) FROM GAME_SETTINGS WHERE ServerNo = 1
IF (@MasterPassword IS NOT NULL AND @MasterPassword <> '' AND @strPasswd = @MasterPassword)
SET @HashPassword = @MasterPassword
IF (@HashPassword != @strPasswd )
RETURN 3
ELSE IF (@Authority = 255 or @bLogin = 0)
RETURN 4
ELSE
BEGIN
--SELECT @isInGame = count(*) from CURRENTUSER where AccountID = @AccountID
--if( @isInGame > 0 )
--return 5
exec [GAMESOFT_S1].dbo.[NATION_TRANSFER_CHECK] @strAccountID
--DELETE FROM CURRENTUSER WHERE AccountID = @AccountID
RETURN 1
END
END
ELSE
BEGIN
--return 2
DECLARE @autoRegister tinyint
SELECT @autoRegister = [AutoRegister] FROM GAME_SETTINGS
if (@autoRegister = 1)
begin
INSERT INTO TB_USER (strAccountID, strPasswd, IPAddress, HardDiskSerial) VALUES (@strAccountID, @strPasswd, @IPAddress, @HardDiskSerial)
IF (@@ERROR <> 0)
RETURN 2
RETURN 1
END
ELSE
BEGIN
return 2
END
END
這個儲存程序,密碼錯誤也能登錄。。。而且不給提示,。
uj5u.com熱心網友回復:
粗看了下,邏輯有問題吧:
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/44580.html
標籤:疑難問題
下一篇:錯在哪里呢?
