[CN - 2012] dbo.tMinorsPlaytime

Status
Not open for further replies.
Yes.
One of the easiest way to bypass this should be to alter the usp_China_getMinorsPlaytime procedure like this:
Code:
ALTER PROCEDURE [dbo].[usp_China_getMinorsPlaytime]
    @[I][B][URL="https://forum.ragezone.com/members/77438.html"]Nuser[/URL][/B][/I]No int
,    @nRet    int = 0 output
AS
BEGIN
    SET NOCOUNT ON
    
    DECLARE @isAdult    bit = 1
    DECLARE @playtime   bigint = 0
/*    DECLARE @[I][B][URL="https://forum.ragezone.com/members/2000163149.html"]log[/URL][/B][/I]outDate datetime
    
    SET @nRet = 0
    
    SELECT @isAdult = bIsAdult, @playtime = nPlaytime, @[I][B][URL="https://forum.ragezone.com/members/2000163149.html"]log[/URL][/B][/I]outDate = dLogoutDate 
      FROM tMinorsPlaytime WITH(UPDLOCK, HOLDLOCK)
     WHERE nUserNo = @[I][B][URL="https://forum.ragezone.com/members/77438.html"]Nuser[/URL][/B][/I]No
    IF @[I][B][URL="https://forum.ragezone.com/members/2000163149.html"]log[/URL][/B][/I]outDate IS NULL OR DATEADD(hour, 5, @[I][B][URL="https://forum.ragezone.com/members/2000163149.html"]log[/URL][/B][/I]outDate) <= GETDATE() BEGIN
        BEGIN TRAN
        
        SET @playtime = 0
        
        UPDATE tMinorsPlaytime 
           SET nPlaytime = @playtime
         WHERE nUserNo = @[I][B][URL="https://forum.ragezone.com/members/77438.html"]Nuser[/URL][/B][/I]No
        IF @@ERROR <> 0 OR @@ROWCOUNT <> 1 BEGIN
            ROLLBACK TRAN
            SET @nRet = -1111
            RETURN
        END
        
        COMMIT TRAN
    END    */
    
    SELECT @isAdult AS bIsAdult, @playtime AS nPlaytime
END

But really, why you should disable it, why not simply use the given procedures to create a new User and automatically add those rows/values?
There are many predefined stored procedures to do all the tasks you need to do.
 
Last edited:
I'll be a nice guy today (good mood) and give you the low-down on the easier solution, aka SELECT 1, 0 use above but scrap everything and simply return with pre-defined data, saves tables/space in your database.

fEoGbPo - [CN - 2012] dbo.tMinorsPlaytime - RaGEZONE Forums


Tl;dr: Edit this to SELECT 1, 0 :sleep:
 
Status
Not open for further replies.
Back