mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
[9602] Simplify creating mail draft with content text, cleanup includes.
This commit is contained in:
parent
b20f9138f6
commit
a27ff3e79d
12 changed files with 58 additions and 46 deletions
|
|
@ -44,6 +44,7 @@
|
|||
#include "SkillExtraItems.h"
|
||||
#include "SystemConfig.h"
|
||||
#include "Config/ConfigEnv.h"
|
||||
#include "Mail.h"
|
||||
#include "Util.h"
|
||||
#include "ItemEnchantmentMgr.h"
|
||||
#include "BattleGroundMgr.h"
|
||||
|
|
@ -6297,10 +6298,8 @@ bool ChatHandler::HandleSendItemsCommand(const char* args)
|
|||
// from console show not existed sender
|
||||
MailSender sender(MAIL_NORMAL,m_session ? m_session->GetPlayer()->GetGUIDLow() : 0, MAIL_STATIONERY_GM);
|
||||
|
||||
uint32 itemTextId = !text.empty() ? sObjectMgr.CreateItemText( text ) : 0;
|
||||
|
||||
// fill mail
|
||||
MailDraft draft(subject, itemTextId);
|
||||
MailDraft draft(subject, text);
|
||||
|
||||
for(ItemPairs::const_iterator itr = items.begin(); itr != items.end(); ++itr)
|
||||
{
|
||||
|
|
@ -6357,9 +6356,7 @@ bool ChatHandler::HandleSendMoneyCommand(const char* args)
|
|||
// from console show not existed sender
|
||||
MailSender sender(MAIL_NORMAL,m_session ? m_session->GetPlayer()->GetGUIDLow() : 0, MAIL_STATIONERY_GM);
|
||||
|
||||
uint32 itemTextId = !text.empty() ? sObjectMgr.CreateItemText( text ) : 0;
|
||||
|
||||
MailDraft(subject, itemTextId)
|
||||
MailDraft(subject, text)
|
||||
.AddMoney(money)
|
||||
.SendMailTo(MailReceiver(receiver,GUID_LOPART(receiver_guid)),sender);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue