• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

depot chest or depot locker

johnsamir

Advanced OT User
Joined
Oct 13, 2009
Messages
967
Solutions
6
Reaction score
166
Location
Nowhere
Hello Im using nekiro's downgraded tfs 1.5 8.6 i have added market system the problem is that
the depot and mailbox inside the locker does not have the arrow to go back ( as it they where containers inside another)
how do i add this to these boxes? this is highligted with red
 

Attachments

If Nekiro 8.60 is missing hasParent()

in container.cpp
below of:
Lua:
std::string Container::getName(bool addArticle /* = false*/) const {
    const ItemType& it = items[id];
    return getNameDescription(it, this, -1, addArticle);
}

Add:
Code:
bool Container::hasParent() const
{
    return dynamic_cast<const Player*>(getParent()) == nullptr;
}

in container.h
below of:
Code:
std::string getName(bool addArticle = false) const;
Add:
Code:
bool hasParent() const;

in player.ccp
find the line:

bool hasParent = dynamic_cast<const Container*>(container->getParent()) != nullptr;

replace with

bool hasParent = container->hasParent();
 
thank you very much i changed this:
Lua:
bool hasParent = dynamic_cast<const Container*>(container->getParent()) != nullptr;

replace with

bool hasParent = container->hasParent();
and it worked

ps: in increased the capacity of the locker from 3(depot, inbox and market) sqaures to 30. but i can not place any item inside the locker. so where to edit it?
depotlocker.cpp
i made it using this code:
Code:
DepotLocker::DepotLocker(uint16_t type) : Container(type, 30), depotId(0) {}
 
Back
Top