[9602] Simplify creating mail draft with content text, cleanup includes.

This commit is contained in:
VladimirMangos 2010-03-18 10:44:21 +03:00
parent b20f9138f6
commit a27ff3e79d
12 changed files with 58 additions and 46 deletions

View file

@ -907,6 +907,19 @@ MailReceiver::MailReceiver( Player* receiver,uint32 receiver_lowguid ) : m_recei
{
ASSERT(!receiver || receiver->GetGUIDLow() == receiver_lowguid);
}
/**
* Creates a new MailDraft object using subject and contect texts.
*
* @param subject The subject of the mail.
* @param itemText The text of the body of the mail.
*/
MailDraft::MailDraft( std::string subject, std::string text ) : m_mailTemplateId(0), m_mailTemplateItemsNeed(false), m_subject(subject),
m_bodyId(!text.empty() ? sObjectMgr.CreateItemText(text) : 0), m_money(0), m_COD(0)
{
}
/**
* Adds an item to the MailDraft.
*