mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 09:17:18 +00:00
fix(Core/Weather): Wrong change type algorithm (#12729)
* fix(Core/Weather): Wrong change type algorithm There's a rare bug that occurs where it starts raining in zones that shouldn't Closes https://github.com/azerothcore/azerothcore-wotlk/issues/12711#issuecomment-1214226996 * Update Weather.cpp
This commit is contained in:
@@ -145,7 +145,7 @@ bool Weather::ReGenerate()
|
||||
uint32 chance2 = chance1 + m_weatherChances->data[season].snowChance;
|
||||
uint32 chance3 = chance2 + m_weatherChances->data[season].stormChance;
|
||||
|
||||
uint32 rnd = urand(0, 99);
|
||||
uint32 rnd = urand(1, 100);
|
||||
if (rnd <= chance1)
|
||||
m_type = WEATHER_TYPE_RAIN;
|
||||
else if (rnd <= chance2)
|
||||
|
||||
Reference in New Issue
Block a user