แก้ไขครั้งสุดท้ายโดย avanza01 เมื่อ 2019-9-6 18:55
CREATE TRIGGER [dbo].[Auto_Reborn] ON dbo.ChaInfo
after update
as
BEGIN update [chainfo] set [chainfo].chalevel=355,
[ChaInfo].Chareborn=[chainfo].chareborn + 100,
[ChaInfo].chamoney= 50000000,
[ChaInfo].chastremain= 47598,
[ChaInfo].chapower = 0,
[ChaInfo].ChaSkillPoint = 10000,
[ChaInfo].chastrong = 0,
[ChaInfo].chastrength = 0,
[ChaInfo].chaspirit = 0,
[ChaInfo].chadex = 0,
[ChaInfo].chaintel = 0, from inserted
where inserted.chalevel = 355
and [ChaInfo].chareborn <1
and [ChaInfo].chaname=inserted.chaname
and [ChaInfo].usernum =inserted.usernum
and [ChaInfo].chaonline=0
End
|