• 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!

C++ Help adapt code to make market system works

johnsamir

Advanced OT User
Joined
Oct 13, 2009
Messages
965
Solutions
6
Reaction score
164
Location
Nowhere
Im trying to add market system to my server tfs 1.5 -8.6 i uncommented everything plus added missing things

when i try to open the depot the server crashes, can somebody help me to adapt this code?
Lua:
/*DepotChest* Player::getDepotChest(uint32_t depotId, bool autoCreate)
{
    auto it = depotChests.find(depotId);
    if (it != depotChests.end()) {
        return it->second;
    }

    if (!autoCreate) {
        return nullptr;
    }

    it = depotChests.emplace(depotId, new DepotChest(ITEM_DEPOT)).first;
    it->second->setMaxDepotItems(getMaxDepotItems());
    return it->second;
}*/

/*DepotLocker* Player::getDepotLocker(uint32_t depotId)
{
    auto it = depotLockerMap.find(depotId);
    if (it != depotLockerMap.end()) {
        inbox->setParent(it->second.get());
        return it->second.get();
    }

    it = depotLockerMap.emplace(depotId, new DepotLocker(ITEM_LOCKER)).first;
    it->second->setDepotId(depotId);
    it->second->internalAddThing(Item::CreateItem(ITEM_MARKET));
    it->second->internalAddThing(inbox);
    it->second->internalAddThing(getDepotChest(depotId, true));
    inbox->setParent(it->second.get());
    return it->second.get();
}*/
i think that it's what's crashing the server

thank in advance
 
Back
Top