Good evening!
I've seen several servers this year that has been crashed through sending heavy parcels to a players depot. So I thought it would be good to set a weight limit.
Mailbox.cpp
Locate the following code in mailbox.cpp
Replace this line
with this and we are done. Remember that the weight is configurable!
Sincerely,
Ninja
I've seen several servers this year that has been crashed through sending heavy parcels to a players depot. So I thought it would be good to set a weight limit.
Mailbox.cpp
Locate the following code in mailbox.cpp
Code:
bool Mailbox::sendItem(Creature* actor, Item* item)
{
uint32_t depotId =0;
std::string name;
if(!getRecipient(item, name, depotId)|| name.empty()||!depotId)
return false;
return IOLoginData::getInstance()->playerMail(actor, name, depotId, item);
}
Code:
if(!getRecipient(item, name, depotId)|| name.empty()||!depotId)
Code:
if(!getRecipient(item, name, depotId) || name.empty() || !depotId || item->getWeight()>[COLOR=#ff0000]5000[/COLOR])
Sincerely,
Ninja