From 68adfcf3d01bc6d6abfe144078527fb79911748c Mon Sep 17 00:00:00 2001 From: Karrz1 <127596890+Karrz1@users.noreply.github.com> Date: Sun, 15 Nov 2026 08:17:42 +0000 Subject: [PATCH] Conditions: the Wintergrasp holder check no longer crashes away from Wintergrasp condition_is_wintergrasp_horde and condition_is_wintergrasp_alliance used the battlefield of the condition's map without checking that there is one. Wintergrasp exists only on Northrend, and only while Wintergrasp.Enable is on, so a quest giver elsewhere whose quest carries this condition crashed the map every time a player came into view of it (the quest check for its speech bubble runs then). Eastern Kingdoms stopped updating near the Duskwood crossroads until the server went down. Reported by zeroyka. --- src/server/scripts/Northrend/zone_wintergrasp.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/server/scripts/Northrend/zone_wintergrasp.cpp b/src/server/scripts/Northrend/zone_wintergrasp.cpp index 937735514a..288cd18c5b 100644 --- a/src/server/scripts/Northrend/zone_wintergrasp.cpp +++ b/src/server/scripts/Northrend/zone_wintergrasp.cpp @@ -525,10 +525,10 @@ public: { if (!sourceInfo.mConditionMap) return false; + // Wintergrasp exists only on Northrend, and only while Wintergrasp.Enable is on: anywhere else (a quest giver in Duskwood + // whose quest carries this condition, a realm with the battle turned off) nobody holds it Battlefield* wintergrasp = sBattlefieldMgr->GetBattlefieldByBattleId(sourceInfo.mConditionMap, BATTLEFIELD_BATTLEID_WG); - if (wintergrasp->IsEnabled() && wintergrasp->GetDefenderTeam() == TEAM_HORDE) - return true; - return false; + return wintergrasp && wintergrasp->IsEnabled() && wintergrasp->GetDefenderTeam() == TEAM_HORDE; } }; @@ -541,10 +541,10 @@ public: { if (!sourceInfo.mConditionMap) return false; + // Wintergrasp exists only on Northrend, and only while Wintergrasp.Enable is on: anywhere else (a quest giver in Duskwood + // whose quest carries this condition, a realm with the battle turned off) nobody holds it Battlefield* wintergrasp = sBattlefieldMgr->GetBattlefieldByBattleId(sourceInfo.mConditionMap, BATTLEFIELD_BATTLEID_WG); - if (wintergrasp->IsEnabled() && wintergrasp->GetDefenderTeam() == TEAM_ALLIANCE) - return true; - return false; + return wintergrasp && wintergrasp->IsEnabled() && wintergrasp->GetDefenderTeam() == TEAM_ALLIANCE; } };