Help remove Depot chest! Rep+++

Printer

if Printer then print("LUA") end
Premium User
Joined
Dec 27, 2009
Messages
5,734
Reaction score
2,002
Location
Sweden?
Need help inside in depot its a depot chest and i want to remove it!

how can i remove it?

Rep++ for help
 

Cykotitan

Experienced G'
Joined
Nov 4, 2008
Messages
16,895
Reaction score
810
player.cpp, remove
C++:
Depot* Player::getDepot(uint32_t depotId, bool autoCreateDepot)
{
    DepotMap::iterator it = depots.find(depotId);
    if(it != depots.end())
        return it->second.first;

    //create a new depot?
    if(autoCreateDepot)
    {
        Item* locker = Item::CreateItem(ITEM_LOCKER);
        if(Container* container = locker->getContainer())
        {
            if(Depot* depot = container->getDepot())
            {
                // container->__internalAddThing(Item::CreateItem(ITEM_DEPOT)); // REMOVE THIS LINE
                addDepot(depot, depotId);
                return depot;
            }
        }

        g_game.freeThing(locker);
        std::cout << "Failure: Creating a new depot with id: " << depotId <<
            ", for player: " << getName() << std::endl;
    }

    return NULL;
}
 
Last edited by a moderator:
OP
Printer

Printer

if Printer then print("LUA") end
Premium User
Joined
Dec 27, 2009
Messages
5,734
Reaction score
2,002
Location
Sweden?
Refresh

I get error when i compile it! are you sure i can remove that?
 
Last edited:

picachu

Member
Joined
Dec 2, 2007
Messages
971
Reaction score
10
why do you want to remove it ? lol, it only gives more space to your depot :eek:
 

GM Drama

Member
Joined
Mar 13, 2013
Messages
127
Reaction score
6
I have this problem aswell. It gives server crashes if you open the one inside the depot.
 

zbizu

Veteran OT User
Joined
Nov 22, 2010
Messages
2,460
Reaction score
1,357
Location
Poland
haha he helped me this way. I had same problem too, solution came itself(I wasn't desperated to fix that because older rev worked for me so I was staying on it)
 

thief

Excellent OT User
Joined
Sep 23, 2008
Messages
332
Reaction score
12
Location
Canada
player.cpp, remove
Code:
Depot* Player::getDepot(uint32_t depotId, bool autoCreateDepot)
{
    DepotMap::iterator it = depots.find(depotId);
    if(it != depots.end())
        return it->second.first;

    //create a new depot?
    if(autoCreateDepot)
    {
        Item* locker = Item::CreateItem(ITEM_LOCKER);
        if(Container* container = locker->getContainer())
        {
            if(Depot* depot = container->getDepot())
            {
                [B][COLOR="red"]container->__internalAddThing(Item::CreateItem(ITEM_DEPOT));[/COLOR][/B]
                addDepot(depot, depotId);
                return depot;
            }
        }

        g_game.freeThing(locker);
        std::cout << "Failure: Creating a new depot with id: " << depotId <<
            ", for player: " << getName() << std::endl;
    }

    return NULL;
}
I just tried to use this and I got this error

Creating library C:\Users\Drago\Desktop\New folder (2)\3777-master\src\vc10\x64\Release\theforgottenserver.lib and object C:\Users\Drago\Desktop\New folder (2)\3777-master\src\vc10\x64\Release\theforgottenserver.exp
1>actions.obj : error LNK2001: unresolved external symbol "public: class Depot * __cdecl Player::getDepot(unsigned int,bool)" ([email protected]@@[email protected]@[email protected])
1>C:\Users\Drago\Desktop\New folder (2)\3777-master\src\vc10\x64\Release\theforgottenserver.exe : fatal error LNK1120: 1 unresolved externals

Why is that? TFS 04 Rev 3777
 

thief

Excellent OT User
Joined
Sep 23, 2008
Messages
332
Reaction score
12
Location
Canada
Thanks mod ! It's working <3

Chest is gone but I can still put a backpack in and store more items

I edited depot.cpp
from
{
maxSize = 30;
depotLimit = 3000;
}
to
{
maxSize = 3;
depotLimit = 3;
}
but it still doesnt cap out
 
Last edited:
Top