aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjackpoz <giacomopoz@gmail.com>2014-06-29 15:51:34 +0200
committerjackpoz <giacomopoz@gmail.com>2014-06-29 15:51:34 +0200
commitc674f229cb3d9abc723df9e7f87ffb15c9655cca (patch)
tree39d7a42b79644b5dd1197251b141d8a98efb58d4 /src
parentee4602db3d40f061b9ce69445359f47aaf78f278 (diff)
Core/Mail: Fix exploit that didn't allow recipient to delete the email
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Handlers/MailHandler.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/server/game/Handlers/MailHandler.cpp b/src/server/game/Handlers/MailHandler.cpp
index ffcf74ea7c2..1270f4e6419 100644
--- a/src/server/game/Handlers/MailHandler.cpp
+++ b/src/server/game/Handlers/MailHandler.cpp
@@ -322,6 +322,10 @@ void WorldSession::HandleSendMail(WorldPacket& recvData)
// If theres is an item, there is a one hour delivery delay if sent to another account's character.
uint32 deliver_delay = needItemDelay ? sWorld->getIntConfig(CONFIG_MAIL_DELIVERY_DELAY) : 0;
+ // don't ask for COD if there are no items
+ if (items_count == 0)
+ COD = 0;
+
// will delete item or place to receiver mail list
draft
.AddMoney(money)