Core/Players: fixed a possible crash in SendInitialPacketsBeforeAddToMap when uninstanced maps don't have a valid MapDifficulty entry
Port From (https://github.com/TrinityCore/TrinityCore/commit/924efc89b2668d390bf768ccd936cc67e4a77f5d)
This commit is contained in:
@@ -5565,7 +5565,9 @@ namespace Game.Entities
|
|||||||
|
|
||||||
// SMSG_WORLD_SERVER_INFO
|
// SMSG_WORLD_SERVER_INFO
|
||||||
WorldServerInfo worldServerInfo = new();
|
WorldServerInfo worldServerInfo = new();
|
||||||
worldServerInfo.InstanceGroupSize = GetMap().GetMapDifficulty().MaxPlayers; // @todo
|
var mapDifficulty = GetMap().GetMapDifficulty();
|
||||||
|
if (mapDifficulty != null)
|
||||||
|
worldServerInfo.InstanceGroupSize = mapDifficulty.MaxPlayers;
|
||||||
worldServerInfo.IsTournamentRealm = false; // @todo
|
worldServerInfo.IsTournamentRealm = false; // @todo
|
||||||
worldServerInfo.RestrictedAccountMaxLevel = null; // @todo
|
worldServerInfo.RestrictedAccountMaxLevel = null; // @todo
|
||||||
worldServerInfo.RestrictedAccountMaxMoney = null; // @todo
|
worldServerInfo.RestrictedAccountMaxMoney = null; // @todo
|
||||||
|
|||||||
Reference in New Issue
Block a user