Fixed weather updates to be thread safe

This commit is contained in:
hondacrx
2017-09-20 00:27:47 -04:00
parent 28e6d6870a
commit 1b9bf99d8c
6 changed files with 88 additions and 103 deletions
+1 -4
View File
@@ -1276,10 +1276,7 @@ namespace Game.Chat
Player player = handler.GetSession().GetPlayer();
uint zoneid = player.GetZoneId();
Weather weather = Global.WeatherMgr.FindWeather(zoneid);
if (weather == null)
weather = Global.WeatherMgr.AddWeather(zoneid);
Weather weather = player.GetMap().GetOrGenerateZoneDefaultWeather(zoneid);
if (weather == null)
{
handler.SendSysMessage(CypherStrings.NoWeather);