diff --git a/sql/custom/world/2026_11_16_00_world_forever_noblegarden_client_dates.sql b/sql/custom/world/2026_11_16_00_world_forever_noblegarden_client_dates.sql new file mode 100644 index 0000000000..f077df62f2 --- /dev/null +++ b/sql/custom/world/2026_11_16_00_world_forever_noblegarden_client_dates.sql @@ -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; diff --git a/src/server/game/Events/GameEventMgr.cpp b/src/server/game/Events/GameEventMgr.cpp index c4c5a935f5..42c9a43c8e 100644 --- a/src/server/game/Events/GameEventMgr.cpp +++ b/src/server/game/Events/GameEventMgr.cpp @@ -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)