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
46
decomp/schema/RustyHearts/procs/schedule_duel_rank.sql
Normal file
46
decomp/schema/RustyHearts/procs/schedule_duel_rank.sql
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
CREATE PROCEDURE [dbo].[schedule_duel_rank]
|
||||
AS
|
||||
BEGIN
|
||||
delete BattleRank
|
||||
-- 승점 전체
|
||||
insert into BattleRank (rank_type, grade, character_id, char_name, char_class, duel_exp, total_win, total_lose)
|
||||
select top(100) 0, RANK() over(order by duel_exp desc), CT.character_id, CT.Name, CT.Class, BI.duel_exp, BI.total_win, BI.total_lose
|
||||
from BattleInfo BI with (nolock)
|
||||
inner join CharacterTable CT on CT.character_id = BI.character_id
|
||||
where BI.duel_exp > 100
|
||||
-- 승점 프란츠
|
||||
insert into BattleRank (rank_type, grade, character_id, char_name, char_class, duel_exp, total_win, total_lose)
|
||||
select top(100) 1, RANK() over(order by duel_exp desc), CT.character_id, CT.Name, CT.Class, BI.duel_exp, BI.total_win, BI.total_lose
|
||||
from BattleInfo BI with (nolock)
|
||||
inner join CharacterTable CT on CT.character_id = BI.character_id
|
||||
where BI.duel_exp > 100 and CT.Class = 1 or CT.Class = 101 or CT.Class = 102
|
||||
-- 승점 안젤라
|
||||
insert into BattleRank (rank_type, grade, character_id, char_name, char_class, duel_exp, total_win, total_lose)
|
||||
select top(100) 2, RANK() over(order by duel_exp desc), CT.character_id, CT.Name, CT.Class, BI.duel_exp, BI.total_win, BI.total_lose
|
||||
from BattleInfo BI with (nolock)
|
||||
inner join CharacterTable CT on CT.character_id = BI.character_id
|
||||
where BI.duel_exp > 100 and CT.Class =2 or CT.Class = 201 or CT.Class = 202
|
||||
-- 승점 튜드
|
||||
insert into BattleRank (rank_type, grade, character_id, char_name, char_class, duel_exp, total_win, total_lose)
|
||||
select top(100) 3, RANK() over(order by duel_exp desc), CT.character_id, CT.Name, CT.Class, BI.duel_exp, BI.total_win, BI.total_lose
|
||||
from BattleInfo BI with (nolock)
|
||||
inner join CharacterTable CT on CT.character_id = BI.character_id
|
||||
where BI.duel_exp > 100 and CT.Class = 3 or CT.Class = 301 or CT.Class = 302
|
||||
-- 승점 나타샤
|
||||
insert into BattleRank (rank_type, grade, character_id, char_name, char_class, duel_exp, total_win, total_lose)
|
||||
select top(100) 4, RANK() over(order by duel_exp desc), CT.character_id, CT.Name, CT.Class, BI.duel_exp, BI.total_win, BI.total_lose
|
||||
from BattleInfo BI with (nolock)
|
||||
inner join CharacterTable CT on CT.character_id = BI.character_id
|
||||
where BI.duel_exp > 100 and CT.Class = 4 or CT.Class = 401 or CT.Class = 402
|
||||
|
||||
-- 승점 Ladder
|
||||
insert into BattleRank (rank_type, grade, character_id, char_name, char_class, duel_exp, total_win, total_lose)
|
||||
select top(100) 100, RANK() over(order by duel_ladder_exp desc), CT.character_id, CT.Name, CT.Class, BI.duel_ladder_exp, BI.ladder_win, BI.ladder_lose
|
||||
from BattleInfo BI with (nolock)
|
||||
inner join CharacterTable CT on CT.character_id = BI.character_id
|
||||
where BI.duel_ladder_exp > 0 and BI.ladder_win + BI.ladder_lose > 0
|
||||
|
||||
delete from BattleRank where total_win + total_lose = 0
|
||||
|
||||
return 0
|
||||
END
|
||||
195
decomp/schema/RustyHearts/procs/skill_learn_base.sql
Normal file
195
decomp/schema/RustyHearts/procs/skill_learn_base.sql
Normal file
|
|
@ -0,0 +1,195 @@
|
|||
CREATE PROCEDURE [dbo].[skill_learn_base]
|
||||
@char_id [uniqueidentifier],
|
||||
@class int
|
||||
as
|
||||
begin
|
||||
|
||||
set nocount on
|
||||
|
||||
declare @skillid00 nvarchar(50),
|
||||
@skillid01 nvarchar(50),
|
||||
@skillid02 nvarchar(50),
|
||||
@skillid03 nvarchar(50),
|
||||
@skillid04 nvarchar(50),
|
||||
@skillid05 nvarchar(50),
|
||||
@skillid06 nvarchar(50),
|
||||
@skillid07 nvarchar(50),
|
||||
@skillid08 nvarchar(50);
|
||||
|
||||
set @skillid00 = convert( nvarchar(50), newid() );
|
||||
set @skillid01 = convert( nvarchar(50), newid() );
|
||||
set @skillid02 = convert( nvarchar(50), newid() );
|
||||
set @skillid03 = convert( nvarchar(50), newid() );
|
||||
set @skillid04 = convert( nvarchar(50), newid() );
|
||||
set @skillid05 = convert( nvarchar(50), newid() );
|
||||
set @skillid06 = convert( nvarchar(50), newid() );
|
||||
set @skillid07 = convert( nvarchar(50), newid() );
|
||||
set @skillid08 = convert( nvarchar(50), newid() );
|
||||
|
||||
declare @updatesql nvarchar(2500),
|
||||
@char_char_id nvarchar(50);
|
||||
|
||||
set @char_char_id = convert( nvarchar(50), @char_id );
|
||||
|
||||
if @class = 1 or @class = 101 or @class = 102
|
||||
begin
|
||||
|
||||
SET @updatesql = 'insert into [dbo].SkillTable values ( ''' + @skillid00 + ''',''' + @char_char_id + ''', 0, -1, 20001, 1, GetDate(), 1 )'
|
||||
EXEC sp_executesql @updatesql
|
||||
|
||||
|
||||
SET @updatesql = 'insert into [dbo].SkillTable values ( ''' + @skillid01 + ''',''' + @char_char_id + ''', 0, -1, 20051, 1, GetDate(), 1 )'
|
||||
EXEC sp_executesql @updatesql
|
||||
|
||||
|
||||
SET @updatesql = 'insert into [dbo].SkillTable values ( ''' + @skillid02 + ''',''' + @char_char_id + ''', 0, 0, 10001, 1, GetDate(), 1 )';
|
||||
EXEC sp_executesql @updatesql
|
||||
|
||||
|
||||
SET @updatesql = 'insert into [dbo].SkillTable values ( ''' + @skillid03 + ''',''' + @char_char_id + ''', 0, 1, 10002, 1, GetDate(), 1 )';
|
||||
EXEC sp_executesql @updatesql
|
||||
|
||||
|
||||
SET @updatesql = 'insert into [dbo].SkillTable values ( ''' + @skillid04 + ''',''' + @char_char_id + ''', 0, -1, 10051, 1, GetDate(), 1 )';
|
||||
EXEC sp_executesql @updatesql
|
||||
|
||||
|
||||
SET @updatesql = 'insert into [dbo].SkillTable values ( ''' + @skillid05 + ''',''' + @char_char_id + ''', 0, -1, 10052, 1, GetDate(), 1 )';
|
||||
EXEC sp_executesql @updatesql
|
||||
|
||||
end
|
||||
else if @class = 2 or @class = 201 or @class = 202
|
||||
begin
|
||||
|
||||
SET @updatesql = 'insert into [dbo].SkillTable values ( ''' + @skillid00 + ''',''' + @char_char_id + ''', 0, -1, 20051, 1, GetDate(), 1 )';
|
||||
EXEC sp_executesql @updatesql
|
||||
|
||||
SET @updatesql = 'insert into [dbo].SkillTable values ( ''' + @skillid01 + ''',''' + @char_char_id + ''', 0, -1, 60001, 1, GetDate(), 1 )';
|
||||
EXEC sp_executesql @updatesql
|
||||
|
||||
SET @updatesql = 'insert into [dbo].SkillTable values ( ''' + @skillid02 + ''',''' + @char_char_id + ''', 0, 0, 10001, 1, GetDate(), 1 )';
|
||||
EXEC sp_executesql @updatesql
|
||||
|
||||
SET @updatesql = 'insert into [dbo].SkillTable values ( ''' + @skillid03 + ''',''' + @char_char_id + ''', 0, 1, 10002, 1, GetDate(), 1 )';
|
||||
EXEC sp_executesql @updatesql
|
||||
|
||||
SET @updatesql = 'insert into [dbo].SkillTable values ( ''' + @skillid04 + ''',''' + @char_char_id + ''', 0, -1, 10051, 1, GetDate(), 1 )';
|
||||
EXEC sp_executesql @updatesql
|
||||
|
||||
SET @updatesql = 'insert into [dbo].SkillTable values ( ''' + @skillid05 + ''',''' + @char_char_id + ''', 0, -1, 10052, 1, GetDate(), 1 )';
|
||||
EXEC sp_executesql @updatesql
|
||||
|
||||
end
|
||||
else if @class = 3 or @class = 301 or @class = 302
|
||||
begin
|
||||
|
||||
SET @updatesql = 'insert into [dbo].SkillTable values ( ''' + @skillid00 + ''',''' + @char_char_id + ''', 0, -1, 20001, 1, GetDate(), 1 )';
|
||||
EXEC sp_executesql @updatesql
|
||||
|
||||
SET @updatesql = 'insert into [dbo].SkillTable values ( ''' + @skillid01 + ''',''' + @char_char_id + ''', 0, -1, 20002, 1, GetDate(), 1 )';
|
||||
EXEC sp_executesql @updatesql
|
||||
|
||||
SET @updatesql = 'insert into [dbo].SkillTable values ( ''' + @skillid02 + ''',''' + @char_char_id + ''', 0, 0, 10001, 1, GetDate(), 1 )';
|
||||
EXEC sp_executesql @updatesql
|
||||
|
||||
SET @updatesql = 'insert into [dbo].SkillTable values ( ''' + @skillid03 + ''',''' + @char_char_id + ''', 0, 1, 10002, 1, GetDate(), 1 )';
|
||||
EXEC sp_executesql @updatesql
|
||||
|
||||
SET @updatesql = 'insert into [dbo].SkillTable values ( ''' + @skillid04 + ''',''' + @char_char_id + ''', 0, -1, 10051, 1, GetDate(), 1 )';
|
||||
EXEC sp_executesql @updatesql
|
||||
|
||||
SET @updatesql = 'insert into [dbo].SkillTable values ( ''' + @skillid05 + ''',''' + @char_char_id + ''', 0, -1, 10052, 1, GetDate(), 1 )';
|
||||
EXEC sp_executesql @updatesql
|
||||
end
|
||||
else if @class = 4 or @class = 401 or @class = 402
|
||||
begin
|
||||
|
||||
SET @updatesql = 'insert into [dbo].SkillTable values ( ''' + @skillid00 + ''',''' + @char_char_id + ''', 0, -1, 40001, 1, GetDate(), 1 )';
|
||||
EXEC sp_executesql @updatesql
|
||||
|
||||
SET @updatesql = 'insert into [dbo].SkillTable values ( ''' + @skillid01 + ''',''' + @char_char_id + ''', 0, -1, 50001, 1, GetDate(), 1 )';
|
||||
EXEC sp_executesql @updatesql
|
||||
|
||||
SET @updatesql = 'insert into [dbo].SkillTable values ( ''' + @skillid02 + ''',''' + @char_char_id + ''', 0, 0, 10001, 1, GetDate(), 1 )';
|
||||
EXEC sp_executesql @updatesql
|
||||
|
||||
SET @updatesql = 'insert into [dbo].SkillTable values ( ''' + @skillid03 + ''',''' + @char_char_id + ''', 0, 1, 10002, 1, GetDate(), 1 )';
|
||||
EXEC sp_executesql @updatesql
|
||||
|
||||
SET @updatesql = 'insert into [dbo].SkillTable values ( ''' + @skillid04 + ''',''' + @char_char_id + ''', 0, -1, 10051, 1, GetDate(), 1 )';
|
||||
EXEC sp_executesql @updatesql
|
||||
|
||||
SET @updatesql = 'insert into [dbo].SkillTable values ( ''' + @skillid05 + ''',''' + @char_char_id + ''', 0, -1, 10052, 1, GetDate(), 1 )';
|
||||
EXEC sp_executesql @updatesql
|
||||
end
|
||||
|
||||
insert into dbo.QuickSlotExTable
|
||||
values
|
||||
( @char_id, --0
|
||||
0,
|
||||
NULL, --1
|
||||
0, --2
|
||||
NULL, --3
|
||||
0, --4
|
||||
NULL, --5
|
||||
0, --6
|
||||
NULL, --7
|
||||
0, --8
|
||||
NULL, --9
|
||||
0, --10
|
||||
NULL, --11
|
||||
0, --12
|
||||
NULL, --13
|
||||
0, --14
|
||||
NULL, --15
|
||||
2, --16
|
||||
convert( [uniqueidentifier], @skillid00 ), --17
|
||||
2, --18
|
||||
convert( [uniqueidentifier], @skillid01 ), --19
|
||||
0, --20
|
||||
NULL, --21
|
||||
0, --22
|
||||
NULL, --23
|
||||
0, --24
|
||||
NULL, --25
|
||||
0, --26
|
||||
NULL, --1
|
||||
0, --2
|
||||
NULL, --3
|
||||
0, --4
|
||||
NULL, --5
|
||||
0, --6
|
||||
NULL, --7
|
||||
0, --8
|
||||
NULL, --9
|
||||
0, --10
|
||||
NULL, --11
|
||||
0, --12
|
||||
NULL, --13
|
||||
0, --14
|
||||
NULL, --15
|
||||
0, --16
|
||||
NULL, --17
|
||||
0, --18
|
||||
NULL, --19
|
||||
0, --20
|
||||
NULL, --21
|
||||
0, --22
|
||||
NULL, --23
|
||||
0, --24
|
||||
NULL, --25
|
||||
0, --22
|
||||
NULL, --23
|
||||
0, --22
|
||||
NULL, --23
|
||||
0, --22
|
||||
NULL, --23
|
||||
0, --22
|
||||
NULL, --23
|
||||
0, --22
|
||||
NULL, --23
|
||||
0, --24
|
||||
NULL
|
||||
);
|
||||
|
||||
end
|
||||
213
decomp/schema/RustyHearts/procs/up_ItemMove.sql
Normal file
213
decomp/schema/RustyHearts/procs/up_ItemMove.sql
Normal file
|
|
@ -0,0 +1,213 @@
|
|||
CREATE PROCEDURE [dbo].[up_ItemMove]
|
||||
@character_id [uniqueidentifier],
|
||||
@item_uid [uniqueidentifier],
|
||||
|
||||
@item_count int,
|
||||
|
||||
@inven_dest_type tinyint,
|
||||
@inven_dest_page tinyint,
|
||||
@inven_dest_slot tinyint,
|
||||
|
||||
@inven_src_type tinyint,
|
||||
@inven_src_page tinyint,
|
||||
@inven_src_slot tinyint
|
||||
as
|
||||
set nocount on
|
||||
|
||||
declare @char_id nvarchar(50)
|
||||
declare @item_id nvarchar(50)
|
||||
|
||||
declare @TableName_Src nvarchar(50)
|
||||
declare @TableName_Dest nvarchar(50)
|
||||
|
||||
declare @SQL nvarchar(500)
|
||||
|
||||
declare @src_item_count int
|
||||
declare @get_item_code int
|
||||
|
||||
set @get_item_code = 0
|
||||
|
||||
set @char_id = CONVERT(NVARCHAR(50), @character_id)
|
||||
set @item_id = CONVERT(NVARCHAR(50), @item_uid)
|
||||
|
||||
-- 1-인벤, 2-창고, 3-장착
|
||||
if(@inven_src_type = 1)
|
||||
Set @TableName_Src = 'N_InventoryItem'
|
||||
else if(@inven_src_type = 2)
|
||||
Set @TableName_Src = 'N_StorageItem'
|
||||
else if(@inven_src_type = 3)
|
||||
Set @TableName_Src = 'N_EquipItem'
|
||||
else
|
||||
return
|
||||
|
||||
if(@inven_dest_type = 1)
|
||||
Set @TableName_Dest = 'N_InventoryItem'
|
||||
else if(@inven_dest_type = 2)
|
||||
Set @TableName_Dest = 'N_StorageItem'
|
||||
else if(@inven_dest_type = 3)
|
||||
Set @TableName_Dest = 'N_EquipItem'
|
||||
else
|
||||
return
|
||||
|
||||
begin tran
|
||||
|
||||
-- Dest에 아이템이 있는지 알아본다.
|
||||
set @SQL = 'select '
|
||||
+@get_item_code
|
||||
+' = [code] as variable'
|
||||
+'from '
|
||||
+@TableName_Dest
|
||||
+' with (READUNCOMMITTED) where [character_id] ='
|
||||
+@char_id
|
||||
+' and [page_index] = '
|
||||
+@inven_dest_page
|
||||
+' and [slot_index] = '
|
||||
+@inven_dest_slot
|
||||
|
||||
exec(@SQL)
|
||||
|
||||
|
||||
-- dest에 이미 아이템이 있으면 개수를 업데이트 해준다.
|
||||
if(@get_item_code > 0)
|
||||
begin
|
||||
set @SQL = 'update'+ ' '
|
||||
+@TableName_Dest
|
||||
+'set [use_cnt] = '
|
||||
+'[use_cnt]'+@item_count
|
||||
+' where [character_id] ='
|
||||
+@char_id
|
||||
+' and [page_index] = '
|
||||
+@inven_dest_page
|
||||
+' and [slot_index] = '
|
||||
+@inven_dest_slot
|
||||
|
||||
exec(@SQL)
|
||||
end
|
||||
|
||||
-- dest에 아이템이 없으면 인서트 시켜준다.
|
||||
else
|
||||
begin
|
||||
set @SQL = 'insert'+ ' '
|
||||
+@TableName_Dest+ ' '
|
||||
+'[item_uid], '
|
||||
+'[character_id], '
|
||||
+'[auth_id], '
|
||||
+'[page_index], '
|
||||
+'[slot_index], '
|
||||
+'[code], '
|
||||
+'[use_cnt], '
|
||||
+'[remain_time], '
|
||||
+'[create_time], '
|
||||
+'[update_time], '
|
||||
+'[gcode], '
|
||||
+'[durability], '
|
||||
+'[enhance_level], '
|
||||
+'[option_1_code], '
|
||||
+'[option_1_value], '
|
||||
+'[option_2_code], '
|
||||
+'[option_2_value], '
|
||||
+'[option_3_code], '
|
||||
+'[option_3_value], '
|
||||
+'[wa_grade], '
|
||||
+'[identity], '
|
||||
+'[socket_count], '
|
||||
+'[socket_1_code], '
|
||||
+'[socket_1_value], '
|
||||
+'[socket_2_code], '
|
||||
+'[socket_2_value], '
|
||||
+'[socket_3_code], '
|
||||
+'[socket_3_value], '
|
||||
+'[rank], '
|
||||
+'[acquireroute], '
|
||||
+'[physical], '
|
||||
+'[magical], '
|
||||
+'[durabilitymax], '
|
||||
+'[weight]) '
|
||||
+'select '
|
||||
+'[item_uid], '
|
||||
+'[character_id], '
|
||||
+'[auth_id], '
|
||||
+@inven_dest_page
|
||||
+','
|
||||
+@inven_dest_slot
|
||||
+', '
|
||||
+'[code],'
|
||||
+@item_count
|
||||
+', '
|
||||
+'[remain_time], '
|
||||
+'[create_time], '
|
||||
+'[update_time], '
|
||||
+'[gcode], '
|
||||
+'[durability], '
|
||||
+'[enhance_level], '
|
||||
+'[option_1_code], '
|
||||
+'[option_1_value], '
|
||||
+'[option_2_code], '
|
||||
+'[option_2_value], '
|
||||
+'[option_3_code], '
|
||||
+'[option_3_value], '
|
||||
+'[wa_grade], '
|
||||
+'[identity], '
|
||||
+'[socket_count], '
|
||||
+'[socket_1_code], '
|
||||
+'[socket_1_value], '
|
||||
+'[socket_2_code], '
|
||||
+'[socket_2_value], '
|
||||
+'[socket_3_code], '
|
||||
+'[socket_3_value], '
|
||||
+'[rank], '
|
||||
+'[acquireroute], '
|
||||
+'[physical], '
|
||||
+'[magical], '
|
||||
+'[durabilitymax], '
|
||||
+'[weight]'
|
||||
+'from '
|
||||
+@TableName_Src
|
||||
+' where [item_uid] ='
|
||||
+ @item_id
|
||||
|
||||
exec(@SQL)
|
||||
end
|
||||
|
||||
--
|
||||
set @SQL = 'select'+ ' '
|
||||
+@src_item_count+ ' = [use_cnt]'
|
||||
+'from '
|
||||
+@TableName_Src
|
||||
+' with (READUNCOMMITTED) where [item_uid] ='
|
||||
+@item_id
|
||||
|
||||
exec(@SQL)
|
||||
|
||||
-- 모두 옮겼으면 옮긴 아이템을 삭제한다.
|
||||
if @src_item_count <= @item_count
|
||||
begin
|
||||
set @SQL = 'delete from'+ ' '
|
||||
+@TableName_Src
|
||||
+' where [item_uid] ='
|
||||
+@item_id
|
||||
|
||||
exec(@SQL)
|
||||
end
|
||||
-- 특정 몇개만 옮겼으면 개수를 빼준다.
|
||||
else if @src_item_count > @item_count
|
||||
begin
|
||||
set @SQL = 'update'+ ' '
|
||||
+@TableName_Src
|
||||
+'set [use_cnt] = '
|
||||
+@src_item_count-@item_count
|
||||
+' where [item_uid] ='
|
||||
+@item_id
|
||||
|
||||
exec(@SQL)
|
||||
end
|
||||
|
||||
declare @ERR int
|
||||
|
||||
SET @ERR = @@ERROR
|
||||
IF @ERR <> 0 BEGIN
|
||||
RAISERROR('처리오류', 16, 10)
|
||||
IF @@TRANCOUNT <> 0 ROLLBACK
|
||||
RETURN (@ERR)
|
||||
END
|
||||
COMMIT TRAN
|
||||
219
decomp/schema/RustyHearts/procs/up_ItemMoveToMailItem.sql
Normal file
219
decomp/schema/RustyHearts/procs/up_ItemMoveToMailItem.sql
Normal file
|
|
@ -0,0 +1,219 @@
|
|||
CREATE PROCEDURE [dbo].[up_ItemMoveToMailItem]
|
||||
@character_id [uniqueidentifier],
|
||||
@auth_id [uniqueidentifier],
|
||||
@item_id [uniqueidentifier],
|
||||
@use_cnt int,
|
||||
@NewMailID [uniqueidentifier],
|
||||
@slot_index tinyint
|
||||
|
||||
as
|
||||
set nocount on
|
||||
|
||||
declare @src_item_count int
|
||||
declare @new_item_id [uniqueidentifier]
|
||||
select @src_item_count = [use_cnt] from N_InventoryItem with (READUNCOMMITTED) where [item_uid] = @item_id
|
||||
|
||||
begin tran
|
||||
|
||||
if @src_item_count <= @use_cnt
|
||||
begin
|
||||
insert dbo.N_MailItem
|
||||
([item_uid],
|
||||
[character_id],
|
||||
[auth_id],
|
||||
[page_index],
|
||||
[slot_index],
|
||||
[code],
|
||||
[use_cnt],
|
||||
[remain_time],
|
||||
[create_time],
|
||||
[update_time],
|
||||
[gcode],
|
||||
[durability],
|
||||
[enhance_level],
|
||||
[option_1_code],
|
||||
[option_1_value],
|
||||
[option_2_code],
|
||||
[option_2_value],
|
||||
[option_3_code],
|
||||
[option_3_value],
|
||||
[option_group],
|
||||
[ReconNum],
|
||||
[ReconState],
|
||||
[socket_count],
|
||||
[socket_1_code],
|
||||
[socket_1_value],
|
||||
[socket_2_code],
|
||||
[socket_2_value],
|
||||
[socket_3_code],
|
||||
[socket_3_value],
|
||||
[expire_time],
|
||||
[activity_value], --활성석 20100928 jojo
|
||||
[link_id],
|
||||
[socket_1_color],
|
||||
[socket_2_color],
|
||||
[socket_3_color],
|
||||
[rank],
|
||||
[acquireroute],
|
||||
[physical],
|
||||
[magical],
|
||||
[durabilitymax],
|
||||
[weight]
|
||||
)
|
||||
select
|
||||
[item_uid],
|
||||
@character_id,
|
||||
@auth_id,
|
||||
61,--[page_index],
|
||||
@slot_index, --[slot_index],
|
||||
[code],
|
||||
[use_cnt],
|
||||
[remain_time],
|
||||
[create_time],
|
||||
[update_time],
|
||||
[gcode],
|
||||
[durability],
|
||||
[enhance_level],
|
||||
[option_1_code],
|
||||
[option_1_value],
|
||||
[option_2_code],
|
||||
[option_2_value],
|
||||
[option_3_code],
|
||||
[option_3_value],
|
||||
[option_group],
|
||||
[ReconNum],
|
||||
[ReconState],
|
||||
[socket_count],
|
||||
[socket_1_code],
|
||||
[socket_1_value],
|
||||
[socket_2_code],
|
||||
[socket_2_value],
|
||||
[socket_3_code],
|
||||
[socket_3_value],
|
||||
[expire_time],
|
||||
[activity_value], --활성석 20100928 jojo
|
||||
[link_id],
|
||||
[socket_1_color],
|
||||
[socket_2_color],
|
||||
[socket_3_color],
|
||||
[rank],
|
||||
[acquireroute],
|
||||
[physical],
|
||||
[magical],
|
||||
[durabilitymax],
|
||||
[weight]
|
||||
|
||||
from N_InventoryItem where [item_uid] = @item_id
|
||||
|
||||
--메일아이템을 메일과 연결
|
||||
UPDATE [dbo].[N_MailItem] SET [mail_uid] = @NewMailID WHERE [item_uid] = @item_id
|
||||
delete from N_InventoryItem where [item_uid] = @item_id --모두 옮겼으므로 삭제
|
||||
end
|
||||
else
|
||||
begin
|
||||
|
||||
set @new_item_id = NEWID()
|
||||
|
||||
--일부만 옮기는 것은 새로 만들어 준다
|
||||
insert dbo.N_MailItem
|
||||
([item_uid],
|
||||
[character_id],
|
||||
[auth_id],
|
||||
[page_index],
|
||||
[slot_index],
|
||||
[code],
|
||||
[use_cnt],
|
||||
[remain_time],
|
||||
[create_time],
|
||||
[update_time],
|
||||
[gcode],
|
||||
[durability],
|
||||
[enhance_level],
|
||||
[option_1_code],
|
||||
[option_1_value],
|
||||
[option_2_code],
|
||||
[option_2_value],
|
||||
[option_3_code],
|
||||
[option_3_value],
|
||||
[option_group],
|
||||
[ReconNum],
|
||||
[ReconState],
|
||||
[socket_count],
|
||||
[socket_1_code],
|
||||
[socket_1_value],
|
||||
[socket_2_code],
|
||||
[socket_2_value],
|
||||
[socket_3_code],
|
||||
[socket_3_value],
|
||||
[expire_time],
|
||||
[socket_1_color],
|
||||
[socket_2_color],
|
||||
[socket_3_color],
|
||||
[rank],
|
||||
[acquireroute],
|
||||
[physical],
|
||||
[magical],
|
||||
[durabilitymax],
|
||||
[weight],
|
||||
[link_id]
|
||||
)
|
||||
select
|
||||
@new_item_id,
|
||||
@character_id,
|
||||
@auth_id,
|
||||
61,--[page_index],
|
||||
@slot_index, --[slot_index],
|
||||
[code],
|
||||
@use_cnt,
|
||||
[remain_time],
|
||||
GetDate(),
|
||||
[update_time],
|
||||
4, --[gcode], c_nGen_SendMail = 4;
|
||||
[durability],
|
||||
[enhance_level],
|
||||
[option_1_code],
|
||||
[option_1_value],
|
||||
[option_2_code],
|
||||
[option_2_value],
|
||||
[option_3_code],
|
||||
[option_3_value],
|
||||
[option_group],
|
||||
[ReconNum],
|
||||
[ReconState],
|
||||
[socket_count],
|
||||
[socket_1_code],
|
||||
[socket_1_value],
|
||||
[socket_2_code],
|
||||
[socket_2_value],
|
||||
[socket_3_code],
|
||||
[socket_3_value],
|
||||
[expire_time],
|
||||
[socket_1_color],
|
||||
[socket_2_color],
|
||||
[socket_3_color],
|
||||
[rank],
|
||||
[acquireroute],
|
||||
[physical],
|
||||
[magical],
|
||||
[durabilitymax],
|
||||
[weight],
|
||||
'00000000-0000-0000-0000-000000000000'
|
||||
from N_InventoryItem where [item_uid] = @item_id
|
||||
|
||||
--메일아이템을 메일과 연결
|
||||
UPDATE [dbo].[N_MailItem] SET [mail_uid] = @NewMailID WHERE [item_uid] = @new_item_id
|
||||
|
||||
--기존 아이템에서 갯수를 줄인다
|
||||
update [dbo].[N_InventoryItem] Set [use_cnt] = @src_item_count-@use_cnt where [item_uid] = @item_id
|
||||
end
|
||||
|
||||
|
||||
declare @ERR int
|
||||
|
||||
SET @ERR = @@ERROR
|
||||
IF @ERR <> 0 BEGIN
|
||||
RAISERROR('처리오류', 16, 10)
|
||||
IF @@TRANCOUNT <> 0 ROLLBACK
|
||||
RETURN (@ERR)
|
||||
END
|
||||
COMMIT TRAN
|
||||
8
decomp/schema/RustyHearts/procs/up_LogDecrease.sql
Normal file
8
decomp/schema/RustyHearts/procs/up_LogDecrease.sql
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
CREATE PROCEDURE [dbo].[up_LogDecrease]
|
||||
as
|
||||
set nocount on
|
||||
|
||||
|
||||
|
||||
|
||||
DBCC SHRINKfile ([RustyHearts_Log], 10)
|
||||
42
decomp/schema/RustyHearts/procs/up_add_ban.sql
Normal file
42
decomp/schema/RustyHearts/procs/up_add_ban.sql
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
CREATE PROCEDURE [dbo].[up_add_ban]
|
||||
(
|
||||
@character_id [uniqueidentifier],
|
||||
@ban_name nvarchar(16),
|
||||
@ban_memo nvarchar(32)
|
||||
)
|
||||
as
|
||||
set nocount on
|
||||
|
||||
declare @ban_id [uniqueidentifier];
|
||||
declare @ban_class int;
|
||||
|
||||
SET @ban_id = NULL;
|
||||
|
||||
SELECT TOP 1 @ban_id = [character_id], @ban_class = [class] FROM CharacterTable WITH(NOLOCK) WHERE [Name] = @ban_name and Block_Type = 0;
|
||||
IF( @ban_id IS NOT NULL )
|
||||
BEGIN
|
||||
IF not EXISTS ( SELECT TOP 1 character_id FROM FriendTableEx with (READUNCOMMITTED) WHERE character_id = @character_id and friend_id = @ban_id )
|
||||
BEGIN
|
||||
INSERT INTO FriendTableEx VALUES ( @character_id,
|
||||
@ban_id,
|
||||
@ban_name,
|
||||
@ban_class,
|
||||
1,
|
||||
@ban_memo,
|
||||
GetDate()
|
||||
);
|
||||
END
|
||||
ELSE
|
||||
BEGIN
|
||||
UPDATE [FriendTableEx]
|
||||
SET [IsCut] = 1
|
||||
,[CutReason] = @ban_memo
|
||||
WHERE character_id = @character_id and friend_id = @ban_id;
|
||||
END
|
||||
|
||||
SELECT TOP 1 [character_id], [class], [level] FROM CharacterTable WITH(NOLOCK) WHERE [Name] = @ban_name;
|
||||
END
|
||||
ELSE
|
||||
BEGIN
|
||||
SELECT @ban_id, @ban_class, 0
|
||||
END
|
||||
19
decomp/schema/RustyHearts/procs/up_add_character_title.sql
Normal file
19
decomp/schema/RustyHearts/procs/up_add_character_title.sql
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
CREATE PROCEDURE [dbo].[up_add_character_title]
|
||||
@character_id [uniqueidentifier],
|
||||
@new_id [uniqueidentifier],
|
||||
@title_code int,
|
||||
@remain_time int,
|
||||
@expire_time int
|
||||
AS
|
||||
SET NOCOUNT ON
|
||||
|
||||
INSERT INTO CharacterTitle
|
||||
VALUES(
|
||||
@new_id,
|
||||
@character_id,
|
||||
@title_code,
|
||||
@remain_time,
|
||||
@expire_time
|
||||
);
|
||||
|
||||
RETURN @@ERROR
|
||||
56
decomp/schema/RustyHearts/procs/up_add_friend.sql
Normal file
56
decomp/schema/RustyHearts/procs/up_add_friend.sql
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
CREATE PROCEDURE [dbo].[up_add_friend]
|
||||
(
|
||||
@character_id [uniqueidentifier],
|
||||
@friend_name nvarchar(16)
|
||||
)
|
||||
|
||||
|
||||
as
|
||||
set nocount on
|
||||
|
||||
declare @friend_id [uniqueidentifier];
|
||||
declare @friend_class int
|
||||
, @Block_Type tinyint
|
||||
, @friend_level int;
|
||||
set @friend_id = NULL
|
||||
|
||||
select TOP 1 @friend_id = [character_id]
|
||||
, @friend_class = [class]
|
||||
, @friend_level = [level]
|
||||
, @Block_Type = Block_Type
|
||||
from dbo.CharacterTable WITH(READUNCOMMITTED)
|
||||
WHERE [Name] = @friend_name
|
||||
|
||||
IF( @friend_id IS NOT NULL AND @Block_Type = 0 )
|
||||
BEGIN
|
||||
|
||||
if NOT EXISTS ( select TOP 1 character_id
|
||||
from dbo.FriendTableEx WITH(READUNCOMMITTED)
|
||||
where character_id = @character_id
|
||||
and friend_id = @friend_id )
|
||||
BEGIN
|
||||
|
||||
insert into dbo.FriendTableEx
|
||||
values(
|
||||
@character_id,
|
||||
@friend_id,
|
||||
@friend_name,
|
||||
@friend_class,
|
||||
0,
|
||||
'',
|
||||
GetDate()
|
||||
);
|
||||
|
||||
IF EXISTS ( SELECT TOP 1 [character_id] FROM dbo.FriendTableEx WITH(READUNCOMMITTED) WHERE [Name] = @friend_name )
|
||||
BEGIN
|
||||
|
||||
SELECT @friend_id [character_id], @friend_class [class], @friend_level [level]
|
||||
RETURN;
|
||||
|
||||
END
|
||||
END
|
||||
|
||||
END
|
||||
|
||||
SELECT @friend_id , @friend_class , @friend_level
|
||||
RETURN;
|
||||
13
decomp/schema/RustyHearts/procs/up_add_inquiry_count.sql
Normal file
13
decomp/schema/RustyHearts/procs/up_add_inquiry_count.sql
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
CREATE PROCEDURE [dbo].[up_add_inquiry_count]
|
||||
@auth_id uniqueidentifier
|
||||
|
||||
as
|
||||
set nocount on
|
||||
|
||||
--declare @inquiry_count tinyint
|
||||
|
||||
--select @inquiry_count = [InquiryCount] from [RustyHeartsLinkAuth].[RustyHearts_Auth].[dbo].[AuthTable] with (READUNCOMMITTED) where [AuthID] = @auth_id
|
||||
|
||||
--UPDATE [RustyHeartsLinkAuth].[RustyHearts_Auth].[dbo].[AuthTable] SET [InquiryCount] = @inquiry_count + 1 WHERE [AuthID] = @auth_id
|
||||
|
||||
return @@error
|
||||
7
decomp/schema/RustyHearts/procs/up_all_delete_quest.sql
Normal file
7
decomp/schema/RustyHearts/procs/up_all_delete_quest.sql
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
CREATE PROCEDURE [dbo].[up_all_delete_quest]
|
||||
@character_id [uniqueidentifier]
|
||||
|
||||
as
|
||||
set nocount on
|
||||
delete dbo.QuestTable where character_id = @character_id
|
||||
return @@error
|
||||
150
decomp/schema/RustyHearts/procs/up_auctionitemMoveToMailitem.sql
Normal file
150
decomp/schema/RustyHearts/procs/up_auctionitemMoveToMailitem.sql
Normal file
|
|
@ -0,0 +1,150 @@
|
|||
CREATE PROCEDURE [dbo].[up_auctionitemMoveToMailitem]
|
||||
@item_id [uniqueidentifier],
|
||||
@character_id [uniqueidentifier],
|
||||
@auth_id [uniqueidentifier],
|
||||
@page_index int,
|
||||
@slot_index int,
|
||||
@code int,
|
||||
@use_cnt int,
|
||||
@remain_time int,
|
||||
@gcode int,
|
||||
@durability int,
|
||||
@enhance_level int,
|
||||
@option_1_code int,
|
||||
@option_1_value int,
|
||||
@option_2_code int,
|
||||
@option_2_value int,
|
||||
@option_3_code int,
|
||||
@option_3_value int,
|
||||
@OptionGroup int,
|
||||
@ReconNum int,
|
||||
@ReconState int,
|
||||
@Socket_count int,
|
||||
@Socket_1_code int,
|
||||
@Socket_1_value int,
|
||||
@Socket_2_code int,
|
||||
@Socket_2_value int,
|
||||
@Socket_3_code int,
|
||||
@Socket_3_value int,
|
||||
@expire_time int,
|
||||
@NewMailID [uniqueidentifier],
|
||||
@activity_value int, --활성석 20100928 jojo
|
||||
@socket_1_color tinyint,
|
||||
@socket_2_color tinyint,
|
||||
@socket_3_color tinyint,
|
||||
@rank tinyint,
|
||||
@acquireroute tinyint,
|
||||
@physical int,
|
||||
@magical int,
|
||||
@durabilitymax int,
|
||||
@weight int
|
||||
|
||||
as
|
||||
set nocount on
|
||||
set xact_abort on
|
||||
|
||||
begin tran
|
||||
begin
|
||||
insert dbo.N_MailItem
|
||||
(
|
||||
[item_uid],
|
||||
[mail_uid],
|
||||
[character_id],
|
||||
[auth_id],
|
||||
[page_index],
|
||||
[slot_index],
|
||||
[code],
|
||||
[use_cnt],
|
||||
[remain_time],
|
||||
[create_time],
|
||||
[update_time],
|
||||
[gcode],
|
||||
[durability],
|
||||
[enhance_level],
|
||||
[option_1_code],
|
||||
[option_1_value],
|
||||
[option_2_code],
|
||||
[option_2_value],
|
||||
[option_3_code],
|
||||
[option_3_value],
|
||||
[option_group],
|
||||
[ReconNum],
|
||||
[ReconState],
|
||||
[socket_count],
|
||||
[socket_1_code],
|
||||
[socket_1_value],
|
||||
[socket_2_code],
|
||||
[socket_2_value],
|
||||
[socket_3_code],
|
||||
[socket_3_value],
|
||||
[expire_time],
|
||||
[activity_value], --활성석 20100928 jojo
|
||||
[socket_1_color], -- 소켓
|
||||
[socket_2_color],
|
||||
[socket_3_color],
|
||||
[rank],
|
||||
[acquireroute],
|
||||
[physical],
|
||||
[magical],
|
||||
[durabilitymax],
|
||||
[weight],
|
||||
[link_id]
|
||||
)
|
||||
values(
|
||||
@item_id,
|
||||
@NewMailID,
|
||||
@character_id,
|
||||
@auth_id,
|
||||
61,
|
||||
0,
|
||||
@code,
|
||||
@use_cnt,
|
||||
@remain_time,
|
||||
getdate(),
|
||||
getdate(),
|
||||
@gcode,
|
||||
@durability,
|
||||
@enhance_level,
|
||||
@option_1_code,
|
||||
@option_1_value,
|
||||
@option_2_code,
|
||||
@option_2_value,
|
||||
@option_3_code,
|
||||
@option_3_value,
|
||||
@OptionGroup,
|
||||
@ReconNum,
|
||||
@ReconState,
|
||||
@socket_count,
|
||||
@socket_1_code,
|
||||
@socket_1_value,
|
||||
@socket_2_code,
|
||||
@socket_2_value,
|
||||
@socket_3_code,
|
||||
@socket_3_value,
|
||||
@expire_time,
|
||||
@activity_value, --활성석 20100928 jojo
|
||||
@socket_1_color,
|
||||
@socket_2_color,
|
||||
@socket_3_color,
|
||||
@rank,
|
||||
@acquireroute,
|
||||
@physical,
|
||||
@magical,
|
||||
@durabilitymax,
|
||||
@weight,
|
||||
'00000000-0000-0000-0000-000000000000'
|
||||
)
|
||||
|
||||
--메일아이템을 메일과 연결
|
||||
UPDATE [dbo].[N_MailItem] SET [mail_uid] = @NewMailID WHERE [item_uid] = @item_id
|
||||
delete from N_InventoryItem where [item_uid] = @item_id --모두 옮겼으므로 삭제
|
||||
end
|
||||
|
||||
declare @ERR int
|
||||
SET @ERR = @@ERROR
|
||||
IF @ERR <> 0 BEGIN
|
||||
RAISERROR('처리오류', 16, 10)
|
||||
IF @@TRANCOUNT <> 0 ROLLBACK
|
||||
RETURN (@ERR)
|
||||
END
|
||||
COMMIT TRAN
|
||||
138
decomp/schema/RustyHearts/procs/up_char_sanction.sql
Normal file
138
decomp/schema/RustyHearts/procs/up_char_sanction.sql
Normal file
|
|
@ -0,0 +1,138 @@
|
|||
CREATE PROCEDURE [dbo].[up_char_sanction]
|
||||
@kind tinyint, -- 1 : sanction, 2:release
|
||||
@sanction_uid uniqueidentifier,
|
||||
@personnel nvarchar(50),
|
||||
@releaser nvarchar(50),
|
||||
@comment nvarchar(128),
|
||||
@character_id uniqueidentifier,
|
||||
@sanction_type tinyint,
|
||||
@sanction_count tinyint,
|
||||
@sanction_period_type tinyint
|
||||
as
|
||||
set nocount on
|
||||
|
||||
begin tran
|
||||
|
||||
declare @get_uid uniqueidentifier,
|
||||
@period int,
|
||||
@cur_time datetime,
|
||||
@end_time datetime,
|
||||
@new_uid uniqueidentifier,
|
||||
@is_insert tinyint
|
||||
|
||||
set @get_uid = '00000000-0000-0000-0000-000000000000'
|
||||
|
||||
if @sanction_period_type = 1 set @period = 3
|
||||
if @sanction_period_type = 2 set @period = 7
|
||||
if @sanction_period_type = 3 set @period = 10
|
||||
if @sanction_period_type = 4 set @period = 15
|
||||
if @sanction_period_type = 5 set @period = -1
|
||||
|
||||
-- select @get_uid=uid from Character_Sanction where
|
||||
-- character_id = @character_id and sanction_count=@sanction_count
|
||||
|
||||
set @cur_time = getdate()
|
||||
if @sanction_type <> 5
|
||||
begin
|
||||
set @end_time = dateadd(day, @period, @cur_time)
|
||||
end
|
||||
else
|
||||
begin
|
||||
set @end_time = NULL
|
||||
end
|
||||
|
||||
set @new_uid = '00000000-0000-0000-0000-000000000000'
|
||||
set @is_insert = 0
|
||||
|
||||
if @kind = 1
|
||||
begin
|
||||
if @get_uid <> '00000000-0000-0000-0000-000000000000'
|
||||
begin
|
||||
set @new_uid = @get_uid
|
||||
set @is_insert = 1
|
||||
update Character_Sanction set
|
||||
sanction_type = @sanction_type,
|
||||
sanction_count = @sanction_count,
|
||||
sanction_period_type = @sanction_period_type,
|
||||
period = @period,
|
||||
start_time = @cur_time,
|
||||
end_time = @end_time,
|
||||
personnel = @personnel,
|
||||
releaser = '', -- Rlease init
|
||||
comment = '',
|
||||
is_apply = 1,
|
||||
reg_date = @cur_time
|
||||
where uid = @get_uid
|
||||
end
|
||||
else
|
||||
begin
|
||||
set @new_uid = NEWID()
|
||||
set @is_insert = 1
|
||||
insert into Character_Sanction(
|
||||
uid,
|
||||
sanction_type,
|
||||
sanction_count,
|
||||
sanction_period_type,
|
||||
period,
|
||||
character_id,
|
||||
start_time,
|
||||
end_time,
|
||||
personnel,
|
||||
releaser,
|
||||
comment,
|
||||
is_apply,
|
||||
reg_date)
|
||||
values(
|
||||
@new_uid,
|
||||
@sanction_type,
|
||||
@sanction_count,
|
||||
@sanction_period_type,
|
||||
@period,
|
||||
@character_id,
|
||||
@cur_time,
|
||||
@end_time,
|
||||
@personnel,
|
||||
'', -- Rlease init
|
||||
'',
|
||||
1,
|
||||
@cur_time)
|
||||
end
|
||||
end
|
||||
else
|
||||
begin
|
||||
set @new_uid = @sanction_uid
|
||||
set @is_insert = 0
|
||||
|
||||
select @new_uid = uid from Character_Sanction with (READUNCOMMITTED) where
|
||||
character_id = @character_id and is_apply = 1
|
||||
|
||||
update Character_Sanction set
|
||||
releaser = @releaser,
|
||||
comment = @comment,
|
||||
is_apply = 0
|
||||
where character_id = @character_id
|
||||
|
||||
-- where uid = @sanction_uid
|
||||
end
|
||||
|
||||
if EXISTS (select uid from Character_Sanction with (READUNCOMMITTED) where
|
||||
character_id = @character_id and is_apply = 1)
|
||||
begin
|
||||
update CharacterTable set Block_YN = 'Y' where character_id=@character_id
|
||||
end
|
||||
else
|
||||
begin
|
||||
update CharacterTable set Block_YN = 'N' where character_id=@character_id
|
||||
end
|
||||
|
||||
declare @ERR int
|
||||
|
||||
SET @ERR = @@ERROR
|
||||
IF @ERR <> 0 BEGIN
|
||||
RAISERROR('처리오류', 16, 10)
|
||||
IF @@TRANCOUNT <> 0 ROLLBACK
|
||||
RETURN (@ERR)
|
||||
END
|
||||
COMMIT TRAN
|
||||
|
||||
select NEW_ID = @new_uid, IS_INSERT = @is_insert
|
||||
22
decomp/schema/RustyHearts/procs/up_character_rob.sql
Normal file
22
decomp/schema/RustyHearts/procs/up_character_rob.sql
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
CREATE PROCEDURE [dbo].[up_character_rob]
|
||||
@bcust_id nvarchar(50),
|
||||
@auth_id [uniqueidentifier],
|
||||
@name nvarchar(16)
|
||||
|
||||
as begin
|
||||
|
||||
set nocount on
|
||||
|
||||
declare @char_id uniqueidentifier
|
||||
--declare @WindyCode nvarchar(50)
|
||||
|
||||
select @char_id = character_id from CharacterTable with (READUNCOMMITTED) where [name] = @name
|
||||
--select @WindyCode = WindyCode from [RustyHeartsLinkAuth].[RustyHearts_Auth].[dbo].[AuthTable] with (READUNCOMMITTED) where AuthID = @auth_id
|
||||
|
||||
-- 사용할수 있는 이름인지 체크.
|
||||
UPDATE [dbo].[CharacterTable]
|
||||
SET
|
||||
[bcust_id] = @bcust_id --@WindyCode
|
||||
,[AuthID] = @auth_id
|
||||
WHERE character_id = @char_id
|
||||
end
|
||||
|
|
@ -0,0 +1,135 @@
|
|||
CREATE PROCEDURE [dbo].[up_create_account_storage_item]
|
||||
@auth_id [uniqueidentifier],
|
||||
@page_index int,
|
||||
@slot_index int,
|
||||
@item_id [uniqueidentifier],
|
||||
@code int,
|
||||
@use_cnt int,
|
||||
@remain_time int,
|
||||
@gcode int,
|
||||
@durability int,
|
||||
@enhance_level int,
|
||||
@option_1_code int,
|
||||
@option_1_value int,
|
||||
@option_2_code int,
|
||||
@option_2_value int,
|
||||
@option_3_code int,
|
||||
@option_3_value int,
|
||||
@OptionGroup int,
|
||||
@ReconNum int,
|
||||
@ReconState int,
|
||||
@Socket_count int,
|
||||
@Socket_1_code int,
|
||||
@Socket_1_value int,
|
||||
@Socket_2_code int,
|
||||
@Socket_2_value int,
|
||||
@Socket_3_code int,
|
||||
@Socket_3_value int,
|
||||
--시간제 관련 추가 20102519 jojo
|
||||
@expire_time int,
|
||||
@activity_value int, --활성석 20100928 jojo
|
||||
@socket_1_color tinyint,
|
||||
@socket_2_color tinyint,
|
||||
@socket_3_color tinyint,
|
||||
@rank tinyint,
|
||||
@acquireroute tinyint,
|
||||
@physical int,
|
||||
@magical int,
|
||||
@durabilitymax int,
|
||||
@weight int
|
||||
as
|
||||
set nocount on
|
||||
|
||||
begin
|
||||
begin tran
|
||||
INSERT tbl_account_storage( item_uid
|
||||
,auth_id
|
||||
,page_index
|
||||
,slot_index
|
||||
,code
|
||||
,use_cnt
|
||||
,remain_time
|
||||
,create_time
|
||||
,update_time
|
||||
,gcode
|
||||
,durability
|
||||
,enhance_level
|
||||
,option_1_code
|
||||
,option_1_value
|
||||
,option_2_code
|
||||
,option_2_value
|
||||
,option_3_code
|
||||
,option_3_value
|
||||
,option_group
|
||||
,ReconNum
|
||||
,ReconState
|
||||
,socket_count
|
||||
,socket_1_code
|
||||
,socket_1_value
|
||||
,socket_2_code
|
||||
,socket_2_value
|
||||
,socket_3_code
|
||||
,socket_3_value
|
||||
,expire_time
|
||||
,activity_value --활성석 20100928 jojo
|
||||
,socket_1_color
|
||||
,socket_2_color
|
||||
,socket_3_color
|
||||
,rank
|
||||
,acquireroute
|
||||
,physical
|
||||
,magical
|
||||
,durabilitymax
|
||||
,weight
|
||||
) VALUES( @item_id
|
||||
,@auth_id
|
||||
,@page_index
|
||||
,@slot_index
|
||||
,@code
|
||||
,@use_cnt
|
||||
,@remain_time
|
||||
,GetDate()
|
||||
,GetDate()
|
||||
,@gcode
|
||||
,@durability
|
||||
,@enhance_level
|
||||
,@option_1_code
|
||||
,@option_1_value
|
||||
,@option_2_code
|
||||
,@option_2_value
|
||||
,@option_3_code
|
||||
,@option_3_value
|
||||
,@OptionGroup
|
||||
,@ReconNum
|
||||
,@ReconState
|
||||
,@Socket_count
|
||||
,@Socket_1_code
|
||||
,@Socket_1_value
|
||||
,@Socket_2_code
|
||||
,@Socket_2_value
|
||||
,@Socket_3_code
|
||||
,@Socket_3_value
|
||||
,@expire_time
|
||||
,@activity_value --활성석 20100928 jojo
|
||||
,@socket_1_color
|
||||
,@socket_2_color
|
||||
,@socket_3_color
|
||||
,@rank
|
||||
,@acquireroute
|
||||
,@physical
|
||||
,@magical
|
||||
,@durabilitymax
|
||||
,@weight
|
||||
)
|
||||
|
||||
if(@@error <> 0)
|
||||
begin
|
||||
rollback
|
||||
return
|
||||
end
|
||||
delete from N_InventoryItem where [item_uid] = @item_id --모두 옮겼으므로 삭제
|
||||
|
||||
commit
|
||||
|
||||
|
||||
end
|
||||
25
decomp/schema/RustyHearts/procs/up_create_booth.sql
Normal file
25
decomp/schema/RustyHearts/procs/up_create_booth.sql
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
CREATE PROCEDURE [dbo].[up_create_booth]
|
||||
@character_id [uniqueidentifier]
|
||||
|
||||
as
|
||||
set nocount on
|
||||
|
||||
insert into dbo.ItemBoothTable
|
||||
values
|
||||
( @character_id, --0
|
||||
4,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
);
|
||||
|
||||
return @@error
|
||||
118
decomp/schema/RustyHearts/procs/up_create_character.sql
Normal file
118
decomp/schema/RustyHearts/procs/up_create_character.sql
Normal file
|
|
@ -0,0 +1,118 @@
|
|||
CREATE PROCEDURE [dbo].[up_create_character]
|
||||
@bcust_id nvarchar(50),
|
||||
@auth_id [uniqueidentifier],
|
||||
@char_id [uniqueidentifier],
|
||||
@name nvarchar(16),
|
||||
@class int,
|
||||
@server smallint,
|
||||
@lobby_id int
|
||||
as
|
||||
begin
|
||||
|
||||
declare @get_AuthID [uniqueidentifier]
|
||||
--declare @bcust_id nvarchar(50)
|
||||
|
||||
set @get_AuthID = NULL
|
||||
|
||||
set nocount on
|
||||
|
||||
--select @bcust_id = WindyCode from [RustyHeartsLinkAuth].[RustyHearts_Auth].[dbo].[AuthTable] with (READUNCOMMITTED) where AuthID = @auth_id;
|
||||
|
||||
BEGIN TRAN
|
||||
declare @out_first_char int;
|
||||
SET @out_first_char = 0;
|
||||
|
||||
select @get_AuthID = AuthID from KeyMapTable with (READUNCOMMITTED) where AuthID = @auth_id;
|
||||
if( @get_AuthID IS NULL )
|
||||
begin
|
||||
SET @out_first_char = 255;
|
||||
insert into KeyMapTable
|
||||
values( @auth_id, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 );
|
||||
end
|
||||
|
||||
-- 사용할수 있는 이름인지 체크.
|
||||
if EXISTS (select character_id from CharacterTable with (READUNCOMMITTED) WHERE [Name] = @name)
|
||||
begin
|
||||
SET @out_first_char = -1;
|
||||
select FIRST_CHARACTER = @out_first_char;
|
||||
|
||||
ROLLBACK TRAN
|
||||
return;
|
||||
end
|
||||
|
||||
insert into CharacterTable
|
||||
values( @char_id, --character_id
|
||||
@bcust_id,
|
||||
@auth_id, --AuthID
|
||||
@server, --server
|
||||
@name, --Name
|
||||
@class, --Class
|
||||
0, --Job
|
||||
1, --Level
|
||||
0, --Experience
|
||||
0, --Stamina
|
||||
0, --SP
|
||||
0, --Total_SP
|
||||
1000, --Fatigue
|
||||
@lobby_id, --LobbyID 엘마에서->상가로 변경
|
||||
1, --StartPoint
|
||||
0, --gold
|
||||
4000000, --individual_roomID
|
||||
NULL, --GuildID
|
||||
GETDATE(), --CreateTime
|
||||
GETDATE(), --LastLogin
|
||||
10, --Coin
|
||||
1, --first_login
|
||||
1, --tutotial
|
||||
0, --give_up
|
||||
0, --Block_Type
|
||||
'N', --Block_YN
|
||||
'N', --IsConnect
|
||||
0, --storage_gold
|
||||
12, --storage_count
|
||||
'Y', --IsTradeEnable
|
||||
0, --Expire_Time
|
||||
0, --event_fatigue
|
||||
0, --event_hearts
|
||||
0, --dice_point
|
||||
0, --Addition_HP
|
||||
0, --Addition_MP
|
||||
0, --Addition_Physic_Attack
|
||||
0, --Addition_Physic_Defense
|
||||
0, --Addition_Magic_Attack
|
||||
0, --Addition_Magic_Defense
|
||||
0, --Permission
|
||||
0, --FatigueStorage
|
||||
0, --DayAttachGold
|
||||
0, --DayAttachItem
|
||||
0, --ReservedGuildPoint jojo
|
||||
0, --event_fortune
|
||||
1, --fortune
|
||||
'N', --IsMoveEnable
|
||||
0, --event_mailattach
|
||||
0, --tutorial_step
|
||||
0, --daypartymission
|
||||
0, --event_daypartymission
|
||||
0); --time_sp
|
||||
|
||||
exec [skill_learn_base] @char_id, @class
|
||||
|
||||
-- pvp 테이블 생성
|
||||
insert into dbo.BattleInfo (character_id, char_class, duel_ladder_exp) values( @char_id, @class, 1000 );
|
||||
|
||||
select FIRST_CHARACTER = @out_first_char, * from CharacterTable with (READUNCOMMITTED) where character_id = @char_id;
|
||||
|
||||
declare @ERR int
|
||||
SET @ERR = @@ERROR
|
||||
IF @ERR <> 0 BEGIN
|
||||
RAISERROR('처리오류', 16, 10)
|
||||
IF @@TRANCOUNT <> 0
|
||||
BEGIN
|
||||
ROLLBACK TRAN
|
||||
END
|
||||
|
||||
RETURN
|
||||
END
|
||||
COMMIT TRAN
|
||||
end
|
||||
117
decomp/schema/RustyHearts/procs/up_create_guild.sql
Normal file
117
decomp/schema/RustyHearts/procs/up_create_guild.sql
Normal file
|
|
@ -0,0 +1,117 @@
|
|||
CREATE PROCEDURE [dbo].[up_create_guild]
|
||||
@guild_name nvarchar(20),
|
||||
@character_id [uniqueidentifier],
|
||||
@guild_id [uniqueidentifier],
|
||||
@master_name nvarchar(16),
|
||||
@cost_money int,
|
||||
@server smallint,
|
||||
@max_member int,
|
||||
@group_id smallint
|
||||
AS
|
||||
BEGIN
|
||||
|
||||
SET NOCOUNT ON;
|
||||
SET XACT_ABORT ON;
|
||||
|
||||
DECLARE @my_money int,
|
||||
@error_code int,
|
||||
@Class int,
|
||||
@Level int,
|
||||
@check_guild_id uniqueidentifier,
|
||||
@check_character_id uniqueidentifier,
|
||||
@check_member_id uniqueidentifier
|
||||
|
||||
SET @check_guild_id = NULL;
|
||||
SET @check_character_id = NULL;
|
||||
SET @check_member_id = NULL;
|
||||
|
||||
BEGIN TRY
|
||||
|
||||
BEGIN TRAN;
|
||||
|
||||
SET @error_code = 1;
|
||||
|
||||
SELECT @check_character_id = [character_id], @Class = [Class], @Level = [level], @my_money = [gold] FROM [dbo].[CharacterTable] WITH (READUNCOMMITTED) WHERE [character_id] = @character_id;
|
||||
SELECT @check_guild_id = [guild_id] FROM GuildTable WITH (READUNCOMMITTED) WHERE [name] = @guild_name;
|
||||
SELECT @check_member_id = [character_id] FROM GuildMemberTable WITH (READUNCOMMITTED) WHERE [character_id] = @character_id;
|
||||
|
||||
IF (@check_character_id IS NOT NULL) AND (@check_guild_id IS NULL) AND (@check_member_id IS NULL)
|
||||
BEGIN
|
||||
|
||||
-- 돈 삭제 및 길드 설정
|
||||
IF (@my_money - @cost_money) > 0
|
||||
BEGIN
|
||||
UPDATE [dbo].[CharacterTable] SET [gold] = (@my_money - @cost_money), [GuildID]=@guild_id WHERE [character_id] = @character_id
|
||||
END
|
||||
ELSE
|
||||
BEGIN
|
||||
UPDATE [dbo].[CharacterTable] SET [gold] = 0, [GuildID]=@guild_id WHERE [character_id] = @character_id
|
||||
END
|
||||
|
||||
-- INSERT 길드 정보
|
||||
INSERT INTO GuildTable
|
||||
VALUES
|
||||
( @guild_id, --0
|
||||
@server,
|
||||
@guild_name, --1
|
||||
@character_id, --2 Master
|
||||
0, --3 Exp
|
||||
10000, --4 Point
|
||||
4000100, --5 room_id
|
||||
@max_member, --6 Max Member
|
||||
'', --7 notice
|
||||
'url', --8 icon
|
||||
0, -- block_type
|
||||
8191, -- permission01
|
||||
2028, -- permission02
|
||||
1920, -- permission03
|
||||
1920, -- permission04
|
||||
1920, -- permission05
|
||||
1920, -- permission06
|
||||
1920, -- permission07
|
||||
0, -- permission08
|
||||
1, -- level
|
||||
@group_id,
|
||||
0
|
||||
);
|
||||
|
||||
-- INSERT 길드 멤버 정보
|
||||
INSERT INTO GuildMemberTable
|
||||
VALUES
|
||||
( @guild_id,
|
||||
@character_id,
|
||||
@master_name,
|
||||
'',
|
||||
0,
|
||||
@Class,
|
||||
@Level,
|
||||
GetDate()
|
||||
);
|
||||
|
||||
--길드 창고 정보 추가
|
||||
-- INSERT INTO tbl_Guild_Storage_Info VALUES (@guild_id, 1, 0, 0, 1)
|
||||
|
||||
SELECT ERROR_CODE = @error_code, * FROM GuildTable WITH (READUNCOMMITTED) WHERE guild_id = @guild_id
|
||||
|
||||
END
|
||||
ELSE
|
||||
BEGIN
|
||||
|
||||
SET @error_code = -1
|
||||
SELECT ERROR_CODE = @error_code;
|
||||
|
||||
END
|
||||
|
||||
COMMIT TRAN;
|
||||
|
||||
END TRY
|
||||
BEGIN CATCH
|
||||
|
||||
ROLLBACK TRAN;
|
||||
|
||||
SET @error_code = -1
|
||||
SELECT ERROR_CODE = @error_code;
|
||||
|
||||
END CATCH
|
||||
|
||||
END
|
||||
39
decomp/schema/RustyHearts/procs/up_create_guild_storage.sql
Normal file
39
decomp/schema/RustyHearts/procs/up_create_guild_storage.sql
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
CREATE PROCEDURE [dbo].[up_create_guild_storage]
|
||||
(
|
||||
@guild_id [uniqueidentifier]
|
||||
,@character_id [uniqueidentifier]
|
||||
,@slot_count INT
|
||||
,@cost_money INT
|
||||
)
|
||||
AS
|
||||
|
||||
SET NOCOUNT ON
|
||||
|
||||
declare @my_money int
|
||||
|
||||
|
||||
IF NOT EXISTS (SELECT guild_id FROM tbl_Guild_Storage_Info with (READUNCOMMITTED) WHERE guild_id = @guild_id)
|
||||
BEGIN
|
||||
-- 비용 제거해야함
|
||||
SELECT @my_money = [gold] FROM [dbo].[CharacterTable] with (READUNCOMMITTED) where [character_id] = @character_id
|
||||
|
||||
-- 돈 삭제 및 길드 설정
|
||||
if (@my_money - @cost_money) > 0
|
||||
begin
|
||||
UPDATE [dbo].[CharacterTable] SET [gold] = (@my_money - @cost_money) WHERE [character_id] = @character_id
|
||||
end
|
||||
else
|
||||
begin
|
||||
UPDATE [dbo].[CharacterTable] SET [gold] = 0 WHERE [character_id] = @character_id
|
||||
end
|
||||
--길드 창과 관련 수정 jojo
|
||||
UPDATE [dbo].[GuildTable] SET [Storage] = 1 WHERE [guild_id] = @guild_id
|
||||
|
||||
INSERT INTO tbl_Guild_Storage_Info VALUES( @guild_id --길드 아이디
|
||||
,1 --페이지 수
|
||||
,@slot_count --슬롯 수
|
||||
,0 --돈
|
||||
,1) --레벨
|
||||
END
|
||||
|
||||
RETURN
|
||||
413
decomp/schema/RustyHearts/procs/up_create_item.sql
Normal file
413
decomp/schema/RustyHearts/procs/up_create_item.sql
Normal file
|
|
@ -0,0 +1,413 @@
|
|||
CREATE PROCEDURE [dbo].[up_create_item]
|
||||
@character_id [uniqueidentifier],
|
||||
@auth_id [uniqueidentifier],
|
||||
@page_index int,
|
||||
@slot_index int,
|
||||
--@code int,
|
||||
--@use_cnt int,
|
||||
@item_id [uniqueidentifier],
|
||||
@code int,
|
||||
@use_cnt int,
|
||||
|
||||
@remain_time int,
|
||||
@gcode int,
|
||||
@durability int,
|
||||
@enhance_level int,
|
||||
@option_1_code int,
|
||||
@option_1_value int,
|
||||
@option_2_code int,
|
||||
@option_2_value int,
|
||||
@option_3_code int,
|
||||
@option_3_value int,
|
||||
@OptionGroup int,
|
||||
@ReconNum int,
|
||||
@ReconState int,
|
||||
@Socket_count int,
|
||||
@Socket_1_code int,
|
||||
@Socket_1_value int,
|
||||
@Socket_2_code int,
|
||||
@Socket_2_value int,
|
||||
@Socket_3_code int,
|
||||
@Socket_3_value int,
|
||||
@expire_time int,
|
||||
@activity_value int,
|
||||
--@link_id1 int,--2022
|
||||
@link_id [uniqueidentifier],
|
||||
@socket_1_color tinyint,
|
||||
@socket_2_color tinyint,
|
||||
@socket_3_color tinyint,
|
||||
@deferment_time int,
|
||||
@rank tinyint,
|
||||
@acquireroute tinyint,
|
||||
@physical int,
|
||||
@magical int,
|
||||
@durabilitymax int,
|
||||
--@link_id [uniqueidentifier],
|
||||
--@ttt nvarchar(50),--[uniqueidentifier],--2022
|
||||
@weight int
|
||||
as
|
||||
set nocount on
|
||||
set xact_abort on
|
||||
|
||||
if(@page_index = 0) --??
|
||||
begin
|
||||
begin tran
|
||||
insert N_EquipItem(
|
||||
item_uid ,
|
||||
character_id ,
|
||||
auth_id ,
|
||||
page_index ,
|
||||
slot_index ,
|
||||
code ,
|
||||
use_cnt ,
|
||||
remain_time ,
|
||||
create_time ,
|
||||
update_time ,
|
||||
gcode ,
|
||||
durability ,
|
||||
enhance_level ,
|
||||
option_1_code ,
|
||||
option_1_value,
|
||||
option_2_code ,
|
||||
option_2_value,
|
||||
option_3_code ,
|
||||
option_3_value,
|
||||
option_group ,
|
||||
ReconNum ,
|
||||
ReconState ,
|
||||
socket_count ,
|
||||
socket_1_code ,
|
||||
socket_1_value,
|
||||
socket_2_code ,
|
||||
socket_2_value,
|
||||
socket_3_code ,
|
||||
socket_3_value,
|
||||
expire_time,
|
||||
activity_value, --??? 20100928 jojo
|
||||
link_id,
|
||||
socket_1_color, -- ??
|
||||
socket_2_color,
|
||||
socket_3_color,
|
||||
deferment_time,
|
||||
rank,
|
||||
acquireroute,
|
||||
physical ,
|
||||
magical ,
|
||||
durabilitymax,
|
||||
weight
|
||||
)
|
||||
|
||||
values(
|
||||
@item_id ,
|
||||
@character_id ,
|
||||
@auth_id ,
|
||||
@page_index ,
|
||||
@slot_index ,
|
||||
@code ,
|
||||
@use_cnt ,
|
||||
@remain_time ,
|
||||
GetDate() ,
|
||||
GetDate() ,
|
||||
@gcode ,
|
||||
@durability ,
|
||||
@enhance_level ,
|
||||
@option_1_code ,
|
||||
@option_1_value,
|
||||
@option_2_code ,
|
||||
@option_2_value,
|
||||
@option_3_code ,
|
||||
@option_3_value,
|
||||
@OptionGroup ,
|
||||
@ReconNum ,
|
||||
@ReconState ,
|
||||
@Socket_count ,
|
||||
@Socket_1_code ,
|
||||
@Socket_1_value,
|
||||
@Socket_2_code ,
|
||||
@Socket_2_value,
|
||||
@Socket_3_code ,
|
||||
@Socket_3_value,
|
||||
@expire_time,
|
||||
@activity_value, --??? 20100928 jojo
|
||||
@link_id,
|
||||
@socket_1_color, -- ??
|
||||
@socket_2_color,
|
||||
@socket_3_color,
|
||||
@deferment_time,
|
||||
@rank,
|
||||
@acquireroute,
|
||||
@physical ,
|
||||
@magical ,
|
||||
@durabilitymax ,
|
||||
@weight
|
||||
)
|
||||
|
||||
if(@@error <> 0)
|
||||
begin
|
||||
rollback
|
||||
return
|
||||
end
|
||||
|
||||
commit
|
||||
|
||||
select * from N_EquipItem where item_uid = @item_id
|
||||
|
||||
end
|
||||
else if(@page_index = 21) --??
|
||||
begin
|
||||
begin tran
|
||||
insert N_InventoryItem(
|
||||
item_uid ,
|
||||
character_id ,
|
||||
auth_id ,
|
||||
page_index ,
|
||||
slot_index ,
|
||||
code ,
|
||||
use_cnt ,
|
||||
remain_time ,
|
||||
create_time ,
|
||||
update_time ,
|
||||
gcode ,
|
||||
durability ,
|
||||
enhance_level ,
|
||||
option_1_code ,
|
||||
option_1_value,
|
||||
option_2_code ,
|
||||
option_2_value,
|
||||
option_3_code ,
|
||||
option_3_value,
|
||||
option_group ,
|
||||
ReconNum ,
|
||||
ReconState ,
|
||||
socket_count ,
|
||||
socket_1_code ,
|
||||
socket_1_value,
|
||||
socket_2_code ,
|
||||
socket_2_value,
|
||||
socket_3_code ,
|
||||
socket_3_value,
|
||||
expire_time,
|
||||
activity_value, --??? 20100928 jojo
|
||||
link_id,
|
||||
socket_1_color, -- ??
|
||||
socket_2_color,
|
||||
socket_3_color,
|
||||
deferment_time,
|
||||
rank,
|
||||
acquireroute,
|
||||
physical ,
|
||||
magical ,
|
||||
durabilitymax,
|
||||
weight
|
||||
)
|
||||
|
||||
values(
|
||||
@item_id ,
|
||||
@character_id ,
|
||||
@auth_id ,
|
||||
@page_index ,
|
||||
@slot_index ,
|
||||
@code ,
|
||||
@use_cnt ,
|
||||
@remain_time ,
|
||||
GetDate() ,
|
||||
GetDate() ,
|
||||
@gcode ,
|
||||
@durability ,
|
||||
@enhance_level ,
|
||||
@option_1_code ,
|
||||
@option_1_value,
|
||||
@option_2_code ,
|
||||
@option_2_value,
|
||||
@option_3_code ,
|
||||
@option_3_value,
|
||||
@OptionGroup ,
|
||||
@ReconNum ,
|
||||
@ReconState ,
|
||||
@Socket_count ,
|
||||
@Socket_1_code ,
|
||||
@Socket_1_value,
|
||||
@Socket_2_code ,
|
||||
@Socket_2_value,
|
||||
@Socket_3_code ,
|
||||
@Socket_3_value,
|
||||
@expire_time,
|
||||
@activity_value, --??? 20100928 jojo
|
||||
@link_id,
|
||||
@socket_1_color, -- ??
|
||||
@socket_2_color,
|
||||
@socket_3_color,
|
||||
@deferment_time,
|
||||
@rank,
|
||||
@acquireroute,
|
||||
@physical ,
|
||||
@magical ,
|
||||
@durabilitymax ,
|
||||
@weight
|
||||
|
||||
)
|
||||
if(@@error <> 0)
|
||||
begin
|
||||
rollback
|
||||
return
|
||||
end
|
||||
|
||||
commit
|
||||
|
||||
select * from N_StorageItem where item_uid = @item_id
|
||||
|
||||
end
|
||||
else if(@page_index = 61) --??
|
||||
begin
|
||||
|
||||
declare @gg int
|
||||
---- begin tran
|
||||
----
|
||||
---- insert into N_MailItem
|
||||
---- values(
|
||||
-- @item_id ,
|
||||
-- @character_id ,
|
||||
-- @auth_id ,
|
||||
-- @page_index ,
|
||||
-- @slot_index ,
|
||||
-- @code ,
|
||||
-- @use_cnt ,
|
||||
-- @remain_time ,
|
||||
-- GetDate() ,
|
||||
-- GetDate() ,
|
||||
-- @gcode ,
|
||||
-- @durability ,
|
||||
-- @enhance_level ,
|
||||
-- @option_1_code ,
|
||||
-- @option_1_value,
|
||||
-- @option_2_code ,
|
||||
-- @option_2_value,
|
||||
-- @option_3_code ,
|
||||
-- @option_3_value,
|
||||
-- @OptionGroup ,
|
||||
-- @ReconNum ,
|
||||
-- @ReconState ,
|
||||
-- @Socket_count ,
|
||||
-- @Socket_1_code ,
|
||||
-- @Socket_1_value,
|
||||
-- @Socket_2_code ,
|
||||
-- @Socket_2_value,
|
||||
-- @Socket_3_code ,
|
||||
-- @Socket_3_value
|
||||
---- )
|
||||
----
|
||||
---- if(@@error <> 0)
|
||||
---- begin
|
||||
---- rollback
|
||||
---- return
|
||||
---- end
|
||||
|
||||
--select * from N_MailItem where item_uid = @item_id
|
||||
|
||||
end
|
||||
|
||||
else --?? ????
|
||||
begin
|
||||
begin tran
|
||||
|
||||
insert N_InventoryItem(
|
||||
item_uid ,
|
||||
character_id ,
|
||||
auth_id ,
|
||||
page_index ,
|
||||
slot_index ,
|
||||
code ,
|
||||
use_cnt ,
|
||||
remain_time ,
|
||||
create_time ,
|
||||
update_time ,
|
||||
gcode ,
|
||||
durability ,
|
||||
enhance_level ,
|
||||
option_1_code ,
|
||||
option_1_value,
|
||||
option_2_code ,
|
||||
option_2_value,
|
||||
option_3_code ,
|
||||
option_3_value,
|
||||
option_group ,
|
||||
ReconNum ,
|
||||
ReconState ,
|
||||
socket_count ,
|
||||
socket_1_code ,
|
||||
socket_1_value,
|
||||
socket_2_code ,
|
||||
socket_2_value,
|
||||
socket_3_code ,
|
||||
socket_3_value,
|
||||
expire_time,
|
||||
activity_value, --??? 20100928 jojo
|
||||
link_id,
|
||||
socket_1_color, -- ??
|
||||
socket_2_color,
|
||||
socket_3_color,
|
||||
deferment_time,
|
||||
rank,
|
||||
acquireroute,
|
||||
physical ,
|
||||
magical ,
|
||||
durabilitymax ,
|
||||
weight
|
||||
)
|
||||
|
||||
values(
|
||||
@item_id ,
|
||||
@character_id ,
|
||||
@auth_id ,
|
||||
@page_index ,
|
||||
@slot_index ,
|
||||
@code ,
|
||||
@use_cnt ,
|
||||
@remain_time ,
|
||||
GetDate() ,
|
||||
GetDate() ,
|
||||
@gcode ,
|
||||
@durability ,
|
||||
@enhance_level ,
|
||||
@option_1_code ,
|
||||
@option_1_value,
|
||||
@option_2_code ,
|
||||
@option_2_value,
|
||||
@option_3_code ,
|
||||
@option_3_value,
|
||||
@OptionGroup ,
|
||||
@ReconNum ,
|
||||
@ReconState ,
|
||||
@Socket_count ,
|
||||
@Socket_1_code ,
|
||||
@Socket_1_value,
|
||||
@Socket_2_code ,
|
||||
@Socket_2_value,
|
||||
@Socket_3_code ,
|
||||
@Socket_3_value,
|
||||
@expire_time,
|
||||
@activity_value, --??? 20100928 jojo
|
||||
@link_id,
|
||||
@socket_1_color, -- ??
|
||||
@socket_2_color,
|
||||
@socket_3_color,
|
||||
@deferment_time,
|
||||
@rank,
|
||||
@acquireroute,
|
||||
@physical ,
|
||||
@magical ,
|
||||
@durabilitymax ,
|
||||
@weight
|
||||
|
||||
)
|
||||
if(@@error <> 0)
|
||||
begin
|
||||
rollback
|
||||
return
|
||||
end
|
||||
|
||||
commit
|
||||
|
||||
select * from N_InventoryItem where item_uid = @item_id
|
||||
|
||||
end
|
||||
409
decomp/schema/RustyHearts/procs/up_create_item_chn.sql
Normal file
409
decomp/schema/RustyHearts/procs/up_create_item_chn.sql
Normal file
|
|
@ -0,0 +1,409 @@
|
|||
CREATE PROCEDURE [dbo].[up_create_item_chn]
|
||||
@character_id [uniqueidentifier],
|
||||
@auth_id [uniqueidentifier],
|
||||
@page_index int,
|
||||
@slot_index int,
|
||||
@code int,
|
||||
@use_cnt int,
|
||||
@item_id [uniqueidentifier],
|
||||
@remain_time int,
|
||||
@gcode int,
|
||||
@durability int,
|
||||
@enhance_level int,
|
||||
@option_1_code int,
|
||||
@option_1_value int,
|
||||
@option_2_code int,
|
||||
@option_2_value int,
|
||||
@option_3_code int,
|
||||
@option_3_value int,
|
||||
@OptionGroup int,
|
||||
@ReconNum int,
|
||||
@ReconState int,
|
||||
@Socket_count int,
|
||||
@Socket_1_code int,
|
||||
@Socket_1_value int,
|
||||
@Socket_2_code int,
|
||||
@Socket_2_value int,
|
||||
@Socket_3_code int,
|
||||
@Socket_3_value int,
|
||||
@expire_time int,
|
||||
@activity_value int,
|
||||
@link_id1 int,--2022
|
||||
@socket_1_color tinyint,
|
||||
@socket_2_color tinyint,
|
||||
@socket_3_color tinyint,
|
||||
@deferment_time int,
|
||||
@rank tinyint,
|
||||
@acquireroute tinyint,
|
||||
@physical int,
|
||||
@magical int,
|
||||
@durabilitymax int,
|
||||
@link_id [uniqueidentifier],
|
||||
@ttt nvarchar(50),--[uniqueidentifier],--2022
|
||||
@weight int
|
||||
as
|
||||
set nocount on
|
||||
set xact_abort on
|
||||
|
||||
if(@page_index = 0) --??
|
||||
begin
|
||||
begin tran
|
||||
insert N_EquipItem(
|
||||
item_uid ,
|
||||
character_id ,
|
||||
auth_id ,
|
||||
page_index ,
|
||||
slot_index ,
|
||||
code ,
|
||||
use_cnt ,
|
||||
remain_time ,
|
||||
create_time ,
|
||||
update_time ,
|
||||
gcode ,
|
||||
durability ,
|
||||
enhance_level ,
|
||||
option_1_code ,
|
||||
option_1_value,
|
||||
option_2_code ,
|
||||
option_2_value,
|
||||
option_3_code ,
|
||||
option_3_value,
|
||||
option_group ,
|
||||
ReconNum ,
|
||||
ReconState ,
|
||||
socket_count ,
|
||||
socket_1_code ,
|
||||
socket_1_value,
|
||||
socket_2_code ,
|
||||
socket_2_value,
|
||||
socket_3_code ,
|
||||
socket_3_value,
|
||||
expire_time,
|
||||
activity_value, --??? 20100928 jojo
|
||||
link_id,
|
||||
socket_1_color, -- ??
|
||||
socket_2_color,
|
||||
socket_3_color,
|
||||
deferment_time,
|
||||
rank,
|
||||
acquireroute,
|
||||
physical ,
|
||||
magical ,
|
||||
durabilitymax,
|
||||
weight
|
||||
)
|
||||
|
||||
values(
|
||||
@item_id ,
|
||||
@character_id ,
|
||||
@auth_id ,
|
||||
@page_index ,
|
||||
@slot_index ,
|
||||
@code ,
|
||||
@use_cnt ,
|
||||
@remain_time ,
|
||||
GetDate() ,
|
||||
GetDate() ,
|
||||
@gcode ,
|
||||
@durability ,
|
||||
@enhance_level ,
|
||||
@option_1_code ,
|
||||
@option_1_value,
|
||||
@option_2_code ,
|
||||
@option_2_value,
|
||||
@option_3_code ,
|
||||
@option_3_value,
|
||||
@OptionGroup ,
|
||||
@ReconNum ,
|
||||
@ReconState ,
|
||||
@Socket_count ,
|
||||
@Socket_1_code ,
|
||||
@Socket_1_value,
|
||||
@Socket_2_code ,
|
||||
@Socket_2_value,
|
||||
@Socket_3_code ,
|
||||
@Socket_3_value,
|
||||
@expire_time,
|
||||
@activity_value, --??? 20100928 jojo
|
||||
@link_id,
|
||||
@socket_1_color, -- ??
|
||||
@socket_2_color,
|
||||
@socket_3_color,
|
||||
@deferment_time,
|
||||
@rank,
|
||||
@acquireroute,
|
||||
@physical ,
|
||||
@magical ,
|
||||
@durabilitymax ,
|
||||
@weight
|
||||
)
|
||||
|
||||
if(@@error <> 0)
|
||||
begin
|
||||
rollback
|
||||
return
|
||||
end
|
||||
|
||||
commit
|
||||
|
||||
select * from N_EquipItem where item_uid = @item_id
|
||||
|
||||
end
|
||||
else if(@page_index = 21) --??
|
||||
begin
|
||||
begin tran
|
||||
insert N_InventoryItem(
|
||||
item_uid ,
|
||||
character_id ,
|
||||
auth_id ,
|
||||
page_index ,
|
||||
slot_index ,
|
||||
code ,
|
||||
use_cnt ,
|
||||
remain_time ,
|
||||
create_time ,
|
||||
update_time ,
|
||||
gcode ,
|
||||
durability ,
|
||||
enhance_level ,
|
||||
option_1_code ,
|
||||
option_1_value,
|
||||
option_2_code ,
|
||||
option_2_value,
|
||||
option_3_code ,
|
||||
option_3_value,
|
||||
option_group ,
|
||||
ReconNum ,
|
||||
ReconState ,
|
||||
socket_count ,
|
||||
socket_1_code ,
|
||||
socket_1_value,
|
||||
socket_2_code ,
|
||||
socket_2_value,
|
||||
socket_3_code ,
|
||||
socket_3_value,
|
||||
expire_time,
|
||||
activity_value, --??? 20100928 jojo
|
||||
link_id,
|
||||
socket_1_color, -- ??
|
||||
socket_2_color,
|
||||
socket_3_color,
|
||||
deferment_time,
|
||||
rank,
|
||||
acquireroute,
|
||||
physical ,
|
||||
magical ,
|
||||
durabilitymax,
|
||||
weight
|
||||
)
|
||||
|
||||
values(
|
||||
@item_id ,
|
||||
@character_id ,
|
||||
@auth_id ,
|
||||
@page_index ,
|
||||
@slot_index ,
|
||||
@code ,
|
||||
@use_cnt ,
|
||||
@remain_time ,
|
||||
GetDate() ,
|
||||
GetDate() ,
|
||||
@gcode ,
|
||||
@durability ,
|
||||
@enhance_level ,
|
||||
@option_1_code ,
|
||||
@option_1_value,
|
||||
@option_2_code ,
|
||||
@option_2_value,
|
||||
@option_3_code ,
|
||||
@option_3_value,
|
||||
@OptionGroup ,
|
||||
@ReconNum ,
|
||||
@ReconState ,
|
||||
@Socket_count ,
|
||||
@Socket_1_code ,
|
||||
@Socket_1_value,
|
||||
@Socket_2_code ,
|
||||
@Socket_2_value,
|
||||
@Socket_3_code ,
|
||||
@Socket_3_value,
|
||||
@expire_time,
|
||||
@activity_value, --??? 20100928 jojo
|
||||
@link_id,
|
||||
@socket_1_color, -- ??
|
||||
@socket_2_color,
|
||||
@socket_3_color,
|
||||
@deferment_time,
|
||||
@rank,
|
||||
@acquireroute,
|
||||
@physical ,
|
||||
@magical ,
|
||||
@durabilitymax ,
|
||||
@weight
|
||||
|
||||
)
|
||||
if(@@error <> 0)
|
||||
begin
|
||||
rollback
|
||||
return
|
||||
end
|
||||
|
||||
commit
|
||||
|
||||
select * from N_StorageItem where item_uid = @item_id
|
||||
|
||||
end
|
||||
else if(@page_index = 61) --??
|
||||
begin
|
||||
|
||||
declare @gg int
|
||||
---- begin tran
|
||||
----
|
||||
---- insert into N_MailItem
|
||||
---- values(
|
||||
-- @item_id ,
|
||||
-- @character_id ,
|
||||
-- @auth_id ,
|
||||
-- @page_index ,
|
||||
-- @slot_index ,
|
||||
-- @code ,
|
||||
-- @use_cnt ,
|
||||
-- @remain_time ,
|
||||
-- GetDate() ,
|
||||
-- GetDate() ,
|
||||
-- @gcode ,
|
||||
-- @durability ,
|
||||
-- @enhance_level ,
|
||||
-- @option_1_code ,
|
||||
-- @option_1_value,
|
||||
-- @option_2_code ,
|
||||
-- @option_2_value,
|
||||
-- @option_3_code ,
|
||||
-- @option_3_value,
|
||||
-- @OptionGroup ,
|
||||
-- @ReconNum ,
|
||||
-- @ReconState ,
|
||||
-- @Socket_count ,
|
||||
-- @Socket_1_code ,
|
||||
-- @Socket_1_value,
|
||||
-- @Socket_2_code ,
|
||||
-- @Socket_2_value,
|
||||
-- @Socket_3_code ,
|
||||
-- @Socket_3_value
|
||||
---- )
|
||||
----
|
||||
---- if(@@error <> 0)
|
||||
---- begin
|
||||
---- rollback
|
||||
---- return
|
||||
---- end
|
||||
|
||||
--select * from N_MailItem where item_uid = @item_id
|
||||
|
||||
end
|
||||
|
||||
else --?? ????
|
||||
begin
|
||||
begin tran
|
||||
|
||||
insert N_InventoryItem(
|
||||
item_uid ,
|
||||
character_id ,
|
||||
auth_id ,
|
||||
page_index ,
|
||||
slot_index ,
|
||||
code ,
|
||||
use_cnt ,
|
||||
remain_time ,
|
||||
create_time ,
|
||||
update_time ,
|
||||
gcode ,
|
||||
durability ,
|
||||
enhance_level ,
|
||||
option_1_code ,
|
||||
option_1_value,
|
||||
option_2_code ,
|
||||
option_2_value,
|
||||
option_3_code ,
|
||||
option_3_value,
|
||||
option_group ,
|
||||
ReconNum ,
|
||||
ReconState ,
|
||||
socket_count ,
|
||||
socket_1_code ,
|
||||
socket_1_value,
|
||||
socket_2_code ,
|
||||
socket_2_value,
|
||||
socket_3_code ,
|
||||
socket_3_value,
|
||||
expire_time,
|
||||
activity_value, --??? 20100928 jojo
|
||||
link_id,
|
||||
socket_1_color, -- ??
|
||||
socket_2_color,
|
||||
socket_3_color,
|
||||
deferment_time,
|
||||
rank,
|
||||
acquireroute,
|
||||
physical ,
|
||||
magical ,
|
||||
durabilitymax ,
|
||||
weight
|
||||
)
|
||||
|
||||
values(
|
||||
@item_id ,
|
||||
@character_id ,
|
||||
@auth_id ,
|
||||
@page_index ,
|
||||
@slot_index ,
|
||||
@code ,
|
||||
@use_cnt ,
|
||||
@remain_time ,
|
||||
GetDate() ,
|
||||
GetDate() ,
|
||||
@gcode ,
|
||||
@durability ,
|
||||
@enhance_level ,
|
||||
@option_1_code ,
|
||||
@option_1_value,
|
||||
@option_2_code ,
|
||||
@option_2_value,
|
||||
@option_3_code ,
|
||||
@option_3_value,
|
||||
@OptionGroup ,
|
||||
@ReconNum ,
|
||||
@ReconState ,
|
||||
@Socket_count ,
|
||||
@Socket_1_code ,
|
||||
@Socket_1_value,
|
||||
@Socket_2_code ,
|
||||
@Socket_2_value,
|
||||
@Socket_3_code ,
|
||||
@Socket_3_value,
|
||||
@expire_time,
|
||||
@activity_value, --??? 20100928 jojo
|
||||
@link_id,
|
||||
@socket_1_color, -- ??
|
||||
@socket_2_color,
|
||||
@socket_3_color,
|
||||
@deferment_time,
|
||||
@rank,
|
||||
@acquireroute,
|
||||
@physical ,
|
||||
@magical ,
|
||||
@durabilitymax ,
|
||||
@weight
|
||||
|
||||
)
|
||||
if(@@error <> 0)
|
||||
begin
|
||||
rollback
|
||||
return
|
||||
end
|
||||
|
||||
commit
|
||||
|
||||
select * from N_InventoryItem where item_uid = @item_id
|
||||
|
||||
end
|
||||
119
decomp/schema/RustyHearts/procs/up_create_item_sales.sql
Normal file
119
decomp/schema/RustyHearts/procs/up_create_item_sales.sql
Normal file
|
|
@ -0,0 +1,119 @@
|
|||
CREATE PROCEDURE [dbo].[up_create_item_sales]
|
||||
@character_id [uniqueidentifier],
|
||||
@auth_id [uniqueidentifier],
|
||||
@page_index int,
|
||||
@slot_index int,
|
||||
@code int
|
||||
|
||||
as
|
||||
set nocount on
|
||||
set xact_abort on
|
||||
|
||||
begin
|
||||
begin tran
|
||||
|
||||
insert N_InventoryItem(
|
||||
item_uid ,
|
||||
character_id ,
|
||||
auth_id ,
|
||||
page_index ,
|
||||
slot_index ,
|
||||
code ,
|
||||
use_cnt ,
|
||||
remain_time ,
|
||||
create_time ,
|
||||
update_time ,
|
||||
gcode ,
|
||||
durability ,
|
||||
enhance_level ,
|
||||
option_1_code ,
|
||||
option_1_value,
|
||||
option_2_code ,
|
||||
option_2_value,
|
||||
option_3_code ,
|
||||
option_3_value,
|
||||
option_group ,
|
||||
ReconNum ,
|
||||
ReconState ,
|
||||
socket_count ,
|
||||
socket_1_code ,
|
||||
socket_1_value,
|
||||
socket_2_code ,
|
||||
socket_2_value,
|
||||
socket_3_code ,
|
||||
socket_3_value,
|
||||
expire_time ,
|
||||
lock_pwd ,
|
||||
activity_value,
|
||||
link_id ,
|
||||
is_seizure ,
|
||||
socket_1_color,
|
||||
socket_2_color,
|
||||
socket_3_color,
|
||||
deferment_time,
|
||||
rank,
|
||||
acquireroute,
|
||||
physical,
|
||||
magical,
|
||||
durabilitymax,
|
||||
weight
|
||||
)
|
||||
|
||||
values(
|
||||
NEWID() , --item_uid
|
||||
@character_id , --character_id
|
||||
@auth_id , --auth_id
|
||||
@page_index , --page_index
|
||||
@slot_index , --slot_index
|
||||
@code , --code
|
||||
1 , --use_cnt
|
||||
0 , --remain_time
|
||||
GetDate() , --create_time
|
||||
GetDate() , --update_time
|
||||
8989 , --gcode
|
||||
5000 , --durability
|
||||
0 , --enhance_level
|
||||
0 , --option_1_code
|
||||
0, --option_1_value
|
||||
0, --option_2_code
|
||||
0, --option_2_value
|
||||
0, --option_3_code
|
||||
0, --option_3_value
|
||||
0, --option_group
|
||||
0, --ReconNum
|
||||
0, --ReconState
|
||||
0, --socket_count
|
||||
0, --socket_1_code
|
||||
0, --socket_1_value
|
||||
0, --socket_2_code
|
||||
0, --socket_2_value
|
||||
0, --socket_3_code
|
||||
0, --socket_3_value
|
||||
0, --expire_time
|
||||
'', --lock_pwd
|
||||
0, --activity_value
|
||||
NULL, --link_id
|
||||
0, --is_seizure
|
||||
0, --socket_1_color
|
||||
0, --socket_2_color
|
||||
0, --socket_3_color
|
||||
0, --deferment_time
|
||||
1, --rank
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
)
|
||||
|
||||
if(@@error <> 0)
|
||||
begin
|
||||
rollback
|
||||
return
|
||||
end
|
||||
|
||||
commit
|
||||
|
||||
--select * from N_InventoryItem where item_uid = @item_id
|
||||
|
||||
end
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
CREATE PROCEDURE [dbo].[up_create_item_sales_set_angela]
|
||||
@character_id [uniqueidentifier],
|
||||
@auth_id [uniqueidentifier]
|
||||
|
||||
as
|
||||
set nocount on
|
||||
set xact_abort on
|
||||
|
||||
begin
|
||||
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 1, 0, 11032024
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 1, 1, 11032025
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 1, 2, 11045005
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 1, 3, 11045006
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 1, 4, 12012010
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 1, 5, 13012010
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 1, 6, 14012010
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 1, 7, 15012010
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 1, 8, 16012010
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 1, 9, 20012010
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 5, 0, 70101
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 5, 1, 70102
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 5, 2, 70103
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 5, 3, 70104
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 5, 4, 70105
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 5, 5, 70106
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 5, 6, 70107
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 5, 7, 70282
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 5, 8, 70283
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 5, 9, 70284
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 5, 10, 70285
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 5, 11, 70286
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 5, 12, 70287
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 5, 13, 70288
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 5, 14, 70289
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 5, 15, 70290
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 5, 16, 70291
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 5, 17, 70292
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 5, 18, 70293
|
||||
|
||||
end
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
CREATE PROCEDURE [dbo].[up_create_item_sales_set_frantz]
|
||||
@character_id [uniqueidentifier],
|
||||
@auth_id [uniqueidentifier]
|
||||
|
||||
as
|
||||
set nocount on
|
||||
set xact_abort on
|
||||
|
||||
begin
|
||||
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 1, 0, 11012024
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 1, 1, 11012025
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 1, 2, 11025005
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 1, 3, 11025006
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 1, 4, 12042010
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 1, 5, 13042010
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 1, 6, 14042010
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 1, 7, 15042010
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 1, 8, 16042010
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 1, 9, 20042010
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 5, 0, 70058
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 5, 1, 70059
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 5, 2, 70060
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 5, 3, 70061
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 5, 4, 70062
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 5, 5, 70063
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 5, 6, 70064
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 5, 7, 70267
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 5, 8, 70268
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 5, 9, 70269
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 5, 10, 70270
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 5, 11, 70271
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 5, 12, 70272
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 5, 13, 70273
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 5, 14, 70260
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 5, 15, 70261
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 5, 16, 70262
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 5, 17, 70263
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 5, 18, 70264
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 5, 19, 70265
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 5, 20, 70266
|
||||
|
||||
end
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
CREATE PROCEDURE [dbo].[up_create_item_sales_set_tude]
|
||||
@character_id [uniqueidentifier],
|
||||
@auth_id [uniqueidentifier]
|
||||
|
||||
as
|
||||
set nocount on
|
||||
set xact_abort on
|
||||
|
||||
begin
|
||||
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 1, 0, 11052024
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 1, 1, 11052025
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 1, 2, 11065005
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 1, 3, 11065006
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 1, 4, 12022010
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 1, 5, 13022010
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 1, 6, 14022010
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 1, 7, 15022010
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 1, 8, 16022010
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 1, 9, 20022010
|
||||
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 5, 0, 70275
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 5, 1, 70276
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 5, 2, 70277
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 5, 3, 70278
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 5, 4, 70279
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 5, 5, 70280
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 5, 6, 70108
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 5, 7, 70109
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 5, 8, 70110
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 5, 9, 70144
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 5, 10, 70112
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 5, 11, 70113
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 5, 12, 70111
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 5, 13, 70114
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 5, 14, 70115
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 5, 15, 70116
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 5, 16, 70145
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 5, 17, 70118
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 5, 18, 70119
|
||||
exec dbo.up_create_item_sales @character_id, @auth_id, 5, 18, 70117
|
||||
end
|
||||
131
decomp/schema/RustyHearts/procs/up_create_item_test.sql
Normal file
131
decomp/schema/RustyHearts/procs/up_create_item_test.sql
Normal file
|
|
@ -0,0 +1,131 @@
|
|||
CREATE PROCEDURE [dbo].[up_create_item_test]
|
||||
@character_id [uniqueidentifier],
|
||||
@auth_id [uniqueidentifier],
|
||||
@page_index int,
|
||||
@slot_index int,
|
||||
@item_id [uniqueidentifier],
|
||||
@code int,
|
||||
@use_cnt int,
|
||||
@remain_time int,
|
||||
@gcode int,
|
||||
@durability int,
|
||||
@enhance_level int,
|
||||
@option_1_code int,
|
||||
@option_1_value int,
|
||||
@option_2_code int,
|
||||
@option_2_value int,
|
||||
@option_3_code int,
|
||||
@option_3_value int,
|
||||
@OptionGroup int,
|
||||
@ReconNum int,
|
||||
@ReconState int,
|
||||
@Socket_count int,
|
||||
@Socket_1_code int,
|
||||
@Socket_1_value int,
|
||||
@Socket_2_code int,
|
||||
@Socket_2_value int,
|
||||
@Socket_3_code int,
|
||||
@Socket_3_value int,
|
||||
@socket_1_color tinyint,
|
||||
@socket_2_color tinyint,
|
||||
@socket_3_color tinyint,
|
||||
@rank tinyint,
|
||||
@acquireroute tinyint,
|
||||
@physical int,
|
||||
@magical int,
|
||||
@durabilitymax int,
|
||||
@weight int
|
||||
as
|
||||
set nocount on
|
||||
set xact_abort on
|
||||
|
||||
begin tran
|
||||
insert N_EquipItem_Test(
|
||||
item_uid ,
|
||||
character_id ,
|
||||
auth_id ,
|
||||
page_index ,
|
||||
slot_index ,
|
||||
code ,
|
||||
use_cnt ,
|
||||
remain_time ,
|
||||
create_time ,
|
||||
update_time ,
|
||||
gcode ,
|
||||
durability ,
|
||||
enhance_level ,
|
||||
option_1_code ,
|
||||
option_1_value,
|
||||
option_2_code ,
|
||||
option_2_value,
|
||||
option_3_code ,
|
||||
option_3_value,
|
||||
option_group ,
|
||||
ReconNum ,
|
||||
ReconState ,
|
||||
socket_count ,
|
||||
socket_1_code ,
|
||||
socket_1_value,
|
||||
socket_2_code ,
|
||||
socket_2_value,
|
||||
socket_3_code ,
|
||||
socket_3_value,
|
||||
socket_1_color,
|
||||
socket_2_color,
|
||||
socket_3_color,
|
||||
rank,
|
||||
acquireroute,
|
||||
physical,
|
||||
magical,
|
||||
durabilitymax,
|
||||
weight
|
||||
)
|
||||
|
||||
values(
|
||||
@item_id ,
|
||||
@character_id ,
|
||||
@auth_id ,
|
||||
@page_index ,
|
||||
@slot_index ,
|
||||
@code ,
|
||||
@use_cnt ,
|
||||
@remain_time ,
|
||||
GetDate() ,
|
||||
GetDate() ,
|
||||
@gcode ,
|
||||
@durability ,
|
||||
@enhance_level ,
|
||||
@option_1_code ,
|
||||
@option_1_value,
|
||||
@option_2_code ,
|
||||
@option_2_value,
|
||||
@option_3_code ,
|
||||
@option_3_value,
|
||||
@OptionGroup ,
|
||||
@ReconNum ,
|
||||
@ReconState ,
|
||||
@Socket_count ,
|
||||
@Socket_1_code ,
|
||||
@Socket_1_value,
|
||||
@Socket_2_code ,
|
||||
@Socket_2_value,
|
||||
@Socket_3_code ,
|
||||
@Socket_3_value,
|
||||
@socket_1_color,
|
||||
@socket_2_color,
|
||||
@socket_3_color,
|
||||
@rank,
|
||||
@acquireroute,
|
||||
@physical,
|
||||
@magical,
|
||||
@durabilitymax,
|
||||
@weight
|
||||
)
|
||||
|
||||
if(@@error <> 0)
|
||||
begin
|
||||
rollback
|
||||
return
|
||||
end
|
||||
|
||||
commit
|
||||
75
decomp/schema/RustyHearts/procs/up_create_pet.sql
Normal file
75
decomp/schema/RustyHearts/procs/up_create_pet.sql
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
CREATE PROCEDURE [dbo].[up_create_pet]
|
||||
@pet_id [uniqueidentifier]
|
||||
,@character_id [uniqueidentifier]
|
||||
,@AuthID [uniqueidentifier]
|
||||
,@server smallint
|
||||
,@Name nvarchar(16)
|
||||
,@Job int
|
||||
,@inventory_count tinyint
|
||||
,@Expire_Time int
|
||||
|
||||
|
||||
--펫 기본 정보 추가 jojo
|
||||
,@Vital INT
|
||||
,@Intelligence INT
|
||||
,@Strength INT
|
||||
,@Resilient INT
|
||||
,@Eloquence INT
|
||||
,@Charm INT
|
||||
,@Temper INT
|
||||
,@fHeight FLOAT
|
||||
,@fWeight FLOAT
|
||||
|
||||
,@hp INT
|
||||
,@mp INT
|
||||
,@physical_attack FLOAT
|
||||
,@physical_defence FLOAT
|
||||
,@magical_attack FLOAT
|
||||
,@magical_defence FLOAT
|
||||
,@loyalty FLOAT
|
||||
,@Level int
|
||||
,@exp int
|
||||
as
|
||||
set nocount on
|
||||
|
||||
insert into PetTable
|
||||
values
|
||||
(
|
||||
@pet_id
|
||||
,@character_id
|
||||
,null
|
||||
,@AuthID
|
||||
,@server
|
||||
,@Name
|
||||
,@Job
|
||||
,@Level
|
||||
,@exp
|
||||
,@inventory_count
|
||||
,GetDate()
|
||||
,@Expire_Time
|
||||
|
||||
--펫 기본 정보 추가
|
||||
,@Vital
|
||||
,@Intelligence
|
||||
,@Strength
|
||||
,@Resilient
|
||||
,@Eloquence
|
||||
,@Charm
|
||||
,@Temper
|
||||
,@fHeight
|
||||
,@fWeight
|
||||
,0
|
||||
--펫 추가 정보
|
||||
,@hp
|
||||
,@mp
|
||||
,@physical_attack
|
||||
,@physical_defence
|
||||
,@magical_attack
|
||||
,@magical_defence
|
||||
,@loyalty
|
||||
|
||||
);
|
||||
|
||||
select * from PetTable with (READUNCOMMITTED) where pet_id = @pet_id
|
||||
|
||||
return @@error
|
||||
138
decomp/schema/RustyHearts/procs/up_create_pet_inventory_item.sql
Normal file
138
decomp/schema/RustyHearts/procs/up_create_pet_inventory_item.sql
Normal file
|
|
@ -0,0 +1,138 @@
|
|||
CREATE PROCEDURE [dbo].[up_create_pet_inventory_item]
|
||||
@pet_id [uniqueidentifier],
|
||||
@auth_id [uniqueidentifier],
|
||||
@page_index int,
|
||||
@slot_index int,
|
||||
@item_id [uniqueidentifier],
|
||||
@code int,
|
||||
@use_cnt int,
|
||||
@remain_time int,
|
||||
@gcode int,
|
||||
@durability int,
|
||||
@enhance_level int,
|
||||
@option_1_code int,
|
||||
@option_1_value int,
|
||||
@option_2_code int,
|
||||
@option_2_value int,
|
||||
@option_3_code int,
|
||||
@option_3_value int,
|
||||
@OptionGroup int,
|
||||
@ReconNum int,
|
||||
@ReconState int,
|
||||
@Socket_count int,
|
||||
@Socket_1_code int,
|
||||
@Socket_1_value int,
|
||||
@Socket_2_code int,
|
||||
@Socket_2_value int,
|
||||
@Socket_3_code int,
|
||||
@Socket_3_value int,
|
||||
--시간제 관련 추가 20102519 jojo
|
||||
@expire_time int,
|
||||
@activity_value int, --활성석 20100928 jojo
|
||||
@socket_1_color tinyint,
|
||||
@socket_2_color tinyint,
|
||||
@socket_3_color tinyint,
|
||||
@rank tinyint,
|
||||
@acquireroute tinyint,
|
||||
@physical int,
|
||||
@magical int,
|
||||
@durabilitymax int,
|
||||
@weight int
|
||||
as
|
||||
set nocount on
|
||||
|
||||
begin
|
||||
begin tran
|
||||
INSERT tbl_pet_inventory( item_uid
|
||||
,pet_id
|
||||
,auth_id
|
||||
,page_index
|
||||
,slot_index
|
||||
,code
|
||||
,use_cnt
|
||||
,remain_time
|
||||
,create_time
|
||||
,update_time
|
||||
,gcode
|
||||
,durability
|
||||
,enhance_level
|
||||
,option_1_code
|
||||
,option_1_value
|
||||
,option_2_code
|
||||
,option_2_value
|
||||
,option_3_code
|
||||
,option_3_value
|
||||
,option_group
|
||||
,ReconNum
|
||||
,ReconState
|
||||
,socket_count
|
||||
,socket_1_code
|
||||
,socket_1_value
|
||||
,socket_2_code
|
||||
,socket_2_value
|
||||
,socket_3_code
|
||||
,socket_3_value
|
||||
,expire_time
|
||||
,activity_value --활성석 20100928 jojo
|
||||
,socket_1_color
|
||||
,socket_2_color
|
||||
,socket_3_color
|
||||
,rank
|
||||
,acquireroute
|
||||
,physical
|
||||
,magical
|
||||
,durabilitymax
|
||||
,weight
|
||||
) VALUES( @item_id
|
||||
,@pet_id
|
||||
,@auth_id
|
||||
,@page_index
|
||||
,@slot_index
|
||||
,@code
|
||||
,@use_cnt
|
||||
,@remain_time
|
||||
,GetDate()
|
||||
,GetDate()
|
||||
,@gcode
|
||||
,@durability
|
||||
,@enhance_level
|
||||
,@option_1_code
|
||||
,@option_1_value
|
||||
,@option_2_code
|
||||
,@option_2_value
|
||||
,@option_3_code
|
||||
,@option_3_value
|
||||
,@OptionGroup
|
||||
,@ReconNum
|
||||
,@ReconState
|
||||
,@Socket_count
|
||||
,@Socket_1_code
|
||||
,@Socket_1_value
|
||||
,@Socket_2_code
|
||||
,@Socket_2_value
|
||||
,@Socket_3_code
|
||||
,@Socket_3_value
|
||||
,@expire_time
|
||||
,@activity_value --활성석 20100928 jojo
|
||||
,@socket_1_color
|
||||
,@socket_2_color
|
||||
,@socket_3_color
|
||||
,@rank
|
||||
,@acquireroute
|
||||
,@physical
|
||||
,@magical
|
||||
,@durabilitymax
|
||||
,@weight
|
||||
)
|
||||
|
||||
if(@@error <> 0)
|
||||
begin
|
||||
rollback
|
||||
return
|
||||
end
|
||||
delete from N_InventoryItem where [item_uid] = @item_id --모두 옮겼으므로 삭제
|
||||
|
||||
commit
|
||||
|
||||
|
||||
end
|
||||
10
decomp/schema/RustyHearts/procs/up_del_ban.sql
Normal file
10
decomp/schema/RustyHearts/procs/up_del_ban.sql
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
CREATE PROCEDURE [dbo].[up_del_ban]
|
||||
@character_id [uniqueidentifier],
|
||||
@ban_id [uniqueidentifier]
|
||||
|
||||
as
|
||||
set nocount on
|
||||
|
||||
delete dbo.FriendTableEx where character_id = @character_id and friend_id = @ban_id
|
||||
|
||||
return @@error
|
||||
10
decomp/schema/RustyHearts/procs/up_del_friend.sql
Normal file
10
decomp/schema/RustyHearts/procs/up_del_friend.sql
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
CREATE PROCEDURE [dbo].[up_del_friend]
|
||||
@character_id [uniqueidentifier],
|
||||
@friend_id [uniqueidentifier]
|
||||
|
||||
as
|
||||
set nocount on
|
||||
|
||||
delete dbo.FriendTableEx where character_id = @character_id and friend_id = @friend_id
|
||||
|
||||
return @@error
|
||||
13
decomp/schema/RustyHearts/procs/up_delet_guild_storage.sql
Normal file
13
decomp/schema/RustyHearts/procs/up_delet_guild_storage.sql
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
CREATE PROCEDURE [dbo].[up_delet_guild_storage]
|
||||
(
|
||||
@guild_id [uniqueidentifier]
|
||||
,@item_id [uniqueidentifier]
|
||||
)
|
||||
AS
|
||||
SET NOCOUNT ON
|
||||
|
||||
DELETE tbl_Guild_Storage_Item
|
||||
WHERE guild_id = @guild_id AND item_uid = @item_id
|
||||
|
||||
|
||||
RETURN @@error
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
CREATE PROCEDURE [dbo].[up_delete_account_storage_item]
|
||||
@auth_id [uniqueidentifier]
|
||||
,@item_id [uniqueidentifier]
|
||||
as
|
||||
set nocount on
|
||||
|
||||
delete dbo.tbl_Account_Storage where auth_id = @auth_id AND item_uid = @item_id
|
||||
|
||||
return @@error
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
CREATE PROCEDURE [dbo].[up_delete_auctionarticle]
|
||||
@item_uid [uniqueidentifier]
|
||||
|
||||
as
|
||||
set nocount on
|
||||
delete dbo.AuctionListTable where item_uid = @item_uid
|
||||
|
||||
return @@error
|
||||
10
decomp/schema/RustyHearts/procs/up_delete_buff.sql
Normal file
10
decomp/schema/RustyHearts/procs/up_delete_buff.sql
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
CREATE PROCEDURE [dbo].[up_delete_buff]
|
||||
@character_id uniqueidentifier,
|
||||
@buff_type int,
|
||||
@buff_id int
|
||||
|
||||
as
|
||||
set nocount on
|
||||
delete dbo.BuffTable where character_id = @character_id and buff_id = @buff_id and buff_type = @buff_type
|
||||
|
||||
return @@error
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
CREATE PROCEDURE [dbo].[up_delete_cash_effectinfo]
|
||||
@item_uid [uniqueidentifier]
|
||||
|
||||
as
|
||||
set nocount on
|
||||
delete dbo.Cash_EffectTable where item_uid = @item_uid
|
||||
|
||||
return @@error
|
||||
11
decomp/schema/RustyHearts/procs/up_delete_character.sql
Normal file
11
decomp/schema/RustyHearts/procs/up_delete_character.sql
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
CREATE PROCEDURE [dbo].[up_delete_character]
|
||||
@auth_id [uniqueidentifier],
|
||||
@character_id [uniqueidentifier]
|
||||
as begin
|
||||
|
||||
set nocount on
|
||||
|
||||
insert into CharacterTable_DELETE select * from CharacterTable with (READUNCOMMITTED) where character_id = @character_id
|
||||
delete from [dbo].[CharacterTable] WHERE character_id = @character_id
|
||||
|
||||
end
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
CREATE PROCEDURE [dbo].[up_delete_character_title]
|
||||
@character_id [uniqueidentifier],
|
||||
@del_title_id [uniqueidentifier]
|
||||
as
|
||||
set nocount on
|
||||
|
||||
begin tran
|
||||
|
||||
DELETE FROM CharacterTitle WHERE [id] = @del_title_id
|
||||
|
||||
DECLARE @ERR int
|
||||
|
||||
SET @ERR = @@ERROR
|
||||
IF @ERR <> 0
|
||||
BEGIN
|
||||
--RAISERROR('처리오류', 16, 10)
|
||||
IF @@TRANCOUNT <> 0
|
||||
BEGIN
|
||||
ROLLBACK TRAN
|
||||
END
|
||||
RETURN (@ERR)
|
||||
END
|
||||
|
||||
COMMIT TRAN
|
||||
|
||||
RETURN (@ERR)
|
||||
8
decomp/schema/RustyHearts/procs/up_delete_inquiry.sql
Normal file
8
decomp/schema/RustyHearts/procs/up_delete_inquiry.sql
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
CREATE PROCEDURE [dbo].[up_delete_inquiry]
|
||||
@character_id uniqueidentifier
|
||||
as
|
||||
set nocount on
|
||||
|
||||
delete from [dbo].[InquiryTable] where [character_id] = @character_id
|
||||
|
||||
return @@error
|
||||
10
decomp/schema/RustyHearts/procs/up_delete_mail.sql
Normal file
10
decomp/schema/RustyHearts/procs/up_delete_mail.sql
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
CREATE PROCEDURE [dbo].[up_delete_mail]
|
||||
@mail_id [uniqueidentifier]
|
||||
|
||||
as
|
||||
set nocount on
|
||||
|
||||
delete dbo.MailTable where ID = @mail_id;
|
||||
DELETE FROM [dbo].[N_MailItem] WHERE mail_uid = @mail_id;
|
||||
|
||||
return @@error
|
||||
9
decomp/schema/RustyHearts/procs/up_delete_pet.sql
Normal file
9
decomp/schema/RustyHearts/procs/up_delete_pet.sql
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
CREATE PROCEDURE [dbo].[up_delete_pet]
|
||||
@pet_id [uniqueidentifier]
|
||||
|
||||
as
|
||||
set nocount on
|
||||
delete dbo.PetTable where pet_id = @pet_id
|
||||
delete dbo.tbl_pet_inventory where pet_id = @pet_id
|
||||
|
||||
return @@error
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
CREATE PROCEDURE [dbo].[up_delete_pet_inventory]
|
||||
@pet_id [uniqueidentifier]
|
||||
,@item_id [uniqueidentifier]
|
||||
as
|
||||
set nocount on
|
||||
delete dbo.tbl_pet_Inventory where pet_id = @pet_id AND item_uid = @item_id
|
||||
|
||||
return @@error
|
||||
8
decomp/schema/RustyHearts/procs/up_delete_quest.sql
Normal file
8
decomp/schema/RustyHearts/procs/up_delete_quest.sql
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
CREATE PROCEDURE [dbo].[up_delete_quest]
|
||||
@quest_uid [uniqueidentifier],
|
||||
@character_id [uniqueidentifier]
|
||||
|
||||
as
|
||||
set nocount on
|
||||
delete dbo.QuestTable where quest_uid = @quest_uid and character_id = @character_id
|
||||
return @@error
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
CREATE PROCEDURE [dbo].[up_delete_rearing_info]
|
||||
@rearing_id [uniqueidentifier]
|
||||
|
||||
as
|
||||
set nocount on
|
||||
delete dbo.RearingTable where rearing_id = @rearing_id;
|
||||
|
||||
|
||||
return @@error
|
||||
9
decomp/schema/RustyHearts/procs/up_delete_reward.sql
Normal file
9
decomp/schema/RustyHearts/procs/up_delete_reward.sql
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
CREATE PROCEDURE [dbo].[up_delete_reward]
|
||||
@type tinyint
|
||||
|
||||
as
|
||||
set nocount on
|
||||
|
||||
delete RewardTable
|
||||
|
||||
return @@error
|
||||
6
decomp/schema/RustyHearts/procs/up_delete_skill.sql
Normal file
6
decomp/schema/RustyHearts/procs/up_delete_skill.sql
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
CREATE PROCEDURE [dbo].[up_delete_skill]
|
||||
@skill_id [uniqueidentifier]
|
||||
as
|
||||
set nocount on
|
||||
delete SkillTable where skill_id = @skill_id
|
||||
return @@error
|
||||
38
decomp/schema/RustyHearts/procs/up_equip_character_title.sql
Normal file
38
decomp/schema/RustyHearts/procs/up_equip_character_title.sql
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
CREATE PROCEDURE [dbo].[up_equip_character_title]
|
||||
@title_id [uniqueidentifier],
|
||||
@character_id [uniqueidentifier]
|
||||
AS
|
||||
SET NOCOUNT ON
|
||||
|
||||
BEGIN TRAN
|
||||
|
||||
DELETE FROM Equip_CharacterTitle WHERE [character_id] = @character_id
|
||||
|
||||
INSERT Equip_CharacterTitle
|
||||
(
|
||||
[ID],
|
||||
[character_id],
|
||||
[title_code],
|
||||
[remain_time],
|
||||
[expire_time]
|
||||
)
|
||||
SELECT
|
||||
[ID],
|
||||
[character_id],
|
||||
[title_code],
|
||||
[remain_time],
|
||||
[expire_time]
|
||||
FROM CharacterTitle with (READUNCOMMITTED) WHERE [ID] = @title_id
|
||||
|
||||
DECLARE @ERR INT
|
||||
SET @ERR = @@ERROR
|
||||
IF @ERR <> 0
|
||||
BEGIN
|
||||
--RAISERROR('처리오류', 16, 10)
|
||||
IF @@TRANCOUNT <> 0
|
||||
ROLLBACK TRAN
|
||||
RETURN (@ERR)
|
||||
END
|
||||
COMMIT TRAN
|
||||
|
||||
RETURN @ERR
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
CREATE PROCEDURE [dbo].[up_event_character_setting]
|
||||
|
||||
as begin
|
||||
|
||||
set nocount on
|
||||
|
||||
UPDATE [dbo].[CharacterTable]
|
||||
SET
|
||||
[Job] = 0
|
||||
,[Level] = 20
|
||||
,[Experience] = 1131750
|
||||
,[SP] = 400
|
||||
,[Total_SP] = 400
|
||||
,[gold] = 1000000
|
||||
,[Hearts] = 500
|
||||
WHERE name like 'test5%'
|
||||
|
||||
|
||||
|
||||
|
||||
end
|
||||
90
decomp/schema/RustyHearts/procs/up_get_all_character.sql
Normal file
90
decomp/schema/RustyHearts/procs/up_get_all_character.sql
Normal file
|
|
@ -0,0 +1,90 @@
|
|||
CREATE PROCEDURE [dbo].[up_get_all_character]
|
||||
@AuthID [uniqueidentifier],
|
||||
@server int
|
||||
as
|
||||
begin
|
||||
|
||||
set nocount on
|
||||
set transaction isolation level read uncommitted
|
||||
|
||||
-- -------------------------------------------------------
|
||||
-- -- 접속 유저 로그 DB로 보내기
|
||||
-- declare @srvname nvarchar(128)
|
||||
-- declare @srvid smallint
|
||||
-- declare @bcust_id nvarchar(50)
|
||||
-- declare @char_name nvarchar(30)
|
||||
-- declare @character_id [uniqueidentifier]
|
||||
-- set @bcust_id = ''
|
||||
-- set @char_name = ''
|
||||
-- set @character_id = '00000000-0000-0000-0000-000000000000'
|
||||
--
|
||||
-- set @srvid = -1
|
||||
-- SELECT @srvid = srvid FROM master.dbo.sysservers where srvname = 'RustyHearts_LogDB'
|
||||
-- if(@srvid <> -1)
|
||||
-- begin
|
||||
-- select top 1 @bcust_id=bcust_id from CharacterTable where AuthID = @AuthID
|
||||
-- exec RustyHearts_LogDB.RustyHearts_Log.dbo.sp_SetConnectionUV 1, @server, @AuthID, @bcust_id,
|
||||
-- @character_id, @char_name, 1, ''
|
||||
-- end
|
||||
-- -------------------------------------------------------
|
||||
|
||||
select C.[character_id]
|
||||
,C.[AuthID]
|
||||
,C.[server]
|
||||
,C.[Name]
|
||||
,C.[Class]
|
||||
,C.[Job]
|
||||
,C.[Level]
|
||||
,C.[Experience]
|
||||
,C.[Stamina]
|
||||
,C.[SP]
|
||||
,C.[Total_SP]
|
||||
,C.[Fatigue]
|
||||
,C.[LobbyID]
|
||||
,C.[StartPoint]
|
||||
,C.[gold]
|
||||
,C.[individual_roomID]
|
||||
,C.[GuildID]
|
||||
,C.[Hearts]
|
||||
,C.[first_login]
|
||||
,C.[tutorial]
|
||||
,C.[give_up]
|
||||
,C.[Block_Type]
|
||||
,C.[storage_gold]
|
||||
,C.[storage_count]
|
||||
,C.[IsTradeEnable]
|
||||
,C.[CreateTime]
|
||||
,C.[LastLogin]
|
||||
,C.[Expire_Time]
|
||||
--시간 이벤트 관련 추가 [2010/05/27 jojo]
|
||||
,C.[event_fatigue]
|
||||
,C.[event_hearts]
|
||||
,C.[event_fortune]
|
||||
,C.[dice_point]
|
||||
,C.[Addition_HP]
|
||||
,C.[Addition_MP]
|
||||
,C.[Addition_Physic_Attack]
|
||||
,C.[Addition_Physic_Defense]
|
||||
,C.[Addition_Magic_Attack]
|
||||
,C.[Addition_Magic_Defense]
|
||||
,C.[Permission]
|
||||
,C.[FatigueStorage]
|
||||
,C.[DayAttachGold]
|
||||
,C.[DayAttachItem]
|
||||
,C.[GuildPoint] --길드 포인트 추가
|
||||
,C.[Fortune] --운세
|
||||
,C.[IsMoveEnable] --이동불가
|
||||
,C.[event_mailattach]
|
||||
,C.[Block_YN]
|
||||
,C.[tutorial_step]
|
||||
,C.[daypartymission]
|
||||
,C.[event_daypartymission]
|
||||
,C.[time_sp]
|
||||
,ISNULL(G.[grade],7) as guild_grade --길드 등급 추가(테스트용-작업자 문의:김진영)
|
||||
,ISNULL(G.alias_name, '') as guild_alias_name --길드 별명 추가(테스트용-작업자 문의:김진영)
|
||||
,ISNULL(GT.name, '') as guild_name --길드 이름 - 이후 추가시 담당에게 문의 : 김진영
|
||||
from CharacterTable AS C WITH (NOLOCK)
|
||||
LEFT OUTER JOIN GuildMemberTable AS G WITH (NOLOCK) ON G.[character_id]=C.[character_id] --WHERE C.[AuthID]=@AuthID and C.[server]=@server
|
||||
LEFT OUTER JOIN GuildTable AS GT WITH (NOLOCK) ON GT.[guild_id]=C.[GuildID] WHERE C.[AuthID]=@AuthID --and C.[server]=@server
|
||||
--from CharacterTable WITH (NOLOCK) where AuthID = @AuthID and server = @server
|
||||
end
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
CREATE PROCEDURE [dbo].[up_get_all_character_statistics]
|
||||
|
||||
as
|
||||
begin
|
||||
|
||||
set nocount on
|
||||
set transaction isolation level read uncommitted
|
||||
|
||||
select *
|
||||
|
||||
from CharacterTable
|
||||
end
|
||||
12
decomp/schema/RustyHearts/procs/up_get_all_guild_count.sql
Normal file
12
decomp/schema/RustyHearts/procs/up_get_all_guild_count.sql
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
CREATE PROCEDURE [dbo].[up_get_all_guild_count]
|
||||
AS
|
||||
BEGIN
|
||||
|
||||
SET NOCOUNT ON
|
||||
set transaction isolation level read uncommitted
|
||||
|
||||
--SELECT count(*) COUNT FROM GuildTable WHERE [block_type] = 0 --and [server] = @server
|
||||
select count(*) guild_count FROM
|
||||
( select G.[guild_id] from GuildMemberTable M INNER JOIN GuildTable G ON G.[guild_id]=M.[guild_id] AND G.[block_type]=0 GROUP BY G.guild_id ) A;
|
||||
|
||||
END
|
||||
83
decomp/schema/RustyHearts/procs/up_get_character.sql
Normal file
83
decomp/schema/RustyHearts/procs/up_get_character.sql
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
CREATE PROCEDURE [dbo].[up_get_character]
|
||||
@character_id [uniqueidentifier],
|
||||
@server smallint
|
||||
as
|
||||
begin
|
||||
|
||||
set nocount on
|
||||
set transaction isolation level read uncommitted
|
||||
-- declare @temp_lastloginDiff int
|
||||
-- SELECT @temp_lastloginDiff = DATEDIFF(day, [LastLogin], GETDATE()) FROM [CharacterTable] WHERE [character_id] = @character_id
|
||||
|
||||
-- if @temp_lastloginDiff != 0
|
||||
-- begin
|
||||
-- UPDATE [CharacterTable] SET [Fatigue] = 1000, [LastLogin] = GETDATE() WHERE [character_id] = @character_id
|
||||
-- UPDATE [CharacterTable] SET [Hearts] = 10 WHERE [character_id] = @character_id and [Hearts] < 10
|
||||
-- UPDATE [CharacterTable] SET [DayAttachGold] = 0 WHERE [character_id] = @character_id
|
||||
-- UPDATE [CharacterTable] SET [DayAttachItem] = 0 WHERE [character_id] = @character_id
|
||||
-- end
|
||||
-- else
|
||||
-- begin
|
||||
-- UPDATE [CharacterTable] SET [LastLogin] = GETDATE() WHERE [character_id] = @character_id
|
||||
-- end
|
||||
|
||||
select C.[character_id]
|
||||
,C.[AuthID]
|
||||
,C.[server]
|
||||
,C.[Name]
|
||||
,C.[Class]
|
||||
,C.[Job]
|
||||
,C.[Level]
|
||||
,C.[Experience]
|
||||
,C.[Stamina]
|
||||
,C.[SP]
|
||||
,C.[Total_SP]
|
||||
,C.[Fatigue]
|
||||
,C.[LobbyID]
|
||||
,C.[StartPoint]
|
||||
,C.[gold]
|
||||
,C.[individual_roomID]
|
||||
,C.[GuildID]
|
||||
,C.[CreateTime]
|
||||
,C.[LastLogin]
|
||||
,C.[Hearts]
|
||||
,C.[first_login]
|
||||
,C.[tutorial]
|
||||
,C.[give_up]
|
||||
,C.[Block_Type]
|
||||
,C.[storage_gold]
|
||||
,C.[storage_count]
|
||||
,C.[IsTradeEnable]
|
||||
,C.[Expire_Time]
|
||||
--시간 이벤트 관련 추가 [2010/05/27 jojo]
|
||||
,C.[event_fatigue]
|
||||
,C.[event_hearts]
|
||||
,C.[event_fortune]
|
||||
,C.[dice_point]
|
||||
,C.[Addition_HP]
|
||||
,C.[Addition_MP]
|
||||
,C.[Addition_Physic_Attack]
|
||||
,C.[Addition_Physic_Defense]
|
||||
,C.[Addition_Magic_Attack]
|
||||
,C.[Addition_Magic_Defense]
|
||||
,C.[Permission]
|
||||
,C.[FatigueStorage]
|
||||
,C.[DayAttachGold]
|
||||
,C.[DayAttachItem]
|
||||
,C.[GuildPoint] --길드 경험치 jojo
|
||||
,C.[Fortune] --운세
|
||||
,C.[IsMoveEnable] --이동불가
|
||||
,C.[event_mailattach]
|
||||
,C.[tutorial_step]
|
||||
,C.[daypartymission]
|
||||
,C.[event_daypartymission]
|
||||
,C.[time_sp]
|
||||
--데이터 추가 시 뒤쪽에!!
|
||||
,ISNULL(G.[grade],7) as guild_grade --길드 등급 - 이후 추가시 담당에게 문의 : 김진영
|
||||
,ISNULL(G.alias_name, '') as guild_alias_name --길드 별명 - 이후 추가시 담당에게 문의 : 김진영
|
||||
,ISNULL(GT.name, '') as guild_name --길드 이름 - 이후 추가시 담당에게 문의 : 김진영
|
||||
FROM CharacterTable AS C WITH (NOLOCK)
|
||||
LEFT OUTER JOIN GuildMemberTable AS G WITH (NOLOCK) ON G.[character_id]=C.[character_id] --WHERE C.[character_id]=@character_id and C.[server]=@server
|
||||
LEFT OUTER JOIN GuildTable AS GT WITH (NOLOCK) ON GT.[guild_id]=C.[GuildID] WHERE C.[character_id]=@character_id --and C.[server]=@server
|
||||
|
||||
end
|
||||
66
decomp/schema/RustyHearts/procs/up_get_character_by_name.sql
Normal file
66
decomp/schema/RustyHearts/procs/up_get_character_by_name.sql
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
CREATE PROCEDURE [dbo].[up_get_character_by_name]
|
||||
@name nvarchar(16),
|
||||
@server smallint
|
||||
as
|
||||
begin
|
||||
|
||||
set nocount on
|
||||
set transaction isolation level read uncommitted
|
||||
|
||||
select C.[character_id]
|
||||
,C.[AuthID]
|
||||
,C.[server]
|
||||
,C.[Name]
|
||||
,C.[Class]
|
||||
,C.[Job]
|
||||
,C.[Level]
|
||||
,C.[Experience]
|
||||
,C.[Stamina]
|
||||
,C.[SP]
|
||||
,C.[Total_SP]
|
||||
,C.[Fatigue]
|
||||
,C.[LobbyID]
|
||||
,C.[StartPoint]
|
||||
,C.[gold]
|
||||
,C.[individual_roomID]
|
||||
,C.[GuildID]
|
||||
,C.[Hearts]
|
||||
,C.[first_login]
|
||||
,C.[tutorial]
|
||||
,C.[give_up]
|
||||
,C.[Block_Type]
|
||||
,C.[storage_gold]
|
||||
,C.[storage_count]
|
||||
,C.[IsTradeEnable]
|
||||
,C.[Expire_Time]
|
||||
--시간 이벤트 관련 추가 [2010/05/27 jojo]
|
||||
,C.[event_fatigue]
|
||||
,C.[event_hearts]
|
||||
,C.[event_fortune]
|
||||
,C.[dice_point]
|
||||
,C.[Addition_HP]
|
||||
,C.[Addition_MP]
|
||||
,C.[Addition_Physic_Attack]
|
||||
,C.[Addition_Physic_Defense]
|
||||
,C.[Addition_Magic_Attack]
|
||||
,C.[Addition_Magic_Defense]
|
||||
,C.[Permission]
|
||||
,C.[FatigueStorage]
|
||||
,C.[DayAttachGold]
|
||||
,C.[DayAttachItem]
|
||||
,C.[GuildPoint] --길드 경험치 jojo
|
||||
,C.[Fortune] --운세
|
||||
,C.[IsMoveEnable] --이동불가
|
||||
,C.[event_mailattach]
|
||||
,C.[tutorial_step]
|
||||
,C.[daypartymission]
|
||||
,C.[event_daypartymission]
|
||||
,C.[time_sp]
|
||||
--데이터 추가 시 뒤쪽에!!
|
||||
,ISNULL(G.[grade],7) as guild_grade --길드 등급 - 이후 추가시 담당에게 문의 : 김진영
|
||||
,ISNULL(G.alias_name, '') as guild_alias_name --길드 별명 - 이후 추가시 담당에게 문의 : 김진영
|
||||
,ISNULL(GT.name, '') as guild_name --길드 이름 - 이후 추가시 담당에게 문의 : 김진영
|
||||
FROM CharacterTable AS C WITH (NOLOCK)
|
||||
LEFT OUTER JOIN GuildMemberTable AS G WITH (NOLOCK) ON G.[character_id]=C.[character_id] --WHERE Name = @name and C.[server]=@server
|
||||
LEFT OUTER JOIN GuildTable AS GT WITH (NOLOCK) ON GT.[guild_id]=C.[GuildID] WHERE C.[Name] = @name --and C.[server]=@server
|
||||
end
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
CREATE PROCEDURE [dbo].[up_get_character_simpleinfo]
|
||||
@name nvarchar(16),
|
||||
@server smallint
|
||||
as begin
|
||||
|
||||
set nocount on
|
||||
set transaction isolation level read uncommitted
|
||||
|
||||
select [Name]
|
||||
,[Class]
|
||||
,[Job]
|
||||
,[Level]
|
||||
|
||||
|
||||
from CharacterTable WITH (NOLOCK) where Name = @name --and [server] = @server
|
||||
end
|
||||
19
decomp/schema/RustyHearts/procs/up_get_duel_info.sql
Normal file
19
decomp/schema/RustyHearts/procs/up_get_duel_info.sql
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
CREATE PROCEDURE [dbo].[up_get_duel_info]
|
||||
@character_id [uniqueidentifier]
|
||||
AS
|
||||
BEGIN
|
||||
SET NOCOUNT ON;
|
||||
set transaction isolation level read uncommitted
|
||||
|
||||
SELECT duel_exp, duel_point, duel_disconnect, duel_pannelty_time,
|
||||
total_win, total_lose,
|
||||
pvp_win, pvp_lose,
|
||||
team_win, team_lose,
|
||||
leader_win, leader_lose,
|
||||
tag_win, tag_lose,
|
||||
death_win, death_lose,
|
||||
ladder_win, ladder_lose, duel_ladder_point, duel_ladder_exp
|
||||
FROM BattleInfo
|
||||
WHERE character_id = @character_id
|
||||
RETURN 0;
|
||||
END
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
CREATE PROCEDURE [dbo].[up_get_duel_info_statistics]
|
||||
|
||||
AS
|
||||
BEGIN
|
||||
SET NOCOUNT ON;
|
||||
set transaction isolation level read uncommitted
|
||||
|
||||
SELECT *
|
||||
FROM BattleInfo
|
||||
RETURN 0;
|
||||
END
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
CREATE PROCEDURE [dbo].[up_get_guild_increase_exp]
|
||||
(
|
||||
@guild_id [uniqueidentifier]
|
||||
)
|
||||
|
||||
AS BEGIN
|
||||
|
||||
SET NOCOUNT ON
|
||||
set transaction isolation level read uncommitted
|
||||
|
||||
SELECT TOP 100 *
|
||||
FROM tbl_Guild_Exp_List
|
||||
WHERE guild_id = @guild_id ORDER BY [index] DESC
|
||||
|
||||
|
||||
END
|
||||
27
decomp/schema/RustyHearts/procs/up_get_guild_load_info.sql
Normal file
27
decomp/schema/RustyHearts/procs/up_get_guild_load_info.sql
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
CREATE PROCEDURE [dbo].[up_get_guild_load_info]
|
||||
(
|
||||
@server SMALLINT
|
||||
)
|
||||
AS
|
||||
BEGIN
|
||||
|
||||
SET NOCOUNT ON
|
||||
set transaction isolation level read uncommitted
|
||||
|
||||
SELECT T.[guild_id],
|
||||
C.[member_cnt],
|
||||
ISNULL(S.[s_cnt],0) AS is_storage_own,
|
||||
ISNULL(SI.s_cnt, 0) AS storage_item_cnt,
|
||||
CASE WHEN ISNULL(SL.[s_cnt],0)>100 THEN 100 WHEN ISNULL(SL.[s_cnt],0)>0 THEN ISNULL(SL.[s_cnt],0) ELSE 0 END AS storage_log_cnt,
|
||||
CASE WHEN ISNULL(E.[s_cnt],0)>100 THEN 100 WHEN ISNULL(E.[s_cnt],0)>0 THEN ISNULL(E.[s_cnt],0) ELSE 0 END AS exp_log_cnt,
|
||||
ISNULL(K.[s_cnt], 0) AS skill_cnt
|
||||
FROM GuildTable AS T WITH (NOLOCK)
|
||||
INNER JOIN ( SELECT M.[guild_id], count(M.[guild_id]) AS member_cnt FROM GuildMemberTable AS M WITH (NOLOCK) GROUP BY M.[guild_id] ) AS C ON C.[guild_id]=T.[guild_id] AND T.[server]=@server AND T.[block_type]=0
|
||||
LEFT OUTER JOIN ( SELECT t1.[guild_id], count(t1.[guild_id]) AS s_cnt FROM tbl_Guild_Storage_Info AS t1 WITH (NOLOCK) GROUP BY t1.[guild_id] ) AS S ON S.[guild_id]=C.[guild_id]
|
||||
LEFT OUTER JOIN ( SELECT t2.[guild_id], count(t2.[guild_id]) AS s_cnt FROM tbl_Guild_Storage_Item AS t2 WITH (NOLOCK) GROUP BY t2.[guild_id] ) AS SI ON SI.[guild_id]=S.[guild_id]
|
||||
LEFT OUTER JOIN ( SELECT t3.[guild_id], count(t3.[guild_id]) AS s_cnt FROM tbl_Guild_Storage_Use_List AS t3 WITH (NOLOCK) WHERE t3.[use_type] IN (0, 1) GROUP BY t3.[guild_id] ) AS SL ON SL.[guild_id]=S.[guild_id]
|
||||
LEFT OUTER JOIN ( SELECT t4.[guild_id], count(t4.[guild_id]) AS s_cnt FROM tbl_Guild_Exp_List AS t4 WITH (NOLOCK) GROUP BY t4.[guild_id] ) AS E ON E.[guild_id]=C.[guild_id]
|
||||
LEFT OUTER JOIN ( SELECT t5.[guild_id], count(t5.[guild_id]) AS s_cnt FROM tbl_Guild_Skill AS t5 WITH (NOLOCK) GROUP BY t5.[guild_id] ) AS K ON K.[guild_id]=C.[guild_id]
|
||||
|
||||
--주의 : t3.[use_type] IN (0, 1) 변경 시 [up_get_guild_storage_use_list] 프로시저도 내부도 변경할것!
|
||||
END
|
||||
12
decomp/schema/RustyHearts/procs/up_get_guild_skill.sql
Normal file
12
decomp/schema/RustyHearts/procs/up_get_guild_skill.sql
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
CREATE PROCEDURE [dbo].[up_get_guild_skill]
|
||||
(
|
||||
@guild_id [uniqueidentifier]
|
||||
)
|
||||
AS
|
||||
BEGIN
|
||||
SET NOCOUNT ON
|
||||
set transaction isolation level read uncommitted
|
||||
|
||||
SELECT skill_table_id, skill_id, skill_level FROM dbo.tbl_Guild_Skill WITH (READUNCOMMITTED) WHERE guild_id = @guild_id
|
||||
|
||||
END
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
CREATE PROCEDURE [dbo].[up_get_guild_storage_info]
|
||||
(
|
||||
@guild_id [uniqueidentifier]
|
||||
)
|
||||
AS
|
||||
SET NOCOUNT ON
|
||||
set transaction isolation level read uncommitted
|
||||
|
||||
SELECT * FROM tbl_Guild_Storage_Info WHERE guild_id = @guild_id
|
||||
|
||||
RETURN @@error
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
CREATE PROCEDURE [dbo].[up_get_guild_storage_item_list]
|
||||
(
|
||||
@guild_id [uniqueidentifier]
|
||||
)
|
||||
AS
|
||||
SET NOCOUNT ON
|
||||
set transaction isolation level read uncommitted
|
||||
|
||||
SELECT item_uid
|
||||
,page_index
|
||||
,slot_index
|
||||
,code
|
||||
,use_cnt
|
||||
,remain_time
|
||||
,durability
|
||||
,enhance_level
|
||||
,option_1_code
|
||||
,option_1_value
|
||||
,option_2_code
|
||||
,option_2_value
|
||||
,option_3_code
|
||||
,option_3_value
|
||||
,option_group
|
||||
,ReconNum
|
||||
,ReconState
|
||||
,socket_count
|
||||
,socket_1_code
|
||||
,socket_1_value
|
||||
,socket_2_code
|
||||
,socket_2_value
|
||||
,socket_3_code
|
||||
,socket_3_value
|
||||
,expire_time
|
||||
,lock_pwd
|
||||
,activity_value --활성석 20100928 jojo
|
||||
,link_id
|
||||
,socket_1_color
|
||||
,socket_2_color
|
||||
,socket_3_color
|
||||
,[rank]
|
||||
,[acquireroute]
|
||||
,[physical]
|
||||
,[magical]
|
||||
,[durabilitymax]
|
||||
,[weight]
|
||||
|
||||
FROM tbl_Guild_Storage_Item
|
||||
WHERE guild_id = @guild_id
|
||||
|
||||
RETURN @@error
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
CREATE PROCEDURE [dbo].[up_get_guild_storage_use_list]
|
||||
(
|
||||
@guild_id [uniqueidentifier]
|
||||
)
|
||||
|
||||
AS
|
||||
BEGIN
|
||||
SET NOCOUNT ON
|
||||
set transaction isolation level read uncommitted
|
||||
|
||||
SELECT TOP 100 *
|
||||
FROM tbl_Guild_Storage_Use_List WITH (NOLOCK)
|
||||
WHERE guild_id = @guild_id and use_type IN (0, 1) ORDER BY [index] DESC
|
||||
--주의 : IN (0, 1) 변경 시 [up_get_guild_load_info] 프로시저도 내부도 변경할것!
|
||||
|
||||
RETURN @@error
|
||||
END
|
||||
19
decomp/schema/RustyHearts/procs/up_get_guild_total_count.sql
Normal file
19
decomp/schema/RustyHearts/procs/up_get_guild_total_count.sql
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
CREATE PROCEDURE [dbo].[up_get_guild_total_count]
|
||||
(
|
||||
@server SMALLINT
|
||||
)
|
||||
AS
|
||||
BEGIN
|
||||
|
||||
SET NOCOUNT ON
|
||||
set transaction isolation level read uncommitted
|
||||
|
||||
SELECT count(T.[guild_id]) AS total_cnt FROM GuildTable AS T WITH (NOLOCK)
|
||||
INNER JOIN
|
||||
(
|
||||
SELECT M.[guild_id], count(M.[guild_id]) AS member_cnt
|
||||
FROM GuildMemberTable AS M WITH (NOLOCK) GROUP BY M.[guild_id]
|
||||
) AS C
|
||||
ON C.[guild_id]=T.[guild_id] AND T.[server]=@server AND T.[block_type]=0
|
||||
|
||||
END
|
||||
25
decomp/schema/RustyHearts/procs/up_get_keymap.sql
Normal file
25
decomp/schema/RustyHearts/procs/up_get_keymap.sql
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
CREATE PROCEDURE [dbo].[up_get_keymap]
|
||||
(
|
||||
@auth_id [uniqueidentifier]
|
||||
)
|
||||
AS
|
||||
BEGIN
|
||||
|
||||
set nocount on
|
||||
|
||||
declare @get_AuthID [uniqueidentifier];
|
||||
|
||||
SET @get_AuthID = NULL;
|
||||
|
||||
SELECT TOP 1 @get_AuthID = AuthID FROM KeyMapTable with (READUNCOMMITTED) WHERE AuthID = @auth_id;
|
||||
|
||||
IF( @get_AuthID IS NULL )
|
||||
BEGIN
|
||||
insert into KeyMapTable
|
||||
values( @auth_id, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 );
|
||||
END
|
||||
|
||||
SELECT TOP 1 * FROM KeyMapTable with (READUNCOMMITTED) WHERE AuthID = @auth_id
|
||||
|
||||
END
|
||||
15
decomp/schema/RustyHearts/procs/up_get_other_character.sql
Normal file
15
decomp/schema/RustyHearts/procs/up_get_other_character.sql
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
CREATE PROCEDURE [dbo].[up_get_other_character]
|
||||
@character_id [uniqueidentifier],
|
||||
@server smallint
|
||||
as begin
|
||||
|
||||
set nocount on
|
||||
set transaction isolation level read uncommitted
|
||||
|
||||
select
|
||||
[Name]
|
||||
,[Class]
|
||||
,[Job]
|
||||
,[Level]
|
||||
from CharacterTable where character_id = @character_id --and server = @server
|
||||
end
|
||||
53
decomp/schema/RustyHearts/procs/up_guild_disband.sql
Normal file
53
decomp/schema/RustyHearts/procs/up_guild_disband.sql
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
CREATE PROCEDURE [dbo].[up_guild_disband]
|
||||
@guild_id [uniqueidentifier],
|
||||
@character_id [uniqueidentifier]
|
||||
AS
|
||||
BEGIN
|
||||
|
||||
SET NOCOUNT ON;
|
||||
SET XACT_ABORT ON;
|
||||
|
||||
DECLARE @result_code INT;
|
||||
|
||||
SET @result_code = 1; --1 : 성공 / -1 : 프로시저 오류 / -2 : INSERT 실패 / -3 : UPDATE 실패
|
||||
|
||||
BEGIN TRY
|
||||
|
||||
BEGIN TRAN;
|
||||
|
||||
--DELETE FROM [dbo].[GuildMemberTable] WHERE guild_id = @guild_id
|
||||
--Update [dbo].[GuildTable] set [name] = '___'+[name], [master_id] = NULL, [block_type]=1 WHERE guild_id = @guild_id
|
||||
--UPDATE [dbo].[CharacterTable] SET [GuildID] = NULL
|
||||
-- ,[GuildPoint] = 0 WHERE [character_id] = @character_id
|
||||
|
||||
--캐릭터 테이블의 길드 정보 삭제
|
||||
UPDATE [dbo].[CharacterTable] SET [GuildID] = NULL ,[GuildPoint] = 0 WHERE [character_id] = @character_id
|
||||
|
||||
--길드 삭제 테이블에 길드 정보 이동
|
||||
INSERT INTO [dbo].[GuildTable_DELETE] SELECT *, GETDATE() FROM [dbo].[GuildTable] AS S with (READUNCOMMITTED) WHERE S.[guild_id] = @guild_id
|
||||
|
||||
--길드 관련 테이블 삭제
|
||||
DELETE FROM [dbo].[tbl_Guild_Exp_List] WHERE [guild_id] = @guild_id
|
||||
DELETE FROM [dbo].[tbl_Guild_Skill] WHERE [guild_id] = @guild_id
|
||||
DELETE FROM [dbo].[tbl_Guild_Storage_Info] WHERE [guild_id] = @guild_id
|
||||
DELETE FROM [dbo].[tbl_Guild_Storage_Item] WHERE [guild_id] = @guild_id
|
||||
DELETE FROM [dbo].[tbl_Guild_Storage_Use_List] WHERE [guild_id] = @guild_id
|
||||
DELETE FROM [dbo].[GuildMemberTable] WHERE [guild_id] = @guild_id
|
||||
|
||||
--길드 테이블 삭제
|
||||
DELETE FROM [dbo].[GuildTable] WHERE [guild_id] = @guild_id
|
||||
|
||||
COMMIT TRAN;
|
||||
|
||||
SELECT result_code = @result_code; --결과 코드 전달
|
||||
|
||||
END TRY
|
||||
BEGIN CATCH
|
||||
|
||||
ROLLBACK TRAN;
|
||||
|
||||
SELECT result_code = -1;
|
||||
|
||||
END CATCH
|
||||
|
||||
END
|
||||
18
decomp/schema/RustyHearts/procs/up_guild_leader_change.sql
Normal file
18
decomp/schema/RustyHearts/procs/up_guild_leader_change.sql
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
CREATE PROCEDURE [dbo].[up_guild_leader_change]
|
||||
@guild_id [uniqueidentifier],
|
||||
@character_id [uniqueidentifier]
|
||||
as
|
||||
|
||||
set nocount on
|
||||
|
||||
declare @oldMaster [uniqueidentifier]
|
||||
|
||||
select @oldMaster = master_id from dbo.GuildTable with (READUNCOMMITTED) where guild_id = @guild_id --기존 마스터의 캐릭터 아이디를 구한다. jojo
|
||||
|
||||
update dbo.GuildTable set master_id = @character_id where guild_id = @guild_id
|
||||
update dbo.GuildMemberTable set grade = 0 where guild_id = @guild_id and character_id = @character_id
|
||||
|
||||
--기존 마스터의 등급을 신입으로 변경한다. jojo
|
||||
update dbo.GuildMemberTable set grade = 7 where guild_id = @guild_id and character_id = @oldMaster
|
||||
|
||||
return @@error
|
||||
36
decomp/schema/RustyHearts/procs/up_guild_member_remove.sql
Normal file
36
decomp/schema/RustyHearts/procs/up_guild_member_remove.sql
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
CREATE PROCEDURE [dbo].[up_guild_member_remove]
|
||||
@guild_id [uniqueidentifier],
|
||||
@character_id [uniqueidentifier]
|
||||
AS
|
||||
BEGIN
|
||||
|
||||
SET NOCOUNT ON;
|
||||
SET XACT_ABORT ON;
|
||||
|
||||
DECLARE @result_code INT;
|
||||
|
||||
SET @result_code = 1; --1 : 성공 / -1 : 프로시저 오류 / -2 : INSERT 실패 / -3 : UPDATE 실패
|
||||
|
||||
BEGIN TRY
|
||||
|
||||
BEGIN TRAN;
|
||||
|
||||
DELETE FROM dbo.GuildMemberTable WHERE guild_id = @guild_id and character_id = @character_id
|
||||
|
||||
--탈퇴/삭제된 유저의 길드포인트는 0으로 변경 jojo
|
||||
UPDATE [dbo].[CharacterTable] SET [GuildID] = NULL, [GuildPoint] = 0 WHERE [character_id] = @character_id
|
||||
|
||||
COMMIT TRAN;
|
||||
|
||||
SELECT result_code = @result_code; --결과 코드 전달
|
||||
|
||||
END TRY
|
||||
BEGIN CATCH
|
||||
|
||||
ROLLBACK TRAN;
|
||||
|
||||
SELECT result_code = -1;
|
||||
|
||||
END CATCH
|
||||
|
||||
END
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
CREATE PROCEDURE [dbo].[up_guild_storage_extension]
|
||||
(
|
||||
@guild_id [uniqueidentifier]
|
||||
,@character_id [uniqueidentifier]
|
||||
,@slot_count INT
|
||||
,@cost_money INT
|
||||
,@page_count TINYINT
|
||||
,@level INT
|
||||
)
|
||||
AS
|
||||
|
||||
SET NOCOUNT ON
|
||||
|
||||
declare @my_money int
|
||||
|
||||
BEGIN
|
||||
-- 비용 제거해야함
|
||||
SELECT @my_money = [gold] FROM [dbo].[tbl_Guild_Storage_info] with (READUNCOMMITTED) where [guild_id] = @guild_id
|
||||
|
||||
-- 돈 삭제 및 길드 설정
|
||||
if (@my_money - @cost_money) > 0
|
||||
begin
|
||||
UPDATE [dbo].[tbl_Guild_Storage_info] SET [gold] = (@my_money - @cost_money) WHERE [guild_id] = @guild_id
|
||||
end
|
||||
else
|
||||
begin
|
||||
UPDATE [dbo].[tbl_Guild_Storage_info] SET [gold] = 0 WHERE [guild_id] = @guild_id
|
||||
end
|
||||
|
||||
UPDATE tbl_Guild_Storage_Info SET [page_count] = @page_count
|
||||
,[slot_count] = @slot_count
|
||||
,[level] = @level
|
||||
WHERE [guild_id] = @guild_id
|
||||
END
|
||||
|
||||
RETURN
|
||||
35
decomp/schema/RustyHearts/procs/up_init_auth_link.sql
Normal file
35
decomp/schema/RustyHearts/procs/up_init_auth_link.sql
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
CREATE PROCEDURE [dbo].[up_init_auth_link]
|
||||
@db_src nvarchar(32),
|
||||
@db_account nvarchar(32),
|
||||
@db_pass nvarchar(32)
|
||||
as
|
||||
set nocount on
|
||||
|
||||
--링크드 서버 설정
|
||||
|
||||
--서버등록
|
||||
EXEC sp_addlinkedserver
|
||||
@server='RustyHeartsLinkAuth', -- 링크드서버이름, 기본값없음
|
||||
@srvproduct = '', -- OLEDB 데이터원본제품이름, 기본값NULL
|
||||
|
||||
@provider = 'SQLOLEDB', -- 공급자고유식별자
|
||||
|
||||
@datasrc = @db_src, -- 데이터원본이름
|
||||
@provstr='', -- OLEDB 공급자연결문자열, 기본값NULL
|
||||
@catalog='RustyHearts_Auth' -- 공급자연결카다로그, 데이터베이스이름
|
||||
|
||||
--서버등록확인
|
||||
SELECT * FROM master.dbo.sysservers
|
||||
|
||||
--연결계정등록
|
||||
EXEC sp_addlinkedsrvlogin
|
||||
@rmtsrvname = 'RustyHeartsLinkAuth', -- 링크드서버이름, 기본값없음
|
||||
@useself = 'false', -- 로그인이름사용유무, 기본값true
|
||||
@locallogin = NULL, -- 로컬서버로그인여부, 기본값NULL
|
||||
@rmtuser = @db_account, -- 사용자이름
|
||||
@rmtpassword = @db_pass -- 사용자암호
|
||||
|
||||
EXEC SP_SERVEROPTION [RustyHeartsLinkAuth], 'RPC OUT' , 'TRUE'
|
||||
|
||||
|
||||
return @@error
|
||||
35
decomp/schema/RustyHearts/procs/up_init_log_link.sql
Normal file
35
decomp/schema/RustyHearts/procs/up_init_log_link.sql
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
CREATE PROCEDURE [dbo].[up_init_log_link]
|
||||
@db_src nvarchar(32),
|
||||
@db_account nvarchar(32),
|
||||
@db_pass nvarchar(32)
|
||||
as
|
||||
set nocount on
|
||||
|
||||
--링크드 서버 설정
|
||||
|
||||
--서버등록
|
||||
EXEC sp_addlinkedserver
|
||||
@server='RustyHearts_LogDB', -- 링크드서버이름, 기본값없음
|
||||
@srvproduct = '', -- OLEDB 데이터원본제품이름, 기본값NULL
|
||||
|
||||
@provider = 'SQLOLEDB', -- 공급자고유식별자
|
||||
|
||||
@datasrc = @db_src, -- 데이터원본이름
|
||||
@provstr='', -- OLEDB 공급자연결문자열, 기본값NULL
|
||||
@catalog='RustyHearts_Log' -- 공급자연결카다로그, 데이터베이스이름
|
||||
|
||||
--서버등록확인
|
||||
SELECT * FROM master.dbo.sysservers
|
||||
|
||||
--연결계정등록
|
||||
EXEC sp_addlinkedsrvlogin
|
||||
@rmtsrvname = 'RustyHearts_LogDB', -- 링크드서버이름, 기본값없음
|
||||
@useself = 'false', -- 로그인이름사용유무, 기본값true
|
||||
@locallogin = NULL, -- 로컬서버로그인여부, 기본값NULL
|
||||
@rmtuser = @db_account, -- 사용자이름
|
||||
@rmtpassword = @db_pass -- 사용자암호
|
||||
|
||||
EXEC SP_SERVEROPTION [RustyHearts_LogDB], 'RPC OUT' , 'TRUE'
|
||||
|
||||
|
||||
return @@error
|
||||
180
decomp/schema/RustyHearts/procs/up_insert_auctionItem.sql
Normal file
180
decomp/schema/RustyHearts/procs/up_insert_auctionItem.sql
Normal file
|
|
@ -0,0 +1,180 @@
|
|||
CREATE PROCEDURE [dbo].[up_insert_auctionItem]
|
||||
@seller_name nvarchar(16),
|
||||
@item_id [uniqueidentifier],
|
||||
@character_id [uniqueidentifier],
|
||||
@auth_id [uniqueidentifier],
|
||||
@page_index int,
|
||||
@slot_index int,
|
||||
@code int,
|
||||
@use_cnt int,
|
||||
@remain_time int,
|
||||
@gcode int,
|
||||
@durability int,
|
||||
@enhance_level int,
|
||||
@option_1_code int,
|
||||
@option_1_value int,
|
||||
@option_2_code int,
|
||||
@option_2_value int,
|
||||
@option_3_code int,
|
||||
@option_3_value int,
|
||||
@OptionGroup int,
|
||||
@ReconNum int,
|
||||
@ReconState int,
|
||||
@Socket_count int,
|
||||
@Socket_1_code int,
|
||||
@Socket_1_value int,
|
||||
@Socket_2_code int,
|
||||
@Socket_2_value int,
|
||||
@Socket_3_code int,
|
||||
@Socket_3_value int,
|
||||
@expire_time int,
|
||||
@selling_price int,
|
||||
@start_price int,
|
||||
@bidder_name nvarchar(16),
|
||||
@bidder_auth_uid [uniqueidentifier],
|
||||
@bidder_uid [uniqueidentifier],
|
||||
@bid_price int,
|
||||
@periodtime int,
|
||||
@registertime bigint,
|
||||
@activity_value int, --활성석 20100928 jojo
|
||||
@socket_1_color tinyint, --소켓
|
||||
@socket_2_color tinyint,
|
||||
@socket_3_color tinyint,
|
||||
@item_name nvarchar(30),
|
||||
@item_level tinyint,
|
||||
@item_category int,
|
||||
@rank tinyint,
|
||||
@acquireroute tinyint,
|
||||
@physical int,
|
||||
@magical int,
|
||||
@durabilitymax int,
|
||||
@weight int
|
||||
|
||||
as
|
||||
set nocount on
|
||||
set xact_abort on
|
||||
|
||||
begin
|
||||
begin tran
|
||||
insert dbo.AuctionListTable
|
||||
(
|
||||
[seller_name],
|
||||
[item_uid],
|
||||
[character_id],
|
||||
[auth_id],
|
||||
[page_index],
|
||||
[slot_index],
|
||||
[code],
|
||||
[use_cnt],
|
||||
[remain_time],
|
||||
[create_time],
|
||||
[update_time],
|
||||
[gcode],
|
||||
[durability],
|
||||
[enhance_level],
|
||||
[option_1_code],
|
||||
[option_1_value],
|
||||
[option_2_code],
|
||||
[option_2_value],
|
||||
[option_3_code],
|
||||
[option_3_value],
|
||||
[option_group],
|
||||
[ReconNum],
|
||||
[ReconState],
|
||||
[socket_count],
|
||||
[socket_1_code],
|
||||
[socket_1_value],
|
||||
[socket_2_code],
|
||||
[socket_2_value],
|
||||
[socket_3_code],
|
||||
[socket_3_value],
|
||||
[expire_time],
|
||||
[selling_price],
|
||||
[start_price],
|
||||
[bidder_name],
|
||||
[bidder_auth_uid],
|
||||
[bidder_uid],
|
||||
[bid_price],
|
||||
[periodtime],
|
||||
[registertime],
|
||||
[activity_value], --활성석 20100928 jojo
|
||||
[socket_1_color],
|
||||
[socket_2_color],
|
||||
[socket_3_color],
|
||||
[item_name],
|
||||
[item_level],
|
||||
[item_category],
|
||||
[rank],
|
||||
[acquireroute],
|
||||
[physical],
|
||||
[magical],
|
||||
[durabilitymax],
|
||||
[weight]
|
||||
)
|
||||
values(
|
||||
@seller_name,
|
||||
@item_id,
|
||||
@character_id,
|
||||
@auth_id,
|
||||
@page_index,
|
||||
@slot_index,
|
||||
@code,
|
||||
@use_cnt,
|
||||
@remain_time,
|
||||
getdate(),
|
||||
getdate(),
|
||||
@gcode,
|
||||
@durability,
|
||||
@enhance_level,
|
||||
@option_1_code,
|
||||
@option_1_value,
|
||||
@option_2_code,
|
||||
@option_2_value,
|
||||
@option_3_code,
|
||||
@option_3_value,
|
||||
@OptionGroup,
|
||||
@ReconNum,
|
||||
@ReconState,
|
||||
@socket_count,
|
||||
@socket_1_code,
|
||||
@socket_1_value,
|
||||
@socket_2_code,
|
||||
@socket_2_value,
|
||||
@socket_3_code,
|
||||
@socket_3_value,
|
||||
@expire_time,
|
||||
@selling_price,
|
||||
@start_price,
|
||||
@bidder_name,
|
||||
@bidder_auth_uid,
|
||||
@bidder_uid,
|
||||
@bid_price,
|
||||
@periodtime,
|
||||
@registertime,
|
||||
@activity_value, --활성석 20100928 jojo
|
||||
@socket_1_color,
|
||||
@socket_2_color,
|
||||
@socket_3_color,
|
||||
@item_name,
|
||||
@item_level,
|
||||
@item_category,
|
||||
@rank,
|
||||
@acquireroute,
|
||||
@physical,
|
||||
@magical,
|
||||
@durabilitymax,
|
||||
@weight
|
||||
|
||||
)
|
||||
|
||||
delete from N_InventoryItem where [item_uid] = @item_id --모두 옮겼으므로 삭제
|
||||
|
||||
if(@@error <> 0 )
|
||||
begin
|
||||
rollback
|
||||
return
|
||||
|
||||
end
|
||||
|
||||
commit
|
||||
end
|
||||
124
decomp/schema/RustyHearts/procs/up_insert_auctionsendmail.sql
Normal file
124
decomp/schema/RustyHearts/procs/up_insert_auctionsendmail.sql
Normal file
|
|
@ -0,0 +1,124 @@
|
|||
CREATE PROCEDURE [dbo].[up_insert_auctionsendmail]
|
||||
@money int,
|
||||
@NewMailID [uniqueidentifier],
|
||||
@item_id [uniqueidentifier],
|
||||
@character_id [uniqueidentifier],
|
||||
@page_index int,
|
||||
@slot_index int,
|
||||
@code int,
|
||||
@use_cnt int,
|
||||
@remain_time int,
|
||||
@gcode int,
|
||||
@durability int,
|
||||
@enhance_level int,
|
||||
@option_1_code int,
|
||||
@option_1_value int,
|
||||
@option_2_code int,
|
||||
@option_2_value int,
|
||||
@option_3_code int,
|
||||
@option_3_value int,
|
||||
@OptionGroup int,
|
||||
@ReconNum int,
|
||||
@ReconState int,
|
||||
@Socket_count int,
|
||||
@Socket_1_code int,
|
||||
@Socket_1_value int,
|
||||
@Socket_2_code int,
|
||||
@Socket_2_value int,
|
||||
@Socket_3_code int,
|
||||
@Socket_3_value int,
|
||||
@expire_time int,
|
||||
@recver_name nvarchar(16),
|
||||
@msg nvarchar(100),
|
||||
@mailtype int,
|
||||
@activity_value int,--활성석 20100928 jojo
|
||||
@socket_1_color tinyint, --소켓
|
||||
@socket_2_color tinyint,
|
||||
@socket_3_color tinyint,
|
||||
@rank tinyint,
|
||||
@acquireroute tinyint,
|
||||
@physical int,
|
||||
@magical int,
|
||||
@durabilitymax int,
|
||||
@weight int
|
||||
|
||||
as
|
||||
set nocount on
|
||||
|
||||
declare @auth_id [uniqueidentifier]
|
||||
set @auth_id = NULL
|
||||
|
||||
select @auth_id = [AuthID] from CharacterTable with (READUNCOMMITTED) where [Name] = @recver_name
|
||||
|
||||
begin tran
|
||||
|
||||
|
||||
begin
|
||||
insert into MailTable
|
||||
values
|
||||
( @NewMailID, --0
|
||||
@character_id, --1
|
||||
@recver_name, --2
|
||||
@character_id, --3
|
||||
@recver_name, --4
|
||||
@msg, --3
|
||||
@money, --4
|
||||
9,
|
||||
0,
|
||||
0, --8
|
||||
GETDATE(),
|
||||
@mailtype
|
||||
);
|
||||
|
||||
Exec dbo.up_auctionitemMoveToMailitem @item_id,
|
||||
@character_id,
|
||||
@auth_id,
|
||||
@page_index,
|
||||
@slot_index,
|
||||
@code,
|
||||
@use_cnt,
|
||||
@remain_time,
|
||||
@gcode,
|
||||
@durability,
|
||||
@enhance_level,
|
||||
@option_1_code,
|
||||
@option_1_value,
|
||||
@option_2_code,
|
||||
@option_2_value,
|
||||
@option_3_code,
|
||||
@option_3_value,
|
||||
@OptionGroup,
|
||||
@ReconNum,
|
||||
@ReconState,
|
||||
@Socket_count,
|
||||
@Socket_1_code,
|
||||
@Socket_1_value,
|
||||
@Socket_2_code,
|
||||
@Socket_2_value,
|
||||
@Socket_3_code,
|
||||
@Socket_3_value,
|
||||
@expire_time,
|
||||
@NewMailID,
|
||||
@activity_value, --활성석 20100928 jojo
|
||||
@socket_1_color, --소켓
|
||||
@socket_2_color,
|
||||
@socket_3_color,
|
||||
@rank,
|
||||
@acquireroute,
|
||||
@physical,
|
||||
@magical,
|
||||
@durabilitymax,
|
||||
@weight
|
||||
|
||||
end
|
||||
|
||||
|
||||
declare @ERR int
|
||||
|
||||
SET @ERR = @@ERROR
|
||||
IF @ERR <> 0 BEGIN
|
||||
RAISERROR('처리오류', 16, 10)
|
||||
IF @@TRANCOUNT <> 0 ROLLBACK
|
||||
RETURN (@ERR)
|
||||
END
|
||||
COMMIT TRAN
|
||||
|
|
@ -0,0 +1,124 @@
|
|||
CREATE PROCEDURE [dbo].[up_insert_auctionsendmail_copy1]
|
||||
@money int,
|
||||
@NewMailID [uniqueidentifier],
|
||||
@item_id [uniqueidentifier],
|
||||
@character_id [uniqueidentifier],
|
||||
@page_index int,
|
||||
@slot_index int,
|
||||
@code int,
|
||||
@use_cnt int,
|
||||
@remain_time int,
|
||||
@gcode int,
|
||||
@durability int,
|
||||
@enhance_level int,
|
||||
@option_1_code int,
|
||||
@option_1_value int,
|
||||
@option_2_code int,
|
||||
@option_2_value int,
|
||||
@option_3_code int,
|
||||
@option_3_value int,
|
||||
@OptionGroup int,
|
||||
@ReconNum int,
|
||||
@ReconState int,
|
||||
@Socket_count int,
|
||||
@Socket_1_code int,
|
||||
@Socket_1_value int,
|
||||
@Socket_2_code int,
|
||||
@Socket_2_value int,
|
||||
@Socket_3_code int,
|
||||
@Socket_3_value int,
|
||||
@expire_time int,
|
||||
@recver_name nvarchar(16),
|
||||
@msg nvarchar(100),
|
||||
@mailtype int,
|
||||
@activity_value int,--활성석 20100928 jojo
|
||||
@socket_1_color tinyint, --소켓
|
||||
@socket_2_color tinyint,
|
||||
@socket_3_color tinyint,
|
||||
@rank tinyint,
|
||||
@acquireroute tinyint,
|
||||
@physical int,
|
||||
@magical int,
|
||||
@durabilitymax int,
|
||||
@weight int
|
||||
|
||||
as
|
||||
set nocount on
|
||||
|
||||
declare @auth_id [uniqueidentifier]
|
||||
set @auth_id = NULL
|
||||
|
||||
select @auth_id = [AuthID] from CharacterTable with (READUNCOMMITTED) where [Name] = @recver_name
|
||||
|
||||
begin tran
|
||||
|
||||
|
||||
begin
|
||||
insert into MailTable
|
||||
values
|
||||
( @NewMailID, --0
|
||||
@character_id, --1
|
||||
@recver_name, --2
|
||||
@character_id, --3
|
||||
@recver_name, --4
|
||||
@msg, --3
|
||||
@money, --4
|
||||
9,
|
||||
0,
|
||||
0, --8
|
||||
GETDATE(),
|
||||
@mailtype
|
||||
);
|
||||
|
||||
Exec dbo.up_auctionitemMoveToMailitem @item_id,
|
||||
@character_id,
|
||||
@auth_id,
|
||||
@page_index,
|
||||
@slot_index,
|
||||
@code,
|
||||
@use_cnt,
|
||||
@remain_time,
|
||||
@gcode,
|
||||
@durability,
|
||||
@enhance_level,
|
||||
@option_1_code,
|
||||
@option_1_value,
|
||||
@option_2_code,
|
||||
@option_2_value,
|
||||
@option_3_code,
|
||||
@option_3_value,
|
||||
@OptionGroup,
|
||||
@ReconNum,
|
||||
@ReconState,
|
||||
@Socket_count,
|
||||
@Socket_1_code,
|
||||
@Socket_1_value,
|
||||
@Socket_2_code,
|
||||
@Socket_2_value,
|
||||
@Socket_3_code,
|
||||
@Socket_3_value,
|
||||
@expire_time,
|
||||
@NewMailID,
|
||||
@activity_value, --활성석 20100928 jojo
|
||||
@socket_1_color, --소켓
|
||||
@socket_2_color,
|
||||
@socket_3_color,
|
||||
@rank,
|
||||
@acquireroute,
|
||||
@physical,
|
||||
@magical,
|
||||
@durabilitymax,
|
||||
@weight
|
||||
|
||||
end
|
||||
|
||||
|
||||
declare @ERR int
|
||||
|
||||
SET @ERR = @@ERROR
|
||||
IF @ERR <> 0 BEGIN
|
||||
RAISERROR('처리오류', 16, 10)
|
||||
IF @@TRANCOUNT <> 0 ROLLBACK
|
||||
RETURN (@ERR)
|
||||
END
|
||||
COMMIT TRAN
|
||||
21
decomp/schema/RustyHearts/procs/up_insert_buff.sql
Normal file
21
decomp/schema/RustyHearts/procs/up_insert_buff.sql
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
CREATE PROCEDURE [dbo].[up_insert_buff]
|
||||
@character_id uniqueidentifier,
|
||||
@type int,
|
||||
@id int,
|
||||
@time int
|
||||
|
||||
as
|
||||
set nocount on
|
||||
|
||||
if NOT EXISTS (select @character_id from [dbo].[BuffTable] with (READUNCOMMITTED) where [character_id] = @character_id and [buff_type] = @type and [buff_id] = @id )
|
||||
begin
|
||||
insert into BuffTable
|
||||
values
|
||||
(
|
||||
@character_id,
|
||||
@type,
|
||||
@id,
|
||||
@time
|
||||
);
|
||||
end
|
||||
return @@error
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
CREATE PROCEDURE [dbo].[up_insert_cash_effectinfo]
|
||||
@item_id [uniqueidentifier],
|
||||
@character_id [uniqueidentifier],
|
||||
@package_code int,
|
||||
@expire_time int
|
||||
|
||||
|
||||
as
|
||||
set nocount on
|
||||
set xact_abort on
|
||||
|
||||
begin
|
||||
begin tran
|
||||
insert dbo.Cash_EffectTable
|
||||
(
|
||||
[item_uid],
|
||||
[cha_uid],
|
||||
[package_code],
|
||||
[expire_time]
|
||||
)
|
||||
values(
|
||||
@item_id,
|
||||
@character_id,
|
||||
@package_code,
|
||||
@expire_time
|
||||
)
|
||||
|
||||
|
||||
if(@@error <> 0 )
|
||||
begin
|
||||
rollback
|
||||
return
|
||||
|
||||
end
|
||||
|
||||
commit
|
||||
end
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
CREATE PROCEDURE [dbo].[up_insert_cash_product_list]
|
||||
@GiveCharName varchar(19),
|
||||
@ProductID [uniqueidentifier],
|
||||
@AuthID [uniqueidentifier],
|
||||
@CashCode int,
|
||||
@GiftRecvName nvarchar(16),
|
||||
@AddOpt1 int,
|
||||
@AddOpt2 int,
|
||||
@AddOpt3 int
|
||||
|
||||
as
|
||||
set nocount on
|
||||
|
||||
declare @auth_id [uniqueidentifier]
|
||||
|
||||
set xact_abort on
|
||||
|
||||
if @GiftRecvName = ''
|
||||
begin
|
||||
set @auth_id = @AuthID
|
||||
set @GiveCharName = ''
|
||||
end
|
||||
else
|
||||
begin
|
||||
select @auth_id = [AuthID] from CharacterTable with (READUNCOMMITTED) where [Name] = @GiftRecvName
|
||||
end
|
||||
|
||||
begin
|
||||
begin tran
|
||||
insert dbo.CashProductList
|
||||
(
|
||||
[ProductID],
|
||||
[AuthID],
|
||||
[CashCode],
|
||||
[Date],
|
||||
[State],
|
||||
[GiveCharName],
|
||||
[AddOpt1],
|
||||
[AddOpt2],
|
||||
[AddOpt3]
|
||||
)
|
||||
values(
|
||||
@ProductID,
|
||||
@auth_id,
|
||||
@CashCode,
|
||||
getdate(),
|
||||
0,
|
||||
@GiveCharName,
|
||||
@AddOpt1,
|
||||
@AddOpt2,
|
||||
@AddOpt3
|
||||
)
|
||||
|
||||
|
||||
if(@@error <> 0 )
|
||||
begin
|
||||
rollback
|
||||
return
|
||||
|
||||
end
|
||||
|
||||
commit
|
||||
end
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
CREATE PROCEDURE [dbo].[up_insert_guild_increase_exp]
|
||||
(
|
||||
@guild_id [uniqueidentifier]
|
||||
,@character_id [uniqueidentifier]
|
||||
,@exp int
|
||||
,@time NVARCHAR(20)
|
||||
,@character_name nvarchar(16)
|
||||
)
|
||||
|
||||
AS
|
||||
|
||||
declare @experience bigint
|
||||
declare @charexp int
|
||||
|
||||
SET NOCOUNT ON
|
||||
|
||||
IF EXISTS(select guild_id from GuildTable with (READUNCOMMITTED) where guild_id = @guild_id)
|
||||
BEGIN
|
||||
--캐릭터의 길드 포인트를 감소 시킨다
|
||||
SELECT @charexp = GuildPoint FROM CharacterTable with (READUNCOMMITTED) WHERE character_ID = @character_id
|
||||
|
||||
IF( 0>=@charexp OR 0>=(@charexp - @exp) )
|
||||
BEGIN
|
||||
SET @charexp = 0
|
||||
END
|
||||
ELSE
|
||||
BEGIN
|
||||
SET @charexp = @charexp - @exp
|
||||
END
|
||||
|
||||
UPDATE CharacterTable SET GuildPoint = @charexp WHERE character_ID = @character_id
|
||||
|
||||
--길드 포인트 주입
|
||||
SELECT @experience = experience FROM GuildTable with (READUNCOMMITTED) WHERE guild_id = @guild_id
|
||||
|
||||
SET @experience = @experience + @exp
|
||||
UPDATE GuildTable SET experience = @experience WHERE guild_id = @guild_id
|
||||
|
||||
|
||||
INSERT INTO tbl_Guild_Exp_List VALUES ( @guild_id
|
||||
,@character_id
|
||||
,@exp
|
||||
,@time
|
||||
,@character_name
|
||||
)
|
||||
END
|
||||
|
||||
RETURN @@error
|
||||
64
decomp/schema/RustyHearts/procs/up_insert_guild_member.sql
Normal file
64
decomp/schema/RustyHearts/procs/up_insert_guild_member.sql
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
CREATE PROCEDURE [dbo].[up_insert_guild_member]
|
||||
@guild_id [uniqueidentifier],
|
||||
@character_id [uniqueidentifier],
|
||||
@name nvarchar(16),
|
||||
@alias_name nvarchar(16),
|
||||
@grade int,
|
||||
@class int,
|
||||
@level int
|
||||
AS
|
||||
BEGIN
|
||||
|
||||
SET NOCOUNT ON;
|
||||
SET XACT_ABORT ON;
|
||||
|
||||
DECLARE @check_character_id [uniqueidentifier];
|
||||
DECLARE @result_code INT;
|
||||
|
||||
SET @check_character_id = NULL;
|
||||
SET @result_code = 1; --1 : 성공 / -1 : 프로시저 오류 / -2 : INSERT 실패 / -3 : UPDATE 실패
|
||||
|
||||
BEGIN TRY
|
||||
|
||||
BEGIN TRAN;
|
||||
|
||||
SELECT @check_character_id = [character_id] from GuildMemberTable with (READUNCOMMITTED) where [character_id] = @character_id; --AND [guild_id] = @guild_id
|
||||
IF( @check_character_id IS NULL )
|
||||
BEGIN
|
||||
|
||||
INSERT INTO GuildMemberTable
|
||||
VALUES
|
||||
( @guild_id, --0
|
||||
@character_id, --1
|
||||
@name, --2
|
||||
@alias_name, --3
|
||||
@grade,
|
||||
@class, --4
|
||||
@level,
|
||||
GetDate()
|
||||
);
|
||||
|
||||
UPDATE [dbo].[CharacterTable] SET [GuildID]=@guild_id WHERE [character_id] = @character_id
|
||||
|
||||
END
|
||||
ELSE
|
||||
BEGIN
|
||||
|
||||
SET @result_code = -2;
|
||||
|
||||
END
|
||||
|
||||
COMMIT TRAN;
|
||||
|
||||
SELECT result_code = @result_code; --결과 코드 전달
|
||||
|
||||
END TRY
|
||||
BEGIN CATCH
|
||||
|
||||
ROLLBACK TRAN;
|
||||
|
||||
SELECT result_code = -1;
|
||||
|
||||
END CATCH
|
||||
|
||||
END
|
||||
114
decomp/schema/RustyHearts/procs/up_insert_guild_skill.sql
Normal file
114
decomp/schema/RustyHearts/procs/up_insert_guild_skill.sql
Normal file
|
|
@ -0,0 +1,114 @@
|
|||
CREATE PROCEDURE [dbo].[up_insert_guild_skill]
|
||||
(
|
||||
@guild_id [uniqueidentifier],
|
||||
@learn_user_id [uniqueidentifier],
|
||||
@skill_table_id int,
|
||||
@skill_id int,
|
||||
@skill_level tinyint,
|
||||
@learn_cost int,
|
||||
@is_update tinyint -- 0 이면 INSERT, 1 이면 UPDATE
|
||||
)
|
||||
AS
|
||||
BEGIN
|
||||
SET NOCOUNT ON;
|
||||
SET XACT_ABORT ON;
|
||||
|
||||
DECLARE @check_user_id UNIQUEIDENTIFIER;
|
||||
DECLARE @check_user_gold INT;
|
||||
DECLARE @old_skill_id INT;
|
||||
DECLARE @guild_gold INT;
|
||||
DECLARE @result_code INT;
|
||||
|
||||
SET @check_user_gold = 0;
|
||||
SET @check_user_id = NULL;
|
||||
SET @check_user_gold = 0;
|
||||
SET @old_skill_id = NULL;
|
||||
SET @guild_gold = 0;
|
||||
SET @result_code = 1;
|
||||
|
||||
BEGIN TRY
|
||||
|
||||
BEGIN TRAN;
|
||||
|
||||
SELECT TOP 1 @check_user_id=[character_id], @check_user_gold=[gold] FROM CharacterTable WITH (READUNCOMMITTED) WHERE [character_id] = @learn_user_id;
|
||||
SELECT TOP 1 @old_skill_id = [skill_id] FROM dbo.tbl_Guild_Skill WITH (READUNCOMMITTED) WHERE [guild_id]=@guild_id and [skill_id]=@skill_id;
|
||||
IF( (@check_user_id IS NOT NULL) AND (@check_user_gold >= @learn_cost) )
|
||||
BEGIN
|
||||
-- UPDATE 요청일 경우
|
||||
IF 1 = @is_update
|
||||
BEGIN
|
||||
|
||||
IF @old_skill_id IS NULL
|
||||
BEGIN
|
||||
|
||||
-- 길드 스킬이 이미 존재하지 않다면 에러 전달
|
||||
SET @result_code = -3;
|
||||
|
||||
END
|
||||
ELSE
|
||||
BEGIN
|
||||
|
||||
UPDATE dbo.tbl_Guild_Skill SET
|
||||
[skill_table_id] = @skill_table_id,
|
||||
[skill_level] = @skill_level,
|
||||
[skill_learn_time] = GETDATE()
|
||||
WHERE [guild_id]=@guild_id AND [skill_id]=@skill_id
|
||||
|
||||
END
|
||||
|
||||
END
|
||||
-- INSERT 요청 처리
|
||||
ELSE
|
||||
BEGIN
|
||||
|
||||
IF @old_skill_id IS NULL
|
||||
BEGIN
|
||||
|
||||
INSERT INTO tbl_Guild_Skill ( [guild_id], [skill_table_id], [skill_id], [skill_level], [skill_learn_time] )
|
||||
VALUES ( @guild_id, @skill_table_id, @skill_id, @skill_level, GETDATE() )
|
||||
|
||||
END
|
||||
ELSE
|
||||
BEGIN
|
||||
|
||||
-- 길드 스킬이 존재 한다면 에러 전달
|
||||
SET @result_code = -2;
|
||||
|
||||
END
|
||||
|
||||
END
|
||||
|
||||
-- 비용 차감
|
||||
IF 1 = @result_code
|
||||
BEGIN
|
||||
DECLARE @result_gold INT;
|
||||
SET @result_gold = (@check_user_gold - @learn_cost);
|
||||
IF( @result_gold < 0 )
|
||||
BEGIN
|
||||
SET @result_gold = 0;
|
||||
END
|
||||
|
||||
UPDATE [dbo].[CharacterTable] SET [gold] = @result_gold WHERE [character_id] = @learn_user_id
|
||||
END
|
||||
END
|
||||
ELSE
|
||||
BEGIN
|
||||
|
||||
-- 프로시저 조건 검사 실패
|
||||
SET @result_code = -5;
|
||||
|
||||
END
|
||||
|
||||
COMMIT TRAN;
|
||||
|
||||
SELECT result_code = @result_code; --결과 코드 전달
|
||||
|
||||
END TRY
|
||||
BEGIN CATCH
|
||||
|
||||
ROLLBACK TRAN;
|
||||
|
||||
SELECT result_code = -1;
|
||||
|
||||
END CATCH
|
||||
END
|
||||
144
decomp/schema/RustyHearts/procs/up_insert_guild_storage.sql
Normal file
144
decomp/schema/RustyHearts/procs/up_insert_guild_storage.sql
Normal file
|
|
@ -0,0 +1,144 @@
|
|||
CREATE PROCEDURE [dbo].[up_insert_guild_storage]
|
||||
(
|
||||
@item_uid uniqueidentifier
|
||||
,@character_id uniqueidentifier
|
||||
,@auth_id uniqueidentifier
|
||||
,@page_index int
|
||||
,@slot_index int
|
||||
,@code int
|
||||
,@use_cnt int
|
||||
,@remain_time int
|
||||
,@gcode int
|
||||
,@durability int
|
||||
,@enhance_level int
|
||||
,@option_1_code int
|
||||
,@option_1_value int
|
||||
,@option_2_code int
|
||||
,@option_2_value int
|
||||
,@option_3_code int
|
||||
,@option_3_value int
|
||||
,@option_group int
|
||||
,@ReconNum int
|
||||
,@ReconState tinyint
|
||||
,@socket_count int
|
||||
,@socket_1_code int
|
||||
,@socket_1_value int
|
||||
,@socket_2_code int
|
||||
,@socket_2_value int
|
||||
,@socket_3_code int
|
||||
,@socket_3_value int
|
||||
,@expire_time int
|
||||
,@guild_id uniqueidentifier
|
||||
,@activity_value int
|
||||
,@link_id uniqueidentifier
|
||||
,@socket_1_color tinyint
|
||||
,@socket_2_color tinyint
|
||||
,@socket_3_color tinyint
|
||||
,@rank tinyint
|
||||
,@acquireroute tinyint
|
||||
,@physical int
|
||||
,@magical int
|
||||
,@durabilitymax int
|
||||
,@weight int
|
||||
)
|
||||
AS
|
||||
SET NOCOUNT ON
|
||||
|
||||
INSERT into tbl_Guild_Storage_Item ( item_uid
|
||||
,character_id
|
||||
,auth_id
|
||||
,page_index
|
||||
,slot_index
|
||||
,code
|
||||
,use_cnt
|
||||
,remain_time
|
||||
,create_time
|
||||
,update_time
|
||||
,gcode
|
||||
,durability
|
||||
,enhance_level
|
||||
,option_1_code
|
||||
,option_1_value
|
||||
,option_2_code
|
||||
,option_2_value
|
||||
,option_3_code
|
||||
,option_3_value
|
||||
,option_group
|
||||
,ReconNum
|
||||
,ReconState
|
||||
,socket_count
|
||||
,socket_1_code
|
||||
,socket_1_value
|
||||
,socket_2_code
|
||||
,socket_2_value
|
||||
,socket_3_code
|
||||
,socket_3_value
|
||||
,expire_time
|
||||
,guild_id
|
||||
,activity_value
|
||||
,link_id
|
||||
,socket_1_color
|
||||
,socket_2_color
|
||||
,socket_3_color
|
||||
,rank
|
||||
,acquireroute
|
||||
,physical
|
||||
,magical
|
||||
,durabilitymax
|
||||
,weight
|
||||
|
||||
)values( @item_uid
|
||||
,@character_id
|
||||
,@auth_id
|
||||
,@page_index
|
||||
,@slot_index
|
||||
,@code
|
||||
,@use_cnt
|
||||
,@remain_time
|
||||
,getdate()
|
||||
,getdate()
|
||||
,@gcode
|
||||
,@durability
|
||||
,@enhance_level
|
||||
,@option_1_code
|
||||
,@option_1_value
|
||||
,@option_2_code
|
||||
,@option_2_value
|
||||
,@option_3_code
|
||||
,@option_3_value
|
||||
,@option_group
|
||||
,@ReconNum
|
||||
,@ReconState
|
||||
,@socket_count
|
||||
,@socket_1_code
|
||||
,@socket_1_value
|
||||
,@socket_2_code
|
||||
,@socket_2_value
|
||||
,@socket_3_code
|
||||
,@socket_3_value
|
||||
,@expire_time
|
||||
,@guild_id
|
||||
,@activity_value
|
||||
,@link_id
|
||||
,@socket_1_color
|
||||
,@socket_2_color
|
||||
,@socket_3_color
|
||||
,@rank
|
||||
,@acquireroute
|
||||
,@physical
|
||||
,@magical
|
||||
,@durabilitymax
|
||||
,@weight
|
||||
)
|
||||
|
||||
|
||||
--길드 창고에 아이템 INSERT 성공 시 유저의 인벤토리 아이템 삭제 처리
|
||||
IF EXISTS (select [item_uid] from tbl_Guild_Storage_Item with (READUNCOMMITTED) WHERE [item_uid]=@item_uid )
|
||||
BEGIN
|
||||
IF EXISTS (select [item_uid] from N_InventoryItem with (READUNCOMMITTED) WHERE [item_uid]=@item_uid )
|
||||
BEGIN
|
||||
delete from N_InventoryItem where [item_uid]=@item_uid --모두 옮겼으므로 삭제
|
||||
END
|
||||
END
|
||||
|
||||
RETURN @@error
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
CREATE PROCEDURE [dbo].[up_insert_guild_storage_use_log]
|
||||
(
|
||||
@guild_id [uniqueidentifier]
|
||||
,@use_type TINYINT
|
||||
,@use_time NVARCHAR(20)
|
||||
,@character_name NVARCHAR(16)
|
||||
,@description NVARCHAR(30)
|
||||
)
|
||||
AS
|
||||
SET NOCOUNT ON
|
||||
|
||||
INSERT INTO tbl_Guild_Storage_Use_List VALUES ( @guild_id
|
||||
,@use_type
|
||||
,@use_time
|
||||
,@character_name
|
||||
,@description
|
||||
)
|
||||
|
||||
RETURN @@error
|
||||
31
decomp/schema/RustyHearts/procs/up_insert_inquiry.sql
Normal file
31
decomp/schema/RustyHearts/procs/up_insert_inquiry.sql
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
CREATE PROCEDURE [dbo].[up_insert_inquiry]
|
||||
@auth_id uniqueidentifier,
|
||||
@character_id uniqueidentifier,
|
||||
@type tinyint,
|
||||
@character_name nvarchar(16),
|
||||
@bcust_id nvarchar(50),
|
||||
@count tinyint,
|
||||
@memo nvarchar(255),
|
||||
@compulsion tinyint,
|
||||
@registertime datetime
|
||||
|
||||
as
|
||||
set nocount on
|
||||
|
||||
if NOT EXISTS (select @character_id from [dbo].[InquiryTable] with (READUNCOMMITTED) where [character_id] = @character_id)
|
||||
begin
|
||||
insert into InquiryTable
|
||||
values
|
||||
(
|
||||
@auth_id,
|
||||
@character_id,
|
||||
@type,
|
||||
@character_name,
|
||||
@bcust_id,
|
||||
@count,
|
||||
@memo,
|
||||
@compulsion,
|
||||
@registertime
|
||||
);
|
||||
end
|
||||
return @@error
|
||||
40
decomp/schema/RustyHearts/procs/up_insert_inquiry_by_gm.sql
Normal file
40
decomp/schema/RustyHearts/procs/up_insert_inquiry_by_gm.sql
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
CREATE PROCEDURE [dbo].[up_insert_inquiry_by_gm]
|
||||
@type tinyint,
|
||||
@character_name nvarchar(16),
|
||||
@memo nvarchar(255),
|
||||
@compulsion tinyint
|
||||
as
|
||||
set nocount on
|
||||
|
||||
declare @auth_id uniqueidentifier
|
||||
declare @character_id uniqueidentifier
|
||||
declare @bcust_id nvarchar(50)
|
||||
declare @count tinyint
|
||||
|
||||
set @bcust_id = ''
|
||||
|
||||
select @auth_id = [AuthID], @character_id = [character_id], @bcust_id = RTRIM(bcust_id) from [dbo].[CharacterTable] with (READUNCOMMITTED) where [Name] = @character_name
|
||||
select @count = [InquiryCount] from [RustyHearts_Auth].[dbo].[AuthTable] with (READUNCOMMITTED) where [AuthID] = @auth_id
|
||||
|
||||
set xact_abort on
|
||||
|
||||
if NOT EXISTS ( select @character_id from [dbo].[InquiryTable] with (READUNCOMMITTED) where [character_id] = @character_id )
|
||||
begin
|
||||
insert into InquiryTable
|
||||
values
|
||||
(
|
||||
@auth_id,
|
||||
@character_id,
|
||||
@type,
|
||||
@character_name,
|
||||
@bcust_id,
|
||||
@count,
|
||||
@memo,
|
||||
@compulsion,
|
||||
GETDATE()
|
||||
);
|
||||
end
|
||||
|
||||
select * from [dbo].[InquiryTable] with (READUNCOMMITTED) where character_id = @character_id
|
||||
|
||||
return @@error
|
||||
115
decomp/schema/RustyHearts/procs/up_insert_item_Mail.sql
Normal file
115
decomp/schema/RustyHearts/procs/up_insert_item_Mail.sql
Normal file
|
|
@ -0,0 +1,115 @@
|
|||
CREATE PROCEDURE [dbo].[up_insert_item_Mail]
|
||||
@sender_character_id [uniqueidentifier],
|
||||
@sender_name nvarchar(16),
|
||||
@recver_name nvarchar(16),
|
||||
@msg nvarchar(100),
|
||||
@money int,
|
||||
@return_day int,
|
||||
@req_money int,
|
||||
@NewMailID [uniqueidentifier],
|
||||
@createType int,
|
||||
--------------------------------------------
|
||||
@item_id [uniqueidentifier],
|
||||
@code int,
|
||||
@use_cnt int,
|
||||
@remain_time int,
|
||||
@gcode int,
|
||||
@durability int,
|
||||
@enhance_level int,
|
||||
@option_1_code int,
|
||||
@option_1_value int,
|
||||
@option_2_code int,
|
||||
@option_2_value int,
|
||||
@option_3_code int,
|
||||
@option_3_value int,
|
||||
@option_group int,
|
||||
@ReconNum int,
|
||||
@ReconState tinyint,
|
||||
@socket_count int,
|
||||
@socket_1_code int,
|
||||
@socket_1_value int,
|
||||
@socket_2_code int,
|
||||
@socket_2_value int,
|
||||
@socket_3_code int,
|
||||
@socket_3_value int,
|
||||
@expire_time int,
|
||||
@activity_value int,--활성석 20100928 jojo
|
||||
@link_id [uniqueidentifier],
|
||||
@socket_1_color tinyint,
|
||||
@socket_2_color tinyint,
|
||||
@socket_3_color tinyint,
|
||||
@rank tinyint,
|
||||
@acquireroute tinyint,
|
||||
@physical int,
|
||||
@magical int,
|
||||
@durabilitymax int,
|
||||
@weight int
|
||||
as
|
||||
set nocount on
|
||||
|
||||
declare @character_id [uniqueidentifier],
|
||||
@auth_id [uniqueidentifier]
|
||||
|
||||
begin tran
|
||||
select @auth_id = [AuthID], @character_id = [character_id] from CharacterTable with (READUNCOMMITTED) where [Name] = @recver_name
|
||||
insert into MailTable values ( @NewMailID, --0
|
||||
@character_id, --1
|
||||
@recver_name, --2
|
||||
@sender_character_id, --3
|
||||
@sender_name, --4
|
||||
@msg, --3
|
||||
@money, --4
|
||||
@return_day,
|
||||
@req_money,
|
||||
0, --8
|
||||
GETDATE(),
|
||||
@createType );
|
||||
Exec dbo.up_insert_item_MailItem @character_id,
|
||||
@auth_id,
|
||||
@item_id,
|
||||
@code,
|
||||
@use_cnt,
|
||||
@remain_time,
|
||||
@gcode,
|
||||
@durability,
|
||||
@enhance_level,
|
||||
@option_1_code,
|
||||
@option_1_value,
|
||||
@option_2_code,
|
||||
@option_2_value,
|
||||
@option_3_code,
|
||||
@option_3_value,
|
||||
@option_group,
|
||||
@ReconNum,
|
||||
@ReconState,
|
||||
@socket_count,
|
||||
@socket_1_code,
|
||||
@socket_1_value,
|
||||
@socket_2_code,
|
||||
@socket_2_value,
|
||||
@socket_3_code,
|
||||
@socket_3_value,
|
||||
@expire_time,
|
||||
@NewMailID,
|
||||
@activity_value, --활성석 20100928 jojo
|
||||
@link_id,
|
||||
@socket_1_color,
|
||||
@socket_2_color,
|
||||
@socket_3_color,
|
||||
@rank,
|
||||
@acquireroute,
|
||||
@physical,
|
||||
@magical,
|
||||
@durabilitymax,
|
||||
@weight
|
||||
declare @ERR int
|
||||
|
||||
SET @ERR = @@ERROR
|
||||
IF @ERR <> 0
|
||||
BEGIN
|
||||
RAISERROR('처리오류', 16, 10)
|
||||
IF @@TRANCOUNT <> 0 ROLLBACK
|
||||
RETURN (@ERR)
|
||||
END
|
||||
|
||||
COMMIT TRAN
|
||||
143
decomp/schema/RustyHearts/procs/up_insert_item_MailItem.sql
Normal file
143
decomp/schema/RustyHearts/procs/up_insert_item_MailItem.sql
Normal file
|
|
@ -0,0 +1,143 @@
|
|||
CREATE PROCEDURE [dbo].[up_insert_item_MailItem]
|
||||
@character_id [uniqueidentifier],
|
||||
@auth_id [uniqueidentifier],
|
||||
@item_id [uniqueidentifier],
|
||||
@code int,
|
||||
@use_cnt int,
|
||||
@remain_time int,
|
||||
@gcode int,
|
||||
@durability int,
|
||||
@enhance_level int,
|
||||
@option_1_code int,
|
||||
@option_1_value int,
|
||||
@option_2_code int,
|
||||
@option_2_value int,
|
||||
@option_3_code int,
|
||||
@option_3_value int,
|
||||
@option_group int,
|
||||
@ReconNum int,
|
||||
@ReconState tinyint,
|
||||
@socket_count int,
|
||||
@socket_1_code int,
|
||||
@socket_1_value int,
|
||||
@socket_2_code int,
|
||||
@socket_2_value int,
|
||||
@socket_3_code int,
|
||||
@socket_3_value int,
|
||||
@expire_time int,
|
||||
@NewMailID [uniqueidentifier],
|
||||
@activity_value int,--활성석 20100928 jojo
|
||||
@link_id [uniqueidentifier],
|
||||
@socket_1_color tinyint,
|
||||
@socket_2_color tinyint,
|
||||
@socket_3_color tinyint,
|
||||
@rank tinyint,
|
||||
@acquireroute tinyint,
|
||||
@physical int,
|
||||
@magical int,
|
||||
@durabilitymax int,
|
||||
@weight int
|
||||
|
||||
as
|
||||
set nocount on
|
||||
set xact_abort on
|
||||
|
||||
begin tran
|
||||
insert dbo.N_MailItem
|
||||
([item_uid],
|
||||
[character_id],
|
||||
[auth_id],
|
||||
[page_index],
|
||||
[slot_index],
|
||||
[code],
|
||||
[use_cnt],
|
||||
[remain_time],
|
||||
[create_time],
|
||||
[update_time],
|
||||
[gcode],
|
||||
[durability],
|
||||
[enhance_level],
|
||||
[option_1_code],
|
||||
[option_1_value],
|
||||
[option_2_code],
|
||||
[option_2_value],
|
||||
[option_3_code],
|
||||
[option_3_value],
|
||||
[option_group],
|
||||
[ReconNum],
|
||||
[ReconState],
|
||||
[socket_count],
|
||||
[socket_1_code],
|
||||
[socket_1_value],
|
||||
[socket_2_code],
|
||||
[socket_2_value],
|
||||
[socket_3_code],
|
||||
[socket_3_value],
|
||||
[expire_time],
|
||||
[activity_value],--활성석 20100928 jojo
|
||||
[link_id],
|
||||
[socket_1_color],
|
||||
[socket_2_color],
|
||||
[socket_3_color],
|
||||
[rank],
|
||||
[acquireroute],
|
||||
[physical],
|
||||
[magical],
|
||||
[durabilitymax],
|
||||
[weight]
|
||||
)
|
||||
select
|
||||
@item_id,
|
||||
@character_id,
|
||||
@auth_id,
|
||||
61,--[page_index],
|
||||
0, --[slot_index],
|
||||
@code,
|
||||
@use_cnt,
|
||||
@remain_time,
|
||||
GetDate(),
|
||||
GetDate(),
|
||||
@gcode,
|
||||
@durability,
|
||||
@enhance_level,
|
||||
@option_1_code,
|
||||
@option_1_value,
|
||||
@option_2_code,
|
||||
@option_2_value,
|
||||
@option_3_code,
|
||||
@option_3_value,
|
||||
@option_group,
|
||||
@ReconNum,
|
||||
@ReconState,
|
||||
@socket_count,
|
||||
@socket_1_code,
|
||||
@socket_1_value,
|
||||
@socket_2_code,
|
||||
@socket_2_value,
|
||||
@socket_3_code,
|
||||
@socket_3_value,
|
||||
@expire_time,
|
||||
@activity_value, --활성석 20100928 jojo
|
||||
@link_id,
|
||||
@socket_1_color,
|
||||
@socket_2_color,
|
||||
@socket_3_color,
|
||||
@rank,
|
||||
@acquireroute,
|
||||
@physical,
|
||||
@magical,
|
||||
@durabilitymax,
|
||||
@weight
|
||||
|
||||
--메일아이템을 메일과 연결
|
||||
UPDATE [dbo].[N_MailItem] SET [mail_uid] = @NewMailID WHERE [item_uid] = @item_id
|
||||
|
||||
declare @ERR int
|
||||
SET @ERR = @@ERROR
|
||||
IF @ERR <> 0
|
||||
BEGIN
|
||||
RAISERROR('처리오류', 16, 10)
|
||||
IF @@TRANCOUNT <> 0 ROLLBACK
|
||||
RETURN (@ERR)
|
||||
END
|
||||
COMMIT TRAN
|
||||
114
decomp/schema/RustyHearts/procs/up_insert_item_mail_by_gm.sql
Normal file
114
decomp/schema/RustyHearts/procs/up_insert_item_mail_by_gm.sql
Normal file
|
|
@ -0,0 +1,114 @@
|
|||
CREATE PROCEDURE [dbo].[up_insert_item_mail_by_gm]
|
||||
@sender_name nvarchar(16),
|
||||
@recver_name nvarchar(16),
|
||||
@msg nvarchar(100),
|
||||
@money int,
|
||||
@return_day int,
|
||||
@req_money int,
|
||||
@NewMailID [uniqueidentifier],
|
||||
@createType int,
|
||||
--------------------------------------------
|
||||
@item_id [uniqueidentifier],
|
||||
@code int,
|
||||
@use_cnt int,
|
||||
@remain_time int,
|
||||
@gcode int,
|
||||
@durability int,
|
||||
@enhance_level int,
|
||||
@option_1_code int,
|
||||
@option_1_value int,
|
||||
@option_2_code int,
|
||||
@option_2_value int,
|
||||
@option_3_code int,
|
||||
@option_3_value int,
|
||||
@option_group int,
|
||||
@ReconNum int,
|
||||
@ReconState tinyint,
|
||||
@socket_count int,
|
||||
@socket_1_code int,
|
||||
@socket_1_value int,
|
||||
@socket_2_code int,
|
||||
@socket_2_value int,
|
||||
@socket_3_code int,
|
||||
@socket_3_value int,
|
||||
@expire_time int,
|
||||
@activity_value int,--활성석 20100928 jojo
|
||||
@link_id [uniqueidentifier],
|
||||
@socket_1_color tinyint,
|
||||
@socket_2_color tinyint,
|
||||
@socket_3_color tinyint,
|
||||
@rank tinyint,
|
||||
@acquireroute tinyint,
|
||||
@physical int,
|
||||
@magical int,
|
||||
@durabilitymax int,
|
||||
@weight int
|
||||
as
|
||||
set nocount on
|
||||
|
||||
declare @character_id [uniqueidentifier],
|
||||
@auth_id [uniqueidentifier]
|
||||
|
||||
begin tran
|
||||
select @auth_id = [AuthID], @character_id = [character_id] from CharacterTable with (READUNCOMMITTED) where [Name] = @recver_name
|
||||
insert into MailTable values ( @NewMailID, --0
|
||||
@character_id, --1
|
||||
@recver_name, --2
|
||||
@character_id, --3
|
||||
@sender_name, --4
|
||||
@msg, --3
|
||||
@money, --4
|
||||
@return_day,
|
||||
@req_money,
|
||||
0, --8
|
||||
GETDATE(),
|
||||
@createType );
|
||||
Exec dbo.up_insert_item_MailItem @character_id,
|
||||
@auth_id,
|
||||
@item_id,
|
||||
@code,
|
||||
@use_cnt,
|
||||
@remain_time,
|
||||
@gcode,
|
||||
@durability,
|
||||
@enhance_level,
|
||||
@option_1_code,
|
||||
@option_1_value,
|
||||
@option_2_code,
|
||||
@option_2_value,
|
||||
@option_3_code,
|
||||
@option_3_value,
|
||||
@option_group,
|
||||
@ReconNum,
|
||||
@ReconState,
|
||||
@socket_count,
|
||||
@socket_1_code,
|
||||
@socket_1_value,
|
||||
@socket_2_code,
|
||||
@socket_2_value,
|
||||
@socket_3_code,
|
||||
@socket_3_value,
|
||||
@expire_time,
|
||||
@NewMailID,
|
||||
@activity_value, --활성석 20100928 jojo
|
||||
@link_id,
|
||||
@socket_1_color,
|
||||
@socket_2_color,
|
||||
@socket_3_color,
|
||||
@rank,
|
||||
@acquireroute,
|
||||
@physical,
|
||||
@magical,
|
||||
@durabilitymax,
|
||||
@weight
|
||||
declare @ERR int
|
||||
|
||||
SET @ERR = @@ERROR
|
||||
IF @ERR <> 0
|
||||
BEGIN
|
||||
RAISERROR('처리오류', 16, 10)
|
||||
IF @@TRANCOUNT <> 0 ROLLBACK
|
||||
RETURN (@ERR)
|
||||
END
|
||||
|
||||
COMMIT TRAN
|
||||
16
decomp/schema/RustyHearts/procs/up_insert_log_connection.sql
Normal file
16
decomp/schema/RustyHearts/procs/up_insert_log_connection.sql
Normal file
|
|
@ -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,10 @@
|
|||
CREATE PROCEDURE [dbo].[up_insert_log_packet_overload]
|
||||
@func_name char(100),
|
||||
@time int
|
||||
as begin
|
||||
|
||||
set nocount on
|
||||
|
||||
-- temp procedure
|
||||
|
||||
end
|
||||
70
decomp/schema/RustyHearts/procs/up_insert_mail.sql
Normal file
70
decomp/schema/RustyHearts/procs/up_insert_mail.sql
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
CREATE PROCEDURE [dbo].[up_insert_mail]
|
||||
@sender_auth_id [uniqueidentifier],
|
||||
@sender_character_id [uniqueidentifier],
|
||||
@sender_name nvarchar(16),
|
||||
@recver_name nvarchar(16),
|
||||
@msg nvarchar(100),
|
||||
@money int,
|
||||
@return_day int,
|
||||
@req_money int,
|
||||
@NewMailID [uniqueidentifier],
|
||||
@createType int
|
||||
|
||||
|
||||
as
|
||||
set nocount on
|
||||
|
||||
declare @character_id [uniqueidentifier]
|
||||
set @character_id = NULL
|
||||
|
||||
begin tran
|
||||
|
||||
select @character_id = [character_id] from CharacterTable with (READUNCOMMITTED) where [Name] = @recver_name
|
||||
|
||||
if @character_id IS NULL
|
||||
begin
|
||||
insert into MailTable
|
||||
values
|
||||
( @NewMailID, --0
|
||||
@sender_character_id, --1
|
||||
@recver_name, --2
|
||||
@sender_character_id, --3
|
||||
@sender_name, --4
|
||||
@msg, --3
|
||||
@money, --4
|
||||
@return_day,
|
||||
@req_money,
|
||||
0, --8
|
||||
GETDATE(),
|
||||
16
|
||||
);
|
||||
end
|
||||
else
|
||||
begin
|
||||
|
||||
insert into MailTable
|
||||
values
|
||||
( @NewMailID, --0
|
||||
@character_id, --1
|
||||
@recver_name, --2
|
||||
@sender_character_id, --3
|
||||
@sender_name, --4
|
||||
@msg, --3
|
||||
@money, --4
|
||||
@return_day,
|
||||
@req_money,
|
||||
0, --8
|
||||
GETDATE(),
|
||||
@createType
|
||||
);
|
||||
end
|
||||
|
||||
declare @ERR int
|
||||
|
||||
SET @ERR = @@ERROR
|
||||
IF @ERR <> 0 BEGIN
|
||||
RAISERROR('처리오류', 16, 10)
|
||||
IF @@TRANCOUNT <> 0 ROLLBACK
|
||||
RETURN (@ERR)
|
||||
END
|
||||
COMMIT TRAN
|
||||
76
decomp/schema/RustyHearts/procs/up_insert_mail_item01.sql
Normal file
76
decomp/schema/RustyHearts/procs/up_insert_mail_item01.sql
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
CREATE PROCEDURE [dbo].[up_insert_mail_item01]
|
||||
@sender_auth_id [uniqueidentifier],
|
||||
@sender_character_id [uniqueidentifier],
|
||||
@sender_name nvarchar(16),
|
||||
@recver_name nvarchar(16),
|
||||
@msg nvarchar(100),
|
||||
@money int,
|
||||
@return_day int,
|
||||
@req_money int,
|
||||
@NewMailID [uniqueidentifier],
|
||||
@createType int,
|
||||
@item_id [uniqueidentifier],
|
||||
@use_cnt int
|
||||
|
||||
as
|
||||
set nocount on
|
||||
|
||||
declare @character_id [uniqueidentifier],
|
||||
@auth_id [uniqueidentifier]
|
||||
|
||||
begin tran
|
||||
|
||||
select @auth_id = [AuthID], @character_id = [character_id] from CharacterTable with (READUNCOMMITTED) where [Name] = @recver_name
|
||||
|
||||
if @character_id IS NULL
|
||||
begin
|
||||
insert into MailTable
|
||||
values
|
||||
( @NewMailID, --0
|
||||
@sender_character_id, --1
|
||||
@recver_name, --2
|
||||
@sender_character_id, --3
|
||||
@sender_name, --4
|
||||
@msg, --3
|
||||
@money, --4
|
||||
@return_day,
|
||||
@req_money,
|
||||
0, --8
|
||||
GETDATE(),
|
||||
16
|
||||
);
|
||||
|
||||
Exec dbo.up_ItemMoveToMailItem @sender_character_id, @sender_auth_id, @item_id, @use_cnt, @NewMailID, 0
|
||||
end
|
||||
else
|
||||
begin
|
||||
|
||||
insert into MailTable
|
||||
values
|
||||
( @NewMailID, --0
|
||||
@character_id, --1
|
||||
@recver_name, --2
|
||||
@sender_character_id, --3
|
||||
@sender_name, --4
|
||||
@msg, --3
|
||||
@money, --4
|
||||
@return_day,
|
||||
@req_money,
|
||||
0, --8
|
||||
GETDATE(),
|
||||
@createType
|
||||
);
|
||||
|
||||
Exec dbo.up_ItemMoveToMailItem @character_id, @auth_id, @item_id, @use_cnt, @NewMailID, 0
|
||||
|
||||
end
|
||||
|
||||
declare @ERR int
|
||||
|
||||
SET @ERR = @@ERROR
|
||||
IF @ERR <> 0 BEGIN
|
||||
RAISERROR('처리오류', 16, 10)
|
||||
IF @@TRANCOUNT <> 0 ROLLBACK
|
||||
RETURN (@ERR)
|
||||
END
|
||||
COMMIT TRAN
|
||||
79
decomp/schema/RustyHearts/procs/up_insert_mail_item02.sql
Normal file
79
decomp/schema/RustyHearts/procs/up_insert_mail_item02.sql
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
CREATE PROCEDURE [dbo].[up_insert_mail_item02]
|
||||
@sender_auth_id [uniqueidentifier],
|
||||
@sender_character_id [uniqueidentifier],
|
||||
@sender_name nvarchar(16),
|
||||
@recver_name nvarchar(16),
|
||||
@msg nvarchar(100),
|
||||
@money int,
|
||||
@return_day int,
|
||||
@req_money int,
|
||||
@NewMailID [uniqueidentifier],
|
||||
@createType int,
|
||||
@item_id01 [uniqueidentifier],
|
||||
@use_cnt01 int,
|
||||
@item_id02 [uniqueidentifier],
|
||||
@use_cnt02 int
|
||||
|
||||
as
|
||||
set nocount on
|
||||
|
||||
declare @character_id [uniqueidentifier],
|
||||
@auth_id [uniqueidentifier]
|
||||
|
||||
begin tran
|
||||
|
||||
select @auth_id = [AuthID], @character_id = [character_id] from CharacterTable with (READUNCOMMITTED) where [Name] = @recver_name
|
||||
|
||||
if @character_id IS NULL
|
||||
begin
|
||||
insert into MailTable
|
||||
values
|
||||
( @NewMailID, --0
|
||||
@sender_character_id, --1
|
||||
@recver_name, --2
|
||||
@sender_character_id, --3
|
||||
@sender_name, --4
|
||||
@msg, --3
|
||||
@money, --4
|
||||
@return_day,
|
||||
@req_money,
|
||||
0, --8
|
||||
GETDATE(),
|
||||
16
|
||||
);
|
||||
|
||||
Exec dbo.up_ItemMoveToMailItem @sender_character_id, @sender_auth_id, @item_id01, @use_cnt01, @NewMailID, 0
|
||||
Exec dbo.up_ItemMoveToMailItem @sender_character_id, @sender_auth_id, @item_id02, @use_cnt02, @NewMailID, 1
|
||||
end
|
||||
else
|
||||
begin
|
||||
|
||||
insert into MailTable
|
||||
values
|
||||
( @NewMailID, --0
|
||||
@character_id, --1
|
||||
@recver_name, --2
|
||||
@sender_character_id, --3
|
||||
@sender_name, --4
|
||||
@msg, --3
|
||||
@money, --4
|
||||
@return_day,
|
||||
@req_money,
|
||||
0, --8
|
||||
GETDATE(),
|
||||
@createType
|
||||
);
|
||||
|
||||
Exec dbo.up_ItemMoveToMailItem @character_id, @auth_id, @item_id01, @use_cnt01, @NewMailID, 0
|
||||
Exec dbo.up_ItemMoveToMailItem @character_id, @auth_id, @item_id02, @use_cnt02, @NewMailID, 1
|
||||
end
|
||||
|
||||
declare @ERR int
|
||||
|
||||
SET @ERR = @@ERROR
|
||||
IF @ERR <> 0 BEGIN
|
||||
RAISERROR('처리오류', 16, 10)
|
||||
IF @@TRANCOUNT <> 0 ROLLBACK
|
||||
RETURN (@ERR)
|
||||
END
|
||||
COMMIT TRAN
|
||||
84
decomp/schema/RustyHearts/procs/up_insert_mail_item03.sql
Normal file
84
decomp/schema/RustyHearts/procs/up_insert_mail_item03.sql
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
CREATE PROCEDURE [dbo].[up_insert_mail_item03]
|
||||
@sender_auth_id [uniqueidentifier],
|
||||
@sender_character_id [uniqueidentifier],
|
||||
@sender_name nvarchar(16),
|
||||
@recver_name nvarchar(16),
|
||||
@msg nvarchar(100),
|
||||
@money int,
|
||||
@return_day int,
|
||||
@req_money int,
|
||||
@NewMailID [uniqueidentifier],
|
||||
@createType int,
|
||||
@item_id01 [uniqueidentifier],
|
||||
@use_cnt01 int,
|
||||
@item_id02 [uniqueidentifier],
|
||||
@use_cnt02 int,
|
||||
@item_id03 [uniqueidentifier],
|
||||
@use_cnt03 int
|
||||
|
||||
as
|
||||
set nocount on
|
||||
|
||||
declare @character_id [uniqueidentifier],
|
||||
@auth_id [uniqueidentifier]
|
||||
|
||||
begin tran
|
||||
|
||||
select @auth_id = [AuthID], @character_id = [character_id] from CharacterTable with (READUNCOMMITTED) where [Name] = @recver_name
|
||||
|
||||
if @character_id IS NULL
|
||||
begin
|
||||
insert into MailTable
|
||||
values
|
||||
( @NewMailID, --0
|
||||
@sender_character_id, --1
|
||||
@recver_name, --2
|
||||
@sender_character_id, --3
|
||||
@sender_name, --4
|
||||
@msg, --3
|
||||
@money, --4
|
||||
@return_day,
|
||||
@req_money,
|
||||
0, --8
|
||||
GETDATE(),
|
||||
16
|
||||
);
|
||||
|
||||
Exec dbo.up_ItemMoveToMailItem @sender_character_id, @sender_auth_id, @item_id01, @use_cnt01, @NewMailID, 0
|
||||
Exec dbo.up_ItemMoveToMailItem @sender_character_id, @sender_auth_id, @item_id02, @use_cnt02, @NewMailID, 1
|
||||
Exec dbo.up_ItemMoveToMailItem @sender_character_id, @sender_auth_id, @item_id03, @use_cnt03, @NewMailID, 2
|
||||
|
||||
end
|
||||
else
|
||||
begin
|
||||
|
||||
insert into MailTable
|
||||
values
|
||||
( @NewMailID, --0
|
||||
@character_id, --1
|
||||
@recver_name, --2
|
||||
@sender_character_id, --3
|
||||
@sender_name, --4
|
||||
@msg, --3
|
||||
@money, --4
|
||||
@return_day,
|
||||
@req_money,
|
||||
0, --8
|
||||
GETDATE(),
|
||||
@createType
|
||||
);
|
||||
|
||||
Exec dbo.up_ItemMoveToMailItem @character_id, @auth_id, @item_id01, @use_cnt01, @NewMailID, 0
|
||||
Exec dbo.up_ItemMoveToMailItem @character_id, @auth_id, @item_id02, @use_cnt02, @NewMailID, 1
|
||||
Exec dbo.up_ItemMoveToMailItem @character_id, @auth_id, @item_id03, @use_cnt03, @NewMailID, 2
|
||||
end
|
||||
|
||||
declare @ERR int
|
||||
|
||||
SET @ERR = @@ERROR
|
||||
IF @ERR <> 0 BEGIN
|
||||
RAISERROR('처리오류', 16, 10)
|
||||
IF @@TRANCOUNT <> 0 ROLLBACK
|
||||
RETURN (@ERR)
|
||||
END
|
||||
COMMIT TRAN
|
||||
30
decomp/schema/RustyHearts/procs/up_insert_quest.sql
Normal file
30
decomp/schema/RustyHearts/procs/up_insert_quest.sql
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
CREATE PROCEDURE [dbo].[up_insert_quest]
|
||||
@quest_uid [uniqueidentifier],
|
||||
@character_id [uniqueidentifier],
|
||||
@instance_npc_id int,
|
||||
@quest_code int,
|
||||
@quest_state int
|
||||
|
||||
as
|
||||
set nocount on
|
||||
|
||||
insert into QuestTable
|
||||
values
|
||||
( @quest_uid, --0
|
||||
@character_id, --1
|
||||
@instance_npc_id, --2
|
||||
@quest_code, --3
|
||||
@quest_state, --4
|
||||
0, --5
|
||||
0, --6
|
||||
0, --7
|
||||
0,
|
||||
0,
|
||||
GetDate(),
|
||||
GetDate(),
|
||||
1
|
||||
);
|
||||
|
||||
select * from dbo.QuestTable with (READUNCOMMITTED) where quest_uid = @quest_uid
|
||||
|
||||
return @@error
|
||||
109
decomp/schema/RustyHearts/procs/up_insert_rearing_info.sql
Normal file
109
decomp/schema/RustyHearts/procs/up_insert_rearing_info.sql
Normal file
|
|
@ -0,0 +1,109 @@
|
|||
CREATE PROCEDURE [dbo].[up_insert_rearing_info]
|
||||
@table_id tinyint,
|
||||
@group_id tinyint,
|
||||
@reating_id [uniqueidentifier],
|
||||
@char_id [uniqueidentifier],
|
||||
@type tinyint,
|
||||
@name nvarchar(16),
|
||||
@job tinyint,
|
||||
@level int,
|
||||
@index tinyint,
|
||||
@actionpoint int,
|
||||
@usedturn int,
|
||||
@endingid int,
|
||||
@rewarditem int,
|
||||
@createtime bigint,
|
||||
@vital int,
|
||||
@intelligence int,
|
||||
@strength int,
|
||||
@temper int,
|
||||
@charm int,
|
||||
@exhaust int,
|
||||
@angry int,
|
||||
@normal int,
|
||||
@good int,
|
||||
@sadness int,
|
||||
@height int,
|
||||
@weight int,
|
||||
@resilent int = 0,
|
||||
@eloquence int = 0
|
||||
|
||||
as
|
||||
set nocount on
|
||||
set xact_abort on
|
||||
|
||||
|
||||
begin
|
||||
BEGIN TRAN
|
||||
insert dbo.RearingTable
|
||||
(
|
||||
[table_id],
|
||||
[group_id],
|
||||
[rearing_id],
|
||||
[char_id],
|
||||
[type],
|
||||
[name],
|
||||
[job],
|
||||
[level],
|
||||
[index],
|
||||
[actionpoint],
|
||||
[usedturn],
|
||||
[endingid],
|
||||
[rewarditem],
|
||||
[createtime],
|
||||
[vital],
|
||||
[intelligence],
|
||||
[strength],
|
||||
[temper],
|
||||
[charm],
|
||||
[exhaust],
|
||||
[angry],
|
||||
[normal],
|
||||
[good],
|
||||
[sadness],
|
||||
[height],
|
||||
[weight],
|
||||
[resilent],
|
||||
[eloquence]
|
||||
)
|
||||
values(
|
||||
@table_id,
|
||||
@group_id,
|
||||
@reating_id,
|
||||
@char_id,
|
||||
@type,
|
||||
@name,
|
||||
@job,
|
||||
@level,
|
||||
@index,
|
||||
@actionpoint,
|
||||
@usedturn,
|
||||
@endingid,
|
||||
@rewarditem,
|
||||
@createtime,
|
||||
@vital,
|
||||
@intelligence,
|
||||
@strength,
|
||||
@temper,
|
||||
@charm,
|
||||
@exhaust,
|
||||
@angry,
|
||||
@normal,
|
||||
@good,
|
||||
@sadness,
|
||||
@height,
|
||||
@weight,
|
||||
@resilent,
|
||||
@eloquence
|
||||
)
|
||||
|
||||
|
||||
if(@@error <> 0 )
|
||||
begin
|
||||
ROLLBACK TRAN
|
||||
return
|
||||
|
||||
end
|
||||
|
||||
COMMIT TRAN
|
||||
end
|
||||
12
decomp/schema/RustyHearts/procs/up_insert_reward.sql
Normal file
12
decomp/schema/RustyHearts/procs/up_insert_reward.sql
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
CREATE PROCEDURE [dbo].[up_insert_reward]
|
||||
@type tinyint,
|
||||
@grade int
|
||||
|
||||
as
|
||||
set nocount on
|
||||
|
||||
insert into RewardTable( reward_type, character_id, character_name, reward_grade )
|
||||
select rank_type, character_id, char_name, grade
|
||||
from BattleRank
|
||||
with (READUNCOMMITTED)
|
||||
where [rank_type] = @type and [grade] <= @grade
|
||||
126
decomp/schema/RustyHearts/procs/up_insert_reward_item.sql
Normal file
126
decomp/schema/RustyHearts/procs/up_insert_reward_item.sql
Normal file
|
|
@ -0,0 +1,126 @@
|
|||
CREATE PROCEDURE [dbo].[up_insert_reward_item]
|
||||
@reward_type int,
|
||||
@reward_grade int,
|
||||
--------------------------------------------
|
||||
@sender_name nvarchar(16),
|
||||
@recver_name nvarchar(16),
|
||||
@msg nvarchar(100),
|
||||
@money int,
|
||||
@return_day int,
|
||||
@req_money int,
|
||||
@mail_id [uniqueidentifier],
|
||||
@createType int,
|
||||
--------------------------------------------
|
||||
@item_id [uniqueidentifier],
|
||||
@code int,
|
||||
@use_cnt int,
|
||||
@remain_time int,
|
||||
@gcode int,
|
||||
@durability int,
|
||||
@enhance_level int,
|
||||
@option_1_code int,
|
||||
@option_1_value int,
|
||||
@option_2_code int,
|
||||
@option_2_value int,
|
||||
@option_3_code int,
|
||||
@option_3_value int,
|
||||
@option_group int,
|
||||
@ReconNum int,
|
||||
@ReconState tinyint,
|
||||
@socket_count int,
|
||||
@socket_1_code int,
|
||||
@socket_1_value int,
|
||||
@socket_2_code int,
|
||||
@socket_2_value int,
|
||||
@socket_3_code int,
|
||||
@socket_3_value int,
|
||||
@expire_time int,
|
||||
@activity_value int,--활성석 20100928 jojo
|
||||
@link_id [uniqueidentifier],
|
||||
@socket_1_color tinyint,
|
||||
@socket_2_color tinyint,
|
||||
@socket_3_color tinyint,
|
||||
@rank tinyint,
|
||||
@acquireroute tinyint,
|
||||
@physical int,
|
||||
@magical int,
|
||||
@durabilitymax int,
|
||||
@weight int
|
||||
|
||||
as
|
||||
set nocount on
|
||||
|
||||
declare @character_id [uniqueidentifier],
|
||||
@auth_id [uniqueidentifier]
|
||||
|
||||
begin tran
|
||||
select @auth_id = [AuthID], @character_id = [character_id] from CharacterTable with (READUNCOMMITTED) where [Name] = @recver_name
|
||||
insert into MailTable values ( @mail_id, --0
|
||||
@character_id, --1
|
||||
@recver_name, --2
|
||||
@character_id, --3
|
||||
@sender_name, --4
|
||||
@msg, --3
|
||||
@money, --4
|
||||
@return_day,
|
||||
@req_money,
|
||||
0, --8
|
||||
GETDATE(),
|
||||
@createType );
|
||||
Exec dbo.up_insert_item_MailItem @character_id,
|
||||
@auth_id,
|
||||
@item_id,
|
||||
@code,
|
||||
@use_cnt,
|
||||
@remain_time,
|
||||
@gcode,
|
||||
@durability,
|
||||
@enhance_level,
|
||||
@option_1_code,
|
||||
@option_1_value,
|
||||
@option_2_code,
|
||||
@option_2_value,
|
||||
@option_3_code,
|
||||
@option_3_value,
|
||||
@option_group,
|
||||
@ReconNum,
|
||||
@ReconState,
|
||||
@socket_count,
|
||||
@socket_1_code,
|
||||
@socket_1_value,
|
||||
@socket_2_code,
|
||||
@socket_2_value,
|
||||
@socket_3_code,
|
||||
@socket_3_value,
|
||||
@expire_time,
|
||||
@mail_id,
|
||||
@activity_value, --활성석 20100928 jojo
|
||||
@link_id,
|
||||
@socket_1_color,
|
||||
@socket_2_color,
|
||||
@socket_3_color,
|
||||
@rank,
|
||||
@acquireroute,
|
||||
@physical,
|
||||
@magical,
|
||||
@durabilitymax,
|
||||
@weight
|
||||
|
||||
exec dbo.up_update_reward @character_id,
|
||||
@reward_type,
|
||||
@code,
|
||||
@use_cnt,
|
||||
@reward_grade,
|
||||
1
|
||||
|
||||
declare @ERR int
|
||||
|
||||
SET @ERR = @@ERROR
|
||||
IF @ERR <> 0
|
||||
BEGIN
|
||||
RAISERROR('처리오류', 16, 10)
|
||||
IF @@TRANCOUNT <> 0 ROLLBACK
|
||||
RETURN (@ERR)
|
||||
END
|
||||
|
||||
COMMIT TRAN
|
||||
38
decomp/schema/RustyHearts/procs/up_insert_skill.sql
Normal file
38
decomp/schema/RustyHearts/procs/up_insert_skill.sql
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
CREATE PROCEDURE [dbo].[up_insert_skill]
|
||||
@NewSkillID [uniqueidentifier],
|
||||
@character_id [uniqueidentifier],
|
||||
@group int,
|
||||
@slot_index int,
|
||||
@skill_table_id int,
|
||||
@skill_level int
|
||||
as
|
||||
set nocount on
|
||||
declare @skilltableid int
|
||||
declare @use int
|
||||
set @skilltableid = 0;
|
||||
set @use = 0;
|
||||
|
||||
select TOP 1 @skilltableid = [skill_table_id], @use = [use] from SkillTable WITH(NOLOCK) where character_id = @character_id and skill_table_id = @skill_table_id
|
||||
if( @skilltableid != 0 and @use != 0 )
|
||||
begin
|
||||
update [dbo].[SkillTable]
|
||||
set [group] = @group, slot_index = @slot_index, skill_level = @skill_level
|
||||
where skill_table_id = @skill_table_id and character_id = @character_id
|
||||
end
|
||||
else
|
||||
begin
|
||||
insert into SkillTable
|
||||
values
|
||||
(
|
||||
@NewSkillID,
|
||||
@character_id,
|
||||
@group,
|
||||
@slot_index,
|
||||
@skill_table_id,
|
||||
@skill_level,
|
||||
GetDate(),
|
||||
1
|
||||
);
|
||||
end
|
||||
|
||||
return @@error
|
||||
9
decomp/schema/RustyHearts/procs/up_is_exist_guild.sql
Normal file
9
decomp/schema/RustyHearts/procs/up_is_exist_guild.sql
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
CREATE PROCEDURE [dbo].[up_is_exist_guild]
|
||||
@name nvarchar(16)
|
||||
as begin
|
||||
|
||||
set nocount on
|
||||
set transaction isolation level read uncommitted
|
||||
|
||||
select * from GuildTable where name = @name
|
||||
end
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
CREATE PROCEDURE [dbo].[up_item_durability_update]
|
||||
@item_id [uniqueidentifier],
|
||||
@durability int
|
||||
as
|
||||
set nocount on
|
||||
|
||||
if exists ( select [item_uid] from dbo.N_EquipItem with (READUNCOMMITTED) where item_uid = @item_id )
|
||||
begin
|
||||
update dbo.N_EquipItem set
|
||||
durability = @durability
|
||||
where item_uid = @item_id;
|
||||
end
|
||||
else
|
||||
begin
|
||||
update dbo.N_InventoryItem set
|
||||
durability = @durability
|
||||
where item_uid = @item_id;
|
||||
end
|
||||
|
||||
|
||||
return @@error
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
CREATE PROCEDURE [dbo].[up_item_durability_update_test]
|
||||
@item_id [uniqueidentifier],
|
||||
@durability int
|
||||
as
|
||||
set nocount on
|
||||
|
||||
update dbo.N_EquipItem_Test set
|
||||
durability = @durability
|
||||
|
||||
where item_uid = @item_id;
|
||||
|
||||
return @@error
|
||||
119
decomp/schema/RustyHearts/procs/up_item_move_cash_to_equip.sql
Normal file
119
decomp/schema/RustyHearts/procs/up_item_move_cash_to_equip.sql
Normal file
|
|
@ -0,0 +1,119 @@
|
|||
CREATE PROCEDURE [dbo].[up_item_move_cash_to_equip]
|
||||
@character_id [uniqueidentifier],
|
||||
@auth_id [uniqueidentifier],
|
||||
@item_id [uniqueidentifier],
|
||||
@page_index int,
|
||||
@slot_index int
|
||||
|
||||
as
|
||||
set nocount on
|
||||
|
||||
begin tran
|
||||
|
||||
--인벤->장착 으로 복사
|
||||
insert N_EquipItem
|
||||
([item_uid],
|
||||
[character_id],
|
||||
[auth_id],
|
||||
[page_index],
|
||||
[slot_index],
|
||||
[code],
|
||||
[use_cnt],
|
||||
[remain_time],
|
||||
[create_time],
|
||||
[update_time],
|
||||
[gcode],
|
||||
[durability],
|
||||
[enhance_level],
|
||||
[option_1_code],
|
||||
[option_1_value],
|
||||
[option_2_code],
|
||||
[option_2_value],
|
||||
[option_3_code],
|
||||
[option_3_value],
|
||||
[option_group],
|
||||
[ReconNum],
|
||||
[ReconState],
|
||||
[socket_count],
|
||||
[socket_1_code],
|
||||
[socket_1_value],
|
||||
[socket_2_code],
|
||||
[socket_2_value],
|
||||
[socket_3_code],
|
||||
[socket_3_value],
|
||||
[expire_time],
|
||||
[lock_pwd],
|
||||
[activity_value], --활성석 20100928 jojo
|
||||
[link_id],
|
||||
[socket_1_color],
|
||||
[socket_2_color],
|
||||
[socket_3_color],
|
||||
[deferment_time],
|
||||
[rank],
|
||||
[acquireroute],
|
||||
[physical],
|
||||
[magical],
|
||||
[durabilitymax],
|
||||
[weight]
|
||||
)
|
||||
|
||||
select
|
||||
[item_uid],
|
||||
[character_id],
|
||||
[auth_id],
|
||||
@page_index,
|
||||
@slot_index,
|
||||
[code],
|
||||
[use_cnt],
|
||||
[remain_time],
|
||||
[create_time],
|
||||
[update_time],
|
||||
[gcode],
|
||||
[durability],
|
||||
[enhance_level],
|
||||
[option_1_code],
|
||||
[option_1_value],
|
||||
[option_2_code],
|
||||
[option_2_value],
|
||||
[option_3_code],
|
||||
[option_3_value],
|
||||
[option_group],
|
||||
[ReconNum],
|
||||
[ReconState],
|
||||
[socket_count],
|
||||
[socket_1_code],
|
||||
[socket_1_value],
|
||||
[socket_2_code],
|
||||
[socket_2_value],
|
||||
[socket_3_code],
|
||||
[socket_3_value],
|
||||
[expire_time],
|
||||
[lock_pwd],
|
||||
[activity_value], --활성석 20100928 jojo
|
||||
[link_id],
|
||||
[socket_1_color],
|
||||
[socket_2_color],
|
||||
[socket_3_color],
|
||||
[deferment_time],
|
||||
[rank],
|
||||
[acquireroute],
|
||||
[physical],
|
||||
[magical],
|
||||
[durabilitymax],
|
||||
[weight]
|
||||
from N_InventoryItem with (READUNCOMMITTED) where [character_id] = @character_id and [item_uid] = @item_id
|
||||
|
||||
--인벤 아이템 삭제
|
||||
delete from N_InventoryItem where [character_id] = @character_id and [item_uid] = @item_id
|
||||
|
||||
declare @ERR int
|
||||
|
||||
SET @ERR = @@ERROR
|
||||
IF @ERR <> 0 BEGIN
|
||||
RAISERROR('처리오류', 16, 10)
|
||||
IF @@TRANCOUNT <> 0 ROLLBACK
|
||||
RETURN (@ERR)
|
||||
END
|
||||
COMMIT TRAN
|
||||
|
||||
return @@error
|
||||
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