Send expedition re-invite to clients that zone

Moves expedition message handling in world to Expedition method
for messages that need special handling
This commit is contained in:
hg
2020-05-18 23:26:00 -04:00
parent 20bfdac7e0
commit e79d03261a
10 changed files with 121 additions and 18 deletions
+12 -1
View File
@@ -9549,7 +9549,6 @@ void Client::SendCrossZoneMessageString(
void Client::UpdateExpeditionInfoAndLockouts()
{
// this is processed by client after entering a zone
// todo: live re-invites if client zoned with a pending invite window open
SendDzCompassUpdate();
auto expedition = GetExpedition();
@@ -9571,6 +9570,9 @@ void Client::UpdateExpeditionInfoAndLockouts()
}
LoadAllExpeditionLockouts();
// ask world for any pending invite we saved from a previous zone
RequestPendingExpeditionInvite();
}
Expedition* Client::CreateExpedition(DynamicZone& dz_instance, ExpeditionRequest& request)
@@ -9764,6 +9766,15 @@ void Client::SendExpeditionLockoutTimers()
QueuePacket(outapp.get());
}
void Client::RequestPendingExpeditionInvite()
{
uint32_t packsize = sizeof(ServerExpeditionCharacterID_Struct);
auto pack = std::unique_ptr<ServerPacket>(new ServerPacket(ServerOP_ExpeditionRequestInvite, packsize));
auto packbuf = reinterpret_cast<ServerExpeditionCharacterID_Struct*>(pack->pBuffer);
packbuf->character_id = CharacterID();
worldserver.SendPacket(pack.get());
}
void Client::DzListTimers()
{
// only lists player's current replay timer lockouts, not all event lockouts