NAME CHANGE AKTIF ETME
create procedure [NameChange]
(@oldname varchar(30),@newname varchar(30))
AS DECLARE @clannumber smallint, @length int,@row int,@i int,@dwid int,@pos int,@dur int,@dur1 int,@ext int,@StackSize1 int,@strName varchar(30),@strExtName varchar(30),@Cdwid varbinary(4),@cdur varchar(2),@cstack varchar(2)
begin tran
Update account_char set strcharid1 = @newname where strcharid1 = @oldname
Update account_char set strcharid2 = @newname where strcharid2 = @oldname
Update account_char set strcharid3 = @newname where strcharid3 = @oldname
Update userdata set struserid = @newname Where struserid = @oldname
Update knights_user set struserid = @newname Where struserid = @oldname
Update knights set chief = @newname where chief = @oldname
Update knights set vicechief_1 = @newname where vicechief_1 = @oldname
Update knights set vicechief_2 = @newname where vicechief_2 = @oldname
Update knights set vicechief_3 = @newname where vicechief_3 = @oldname
commit tran
GO
_________________________________________________________________________________
IRK DEĞİŞİMİNİ AKTIF ETMEK
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 = @strCharID1
DELETE FROM KNIGHTS_USER WHERE strUserID = @strCharID1
SELECT @Class = Class,@Race = Race FROM USERDATA WHERE strUserID = @strCharID2
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 = @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
______________________________________________________________________________
NAME CHANGE
EXEC ACCOUNT_CHAR_NAME_CHANGE 'ESKICHARADI,'YENICHARADI'
________________________________________________________________
IRK TRANSVER
EXEC ACCOUNT_NATION_CHANGE 'HESABINIDSI','IRKNUMARASI' [1-Karus 2-Human]