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
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
|
||||
Loading…
Add table
Add a link
Reference in a new issue