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

Parcel system

Dogrinha

New Member
Joined
Oct 6, 2019
Messages
206
Solutions
1
Reaction score
2
my parcel sometimes works and sometimes does not work, someone could tell me what could happen? tfs 0.4. I don't get any errors in the distro, but my players can send sometimes and sometimes it doesn't work. already tested on all mail box id's
tfs 0.4
 
Solution
Yeah as you can see max parcel CAP = 5000
Edit it to higher number then this bug won't happen again.
Or change this line
C++:
if (! getRecipient (item, nome, depotId) name.empty ()! depotId || item-> getWeight ()> 5000)
to this one
C++:
if(!getRecipient(item, name, depotId)|| name.empty()||!depotId)
yes they are correct, is there any script I can check? What happens is that sometimes it works and sometimes it doesn't. very strange, I will send a print of parcel, I'm thinking that may be the date.

The problem is that there are players who sometimes can't send.

unknown (2).png
 
Try it with letters/parcels and try to know when exactly this issue happen.
Does it happens with specific towns? or specific mail boxes? it happens to all players?
 
Check in your source mailbox.cpp Search for
C++:
Mailbox::sendItem
and look if there are any CAP limits or item limits, it shouldn't have any limits by default.
or maybe upload your mailbox.cpp and I will look if it has any limitations.
 
Lua:
bool Mailbox::sendItem(Creature* actor, Item* item)
{
    uint32_t depotId = 0;
    std::string name;
    if(!getRecipient(item, name, depotId)  name.empty()  !depotId || item->getWeight() > 5000)
        return false;

    return IOLoginData::getInstance()->playerMail(actor, name, depotId, item);
}
 
Yeah as you can see max parcel CAP = 5000
Edit it to higher number then this bug won't happen again.
Or change this line
C++:
if (! getRecipient (item, nome, depotId) name.empty ()! depotId || item-> getWeight ()> 5000)
to this one
C++:
if(!getRecipient(item, name, depotId)|| name.empty()||!depotId)
 
Solution
Back
Top