From 2e751b02961451775fb0675ef5d2d092e38e8bbb Mon Sep 17 00:00:00 2001 From: James Whitehead II Date: Mon, 22 Dec 2008 21:12:24 +0000 Subject: [PATCH] * Fixed an error that caused the battlemap to flip back and forth when using the corpse arrow in a battleground (which does not work) --- TomTom_Corpse.lua | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/TomTom_Corpse.lua b/TomTom_Corpse.lua index 33e49cd..e7e1326 100644 --- a/TomTom_Corpse.lua +++ b/TomTom_Corpse.lua @@ -59,6 +59,12 @@ local function SetCorpseArrow() end end +local function StartCorpseSearch() + if not IsInInstance() then + eventFrame:Show() + end +end + local function ClearCorpseArrow() if uid then TomTom:RemoveWaypoint(uid) @@ -89,13 +95,13 @@ eventFrame:SetScript("OnEvent", function(self, event, arg1, ...) if event == "ADDON_LOADED" and arg1 == "TomTom" then self:UnregisterEvent("ADDON_LOADED") if UnitIsDeadOrGhost("player") then - self:Show() + StartCorpseSearch() end end if event == "PLAYER_ALIVE" then if UnitIsDeadOrGhost("player") then - self:Show() + StartCorpseSearch() else ClearCorpseArrow() end @@ -107,7 +113,7 @@ eventFrame:SetScript("OnEvent", function(self, event, arg1, ...) if not IsInInstance() then x,y = GetPlayerMapPosition("player") end - self:Show() + StartCorpseSearch() elseif event == "PLAYER_UNGHOST" then ClearCorpseArrow() end -- 1.7.9.5