From 83aca7b23713ca55cc8867ff193bcf1071126e69 Mon Sep 17 00:00:00 2001 From: Takenbacon Date: Mon, 29 Sep 2025 17:36:48 -0700 Subject: [PATCH] Sync AC weather PR changes (#306) --- src/LuaEngine/methods/MapMethods.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/LuaEngine/methods/MapMethods.h b/src/LuaEngine/methods/MapMethods.h index eed59bb..f71f507 100644 --- a/src/LuaEngine/methods/MapMethods.h +++ b/src/LuaEngine/methods/MapMethods.h @@ -238,14 +238,11 @@ namespace LuaMap */ int SetWeather(lua_State* L, Map* map) { - (void)map; // ensure that the variable is referenced in order to pass compiler checks uint32 zoneId = Eluna::CHECKVAL(L, 2); uint32 weatherType = Eluna::CHECKVAL(L, 3); float grade = Eluna::CHECKVAL(L, 4); - Weather* weather = WeatherMgr::FindWeather(zoneId); - if (!weather) - weather = WeatherMgr::AddWeather(zoneId); + Weather* weather = map->GetOrGenerateZoneDefaultWeather(zoneId); if (weather) weather->SetWeather((WeatherType)weatherType, grade); return 0;