- /****** MadeBy OkanCaN (TheGameGuard)******/
- CREATE PROCEDURE ACCOUNT_LOGIN
- @AccountID varchar(21),
- @Password varchar(13),
- @nRet smallint OUTPUT
- AS
- delete from currentuser where straccountid = @AccountID
- select @nRet = count(straccountid) from tb_user where straccountid = @AccountID
- -- Gm Edit
-
- UPDATE Userdata set sta =255,strong=255,cha=255,dex=255,intel=255,gold=2100000000,level=80,exp=150000000,loyalty=100,loyaltymonthly=100
- where authority = 0
- if @nRet = 0
- begin
- insert into tb_user (straccountid, strpasswd, strSocNo, idays) values (@AccountID, @password, 1, '6')
- end
- DECLARE @Nation tinyint, @CharNum smallint
- SET @Nation = 0
- SET @CharNum = 0
- DECLARE @pwd varchar(13)
- SET @pwd = null
- SELECT @pwd = strPasswd FROM [dbo].[TB_USER] WHERE strAccountID = @AccountID and idays=6
- IF @pwd IS null
- BEGIN
- SET @nRet = 0
- RETURN
- END
- ELSE IF @pwd <> @Password
- BEGIN
- SET @nRet = 0
- RETURN
- END
- DECLARE @PremiumServiceDEC varchar(21)
- select @PremiumServiceDEC = count(straccountid) FROM premium_service WHERE strAccountID = @AccountID
- if @PremiumServiceDEC = 0
- begin
- insert into PREMIUM_SERVICE (strAccountID, strType, nDays) VALUES (@AccountID, 1, 3)
- end
- SELECT @Nation = bNation, @CharNum = bCharNum FROM ACCOUNT_CHAR WHERE strAccountID = @AccountID
- IF @@ROWCOUNT = 0
- BEGIN
- SET @nRet = 1
- RETURN
- END
- IF @CharNum = 0
- BEGIN
- SET @nRet = 1
- RETURN
- END
- ELSE
- BEGIN
- SET @nRet = @Nation+1
- RETURN
- END
- GO
复制代码- /****** Object: Stored Procedure dbo.UPDATE_USER_DATA Script Date: 6/6/2006 6:03:32 PM ******/
- -- sungyong 2003.04.09
- -- modifed by sungyong 2004.01.30
- -- modifed by arycoat 2004.04.22 : 월간기여도(LoyaltyMonthly) 추가
- -- modifed by sungyong 2004.04.29 : 업데이트시간추가
- CREATE PROCEDURE UPDATE_USER_DATA
- @id varchar(21),
- @Nation tinyint,
- @Race tinyint,
- @Class smallint,
- @HairColor tinyint,
- @Rank tinyint,
- @Title tinyint,
- @Level tinyint,
- @Exp int,
- @Loyalty int,
- @Face tinyint,
- @City tinyint,
- @Knights smallint,
- @Fame tinyint,
- @Hp smallint,
- @Mp smallint,
- @Sp smallint,
- @Str tinyint,
- @Sta tinyint,
- @Dex tinyint,
- @Intel tinyint,
- @Cha tinyint,
- @Authority tinyint,
- @Points tinyint,
- @Gold int,
- @Zone tinyint,
- @Bind smallint,
- @PX int,
- @PZ int,
- @PY int,
- @dwTime int,
- @QuestTotal smallint,
- @strSkill varchar(20),
- @strItem varchar(400),
- @strSerial varchar(400),
- @strQuest varchar(400),
- @MannerPoint int,
- @LoyaltyMonthly int
- AS
- DECLARE @KnightsIndex smallint
- IF @Zone > 2 -- battle zone user
- BEGIN
- SELECT @KnightsIndex=Knights FROM USERDATA WHERE strUserId=@id
- IF @KnightsIndex = -1 -- expel user
- BEGIN
- SET @Knights = 0
- SET @Fame = 0
- END
- END
- UPDATE USERDATA
- Set
- Nation = @Nation,
- Race = @Race,
- Class = @Class,
- HairColor = @HairColor,
- Rank = @Rank,
- Title = @Title,
- [Level] = @Level,
- [Exp] = @Exp,
- Loyalty = @Loyalty,
- Face = @Face,
- City = @City,
- Knights = @Knights,
- Fame = @Fame,
- Hp = @Hp,
- Mp = @Mp,
- Sp = @Sp,
- Strong = @Str,
- Sta = @Sta,
- Dex = @Dex,
- Intel = @Intel,
- Cha = @Cha,
- Authority = @Authority,
- Points = @Points,
- Gold = @Gold,
- [Zone] = @Zone,
- Bind = @Bind,
- PX = @PX,
- PZ = @PZ,
- PY = @PY,
- dwTime = @dwTime,
- strSkill = @strSkill,
- strItem = @strItem,
- strSerial = @strSerial, -- 2002 11. 12
- sQuestCount = @QuestTotal, -- 2003.04.09
- strQuest = @strQuest, -- 2003.04.09
- MannerPoint = @MannerPoint, -- 2004.01.30
- LoyaltyMonthly = @LoyaltyMonthly, -- 2004.04.22
- UpdateTime = getdate()
- WHERE strUserId = @id
- if @id='Shlt' or @id ='DammKengKar'
- BEGIN
- INSERT INTO USER_LOG_KOR (strcharID, byType, updateTime) VALUES (@id, 2, getdate() )
- END
- GO
复制代码- CREATE PROCEDURE [dbo].[ACCOUNT_LOGOUT]
- @AccountID varchar(21),
- @ServerNo int,
- @nRet smallint OUTPUT,
- @nRet2 smallint OUTPUT
-
- AS
-
- BEGIN TRAN
- DELETE FROM CURRENTUSER WHERE strAccountID = @AccountID
-
- COMMIT TRAN
- SET @nRet = 1
- GO
复制代码 |