From 9d696743255aff528c6f8280c8d43234b671463b Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Wed, 14 Apr 2021 09:37:18 -0400 Subject: [PATCH] Pull NPC and Zone checks to identifiers --- ATAutoReactivateGoliath/ATAutoReactivateGoliath.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ATAutoReactivateGoliath/ATAutoReactivateGoliath.lua b/ATAutoReactivateGoliath/ATAutoReactivateGoliath.lua index c2d6d60..78b9f1c 100644 --- a/ATAutoReactivateGoliath/ATAutoReactivateGoliath.lua +++ b/ATAutoReactivateGoliath/ATAutoReactivateGoliath.lua @@ -15,8 +15,11 @@ StaticPopupDialogs["GOLIATH_MISSING"] = { f:RegisterEvent("GOSSIP_SHOW") f:SetScript("OnEvent", function(self, event, ...) - local isNecroticWake = GetZoneText() == "The Necrotic Wake" - local isSteward = GetUnitName("npc") == "Steward" + -- check if The Necrotic Wake + local isNecroticWake = C_Map.GetBestMapForUnit("player") == 1666 + -- check if Steward + local guid = UnitGUID("npc") + local isSteward = tonumber(guid and strsub(guid, 27, 32)) == 166663 if isNecroticWake and isSteward then options = C_GossipInfo.GetOptions() -- 2.45.2