请问各位大虾,如何设置70级满级?
koollook在一个朋友的回帖里面的:
- CREATE TRIGGER [TRIGGER NAME] ON [dbo].[USERDATA]
- FOR UPDATE
- AS
- Begin
- if update([exp])
- begin
- declare @oldExp int
- declare @newExp int
- declare @strUserId char(21)
- select @strUserId = strUserId, @oldExp = [exp] from deleted
- select @newExp = [exp] from inserted
- if( @newExp < 0 )
- begin
- declare @exp70 int
- select @exp70 = exp from LEVEL_UP where [level]=70
- update userData
- set exp = cast((@oldExp - @exp70*0.05) as int)
- where strUserId = @strUserId
- end
- end
- End
复制代码
这个存储过程测试了,到70级再升级的时候E程序就会出错了
大家有可以切实解决的方案么? |