From d5beb2bbe97afa0e50df8a2cef49bcac4a607f4a Mon Sep 17 00:00:00 2001 From: KingPin Date: Sun, 2 Nov 2008 16:53:46 -0600 Subject: [svn] *Implement new player conditions CONDITION_NO_AURA, CONDITION_ACTIVE_EVENT * Default behaviour of pets for creatures changed to REACT_DEFENSIVE * Disallowed sending wrapped items as COD * Prevent loading and saving single target auras for pet in same way as already implemented for player * Correctly limit use some flask types to zones. * Fixed extracting common.MPQ under *nix * Many small xleanups and fixes. ** mangos merge rev. TEST REV so be careful of creepy crawly bugs! --HG-- branch : trunk --- src/game/Mail.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/game/Mail.cpp') diff --git a/src/game/Mail.cpp b/src/game/Mail.cpp index f79a4861b52..de92fdbc936 100644 --- a/src/game/Mail.cpp +++ b/src/game/Mail.cpp @@ -187,11 +187,18 @@ void WorldSession::HandleSendMail(WorldPacket & recv_data ) pl->SendMailResult(0, 0, MAIL_ERR_INTERNAL_ERROR); return; } + if (mailItem.item->HasFlag(ITEM_FIELD_FLAGS, ITEM_FLAGS_CONJURED) || mailItem.item->GetUInt32Value(ITEM_FIELD_DURATION)) { pl->SendMailResult(0, 0, MAIL_ERR_INTERNAL_ERROR); return; } + + if(COD && mailItem.item->HasFlag(ITEM_FIELD_FLAGS, ITEM_FLAGS_WRAPPED)) + { + pl->SendMailResult(0, 0, MAIL_ERR_CANT_SEND_WRAPPED_COD); + return; + } } } pl->SendMailResult(0, 0, MAIL_OK); -- cgit v1.2.3