[9218] Fixed check in CMSG_QUEST_POI_QUERY proccessing for max quest amount.

This fix work quest poi for filled quest list
and fix unexpected spam about unreaded packet content.
This commit is contained in:
VladimirMangos 2010-01-20 07:28:16 +03:00
parent 627d74f192
commit 13acbefbbf
2 changed files with 5 additions and 2 deletions

View file

@ -490,8 +490,11 @@ void WorldSession::HandleQuestPOIQuery(WorldPacket& recv_data)
uint32 count;
recv_data >> count; // quest count, max=25
if(count >= MAX_QUEST_LOG_SIZE)
if(count > MAX_QUEST_LOG_SIZE)
{
recv_data.rpos(recv_data.wpos()); // set to end to avoid warnings spam
return;
}
WorldPacket data(SMSG_QUEST_POI_QUERY_RESPONSE, 4+(4+4)*count);
data << uint32(count); // count