修复角色非正常点数的存储
/****** Object:StoredProcedure . Script Date: 05/27/2009 09:06:50 ******/
CREATE PROCEDURE REPAIR_USER_STAT_POINT
@strUserID varchar(21)
AS
DECLARE @Level int,@Class int,@Race int,@NewPoint int,@STR int,@HP int, @DEX int,@INT int,@MP int
DECLARE @StatTotal int
SELECT @Level = Level,@Class = Class,@Race = Race,@STR = Strong,@HP = Sta,@DEX = Dex,@INT = Intel,@MP = Cha FROM USERDATA WHERE strUserId = @strUserID
SET @StatTotal = @STR + @HP + @DEX + @INT + @MP
--IF @Level >= 74 AND @StatTotal <= 350
IF @Level >= 74
BEGIN
IF @Level = 74
SET @NewPoint = 225
IF @Level = 75
SET @NewPoint = 230
IF @Level = 76
SET @NewPoint = 235
IF @Level = 77
SET @NewPoint = 240
IF @Level = 78
SET @NewPoint = 245
IF @Level = 79
SET @NewPoint = 250
IF @Level = 80
SET @NewPoint = 255
IF (@Class = 201) OR (@Class = 205) OR (@Class = 206) OR (@Class = 101) OR (@Class = 105) OR (@Class = 106)
BEGIN
IF @Race = 1
UPDATE USERDATA Set Strong = 65 + 42,Sta = 60,Dex = 65,Intel = 50,Cha = 50,Points = @NewPoint WHERE strUserId = @strUserId
ELSE IF @Race = 12
UPDATE USERDATA Set Strong = 60 + 42,Sta = 70,Dex = 60,Intel = 50,Cha = 50,Points = @NewPoint WHERE strUserId = @strUserId
ELSE IF @Race = 13
UPDATE USERDATA Set Strong = 50 + 42,Sta = 70,Dex = 50,Intel = 70,Cha = 50,Points = @NewPoint WHERE strUserId = @strUserId
END
ELSE IF (@Class = 202) OR (@Class = 207) OR (@Class = 208) OR (@Class = 102) OR (@Class = 107) OR (@Class = 108)
BEGIN
IF @Race = 2
UPDATE USERDATA Set Strong = 60,Sta = 70,Dex = 60 + 42,Intel = 50,Cha = 50,Points = @NewPoint WHERE strUserId = @strUserId
ELSE IF @Race = 12
UPDATE USERDATA Set Strong = 60,Sta = 70,Dex = 60 + 42,Intel = 50,Cha = 50,Points = @NewPoint WHERE strUserId = @strUserId
ELSE IF @Race = 13
UPDATE USERDATA Set Strong = 50,Sta = 70,Dex = 50 + 42,Intel = 70,Cha = 50,Points = @NewPoint WHERE strUserId = @strUserId
END
ELSE IF (@Class = 203) OR (@Class = 209) OR (@Class = 210) OR (@Class = 103) OR (@Class = 109) OR (@Class = 110)
BEGIN
IF @Race = 3
UPDATE USERDATA Set Strong = 50,Sta = 70,Dex = 50,Intel = 70 + 10,Cha = 50 + 32,Points = @NewPoint WHERE strUserId = @strUserId
ELSE IF @Race = 12
UPDATE USERDATA Set Strong = 60,Sta = 70,Dex = 60,Intel = 50 + 10,Cha = 50 + 32,Points = @NewPoint WHERE strUserId = @strUserId
ELSE IF @Race = 13
UPDATE USERDATA Set Strong = 50,Sta = 70,Dex = 50,Intel = 70 + 10,Cha = 50 + 32,Points = @NewPoint WHERE strUserId = @strUserId
END
ELSE IF (@Class = 204) OR (@Class = 211) OR (@Class = 212) OR (@Class = 104) OR (@Class = 111) OR (@Class = 112)
BEGIN
IF @Race = 4
UPDATE USERDATA Set Strong = 60 + 12,Sta = 70 + 10,Dex = 60,Intel = 50 + 20,Cha = 50,Points = @NewPoint WHERE strUserId = @strUserId
ELSE IF @Race = 2
UPDATE USERDATA Set Strong = 50 + 12,Sta = 60 + 10,Dex = 60,Intel = 70 + 20,Cha = 50,Points = @NewPoint WHERE strUserId = @strUserId
ELSE IF @Race = 12
UPDATE USERDATA Set Strong = 60 + 12,Sta = 70 + 10,Dex = 60,Intel = 50 + 20,Cha = 50,Points = @NewPoint WHERE strUserId = @strUserId
ELSE IF @Race = 13
UPDATE USERDATA Set Strong = 50 + 12,Sta = 70 + 10,Dex = 50,Intel = 70 + 20,Cha = 50,Points = @NewPoint WHERE strUserId = @strUserId
END
END
GO
感谢分享哦! 不開服看看就好
謝謝分享 種族問題?
页:
[1]