Pages

Fix Event System Cabal Online

[Guide] EVENT System Works
Hi Ragezone i repair Event System its works
bug is cabal_sp_ems_get_events
solved:
USE [EventData]
GO

/****** Object: StoredProcedure [dbo].[cabal_sp_ems_get_events] Script Date: 03/03/2013 13:55:28 ******/
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[cabal_sp_ems_get_events]') AND type in (N'P', N'PC'))
DROP PROCEDURE [dbo].[cabal_sp_ems_get_events]
GO

USE [EventData]
GO

/****** Object: StoredProcedure [dbo].[cabal_sp_ems_get_events] Script Date: 03/03/2013 13:55:29 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO


-- =============================================
-- Author: Hefajstos
-- Create date: 2013-01-08
-- Description:
-- =============================================
CREATE PROCEDURE [dbo].[cabal_sp_ems_get_events] 
AS
BEGIN

SET NOCOUNT ON

DECLARE @TimeZone INT
SET @TimeZone = DATEDIFF(hour, GETUTCDATE(), GETDATE())

SELECT
TOP 10
EventID, 
EventType,
UseFlag,
DATEADD(hour, -@TimeZone, BeginDate), 
DATEADD(hour, -@TimeZone, EndDate), 
DATEADD(hour, -@TimeZone, LastModifiedDate), 
worldIndex,
npcIndex,
Name
FROM
cabal_ems_event_table
WHERE
UseFlag= 1
ORDER BY EndDate DESC

END


GO
hefajstos
Ragezone