johnsamir
Advanced OT User
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?
i think that it's what's crashing the server
thank in advance
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();
}*/
thank in advance