The column OwnerCharID in _CharCOS is only used for Transport & Ride Pets.
All other pets use OwnerCharID = 0
This Stored Procedure will solve the problem for you.
Info: If you put the pet into the Storage OwnerCharID will stay, if u want to fix that write your own Query for this
Download attached file for better formatting
All other pets use OwnerCharID = 0
This Stored Procedure will solve the problem for you.
Info: If you put the pet into the Storage OwnerCharID will stay, if u want to fix that write your own Query for this
PHP Code:
USE SRO_VT_SHARD
GO
ALTER PROCEDURE [dbo].[_ChangeCOSState]
@COSID INT,
@State INT
AS
--//////////_ChangeCOSState Fix V1.1 By Syloxx\\\\\\\\\
DECLARE @ItemID INT,
@CharID INT
IF @State = 3
BEGIN
SELECT @ItemID = IT.ID64
FROM _Items IT
INNER JOIN _RefObjCommon ROC
ON ROC.ID = IT.RefItemID
WHERE ROC.TypeID2 = 2
AND ROC.TypeID3 = 1
AND IT.Data = @COSID
SELECT @CharID = CharID
FROM _Inventory
WHERE ItemID = @ItemID
IF EXISTS (SELECT @CharID FROM _CharCOS WHERE OwnerCharID = @CharID AND ID = @COSID)
BEGIN
UPDATE _CharCOS
SET State = 3
WHERE ID = @COSID
END
ELSE
BEGIN
UPDATE _CharCOS
SET State = 3,
OwnerCharID = @CharID
WHERE ID = @COSID
END
END
ELSE
BEGIN
UPDATE _CharCOS
SET State = @State
WHERE ID = @COSID
END
IF @@ERROR <> 0 OR @@ROWCOUNT =0
BEGIN
RETURN -1
END
RETURN 1