mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-18 19:35:42 +00:00
fix(Core/Quest): Refresh SMSG_QUESTGIVER_STATUS_MULTIPLE after a quest change (#8902)
Co-authored-by: Malcrom <malcromdev@gmail.com>
This commit is contained in:
@@ -640,46 +640,7 @@ void WorldSession::HandleQuestgiverStatusMultipleQuery(WorldPacket& /*recvPacket
|
||||
{
|
||||
LOG_DEBUG("network", "WORLD: Received CMSG_QUESTGIVER_STATUS_MULTIPLE_QUERY");
|
||||
|
||||
uint32 count = 0;
|
||||
|
||||
WorldPacket data(SMSG_QUESTGIVER_STATUS_MULTIPLE, 4);
|
||||
data << uint32(count); // placeholder
|
||||
|
||||
for (GuidUnorderedSet::const_iterator itr = _player->m_clientGUIDs.begin(); itr != _player->m_clientGUIDs.end(); ++itr)
|
||||
{
|
||||
uint32 questStatus = DIALOG_STATUS_NONE;
|
||||
|
||||
if ((*itr).IsAnyTypeCreature())
|
||||
{
|
||||
// need also pet quests case support
|
||||
Creature* questgiver = ObjectAccessor::GetCreatureOrPetOrVehicle(*GetPlayer(), *itr);
|
||||
if (!questgiver || questgiver->IsHostileTo(_player))
|
||||
continue;
|
||||
if (!questgiver->HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER))
|
||||
continue;
|
||||
|
||||
questStatus = _player->GetQuestDialogStatus(questgiver);
|
||||
|
||||
data << questgiver->GetGUID();
|
||||
data << uint8(questStatus);
|
||||
++count;
|
||||
}
|
||||
else if ((*itr).IsGameObject())
|
||||
{
|
||||
GameObject* questgiver = GetPlayer()->GetMap()->GetGameObject(*itr);
|
||||
if (!questgiver || questgiver->GetGoType() != GAMEOBJECT_TYPE_QUESTGIVER)
|
||||
continue;
|
||||
|
||||
questStatus = _player->GetQuestDialogStatus(questgiver);
|
||||
|
||||
data << questgiver->GetGUID();
|
||||
data << uint8(questStatus);
|
||||
++count;
|
||||
}
|
||||
}
|
||||
|
||||
data.put<uint32>(0, count); // write real count
|
||||
SendPacket(&data);
|
||||
_player->SendQuestGiverStatusMultiple();
|
||||
}
|
||||
|
||||
void WorldSession::HandleQueryQuestsCompleted(WorldPacket& /*recvData*/)
|
||||
|
||||
Reference in New Issue
Block a user