124 lines
2.7 KiB
Transact-SQL
124 lines
2.7 KiB
Transact-SQL
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
|