Core/Events: update holiday code and remove misleading log (event date is the one from game_event)

Port From (https://github.com/TrinityCore/TrinityCore/commit/5714e89ccf48d4a4add22f308f77aa8bdd94fc9a)
This commit is contained in:
hondacrx
2021-06-24 00:05:28 -04:00
parent 3265d6ea17
commit 6b45e87c92
+7 -3
View File
@@ -1630,16 +1630,20 @@ namespace Game
if (curTime < startTime + gameEvent.length * Time.Minute)
{
gameEvent.start = startTime + stageOffset;
return;
break;
}
else if (singleDate)
{
var tmCopy = timeInfo.AddYears(Time.UnixTimeToDateTime(curTime).ToLocalTime().Year); // This year
gameEvent.start = Time.DateTimeToUnixTime(tmCopy) + stageOffset;
return;
break;
}
else
{
// date is due and not a singleDate event, try with next DBC date (modified by holiday_dates)
// if none is found we don't modify start date and use the one in game_event
}
}
Log.outError(LogFilter.Sql, $"No suitable start date found for holiday {gameEvent.holiday_id}.");
}
public bool IsHolidayActive(HolidayIds id)