[Code] PetitionList Global to Singleton Cleanup (#4944)

* [Code] PetitionList Global to Singleton Cleanup

* Update worldserver.cpp

* Update worldserver.cpp
This commit is contained in:
Alex King
2025-06-25 14:15:21 -04:00
committed by GitHub
parent 98eff43346
commit f3aaeff0a9
9 changed files with 38 additions and 41 deletions
+2 -3
View File
@@ -55,7 +55,6 @@ extern Zone *zone;
extern volatile bool is_zone_loaded;
extern WorldServer worldserver;
extern uint32 numclients;
extern PetitionList petition_list;
extern char errorname[32];
@@ -3447,7 +3446,7 @@ void EntityList::SendPetitionToAdmins(Petition *pet)
strcpy(pcus->accountid, pet->GetAccountName());
strcpy(pcus->charname, pet->GetCharName());
}
pcus->quetotal = petition_list.GetTotalPetitions();
pcus->quetotal = PetitionList::Instance()->GetTotalPetitions();
auto it = client_list.begin();
while (it != client_list.end()) {
if (it->second->CastToClient()->Admin() >= AccountStatus::QuestTroupe) {
@@ -3472,7 +3471,7 @@ void EntityList::ClearClientPetitionQueue()
strcpy(pet->accountid, "");
strcpy(pet->gmsenttoo, "");
strcpy(pet->charname, "");
pet->quetotal = petition_list.GetTotalPetitions();
pet->quetotal = PetitionList::Instance()->GetTotalPetitions();
auto it = client_list.begin();
while (it != client_list.end()) {
if (it->second->CastToClient()->Admin() >= AccountStatus::GMAdmin) {