Kết quả 1 đến 10 của 18
-
17-02-17, 02:54 PM #1
- Ngày tham gia
- Nov 2012
- Đang ở
- Usa
- Bài viết
- 344
- Thanks
- 118
- Thanked 55 Times in 34 Posts
giúp đỡ về SQL 2k8 dbo.WZ_CreateCharacter
toàn bộ code:
PHP Code:USE [MuOnline2]
GO
/****** Object: StoredProcedure [dbo].[WZ_CreateCharacter] Script Date: 02/17/2017 14:53:46 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
ALTER Procedure [dbo].[WZ_CreateCharacter]
@AccountID varchar(10), --// °èÁ¤ Á¤º¸
@Name varchar(10), --// ij¸¯ÅÍ
@Class tinyint --// Class Type
AS
Begin
SET NOCOUNT ON
SET XACT_ABORT ON
DECLARE @Result tinyint
--// °á°ú°ª ÃʱâÈ
SET @Result = 0x00
--====================================================================================
-- ij¸¯ÅÍ Á¸Àç¿©ºÎ È®ÀÎ
--====================================================================================
If EXISTS ( SELECT Name FROM Character WHERE Name = @Name )
begin
SET @Result = 0x01 --// µ¿ÀÏ Ä³¸¯Å͸í Á¸Àç
GOTO ProcEnd
end
BEGIN TRAN
--====================================================================================
-- °èÁ¤ Á¸Àç ¿©ºÎ È®ÀÎ ¹× ºó ½½·Ô Á¤º¸ È®ÀÎÇÏ¿© ÀúÀå
--====================================================================================
If NOT EXISTS ( SELECT Id FROM AccountCharacter WHERE Id = @AccountID )
begin
INSERT INTO dbo.AccountCharacter(Id, GameID1, GameID2, GameID3, GameID4, GameID5, GameIDC)
VALUES(@AccountID, @Name, NULL, NULL, NULL, NULL, NULL)
SET @Result = @@Error
end
else
begin
--// ij¸¯ÅÍ ºó ½½·Ô ¼³Á¤
Declare @g1 varchar(10), @g2 varchar(10), @g3 varchar(10), @g4 varchar(10), @g5 varchar(10)
SELECT @g1=GameID1, @g2=GameID2, @g3=GameID3, @g4=GameID4, @g5=GameID5 FROM dbo.AccountCharacter Where Id = @AccountID
if( ( @g1 Is NULL) OR (Len(@g1) = 0))
begin
UPDATE AccountCharacter SET GameID1 = @Name
WHERE Id = @AccountID
SET @Result = @@Error
end
else if( @g2 Is NULL OR Len(@g2) = 0)
begin
UPDATE AccountCharacter SET GameID2 = @Name
WHERE Id = @AccountID
SET @Result = @@Error
end
else if( @g3 Is NULL OR Len(@g3) = 0)
begin
UPDATE AccountCharacter SET GameID3 = @Name
WHERE Id = @AccountID
SET @Result = @@Error
end
else if( @g4 Is NULL OR Len(@g4) = 0)
begin
UPDATE AccountCharacter SET GameID4 = @Name
WHERE Id = @AccountID
SET @Result = @@Error
end
else if( @g5 Is NULL OR Len(@g5) = 0)
begin
UPDATE AccountCharacter SET GameID5 = @Name
WHERE Id = @AccountID
SET @Result = @@Error
end
else
--// ÇØ´ç ºó ½½·Ô Á¤º¸°¡ Á¸Àç ÇÏÁö ¾Ê´Ù.
begin
SET @Result = 0x03
GOTO TranProcEnd
end
end
--====================================================================================
-- ij¸¯ÅÍ Á¤º¸ ÀúÀå
--====================================================================================
if( @Result <> 0 )
begin
GOTO TranProcEnd
end
else
begin
-- Select TheHe
Declare @thehe tinyint
SELECT @thehe=thehe FROM dbo.MEMB_INFO Where memb___id = @AccountID
-- Neu thuoc the he 1
if( @thehe = 1 )
begin
INSERT INTO dbo.Character(AccountID, Name, cLevel, LevelUpPoint, Class, Strength, Dexterity, Vitality, Energy, Leadership, Inventory, MagicList,
Life, MaxLife, Mana, MaxMana, BP, MaxBP, Shield, MaxShield, MapNumber, MapPosX, MapPosY, MDate, LDate, Quest, DbVersion, EffectList )
SELECT @AccountID As AccountID, @Name As Name, Level, 2000, @Class As Class,
Strength, Dexterity, Vitality, Energy, Leadership, Inventory, MagicList, Life, MaxLife, Mana, MaxMana, 0, 0, 0, 0, MapNumber, MapPosX, MapPosY,
getdate() As MDate, getdate() As LDate, Quest, DbVersion, EffectList
FROM DefaultClassType WHERE Class = @Class
end
-- Neu thuoc the he 2
else if( @thehe = 2 )
begin
INSERT INTO dbo.Character(AccountID, Name, cLevel, LevelUpPoint, Class, Strength, Dexterity, Vitality, Energy, Leadership, Inventory, MagicList,
Life, MaxLife, Mana, MaxMana, BP, MaxBP, Shield, MaxShield, MapNumber, MapPosX, MapPosY, MDate, LDate, Quest, DbVersion, EffectList )
SELECT @AccountID As AccountID, @Name As Name, Level, 2000, @Class As Class,
Strength, Dexterity, Vitality, Energy, Leadership, Inventory, MagicList, Life, MaxLife, Mana, MaxMana, 0, 0, 0, 0, MapNumber, MapPosX, MapPosY,
getdate() As MDate, getdate() As LDate, Quest, DbVersion, EffectList
FROM DefaultClassType WHERE Class = @Class
end
SET @Result = @@Error
-- End Create Character theo The he
end
TranProcEnd: -- GOTO
IF ( @Result <> 0 )
ROLLBACK TRAN
ELSE
COMMIT TRAN
ProcEnd:
SET NOCOUNT OFF
SET XACT_ABORT OFF
--====================================================================================
-- °á°ú°ª ¹Ýȯ ó¸®
-- 0x00 : ij¸¯ÅÍ Á¸Àç, 0x01 : ¼º°ø¿Ï·á, 0x02 : ij¸¯ÅÍ »ý¼º ½ÇÆÐ , 0x03 : ºó½½·Ô Á¸ÀçÇÏÁö ¾Ê´Â´Ù
--====================================================================================
SELECT
CASE @Result
WHEN 0x00 THEN 0x01 --// ¼º°ø ¹Ýȯ
WHEN 0x01 THEN 0x00 --// ij¸¯ÅÍ Á¸Àç
WHEN 0x03 THEN 0x03 --// ºó½½·ÔÀÌ Á¸ÀçÇÏÁö ¾Ê´Â´Ù.
ELSE 0x02 --// ±âŸ ¿¡·¯ÄÚµå´Â »ý¼º »øÆÐ ¹Ýȯ
END AS Result
End
Mình sai chỗ nào mà khi tạo tài khoản oke mà tạo nhân vật thì ko cho vậy ????????????
***Mình chia thế hệ 1 và 2 nhé ****Lần sửa cuối bởi avinhdt, ngày 17-02-17 lúc 03:55 PM.
Khách viếng thăm hãy cùngavinhdtxây dựng diễn đàn CLBGAMESVN vững mạnh nhé!
-
17-02-17, 03:20 PM #2
- Ngày tham gia
- Apr 2010
- Bài viết
- 44
- Thanks
- 5
- Thanked 6 Times in 6 Posts
Ðề: giúp đỡ về SQL 2k8 dbo.WZ_CreateCharacter
USE [MuOnline]
GO
/****** Object: StoredProcedure [dbo].[WZ_CreateCharacter] Script Date: 02/17/2017 15:20:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER Procedure [dbo].[WZ_CreateCharacter]
@AccountID varchar(10),
@Name varchar(10),
@Class tinyint
AS
Begin
SET NOCOUNT ON
SET XACT_ABORT ON
DECLARE
@Result tinyint,
@intCustomClevel int,
@intCustomLevelUpPoint int,
@intCustomMoney int,
@intCustomReset int,
@intCustomRsthang int
--// 搬苞蔼 檬扁拳
SET @Result = 0x00
SET @intCustomClevel = 400
SET @intCustomLevelUpPoint = 1000
SET @intCustomMoney = 20000000
SET @intCustomReset = 5
SET @intCustomRsthang = 0
--================================================== ==================================
-- 某腐磐 粮犁咯何 犬牢
--================================================== ==================================
If EXISTS ( SELECT Name FROM Character WHERE Name = @Name )
begin
SET @Result = 0x01 --// 悼老 某腐磐疙 粮犁
GOTO ProcEnd
end
BEGIN TRAN
--================================================== ==================================
-- 拌沥 粮犁 咯何 犬牢 棺 后 浇吩 沥焊 犬牢窍咯 历厘
--================================================== ==================================
If NOT EXISTS ( SELECT Id FROM AccountCharacter WHERE Id = @AccountID )
begin
INSERT INTO dbo.AccountCharacter(Id, GameID1, GameID2, GameID3, GameID4, GameID5, GameIDC)
VALUES(@AccountID, @Name, NULL, NULL, NULL, NULL, NULL)
SET @Result = @@Error
end
else
begin
--// 某腐磐 后 浇吩 汲沥
Declare @g1 varchar(10), @g2 varchar(10), @g3 varchar(10), @g4 varchar(10), @g5 varchar(10)
SELECT @g1=GameID1, @g2=GameID2, @g3=GameID3, @g4=GameID4, @g5=GameID5 FROM dbo.AccountCharacter Where Id = @AccountID
if( ( @g1 Is NULL) OR (Len(@g1) = 0))
begin
UPDATE AccountCharacter SET GameID1 = @Name
WHERE Id = @AccountID
SET @Result = @@Error
end
else if( @g2 Is NULL OR Len(@g2) = 0)
begin
UPDATE AccountCharacter SET GameID2 = @Name
WHERE Id = @AccountID
SET @Result = @@Error
end
else if( @g3 Is NULL OR Len(@g3) = 0)
begin
UPDATE AccountCharacter SET GameID3 = @Name
WHERE Id = @AccountID
SET @Result = @@Error
end
else if( @g4 Is NULL OR Len(@g4) = 0)
begin
UPDATE AccountCharacter SET GameID4 = @Name
WHERE Id = @AccountID
SET @Result = @@Error
end
else if( @g5 Is NULL OR Len(@g5) = 0)
begin
UPDATE AccountCharacter SET GameID5 = @Name
WHERE Id = @AccountID
SET @Result = @@Error
end
else
--// 秦寸 后 浇吩 沥焊啊 粮犁 窍瘤 臼促.
begin
SET @Result = 0x03
GOTO TranProcEnd
end
end
--================================================== ==================================
-- 某腐磐 沥焊 历厘
--================================================== ==================================
if( @Result <> 0 )
begin
GOTO TranProcEnd
end
else
begin
INSERT INTO dbo.Character(AccountID, Name, cLevel, LevelUpPoint, Class, Strength, Dexterity, Vitality, Energy, Inventory,MagicList,
Life, MaxLife, Mana, MaxMana, MapNumber, MapPosX, MapPosY, MDate, LDate, Quest, DbVersion, Leadership, Money, Resets )
SELECT @AccountID As AccountID, @Name As Name, @intCustomClevel, @intCustomLevelUpPoint, @Class As Class,
Strength, Dexterity, Vitality, Energy, Inventory,MagicList, Life, MaxLife, Mana, MaxMana, MapNumber, MapPosX, MapPosY,
getdate() As MDate, getdate() As LDate, Quest, DbVersion, Leadership, @intCustomMoney, @intCustomReset
FROM DefaultClassType WHERE Class = @Class
SET @Result = @@Error
end
TranProcEnd: -- GOTO
IF ( @Result <> 0 )
ROLLBACK TRAN
ELSE
COMMIT TRAN
ProcEnd:
SET NOCOUNT OFF
SET XACT_ABORT OFF
--================================================== ==================================
-- 搬苞蔼 馆券 贸府
-- 0x00 : 某腐磐 粮犁, 0x01 : 己傍肯丰, 0x02 : 某腐磐 积己 角菩 , 0x03 : 后浇吩 粮犁窍瘤 臼绰促
--================================================== ==================================
SELECT
CASE @Result
WHEN 0x00 THEN 0x01 --// 己傍 馆券
WHEN 0x01 THEN 0x00 --// 某腐磐 粮犁
WHEN 0x03 THEN 0x03 --// 后浇吩捞 粮犁窍瘤 臼绰促.
ELSE 0x02 --// 扁鸥 俊矾内靛绰 积己 圾菩 馆券
END AS Result
EndKhách viếng thăm hãy cùng libikay xây dựng diễn đàn CLBGAMESVN vững mạnh nhé!
-
Các thành viên gởi lời cảm ơn đến libikay vì bài viết này !
avinhdt(17-02-17)
-
17-02-17, 03:54 PM #3
- Ngày tham gia
- Nov 2012
- Đang ở
- Usa
- Bài viết
- 344
- Thanks
- 118
- Thanked 55 Times in 34 Posts
Ðề: giúp đỡ về SQL 2k8 dbo.WZ_CreateCharacter
mình chia thế hệ thì bị cậu ah........
Khách viếng thăm hãy cùngavinhdtxây dựng diễn đàn CLBGAMESVN vững mạnh nhé!
-
17-02-17, 04:17 PM #4
- Ngày tham gia
- Aug 2007
- Đang ở
- Cung trăng
- Bài viết
- 2,274
- Thanks
- 797
- Thanked 824 Times in 593 Posts
Ðề: giúp đỡ về SQL 2k8 dbo.WZ_CreateCharacter
Lấy ở db của nbb share là có chia thế hệ luôn bạn nhé
Tặng bạn cái đấy mình lấy ra đây bạn
PHP Code:CREATE Procedure [dbo].[WZ_CreateCharacter]
@AccountID varchar(10),
@Name varchar(10),
@Class tinyint
AS
Begin
SET NOCOUNT ON
SET XACT_ABORT ON
DECLARE @Result tinyint
SET @Result = 0x00
If EXISTS ( SELECT Name FROM Character WHERE Name = @Name )
begin
SET @Result = 0x01
GOTO ProcEnd
end
If EXISTS ( SELECT Name FROM BotPet WHERE Name = @Name )
begin
SET @Result = 0x01
GOTO ProcEnd
end
BEGIN TRAN
If NOT EXISTS ( SELECT Id FROM AccountCharacter WHERE Id = @AccountID )
begin
INSERT INTO dbo.AccountCharacter(Id, GameID1, GameID2, GameID3, GameID4, GameID5, GameIDC)
VALUES(@AccountID, @Name, NULL, NULL, NULL, NULL, NULL)
SET @Result = @@Error
end
else
begin
Declare @g1 varchar(10), @g2 varchar(10), @g3 varchar(10), @g4 varchar(10), @g5 varchar(10)
SELECT @g1=GameID1, @g2=GameID2, @g3=GameID3, @g4=GameID4, @g5=GameID5 FROM dbo.AccountCharacter Where Id = @AccountID
if( ( @g1 Is NULL) OR (Len(@g1) = 0))
begin
UPDATE AccountCharacter SET GameID1 = @Name
WHERE Id = @AccountID
SET @Result = @@Error
end
else if( @g2 Is NULL OR Len(@g2) = 0)
begin
UPDATE AccountCharacter SET GameID2 = @Name
WHERE Id = @AccountID
SET @Result = @@Error
end
else if( @g3 Is NULL OR Len(@g3) = 0)
begin
UPDATE AccountCharacter SET GameID3 = @Name
WHERE Id = @AccountID
SET @Result = @@Error
end
else if( @g4 Is NULL OR Len(@g4) = 0)
begin
UPDATE AccountCharacter SET GameID4 = @Name
WHERE Id = @AccountID
SET @Result = @@Error
end
else if( @g5 Is NULL OR Len(@g5) = 0)
begin
UPDATE AccountCharacter SET GameID5 = @Name
WHERE Id = @AccountID
SET @Result = @@Error
end
else
begin
SET @Result = 0x03
GOTO TranProcEnd
end
end
if( @Result <> 0 )
begin
GOTO TranProcEnd
end
else
begin
-- Select TheHe
Declare @thehe tinyint
SELECT @thehe=thehe FROM dbo.MEMB_INFO Where memb___id = @AccountID
-- Neu thuoc the he 1
if( @thehe = 1 )
begin
INSERT INTO dbo.Character(AccountID, Name, Resets, ResetNBB, cLevel, LevelUpPoint, Class, Strength, Dexterity, Vitality, Energy, Inventory,MagicList,
Life, MaxLife, Mana, MaxMana, MapNumber, MapPosX, MapPosY, MDate, LDate, Quest, DbVersion, Leadership,money )
SELECT @AccountID As AccountID, @Name As Name, 10, 10, 400, 1500, @Class As Class,
Strength, Dexterity, Vitality, Energy, Inventory,MagicList, Life, MaxLife, Mana, MaxMana, MapNumber, MapPosX, MapPosY,
getdate() As MDate, getdate() As LDate, Quest, DbVersion, Leadership, 100000000
FROM DefaultClassType WHERE Class = @Class
end
-- Neu thuoc the he 2
else if( @thehe = 2 )
begin
INSERT INTO dbo.Character(AccountID, Name, Resets, ResetNBB, cLevel, LevelUpPoint, Class, Strength, Dexterity, Vitality, Energy, Inventory,MagicList,
Life, MaxLife, Mana, MaxMana, MapNumber, MapPosX, MapPosY, MDate, LDate, Quest, DbVersion, Leadership,money )
SELECT @AccountID As AccountID, @Name As Name, 5, 5, 400, 2000, @Class As Class,
Strength, Dexterity, Vitality, Energy, Inventory,MagicList, Life, MaxLife, Mana, MaxMana, MapNumber, MapPosX, MapPosY,
getdate() As MDate, getdate() As LDate, Quest, DbVersion, Leadership, 10000000
FROM DefaultClassType WHERE Class = @Class
end
-- Neu thuoc the he 3
else if( @thehe = 3 )
begin
INSERT INTO dbo.Character(AccountID, Name, Resets, ResetNBB, cLevel, LevelUpPoint, Class, Strength, Dexterity, Vitality, Energy, Inventory,MagicList,
Life, MaxLife, Mana, MaxMana, MapNumber, MapPosX, MapPosY, MDate, LDate, Quest, DbVersion, Leadership,money )
SELECT @AccountID As AccountID, @Name As Name, 5, 5, 400, 2000, @Class As Class,
Strength, Dexterity, Vitality, Energy, Inventory,MagicList, Life, MaxLife, Mana, MaxMana, MapNumber, MapPosX, MapPosY,
getdate() As MDate, getdate() As LDate, Quest, DbVersion, Leadership, 10000000
FROM DefaultClassType WHERE Class = @Class
end
-- Neu thuoc the he 4
else if( @thehe = 4 )
begin
INSERT INTO dbo.Character(AccountID, Name, Resets, ResetNBB, cLevel, LevelUpPoint, Class, Strength, Dexterity, Vitality, Energy, Inventory,MagicList,
Life, MaxLife, Mana, MaxMana, MapNumber, MapPosX, MapPosY, MDate, LDate, Quest, DbVersion, Leadership,money )
SELECT @AccountID As AccountID, @Name As Name, 5, 5, 400, 2000, @Class As Class,
Strength, Dexterity, Vitality, Energy, Inventory,MagicList, Life, MaxLife, Mana, MaxMana, MapNumber, MapPosX, MapPosY,
getdate() As MDate, getdate() As LDate, Quest, DbVersion, Leadership, 10000000
FROM DefaultClassType WHERE Class = @Class
end
-- Neu thuoc the he 9 : Event
else if( @thehe = 9 )
begin
INSERT INTO dbo.Character(AccountID, Name, Resets, ResetNBB, cLevel, LevelUpPoint, Class, Strength, Dexterity, Vitality, Energy, Inventory,MagicList,
Life, MaxLife, Mana, MaxMana, MapNumber, MapPosX, MapPosY, MDate, LDate, Quest, DbVersion, Leadership,money )
SELECT @AccountID As AccountID, @Name As Name, 5, 5, 400, 2000, @Class As Class,
Strength, Dexterity, Vitality, Energy, Inventory,MagicList, Life, MaxLife, Mana, MaxMana, MapNumber, MapPosX, MapPosY,
getdate() As MDate, getdate() As LDate, Quest, DbVersion, Leadership, 10000000
FROM DefaultClassType WHERE Class = @Class
end
-- Neu thuoc the he khac chua dinh nghia
else
begin
INSERT INTO dbo.Character(AccountID, Name, Resets, ResetNBB, cLevel, LevelUpPoint, Class, Strength, Dexterity, Vitality, Energy, Inventory,MagicList,
Life, MaxLife, Mana, MaxMana, MapNumber, MapPosX, MapPosY, MDate, LDate, Quest, DbVersion, Leadership,money )
SELECT @AccountID As AccountID, @Name As Name, 0, 0, 1, 500, @Class As Class,
Strength, Dexterity, Vitality, Energy, Inventory,MagicList, Life, MaxLife, Mana, MaxMana, MapNumber, MapPosX, MapPosY,
getdate() As MDate, getdate() As LDate, Quest, DbVersion, Leadership, 1000000
FROM DefaultClassType WHERE Class = @Class
end
SET @Result = @@Error
-- End Create Character theo The he
end
TranProcEnd: -- GOTO
IF ( @Result <> 0 )
ROLLBACK TRAN
ELSE
COMMIT TRAN
ProcEnd:
SET NOCOUNT OFF
SET XACT_ABORT OFF
SELECT
CASE @Result
WHEN 0x00 THEN 0x01
WHEN 0x01 THEN 0x00
WHEN 0x03 THEN 0x03
ELSE 0x02
END AS Result
End
GO
-
17-02-17, 04:40 PM #5
- Ngày tham gia
- Nov 2012
- Đang ở
- Usa
- Bài viết
- 344
- Thanks
- 118
- Thanked 55 Times in 34 Posts
Ðề: giúp đỡ về SQL 2k8 dbo.WZ_CreateCharacter
Khách viếng thăm hãy cùngavinhdtxây dựng diễn đàn CLBGAMESVN vững mạnh nhé!
-
17-02-17, 04:47 PM #6
-
17-02-17, 05:04 PM #7
- Ngày tham gia
- Nov 2012
- Đang ở
- Usa
- Bài viết
- 344
- Thanks
- 118
- Thanked 55 Times in 34 Posts
Ðề: giúp đỡ về SQL 2k8 dbo.WZ_CreateCharacter
triger chia thế hệ có rồi
PHP Code:CREATE TRIGGER TheHe
ON [dbo].[MEMB_STAT]
FOR UPDATE
AS
BEGIN
DECLARE
@slg_thehe tinyint,
@Acc nvarchar(10),
@TheHe nvarchar(50),
@SV nvarchar (20)
SET @slg_thehe = 2
SELECT @Acc=memb___id,@SV=ServerName FROM inserted WHERE ConnectStat='1'
SELECT @TheHe=thehe FROM MEMB_INFO WHERE memb___id=@Acc
-- BEGIN Khong ap dung The he
if(@slg_thehe=1)
BEGIN
UPDATE Character SET CtlCode=0 WHERE AccountID!='admin_block' AND AccountID=@Acc AND CtlCode=99 AND ErrorSubBlock!=99
UPDATE AccountCharacter SET GameID1='' WHERE GameID1='NhamSV1' AND Id=@Acc AND Id!='admin_block'
UPDATE AccountCharacter SET GameID2='' WHERE GameID2='NhamSV2' AND Id=@Acc AND Id!='admin_block'
UPDATE AccountCharacter SET GameID3='' WHERE GameID3='NhamSV3' AND Id=@Acc AND Id!='admin_block'
UPDATE AccountCharacter SET GameID4='' WHERE GameID4='NhamSV4' AND Id=@Acc AND Id!='admin_block'
UPDATE AccountCharacter SET GameID5='' WHERE GameID5='NhamSV5' AND Id=@Acc AND Id!='admin_block'
END
-- END Khong ap dung The he
ELSE
BEGIN
-- BEGIN Ap dung the he
-- The he moi
IF(@TheHe=2)
BEGIN
IF(@SV='Sub-1' OR @SV='Sub-2' OR @SV='Sub-3' OR @SV='Sub-4' OR @SV='Sub-5')
BEGIN
UPDATE Character SET CtlCode=99 WHERE AccountID!='admin_block' AND AccountID=@Acc AND (CtlCode=0 OR CtlCode=18) AND ErrorSubBlock!=99
UPDATE AccountCharacter SET GameID1='NhamSV1' WHERE Id=@Acc AND (GameID1 IS NULL OR GameID1='') AND Id!='admin_block'
UPDATE AccountCharacter SET GameID2='NhamSV2' WHERE Id=@Acc AND (GameID2 IS NULL OR GameID2='') AND Id!='admin_block'
UPDATE AccountCharacter SET GameID3='NhamSV3' WHERE Id=@Acc AND (GameID3 IS NULL OR GameID3='') AND Id!='admin_block'
UPDATE AccountCharacter SET GameID4='NhamSV4' WHERE Id=@Acc AND (GameID4 IS NULL OR GameID4='') AND Id!='admin_block'
UPDATE AccountCharacter SET GameID5='NhamSV5' WHERE Id=@Acc AND (GameID5 IS NULL OR GameID5='') AND Id!='admin_block'
END
ELSE
BEGIN
UPDATE Character SET CtlCode=0 WHERE AccountID!='admin_block' AND AccountID=@Acc AND CtlCode=99 AND ErrorSubBlock!=99
UPDATE AccountCharacter SET GameID1='' WHERE GameID1='NhamSV1' AND Id=@Acc AND Id!='admin_block'
UPDATE AccountCharacter SET GameID2='' WHERE GameID2='NhamSV2' AND Id=@Acc AND Id!='admin_block'
UPDATE AccountCharacter SET GameID3='' WHERE GameID3='NhamSV3' AND Id=@Acc AND Id!='admin_block'
UPDATE AccountCharacter SET GameID4='' WHERE GameID4='NhamSV4' AND Id=@Acc AND Id!='admin_block'
UPDATE AccountCharacter SET GameID5='' WHERE GameID5='NhamSV5' AND Id=@Acc AND Id!='admin_block'
END
END
ELSE
-- The he cu
BEGIN
IF(@SV='Sub-1' OR @SV='Sub-2' OR @SV='Sub-3' OR @SV='Sub-4' OR @SV='Sub-5')
BEGIN
UPDATE Character SET CtlCode=0 WHERE AccountID!='admin_block' AND AccountID=@Acc AND CtlCode=99 AND ErrorSubBlock!=99
UPDATE AccountCharacter SET GameID1='' WHERE GameID1='NhamSV1' AND Id=@Acc AND Id!='admin_block'
UPDATE AccountCharacter SET GameID2='' WHERE GameID2='NhamSV2' AND Id=@Acc AND Id!='admin_block'
UPDATE AccountCharacter SET GameID3='' WHERE GameID3='NhamSV3' AND Id=@Acc AND Id!='admin_block'
UPDATE AccountCharacter SET GameID4='' WHERE GameID4='NhamSV4' AND Id=@Acc AND Id!='admin_block'
UPDATE AccountCharacter SET GameID5='' WHERE GameID5='NhamSV5' AND Id=@Acc AND Id!='admin_block'
END
ELSE
BEGIN
UPDATE Character SET CtlCode=99 WHERE AccountID!='admin_block' AND AccountID=@Acc AND (CtlCode=0 OR CtlCode=18) AND ErrorSubBlock!=99
UPDATE AccountCharacter SET GameID1='NhamSV1' WHERE Id=@Acc AND (GameID1 IS NULL OR GameID1='') AND Id!='admin_block'
UPDATE AccountCharacter SET GameID2='NhamSV2' WHERE Id=@Acc AND (GameID2 IS NULL OR GameID2='') AND Id!='admin_block'
UPDATE AccountCharacter SET GameID3='NhamSV3' WHERE Id=@Acc AND (GameID3 IS NULL OR GameID3='') AND Id!='admin_block'
UPDATE AccountCharacter SET GameID4='NhamSV4' WHERE Id=@Acc AND (GameID4 IS NULL OR GameID4='') AND Id!='admin_block'
UPDATE AccountCharacter SET GameID5='NhamSV5' WHERE Id=@Acc AND (GameID5 IS NULL OR GameID5='') AND Id!='admin_block'
END
END
-- END ap dung the he
END
END
Khách viếng thăm hãy cùngavinhdtxây dựng diễn đàn CLBGAMESVN vững mạnh nhé!
-
17-02-17, 05:33 PM #8
- Ngày tham gia
- Jan 2014
- Đang ở
- Home
- Bài viết
- 55
- Thanks
- 37
- Thanked 102 Times in 18 Posts
Ðề: giúp đỡ về SQL 2k8 dbo.WZ_CreateCharacter
Không nhầm thì đây là SS8.3 MUEMU ^_^. Liên hệ Sky mình xem sao
Khách viếng thăm hãy cùng votam2x xây dựng diễn đàn CLBGAMESVN vững mạnh nhé!
-
17-02-17, 07:14 PM #9
- Ngày tham gia
- Nov 2012
- Đang ở
- Usa
- Bài viết
- 344
- Thanks
- 118
- Thanked 55 Times in 34 Posts
Ðề: giúp đỡ về SQL 2k8 dbo.WZ_CreateCharacter
Khách viếng thăm hãy cùngavinhdtxây dựng diễn đàn CLBGAMESVN vững mạnh nhé!
-
17-02-17, 08:15 PM #10
Các Chủ đề tương tự
-
[MU] Hỏi về WZ_CreateCharacter DB mu season8
Bởi fataxi trong diễn đàn Hỏi Đáp/ Yêu CầuTrả lời: 8Bài viết cuối: 04-06-16, 06:04 PM -
[KT] Giúp Mở Map Thôn
Bởi daica007 trong diễn đàn Hỏi Đáp/ Yêu CầuTrả lời: 1Bài viết cuối: 30-09-12, 04:50 PM -
Các bro giúp new bie em với !!!!!!!!!!!!!!!!!!!!!!!!!!!!
Bởi mqlmvl trong diễn đàn Hỏi Đáp/ Yêu CầuTrả lời: 2Bài viết cuối: 15-02-11, 08:22 PM -
Anh em giúp giùm phát :D
Bởi Mr.Cuong trong diễn đàn Hỏi Đáp/ Yêu CầuTrả lời: 1Bài viết cuối: 15-12-10, 09:22 AM