wang9898 发表于 2008-11-30 13:15:25

限制70级满级问题

请问各位大虾,如何设置70级满级?
koollook在一个朋友的回帖里面的:
CREATE TRIGGER ON .
FOR UPDATE
AS
Begin
if update()
begin
declare @oldExp int
declare @newExp int
declare @strUserId char(21)

select @strUserId = strUserId, @oldExp = from deleted
select @newExp = from inserted

if( @newExp < 0 )
begin
declare @exp70 int
select @exp70 = exp from LEVEL_UP where =70
update userData
set exp = cast((@oldExp - @exp70*0.05) as int)
where strUserId = @strUserId
end
end
End
这个存储过程测试了,到70级再升级的时候E程序就会出错了
大家有可以切实解决的方案么?

mhzx888 发表于 2008-11-30 17:31:06

把升级经验调低10陪
页: [1]
查看完整版本: 限制70级满级问题