Help remove Depot chest! Rep+++

Printer

if Printer then print("LUA") end
Premium User
Joined
Dec 27, 2009
Messages
5,726
Best answers
20
Likes
1,982
Location
Sweden?
#1
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,897
Best answers
4
Likes
802
#2
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:

Printer

if Printer then print("LUA") end
Premium User
Joined
Dec 27, 2009
Messages
5,726
Best answers
20
Likes
1,982
Location
Sweden?
#3
Refresh

I get error when i compile it! are you sure i can remove that?
 
Last edited:
Joined
Mar 13, 2013
Messages
127
Best answers
0
Likes
6
#6
I have this problem aswell. It gives server crashes if you open the one inside the depot.
 

zbizu

Well-Known Member
Joined
Nov 22, 2010
Messages
2,460
Best answers
1
Likes
1,344
Location
Poland
#8
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)
 
Joined
Sep 23, 2008
Messages
334
Best answers
0
Likes
12
Location
Canada
#9
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
 
Joined
Sep 23, 2008
Messages
334
Best answers
0
Likes
12
Location
Canada
#10
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