144 lines
3.9 KiB
Transact-SQL
144 lines
3.9 KiB
Transact-SQL
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
|