fix(Core/Opcodes): Crash fix (#22453)
This commit is contained in:
@@ -385,7 +385,7 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData)
|
|||||||
bool senderIsPlayer = AccountMgr::IsPlayerAccount(GetSecurity());
|
bool senderIsPlayer = AccountMgr::IsPlayerAccount(GetSecurity());
|
||||||
bool receiverIsPlayer = AccountMgr::IsPlayerAccount(receiver ? receiver->GetSession()->GetSecurity() : SEC_PLAYER);
|
bool receiverIsPlayer = AccountMgr::IsPlayerAccount(receiver ? receiver->GetSession()->GetSecurity() : SEC_PLAYER);
|
||||||
|
|
||||||
if (sender->GetLevel() < sWorld->getIntConfig(CONFIG_CHAT_WHISPER_LEVEL_REQ) && receiver != sender && !receiver->IsGameMaster())
|
if (sender->GetLevel() < sWorld->getIntConfig(CONFIG_CHAT_WHISPER_LEVEL_REQ) && receiver != sender && receiver && !receiver->IsGameMaster())
|
||||||
{
|
{
|
||||||
ChatHandler(this).SendNotification(LANG_WHISPER_REQ, sWorld->getIntConfig(CONFIG_CHAT_WHISPER_LEVEL_REQ));
|
ChatHandler(this).SendNotification(LANG_WHISPER_REQ, sWorld->getIntConfig(CONFIG_CHAT_WHISPER_LEVEL_REQ));
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user