diff options
-rw-r--r-- | src/game/Mail.cpp | 19 | ||||
-rw-r--r-- | src/shared/ProgressBar.cpp | 2 | ||||
-rw-r--r-- | src/shared/ProgressBar.h | 1 |
3 files changed, 20 insertions, 2 deletions
diff --git a/src/game/Mail.cpp b/src/game/Mail.cpp index 87eb875d829..9a71c87cd23 100644 --- a/src/game/Mail.cpp +++ b/src/game/Mail.cpp @@ -32,6 +32,15 @@ #include "AuctionHouseBot.h" #include "DBCStores.h" +enum MailShowFlags +{ + MAIL_SHOW_UNK0 = 0x0001, + MAIL_SHOW_DELETE = 0x0002, // forced show delete button instead return button + MAIL_SHOW_AUCTION = 0x0004, // from old comment + MAIL_SHOW_COD = 0x0008, // show subject prefix + MAIL_SHOW_UNK4 = 0x0010, +}; + void MailItem::deleteItem( bool inDB ) { if(item) @@ -611,6 +620,14 @@ void WorldSession::HandleGetMailList(WorldPacket & recv_data ) if(data.wpos()+next_mail_size > maxPacketSize) break; + uint32 show_flags = 0; + if ((*itr)->messageType != MAIL_NORMAL) + show_flags |= MAIL_SHOW_DELETE; + if ((*itr)->messageType == MAIL_AUCTION) + show_flags |= MAIL_SHOW_AUCTION; + if ((*itr)->COD) + show_flags |= MAIL_SHOW_COD; + data << (uint16) 0x0040; // unknown 2.3.0, different values data << (uint32) (*itr)->messageID; // Message ID data << (uint8) (*itr)->messageType; // Message Type @@ -634,7 +651,7 @@ void WorldSession::HandleGetMailList(WorldPacket & recv_data ) data << (uint32) 0; // unknown data << (uint32) (*itr)->stationery; // stationery (Stationery.dbc) data << (uint32) (*itr)->money; // Gold - data << (uint32) 0x04; // unknown, 0x4 - auction, 0x10 - normal + data << (uint32) show_flags; // unknown, 0x4 - auction, 0x10 - normal // Time data << (float) ((*itr)->expire_time-time(NULL))/DAY; data << (uint32) (*itr)->mailTemplateId; // mail template (MailTemplate.dbc) diff --git a/src/shared/ProgressBar.cpp b/src/shared/ProgressBar.cpp index b72118ad804..2eba31c2c40 100644 --- a/src/shared/ProgressBar.cpp +++ b/src/shared/ProgressBar.cpp @@ -18,6 +18,8 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include <stdio.h> + #include "ProgressBar.h" char const* const barGoLink::empty = " "; diff --git a/src/shared/ProgressBar.h b/src/shared/ProgressBar.h index 50c5c7d11e5..af7b5e03093 100644 --- a/src/shared/ProgressBar.h +++ b/src/shared/ProgressBar.h @@ -20,7 +20,6 @@ #ifndef TRINITYCORE_PROGRESSBAR_H #define TRINITYCORE_PROGRESSBAR_H -#include <stdio.h> #include "Platform/Define.h" class TRINITY_DLL_SPEC barGoLink |