[lua] function flightEnd() and function self frame UNIT_AURA(unitID)

Viewer

copydownloadembedprintName: function flightEnd() and function self frame UNIT_AURA(unitID)
  1.                 local flightEnd = function()
  2.                         ontaxi = nil
  3.                         onupdate(self, 3)
  4.                         self:UnregisterEvent("UNIT_AURA")
  5.                 end
  6.  
  7.                 function self:UNIT_AURA(unitID)
  8.                         if unitID == "player" and GetUnitSpeed(unitID) < 32 and self:IsShown() then
  9.                                 if string.find( GetSubZoneText(), destination) or string.find( GetZoneText(), destination) then --Ironforge is actually called City of Ironforge, Feathermoon is actually Feathermoon Stronghold
  10.                                         flightEnd()
  11.                                 elseif GetSubZoneText() == "Hatchet Hills" then --Zul'Aman flightpath lands not in Zul'aman, Ghostlands, both string-finders above won't recognize it lol
  12.                                         flightEnd()
  13.                                 elseif GetSubZoneText() == "Sun's Reach Harbor" then --SS Staging Area flightpath lands in Sun's Reach Harbor, Isle of Quel'Danas, both string-finders above won't recognize it -.-
  14.                                         flightEnd()
  15.                                 else
  16.                                         print (destination.." didn't match "..GetSubZoneText().." or "..GetZoneText()) --should never print, but annoying as it is, makes the error pretty obvious
  17.                                 end
  18.                         end
  19.                 end

Editor

You can edit this paste and save as new:


File Description
  • function flightEnd() and function self frame UNIT_AURA(unitID)
  • Paste Code
  • 02 Sep-2022
  • 1022 Bytes
You can Share it: