33#define MAIL_BODY_ITEM_TEMPLATE 8383
34#define MAX_CLIENT_MAIL_ITEMS 12
35#define MAX_MAIL_ITEMS 16
92 : m_messageType(messageType), m_senderId(sender_guidlow_or_entry), m_stationery(stationery)
132 : m_mailTemplateId(mailTemplateId), m_mailTemplateItemsNeed(need_items), m_money(0), m_COD(0)
134 MailDraft(std::string
const& subject, std::string
const& body)
135 : m_mailTemplateId(0), m_mailTemplateItemsNeed(false), m_subject(subject), m_body(body), m_money(0), m_COD(0) { }
141 std::string
const&
GetBody()
const {
return m_body; }
198 items.push_back(mii);
203 for (MailItemInfoVec::iterator itr = items.begin(); itr != items.end(); ++itr)
205 if (itr->item_guid == item_guid)
SQLTransaction< CharacterDatabaseConnection > CharacterDatabaseTransaction
@ MAIL_CHECK_MASK_HAS_BODY
@ MAIL_CHECK_MASK_COD_PAYMENT
This mail was copied. Do not allow making a copy of items in mail.
@ MAIL_CHECK_MASK_RETURNED
@ MAIL_CHECK_MASK_COPIED
This mail was returned. Do not allow returning mail back again.
std::vector< MailItemInfo > MailItemInfoVec
@ MAIL_STATIONERY_DEFAULT
@ MAIL_STATIONERY_AUCTION
@ MAIL_ARTISANS_CONSORTIUM
std::string const & GetSubject() const
std::map< ObjectGuid::LowType, Item * > MailItemMap
MailDraft & AddCOD(uint64 COD)
MailDraft(uint16 mailTemplateId, bool need_items=true)
MailDraft(std::string const &subject, std::string const &body)
bool m_mailTemplateItemsNeed
uint16 GetMailTemplateId() const
std::string const & GetBody() const
MailDraft & AddMoney(uint64 money)
Player * GetPlayer() const
ObjectGuid::LowType GetPlayerGUIDLow() const
ObjectGuid::LowType m_receiver_lowguid
MailReceiver(ObjectGuid::LowType receiver_lowguid)
MailStationery m_stationery
ObjectGuid::LowType GetSenderId() const
MailSender(MailMessageType messageType, ObjectGuid::LowType sender_guidlow_or_entry, MailStationery stationery=MAIL_STATIONERY_DEFAULT)
MailMessageType m_messageType
MailMessageType GetMailMessageType() const
MailStationery GetStationery() const
ObjectGuid::LowType m_senderId
ObjectGuid::LowType item_guid
ObjectGuid::LowType receiver
ObjectGuid::LowType sender
std::vector< ObjectGuid::LowType > removedItems
std::vector< MailItemInfo > items
void AddItem(ObjectGuid::LowType itemGuidLow, uint32 item_template)
bool RemoveItem(ObjectGuid::LowType item_guid)