1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-04-23 21:27:45 +00:00

Update isActingAsGm so we don't call getOnlineStatus 3 times

This commit is contained in:
Biscuit Boy 2018-07-01 21:43:50 +10:00
parent af06875e93
commit c83c59c25d

View file

@ -144,7 +144,8 @@ void Core::Entity::Player::setGmInvis( bool invis )
const bool Core::Entity::Player::isActingAsGm()
{
return getOnlineStatus() == OnlineStatus::GameMaster || getOnlineStatus() == OnlineStatus::GameMaster1 || getOnlineStatus() == OnlineStatus::GameMaster2;
auto status = getOnlineStatus();
return status == OnlineStatus::GameMaster || status == OnlineStatus::GameMaster1 || status == OnlineStatus::GameMaster2;
}
uint8_t Core::Entity::Player::getMode() const