[Cleanup] Make use of AccountStatus constants wherever status is checked or used. (#1764)

* [Cleanup] Make use of AccountStatus constants wherever status is checked or used.
- Cleanup all instances of SendEmoteMessage.
- Cleanup all instances of SendEmoteMessageRaw.
- Cleanup all instances of MessageStatus.
- Convert Quest API method defaults to use constants.

* Cleanup constant names.
This commit is contained in:
Kinglykrab
2021-11-14 22:01:13 -05:00
committed by GitHub
parent 5d75b7b365
commit 293361a1f7
38 changed files with 1369 additions and 870 deletions
+4 -4
View File
@@ -3243,7 +3243,7 @@ void EntityList::SendPetitionToAdmins()
pcus->quetotal=0;
auto it = client_list.begin();
while (it != client_list.end()) {
if (it->second->CastToClient()->Admin() >= 80)
if (it->second->CastToClient()->Admin() >= AccountStatus::QuestTroupe)
it->second->CastToClient()->QueuePacket(outapp);
++it;
}
@@ -3271,7 +3271,7 @@ void EntityList::SendPetitionToAdmins(Petition *pet)
pcus->quetotal = petition_list.GetTotalPetitions();
auto it = client_list.begin();
while (it != client_list.end()) {
if (it->second->CastToClient()->Admin() >= 80) {
if (it->second->CastToClient()->Admin() >= AccountStatus::QuestTroupe) {
if (pet->CheckedOut())
strcpy(pcus->gmsenttoo, "");
else
@@ -3296,7 +3296,7 @@ void EntityList::ClearClientPetitionQueue()
pet->quetotal = petition_list.GetTotalPetitions();
auto it = client_list.begin();
while (it != client_list.end()) {
if (it->second->CastToClient()->Admin() >= 100) {
if (it->second->CastToClient()->Admin() >= AccountStatus::GMAdmin) {
int x = 0;
for (x = 0; x < 64; x++) {
pet->petnumber = x;
@@ -4686,7 +4686,7 @@ void EntityList::ZoneWho(Client *c, Who_All_Struct *Who)
WAPP2->RankMSGID = 12315;
else if (ClientEntry->IsBuyer())
WAPP2->RankMSGID = 6056;
else if (ClientEntry->Admin() >= 10 && ClientEntry->GetGM())
else if (ClientEntry->Admin() >= AccountStatus::Steward && ClientEntry->GetGM())
WAPP2->RankMSGID = 12312;
else
WAPP2->RankMSGID = 0xFFFFFFFF;