Revert "Don't set member offline before linkdead"

This reverts commit 8d27602aa0b3f766760f0952389c988f1b150de6.

This doesn't work because a linkdead leader coming back online will
toggle to offline state anyway
This commit is contained in:
hg 2020-11-01 19:48:36 -05:00
parent 6e9f920931
commit 955cbeb826
2 changed files with 5 additions and 8 deletions

View File

@ -739,7 +739,7 @@ public:
bool TGB() const { return tgb; }
void OnDisconnect(bool hard_disconnect, bool linkdead = false);
void OnDisconnect(bool hard_disconnect);
uint16 GetSkillPoints() { return m_pp.points;}
void SetSkillPoints(int inp) { m_pp.points = inp;}

View File

@ -559,20 +559,17 @@ bool Client::Process() {
}
if (client_state != CLIENT_LINKDEAD && !eqs->CheckState(ESTABLISHED)) {
OnDisconnect(true);
LogInfo("Client linkdead: {}", name);
if (Admin() > 100) {
OnDisconnect(true);
if (GetMerc()) {
GetMerc()->Save();
GetMerc()->Depop();
}
return false;
}
OnDisconnect(true, true);
if (!linkdead_timer.Enabled()) {
else if (!linkdead_timer.Enabled()) {
linkdead_timer.Start(RuleI(Zone, ClientLinkdeadMS));
client_state = CLIENT_LINKDEAD;
AI_Start(CLIENT_LD_TIMEOUT);
@ -691,7 +688,7 @@ bool Client::Process() {
}
/* Just a set of actions preformed all over in Client::Process */
void Client::OnDisconnect(bool hard_disconnect, bool linkdead) {
void Client::OnDisconnect(bool hard_disconnect) {
if(hard_disconnect)
{
LeaveGroup();
@ -715,7 +712,7 @@ void Client::OnDisconnect(bool hard_disconnect, bool linkdead) {
}
Expedition* expedition = GetExpedition();
if (expedition && !bZoning && !linkdead && !linkdead_timer.Enabled())
if (expedition && !bZoning)
{
expedition->SetMemberStatus(this, ExpeditionMemberStatus::Offline);
}