USE [Gamedb]
GO
/****** Objekt: StoredProcedure [dbo].[cabal_sp_newchar] Skriptdatum: 07/23/2009 15:40:47 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
/****** Object: Stored Procedure dbo.cabal_sp_newchar Script Date: 2008-4-14 5:52:47 ******/
ALTER PROCEDURE [dbo].[cabal_sp_newchar] (@charname varchar(16), @characteridx int, @style int, @stylemast int)
AS
begin
SET NOCOUNT ON
if( exists ( select * from cabal_badwoard where badword=@charname ) ) select convert(int,0x04)
else if( exists ( select * from cabal_character_table where Name=@charname ) ) select convert(int,0x03)
else if( exists ( select * from cabal_character_table where characteridx=@characteridx ) ) select convert(int,0x02)
else if( @stylemast < 0x01 or @stylemast > 0x06 ) select convert(int,0x02)
else
begin
-----------------------------------------------------------------------------------------------
declare @RegTime dateTime, @userNum int, @serverIdx int, @result int
set @userNum = @characterIdx/8
set @serverIdx = dbo.getServerIdx()
set @RegTime = getDate()
set @result = convert(int, 0xA0) + @stylemast
------------------------------------------------------------------------------------------------
select charTable.*, etcTable.equipmentData, etcTable.inventoryData, etcTable.skillData,
etcTable.quickSlotData, etcTable.questData, etcTable.questFlagsData
into #tempTable
from account.dbo.cabal_newCharData_table as charTable,
account.dbo.cabal_newEtcData_table as etcTable,
( select top 1 charDataIdx, etcDataIdx from account.dbo.cabal_newFlagData_table
where channel = @serverIdx) as flagTable
where flagTable.etcDataIdx = etcTable.dataIdx and flagTable.charDataIdx = charTable.dataIdx
and charTable.classType = etcTable.classType and charTable.classType = @stylemast
IF( NOT EXISTS ( select * from #tempTable))
BEGIN
select convert(int, 0x01)
drop table #tempTable
return
END
-----------------------------------------------------------------------------------------------
--
??? ??
EXEC account.dbo.cabal_sp_update_character_count @userNum, @serverIdx, 1
--
??
insert into cabal_character_table( CharacterIdx, Name, LEV, [EXP], [sTR], DEX, [iNT], PNT, Rank, Alz,
WorldIdx, [Position], Style, HP, MP, SP, SwdPNT, MagPNT, RankEXP, Flags, WarpBField, MapsBField, Reputation, Reserved1 )
select @characteridx, @charname, LEV, [EXP], [sTR], [DEX], [iNT], [PNT], Rank, Alz,
WorldIdx, Position, @style, HP, MP, SP, SwdPNT, MagPNT, RankEXP, Flags, WarpBField, MapsBField, Reputation, Reserved1
from #TempTable
begin tran
insert into cabal_equipment_table (characterIdx, data) select @characteridx, equipmentData from #TempTable
insert into cabal_inventory_table (characterIdx, data) select @characteridx, inventoryData from #TempTable
insert into cabal_skilllist_table (characterIdx, data) select @characteridx, skillData from #TempTable
insert into cabal_quickslot_table (characterIdx, data) select @characteridx, quickSlotData from #TempTable
insert into cabal_questdata_table (characterIdx, data, flags) select @characteridx, questData, questFlagsData from #TempTable
commit tran
----------------------------------------------------------------------------------------------
--
0xA1 ~ 0xA6
drop table #tempTable
select convert(int, @result)
-----------------------------------------------------------------------------------------------
end
SET NOCOUNT OFF
end
para pesquisar na BD
Progamierbarkeit//Gespeicherte Prozeduen Prozeduen Progamierbarkeit / Armazenado
suche nach pesquise
dbo.cabal_sp_delchar dbo.cabal_sp_delchar
Ersetzen Substituir
Code: Código:
USE [Gamedb]
GO
/****** Objekt: StoredProcedure [dbo].[cabal_sp_delchar] Skriptdatum: 07/23/2009 15:38:24 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
/****** Object: Stored Procedure dbo.cabal_sp_delchar Script Date: 2008-4-14 5:52:47 ******/
ALTER PROCEDURE [dbo].[cabal_sp_delchar] (@characteridx int)
AS
begin
SET NOCOUNT ON
DECLARE @ROWCOUNT int
BEGIN
--If GuildMaster, return 0xB2
SELECT @ROWCOUNT = COUNT(A.GroupIndex) FROM GUILDGROUP A
INNER JOIN
(
SELECT GroupIndex FROM GUILDMEMBER WHERE CharacterIndex = @characteridx
) B
ON A.GroupIndex = B.GroupIndex
WHERE A.GroupPermission = 0
IF( @ROWCOUNT > 0 )
BEGIN
SELECT CONVERT(INT, 0xB2)
SET NOCOUNT OFF
RETURN
END
END
begin tran
INSERT INTO DELETED_CABAL_CHARACTER_TABLE(
CHARACTERIDX, NAME, LEV, EXP, STR, DEX, INT, PNT, RANK, ALZ, WORLDIDX, POSITION, STYLE, HP, MP, SWDPNT, MAGPNT, RANKEXP, FLAGS, WARPBFIELD, MAPSBFIELD, SP, PENALTYEXP, LOGOUTTIME, RP, REPUTATION, LOGINTIME, PLAYTIME, CHANNELIDX, CreateDate, EQUIPDATA, INVENDATA, SKILLDATA, QSLOTDATA, QDFLAGS, QSTDATA, QSTFLAGS, Level0, Level1, Level2, Level3, Level4, Exp0, Exp1, Exp2, Exp3, Exp4, CraftFlags, PKPenalty, Nation, BBeadData)
SELECT
A.CHARACTERIDX, NAME, LEV, EXP, STR, DEX, INT, PNT, RANK, ALZ, WORLDIDX, POSITION, STYLE, HP, MP, SWDPNT, MAGPNT, RANKEXP, A.FLAGS, WARPBFIELD, MAPSBFIELD, SP, PENALTYEXP, LOGOUTTIME, RP, REPUTATION, LOGINTIME, PLAYTIME, CHANNELIDX, CreateDate, B.DATA, C.DATA, D.DATA, E.DATA, F.FLAGS, G.DATA, G.FLAGS, H.Level0, H.Level1, H.Level2, H.Level3, H.Level4, H.Exp0, H.Exp1, H.Exp2, H.Exp3, H.Exp4, H.Flags, A.PKPenalty, A.Nation, I.DATA
FROM CABAL_CHARACTER_TABLE A
LEFT OUTER JOIN CABAL_EQUIPMENT_TABLE B ON A.CHARACTERIDX = B.CHARACTERIDX
LEFT OUTER JOIN CABAL_INVENTORY_TABLE C ON A.CHARACTERIDX = C.CHARACTERIDX
LEFT OUTER JOIN CABAL_SKILLLIST_TABLE D ON A.CHARACTERIDX = D.CHARACTERIDX
LEFT OUTER JOIN CABAL_QUICKSLOT_TABLE E ON A.CHARACTERIDX = E.CHARACTERIDX
LEFT OUTER JOIN CABAL_QDDATA_TABLE F ON A.CHARACTERIDX = F.CHARACTERIDX
LEFT OUTER JOIN CABAL_QUESTDATA_TABLE G ON A.CHARACTERIDX = G.CHARACTERIDX
LEFT OUTER JOIN CABAL_CRAFT_TABLE H ON A.CHARACTERIDX = H.CHARACTERIDX
LEFT OUTER JOIN CABAL_BBEAD_TABLE I ON A.CHARACTERIDX = I.CHARACTERIDX
WHERE A.CHARACTERIDX = @characteridx
delete from chat_buddy_table where (RegisterCharIdx = @characteridx) OR (RegisteeCharIdx = @characteridx)
delete from chat_buddygroup_table where CharIdx = @characteridx
delete from guildmember where characterindex = @characteridx
delete from cabal_bbead_table where CharacterIdx=@characteridx
delete from cabal_craft_table where Characteridx=@characteridx
delete from cabal_equipment_table where CharacterIdx=@characteridx
delete from cabal_inventory_table where CharacterIdx=@characteridx
delete from cabal_skilllist_table where CharacterIdx=@characteridx
delete from cabal_quickslot_table where CharacterIdx=@characteridx
delete from cabal_questdata_table where CharacterIdx=@characteridx
delete from cabal_qddata_table where CharacterIdx=@characteridx
delete from cabal_character_table where CharacterIdx=@characteridx
set @ROWCOUNT = @@ROWCOUNT
commit tran
IF( @ROWCOUNT > 0 )
BEGIN
--
?
???
DECLARE @USERNUM INT, @SERVERIDX INT
SET @USERNUM = @CHARACTERIDX/8
SET @SERVERIDX = DBO.GETSERVERIDX()
EXEC ACCOUNT.dbo.CABAL_SP_UPDATE_CHARACTER_COUNT @USERNUM, @SERVERIDX, -1
END
SELECT CONVERT(INT, 0xA1)
SET NOCOUNT OFF
end
O LINK DE ONDE PEGUEI ISSO É ESSE, ESTOU APRENDENDO USAR AS FERRAMENTAS DO FORUM AINDA.
conversei com o quenio ele disse para reinstalar o sql e restaurar as BD's novamente fiz isso porem continua o mesmo erro, alguem pode me ajudar por favor ?
desde já agradeço !
|
|