13 lines
664 B
Transact-SQL
13 lines
664 B
Transact-SQL
CREATE PROCEDURE [dbo].[up_update_remaintime_item]
|
|
@character_id [uniqueidentifier]
|
|
as begin
|
|
set nocount on
|
|
update N_InventoryItem set [remain_time] = [remain_time]-DATEDIFF(second, [create_time], GETDATE()), [update_time] = GETDATE()
|
|
where character_id = @character_id and [remain_time] > 0
|
|
|
|
update N_EquipItem set [remain_time] = [remain_time]-DATEDIFF(second, [create_time], GETDATE()), [update_time] = GETDATE()
|
|
where character_id = @character_id and [remain_time] > 0
|
|
|
|
update N_MailItem set [remain_time] = [remain_time]-DATEDIFF(second, [create_time], GETDATE()), [update_time] = GETDATE()
|
|
where character_id = @character_id and [remain_time] > 0
|
|
end
|