Emisand 1.5 database fix

Results 1 to 7 of 7
  1. #1
    Account Upgraded | Title Enabled! gabire is offline
    MemberRank
    Dec 2008 Join Date
    CanadaLocation
    577Posts

    config Emisand 1.5 database fix

    can someone upload a fixed GunzDB.sql (script)

    gamble fix ,etc.

    thanks!




    I dont know why i cant execute the gamble fix script.


  2. #2
    Valued Member kriiz is offline
    MemberRank
    Nov 2008 Join Date
    ArgentinaLocation
    126Posts

    Re: Emisand 1.5 database fix

    Here's a fix for the Gamble Items


    Code:
    USE [GunzDB]
    set ANSI_NULLS ON
    set QUOTED_IDENTIFIER ON
    GO
    --ALTER PROC [dbo].[spChangeGambleItemToRewardNormalItem]  
    CREATE PROC dbo.spChangeGambleItemToRewardNormalItem  
    	  @CID				INT
    	, @CIID				INT
    	, @GIID				INT
    	, @GRIID			INT
    	, @RewardItemID		INT
    	, @RewardRentPeriod	INT
    
    
    AS BEGIN
    
    	SET NOCOUNT ON;
    
    	DECLARE @RentHourPeriod		INT;
    	DECLARE @GambleItemCount	INT;
    	
    	-----------------------------------------------------------------------------
    			
    	SELECT	@RentHourPeriod = ISNULL(RentHourPeriod, 0)
    	FROM	GambleRewardItem gri(NOLOCK)  
    	WHERE	GRIID = @GRIID
    	AND		GIID = @GIID 
    	AND		(ItemIDMale = @RewardItemID OR ItemIDFemale = @RewardItemID)
    	
    	IF (0 = @@ROWCOUNT) BEGIN
    		SELECT -1 AS 'Ret'  
    		RETURN
    	END
    			
    	SELECT	@GambleItemCount = ISNULL(Cnt, 1)
    	FROM	CharacterItem(NOLOCK)
    	WHERE	CIID = @CIID;
    		
    	-----------------------------------------------------------------------------
    	
    	DECLARE @NowDate	DATETIME;
    	SET @NowDate = GETDATE();	
    	
    	-----------------------------------------------------------------------------
    			
    	BEGIN TRAN -----------  
    	
    		----------------------------------------------------------------------------------------
    		
    		IF( @GambleItemCount > 1 ) BEGIN
    		
    			UPDATE	CharacterItem 
    			SET		Cnt = Cnt - 1
    			WHERE	CID = @CID 
    			AND		CIID = @CIID 
    			
    			IF (0 <> @@ERROR) OR (0 = @@ROWCOUNT) BEGIN  
    				ROLLBACK TRAN  
    				SELECT -2 AS 'Ret'  
    				RETURN
    			END
    			
    		END
    		ELSE BEGIN
    		
    			UPDATE	CharacterItem 
    			SET		CID = NULL
    			WHERE	CID = @CID 
    			AND		CIID = @CIID
    			
    			IF (0 <> @@ERROR) OR (0 = @@ROWCOUNT) BEGIN  
    				ROLLBACK TRAN  
    				SELECT -3 AS 'Ret'  
    				RETURN
    			END
    			
    		END
    		
    		---------------------------------------------------------------------------------------	
    		
    		INSERT CharacterItem(CID, ItemID, RegDate, RentDate, RentHourPeriod, Cnt)
    		VALUES (@CID, @RewardItemID, @NowDate, @NowDate, @RentHourPeriod, 1)
    		
    		DECLARE @OrderCIID INT;			
    		SET @OrderCIID = @@IDENTITY;
    			
    		IF (0 <> @@ERROR) BEGIN  
    			ROLLBACK TRAN  
    			SELECT -4 AS 'Ret'  
    			RETURN
    		END
    			
    			
    		INSERT dbo.ItemChangeLog_CharacterItem(ChangeType, ChangeDate, CID, CIID, ItemID, [Count])
    		VALUES (202, @NowDate, @CID, @CIID, @GIID, 1);	
    		
    		IF (0 <> @@ERROR) BEGIN  
    			ROLLBACK TRAN  
    			SELECT -5 AS 'Ret'  
    			RETURN
    		END
    
    		INSERT dbo.ItemChangeLog_CharacterItem(ChangeType, ChangeDate, CID, CIID, ItemID, [Count])
    		VALUES (102, @NowDate, @CID, @OrderCIID, @RewardItemID, 1);
    		
    		IF (0 <> @@ERROR) BEGIN  
    			ROLLBACK TRAN  
    			SELECT -6 AS 'Ret'  
    			RETURN
    		END
    
    		INSERT INTO LogDB..GambleLog(CID, GIID, RewardItemID, RegDate)  
    		VALUES (@CID, @GIID, @RewardItemID, @NowDate);
    		
    		IF (0 <> @@ERROR) BEGIN  
    			ROLLBACK TRAN  
    			SELECT -7 AS 'Ret'  
    			RETURN
    		END
    		
    		----------------------------------------------------------------------------------------
    
    	COMMIT TRAN  -----------
    		
    	SELECT 0 AS 'Ret', @OrderCIID AS 'ORDERCIID'
    END
    Last edited by Phoenix; 22-03-12 at 05:17 PM. Reason: Use code tags.

  3. #3
    I'm retired, I'm already jorklenis2 is online now
    MemberRank
    Oct 2011 Join Date
    PanamáLocation
    883Posts

    Re: Emisand 1.5 database fix

    [03/19/12 11:59:42] MMatchDBMgr::ExceptionHandler
    ErrSQL( {CALL spBringAccountItemStackable (5, 3, 14, 0, 1)} ), ErrCode( -1 )
    ErrMsg - No se encontró el procedimiento almacenado 'spBringAccountItemStackable'.
    State:37000,Native:2812,Origin:[Microsoft][ODBC SQL Server Driver][SQL Server

  4. #4
    Valued Member SandOfTime is offline
    MemberRank
    Mar 2011 Join Date
    112Posts

    Re: Emisand 1.5 database fix

    remove primary key

  5. #5
    Account Upgraded | Title Enabled! ThunderZ is offline
    MemberRank
    Oct 2011 Join Date
    396Posts

    Re: Emisand 1.5 database fix

    how about using search lol.

  6. #6
    I'm retired, I'm already jorklenis2 is online now
    MemberRank
    Oct 2011 Join Date
    PanamáLocation
    883Posts

    Re: Emisand 1.5 database fix

    Quote Originally Posted by SandOfTime View Post
    remove primary key

    what table the dbo.GambleItem remove primary key.

  7. #7
    Account Upgraded | Title Enabled! gabire is offline
    MemberRank
    Dec 2008 Join Date
    CanadaLocation
    577Posts

    Re: Emisand 1.5 database fix

    dont work



Advertisement