mirror of
https://github.com/araxiaonline/TrinityCore2.git
synced 2026-06-20 14:51:34 -04:00
* Core switch to client 3.3.2 (11403)
* Credits (in no particular order) to: * n0n4m3, raczman, manuel, Spp, Malcrom, Teacher, QAston, Tartalo, * thenecromancer, Xanadu, Trazom, Zor, kiper * Additional credits to: * TOM_RUS and NoFantasy from MaNGOS * Thanks for testing Aokromes and XTElite1 * SoTA still needs some work, but is very playable (huge thanks to raczman and * kiper) * To upgrade, you need to apply all SQL from sql/updates/3.2.2a_old from the * last rev you are on * and then apply all SQL from sql/updates/3.3.2_old to char / realmd / world * DBs * Known problem with guild banks. --HG-- branch : trunk
This commit is contained in:
@@ -471,3 +471,71 @@ void WorldSession::HandleCorpseMapPositionQuery( WorldPacket & recv_data )
|
||||
data << float(0);
|
||||
SendPacket(&data);
|
||||
}
|
||||
|
||||
void WorldSession::HandleQuestPOIQuery(WorldPacket& recv_data)
|
||||
{
|
||||
uint32 count;
|
||||
recv_data >> count; // quest count, max=25
|
||||
|
||||
if(count >= MAX_QUEST_LOG_SIZE)
|
||||
return;
|
||||
|
||||
WorldPacket data(SMSG_QUEST_POI_QUERY_RESPONSE, 4+(4+4)*count);
|
||||
data << uint32(count); // count
|
||||
|
||||
for(int i = 0; i < count; ++i)
|
||||
{
|
||||
uint32 questId;
|
||||
recv_data >> questId; // quest id
|
||||
|
||||
bool questOk = false;
|
||||
|
||||
uint16 questSlot = _player->FindQuestSlot(questId);
|
||||
|
||||
if(questSlot != MAX_QUEST_LOG_SIZE)
|
||||
questOk =_player->GetQuestSlotQuestId(questSlot) == questId;
|
||||
|
||||
if(questOk)
|
||||
{
|
||||
QuestPOIVector const *POI = objmgr.GetQuestPOIVector(questId);
|
||||
|
||||
if(POI)
|
||||
{
|
||||
data << uint32(questId); // quest ID
|
||||
data << uint32(POI->size()); // POI count
|
||||
|
||||
int index = 0;
|
||||
for(QuestPOIVector::const_iterator itr = POI->begin(); itr != POI->end(); ++itr)
|
||||
{
|
||||
data << uint32(index); // POI index
|
||||
data << int32(itr->ObjectiveIndex); // objective index
|
||||
data << uint32(itr->MapId); // mapid
|
||||
data << uint32(itr->Unk1); // unknown
|
||||
data << uint32(itr->Unk2); // unknown
|
||||
data << uint32(itr->Unk3); // unknown
|
||||
data << uint32(itr->Unk4); // unknown
|
||||
data << uint32(itr->points.size()); // POI points count
|
||||
|
||||
for(std::vector<QuestPOIPoint>::const_iterator itr2 = itr->points.begin(); itr2 != itr->points.end(); ++itr2)
|
||||
{
|
||||
data << int32(itr2->x); // POI point x
|
||||
data << int32(itr2->y); // POI point y
|
||||
}
|
||||
++index;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
data << uint32(questId); // quest ID
|
||||
data << uint32(0); // POI count
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
data << uint32(questId); // quest ID
|
||||
data << uint32(0); // POI count
|
||||
}
|
||||
}
|
||||
|
||||
SendPacket(&data);
|
||||
}
|
||||
Reference in New Issue
Block a user