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:
parent
c51dfb9505
commit
0450420157
1 changed files with 1 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue