[Expeditions] Move member compass updates to dz (#1371)

This commit is contained in:
hg
2021-06-11 14:31:50 -04:00
committed by GitHub
parent 5b3ab59b7c
commit b61cc85b5f
4 changed files with 12 additions and 20 deletions
-13
View File
@@ -62,7 +62,6 @@ void Expedition::SetDynamicZone(DynamicZone&& dz)
dz.SetLeader(GetLeader());
m_dynamiczone = std::move(dz);
m_dynamiczone.RegisterOnCompassChange([this]() { SendCompassUpdateToZoneMembers(); });
}
Expedition* Expedition::TryCreate(
@@ -1840,18 +1839,6 @@ void Expedition::HandleWorldMessage(ServerPacket* pack)
}
}
void Expedition::SendCompassUpdateToZoneMembers()
{
for (const auto& member : GetDynamicZone().GetMembers())
{
Client* member_client = entity_list.GetClientByCharID(member.id);
if (member_client)
{
member_client->SendDzCompassUpdate();
}
}
}
bool Expedition::CanClientLootCorpse(Client* client, uint32_t npc_type_id, uint32_t spawn_id)
{
if (client && m_dynamiczone.IsCurrentZoneDzInstance())