aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormegamage <none@none>2009-07-12 17:55:57 +0800
committermegamage <none@none>2009-07-12 17:55:57 +0800
commit016f8bb6b3d5202600a565448b874ee982cf5110 (patch)
treefa7be25f6914e25e26eaebc24bb4fc3aeaeec3c9
parent920a70932b1f5f73b3f605f9f71ae8141eff80ce (diff)
[8156] Some mail show flags use.
[8155] Move unneeded include from header. Author: VladimirMangos --HG-- branch : trunk
-rw-r--r--src/game/Mail.cpp19
-rw-r--r--src/shared/ProgressBar.cpp2
-rw-r--r--src/shared/ProgressBar.h1
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