• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook page for updates, we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.) When you see an Incapsula error, you know we are in the process of migration.

Pet Inventory 7/7

Newbie Spellweaver
Joined
Nov 8, 2012
Messages
13
Reaction score
3
Code:
USE [SRO_VT_SHARD]
GO
/****** Object:  StoredProcedure [dbo].[_AddNewCOS]    Script Date: 08/22/2013 19:40:43 ******/
/******krmfrnc******/
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER ON
GO

ALTER PROCEDURE [dbo].[_AddNewCOS]
    @OwnerCharID    int,
    @RefObjID    int,
    @Level        int,
    @HP        int,
    @MP        int,
    @HGP        int,
    @KeeperNPC    int,
    @State        int,
    @InventorySize  int,
    @itemID        int,
    @PickItemConfig tinyint,
    @RentEndTime     smalldatetime
as

begin tran

    declare @COS_ID    int
--@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
--        pet_skill_item (ÃÖ¼±È£)        
--@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

    declare @MaxInventorySize tinyint
    select @MaxInventorySize = InventorySize
    from _RefObjCommon, _RefObjChar
    where _RefObjCommon.ID = @RefObjID and _RefObjCommon.Link = _RefObjChar.ID
    
    if( @@rowcount = 0 or @MaxInventorySize < @InventorySize )
    begin
        rollback tran
        return -5
    end

    insert into _CharCOS values (@OwnerCharID, @RefObjID, @HP, @MP, @KeeperNPC, @State, NULL, @Level, 0, @HGP, @PickItemConfig, @RentEndTime)
--@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
--@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    set @COS_ID = @@identity
    if (@COS_ID = 0 OR @@error <> 0)
    begin
        rollback tran
        return -1
    end

--@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
--        pet_skill_item (ÃÖ¼±È£)        
--@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    if (@MaxInventorySize > 0)
--@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
--@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    begin
        declare @Slot  int
        set @Slot = 0
--@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
--        pet_skill_item (ÃÖ¼±È£)        
--@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
        while (@Slot < @MaxInventorySize)
--@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
--@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
        begin
            insert into _InvCOS values(@COS_ID, @Slot, 0)
            if (@@error <> 0)
            begin
                -- Àκ¥Å丮 »ý¼º ½ÇÆÐ!
                rollback tran
                return -2
            end    
        
            set @Slot = @Slot + 1
        end
    end
    
/*    --´õ ÀÌ»ó ÀÌ Ä÷³¿¡´Â µ¥ÀÌÅ͸¦ ³ÖÁö ¾Ê´Â´Ù!
    UPDATE _Char SET EngagedCOS = @COS_ID WHERE CharID = @OwnerCharID
    IF (@@ERROR <> 0 OR @@ROWCOUNT = 0)
    BEGIN
        ROLLBACK TRANSACTION
        RETURN -3
    END
*/
    if( @itemID <> 0 )
    begin
        update _Items set Data = @COS_ID where ID64 = @itemID
        if( @@error <> 0 or @@rowcount = 0 )
        begin
            rollback transaction
            return -4
        end
        
         declare @Serial64 bigint
        select @Serial64 = Serial64 from _Items where Data = @COS_ID
        exec _AddTimedJobForPet @COS_ID,5,22926,1992999999,1111708465,1,196,0,0,0,0,0,@Serial64
        
    end

    commit tran

return @COS_ID

krmfrnc - Pet Inventory 7/7 - RaGEZONE Forums
 
Last edited:
Newbie Spellweaver
Joined
Oct 31, 2011
Messages
66
Reaction score
11
Remember the server crashs after some time.

;)
 
Experienced Elementalist
Joined
Mar 10, 2012
Messages
285
Reaction score
120
can make it work and even putting on all the pages you want, for that there is no problem. The problem is that the more people you have Pets with 7 pages, load more items will require the sr_gameserver, and as this has a load limit, this causes exceeding its memory and close "crash"

"there is only one solution and it is increasing volatile memory loop of the gameserver."

Luck! ;)
 
Junior Spellweaver
Joined
Apr 4, 2013
Messages
169
Reaction score
57
declare @Serial64 bigint select @Serial64 = Serial64 from _Items where Data = @COS_ID exec _AddTimedJobForPet @COS_ID,5,22926,1992999999,1111708465,1,196,0,0,0,0,0,@Serial64


Change 196 > 140
 
Last edited:
Back
Top