I need the original _addlogitem
Printable View
I need the original _addlogitem
Code:USE [SRO_VT_LOG]
GO
/****** Object: StoredProcedure [dbo].[_AddLogItem] Script Date: 06/11/2015 23:34:09 ******/
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
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)
values(GetDate(), @CharID, @ItemRefID, @dwData, @TargetStorage, @operation, @slot_From, @slot_To, @eventPos, @strDesc, @ItemSerial, @Gold)
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)
values(GetDate(), @CharID, @ItemRefID, @dwData, @TargetStorage, @operation, @slot_From, @slot_To, @eventPos, @ItemSerial, @Gold)
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)
values(GetDate(), @CharID, @ItemRefID, @dwData, @TargetStorage, @operation, @slot_From, @slot_To, @strDesc, @ItemSerial, @Gold)
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)
values(GetDate(), @CharID, @ItemRefID, @dwData, @TargetStorage, @operation, @slot_From, @slot_To, @ItemSerial, @Gold)
end
-- ?? 酒?袍 ????!
-- #define LOG_ITEMEVENT_BUY_CASHITEM (BYTE)35
if @operation = 35)
begin
insert _LogCashItem (RefItemID, CharID, Cnt, EventTime, Serial64)
values(@ItemRefID, @CharID, @dwData, GetDate(), @ItemSerial)
end