[HIDE]
_LogCashItem
USE [SILKROAD_R_LOG]
GO
/****** Object: Table [dbo].[_LogCashItem] Script Date: 02-10-2022 7:36:29 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[_LogCashItem](
[RefItemID] [int] NOT NULL,
[CharID] [int] NOT NULL,
[Cnt] [smallint] NOT NULL,
[EventTime] [datetime] NOT NULL,
[Serial64] [bigint] NOT NULL,
[ServiceCompany] [tinyint] NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[_LogCashItem] ADD CONSTRAINT [DF___LogCashI__Seria__2C3393D0] DEFAULT ((0)) FOR [Serial64]
GO
_LogEventItem
USE [SILKROAD_R_LOG]
GO
/****** Object: Table [dbo].[_LogEventItem] Script Date: 02-10-2022 7:36:53 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[_LogEventItem](
[EventTime] [datetime] NOT NULL,
[CharID] [int] NOT NULL,
[ItemRefID] [int] NOT NULL,
[dwData] [int] NOT NULL,
[TargetStorage] [tinyint] NOT NULL,
[Operation] [tinyint] NOT NULL,
[Slot_From] [tinyint] NOT NULL,
[Slot_To] [tinyint] NOT NULL,
[EventPos] [varchar](64) NULL,
[strDesc] [varchar](128) NULL,
[Serial64] [bigint] NOT NULL,
[Gold] [bigint] NULL,
[ServiceCompany] [tinyint] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[_LogEventItem] ADD CONSTRAINT [DF___LogEvent__Seria__440B1D61] DEFAULT ((0)) FOR [Serial64]
GO
ALTER TABLE [dbo].[_LogEventItem] ADD DEFAULT ((0)) FOR [Gold]
GO
_AddLogItem
USE [SILKROAD_R_SHARD_LOG]
GO
/****** Object: StoredProcedure [dbo].[_AddLogItem] Script Date: 02-10-2022 7:28:08 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER procedure [dbo].[_AddLogItem]
@CharID int,
@ItemRefID int,
@ItemSerial bigint,
@dwData int,
@TargetStorage tinyint,
@Operation tinyint,
@Slot_From tinyint,
@Slot_To tinyint,
@EventPos varchar(64),
@strDesc varchar(128),
@Gold bigint,
@ServiceCompany int
as
declare @len_pos int
declare @len_desc int
set @len_pos = len(@EventPos)
set @len_desc = len(@strDesc)
if (@len_pos > 0 and @len_desc > 0)
begin
insert _LogEventItem (EventTime, CharID, ItemRefID, dwData, TargetStorage, Operation, Slot_From, Slot_To, EventPos, strDesc, Serial64, Gold, ServiceCompany)
values(GetDate(), @CharID, @ItemRefID, @dwData, @TargetStorage, @Operation, @Slot_From, @Slot_To, @EventPos, @strDesc, @ItemSerial, @Gold, @ServiceCompany)
end
else if (@len_pos > 0 and @len_desc = 0)
begin
insert _LogEventItem (EventTime, CharID, ItemRefID, dwData, TargetStorage, Operation, Slot_From, Slot_To, EventPos, Serial64, Gold, ServiceCompany)
values(GetDate(), @CharID, @ItemRefID, @dwData, @TargetStorage, @Operation, @Slot_From, @Slot_To, @EventPos, @ItemSerial, @Gold, @ServiceCompany)
end
else if (@len_pos = 0 and @len_desc > 0)
begin
insert _LogEventItem (EventTime, CharID, ItemRefID, dwData, TargetStorage, Operation, Slot_From, Slot_To, strDesc, Serial64, Gold, ServiceCompany)
values(GetDate(), @CharID, @ItemRefID, @dwData, @TargetStorage, @Operation, @Slot_From, @Slot_To, @strDesc, @ItemSerial, @Gold, @ServiceCompany)
end
else if (@len_pos = 0 and @len_desc = 0)
begin
insert _LogEventItem (EventTime, CharID, ItemRefID, dwData, TargetStorage, Operation, Slot_From, Slot_To, Serial64, Gold, ServiceCompany)
values(GetDate(), @CharID, @ItemRefID, @dwData, @TargetStorage, @Operation, @Slot_From, @Slot_To, @ItemSerial, @Gold, @ServiceCompany)
end
-- ?? 酒?袍 ????!
-- #define LOG_ITEMEVENT_BUY_CASHITEM (BYTE)35
if (@Operation = 35)
begin
insert _LogCashItem (RefItemID, CharID, Cnt, EventTime, Serial64, ServiceCompany)
values(@ItemRefID, @CharID, @dwData, GetDate(), @ItemSerial, @ServiceCompany)
end
[/HIDE]
_LogCashItem
USE [SILKROAD_R_LOG]
GO
/****** Object: Table [dbo].[_LogCashItem] Script Date: 02-10-2022 7:36:29 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[_LogCashItem](
[RefItemID] [int] NOT NULL,
[CharID] [int] NOT NULL,
[Cnt] [smallint] NOT NULL,
[EventTime] [datetime] NOT NULL,
[Serial64] [bigint] NOT NULL,
[ServiceCompany] [tinyint] NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[_LogCashItem] ADD CONSTRAINT [DF___LogCashI__Seria__2C3393D0] DEFAULT ((0)) FOR [Serial64]
GO
_LogEventItem
USE [SILKROAD_R_LOG]
GO
/****** Object: Table [dbo].[_LogEventItem] Script Date: 02-10-2022 7:36:53 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[_LogEventItem](
[EventTime] [datetime] NOT NULL,
[CharID] [int] NOT NULL,
[ItemRefID] [int] NOT NULL,
[dwData] [int] NOT NULL,
[TargetStorage] [tinyint] NOT NULL,
[Operation] [tinyint] NOT NULL,
[Slot_From] [tinyint] NOT NULL,
[Slot_To] [tinyint] NOT NULL,
[EventPos] [varchar](64) NULL,
[strDesc] [varchar](128) NULL,
[Serial64] [bigint] NOT NULL,
[Gold] [bigint] NULL,
[ServiceCompany] [tinyint] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[_LogEventItem] ADD CONSTRAINT [DF___LogEvent__Seria__440B1D61] DEFAULT ((0)) FOR [Serial64]
GO
ALTER TABLE [dbo].[_LogEventItem] ADD DEFAULT ((0)) FOR [Gold]
GO
_AddLogItem
USE [SILKROAD_R_SHARD_LOG]
GO
/****** Object: StoredProcedure [dbo].[_AddLogItem] Script Date: 02-10-2022 7:28:08 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER procedure [dbo].[_AddLogItem]
@CharID int,
@ItemRefID int,
@ItemSerial bigint,
@dwData int,
@TargetStorage tinyint,
@Operation tinyint,
@Slot_From tinyint,
@Slot_To tinyint,
@EventPos varchar(64),
@strDesc varchar(128),
@Gold bigint,
@ServiceCompany int
as
declare @len_pos int
declare @len_desc int
set @len_pos = len(@EventPos)
set @len_desc = len(@strDesc)
if (@len_pos > 0 and @len_desc > 0)
begin
insert _LogEventItem (EventTime, CharID, ItemRefID, dwData, TargetStorage, Operation, Slot_From, Slot_To, EventPos, strDesc, Serial64, Gold, ServiceCompany)
values(GetDate(), @CharID, @ItemRefID, @dwData, @TargetStorage, @Operation, @Slot_From, @Slot_To, @EventPos, @strDesc, @ItemSerial, @Gold, @ServiceCompany)
end
else if (@len_pos > 0 and @len_desc = 0)
begin
insert _LogEventItem (EventTime, CharID, ItemRefID, dwData, TargetStorage, Operation, Slot_From, Slot_To, EventPos, Serial64, Gold, ServiceCompany)
values(GetDate(), @CharID, @ItemRefID, @dwData, @TargetStorage, @Operation, @Slot_From, @Slot_To, @EventPos, @ItemSerial, @Gold, @ServiceCompany)
end
else if (@len_pos = 0 and @len_desc > 0)
begin
insert _LogEventItem (EventTime, CharID, ItemRefID, dwData, TargetStorage, Operation, Slot_From, Slot_To, strDesc, Serial64, Gold, ServiceCompany)
values(GetDate(), @CharID, @ItemRefID, @dwData, @TargetStorage, @Operation, @Slot_From, @Slot_To, @strDesc, @ItemSerial, @Gold, @ServiceCompany)
end
else if (@len_pos = 0 and @len_desc = 0)
begin
insert _LogEventItem (EventTime, CharID, ItemRefID, dwData, TargetStorage, Operation, Slot_From, Slot_To, Serial64, Gold, ServiceCompany)
values(GetDate(), @CharID, @ItemRefID, @dwData, @TargetStorage, @Operation, @Slot_From, @Slot_To, @ItemSerial, @Gold, @ServiceCompany)
end
-- ?? 酒?袍 ????!
-- #define LOG_ITEMEVENT_BUY_CASHITEM (BYTE)35
if (@Operation = 35)
begin
insert _LogCashItem (RefItemID, CharID, Cnt, EventTime, Serial64, ServiceCompany)
values(@ItemRefID, @CharID, @dwData, GetDate(), @ItemSerial, @ServiceCompany)
end
[/HIDE]