decomp DBCServer_Release and inspect/document database
This commit is contained in:
parent
4b267cbe05
commit
7834b98bf0
28222 changed files with 843300 additions and 144 deletions
|
|
@ -0,0 +1,88 @@
|
|||
CREATE PROCEDURE [dbo].[Local_CreateAuctionTable]
|
||||
@createtime datetime
|
||||
as
|
||||
set nocount on
|
||||
|
||||
declare @year varchar(50)
|
||||
declare @month varchar(50)
|
||||
|
||||
set @year = convert(varchar, datepart(yy,@createtime))
|
||||
set @month = convert(varchar, datepart(mm,@createtime))
|
||||
|
||||
if OBJECT_ID( 'Auction_Log_'+ @year+'_'+@month ) IS NULL
|
||||
begin
|
||||
declare @br varchar(2500)
|
||||
set @br='CREATE TABLE Auction_Log_'+ @year+'_'+@month+
|
||||
'(
|
||||
[log_id] [bigint] IDENTITY(1,1) NOT NULL,
|
||||
[date] [datetime] NOT NULL CONSTRAINT [DF_Auction_Log_'+ @year+'_'+ @month+'_entry_date] DEFAULT (getdate()),
|
||||
[log_type] [int] NOT NULL,
|
||||
[world_id] [int] NOT NULL,
|
||||
[auth_id] [uniqueidentifier],
|
||||
[character_id] [uniqueidentifier],
|
||||
[character_name] [nvarchar] (16) NOT NULL,
|
||||
[item_guid] [uniqueidentifier] NOT NULL,
|
||||
[item_id] [int] NOT NULL,
|
||||
[item_header] [int] NOT NULL,
|
||||
[enchant_level] [tinyint] NOT NULL,
|
||||
[item_active] [int] NOT NULL,
|
||||
[socket_count] [tinyint] NOT NULL,
|
||||
[remain_recon] [tinyint] NOT NULL,
|
||||
[durability] [int] NOT NULL,
|
||||
[item_option1] [int] NOT NULL,
|
||||
[item_option2] [int] NOT NULL,
|
||||
[item_option3] [int] NOT NULL,
|
||||
[item_option_value1] [int] NOT NULL,
|
||||
[item_option_value2] [int] NOT NULL,
|
||||
[item_option_value3] [int] NOT NULL,
|
||||
[item_socket_option1] [int] NOT NULL,
|
||||
[item_socket_option2] [int] NOT NULL,
|
||||
[item_socket_option3] [int] NOT NULL,
|
||||
[item_socket_value1] [int] NOT NULL,
|
||||
[item_socket_value2] [int] NOT NULL,
|
||||
[item_socket_value3] [int] NOT NULL,
|
||||
[item_socket_color1] [int] NOT NULL,
|
||||
[item_socket_color2] [int] NOT NULL,
|
||||
[item_socket_color3] [int] NOT NULL,
|
||||
[item_count] [int] NOT NULL,
|
||||
[start_price] [int] NOT NULL,
|
||||
[before_price] [int] NOT NULL,
|
||||
[buy_price] [int] NOT NULL,
|
||||
[guarantee_price] [int] NOT NULL,
|
||||
[commission] [int] NOT NULL,
|
||||
[auction_period] [int] NOT NULL,
|
||||
[before_money] [int] NOT NULL,
|
||||
[after_money] [int] NOT NULL,
|
||||
[change_money] [int] NOT NULL,
|
||||
[target_name] [nvarchar] (16),
|
||||
[result] [int] NOT NULL,
|
||||
|
||||
)'
|
||||
exec(@br)
|
||||
-----
|
||||
|
||||
set @br='ALTER TABLE [dbo].[Auction_Log_'+ @year+'_'+ @month+'] WITH NOCHECK ADD
|
||||
CONSTRAINT [PK_log_id_Auction_Log_'+ @year+'_'+ @month+'] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[log_id] ASC
|
||||
) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_world_id_Auction_Log_'+ @year+'_'+ @month+'] ON [dbo].[Auction_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[world_id] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_character_name_Auction_Log_'+ @year+'_'+ @month+'] ON [dbo].[Auction_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[character_name] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_date_Auction_Log_'+ @year+'_'+ @month+'] ON [dbo].[Auction_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[date] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
|
||||
end
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
CREATE PROCEDURE [dbo].[Local_CreateCashBuyTable]
|
||||
@createtime datetime
|
||||
as
|
||||
set nocount on
|
||||
|
||||
declare @year varchar(50)
|
||||
declare @month varchar(50)
|
||||
|
||||
set @year = convert(varchar, datepart(yy,@createtime))
|
||||
set @month = convert(varchar, datepart(mm,@createtime))
|
||||
|
||||
if OBJECT_ID( 'Cash_Buy_Log_'+ @year+'_'+@month ) IS NULL
|
||||
begin
|
||||
declare @br varchar(2000)
|
||||
set @br='CREATE TABLE Cash_Buy_Log_'+ @year+'_'+@month+
|
||||
'(
|
||||
[log_id] [int] IDENTITY(1,1) NOT NULL,
|
||||
[date] [datetime]NOT NULL CONSTRAINT [DF_Cash_Buy_Log_'+ @year+'_'+ @month+'_entry_date] DEFAULT (getdate()),
|
||||
[log_type] [int] NOT NULL,
|
||||
[world_id] [int] NOT NULL,
|
||||
[auth_id] [uniqueidentifier] NOT NULL,
|
||||
[bcust_id] [nvarchar](24) COLLATE Korean_Wansung_CI_AS NOT NULL,
|
||||
[character_name] [nvarchar](16) COLLATE Korean_Wansung_CI_AS NOT NULL,
|
||||
[gift_recvname] [nvarchar](16) COLLATE Korean_Wansung_CI_AS NOT NULL,
|
||||
[item_guid] [uniqueidentifier] NOT NULL,
|
||||
[item_id] [int] NOT NULL,
|
||||
[item_count] [int] NOT NULL,
|
||||
[addopt1] [int] NOT NULL,
|
||||
[addopt2] [int] NOT NULL,
|
||||
[addopt3] [int] NOT NULL
|
||||
)'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='ALTER TABLE [dbo].[Cash_Buy_Log_'+ @year+'_'+ @month+'] WITH NOCHECK ADD
|
||||
CONSTRAINT [PK_log_id_Cash_Buy_Log_'+ @year+'_'+ @month+'] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[log_id] ASC
|
||||
) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_character_name_Cash_Buy_Log_'+ @year+'_'+ @month+'] ON [dbo].[Cash_Buy_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[character_name] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_date_Cash_Buy_Log_'+ @year+'_'+ @month+'] ON [dbo].[Cash_Buy_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[date] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
end
|
||||
|
|
@ -0,0 +1,68 @@
|
|||
CREATE PROCEDURE [dbo].[Local_CreateCharacterTable]
|
||||
@createtime datetime
|
||||
as
|
||||
set nocount on
|
||||
|
||||
declare @year varchar(50)
|
||||
declare @month varchar(50)
|
||||
|
||||
set @year = convert(varchar, datepart(yy,@createtime))
|
||||
set @month = convert(varchar, datepart(mm,@createtime))
|
||||
|
||||
if OBJECT_ID( 'Character_Log_'+ @year+'_'+@month ) IS NULL
|
||||
begin
|
||||
declare @br varchar(1500)
|
||||
set @br='CREATE TABLE Character_Log_'+ @year+'_'+@month+
|
||||
'(
|
||||
[log_id] [int] IDENTITY(1,1) NOT NULL,
|
||||
[log_type] [int] NOT NULL,
|
||||
[world_id] [int] NOT NULL,
|
||||
[auth_id] [uniqueidentifier] NOT NULL,
|
||||
[channel_id] [smallint] NOT NULL,
|
||||
[bcust_id] [nvarchar] (24) NOT NULL,
|
||||
[character_id] [uniqueidentifier] NOT NULL,
|
||||
[character_name] [nvarchar] (16) NOT NULL,
|
||||
[character_class] [int] NOT NULL,
|
||||
[character_Job] [tinyint] NOT NULL,
|
||||
[character_Level] [tinyint] NOT NULL,
|
||||
[guildpoint] [int] NOT NULL,
|
||||
[character_count] [int] NOT NULL,
|
||||
[b_character_name] [nvarchar] (16) NOT NULL,
|
||||
[b_Job] [tinyint] NOT NULL,
|
||||
[b_Level] [tinyint] NOT NULL,
|
||||
[date] [datetime] NOT NULL CONSTRAINT [DF_Character_Log_'+ @year+'_'+ @month+'_entry_date] DEFAULT (getdate()),
|
||||
)'
|
||||
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='ALTER TABLE [dbo].[Character_Log_'+ @year+'_'+ @month+'] WITH NOCHECK ADD
|
||||
CONSTRAINT [PK_log_id_Character_Log_'+ @year+'_'+ @month+'] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[log_id] ASC
|
||||
) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_log_type_Character_Log_'+ @year+'_'+ @month+'] ON [dbo].[Character_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[log_type] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_world_id_Character_Log_'+ @year+'_'+ @month+'] ON [dbo].[Character_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[world_id] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_character_name_Character_Log_'+ @year+'_'+ @month+'] ON [dbo].[Character_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[character_name] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_date_Character_Log_'+ @year+'_'+ @month+'] ON [dbo].[Character_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[date] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
|
||||
end
|
||||
|
|
@ -0,0 +1,65 @@
|
|||
CREATE PROCEDURE [dbo].[Local_CreateChatTable]
|
||||
@createtime datetime
|
||||
as
|
||||
set nocount on
|
||||
|
||||
declare @year varchar(50)
|
||||
declare @month varchar(50)
|
||||
declare @day varchar(50)
|
||||
|
||||
set @year = convert(varchar, datepart(yy,@createtime))
|
||||
set @month = convert(varchar, datepart(mm,@createtime))
|
||||
set @day = convert(varchar, datepart(dd,@createtime))
|
||||
|
||||
if OBJECT_ID( 'Chat_Log_'+ @year+'_'+@month+'_'+@day ) IS NULL
|
||||
begin
|
||||
declare @br varchar(4000)
|
||||
set @br='CREATE TABLE Chat_Log_'+ @year+'_'+@month+'_'+@day+
|
||||
'(
|
||||
[log_id] [int] IDENTITY(1,1) NOT NULL,
|
||||
[log_type] [int] NOT NULL,
|
||||
[world_id] [int] NOT NULL,
|
||||
[auth_id] [uniqueidentifier] NOT NULL,
|
||||
[channel_group] [int] NOT NULL,
|
||||
[channel_num] [int] NOT NULL,
|
||||
[bcust_id] [nvarchar] (24) NOT NULL,
|
||||
[character_id] [uniqueidentifier] NOT NULL,
|
||||
[character_name] [nvarchar] (16) NOT NULL,
|
||||
[chat_target] [nvarchar] (16) NOT NULL,
|
||||
[chats] [nvarchar] (100) NOT NULL,
|
||||
[date] [datetime] NOT NULL CONSTRAINT [DF_Character_Log_'+ @year+'_'+ @month+'_'+ @day+'_entry_date] DEFAULT (getdate()),
|
||||
)'
|
||||
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='ALTER TABLE [dbo].[Chat_Log_'+ @year+'_'+ @month+'_'+@day+'] WITH NOCHECK ADD
|
||||
CONSTRAINT [PK_log_id_Chat_Log_'+ @year+'_'+ @month+'_'+@day+'] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[log_id] ASC
|
||||
) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_log_type_Chat_Log_'+ @year+'_'+ @month+'_'+@day+'] ON [dbo].[Chat_Log_'+ @year+'_'+ @month+'_'+@day+']
|
||||
(
|
||||
[log_type] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_world_id_Chat_Log_'+ @year+'_'+ @month+'_'+@day+'] ON [dbo].[Chat_Log_'+ @year+'_'+ @month+'_'+@day+']
|
||||
(
|
||||
[world_id] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_Chat_name_Chat_Log_'+ @year+'_'+ @month+'_'+@day+'] ON [dbo].[Chat_Log_'+ @year+'_'+ @month+'_'+@day+']
|
||||
(
|
||||
[character_name] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_date_Chat_Log_'+ @year+'_'+ @month+'_'+@day+'] ON [dbo].[Chat_Log_'+ @year+'_'+ @month+'_'+@day+']
|
||||
(
|
||||
[date] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
|
||||
end
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
CREATE PROCEDURE [dbo].[Local_CreateConnectionUVTable]
|
||||
@createtime datetime
|
||||
as
|
||||
set nocount on
|
||||
|
||||
declare @year varchar(50)
|
||||
declare @month varchar(50)
|
||||
|
||||
set @year = convert(varchar, datepart(yy,@createtime))
|
||||
set @month = convert(varchar, datepart(mm,@createtime))
|
||||
|
||||
if OBJECT_ID( 'Connection_Log_'+ @year+'_'+@month ) IS NULL
|
||||
begin
|
||||
declare @br varchar(1500)
|
||||
set @br='CREATE TABLE Connection_Log_'+ @year+'_'+@month+
|
||||
'(
|
||||
[log_id] [bigint] IDENTITY(1,1) NOT NULL,
|
||||
[date] [datetime] NOT NULL DEFAULT (getdate()),
|
||||
[log_type] [smallint] NOT NULL,
|
||||
[world_id] [int] NOT NULL,
|
||||
[auth_id] [uniqueidentifier] NOT NULL,
|
||||
[bcust_id] [nvarchar](24) NOT NULL,
|
||||
[continue_visit_count] [int] NOT NULL DEFAULT (0),
|
||||
[pc_bang] [tinyint] NOT NULL,
|
||||
[ip] [nvarchar](24) NOT NULL,
|
||||
) '
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='ALTER TABLE [dbo].[Connection_Log_'+ @year+'_'+ @month+'] WITH NOCHECK ADD
|
||||
CONSTRAINT [PK_log_id_Connection_Log_'+ @year+'_'+ @month+'] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[log_id] ASC
|
||||
) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_bcust_id_Connection_Log_'+ @year+'_'+ @month+'] ON [dbo].[Connection_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[bcust_id] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_logtype_tem_Log_'+ @year+'_'+ @month+'] ON [dbo].[Connection_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[log_type] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_auth_id_Connection_Log_'+ @year+'_'+ @month+'] ON [dbo].[Connection_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[auth_id] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_world_id_Connection_Log_'+ @year+'_'+ @month+'] ON [dbo].[Connection_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[world_id] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_date_Connection_Log_'+ @year+'_'+ @month+'] ON [dbo].[Connection_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[date] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
|
||||
end
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
CREATE PROCEDURE [dbo].[Local_CreateDungeonClearTable]
|
||||
@createtime datetime
|
||||
as
|
||||
set nocount on
|
||||
|
||||
declare @year varchar(50)
|
||||
declare @month varchar(50)
|
||||
|
||||
set @year = convert(varchar, datepart(yy,@createtime))
|
||||
set @month = convert(varchar, datepart(mm,@createtime))
|
||||
|
||||
if OBJECT_ID( 'DungeonClear_Log_'+ @year+'_'+@month ) IS NULL
|
||||
begin
|
||||
declare @br varchar(2000)
|
||||
set @br='CREATE TABLE DungeonClear_Log_'+ @year+'_'+@month+
|
||||
'(
|
||||
[log_id] [int] IDENTITY(1,1) NOT NULL,
|
||||
[date] [datetime] NOT NULL CONSTRAINT [DF_DungeonClear_Log_'+ @year+'_'+ @month+'_entry_date] DEFAULT (getdate()),
|
||||
[log_type] [int] NOT NULL,
|
||||
[instance_id] [uniqueidentifier] NOT NULL,
|
||||
[bcust_id] [varchar](24) COLLATE Korean_Wansung_CI_AS NOT NULL,
|
||||
[character_id] [uniqueidentifier] NOT NULL,
|
||||
[character_name] [nvarchar](16) COLLATE Korean_Wansung_CI_AS NOT NULL,
|
||||
[character_class] [int] NOT NULL,
|
||||
[character_level] [int] NOT NULL,
|
||||
[membercountclear] [tinyint] NOT NULL,
|
||||
[clearrank] [nvarchar](4) COLLATE Korean_Wansung_CI_AS NOT NULL,
|
||||
[stylishpoint] [smallint] NOT NULL,
|
||||
[hitcount] [smallint] NOT NULL,
|
||||
[chain] [smallint] NOT NULL,
|
||||
[killcount] [smallint] NOT NULL,
|
||||
[cleartime] [int] NOT NULL,
|
||||
[cardid] [int] NOT NULL,
|
||||
[cardrewardid] [int] NOT NULL,
|
||||
[cardrewardcount] [int] NOT NULL,
|
||||
[addexp] [int] NOT NULL,
|
||||
[death] [tinyint] NOT NULL,
|
||||
[rebirth] [smallint] NOT NULL,
|
||||
[replay] [tinyint] NOT NULL,
|
||||
[dungeonid] [int] NOT NULL,
|
||||
[difficulty] [int] NOT NULL,
|
||||
[playpoint] [int] NOT NULL,
|
||||
)'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='ALTER TABLE [dbo].[DungeonClear_Log_'+ @year+'_'+ @month+'] WITH NOCHECK ADD
|
||||
CONSTRAINT [PK_log_id_DungeonClear_Log_'+ @year+'_'+ @month+'] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[log_id] ASC
|
||||
) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_character_class_DungeonClear_Log_'+ @year+'_'+ @month+'] ON [dbo].[DungeonClear_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[character_class] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_entry_date_DungeonClear_Log_'+ @year+'_'+ @month+'] ON [dbo].[DungeonClear_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[date] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_logtype_tem_Log_'+ @year+'_'+ @month+'] ON [dbo].[DungeonClear_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[log_type] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
end
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
CREATE PROCEDURE [dbo].[Local_CreateDungeonTable]
|
||||
@createtime datetime
|
||||
as
|
||||
set nocount on
|
||||
|
||||
declare @year varchar(50)
|
||||
declare @month varchar(50)
|
||||
|
||||
set @year = convert(varchar, datepart(yy,@createtime))
|
||||
set @month = convert(varchar, datepart(mm,@createtime))
|
||||
|
||||
if OBJECT_ID( 'Dungeon_Log_'+ @year+'_'+@month ) IS NULL
|
||||
begin
|
||||
declare @br varchar(2000)
|
||||
set @br='CREATE TABLE Dungeon_Log_'+ @year+'_'+@month+
|
||||
'(
|
||||
[log_id] [int] IDENTITY(1,1) NOT NULL,
|
||||
[date] [datetime] NOT NULL CONSTRAINT [DF_Dungeon_Log_'+ @year+'_'+ @month+'_entry_date] DEFAULT (getdate()),
|
||||
[log_type] [int] NOT NULL,
|
||||
[instance_id] [uniqueidentifier] NOT NULL,
|
||||
[world_id] [int] NOT NULL,
|
||||
[dungeon_id] [int] NOT NULL ,
|
||||
[difficulty] [tinyint] NOT NULL,
|
||||
[membercountstart] [tinyint] NOT NULL,
|
||||
[death] [tinyint] NOT NULL ,
|
||||
[rebirth] [tinyint] NOT NULL,
|
||||
)'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='ALTER TABLE [dbo].[Dungeon_Log_'+ @year+'_'+ @month+'] WITH NOCHECK ADD
|
||||
CONSTRAINT [PK_log_id_Dungeon_Log_'+ @year+'_'+ @month+'] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[log_id] ASC
|
||||
) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_world_id_Dungeon_Log_'+ @year+'_'+ @month+'] ON [dbo].[Dungeon_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[world_id] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_DungeonID_Dungeon_Log_'+ @year+'_'+ @month+'] ON [dbo].[Dungeon_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[dungeon_id] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_logtype_Dungeon_Log_'+ @year+'_'+ @month+'] ON [dbo].[Dungeon_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[log_type] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_date_Dungeon_Log_'+ @year+'_'+ @month+'] ON [dbo].[Dungeon_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[date] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
end
|
||||
|
|
@ -0,0 +1,55 @@
|
|||
CREATE PROCEDURE [dbo].[Local_CreateEnchantItemTable]
|
||||
@createtime datetime
|
||||
as
|
||||
set nocount on
|
||||
|
||||
declare @year varchar(50)
|
||||
declare @month varchar(50)
|
||||
|
||||
set @year = convert(varchar, datepart(yy,@createtime))
|
||||
set @month = convert(varchar, datepart(mm,@createtime))
|
||||
|
||||
if OBJECT_ID( 'EnchantItem_Log_'+ @year+'_'+@month ) IS NULL
|
||||
begin
|
||||
declare @br varchar(1500)
|
||||
set @br='CREATE TABLE EnchantItem_Log_'+ @year+'_'+@month+
|
||||
'(
|
||||
[log_id] [bigint] IDENTITY(1,1) NOT NULL,
|
||||
[log_type] [smallint] NOT NULL,
|
||||
[world_id] [int] NOT NULL,
|
||||
[auth_id] [uniqueidentifier] NOT NULL,
|
||||
[bcust_id] [nvarchar](50) NOT NULL,
|
||||
[character_id] [uniqueidentifier] NOT NULL,
|
||||
[character_name] [nvarchar](50) NOT NULL,
|
||||
[item_guid] [uniqueidentifier] NOT NULL,
|
||||
[item_kind] [int] NOT NULL,
|
||||
[enchant_level] [int] NOT NULL,
|
||||
[flag] [int] NOT NULL,
|
||||
[date] [datetime] NOT NULL DEFAULT (getdate())
|
||||
)'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='ALTER TABLE [dbo].[EnchantItem_Log_'+ @year+'_'+ @month+'] WITH NOCHECK ADD
|
||||
CONSTRAINT [PK_log_id_EnchantItem_Log_'+ @year+'_'+ @month+'] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[log_id] ASC
|
||||
) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_world_id_EnchantItem_Log_'+ @year+'_'+ @month+'] ON [dbo].[EnchantItem_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[world_id] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_date_EnchantItem_Log_'+ @year+'_'+ @month+'] ON [dbo].[EnchantItem_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[date] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_character_name_EnchantItem_Log_'+ @year+'_'+ @month+'] ON [dbo].[EnchantItem_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[character_name] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
end
|
||||
|
|
@ -0,0 +1,74 @@
|
|||
CREATE PROCEDURE [dbo].[Local_CreateGMInquiryTable]
|
||||
@createtime datetime
|
||||
as
|
||||
set nocount on
|
||||
|
||||
declare @year varchar(50)
|
||||
declare @month varchar(50)
|
||||
|
||||
set @year = convert(varchar, datepart(yy,@createtime))
|
||||
set @month = convert(varchar, datepart(mm,@createtime))
|
||||
|
||||
if OBJECT_ID( 'GMInquiry_'+ @year+'_'+@month ) IS NULL
|
||||
begin
|
||||
declare @br varchar(1500)
|
||||
set @br='CREATE TABLE GMInquiry_'+ @year+'_'+@month+
|
||||
'(
|
||||
[log_id] [bigint] IDENTITY(1,1) NOT NULL,
|
||||
|
||||
[inquiry_id] [uniqueidentifier] NOT NULL,
|
||||
[auth_id] [uniqueidentifier] NOT NULL,
|
||||
[char_id] [uniqueidentifier] NOT NULL,
|
||||
[world_id] [int] NOT NULL,
|
||||
[type] [tinyint] NOT NULL,
|
||||
[character_name] [nvarchar] (50) NOT NULL,
|
||||
|
||||
[state] [tinyint] NOT NULL,
|
||||
[online] [tinyint] NOT NULL,
|
||||
|
||||
[bcust_id] [nvarchar] (20) NOT NULL,
|
||||
[gm_name] [nvarchar] (20) NOT NULL DEFAULT(0),
|
||||
[memo] [nvarchar] (255) NOT NULL,
|
||||
|
||||
[date] [datetime] NOT NULL CONSTRAINT [DF_GMInquiry_'+ @year+'_'+ @month+'_entry_date] DEFAULT (getdate()),
|
||||
)'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='ALTER TABLE [dbo].[GMInquiry_'+ @year+'_'+ @month+'] WITH NOCHECK ADD
|
||||
CONSTRAINT [PK_log_id_GMInquiry_'+ @year+'_'+ @month+'] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[log_id] ASC
|
||||
) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_inquiry_id_GMInquiry_'+ @year+'_'+ @month+'] ON [dbo].[GMInquiry_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[inquiry_id] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_auth_id_GMInquiry_'+ @year+'_'+ @month+'] ON [dbo].[GMInquiry_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[auth_id] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_character_name_GMInquiry_'+ @year+'_'+ @month+'] ON [dbo].[GMInquiry_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[character_name] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_type_GMInquiry_'+ @year+'_'+ @month+'] ON [dbo].[GMInquiry_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[type] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_date_GMInquiry_'+ @year+'_'+ @month+'] ON [dbo].[GMInquiry_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[date] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
end
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
CREATE PROCEDURE [dbo].[Local_CreateGuildTable]
|
||||
@createtime datetime
|
||||
as
|
||||
set nocount on
|
||||
|
||||
declare @year varchar(50)
|
||||
declare @month varchar(50)
|
||||
|
||||
set @year = convert(varchar, datepart(yy,@createtime))
|
||||
set @month = convert(varchar, datepart(mm,@createtime))
|
||||
|
||||
if OBJECT_ID( 'tbl_guild_Log_'+ @year+'_'+@month ) IS NULL
|
||||
begin
|
||||
declare @br varchar(2000)
|
||||
set @br='CREATE TABLE tbl_guild_Log_'+ @year+'_'+@month+
|
||||
'(
|
||||
[log_id] [bigint] IDENTITY(1,1) NOT NULL,
|
||||
[date] [datetime] NOT NULL CONSTRAINT [DF_tbl_guild_Log_'+ @year+'_'+ @month+'_entry_date] DEFAULT (getdate()),
|
||||
[log_type] [smallint] NOT NULL,
|
||||
[world_id] [int] NOT NULL,
|
||||
[guild_id] [uniqueidentifier] NOT NULL,
|
||||
|
||||
[guild_name] [nvarchar](20) NOT NULL,
|
||||
[guild_master] [nvarchar](16) NOT NULL,
|
||||
[guild_member_count] [int] NOT NULL,
|
||||
[guild_level] [int] NOT NULL,
|
||||
[guild_exp] [bigint] NOT NULL,
|
||||
[guild_skill_count] [smallint] NOT NULL,
|
||||
[guild_target] [nvarchar](16) NOT NULL,
|
||||
[auth_grade] [nvarchar](20) NOT NULL,
|
||||
[guild_point] [int] NOT NULL,
|
||||
)'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='ALTER TABLE [dbo].[tbl_guild_Log_'+ @year+'_'+ @month+'] WITH NOCHECK ADD
|
||||
CONSTRAINT [PK_log_id_tbl_guild_Log_'+ @year+'_'+ @month+'] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[log_id] ASC
|
||||
) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_date_tbl_guild_Log_'+ @year+'_'+ @month+'] ON [dbo].[tbl_guild_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[date] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
|
||||
end
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
CREATE PROCEDURE [dbo].[Local_CreateInquiryChattingTable]
|
||||
@createtime datetime
|
||||
as
|
||||
set nocount on
|
||||
|
||||
declare @year varchar(50)
|
||||
declare @month varchar(50)
|
||||
|
||||
set @year = convert(varchar, datepart(yy,@createtime))
|
||||
set @month = convert(varchar, datepart(mm,@createtime))
|
||||
|
||||
if OBJECT_ID( 'InquiryChatting_Log_'+ @year+'_'+@month ) IS NULL
|
||||
begin
|
||||
declare @br varchar(1500)
|
||||
set @br='CREATE TABLE InquiryChatting_Log_'+ @year+'_'+@month+
|
||||
'(
|
||||
[world_id] [int] NOT NULL,
|
||||
[log_id] [int] NOT NULL,
|
||||
[keyboarder] [nvarchar] (16) NOT NULL,
|
||||
[chat_number] [int] NOT NULL,
|
||||
[dialog] [nvarchar] (255) NOT NULL,
|
||||
[date] [datetime] NOT NULL CONSTRAINT [DF_InquiryChatting_Log_'+ @year+'_'+ @month+'_entry_date] DEFAULT (getdate()),
|
||||
)'
|
||||
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_log_id_InquiryChatting_Log_'+ @year+'_'+ @month+'] ON [dbo].[InquiryChatting_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[log_id] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_world_id_InquiryChatting_Log_'+ @year+'_'+ @month+'] ON [dbo].[InquiryChatting_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[world_id] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_keyboarder_InquiryChatting_Log_'+ @year+'_'+ @month+'] ON [dbo].[InquiryChatting_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[keyboarder] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_date_InquiryChatting_Log_'+ @year+'_'+ @month+'] ON [dbo].[InquiryChatting_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[date] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
|
||||
end
|
||||
|
|
@ -0,0 +1,72 @@
|
|||
CREATE PROCEDURE [dbo].[Local_CreateInquiryCompleteTable]
|
||||
@createtime datetime
|
||||
as
|
||||
set nocount on
|
||||
|
||||
declare @year varchar(50)
|
||||
declare @month varchar(50)
|
||||
|
||||
set @year = convert(varchar, datepart(yy,@createtime))
|
||||
set @month = convert(varchar, datepart(mm,@createtime))
|
||||
|
||||
if OBJECT_ID( 'InquiryComplete_Log_'+ @year+'_'+@month ) IS NULL
|
||||
begin
|
||||
declare @br varchar(1500)
|
||||
set @br='CREATE TABLE InquiryComplete_Log_'+ @year+'_'+@month+
|
||||
'(
|
||||
[log_id] [int] NOT NULL,
|
||||
[log_type] [int] NOT NULL,
|
||||
[world_id] [int] NOT NULL,
|
||||
[end_status] [tinyint] NOT NULL,
|
||||
[start_status] [tinyint] NOT NULL,
|
||||
[target_bcustno] [nvarchar] (16) NOT NULL,
|
||||
[target_character] [nvarchar] (16) NOT NULL,
|
||||
[GM] [nvarchar] (16) NOT NULL,
|
||||
[former_GM] [nvarchar] (16) NOT NULL,
|
||||
[remain_number] [tinyint] NOT NULL,
|
||||
[inquery_use] [nvarchar] (16) NOT NULL,
|
||||
[group_processing] [nvarchar] (16) NOT NULL,
|
||||
[post_time] [datetime] NOT NULL,
|
||||
[start_time] [datetime] NOT NULL,
|
||||
[end_time] [datetime] NOT NULL CONSTRAINT [DF_InquiryComplete_Log_'+ @year+'_'+ @month+'_entry_date] DEFAULT (getdate()),
|
||||
)'
|
||||
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='ALTER TABLE [dbo].[InquiryComplete_Log_'+ @year+'_'+ @month+'] WITH NOCHECK ADD
|
||||
CONSTRAINT [PK_log_id_InquiryComplete_Log_'+ @year+'_'+ @month+'] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[log_id] ASC
|
||||
) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_log_type_InquiryComplete_Log_'+ @year+'_'+ @month+'] ON [dbo].[InquiryComplete_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[log_type] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_world_id_InquiryComplete_Log_'+ @year+'_'+ @month+'] ON [dbo].[InquiryComplete_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[world_id] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_target_bcustno_InquiryComplete_Log_'+ @year+'_'+ @month+'] ON [dbo].[InquiryComplete_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[target_bcustno] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_GM_InquiryComplete_Log_'+ @year+'_'+ @month+'] ON [dbo].[InquiryComplete_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[GM] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_end_time_InquiryComplete_Log_'+ @year+'_'+ @month+'] ON [dbo].[InquiryComplete_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[end_time] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
|
||||
end
|
||||
|
|
@ -0,0 +1,75 @@
|
|||
CREATE PROCEDURE [dbo].[Local_CreateItemMailTable]
|
||||
@createtime datetime
|
||||
as
|
||||
set nocount on
|
||||
|
||||
declare @year varchar(50)
|
||||
declare @month varchar(50)
|
||||
|
||||
set @year = convert(varchar, datepart(yy,@createtime))
|
||||
set @month = convert(varchar, datepart(mm,@createtime))
|
||||
|
||||
if OBJECT_ID( 'ItemMail_Log_'+ @year+'_'+@month ) IS NULL
|
||||
begin
|
||||
declare @br varchar(2500)
|
||||
set @br='CREATE TABLE ItemMail_Log_'+ @year+'_'+@month+
|
||||
'(
|
||||
[log_id] [bigint] IDENTITY(1,1) NOT NULL,
|
||||
[date] [datetime] NOT NULL CONSTRAINT [DF_ItemMail_Log_'+ @year+'_'+ @month+'_entry_date] DEFAULT (getdate()),
|
||||
[log_type] [int] NOT NULL,
|
||||
[world_id] [int] NOT NULL,
|
||||
[auth_id] [uniqueidentifier] NOT NULL,
|
||||
[character_id] [uniqueidentifier] NOT NULL,
|
||||
[character_name] [nvarchar] (16) NOT NULL,
|
||||
[item_guid] [uniqueidentifier] NOT NULL,
|
||||
[item_ID] [int] NOT NULL,
|
||||
[item_header] [int] NOT NULL,
|
||||
[enchant_level] [int] NOT NULL,
|
||||
[item_active] [int] NOT NULL,
|
||||
[socket_count] [tinyint] NOT NULL,
|
||||
[item_recon] [tinyint] NOT NULL,
|
||||
[durability] [int] NOT NULL,
|
||||
[item_option1] [int] NOT NULL,
|
||||
[item_option2] [int] NOT NULL,
|
||||
[item_option3] [int] NOT NULL,
|
||||
[item_option_value1] [int] NOT NULL,
|
||||
[item_option_value2] [int] NOT NULL,
|
||||
[item_option_value3] [int] NOT NULL,
|
||||
[item_socket_option1] [int] NOT NULL,
|
||||
[item_socket_option2] [int] NOT NULL,
|
||||
[item_socket_option3] [int] NOT NULL,
|
||||
[item_socket_value1] [int] NOT NULL,
|
||||
[item_socket_value2] [int] NOT NULL,
|
||||
[item_socket_value3] [int] NOT NULL,
|
||||
[item_socket_color1] [int] NOT NULL,
|
||||
[item_socket_color2] [int] NOT NULL,
|
||||
[item_socket_color3] [int] NOT NULL,
|
||||
[item_count] [int] NOT NULL,
|
||||
[before_money] [int] NOT NULL,
|
||||
[after_money] [int] NOT NULL,
|
||||
[change_money] [int] NOT NULL,
|
||||
[target_name] [nvarchar] (16) NOT NULL,
|
||||
[mail_type] [int] NOT NULL,
|
||||
)'
|
||||
exec(@br)
|
||||
-----
|
||||
|
||||
set @br='ALTER TABLE [dbo].[ItemMail_Log_'+ @year+'_'+ @month+'] WITH NOCHECK ADD
|
||||
CONSTRAINT [PK_log_id_ItemMail_Log_'+ @year+'_'+ @month+'] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[log_id] ASC
|
||||
) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_world_id_ItemMail_Log_'+ @year+'_'+ @month+'] ON [dbo].[ItemMail_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[world_id] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_character_name_ItemMail_Log_'+ @year+'_'+ @month+'] ON [dbo].[ItemMail_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[character_name] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
|
||||
end
|
||||
103
decomp/schema/RustyHearts_Log/procs/Local_CreateItemTable.sql
Normal file
103
decomp/schema/RustyHearts_Log/procs/Local_CreateItemTable.sql
Normal file
|
|
@ -0,0 +1,103 @@
|
|||
CREATE PROCEDURE [dbo].[Local_CreateItemTable]
|
||||
@createtime datetime
|
||||
as
|
||||
set nocount on
|
||||
|
||||
declare @year varchar(50)
|
||||
declare @month varchar(50)
|
||||
|
||||
set @year = convert(varchar, datepart(yy,@createtime))
|
||||
set @month = convert(varchar, datepart(mm,@createtime))
|
||||
|
||||
if OBJECT_ID( 'Item_Log_'+ @year+'_'+@month ) IS NULL
|
||||
begin
|
||||
declare @br varchar(1500)
|
||||
set @br='CREATE TABLE Item_Log_'+ @year+'_'+@month+
|
||||
'(
|
||||
[log_id] [int] IDENTITY(1,1) NOT NULL,
|
||||
[date] [datetime] NOT NULL CONSTRAINT [DF_Item_Log_'+ @year+'_'+ @month+'_entry_date] DEFAULT (getdate()),
|
||||
[log_type] [int] NOT NULL,
|
||||
[world_id] [int] NOT NULL,
|
||||
[auth_id] [uniqueidentifier] NOT NULL,
|
||||
[bcust_id] [nvarchar](24) COLLATE Korean_Wansung_CI_AS NOT NULL,
|
||||
[character_id] [uniqueidentifier] NOT NULL,
|
||||
[character_name] [nvarchar](16) COLLATE Korean_Wansung_CI_AS NOT NULL,
|
||||
[item_guid] [uniqueidentifier] NOT NULL,
|
||||
[item_id] [int] NOT NULL,
|
||||
[item_header] [int] NOT NULL,
|
||||
[enchant_level] [tinyint] NOT NULL,
|
||||
[item_active] [int] NOT NULL,
|
||||
[socket_count] [tinyint] NOT NULL,
|
||||
[remain_recon] [tinyint] NOT NULL,
|
||||
[item_option1] [int] NOT NULL,
|
||||
[item_option2] [int] NOT NULL,
|
||||
[item_option3] [int] NOT NULL,
|
||||
[item_count] [int] NOT NULL,
|
||||
[target_itemid] [int] NOT NULL,
|
||||
[before_money] [int] NOT NULL,
|
||||
[after_money] [int] NOT NULL,
|
||||
[change_money] [int] NOT NULL,
|
||||
[result] [int] NOT NULL,
|
||||
[item_option_value1] [int] NOT NULL,
|
||||
[item_option_value2] [int] NOT NULL,
|
||||
[item_option_value3] [int] NOT NULL,
|
||||
)'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='ALTER TABLE [dbo].[Item_Log_'+ @year+'_'+ @month+'] WITH NOCHECK ADD
|
||||
CONSTRAINT [PK_log_id_Item_Log_'+ @year+'_'+ @month+'] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[log_id] ASC
|
||||
) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_date_Item_Log_'+ @year+'_'+ @month+'] ON [dbo].[Item_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[date] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_character_name_Item_Log_'+ @year+'_'+ @month+'] ON [dbo].[Item_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[character_name] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
/* -----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_world_id_Item_Log_'+ @year+'_'+ @month+'] ON [dbo].[Item_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[world_id] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_logtype_Item_Log_'+ @year+'_'+ @month+'] ON [dbo].[Item_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[log_type] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_bcust_id_Item_Log_'+ @year+'_'+ @month+'] ON [dbo].[Item_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[bcust_id] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_character_id_Item_Log_'+ @year+'_'+ @month+'] ON [dbo].[Item_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[character_id] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_character_name_Item_Log_'+ @year+'_'+ @month+'] ON [dbo].[Item_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[character_name] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_item_guid_Item_Log_'+ @year+'_'+ @month+'] ON [dbo].[Item_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[item_guid] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
*/
|
||||
end
|
||||
|
|
@ -0,0 +1,91 @@
|
|||
CREATE PROCEDURE [dbo].[Local_CreateItemTradeTable]
|
||||
@createtime datetime
|
||||
as
|
||||
set nocount on
|
||||
|
||||
declare @year varchar(50)
|
||||
declare @month varchar(50)
|
||||
|
||||
set @year = convert(varchar, datepart(yy,@createtime))
|
||||
set @month = convert(varchar, datepart(mm,@createtime))
|
||||
|
||||
if OBJECT_ID( 'ItemTrade_Log_'+ @year+'_'+@month ) IS NULL
|
||||
begin
|
||||
declare @br varchar(4000)
|
||||
set @br='CREATE TABLE ItemTrade_Log_'+ @year+'_'+@month+
|
||||
'(
|
||||
[log_id] [int] IDENTITY(1,1) NOT NULL,
|
||||
[date] [datetime] NOT NULL CONSTRAINT [DF_ItemTrade_Log_'+ @year+'_'+ @month+'_entry_date] DEFAULT (getdate()),
|
||||
[log_type] [int] NOT NULL,
|
||||
[world_id] [int] NOT NULL,
|
||||
[auth_id] [uniqueidentifier] NOT NULL,
|
||||
[bcust_id] [nvarchar] (24) NOT NULL,
|
||||
[character_id] [uniqueidentifier] NOT NULL,
|
||||
[character_name] [nvarchar] (16) NOT NULL,
|
||||
[other_auth_id] [uniqueidentifier] NOT NULL,
|
||||
[other_bcust_id] [nvarchar] (16) NOT NULL,
|
||||
[other_character_id] [uniqueidentifier] NOT NULL,
|
||||
[other_character_name] [nvarchar] (16) NOT NULL,
|
||||
[item_guid] [uniqueidentifier] NOT NULL,
|
||||
[item_ID] [int] NOT NULL,
|
||||
[item_header] [int] NOT NULL,
|
||||
[enchant_level] [int] NOT NULL,
|
||||
[item_active] [int] NOT NULL,
|
||||
[socket_count] [tinyint] NOT NULL,
|
||||
[item_recon] [tinyint] NOT NULL,
|
||||
[durability] [int] NOT NULL,
|
||||
[item_option1] [int] NOT NULL,
|
||||
[item_option2] [int] NOT NULL,
|
||||
[item_option3] [int] NOT NULL,
|
||||
[item_option_value1] [int] NOT NULL,
|
||||
[item_option_value2] [int] NOT NULL,
|
||||
[item_option_value3] [int] NOT NULL,
|
||||
[item_socket_option1] [int] NOT NULL,
|
||||
[item_socket_option2] [int] NOT NULL,
|
||||
[item_socket_option3] [int] NOT NULL,
|
||||
[item_socket_value1] [int] NOT NULL,
|
||||
[item_socket_value2] [int] NOT NULL,
|
||||
[item_socket_value3] [int] NOT NULL,
|
||||
[item_socket_color1] [int] NOT NULL,
|
||||
[item_socket_color2] [int] NOT NULL,
|
||||
[item_socket_color3] [int] NOT NULL,
|
||||
[before_money] [int] NOT NULL,
|
||||
[after_money] [int] NOT NULL,
|
||||
[change_money] [int] NOT NULL,
|
||||
[item_count] [int] NOT NULL,
|
||||
)'
|
||||
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='ALTER TABLE [dbo].[ItemTrade_Log_'+ @year+'_'+ @month+'] WITH NOCHECK ADD
|
||||
CONSTRAINT [PK_log_id_ItemTrade_Log_'+ @year+'_'+ @month+'] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[log_id] ASC
|
||||
) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_log_type_ItemTrade_Log_'+ @year+'_'+ @month+'] ON [dbo].[ItemTrade_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[log_type] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_world_id_ItemTrade_Log_'+ @year+'_'+ @month+'] ON [dbo].[ItemTrade_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[world_id] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_character_name_ItemTrade_Log_'+ @year+'_'+ @month+'] ON [dbo].[ItemTrade_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[character_name] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_date_ItemTrade_Log_'+ @year+'_'+ @month+'] ON [dbo].[ItemTrade_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[date] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
|
||||
end
|
||||
|
|
@ -0,0 +1,82 @@
|
|||
CREATE PROCEDURE [dbo].[Local_CreateItemsTable]
|
||||
@createtime datetime
|
||||
as
|
||||
set nocount on
|
||||
|
||||
declare @year varchar(50)
|
||||
declare @month varchar(50)
|
||||
|
||||
set @year = convert(varchar, datepart(yy,@createtime))
|
||||
set @month = convert(varchar, datepart(mm,@createtime))
|
||||
|
||||
if OBJECT_ID( 'Items_Log_'+ @year+'_'+@month ) IS NULL
|
||||
begin
|
||||
declare @br varchar(4000)
|
||||
set @br='CREATE TABLE Items_Log_'+ @year+'_'+@month+
|
||||
'(
|
||||
[log_id] [bigint] IDENTITY(1,1) NOT NULL,
|
||||
[date] [datetime] NOT NULL CONSTRAINT [DF_Items_Log_'+ @year+'_'+ @month+'_entry_date] DEFAULT (getdate()),
|
||||
[log_type] [int] NOT NULL,
|
||||
[world_id] [int] NOT NULL,
|
||||
[auth_id] [uniqueidentifier] NOT NULL,
|
||||
[character_id] [uniqueidentifier] NOT NULL,
|
||||
[character_name] [nvarchar] (16) NOT NULL,
|
||||
[item_guid] [uniqueidentifier] NOT NULL,
|
||||
[item_ID] [int] NOT NULL,
|
||||
[item_header] [int] NOT NULL,
|
||||
[enchant_level] [int] NOT NULL,
|
||||
[item_active] [int] NOT NULL,
|
||||
[socket_count] [tinyint] NOT NULL,
|
||||
[item_recon] [tinyint] NOT NULL,
|
||||
[durability] [int] NOT NULL,
|
||||
[item_option1] [int] NOT NULL,
|
||||
[item_option2] [int] NOT NULL,
|
||||
[item_option3] [int] NOT NULL,
|
||||
[item_option_value1] [int] NOT NULL,
|
||||
[item_option_value2] [int] NOT NULL,
|
||||
[item_option_value3] [int] NOT NULL,
|
||||
[item_socket_option1] [int] NOT NULL,
|
||||
[item_socket_option2] [int] NOT NULL,
|
||||
[item_socket_option3] [int] NOT NULL,
|
||||
[item_socket_value1] [int] NOT NULL,
|
||||
[item_socket_value2] [int] NOT NULL,
|
||||
[item_socket_value3] [int] NOT NULL,
|
||||
[item_socket_color1] [int] NOT NULL,
|
||||
[item_socket_color2] [int] NOT NULL,
|
||||
[item_socket_color3] [int] NOT NULL,
|
||||
[item_count] [int] NOT NULL,
|
||||
[before_money] [int] NOT NULL,
|
||||
[after_money] [int] NOT NULL,
|
||||
[change_money] [int] NOT NULL,
|
||||
[before_date] [int] NOT NULL,
|
||||
[after_date] [int] NOT NULL,
|
||||
[result] [int] NOT NULL,
|
||||
)'
|
||||
exec(@br)
|
||||
-----
|
||||
|
||||
set @br='ALTER TABLE [dbo].[Items_Log_'+ @year+'_'+ @month+'] WITH NOCHECK ADD
|
||||
CONSTRAINT [PK_log_id_Items_Log_'+ @year+'_'+ @month+'] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[log_id] ASC
|
||||
) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_world_id_Items_Log_'+ @year+'_'+ @month+'] ON [dbo].[Items_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[world_id] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_character_name_Items_Log_'+ @year+'_'+ @month+'] ON [dbo].[Items_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[character_name] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_date_Items_Log_'+ @year+'_'+ @month+'] ON [dbo].[Items_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[date] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
|
||||
end
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
CREATE PROCEDURE [dbo].[Local_CreateLearnSkillTable]
|
||||
@createtime datetime
|
||||
as
|
||||
set nocount on
|
||||
|
||||
declare @year varchar(50)
|
||||
declare @month varchar(50)
|
||||
|
||||
set @year = convert(varchar, datepart(yy,@createtime))
|
||||
set @month = convert(varchar, datepart(mm,@createtime))
|
||||
|
||||
if OBJECT_ID( 'LearnSkill_Log_'+ @year+'_'+@month ) IS NULL
|
||||
begin
|
||||
declare @br varchar(1500)
|
||||
set @br='CREATE TABLE LearnSkill_Log_'+ @year+'_'+@month+
|
||||
'(
|
||||
[log_id] [bigint] IDENTITY(1,1) NOT NULL,
|
||||
[date] [datetime] NOT NULL CONSTRAINT [DF_LearnSkill_Log_'+ @year+'_'+ @month+'_entry_date] DEFAULT (getdate()),
|
||||
[log_type] [int] NOT NULL,
|
||||
[character_id] [uniqueidentifier] NOT NULL,
|
||||
[character_name] [nvarchar](16) NOT NULL,
|
||||
[skill_table_id] [int] NOT NULL,
|
||||
[skill_level] [tinyint] NOT NULL,
|
||||
[character_Class] [int] NOT NULL,
|
||||
[character_Level] [tinyint] NOT NULL,
|
||||
[skillpoint_use] [int] NOT NULL,
|
||||
)'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='ALTER TABLE [dbo].[LearnSkill_Log_'+ @year+'_'+ @month+'] WITH NOCHECK ADD
|
||||
CONSTRAINT [PK_log_id_LearnSkill_Log_'+ @year+'_'+ @month+'] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[log_id] ASC
|
||||
) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_character_class_LearnSkill_Log_'+ @year+'_'+ @month+'] ON [dbo].[LearnSkill_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[character_Class] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_logtype_LearnSkill_Log_'+ @year+'_'+ @month+'] ON [dbo].[LearnSkill_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[log_type] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_character_level_LearnSkill_Log_'+ @year+'_'+ @month+'] ON [dbo].[LearnSkill_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[character_Level] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_date_LearnSkill_Log_'+ @year+'_'+ @month+'] ON [dbo].[LearnSkill_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[date] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
end
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
CREATE PROCEDURE [dbo].[Local_CreateLevelUpTable]
|
||||
@createtime datetime
|
||||
as
|
||||
set nocount on
|
||||
|
||||
declare @year varchar(50)
|
||||
declare @month varchar(50)
|
||||
|
||||
set @year = convert(varchar, datepart(yy,@createtime))
|
||||
set @month = convert(varchar, datepart(mm,@createtime))
|
||||
|
||||
if OBJECT_ID( 'LevelUp_Log_'+ @year+'_'+@month ) IS NULL
|
||||
begin
|
||||
declare @br varchar(1500)
|
||||
set @br='CREATE TABLE LevelUp_Log_'+ @year+'_'+@month+
|
||||
'(
|
||||
[log_id] [bigint] IDENTITY(1,1) NOT NULL,
|
||||
[log_type] [smallint] NOT NULL,
|
||||
[world_id] [int] NOT NULL,
|
||||
[auth_id] [uniqueidentifier] NOT NULL,
|
||||
[bcust_id] [nvarchar](50) NOT NULL,
|
||||
[character_id] [uniqueidentifier] NOT NULL,
|
||||
[character_name] [nvarchar](50) NOT NULL,
|
||||
[character_class] [int] NOT NULL,
|
||||
[character_level] [int] NOT NULL,
|
||||
[record_date] [datetime] NOT NULL,
|
||||
[date] [datetime] NOT NULL CONSTRAINT [DF_LevelUp_Log_'+ @year+'_'+ @month+'_entry_date] DEFAULT (getdate()),
|
||||
)'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='ALTER TABLE [dbo].[LevelUp_Log_'+ @year+'_'+ @month+'] WITH NOCHECK ADD
|
||||
CONSTRAINT [PK_log_id_LevelUp_Log_'+ @year+'_'+ @month+'] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[log_id] ASC
|
||||
) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_world_id_LevelUp_Log_'+ @year+'_'+ @month+'] ON [dbo].[LevelUp_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[world_id] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_character_class_LevelUp_Log_'+ @year+'_'+ @month+'] ON [dbo].[LevelUp_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[character_class] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_logtype_LevelUp_Log_'+ @year+'_'+ @month+'] ON [dbo].[LevelUp_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[log_type] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_character_level_LevelUp_Log_'+ @year+'_'+ @month+'] ON [dbo].[LevelUp_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[character_level] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_date_LevelUp_Log_'+ @year+'_'+ @month+'] ON [dbo].[LevelUp_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[date] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
end
|
||||
|
|
@ -0,0 +1,72 @@
|
|||
CREATE PROCEDURE [dbo].[Local_CreateLoginLogTable]
|
||||
@createtime datetime
|
||||
as
|
||||
set nocount on
|
||||
|
||||
declare @year varchar(50)
|
||||
declare @month varchar(50)
|
||||
|
||||
set @year = convert(varchar, datepart(yy,@createtime))
|
||||
set @month = convert(varchar, datepart(mm,@createtime))
|
||||
|
||||
if OBJECT_ID( 'Login_Log_'+ @year+'_'+@month ) IS NULL
|
||||
begin
|
||||
declare @br varchar(1500)
|
||||
set @br='CREATE TABLE Login_Log_'+ @year+'_'+@month+
|
||||
'(
|
||||
[log_id] [bigint] IDENTITY(1,1) NOT NULL,
|
||||
[log_type] [smallint] NOT NULL,
|
||||
[world_id] [int] NOT NULL,
|
||||
[auth_id] [uniqueidentifier] NOT NULL,
|
||||
[bcust_id] [nvarchar](24) NOT NULL,
|
||||
[character_id] [uniqueidentifier] NOT NULL,
|
||||
[character_name] [nvarchar](50) NOT NULL,
|
||||
[ChannelID] [smallint] NOT NULL,
|
||||
[IP] [char](24) NOT NULL,
|
||||
|
||||
[date] [datetime] NOT NULL DEFAULT (getdate()),
|
||||
inven_gold [int] NOT NULL ,
|
||||
storage_gold [int] NOT NULL ,
|
||||
character_level [smallint] NOT NULL ,
|
||||
character_exp [bigint] NOT NULL ,
|
||||
)'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='ALTER TABLE [dbo].[Login_Log_'+ @year+'_'+ @month+'] WITH NOCHECK ADD
|
||||
CONSTRAINT [PK_log_id_Login_Log_'+ @year+'_'+ @month+'] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[log_id] ASC
|
||||
) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_bcust_id_Login_Log_'+ @year+'_'+ @month+'] ON [dbo].[Login_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[bcust_id] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_charid_Login_Log_'+ @year+'_'+ @month+'] ON [dbo].[Login_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[character_id] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_charname_Login_Log_'+ @year+'_'+ @month+'] ON [dbo].[Login_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[character_name] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_date_Login_Log_'+ @year+'_'+ @month+'] ON [dbo].[Login_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[date] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_logtype_Login_Log_'+ @year+'_'+ @month+'] ON [dbo].[Login_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[log_type] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
|
||||
end
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
CREATE PROCEDURE [dbo].[Local_CreateLoginOutTable]
|
||||
@createtime datetime
|
||||
as
|
||||
set nocount on
|
||||
|
||||
declare @year varchar(50)
|
||||
declare @month varchar(50)
|
||||
|
||||
set @year = convert(varchar, datepart(yy,@createtime))
|
||||
set @month = convert(varchar, datepart(mm,@createtime))
|
||||
|
||||
if OBJECT_ID( 'LoginOut_Log_'+ @year+'_'+@month ) IS NULL
|
||||
begin
|
||||
declare @br varchar(2000)
|
||||
set @br='CREATE TABLE LoginOut_Log_'+ @year+'_'+@month+
|
||||
'(
|
||||
[log_id] [bigint] IDENTITY(1,1) NOT NULL,
|
||||
[date] [datetime] NOT NULL CONSTRAINT [DF_LoginOut_Log_'+ @year+'_'+ @month+'_entry_date] DEFAULT (getdate()),
|
||||
[log_type] [smallint] NOT NULL,
|
||||
[world_id] [int] NOT NULL,
|
||||
[auth_id] [uniqueidentifier] NOT NULL,
|
||||
[channel_group] [tinyint] NOT NULL,
|
||||
[channel_num] [int] NOT NULL,
|
||||
[bcust_id] [nvarchar](16) NOT NULL,
|
||||
[character_id] [uniqueidentifier] NOT NULL,
|
||||
[character_name] [nvarchar](16) NOT NULL,
|
||||
[inven_gold] [int] NOT NULL,
|
||||
[storage_gold] [int] NOT NULL,
|
||||
[character_level] [tinyint] NOT NULL,
|
||||
[character_exp] [int] NOT NULL,
|
||||
[targetmap] [int] NOT NULL,
|
||||
[playpoint] [int] NOT NULL,
|
||||
[skillpoint] [int] NOT NULL,
|
||||
[guildpoint] [int] NOT NULL,
|
||||
[coin] [int] NOT NULL,
|
||||
)'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='ALTER TABLE [dbo].[LoginOut_Log_'+ @year+'_'+ @month+'] WITH NOCHECK ADD
|
||||
CONSTRAINT [PK_log_id_LoginOut_Log_'+ @year+'_'+ @month+'] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[log_id] ASC
|
||||
) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_date_LoginOut_Log_'+ @year+'_'+ @month+'] ON [dbo].[LoginOut_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[date] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
|
||||
end
|
||||
|
|
@ -0,0 +1,71 @@
|
|||
CREATE PROCEDURE [dbo].[Local_CreateLogoutLogTable]
|
||||
@createtime datetime
|
||||
as
|
||||
set nocount on
|
||||
|
||||
declare @year varchar(50)
|
||||
declare @month varchar(50)
|
||||
|
||||
set @year = convert(varchar, datepart(yy,@createtime))
|
||||
set @month = convert(varchar, datepart(mm,@createtime))
|
||||
|
||||
if OBJECT_ID( 'Logout_Log_'+ @year+'_'+@month ) IS NULL
|
||||
begin
|
||||
declare @br varchar(1500)
|
||||
set @br='CREATE TABLE Logout_Log_'+ @year+'_'+@month+
|
||||
'(
|
||||
[log_id] [bigint] IDENTITY(1,1) NOT NULL,
|
||||
[log_type] [smallint] NOT NULL,
|
||||
[world_id] [int] NOT NULL,
|
||||
[auth_id] [uniqueidentifier] NOT NULL,
|
||||
[bcust_id] [nvarchar](50) NOT NULL,
|
||||
[character_id] [uniqueidentifier] NOT NULL,
|
||||
[character_name] [nvarchar](50) NOT NULL,
|
||||
[ChannelID] [smallint] NOT NULL,
|
||||
[IP] [char](16) NOT NULL,
|
||||
|
||||
[date] [datetime] NOT NULL DEFAULT (getdate()),
|
||||
inven_gold [int] NOT NULL ,
|
||||
storage_gold [int] NOT NULL ,
|
||||
character_level [smallint] NOT NULL ,
|
||||
character_exp [bigint] NOT NULL ,
|
||||
)'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='ALTER TABLE [dbo].[Logout_Log_'+ @year+'_'+ @month+'] WITH NOCHECK ADD
|
||||
CONSTRAINT [PK_log_id_Logout_Log_'+ @year+'_'+ @month+'] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[log_id] ASC
|
||||
) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_bcust_id_Logout_Log_'+ @year+'_'+ @month+'] ON [dbo].[Logout_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[bcust_id] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_charid_Logout_Log_'+ @year+'_'+ @month+'] ON [dbo].[Logout_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[character_id] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_charname_Logout_Log_'+ @year+'_'+ @month+'] ON [dbo].[Logout_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[character_name] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_logtype_Logout_Log_'+ @year+'_'+ @month+'] ON [dbo].[Logout_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[log_type] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_date_Logout_Log_'+ @year+'_'+ @month+'] ON [dbo].[Logout_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[date] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
end
|
||||
49
decomp/schema/RustyHearts_Log/procs/Local_CreateMCUTable.sql
Normal file
49
decomp/schema/RustyHearts_Log/procs/Local_CreateMCUTable.sql
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
CREATE PROCEDURE [dbo].[Local_CreateMCUTable]
|
||||
@createtime datetime
|
||||
as
|
||||
set nocount on
|
||||
|
||||
declare @year varchar(50)
|
||||
declare @month varchar(50)
|
||||
|
||||
set @year = convert(varchar, datepart(yy,@createtime))
|
||||
set @month = convert(varchar, datepart(mm,@createtime))
|
||||
|
||||
if OBJECT_ID( 'MCU_Log_'+ @year+'_'+@month ) IS NULL
|
||||
begin
|
||||
declare @br varchar(1500)
|
||||
set @br='CREATE TABLE MCU_Log_'+ @year+'_'+@month+
|
||||
'(
|
||||
[log_id] [bigint] IDENTITY(1,1) NOT NULL,
|
||||
[log_type] [smallint] NOT NULL,
|
||||
[world_id] [int] NOT NULL,
|
||||
[user_num] [int] NOT NULL DEFAULT (0),
|
||||
[date] [datetime] NOT NULL DEFAULT (getdate()),
|
||||
)'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='ALTER TABLE [dbo].[MCU_Log_'+ @year+'_'+ @month+'] WITH NOCHECK ADD
|
||||
CONSTRAINT [PK_log_id_MCU_Log_'+ @year+'_'+ @month+'] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[log_id] ASC
|
||||
) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_world_id_MCU_Log_'+ @year+'_'+ @month+'] ON [dbo].[MCU_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[world_id] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_date_MCU_Log_'+ @year+'_'+ @month+'] ON [dbo].[MCU_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[date] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_logtype_tem_Log_'+ @year+'_'+ @month+'] ON [dbo].[MCU_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[log_type] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
end
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
CREATE PROCEDURE [dbo].[Local_CreateMailTable]
|
||||
@createtime datetime
|
||||
as
|
||||
set nocount on
|
||||
|
||||
declare @year varchar(50)
|
||||
declare @month varchar(50)
|
||||
|
||||
set @year = convert(varchar, datepart(yy,@createtime))
|
||||
set @month = convert(varchar, datepart(mm,@createtime))
|
||||
|
||||
if OBJECT_ID( 'Mail_Log_'+ @year+'_'+@month ) IS NULL
|
||||
begin
|
||||
declare @br varchar(2000)
|
||||
set @br='CREATE TABLE Mail_Log_'+ @year+'_'+@month+
|
||||
'(
|
||||
[log_id] [bigint] IDENTITY(1,1) NOT NULL,
|
||||
[date] [datetime] NOT NULL CONSTRAINT [DF_Mail_Log_'+ @year+'_'+ @month+'_entry_date] DEFAULT (getdate()),
|
||||
[log_type] [smallint] NOT NULL,
|
||||
[world_id] [int] NOT NULL,
|
||||
[auth_id] [uniqueidentifier] NULL,
|
||||
[channel_group] [tinyint] NULL,
|
||||
[channel_num] [int] NULL,
|
||||
[mail_id] [uniqueidentifier] NULL,
|
||||
[bcust_id] [nvarchar](16) NULL,
|
||||
[character_id] [uniqueidentifier] NULL,
|
||||
[character_name] [nvarchar](16) NULL,
|
||||
[receiver_name] [nvarchar](16) NULL,
|
||||
[msg] [nvarchar](50) NULL,
|
||||
[return_day] [int] NULL,
|
||||
[req_gold] [int] NULL,
|
||||
|
||||
)'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='ALTER TABLE [dbo].[Mail_Log_'+ @year+'_'+ @month+'] WITH NOCHECK ADD
|
||||
CONSTRAINT [PK_log_id_Mail_Log_'+ @year+'_'+ @month+'] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[log_id] ASC
|
||||
) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_date_Mail_Log_'+ @year+'_'+ @month+'] ON [dbo].[Mail_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[date] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
|
||||
end
|
||||
106
decomp/schema/RustyHearts_Log/procs/Local_CreateMoneyTable.sql
Normal file
106
decomp/schema/RustyHearts_Log/procs/Local_CreateMoneyTable.sql
Normal file
|
|
@ -0,0 +1,106 @@
|
|||
CREATE PROCEDURE [dbo].[Local_CreateMoneyTable]
|
||||
@createtime datetime
|
||||
as
|
||||
set nocount on
|
||||
|
||||
declare @year varchar(50)
|
||||
declare @month varchar(50)
|
||||
|
||||
set @year = convert(varchar, datepart(yy,@createtime))
|
||||
set @month = convert(varchar, datepart(mm,@createtime))
|
||||
|
||||
if OBJECT_ID( 'Money_Log_'+ @year+'_'+@month ) IS NULL
|
||||
begin
|
||||
declare @br varchar(1500)
|
||||
set @br='CREATE TABLE Money_Log_'+ @year+'_'+@month+
|
||||
'(
|
||||
[log_id] [bigint] IDENTITY(1,1) NOT NULL,
|
||||
[log_type] [smallint] NOT NULL,
|
||||
[world_id] [int] NOT NULL,
|
||||
[auth_id] [uniqueidentifier] NOT NULL,
|
||||
[bcust_id] [nvarchar](50) NOT NULL,
|
||||
[character_id] [uniqueidentifier] NOT NULL,
|
||||
[character_name] [nvarchar](50) NOT NULL,
|
||||
|
||||
[other_auth_id] [uniqueidentifier] NULL,
|
||||
[other_bcust_id] [nvarchar](50) NULL,
|
||||
[other_character_id] [uniqueidentifier] NULL,
|
||||
[other_character_name] [nvarchar](50) NULL,
|
||||
|
||||
[before_money] [int] NOT NULL,
|
||||
[after_money] [int] NOT NULL,
|
||||
[change_money] [int] NOT NULL,
|
||||
|
||||
[entry_date] [datetime] NOT NULL CONSTRAINT [DF_Money_Log_'+ @year+'_'+ @month+'_entry_date] DEFAULT (getdate()),
|
||||
)'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='ALTER TABLE [dbo].[Money_Log_'+ @year+'_'+ @month+'] WITH NOCHECK ADD
|
||||
CONSTRAINT [PK_log_id_Money_Log_'+ @year+'_'+ @month+'] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[log_id] ASC
|
||||
) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_world_id_Money_Log_'+ @year+'_'+ @month+'] ON [dbo].[Money_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[world_id] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_entry_date_Money_Log_'+ @year+'_'+ @month+'] ON [dbo].[Money_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[entry_date] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_logtype_Money_Log_'+ @year+'_'+ @month+'] ON [dbo].[Money_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[log_type] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_bcust_id_Money_Log_'+ @year+'_'+ @month+'] ON [dbo].[Money_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[bcust_id] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_character_id_Money_Log_'+ @year+'_'+ @month+'] ON [dbo].[Money_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[character_id] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_character_name_Money_Log_'+ @year+'_'+ @month+'] ON [dbo].[Money_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[character_name] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_other_auth_id_Money_Log_'+ @year+'_'+ @month+'] ON [dbo].[Money_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[other_auth_id] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_other_bcust_id_Money_Log_'+ @year+'_'+ @month+'] ON [dbo].[Money_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[other_bcust_id] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_other_character_id_Money_Log_'+ @year+'_'+ @month+'] ON [dbo].[Money_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[other_character_id] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_other_character_name_Money_Log_'+ @year+'_'+ @month+'] ON [dbo].[Money_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[other_character_name] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
|
||||
|
||||
end
|
||||
|
|
@ -0,0 +1,54 @@
|
|||
CREATE PROCEDURE [dbo].[Local_CreateMonitorCommandTable]
|
||||
@createtime datetime
|
||||
as
|
||||
set nocount on
|
||||
|
||||
declare @year varchar(50)
|
||||
declare @month varchar(50)
|
||||
|
||||
set @year = convert(varchar, datepart(yy,@createtime))
|
||||
set @month = convert(varchar, datepart(mm,@createtime))
|
||||
|
||||
if OBJECT_ID( 'MonitorCommand_Log_'+ @year+'_'+@month ) IS NULL
|
||||
begin
|
||||
declare @br varchar(1500)
|
||||
set @br='CREATE TABLE MonitorCommand_Log_'+ @year+'_'+@month+
|
||||
'(
|
||||
[log_id] [int] IDENTITY(1,1) NOT NULL,
|
||||
[log_type] [int] NOT NULL,
|
||||
[world_ID] [int] NOT NULL,
|
||||
[channel_ID] [int] NOT NULL,
|
||||
[executer_ID] [nvarchar] (16) NOT NULL,
|
||||
[command] [int] NOT NULL,
|
||||
[target] [int] NOT NULL,
|
||||
[date] [datetime] NOT NULL CONSTRAINT [DF_MonitorCommand_Log_'+ @year+'_'+ @month+'_entry_date] DEFAULT (getdate()),
|
||||
)'
|
||||
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='ALTER TABLE [dbo].[MonitorCommand_Log_'+ @year+'_'+ @month+'] WITH NOCHECK ADD
|
||||
CONSTRAINT [PK_log_id_MonitorCommand_Log_'+ @year+'_'+ @month+'] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[log_id] ASC
|
||||
) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_log_type_MonitorCommand_Log_'+ @year+'_'+ @month+'] ON [dbo].[MonitorCommand_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[log_type] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_world_id_MonitorCommand_Log_'+ @year+'_'+ @month+'] ON [dbo].[MonitorCommand_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[world_id] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_date_MonitorCommand_Log_'+ @year+'_'+ @month+'] ON [dbo].[MonitorCommand_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[date] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
|
||||
end
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
CREATE PROCEDURE [dbo].[Local_CreateMonitorNoticeTable]
|
||||
@createtime datetime
|
||||
as
|
||||
set nocount on
|
||||
|
||||
declare @year varchar(50)
|
||||
declare @month varchar(50)
|
||||
|
||||
set @year = convert(varchar, datepart(yy,@createtime))
|
||||
set @month = convert(varchar, datepart(mm,@createtime))
|
||||
|
||||
if OBJECT_ID( 'MonitorNotice_Log_'+ @year+'_'+@month ) IS NULL
|
||||
begin
|
||||
declare @br varchar(1500)
|
||||
set @br='CREATE TABLE MonitorNotice_Log_'+ @year+'_'+@month+
|
||||
'(
|
||||
[log_id] [int] IDENTITY(1,1) NOT NULL,
|
||||
[log_type] [int] NOT NULL,
|
||||
[world_id] [int] NOT NULL,
|
||||
[target] [tinyint] NOT NULL,
|
||||
[notice_type] [tinyint] NOT NULL,
|
||||
[notice_cycle] [tinyint] NOT NULL,
|
||||
[notice] [nvarchar] (255) NOT NULL,
|
||||
[gm_ID] [nvarchar] (16) NOT NULL,
|
||||
[date] [datetime] NOT NULL CONSTRAINT [DF_MonitorNotice_Log_'+ @year+'_'+ @month+'_entry_date] DEFAULT (getdate()),
|
||||
)'
|
||||
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='ALTER TABLE [dbo].[MonitorNotice_Log_'+ @year+'_'+ @month+'] WITH NOCHECK ADD
|
||||
CONSTRAINT [PK_log_id_MonitorNotice_Log_'+ @year+'_'+ @month+'] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[log_id] ASC
|
||||
) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_log_type_MonitorNotice_Log_'+ @year+'_'+ @month+'] ON [dbo].[MonitorNotice_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[log_type] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_world_id_MonitorNotice_Log_'+ @year+'_'+ @month+'] ON [dbo].[MonitorNotice_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[world_id] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_gm_ID_MonitorNotice_Log_'+ @year+'_'+ @month+'] ON [dbo].[MonitorNotice_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[gm_ID] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_date_MonitorNotice_Log_'+ @year+'_'+ @month+'] ON [dbo].[MonitorNotice_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[date] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
|
||||
end
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
CREATE PROCEDURE [dbo].[Local_CreateMonitorUserTable]
|
||||
@createtime datetime
|
||||
as
|
||||
set nocount on
|
||||
|
||||
declare @year varchar(50)
|
||||
declare @month varchar(50)
|
||||
|
||||
set @year = convert(varchar, datepart(yy,@createtime))
|
||||
set @month = convert(varchar, datepart(mm,@createtime))
|
||||
|
||||
if OBJECT_ID( 'MonitorUser_Log_'+ @year+'_'+@month ) IS NULL
|
||||
begin
|
||||
declare @br varchar(1500)
|
||||
set @br='CREATE TABLE MonitorUser_Log_'+ @year+'_'+@month+
|
||||
'(
|
||||
|
||||
|
||||
[log_id] [int] IDENTITY(1,1) NOT NULL,
|
||||
[log_type] [int] NOT NULL,
|
||||
[world_id] [int] NOT NULL,
|
||||
[CU_gate] [int] NOT NULL,
|
||||
[CU_lobby] [int] NOT NULL,
|
||||
[CU_PVP] [int] NOT NULL,
|
||||
[CU_dungeon] [int] NOT NULL,
|
||||
[CU_total] [int] NOT NULL,
|
||||
[date] [datetime] NOT NULL CONSTRAINT [DF_MonitorUser_Log_'+ @year+'_'+ @month+'_entry_date] DEFAULT (getdate()),
|
||||
)'
|
||||
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='ALTER TABLE [dbo].[MonitorUser_Log_'+ @year+'_'+ @month+'] WITH NOCHECK ADD
|
||||
CONSTRAINT [PK_log_id_MonitorUser_Log_'+ @year+'_'+ @month+'] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[log_id] ASC
|
||||
) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_log_type_MonitorUser_Log_'+ @year+'_'+ @month+'] ON [dbo].[MonitorUser_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[log_type] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_world_id_MonitorUser_Log_'+ @year+'_'+ @month+'] ON [dbo].[MonitorUser_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[world_id] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
|
||||
end
|
||||
65
decomp/schema/RustyHearts_Log/procs/Local_CreatePTTable.sql
Normal file
65
decomp/schema/RustyHearts_Log/procs/Local_CreatePTTable.sql
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
CREATE PROCEDURE [dbo].[Local_CreatePTTable]
|
||||
@createtime datetime
|
||||
as
|
||||
set nocount on
|
||||
|
||||
declare @year varchar(50)
|
||||
declare @month varchar(50)
|
||||
|
||||
set @year = convert(varchar, datepart(yy,@createtime))
|
||||
set @month = convert(varchar, datepart(mm,@createtime))
|
||||
|
||||
if OBJECT_ID( 'PT_Log_'+ @year+'_'+@month ) IS NULL
|
||||
begin
|
||||
declare @br varchar(1500)
|
||||
set @br='CREATE TABLE PT_Log_'+ @year+'_'+@month+
|
||||
'(
|
||||
[log_id] [bigint] IDENTITY(1,1) NOT NULL,
|
||||
[log_type] [smallint] NOT NULL,
|
||||
[world_id] [int] NOT NULL,
|
||||
[auth_id] [uniqueidentifier] NOT NULL,
|
||||
[bcust_id] [nvarchar](50) NOT NULL,
|
||||
[ChannelID] [smallint] NOT NULL,
|
||||
[character_id] [uniqueidentifier] NOT NULL,
|
||||
[character_name] [nvarchar](50) NOT NULL,
|
||||
[character_class] [int] NOT NULL,
|
||||
[character_level] [int] NOT NULL,
|
||||
[p_start_date] [datetime] NOT NULL,
|
||||
[p_end_date] [datetime] NOT NULL,
|
||||
[date] [datetime] NOT NULL CONSTRAINT [DF_PT_Log_'+ @year+'_'+ @month+'_entry_date] DEFAULT (getdate()),
|
||||
)'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='ALTER TABLE [dbo].[PT_Log_'+ @year+'_'+ @month+'] WITH NOCHECK ADD
|
||||
CONSTRAINT [PK_log_id_PT_Log_'+ @year+'_'+ @month+'] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[log_id] ASC
|
||||
) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_world_id_PT_Log_'+ @year+'_'+ @month+'] ON [dbo].[PT_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[world_id] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_character_class_PT_Log_'+ @year+'_'+ @month+'] ON [dbo].[PT_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[character_class] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_entry_date_PT_Log_'+ @year+'_'+ @month+'] ON [dbo].[PT_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[date] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_logtype_PT_Log_'+ @year+'_'+ @month+'] ON [dbo].[PT_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[log_type] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
|
||||
end
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
CREATE PROCEDURE [dbo].[Local_CreatePacketOverloadLogTable]
|
||||
@createtime datetime
|
||||
as
|
||||
set nocount on
|
||||
|
||||
declare @year varchar(50)
|
||||
declare @month varchar(50)
|
||||
|
||||
set @year = convert(varchar, datepart(yy,@createtime))
|
||||
set @month = convert(varchar, datepart(mm,@createtime))
|
||||
|
||||
if OBJECT_ID( 'PacketOverload_Log_'+ @year+'_'+@month ) IS NULL
|
||||
begin
|
||||
declare @br varchar(1500)
|
||||
set @br='CREATE TABLE PacketOverload_Log_'+ @year+'_'+@month+
|
||||
'(
|
||||
[log_id] [bigint] IDENTITY(1,1) NOT NULL,
|
||||
[func_name] [char](100) NOT NULL,
|
||||
[time] [int] NOT NULL DEFAULT (0),
|
||||
[date] [datetime] NOT NULL DEFAULT (getdate()),
|
||||
)'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='ALTER TABLE [dbo].[PacketOverload_Log_'+ @year+'_'+ @month+'] WITH NOCHECK ADD
|
||||
CONSTRAINT [PK_log_id_PacketOverload_Log_'+ @year+'_'+ @month+'] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[log_id] ASC
|
||||
) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_date_PacketOverload_Log_'+ @year+'_'+ @month+'] ON [dbo].[PacketOverload_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[date] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
end
|
||||
|
|
@ -0,0 +1,99 @@
|
|||
CREATE PROCEDURE [dbo].[Local_CreatePvpBattleTable]
|
||||
@createtime datetime
|
||||
as
|
||||
set nocount on
|
||||
|
||||
declare @year varchar(50)
|
||||
declare @month varchar(50)
|
||||
|
||||
set @year = convert(varchar, datepart(yy,@createtime))
|
||||
set @month = convert(varchar, datepart(mm,@createtime))
|
||||
|
||||
if OBJECT_ID( 'Pvp_Battle_Log_'+ @year+'_'+@month ) IS NULL
|
||||
begin
|
||||
declare @br varchar(1500)
|
||||
set @br='CREATE TABLE Pvp_Battle_Log_'+ @year+'_'+@month+
|
||||
'(
|
||||
[log_id] [bigint] IDENTITY(1,1) NOT NULL,
|
||||
[log_type] [smallint] NOT NULL,
|
||||
|
||||
[bcust_id] [nvarchar] (24) NOT NULL,
|
||||
[character_id] [uniqueidentifier] NOT NULL,
|
||||
[character_name] [nvarchar] (16) NOT NULL,
|
||||
[character_class] [int] NOT NULL,
|
||||
[character_level] [int] NOT NULL,
|
||||
|
||||
[channel_type] [int] NOT NULL,
|
||||
|
||||
[room_id] [uniqueidentifier] NOT NULL,
|
||||
[room_world] [int] NOT NULL,
|
||||
[room_type] [int] NOT NULL,
|
||||
|
||||
[red_leader_id] [uniqueidentifier],
|
||||
[red_leader_name] [nvarchar] (16),
|
||||
[red_name1] [nvarchar] (16),
|
||||
[red_name2] [nvarchar] (16),
|
||||
[red_name3] [nvarchar] (16),
|
||||
[red_name4] [nvarchar] (16),
|
||||
[red_kill_count] [smallint],
|
||||
[red_total_damage] [int],
|
||||
|
||||
[blue_leader_id] [uniqueidentifier],
|
||||
[blue_leader_name] [nvarchar] (16),
|
||||
[blue_name1] [nvarchar] (16),
|
||||
[blue_name2] [nvarchar] (16),
|
||||
[blue_name3] [nvarchar] (16),
|
||||
[blue_name4] [nvarchar] (16),
|
||||
[blue_kill_count] [smallint],
|
||||
[blue_total_damage] [int],
|
||||
|
||||
[user_start_count] [smallint] NOT NULL,
|
||||
[user_end_count] [smallint] NOT NULL,
|
||||
|
||||
[win_character_name] [nvarchar] (16) NOT NULL,
|
||||
[win_team] [smallint] NOT NULL,
|
||||
|
||||
[clear_time] [int] NOT NULL,
|
||||
|
||||
[date] [datetime] NOT NULL CONSTRAINT [DF_Pvp_Battle_Log_'+ @year+'_'+ @month+'_entry_date] DEFAULT (getdate()),
|
||||
)'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='ALTER TABLE [dbo].[Pvp_Battle_Log_'+ @year+'_'+ @month+'] WITH NOCHECK ADD
|
||||
CONSTRAINT [PK_log_id_Pvp_Battle_Log_'+ @year+'_'+ @month+'] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[log_id] ASC
|
||||
) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_channel_type_Pvp_Battle_Log_'+ @year+'_'+ @month+'] ON [dbo].[Pvp_Battle_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[channel_type] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_room_world_Pvp_Battle_Log_'+ @year+'_'+ @month+'] ON [dbo].[Pvp_Battle_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[room_world] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_room_id_Pvp_Battle_Log_'+ @year+'_'+ @month+'] ON [dbo].[Pvp_Battle_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[room_id] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_room_type_Pvp_Battle_Log_'+ @year+'_'+ @month+'] ON [dbo].[Pvp_Battle_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[room_type] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_date_Pvp_Battle_Log_'+ @year+'_'+ @month+'] ON [dbo].[Pvp_Battle_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[date] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
|
||||
end
|
||||
|
|
@ -0,0 +1,118 @@
|
|||
CREATE PROCEDURE [dbo].[Local_CreatePvpDeathTable]
|
||||
@createtime datetime
|
||||
as
|
||||
set nocount on
|
||||
|
||||
declare @year varchar(50)
|
||||
declare @month varchar(50)
|
||||
|
||||
set @year = convert(varchar, datepart(yy,@createtime))
|
||||
set @month = convert(varchar, datepart(mm,@createtime))
|
||||
|
||||
if OBJECT_ID( 'Pvp_Death_Log_'+ @year+'_'+@month ) IS NULL
|
||||
begin
|
||||
declare @br varchar(1500)
|
||||
set @br='CREATE TABLE Pvp_Death_Log_'+ @year+'_'+@month+
|
||||
'(
|
||||
[log_id] [bigint] IDENTITY(1,1) NOT NULL,
|
||||
[log_type] [smallint] NOT NULL,
|
||||
|
||||
[room_id] [uniqueidentifier] NOT NULL,
|
||||
|
||||
[character_id] [uniqueidentifier] NOT NULL,
|
||||
[character_name] [nvarchar] (16) NOT NULL,
|
||||
[character_class] [int] NOT NULL,
|
||||
[character_job] [tinyint] NOT NULL,
|
||||
[character_level] [int] NOT NULL,
|
||||
|
||||
|
||||
[kill_id] [uniqueidentifier] NOT NULL,
|
||||
[kill_name] [nvarchar] (16) NOT NULL,
|
||||
[kill_class] [int] NOT NULL,
|
||||
[kill_job] [tinyint] NOT NULL,
|
||||
[kill_level] [int] NOT NULL,
|
||||
|
||||
[date] [datetime] NOT NULL CONSTRAINT [DF_Pvp_Death_Log_'+ @year+'_'+ @month+'_entry_date] DEFAULT (getdate()),
|
||||
)'
|
||||
exec(@br)
|
||||
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_log_type_Pvp_Death_Log_'+ @year+'_'+ @month+'] ON [dbo].[Pvp_Death_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[log_type] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_room_id_Pvp_Death_Log_'+ @year+'_'+ @month+'] ON [dbo].[Pvp_Death_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[room_id] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_character_id_Pvp_Death_Log_'+ @year+'_'+ @month+'] ON [dbo].[Pvp_Death_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[character_id] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_character_name_Pvp_Death_Log_'+ @year+'_'+ @month+'] ON [dbo].[Pvp_Death_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[character_name] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_character_class_Pvp_Death_Log_'+ @year+'_'+ @month+'] ON [dbo].[Pvp_Death_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[character_class] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_character_job_Pvp_Death_Log_'+ @year+'_'+ @month+'] ON [dbo].[Pvp_Death_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[character_job] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_log_character_level_Death_Log_'+ @year+'_'+ @month+'] ON [dbo].[Pvp_Death_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[character_level] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_kill_id_Pvp_Death_Log_'+ @year+'_'+ @month+'] ON [dbo].[Pvp_Death_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[kill_id] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_kill_name_Pvp_Death_Log_'+ @year+'_'+ @month+'] ON [dbo].[Pvp_Death_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[kill_name] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_kill_class_Pvp_Death_Log_'+ @year+'_'+ @month+'] ON [dbo].[Pvp_Death_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[kill_class] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_kill_job_Pvp_Death_Log_'+ @year+'_'+ @month+'] ON [dbo].[Pvp_Death_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[kill_job] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_kill_level_Pvp_Death_Log_'+ @year+'_'+ @month+'] ON [dbo].[Pvp_Death_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[kill_level] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_date_Pvp_Death_Log_'+ @year+'_'+ @month+'] ON [dbo].[Pvp_Death_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[date] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
|
||||
|
||||
end
|
||||
|
|
@ -0,0 +1,82 @@
|
|||
CREATE PROCEDURE [dbo].[Local_CreatePvpResultTable]
|
||||
@createtime datetime
|
||||
as
|
||||
set nocount on
|
||||
|
||||
declare @year varchar(50)
|
||||
declare @month varchar(50)
|
||||
|
||||
set @year = convert(varchar, datepart(yy,@createtime))
|
||||
set @month = convert(varchar, datepart(mm,@createtime))
|
||||
|
||||
if OBJECT_ID( 'Pvp_Result_Log_'+ @year+'_'+@month ) IS NULL
|
||||
begin
|
||||
declare @br varchar(1500)
|
||||
set @br='CREATE TABLE Pvp_Result_Log_'+ @year+'_'+@month+
|
||||
'(
|
||||
[log_id] [bigint] IDENTITY(1,1) NOT NULL,
|
||||
[log_type] [smallint] NOT NULL,
|
||||
[auth_id] [uniqueidentifier] NOT NULL,
|
||||
[bcust_id] [nvarchar] (24) NOT NULL,
|
||||
[character_id] [uniqueidentifier] NOT NULL,
|
||||
[character_name] [nvarchar] (16) NOT NULL,
|
||||
[character_class] [int] NOT NULL,
|
||||
[character_level] [int] NOT NULL,
|
||||
[channel_type] [int] NOT NULL,
|
||||
[room_id] [uniqueidentifier] NOT NULL,
|
||||
[room_world] [int] NOT NULL,
|
||||
[room_type] [int] NOT NULL,
|
||||
[PZoneID] [int] NOT NULL,
|
||||
[pvp_team] [smallint] NOT NULL,
|
||||
[pvp_score] [int] NOT NULL,
|
||||
[pvp_point] [int] NOT NULL,
|
||||
[pvp_grade] [int] NOT NULL,
|
||||
[pvp_totalscore] [int] NOT NULL,
|
||||
[pvp_totalpoint] [int] NOT NULL,
|
||||
[pvp_rank] [int] NOT NULL,
|
||||
[pvp_kill] [int] NOT NULL,
|
||||
[pvp_die] [int] NOT NULL,
|
||||
[pvp_damage] [int] NOT NULL,
|
||||
[pvp_cleartime] [int] NOT NULL,
|
||||
[date] [datetime] NOT NULL CONSTRAINT [DF_Pvp_Result_Log_'+ @year+'_'+ @month+'_entry_date] DEFAULT (getdate()),
|
||||
)'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='ALTER TABLE [dbo].[Pvp_Result_Log_'+ @year+'_'+ @month+'] WITH NOCHECK ADD
|
||||
CONSTRAINT [PK_log_id_Pvp_Result_Log_'+ @year+'_'+ @month+'] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[log_id] ASC
|
||||
) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_log_type_Pvp_Result_Log_'+ @year+'_'+ @month+'] ON [dbo].[Pvp_Result_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[log_type] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_bcust_id_Pvp_Result_Log_'+ @year+'_'+ @month+'] ON [dbo].[Pvp_Result_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[bcust_id] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_character_name_Pvp_Result_Log_'+ @year+'_'+ @month+'] ON [dbo].[Pvp_Result_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[character_name] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_room_world_Pvp_Result_Log_'+ @year+'_'+ @month+'] ON [dbo].[Pvp_Result_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[room_world] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_date_Pvp_Result_Log_'+ @year+'_'+ @month+'] ON [dbo].[Pvp_Result_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[date] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
|
||||
end
|
||||
|
|
@ -0,0 +1,98 @@
|
|||
CREATE PROCEDURE [dbo].[Local_CreatePvpRoomTable]
|
||||
@createtime datetime
|
||||
as
|
||||
set nocount on
|
||||
|
||||
declare @year varchar(50)
|
||||
declare @month varchar(50)
|
||||
|
||||
set @year = convert(varchar, datepart(yy,@createtime))
|
||||
set @month = convert(varchar, datepart(mm,@createtime))
|
||||
|
||||
if OBJECT_ID( 'Pvp_Room_Log_'+ @year+'_'+@month ) IS NULL
|
||||
begin
|
||||
declare @br varchar(1500)
|
||||
set @br='CREATE TABLE Pvp_Room_Log_'+ @year+'_'+@month+
|
||||
'(
|
||||
[log_id] [bigint] IDENTITY(1,1) NOT NULL,
|
||||
[log_type] [smallint] NOT NULL,
|
||||
[auth_id] [uniqueidentifier] NOT NULL,
|
||||
[character_id] [uniqueidentifier] NOT NULL,
|
||||
[character_name] [nvarchar](16) NOT NULL,
|
||||
[channel_type] [int] NOT NULL,
|
||||
[room_id] [uniqueidentifier] NOT NULL,
|
||||
[room_world] [int] NOT NULL,
|
||||
[room_number] [int] NOT NULL,
|
||||
[room_name] [nvarchar](50) NOT NULL,
|
||||
[date] [datetime] NOT NULL CONSTRAINT [DF_Pvp_Room_Log_'+ @year+'_'+ @month+'_entry_date] DEFAULT (getdate()),
|
||||
)'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='ALTER TABLE [dbo].[Pvp_Room_Log_'+ @year+'_'+ @month+'] WITH NOCHECK ADD
|
||||
CONSTRAINT [PK_log_id_Pvp_Room_Log_'+ @year+'_'+ @month+'] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[log_id] ASC
|
||||
) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_log_type_Pvp_Room_Log_'+ @year+'_'+ @month+'] ON [dbo].[Pvp_Room_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[log_type] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_room_world_Pvp_Room_Log_'+ @year+'_'+ @month+'] ON [dbo].[Pvp_Room_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[room_world] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_auth_id_Pvp_Room_Log_'+ @year+'_'+ @month+'] ON [dbo].[Pvp_Room_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[auth_id] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_Channel_type_Pvp_Room_Log_'+ @year+'_'+ @month+'] ON [dbo].[Pvp_Room_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[Channel_type] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_Room_id_Pvp_Room_Log_'+ @year+'_'+ @month+'] ON [dbo].[Pvp_Room_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[Room_id] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_Room_number_Pvp_Room_Log_'+ @year+'_'+ @month+'] ON [dbo].[Pvp_Room_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[Room_number] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_Room_name_Pvp_Room_Log_'+ @year+'_'+ @month+'] ON [dbo].[Pvp_Room_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[Room_name] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_Character_id_Pvp_Room_Log_'+ @year+'_'+ @month+'] ON [dbo].[Pvp_Room_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[Character_id] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_Character_name_Pvp_Room_Log_'+ @year+'_'+ @month+'] ON [dbo].[Pvp_Room_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[Character_name] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_date_Pvp_Room_Log_'+ @year+'_'+ @month+'] ON [dbo].[Pvp_Room_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[date] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
|
||||
end
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
CREATE PROCEDURE [dbo].[Local_CreateQuestTable]
|
||||
@createtime datetime
|
||||
as
|
||||
set nocount on
|
||||
|
||||
declare @year varchar(50)
|
||||
declare @month varchar(50)
|
||||
|
||||
set @year = convert(varchar, datepart(yy,@createtime))
|
||||
set @month = convert(varchar, datepart(mm,@createtime))
|
||||
|
||||
if OBJECT_ID( 'Quest_Log_'+ @year+'_'+@month ) IS NULL
|
||||
begin
|
||||
declare @br varchar(2000)
|
||||
set @br='CREATE TABLE Quest_Log_'+ @year+'_'+@month+
|
||||
'(
|
||||
[log_id] [bigint] IDENTITY(1,1) NOT NULL,
|
||||
[date] [datetime] NOT NULL CONSTRAINT [DF_Quest_Log_'+ @year+'_'+ @month+'_entry_date] DEFAULT (getdate()),
|
||||
[log_type] [smallint] NOT NULL,
|
||||
[world_id] [int] NOT NULL,
|
||||
[auth_id] [uniqueidentifier] NOT NULL,
|
||||
[channel_id] [smallint] NOT NULL,
|
||||
[bcust_id] [nvarchar](24) ,
|
||||
[character_id] [uniqueidentifier] NOT NULL,
|
||||
[character_name] [nvarchar](16) NOT NULL,
|
||||
[character_class] [int] NOT NULL,
|
||||
[character_job] [tinyint] NOT NULL,
|
||||
[character_level] [tinyint] NOT NULL,
|
||||
[quest_id] [int] NOT NULL,
|
||||
[quest_type] [int] NOT NULL,
|
||||
[quest_exp] [int] NOT NULL,
|
||||
)'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='ALTER TABLE [dbo].[Quest_Log_'+ @year+'_'+ @month+'] WITH NOCHECK ADD
|
||||
CONSTRAINT [PK_log_id_Quest_Log_'+ @year+'_'+ @month+'] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[log_id] ASC
|
||||
) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_character_name_Quest_Log_'+ @year+'_'+ @month+'] ON [dbo].[Quest_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[character_name] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
-----
|
||||
set @br='CREATE NONCLUSTERED INDEX [IX_date_Quest_Log_'+ @year+'_'+ @month+'] ON [dbo].[Quest_Log_'+ @year+'_'+ @month+']
|
||||
(
|
||||
[date] ASC
|
||||
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]'
|
||||
exec(@br)
|
||||
end
|
||||
21
decomp/schema/RustyHearts_Log/procs/Plan_DailyWorldSave.sql
Normal file
21
decomp/schema/RustyHearts_Log/procs/Plan_DailyWorldSave.sql
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
CREATE PROCEDURE [dbo].[Plan_DailyWorldSave]
|
||||
@world_id int,
|
||||
@gold bigint,
|
||||
@storage_gold bigint,
|
||||
@entry_date datetime
|
||||
as
|
||||
set nocount on
|
||||
|
||||
set xact_abort on
|
||||
begin tran
|
||||
|
||||
insert into Daily_World_Gold(world_id, gold, storage_gold, date)
|
||||
values(@world_id, @gold, @storage_gold, @entry_date)
|
||||
|
||||
if(@@error <> 0)
|
||||
begin
|
||||
rollback
|
||||
return
|
||||
end
|
||||
|
||||
commit
|
||||
35
decomp/schema/RustyHearts_Log/procs/Plan_MCUSave.sql
Normal file
35
decomp/schema/RustyHearts_Log/procs/Plan_MCUSave.sql
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
CREATE PROCEDURE [dbo].[Plan_MCUSave]
|
||||
@log_type smallint,
|
||||
@world_id int,
|
||||
@user_num int,
|
||||
@entry_date datetime
|
||||
as
|
||||
set nocount on
|
||||
|
||||
set xact_abort on
|
||||
begin tran
|
||||
|
||||
exec Local_CreateMCUTable @entry_date
|
||||
|
||||
declare @br nvarchar(1500)
|
||||
|
||||
declare @year nvarchar(50)
|
||||
declare @month nvarchar(50)
|
||||
set @year = convert(nvarchar, datepart(yy,@entry_date))
|
||||
set @month = convert(nvarchar, datepart(mm,@entry_date))
|
||||
|
||||
SET @br = 'insert into MCU_Log_'+@year+'_'+@month+'(log_type, world_id, user_num, date) values('
|
||||
+''''+convert(nvarchar, @log_type)+''''+','
|
||||
+''''+convert(nvarchar, @world_id)+''''+','
|
||||
+''''+convert(nvarchar, @user_num)+''''+','
|
||||
+ '''' +convert(nvarchar, @entry_date)+ '''' + ')'
|
||||
|
||||
EXEC(@br)
|
||||
|
||||
if(@@error <> 0)
|
||||
begin
|
||||
rollback
|
||||
return
|
||||
end
|
||||
|
||||
commit
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
CREATE PROCEDURE [dbo].[US_WEB_GetLastMonitorUser_Log]
|
||||
as
|
||||
set nocount on
|
||||
|
||||
DECLARE @date AS DATETIME
|
||||
DECLARE @query AS VARCHAR(MAX)
|
||||
DECLARE @tableName AS VARCHAR(100)
|
||||
|
||||
SET @date = GETDATE()
|
||||
|
||||
SET @tableName = 'MonitorUser_Log_' + CAST(YEAR(@date) AS CHAR(4)) + '_' + CAST(MONTH(@date) AS VARCHAR(2))
|
||||
|
||||
IF (EXISTS (SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'dbo' AND TABLE_NAME = @tableName))
|
||||
BEGIN
|
||||
|
||||
SET @query = 'SELECT TOP 1 CU_total as onlines FROM ' + @tableName + ' ORDER BY date DESC'
|
||||
EXEC(@query)
|
||||
|
||||
END
|
||||
65
decomp/schema/RustyHearts_Log/procs/up_LogOut.sql
Normal file
65
decomp/schema/RustyHearts_Log/procs/up_LogOut.sql
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
CREATE PROCEDURE [dbo].[up_LogOut]
|
||||
@log_type smallint,
|
||||
@world_id int,
|
||||
@auth_id [uniqueidentifier],
|
||||
@bcust_id nvarchar(50),
|
||||
@character_id [uniqueidentifier],
|
||||
@character_name nvarchar(50),
|
||||
@ChannelID int,
|
||||
@IP char(16),
|
||||
@inven_gold int,
|
||||
@storage_gold int,
|
||||
@character_level int,
|
||||
@character_exp bigint
|
||||
as
|
||||
set nocount on
|
||||
|
||||
|
||||
declare @createtime datetime
|
||||
set @createtime = getdate()
|
||||
|
||||
declare @year varchar(50)
|
||||
declare @month varchar(50)
|
||||
|
||||
set @year = convert(varchar, datepart(yy,@createtime))
|
||||
set @month = convert(varchar, datepart(mm,@createtime))
|
||||
|
||||
set xact_abort on
|
||||
begin tran
|
||||
|
||||
declare @updatesql nvarchar(500)
|
||||
|
||||
declare @char_auth_id nvarchar(50)
|
||||
declare @char_character_id nvarchar(50)
|
||||
|
||||
-- Logout_Log ??? ??
|
||||
exec Local_CreateLogoutLogTable @createtime
|
||||
|
||||
set @char_auth_id = @auth_id
|
||||
set @char_character_id = @character_id
|
||||
|
||||
|
||||
SET @updatesql ='insert into Logout_Log_'+ @year+'_'
|
||||
+@month+'(log_type, world_id, auth_id, bcust_id, character_id, character_name, ChannelID, IP, date, inven_gold, storage_gold, character_level, character_exp)
|
||||
values ('
|
||||
+ '''' +convert(nvarchar, @log_type) + '''' + ','
|
||||
+ '''' +convert(nvarchar, @world_id) + '''' + ','
|
||||
+ '''' +@char_auth_id + '''' + ','
|
||||
+ '''' +@bcust_id+ '''' + ','
|
||||
+ '''' +@char_character_id+ '''' + ','
|
||||
+ '''' +@character_name+ '''' + ','
|
||||
+ '''' +convert(nvarchar, @ChannelID)+ '''' + ','
|
||||
+ '''' +@IP+ '''' + ','
|
||||
+ '''' +convert(nvarchar, @createtime)+ '''' + ','
|
||||
+ '''' +convert(nvarchar, @inven_gold)+ '''' + ','
|
||||
+ '''' +convert(nvarchar, @storage_gold)+ '''' + ','
|
||||
+ '''' +convert(nvarchar, @character_level)+ '''' + ','
|
||||
+ '''' +convert(nvarchar, @character_exp)+ '''' + ')'
|
||||
EXEC(@updatesql)
|
||||
if(@@error <> 0)
|
||||
begin
|
||||
rollback
|
||||
return
|
||||
end
|
||||
|
||||
commit
|
||||
162
decomp/schema/RustyHearts_Log/procs/up_SetAuction.sql
Normal file
162
decomp/schema/RustyHearts_Log/procs/up_SetAuction.sql
Normal file
|
|
@ -0,0 +1,162 @@
|
|||
CREATE PROCEDURE [dbo].[up_SetAuction]
|
||||
@log_type int
|
||||
,@world_id int
|
||||
,@auth_id uniqueidentifier
|
||||
,@character_id uniqueidentifier
|
||||
,@character_name nvarchar(16)
|
||||
,@item_guid uniqueidentifier
|
||||
,@item_id int
|
||||
,@item_header int
|
||||
,@enchant_level tinyint
|
||||
,@item_active int
|
||||
,@socket_count tinyint
|
||||
,@remain_recon tinyint
|
||||
,@durability int
|
||||
,@item_option1 int
|
||||
,@item_option2 int
|
||||
,@item_option3 int
|
||||
,@item_option_value1 int
|
||||
,@item_option_value2 int
|
||||
,@item_option_value3 int
|
||||
,@item_socket_option1 int
|
||||
,@item_socket_option2 int
|
||||
,@item_socket_option3 int
|
||||
,@item_socket_value1 int
|
||||
,@item_socket_value2 int
|
||||
,@item_socket_value3 int
|
||||
,@item_socket_color1 int
|
||||
,@item_socket_color2 int
|
||||
,@item_socket_color3 int
|
||||
,@item_count int
|
||||
,@start_price int
|
||||
,@before_price int
|
||||
,@buy_price int
|
||||
,@guarantee_price int
|
||||
,@commission int
|
||||
,@auction_period int
|
||||
,@before_money int
|
||||
,@after_money int
|
||||
,@change_money int
|
||||
,@target_name nvarchar(16)
|
||||
,@result int
|
||||
|
||||
as
|
||||
set nocount on
|
||||
|
||||
declare @createtime datetime
|
||||
set @createtime = getdate()
|
||||
|
||||
declare @year varchar(50)
|
||||
declare @month varchar(50)
|
||||
|
||||
set @year = convert(varchar, datepart(yy,@createtime))
|
||||
set @month = convert(varchar, datepart(mm,@createtime))
|
||||
|
||||
set xact_abort on
|
||||
begin tran
|
||||
|
||||
declare @updatesql nvarchar(2500)
|
||||
|
||||
declare @char_auth_id nvarchar(50)
|
||||
declare @char_character_id nvarchar(50)
|
||||
declare @char_item_id nvarchar(50)
|
||||
|
||||
set @char_auth_id = @auth_id
|
||||
set @char_character_id = @character_id
|
||||
set @char_item_id = @item_guid
|
||||
|
||||
exec Local_CreateAuctionTable @createtime
|
||||
|
||||
SET @updatesql = 'insert into Auction_Log_' + @year + '_' + @month + '(log_type
|
||||
,world_id
|
||||
,auth_id
|
||||
,character_id
|
||||
,character_name
|
||||
,item_guid
|
||||
,item_id
|
||||
,item_header
|
||||
,enchant_level
|
||||
,item_active
|
||||
,socket_count
|
||||
,remain_recon
|
||||
,durability
|
||||
,item_option1
|
||||
,item_option2
|
||||
,item_option3
|
||||
,item_option_value1
|
||||
,item_option_value2
|
||||
,item_option_value3
|
||||
,item_socket_option1
|
||||
,item_socket_option2
|
||||
,item_socket_option3
|
||||
,item_socket_value1
|
||||
,item_socket_value2
|
||||
,item_socket_value3
|
||||
,item_socket_color1
|
||||
,item_socket_color2
|
||||
,item_socket_color3
|
||||
,item_count
|
||||
,start_price
|
||||
,before_price
|
||||
,buy_price
|
||||
,guarantee_price
|
||||
,commission
|
||||
,auction_period
|
||||
,before_money
|
||||
,after_money
|
||||
,change_money
|
||||
,target_name
|
||||
,result )
|
||||
VALUES ('
|
||||
+ '''' +convert(nvarchar,@log_type) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@world_id) + '''' + ','
|
||||
+ '''' +@char_auth_id + '''' + ','
|
||||
+ '''' +@char_character_id + '''' + ','
|
||||
+ '''' +@character_name + '''' + ','
|
||||
+ '''' +@char_item_id + '''' + ','
|
||||
+ '''' +convert(nvarchar,@item_id) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@item_header) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@enchant_level) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@item_active) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@socket_count) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@remain_recon) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@durability) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@item_option1) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@item_option2) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@item_option3) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@item_option_value1)+ '''' + ','
|
||||
+ '''' +convert(nvarchar,@item_option_value2)+ '''' + ','
|
||||
+ '''' +convert(nvarchar,@item_option_value3)+ '''' + ','
|
||||
+ '''' +convert(nvarchar,@item_socket_option1)+ '''' + ','
|
||||
+ '''' +convert(nvarchar,@item_socket_option2)+ '''' + ','
|
||||
+ '''' +convert(nvarchar,@item_socket_option3)+ '''' + ','
|
||||
+ '''' +convert(nvarchar,@item_socket_value1) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@item_socket_value2) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@item_socket_value3) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@item_socket_color1) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@item_socket_color2) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@item_socket_color3) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@item_count) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@start_price) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@before_price) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@buy_price) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@guarantee_price) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@commission) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@auction_period) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@before_money) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@after_money) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@change_money) + '''' + ','
|
||||
+ '''' +@target_name + '''' + ','
|
||||
+ '''' +convert(nvarchar,@result) + '''' + ')'
|
||||
|
||||
|
||||
|
||||
EXEC(@updatesql)
|
||||
|
||||
if(@@error <> 0)
|
||||
begin
|
||||
rollback
|
||||
return
|
||||
end
|
||||
|
||||
commit
|
||||
84
decomp/schema/RustyHearts_Log/procs/up_SetCashBuy.sql
Normal file
84
decomp/schema/RustyHearts_Log/procs/up_SetCashBuy.sql
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
CREATE PROCEDURE [dbo].[up_SetCashBuy]
|
||||
|
||||
@log_type int
|
||||
,@auth_id uniqueidentifier
|
||||
,@product_id uniqueidentifier
|
||||
,@productcode int
|
||||
,@productcount int
|
||||
,@bcust_id nvarchar(24)
|
||||
,@character_name nvarchar(16)
|
||||
,@gift_recvname nvarchar(16)
|
||||
,@addopt1 int
|
||||
,@addopt2 int
|
||||
,@addopt3 int
|
||||
|
||||
|
||||
as
|
||||
set nocount on
|
||||
|
||||
declare @createtime datetime
|
||||
set @createtime = getdate()
|
||||
|
||||
declare @year varchar(50)
|
||||
declare @month varchar(50)
|
||||
DECLARE @world_id VARCHAR(5)
|
||||
|
||||
set @year = convert(varchar, datepart(yy,@createtime))
|
||||
set @month = convert(varchar, datepart(mm,@createtime))
|
||||
SET @world_id = CONVERT( VARCHAR, 1 )
|
||||
|
||||
set xact_abort on
|
||||
begin tran
|
||||
|
||||
declare @char_auth_id nvarchar(50)
|
||||
declare @productid nvarchar(50)
|
||||
|
||||
declare @updatesql nvarchar(2500)
|
||||
|
||||
|
||||
-- CashBuy_Log ??? ??
|
||||
exec Local_CreateCashBuyTable @createtime
|
||||
|
||||
set @char_auth_id = @auth_id
|
||||
set @productid = @product_id
|
||||
|
||||
|
||||
SET @updatesql = 'INSERT INTO Cash_Buy_log_' + @year + '_' + @month + '( date
|
||||
,log_type
|
||||
,world_id
|
||||
,auth_id
|
||||
,bcust_id
|
||||
,character_name
|
||||
,gift_recvname
|
||||
,item_guid
|
||||
,item_id
|
||||
,item_count
|
||||
,addopt1
|
||||
,addopt2
|
||||
,addopt3
|
||||
)
|
||||
VALUES ('
|
||||
+ '''' +convert(nvarchar, @createtime) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@log_type) + '''' + ','
|
||||
+ '''' +@world_id + '''' + ','
|
||||
+ '''' +@char_auth_id + '''' + ','
|
||||
+ '''' +@bcust_id + '''' + ','
|
||||
+ '''' +@character_name + '''' + ','
|
||||
+ '''' +@gift_recvname + '''' + ','
|
||||
+ '''' +@productid + '''' + ','
|
||||
+ '''' +convert(nvarchar,@productcode) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@productcount) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@addopt1) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@addopt2) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@addopt3) + '''' + ')'
|
||||
|
||||
|
||||
EXEC(@updatesql)
|
||||
|
||||
if(@@error <> 0)
|
||||
begin
|
||||
rollback
|
||||
return
|
||||
end
|
||||
|
||||
commit
|
||||
74
decomp/schema/RustyHearts_Log/procs/up_SetCharacter.sql
Normal file
74
decomp/schema/RustyHearts_Log/procs/up_SetCharacter.sql
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
CREATE PROCEDURE [dbo].[up_SetCharacter]
|
||||
@log_type int
|
||||
,@world_id int
|
||||
,@auth_id uniqueidentifier
|
||||
,@channel_id smallint
|
||||
,@bcust_id nvarchar(24)
|
||||
,@character_id uniqueidentifier
|
||||
,@character_name nvarchar(16)
|
||||
,@character_class int
|
||||
,@character_Job int
|
||||
,@character_Level int
|
||||
,@guildpoint int
|
||||
,@character_count int
|
||||
,@b_character_name nvarchar(16)
|
||||
,@b_Job int
|
||||
,@b_Level int
|
||||
|
||||
as
|
||||
set nocount on
|
||||
|
||||
|
||||
declare @createtime datetime
|
||||
set @createtime = getdate()
|
||||
|
||||
declare @year varchar(50)
|
||||
declare @month varchar(50)
|
||||
|
||||
set @year = convert(varchar, datepart(yy,@createtime))
|
||||
set @month = convert(varchar, datepart(mm,@createtime))
|
||||
|
||||
set xact_abort on
|
||||
begin tran
|
||||
|
||||
declare @updatesql nvarchar(1500)
|
||||
|
||||
declare @char_auth_id nvarchar(50)
|
||||
declare @char_char_id nvarchar(50)
|
||||
|
||||
set @char_auth_id = @auth_id
|
||||
set @char_char_id = @character_id
|
||||
|
||||
exec Local_CreateCharacterTable @createtime
|
||||
|
||||
SET @updatesql ='insert into Character_Log_'+ @year+'_'+@month
|
||||
+'(log_type, world_id, auth_id, channel_id, bcust_id, character_id, character_name, character_class, character_Job, character_Level,
|
||||
guildpoint, character_count, b_character_name, b_Job, b_Level, date)
|
||||
values ('
|
||||
+ '''' +convert(nvarchar, @log_type) + '''' + ','
|
||||
+ '''' +convert(nvarchar, @world_id) + '''' + ','
|
||||
+ '''' +@char_auth_id + '''' + ','
|
||||
+ '''' +convert(nvarchar, @channel_id) + '''' + ','
|
||||
+ '''' +@bcust_id + '''' + ','
|
||||
+ '''' +@char_char_id + '''' + ','
|
||||
+ '''' +@character_name + '''' + ','
|
||||
+ '''' +convert(nvarchar, @character_class) + '''' + ','
|
||||
+ '''' +convert(nvarchar, @character_Job) + '''' + ','
|
||||
+ '''' +convert(nvarchar, @character_Level) + '''' + ','
|
||||
+ '''' +convert(nvarchar, @guildpoint) + '''' + ','
|
||||
+ '''' +convert(nvarchar, @character_count) + '''' + ','
|
||||
+ '''' +@b_character_name + '''' + ','
|
||||
+ '''' +convert(nvarchar, @b_Job) + '''' + ','
|
||||
+ '''' +convert(nvarchar, @b_Level) + '''' + ','
|
||||
+ '''' +convert(nvarchar, @createtime, 109)+ '''' + ')'
|
||||
|
||||
|
||||
EXEC(@updatesql)
|
||||
|
||||
if(@@error <> 0)
|
||||
begin
|
||||
rollback
|
||||
return
|
||||
end
|
||||
|
||||
commit
|
||||
76
decomp/schema/RustyHearts_Log/procs/up_SetChat.sql
Normal file
76
decomp/schema/RustyHearts_Log/procs/up_SetChat.sql
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
CREATE PROCEDURE [dbo].[up_SetChat]
|
||||
@log_type int
|
||||
,@world_id int
|
||||
,@auth_id uniqueidentifier
|
||||
,@channel_group int
|
||||
,@channel_num int
|
||||
,@bcust_id nvarchar(16)
|
||||
,@character_id uniqueidentifier
|
||||
,@character_name nvarchar(16)
|
||||
,@chat_target nvarchar(16)
|
||||
,@chats nvarchar(100)
|
||||
|
||||
|
||||
as
|
||||
set nocount on
|
||||
|
||||
|
||||
declare @createtime datetime
|
||||
set @createtime = getdate()
|
||||
|
||||
declare @year varchar(50)
|
||||
declare @month varchar(50)
|
||||
declare @day varchar(50)
|
||||
|
||||
set @year = convert(varchar, datepart(yy,@createtime))
|
||||
set @month = convert(varchar, datepart(mm,@createtime))
|
||||
set @day = convert(varchar, datepart(dd,@createtime))
|
||||
|
||||
set xact_abort on
|
||||
begin tran
|
||||
|
||||
declare @updatesql nvarchar(4000)
|
||||
|
||||
declare @char_auth_id nvarchar(50)
|
||||
declare @char_character_id nvarchar(50)
|
||||
|
||||
set @char_auth_id = @auth_id
|
||||
set @char_character_id = @character_id
|
||||
|
||||
|
||||
-- Battle_Room_Log ??? ??
|
||||
exec Local_CreateChatTable @createtime
|
||||
|
||||
SET @updatesql ='insert into Chat_Log_'+ @year+'_'+@month+'_'+@day+
|
||||
'( log_type
|
||||
,world_id
|
||||
,auth_id
|
||||
,channel_group
|
||||
,channel_num
|
||||
,bcust_id
|
||||
,character_id
|
||||
,character_name
|
||||
,chat_target
|
||||
,chats
|
||||
,date )
|
||||
values ('
|
||||
+ '''' +convert(nvarchar, @log_type) + '''' + ','
|
||||
+ '''' +convert(nvarchar, @world_id) + '''' + ','
|
||||
+ '''' +@char_auth_id + '''' + ','
|
||||
+ '''' +convert(nvarchar, @channel_group) + '''' + ','
|
||||
+ '''' +convert(nvarchar, @channel_num) + '''' + ','
|
||||
+ '''' +@bcust_id + '''' + ','
|
||||
+ '''' +@char_character_id + '''' + ','
|
||||
+ '''' +@character_name + '''' + ','
|
||||
+ '''' +@chat_target + '''' + ','
|
||||
+ '''' +@chats + '''' + ','
|
||||
+ '''' +convert(nvarchar, @createtime)+ '''' + ')'
|
||||
EXEC(@updatesql)
|
||||
|
||||
if(@@error <> 0)
|
||||
begin
|
||||
rollback
|
||||
return
|
||||
end
|
||||
|
||||
commit
|
||||
63
decomp/schema/RustyHearts_Log/procs/up_SetDungeon.sql
Normal file
63
decomp/schema/RustyHearts_Log/procs/up_SetDungeon.sql
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
CREATE PROCEDURE [dbo].[up_SetDungeon]
|
||||
|
||||
@log_type int
|
||||
,@intance_id [uniqueidentifier]
|
||||
,@world_id int
|
||||
,@dungeonid int
|
||||
,@difficulty tinyint
|
||||
,@membercountstart tinyint
|
||||
,@death tinyint
|
||||
,@rebirth tinyint
|
||||
|
||||
as
|
||||
set nocount on
|
||||
|
||||
declare @createtime datetime
|
||||
set @createtime = getdate()
|
||||
|
||||
declare @year varchar(50)
|
||||
declare @month varchar(50)
|
||||
|
||||
set @year = convert(varchar, datepart(yy,@createtime))
|
||||
set @month = convert(varchar, datepart(mm,@createtime))
|
||||
|
||||
set xact_abort on
|
||||
begin tran
|
||||
|
||||
declare @updatesql nvarchar(2500)
|
||||
|
||||
declare @char_instance_id nvarchar(50)
|
||||
|
||||
|
||||
-- Login_Log ??? ??
|
||||
exec Local_CreateDungeonTable @createtime
|
||||
|
||||
set @char_instance_id = @intance_id
|
||||
|
||||
SET @updatesql = 'INSERT INTO Dungeon_log_' + @year + '_' + @month + '( log_type
|
||||
,instance_id
|
||||
,world_id
|
||||
,dungeon_id
|
||||
,difficulty
|
||||
,membercountstart
|
||||
,death
|
||||
,rebirth)
|
||||
VALUES('
|
||||
+ '''' +convert(nvarchar, @log_type) + '''' + ','
|
||||
+ '''' +@char_instance_id + '''' + ','
|
||||
+ '''' +convert(nvarchar, @world_id) + '''' + ','
|
||||
+ '''' +convert(nvarchar, @dungeonid) + '''' + ','
|
||||
+ '''' +convert(nvarchar, @difficulty) + '''' + ','
|
||||
+ '''' +convert(nvarchar, @membercountstart) + '''' + ','
|
||||
+ '''' +convert(nvarchar, @death) + '''' + ','
|
||||
+ '''' +convert(nvarchar, @rebirth) + '''' + ')'
|
||||
|
||||
EXEC(@updatesql)
|
||||
|
||||
if(@@error <> 0)
|
||||
begin
|
||||
rollback
|
||||
return
|
||||
end
|
||||
|
||||
commit
|
||||
115
decomp/schema/RustyHearts_Log/procs/up_SetDungeonClear.sql
Normal file
115
decomp/schema/RustyHearts_Log/procs/up_SetDungeonClear.sql
Normal file
|
|
@ -0,0 +1,115 @@
|
|||
CREATE PROCEDURE [dbo].[up_SetDungeonClear]
|
||||
|
||||
@log_type int
|
||||
,@instance_id uniqueidentifier
|
||||
,@bcust_id varchar(24)
|
||||
,@character_id uniqueidentifier
|
||||
,@character_name nvarchar(16)
|
||||
,@character_class int
|
||||
,@character_level int
|
||||
,@membercountclear tinyint
|
||||
,@clearrank nvarchar(4)
|
||||
,@stylishpoint smallint
|
||||
,@hitcount smallint
|
||||
,@chain smallint
|
||||
,@killcount smallint
|
||||
,@cleartime int
|
||||
,@cardid int
|
||||
,@cardrewardid int
|
||||
,@cardrewardcount int
|
||||
,@addexp int
|
||||
,@death tinyint
|
||||
,@rebirth smallint
|
||||
,@replay tinyint
|
||||
,@dungeonid int
|
||||
,@difficulty int
|
||||
,@playpoint int
|
||||
|
||||
as
|
||||
set nocount on
|
||||
|
||||
declare @createtime datetime
|
||||
set @createtime = getdate()
|
||||
|
||||
declare @year varchar(50)
|
||||
declare @month varchar(50)
|
||||
|
||||
set @year = convert(varchar, datepart(yy,@createtime))
|
||||
set @month = convert(varchar, datepart(mm,@createtime))
|
||||
|
||||
set xact_abort on
|
||||
begin tran
|
||||
|
||||
declare @updatesql nvarchar(2500)
|
||||
|
||||
declare @char_instance_id nvarchar(50)
|
||||
declare @char_character_id nvarchar(50)
|
||||
|
||||
-- Login_Log ??? ??
|
||||
exec Local_CreateDungeonClearTable @createtime
|
||||
|
||||
set @char_instance_id = @instance_id
|
||||
set @char_character_id = @character_id
|
||||
|
||||
SET @updatesql = 'INSERT INTO DungeonClear_Log_' + @year + '_' + @month + '(
|
||||
log_type
|
||||
,instance_id
|
||||
,bcust_id
|
||||
,character_id
|
||||
,character_name
|
||||
,character_class
|
||||
,character_level
|
||||
,membercountclear
|
||||
,clearrank
|
||||
,stylishpoint
|
||||
,hitcount
|
||||
,chain
|
||||
,killcount
|
||||
,cleartime
|
||||
,cardid
|
||||
,cardrewardid
|
||||
,cardrewardcount
|
||||
,addexp
|
||||
,death
|
||||
,rebirth
|
||||
,replay
|
||||
,dungeonid
|
||||
,difficulty
|
||||
,playpoint
|
||||
) VALUES ('
|
||||
+ '''' +convert(nvarchar,@log_type) + '''' + ','
|
||||
+ '''' +@char_instance_id + '''' + ','
|
||||
+ '''' +@bcust_id+ '''' + ','
|
||||
+ '''' +@char_character_id + '''' + ','
|
||||
+ '''' +@character_name + '''' + ','
|
||||
+ '''' +convert(nvarchar,@character_class) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@character_level) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@membercountclear) + '''' + ','
|
||||
+ '''' +@clearrank+ '''' + ','
|
||||
+ '''' +convert(nvarchar,@stylishpoint) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@hitcount) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@chain) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@killcount) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@cleartime) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@cardid) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@cardrewardid) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@cardrewardcount) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@addexp) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@death) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@rebirth) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@replay)+ '''' + ','
|
||||
+ '''' +convert(nvarchar,@dungeonid) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@difficulty) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@playpoint)+ '''' + ')'
|
||||
|
||||
|
||||
EXEC(@updatesql)
|
||||
|
||||
|
||||
if(@@error <> 0)
|
||||
begin
|
||||
rollback
|
||||
return
|
||||
end
|
||||
|
||||
commit
|
||||
69
decomp/schema/RustyHearts_Log/procs/up_SetEnchanteItem.sql
Normal file
69
decomp/schema/RustyHearts_Log/procs/up_SetEnchanteItem.sql
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
CREATE PROCEDURE [dbo].[up_SetEnchanteItem]
|
||||
@log_type smallint,
|
||||
@world_id int,
|
||||
@auth_id [uniqueidentifier],
|
||||
@bcust_id nvarchar(50),
|
||||
@character_id [uniqueidentifier],
|
||||
@character_name nvarchar(50),
|
||||
@item_guid [uniqueidentifier], -- ??? GUID
|
||||
@item_kind int, -- ??? ?? // 1-??, 2-???
|
||||
@enchante_level int, -- ??? ??
|
||||
@flag tinyint -- ???? // 0 - ??, 1 - ??
|
||||
|
||||
as
|
||||
set nocount on
|
||||
|
||||
|
||||
declare @createtime datetime
|
||||
set @createtime = getdate()
|
||||
|
||||
declare @year varchar(50)
|
||||
declare @month varchar(50)
|
||||
|
||||
set @year = convert(varchar, datepart(yy,@createtime))
|
||||
set @month = convert(varchar, datepart(mm,@createtime))
|
||||
|
||||
set xact_abort on
|
||||
begin tran
|
||||
|
||||
declare @updatesql nvarchar(1500)
|
||||
|
||||
declare @char_auth_id nvarchar(50)
|
||||
declare @char_character_id nvarchar(50)
|
||||
declare @char_item_id nvarchar(50)
|
||||
|
||||
declare @succeed_num int
|
||||
declare @failed_num int
|
||||
|
||||
-- ??? ??
|
||||
exec Local_CreateEnchantItemTable @createtime
|
||||
|
||||
set @char_auth_id = @auth_id
|
||||
set @char_character_id = @character_id
|
||||
set @char_item_id = @item_guid
|
||||
|
||||
|
||||
|
||||
SET @updatesql ='insert into EnchantItem_Log_'+ @year+'_'
|
||||
+@month+'(log_type, world_id, auth_id, bcust_id, character_id, character_name, item_guid, item_kind, enchant_level, flag, date )
|
||||
values ('
|
||||
+ '''' +convert(nvarchar, @log_type) + '''' + ','
|
||||
+ '''' +convert(nvarchar, @world_id) + '''' + ','
|
||||
+ '''' +@char_auth_id + '''' + ','
|
||||
+ '''' +@bcust_id+ '''' + ','
|
||||
+ '''' +@char_character_id+ '''' + ','
|
||||
+ '''' +@character_name+ '''' + ','
|
||||
+ '''' +@char_item_id+ '''' + ','
|
||||
+ '''' +convert(nvarchar, @item_kind)+ '''' + ','
|
||||
+ '''' +convert(nvarchar, @enchante_level)+ '''' + ','
|
||||
+ '''' +convert(nvarchar, @flag)+ '''' + ','
|
||||
+ '''' +convert(nvarchar, @createtime, 109)+ '''' + ')'
|
||||
EXEC(@updatesql)
|
||||
|
||||
if(@@error <> 0)
|
||||
begin
|
||||
rollback
|
||||
return
|
||||
end
|
||||
|
||||
commit
|
||||
72
decomp/schema/RustyHearts_Log/procs/up_SetGMInquiry.sql
Normal file
72
decomp/schema/RustyHearts_Log/procs/up_SetGMInquiry.sql
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
CREATE PROCEDURE [dbo].[up_SetGMInquiry]
|
||||
@inquiry_id uniqueidentifier,
|
||||
@auth_id uniqueidentifier,
|
||||
@char_id uniqueidentifier,
|
||||
@world_id int,
|
||||
@type tinyint,
|
||||
@character_name nvarchar(20),
|
||||
@bcust_id nvarchar(20),
|
||||
@memo nvarchar(255)
|
||||
|
||||
as
|
||||
set nocount on
|
||||
|
||||
|
||||
declare @createtime datetime
|
||||
set @createtime = getdate()
|
||||
|
||||
declare @year varchar(50)
|
||||
declare @month varchar(50)
|
||||
|
||||
set @year = convert(varchar, datepart(yy,@createtime))
|
||||
set @month = convert(varchar, datepart(mm,@createtime))
|
||||
|
||||
set xact_abort on
|
||||
begin tran
|
||||
|
||||
declare @updatesql nvarchar(1500)
|
||||
|
||||
declare @char_inquiry_id nvarchar(50)
|
||||
declare @char_auth_id nvarchar(50)
|
||||
declare @char_char_id nvarchar(50)
|
||||
|
||||
set @char_inquiry_id = @inquiry_id
|
||||
set @char_auth_id = @auth_id
|
||||
set @char_char_id = @char_id
|
||||
|
||||
|
||||
exec Local_CreateGMInquiryTable @createtime
|
||||
|
||||
SET @updatesql ='insert into GMInquiry_'+ @year+'_'
|
||||
+@month+'( inquiry_id
|
||||
,auth_id
|
||||
,char_id
|
||||
,world_id
|
||||
,type
|
||||
,character_name
|
||||
,state
|
||||
,online
|
||||
,bcust_id
|
||||
,memo
|
||||
,date )
|
||||
values ('
|
||||
+ '''' +@char_inquiry_id + '''' + ','
|
||||
+ '''' +@char_auth_id + '''' + ','
|
||||
+ '''' +@char_char_id + '''' + ','
|
||||
+ '''' +convert(nvarchar, @world_id) + '''' + ','
|
||||
+ '''' +convert(nvarchar, @type) + '''' + ','
|
||||
+ '''' +@character_name + '''' + ','
|
||||
+ '''' +convert(nvarchar, 1) + '''' + ','
|
||||
+ '''' +convert(nvarchar, 1) + '''' + ','
|
||||
+ '''' +@bcust_id + '''' + ','
|
||||
+ '''' +@memo + '''' + ','
|
||||
+ '''' +convert(nvarchar, @createtime, 109)+ '''' + ')'
|
||||
EXEC(@updatesql)
|
||||
|
||||
if(@@error <> 0)
|
||||
begin
|
||||
rollback
|
||||
return
|
||||
end
|
||||
|
||||
commit
|
||||
75
decomp/schema/RustyHearts_Log/procs/up_SetGold.sql
Normal file
75
decomp/schema/RustyHearts_Log/procs/up_SetGold.sql
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
CREATE PROCEDURE [dbo].[up_SetGold]
|
||||
@log_type smallint,
|
||||
@world_id int,
|
||||
@auth_id [uniqueidentifier],
|
||||
@bcust_id nvarchar(50) = NULL,
|
||||
@character_id [uniqueidentifier],
|
||||
@character_name nvarchar(50),
|
||||
|
||||
@Otherauth_id [uniqueidentifier],
|
||||
@Otherbcust_id nvarchar(50) = NULL,
|
||||
@Othercharacter_id [uniqueidentifier],
|
||||
@Othercharacter_name nvarchar(50),
|
||||
|
||||
@Gold_Prev int,
|
||||
@Gold_Change int,
|
||||
@Gold_After int,
|
||||
@record_time datetime
|
||||
as
|
||||
set nocount on
|
||||
|
||||
|
||||
declare @createtime datetime
|
||||
set @createtime = getdate()
|
||||
|
||||
declare @year varchar(50)
|
||||
declare @month varchar(50)
|
||||
|
||||
set @year = convert(varchar, datepart(yy,@createtime))
|
||||
set @month = convert(varchar, datepart(mm,@createtime))
|
||||
|
||||
set xact_abort on
|
||||
begin tran
|
||||
|
||||
declare @updatesql nvarchar(2500)
|
||||
|
||||
declare @char_auth_id nvarchar(50)
|
||||
declare @char_character_id nvarchar(50)
|
||||
declare @char_other_auth_id nvarchar(50)
|
||||
declare @char_other_character_id nvarchar(50)
|
||||
|
||||
-- Login_Log ??? ??
|
||||
exec Local_CreateMoneyTable @createtime
|
||||
|
||||
set @char_auth_id = @auth_id
|
||||
set @char_character_id = @character_id
|
||||
set @char_other_auth_id = @Otherauth_id
|
||||
set @char_other_character_id = @Othercharacter_id
|
||||
|
||||
|
||||
SET @updatesql ='insert into Money_Log_'+ @year+'_'
|
||||
+@month+'(log_type, world_id, auth_id, bcust_id, character_id, character_name, other_auth_id, other_bcust_id, other_character_id, other_character_name, before_money, after_money, change_money, entry_date )
|
||||
values ('
|
||||
+ '''' +convert(nvarchar, @log_type) + '''' + ','
|
||||
+ '''' +convert(nvarchar, @world_id) + '''' + ','
|
||||
+ '''' +@char_auth_id + '''' + ','
|
||||
+ '''' +@bcust_id+ '''' + ','
|
||||
+ '''' +@char_character_id+ '''' + ','
|
||||
+ '''' +@character_name+ '''' + ','
|
||||
+ '''' +@char_other_auth_id+ '''' + ','
|
||||
+ '''' +@Otherbcust_id+ '''' + ','
|
||||
+ '''' +@char_other_character_id+ '''' + ','
|
||||
+ '''' +@Othercharacter_name+ '''' + ','
|
||||
+ '''' +convert(nvarchar, @Gold_Prev)+ '''' +','
|
||||
+ '''' +convert(nvarchar, @Gold_After)+ '''' +','
|
||||
+ '''' +convert(nvarchar, @Gold_Change)+ '''' +','
|
||||
+ '''' +convert(nvarchar, @record_time, 109)+ '''' + ')'
|
||||
EXEC(@updatesql)
|
||||
|
||||
if(@@error <> 0)
|
||||
begin
|
||||
rollback
|
||||
return
|
||||
end
|
||||
|
||||
commit
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
CREATE PROCEDURE [dbo].[up_SetInquiryChatting]
|
||||
@world_id int
|
||||
,@inquiry_id int
|
||||
,@chatting_number int
|
||||
,@sender nvarchar(16)
|
||||
,@chatting nvarchar(255)
|
||||
|
||||
as
|
||||
set nocount on
|
||||
|
||||
|
||||
declare @createtime datetime
|
||||
set @createtime = getdate()
|
||||
|
||||
declare @year varchar(50)
|
||||
declare @month varchar(50)
|
||||
|
||||
set @year = convert(varchar, datepart(yy,@createtime))
|
||||
set @month = convert(varchar, datepart(mm,@createtime))
|
||||
|
||||
set xact_abort on
|
||||
begin tran
|
||||
|
||||
declare @updatesql nvarchar(1500)
|
||||
|
||||
-- Login_Log ??? ??
|
||||
exec Local_CreateInquiryChattingTable @createtime
|
||||
|
||||
|
||||
SET @updatesql ='insert into InquiryChatting_Log_'+ @year+'_'
|
||||
+@month+ '( world_id
|
||||
,log_id
|
||||
,keyboarder
|
||||
,chat_number
|
||||
,dialog
|
||||
,date )
|
||||
values ('
|
||||
+ '''' +convert(nvarchar, @world_id) + '''' + ','
|
||||
+ '''' +convert(nvarchar, @inquiry_id) + '''' + ','
|
||||
+ '''' +@sender + '''' + ','
|
||||
+ '''' +convert(nvarchar, @chatting_number) + '''' + ','
|
||||
+ '''' +@chatting + '''' + ','
|
||||
+ '''' +convert(nvarchar, @createtime, 109)+ '''' + ')'
|
||||
EXEC(@updatesql)
|
||||
|
||||
if(@@error <> 0)
|
||||
begin
|
||||
rollback
|
||||
return
|
||||
end
|
||||
|
||||
commit
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
CREATE PROCEDURE [dbo].[up_SetInquiryComplete]
|
||||
@world_id int
|
||||
,@log_id int
|
||||
,@log_type int
|
||||
,@end_status tinyint
|
||||
,@start_status tinyint
|
||||
,@target_bcustno nvarchar(16)
|
||||
,@target_character nvarchar(16)
|
||||
,@GM nvarchar(16)
|
||||
,@former_GM nvarchar(16)
|
||||
,@remain_number tinyint
|
||||
,@inquery_use nvarchar(1)
|
||||
,@group_processing nvarchar(1)
|
||||
,@post_time datetime
|
||||
,@start_time datetime
|
||||
as
|
||||
set nocount on
|
||||
|
||||
|
||||
declare @createtime datetime
|
||||
set @createtime = getdate()
|
||||
|
||||
declare @year varchar(50)
|
||||
declare @month varchar(50)
|
||||
|
||||
set @year = convert(varchar, datepart(yy,@createtime))
|
||||
set @month = convert(varchar, datepart(mm,@createtime))
|
||||
|
||||
set xact_abort on
|
||||
begin tran
|
||||
|
||||
declare @updatesql nvarchar(1500)
|
||||
|
||||
-- Login_Log ??? ??
|
||||
exec Local_CreateInquiryCompleteTable @createtime
|
||||
|
||||
|
||||
SET @updatesql ='insert into InquiryComplete_Log_'+ @year+'_'
|
||||
+@month+ '(world_id
|
||||
,log_id
|
||||
,log_type
|
||||
,end_status
|
||||
,start_status
|
||||
,target_bcustno
|
||||
,target_character
|
||||
,GM
|
||||
,former_GM
|
||||
,remain_number
|
||||
,inquery_use
|
||||
,group_processing
|
||||
,post_time
|
||||
,start_time )
|
||||
values ('
|
||||
+ '''' +convert(nvarchar, @world_id) + '''' + ','
|
||||
+ '''' +convert(nvarchar, @log_id) + '''' + ','
|
||||
+ '''' +convert(nvarchar, @log_type) + '''' + ','
|
||||
+ '''' +convert(nvarchar, @end_status) + '''' + ','
|
||||
+ '''' +convert(nvarchar, @start_status) + '''' + ','
|
||||
+ '''' +@target_bcustno + '''' + ','
|
||||
+ '''' +@target_character + '''' + ','
|
||||
+ '''' +@GM + '''' + ','
|
||||
+ '''' +@former_GM + '''' + ','
|
||||
+ '''' +convert(nvarchar, @remain_number) + '''' + ','
|
||||
+ '''' +@inquery_use + '''' + ','
|
||||
+ '''' +@group_processing + '''' + ','
|
||||
+ '''' +convert(nvarchar, @post_time, 109) + '''' + ','
|
||||
+ '''' +convert(nvarchar, @start_time, 109) + '''' + ')'
|
||||
|
||||
EXEC(@updatesql)
|
||||
|
||||
if(@@error <> 0)
|
||||
begin
|
||||
rollback
|
||||
return
|
||||
end
|
||||
|
||||
commit
|
||||
143
decomp/schema/RustyHearts_Log/procs/up_SetItemMail.sql
Normal file
143
decomp/schema/RustyHearts_Log/procs/up_SetItemMail.sql
Normal file
|
|
@ -0,0 +1,143 @@
|
|||
CREATE PROCEDURE [dbo].[up_SetItemMail]
|
||||
@log_type int
|
||||
,@world_id int
|
||||
,@auth_id uniqueidentifier
|
||||
,@character_id uniqueidentifier
|
||||
,@character_name nvarchar(16)
|
||||
,@item_guid uniqueidentifier
|
||||
,@item_ID int
|
||||
,@item_header int
|
||||
,@enchant_level int
|
||||
,@item_active int
|
||||
,@socket_count tinyint
|
||||
,@remain_recon tinyint
|
||||
,@durability int
|
||||
,@item_option1 int
|
||||
,@item_option2 int
|
||||
,@item_option3 int
|
||||
,@item_option_value1 int
|
||||
,@item_option_value2 int
|
||||
,@item_option_value3 int
|
||||
,@item_socket_option1 int
|
||||
,@item_socket_option2 int
|
||||
,@item_socket_option3 int
|
||||
,@item_socket_value1 int
|
||||
,@item_socket_value2 int
|
||||
,@item_socket_value3 int
|
||||
,@item_socket_color1 int
|
||||
,@item_socket_color2 int
|
||||
,@item_socket_color3 int
|
||||
,@item_count int
|
||||
,@before_money int
|
||||
,@after_money int
|
||||
,@change_money int
|
||||
,@target_name nvarchar(16)
|
||||
,@mail_type int
|
||||
|
||||
as
|
||||
set nocount on
|
||||
|
||||
declare @createtime datetime
|
||||
set @createtime = getdate()
|
||||
|
||||
declare @year varchar(50)
|
||||
declare @month varchar(50)
|
||||
|
||||
set @year = convert(varchar, datepart(yy,@createtime))
|
||||
set @month = convert(varchar, datepart(mm,@createtime))
|
||||
|
||||
set xact_abort on
|
||||
begin tran
|
||||
|
||||
declare @updatesql nvarchar(2500)
|
||||
|
||||
declare @char_auth_id nvarchar(50)
|
||||
declare @char_character_id nvarchar(50)
|
||||
declare @char_item_id nvarchar(50)
|
||||
|
||||
set @char_auth_id = @auth_id
|
||||
set @char_character_id = @character_id
|
||||
set @char_item_id = @item_guid
|
||||
|
||||
exec Local_CreateItemMailTable @createtime
|
||||
|
||||
SET @updatesql = 'insert into ItemMail_Log_' + @year + '_' + @month +
|
||||
'(log_type
|
||||
,world_id
|
||||
,auth_id
|
||||
,character_id
|
||||
,character_name
|
||||
,item_guid
|
||||
,item_ID
|
||||
,item_header
|
||||
,enchant_level
|
||||
,item_active
|
||||
,socket_count
|
||||
,item_recon
|
||||
,durability
|
||||
,item_option1
|
||||
,item_option2
|
||||
,item_option3
|
||||
,item_option_value1
|
||||
,item_option_value2
|
||||
,item_option_value3
|
||||
,item_socket_option1
|
||||
,item_socket_option2
|
||||
,item_socket_option3
|
||||
,item_socket_value1
|
||||
,item_socket_value2
|
||||
,item_socket_value3
|
||||
,item_socket_color1
|
||||
,item_socket_color2
|
||||
,item_socket_color3
|
||||
,item_count
|
||||
,before_money
|
||||
,after_money
|
||||
,change_money
|
||||
,target_name
|
||||
,mail_type )
|
||||
VALUES ('
|
||||
+ '''' +convert(nvarchar,@log_type) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@world_id) + '''' + ','
|
||||
+ '''' +@char_auth_id + '''' + ','
|
||||
+ '''' +@char_character_id + '''' + ','
|
||||
+ '''' +@character_name + '''' + ','
|
||||
+ '''' +@char_item_id + '''' + ','
|
||||
+ '''' +convert(nvarchar,@item_id) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@item_header) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@enchant_level) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@item_active) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@socket_count) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@remain_recon) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@durability) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@item_option1) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@item_option2) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@item_option3) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@item_option_value1)+ '''' + ','
|
||||
+ '''' +convert(nvarchar,@item_option_value2)+ '''' + ','
|
||||
+ '''' +convert(nvarchar,@item_option_value3)+ '''' + ','
|
||||
+ '''' +convert(nvarchar,@item_socket_option1)+ '''' + ','
|
||||
+ '''' +convert(nvarchar,@item_socket_option2)+ '''' + ','
|
||||
+ '''' +convert(nvarchar,@item_socket_option3)+ '''' + ','
|
||||
+ '''' +convert(nvarchar,@item_socket_value1) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@item_socket_value2) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@item_socket_value3) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@item_socket_color1) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@item_socket_color2) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@item_socket_color3) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@item_count) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@before_money) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@after_money) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@change_money) + '''' + ','
|
||||
+ '''' +@target_name + '''' + ','
|
||||
+ '''' +convert(nvarchar,@mail_type) + '''' + ')'
|
||||
|
||||
EXEC(@updatesql)
|
||||
|
||||
if(@@error <> 0)
|
||||
begin
|
||||
rollback
|
||||
return
|
||||
end
|
||||
|
||||
commit
|
||||
2
decomp/schema/RustyHearts_Log/procs/up_SetItemTrade.sql
Normal file
2
decomp/schema/RustyHearts_Log/procs/up_SetItemTrade.sql
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
CREATE PROCEDURE [dbo].[up_SetItemTrade]
|
||||
AS
|
||||
146
decomp/schema/RustyHearts_Log/procs/up_SetItems.sql
Normal file
146
decomp/schema/RustyHearts_Log/procs/up_SetItems.sql
Normal file
|
|
@ -0,0 +1,146 @@
|
|||
CREATE PROCEDURE [dbo].[up_SetItems]
|
||||
@log_type int
|
||||
,@world_id int
|
||||
,@auth_id uniqueidentifier
|
||||
,@character_id uniqueidentifier
|
||||
,@character_name nvarchar(16)
|
||||
,@item_guid uniqueidentifier
|
||||
,@item_ID int
|
||||
,@item_header int
|
||||
,@enchant_level int
|
||||
,@item_active int
|
||||
,@socket_count tinyint
|
||||
,@remain_recon tinyint
|
||||
,@durability int
|
||||
,@item_option1 int
|
||||
,@item_option2 int
|
||||
,@item_option3 int
|
||||
,@item_option_value1 int
|
||||
,@item_option_value2 int
|
||||
,@item_option_value3 int
|
||||
,@item_socket_option1 int
|
||||
,@item_socket_option2 int
|
||||
,@item_socket_option3 int
|
||||
,@item_socket_value1 int
|
||||
,@item_socket_value2 int
|
||||
,@item_socket_value3 int
|
||||
,@item_socket_color1 int
|
||||
,@item_socket_color2 int
|
||||
,@item_socket_color3 int
|
||||
,@item_count int
|
||||
,@before_money int
|
||||
,@after_money int
|
||||
,@change_money int
|
||||
,@before_date int
|
||||
,@after_date int
|
||||
,@result int
|
||||
|
||||
as
|
||||
set nocount on
|
||||
|
||||
declare @createtime datetime
|
||||
set @createtime = getdate()
|
||||
|
||||
declare @year varchar(50)
|
||||
declare @month varchar(50)
|
||||
|
||||
set @year = convert(varchar, datepart(yy,@createtime))
|
||||
set @month = convert(varchar, datepart(mm,@createtime))
|
||||
|
||||
set xact_abort on
|
||||
begin tran
|
||||
|
||||
declare @updatesql nvarchar(4000)
|
||||
|
||||
declare @char_auth_id nvarchar(50)
|
||||
declare @char_character_id nvarchar(50)
|
||||
declare @char_item_id nvarchar(50)
|
||||
|
||||
set @char_auth_id = @auth_id
|
||||
set @char_character_id = @character_id
|
||||
set @char_item_id = @item_guid
|
||||
|
||||
exec Local_CreateItemsTable @createtime
|
||||
|
||||
SET @updatesql = 'insert into Items_Log_' + @year + '_' + @month +
|
||||
'(log_type
|
||||
,world_id
|
||||
,auth_id
|
||||
,character_id
|
||||
,character_name
|
||||
,item_guid
|
||||
,item_ID
|
||||
,item_header
|
||||
,enchant_level
|
||||
,item_active
|
||||
,socket_count
|
||||
,item_recon
|
||||
,durability
|
||||
,item_option1
|
||||
,item_option2
|
||||
,item_option3
|
||||
,item_option_value1
|
||||
,item_option_value2
|
||||
,item_option_value3
|
||||
,item_socket_option1
|
||||
,item_socket_option2
|
||||
,item_socket_option3
|
||||
,item_socket_value1
|
||||
,item_socket_value2
|
||||
,item_socket_value3
|
||||
,item_socket_color1
|
||||
,item_socket_color2
|
||||
,item_socket_color3
|
||||
,item_count
|
||||
,before_money
|
||||
,after_money
|
||||
,change_money
|
||||
,before_date
|
||||
,after_date
|
||||
,result )
|
||||
VALUES ('
|
||||
+ '''' +convert(nvarchar,@log_type) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@world_id) + '''' + ','
|
||||
+ '''' +@char_auth_id + '''' + ','
|
||||
+ '''' +@char_character_id + '''' + ','
|
||||
+ '''' +@character_name + '''' + ','
|
||||
+ '''' +@char_item_id + '''' + ','
|
||||
+ '''' +convert(nvarchar,@item_id) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@item_header) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@enchant_level) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@item_active) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@socket_count) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@remain_recon) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@durability) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@item_option1) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@item_option2) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@item_option3) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@item_option_value1)+ '''' + ','
|
||||
+ '''' +convert(nvarchar,@item_option_value2)+ '''' + ','
|
||||
+ '''' +convert(nvarchar,@item_option_value3)+ '''' + ','
|
||||
+ '''' +convert(nvarchar,@item_socket_option1)+ '''' + ','
|
||||
+ '''' +convert(nvarchar,@item_socket_option2)+ '''' + ','
|
||||
+ '''' +convert(nvarchar,@item_socket_option3)+ '''' + ','
|
||||
+ '''' +convert(nvarchar,@item_socket_value1) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@item_socket_value2) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@item_socket_value3) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@item_socket_color1) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@item_socket_color2) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@item_socket_color3) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@item_count) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@before_money) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@after_money) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@change_money) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@before_date) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@after_date) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@result) + '''' + ')'
|
||||
|
||||
EXEC(@updatesql)
|
||||
|
||||
if(@@error <> 0)
|
||||
begin
|
||||
rollback
|
||||
return
|
||||
end
|
||||
|
||||
commit
|
||||
60
decomp/schema/RustyHearts_Log/procs/up_SetLevelUp.sql
Normal file
60
decomp/schema/RustyHearts_Log/procs/up_SetLevelUp.sql
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
CREATE PROCEDURE [dbo].[up_SetLevelUp]
|
||||
@log_type smallint,
|
||||
@world_id int,
|
||||
@auth_id [uniqueidentifier],
|
||||
@bcust_id nvarchar(50),
|
||||
@character_id [uniqueidentifier],
|
||||
@character_name nvarchar(50),
|
||||
@character_class int,
|
||||
@character_level int,
|
||||
@record_time datetime
|
||||
as
|
||||
set nocount on
|
||||
|
||||
|
||||
declare @createtime datetime
|
||||
set @createtime = getdate()
|
||||
|
||||
declare @year varchar(50)
|
||||
declare @month varchar(50)
|
||||
|
||||
set @year = convert(varchar, datepart(yy,@createtime))
|
||||
set @month = convert(varchar, datepart(mm,@createtime))
|
||||
|
||||
set xact_abort on
|
||||
begin tran
|
||||
|
||||
declare @updatesql nvarchar(1500)
|
||||
|
||||
declare @char_auth_id nvarchar(50)
|
||||
declare @char_character_id nvarchar(50)
|
||||
|
||||
-- Login_Log ??? ??
|
||||
exec Local_CreateLevelUpTable @createtime
|
||||
|
||||
set @char_auth_id = @auth_id
|
||||
set @char_character_id = @character_id
|
||||
|
||||
|
||||
SET @updatesql ='insert into LevelUp_Log_'+ @year+'_'
|
||||
+@month+'(log_type, world_id, auth_id, bcust_id, character_id, character_name, character_class, character_level, record_date, date )
|
||||
values ('
|
||||
+ '''' +convert(nvarchar, @log_type) + '''' + ','
|
||||
+ '''' +convert(nvarchar, @world_id) + '''' + ','
|
||||
+ '''' +@char_auth_id + '''' + ','
|
||||
+ '''' +@bcust_id+ '''' + ','
|
||||
+ '''' +@char_character_id+ '''' + ','
|
||||
+ '''' +@character_name+ '''' + ','
|
||||
+ '''' +convert(nvarchar, @character_class)+ '''' + ','
|
||||
+ '''' +convert(nvarchar, @character_level)+ '''' + ','
|
||||
+ '''' +convert(nvarchar, @record_time, 109)+ '''' + ','
|
||||
+ '''' +convert(nvarchar, @createtime, 109)+ '''' + ')'
|
||||
EXEC(@updatesql)
|
||||
|
||||
if(@@error <> 0)
|
||||
begin
|
||||
rollback
|
||||
return
|
||||
end
|
||||
|
||||
commit
|
||||
93
decomp/schema/RustyHearts_Log/procs/up_SetLoginOut.sql
Normal file
93
decomp/schema/RustyHearts_Log/procs/up_SetLoginOut.sql
Normal file
|
|
@ -0,0 +1,93 @@
|
|||
CREATE PROCEDURE [dbo].[up_SetLoginOut]
|
||||
|
||||
@log_type int
|
||||
,@world_id int
|
||||
,@auth_id uniqueidentifier
|
||||
,@channel_group tinyint
|
||||
,@channel_num int
|
||||
,@bcust_id nvarchar(16)
|
||||
,@character_id uniqueidentifier
|
||||
,@character_name nvarchar(16)
|
||||
,@inven_gold int
|
||||
,@storage_gold int
|
||||
,@character_level tinyint
|
||||
,@character_exp int
|
||||
,@targetmap int
|
||||
,@playpoint int
|
||||
,@skillpoint int
|
||||
,@guildpoint int
|
||||
,@coin int
|
||||
as
|
||||
set nocount on
|
||||
|
||||
declare @createtime datetime
|
||||
set @createtime = getdate()
|
||||
|
||||
declare @year varchar(50)
|
||||
declare @month varchar(50)
|
||||
|
||||
set @year = convert(varchar, datepart(yy,@createtime))
|
||||
set @month = convert(varchar, datepart(mm,@createtime))
|
||||
|
||||
set xact_abort on
|
||||
begin tran
|
||||
|
||||
declare @char_auth_id nvarchar(50)
|
||||
declare @char_character_id nvarchar(50)
|
||||
|
||||
declare @updatesql nvarchar(2500)
|
||||
|
||||
|
||||
-- Login_Log ??? ??
|
||||
exec Local_CreateLoginOutTable @createtime
|
||||
|
||||
set @char_auth_id = @auth_id
|
||||
set @char_character_id = @character_id
|
||||
|
||||
SET @updatesql = 'INSERT INTO LoginOut_Log_' + @year + '_' + @month + '( log_type
|
||||
,world_id
|
||||
,auth_id
|
||||
,channel_group
|
||||
,channel_num
|
||||
,bcust_id
|
||||
,character_id
|
||||
,character_name
|
||||
,inven_gold
|
||||
,storage_gold
|
||||
,character_level
|
||||
,character_exp
|
||||
,targetmap
|
||||
,playpoint
|
||||
,skillpoint
|
||||
,guildpoint
|
||||
,coin
|
||||
)
|
||||
VALUES ('
|
||||
+ '''' +convert(nvarchar,@log_type) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@world_id) + '''' + ','
|
||||
+ '''' +@char_auth_id + '''' + ','
|
||||
+ '''' +convert(nvarchar,@channel_group) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@channel_num) + '''' + ','
|
||||
+ '''' +@bcust_id + '''' + ','
|
||||
+ '''' +@char_character_id + '''' + ','
|
||||
+ '''' +@character_name + '''' + ','
|
||||
+ '''' +convert(nvarchar,@inven_gold) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@storage_gold) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@character_level) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@character_exp) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@targetmap) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@playpoint) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@skillpoint) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@guildpoint) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@coin)+ '''' + ')'
|
||||
|
||||
|
||||
EXEC(@updatesql)
|
||||
|
||||
if(@@error <> 0)
|
||||
begin
|
||||
rollback
|
||||
return
|
||||
end
|
||||
|
||||
commit
|
||||
84
decomp/schema/RustyHearts_Log/procs/up_SetMail.sql
Normal file
84
decomp/schema/RustyHearts_Log/procs/up_SetMail.sql
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
CREATE PROCEDURE [dbo].[up_SetMail]
|
||||
|
||||
@log_type int
|
||||
,@world_id int
|
||||
,@auth_id uniqueidentifier
|
||||
,@channel_group tinyint
|
||||
,@channel_num int
|
||||
,@mail_id uniqueidentifier
|
||||
,@bcust_id nvarchar(16)
|
||||
,@character_id uniqueidentifier
|
||||
,@character_name nvarchar(16)
|
||||
,@receiver_name nvarchar(16)
|
||||
,@msg nvarchar(50)
|
||||
,@return_day int
|
||||
,@req_gold int
|
||||
|
||||
as
|
||||
set nocount on
|
||||
|
||||
declare @createtime datetime
|
||||
set @createtime = getdate()
|
||||
|
||||
declare @year varchar(50)
|
||||
declare @month varchar(50)
|
||||
|
||||
set @year = convert(varchar, datepart(yy,@createtime))
|
||||
set @month = convert(varchar, datepart(mm,@createtime))
|
||||
|
||||
set xact_abort on
|
||||
begin tran
|
||||
|
||||
declare @updatesql nvarchar(2500)
|
||||
|
||||
declare @char_auth_id nvarchar(50)
|
||||
declare @char_mail_id nvarchar(50)
|
||||
declare @char_character_id nvarchar(50)
|
||||
|
||||
|
||||
-- Login_Log ??? ??
|
||||
exec Local_CreateMailTable @createtime
|
||||
|
||||
set @char_auth_id = @auth_id
|
||||
set @char_mail_id = @mail_id
|
||||
set @char_character_id = @character_id
|
||||
|
||||
SET @updatesql = 'INSERT INTO Mail_Log_' + @year + '_' + @month + '( log_type
|
||||
,world_id
|
||||
,auth_id
|
||||
,channel_group
|
||||
,channel_num
|
||||
,mail_id
|
||||
,bcust_id
|
||||
,character_id
|
||||
,character_name
|
||||
,receiver_name
|
||||
,msg
|
||||
,return_day
|
||||
,req_gold)
|
||||
VALUES ('
|
||||
|
||||
+ '''' +convert(nvarchar, @log_type) + '''' + ','
|
||||
+ '''' +convert(nvarchar, @world_id) + '''' + ','
|
||||
+ '''' +@char_auth_id+ '''' + ','
|
||||
+ '''' +convert(nvarchar, @channel_group)+ '''' + ','
|
||||
+ '''' +convert(nvarchar, @channel_num)+ '''' + ','
|
||||
+ '''' +@char_auth_id+ '''' + ','
|
||||
+ '''' +@bcust_id+ '''' + ','
|
||||
+ '''' +@char_character_id+ '''' + ','
|
||||
+ '''' +@character_name+ '''' +','
|
||||
+ '''' +@receiver_name+ '''' +','
|
||||
+ '''' +@msg+ '''' +','
|
||||
+ '''' +convert(nvarchar, @return_day)+ '''' +','
|
||||
+ '''' +convert(nvarchar, @req_gold)+ '''' + ')'
|
||||
|
||||
EXEC(@updatesql)
|
||||
|
||||
|
||||
if(@@error <> 0)
|
||||
begin
|
||||
rollback
|
||||
return
|
||||
end
|
||||
|
||||
commit
|
||||
48
decomp/schema/RustyHearts_Log/procs/up_SetMonitorCommand.sql
Normal file
48
decomp/schema/RustyHearts_Log/procs/up_SetMonitorCommand.sql
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
CREATE PROCEDURE [dbo].[up_SetMonitorCommand]
|
||||
@log_type int
|
||||
,@world_ID int
|
||||
,@server_type int
|
||||
,@GM_ID nvarchar(16)
|
||||
,@command int
|
||||
,@server_code int
|
||||
|
||||
as
|
||||
set nocount on
|
||||
|
||||
|
||||
declare @createtime datetime
|
||||
set @createtime = getdate()
|
||||
|
||||
declare @year varchar(50)
|
||||
declare @month varchar(50)
|
||||
|
||||
set @year = convert(varchar, datepart(yy,@createtime))
|
||||
set @month = convert(varchar, datepart(mm,@createtime))
|
||||
|
||||
set xact_abort on
|
||||
begin tran
|
||||
|
||||
declare @updatesql nvarchar(1500)
|
||||
|
||||
exec Local_CreateMonitorCommandTable @createtime
|
||||
|
||||
SET @updatesql ='insert into MonitorCommand_Log_'+ @year+'_'+@month
|
||||
+'(log_type, world_id, channel_ID, executer_ID, command, target, date)
|
||||
values ('
|
||||
+ '''' +convert(nvarchar, @log_type) + '''' + ','
|
||||
+ '''' +convert(nvarchar, @world_id) + '''' + ','
|
||||
+ '''' +convert(nvarchar, @server_type) + '''' + ','
|
||||
+ '''' +@GM_ID + '''' + ','
|
||||
+ '''' +convert(nvarchar, @command) + '''' + ','
|
||||
+ '''' +convert(nvarchar, @server_code) + '''' + ','
|
||||
+ '''' +convert(nvarchar, @createtime, 109) + '''' + ')'
|
||||
|
||||
EXEC(@updatesql)
|
||||
|
||||
if(@@error <> 0)
|
||||
begin
|
||||
rollback
|
||||
return
|
||||
end
|
||||
|
||||
commit
|
||||
50
decomp/schema/RustyHearts_Log/procs/up_SetMonitorNotice.sql
Normal file
50
decomp/schema/RustyHearts_Log/procs/up_SetMonitorNotice.sql
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
CREATE PROCEDURE [dbo].[up_SetMonitorNotice]
|
||||
@log_type int
|
||||
,@world_id int
|
||||
,@target int
|
||||
,@notice_type tinyint
|
||||
,@notice_cycle tinyint
|
||||
,@notice nvarchar(255)
|
||||
,@gm_ID nvarchar(16)
|
||||
|
||||
as
|
||||
set nocount on
|
||||
|
||||
|
||||
declare @createtime datetime
|
||||
set @createtime = getdate()
|
||||
|
||||
declare @year varchar(50)
|
||||
declare @month varchar(50)
|
||||
|
||||
set @year = convert(varchar, datepart(yy,@createtime))
|
||||
set @month = convert(varchar, datepart(mm,@createtime))
|
||||
|
||||
set xact_abort on
|
||||
begin tran
|
||||
|
||||
declare @updatesql nvarchar(1500)
|
||||
|
||||
exec Local_CreateMonitorNoticeTable @createtime
|
||||
|
||||
SET @updatesql ='insert into MonitorNotice_Log_'+ @year+'_'+@month
|
||||
+'(log_type, world_id, target, notice_type, notice_cycle, notice, gm_ID, date)
|
||||
values ('
|
||||
+ '''' +convert(nvarchar, @log_type) + '''' + ','
|
||||
+ '''' +convert(nvarchar, @world_id) + '''' + ','
|
||||
+ '''' +convert(nvarchar, @target) + '''' + ','
|
||||
+ '''' +convert(nvarchar, @notice_type) + '''' + ','
|
||||
+ '''' +convert(nvarchar, @notice_cycle) + '''' + ','
|
||||
+ '''' +@notice + '''' + ','
|
||||
+ '''' +@gm_ID + '''' + ','
|
||||
+ '''' +convert(nvarchar, @createtime, 109) + '''' + ')'
|
||||
|
||||
EXEC(@updatesql)
|
||||
|
||||
if(@@error <> 0)
|
||||
begin
|
||||
rollback
|
||||
return
|
||||
end
|
||||
|
||||
commit
|
||||
49
decomp/schema/RustyHearts_Log/procs/up_SetMonitorUser.sql
Normal file
49
decomp/schema/RustyHearts_Log/procs/up_SetMonitorUser.sql
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
CREATE PROCEDURE [dbo].[up_SetMonitorUser]
|
||||
@log_type int
|
||||
,@world_id int
|
||||
,@gate int
|
||||
,@lobby int
|
||||
,@dungeon int
|
||||
,@pvp int
|
||||
,@total int
|
||||
as
|
||||
set nocount on
|
||||
|
||||
|
||||
declare @createtime datetime
|
||||
set @createtime = getdate()
|
||||
|
||||
declare @year varchar(50)
|
||||
declare @month varchar(50)
|
||||
|
||||
set @year = convert(varchar, datepart(yy,@createtime))
|
||||
set @month = convert(varchar, datepart(mm,@createtime))
|
||||
|
||||
set xact_abort on
|
||||
begin tran
|
||||
|
||||
declare @updatesql nvarchar(1500)
|
||||
|
||||
-- Battle_Room_Log ??? ??
|
||||
exec Local_CreateMonitorUserTable @createtime
|
||||
|
||||
SET @updatesql ='insert into MonitorUser_Log_'+ @year+'_'
|
||||
+@month+'( log_type, world_ID, CU_gate, CU_lobby, CU_PVP, CU_dungeon, CU_total, date )
|
||||
values ('
|
||||
+ '''' +convert(nvarchar, @log_type) + '''' + ','
|
||||
+ '''' +convert(nvarchar, @world_id) + '''' + ','
|
||||
+ '''' +convert(nvarchar, @gate) + '''' + ','
|
||||
+ '''' +convert(nvarchar, @lobby) + '''' + ','
|
||||
+ '''' +convert(nvarchar, @dungeon) + '''' + ','
|
||||
+ '''' +convert(nvarchar, @pvp) + '''' + ','
|
||||
+ '''' +convert(nvarchar, @total) + '''' + ','
|
||||
+ '''' +convert(nvarchar, @createtime, 109)+ '''' + ')'
|
||||
EXEC(@updatesql)
|
||||
|
||||
if(@@error <> 0)
|
||||
begin
|
||||
rollback
|
||||
return
|
||||
end
|
||||
|
||||
commit
|
||||
41
decomp/schema/RustyHearts_Log/procs/up_SetPacketOverload.sql
Normal file
41
decomp/schema/RustyHearts_Log/procs/up_SetPacketOverload.sql
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
CREATE PROCEDURE [dbo].[up_SetPacketOverload]
|
||||
@func_name char(100),
|
||||
@time int
|
||||
as
|
||||
set nocount on
|
||||
|
||||
|
||||
declare @createtime datetime
|
||||
set @createtime = getdate()
|
||||
|
||||
declare @year varchar(50)
|
||||
declare @month varchar(50)
|
||||
|
||||
set @year = convert(varchar, datepart(yy,@createtime))
|
||||
set @month = convert(varchar, datepart(mm,@createtime))
|
||||
|
||||
set xact_abort on
|
||||
begin tran
|
||||
|
||||
declare @updatesql nvarchar(500)
|
||||
|
||||
-- PacketOverload_Log ??? ??
|
||||
exec Local_CreatePacketOverloadLogTable @createtime
|
||||
|
||||
|
||||
SET @updatesql ='insert into PacketOverload_Log_'+ @year+'_'
|
||||
+@month+'(func_name, time, date)
|
||||
values ('
|
||||
+ '''' +convert(nvarchar, @func_name)+ '''' + ','
|
||||
+ '''' +convert(nvarchar, @time)+ '''' + ','
|
||||
+ '''' +convert(nvarchar, @createtime)+ '''' + ')'
|
||||
EXEC(@updatesql)
|
||||
|
||||
|
||||
if(@@error <> 0)
|
||||
begin
|
||||
rollback
|
||||
return
|
||||
end
|
||||
|
||||
commit
|
||||
64
decomp/schema/RustyHearts_Log/procs/up_SetPlayTime.sql
Normal file
64
decomp/schema/RustyHearts_Log/procs/up_SetPlayTime.sql
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
CREATE PROCEDURE [dbo].[up_SetPlayTime]
|
||||
@log_type smallint,
|
||||
@world_id int,
|
||||
@auth_id [uniqueidentifier],
|
||||
@bcust_id nvarchar(50),
|
||||
@character_id [uniqueidentifier],
|
||||
@character_name nvarchar(50),
|
||||
@character_class int,
|
||||
@character_level int,
|
||||
@channel_id int,
|
||||
@start_time datetime,
|
||||
@end_time datetime
|
||||
as
|
||||
set nocount on
|
||||
|
||||
|
||||
declare @createtime datetime
|
||||
set @createtime = getdate()
|
||||
|
||||
declare @year varchar(50)
|
||||
declare @month varchar(50)
|
||||
|
||||
set @year = convert(varchar, datepart(yy,@createtime))
|
||||
set @month = convert(varchar, datepart(mm,@createtime))
|
||||
|
||||
set xact_abort on
|
||||
begin tran
|
||||
|
||||
declare @updatesql nvarchar(1500)
|
||||
|
||||
declare @char_auth_id nvarchar(50)
|
||||
declare @char_character_id nvarchar(50)
|
||||
|
||||
-- Login_Log ??? ??
|
||||
exec Local_CreatePTTable @createtime
|
||||
|
||||
set @char_auth_id = @auth_id
|
||||
set @char_character_id = @character_id
|
||||
|
||||
|
||||
SET @updatesql ='insert into PT_Log_'+ @year+'_'
|
||||
+@month+'(log_type, world_id, auth_id, bcust_id, ChannelID, character_id, character_name, character_class, character_level, p_start_date, p_end_date, date )
|
||||
values ('
|
||||
+ '''' +convert(nvarchar, @log_type) + '''' + ','
|
||||
+ '''' +convert(nvarchar, @world_id) + '''' + ','
|
||||
+ '''' +@char_auth_id + '''' + ','
|
||||
+ '''' +@bcust_id+ '''' + ','
|
||||
+ '''' +convert(nvarchar, @channel_id) + '''' + ','
|
||||
+ '''' +@char_character_id+ '''' + ','
|
||||
+ '''' +@character_name+ '''' + ','
|
||||
+ '''' +convert(nvarchar, @character_class)+ '''' + ','
|
||||
+ '''' +convert(nvarchar, @character_level)+ '''' + ','
|
||||
+ '''' +convert(nvarchar, @start_time, 109)+ '''' + ','
|
||||
+ '''' +convert(nvarchar, @end_time, 109)+ '''' + ','
|
||||
+ '''' +convert(nvarchar, @createtime, 109)+ '''' + ')'
|
||||
EXEC(@updatesql)
|
||||
|
||||
if(@@error <> 0)
|
||||
begin
|
||||
rollback
|
||||
return
|
||||
end
|
||||
|
||||
commit
|
||||
71
decomp/schema/RustyHearts_Log/procs/up_SetPvpDeath.sql
Normal file
71
decomp/schema/RustyHearts_Log/procs/up_SetPvpDeath.sql
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
CREATE PROCEDURE [dbo].[up_SetPvpDeath]
|
||||
@log_type smallint,
|
||||
@room_id uniqueidentifier,
|
||||
@character_id uniqueidentifier,
|
||||
@character_name nvarchar(16),
|
||||
@character_class int,
|
||||
@character_job tinyint,
|
||||
@character_level int,
|
||||
@kill_id uniqueidentifier,
|
||||
@kill_name nvarchar(16),
|
||||
@kill_class int,
|
||||
@kill_job tinyint,
|
||||
@kill_level int
|
||||
|
||||
as
|
||||
set nocount on
|
||||
|
||||
|
||||
declare @createtime datetime
|
||||
set @createtime = getdate()
|
||||
|
||||
declare @year varchar(50)
|
||||
declare @month varchar(50)
|
||||
|
||||
set @year = convert(varchar, datepart(yy,@createtime))
|
||||
set @month = convert(varchar, datepart(mm,@createtime))
|
||||
|
||||
set xact_abort on
|
||||
begin tran
|
||||
|
||||
declare @updatesql nvarchar(1500)
|
||||
|
||||
declare @char_room_id nvarchar(50)
|
||||
declare @char_character_id nvarchar(50)
|
||||
declare @char_kill_id nvarchar(50)
|
||||
|
||||
set @char_room_id = @room_id
|
||||
set @char_character_id = @character_id
|
||||
set @char_kill_id = @kill_id
|
||||
|
||||
|
||||
-- Battle_Room_Log ??? ??
|
||||
exec Local_CreatePvpDeathTable @createtime
|
||||
|
||||
SET @updatesql ='insert into Pvp_Death_Log_'+ @year+'_'+@month
|
||||
+'(log_type, room_id
|
||||
, character_id, character_name, character_class, character_job, character_level
|
||||
, kill_id, kill_name, kill_class, kill_job, kill_level, date )
|
||||
values ('
|
||||
+ '''' +convert(nvarchar, @log_type) + '''' + ','
|
||||
+ '''' +@char_room_id + '''' + ','
|
||||
+ '''' +@char_character_id + '''' + ','
|
||||
+ '''' +@character_name + '''' + ','
|
||||
+ '''' +convert(nvarchar, @character_class )+ '''' + ','
|
||||
+ '''' +convert(nvarchar, @character_job )+ '''' + ','
|
||||
+ '''' +convert(nvarchar, @character_level )+ '''' + ','
|
||||
+ '''' +@char_kill_id + '''' + ','
|
||||
+ '''' +@kill_name + '''' + ','
|
||||
+ '''' +convert(nvarchar, @kill_class )+ '''' + ','
|
||||
+ '''' +convert(nvarchar, @kill_job )+ '''' + ','
|
||||
+ '''' +convert(nvarchar, @kill_level )+ '''' + ','
|
||||
+ '''' +convert(nvarchar, @createtime, 109)+ '''' + ')'
|
||||
EXEC(@updatesql)
|
||||
|
||||
if(@@error <> 0)
|
||||
begin
|
||||
rollback
|
||||
return
|
||||
end
|
||||
|
||||
commit
|
||||
90
decomp/schema/RustyHearts_Log/procs/up_SetPvpResult.sql
Normal file
90
decomp/schema/RustyHearts_Log/procs/up_SetPvpResult.sql
Normal file
|
|
@ -0,0 +1,90 @@
|
|||
CREATE PROCEDURE [dbo].[up_SetPvpResult]
|
||||
@log_type smallint,
|
||||
@auth_id uniqueidentifier,
|
||||
@bcust_id nvarchar(24),
|
||||
@character_id uniqueidentifier,
|
||||
@character_name nvarchar(16),
|
||||
@character_class int,
|
||||
@character_level int,
|
||||
@channel_type int,
|
||||
@room_id uniqueidentifier,
|
||||
@room_world int,
|
||||
@room_type int,
|
||||
@room_map int,
|
||||
@pvp_team smallint,
|
||||
@pvp_score int,
|
||||
@pvp_point int,
|
||||
@pvp_grade int,
|
||||
@pvp_totalscore int,
|
||||
@pvp_totalpoint int,
|
||||
@pvp_rank int,
|
||||
@pvp_kill int,
|
||||
@pvp_die int,
|
||||
@pvp_damage int,
|
||||
@pvp_cleartime int
|
||||
as
|
||||
set nocount on
|
||||
|
||||
|
||||
declare @createtime datetime
|
||||
set @createtime = getdate()
|
||||
|
||||
declare @year varchar(50)
|
||||
declare @month varchar(50)
|
||||
|
||||
set @year = convert(varchar, datepart(yy,@createtime))
|
||||
set @month = convert(varchar, datepart(mm,@createtime))
|
||||
|
||||
set xact_abort on
|
||||
begin tran
|
||||
|
||||
declare @updatesql nvarchar(1500)
|
||||
|
||||
declare @char_auth_id nvarchar(50)
|
||||
declare @char_character_id nvarchar(50)
|
||||
declare @char_pvp_room_id nvarchar(50)
|
||||
|
||||
set @char_auth_id = @auth_id
|
||||
set @char_character_id = @character_id
|
||||
set @char_pvp_room_id = @room_id
|
||||
|
||||
|
||||
-- Battle_Room_Log ??? ??
|
||||
exec Local_CreatePvpResultTable @createtime
|
||||
|
||||
SET @updatesql ='insert into Pvp_Result_Log_'+ @year+'_'
|
||||
+@month+'(log_type, auth_id, bcust_id, character_id, character_name, character_class, character_level, channel_type, room_id, room_world, room_type, PZoneID, pvp_team, pvp_score, pvp_point, pvp_grade, pvp_totalscore, pvp_totalpoint, pvp_rank, pvp_kill, pvp_die, pvp_damage, pvp_cleartime, date )
|
||||
values ('
|
||||
+ '''' +convert(nvarchar, @log_type) + '''' + ','
|
||||
+ '''' +@char_auth_id + '''' + ','
|
||||
+ '''' +@bcust_id + '''' + ','
|
||||
+ '''' +@char_character_id + '''' + ','
|
||||
+ '''' +@character_name + '''' + ','
|
||||
+ '''' +convert(nvarchar, @character_class)+ '''' + ','
|
||||
+ '''' +convert(nvarchar, @character_level)+ '''' + ','
|
||||
+ '''' +convert(nvarchar, @channel_type)+ '''' + ','
|
||||
+ '''' +@char_pvp_room_id + '''' + ','
|
||||
+ '''' +convert(nvarchar, @room_world) + '''' + ','
|
||||
+ '''' +convert(nvarchar, @room_type) + '''' + ','
|
||||
+ '''' +convert(nvarchar, @room_map) + '''' + ','
|
||||
+ '''' +convert(nvarchar, @pvp_team) + '''' + ','
|
||||
+ '''' +convert(nvarchar, @pvp_score) + '''' + ','
|
||||
+ '''' +convert(nvarchar, @pvp_point) + '''' + ','
|
||||
+ '''' +convert(nvarchar, @pvp_grade) + '''' + ','
|
||||
+ '''' +convert(nvarchar, @pvp_totalscore)+ '''' + ','
|
||||
+ '''' +convert(nvarchar, @pvp_totalpoint)+ '''' + ','
|
||||
+ '''' +convert(nvarchar, @pvp_rank) + '''' + ','
|
||||
+ '''' +convert(nvarchar, @pvp_kill) + '''' + ','
|
||||
+ '''' +convert(nvarchar, @pvp_die) + '''' + ','
|
||||
+ '''' +convert(nvarchar, @pvp_damage) + '''' + ','
|
||||
+ '''' +convert(nvarchar, @pvp_cleartime)+ '''' + ','
|
||||
+ '''' +convert(nvarchar, @createtime, 109)+ '''' + ')'
|
||||
EXEC(@updatesql)
|
||||
|
||||
if(@@error <> 0)
|
||||
begin
|
||||
rollback
|
||||
return
|
||||
end
|
||||
|
||||
commit
|
||||
63
decomp/schema/RustyHearts_Log/procs/up_SetPvpRoom.sql
Normal file
63
decomp/schema/RustyHearts_Log/procs/up_SetPvpRoom.sql
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
CREATE PROCEDURE [dbo].[up_SetPvpRoom]
|
||||
@log_type smallint,
|
||||
@auth_id uniqueidentifier,
|
||||
@character_id uniqueidentifier,
|
||||
@character_name nvarchar(16),
|
||||
@channel_type int,
|
||||
@room_id uniqueidentifier,
|
||||
@room_world int,
|
||||
@room_number int,
|
||||
@room_name nvarchar(50)
|
||||
|
||||
as
|
||||
set nocount on
|
||||
|
||||
|
||||
declare @createtime datetime
|
||||
set @createtime = getdate()
|
||||
|
||||
declare @year varchar(50)
|
||||
declare @month varchar(50)
|
||||
|
||||
set @year = convert(varchar, datepart(yy,@createtime))
|
||||
set @month = convert(varchar, datepart(mm,@createtime))
|
||||
|
||||
set xact_abort on
|
||||
begin tran
|
||||
|
||||
declare @updatesql nvarchar(1500)
|
||||
|
||||
declare @char_auth_id nvarchar(50)
|
||||
declare @char_character_id nvarchar(50)
|
||||
declare @char_pvp_room_id nvarchar(50)
|
||||
|
||||
set @char_auth_id = @auth_id
|
||||
set @char_character_id = @character_id
|
||||
set @char_pvp_room_id = @room_id
|
||||
|
||||
|
||||
-- Battle_Room_Log ??? ??
|
||||
exec Local_CreatePvpRoomTable @createtime
|
||||
|
||||
SET @updatesql ='insert into Pvp_Room_Log_'+ @year+'_'
|
||||
+@month+'(log_type, auth_id, character_id, character_name, channel_type, room_id, room_world, room_number, room_name, date )
|
||||
values ('
|
||||
+ '''' +convert(nvarchar, @log_type) + '''' + ','
|
||||
+ '''' +@char_auth_id + '''' + ','
|
||||
+ '''' +@char_character_id + '''' + ','
|
||||
+ '''' +@character_name + '''' + ','
|
||||
+ '''' +convert(nvarchar, @channel_type )+ '''' + ','
|
||||
+ '''' +@char_pvp_room_id + '''' + ','
|
||||
+ '''' +convert(nvarchar, @room_world )+ '''' + ','
|
||||
+ '''' +convert(nvarchar, @room_number )+ '''' + ','
|
||||
+ '''' +@room_name + '''' + ','
|
||||
+ '''' +convert(nvarchar, @createtime, 109)+ '''' + ')'
|
||||
EXEC(@updatesql)
|
||||
|
||||
if(@@error <> 0)
|
||||
begin
|
||||
rollback
|
||||
return
|
||||
end
|
||||
|
||||
commit
|
||||
59
decomp/schema/RustyHearts_Log/procs/up_SetSkillLearn.sql
Normal file
59
decomp/schema/RustyHearts_Log/procs/up_SetSkillLearn.sql
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
CREATE PROCEDURE [dbo].[up_SetSkillLearn]
|
||||
@log_type int
|
||||
,@character_id uniqueidentifier
|
||||
,@skill_table_id int
|
||||
,@skill_level tinyint
|
||||
,@character_class int
|
||||
,@character_level tinyint
|
||||
,@skillpoint_use int
|
||||
,@bcustid nvarchar(16)
|
||||
,@character_name nvarchar(16)
|
||||
|
||||
as
|
||||
set nocount on
|
||||
|
||||
|
||||
declare @createtime datetime
|
||||
set @createtime = getdate()
|
||||
|
||||
declare @year varchar(50)
|
||||
declare @month varchar(50)
|
||||
|
||||
set @year = convert(varchar, datepart(yy,@createtime))
|
||||
set @month = convert(varchar, datepart(mm,@createtime))
|
||||
|
||||
set xact_abort on
|
||||
begin tran
|
||||
|
||||
declare @updatesql nvarchar(1500)
|
||||
|
||||
declare @char_auth_id nvarchar(50)
|
||||
declare @char_character_id nvarchar(50)
|
||||
|
||||
-- Login_Log ??? ??
|
||||
exec Local_CreateLearnSkillTable @createtime
|
||||
|
||||
set @char_character_id = @character_id
|
||||
|
||||
|
||||
SET @updatesql ='insert into LearnSkill_Log_'+ @year+'_'
|
||||
+@month+'(date, log_type, character_id, character_name, skill_table_id, skill_level, character_Class, character_Level, skillpoint_use )
|
||||
values ('
|
||||
+ '''' +convert(nvarchar, @createtime, 109)+ '''' + ','
|
||||
+ '''' +convert(nvarchar, @log_type) + '''' + ','
|
||||
+ '''' +@char_character_id+ '''' + ','
|
||||
+ '''' +@character_name+ '''' + ','
|
||||
+ '''' +convert(nvarchar, @skill_table_id)+ '''' + ','
|
||||
+ '''' +convert(nvarchar, @skill_level)+ '''' + ','
|
||||
+ '''' +convert(nvarchar, @character_class)+ '''' + ','
|
||||
+ '''' +convert(nvarchar, @character_level)+ '''' + ','
|
||||
+ '''' +convert(nvarchar, @skillpoint_use)+ '''' + ')'
|
||||
EXEC(@updatesql)
|
||||
|
||||
if(@@error <> 0)
|
||||
begin
|
||||
rollback
|
||||
return
|
||||
end
|
||||
|
||||
commit
|
||||
77
decomp/schema/RustyHearts_Log/procs/up_Set_Guild_Log.sql
Normal file
77
decomp/schema/RustyHearts_Log/procs/up_Set_Guild_Log.sql
Normal file
|
|
@ -0,0 +1,77 @@
|
|||
CREATE PROCEDURE [dbo].[up_Set_Guild_Log]
|
||||
|
||||
@log_type int
|
||||
,@world_id int
|
||||
,@Guild_id [uniqueidentifier]
|
||||
,@Guild_Name nvarchar(20)
|
||||
,@Guild_Master nvarchar(16)
|
||||
,@Guild_MemberCount int
|
||||
,@Guild_Level int
|
||||
,@Guild_Exp bigint
|
||||
,@Guild_SkillCount smallint
|
||||
,@Guild_Target nvarchar(16)
|
||||
,@Auth_Grade nvarchar(20)
|
||||
,@Guild_Point int
|
||||
|
||||
as
|
||||
set nocount on
|
||||
|
||||
declare @createtime datetime
|
||||
set @createtime = getdate()
|
||||
|
||||
declare @year varchar(50)
|
||||
declare @month varchar(50)
|
||||
|
||||
set @year = convert(varchar, datepart(yy,@createtime))
|
||||
set @month = convert(varchar, datepart(mm,@createtime))
|
||||
|
||||
set xact_abort on
|
||||
begin tran
|
||||
|
||||
declare @updatesql nvarchar(2500)
|
||||
|
||||
declare @char_guild_id nvarchar(50)
|
||||
|
||||
-- Login_Log ??? ??
|
||||
exec Local_CreateGuildTable @createtime
|
||||
|
||||
set @char_guild_id = @Guild_id
|
||||
|
||||
SET @updatesql = 'INSERT INTO tbl_guild_log_' + @year + '_' + @month + '( date
|
||||
,log_type
|
||||
,world_id
|
||||
,Guild_id
|
||||
,Guild_Name
|
||||
,Guild_Master
|
||||
,Guild_Member_Count
|
||||
,Guild_Level
|
||||
,Guild_Exp
|
||||
,Guild_Skill_Count
|
||||
,Guild_Target
|
||||
,Auth_Grade
|
||||
,Guild_Point)
|
||||
VALUES ('
|
||||
+ '''' +convert(nvarchar, @createtime) + '''' + ','
|
||||
+ '''' +convert(nvarchar, @log_type) + '''' + ','
|
||||
+ '''' +convert(nvarchar, @world_id) + '''' + ','
|
||||
+ '''' +@char_guild_id+ '''' + ','
|
||||
+ '''' +@Guild_Name+ '''' + ','
|
||||
+ '''' +convert(nvarchar, @Guild_Master)+ '''' + ','
|
||||
+ '''' +convert(nvarchar, @Guild_MemberCount)+ '''' + ','
|
||||
+ '''' +convert(nvarchar, @Guild_Level)+ '''' + ','
|
||||
+ '''' +convert(nvarchar, @Guild_Exp)+ '''' + ','
|
||||
+ '''' +convert(nvarchar, @Guild_SkillCount)+ '''' +','
|
||||
+ '''' +convert(nvarchar, @Guild_Target)+ '''' +','
|
||||
+ '''' +convert(nvarchar, @Auth_Grade)+ '''' +','
|
||||
+ '''' +convert(nvarchar, @Guild_Point)+ '''' + ')'
|
||||
|
||||
EXEC(@updatesql)
|
||||
|
||||
|
||||
if(@@error <> 0)
|
||||
begin
|
||||
rollback
|
||||
return
|
||||
end
|
||||
|
||||
commit
|
||||
82
decomp/schema/RustyHearts_Log/procs/up_Set_Quest_Log.sql
Normal file
82
decomp/schema/RustyHearts_Log/procs/up_Set_Quest_Log.sql
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
CREATE PROCEDURE [dbo].[up_Set_Quest_Log]
|
||||
|
||||
@log_type int
|
||||
,@world_id int
|
||||
,@auth_id [uniqueidentifier]
|
||||
,@channel_id smallint
|
||||
,@bcust_id nvarchar(24)
|
||||
,@character_id [uniqueidentifier]
|
||||
,@character_name nvarchar(16)
|
||||
,@character_class int
|
||||
,@character_job tinyint
|
||||
,@character_level tinyint
|
||||
,@quest_id int
|
||||
,@quest_type int
|
||||
,@quest_exp int
|
||||
|
||||
|
||||
as
|
||||
set nocount on
|
||||
|
||||
declare @createtime datetime
|
||||
set @createtime = getdate()
|
||||
|
||||
declare @year varchar(50)
|
||||
declare @month varchar(50)
|
||||
|
||||
set @year = convert(varchar, datepart(yy,@createtime))
|
||||
set @month = convert(varchar, datepart(mm,@createtime))
|
||||
|
||||
set xact_abort on
|
||||
begin tran
|
||||
|
||||
declare @char_auth_id nvarchar(50)
|
||||
declare @char_character_id nvarchar(50)
|
||||
|
||||
declare @updatesql nvarchar(2500)
|
||||
|
||||
|
||||
-- Login_Log ??? ??
|
||||
exec Local_CreateQuestTable @createtime
|
||||
|
||||
set @char_auth_id = @auth_id
|
||||
set @char_character_id = @character_id
|
||||
|
||||
SET @updatesql = 'INSERT INTO Quest_log_' + @year + '_' + @month + '( log_type
|
||||
,world_id
|
||||
,auth_id
|
||||
,channel_id
|
||||
,bcust_id
|
||||
,character_id
|
||||
,character_name
|
||||
,character_class
|
||||
,character_job
|
||||
,character_level
|
||||
,quest_id
|
||||
,quest_type
|
||||
,quest_exp)
|
||||
VALUES ('
|
||||
+ '''' +convert(nvarchar,@log_type) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@world_id) + '''' + ','
|
||||
+ '''' +@char_auth_id + '''' + ','
|
||||
+ '''' +convert(nvarchar,@channel_id) + '''' + ','
|
||||
+ '''' +@bcust_id + '''' + ','
|
||||
+ '''' +@char_character_id + '''' + ','
|
||||
+ '''' +@character_name + '''' + ','
|
||||
+ '''' +convert(nvarchar,@character_class) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@character_job) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@character_level) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@quest_id) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@quest_type) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@quest_exp)+ '''' + ')'
|
||||
|
||||
|
||||
EXEC(@updatesql)
|
||||
|
||||
if(@@error <> 0)
|
||||
begin
|
||||
rollback
|
||||
return
|
||||
end
|
||||
|
||||
commit
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
CREATE PROCEDURE [dbo].[up_insert_log_Account]
|
||||
@C1 int,
|
||||
@C2 int,
|
||||
@C3 int,
|
||||
@AuthID [uniqueidentifier],
|
||||
@nam1 nvarchar(16),
|
||||
@CharID [uniqueidentifier],
|
||||
@name nvarchar(16),
|
||||
@S1 int,
|
||||
@S2 int,
|
||||
@S3 int,
|
||||
@S4 int,
|
||||
@S5 int,
|
||||
@S6 int
|
||||
AS
|
||||
|
|
@ -0,0 +1,95 @@
|
|||
CREATE PROCEDURE [dbo].[up_insert_log_auction]
|
||||
@log_type int
|
||||
,@world_id int
|
||||
,@auth_id uniqueidentifier
|
||||
,@character_id uniqueidentifier
|
||||
,@character_name nvarchar(16)
|
||||
,@item_guid uniqueidentifier
|
||||
,@item_id int
|
||||
,@item_header int
|
||||
,@enchant_level tinyint
|
||||
,@item_active int
|
||||
,@socket_count tinyint
|
||||
,@remain_recon tinyint
|
||||
,@durability int
|
||||
,@item_option1 int
|
||||
,@item_option2 int
|
||||
,@item_option3 int
|
||||
,@item_option_value1 int
|
||||
,@item_option_value2 int
|
||||
,@item_option_value3 int
|
||||
,@item_socket_option1 int
|
||||
,@item_socket_option2 int
|
||||
,@item_socket_option3 int
|
||||
,@item_socket_value1 int
|
||||
,@item_socket_value2 int
|
||||
,@item_socket_value3 int
|
||||
,@item_socket_color1 int
|
||||
,@item_socket_color2 int
|
||||
,@item_socket_color3 int
|
||||
,@item_count int
|
||||
,@start_price int
|
||||
,@before_price int
|
||||
,@buy_price int
|
||||
,@guarantee_price int
|
||||
,@commission int
|
||||
,@auction_period int
|
||||
,@before_money int
|
||||
,@after_money int
|
||||
,@change_money int
|
||||
,@target_name nvarchar(16)
|
||||
,@result int
|
||||
|
||||
|
||||
as begin
|
||||
|
||||
set nocount on
|
||||
-------------------------------------------------------
|
||||
|
||||
begin
|
||||
exec RustyHearts_Log.dbo.up_SetAuction @log_type
|
||||
,@world_id
|
||||
,@auth_id
|
||||
,@character_id
|
||||
,@character_name
|
||||
,@item_guid
|
||||
,@item_id
|
||||
,@item_header
|
||||
,@enchant_level
|
||||
,@item_active
|
||||
,@socket_count
|
||||
,@remain_recon
|
||||
,@durability
|
||||
,@item_option1
|
||||
,@item_option2
|
||||
,@item_option3
|
||||
,@item_option_value1
|
||||
,@item_option_value2
|
||||
,@item_option_value3
|
||||
,@item_socket_option1
|
||||
,@item_socket_option2
|
||||
,@item_socket_option3
|
||||
,@item_socket_value1
|
||||
,@item_socket_value2
|
||||
,@item_socket_value3
|
||||
,@item_socket_color1
|
||||
,@item_socket_color2
|
||||
,@item_socket_color3
|
||||
,@item_count
|
||||
,@start_price
|
||||
,@before_price
|
||||
,@buy_price
|
||||
,@guarantee_price
|
||||
,@commission
|
||||
,@auction_period
|
||||
,@before_money
|
||||
,@after_money
|
||||
,@change_money
|
||||
,@target_name
|
||||
,@result
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
SET ANSI_NULLS ON
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
CREATE PROCEDURE [dbo].[up_insert_log_auth_succeed]
|
||||
@AuthID [uniqueidentifier],
|
||||
@server int,
|
||||
@real_ip varchar(16)
|
||||
as begin
|
||||
|
||||
set nocount on
|
||||
|
||||
-------------------------------------------------------
|
||||
-- ?? ?? ?? DB? ???
|
||||
declare @bcust_id nvarchar(30)
|
||||
declare @char_name nvarchar(30)
|
||||
declare @character_id [uniqueidentifier]
|
||||
set @bcust_id = ''
|
||||
set @char_name = ''
|
||||
set @character_id = '00000000-0000-0000-0000-000000000000'
|
||||
|
||||
declare @sql nvarchar(max)
|
||||
|
||||
set @sql = ' select top 1 @bcust_id = WindyCode from openquery([RustyHeartsLinkAuth]
|
||||
, ''select top 1 WindyCode
|
||||
from [RustyHearts_Auth].[dbo].[AuthTable]
|
||||
where AuthID = '''''+convert(varchar(255),@AuthID)+''''''')'
|
||||
select @sql
|
||||
|
||||
begin
|
||||
-- select @bcust_id=WindyCode from [RustyHeartsLinkAuth].[berRustyHeartsAuth].[dbo].[AuthTable] where AuthID = @AuthID
|
||||
|
||||
exec dbo.sp_executesql @sql, N'@bcust_id nvarchar(30) output', @bcust_id output
|
||||
select @bcust_id
|
||||
|
||||
exec RustyHearts_Log.dbo.up_SetConnectionUV 4, @server, @AuthID, @bcust_id,
|
||||
@character_id, @char_name, 0, @real_ip, 0, 0, 0, 0
|
||||
end
|
||||
-------------------------------------------------------
|
||||
|
||||
end
|
||||
|
||||
/****** Object: StoredProcedure [dbo].[up_insert_log_channel_select] Script Date: 04/08/2011 23:10:12 ******/
|
||||
SET ANSI_NULLS ON
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
CREATE PROCEDURE [dbo].[up_insert_log_cashbuy]
|
||||
@log_type int
|
||||
,@auth_id uniqueidentifier
|
||||
,@product_id uniqueidentifier
|
||||
,@productcode int
|
||||
,@productcount int
|
||||
,@bcust_id nvarchar(24)
|
||||
,@character_name nvarchar(16)
|
||||
,@gift_recvname nvarchar(16)
|
||||
,@addopt1 int
|
||||
,@addopt2 int
|
||||
,@addopt3 int
|
||||
|
||||
|
||||
as
|
||||
begin
|
||||
|
||||
set nocount on
|
||||
|
||||
-------------------------------------------------------
|
||||
-- ??????? ?? DB? ???
|
||||
begin
|
||||
exec RustyHearts_Log.dbo.up_SetCashBuy @log_type
|
||||
,@auth_id
|
||||
,@product_id
|
||||
,@productcode
|
||||
,@productcount
|
||||
,@bcust_id
|
||||
,@character_name
|
||||
,@gift_recvname
|
||||
,@addopt1
|
||||
,@addopt2
|
||||
,@addopt3
|
||||
|
||||
|
||||
end
|
||||
-------------------------------------------------------
|
||||
|
||||
end
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
CREATE PROCEDURE [dbo].[up_insert_log_channel_select]
|
||||
@AuthID [uniqueidentifier],
|
||||
@server int,
|
||||
@channelID int,
|
||||
@real_ip varchar(16)
|
||||
as begin
|
||||
|
||||
set nocount on
|
||||
|
||||
-------------------------------------------------------
|
||||
-- ?? ?? ?? DB? ???
|
||||
declare @bcust_id nvarchar(30)
|
||||
declare @char_name nvarchar(30)
|
||||
declare @character_id [uniqueidentifier]
|
||||
set @bcust_id = ''
|
||||
set @char_name = ''
|
||||
set @character_id = '00000000-0000-0000-0000-000000000000'
|
||||
|
||||
declare @sql nvarchar(max)
|
||||
|
||||
set @sql = ' select top 1 @bcust_id = WindyCode from openquery([RustyHeartsLinkAuth]
|
||||
, ''select top 1 WindyCode
|
||||
from [RustyHearts_Auth].[dbo].[AuthTable]
|
||||
where AuthID = '''''+convert(varchar(255),@AuthID)+''''''')'
|
||||
select @sql
|
||||
|
||||
begin
|
||||
-- select @bcust_id=WindyCode from [RustyHeartsLinkAuth].[berRustyHeartsAuth].[dbo].[AuthTable] where AuthID = @AuthID
|
||||
|
||||
exec dbo.sp_executesql @sql, N'@bcust_id nvarchar(30) output', @bcust_id output
|
||||
select @bcust_id
|
||||
|
||||
exec RustyHearts_Log.dbo.up_SetConnectionUV 1, @server, @AuthID, @bcust_id,
|
||||
@character_id, @char_name, @channelID, @real_ip, 0, 0, 0, 0
|
||||
end
|
||||
-------------------------------------------------------
|
||||
|
||||
end
|
||||
|
||||
/****** Object: StoredProcedure [dbo].[up_insert_log_char_in] Script Date: 04/08/2011 23:10:19 ******/
|
||||
SET ANSI_NULLS ON
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
CREATE PROCEDURE [dbo].[up_insert_log_char_in]
|
||||
@AuthID [uniqueidentifier],
|
||||
@CharID [uniqueidentifier],
|
||||
@server int,
|
||||
@channelID int,
|
||||
@name nvarchar(16),
|
||||
@real_ip varchar(24),
|
||||
@inven_gold int,
|
||||
@storage_gold int,
|
||||
@character_level int,
|
||||
@character_exp bigint
|
||||
as begin
|
||||
|
||||
set nocount on
|
||||
|
||||
-------------------------------------------------------
|
||||
-- ?? ?? ?? DB? ???
|
||||
declare @bcust_id nvarchar(30)
|
||||
set @bcust_id = ''
|
||||
|
||||
declare @sql nvarchar(max)
|
||||
|
||||
set @sql = ' select top 1 @bcust_id = WindyCode from openquery([RustyHeartsLinkAuth]
|
||||
, ''select top 1 WindyCode
|
||||
from [RustyHearts_Auth].[dbo].[AuthTable]
|
||||
where AuthID = '''''+convert(varchar(255),@AuthID)+''''''')'
|
||||
select @sql
|
||||
|
||||
begin
|
||||
-- select top 1 @bcust_id=WindyCode from [RustyHeartsLinkAuth].[berRustyHeartsAuth].[dbo].[AuthTable] where AuthID = @AuthID
|
||||
|
||||
exec dbo.sp_executesql @sql, N'@bcust_id nvarchar(30) output', @bcust_id output
|
||||
select @bcust_id
|
||||
|
||||
exec RustyHearts_Log.dbo.up_SetConnectionUV 2, @server, @AuthID, @bcust_id,
|
||||
@CharID, @name, @channelID, @real_ip, @inven_gold, @storage_gold, @character_level, @character_exp
|
||||
end
|
||||
-------------------------------------------------------
|
||||
|
||||
end
|
||||
|
||||
/****** Object: StoredProcedure [dbo].[up_insert_log_char_in_dungeon] Script Date: 04/08/2011 23:10:25 ******/
|
||||
SET ANSI_NULLS ON
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
CREATE PROCEDURE [dbo].[up_insert_log_char_in_dungeon]
|
||||
@AuthID [uniqueidentifier],
|
||||
@CharID [uniqueidentifier],
|
||||
@server int,
|
||||
@channelID int,
|
||||
@name nvarchar(16),
|
||||
@real_ip varchar(24),
|
||||
@inven_gold int,
|
||||
@storage_gold int,
|
||||
@character_level int,
|
||||
@character_exp bigint
|
||||
as begin
|
||||
|
||||
set nocount on
|
||||
|
||||
-------------------------------------------------------
|
||||
-- ?? ?? ?? DB? ???
|
||||
declare @bcust_id nvarchar(30)
|
||||
set @bcust_id = ''
|
||||
|
||||
declare @sql nvarchar(max)
|
||||
|
||||
set @sql = ' select top 1 @bcust_id = WindyCode from openquery([RustyHeartsLinkAuth]
|
||||
, ''select top 1 WindyCode
|
||||
from [RustyHearts_Auth].[dbo].[AuthTable]
|
||||
where AuthID = '''''+convert(varchar(255),@AuthID)+''''''')'
|
||||
select @sql
|
||||
|
||||
begin
|
||||
-- select top 1 @bcust_id=WindyCode from [RustyHeartsLinkAuth].[berRustyHeartsAuth].[dbo].[AuthTable] where AuthID = @AuthID
|
||||
|
||||
exec dbo.sp_executesql @sql, N'@bcust_id nvarchar(30) output', @bcust_id output
|
||||
select @bcust_id
|
||||
|
||||
exec RustyHearts_Log.dbo.up_SetConnectionUV 190, @server, @AuthID, @bcust_id,
|
||||
@CharID, @name, @channelID, @real_ip, @inven_gold, @storage_gold, @character_level, @character_exp
|
||||
end
|
||||
-------------------------------------------------------
|
||||
|
||||
end
|
||||
|
||||
/****** Object: StoredProcedure [dbo].[up_insert_log_character] Script Date: 04/08/2011 23:11:42 ******/
|
||||
SET ANSI_NULLS ON
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
CREATE PROCEDURE [dbo].[up_insert_log_character]
|
||||
@log_type int
|
||||
,@world_id int
|
||||
,@auth_id uniqueidentifier
|
||||
,@channelid smallint
|
||||
,@bcust_id nvarchar(24)
|
||||
,@character_id uniqueidentifier
|
||||
,@character_name nvarchar(16)
|
||||
,@character_class int
|
||||
,@character_Job int
|
||||
,@character_Level int
|
||||
,@guildpoint int
|
||||
,@character_count int
|
||||
,@b_character_name nvarchar(16)
|
||||
,@b_Job int
|
||||
,@b_Level int
|
||||
|
||||
|
||||
as
|
||||
begin
|
||||
|
||||
set nocount on
|
||||
|
||||
-------------------------------------------------------
|
||||
-- ?? ?? ?? DB? ???
|
||||
|
||||
begin
|
||||
exec RustyHearts_Log.dbo.up_SetCharacter
|
||||
@log_type
|
||||
,@world_id
|
||||
,@auth_id
|
||||
,@channelid
|
||||
,@bcust_id
|
||||
,@character_id
|
||||
,@character_name
|
||||
,@character_class
|
||||
,@character_Job
|
||||
,@character_Level
|
||||
,@guildpoint
|
||||
,@character_count
|
||||
,@b_character_name
|
||||
,@b_Job
|
||||
,@b_Level
|
||||
|
||||
|
||||
end
|
||||
-------------------------------------------------------
|
||||
|
||||
end
|
||||
|
||||
/****** Object: StoredProcedure [dbo].[up_insert_log_dungeon] Script Date: 04/08/2011 23:11:49 ******/
|
||||
SET ANSI_NULLS ON
|
||||
39
decomp/schema/RustyHearts_Log/procs/up_insert_log_chat.sql
Normal file
39
decomp/schema/RustyHearts_Log/procs/up_insert_log_chat.sql
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
CREATE PROCEDURE [dbo].[up_insert_log_chat]
|
||||
@log_type int
|
||||
,@world_id int
|
||||
,@auth_id uniqueidentifier
|
||||
,@channel_group int
|
||||
,@channel_num int
|
||||
,@character_id uniqueidentifier
|
||||
,@bcust_id nvarchar(16)
|
||||
,@character_name nvarchar(16)
|
||||
,@chat_target nvarchar(16)
|
||||
,@chats nvarchar(100)
|
||||
|
||||
|
||||
|
||||
|
||||
as
|
||||
begin
|
||||
|
||||
set nocount on
|
||||
|
||||
-------------------------------------------------------
|
||||
-- ??????? ?? DB? ???
|
||||
begin
|
||||
exec RustyHearts_Log.dbo.up_SetChat @log_type
|
||||
,@world_id
|
||||
,@auth_id
|
||||
,@channel_group
|
||||
,@channel_num
|
||||
,@bcust_id
|
||||
,@character_id
|
||||
,@character_name
|
||||
,@chat_target
|
||||
,@chats
|
||||
|
||||
|
||||
end
|
||||
-------------------------------------------------------
|
||||
|
||||
end
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
CREATE PROCEDURE [dbo].[up_insert_log_connection]
|
||||
@log_type smallint,
|
||||
@auth_id [uniqueidentifier],
|
||||
@character_id [uniqueidentifier],
|
||||
@world_id int,
|
||||
@Gold int,
|
||||
@character_name nvarchar(50),
|
||||
@real_ip varchar(16),
|
||||
|
||||
@Otherauth_id int,
|
||||
@Otherbcust_id int,
|
||||
@Other_id int,
|
||||
@Otherch int,
|
||||
@bcust_id nvarchar(50)
|
||||
|
||||
as
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
CREATE PROCEDURE [dbo].[up_insert_log_dungeon]
|
||||
|
||||
@log_type int
|
||||
,@intance_id [uniqueidentifier]
|
||||
,@world_id int
|
||||
,@dungeonid int
|
||||
,@difficulty tinyint
|
||||
,@membercountstart tinyint
|
||||
,@death tinyint
|
||||
,@rebirth tinyint
|
||||
|
||||
as begin
|
||||
|
||||
set nocount on
|
||||
|
||||
-------------------------------------------------------
|
||||
-- ?? ?? ?? DB? ???
|
||||
begin
|
||||
exec RustyHearts_Log.dbo.up_SetDungeon @log_type, @intance_id, @world_id, @dungeonid, @difficulty, @membercountstart, @death, @rebirth
|
||||
end
|
||||
-------------------------------------------------------
|
||||
|
||||
end
|
||||
|
||||
/****** Object: StoredProcedure [dbo].[up_insert_log_dungeon_clear] Script Date: 04/08/2011 23:12:01 ******/
|
||||
SET ANSI_NULLS ON
|
||||
|
|
@ -0,0 +1,68 @@
|
|||
CREATE PROCEDURE [dbo].[up_insert_log_dungeon_clear]
|
||||
@log_type int
|
||||
,@instance_id uniqueidentifier
|
||||
,@bcust_id varchar(24)
|
||||
,@character_id uniqueidentifier
|
||||
,@character_name nvarchar(16)
|
||||
,@character_class int
|
||||
,@character_level int
|
||||
,@membercountclear tinyint
|
||||
,@clearrank nvarchar(4)
|
||||
,@stylishpoint smallint
|
||||
,@hitcount smallint
|
||||
,@chain smallint
|
||||
,@killcount smallint
|
||||
,@cleartime int
|
||||
,@cardid int
|
||||
,@cardrewardid int
|
||||
,@cardrewardcount int
|
||||
,@addexp int
|
||||
,@death tinyint
|
||||
,@rebirth smallint
|
||||
,@replay tinyint
|
||||
,@dungeonid int
|
||||
,@difficulty int
|
||||
,@playpoint int
|
||||
|
||||
as
|
||||
begin
|
||||
|
||||
set nocount on
|
||||
|
||||
-------------------------------------------------------
|
||||
-- ?? ?? ?? DB? ???
|
||||
|
||||
begin
|
||||
exec RustyHearts_Log.dbo.up_SetDungeonClear @log_type
|
||||
,@instance_id
|
||||
,@bcust_id
|
||||
,@character_id
|
||||
,@character_name
|
||||
,@character_class
|
||||
,@character_level
|
||||
,@membercountclear
|
||||
,@clearrank
|
||||
,@stylishpoint
|
||||
,@hitcount
|
||||
,@chain
|
||||
,@killcount
|
||||
,@cleartime
|
||||
,@cardid
|
||||
,@cardrewardid
|
||||
,@cardrewardcount
|
||||
,@addexp
|
||||
,@death
|
||||
,@rebirth
|
||||
,@replay
|
||||
,@dungeonid
|
||||
,@difficulty
|
||||
,@playpoint
|
||||
|
||||
|
||||
end
|
||||
-------------------------------------------------------
|
||||
|
||||
end
|
||||
|
||||
/****** Object: StoredProcedure [dbo].[up_insert_log_gold] Script Date: 04/08/2011 23:12:08 ******/
|
||||
SET ANSI_NULLS ON
|
||||
66
decomp/schema/RustyHearts_Log/procs/up_insert_log_gold.sql
Normal file
66
decomp/schema/RustyHearts_Log/procs/up_insert_log_gold.sql
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
CREATE PROCEDURE [dbo].[up_insert_log_gold]
|
||||
@server int,
|
||||
@date datetime,
|
||||
@AuthID [uniqueidentifier],
|
||||
@CharID [uniqueidentifier],
|
||||
@Name nvarchar(16),
|
||||
@OtherAuthID [uniqueidentifier] = NULL,
|
||||
@OtherCharID [uniqueidentifier] = NULL,
|
||||
@OtherName nvarchar(16) = NULL,
|
||||
@Type smallint,
|
||||
@Gold_Prev int,
|
||||
@Gold_Change int,
|
||||
@Gold_After int,
|
||||
@N1 nvarchar(16),
|
||||
@N2 nvarchar(16)
|
||||
|
||||
as begin
|
||||
|
||||
set nocount on
|
||||
|
||||
-------------------------------------------------------
|
||||
-- ?? ?? ?? DB? ???
|
||||
declare @bcust_id nvarchar(30),
|
||||
@bcust_id2 nvarchar(30)
|
||||
set @bcust_id = ''
|
||||
set @bcust_id2 = ''
|
||||
|
||||
declare @sql nvarchar(max)
|
||||
|
||||
set @sql = ' select top 1 @bcust_id = WindyCode from openquery([RustyHeartsLinkAuth]
|
||||
, ''select top 1 WindyCode
|
||||
from [RustyHearts_Auth].[dbo].[AuthTable]
|
||||
where AuthID = '''''+convert(varchar(255),@AuthID)+''''''')'
|
||||
select @sql
|
||||
|
||||
begin
|
||||
-- select top 1 @bcust_id=WindyCode from [RustyHeartsLinkAuth].[berRustyHeartsAuth].[dbo].[AuthTable] where AuthID = @AuthID
|
||||
|
||||
exec dbo.sp_executesql @sql, N'@bcust_id nvarchar(30) output', @bcust_id output
|
||||
select @bcust_id
|
||||
|
||||
if( @OtherAuthID <> '00000000-0000-0000-0000-000000000000' )
|
||||
begin
|
||||
set @sql = ' select top 1 @bcust_id2 = WindyCode from openquery([RustyHeartsLinkAuth]
|
||||
, ''select top 1 WindyCode
|
||||
from [RustyHearts_Auth].[dbo].[AuthTable]
|
||||
where AuthID = '''''+convert(varchar(255),@OtherAuthID)+''''''')'
|
||||
select @sql
|
||||
|
||||
exec dbo.sp_executesql @sql, N'@bcust_id2 nvarchar(30) output', @bcust_id2 output
|
||||
select @bcust_id2
|
||||
|
||||
-- select top 1 @bcust_id2=WindyCode from [RustyHeartsLinkAuth].[berRustyHeartsAuth].[dbo].[AuthTable] where AuthID = @OtherAuthID
|
||||
|
||||
end
|
||||
|
||||
exec RustyHearts_Log.dbo.up_SetGold @Type, @server, @AuthID, @bcust_id, @CharID, @Name,
|
||||
@OtherAuthID, @bcust_id2, @OtherCharID, @OtherName, @Gold_Prev, @Gold_Change, @Gold_After, @date
|
||||
|
||||
end
|
||||
-------------------------------------------------------
|
||||
|
||||
end
|
||||
|
||||
/****** Object: StoredProcedure [dbo].[up_insert_log_guild] Script Date: 04/08/2011 23:12:18 ******/
|
||||
SET ANSI_NULLS ON
|
||||
43
decomp/schema/RustyHearts_Log/procs/up_insert_log_guild.sql
Normal file
43
decomp/schema/RustyHearts_Log/procs/up_insert_log_guild.sql
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
CREATE PROCEDURE [dbo].[up_insert_log_guild]
|
||||
|
||||
@log_type int
|
||||
,@world_id int
|
||||
,@Guild_id [uniqueidentifier]
|
||||
,@Guild_Name nvarchar(20)
|
||||
,@Guild_Master nvarchar(16)
|
||||
,@Guild_MemberCount int
|
||||
,@Guild_Level int
|
||||
,@Guild_Exp bigint
|
||||
,@Guild_SkillCount smallint
|
||||
,@Guild_Target nvarchar(16)
|
||||
,@Auth_Grade nvarchar(20)
|
||||
,@Guild_Point int
|
||||
|
||||
|
||||
as begin
|
||||
|
||||
set nocount on
|
||||
|
||||
|
||||
begin
|
||||
begin
|
||||
exec RustyHearts_Log.dbo.up_Set_Guild_Log @log_type
|
||||
,@world_id
|
||||
,@Guild_id
|
||||
,@Guild_Name
|
||||
,@Guild_Master
|
||||
,@Guild_MemberCount
|
||||
,@Guild_Level
|
||||
,@Guild_Exp
|
||||
,@Guild_SkillCount
|
||||
,@Guild_Target
|
||||
,@Auth_Grade
|
||||
,@Guild_Point
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
/****** Object: StoredProcedure [dbo].[up_insert_log_inquiry_chatting] Script Date: 04/08/2011 23:12:24 ******/
|
||||
SET ANSI_NULLS ON
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
CREATE PROCEDURE [dbo].[up_insert_log_inquiry_chatting]
|
||||
@world_id int
|
||||
,@inquiry_id int
|
||||
,@chatting_number int
|
||||
,@sender nvarchar(16)
|
||||
,@chatting nvarchar(255)
|
||||
|
||||
as
|
||||
begin
|
||||
|
||||
set nocount on
|
||||
|
||||
-------------------------------------------------------
|
||||
-- ?? ?? ?? DB? ???
|
||||
|
||||
begin
|
||||
exec RustyHearts_Log.dbo.up_SetInquiryChatting
|
||||
@world_id
|
||||
,@inquiry_id
|
||||
,@chatting_number
|
||||
,@sender
|
||||
,@chatting
|
||||
|
||||
end
|
||||
-------------------------------------------------------
|
||||
|
||||
end
|
||||
|
||||
/****** Object: StoredProcedure [dbo].[up_insert_log_inquiry_complete] Script Date: 04/08/2011 23:12:33 ******/
|
||||
SET ANSI_NULLS ON
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
CREATE PROCEDURE [dbo].[up_insert_log_inquiry_complete]
|
||||
@log_id int
|
||||
,@log_type int
|
||||
,@world_id int
|
||||
,@end_status tinyint
|
||||
,@start_status tinyint
|
||||
,@target_bcustno nvarchar(16)
|
||||
,@target_character nvarchar(16)
|
||||
,@GM nvarchar(16)
|
||||
,@former_GM nvarchar(16)
|
||||
,@remain_number tinyint
|
||||
,@inquery_use nvarchar(1)
|
||||
,@group_processing nvarchar(1)
|
||||
,@post_time datetime
|
||||
,@start_time datetime
|
||||
|
||||
as
|
||||
begin
|
||||
|
||||
set nocount on
|
||||
|
||||
-------------------------------------------------------
|
||||
-- ?? ?? ?? DB? ???
|
||||
begin
|
||||
exec RustyHearts_Log.dbo.up_SetInquiryComplete
|
||||
@world_id
|
||||
,@log_id
|
||||
,@log_type
|
||||
,@end_status
|
||||
,@start_status
|
||||
,@target_bcustno
|
||||
,@target_character
|
||||
,@GM
|
||||
,@former_GM
|
||||
,@remain_number
|
||||
,@inquery_use
|
||||
,@group_processing
|
||||
,@post_time
|
||||
,@start_time
|
||||
|
||||
end
|
||||
-------------------------------------------------------
|
||||
|
||||
end
|
||||
|
||||
/****** Object: StoredProcedure [dbo].[up_insert_log_item] Script Date: 04/08/2011 23:12:40 ******/
|
||||
SET ANSI_NULLS ON
|
||||
83
decomp/schema/RustyHearts_Log/procs/up_insert_log_item.sql
Normal file
83
decomp/schema/RustyHearts_Log/procs/up_insert_log_item.sql
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
CREATE PROCEDURE [dbo].[up_insert_log_item]
|
||||
@log_type int
|
||||
,@world_id int
|
||||
,@auth_id uniqueidentifier
|
||||
,@bcust_id nvarchar(24)
|
||||
,@character_id uniqueidentifier
|
||||
,@character_name nvarchar(16)
|
||||
,@item_guid uniqueidentifier
|
||||
,@item_id int
|
||||
,@item_header int
|
||||
,@enchant_level tinyint
|
||||
,@item_active int
|
||||
,@socket_count tinyint
|
||||
,@remain_recon tinyint
|
||||
,@item_option1 int
|
||||
,@item_option2 int
|
||||
,@item_option3 int
|
||||
,@item_count int
|
||||
,@target_itemid int
|
||||
,@before_money int
|
||||
,@after_money int
|
||||
,@change_money int
|
||||
,@result int
|
||||
,@item_option_value1 int
|
||||
,@item_option_value2 int
|
||||
,@item_option_value3 int
|
||||
|
||||
--,@value1 int
|
||||
--,@value2 int
|
||||
--,@value3 int
|
||||
-- ,@value4 int
|
||||
-- ,@value5 int
|
||||
-- ,@value6 int
|
||||
-- ,@value7 int
|
||||
-- ,@value8 int
|
||||
-- ,@value9 int
|
||||
-- ,@value10 int
|
||||
--,@value11 int
|
||||
-- ,@value1 int
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
as begin
|
||||
|
||||
set nocount on
|
||||
-------------------------------------------------------
|
||||
|
||||
begin
|
||||
exec RustyHearts_Log.dbo.up_set_item_log @log_type
|
||||
,@world_id
|
||||
,@auth_id
|
||||
,@bcust_id
|
||||
,@character_id
|
||||
,@character_name
|
||||
,@item_guid
|
||||
,@item_id
|
||||
,@item_header
|
||||
,@enchant_level
|
||||
,@item_active
|
||||
,@socket_count
|
||||
,@remain_recon
|
||||
,@item_option1
|
||||
,@item_option2
|
||||
,@item_option3
|
||||
,@item_count
|
||||
,@target_itemid
|
||||
,@before_money
|
||||
,@after_money
|
||||
,@change_money
|
||||
,@result
|
||||
,@item_option_value1
|
||||
,@item_option_value2
|
||||
,@item_option_value3
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
/****** Object: StoredProcedure [dbo].[up_insert_log_item_enchant] Script Date: 04/08/2011 23:12:49 ******/
|
||||
SET ANSI_NULLS ON
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
CREATE PROCEDURE [dbo].[up_insert_log_item_enchant]
|
||||
@server int,
|
||||
@date datetime,
|
||||
@AuthID [uniqueidentifier],
|
||||
@CharID [uniqueidentifier],
|
||||
@Name nvarchar(16),
|
||||
@Type smallint,
|
||||
@ItemID [uniqueidentifier],
|
||||
@Item_kind int,
|
||||
@enchant_level int,
|
||||
@flag tinyint,
|
||||
@fag nvarchar(50)--2022
|
||||
|
||||
as begin
|
||||
|
||||
set nocount on
|
||||
|
||||
-------------------------------------------------------
|
||||
-- ?? ?? ?? DB? ???
|
||||
declare @bcust_id nvarchar(30)
|
||||
|
||||
declare @sql nvarchar(max)
|
||||
|
||||
set @bcust_id = ''
|
||||
set @sql = ' select top 1 @bcust_id = WindyCode from openquery([RustyHeartsLinkAuth]
|
||||
, ''select top 1 WindyCode
|
||||
from [RustyHearts_Auth].[dbo].[AuthTable]
|
||||
where AuthID = '''''+convert(varchar(255),@AuthID)+''''''')'
|
||||
select @sql
|
||||
|
||||
begin
|
||||
-- select top 1 @bcust_id=WindyCode from [RustyHeartsLinkAuth].[berRustyHeartsAuth].[dbo].[AuthTable] where AuthID = @AuthID
|
||||
exec dbo.sp_executesql @sql, N'@bcust_id nvarchar(30) output', @bcust_id output
|
||||
select @bcust_id
|
||||
|
||||
exec RustyHearts_Log.dbo.up_SetEnchanteItem @Type, @server, @AuthID, @bcust_id, @CharID, @Name,
|
||||
@ItemID, @Item_kind, @enchant_level, @flag
|
||||
end
|
||||
-------------------------------------------------------
|
||||
|
||||
end
|
||||
|
||||
/****** Object: StoredProcedure [dbo].[up_insert_log_itemtrade] Script Date: 04/08/2011 23:12:58 ******/
|
||||
SET ANSI_NULLS ON
|
||||
|
|
@ -0,0 +1,81 @@
|
|||
CREATE PROCEDURE [dbo].[up_insert_log_itemmail]
|
||||
@log_type int
|
||||
,@world_id int
|
||||
,@auth_id uniqueidentifier
|
||||
,@character_id uniqueidentifier
|
||||
,@character_name nvarchar(16)
|
||||
,@item_guid uniqueidentifier
|
||||
,@item_ID int
|
||||
,@item_header int
|
||||
,@enchant_level int
|
||||
,@item_active int
|
||||
,@socket_count tinyint
|
||||
,@item_recon tinyint
|
||||
,@durability int
|
||||
,@item_option1 int
|
||||
,@item_option2 int
|
||||
,@item_option3 int
|
||||
,@item_option_value1 int
|
||||
,@item_option_value2 int
|
||||
,@item_option_value3 int
|
||||
,@item_socket_option1 int
|
||||
,@item_socket_option2 int
|
||||
,@item_socket_option3 int
|
||||
,@item_socket_value1 int
|
||||
,@item_socket_value2 int
|
||||
,@item_socket_value3 int
|
||||
,@item_socket_color1 int
|
||||
,@item_socket_color2 int
|
||||
,@item_socket_color3 int
|
||||
,@item_count int
|
||||
,@before_money int
|
||||
,@after_money int
|
||||
,@change_money int
|
||||
,@target_name nvarchar(16)
|
||||
,@mail_type int
|
||||
|
||||
as
|
||||
begin
|
||||
|
||||
set nocount on
|
||||
begin
|
||||
exec RustyHearts_Log.dbo.up_SetItemMail
|
||||
@log_type
|
||||
,@world_id
|
||||
,@auth_id
|
||||
,@character_id
|
||||
,@character_name
|
||||
,@item_guid
|
||||
,@item_ID
|
||||
,@item_header
|
||||
,@enchant_level
|
||||
,@item_active
|
||||
,@socket_count
|
||||
,@item_recon
|
||||
,@durability
|
||||
,@item_option1
|
||||
,@item_option2
|
||||
,@item_option3
|
||||
,@item_option_value1
|
||||
,@item_option_value2
|
||||
,@item_option_value3
|
||||
,@item_socket_option1
|
||||
,@item_socket_option2
|
||||
,@item_socket_option3
|
||||
,@item_socket_value1
|
||||
,@item_socket_value2
|
||||
,@item_socket_value3
|
||||
,@item_socket_color1
|
||||
,@item_socket_color2
|
||||
,@item_socket_color3
|
||||
,@item_count
|
||||
,@before_money
|
||||
,@after_money
|
||||
,@change_money
|
||||
,@target_name
|
||||
,@mail_type
|
||||
|
||||
end
|
||||
-------------------------------------------------------
|
||||
|
||||
end
|
||||
86
decomp/schema/RustyHearts_Log/procs/up_insert_log_items.sql
Normal file
86
decomp/schema/RustyHearts_Log/procs/up_insert_log_items.sql
Normal file
|
|
@ -0,0 +1,86 @@
|
|||
CREATE PROCEDURE [dbo].[up_insert_log_items]
|
||||
@log_type int
|
||||
,@world_id int
|
||||
,@auth_id uniqueidentifier
|
||||
,@character_id uniqueidentifier
|
||||
,@character_name nvarchar(16)
|
||||
,@item_guid uniqueidentifier
|
||||
,@item_ID int
|
||||
,@item_header int
|
||||
,@enchant_level int
|
||||
,@item_active int
|
||||
,@socket_count tinyint
|
||||
,@item_recon tinyint
|
||||
,@durability int
|
||||
,@item_option1 int
|
||||
,@item_option2 int
|
||||
,@item_option3 int
|
||||
,@item_option_value1 int
|
||||
,@item_option_value2 int
|
||||
,@item_option_value3 int
|
||||
,@item_socket_option1 int
|
||||
,@item_socket_option2 int
|
||||
,@item_socket_option3 int
|
||||
,@item_socket_value1 int
|
||||
,@item_socket_value2 int
|
||||
,@item_socket_value3 int
|
||||
,@item_socket_color1 int
|
||||
,@item_socket_color2 int
|
||||
,@item_socket_color3 int
|
||||
,@item_count int
|
||||
,@before_money int
|
||||
,@after_money int
|
||||
,@change_money int
|
||||
,@before_date int
|
||||
,@after_date int
|
||||
,@result int
|
||||
|
||||
,@value1 int
|
||||
|
||||
|
||||
as
|
||||
begin
|
||||
|
||||
set nocount on
|
||||
begin
|
||||
exec RustyHearts_Log.dbo.up_SetItems
|
||||
@log_type
|
||||
,@world_id
|
||||
,@auth_id
|
||||
,@character_id
|
||||
,@character_name
|
||||
,@item_guid
|
||||
,@item_ID
|
||||
,@item_header
|
||||
,@enchant_level
|
||||
,@item_active
|
||||
,@socket_count
|
||||
,@item_recon
|
||||
,@durability
|
||||
,@item_option1
|
||||
,@item_option2
|
||||
,@item_option3
|
||||
,@item_option_value1
|
||||
,@item_option_value2
|
||||
,@item_option_value3
|
||||
,@item_socket_option1
|
||||
,@item_socket_option2
|
||||
,@item_socket_option3
|
||||
,@item_socket_value1
|
||||
,@item_socket_value2
|
||||
,@item_socket_value3
|
||||
,@item_socket_color1
|
||||
,@item_socket_color2
|
||||
,@item_socket_color3
|
||||
,@item_count
|
||||
,@before_money
|
||||
,@after_money
|
||||
,@change_money
|
||||
,@before_date
|
||||
,@after_date
|
||||
,@result
|
||||
|
||||
end
|
||||
-------------------------------------------------------
|
||||
|
||||
end
|
||||
|
|
@ -0,0 +1,87 @@
|
|||
CREATE PROCEDURE [dbo].[up_insert_log_itemtrade]
|
||||
@log_type int
|
||||
,@world_id int
|
||||
,@auth_id uniqueidentifier
|
||||
,@bcust_id nvarchar(16)
|
||||
,@character_id uniqueidentifier
|
||||
,@character_name nvarchar(16)
|
||||
,@other_auth_id uniqueidentifier
|
||||
,@other_bcust_id nvarchar(16)
|
||||
,@other_character_id uniqueidentifier
|
||||
,@other_character_name nvarchar(16)
|
||||
,@item_guid uniqueidentifier
|
||||
,@item_ID int
|
||||
,@item_header int
|
||||
,@enchant_level int
|
||||
,@item_active int
|
||||
,@socket_count tinyint
|
||||
,@item_recon tinyint
|
||||
,@durability int
|
||||
,@item_option1 int
|
||||
,@item_option2 int
|
||||
,@item_option3 int
|
||||
,@item_option_value1 int
|
||||
,@item_option_value2 int
|
||||
,@item_option_value3 int
|
||||
,@item_socket_option1 int
|
||||
,@item_socket_option2 int
|
||||
,@item_socket_option3 int
|
||||
,@item_socket_value1 int
|
||||
,@item_socket_value2 int
|
||||
,@item_socket_value3 int
|
||||
,@item_socket_color1 int
|
||||
,@item_socket_color2 int
|
||||
,@item_socket_color3 int
|
||||
,@before_money int
|
||||
,@after_money int
|
||||
,@change_money int
|
||||
,@item_count int
|
||||
|
||||
as
|
||||
begin
|
||||
|
||||
set nocount on
|
||||
begin
|
||||
exec RustyHearts_Log.dbo.up_SetItemTrade
|
||||
@log_type
|
||||
,@world_id
|
||||
,@auth_id
|
||||
,@bcust_id
|
||||
,@character_id
|
||||
,@character_name
|
||||
,@other_auth_id
|
||||
,@other_bcust_id
|
||||
,@other_character_id
|
||||
,@other_character_name
|
||||
,@item_guid
|
||||
,@item_ID
|
||||
,@item_header
|
||||
,@enchant_level
|
||||
,@item_active
|
||||
,@socket_count
|
||||
,@item_recon
|
||||
,@durability
|
||||
,@item_option1
|
||||
,@item_option2
|
||||
,@item_option3
|
||||
,@item_option_value1
|
||||
,@item_option_value2
|
||||
,@item_option_value3
|
||||
,@item_socket_option1
|
||||
,@item_socket_option2
|
||||
,@item_socket_option3
|
||||
,@item_socket_value1
|
||||
,@item_socket_value2
|
||||
,@item_socket_value3
|
||||
,@item_socket_color1
|
||||
,@item_socket_color2
|
||||
,@item_socket_color3
|
||||
,@before_money
|
||||
,@after_money
|
||||
,@change_money
|
||||
,@item_count
|
||||
|
||||
end
|
||||
-------------------------------------------------------
|
||||
|
||||
end
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
CREATE PROCEDURE [dbo].[up_insert_log_learnskill]
|
||||
@log_type int
|
||||
,@character_id uniqueidentifier
|
||||
,@skill_table_id int
|
||||
,@skill_level tinyint
|
||||
,@character_class int
|
||||
,@character_level tinyint
|
||||
,@skillpoint_use int
|
||||
,@bcustid nvarchar(16)
|
||||
,@character_name nvarchar(16)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
as
|
||||
begin
|
||||
|
||||
set nocount on
|
||||
|
||||
-------------------------------------------------------
|
||||
-- ??????? ?? DB? ???
|
||||
begin
|
||||
exec RustyHearts_Log.dbo.up_SetSkillLearn @log_type
|
||||
,@character_id
|
||||
,@skill_table_id
|
||||
,@skill_level
|
||||
,@character_class
|
||||
,@character_level
|
||||
,@skillpoint_use
|
||||
,@bcustid
|
||||
,@character_name
|
||||
|
||||
|
||||
|
||||
|
||||
end
|
||||
-------------------------------------------------------
|
||||
|
||||
end
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
CREATE PROCEDURE [dbo].[up_insert_log_level_up]
|
||||
@AuthID [uniqueidentifier],
|
||||
@CharID [uniqueidentifier],
|
||||
@ServerID int,
|
||||
@Time datetime,
|
||||
@Class int,
|
||||
@Level smallint,
|
||||
@name nvarchar(16),
|
||||
@UI nvarchar(16)
|
||||
|
||||
as begin
|
||||
|
||||
set nocount on
|
||||
|
||||
-------------------------------------------------------
|
||||
-- ?? ?? ?? DB? ???
|
||||
declare @bcust_id nvarchar(30)
|
||||
declare @sql nvarchar(max)
|
||||
|
||||
set @bcust_id = ''
|
||||
set @sql = ' select top 1 @bcust_id = WindyCode from openquery([RustyHeartsLinkAuth]
|
||||
, ''select top 1 WindyCode
|
||||
from [RustyHearts_Auth].[dbo].[AuthTable]
|
||||
where AuthID = '''''+convert(varchar(255),@AuthID)+''''''')'
|
||||
select @sql
|
||||
|
||||
begin
|
||||
-- select top 1 @bcust_id=WindyCode from [RustyHeartsLinkAuth].[berRustyHeartsAuth].[dbo].[AuthTable] where AuthID = @AuthID
|
||||
|
||||
exec dbo.sp_executesql @sql, N'@bcust_id nvarchar(30) output', @bcust_id output
|
||||
select @bcust_id
|
||||
|
||||
exec RustyHearts_Log.dbo.up_SetLevelUp 1, @ServerID, @AuthID, @bcust_id,
|
||||
@CharID, @name, @Class, @Level, @Time
|
||||
end
|
||||
-------------------------------------------------------
|
||||
|
||||
end
|
||||
|
||||
/****** Object: StoredProcedure [dbo].[up_insert_log_mcu] Script Date: 04/08/2011 23:13:16 ******/
|
||||
SET ANSI_NULLS ON
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
CREATE PROCEDURE [dbo].[up_insert_log_loginout]
|
||||
@log_type int
|
||||
,@world_id int
|
||||
,@auth_id uniqueidentifier
|
||||
,@channel_group tinyint
|
||||
,@channel_num int
|
||||
,@bcust_id nvarchar(16)
|
||||
,@character_id uniqueidentifier
|
||||
,@character_name nvarchar(16)
|
||||
,@inven_gold int
|
||||
,@storage_gold int
|
||||
,@character_level tinyint
|
||||
,@character_exp int
|
||||
,@targetmap int
|
||||
,@playpoint int
|
||||
,@skillpoint int
|
||||
,@guildpoint int
|
||||
,@coin int
|
||||
|
||||
|
||||
|
||||
as
|
||||
begin
|
||||
|
||||
set nocount on
|
||||
|
||||
-------------------------------------------------------
|
||||
-- ??????? ?? DB? ???
|
||||
begin
|
||||
exec RustyHearts_Log.dbo.up_SetLoginOut @log_type
|
||||
,@world_id
|
||||
,@auth_id
|
||||
,@channel_group
|
||||
,@channel_num
|
||||
,@bcust_id
|
||||
,@character_id
|
||||
,@character_name
|
||||
,@inven_gold
|
||||
,@storage_gold
|
||||
,@character_level
|
||||
,@character_exp
|
||||
,@targetmap
|
||||
,@playpoint
|
||||
,@skillpoint
|
||||
,@guildpoint
|
||||
,@coin
|
||||
|
||||
|
||||
|
||||
end
|
||||
-------------------------------------------------------
|
||||
|
||||
end
|
||||
45
decomp/schema/RustyHearts_Log/procs/up_insert_log_mail.sql
Normal file
45
decomp/schema/RustyHearts_Log/procs/up_insert_log_mail.sql
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
CREATE PROCEDURE [dbo].[up_insert_log_mail]
|
||||
@log_type int
|
||||
,@world_id int
|
||||
,@auth_id uniqueidentifier
|
||||
,@channel_group tinyint
|
||||
,@channel_num int
|
||||
,@mail_id uniqueidentifier
|
||||
,@bcust_id nvarchar(16)
|
||||
,@character_id uniqueidentifier
|
||||
,@character_name nvarchar(16)
|
||||
,@receiver_name nvarchar(16)
|
||||
,@msg nvarchar(50)
|
||||
,@return_day int
|
||||
,@req_gold int
|
||||
|
||||
|
||||
|
||||
as
|
||||
begin
|
||||
|
||||
set nocount on
|
||||
|
||||
-------------------------------------------------------
|
||||
-- ??????? ?? DB? ???
|
||||
begin
|
||||
exec RustyHearts_Log.dbo.up_SetMail @log_type
|
||||
,@world_id
|
||||
,@auth_id
|
||||
,@channel_group
|
||||
,@channel_num
|
||||
,@mail_id
|
||||
,@bcust_id
|
||||
,@character_id
|
||||
,@character_name
|
||||
,@receiver_name
|
||||
,@msg
|
||||
,@return_day
|
||||
,@req_gold
|
||||
|
||||
|
||||
|
||||
end
|
||||
-------------------------------------------------------
|
||||
|
||||
end
|
||||
21
decomp/schema/RustyHearts_Log/procs/up_insert_log_mcu.sql
Normal file
21
decomp/schema/RustyHearts_Log/procs/up_insert_log_mcu.sql
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
CREATE PROCEDURE [dbo].[up_insert_log_mcu]
|
||||
@world_id int,
|
||||
@MCU int
|
||||
|
||||
as begin
|
||||
|
||||
set nocount on
|
||||
|
||||
begin
|
||||
declare @cur_date datetime
|
||||
set @cur_date = getdate()
|
||||
|
||||
begin
|
||||
exec RustyHearts_Log.dbo.Plan_MCUSave 1, @world_id, @MCU, @cur_date
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
/****** Object: StoredProcedure [dbo].[up_insert_log_monitor_command] Script Date: 04/08/2011 23:13:24 ******/
|
||||
SET ANSI_NULLS ON
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
CREATE PROCEDURE [dbo].[up_insert_log_monitor_command]
|
||||
@log_type int
|
||||
,@world_id int
|
||||
,@server_type int
|
||||
,@gm_id nvarchar(16)
|
||||
,@command int
|
||||
,@server_code int
|
||||
|
||||
|
||||
as
|
||||
begin
|
||||
|
||||
set nocount on
|
||||
|
||||
-------------------------------------------------------
|
||||
-- ?? ?? ?? DB? ???
|
||||
|
||||
begin
|
||||
exec RustyHearts_Log.dbo.up_SetMonitorCommand
|
||||
@log_type
|
||||
,@world_id
|
||||
,@server_type
|
||||
,@gm_id
|
||||
,@command
|
||||
,@server_code
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
/****** Object: StoredProcedure [dbo].[up_insert_log_monitor_notice] Script Date: 04/08/2011 23:13:31 ******/
|
||||
SET ANSI_NULLS ON
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
CREATE PROCEDURE [dbo].[up_insert_log_monitor_notice]
|
||||
@log_type int
|
||||
,@world_id int
|
||||
,@target int
|
||||
,@notice_type tinyint
|
||||
,@notice_cycle tinyint
|
||||
,@notice nvarchar(255)
|
||||
,@gm_ID nvarchar(16)
|
||||
|
||||
|
||||
as
|
||||
begin
|
||||
|
||||
set nocount on
|
||||
|
||||
-------------------------------------------------------
|
||||
-- ?? ?? ?? DB? ???
|
||||
|
||||
begin
|
||||
exec RustyHearts_Log.dbo.up_SetMonitorNotice
|
||||
@log_type
|
||||
,@world_id
|
||||
,@target
|
||||
,@notice_type
|
||||
,@notice_cycle
|
||||
,@notice
|
||||
,@gm_ID
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
/****** Object: StoredProcedure [dbo].[up_insert_log_monitor_user] Script Date: 04/08/2011 23:13:40 ******/
|
||||
SET ANSI_NULLS ON
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
CREATE PROCEDURE [dbo].[up_insert_log_monitor_user]
|
||||
@log_type int
|
||||
,@world_id int
|
||||
,@gate int
|
||||
,@lobby int
|
||||
,@dungeon int
|
||||
,@pvp int
|
||||
,@total int
|
||||
|
||||
|
||||
as
|
||||
begin
|
||||
|
||||
set nocount on
|
||||
|
||||
-------------------------------------------------------
|
||||
-- ?? ?? ?? DB? ???
|
||||
begin
|
||||
exec RustyHearts_Log.dbo.up_SetMonitorUser @log_type
|
||||
,@world_id
|
||||
,@gate
|
||||
,@lobby
|
||||
,@dungeon
|
||||
,@pvp
|
||||
,@total
|
||||
|
||||
|
||||
|
||||
|
||||
end
|
||||
-------------------------------------------------------
|
||||
|
||||
end
|
||||
|
||||
/****** Object: StoredProcedure [dbo].[up_insert_log_packet_overload] Script Date: 04/08/2011 23:13:49 ******/
|
||||
SET ANSI_NULLS ON
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
CREATE PROCEDURE [dbo].[up_insert_log_packet_overload]
|
||||
@func_name char(100),
|
||||
@time int
|
||||
as begin
|
||||
|
||||
set nocount on
|
||||
|
||||
-------------------------------------------------------
|
||||
-- ?? ?? ?? DB? ???
|
||||
begin
|
||||
exec RustyHearts_Log.dbo.up_SetPacketOverload @func_name, @time
|
||||
end
|
||||
-------------------------------------------------------
|
||||
|
||||
end
|
||||
|
||||
/****** Object: StoredProcedure [dbo].[up_insert_log_play_time] Script Date: 04/08/2011 23:14:00 ******/
|
||||
SET ANSI_NULLS ON
|
||||
51
decomp/schema/RustyHearts_Log/procs/up_insert_log_pet.sql
Normal file
51
decomp/schema/RustyHearts_Log/procs/up_insert_log_pet.sql
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
CREATE PROCEDURE [dbo].[up_insert_log_pet]
|
||||
@C1 int,
|
||||
@C2 int,
|
||||
@AuthID [uniqueidentifier],
|
||||
@nam1 nvarchar(16),
|
||||
@CharID [uniqueidentifier],
|
||||
@name nvarchar(16),
|
||||
@petID [uniqueidentifier],
|
||||
@petname nvarchar(16),
|
||||
@S1 int,
|
||||
@S2 int,
|
||||
@S3 int,
|
||||
@S4 int,
|
||||
@S5 int,
|
||||
@S6 int,
|
||||
@S7 int,
|
||||
@S8 int,
|
||||
@S9 int,
|
||||
@S10 int,
|
||||
@S11 int,
|
||||
@S12 int,
|
||||
@S13 int,
|
||||
@S14 int,
|
||||
@S15 int,
|
||||
@S16 int,
|
||||
@S17 int,
|
||||
@S18 int,
|
||||
@S19 int,
|
||||
@S20 int,
|
||||
@S21 int,
|
||||
@S22 int,
|
||||
@S23 int,
|
||||
@S24 int,
|
||||
@S25 int,
|
||||
@S26 int,
|
||||
@S27 int,
|
||||
@S28 int,
|
||||
@S29 int,
|
||||
@S30 int,
|
||||
@S31 int,
|
||||
@S32 int,
|
||||
@S33 int,
|
||||
@S34 int,
|
||||
@S35 int,
|
||||
@S36 int,
|
||||
@S37 int,
|
||||
@S38 int,
|
||||
@S39 int,
|
||||
@S40 int,
|
||||
@S41 int
|
||||
AS
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
CREATE PROCEDURE [dbo].[up_insert_log_play_time]
|
||||
@aa int,
|
||||
@server int,
|
||||
@bb int,
|
||||
@AuthID [uniqueidentifier],
|
||||
@nam1 nvarchar(16),
|
||||
@CharID [uniqueidentifier],
|
||||
@nam nvarchar(16),
|
||||
@class int,
|
||||
@level smallint,
|
||||
@StartTime datetime,
|
||||
@EndTime datetime
|
||||
|
||||
as begin
|
||||
|
||||
set nocount on
|
||||
|
||||
-------------------------------------------------------
|
||||
-- ?? ?? ?? DB? ???
|
||||
declare @bcust_id nvarchar(30)
|
||||
declare @char_name nvarchar(30)
|
||||
declare @character_id [uniqueidentifier]
|
||||
declare @sql nvarchar(max)
|
||||
|
||||
set @bcust_id = ''
|
||||
set @char_name = ''
|
||||
set @character_id = @CharID
|
||||
|
||||
|
||||
|
||||
set @sql = ' select top 1 @bcust_id = WindyCode from openquery([RustyHeartsLinkAuth]
|
||||
, ''select top 1 WindyCode
|
||||
from [RustyHearts_Auth].[dbo].[AuthTable]
|
||||
where AuthID = '''''+convert(varchar(255),@AuthID)+''''''')'
|
||||
select @sql
|
||||
|
||||
begin
|
||||
--select top 1 @bcust_id=WindyCode from [RustyHeartsLinkAuth].[berRustyHeartsAuth].[dbo].[AuthTable] where AuthID = @AuthID
|
||||
|
||||
exec dbo.sp_executesql @sql, N'@bcust_id nvarchar(30) output', @bcust_id output
|
||||
select @bcust_id
|
||||
|
||||
exec RustyHearts_Log.dbo.up_SetPlayTime 1, @server, @AuthID, @bcust_id,
|
||||
@character_id, @char_name, @class, @level, 1, @StartTime, @EndTime
|
||||
end
|
||||
-------------------------------------------------------
|
||||
|
||||
end
|
||||
|
||||
/****** Object: StoredProcedure [dbo].[up_insert_log_pvp_battle] Script Date: 04/08/2011 23:14:08 ******/
|
||||
SET ANSI_NULLS ON
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
CREATE PROCEDURE [dbo].[up_insert_log_play_time_copy]
|
||||
@AuthID [uniqueidentifier],
|
||||
@CharID [uniqueidentifier],
|
||||
@server int,
|
||||
@StartTime datetime,
|
||||
@EndTime datetime,
|
||||
@class int,
|
||||
@level smallint
|
||||
|
||||
as begin
|
||||
|
||||
set nocount on
|
||||
|
||||
-------------------------------------------------------
|
||||
-- ?? ?? ?? DB? ???
|
||||
declare @bcust_id nvarchar(30)
|
||||
declare @char_name nvarchar(30)
|
||||
declare @character_id [uniqueidentifier]
|
||||
declare @sql nvarchar(max)
|
||||
|
||||
set @bcust_id = ''
|
||||
set @char_name = ''
|
||||
set @character_id = @CharID
|
||||
|
||||
|
||||
|
||||
set @sql = ' select top 1 @bcust_id = WindyCode from openquery([RustyHeartsLinkAuth]
|
||||
, ''select top 1 WindyCode
|
||||
from [RustyHearts_Auth].[dbo].[AuthTable]
|
||||
where AuthID = '''''+convert(varchar(255),@AuthID)+''''''')'
|
||||
select @sql
|
||||
|
||||
begin
|
||||
--select top 1 @bcust_id=WindyCode from [RustyHeartsLinkAuth].[berRustyHeartsAuth].[dbo].[AuthTable] where AuthID = @AuthID
|
||||
|
||||
exec dbo.sp_executesql @sql, N'@bcust_id nvarchar(30) output', @bcust_id output
|
||||
select @bcust_id
|
||||
|
||||
exec RustyHearts_Log.dbo.up_SetPlayTime 1, @server, @AuthID, @bcust_id,
|
||||
@character_id, @char_name, @class, @level, 1, @StartTime, @EndTime
|
||||
end
|
||||
-------------------------------------------------------
|
||||
|
||||
end
|
||||
|
||||
/****** Object: StoredProcedure [dbo].[up_insert_log_pvp_battle] Script Date: 04/08/2011 23:14:08 ******/
|
||||
SET ANSI_NULLS ON
|
||||
|
|
@ -0,0 +1,69 @@
|
|||
CREATE PROCEDURE [dbo].[up_insert_log_pvp_battle]
|
||||
@log_type smallint,
|
||||
@auth_id uniqueidentifier,
|
||||
@character_id uniqueidentifier,
|
||||
@character_name nvarchar(16),
|
||||
@character_class int,
|
||||
@character_level int,
|
||||
@channel_type int,
|
||||
@room_id uniqueidentifier,
|
||||
@room_world int,
|
||||
@room_type int,
|
||||
@red_leader_id uniqueidentifier,
|
||||
@red_leader_name nvarchar(16),
|
||||
@red_name1 nvarchar(16),
|
||||
@red_name2 nvarchar(16),
|
||||
@red_name3 nvarchar(16),
|
||||
@red_name4 nvarchar(16),
|
||||
@red_kill_count smallint,
|
||||
@red_total_damage int,
|
||||
@blue_leader_id uniqueidentifier,
|
||||
@blue_leader_name nvarchar(16),
|
||||
@blue_name1 nvarchar(16),
|
||||
@blue_name2 nvarchar(16),
|
||||
@blue_name3 nvarchar(16),
|
||||
@blue_name4 nvarchar(16),
|
||||
@blue_kill_count smallint,
|
||||
@blue_total_damage int,
|
||||
@user_start_count smallint,
|
||||
@user_end_count smallint,
|
||||
@win_character_name nvarchar(16),
|
||||
@win_team smallint,
|
||||
@clear_time int,
|
||||
@clear int --2022
|
||||
|
||||
as
|
||||
begin
|
||||
|
||||
set nocount on
|
||||
|
||||
-------------------------------------------------------
|
||||
-- ?? ?? ?? DB? ???
|
||||
declare @bcust_id nvarchar(50)
|
||||
declare @sql nvarchar(max)
|
||||
|
||||
set @sql = ' select top 1 @bcust_id = WindyCode from openquery([RustyHeartsLinkAuth]
|
||||
, ''select top 1 WindyCode
|
||||
from [RustyHearts_Auth].[dbo].[AuthTable]
|
||||
where AuthID = '''''+convert(varchar(255),@auth_id)+''''''')'
|
||||
select @sql
|
||||
begin
|
||||
--select @bcust_id=WindyCode from [RustyHeartsLinkAuth].[berRustyHeartsAuth].[dbo].[AuthTable] where AuthID = @auth_id
|
||||
|
||||
exec dbo.sp_executesql @sql, N'@bcust_id nvarchar(30) output', @bcust_id output
|
||||
select @bcust_id
|
||||
|
||||
exec RustyHearts_Log.dbo.up_SetPvpBattle
|
||||
@log_type, @bcust_id, @character_id, @character_name, @character_class, @character_level,
|
||||
@channel_type, @room_id, @room_world, @room_type, @red_leader_id, @red_leader_name,
|
||||
@red_name1, @red_name2, @red_name3, @red_name4, @red_kill_count, @red_total_damage,
|
||||
@blue_leader_id, @blue_leader_name, @blue_name1, @blue_name2, @blue_name3, @blue_name4,
|
||||
@blue_kill_count, @blue_total_damage, @user_start_count, @user_end_count, @win_character_name,
|
||||
@win_team, @clear_time
|
||||
end
|
||||
-------------------------------------------------------
|
||||
|
||||
end
|
||||
|
||||
/****** Object: StoredProcedure [dbo].[up_insert_log_pvp_death] Script Date: 04/08/2011 23:14:21 ******/
|
||||
SET ANSI_NULLS ON
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue