34#define MAIL_BODY_ITEM_TEMPLATE 8383
35#define MAX_CLIENT_MAIL_ITEMS 12
36#define MAX_MAIL_ITEMS 16
98 : m_messageType(messageType), m_senderId(sender_guidlow_or_entry), m_stationery(stationery)
138 : m_mailTemplateId(mailTemplateId), m_mailTemplateItemsNeed(need_items), m_money(0), m_COD(0)
140 MailDraft(std::string
const& subject, std::string
const& body)
141 : m_mailTemplateId(0), m_mailTemplateItemsNeed(false), m_subject(subject), m_body(body), m_money(0), m_COD(0) { }
147 std::string
const&
GetBody()
const {
return m_body; }
204 items.push_back(mii);
209 for (MailItemInfoVec::iterator itr =
items.begin(); itr !=
items.end(); ++itr)
211 if (itr->item_guid == item_guid)
SQLTransaction< CharacterDatabaseConnection > CharacterDatabaseTransaction
#define DEFINE_ENUM_FLAG(enumType)
@ MAIL_CHECK_MASK_COMMERCE
WoW Token mail.
@ MAIL_CHECK_MASK_NOT_DELETABLE_WITH_ATTACHMENTS
This mail cannot be deleted without taking attachments first.
@ MAIL_CHECK_MASK_HAS_BODY
This mail has body text.
@ MAIL_CHECK_MASK_READ
This mail was read.
@ MAIL_CHECK_MASK_AUCTION_WON
This mail is delivering won auction items.
@ MAIL_CHECK_MASK_COD_PAYMENT
This mail is payable on delivery.
@ MAIL_CHECK_MASK_RETURNED
This mail was returned. Do not allow returning mail back again.
@ MAIL_CHECK_MASK_RESTORED_ITEM
This mail contains recovered items.
@ MAIL_CHECK_MASK_COPIED
This mail was copied. Do not allow making a copy of items in mail.
@ MAIL_CHECK_MASK_CALENDAR_INVITE
This mail is related to calendar invite.
@ MAIL_CHECK_MASK_NOT_COPYABLE
This mail cannot be copied.
@ MAIL_CHECK_MASK_NOT_RETURNABLE
This mail cannot be returned even if mail was not returned before.
@ MAIL_CHECK_MASK_AUCTION
This mail came from auction house.
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)