Holidays: keep the event's length when the client gives no duration; Noblegarden runs again
SetHolidayEventTime dropped any holiday without a duration for stage 1, so its dates were never used. The Forever client's Noblegarden (Holidays 181) has a date every spring and no duration at all. The client's duration still wins when there is one; when there is none, the game_event row's length is kept. Event 28 owns the 192 Noblegarden objects but had no start, no end and no holiday, so it never ran. 2026_11_16_00 links it to holiday 181, stage 1, with the row's 2880 minute length. The missing-duration case was reported by the Everlake core (GPL), github.com/buildthehomelab/wow-trinitycore-everlake.
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
-- Noblegarden on the client's own dates.
|
||||
--
|
||||
-- Event 28 owns the Noblegarden objects (192 gameobject spawns in game_event_gameobject, 2026_10_17_53) but came from
|
||||
-- VMaNGOS with no start, no end and no holiday, so it never ran: GameEventMgr::CheckOneGameEvent needs start < now < end.
|
||||
-- The Forever client carries the holiday as Holidays 181: a dated run every spring (2026-04-06, 2027-03-29, 2028-04-17 ... up
|
||||
-- to 2030), but no duration for any stage. Since 2026_11_16 the server keeps the game_event row's length for such a holiday
|
||||
-- (GameEventMgr::SetHolidayEventTime) instead of ignoring its dates, so linking the row is enough: start comes from the client's
|
||||
-- next date, the length stays the row's 2880 minutes, and the next date is picked when a run ends.
|
||||
-- start_time is only the fallback once the client's dates run out (after 2030); end_time matches the other yearly events.
|
||||
-- With thanks to the Everlake core (GPL), whose report pointed at the missing-duration case.
|
||||
UPDATE `game_event` SET `start_time` = '2026-04-06 00:00:00', `end_time` = '2037-12-31 23:59:59', `holiday` = 181, `holidayStage` = 1
|
||||
WHERE `eventEntry` = 28;
|
||||
@@ -1694,14 +1694,23 @@ void GameEventMgr::SetHolidayEventTime(GameEventData& event)
|
||||
return;
|
||||
|
||||
HolidaysEntry const* holiday = sHolidaysStore.LookupEntry(event.holiday_id);
|
||||
if (!holiday->Date[0] || !holiday->Duration[0]) // Invalid definitions
|
||||
if (!holiday->Date[0]) // Invalid definitions
|
||||
{
|
||||
TC_LOG_ERROR("sql.sql", "Missing date or duration for holiday {}.", event.holiday_id);
|
||||
TC_LOG_ERROR("sql.sql", "Missing date for holiday {}.", event.holiday_id);
|
||||
return;
|
||||
}
|
||||
|
||||
uint8 stageIndex = event.holidayStage - 1;
|
||||
event.length = holiday->Duration[stageIndex] * HOUR / MINUTE;
|
||||
// The client's duration for this stage wins. Some holidays have dates but no durations at all (the Forever client's
|
||||
// Noblegarden, 181): those keep the length of their game_event row instead of dropping the client's dates.
|
||||
if (holiday->Duration[stageIndex])
|
||||
event.length = holiday->Duration[stageIndex] * HOUR / MINUTE;
|
||||
else if (!event.length)
|
||||
{
|
||||
TC_LOG_ERROR("sql.sql", "Holiday {} has no duration for stage {} and game_event {} has no length.", event.holiday_id,
|
||||
event.holidayStage, event.description);
|
||||
return;
|
||||
}
|
||||
|
||||
Hours stageOffset = 0h;
|
||||
for (uint8 i = 0; i < stageIndex; ++i)
|
||||
|
||||
Reference in New Issue
Block a user