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

Compiling Item limit sent to the mail.

arthurluna

Member
Joined
Apr 12, 2008
Messages
178
Reaction score
12
I Realized que the source TFS 1.0 has no items of messages limit for the deposit or mail ... One would explain the can limit the amount of items Within the deposit or email

Code:
if (player->lastDepotId != -1) {
        //save depot items
        query.str("");
        query << "DELETE FROM `player_depotitems` WHERE `player_id` = " << player->getGUID();

        if (!db->executeQuery(query.str())) {
            return false;
        }

        DBInsert depotQuery("INSERT INTO `player_depotitems` (`player_id`, `pid`, `sid`, `itemtype`, `count`, `attributes`) VALUES ");
        itemList.clear();

        for (const auto& it : player->depotChests) {
            DepotChest* depotChest = it.second;
            for (Item* item : depotChest->getItemList()) {
                itemList.emplace_back(it.first, item);
            }
        }

        if (!saveItems(player, itemList, depotQuery, propWriteStream)) {
            return false;
        }
    }


Code:
    //save inbox items
    query.str("");
    query << "DELETE FROM `player_inboxitems` WHERE `player_id` = " << player->getGUID();
    if (!db->executeQuery(query.str())) {
        return false;
    }

    DBInsert inboxQuery("INSERT INTO `player_inboxitems` (`player_id`, `pid`, `sid`, `itemtype`, `count`, `attributes`) VALUES ");
    itemList.clear();

    for (Item* item : player->getInbox()->getItemList()) {
        itemList.emplace_back(0, item);
    }

    if (!saveItems(player, itemList, inboxQuery, propWriteStream)) {
        return false;
    }

@Mark , @Summ , @Limos

Players can send about 600,000 labels for deposit or email, occurring leg and disconnection of the players.
 
Last edited by a moderator:
You can do something like this

Mailbox::sendItem
Code:
    Container* container = item->getContainer();
    if (container && container->getItemHoldingCount() + 1 > 5000) {
        return false;
    }
 

Similar threads

Back
Top