aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/server/game/Entities/Player/Player.cpp46
1 files changed, 46 insertions, 0 deletions
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index 4072d857233..c0d5465de5a 100755
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -14196,6 +14196,52 @@ void Player::SendPreparedQuest(uint64 guid)
}
}
}
+ // multiple entries
+ else
+ {
+ QEmote qe;
+ qe._Delay = 0;
+ qe._Emote = 0;
+ std::string title = "";
+
+ // need pet case for some quests
+ Creature *pCreature = ObjectAccessor::GetCreatureOrPetOrVehicle(*this,guid);
+ if (pCreature)
+ {
+ uint32 textid = GetGossipTextId(pCreature);
+ GossipText const* gossiptext = sObjectMgr->GetGossipText(textid);
+ if (!gossiptext)
+ {
+ qe._Delay = 0; //TEXTEMOTE_MESSAGE; //zyg: player emote
+ qe._Emote = 0; //TEXTEMOTE_HELLO; //zyg: NPC emote
+ title = "";
+ }
+ else
+ {
+ qe = gossiptext->Options[0].Emotes[0];
+
+ if (!gossiptext->Options[0].Text_0.empty())
+ {
+ title = gossiptext->Options[0].Text_0;
+
+ int loc_idx = GetSession()->GetSessionDbLocaleIndex();
+ if (loc_idx >= 0)
+ if (NpcTextLocale const *nl = sObjectMgr->GetNpcTextLocale(textid))
+ sObjectMgr->GetLocaleString(nl->Text_0[0], loc_idx, title);
+ }
+ else
+ {
+ title = gossiptext->Options[0].Text_1;
+
+ int loc_idx = GetSession()->GetSessionDbLocaleIndex();
+ if (loc_idx >= 0)
+ if (NpcTextLocale const *nl = sObjectMgr->GetNpcTextLocale(textid))
+ sObjectMgr->GetLocaleString(nl->Text_1[0], loc_idx, title);
+ }
+ }
+ }
+ PlayerTalkClass->SendQuestGiverQuestList(qe, title, guid);
+ }
}
bool Player::IsActiveQuest(uint32 quest_id) const