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

Bug Parcel System

nanduzenho

Member
Joined
Mar 21, 2021
Messages
187
Solutions
1
Reaction score
15
GitHub
nanduzenho
Good afternoon, I have a problem on my server (Alkurius TFS 1.3), that when a player sends a parcel with a large amount of items, this parcel does not reach the recipient. Can anybody help me?
 
I did this procedure, it worked, but when it is (sent in parcel with a large amount of items), it doesn't work, the player doesn't receive the parcel...=/
Post automatically merged:

I believe that there may be the problem with the limit of items in the Depot, could someone help me????
 
Last edited:
well, I analyzed this, for TFs 1.4:

and added the lines mentioned below only in mailbox.cpp. Gave a warning regarding "DepotLocker" during compilation, but it worked. I don't know if there might be any other bug regarding the warning, so far everything is ok =D


Lua:
Player* player = g_game.getPlayerByName(receiver);
    if (player) {
        DepotLocker* depotLocker = player->getDepotLocker(depotId);
        if (depotLocker) {
            if (g_game.internalMoveItem(item->getParent(), depotLocker, INDEX_WHEREEVER, item, item->getItemCount(), nullptr) == RETURNVALUE_NOERROR) {   <<<here
        if (DepotLocker* depotLocker = player->getDepotLocker(depotId)) {
            if (g_game.internalMoveItem(item->getParent(), depotLocker, INDEX_WHEREEVER, item, item->getItemCount(), nullptr, FLAG_NOLIMIT, player) == RETURNVALUE_NOERROR) {  <<<here
                g_game.transformItem(item, item->getID() + 1);
                player->onReceiveMail();
                return true;
@@ -117,9 +116,8 @@ bool Mailbox::sendItem(Item* item) const
            return false;
        }

        DepotLocker* depotLocker = tmpPlayer.getDepotLocker(depotId);
        if (depotLocker) {
            if (g_game.internalMoveItem(item->getParent(), depotLocker, INDEX_WHEREEVER, item, item->getItemCount(), nullptr) == RETURNVALUE_NOERROR) { <<<here
        if (DepotLocker* depotLocker = tmpPlayer.getDepotLocker(depotId)) {
            if (g_game.internalMoveItem(item->getParent(), depotLocker, INDEX_WHEREEVER, item, item->getItemCount(), nullptr, FLAG_NOLIMIT, &tmpPlayer) == RETURNVALUE_NOERROR) {  <<<here
                g_game.transformItem(item, item->getID() + 1);
                IOLoginData::savePlayer(&tmpPlayer);
                return true;
 
Back
Top