mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 09:17:36 +01:00
Core/Players: fixed a possible crash in SendInitialPacketsBeforeAddToMap when uninstanced maps don't have a valid MapDifficulty entry
(cherry picked from commit 924efc89b2)
This commit is contained in:
@@ -23482,7 +23482,8 @@ void Player::SendInitialPacketsBeforeAddToMap()
|
||||
|
||||
/// SMSG_WORLD_SERVER_INFO
|
||||
WorldPackets::Misc::WorldServerInfo worldServerInfo;
|
||||
worldServerInfo.InstanceGroupSize = GetMap()->GetMapDifficulty()->MaxPlayers;
|
||||
if (MapDifficultyEntry const* mapDifficulty = GetMap()->GetMapDifficulty())
|
||||
worldServerInfo.InstanceGroupSize = mapDifficulty->MaxPlayers;
|
||||
worldServerInfo.IsTournamentRealm = 0; /// @todo
|
||||
// worldServerInfo.RestrictedAccountMaxLevel; /// @todo
|
||||
// worldServerInfo.RestrictedAccountMaxMoney; /// @todo
|
||||
|
||||
Reference in New Issue
Block a user