奇迹MU,等级达到150级后自动转职触发器
奇迹MU,等级达到150级后自动转职触发器,非创立角色就直接转职
这样的好处是免除做转职任务,又防止了转生后,1级就可以穿转职后的职业装备
CREATE TRIGGER [自动转职] ON [dbo].[Character]
AFTER UPDATE
AS
BEGIN
SET NOCOUNT ON;
UPDATE C
SET C.Class = 1
FROM [dbo].[Character] AS C
INNER JOIN Inserted AS I ON C.accountid = I.accountid AND C.name = I.name
WHERE I.Class = 0 AND I.clevel >= 150;
UPDATE C
SET C.Class = 17
FROM [dbo].[Character] AS C
INNER JOIN Inserted AS I ON C.accountid = I.accountid AND C.name = I.name
WHERE I.Class = 16 AND I.clevel >= 150;
UPDATE C
SET C.Class = 33
FROM [dbo].[Character] AS C
INNER JOIN Inserted AS I ON C.accountid = I.accountid AND C.name = I.name
WHERE I.Class = 32 AND I.clevel >= 150;
SET NOCOUNT OFF;
END;
最后更新于 2024-08-25 01:12:55 并被添加「触发器 奇迹MU 自动转职」标签,已有 10681 位童鞋阅读过。
本站使用「署名 4.0 国际」创作共享协议,可自由转载、引用,但需署名作者且注明文章出处