19 #ifndef TRINITY_MAIL_H
20 #define TRINITY_MAIL_H
33 #define MAIL_BODY_ITEM_TEMPLATE 8383 // - plain letter, A Dusty Unsent Letter: 889
34 #define MAX_MAIL_ITEMS 12
87 : m_messageType(messageType), m_senderId(sender_guidlow_or_entry), m_stationery(stationery)
124 : m_mailTemplateId(mailTemplateId), m_mailTemplateItemsNeed(need_items), m_money(0), m_COD(0)
126 MailDraft(std::string
const& subject, std::string
const& body)
127 : m_mailTemplateId(0), m_mailTemplateItemsNeed(
false), m_subject(subject), m_body(body), m_money(0), m_COD(0) { }
133 std::string
const&
GetBody()
const {
return m_body; }
145 void deleteIncludedItems(
SQLTransaction& trans,
bool inDB =
false);
190 items.push_back(mii);
195 for (MailItemInfoVec::iterator itr = items.begin(); itr != items.end(); ++itr)
197 if (itr->item_guid == item_guid)
std::vector< MailItemInfo > items
Definition: Mail.h:176
std::vector< MailItemInfo > MailItemInfoVec
Definition: Mail.h:164
MailItemMap m_items
Definition: Mail.h:153
uint16 mailTemplateId
Definition: Mail.h:171
This mail was copied. Do not allow making a copy of items in mail.
Definition: Mail.h:51
bool m_mailTemplateItemsNeed
Definition: Mail.h:149
MailSender(MailMessageType messageType, ObjectGuid::LowType sender_guidlow_or_entry, MailStationery stationery=MAIL_STATIONERY_DEFAULT)
Definition: Mail.h:86
ObjectGuid::LowType GetPlayerGUIDLow() const
Definition: Mail.h:112
uint16 GetMailTemplateId() const
Definition: Mail.h:129
MailDraft(std::string const &subject, std::string const &body)
Definition: Mail.h:126
ObjectGuid::LowType m_senderId
Definition: Mail.h:100
uint8 messageType
Definition: Mail.h:169
MailDraft & AddCOD(uint64 COD)
Definition: Mail.h:138
MailState state
Definition: Mail.h:183
MailMessageType GetMailMessageType() const
Definition: Mail.h:95
uint32 checked
Definition: Mail.h:182
Definition: AuctionHouseMgr.h:67
uint8 stationery
Definition: Mail.h:170
arena_t NULL
Definition: jemalloc_internal.h:624
uint64 COD
Definition: Mail.h:181
#define false
Definition: CascPort.h:18
uint32 item_template
Definition: Mail.h:162
ObjectGuid::LowType receiver
Definition: Mail.h:173
std::string m_body
Definition: Mail.h:151
std::map< ObjectGuid::LowType, Item * > MailItemMap
Definition: Mail.h:120
uint64 m_COD
Definition: Mail.h:156
uint64 LowType
Definition: ObjectGuid.h:199
MailMessageType
Definition: Mail.h:36
This mail was returned. Do not allow returning mail back again.
Definition: Mail.h:50
MailState
Definition: Mail.h:67
uint64 m_money
Definition: Mail.h:155
uint64 money
Definition: Mail.h:180
MailCheckMask
Definition: Mail.h:45
std::string body
Definition: Mail.h:175
uint64 GetMoney() const
Definition: Mail.h:131
bool HasItems() const
Definition: Mail.h:206
Player * m_receiver
Definition: Mail.h:114
MailDraft(uint16 mailTemplateId, bool need_items=true)
Definition: Mail.h:123
Definition: CalendarMgr.h:191
ObjectGuid::LowType item_guid
Definition: Mail.h:161
ObjectGuid::LowType m_receiver_lowguid
Definition: Mail.h:115
std::string const & GetBody() const
Definition: Mail.h:133
uint32_t uint32
Definition: Define.h:150
time_t deliver_time
Definition: Mail.h:179
uint64_t uint64
Definition: Define.h:149
uint16_t uint16
Definition: Define.h:151
MailShowFlags
Definition: Mail.h:74
uint16 m_mailTemplateId
Definition: Mail.h:148
std::string const & GetSubject() const
Definition: Mail.h:130
MailStationery
Definition: Mail.h:56
MailStationery GetStationery() const
Definition: Mail.h:97
time_t expire_time
Definition: Mail.h:178
ObjectGuid::LowType GetSenderId() const
Definition: Mail.h:96
Player * GetPlayer() const
Definition: Mail.h:111
#define TC_GAME_API
Definition: Define.h:134
std::string subject
Definition: Mail.h:174
void AddItem(ObjectGuid::LowType itemGuidLow, uint32 item_template)
Definition: Mail.h:185
std::string m_subject
Definition: Mail.h:150
MailReceiver(ObjectGuid::LowType receiver_lowguid)
Definition: Mail.h:107
MailDraft & AddMoney(uint64 money)
Definition: Mail.h:137
uint8_t uint8
Definition: Define.h:152
MailMessageType m_messageType
Definition: Mail.h:99
uint32 messageID
Definition: Mail.h:168
uint64 GetCOD() const
Definition: Mail.h:132
bool RemoveItem(ObjectGuid::LowType item_guid)
Definition: Mail.h:193
MailStationery m_stationery
Definition: Mail.h:101
std::vector< ObjectGuid::LowType > removedItems
Definition: Mail.h:177
std::shared_ptr< Transaction > SQLTransaction
Definition: Transaction.h:58
ObjectGuid::LowType sender
Definition: Mail.h:172