mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 01:37:00 +00:00
[8646] Add basic support for QUEST_FLAGS_PARTY_ACCEPT (2).
Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
parent
aff1a3e59f
commit
b780e2dd80
5 changed files with 82 additions and 3 deletions
|
|
@ -13897,6 +13897,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 )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue