[8156] Some mail show flags use.

[8155] Move unneeded include from header.
Author: VladimirMangos

--HG--
branch : trunk
This commit is contained in:
megamage
2009-07-12 17:55:57 +08:00
parent 920a70932b
commit 016f8bb6b3
3 changed files with 20 additions and 2 deletions

View File

@@ -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)

View File

@@ -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 = " ";

View File

@@ -20,7 +20,6 @@
#ifndef TRINITYCORE_PROGRESSBAR_H
#define TRINITYCORE_PROGRESSBAR_H
#include <stdio.h>
#include "Platform/Define.h"
class TRINITY_DLL_SPEC barGoLink