diff options
author | win32 <none@none> | 2009-12-16 18:58:36 +0200 |
---|---|---|
committer | win32 <none@none> | 2009-12-16 18:58:36 +0200 |
commit | bf2c3fd8cf32578324162a8bef2ac6e48e7e0009 (patch) | |
tree | ccb8f71a159aba2799cc009352a8626d95b6fc6c /src/game/BattleGround.cpp | |
parent | dc53b4a9def06d012d791304aaba1c748a1f997a (diff) |
MaNGOS merge: Mail System.
* Store loot in mail_loot_template indexed by mail template ids.
* Implement proper creating mail text copy item from mail template based mail.
* Move send functions to new MailDraft class from WorldSession.
* Implement mails sending at player levelup.
* Autor VladimirMangos, converted by me.
--HG--
branch : trunk
Diffstat (limited to 'src/game/BattleGround.cpp')
-rw-r--r-- | src/game/BattleGround.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/game/BattleGround.cpp b/src/game/BattleGround.cpp index e79290b5168..c6527584fd3 100644 --- a/src/game/BattleGround.cpp +++ b/src/game/BattleGround.cpp @@ -919,10 +919,6 @@ void BattleGround::SendRewardMarkByMail(Player *plr,uint32 mark, uint32 count) // save new item before send markItem->SaveToDB(); // save for prevent lost at next mail load, if send fail then item will deleted - // item - MailItemsInfo mi; - mi.AddItem(markItem->GetGUIDLow(), markItem->GetEntry(), markItem); - // subject: item name std::string subject = markProto->Name1; int loc_idx = plr->GetSession()->GetSessionDbLocaleIndex(); @@ -937,7 +933,9 @@ void BattleGround::SendRewardMarkByMail(Player *plr,uint32 mark, uint32 count) snprintf(textBuf,300,textFormat.c_str(),GetName(),GetName()); uint32 itemTextId = objmgr.CreateItemText( textBuf ); - WorldSession::SendMailTo(plr, MAIL_CREATURE, MAIL_STATIONERY_NORMAL, bmEntry, plr->GetGUIDLow(), subject, itemTextId , &mi, 0, 0, MAIL_CHECK_MASK_NONE); + MailDraft(subject, itemTextId) + .AddItem(markItem) + .SendMailTo(plr, MailSender(MAIL_CREATURE, bmEntry)); } } |