经过测试,钱达到2147483648 就会变负数(不过好像不是很稳定,有一次变成-600多)
不能使钱超过这个数字存放,但是可以解决玩家金钱变负造成的损失
方法:
1.打开你的 SQL "企业管理器"
4 右键点击Character表
5 选择[所有任务]--[管理触发器]
6 把下面的SQL语句copy进去。按保存即可
CREATE TRIGGER [Restrict_Money] ON [dbo].[Character]
after update
as
Update [Character] set [Character].money=>2140000000
From Inserted
Where Inserted.money<0 and [Character].accountid=inserted.accountid
and [Character].name=inserted.name