ADMİN KoManyak Yönetim
Takım : Ruh Hali : Mesaj Sayısı : 157 Doğum tarihi : 21/12/94 Kayıt tarihi : 29/03/09 Yaş : 29 Nerden : Edirne Lakap : Murphy
Cüzdan Altın: 21893114 Para: 93127124
| Konu: Irk Transferini Aktif Edelim .. Ptsi Tem. 06, 2009 7:56 am | |
| ÖnceLikle Irk Transferi için ; SQL den ACCOUNT_NATION_CHANGE Prosedüründeki KodLarı aşşağıdaki şekiLde değiştiriyoruz. - Kod:
-
CREATE PROCEDURE [dbo].[ACCOUNT_NATION_CHANGE] @strAccountID as varchar(40), @Nation as tinyint AS DECLARE @strNation tinyint,@Class int,@Race int,@strCharID1 char(21), @strCharID2 char(21), @strCharID3 char(21) SELECT @strNation = bNation,@strCharID1 = strCharID1,@strCharID2 = strCharID2,@strCharID3 = strCharID3 FROM ACCOUNT_CHAR WHERE strAccountID = @strAccountID SET @Class = null SET @Race = null IF @Nation = 1 and @strNation = 2 BEGIN SELECT @Class = Class,@Race = Race FROM USERDATA WHERE strUserID = @strCharID1 IF @Class = 201 OR @Class = 205 OR @Class = 206 BEGIN SET @Race = 1 END IF @Class = 202 OR @Class = 207 OR @Class = 208 BEGIN SET @Race = 2 END IF @Class = 203 OR @Class = 209 OR @Class = 210 BEGIN SET @Race = 3 END IF @Class = 204 OR @Class = 211 OR @Class = 211 BEGIN IF @Race = 12 BEGIN SET @Race = 4 END ELSE BEGIN SET @Race = 2 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 = 201 OR @Class = 205 OR @Class = 206 BEGIN SET @Race = 1 END IF @Class = 202 OR @Class = 207 OR @Class = 208 BEGIN SET @Race = 2 END IF @Class = 203 OR @Class = 209 OR @Class = 210 BEGIN SET @Race = 3 END IF @Class = 204 OR @Class = 211 OR @Class = 211 BEGIN IF @Race = 12 BEGIN SET @Race = 4 END ELSE BEGIN SET @Race = 2 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 = 201 OR @Class = 205 OR @Class = 206 BEGIN SET @Race = 1 END IF @Class = 202 OR @Class = 207 OR @Class = 208 BEGIN SET @Race = 2 END IF @Class = 203 OR @Class = 209 OR @Class = 210 BEGIN SET @Race = 3 END IF @Class = 204 OR @Class = 211 OR @Class = 211 BEGIN IF @Race = 12 BEGIN SET @Race = 4 END ELSE BEGIN SET @Race = 2 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 IF @Nation = 2 and @strNation = 1 BEGIN SELECT @Class = Class,@Race = Race FROM USERDATA WHERE strUserID = @strCharID1 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 = @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
Irk Transferi için QA Kodu: - Kod:
-
EXEC ACCOUNT_NATION_CHANGE 'HESABINIDSI','IRKNUMARASI' [1-Karus 2-Human]
SaygıLar.. | |
|
soneR. KoManyaK Eski Üye
Mesaj Sayısı : 53 Doğum tarihi : 25/10/94 Kayıt tarihi : 08/07/09 Yaş : 30 Nerden : £diRNé Lakap : ßeLLi ßi$e y0q
| Konu: Geri: Irk Transferini Aktif Edelim .. Perş. Tem. 09, 2009 2:38 am | |
| | |
|
Misafir Misafir
| Konu: Geri: Irk Transferini Aktif Edelim .. Perş. Tem. 09, 2009 7:23 am | |
| |
|