IF @Class = 102 OR @Class = 107 OR @Class = 108
BEGIN
SET @Race = 12
END
IF @Class = 103 OR @Class = 109 OR @Class = 110
BEGIN
SET @Race = 12
END
IF @Class = 104 OR @Class = 111 OR @Class = 111
BEGIN
IF @Race = 4
BEGIN
SET @Race = 12
END
ELSE
BEGIN
SET @Race = 13
END
END
UPDATE USERDATA SET Nation = @Nation,Race = @Race,Class = @Class + 100 WHERE strUserID = @strCharID2
DELETE FROM KNIGHTS_USER WHERE strUserID = @strCharID2
SELECT @Class = Class,@Race = Race FROM USERDATA WHERE strUserID = @strCharID3
IF @Class = 101 OR @Class = 105 OR @Class = 106
BEGIN
SET @Race = 12
END
IF @Class = 102 OR @Class = 107 OR @Class = 108
BEGIN
SET @Race = 12
END
IF @Class = 103 OR @Class = 109 OR @Class = 110
BEGIN
SET @Race = 12
END
IF @Class = 104 OR @Class = 111 OR @Class = 111
BEGIN
IF @Race = 4
BEGIN
SET @Race = 12
END
ELSE
BEGIN
SET @Race = 13
END
END
UPDATE USERDATA SET Nation = @Nation,Race = @Race,Class = @Class + 100 WHERE strUserID = @strCharID3
DELETE FROM KNIGHTS_USER WHERE strUserID = @strCharID3
UPDATE ACCOUNT_CHAR SET bNation = @Nation WHERE strAccountID = @strAccountID
END
GO
----------------
Kullanımı için
EXEC ACCOUNT_NATION_CHANGE 'HESABINIDSI','IRKNUMARASI'
* 1 = Karus / 2 = Human
----------------