diff --git a/LibFlyable.lua b/LibFlyable.lua index 0d451ff..d5142dd 100644 --- a/LibFlyable.lua +++ b/LibFlyable.lua @@ -51,27 +51,6 @@ local spellForContinent = { [1479] = -1, -- Skyhold (Warrior) } --- Workaround for bug in patch 7.3.5 -local flyableContinents = { - -- These continents previously required special spells to fly in. - -- All such spells were removed from the game in patch 7.3.5, but - -- the IsFlyableArea() API function was not updated accordingly, - -- and incorrectly returns false on these continents for characters - -- who did not know the appropriate spell before the patch. - [ 0] = true, -- Eastern Kingdoms (Flight Master's License) - [ 1] = true, -- Kalimdor (Flight Master's License) - [646] = true, -- Deepholm (Flight Master's License) - [571] = true, -- Northrend (Cold Weather Flying) - [870] = true, -- Pandaria (Wisdom of the Four Winds) -} - --- Workaround for bug in patch 7.3.5 -local noFlyZones = { - -- These zones are not flyable, and IsFlyableArea() correctly returns - -- false there, but are on continents affected by the 7.3.5 bug. - [GetMapNameByID(951) or "ERROR"] = true, -- Timeless Isle -} - local noFlySubzones = { -- Unflyable subzones where IsFlyableArea() returns true: ["Nespirah"] = true, ["Неспира"] = true, ["네스피라"] = true, ["奈瑟匹拉"] = true, ["奈斯畢拉"] = true, @@ -87,8 +66,8 @@ local IsFlyableArea = IsFlyableArea local IsSpellKnown = IsSpellKnown function lib.IsFlyableArea() - -- if not IsFlyableArea() -- Untrustable in patch 7.3.5 - if noFlySubzones[GetSubZoneText() or ""] then + if not IsFlyableArea() + or noFlySubzones[GetSubZoneText() or ""] then return false end @@ -98,17 +77,5 @@ function lib.IsFlyableArea() return reqSpell > 0 and IsSpellKnown(reqSpell) end - -- Workaround for bug in patch 7.3.5 - -- IsFlyableArea() incorrectly reports false in many locations for - -- characters who did not have a zone-specific flying spell before - -- the patch (which removed all such spells from the game). - if not IsFlyableArea() and not flyableContinents[instanceMapID] then - -- Continent is not affected by the bug. API is correct. - return false - elseif flyableContinents[instanceMapID] and noFlyZones[GetZoneText() or ""] then - -- Continent is affected, but API is correct, zone is not flyable. - return false - end - return IsSpellKnown(34090) or IsSpellKnown(34091) or IsSpellKnown(90265) end diff --git a/README.md b/README.md index 547f7e0..046d35a 100644 --- a/README.md +++ b/README.md @@ -5,18 +5,9 @@ Avoids these long-standing bugs with IsFlyableArea: - Broken Isles zones are only flyable with the Broken Isles Pathfinder ability. -- Draenor zones (including the garrison) are only flyable with the Draenor Pathfinder ability. -- Ashran (PvP) and the Tanaan Jungle Intro are *never* flyable. - -Also avoids the new bugs introduced in Patch 7.3.5: - -- Pandaria zones no longer require Wisdom of the Four Winds. -- Northrend zones no longer require Cold Weather Flying. -- Eastern Kingdoms, Kalimdor, and Deepholm no longer require Flight Master's License. - -These spells were removed from the game, and all characters can fly in these -zones, but IsFlyableArea returns false for characters who had not previously -learned the appropriate spell. +- Draenor zones are only flyable with the Draenor Pathfinder ability. +- Certain maps like Argus and the Tanaan Jungle Intro are not flyable. +- Certain Legion class halls are not flyable. ## Usage @@ -26,11 +17,11 @@ lib = LibStub("LibFlyable") isFlyable = lib:IsFlyableArea() -- true/false ``` -**Source code and bug reports on GitHub:** +**Source code and bug reports on GitHub:** -**URL to use with the CurseForge packager:** -`https://repos.curseforge.com/wow/libflyable` +**URL to use with the CurseForge packager:** +`https://repos.curseforge.com/wow/libflyable` Only tagged releases are pushed to CurseForge, so using this URL will ensure the packager always gives you a tested and stable version of the library.