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
116
decomp/schema/RustyHearts_Log/procs/up_set_item_log.sql
Normal file
116
decomp/schema/RustyHearts_Log/procs/up_set_item_log.sql
Normal file
|
|
@ -0,0 +1,116 @@
|
|||
CREATE PROCEDURE [dbo].[up_set_item_log]
|
||||
@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
|
||||
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)
|
||||
|
||||
|
||||
exec Local_CreateItemTable @createtime
|
||||
|
||||
set @char_auth_id = @auth_id
|
||||
set @char_character_id = @character_id
|
||||
set @char_item_id = @item_guid
|
||||
|
||||
SET @updatesql = 'INSERT INTO Item_Log_' + @year + '_' + @month + '( 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)
|
||||
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_id) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@item_header) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@enchant_level) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@item_active) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@socket_count) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@remain_recon) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@item_option1) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@item_option2) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@item_option3) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@item_count) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@target_itemid) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@before_money) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@after_money) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@change_money) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@result) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@item_option_value1) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@item_option_value2) + '''' + ','
|
||||
+ '''' +convert(nvarchar,@item_option_value3) + '''' + ')'
|
||||
|
||||
|
||||
EXEC(@updatesql)
|
||||
|
||||
if(@@error <> 0)
|
||||
begin
|
||||
rollback
|
||||
return
|
||||
end
|
||||
|
||||
commit
|
||||
Loading…
Add table
Add a link
Reference in a new issue