USE [lin2world]
GO
/****** Object: StoredProcedure [dbo].[lin_SaveNpcBoss] Script Date: 05/24/2019 09:24:16 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
/********************************************
lin_SaveNpcBoss
INPUT
OUTPUT
return
made by
date
********************************************/
ALTER PROCEDURE [dbo].[lin_SaveNpcBoss]
(
@npc_db_name nvarchar(50),
@alive INT,
@hp INT,
@mp INT,
@pos_x INT,
@pos_y INT,
@pos_z INT,
@time_low INT,
@time_high INT
)
AS
SET NOCOUNT ON
update npc_boss
set
alive=@alive, hp=@hp, mp=@mp, pos_x=@pos_x, pos_y=@pos_y, pos_z=@pos_z, time_low=@time_low, time_high=@time_high
where npc_db_name = @npc_db_name
if @@rowcount = 0
begin
insert into npc_boss values
(@npc_db_name, @alive, @hp,@mp, @pos_x, @pos_y,@pos_z, @time_low, @time_high, 0)
end