mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 03:08:26 +00:00
Let world dispatch expedition expire warnings
This depends on C++14 remaining enabled for chrono literals
This commit is contained in:
@@ -1742,16 +1742,6 @@ void Expedition::SendWorldSetSecondsRemaining(uint32_t seconds_remaining)
|
||||
worldserver.SendPacket(pack.get());
|
||||
}
|
||||
|
||||
void Expedition::SendWorldExpireWarning(uint32_t minutes_remaining)
|
||||
{
|
||||
uint32_t pack_size = sizeof(ServerExpeditionExpireWarning_Struct);
|
||||
auto pack = std::unique_ptr<ServerPacket>(new ServerPacket(ServerOP_ExpeditionExpireWarning, pack_size));
|
||||
auto buf = reinterpret_cast<ServerExpeditionExpireWarning_Struct*>(pack->pBuffer);
|
||||
buf->expedition_id = GetID();
|
||||
buf->minutes_remaining = minutes_remaining;
|
||||
worldserver.SendPacket(pack.get());
|
||||
}
|
||||
|
||||
void Expedition::AddLockoutByCharacterID(
|
||||
uint32_t character_id, const std::string& expedition_name, const std::string& event_name,
|
||||
uint32_t seconds, const std::string& uuid)
|
||||
|
||||
@@ -142,7 +142,6 @@ public:
|
||||
void SetLootEventBySpawnID(uint32_t spawn_id, const std::string& event_name);
|
||||
|
||||
void SendClientExpeditionInfo(Client* client);
|
||||
void SendWorldExpireWarning(uint32_t minutes);
|
||||
void SendWorldPendingInvite(const ExpeditionInvite& invite, const std::string& add_name);
|
||||
|
||||
void DzAddPlayer(Client* requester, const std::string& add_char_name, const std::string& swap_remove_name = {});
|
||||
|
||||
+3
-6
@@ -1524,16 +1524,13 @@ bool Zone::Process() {
|
||||
|
||||
if (minutes_warning > 0)
|
||||
{
|
||||
// expedition expire warnings are handled by world
|
||||
auto expedition = Expedition::FindCachedExpeditionByZoneInstance(GetZoneID(), GetInstanceID());
|
||||
if (expedition)
|
||||
{
|
||||
expedition->SendWorldExpireWarning(minutes_warning);
|
||||
}
|
||||
else
|
||||
if (!expedition)
|
||||
{
|
||||
entity_list.ExpeditionWarning(minutes_warning);
|
||||
Instance_Warning_timer = new Timer(10000);
|
||||
}
|
||||
Instance_Warning_timer = new Timer(10000);
|
||||
}
|
||||
}
|
||||
else if(Instance_Warning_timer->Check())
|
||||
|
||||
Reference in New Issue
Block a user