mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-14 11:31:30 +00:00
[Fix] Clear GuildOnlineStatus on world boot (#4306)
Ensure that the guild member online status is set to offline (0) when world boots.
This commit is contained in:
parent
d302b9c02e
commit
b49b564940
@ -2089,3 +2089,8 @@ void Database::PurgeCharacterParcels()
|
|||||||
RuleI(Parcel, ParcelPruneDelay)
|
RuleI(Parcel, ParcelPruneDelay)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Database::ClearGuildOnlineStatus()
|
||||||
|
{
|
||||||
|
GuildMembersRepository::ClearOnlineStatus(*this);
|
||||||
|
}
|
||||||
|
|||||||
@ -243,6 +243,7 @@ public:
|
|||||||
void SetRaidGroupLeaderInfo(uint32 group_id, uint32 raid_id);
|
void SetRaidGroupLeaderInfo(uint32 group_id, uint32 raid_id);
|
||||||
|
|
||||||
void PurgeAllDeletedDataBuckets();
|
void PurgeAllDeletedDataBuckets();
|
||||||
|
void ClearGuildOnlineStatus();
|
||||||
|
|
||||||
|
|
||||||
/* Database Variables */
|
/* Database Variables */
|
||||||
|
|||||||
@ -190,6 +190,17 @@ public:
|
|||||||
|
|
||||||
return UpdateOne(db, m);
|
return UpdateOne(db, m);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void ClearOnlineStatus(Database &db)
|
||||||
|
{
|
||||||
|
auto results = db.QueryDatabase(
|
||||||
|
fmt::format(
|
||||||
|
"UPDATE {} SET `online` = 0 "
|
||||||
|
"WHERE `online` = 1;",
|
||||||
|
TableName()
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif //EQEMU_GUILD_MEMBERS_REPOSITORY_H
|
#endif //EQEMU_GUILD_MEMBERS_REPOSITORY_H
|
||||||
|
|||||||
@ -138,7 +138,7 @@ void ClientListEntry::SetOnline(CLE_Status iOnline)
|
|||||||
"Online status [{}] ({}) status [{}] ({})",
|
"Online status [{}] ({}) status [{}] ({})",
|
||||||
AccountName(),
|
AccountName(),
|
||||||
AccountID(),
|
AccountID(),
|
||||||
CLEStatusString[CLE_Status::Online],
|
CLEStatusString[iOnline],
|
||||||
static_cast<int>(iOnline)
|
static_cast<int>(iOnline)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -284,6 +284,8 @@ bool WorldBoot::DatabaseLoadRoutines(int argc, char **argv)
|
|||||||
database.ClearRaid();
|
database.ClearRaid();
|
||||||
database.ClearRaidDetails();
|
database.ClearRaidDetails();
|
||||||
database.ClearRaidLeader();
|
database.ClearRaidLeader();
|
||||||
|
LogInfo("Clearing guild online status");
|
||||||
|
database.ClearGuildOnlineStatus();
|
||||||
LogInfo("Clearing inventory snapshots");
|
LogInfo("Clearing inventory snapshots");
|
||||||
database.ClearInvSnapshots();
|
database.ClearInvSnapshots();
|
||||||
LogInfo("Loading items");
|
LogInfo("Loading items");
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user