feat(Core/Mail): call CanSendMail() even if no items are sent (#14435)
* feat(Core/Mail): call CanSendMail() even if no items are sent * Update src/server/game/Handlers/MailHandler.cpp Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com> Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>
This commit is contained in:
parent
5f3f32f2fd
commit
513dab0740
1 changed files with 7 additions and 0 deletions
|
|
@ -269,12 +269,19 @@ void WorldSession::HandleSendMail(WorldPacket& recvData)
|
|||
|
||||
if (!sScriptMgr->CanSendMail(player, receiverGuid, mailbox, subject, body, money, COD, item))
|
||||
{
|
||||
player->SendMailResult(0, MAIL_SEND, MAIL_ERR_INTERNAL_ERROR);
|
||||
return;
|
||||
}
|
||||
|
||||
items[i] = item;
|
||||
}
|
||||
|
||||
if (!items_count && !sScriptMgr->CanSendMail(player, receiverGuid, mailbox, subject, body, money, COD, nullptr))
|
||||
{
|
||||
player->SendMailResult(0, MAIL_SEND, MAIL_ERR_INTERNAL_ERROR);
|
||||
return;
|
||||
}
|
||||
|
||||
player->SendMailResult(0, MAIL_SEND, MAIL_OK);
|
||||
|
||||
player->ModifyMoney(-int32(reqmoney));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue