عندي max plus +12 و مفبش حاجة في addlogitem or addlogchar و مش عرف اجب ماكن max plus
بعد +12 و لو عملت +13 و عملت teleport بينزل 12
بعد +12 و لو عملت +13 و عملت teleport بينزل 12
PHP:
USE [SRO_VT_SHARDLOG]
GO
/****** Object: StoredProcedure [dbo].[_AddLogChar] Script Date: 17/04/2017 02:52:26 ص ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER procedure [dbo].[_AddLogChar]
@CharID int,
@EventID tinyint,
@Data1 int,
@Data2 int,
@strPos varchar(64),
@Desc varchar(128)
as
if( @EventID=4 or @EventID=6 or @EventID=9 )
BEGIN
declare @len_pos int
declare @len_desc int
set @len_pos = len(@strPos)
set @len_desc = len(@Desc)
if (@len_pos > 0 and @len_desc > 0)
begin
insert _LogEventChar values(@CharID, GetDate(), @EventID, @Data1, @Data2, @strPos, @Desc)
end
else if (@len_pos > 0 and @len_desc = 0)
begin
insert _LogEventChar (CharID, EventTime, EventID, Data1, Data2, EventPos) values(@CharID, GetDate(), @EventID, @Data1, @Data2, @strPos)
end
else if (@len_pos = 0 and @len_desc > 0)
begin
insert _LogEventChar (CharID, EventTime, EventID, Data1, Data2, strDesc) values(@CharID, GetDate(), @EventID, @Data1, @Data2, @Desc)
end
else
begin
insert _LogEventChar (CharID, EventTime, EventID, Data1, Data2) values(@CharID, GetDate(), @EventID, @Data1, @Data2)
end
--DELETE TOP (3) FROM _LogEventChar WHERE EventTime < DATEADD(week, -2, GETDATE())
END
PHP:
USE [SRO_VT_SHARDLOG]
GO
/****** Object: StoredProcedure [dbo].[_AddLogItem] Script Date: 17/04/2017 02:52:39 ص ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-------------------------------------------------------------------------------------------------------------------
-- Step 2
-- ±âÁ¸ ¾ÆÀÌÅÛ ·Î±× ÀÔ·Â Stored procedure ¼öÁ¤
-- DataBase : Shard Log
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 -- #ifdef EXTEND_GOLD_TYPE »ðÀÔ
as
if( not ((@ItemRefID>3674 AND @ItemRefID<3707) OR (@ItemRefID>6246 AND @ItemRefID<7063) OR (@ItemRefID>25872 AND @ItemRefID<26063) OR @Operation=30 OR @Operation=114 ))
BEGIN
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) -- #ifdef EXTEND_GOLD_TYPE ±³Ã¼
values(GetDate(), @CharID, @ItemRefID, @dwData, @TargetStorage, @Operation, @Slot_From, @Slot_To, @EventPos, @strDesc, @ItemSerial, @Gold) -- #ifdef EXTEND_GOLD_TYPE ±³Ã¼
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) -- #ifdef EXTEND_GOLD_TYPE ±³Ã¼
values(GetDate(), @CharID, @ItemRefID, @dwData, @TargetStorage, @Operation, @Slot_From, @Slot_To, @EventPos, @ItemSerial, @Gold) -- #ifdef EXTEND_GOLD_TYPE ±³Ã¼
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) -- #ifdef EXTEND_GOLD_TYPE ±³Ã¼
values(GetDate(), @CharID, @ItemRefID, @dwData, @TargetStorage, @Operation, @Slot_From, @Slot_To, @strDesc, @ItemSerial, @Gold) -- #ifdef EXTEND_GOLD_TYPE ±³Ã¼
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) -- #ifdef EXTEND_GOLD_TYPE ±³Ã¼
values(GetDate(), @CharID, @ItemRefID, @dwData, @TargetStorage, @Operation, @Slot_From, @Slot_To, @ItemSerial, @Gold) -- #ifdef EXTEND_GOLD_TYPE ±³Ã¼
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
--DELETE TOP (2) FROM _LogCashItem WHERE EventTime < DATEADD(week, -2, GETDATE())
--DELETE TOP (2) FROM _LogEventItem WHERE EventTime < DATEADD(week, -2, GETDATE())
end