Port some mailsending-fixes from MaNGOS - prevents copying maildata/text into new mails

Original fix by Vladimir

--HG--
branch : trunk
This commit is contained in:
click
2010-04-14 19:06:37 +02:00
parent 1e573cf11c
commit 34a70d3e46
5 changed files with 13 additions and 13 deletions
+3 -3
View File
@@ -14118,7 +14118,7 @@ void Player::RewardQuest(Quest const *pQuest, uint32 reward, Object* questGiver,
// Send reward mail
if (uint32 mail_template_id = pQuest->GetRewMailTemplateId())
MailDraft(mail_template_id).SendMailTo(MailReceiver(this), MailSender(questGiver), MAIL_CHECK_MASK_HAS_BODY, pQuest->GetRewMailDelaySecs());
MailDraft(mail_template_id).SendMailTo(this, questGiver, MAIL_CHECK_MASK_HAS_BODY, pQuest->GetRewMailDelaySecs());
if (pQuest->IsDaily())
{
@@ -16548,7 +16548,7 @@ void Player::_LoadInventory(QueryResult_AutoPtr result, uint32 timediff)
draft.AddItem(item);
}
draft.SendMailTo(this, MailSender(this, MAIL_STATIONERY_GM));
draft.SendMailTo(this, MailSender(this, MAIL_STATIONERY_GM), MAIL_CHECK_MASK_COPIED);
}
}
//if (isAlive())
@@ -21139,7 +21139,7 @@ void Player::AutoUnequipOffhandIfNeed(bool force /*= false*/)
CharacterDatabase.CommitTransaction();
std::string subject = GetSession()->GetTrinityString(LANG_NOT_EQUIPPED_ITEM);
MailDraft(subject, "There's were problems with equipping this item.").AddItem(offItem).SendMailTo(this, MailSender(this, MAIL_STATIONERY_GM));
MailDraft(subject, "There were problems with equipping one or several items").AddItem(offItem).SendMailTo(this, MailSender(this, MAIL_STATIONERY_GM), MAIL_CHECK_MASK_COPIED);
}
}