USE [World00_Character]
GO
/****** Object: StoredProcedure [dbo].[p_Char_Logout] Script Date: 07/12/2015 15:12:03 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
/****** 개체: 저장 프로시저 dbo.p_Char_Logout 스크립트 날짜: 2007-03-13 오후 6:25:10 ******/


ALTER PROCEDURE [dbo].[p_Char_Logout]
/*
Character logout
2004.6 By CJC
Input:
nCharNo = To be logout
nPlayMin = Play minute at this time
output:
0 = error
1 = work ok
*/
@nCharNo int,
@nPlayMin int,
@nRet int OUTPUT
AS
SET NOCOUNT ON
UPDATE tCharacter
SET nPlayMin = nPlayMin + @nPlayMin
WHERE nCharNo = @nCharNo
SET @nRet = @@ROWCOUNT
Delete from dbo.LoggedInChars where nCharNo = @nCharNo
-- end