fix(Chat): session null check for isavailable (#10613)

Co-authored-by: Francesco Borzì <borzifrancesco@gmail.com>
This commit is contained in:
Axel Cocat 2022-02-10 09:03:44 +01:00 committed by GitHub
parent 27df910cb7
commit 7eec7486e9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -47,7 +47,7 @@ char const* ChatHandler::GetAcoreString(uint32 entry) const
bool ChatHandler::IsAvailable(uint32 securityLevel) const
{
// check security level only for simple command (without child commands)
return m_session->GetSecurity() >= AccountTypes(securityLevel);
return IsConsole() ? true : m_session->GetSecurity() >= AccountTypes(securityLevel);
}
bool ChatHandler::HasLowerSecurity(Player* target, ObjectGuid guid, bool strong)