• 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++ How to put pagination

Solution
UPDATED

C++:
Container::Container(uint16_t _type) : Item(_type)
{
    maxSize = items[_type].maxItems;
    totalWeight = 0;
    serializationCount = 0;
    unlocked = true;
    pagination = true;
}
Thanks, I have this changes, but my depot dont have pagination... I mean global depot:
d27a90c3339d49069d17048d37e016d5.png


I dont find where is the code for this
 
If someone can edit this c++ please, I'm just a mapper and a curious one, I edit everything copying from existing scripts, I believe there are many here like me in the forum.

C++:
DepotChest* Player::getDepotChest(uint32_t depotId, bool autoCreate)
{
    auto it = depotChests.find(depotId);
    if (it != depotChests.end()) {
        return it->second;
    }

    if (!autoCreate) {
        return nullptr;
    }

    DepotChest* depotChest;
if (depotId > 0 && depotId < 18) {
  depotChest = new DepotChest(25452 + depotId);
} else {
  depotChest = new DepotChest(ITEM_DEPOT);
}
    depotChest->incrementReferenceCounter();
    depotChest->setMaxDepotItems(getMaxDepotItems());
    depotChests[depotId] = depotChest;
    return depotChest;
}

DepotLocker* Player::getDepotLocker(uint32_t depotId)
{
    auto it = depotLockerMap.find(depotId);
    if (it != depotLockerMap.end()) {
        inbox->setParent(it->second);
        for (uint8_t i = g_config.getNumber(ConfigManager::DEPOT_BOXES); i > 0; i--) {
   if (DepotChest* depotBox = getDepotChest(i, false)) {
    depotBox->setParent(it->second->getItemByIndex(0)->getContainer());
   }
  }
        return it->second;
    }

    DepotLocker* depotLocker = new DepotLocker(ITEM_LOCKER1);
    depotLocker->setDepotId(depotId);
    depotLocker->internalAddThing(Item::CreateItem(ITEM_MARKET));
    depotLocker->internalAddThing(inbox);
    Container* depotChest = Item::CreateItemAsContainer(ITEM_DEPOT, g_config.getNumber(ConfigManager::DEPOT_BOXES));
lastDepotChest = depotChest;
for (uint8_t i = g_config.getNumber(ConfigManager::DEPOT_BOXES); i > 0; i--) {
  DepotChest* depotBox = getDepotChest(i, true);
  depotChest->internalAddThing(depotBox);
  depotBox->setParent(depotChest);
}
depotLocker->internalAddThing(depotChest);
    depotLockerMap[depotId] = depotLocker;
    return depotLocker;
}
 
Get a differential tool such as meld on linux or winmerge on windows and run a comparison between 10_9 otx3 and tfs 1.3 thats how you can add in missing features.
Meld
WinMerge

There is also a comparison plugin for notepad++ but its a little buggy and doesn't handle large files sizes all too well.
Notepad++ Compare plugin
 
Last edited:
UPDATED

C++:
Container::Container(uint16_t _type) : Item(_type)
{
    maxSize = items[_type].maxItems;
    totalWeight = 0;
    serializationCount = 0;
    unlocked = true;
    pagination = true;
}
 
Last edited:
Solution
I know how to do this, but I won't help you, because you did what you did :)

I know how to do this, but I won't help you, because you did what you did :)

I fixed it by myself, thanks for spamming my posts once more.

Re-write it?
I don't think it is a structure problem, I've rewritten it three times already and I get the same result. I will try to remove that condition that checks the player's sex and see if there are still issues anyway. I'll report back to you soon haha

Re-write it?
I managed to fix it! Rewriting has done the job haha
 
Last edited by a moderator:
Back
Top