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:
SoglaHash
2022-08-25 16:57:54 +02:00
committed by GitHub
parent c51dfb9505
commit 0450420157

View File

@@ -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)