(insert User in TB_user)
-
- CREATE TABLE [dbo].[TB_USER] (
- [strAccountID] [varchar] (21) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
- [strPasswd] [varchar] (13) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
- [strSocNo] [char] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
- [idays] [int] NOT NULL ,
- [ppcard] [char] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
- [ppbittimi] [char] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
- ) ON [PRIMARY]
- GO
-
复制代码
Procedure ACCOUNT_LOGIN
-
- -- Procedure update by [email protected]
- -- Ex Comunidad Apocalipsis - MicroGames
- Alter PROCEDURE ACCOUNT_LOGIN
- @AccountID varchar(21),
- @Password varchar(13),
- @nRet smallint OUTPUT
- AS
- select @nRet=count(*) from tb_user where straccountid=@AccountID
- if @nRet=0
- begin
- insert into tb_user values (@AccountID , @Password , 1 , 6 , 1 ,1)
- set @nRet=1
- RETURN
- end
- DECLARE @Nero tinyint, @PlayerTurk smallint, @Lethe int, @Vipspawn int , @matrix1536 int
- SET @Nero = 0
- SET @PlayerTurk = 0
- DECLARE @pwd varchar(13)
- SET @pwd = null
- IF @pwd <> @Password
- BEGIN
- SET @nRet = 3
- RETURN
- END
- IF @Vipspawn=0
- begin
- set @nRet=11
- RETURN
- end
- IF @Lethe = 0
- begin
- set @nRet=12
- RETURN
- end
- IF @matrix1536=0
- begin
- set @nRet=4
- RETURN
- end
- select @nRet=count(*) from currentuser where straccountid=@AccountID
- IF @nRet>0
- begin
- set @nRet=5
- RETURN
- end
- SELECT @Nero = bNation, @PlayerTurk = bCharNum FROM ACCOUNT_CHAR WHERE strAccountID = @AccountID
- IF @@ROWCOUNT = 0
- BEGIN
- SET @nRet = 1
- RETURN
- END
- IF @PlayerTurk = 0
- BEGIN
- SET @nRet = 1
- RETURN
- END
- ELSE
- BEGIN
- SET @nRet = 1
- RETURN
- END
- GO
复制代码 |