[Bug Fix] Fix Flag Updating with SetGMStatus() in Lua. (#2554)

# Notes
- Perl was sending `UpdateAdmin()` after `SetGMStatus()`, Lua wasn't, so only Perl was updating properly.
- Fix is to just put `UpdateAdmin()` inside `SetGMStatus()`.
This commit is contained in:
Kinglykrab
2022-11-19 22:05:01 -05:00
committed by GitHub
parent 5173a9179b
commit e2dfbeb116
5 changed files with 32 additions and 18 deletions
+2 -3
View File
@@ -424,9 +424,9 @@ void Perl_Client_UpdateAdmin(Client* self) // @categories Account and Character
self->UpdateAdmin();
}
void Perl_Client_UpdateAdmin(Client* self, bool from_db) // @categories Account and Character
void Perl_Client_UpdateAdmin(Client* self, bool from_database) // @categories Account and Character
{
self->UpdateAdmin(from_db);
self->UpdateAdmin(from_database);
}
void Perl_Client_UpdateWho(Client* self) // @categories Script Utility
@@ -1230,7 +1230,6 @@ void Perl_Client_ReadBook(Client* self, const char* book_text, uint8 type) // @c
void Perl_Client_SetGMStatus(Client* self, int16 new_status) // @categories Script Utility
{
self->SetGMStatus(new_status);
self->UpdateAdmin(true);
}
int16 Perl_Client_GetGMStatus(Client* self) // @categories Account and Character