Implement initial expedition system

Add Expeditions logging category

Add handlers for all Dynamic Zone/Expedition related opcodes

Add FormatName string_util function to format character names

Add Zone::IsZone helper method

Add cross zone MessageString support with variable parameters

Add static Client method helpers for cross zone messaging

Add #dz gm command to debug expedition cache for current zone
This commit is contained in:
hg
2020-04-14 17:18:54 -04:00
parent a77f8b582e
commit da067be2fa
31 changed files with 4011 additions and 12 deletions
+18
View File
@@ -44,6 +44,7 @@
#include "../common/spdat.h"
#include "../common/string_util.h"
#include "event_codes.h"
#include "expedition.h"
#include "guild_mgr.h"
#include "map.h"
#include "petitions.h"
@@ -560,6 +561,12 @@ bool Client::Process() {
client_state = CLIENT_LINKDEAD;
AI_Start(CLIENT_LD_TIMEOUT);
SendAppearancePacket(AT_Linkdead, 1);
Expedition* expedition = GetExpedition();
if (expedition)
{
expedition->SetMemberStatus(this, ExpeditionMemberStatus::LinkDead);
}
}
}
@@ -641,6 +648,11 @@ bool Client::Process() {
myraid->MemberZoned(this);
}
}
Expedition* expedition = GetExpedition();
if (expedition && !bZoning)
{
expedition->SetMemberStatus(this, ExpeditionMemberStatus::Offline);
}
OnDisconnect(false);
return false;
}
@@ -682,6 +694,12 @@ void Client::OnDisconnect(bool hard_disconnect) {
if (MyRaid)
MyRaid->MemberZoned(this);
Expedition* expedition = GetExpedition();
if (expedition)
{
expedition->SetMemberStatus(this, ExpeditionMemberStatus::Offline);
}
parse->EventPlayer(EVENT_DISCONNECT, this, "", 0);
/* QS: PlayerLogConnectDisconnect */