Also wir haben auf unseren Server derzeit ein ein großes Problem (V15).
Man kann zwar am Secret Room teilnehmen und ihn auch machen etc. aber sobald man durch ist und nachrichtkann dass man gewonnen hat, hat man trotzdem den Kontinent nicht besetzt.
Hier die Prozeduren.
SECRET_ROOM_STR
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
GO
ALTER proc [dbo].[SECRET_ROOM_STR]
@iGu char(2),
@serverindex char(2),
@nTimes int,
@nContinent int,
@m_idGuild char(6),
@nPenya int,
@chState char(1),
@dwWorldID int,
@nWarState int,
@nKillCount int
as
set nocount on
set xact_abort on
if @iGu = 'S1'
begin
select isnull(max(nTimes), 0) as nTimes from SECRET_ROOM_TBL where serverindex = @serverindex
end
if @iGu = 'S2'
begin
select nContinent, m_idGuild, nPenya
from SECRET_ROOM_TBL
where serverindex = @serverindex and nTimes = @nTimes and chState = @chState
order by nContinent asc, nPenya desc, s_date asc
end
if @iGu = 'I1'
begin
insert into SECRET_ROOM_TBL (serverindex, nTimes, nContinent, m_idGuild, nPenya, chState, s_date)
select @serverindex, @nTimes, @nContinent, @m_idGuild, @nPenya, @chState, getdate()
end
if @iGu = 'U1'
begin
update SECRET_ROOM_TBL
set nPenya = @nPenya, chState = @chState, s_date = getdate()
where serverindex = @serverindex and nTimes = @nTimes and nContinent = @nContinent and m_idGuild = @m_idGuild and chState = 'T'
end
if @iGu = 'U2'
begin
update SECRET_ROOM_TBL
set nPenya = @nPenya, chState = @chState, dwWorldID = @dwWorldID, nWarState = @nWarState, nKillCount = @nKillCount, s_date = getdate()
where serverindex = @serverindex and nTimes = @nTimes and nContinent = @nContinent and m_idGuild = @m_idGuild and chState = 'T'
end
Alles anzeigen
SECRET_ROOM_MEMBER_STR
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
GO
ALTER proc [dbo].[SECRET_ROOM_MEMBER_STR]
@iGu char(2),
@serverindex char(2),
@nTimes int,
@nContinent int,
@m_idGuild char(6),
@m_idPlayer char(7)
as
set nocount on
set xact_abort on
if @iGu = 'S2'
begin
select m_idPlayer
from SECRET_ROOM_MEMBER_TBL
where serverindex = @serverindex and nTimes = @nTimes and nContinent = @nContinent and m_idGuild = @m_idGuild
end
if @iGu = 'I1'
begin
insert into SECRET_ROOM_MEMBER_TBL (serverindex, nTimes, nContinent, m_idGuild, m_idPlayer)
select @serverindex, @nTimes, @nContinent, @m_idGuild, @m_idPlayer
end
if @iGu = 'D1'
begin
delete SECRET_ROOM_MEMBER_TBL
where serverindex = @serverindex and nTimes = @nTimes and nContinent = @nContinent and m_idGuild = @m_idGuild
end
Alles anzeigen
und das löschen ist auch nicht möglich (nach PW eingabe "Hoppla versuchs nochmal").
CHARACTER_DELELTE_STR
set ANSI_NULLS ON
set QUOTED_IDENTIFIER OFF
GO
ALTER PROC [dbo].[CHARACTER_DELETE_STR]
AS
DECLARE @serverindex char(2)
DECLARE Delete_Server CURSOR FOR
SELECT serverindex FROM CHARACTER_TBL GROUP BY serverindex ORDER BY serverindex
OPEN Delete_Server
FETCH NEXT FROM Delete_Server
INTO @serverindex
WHILE @@FETCH_STATUS = 0
BEGIN
--- DECLARE @DeleteDelayDay int
--- set @DeleteDelayDay = '-7'
--- SELECT * FROM CHARACTER_TBL WHERE isblock='D' AND End_Time <= convert(char(8), DATEADD(d,@DeleteDelayDay,getdate()),112)
DELETE CHARACTER_TBL WHERE isblock='D' AND End_Time <= convert(char(8),DATEADD(d,-7,getdate()),112) and serverindex = @serverindex
DECLARE @name varchar(256)
DECLARE Delete_Cursor CURSOR FOR
SELECT B.name
FROM syscolumns A,sysobjects B
WHERE A.id = B.id
AND B.name NOT IN('CHARACTER_TBL','MESSENGER_TBL')
AND A.name = 'm_idPlayer' and A.name = 'serverindex'
AND B.type='U'
ORDER BY B.name
OPEN Delete_Cursor
FETCH NEXT FROM Delete_Cursor
INTO @name
WHILE @@FETCH_STATUS = 0
BEGIN
PRINT @name + '??'
EXEC('DELETE ' + @name + ' WHERE m_idPlayer NOT IN (SELECT m_idPlayer FROM CHARACTER_TBL where serverindex = ''' + @serverindex + ''') and serverindex = ''' + @serverindex + '''')
FETCH NEXT FROM Delete_Cursor
INTO @name
END
DELETE TAG_TBL WHERE f_idPlayer NOT IN (SELECT m_idPlayer FROM CHARACTER_TBL where serverindex = @serverindex) and serverindex = @serverindex
PRINT '??? ?? ??'
-- ?? 2009-09-16 ??? ?? ?? ?? (EXEC MESSENGER_STR 'D2','',@serverindex ?? ?? ??)
delete tblMessenger
where idPlayer not in (select m_idPlayer from CHARACTER_TBL where serverindex = @serverindex)
delete tblMessenger
where idFriend not in (select m_idPlayer from CHARACTER_TBL where serverindex = @serverindex)
-- EXEC MESSENGER_STR 'D2','',@serverindex
PRINT 'Delete Skill'
DELETE tblSkillPoint
WHERE PlayerID NOT IN (SELECT m_idPlayer FROM CHARACTER_TBL WHERE serverindex=@serverindex)
AND serverindex=@serverindex
CLOSE Delete_Cursor
DEALLOCATE Delete_Cursor
FETCH NEXT FROM Delete_Server
INTO @serverindex
END
CLOSE Delete_Server
DEALLOCATE Delete_Server
RETURN
Alles anzeigen