Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Storage problem

Initiate Mage
Joined
Apr 26, 2011
Messages
77
Reaction score
4
hi guys , well i am out of ideas how to fix this , already tried the search button but all have fail to fix my problem .. no offence

well i cant move items back to storage ... made iscashitem = true at zitem and item.dbo cashitem =1 then it worked but the problem is that when i move a cash item to storage , it is not deleted from the storage .. anyone knows how to fix this ?!
 
In Progress... FFXIV...
Member
Joined
Oct 5, 2010
Messages
1,695
Reaction score
456
Check your Stored Procedures. dbo.spBringBackAccountItem

Here's mine dbo.spBringBackAccountItem
Code:
USE [GunzDB]
GO
/****** Object:  StoredProcedure [dbo].[spBringBackAccountItem]    Script Date: 1/31/2013 4:01:00 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROC [dbo].[spBringBackAccountItem]
-- ALTER PROC dbo.spBringBackAccountItem
	@AID			INT,
	@CID			INT,
	@CIID			INT
AS BEGIN
	SET NOCOUNT ON
  	
	DECLARE @ItemID			INT;
	DECLARE @RentDate		DATETIME; 
	DECLARE @RentHourPeriod SMALLINT;
	
	DECLARE @CurDate DATETIME;
	SET @CurDate = GETDATE();
			
	SELECT	@ItemID = ItemID, @RentDate = RentDate
			, @RentHourPeriod = RentHourPeriod
	FROM	CharacterItem 
	WHERE	CIID = @CIID
	AND		CID = @CID;

	IF( (@ItemID IS NULL) AND (@ItemID < 400000) ) BEGIN
		SELECT -1 AS 'Ret';
		RETURN;
	END	
	
	IF( EXISTS(SELECT CID FROM CharacterEquipmentSlot WHERE CIID = @CIID AND CID = @CID) ) BEGIN
		SELECT -2 AS 'Ret';
		RETURN;
	END
	 
	BEGIN TRAN -------------
	
		UPDATE	CharacterItem 
		SET		CID = NULL
		WHERE	CIID = @CIID
		AND		CID = @CID;
		
		IF( 0 = @@ROWCOUNT OR 0 <> @@ERROR ) BEGIN  
			ROLLBACK TRAN;
			SELECT -3 AS 'Ret';
			RETURN;
		END
		
		INSERT INTO AccountItem (AID, ItemID, RentDate, RentHourPeriod, Cnt)   
		VALUES (@AID, @ItemID, @RentDate, @RentHourPeriod, 1);
		
		DECLARE @AIID INT;
		SET @AIID = @@IDENTITY;
			
		IF( 0 = @@ROWCOUNT OR 0 <> @@ERROR ) BEGIN  
			ROLLBACK TRAN;
			SELECT -4 AS 'Ret';
			RETURN;		
		END	
		
	COMMIT TRAN -----------  
	
	SELECT 0 AS 'Ret';
END

Not sure what's going on in your database.
 
Upvote 0
Back
Top