mirror of
https://gitcode.com/GitHub_Trending/az/azerothcore-wotlk.git
synced 2026-10-10 07:06:38 +08:00
fix(Core/Events): match a holiday to its own event, not its building stage (#27655)
Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
This commit is contained in:
@@ -2032,10 +2032,11 @@ void GameEventMgr::SetHolidayEventTime(GameEventData& event)
|
||||
uint32 GameEventMgr::GetHolidayEventId(uint32 holidayId) const
|
||||
{
|
||||
auto const& events = GetEventMap();
|
||||
uint8 mainStage = GetHolidayMainStage(holidayId);
|
||||
|
||||
for (auto const& eventEntry : events)
|
||||
{
|
||||
if (eventEntry.HolidayId == holidayId)
|
||||
if (eventEntry.HolidayId == holidayId && eventEntry.HolidayStage == mainStage)
|
||||
{
|
||||
return eventEntry.EventId;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user