From 01ebb1f193e1656f05eb4a7e4d43840bee23e2a8 Mon Sep 17 00:00:00 2001 From: Andrew <47818697+Nyeriah@users.noreply.github.com> Date: Fri, 21 Nov 2025 02:16:56 -0300 Subject: [PATCH] fix(Scripts/Dragonblight): Fix Rescue Villager cast conditions (#23822) --- src/server/scripts/Northrend/zone_dragonblight.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/server/scripts/Northrend/zone_dragonblight.cpp b/src/server/scripts/Northrend/zone_dragonblight.cpp index ade76cf5f..4b0238f3d 100644 --- a/src/server/scripts/Northrend/zone_dragonblight.cpp +++ b/src/server/scripts/Northrend/zone_dragonblight.cpp @@ -789,7 +789,11 @@ class spell_q12237_rescue_villager : public SpellScript result = SPELL_FAILED_CUSTOM_ERROR; } - if (!GetCaster()->FindNearestCreature(NPC_HELPLESS_VILLAGER_A, 5.0f) && !GetCaster()->FindNearestCreature(NPC_HELPLESS_VILLAGER_B, 5.0f)) + std::list villagers; + GetCaster()->GetCreatureListWithEntryInGrid(villagers, { NPC_HELPLESS_VILLAGER_A, NPC_HELPLESS_VILLAGER_B }, 5.0f); + villagers.remove_if([](Creature* c) { return !c->IsAlive() || c->HasAura(SPELL_RIDE_VEHICLE); }); + + if (villagers.empty()) { extension = SPELL_CUSTOM_ERROR_MUST_BE_NEAR_HELPLESS_VILLAGER; result = SPELL_FAILED_CUSTOM_ERROR;