Merhabalar,
Çoğu Server yöneticileri Aujard Logda Bu Event Hakkında bir çok log
hatası bulmuştur.
Kupon Eventi artık nasıl ve ne işe yarıyorsa bilemiyorum
Ilk Tablolari Kuralim :P
Kod:
CREATE TABLE [dbo].[COUPON_EVENT](
[AccountID] [char](21) NOT NULL,
[CharID] [char](21) NOT NULL,
[CouponID] [char](20) NOT NULL,
[ItemID] [int] NOT NULL,
[ItemCount] [int] NOT NULL,
[RegisterTime] [smalldatetime] NOT NULL,
)
GO
SET ANSI_PADDING ON
GO
ALTER TABLE [dbo].[COUPON_EVENT] ADD CONSTRAINT [DF_COUPON_EVENT_RegisterTime] DEFAULT (getdate()) FOR [RegisterTime]
GO
/****** Object: Table [dbo].[COUPON_SERIAL_LIST] Script Date: 08/29/2009 05:22:28 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[COUPON_SERIAL_LIST](
[nIndex] [int] NOT NULL,
[strSerialNum] [char](16) NOT NULL,
[nItemNum] [int] NOT NULL,
[sItemCount] [smallint] NOT NULL
) ON [PRIMARY]
GO
SET ANSI_PADDING ON
GO
Prosedürlere Geçelim :
Kod:
CREATE PROCEDURE [dbo].[CHECK_COUPON_EVENT]
@strAccountID char(21),
@strCouponID char(21),
@nRet smallint OUTPUT
--PvP-Kenti.COM
--Thank you Osmanx
AS
DECLARE @Row tinyint
SELECT @Row = COUNT(AccountID) FROM COUPON_EVENT WHERE CouponID = @strCouponID OR AccountID = @strAccountID
IF @Row = 0
BEGIN
SET @nRet = 0
RETURN
END
SET @nRet = 1
Kod:
CREATE PROCEDURE [dbo].[UPDATE_COUPON_EVENT]
@strAccountID char(21),
@strCharID char(21),
@strCouponID char(20),
@nItemID int,
@nItemCount int
--PvP-Kenti.COM
--Thank You Osmanx
AS
BEGIN TRAN
INSERT INTO COUPON_EVENT (AccountID, CharID, CouponID, ItemID, ItemCount )
VALUES (@strAccountID, @strCharID, @strCouponID, @nItemID, @nItemCount )
COMMIT TRAN
Hadi Bakalım Hayırlı Copy Paste Yapmalar
Çoğu Server yöneticileri Aujard Logda Bu Event Hakkında bir çok log
hatası bulmuştur.
Kupon Eventi artık nasıl ve ne işe yarıyorsa bilemiyorum
Ilk Tablolari Kuralim :P
Kod:
CREATE TABLE [dbo].[COUPON_EVENT](
[AccountID] [char](21) NOT NULL,
[CharID] [char](21) NOT NULL,
[CouponID] [char](20) NOT NULL,
[ItemID] [int] NOT NULL,
[ItemCount] [int] NOT NULL,
[RegisterTime] [smalldatetime] NOT NULL,
)
GO
SET ANSI_PADDING ON
GO
ALTER TABLE [dbo].[COUPON_EVENT] ADD CONSTRAINT [DF_COUPON_EVENT_RegisterTime] DEFAULT (getdate()) FOR [RegisterTime]
GO
/****** Object: Table [dbo].[COUPON_SERIAL_LIST] Script Date: 08/29/2009 05:22:28 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[COUPON_SERIAL_LIST](
[nIndex] [int] NOT NULL,
[strSerialNum] [char](16) NOT NULL,
[nItemNum] [int] NOT NULL,
[sItemCount] [smallint] NOT NULL
) ON [PRIMARY]
GO
SET ANSI_PADDING ON
GO
Prosedürlere Geçelim :
Kod:
CREATE PROCEDURE [dbo].[CHECK_COUPON_EVENT]
@strAccountID char(21),
@strCouponID char(21),
@nRet smallint OUTPUT
--PvP-Kenti.COM
--Thank you Osmanx
AS
DECLARE @Row tinyint
SELECT @Row = COUNT(AccountID) FROM COUPON_EVENT WHERE CouponID = @strCouponID OR AccountID = @strAccountID
IF @Row = 0
BEGIN
SET @nRet = 0
RETURN
END
SET @nRet = 1
Kod:
CREATE PROCEDURE [dbo].[UPDATE_COUPON_EVENT]
@strAccountID char(21),
@strCharID char(21),
@strCouponID char(20),
@nItemID int,
@nItemCount int
--PvP-Kenti.COM
--Thank You Osmanx
AS
BEGIN TRAN
INSERT INTO COUPON_EVENT (AccountID, CharID, CouponID, ItemID, ItemCount )
VALUES (@strAccountID, @strCharID, @strCouponID, @nItemID, @nItemCount )
COMMIT TRAN
Hadi Bakalım Hayırlı Copy Paste Yapmalar