Core/Mail: Moved gold check closer to where it is taken away
Port From (https://github.com/TrinityCore/TrinityCore/commit/1dcb2904d5b5a6c12f5f3b56e44c74e4a79b9626)
This commit is contained in:
@@ -121,17 +121,17 @@ namespace Game
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void mailCountCheckContinuation(Team receiverTeam, ulong mailsCount, uint receiverLevel, uint receiverAccountId, uint receiverBnetAccountId)
|
||||||
|
{
|
||||||
|
if (_player != player)
|
||||||
|
return;
|
||||||
|
|
||||||
if (!player.HasEnoughMoney(reqmoney) && !player.IsGameMaster())
|
if (!player.HasEnoughMoney(reqmoney) && !player.IsGameMaster())
|
||||||
{
|
{
|
||||||
player.SendMailResult(0, MailResponseType.Send, MailResponseResult.NotEnoughMoney);
|
player.SendMailResult(0, MailResponseType.Send, MailResponseResult.NotEnoughMoney);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
void mailCountCheckContinuation(Team receiverTeam, ulong mailsCount, uint receiverLevel, uint receiverAccountId, uint receiverBnetAccountId)
|
|
||||||
{
|
|
||||||
if (_player != player)
|
|
||||||
return;
|
|
||||||
|
|
||||||
// do not allow to have more than 100 mails in mailbox.. mails count is in opcode uint8!!! - so max can be 255..
|
// do not allow to have more than 100 mails in mailbox.. mails count is in opcode uint8!!! - so max can be 255..
|
||||||
if (mailsCount > 100)
|
if (mailsCount > 100)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user