1. May 4, 2016  

    InFlight timers don't end when flight lands on Lordaeron

    http://wow.curseforge.com/addons/inf...i-timer/files/

    I'm trying to use an addon that shows the duration of your flights, which works perfectly fine. When the flight lands, however, it requires a reloadui to stop the timer. For some reason it never detects that the flight has ended.

    I know different servers have different quirks with taxis, but does anyone know how I may be able to modify it to just end when the timer is up regardless of the flight landing?

  2. May 4, 2016  
    I figured it out, if anyone else wants to use this addon, update line 458 - 465 to the following:

    Code:
     if endTime then  -- update statusbar if destination time is known
    				if totalTime - 2 > endTime then   -- in case the flight is longer than expected
    					SetToUnknown()
    					endTime = nil
    					sb:Hide()
    					this:Hide()
    					endTime = nil
    				else
    We kill it with sb:Hide() and this:Hide() as soon as the time goes 2 seconds the expected time.

    It will require using a premade flight time database available here:
    http://www.wowinterface.com/forums/s...ad.php?t=18997

  3. July 6, 2022  
    I am well aware that I am resurrecting a thread from 6 years ago, but I find this addon very useful. The only flaw is in the fact that the flight times are often in advance of those foreseen by the InFlight.lua file. I wonder if there is a possibility to change them.

  4. fixing it

    First, we begin by fixing typos:

    To fix the typos we will create a local function, to modify each instance of TaxiNodeName, this way we make sure the name of the flight source/start point and destination will have no typos and the duration of the flight is saved correctly! :D https://wtools.io/paste-code/bECd *

    function GetEstimatedTime and function postTaxiNodeOnButtonEnter should look like this: https://wtools.io/paste-code/bECe *
    (this fixes the tooltip on the flightmaster map. This is actually unnecesary for the addon to work, but may as well fix it anyway)

    function TakeTaxiNode(slot) should look like this: https://wtools.io/paste-code/bECf *
    (this fixes the name in the flight bar)

    and function InFlight:InitSource() should look like this: https://wtools.io/paste-code/bECg *
    (this fixes the name of the flight source/start point! which I forgot before)

    now the typos made by Blizz are fixed! (for real this time!)

    Second, we fix the detection of the flight stopping

    inside the function InFlight:StartTimer(slot), you can comment out/delete the other events registered, the frame only needs to listen to UNIT_AURA, like this:

    self:RegisterEvent("UNIT_AURA")

    finally, where the OnEvent/Event handler functions are:
    function self:PLAYER_LEAVING_WORLD()
    function self:PLAYER_ENTERING_WORLD()
    function self:PLAYER_CONTROL_GAINED()

    you can delete these and instead add: https://wtools.io/paste-code/bECl *

    *Obviously, there's no need to add what I commented out already, but it's harmless really

    Explanation:
    the event PLAYER_CONTROL_GAINED isn't fired as it should be when landing after a flightpath. From what I could gather, this is a bug. Since any article from the time of Wrath and before mention that PLAYER_CONTROL_LOST and GAINED events should fire with taxis/flightpaths.

    Regardless, we need to relay on some other event to detect when the flight has stopped.
    As the reader might know, mounts (and flying mounts) are merely a buff given to the player that enhances their movement speed, so here comes UNIT_AURA.
    As soon as the player takes a flightpath the frame begins listening to this event, which fires when a unit recieves or loses a buff.
    For the flight bar to stop, the player must first lose the flight buff. Then we check for the unit (it has to be the own player), check for the speed (which has to be below the flight speed, 32 yards per second), and finally (here's why the typos had to be fixed) we begin checking if the destination matches the subzone or zone the player is in. Until now, this addon has been able to detect each stop without failure, except for a couple of flights**.

    ** I recommend for people that don't use english clients to change the next lines of code to whatever suits the localization used. The string between "" has to be changed.

    ** Zul'Aman flightpath, actually lands on Hatchet Hills (https://wowpedia.fandom.com/wiki/Hatchet_Hills).
    elseif GetSubZoneText() == "Hatchet Hills" then flightEnd()

    ** Shattered Sun Staging Area flightpath, actually lands on https://wowpedia.fandom.com/wiki/Sun%27s_Reach_Harbor
    elseif GetSubZoneText() == "Sun's Reach Harbor" then flightEnd()

    I hope this helps someone out there lol
    Edited: September 2, 2022 Reason: oops, i should have made sure it works lol

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •