USE [RohanGame]
GO
/****** Object: StoredProcedure [dbo].[ROHAN_EndGame] Script Date: 07/16/2017 04:47:48 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
ALTER PROCEDURE [dbo].[ROHAN_EndGame]
@
_id int
AS
set nocount on
declare @
int
declare @
pe int
declare @
sec int
declare @
int
--아이템 가상 처리
update titem set type = @
_id where id = 0
update tcharacterlogin set
last_date = getdate()
,login = 0
where char_id = @
_id
select @
= [level]
from tcharacterability
where char_id = @
_id
select @
pe = [ctype_id]
from tcharacter
where id = @
_id
if @
>= 50) and @
pe= 196993)
begin
update tcharacter set ctype_id = 196994 where id = @
_id
end
if @
>= 50) and @
pe= 196869)
begin
update tcharacter set ctype_id = 196870 where id = @
_id
end
if @
>= 50) and @
pe= 197133)
begin
update tcharacter set ctype_id = 197134 where id = @
_id
end
if @
>= 50) and @
pe= 197257)
begin
update tcharacter set ctype_id = 197258 where id = @
_id
end
if @
>= 50) and @
pe= 197653)
begin
update tcharacter set ctype_id = 197654 where id = @
_id
end
if @
>= 50) and @
pe= 197777)
begin
update tcharacter set ctype_id = 197778 where id = @
_id
end
if @
>= 50) and @
pe= 198685)
begin
update tcharacter set ctype_id = 198686 where id = @
_id
end
if @
>= 50) and @
pe= 198809)
begin
update tcharacter set ctype_id = 198810 where id = @
_id
end
if @
>= 50) and @
pe= 200741)
begin
update tcharacter set ctype_id = 200742 where id = @
_id
end
if @
>= 50) and @
pe= 200865)
begin
update tcharacter set ctype_id = 200866 where id = @
_id
end
if @
>= 50) and @
pe= 204845)
begin
update tcharacter set ctype_id = 204846 where id = @
_id
end
if @
>= 50) and @
pe= 204969)
begin
update tcharacter set ctype_id = 204970 where id = @
_id
end
if @
>= 50) and @
pe= 229437)
begin
update tcharacter set ctype_id = 229438 where id = @
_id
end
if @
>= 50) and @
pe= 229561)
begin
update tcharacter set ctype_id = 229562 where id = @
_id
end
select @
sec = play_sec
from TCharacterLogin
where char_id = @
_id
exec @
= LOCAL_InsTCharacterLogin @
_id
if @@error <> 0 or @@rowcount <> 1 return -1
--return 0
commit
--------------------------------------
return @
----------------------------------------------------
-- Error Process
----------------------------------------------------
ERR:
rollback
return @
and
Something wrong? : v