Skip to content

Commit

Permalink
Fix weather times for the umpteenth time
Browse files Browse the repository at this point in the history
  • Loading branch information
Ottermandias committed Jul 24, 2021
1 parent 02c57e8 commit 3f501d5
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Gui/Cache/Weather.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,23 +27,23 @@ internal struct Weather
public Weather(WeatherManager weather)
{
_weather = weather;
WeatherTimes = weather.NextWeatherChangeTimes(NumWeathers, -WeatherManager.SecondsPerWeather);
WeatherTimes = weather.NextWeatherChangeTimes(NumWeathers, -2 * WeatherManager.SecondsPerWeather);
WeatherTimeStrings = new string[NumWeathers];
_totalHour = 0;
_totalHour = EorzeaTime.CurrentHour() - 8;
Filter = "";
FilterLower = "";
Weathers = CachedWeather.CreateWeatherCache();
FilterSize = Weathers.Max(c => ImGui.CalcTextSize(c.Zone).X);
Update(EorzeaTime.CurrentHour());
}

public void Update(long totalHour)
{
//if (totalHour - _totalHour < 8)
// return;
if (totalHour - _totalHour < 8)
return;

UpdateWeather();
if (_totalHour > 0)
UpdateTimes((totalHour - _totalHour) / 8);
UpdateTimes((totalHour - _totalHour) / 8);
_totalHour = totalHour - ((totalHour % RealTime.HoursPerDay) & 0b111);
}

Expand Down

0 comments on commit 3f501d5

Please sign in to comment.