aboutsummaryrefslogtreecommitdiff
path: root/src/game/BattleGround.cpp
diff options
context:
space:
mode:
authorn0n4m3 <none@none>2009-12-17 13:07:38 +0100
committern0n4m3 <none@none>2009-12-17 13:07:38 +0100
commit89656d5749f72803edbdd5f9840ba6b4c21f3987 (patch)
treeaaa42c476367db67fc7fe72488f83e56251d1408 /src/game/BattleGround.cpp
parent8b95981ed09b4a6edbf734c1ee1c639b6cdb9870 (diff)
Restore some commits from trinitycore2 3.1.3
--HG-- branch : trunk
Diffstat (limited to 'src/game/BattleGround.cpp')
-rw-r--r--src/game/BattleGround.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/game/BattleGround.cpp b/src/game/BattleGround.cpp
index 767d3581ef8..bdbcfc63bac 100644
--- a/src/game/BattleGround.cpp
+++ b/src/game/BattleGround.cpp
@@ -922,10 +922,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();
@@ -940,7 +936,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));
}
}