feat(Core/Handlers): Make use of a few billing plan flags for authentication response. (#24569)

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Benjamin Jackson 2026-02-09 22:28:59 -05:00 committed by GitHub
parent f0e5f32b4e
commit c73cf6b019
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 46 additions and 10 deletions

View file

@ -208,6 +208,37 @@ bool WorldSession::IsGMAccount() const
return GetSecurity() >= SEC_GAMEMASTER;
}
bool WorldSession::IsTrialAccount() const
{
return HasAccountFlag(ACCOUNT_FLAG_TRIAL);
}
bool WorldSession::IsInternetGameRoomAccount() const
{
return HasAccountFlag(ACCOUNT_FLAG_IGR);
}
bool WorldSession::IsRecurringBillingAccount() const
{
return HasAccountFlag(ACCOUNT_FLAG_RECURRING_BILLING);
}
uint8 WorldSession::GetBillingPlanFlags() const
{
uint8 flags = SESSION_NONE;
if (IsRecurringBillingAccount())
flags |= SESSION_RECURRING_BILL;
if (IsTrialAccount())
flags |= SESSION_FREE_TRIAL;
if (IsInternetGameRoomAccount())
flags |= SESSION_IGR;
return flags;
}
std::string const& WorldSession::GetPlayerName() const
{
return _player ? _player->GetName() : DefaultPlayerName;