mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 10:05:32 +01:00
Merge branch 'master' of https://github.com/TrinityCore/TrinityCore into 4.3.4
This commit is contained in:
@@ -411,19 +411,23 @@ void WorldSession::HandleQuestPOIQuery(WorldPacket& recvData)
|
||||
uint32 count;
|
||||
recvData >> count; // quest count, max=25
|
||||
|
||||
if (count >= MAX_QUEST_LOG_SIZE)
|
||||
if (count > MAX_QUEST_LOG_SIZE)
|
||||
{
|
||||
recvData.rfinish();
|
||||
return;
|
||||
}
|
||||
|
||||
WorldPacket data(SMSG_QUEST_POI_QUERY_RESPONSE, 4+(4+4)*count);
|
||||
data << uint32(count); // count
|
||||
|
||||
// Read quest ids and add the in a unordered_set so we don't send POIs for the same quest multiple times
|
||||
std::unordered_set<uint32> questIds;
|
||||
for (uint32 i = 0; i < count; ++i)
|
||||
questIds.insert(recvData.read<uint32>()); // quest id
|
||||
|
||||
WorldPacket data(SMSG_QUEST_POI_QUERY_RESPONSE, 4 + (4 + 4)*questIds.size());
|
||||
data << uint32(questIds.size()); // count
|
||||
|
||||
for (auto itr = questIds.begin(); itr != questIds.end(); ++itr)
|
||||
{
|
||||
uint32 questId;
|
||||
recvData >> questId; // quest id
|
||||
uint32 questId = *itr;
|
||||
|
||||
bool questOk = false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user