Adding safeguard to prevent possible duping of gold in mail. (#131)

This commit is contained in:
Meltie2013 2021-02-02 14:00:13 -06:00 committed by GitHub
parent 0eb525f992
commit b339cfbb57
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -133,6 +133,13 @@ void WorldSession::HandleSendMail(WorldPacket& recv_data)
return; return;
} }
// safeguard against possible money dupe
if (money && COD)
{
pl->SendMailResult(0, MAIL_SEND, MAIL_ERR_INTERNAL_ERROR);
return;
}
uint32 reqmoney = money + 30; uint32 reqmoney = money + 30;
if (pl->GetMoney() < reqmoney) if (pl->GetMoney() < reqmoney)