aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Weather/Weather.cpp
diff options
context:
space:
mode:
authorMitchesD <majklprofik@seznam.cz>2015-07-04 12:32:35 +0200
committerMitchesD <majklprofik@seznam.cz>2015-07-04 12:32:35 +0200
commitfaeaebc78332ed97d2bfada022b71ddef953be39 (patch)
tree3a1f9965e60102b9c1051b45a0883c85c54eaf48 /src/server/game/Weather/Weather.cpp
parent678a08c8c5e2de508c7517c91e75e0cd49ea3385 (diff)
parent8a8f4fa0d4e518e81434adde19022378b95eb727 (diff)
Merge pull request #15007 from armano2/6.x
Cleanup some whitespaces and change some codestyle
Diffstat (limited to 'src/server/game/Weather/Weather.cpp')
-rw-r--r--src/server/game/Weather/Weather.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/server/game/Weather/Weather.cpp b/src/server/game/Weather/Weather.cpp
index ecceb0b102f..348a98aa8b2 100644
--- a/src/server/game/Weather/Weather.cpp
+++ b/src/server/game/Weather/Weather.cpp
@@ -97,7 +97,7 @@ bool Weather::ReGenerate()
time_t gtime = sWorld->GetGameTime();
struct tm ltime;
localtime_r(&gtime, &ltime);
- uint32 season = ((ltime.tm_yday - 78 + 365)/91)%4;
+ uint32 season = ((ltime.tm_yday - 78 + 365) / 91) % 4;
static char const* seasonName[WEATHER_SEASONS] = { "spring", "summer", "fall", "winter" };
@@ -152,8 +152,8 @@ bool Weather::ReGenerate()
// At this point, only weather that isn't doing anything remains but that have weather data
uint32 chance1 = m_weatherChances->data[season].rainChance;
- uint32 chance2 = chance1+ m_weatherChances->data[season].snowChance;
- uint32 chance3 = chance2+ m_weatherChances->data[season].stormChance;
+ uint32 chance2 = chance1 + m_weatherChances->data[season].snowChance;
+ uint32 chance3 = chance2 + m_weatherChances->data[season].stormChance;
uint32 rnd = urand(0, 99);
if (rnd <= chance1)
@@ -316,4 +316,3 @@ WeatherState Weather::GetWeatherState() const
return WEATHER_STATE_FINE;
}
}
-