aboutsummaryrefslogtreecommitdiff
path: root/src/game/Player.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/Player.cpp')
-rw-r--r--src/game/Player.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index e607b9a453f..1d5b1860740 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -14507,6 +14507,33 @@ void Player::SendCanTakeQuestResponse( uint32 msg )
sLog.outDebug("WORLD: Sent SMSG_QUESTGIVER_QUEST_INVALID");
}
+void Player::SendQuestConfirmAccept(const Quest* pQuest, Player* pReceiver)
+{
+ if (pReceiver)
+ {
+ std::string strTitle = pQuest->GetTitle();
+
+ int loc_idx = pReceiver->GetSession()->GetSessionDbLocaleIndex();
+
+ if (loc_idx >= 0)
+ {
+ if (const QuestLocale* pLocale = objmgr.GetQuestLocale(pQuest->GetQuestId()))
+ {
+ if (pLocale->Title.size() > loc_idx && !pLocale->Title[loc_idx].empty())
+ strTitle = pLocale->Title[loc_idx];
+ }
+ }
+
+ WorldPacket data(SMSG_QUEST_CONFIRM_ACCEPT, (4 + strTitle.size() + 8));
+ data << uint32(pQuest->GetQuestId());
+ data << strTitle;
+ data << uint64(GetGUID());
+ pReceiver->GetSession()->SendPacket(&data);
+
+ sLog.outDebug("WORLD: Sent SMSG_QUEST_CONFIRM_ACCEPT");
+ }
+}
+
void Player::SendPushToPartyResponse( Player *pPlayer, uint32 msg )
{
if( pPlayer )