1
0
Bifurcation 0

Merging wow-db-get back into the trunk. This is where r255 had ended up.

Cette révision appartient à :
Nathanial.C.Jones 2012-09-25 22:17:03 +00:00
révision c9fe3f99cc
46 fichiers modifiés avec 3010 ajouts et 881 suppressions

Voir le fichier

@ -103,7 +103,7 @@ then
fi fi
sub="s/\\\$svnversion\\\$/${release_string}/g" sub="s/\\\$svnversion\\\$/${release_string}/g"
sub2='s/4\.0\.1/4\.3\.0/' sub2='s/4\.0\.1/5\.0\.5/'
for toc in `find . -iname "*.toc"` for toc in `find . -iname "*.toc"`
do do
echo Replacing version tag in ${toc}. echo Replacing version tag in ${toc}.
@ -128,7 +128,7 @@ done
echo ${release_string} echo ${release_string}
zip -qdgds 1m -r QuestHelper-4.3.0.${release_string}.zip QuestHelper/ QHData-* zip -qdgds 1m -r QuestHelper-5.0.5.${release_string}.zip QuestHelper/ QHData-*
echo Moving the package up one directory level. echo Moving the package up one directory level.
mv -v *.zip .. mv -v *.zip ..

Voir le fichier

@ -1,4 +1,4 @@
## Interface: 40300 ## Interface: 50001
## Title: QuestHelper Data (Base) ## Title: QuestHelper Data (Base)
## Author: zorbathut, smariot, vipersniper, nesher, nconantj ## Author: zorbathut, smariot, vipersniper, nesher, nconantj
## Notes: Contains the data needed by QuestHelper ## Notes: Contains the data needed by QuestHelper

Voir le fichier

@ -1,4 +1,4 @@
## Interface: 40300 ## Interface: 50001
## Title: QuestHelper Data (deDE) ## Title: QuestHelper Data (deDE)
## Author: zorbathut, smariot, vipersniper, nesher, nconantj ## Author: zorbathut, smariot, vipersniper, nesher, nconantj
## Notes: Contains the data needed by QuestHelper ## Notes: Contains the data needed by QuestHelper

Voir le fichier

@ -1,4 +1,4 @@
## Interface: 40300 ## Interface: 50001
## Title: QuestHelper Data (enUS) ## Title: QuestHelper Data (enUS)
## Author: zorbathut, smariot, vipersniper, nesher, nconantj ## Author: zorbathut, smariot, vipersniper, nesher, nconantj
## Notes: Contains the data needed by QuestHelper ## Notes: Contains the data needed by QuestHelper

Voir le fichier

@ -1,4 +1,4 @@
## Interface: 40300 ## Interface: 50001
## Title: QuestHelper Data (esES) ## Title: QuestHelper Data (esES)
## Author: zorbathut, smariot, vipersniper, nesher, nconantj ## Author: zorbathut, smariot, vipersniper, nesher, nconantj
## Notes: Contains the data needed by QuestHelper ## Notes: Contains the data needed by QuestHelper

Voir le fichier

@ -1,4 +1,4 @@
## Interface: 40300 ## Interface: 50001
## Title: QuestHelper Data (esMX) ## Title: QuestHelper Data (esMX)
## Author: zorbathut, smariot, vipersniper, nesher, nconantj ## Author: zorbathut, smariot, vipersniper, nesher, nconantj
## Notes: Contains the data needed by QuestHelper ## Notes: Contains the data needed by QuestHelper

Voir le fichier

@ -1,4 +1,4 @@
## Interface: 40300 ## Interface: 50001
## Title: QuestHelper Data (frFR) ## Title: QuestHelper Data (frFR)
## Author: zorbathut, smariot, vipersniper, nesher, nconantj ## Author: zorbathut, smariot, vipersniper, nesher, nconantj
## Notes: Contains the data needed by QuestHelper ## Notes: Contains the data needed by QuestHelper

Voir le fichier

@ -1,4 +1,4 @@
## Interface: 40300 ## Interface: 50001
## Title: QuestHelper Data (koKR) ## Title: QuestHelper Data (koKR)
## Author: zorbathut, smariot, vipersniper, nesher, nconantj ## Author: zorbathut, smariot, vipersniper, nesher, nconantj
## Notes: Contains the data needed by QuestHelper ## Notes: Contains the data needed by QuestHelper

Voir le fichier

@ -1,4 +1,4 @@
## Interface: 40300 ## Interface: 50001
## Title: QuestHelper Data (ruRU) ## Title: QuestHelper Data (ruRU)
## Author: zorbathut, smariot, vipersniper, nesher, nconantj ## Author: zorbathut, smariot, vipersniper, nesher, nconantj
## Notes: Contains the data needed by QuestHelper ## Notes: Contains the data needed by QuestHelper

Voir le fichier

@ -1,4 +1,4 @@
## Interface: 40300 ## Interface: 50001
## Title: QuestHelper Data (zhCN) ## Title: QuestHelper Data (zhCN)
## Author: zorbathut, smariot, vipersniper, nesher, nconantj ## Author: zorbathut, smariot, vipersniper, nesher, nconantj
## Notes: Contains the data needed by QuestHelper ## Notes: Contains the data needed by QuestHelper

Voir le fichier

@ -1,4 +1,4 @@
## Interface: 40300 ## Interface: 50001
## Title: QuestHelper Data (zhTW) ## Title: QuestHelper Data (zhTW)
## Author: zorbathut, smariot, vipersniper, nesher, nconantj ## Author: zorbathut, smariot, vipersniper, nesher, nconantj
## Notes: Contains the data needed by QuestHelper ## Notes: Contains the data needed by QuestHelper

Voir le fichier

@ -0,0 +1,3 @@
assert(QuestHelper and type(QuestHelper) == "table", "Ooops, can't load right now.")
QuestHelper.LibMapData = LibStub("LibMapData-1.0")

Voir le fichier

@ -1,4 +1,4 @@
## Interface: 40300 ## Interface: 50001
## Title: QuestHelper ## Title: QuestHelper
## Author: zorbathut, smariot, vipersniper, nesher, nconantj ## Author: zorbathut, smariot, vipersniper, nesher, nconantj
## Notes: Calculates an optimal route for you to follow while questing. ## Notes: Calculates an optimal route for you to follow while questing.
@ -62,13 +62,20 @@ libs\AceConfig-3.0\AceConfig-3.0.xml
bst_astrolabe.lua bst_astrolabe.lua
libs\AstrolabeQH\Load.xml libs\AstrolabeQH\Load.xml
#MapMonitor.lua
#AstroLabeToLibMapDataConversionStub.lua
bst_ctl.lua bst_ctl.lua
libs\ChatThrottleLib\ChatThrottleLib.xml libs\ChatThrottleLib\ChatThrottleLib.xml
bst_range.lua bst_range.lua
libs\LibRangeCheck-2.0\CallbackHandler-1.0\CallbackHandler-1.0.xml #-libs\LibRangeCheck-2.0\CallbackHandler-1.0\CallbackHandler-1.0.xml
libs\LibRangeCheck-2.0\LibRangeCheck-2.0.lua #-libs\LibRangeCheck-2.0\LibRangeCheck-2.0.lua
bst_mapdata.lua
libs\LibMapData-1.0\Libs\CallbackHandler-1.0
libs\LibMapData-1.0\library.lua
LibMapDataInit.lua
changes.lua changes.lua
@ -107,7 +114,7 @@ recycle.lua
pattern.lua pattern.lua
# Database module. Depends on nothing, calls no external functions. # Database module. Depends on nothing, calls no external functions.
db_get.lua #-db_get.lua
# Timeslice module. Depends on nothing, calls no external functions besides a few basic system-API things. # Timeslice module. Depends on nothing, calls no external functions besides a few basic system-API things.
timeslice.lua timeslice.lua
@ -122,30 +129,30 @@ manager_achievement.lua
manager_completed.lua manager_completed.lua
# Graph module. Depends on nothing, calls no external functions. # Graph module. Depends on nothing, calls no external functions.
graph_core.lua #-graph_core.lua
graph_flightpath.lua #-graph_flightpath.lua
# Routing module. Depends on Timeslice and Filters, calls almost no external functions (handles its own get-player-position stuff via RetrieveRawLocation, but that's it.) # Routing module. Depends on Timeslice and Filters, calls almost no external functions (handles its own get-player-position stuff via RetrieveRawLocation, but that's it.)
routing_debug.lua #-routing_debug.lua
routing_loc.lua #-routing_loc.lua
routing_route.lua #-routing_route.lua
routing_core.lua #-routing_core.lua
routing_controller.lua #-routing_controller.lua
# this segment uses the menu system as well # this segment uses the menu system as well
routing_hidden.lua #-routing_hidden.lua
# Filters. Pays attention to QH_pref but not a lot more. # Filters. Pays attention to QH_pref but not a lot more.
filter_core.lua #-filter_core.lua
filter_base.lua #-filter_base.lua
# New tooltip system. Depends on nothing, calls nothing besides WoW UI. # New tooltip system. Depends on nothing, calls nothing besides WoW UI.
tooltip.lua tooltip.lua
# Directors # Directors
# Quest module. Depends on Database, Routing, Patterns, Tooltip, and Event Manager, interfaces with WoW UI. # Quest module. Depends on Database, Routing, Patterns, Tooltip, and Event Manager, interfaces with WoW UI.
director_quest.lua #-director_quest.lua
director_achievement.lua #-director_achievement.lua
director_find.lua #-director_find.lua
# Map and minimap dodads. Old code. Depends on nothing, interfaces with WoW UI. # Map and minimap dodads. Old code. Depends on nothing, interfaces with WoW UI.
dodads.lua dodads.lua
@ -160,21 +167,21 @@ core.lua
radar.lua radar.lua
upgrade.lua #-upgrade.lua
main.lua main.lua
objective.lua objective.lua
quest.lua quest.lua
teleport.lua teleport.lua
pathfinding.lua #-pathfinding.lua
routing.lua routing.lua
custom.lua custom.lua
menu.lua menu.lua
nag.lua nag.lua
comm.lua comm.lua
mapbutton.lua #-mapbutton.lua
flightpath.lua flightpath.lua
tracker.lua #-tracker.lua
objtips.lua objtips.lua
textviewer.lua textviewer.lua
help.lua help.lua

Voir le fichier

@ -198,6 +198,7 @@ OnUpdate = function()
self:Show() self:Show()
local dist, dx, dy = QuestHelper.Astrolabe:ComputeDistance(QuestHelper.collect_rc, QuestHelper.collect_rz, QuestHelper.collect_rx, QuestHelper.collect_ry, active_point.c, active_point.z, active_point.x, active_point.y) local dist, dx, dy = QuestHelper.Astrolabe:ComputeDistance(QuestHelper.collect_rc, QuestHelper.collect_rz, QuestHelper.collect_rx, QuestHelper.collect_ry, active_point.c, active_point.z, active_point.x, active_point.y)
--print(QuestHelper.collect_rc, QuestHelper.collect_rz, QuestHelper.collect_rx, QuestHelper.collect_ry, active_point.c, active_point.z, active_point.x, active_point.y)
local text = "" local text = ""

Voir le fichier

@ -4,8 +4,8 @@ local GetTime = QuestHelper_GetTime
QuestHelper_File["collect.lua"] = "4.0.1.$svnversion$" QuestHelper_File["collect.lua"] = "4.0.1.$svnversion$"
QuestHelper_Loadtime["collect.lua"] = GetTime() QuestHelper_Loadtime["collect.lua"] = GetTime()
local --[[ static ]] MINSVNVERSION = 185 local --[[ static ]] MINSVNVERSION = 255
local --[[ static ]] PURGEDEV = false local --[[ static ]] PURGEDEV = true
local debug_output = false local debug_output = false
if QuestHelper_File["collect.lua"] == "Development Version" then debug_output = true end if QuestHelper_File["collect.lua"] == "Development Version" then debug_output = true end

Voir le fichier

@ -34,11 +34,11 @@ local invloc_lookup_proto = {
INVTYPE_2HWEAPON = {"MainHandSlot"}, INVTYPE_2HWEAPON = {"MainHandSlot"},
INVTYPE_WEAPONMAINHAND = {"MainHandSlot"}, INVTYPE_WEAPONMAINHAND = {"MainHandSlot"},
INVTYPE_WEAPONOFFHAND = {"SecondaryHandSlot"}, INVTYPE_WEAPONOFFHAND = {"SecondaryHandSlot"},
INVTYPE_HOLDABLE = {"RangedSlot"}, --INVTYPE_HOLDABLE = {"RangedSlot"},
INVTYPE_RANGED = {"RangedSlot"}, --INVTYPE_RANGED = {"RangedSlot"},
INVTYPE_THROWN = {"RangedSlot"}, --INVTYPE_THROWN = {"RangedSlot"},
INVTYPE_RANGEDRIGHT = {"RangedSlot"}, --INVTYPE_RANGEDRIGHT = {"RangedSlot"},
INVTYPE_RELIC = {"RangedSlot"}, --INVTYPE_RELIC = {"RangedSlot"},
} }
local invloc_lookup = {} local invloc_lookup = {}

Voir le fichier

@ -13,11 +13,63 @@ local function signed(c)
--return strchar(c) --return strchar(c)
end end
local dec2hex = {[0] = "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F"}
local hex2dec = {}
for k, v in pairs(dec2hex) do hex2dec[v] = k end
local function tohex(c)
return dec2hex[c]
end
local function lgToDec(c, pos)
if not c or c == "" then return 0 end
local ret = 0
pos = pos or 0
if pos == 0 then c = string.reverse(c) end
ret = todec(string.sub(c,1,1)) * math.pow(16, pos) + lgToDec(string.sub(c, 2), pos + 1)
return ret
end
local function lgToHex(c, pos)
local ret, rem, hex
pos = pos or 0
c = c or 0
local minVal = math.pow(16, pos)
local maxVal = math.pow(16, pos+1) - 1
if c > maxVal then
rem, hex = lgToHex(c, pos + 1)
else
rem, hex = c, ""
end
local mult = 0
while rem >= minVal do
mult = mult + 1
rem = rem - minVal
end
return rem, hex .. tohex(mult)
end
local function todec(c)
return hex2dec[c]
end
local function float(c) local function float(c)
-- if not c then c = -128 end -- if not c then c = -128 end
-- QuestHelper: Assert( c >= -128, string.format("c is too small. It is %s.", tostring(c))) -- QuestHelper: Assert( c >= -128, string.format("c is too small. It is %s.", tostring(c)))
-- QuestHelper: Assert( c < 128, string.format("c is too big. It is %s.", tostring(c))) -- QuestHelper: Assert( c < 128, string.format("c is too big. It is %s.", tostring(c)))
local ret = tostring(c):gsub(",",".") -- eliminate issues with locales that use a comma as the decimal separator. local ret = tohex(math.floor(128 * c))
return ret return ret
end end
@ -26,9 +78,10 @@ local function BolusizeLocation(delayed, c, z, x, y, dl, mid, mf, f)
-- x and y are floating-point values, generally between 0 and 1. We'll dedicate 24 bits to the fractional part, largely because we can. -- x and y are floating-point values, generally between 0 and 1. We'll dedicate 24 bits to the fractional part, largely because we can.
-- Overall we're using a weird 11 bytes on this. Meh. -- Overall we're using a weird 11 bytes on this. Meh.
-- Also, any nil values are being turned into MIN_WHATEVER. -- Also, any nil values are being turned into MIN_WHATEVER.
local float_x = float(x) local float_x = x
local float_y = float(y) local float_y = y
local loc = {} local loc = {}
--local locStr = (delayed and 1 or 0) .. lgToHex(mid) .. tohex(dl) .. float(x) .. float(y)
loc["delayed"] = (delayed and 1 or 0) loc["delayed"] = (delayed and 1 or 0)
loc["c"] = c loc["c"] = c
loc["z"] = z loc["z"] = z

Voir le fichier

@ -36,7 +36,7 @@ local function MembersUpdate()
--QuestHelper:TextOut("MU start") --QuestHelper:TextOut("MU start")
members = {} -- we burn a table every time this updates, but whatever members = {} -- we burn a table every time this updates, but whatever
members_count = 0 members_count = 0
if GetNumRaidMembers() > 0 then if IsInRaid() then
-- we is in a raid -- we is in a raid
for i = 1, 40 do for i = 1, 40 do
local ite = string.format("raid%d", i) local ite = string.format("raid%d", i)
@ -47,7 +47,7 @@ local function MembersUpdate()
--QuestHelper:TextOut(string.format("raid member %s added", UnitName(ite))) --QuestHelper:TextOut(string.format("raid member %s added", UnitName(ite)))
end end
end end
elseif GetNumPartyMembers() > 0 then elseif GetNumGroupMembers() > 0 then
-- we is in a party -- we is in a party
for i = 1, 4 do for i = 1, 4 do
local ite = string.format("party%d", i) local ite = string.format("party%d", i)
@ -531,9 +531,7 @@ local function LootOpened()
for i = 1, GetNumLootItems() do for i = 1, GetNumLootItems() do
tex, name, quant, qual, locked = GetLootSlotInfo(i) tex, name, quant, qual, locked = GetLootSlotInfo(i)
link = GetLootSlotLink(i) link = GetLootSlotLink(i)
local curr = LootSlotIsCurrency(i) local slotType = GetLootSlotType(i)
local coin = LootSlotIsCoin(i)
local itm = LootSlotIsItem(i)
if quant == 0 then if quant == 0 then
-- moneys -- moneys
@ -544,7 +542,7 @@ local function LootOpened()
tot = (tonumber(gold) or 0) * 10000 + (tonumber(silver) or 0) * 100 + (tonumber(copper) or 0) * 1 tot = (tonumber(gold) or 0) * 10000 + (tonumber(silver) or 0) * 100 + (tonumber(copper) or 0) * 1
items[PseudoIDs["gold"]] = tot items[PseudoIDs["gold"]] = tot
else else
if curr then if slotType == LOOT_SLOT_CURRENCY then
if not QHC.PseudoIDs[name] then if not QHC.PseudoIDs[name] then
QHC.PseudoIDsMin = QHC.PseudoIDsMin - 1 QHC.PseudoIDsMin = QHC.PseudoIDsMin - 1
QHC.PseudoIDs[name] = QHC.PseudoIDsMin QHC.PseudoIDs[name] = QHC.PseudoIDsMin
@ -553,9 +551,9 @@ local function LootOpened()
else else
if not link and not name then if not link and not name then
local msg = "Texture is " .. tostring(tex) .. " with a quantity of " .. tostring(quant) .. ", a quality of " .. qual .. "." local msg = "Texture is " .. tostring(tex) .. " with a quantity of " .. tostring(quant) .. ", a quality of " .. qual .. "."
if coin then if slotType == LOOT_SLOT_MONEY then
QuestHelper:Assert(false, "Loot slot " .. tostring(i) .. " is coin. " .. msg) QuestHelper:Assert(false, "Loot slot " .. tostring(i) .. " is coin. " .. msg)
elseif itm then elseif slotType == LOOT_SLOT_ITEM then
QuestHelper:Assert(false, "Loot slot " .. tostring(i) .. " is item. " .. msg) QuestHelper:Assert(false, "Loot slot " .. tostring(i) .. " is item. " .. msg)
else else
QuestHelper_ErrorCatcher_ExplicitError(false, "Loot slot " .. tostring(i) .. " is ???. " .. msg) QuestHelper_ErrorCatcher_ExplicitError(false, "Loot slot " .. tostring(i) .. " is ???. " .. msg)

Voir le fichier

@ -16,7 +16,8 @@ local classlookup = {
["ROGUE"] = "R", ["ROGUE"] = "R",
["SHAMAN"] = "S", ["SHAMAN"] = "S",
["WARLOCK"] = "L", ["WARLOCK"] = "L",
["WARRIOR"] = "W" ["WARRIOR"] = "W",
["MONK"] = "O"
}; };
local racelookup = { local racelookup = {
@ -32,7 +33,8 @@ local racelookup = {
["Tauren"] = "N", ["Tauren"] = "N",
["Undead"] = "U", ["Undead"] = "U",
["BloodElf"] = "B", ["BloodElf"] = "B",
["Goblin"] = "L" ["Goblin"] = "L",
["Pandaren"] = "P"
-- lol i spelled nub -- lol i spelled nub
} }
@ -46,7 +48,7 @@ local function GetSpecBolus()
--local bso = Bitstream.Output(8) --local bso = Bitstream.Output(8)
local talents = {} local talents = {}
local points = (GetUnspentTalentPoints() or 0) --local points = (GetUnspentTalentPoints() or 0)
local talents_learned = false local talents_learned = false
for t = 1, GetNumTalentTabs() do -- come on. Is this ever not going to be 3? Seriously? Perhaps someday, but not as of Cat. for t = 1, GetNumTalentTabs() do -- come on. Is this ever not going to be 3? Seriously? Perhaps someday, but not as of Cat.
local _, tab, _, _, p, _, _, yn = GetTalentTabInfo(t) local _, tab, _, _, p, _, _, yn = GetTalentTabInfo(t)

Voir le fichier

@ -9,6 +9,6 @@ QuestHelper.Astrolabe = QH_Astrolabe_Ready and DongleStub("Astrolabe-0.4-QuestHe
local walker = QuestHelper:CreateWorldMapWalker() local walker = QuestHelper:CreateWorldMapWalker()
QuestHelper.minimap_marker = QuestHelper:CreateMipmapDodad() QuestHelper.minimap_marker = QuestHelper:CreateMipmapDodad()
QH_Route_RegisterNotification(function (route) walker:RouteChanged(route) end) --QH_Route_RegisterNotification(function (route) walker:RouteChanged(route) end)
QH_Route_RegisterNotification(function (route) QH_Tracker_UpdateRoute(route) end) --QH_Route_RegisterNotification(function (route) QH_Tracker_UpdateRoute(route) end)
QH_Route_RegisterNotification(function (route) QuestHelper.minimap_marker:SetObjective(route[2]) end) --QH_Route_RegisterNotification(function (route) QuestHelper.minimap_marker:SetObjective(route[2]) end)

Voir le fichier

@ -308,8 +308,8 @@ local elders = {
["Silvervein"] = "Loch Modan 33 46", ["Silvervein"] = "Loch Modan 33 46",
["Ironband"] = "Searing Gorge 21 79", ["Ironband"] = "Searing Gorge 21 79",
["Obsidian"] = "Silverpine Forest 45 41", ["Obsidian"] = "Silverpine Forest 45 41",
["Starglade"] = "Stranglethorn Vale 63 22", -- Jungle 71 34 ["Starglade"] = "Northern Stranglethorn 71 34",
["Winterhoof"] = "Stranglethorn Vale 37 79", -- Cape 39 72 ["Winterhoof"] = "The Cape of Stranglethorn 39 72", -- Cape 39 72
["Graveborn"] = "Tirisfal Glades 61 53", ["Graveborn"] = "Tirisfal Glades 61 53",
["Moonstrike"] = "Western Plaguelands 69 73", ["Moonstrike"] = "Western Plaguelands 69 73",
["Meadowrun"] = "Western Plaguelands 63 36", ["Meadowrun"] = "Western Plaguelands 63 36",
@ -334,7 +334,18 @@ local elders = {
["Muraco"] = "Storm Peaks 64 51", ["Muraco"] = "Storm Peaks 64 51",
["Stonebeard"] = "Storm Peaks 31 38", ["Stonebeard"] = "Storm Peaks 31 38",
["Tauros"] = "Zul'Drak 59 56" ["Tauros"] = "Zul'Drak 59 56"
} },
["Cataclysm"] = {
["Moonlance"] = "Shimmering Expanse 57, 86", -- Biel'aran Ridge, Shimmering Expanse
["Windsong"] = "Mount Hyjal 27 62", -- Sanctuary of Malorne, Hyjal
["Evershade"] = "Mount Hyjal 63 23", -- Nordrassil, Hyjal
["Stonebrand"] = "Deepholm 50 55", -- Temple of Earth, Deepholm
["Deepforge"] = "Deepholm 28 69", -- Stonehearth, Deepholm
["Menkhaf"] = "Uldum 66 19", -- Khartut's Tomb, Uldum
["Sekhemi"] = "Uldum 32 63", -- Ruins of Ammon, Uldum
["Firebeard"] = "Twilight Highlands 51 71", -- Dunward Town Square, Dunward Ruins, Twilight Highlands
["Darkfeather"] = "Twilight Highlands 52 33" -- Thundermar Ruins, Twilight Highlands
},
} }
local function searchItem(input, yield_countdown, yield_countdown_max) local function searchItem(input, yield_countdown, yield_countdown_max)

Voir le fichier

@ -122,6 +122,12 @@ end
function DB_HasItem(group, id) function DB_HasItem(group, id)
QuestHelper: Assert(initted) QuestHelper: Assert(initted)
if group == "quest" then
if type(id) == "number" and id > 0 then return true
else return false
end
end
for _, db in ipairs(QHDB) do for _, db in ipairs(QHDB) do
if db[group] then if db[group] then
@ -137,6 +143,159 @@ function DB_HasItem(group, id)
return false return false
end end
local function GetBlizzardQuestInfoFrameMainLoop(qid)
local POIFrame, questFrame
QuestMapUpdateAllQuests()
QuestPOIUpdateIcons()
WorldMapFrame_UpdateQuests()
for i = 1, MAX_NUM_QUESTS do
questFrame = _G["WorldMapQuestFrame" .. i]
if questFrame then
if questFrame.questId == qid then
POIFrame = questFrame.poiIcon
break
end
end
end
return questFrame, POIFrame
end
local function GetBlizzardQuestInfoFrame(qid, map)
if map then SetMapByID(map) end
QuestMapUpdateAllQuests()
QuestPOIUpdateIcons()
WorldMapFrame_UpdateQuests()
local POIFrame
local questFrame
local dLvl
if map and GetNumDungeonMapLevels() > 0 then -- Suspicion is that each dungeon level has to be iterated.
for i = 1, GetNumDungeonMapLevels() do
SetDungeonMapLevel(i)
questFrame, POIFrame = GetBlizzardQuestInfoFrameMainLoop(qid)
if POIFrame then
dLvl = i
break
end
end
else -- Only need to call once
questFrame, POIFrame = GetBlizzardQuestInfoFrameMainLoop(qid)
end
return questFrame, POIFrame, dLvl or 0
end
local function GetBlizzardQuestInfo(qid)
local questFrame, POIFrame, qdLvl = GetBlizzardQuestInfoFrame(qid)
local mapId = GetCurrentMapAreaID()
local c, z
local dLvl = false
local qMapId
if GetNumDungeonMapLevels() > 0 then dLvl = GetCurrentMapDungeonLevel() end
if not POIFrame then
-- Iterate over all maps to try and find it (we are of course assuming that the player has the quest, otherwise we will be SOL.
local maps = QuestHelper.LibMapData:GetAllMapIDs()
for _, map in pairs(maps) do
if map >= 0 and not QuestHelper.LibMapData:IsContinentMap(map) then
questFrame, POIFrame, qdLvl = GetBlizzardQuestInfoFrame(qid, map)
if POIFrame then
qMapId = map
break
end
end
end
c, z = GetCurrentMapContinent(), GetCurrentMapZone()
SetMapByID(mapId)
if not POIFrame then return nil end -- At this point we either have the quest or we are SOL.
else
qMapId = mapId
c, z = GetCurrentMapContinent(), GetCurrentMapZone()
end
local _, _, _, x, y = POIFrame:GetPoint()
if not x or not y then return nil end
local frame = WorldMapDetailFrame
local width, height = frame:GetWidth(), frame:GetHeight()
local wm_scale, poi_scale = frame:GetScale(), POIFrame:GetScale()
-- Convert from yards to %
local cx = ((x / (wm_scale / poi_scale)) / width)
local cy = ((-y / (wm_scale / poi_scale)) / height)
if cx < 0 or cx > 1 or cy < 0 or cy > 1 then return nil end
-- Now we want to convert to proper format for QH.
-- Look at WoWPro:findBlizzCoords(qid) for remainder
local _, contX, contY = QuestHelper.Astrolabe:GetAbsoluteContinentPosition(c, z, cx, cy)
--contX, contY = contX / QuestHelper.Astrolabe:GetZoneWidth(c, 0), contY / QuestHelper.Astrolabe:GetZoneHeight(c, 0)
local solid = { ["continent"] = c, contX - 10, contY - 10, contX + 10, contY - 10, contX + 10, contY + 10, contX - 10, contY + 10 }
local ret = {}
ret.solid = solid
ret.criteria = {}
local questIdx = GetQuestLogIndexByID(qid)
local numCrit = GetNumQuestLeaderBoards(questIdx)
local loc = { ["loc"] = { { ["p"] = qMapId, ["x"] = contX, ["y"] = contY} } }
for i = 1, numCrit do
table.insert(ret.criteria, loc)
end
ret.name = GetQuestLogTitle(questIdx)
ret.Blizzard = true
return ret
end
local function GetLightHeadedQuestInfo(qid)
if not LightHeaded or type(LightHeaded) ~= "table" then return nil end -- LH not loaded
local npcid, npcname, stype
local coords = {}
_, _, _, _, _, _, _, stype, npcname, npcid = LightHeaded:GetQuestInfo(qid)
-- Note: If we want the quest giver, we need fields 5, 6 and 7 above, rather than what we have gotten.
--
if stype == "npc" then
local data = LightHeaded:LoadNPCData(tonumber(npcid))
if not data then return end -- LightHeaded has no clue about the given NPC, despite giving us the id.
for zid,x,y in data:gmatch("([^,]+),([^,]+),([^:]+):") do
table.insert(coords, {["p"] = zid, ["x"] = x, ["y"] = y})
end
end
--can't return coordinates until we know more about what we are getting and then convert accordingly.
for k, v in pairs(coords) do for k1, v1 in pairs(v) do print(k, k1, v1) end end
--return coords
return nil
end
local function GetSelfQuestInfo(qid)
return nil
end
-- Returns x and y in yards relative to something... Continent?
local function GetQuestInfo(qid)
assert(type(qid) == "number")
local coords = GetSelfQuestInfo(qid)
--if not coords then coords = GetLightHeadedQuestInfo(qid) end
if not coords then
coords = GetBlizzardQuestInfo(qid)
end
return coords -- Might still be nil, but if we don't have anything from Blizz, prolly nothing can be done.
end
function DB_GetItem(group, id, silent, register) function DB_GetItem(group, id, silent, register)
QuestHelper: Assert(initted) QuestHelper: Assert(initted)
@ -145,6 +304,15 @@ function DB_GetItem(group, id, silent, register)
QuestHelper: Assert(id, string.format("%s %s", tostring(group), tostring(id))) QuestHelper: Assert(id, string.format("%s %s", tostring(group), tostring(id)))
local ite = DBC_Get(group, id) local ite = DBC_Get(group, id)
if not ite and group == "flightpaths" then return nil end
if not ite and group == "quest" then
-- Loop over zones AND floors
-- see QuestRouterLite.lua for specific calls.
-- In the end, the item returned MUST be "formatted" the same as a true QHDB item.
ite = GetQuestInfo(id)
end
if not ite then if not ite then
if type(id) == "string" then QuestHelper: Assert(not id:match("__.*")) end if type(id) == "string" then QuestHelper: Assert(not id:match("__.*")) end
@ -232,7 +400,9 @@ function DB_ReleaseItem(ite)
if frequencies[ite] == 0 then if frequencies[ite] == 0 then
--print("incinerating", freq_group[ite], freq_id[ite]) --print("incinerating", freq_group[ite], freq_id[ite])
cache[freq_group[ite]][freq_id[ite]] = nil if cache[freq_group[ite]] then
cache[freq_group[ite]][freq_id[ite]] = nil
end
freq_group[ite] = nil freq_group[ite] = nil
freq_id[ite] = nil freq_id[ite] = nil

Voir le fichier

@ -289,20 +289,12 @@ function GetAchievementMetaObjective(achievement)
if data.chunk then if data.chunk then
ttx.solid = horribledupe(data.chunk.solid) ttx.solid = horribledupe(data.chunk.solid)
if data.chunk.loc then for _, v in ipairs(data.chunk.loc) do if data.chunk.loc then for _, v in ipairs(data.chunk.loc) do
-- Ugly database hack
if v.p == 26 then v.p = 48 end
if v.p == 38 then v.p = 168 end
-- end hack
table.insert(ttx, {loc = {x = v.x, y = v.y, c = QuestHelper_ParentLookup[v.p], p = v.p}}) table.insert(ttx, {loc = {x = v.x, y = v.y, c = QuestHelper_ParentLookup[v.p], p = v.p}})
end end end end
end end
if data.loc then if data.loc then
ttx.solid = data.solid ttx.solid = data.solid
-- Ugly database hack
if data.loc.p == 26 then data.loc.p = 48 end
if data.loc.p == 38 then data.loc.p = 168 end
-- end hack
table.insert(ttx, {loc = {x = data.loc.x, y = data.loc.y, c = QuestHelper_ParentLookup[data.loc.p], p = data.loc.p}}) table.insert(ttx, {loc = {x = data.loc.x, y = data.loc.y, c = QuestHelper_ParentLookup[data.loc.p], p = data.loc.p}})
end end

Voir le fichier

@ -71,10 +71,6 @@ local function generate_objective(dbi)
for _, v in ipairs(dbi.loc) do for _, v in ipairs(dbi.loc) do
QuestHelper: Assert(QuestHelper_ParentLookup) QuestHelper: Assert(QuestHelper_ParentLookup)
QuestHelper: Assert(QuestHelper_ParentLookup[v.p], v.p) QuestHelper: Assert(QuestHelper_ParentLookup[v.p], v.p)
-- Ugly database hack
if v.p == 26 then v.p = 48 end
if v.p == 38 then v.p = 168 end
-- end hack
table.insert(clooster, {loc = {x = v.x, y = v.y, c = QuestHelper_ParentLookup[v.p], p = v.p}, cluster = clooster, tracker_hidden = true, why = why, map_desc = {QuestHelper:HighlightText(dbi.name)}, tracker_desc = dbi.name, map_suppress_ignore = true, map_custom_menu = function (menu) QuestHelper:CreateMenuItem(menu, QHText("FIND_REMOVE")):SetFunction(function () QH_Route_ClusterRemove(clooster) end) end}) table.insert(clooster, {loc = {x = v.x, y = v.y, c = QuestHelper_ParentLookup[v.p], p = v.p}, cluster = clooster, tracker_hidden = true, why = why, map_desc = {QuestHelper:HighlightText(dbi.name)}, tracker_desc = dbi.name, map_suppress_ignore = true, map_custom_menu = function (menu) QuestHelper:CreateMenuItem(menu, QHText("FIND_REMOVE")):SetFunction(function () QH_Route_ClusterRemove(clooster) end) end})
end end
@ -140,124 +136,214 @@ local function QH_FindLoc(locd)
end end
local elders = { local elders = {
["Alliance"] = { ["Alliance"] = { -- Achievement 915
["Bladeswift"] = {21, 39, 32}, --"Darnassus 39 32", ["Bladeswift"] = {381, 39, 32, 8718, 1999}, --"Darnassus 39 32",
["Bronzebeard"] = {25, 29, 16}, --"Ironforge 29 16", ["Bronzebeard"] = {341, 29, 16, 8866, 1997}, --"Ironforge 29 16",
["Hammershout"] = {37, 2, 10}, --"Elwynn Forest 34 50" ["Hammershout"] = { 30, 2, 10, 8646, 1998}, --"Elwynn Forest 34 50"
}, },
["Horde"] = { ["Horde"] = { -- Achievement 914
["Darkhorn"] = {1, 52, 60}, --"Orgrimmar 52 60", ["Darkhorn"] = {321, 52, 60, 8677, 1991}, --"Orgrimmar 52 60",
["Wheathoof"] = {23, 73.0, 23.3}, --"Thunder Bluff 73.0 23.3", ["Wheathoof"] = {362, 73.0, 23.3, 8678, 1993}, --"Thunder Bluff 73.0 23.3",
["Darkcore"] = {45, 67, 38}, --"Undercity 67 38" ["Darkcore"] = {382, 67, 38, 8648, 1992}, --"Undercity 67 38"
}, },
["Kalimdor"] = { ["Kalimdor"] = { -- Achievement 911
["Riversong"] = {2, 35.5, 48.9}, --"Ashenvale 35.5 48.9", ["Bladeleaf"] = { 41, 56.8, 53.1, 8715, 1951}, --"Teldrassil 56.8 53.1",
["Skygleam"] = {15, 64.8, 79.3}, --"Azshara 64.8 79.3", ["Bladesing"] = {261, 53, 35, 8719, 1966}, --"Silithus 53 35",
["High Mountain"] = {203, 41.5, 47.5}, --"Southern Barrens 41.5 47.5", ["Bloodhoof"] = { 9, 48, 53, 8673, 1953}, --"Mulgore 48 53",
["Moonwarden"] = {11, 48.5, 59.2}, --"Northern Barrens 48.5 59.2", ["Brightspear"] = {281, 53.0, 56.7, 8726, 1963}, --"Winterspring 53.0 56.7",
["Windtotem"] = {11, 68.4, 70}, --"Northern Barrens 68.4 70", ["Dreamseer"] = {161, 50, 28, 8684, 1961}, --"Tanaris 50 28",
["Starweave"] = {16, 49.5, 19.0}, --"Darkshore 49.5 19.0", NOTE TO SELF -- CONVERTING TO LOOKUP VALUES DON'T FORGET TO CHANGE THE FUNCTION!!!!!!! ["Grimtotem"] = {121, 76.7, 37.9, 8679, 1955}, --"Feralas 76.7 37.9",
["Runetotem"] = {7, 53.2, 43.6}, --"Durotar 53.2 43.6", ["High Mountain"] = {607, 41.5, 47.5, 8686, 1919}, --"Southern Barrens 41.5 47.5",
["Nightwind"] = {13, 38.3, 52.9}, --"Felwood 38.3 52.9", ["Mistwalker"] = {121, 62.6, 31.1, 8685, 1956}, --"Feralas 62.6 31.1",
["Grimtotem"] = {17, 76.7, 37.9}, --"Feralas 76.7 37.9", ["Moonwarden"] = { 11, 48.5, 59.2, 8717, 1918}, --"Northern Barrens 48.5 59.2",
["Mistwalker"] = {17, 62.6, 31.1}, --"Feralas 62.6 31.1", ["Morningdew"] = { 61, 77.0, 75.6, 8724, 1959}, --"Thousand Needles 77.0 75.6",
["Bloodhoof"] = {22, 48, 53}, --"Mulgore 48 53", ["Nightwind"] = {182, 38.3, 52.9, 8723, 1957}, --"Felwood 38.3 52.9",
["Bladesing"] = {5, 53, 35}, --"Silithus 53 35", ["Primestone"] = {261, 30.7, 13.3, 8654, 1965}, --"Silithus 30.7 13.3",
["Primestone"] = {5, 30.7, 13.3}, --"Silithus 30.7 13.3", ["Ragetotem"] = {161, 36, 80, 8671, 1960}, --"Tanaris 36 80",
["Dreamseer"] = {8, 50, 28}, --"Tanaris 50 28", ["Riversong"] = { 43, 35.5, 48.9, 8725, 1954}, --"Ashenvale 35.5 48.9",
["Ragetotem"] = {8, 36, 80}, --"Tanaris 36 80", ["Runetotem"] = { 4, 53.2, 43.6, 8670, 1916}, --"Durotar 53.2 43.6",
["Bladeleaf"] = {24, 56.8, 53.1}, --"Teldrassil 56.8 53.1", ["Skygleam"] = {181, 64.8, 79.3, 8720, 1917}, --"Azshara 64.8 79.3",
["Skyseer"] = {14, 46.3, 51.0}, --"Thousand Needles 46.3 51.0", ["Skyseer"] = { 61, 46.3, 51.0, 8682, 1958}, --"Thousand Needles 46.3 51.0",
["Morningdew"] = {14, 77.0, 75.6}, --"Thousand Needles 77.0 75.6", ["Starweave"] = { 42, 49.5, 19.0, 8721, 1952}, --"Darkshore 49.5 19.0",
["Thunderhorn"] = {18, 51, 75}, --"Un'Goro Crater 51 75", ["Stonespire"] = {281, 60.0, 50.0, 8672, 1964}, --"Winterspring 60.0 50.0",
["Brightspear"] = {19, 53.0, 56.7}, --"Winterspring 53.0 56.7", ["Thunderhorn"] = {201, 51, 75, 8681, 1962}, --"Un'Goro Crater 51 75",
["Stonespire"] = {19, 60.0, 50.0}, --"Winterspring 60.0 50.0", ["Windtotem"] = { 11, 68.4, 70, 8680, 1920}, --"Northern Barrens 68.4 70",
}, },
["Eastern Kingdoms"] = { ["Eastern Kingdoms"] = { -- Achievement 912
["Bellowrage"] = {33, 54, 49}, --"Blasted Lands 54 49", ["Bellowrage"] = {19, 54, 49, 8647}, --"Blasted Lands 54 49",
["Rumblerock"] = {40, 70, 45}, --"Burning Steppes 70 45", ["Rumblerock"] = {29, 70, 45, 8636}, --"Burning Steppes 70 45",
["Dawnstrider"] = {40, 53, 24}, --"Burning Steppes 53 24", ["Dawnstrider"] = {29, 53, 24, 8683}, --"Burning Steppes 53 24",
["Goldwell"] = {28, 53.9, 49.9}, --"Dun Morogh 53 49", ["Goldwell"] = {27, 53.9, 49.9, 8653}, --"Dun Morogh 53 49",
["Windrun"] = {34, 35.6, 68.8}, --"Eastern Plaguelands 35 68", ["Windrun"] = {23, 35.6, 68.8, 8688}, --"Eastern Plaguelands 35 68",
["Snowcrown"] = {34, 75.7, 54.5}, --"Eastern Plaguelands 75.7 54.5", ["Snowcrown"] = {23, 75.7, 54.5, 8650}, --"Eastern Plaguelands 75.7 54.5",
["Stormbrow"] = {37, 40, 63}, --"Elwynn Forest 40 63", ["Stormbrow"] = {30, 40, 63, 8649}, --"Elwynn Forest 40 63",
["Highpeak"] = {42, 50, 48}, --"Hinterlands 50 48", ["Highpeak"] = {26, 50, 48, 8643}, --"Hinterlands 50 48",
["Silvervein"] = {29, 33, 46}, --"Loch Modan 33 46", ["Silvervein"] = {35, 33, 46, 8642}, --"Loch Modan 33 46",
["Ironband"] = {32, 21, 79}, --"Searing Gorge 21 79", ["Ironband"] = {28, 21, 79, 8651}, --"Searing Gorge 21 79",
["Obsidian"] = {35, 45, 41}, --"Silverpine Forest 45 41", ["Obsidian"] = {21, 45, 41, 8645}, --"Silverpine Forest 45 41",
["Starglade"] = {38, 63, 22}, --"Stranglethorn Vale 63 22", -- Jungle 71 34 ["Starglade"] = {37, 71, 34, 8716}, --"Northern Stranglethorn 71 34"
["Winterhoof"] = {38, 37, 39}, --"Stranglethorn Vale 37 79", -- Cape 39 72 ["Winterhoof"] = {673, 39, 72, 8674}, --"The Cape of Stranglethorn 39 72"
["Graveborn"] = {43, 61, 53}, --"Tirisfal Glades 61 53", ["Graveborn"] = {20, 61, 53, 8652}, --"Tirisfal Glades 61 53",
["Moonstrike"] = {50, 69, 73}, --"Western Plaguelands 69 73", ["Moonstrike"] = {22, 69, 73, 8714}, --"Western Plaguelands 69 73",
["Meadowrun"] = {50, 63.5, 36.2}, --"Western Plaguelands 63 36", ["Meadowrun"] = {22, 63.5, 36.2, 8722}, --"Western Plaguelands 63 36",
["Skychaser"] = {49, 56, 47}, --"Westfall 56 47" ["Skychaser"] = {39, 56, 47, 8675}, --"Westfall 56 47"
}, },
["Northrend"] = { ["Northrend"] = { -- Achievement 1396
["Arp"] = {65, 57, 44}, --"Borean Tundra 57 44", ["Arp"] = {486, 57, 44, 13033, 5145}, --"Borean Tundra 57 44",
["Northal"] = {65, 34, 34}, --"Borean Tundra 34 34", ["Northal"] = {486, 34, 34, 13016, 5146}, --"Borean Tundra 34 34",
["Pamuya"] = {65, 43, 50}, --"Borean Tundra 43 50", ["Pamuya"] = {486, 43, 50, 13029, 5157}, --"Borean Tundra 43 50",
["Sardis"] = {65, 59, 66}, --"Borean Tundra 59 66", ["Sardis"] = {486, 59, 66, 13012, 5141}, --"Borean Tundra 59 66",
["Morthie"] = {68, 30, 56}, --"Dragonblight 30 56", ["Morthie"] = {488, 30, 56, 13014, 5143}, --"Dragonblight 30 56",
["Skywarden"] = {68, 35, 48}, --"Dragonblight 35 48", ["Skywarden"] = {488, 35, 48, 13031, 5159}, --"Dragonblight 35 48",
["Thoim"] = {68, 49, 78}, --"Dragonblight 49 78", ["Thoim"] = {488, 49, 78, 13019, 5154}, --"Dragonblight 49 78",
["Beldak"] = {69, 61, 28}, --"Grizzly Hills 61 28", ["Beldak"] = {490, 61, 28, 13013, 5142}, --"Grizzly Hills 61 28",
["Lunaro"] = {69, 81, 37}, --"Grizzly Hills 81 37", ["Lunaro"] = {490, 81, 37, 13025, 5149}, --"Grizzly Hills 81 37",
["Whurain"] = {69, 64, 47}, --"Grizzly Hills 64 47", ["Whurain"] = {490, 64, 47, 13030, 5158}, --"Grizzly Hills 64 47",
["Bluewolf"] = {74, 49, 14}, --"Wintergrasp 49 14", ["Bluewolf"] = {501, 49, 14, 13026, 5150}, --"Wintergrasp 49 14",
["Sandrene"] = {72, 50, 64}, --"Sholazar Basin 50 64", ["Sandrene"] = {493, 50, 64, 13018, 5147}, --"Sholazar Basin 50 64",
["Wanikaya"] = {72, 64, 49}, --"Sholazar Basin 64 49", ["Wanikaya"] = {493, 64, 49, 13024, 5148}, --"Sholazar Basin 64 49",
["Fargal"] = {73, 29, 74}, --"Storm Peaks 29 74", ["Fargal"] = {495, 29, 74, 13015, 5144}, --"Storm Peaks 29 74",
["Graymane"] = {73, 41, 85}, --"Storm Peaks 41 85", ["Graymane"] = {495, 41, 85, 13028, 5155}, --"Storm Peaks 41 85",
["Muraco"] = {73, 64, 51}, --"Storm Peaks 64 51", ["Muraco"] = {495, 64, 51, 13032, 5160}, --"Storm Peaks 64 51",
["Stonebeard"] = {73, 31, 38}, --"Storm Peaks 31 38", ["Stonebeard"] = {495, 31, 38, 13020, 5156}, --"Storm Peaks 31 38",
["Tauros"] = {75, 59, 56}, --"Zul'Drak 59 56" ["Tauros"] = {496, 59, 56, 13027, 5151}, --"Zul'Drak 59 56"
},
["Cataclysm"] = { -- Achievement 6006
["Moonlance"] = {615, 57, 86, 29738, 18154}, -- Biel'aran Ridge, Shimmering Expanse
["Windsong"] = {606, 27, 62, 29739, 18156}, -- Sanctuary of Malorne, Hyjal
["Evershade"] = {606, 63, 23, 29740, 18155}, -- Nordrassil, Hyjal
["Stonebrand"] = {640, 50, 55, 29735, 18157}, -- Temple of Earth, Deepholm
["Deepforge"] = {640, 28, 69, 29734, 18158}, -- Stonehearth, Deepholm
["Menkhaf"] = {720, 66, 19, 29742, 18159}, -- Khartut's Tomb, Uldum
["Sekhemi"] = {720, 32, 63, 29741, 18160}, -- Ruins of Ammon, Uldum
["Firebeard"] = {700, 51, 71, 29737, 18161}, -- Dunward Town Square, Dunward Ruins, Twilight Highlands
["Darkfeather"] = {700, 52, 33, 29736, 18162} -- Thundermar Ruins, Twilight Highlands
},
--[===[ Placeholder for Elders of the Dungeons. If enabled prior to 2013, stored coordinates should be the map ID of the zone where the instance is located and the coordinates of the entrance. With any luck, by 2013 dungeons will be mapable. Coordinates listed in comment after each elder need to have floor numbers determined, where necessary, ASAP.
["Dungeons"] = { -- Achievement 910
["Wildmane"] = {,,,8676, 1910}, -- Zul'Farrak 34.52 39.35
["Splitrock"] = {,,,8635, 1912}, -- Maraudon 51.47, 93.7
["Morndeep"] = {,,,8619, 1914}, -- Blackrock Depths 50.52 62.97
["Jarten"] = {,,,13017, 5259}, -- Utgarde Keep 47.4, 69.54
["Nurgen"] = {,,,13022, 5261}, -- Azjol-Nerub 21.78 43.62
["Ohanzee"] = {,,,13065, 5263}, -- Gundrak 45.7 61.55
["Chogan'gada"] = {,,,13067, 5265}, -- Utgarde Pinnacle 47.71 22.99
["Starsong"] = {,,,8713, 1911}, -- Sunken Temple 62.92 34.46
["Stonefort"] = {,,,8644, 1913}, -- Blackrock Spire 61.82 40
["Farwhisper"] = {,,,8727, 1915}, -- Stratholme 78.62 22.14
["Igasho"] = {,,,13021, 5260}, -- The Nexus 55.18 64.74
["Kilias"] = {,,,13023, 5262}, -- Drak'tharon Keep 68.85 79.17
["Yurauk"] = {,,,13066, 5264} -- Halls of Stone 29.39 62.03
} }
--]===]
} }
local function QH_FindElders(elder_or_achievement, all_elders) trackedElders = {}
local function UpdateElders()
local elder, elderinfo
local qid = GetQuestID()
for elder, elderinfo in pairs(trackedElders) do
local z, x, y, id = unpack(elderinfo)
if id == qid then
QH_FindCoord(x, y, z, elder)
trackedElders[elder] = nil
return
end
end
end
QH_Event("QUEST_COMPLETE", UpdateElders)
local function QH_FindElders(elder_or_achievement, all_elders, forAchievement)
if elder_or_achievement == "CLEAR" then
for elder, elderinfo in pairs(trackedElders) do
local z, x, y = unpack(elderinfo)
QH_FindCoord(x, y, z, elder)
end
trackedElders = {}
return
end
local achievement_match, elder_match = false, false local achievement_match, elder_match = false, false
local elderCount = 0
for achievement, eldrs in pairs(elders) do for achievement, eldrs in pairs(elders) do
if not all_elders then if not all_elders then
if elder_or_achievement == string.upper(achievement) then achievement_match = true end if elder_or_achievement == string.upper(achievement) then achievement_match = true end
end end
for elder, elder_loc in pairs(eldrs) do for elder, elder_info in pairs(eldrs) do
if not all_elders then local locz, locx, locy, qid, aid = unpack(elder_info)
if achievement_match then -- just add it local okToAdd = true
local locz, locx, locy = unpack(elder_loc) if forAchievement then
if aid then
local _, _, completed = GetAchievementCriteriaInfo(aid)
if completed then okToAdd = false end
end
elseif qid and QHQuestsCompleted and QHQuestsCompleted[qid] then
okToAdd = false
end
if okToAdd then
if not all_elders then
if achievement_match then -- just add it
QH_FindCoord(locx, locy, locz, elder)
if trackedElders[elder] then trackedElders[elder] = nil
else
trackedElders[elder] = elder_info
elderCount = elderCount + 1
end
elseif elder_or_achievement == string.upper(elder) then -- We have input and it's not an achievement, so it must be an elder.
elder_match = true
QH_FindCoord(locx, locy, locz, elder)
if trackedElders[elder] then trackedElders[elder] = nil
else
trackedElders[elder] = elder_info
elderCount = elderCount + 1
end
break -- We've found him or her.
end -- No need for else here. We alread know we don't need everything so we either have an achievement or we have an elder.
else -- We came in without an input, therefore we add all.
QH_FindCoord(locx, locy, locz, elder) QH_FindCoord(locx, locy, locz, elder)
elseif elder_or_achievement == string.upper(elder) then -- We have input and it's not an achievement, so it must be an elder. if trackedElders[elder] then trackedElders[elder] = nil
elder_match = true else
local locz, locx, locy = unpack(elder_loc) trackedElders[elder] = elder_info
QH_FindCoord(locx, locy, locz, elder) elderCount = elderCount + 1
break -- We've found him or her. end
end -- No need for else here. We alread know we don't need everything so we either have an achievement or we have an elder. end
else -- We came in without an input, therefore we add all.
local locz, locx, locy = unpack(elder_loc)
QH_FindCoord(locx, locy, locz, elder)
end end
end end
if achievement_match or elder_match then break end -- We've done our match. if achievement_match or elder_match then break end -- We've done our match.
end end
if elderCount == 0 then QuestHelper:TextOut("No elders were added.") end
end end
function QH_FindName(name) function QH_FindName(name)
local locd = name:match("^loc (.+)") local locd = name:match("^loc (.+)")
local elder_loc local forAchievement = false, elder_loc, temp
if not locd then if not locd then
if name:find("^elders?") then if name:find("^elders?") then
elder_loc = name:match("elders? (.+)") if name:find("^elders? achievement") then
if not elder_loc then elder_loc = true end forAchievement = true
elder_loc = name:match("elders? achievement (.+)")
else
elder_loc = name:match("elders? (.+)")
end
end end
end end
if locd then if locd then
QH_FindLoc(locd) QH_FindLoc(locd)
elseif elder_loc then elseif elder_loc then
if elder_loc == true then QH_FindElders(nil, true) if elder_loc == true then QH_FindElders(nil, true, forAchievement)
else QH_FindElders(string.upper(elder_loc)) else QH_FindElders(string.upper(elder_loc), false, forAchievement)
end end
else else
if not DB_Ready() then if not DB_Ready() then
@ -286,10 +372,6 @@ function QH_FindName(name)
--[[ assert(dbi) ]] --[[ assert(dbi) ]]
if dbi.loc then if dbi.loc then
-- Ugly database hack
if dbi.loc.p == 26 then dbi.loc.p = 48 end
if dbi.loc.p == 38 then dbi.loc.p = 168 end
-- end hack
table.insert(found_db, dbi) table.insert(found_db, dbi)
if has_name[dbi.name] then needs_postfix[dbi.name] = true end if has_name[dbi.name] then needs_postfix[dbi.name] = true end

Voir le fichier

@ -48,10 +48,6 @@ local function AppendObjlinks(target, source, tooltips, icon, last_name, map_lin
for m, v in ipairs(source.loc) do for m, v in ipairs(source.loc) do
QuestHelper: Assert(target) QuestHelper: Assert(target)
QuestHelper: Assert(QuestHelper_ParentLookup) QuestHelper: Assert(QuestHelper_ParentLookup)
-- Ugly database hack
if v.p == 26 then v.p = 48 end -- Alterac Mountains merged to Hillsbrad Foothills
if v.p == 38 then v.p = 168 end -- Ditto Stranglethorn
-- end hack
QuestHelper: Assert(QuestHelper_ParentLookup[v.p], v.p) QuestHelper: Assert(QuestHelper_ParentLookup[v.p], v.p)
table.insert(target, {loc = {x = v.x, y = v.y, c = QuestHelper_ParentLookup[v.p], p = v.p}, path_desc = copy(map_lines), icon_id = icon or 6}) table.insert(target, {loc = {x = v.x, y = v.y, c = QuestHelper_ParentLookup[v.p], p = v.p}, path_desc = copy(map_lines), icon_id = icon or 6})
end end
@ -121,6 +117,7 @@ local function GetQuestMetaobjective(questid, lbcount, qindex)
if not quest_list[questid] then if not quest_list[questid] then
local q = DB_GetItem("quest", questid, true, true) local q = DB_GetItem("quest", questid, true, true)
--[==[
if not lbcount then if not lbcount then
QuestHelper: TextOut("Missing lbcount, guessing wildly") QuestHelper: TextOut("Missing lbcount, guessing wildly")
if q and q.criteria then if q and q.criteria then
@ -132,16 +129,19 @@ local function GetQuestMetaobjective(questid, lbcount, qindex)
lbcount = 0 -- heh lbcount = 0 -- heh
end end
end end
--]==]
-- just doublechecking here -- just doublechecking here
if not QuestCriteriaWarningBroadcast and q and q.criteria then for k, v in pairs(q.criteria) do if not QuestCriteriaWarningBroadcast and q and q.criteria then for k, v in pairs(q.criteria) do
if type(k) == "number" and k > lbcount then if type(k) == "number" and k > lbcount then
--QuestHelper:TextOut(string.format("Too many stored objectives for this quest, please report on the Questhelper homepage (%s %s %s)", questid, lbcount, k)) -- we're just going to hide this for now QuestHelper:TextOut(string.format("Too many stored objectives for this quest, please report on the Questhelper homepage (%s %s %s)", questid, lbcount, k)) -- we're just going to hide this for now
--[==[
if qindex then if qindex then
QuestHelper_ErrorCatcher_ExplicitError(false, string.format("Too many stored objectives (%s %s %s %s)", questid, lbcount, k, select(1, GetQuestLogTitle(qindex)))) QuestHelper_ErrorCatcher_ExplicitError(false, string.format("Too many stored objectives (%s %s %s %s)", questid, lbcount, k, select(1, GetQuestLogTitle(qindex))))
else else
QuestHelper_ErrorCatcher_ExplicitError(false, string.format("Too many stored objectives (%s %s %s %s)", questid, lbcount, k, v)) QuestHelper_ErrorCatcher_ExplicitError(false, string.format("Too many stored objectives (%s %s %s %s)", questid, lbcount, k, v))
end end
--]==]
QuestCriteriaWarningBroadcast = true QuestCriteriaWarningBroadcast = true
end end
end end end end
@ -159,13 +159,6 @@ local function GetQuestMetaobjective(questid, lbcount, qindex)
if qindex < 0 or (desc and typ ~= "log") then -- Ignore if no description. if qindex < 0 or (desc and typ ~= "log") then -- Ignore if no description.
--QuestHelper:TextOut(string.format("critty %d %d", k, c.loc and #c.loc or -1)) --QuestHelper:TextOut(string.format("critty %d %d", k, c.loc and #c.loc or -1))
--[[
if done then
print(string.format("Quest %s, Objective %s('%s') is done.", qindex, i, desc))
else
print(string.format("Quest %s, Objective %s('%s') is not done.", qindex, i, desc))
end
]]
ttx.tooltip_canned = {} ttx.tooltip_canned = {}
if q and q.criteria and q.criteria[i] then if q and q.criteria and q.criteria[i] then
@ -181,7 +174,7 @@ local function GetQuestMetaobjective(questid, lbcount, qindex)
end end
if #ttx == 0 then if #ttx == 0 then
table.insert(ttx, {loc = {x = 5000, y = 5000, c = 0, p = 2}, icon_id = 7, type_quest_unknown = true, map_desc = {"Unknown"}}) -- this is Ashenvale, for no particularly good reason table.insert(ttx, {loc = {x = 5000, y = 5000, c = 0, p = 43}, icon_id = 7, type_quest_unknown = true, map_desc = {"Unknown"}}) -- this is Ashenvale, for no particularly good reason
ttx.type_quest_unknown = true ttx.type_quest_unknown = true
end end
@ -201,32 +194,29 @@ local function GetQuestMetaobjective(questid, lbcount, qindex)
end end
do do
local ttx = {type_quest_finish = true} if q and q.finish and q.loc then
--QuestHelper:TextOut(string.format("finny %d", q.finish.loc and #q.finish.loc or -1)) local ttx = {type_quest_finish = true}
if q and q.finish and q.finish.loc then --QuestHelper:TextOut(string.format("finny %d", q.finish.loc and #q.finish.loc or -1))
ttx.solid = horribledupe(q.finish.solid) if q and q.finish and q.finish.loc then
for m, v in ipairs(q.finish.loc) do ttx.solid = horribledupe(q.finish.solid)
--print(v.rc, v.rz) for m, v in ipairs(q.finish.loc) do
--print(QuestHelper_IndexLookup[v.rc]) --print(v.rc, v.rz)
--print(QuestHelper_IndexLookup[v.rc][v.rz]) --print(QuestHelper_IndexLookup[v.rc])
-- Ugly database hack --print(QuestHelper_IndexLookup[v.rc][v.rz])
if v.p == 26 then v.p = 48 end table.insert(ttx, {desc = "Turn in quest", why = ite, loc = {x = v.x, y = v.y, c = QuestHelper_ParentLookup[v.p], p = v.p}, tracker_hidden = true, cluster = ttx, icon_id = 7, type_quest = ite.type_quest})
if v.p == 38 then v.p = 168 end end
-- end hack
table.insert(ttx, {desc = "Turn in quest", why = ite, loc = {x = v.x, y = v.y, c = QuestHelper_ParentLookup[v.p], p = v.p}, tracker_hidden = true, cluster = ttx, icon_id = 7, type_quest = ite.type_quest})
end end
end
if #ttx == 0 then if #ttx == 0 then
table.insert(ttx, {desc = "Turn in quest", why = ite, loc = {x = 5000, y = 5000, c = 0, p = 2}, tracker_hidden = true, cluster = ttx, icon_id = 7, type_quest = ite.type_quest, type_quest_unknown = true}) -- this is Ashenvale, for no particularly good reason table.insert(ttx, {desc = "Turn in quest", why = ite, loc = {x = 5000, y = 5000, c = 0, p = 43}, tracker_hidden = true, cluster = ttx, icon_id = 7, type_quest = ite.type_quest, type_quest_unknown = true}) -- this is Ashenvale, for no particularly good reason
ttx.type_quest_unknown = true ttx.type_quest_unknown = true
end end
ite.finish = ttx ite.finish = ttx
end
end end
quest_list[questid] = ite quest_list[questid] = ite
if q then DB_ReleaseItem(q) end if q then DB_ReleaseItem(q) end
end end
@ -812,7 +802,9 @@ function QH_UpdateQuests(force)
end end
end end
db.finish.tooltip_defer_questname = title -- we're using this as our fallback right now if db.finish then
db.finish.tooltip_defer_questname = title -- we're using this as our fallback right now
end
next_chunks[id] = chunk next_chunks[id] = chunk

Voir le fichier

@ -427,6 +427,26 @@ local function rightclick_menu(obj)
end end
end end
function QuestHelper:PlaceIconOnWorldMap( worldMapFrame, icon, map, dLvl, xPos, yPos )
assert(type(worldMapFrame) == "table")
assert(worldMapFrame.GetWidth and worldmapFrame.GetHeight)
assert(type(icon) == "table")
assert(icon.SetPoint and icon.ClearAllPoints)
assert(type(map) == "number")
assert(type(dLvl) == "number" or dLvl == nil)
assert(type(xPos) == "number")
assert(type(yPos) == "number")
if dLvl == nil then dLvl = 0 end
if map == -1 then return end -- Can't do anything without continent knowledge
local nMap, nFloor = GetCurrentMapAreaID(), GetCurrentMapDungeonLevel() or 0
local nCont
if nMap == -1 then cont = GetCurrentMapContinent() end
end
function QuestHelper:CreateWorldMapDodad(objective, nxt) function QuestHelper:CreateWorldMapDodad(objective, nxt)
local icon = CreateFrame("Button", nil, QuestHelper.map_overlay) local icon = CreateFrame("Button", nil, QuestHelper.map_overlay)
icon:SetFrameStrata("FULLSCREEN") icon:SetFrameStrata("FULLSCREEN")

Voir le fichier

@ -151,17 +151,8 @@ function QH_Graph_Pathmultifind(st, nda, reverse, make_path)
--stats.dests_complex = 0 --stats.dests_complex = 0
--stats.dests_total = 0 --stats.dests_total = 0
-- Ugly database hack
if st.p == 26 then st.p = 48 end -- Alterac Mountains merged to Hillsbrad Foothills
if st.p == 38 then st.p = 168 end -- Ditto Stranglethorn
-- end hack
for k, v in ipairs(nda) do for k, v in ipairs(nda) do
QuestHelper: Assert(v.x and v.y and v.p) QuestHelper: Assert(v.x and v.y and v.p)
-- Ugly database hack pt. 2
if v.p == 26 then v.p = 48 end -- Alterac Mountains merged to Hillsbrad Foothills
if v.p == 38 then v.p = 168 end -- Ditto Stranglethorn
-- end hack
local cpvp = canoplane(v.p) local cpvp = canoplane(v.p)
if plane[cpvp] then if plane[cpvp] then
--print("Destination plane insertion") --print("Destination plane insertion")

Voir le fichier

@ -194,7 +194,6 @@ function Astrolabe:GetMapVirtualZones(zone)
return {[1] = k} return {[1] = k}
end end
end end
local curMapID = GetCurrentMapAreaID() local curMapID = GetCurrentMapAreaID()
local zones = {GetMapZones(zone)} local zones = {GetMapZones(zone)}
@ -290,6 +289,8 @@ function Astrolabe:ComputeDistance( c1, z1, x1, y1, c2, z2, x2, y2 )
return dist, xDelta, yDelta; return dist, xDelta, yDelta;
end end
local yards
function Astrolabe:TranslateWorldMapPosition( C, Z, xPos, yPos, nC, nZ ) function Astrolabe:TranslateWorldMapPosition( C, Z, xPos, yPos, nC, nZ )
--[[ --[[
argcheck(C, 2, "number"); argcheck(C, 2, "number");
@ -326,7 +327,7 @@ function Astrolabe:TranslateWorldMapPosition( C, Z, xPos, yPos, nC, nZ )
zoneData = WorldMapSize[C]; zoneData = WorldMapSize[C];
local parentContinent = zoneData.parentContinent; local parentContinent = zoneData.parentContinent;
xPos, yPos = getContPosition(zoneData, Z, xPos, yPos); xPos, yPos = getContPosition(zoneData, Z, xPos, yPos);
if not xPos or not yPos then return end -- there is no such zone. why are you asking me such silly things? you are a terrible person. leave me in my despair. if not xPos or not yPos then return end -- there is no such zone. why are you asking me such silly things? you are a terrible person. leave me in my despair.
if ( C ~= parentContinent ) then if ( C ~= parentContinent ) then
-- translate up to world map if we aren't there already -- translate up to world map if we aren't there already
xPos = xPos + zoneData.xOffset; xPos = xPos + zoneData.xOffset;
@ -380,6 +381,14 @@ function Astrolabe:GetZoneWidth(c, z)
end end
end end
function Astrolabe:GetZoneHeight(c, z)
if z ~= 0 then
return WorldMapSize[c][z].height
else
return WorldMapSize[c].height
end
end
--***************************************************************************** --*****************************************************************************
-- This function will do its utmost to retrieve some sort of valid position -- This function will do its utmost to retrieve some sort of valid position
-- for the specified unit, including changing the current map zoom (if needed). -- for the specified unit, including changing the current map zoom (if needed).
@ -1197,8 +1206,8 @@ WorldMapSize = {
AhnQirajTheFallenKingdom = { AhnQirajTheFallenKingdom = {
height = 2700.0, height = 2700.0,
width = 4049.99983215332, width = 4049.99983215332,
xOffset = 0, xOffset = -3891.6665,
yOffset = 0, yOffset = -8033.333,
mapID = 772 mapID = 772
}, },
Ashenvale = { Ashenvale = {
@ -1223,8 +1232,8 @@ WorldMapSize = {
mapID = 3524, mapID = 3524,
}, },
Barrens = { Barrens = {
height = 6756.202067150937, height = 3831.24987792969,
width = 10133.44343943073, width = 5745.83332824707,
xOffset = 14443.84117394525, xOffset = 14443.84117394525,
yOffset = 11187.32013604393, yOffset = 11187.32013604393,
mapID = 17, mapID = 17,
@ -1288,15 +1297,15 @@ WorldMapSize = {
Hyjal = { Hyjal = {
height = 2831.24975585938, height = 2831.24975585938,
width = 4245.83337402344, width = 4245.83337402344,
xOffset = 0, xOffset = 929.167,
yOffset = 0, yOffset = 6195.833,
mapID = 606 mapID = 606
}, },
Hyjal_terrain1 = { Hyjal_terrain1 = {
height = 2831.24975585938, height = 2831.24975585938,
width = 4245.83337402344, width = 4245.83337402344,
xOffset = 0, xOffset = 929.167,
yOffset = 0, yOffset = 6195.833,
mapID = 683 mapID = 683
}, },
Moonglade = { Moonglade = {
@ -1330,8 +1339,8 @@ WorldMapSize = {
SouthernBarrens = { SouthernBarrens = {
height = 4941.66665649414, height = 4941.66665649414,
width = 7412.5, width = 7412.5,
xOffset = 0, xOffset = -1356.25,
yOffset = 0, yOffset = 204.167,
mapID = 607 mapID = 607
}, },
StonetalonMountains = { StonetalonMountains = {
@ -1379,8 +1388,8 @@ WorldMapSize = {
Uldum = { Uldum = {
height = 4129.16650390625, height = 4129.16650390625,
width = 6193.74975585938, width = 6193.74975585938,
xOffset = 0, xOffset = -2441.667,
yOffset = 0, yOffset = -8029.1665,
mapID = 720 mapID = 720
}, },
UngoroCrater = { UngoroCrater = {
@ -1520,17 +1529,17 @@ WorldMapSize = {
mapID = 44, mapID = 44,
}, },
RuinsofGilneas = { RuinsofGilneas = {
height = 889.583251953125, height = 2097.916668701172,
width = 593.749877929688, width = 3145.83325195312,
xOffset = 0, xOffset = -3439.583,
yOffset = 0, yOffset = -533.333,
mapID = 611 mapID = 611
}, },
RuinsofGilneasCity = { RuinsofGilneasCity = {
height = 889.583251953125, height = 889.583251953125,
width = 593.749877929688, width = 593.749877929688,
xOffset = 0, xOffset = -1933.333,
yOffset = 0, yOffset = -1306.25,
mapID = 685 mapID = 685
}, },
SearingGorge = { SearingGorge = {
@ -1562,8 +1571,8 @@ WorldMapSize = {
mapID = 1519, mapID = 1519,
}, },
StranglethornVale = { -- Split to Vale, Jungle and Cape StranglethornVale = { -- Split to Vale, Jungle and Cape
height = 4254.18312444072, height = 4368.75,
width = 6381.248484543122, width = 6552.0830078125,
xOffset = 15951.13375783437, xOffset = 15951.13375783437,
yOffset = 22345.18258706305, yOffset = 22345.18258706305,
mapID = 33, mapID = 33,
@ -1571,8 +1580,8 @@ WorldMapSize = {
StranglethornJungle = { StranglethornJungle = {
height = 2733.3330078125, height = 2733.3330078125,
width = 4099.99987792969, width = 4099.99987792969,
xOffset = 0, xOffset = -1743.750,
yOffset = 0, yOffset = -11016.666,
mapID = 37 mapID = 37
}, },
Sunwell = { Sunwell = {
@ -1592,8 +1601,8 @@ WorldMapSize = {
TheCapeOfStranglethorn = { TheCapeOfStranglethorn = {
height = 2631.25, height = 2631.25,
width = 3945.83312988281, width = 3945.83312988281,
xOffset = 0, xOffset = -2108.333,
yOffset = 0, yOffset = -12516.666,
mapID = 673 mapID = 673
}, },
Tirisfal = { Tirisfal = {
@ -1606,29 +1615,29 @@ WorldMapSize = {
TolBarad = { TolBarad = {
height = 1343.75, height = 1343.75,
width = 2014.58329248428, width = 2014.58329248428,
xOffset = 0, xOffset = -2010.417,
yOffset = 0, yOffset = -560.417,
mapID = 708 mapID = 708
}, },
TolBaradDailyArea = { TolBaradDailyArea = {
height = 1224.99993896484, height = 1224.99993896484,
width = 1837.5, width = 1837.5,
xOffset = 0, xOffset = -2412.5,
yOffset = 0, yOffset = 377.083,
mapID = 709 mapID = 709
}, },
TwilightHighlands = { TwilightHighlands = {
height = 3514.5830078125, height = 3514.5830078125,
width = 5270.8330078125, width = 5270.8330078125,
xOffset = 0, xOffset = 2437.5,
yOffset = 0, yOffset = -2156.25,
mapID = 700 mapID = 700
}, },
TwilightHighlands_terrain1 = { TwilightHighlands_terrain1 = {
height = 3514.5830078125, height = 3514.5830078125,
width = 5270.8330078125, width = 5270.8330078125,
xOffset = 0, xOffset = 2437.5,
yOffset = 0, yOffset = -2156.25,
mapID = 770 mapID = 770
}, },
Undercity = { Undercity = {
@ -1641,29 +1650,29 @@ WorldMapSize = {
Vashjir = { Vashjir = {
height = 4631.24975585938, height = 4631.24975585938,
width = 6945.83276367188, width = 6945.83276367188,
xOffset = 0, xOffset = -8754.166,
yOffset = 0, yOffset = -3720.833,
mapID = 613 mapID = 613
}, },
VashjirDepths = { VashjirDepths = {
height = 2716.66650390625, height = 2716.66650390625,
width = 4075.0, width = 4075.0,
xOffset = 0, xOffset = -8233.333,
yOffset = 0, yOffset = -4906.25,
mapID = 614 mapID = 614
}, },
VashjirKelpForest = { VashjirKelpForest = {
height = 1868.75024414062, height = 1868.75024414062,
width = 2802.0830078125, width = 2802.0830078125,
xOffset = 0, xOffset = -5070.833,
yOffset = 0, yOffset = -4018.75,
mapID = 610 mapID = 610
}, },
VashjirRuins = { VashjirRuins = {
height = 3233.3330078125, height = 3233.3330078125,
width = 4849.99963378906, width = 4849.99963378906,
xOffset = 0, xOffset = -6681.25,
yOffset = 0, yOffset = -4756.25,
mapID = 615 mapID = 615
}, },
WesternPlaguelands = { WesternPlaguelands = {
@ -1841,10 +1850,10 @@ WorldMapSize = {
mapID = 66, mapID = 66,
}, },
HrothgarsLanding = { HrothgarsLanding = {
height = 2452.7, height = 2452.083984375,
width = 2452.7*1.5, width = 3677.08312988281,
xOffset = 23967.599 - 17549.182, xOffset = 6418.417,
yOffset = 1027.392 - 1215.431, yOffset = -188.039,
} }
}, },
}, },
@ -1856,12 +1865,12 @@ WorldMapSize = {
xOffset = 0.0, xOffset = 0.0,
yOffset = 0.0, yOffset = 0.0,
zoneData = { zoneData = {
Deepholm = { height = 3399.999877929688, width = 5099.9987792969, xOffset = 0, yOffset = 0, mapID = 640 }, Deepholm = { height = 3399.999877929688, width = 5099.9987792969, xOffset = -3052.083, yOffset = 2795.833, mapID = 640 },
Kezan = { height = 900.00048828125, width = 1352.08319091797, xOffset = 0, yOffset = 0, mapID = 605 }, Kezan = { height = 900.00048828125, width = 1352.08319091797, xOffset = -2129.167, yOffset = -7731.25, mapID = 605 },
TheLostIsles = { height = 3010.41665649414, width = 4514.5830078125, xOffset = 0, yOffset = 0, mapID = 544 }, TheLostIsles = { height = 3010.41665649414, width = 4514.5830078125, xOffset = -4383.333, yOffset = 2881.25, mapID = 544 },
TheLostIsles_terrain1 = { height = 3010.41665649414, width = 4514.5830078125, xOffset = 0, yOffset = 0, mapID = 681 }, TheLostIsles_terrain1 = { height = 3010.41665649414, width = 4514.5830078125, xOffset = -4383.333, yOffset = 2881.25, mapID = 681 },
TheLostIsles_terrain2 = { height = 3010.41665649414, width = 4514.5830078125, xOffset = 0, yOffset = 0, mapID = 682 }, TheLostIsles_terrain2 = { height = 3010.41665649414, width = 4514.5830078125, xOffset = -4383.333, yOffset = 2881.25, mapID = 682 },
TheMaelstrom = { height = 1033.33325195312, width = 1550.0, xOffset = 0, yOffset = 0, mapID = 737 } TheMaelstrom = { height = 1033.33325195312, width = 1550.0, xOffset = -1556.25, yOffset = 1370.833, mapID = 737 }
} }
} }
} }
@ -1947,65 +1956,65 @@ VContinent(-118, "PitofSaron", 1022.3)
VirtualContinentIndexes = { -- Don't change values here, since programs might want to store them VirtualContinentIndexes = { -- Don't change values here, since programs might want to store them
["ScarletEnclave"] = -77, ["ScarletEnclave"] = -77,
["GilneasCity"] = -78, -- ["GilneasCity"] = -78,
["GilneasZone"] = -79, -- ["GilneasZone"] = -79,
["UtgardeKeep1"] = -80, -- ["UtgardeKeep1"] = -80,
["UtgardeKeep2"] = -81, -- ["UtgardeKeep2"] = -81,
["UtgardeKeep3"] = -82, -- ["UtgardeKeep3"] = -82,
["TheNexus"] = -83, -- ["TheNexus"] = -83,
["AzjolNerub1"] = -84, -- ["AzjolNerub1"] = -84,
["AzjolNerub2"] = -85, -- ["AzjolNerub2"] = -85,
["AzjolNerub3"] = -86, -- ["AzjolNerub3"] = -86,
["Ahnkahet"] = -87, -- ["Ahnkahet"] = -87,
["DrakTharonKeep1"] = -88, -- ["DrakTharonKeep1"] = -88,
["DrakTharonKeep2"] = -89, -- ["DrakTharonKeep2"] = -89,
["VioletHold"] = -90, -- ["VioletHold"] = -90,
["Gundrak"] = -91, -- ["Gundrak"] = -91,
["Ulduar77"] = -92, -- Halls of Stone -- ["Ulduar77"] = -92, -- Halls of Stone
["HallsofLightning1"] = -93, -- ["HallsofLightning1"] = -93,
["HallsofLightning2"] = -94, -- ["HallsofLightning2"] = -94,
["Nexus801"] = -95, -- Oculus -- ["Nexus801"] = -95, -- Oculus
["Nexus802"] = -96, -- ["Nexus802"] = -96,
["Nexus803"] = -97, -- ["Nexus803"] = -97,
["Nexus804"] = -98, -- ["Nexus804"] = -98,
["CoTStratholme1"] = -99, -- ["CoTStratholme1"] = -99,
["CoTStratholme2"] = -100, -- ["CoTStratholme2"] = -100,
["UtgardePinnacle1"] = -101, -- hey they spelled it right -- ["UtgardePinnacle1"] = -101, -- hey they spelled it right
["UtgardePinnacle2"] = -102, -- ["UtgardePinnacle2"] = -102,
["VaultofArchavon"] = -103, -- Weirdly, Emalon is actually within the "Vault of Archavon" -- ["VaultofArchavon"] = -103, -- Weirdly, Emalon is actually within the "Vault of Archavon"
["Naxxramas1"] = -104, -- ["Naxxramas1"] = -104,
["Naxxramas2"] = -105, -- ["Naxxramas2"] = -105,
["Naxxramas3"] = -106, -- ["Naxxramas3"] = -106,
["Naxxramas4"] = -107, -- ["Naxxramas4"] = -107,
["Naxxramas5"] = -108, -- ["Naxxramas5"] = -108,
["Naxxramas6"] = -109, -- ["Naxxramas6"] = -109,
["TheObsidianSanctum"] = -110, -- ["TheObsidianSanctum"] = -110,
["TheEyeOfEternity"] = -111, -- ["TheEyeOfEternity"] = -111,
["Ulduar"] = -112, -- ["Ulduar"] = -112,
["Ulduar1"] = -113, -- ["Ulduar1"] = -113,
["Ulduar2"] = -114, -- ["Ulduar2"] = -114,
["Ulduar3"] = -115, -- ["Ulduar3"] = -115,
["Ulduar4"] = -116, -- ["Ulduar4"] = -116,
["TheForgeofSouls"] = -117, -- ["TheForgeofSouls"] = -117,
["PitofSaron"] = -118 -- ["PitofSaron"] = -118
--[[ --[[
["AbyssalMaw"] = -120, ["AbyssalMaw"] = -120,
["ThroneOfTheTides"] = -130, ["ThroneOfTheTides"] = -130,

Voir le fichier

@ -0,0 +1,25 @@
------------------------------------------------------------------------
r100 | kagaro | 2011-12-02 00:28:58 +0000 (Fri, 02 Dec 2011) | 1 line
Changed paths:
A /tags/0.21-release (from /trunk:99)
Tagging as 0.21-release
------------------------------------------------------------------------
r99 | kagaro | 2011-12-02 00:27:41 +0000 (Fri, 02 Dec 2011) | 1 line
Changed paths:
M /trunk/library.lua
Updated lib from forum tests that shows game data incorrect
------------------------------------------------------------------------
r97 | kagaro | 2011-11-29 12:06:46 +0000 (Tue, 29 Nov 2011) | 1 line
Changed paths:
M /trunk/LibMapData-1.0.toc
toc bump
------------------------------------------------------------------------
r96 | kagaro | 2011-11-28 13:01:19 +0000 (Mon, 28 Nov 2011) | 1 line
Changed paths:
M /trunk/library.lua
Adding 4.3 zone data
------------------------------------------------------------------------

Voir le fichier

@ -0,0 +1,14 @@
## Interface: 40300
## Title: Lib: MapData-1.0
## Notes: Static library of wow map data
## Version: 1.0.99
## Author: kagaro
## X-Category: Library
## X-Curse-Packaged-Version: 0.21-release
## X-Curse-Project-Name: LibMapData-1.0
## X-Curse-Project-ID: libmapdata-1-0
## X-Curse-Repository-ID: wow/libmapdata-1-0/mainline
library.lua
Libs/LibStub/LibStub.lua
Libs/CallbackHandler-1.0/CallbackHandler-1.0.xml

Voir le fichier

@ -0,0 +1,240 @@
--[[ $Id: CallbackHandler-1.0.lua 14 2010-08-09 00:43:38Z mikk $ ]]
local MAJOR, MINOR = "CallbackHandler-1.0", 6
local CallbackHandler = LibStub:NewLibrary(MAJOR, MINOR)
if not CallbackHandler then return end -- No upgrade needed
local meta = {__index = function(tbl, key) tbl[key] = {} return tbl[key] end}
-- Lua APIs
local tconcat = table.concat
local assert, error, loadstring = assert, error, loadstring
local setmetatable, rawset, rawget = setmetatable, rawset, rawget
local next, select, pairs, type, tostring = next, select, pairs, type, tostring
-- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
-- List them here for Mikk's FindGlobals script
-- GLOBALS: geterrorhandler
local xpcall = xpcall
local function errorhandler(err)
return geterrorhandler()(err)
end
local function CreateDispatcher(argCount)
local code = [[
local next, xpcall, eh = ...
local method, ARGS
local function call() method(ARGS) end
local function dispatch(handlers, ...)
local index
index, method = next(handlers)
if not method then return end
local OLD_ARGS = ARGS
ARGS = ...
repeat
xpcall(call, eh)
index, method = next(handlers, index)
until not method
ARGS = OLD_ARGS
end
return dispatch
]]
local ARGS, OLD_ARGS = {}, {}
for i = 1, argCount do ARGS[i], OLD_ARGS[i] = "arg"..i, "old_arg"..i end
code = code:gsub("OLD_ARGS", tconcat(OLD_ARGS, ", ")):gsub("ARGS", tconcat(ARGS, ", "))
return assert(loadstring(code, "safecall Dispatcher["..argCount.."]"))(next, xpcall, errorhandler)
end
local Dispatchers = setmetatable({}, {__index=function(self, argCount)
local dispatcher = CreateDispatcher(argCount)
rawset(self, argCount, dispatcher)
return dispatcher
end})
--------------------------------------------------------------------------
-- CallbackHandler:New
--
-- target - target object to embed public APIs in
-- RegisterName - name of the callback registration API, default "RegisterCallback"
-- UnregisterName - name of the callback unregistration API, default "UnregisterCallback"
-- UnregisterAllName - name of the API to unregister all callbacks, default "UnregisterAllCallbacks". false == don't publish this API.
function CallbackHandler:New(target, RegisterName, UnregisterName, UnregisterAllName, OnUsed, OnUnused)
-- TODO: Remove this after beta has gone out
assert(not OnUsed and not OnUnused, "ACE-80: OnUsed/OnUnused are deprecated. Callbacks are now done to registry.OnUsed and registry.OnUnused")
RegisterName = RegisterName or "RegisterCallback"
UnregisterName = UnregisterName or "UnregisterCallback"
if UnregisterAllName==nil then -- false is used to indicate "don't want this method"
UnregisterAllName = "UnregisterAllCallbacks"
end
-- we declare all objects and exported APIs inside this closure to quickly gain access
-- to e.g. function names, the "target" parameter, etc
-- Create the registry object
local events = setmetatable({}, meta)
local registry = { recurse=0, events=events }
-- registry:Fire() - fires the given event/message into the registry
function registry:Fire(eventname, ...)
if not rawget(events, eventname) or not next(events[eventname]) then return end
local oldrecurse = registry.recurse
registry.recurse = oldrecurse + 1
Dispatchers[select('#', ...) + 1](events[eventname], eventname, ...)
registry.recurse = oldrecurse
if registry.insertQueue and oldrecurse==0 then
-- Something in one of our callbacks wanted to register more callbacks; they got queued
for eventname,callbacks in pairs(registry.insertQueue) do
local first = not rawget(events, eventname) or not next(events[eventname]) -- test for empty before. not test for one member after. that one member may have been overwritten.
for self,func in pairs(callbacks) do
events[eventname][self] = func
-- fire OnUsed callback?
if first and registry.OnUsed then
registry.OnUsed(registry, target, eventname)
first = nil
end
end
end
registry.insertQueue = nil
end
end
-- Registration of a callback, handles:
-- self["method"], leads to self["method"](self, ...)
-- self with function ref, leads to functionref(...)
-- "addonId" (instead of self) with function ref, leads to functionref(...)
-- all with an optional arg, which, if present, gets passed as first argument (after self if present)
target[RegisterName] = function(self, eventname, method, ... --[[actually just a single arg]])
if type(eventname) ~= "string" then
error("Usage: "..RegisterName.."(eventname, method[, arg]): 'eventname' - string expected.", 2)
end
method = method or eventname
local first = not rawget(events, eventname) or not next(events[eventname]) -- test for empty before. not test for one member after. that one member may have been overwritten.
if type(method) ~= "string" and type(method) ~= "function" then
error("Usage: "..RegisterName.."(\"eventname\", \"methodname\"): 'methodname' - string or function expected.", 2)
end
local regfunc
if type(method) == "string" then
-- self["method"] calling style
if type(self) ~= "table" then
error("Usage: "..RegisterName.."(\"eventname\", \"methodname\"): self was not a table?", 2)
elseif self==target then
error("Usage: "..RegisterName.."(\"eventname\", \"methodname\"): do not use Library:"..RegisterName.."(), use your own 'self'", 2)
elseif type(self[method]) ~= "function" then
error("Usage: "..RegisterName.."(\"eventname\", \"methodname\"): 'methodname' - method '"..tostring(method).."' not found on self.", 2)
end
if select("#",...)>=1 then -- this is not the same as testing for arg==nil!
local arg=select(1,...)
regfunc = function(...) self[method](self,arg,...) end
else
regfunc = function(...) self[method](self,...) end
end
else
-- function ref with self=object or self="addonId" or self=thread
if type(self)~="table" and type(self)~="string" and type(self)~="thread" then
error("Usage: "..RegisterName.."(self or \"addonId\", eventname, method): 'self or addonId': table or string or thread expected.", 2)
end
if select("#",...)>=1 then -- this is not the same as testing for arg==nil!
local arg=select(1,...)
regfunc = function(...) method(arg,...) end
else
regfunc = method
end
end
if events[eventname][self] or registry.recurse<1 then
-- if registry.recurse<1 then
-- we're overwriting an existing entry, or not currently recursing. just set it.
events[eventname][self] = regfunc
-- fire OnUsed callback?
if registry.OnUsed and first then
registry.OnUsed(registry, target, eventname)
end
else
-- we're currently processing a callback in this registry, so delay the registration of this new entry!
-- yes, we're a bit wasteful on garbage, but this is a fringe case, so we're picking low implementation overhead over garbage efficiency
registry.insertQueue = registry.insertQueue or setmetatable({},meta)
registry.insertQueue[eventname][self] = regfunc
end
end
-- Unregister a callback
target[UnregisterName] = function(self, eventname)
if not self or self==target then
error("Usage: "..UnregisterName.."(eventname): bad 'self'", 2)
end
if type(eventname) ~= "string" then
error("Usage: "..UnregisterName.."(eventname): 'eventname' - string expected.", 2)
end
if rawget(events, eventname) and events[eventname][self] then
events[eventname][self] = nil
-- Fire OnUnused callback?
if registry.OnUnused and not next(events[eventname]) then
registry.OnUnused(registry, target, eventname)
end
end
if registry.insertQueue and rawget(registry.insertQueue, eventname) and registry.insertQueue[eventname][self] then
registry.insertQueue[eventname][self] = nil
end
end
-- OPTIONAL: Unregister all callbacks for given selfs/addonIds
if UnregisterAllName then
target[UnregisterAllName] = function(...)
if select("#",...)<1 then
error("Usage: "..UnregisterAllName.."([whatFor]): missing 'self' or \"addonId\" to unregister events for.", 2)
end
if select("#",...)==1 and ...==target then
error("Usage: "..UnregisterAllName.."([whatFor]): supply a meaningful 'self' or \"addonId\"", 2)
end
for i=1,select("#",...) do
local self = select(i,...)
if registry.insertQueue then
for eventname, callbacks in pairs(registry.insertQueue) do
if callbacks[self] then
callbacks[self] = nil
end
end
end
for eventname, callbacks in pairs(events) do
if callbacks[self] then
callbacks[self] = nil
-- Fire OnUnused callback?
if registry.OnUnused and not next(callbacks) then
registry.OnUnused(registry, target, eventname)
end
end
end
end
end
end
return registry
end
-- CallbackHandler purposefully does NOT do explicit embedding. Nor does it
-- try to upgrade old implicit embeds since the system is selfcontained and
-- relies on closures to work.

Voir le fichier

@ -0,0 +1,4 @@
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
..\FrameXML\UI.xsd">
<Script file="CallbackHandler-1.0.lua"/>
</Ui>

Voir le fichier

@ -0,0 +1,30 @@
-- LibStub is a simple versioning stub meant for use in Libraries. http://www.wowace.com/wiki/LibStub for more info
-- LibStub is hereby placed in the Public Domain Credits: Kaelten, Cladhaire, ckknight, Mikk, Ammo, Nevcairiel, joshborke
local LIBSTUB_MAJOR, LIBSTUB_MINOR = "LibStub", 2 -- NEVER MAKE THIS AN SVN REVISION! IT NEEDS TO BE USABLE IN ALL REPOS!
local LibStub = _G[LIBSTUB_MAJOR]
if not LibStub or LibStub.minor < LIBSTUB_MINOR then
LibStub = LibStub or {libs = {}, minors = {} }
_G[LIBSTUB_MAJOR] = LibStub
LibStub.minor = LIBSTUB_MINOR
function LibStub:NewLibrary(major, minor)
assert(type(major) == "string", "Bad argument #2 to `NewLibrary' (string expected)")
minor = assert(tonumber(strmatch(minor, "%d+")), "Minor version must either be a number or contain a number.")
local oldminor = self.minors[major]
if oldminor and oldminor >= minor then return nil end
self.minors[major], self.libs[major] = minor, self.libs[major] or {}
return self.libs[major], oldminor
end
function LibStub:GetLibrary(major, silent)
if not self.libs[major] and not silent then
error(("Cannot find a library instance of %q."):format(tostring(major)), 2)
end
return self.libs[major], self.minors[major]
end
function LibStub:IterateLibraries() return pairs(self.libs) end
setmetatable(LibStub, { __call = LibStub.GetLibrary })
end

Voir le fichier

@ -0,0 +1,13 @@
## Interface: 20400
## Title: Lib: LibStub
## Notes: Universal Library Stub
## Credits: Kaelten, Cladhaire, ckknight, Mikk, Ammo, Nevcairiel
## X-Website: http://jira.wowace.com/browse/LS
## X-Category: Library
## X-License: Public Domain
## X-Curse-Packaged-Version: 1.0
## X-Curse-Project-Name: LibStub
## X-Curse-Project-ID: libstub
## X-Curse-Repository-ID: wow/libstub/mainline
LibStub.lua

Fichier diff supprimé car celui-ci est trop grand Voir la Diff

Voir le fichier

@ -1,13 +1,13 @@
## Interface: 40000 ## Interface: 50001
## Title: Lib: RangeCheck-2.0 ## Title: Lib: RangeCheck-2.0
## Notes: A library to determine estimated range. ## Notes: A library to determine estimated range.
## Author: mitch0 ## Author: mitch0
## Version: 3.6.0 ## Version: v3.7.0
## LoadOnDemand: 1 ## LoadOnDemand: 1
## X-Category: Library ## X-Category: Library
## X-AceLibrary-LibRangeCheck-2.0: true ## X-AceLibrary-LibRangeCheck-2.0: true
## X-License: Public Domain ## X-License: Public Domain
## X-Curse-Packaged-Version: v3.6.0 ## X-Curse-Packaged-Version: v3.7.0
## X-Curse-Project-Name: LibRangeCheck-2.0 ## X-Curse-Project-Name: LibRangeCheck-2.0
## X-Curse-Project-ID: librangecheck-2-0 ## X-Curse-Project-ID: librangecheck-2-0
## X-Curse-Repository-ID: wow/librangecheck-2-0/mainline ## X-Curse-Repository-ID: wow/librangecheck-2-0/mainline

Voir le fichier

@ -1,6 +1,6 @@
--[[ --[[
Name: LibRangeCheck-2.0 Name: LibRangeCheck-2.0
Revision: $Revision: 113 $ Revision: $Revision: 124 $
Author(s): mitch0 Author(s): mitch0
Website: http://www.wowace.com/projects/librangecheck-2-0/ Website: http://www.wowace.com/projects/librangecheck-2-0/
Description: A range checking library based on interact distances and spell ranges Description: A range checking library based on interact distances and spell ranges
@ -41,7 +41,7 @@ License: Public Domain
-- @class file -- @class file
-- @name LibRangeCheck-2.0 -- @name LibRangeCheck-2.0
local MAJOR_VERSION = "LibRangeCheck-2.0" local MAJOR_VERSION = "LibRangeCheck-2.0"
local MINOR_VERSION = tonumber(("$Revision: 113 $"):match("%d+")) + 100000 local MINOR_VERSION = tonumber(("$Revision: 124 $"):match("%d+")) + 100000
local lib, oldminor = LibStub:NewLibrary(MAJOR_VERSION, MINOR_VERSION) local lib, oldminor = LibStub:NewLibrary(MAJOR_VERSION, MINOR_VERSION)
if not lib then if not lib then
@ -122,12 +122,11 @@ HarmSpells["MAGE"] = {
FriendSpells["PALADIN"] = { FriendSpells["PALADIN"] = {
635, -- ["Holy Light"], -- 40 635, -- ["Holy Light"], -- 40
20217, -- ["Blessing of Kings"], -- 30 20217, -- ["Blessing of Kings"], -- 30
20473, -- ["Holy Shock"], -- 20
} }
HarmSpells["PALADIN"] = { HarmSpells["PALADIN"] = {
62124, -- ["Hand of Reckoning"], -- 30 62124, -- ["Hand of Reckoning"], -- 30
20473, -- ["Holy Shock"], -- 20 -- 20473, -- ["Holy Shock"], -- 20
20271, -- ["Judgement"], -- 10 (Improved Judgement: +10, +20; Elnightened Judgements: +5, +10) 20271, -- ["Judgement"], -- 10 (Improved Judgement: +10, +20; Enlightened Judgements: +5, +10)
853, -- ["Hammer of Justice"], -- 10 (Glyph of Hammer of Justice: +5) 853, -- ["Hammer of Justice"], -- 10 (Glyph of Hammer of Justice: +5)
35395, -- ["Crusader Strike"], -- 5 35395, -- ["Crusader Strike"], -- 5
} }
@ -331,6 +330,8 @@ local tremove = tremove
local BOOKTYPE_SPELL = BOOKTYPE_SPELL local BOOKTYPE_SPELL = BOOKTYPE_SPELL
local GetSpellInfo = GetSpellInfo local GetSpellInfo = GetSpellInfo
local GetSpellBookItemName = GetSpellBookItemName local GetSpellBookItemName = GetSpellBookItemName
local GetNumSpellTabs = GetNumSpellTabs
local GetSpellTabInfo = GetSpellTabInfo
local GetItemInfo = GetItemInfo local GetItemInfo = GetItemInfo
local UnitCanAttack = UnitCanAttack local UnitCanAttack = UnitCanAttack
local UnitCanAssist = UnitCanAssist local UnitCanAssist = UnitCanAssist
@ -427,14 +428,16 @@ local function initItemRequests(cacheAll)
foundNewItems = nil foundNewItems = nil
end end
local function getNumSpells()
local _, _, offset, numSpells = GetSpellTabInfo(GetNumSpellTabs())
return offset + numSpells
end
-- return the spellIndex of the given spell by scanning the spellbook -- return the spellIndex of the given spell by scanning the spellbook
local function findSpellIdx(spellName) local function findSpellIdx(spellName)
local i = 1 for i = 1, getNumSpells() do
while true do
local spell, rank = GetSpellBookItemName(i, BOOKTYPE_SPELL) local spell, rank = GetSpellBookItemName(i, BOOKTYPE_SPELL)
if not spell then return nil end
if spell == spellName then return i end if spell == spellName then return i end
i = i + 1
end end
return nil return nil
end end

Voir le fichier

@ -1,13 +1,22 @@
-- $Id: LibStub.lua 76 2007-09-03 01:50:17Z mikk $
-- LibStub is a simple versioning stub meant for use in Libraries. http://www.wowace.com/wiki/LibStub for more info -- LibStub is a simple versioning stub meant for use in Libraries. http://www.wowace.com/wiki/LibStub for more info
-- LibStub is hereby placed in the Public Domain Credits: Kaelten, Cladhaire, ckknight, Mikk, Ammo, Nevcairiel, joshborke -- LibStub is hereby placed in the Public Domain
-- Credits: Kaelten, Cladhaire, ckknight, Mikk, Ammo, Nevcairiel, joshborke
local LIBSTUB_MAJOR, LIBSTUB_MINOR = "LibStub", 2 -- NEVER MAKE THIS AN SVN REVISION! IT NEEDS TO BE USABLE IN ALL REPOS! local LIBSTUB_MAJOR, LIBSTUB_MINOR = "LibStub", 2 -- NEVER MAKE THIS AN SVN REVISION! IT NEEDS TO BE USABLE IN ALL REPOS!
local LibStub = _G[LIBSTUB_MAJOR] local LibStub = _G[LIBSTUB_MAJOR]
-- Check to see is this version of the stub is obsolete
if not LibStub or LibStub.minor < LIBSTUB_MINOR then if not LibStub or LibStub.minor < LIBSTUB_MINOR then
LibStub = LibStub or {libs = {}, minors = {} } LibStub = LibStub or {libs = {}, minors = {} }
_G[LIBSTUB_MAJOR] = LibStub _G[LIBSTUB_MAJOR] = LibStub
LibStub.minor = LIBSTUB_MINOR LibStub.minor = LIBSTUB_MINOR
-- LibStub:NewLibrary(major, minor)
-- major (string) - the major version of the library
-- minor (string or number ) - the minor version of the library
--
-- returns nil if a newer or same version of the lib is already present
-- returns empty library object or old library object if upgrade is needed
function LibStub:NewLibrary(major, minor) function LibStub:NewLibrary(major, minor)
assert(type(major) == "string", "Bad argument #2 to `NewLibrary' (string expected)") assert(type(major) == "string", "Bad argument #2 to `NewLibrary' (string expected)")
minor = assert(tonumber(strmatch(minor, "%d+")), "Minor version must either be a number or contain a number.") minor = assert(tonumber(strmatch(minor, "%d+")), "Minor version must either be a number or contain a number.")
@ -18,6 +27,12 @@ if not LibStub or LibStub.minor < LIBSTUB_MINOR then
return self.libs[major], oldminor return self.libs[major], oldminor
end end
-- LibStub:GetLibrary(major, [silent])
-- major (string) - the major version of the library
-- silent (boolean) - if true, library is optional, silently return nil if its not found
--
-- throws an error if the library can not be found (except silent is set)
-- returns the library object if found
function LibStub:GetLibrary(major, silent) function LibStub:GetLibrary(major, silent)
if not self.libs[major] and not silent then if not self.libs[major] and not silent then
error(("Cannot find a library instance of %q."):format(tostring(major)), 2) error(("Cannot find a library instance of %q."):format(tostring(major)), 2)
@ -25,6 +40,12 @@ if not LibStub or LibStub.minor < LIBSTUB_MINOR then
return self.libs[major], self.minors[major] return self.libs[major], self.minors[major]
end end
function LibStub:IterateLibraries() return pairs(self.libs) end -- LibStub:IterateLibraries()
--
-- Returns an iterator for the currently registered libraries
function LibStub:IterateLibraries()
return pairs(self.libs)
end
setmetatable(LibStub, { __call = LibStub.GetLibrary }) setmetatable(LibStub, { __call = LibStub.GetLibrary })
end end

Voir le fichier

@ -1,11 +1,11 @@
## Interface: 20400 ## Interface: 50001
## Title: Lib: LibStub ## Title: Lib: LibStub
## Notes: Universal Library Stub ## Notes: Universal Library Stub
## Credits: Kaelten, Cladhaire, ckknight, Mikk, Ammo, Nevcairiel ## Credits: Kaelten, Cladhaire, ckknight, Mikk, Ammo, Nevcairiel
## X-Website: http://jira.wowace.com/browse/LS ## X-Website: http://www.wowace.com/addons/libstub/
## X-Category: Library ## X-Category: Library
## X-License: Public Domain ## X-License: Public Domain
## X-Curse-Packaged-Version: 1.0 ## X-Curse-Packaged-Version: 1.0.3-50001
## X-Curse-Project-Name: LibStub ## X-Curse-Project-Name: LibStub
## X-Curse-Project-ID: libstub ## X-Curse-Project-ID: libstub
## X-Curse-Repository-ID: wow/libstub/mainline ## X-Curse-Repository-ID: wow/libstub/mainline

Voir le fichier

@ -182,11 +182,21 @@ local please_submit_enabled = true
local please_submit_initted = false local please_submit_initted = false
local spawned = false local spawned = false
QHQuestsCompleted = false
QH_Event("ADDON_LOADED", function (addonid) QH_Event("ADDON_LOADED", function (addonid)
if addonid ~= "QuestHelper" then return end if addonid ~= "QuestHelper" then return end
-- ONLY FAST STUFF ALLOWED IN HERE -- ONLY FAST STUFF ALLOWED IN HERE
--[[
QH_Event("QUEST_QUERY_COMPLETE", function ()
QHQuestsCompleted = GetQuestsCompleted()
end)
QueryQuestsCompleted()
--]]
-- Use DefaultPref as fallback for unset preference keys. -- Use DefaultPref as fallback for unset preference keys.
setmetatable(QuestHelper_Pref, {__index=QuestHelper_DefaultPref}) setmetatable(QuestHelper_Pref, {__index=QuestHelper_DefaultPref})
QuestHelper: Assert(QuestHelper_Pref.perfload_scale) -- if this fails, something is very botched QuestHelper: Assert(QuestHelper_Pref.perfload_scale) -- if this fails, something is very botched
@ -194,7 +204,7 @@ QH_Event("ADDON_LOADED", function (addonid)
if not QuestHelper_Pref.track or QuestHelper_Pref.hide then if not QuestHelper_Pref.track or QuestHelper_Pref.hide then
QuestHelper:HideTracker() QuestHelper:HideTracker()
else else
QuestHelper:ShowTracker() -- to respect the minimized setting --QuestHelper:ShowTracker() -- to respect the minimized setting
end end
local self = QuestHelper -- whee hack hack hack local self = QuestHelper -- whee hack hack hack
@ -215,7 +225,7 @@ QH_Event("ADDON_LOADED", function (addonid)
["manager_achievement.lua"] = true, ["manager_achievement.lua"] = true,
["manager_completed.lua"] = true, ["manager_completed.lua"] = true,
["upgrade.lua"] = true, -- ["upgrade.lua"] = true,
["main.lua"] = true, ["main.lua"] = true,
["recycle.lua"] = true, ["recycle.lua"] = true,
["objective.lua"] = true, ["objective.lua"] = true,
@ -224,17 +234,17 @@ QH_Event("ADDON_LOADED", function (addonid)
["dodads.lua"] = true, ["dodads.lua"] = true,
["dodads_triangles.lua"] = true, ["dodads_triangles.lua"] = true,
["teleport.lua"] = true, ["teleport.lua"] = true,
["pathfinding.lua"] = true, -- ["pathfinding.lua"] = true,
["routing.lua"] = true, ["routing.lua"] = true,
["custom.lua"] = true, ["custom.lua"] = true,
["menu.lua"] = true, ["menu.lua"] = true,
["nag.lua"] = true, ["nag.lua"] = true,
["comm.lua"] = true, ["comm.lua"] = true,
["mapbutton.lua"] = true, -- ["mapbutton.lua"] = true,
["help.lua"] = true, ["help.lua"] = true,
["pattern.lua"] = true, ["pattern.lua"] = true,
["flightpath.lua"] = true, ["flightpath.lua"] = true,
["tracker.lua"] = true, -- ["tracker.lua"] = true,
["objtips.lua"] = true, ["objtips.lua"] = true,
["tomtom.lua"] = true, ["tomtom.lua"] = true,
["textviewer.lua"] = true, ["textviewer.lua"] = true,
@ -247,35 +257,6 @@ QH_Event("ADDON_LOADED", function (addonid)
["radar.lua"] = true, ["radar.lua"] = true,
["config.lua"] = true, ["config.lua"] = true,
--[[
["static.lua"] = true,
["static_1.lua"] = true,
["static_2.lua"] = true,
["static_deDE.lua"] = true,
["static_deDE_1.lua"] = true,
["static_deDE_2.lua"] = true,
["static_enUS.lua"] = true,
["static_enUS_1.lua"] = true,
["static_enUS_2.lua"] = true,
["static_esES.lua"] = true,
["static_esES_1.lua"] = true,
["static_esES_2.lua"] = true,
["static_esMX.lua"] = true,
["static_esMX_1.lua"] = true,
["static_esMX_2.lua"] = true,
["static_frFR.lua"] = true,
["static_frFR_1.lua"] = true,
["static_frFR_2.lua"] = true,
["static_koKR.lua"] = true,
["static_koKR_1.lua"] = true,
["static_koKR_2.lua"] = true,
["static_ruRU.lua"] = true,
["static_ruRU_1.lua"] = true,
["static_ruRU_2.lua"] = true,
["static_zhTW.lua"] = true,
["static_zhTW_1.lua"] = true,
["static_zhTW_2.lua"] = true,
--]]
["collect.lua"] = true, ["collect.lua"] = true,
["collect_achievement.lua"] = true, ["collect_achievement.lua"] = true,
["collect_lzw.lua"] = true, ["collect_lzw.lua"] = true,
@ -300,24 +281,24 @@ QH_Event("ADDON_LOADED", function (addonid)
["collect_merchant.lua"] = true, ["collect_merchant.lua"] = true,
["collect_warp.lua"] = true, ["collect_warp.lua"] = true,
["filter_core.lua"] = true, -- ["filter_core.lua"] = true,
["filter_base.lua"] = true, -- ["filter_base.lua"] = true,
["routing_debug.lua"] = true, -- ["routing_debug.lua"] = true,
["routing_loc.lua"] = true, -- ["routing_loc.lua"] = true,
["routing_route.lua"] = true, -- ["routing_route.lua"] = true,
["routing_core.lua"] = true, -- ["routing_core.lua"] = true,
["routing_controller.lua"] = true, -- ["routing_controller.lua"] = true,
["routing_hidden.lua"] = true, -- ["routing_hidden.lua"] = true,
["director_quest.lua"] = true, -- ["director_quest.lua"] = true,
["director_achievement.lua"] = true, -- ["director_achievement.lua"] = true,
["director_find.lua"] = true, -- ["director_find.lua"] = true,
["db_get.lua"] = true, -- ["db_get.lua"] = true,
["graph_core.lua"] = true, -- ["graph_core.lua"] = true,
["graph_flightpath.lua"] = true, -- ["graph_flightpath.lua"] = true,
["AstrolabeQH/Astrolabe.lua"] = true, ["AstrolabeQH/Astrolabe.lua"] = true,
["AstrolabeQH/AstrolabeMapMonitor.lua"] = true, ["AstrolabeQH/AstrolabeMapMonitor.lua"] = true,
@ -416,15 +397,15 @@ QH_Event("ADDON_LOADED", function (addonid)
-- 4.0.3a Breakage related -- 4.0.3a Breakage related
local datime = time() + 30 -- We're gonna wait 30 seconds, just in case. local datime = time() + 30 -- We're gonna wait 30 seconds, just in case.
--while datime >= time() do --[[sleep (busy wait)]] end --while datime >= time() do --[[sleep (busy wait)]] end
QuestHelper_BuildZoneLookup() --QuestHelper_BuildZoneLookup()
QH_Graph_Init() --QH_Graph_Init()
load_graph_links() --load_graph_links()
if QuestHelper_Locale ~= GetLocale() then if QuestHelper_Locale ~= GetLocale() then
self:TextOut(QHText("LOCALE_ERROR")) self:TextOut(QHText("LOCALE_ERROR"))
return return
end end
--[[
if not self:ZoneSanity() then if not self:ZoneSanity() then
self:TextOut(QHFormat("ZONE_LAYOUT_ERROR", expected_version)) self:TextOut(QHFormat("ZONE_LAYOUT_ERROR", expected_version))
QH_fixedmessage(QHFormat("ZONE_LAYOUT_ERROR", expected_version)) QH_fixedmessage(QHFormat("ZONE_LAYOUT_ERROR", expected_version))
@ -439,7 +420,7 @@ QH_Event("ADDON_LOADED", function (addonid)
self:TextOut(QHFormat("NAG_POLLUTED")) self:TextOut(QHFormat("NAG_POLLUTED"))
self:Purge(nil, true, true) self:Purge(nil, true, true)
end end
--]]
local signature = expected_version .. " on " .. GetBuildInfo() local signature = expected_version .. " on " .. GetBuildInfo()
QuestHelper_Quests[signature] = QuestHelper_Quests[signature] or {} QuestHelper_Quests[signature] = QuestHelper_Quests[signature] or {}
QuestHelper_Objectives[signature] = QuestHelper_Objectives[signature] or {} QuestHelper_Objectives[signature] = QuestHelper_Objectives[signature] or {}
@ -456,7 +437,7 @@ QH_Event("ADDON_LOADED", function (addonid)
QuestHelper.loading_init3:SetPercentage(0.1) QuestHelper.loading_init3:SetPercentage(0.1)
QH_Collector_Init() QH_Collector_Init()
QuestHelper.loading_init3:SetPercentage(0.5) QuestHelper.loading_init3:SetPercentage(0.5)
DB_Init() --DB_Init()
QuestHelper.loading_init3:SetPercentage(0.9) QuestHelper.loading_init3:SetPercentage(0.9)
self.player_level = UnitLevel("player") self.player_level = UnitLevel("player")
@ -527,14 +508,14 @@ QH_Event("ADDON_LOADED", function (addonid)
end end
if QuestHelper_Pref.map_button then if QuestHelper_Pref.map_button then
QuestHelper:InitMapButton() -- QuestHelper:InitMapButton()
end end
if QuestHelper_Pref.tomtom_wp_new then if QuestHelper_Pref.tomtom_wp_new then
self:EnableTomTom() -- self:EnableTomTom()
end end
self.tracker:SetScale(QuestHelper_Pref.track_scale) -- self.tracker:SetScale(QuestHelper_Pref.track_scale)
local version = GetAddOnMetadata("QuestHelper", "Version") or "Unknown" local version = GetAddOnMetadata("QuestHelper", "Version") or "Unknown"
@ -591,11 +572,11 @@ QH_Event("ADDON_LOADED", function (addonid)
QH_Event("TAXIMAP_OPENED", function () QH_Event("TAXIMAP_OPENED", function ()
self:taxiMapOpened() self:taxiMapOpened()
end) end)
--[[
QH_Event({"ZONE_CHANGED", "ZONE_CHANGED_INDOORS", "ZONE_CHANGED_NEW_AREA"}, function() QH_Event({"ZONE_CHANGED", "ZONE_CHANGED_INDOORS", "ZONE_CHANGED_NEW_AREA"}, function()
QH_Route_Filter_Rescan(nil, true) QH_Route_Filter_Rescan(nil, true)
end) end)
]]
QH_Event("CHAT_MSG_CHANNEL_NOTICE", function() QH_Event("CHAT_MSG_CHANNEL_NOTICE", function()
if please_submit_enabled and not please_submit_initted then if please_submit_enabled and not please_submit_initted then
please_submit_enabled = QHNagInit() please_submit_enabled = QHNagInit()
@ -967,12 +948,12 @@ Thanks for testing!]], "QuestHelper " .. version_string, 500, 20, 10)
end end
end end
if nc and nz > 0 and QuestHelper_IndexLookup[nc] then -- QuestHelper_IndexLookup is only initialized after we've finished the preinit step if nc and nz > 0 then --and QuestHelper_IndexLookup[nc] then -- QuestHelper_IndexLookup is only initialized after we've finished the preinit step
self.c, self.z, self.x, self.y = nc, nz, nx, ny self.c, self.z, self.x, self.y = nc, nz, nx, ny
local upd_zone = false local upd_zone = false
if self.i ~= QuestHelper_IndexLookup[nc][nz] then upd_zone = true end --if self.i ~= QuestHelper_IndexLookup[nc][nz] then upd_zone = true end
self.i = QuestHelper_IndexLookup[nc][nz] --self.i = QuestHelper_IndexLookup[nc][nz]
if upd_zone then QH_Route_Filter_Rescan("filter_zone") end --if upd_zone then QH_Route_Filter_Rescan("filter_zone") end
end end
if nc and nz and nx and ny and tc and tx and ty then if nc and nz and nx and ny and tc and tx and ty then

Voir le fichier

@ -22,31 +22,32 @@ local dependancy_quest_list = GetQuestsCompleted()
local static_alliance_landings = local static_alliance_landings =
{ {
{12, 0.476, 0.598, "Exodar via portal"}, -- Exodar {471, 0.476, 0.598, "Exodar via portal"}, -- Exodar
{21, 0.435, 0.787, "Darnassus via portal"}, -- Darnassus {381, 0.435, 0.787, "Darnassus via portal"}, -- Darnassus
{36, 0.496, 0.865, "Stormwind via portal"}, -- Stormwind {301, 0.496, 0.865, "Stormwind via portal"}, -- Stormwind
{25, 0.255, 0.084, "Ironforge via portal"}, -- Ironforge {341, 0.255, 0.084, "Ironforge via portal"}, -- Ironforge
{10, 0.660, 0.490, "Theramore via portal"}, -- Theramore {141, 0.660, 0.490, "Theramore via portal"}, -- Theramore, Dustwallow Marsh
} }
local static_horde_landings = local static_horde_landings =
{ {
{1, 0.483, 0.645, "Orgrimmar via portal"}, -- Orgrimmar {321, 0.483, 0.645, "Orgrimmar via portal"}, -- Orgrimmar
{23, 0.222, 0.169, "Thunder Bluff via portal"}, -- Thunder Bluff {362, 0.222, 0.169, "Thunder Bluff via portal"}, -- Thunder Bluff
{45, 0.845, 0.163, "Undercity via portal"}, -- Undercity {382, 0.845, 0.163, "Undercity via portal"}, -- Undercity
{52, 0.583, 0.192, "Silvermoon City via portal"}, -- Silvermoon City {480, 0.583, 0.192, "Silvermoon City via portal"}, -- Silvermoon City
{46, 0.498, 0.558, "Stonard via portal"}, -- Stonard {38, 0.498, 0.558, "Stonard via portal"}, -- Stonard, Swamp of Sorrows
} }
local static_shared_landings = local static_shared_landings =
{ {
{67, 0.559, 0.468, "Dalaran via portal"}, -- Dalaran {504, 0.559, 0.468, "Dalaran via portal"}, -- Dalaran
{60, 0.550, 0.402, "Shattrath via portal"}, -- Shattrath {481, 0.550, 0.402, "Shattrath via portal"}, -- Shattrath
-- Need Tol Barad Port In coordinates -- Need Tol Barad Port In coordinates
-- Highly doubtful that Tol Barad Port In Coordinates are the same.
} }
if IsSpellKnown(18960) then if IsSpellKnown(18960) then
local static_druid_landings = {20,0.563,0.324, "Moonglade via spell"} -- Moonglade landing local static_druid_landings = {241,0.563,0.324, "Moonglade via spell"} -- Moonglade landing
end end
-- end whimsey -- end whimsey
@ -55,33 +56,33 @@ end
-- More storage -- More storage
-- Contingent on player's faction controlling the zone -- Contingent on player's faction controlling the zone
-- {{74, 0.491, 0.153}, {67, 0.268, 0.447}, 5, true}, -- Wingergrasp Keep --> Dalaran -- {{501, 0.491, 0.153}, {504, 0.268, 0.447}, 5, true}, -- Wingergrasp Keep --> Dalaran
-- {{175, 0.472, 0.519}, ORGRIMMAR_CATPORTAL_IN, 60, true}, -- Tol Barad --> Orgrimmar (If Horde Controlled) -- {{708, 0.472, 0.519}, ORGRIMMAR_CATPORTAL_IN, 60, true}, -- Tol Barad --> Orgrimmar (If Horde Controlled)
-- {{175, 0.472, 0.519}, STORMWIND_CATPORTAL_IN, 60, true}, -- Tol Barad --> Stormwind (If Alliance Controlled) -- {{708, 0.472, 0.519}, STORMWIND_CATPORTAL_IN, 60, true}, -- Tol Barad --> Stormwind (If Alliance Controlled)
-- end storage -- end storage
local BLASTED_LANDS_PORTAL_IN = {33, 0.539, 0.461, "Blasted Lands via portal"} local BLASTED_LANDS_PORTAL_IN = {19, 0.539, 0.461, "Blasted Lands via portal"}
local ORGRIMMAR_CATPORTAL_IN = {1, 0.500, 0.377, "Orgrimmar via portal"} local ORGRIMMAR_CATPORTAL_IN = {321, 0.500, 0.377, "Orgrimmar via portal"}
-- local STORMWIND_CATPORTAL_IN -- local STORMWIND_CATPORTAL_IN
local static_horde_routes = local static_horde_routes =
{ {
-- Portals -- Portals
{{1, 0.471, 0.618}, BLASTED_LANDS_PORTAL_IN, 60, true, level_limit = 58}, -- Orgrimmar --> Dark Portal {{321, 0.471, 0.618}, BLASTED_LANDS_PORTAL_IN, 60, true, level_limit = 58}, -- Orgrimmar --> Dark Portal
{{45, 0.853, 0.171}, BLASTED_LANDS_PORTAL_IN, 5, true, level_limit = 58}, -- Undercity --> Dark Portal {{382, 0.853, 0.171}, BLASTED_LANDS_PORTAL_IN, 5, true, level_limit = 58}, -- Undercity --> Dark Portal
{{23, 0.232, 0.135}, BLASTED_LANDS_PORTAL_IN, 60, true, level_limit = 58}, -- Thunder Bluff --> Dark Portal {{362, 0.232, 0.135}, BLASTED_LANDS_PORTAL_IN, 60, true, level_limit = 58}, -- Thunder Bluff --> Dark Portal
{{52, 0.584, 0.210}, BLASTED_LANDS_PORTAL_IN, 60, true, level_limit = 58}, -- Silvermoon --> Dark Portal {{480, 0.584, 0.210}, BLASTED_LANDS_PORTAL_IN, 60, true, level_limit = 58}, -- Silvermoon --> Dark Portal
-- I'm really not concerned that the landing points are different. This is a self-contained method. -- I'm really not concerned that the landing points are different. This is a self-contained method.
-- It won't affect anything that we don't have two one-way paths here. -- It won't affect anything that we don't have two one-way paths here.
{{45, 0.549, 0.113}, {52, 0.495, 0.148}, 60}, -- Undercity <--> Silvermoon City {{382, 0.549, 0.113}, {480, 0.495, 0.148}, 60}, -- Undercity <--> Silvermoon City
{{56, 0.886, 0.477}, {1, 0.483, 0.645}, 60, true}, -- Hellfire Peninsula --> Orgrimmar {{465, 0.886, 0.477}, {321, 0.483, 0.645}, 60, true}, -- Hellfire Peninsula --> Orgrimmar
{{184, 0.736, 0.535}, ORGRIMMAR_CATPORTAL_IN, 60, true}, -- Twilight Highlands --> Orgrimmar {{700, 0.736, 0.535}, ORGRIMMAR_CATPORTAL_IN, 60, true}, -- Twilight Highlands --> Orgrimmar
{{1, 0.475, 0.392}, {176, 0.560, 0.799}, 60, false, level_limit = 85}, -- Orgrimmar <--> Tol Barad Peninsula {{321, 0.475, 0.392}, {709, 0.560, 0.799}, 60, false, level_limit = 85}, -- Orgrimmar <--> Tol Barad Peninsula
-- Okay, I give. Since I haven't actually been through these portals, I don't really have a frame -- Okay, I give. Since I haven't actually been through these portals, I don't really have a frame
@ -99,35 +100,35 @@ local static_horde_routes =
-- Orgrimmar --> Temple of Earth (Aqua) -- Orgrimmar --> Temple of Earth (Aqua)
-- Level limit because the quest to open requires level 82. -- Level limit because the quest to open requires level 82.
{{179, 0.509, 0.531}, ORGRIMMAR_CATPORTAL_IN, 60, true}, -- Temple of Earth (Aqua) --> Orgrimmar {{640, 0.509, 0.531}, ORGRIMMAR_CATPORTAL_IN, 60, true}, -- Temple of Earth (Aqua) --> Orgrimmar
{{1, 0.508, 0.363}, {179, 0.506, 0.529}, 60, true, level_limit = 82}, -- Orgrimmar --> Deepholm {{321, 0.508, 0.363}, {640, 0.506, 0.529}, 60, true, level_limit = 82}, -- Orgrimmar --> Deepholm
-- Level limit because the quest to open requires level 82. -- Level limit because the quest to open requires level 82.
{{1, 0.511, 0.383}, {198, 0.635, 0.234}, 60, true, level_limit = 80}, -- Orgrimmar --> Mount Hyjal {{321, 0.511, 0.383}, {606, 0.635, 0.234}, 60, true, level_limit = 80}, -- Orgrimmar --> Mount Hyjal
-- Level limit because the quest to open requires level 80. -- Level limit because the quest to open requires level 80.
{{1, 0.502, 0.394}, {184, 0.736, 0.534}, 60, true, level_limit = 84}, -- Orgrimmar --> Twilight Highlands {{321, 0.502, 0.394}, {700, 0.736, 0.534}, 60, true, level_limit = 84}, -- Orgrimmar --> Twilight Highlands
-- Level limit because the quest to open requires level 84. -- Level limit because the quest to open requires level 84.
{{1, 0.489, 0.386}, {164, 0.549, 0.342}, 5, true, level_limit = 83}, -- Orgrimmar --> Uldum {{321, 0.489, 0.386}, {720, 0.549, 0.342}, 5, true, level_limit = 83}, -- Orgrimmar --> Uldum
-- Level limit because the quest to open requires level 83. -- Level limit because the quest to open requires level 83.
{{1, 0.492, 0.365}, {165, 0.514, 0.609}, 60, true, level_limit = 80}, -- Orgrimmar --> Vashj'ir {{321, 0.492, 0.365}, {613, 0.514, 0.609}, 60, true, level_limit = 80}, -- Orgrimmar --> Vashj'ir
-- Level limit because the quest to open requires level 80. -- Level limit because the quest to open requires level 80.
-- Zepplins -- Zepplins
{{1, 0.526, 0.529}, {168, 0.372, 0.525}, 210}, -- Orgrimmar <--> Grom'gol Base Camp {{321, 0.526, 0.529}, {37, 0.372, 0.525}, 210}, -- Orgrimmar <--> Grom'gol Base Camp
{{1, 0.506, 0.561}, {43, 0.607, 0.588}, 210}, -- Orgrimmar <--> Tirisfal Glades {{321, 0.506, 0.561}, {20, 0.607, 0.588}, 210}, -- Orgrimmar <--> Tirisfal Glades
{{1, 0.428, 0.653}, {23, 0.152, 0.257}, 210}, -- Orgrimmar <--> Thunder Bluff {{321, 0.428, 0.653}, {362, 0.152, 0.257}, 210}, -- Orgrimmar <--> Thunder Bluff
{{1, 0.449, 0.619}, {65, 0.414, 0.536}, 210}, -- Orgrimmar <--> Warsong Hold {{321, 0.449, 0.619}, {486, 0.414, 0.536}, 210}, -- Orgrimmar <--> Warsong Hold, Borean Tundra
{{43, 0.619, 0.591}, {168, 0.374, 0.509}, 210}, -- Tirisfal Glades <--> Grom'gol Base Camp {{20, 0.619, 0.591}, {37, 0.374, 0.509}, 210}, -- Tirisfal Glades <--> Grom'gol Base Camp, Northern Stranglethorn
{{43, 0.590, 0.590}, {70, 0.777, 0.282}, 210}, -- Tirisfal Glades <--> Vengeance Landing {{20, 0.590, 0.590}, {491, 0.777, 0.282}, 210}, -- Tirisfal Glades <--> Vengeance Landing
-- Ships -- Ships
{{184, 0.735, 0.528}, {184, 0.767, 0.152}, 210}, -- Dragonmaw Port <--> Krazzworks {{700, 0.735, 0.528}, {700, 0.767, 0.152}, 210}, -- Dragonmaw Port, Twilight Highlands <--> Krazzworks, Twilight Highlands
-- QuestHelper does not appear to like transitions from within the same zone. Gonna have to figure this out. -- QuestHelper does not appear to like transitions from within the same zone. Gonna have to figure this out.
} }
@ -136,20 +137,20 @@ local static_horde_routes =
local static_alliance_routes = local static_alliance_routes =
{ {
-- Portals -- Portals
{{21,0.440,0.782}, BLASTED_LANDS_PORTAL_IN, 60, true, level_limit = 58}, -- Darnassus --> Dark Portal {{381,0.440,0.782}, BLASTED_LANDS_PORTAL_IN, 60, true, level_limit = 58}, -- Darnassus --> Dark Portal
{{12,0.482,0.630}, BLASTED_LANDS_PORTAL_IN, 60, true, level_limit = 58}, -- Exodar --> Dark Portal {{471,0.482,0.630}, BLASTED_LANDS_PORTAL_IN, 60, true, level_limit = 58}, -- Exodar --> Dark Portal
{{25,0.273,0.070}, BLASTED_LANDS_PORTAL_IN, 5, true, level_limit = 58}, -- Ironforge --> Dark Portal {{341,0.273,0.070}, BLASTED_LANDS_PORTAL_IN, 5, true, level_limit = 58}, -- Ironforge --> Dark Portal
{{36,0.490,0.874}, BLASTED_LANDS_PORTAL_IN, 5, true, level_limit = 58}, -- Stormwind --> Dark Portal {{301,0.490,0.874}, BLASTED_LANDS_PORTAL_IN, 5, true, level_limit = 58}, -- Stormwind --> Dark Portal
{{56, 0.886, 0.528}, {36, 0.496, 0.865}, 60, true}, -- Hellfire Peninsula --> Stormwind {{465, 0.886, 0.528}, {301, 0.496, 0.865}, 60, true}, -- Hellfire Peninsula --> Stormwind
{{21, 0.442, 0.788}, {12, 0.476, 0.598}, 5, true}, -- Darnassus --> Exodar {{381, 0.442, 0.788}, {471, 0.476, 0.598}, 5, true}, -- Darnassus --> Exodar
{{12, 0.476, 0.619}, {21, 0.435, 0.787}, 5, true}, -- Exodar --> Darnassus {{471, 0.476, 0.619}, {381, 0.435, 0.787}, 5, true}, -- Exodar --> Darnassus
-- Stormwind --> Tol Barad? -- Stormwind --> Tol Barad?
{{36, 0.734, 0.195}, {179, 0.487, 0.536}, 60, true, level_limit = 82}, -- Stormwind --> Temple of Earth (Amber) {{301, 0.734, 0.195}, {640, 0.487, 0.536}, 60, true, level_limit = 82}, -- Stormwind --> Temple of Earth (Amber)
-- Level limit because the quest to open requires level 82. -- Level limit because the quest to open requires level 82.
{{179, 0.486, 0.537}, {36, 0.745, 0.183}, 60, true}, -- Temple of Earth (Amber) --> Stormwind {{640, 0.486, 0.537}, {301, 0.745, 0.183}, 60, true}, -- Temple of Earth (Amber) --> Stormwind
-- Stormwind <--> Deepholm -- Stormwind <--> Deepholm
-- Stormwind <--> Mount Hyjal -- Stormwind <--> Mount Hyjal
@ -158,87 +159,79 @@ local static_alliance_routes =
-- Stormwind <--> Vashj'ir -- Stormwind <--> Vashj'ir
-- Ships -- Ships
{{36, 0.180, 0.285}, {65, 0.597, 0.694}, 210}, -- Stormwind <--> Valiance Keep {{301, 0.180, 0.285}, {486, 0.597, 0.694}, 210}, -- Stormwind <--> Valiance Keep, Borean Tundra
-- Deeprun Tram (Wonder if this needs to be handled differently because of it's nature but this will suffice for now) -- Deeprun Tram (Wonder if this needs to be handled differently because of it's nature but this will suffice for now).
{{36, 0.696, 0.311}, {25, 0.770, 0.513}, 180}, -- Stormwind <--> Ironforge -- As it turns out, the mapid for deeprun tram is sw, so no need to do any special handling.
{{301, 0.696, 0.311}, {341, 0.770, 0.513}, 180}, -- Stormwind <--> Ironforge
-- Partially checked -- Partially checked
-- Unchecked (Do these still exist?)
{{10, 0.718, 0.565}, {51, 0.047, 0.636}, 210}, -- Theramore Isle <--> Menethil Harbor
{{51, 0.047, 0.571}, {70, 0.612, 0.626}, 210}, -- Menethil <--> Daggercap Bay
-- Nate's Cataclysm content -- Nate's Cataclysm content
{{207, 0.54, 0.60}, {205, 0.30, 0.72}, 10}, -- Gilneas Zone <--> Greymane Court, Gilneas City. Exists solely to fix some pathing crashes. (We want to make an adjustment to the coords though.) {{684, 0.54, 0.60}, {685, 0.30, 0.72}, 10}, -- Gilneas Zone <--> Greymane Court, Gilneas City. Exists solely to fix some pathing crashes. (We want to make an adjustment to the coords though.)
{{207, 0.55, 0.42}, {205, 0.28, 0.21}, 5}, -- Gilneas Zone <--> Cathedral Square, Gilneas City. Exists solely to fix some pathing crashes. (We want to make an adjustment to the coords though.) {{684, 0.55, 0.42}, {685, 0.28, 0.21}, 5}, -- Gilneas Zone <--> Cathedral Square, Gilneas City. Exists solely to fix some pathing crashes. (We want to make an adjustment to the coords though.)
{{207, 0.66, 0.42}, {205, 0.67, 0.20}, 5}, -- Gilneas Zone <--> Merchant Square, Gilneas City. Exists solely to fix some pathing crashes. (We want to make an adjustment to the coords though.) {{684, 0.66, 0.42}, {685, 0.67, 0.20}, 5}, -- Gilneas Zone <--> Merchant Square, Gilneas City. Exists solely to fix some pathing crashes. (We want to make an adjustment to the coords though.)
{{207, 0.68, 0.62}, {205, 0.69, 0.82}, 10}, -- Gilneas Zone <--> Military District, Gilneas City. Exists solely to fix some pathing crashes. (We want to make an adjustment to the coords though.) {{684, 0.68, 0.62}, {685, 0.69, 0.82}, 10}, -- Gilneas Zone <--> Military District, Gilneas City. Exists solely to fix some pathing crashes. (We want to make an adjustment to the coords though.)
{{207, 0.42, 0.36}, {24, 0.52, 0.89}, 86400}, -- Gilneas Zone <--> Teldrassil. Exists solely to fix some pathing crashes. 24-hour boat ride :D (This will be deleted later, when we can create the "official" path.) {{684, 0.42, 0.36}, {41, 0.52, 0.89}, 86400}, -- Gilneas Zone <--> Teldrassil. Exists solely to fix some pathing crashes. 24-hour boat ride :D (This will be deleted later, when we can create the "official" path.)
} }
local static_shared_routes = local static_shared_routes =
{ {
-- Portals -- Portals
{{67, 0.268, 0.447}, {67, 0.240, 0.394}, 5}, -- Dalaran (Violet Citadel) <--> Dalaran (Purple Parlor) {{504, 0.268, 0.447}, {504, 0.240, 0.394}, 5}, -- Dalaran (Violet Citadel) <--> Dalaran (Purple Parlor)
{{67, 0.559, 0.468}, {66, 0.158, 0.428}, 5}, -- Dalaran <--> Crystalsong Forest {{504, 0.559, 0.468}, {510, 0.158, 0.428}, 5}, -- Dalaran <--> Crystalsong Forest
--{{67, 0.559, 0.468}, {66, 0.158, 0.428}, 5, false, level_limit = 68}, -- Dalaran <--> Crystalsong Forest --{{504, 0.559, 0.468}, {510, 0.158, 0.428}, 5, false, level_limit = 68}, -- Dalaran <--> Crystalsong Forest
{{24, 0.551, 0.885}, {21, 0.369, 0.584}, 5}, -- Rut'Theran Village <--> Darnassus {{41, 0.551, 0.885}, {381, 0.369, 0.584}, 5}, -- Rut'Theran Village, Teldrassil <--> Darnassus
{{33, 0.550, 0.541}, {56, 0.898, 0.502}, 60}, -- Blasted Lands <--> Hellfire Peninsula (Dark Portal) {{19, 0.550, 0.541}, {465, 0.898, 0.502}, 60}, -- Blasted Lands <--> Hellfire Peninsula (Dark Portal)
{{67, 0.255, 0.514}, {8, 0.652, 0.498}, 60, true}, -- Dalaran --> Caverns of Time {{504, 0.255, 0.514}, {161, 0.652, 0.498}, 60, true}, -- Dalaran --> Caverns of Time
{{60, 0.486, 0.420}, {64, 0.482, 0.345}, 60, true}, -- Shattrath --> Isle of Quel'Danas {{481, 0.486, 0.420}, {499, 0.482, 0.345}, 60, true}, -- Shattrath --> Isle of Quel'Danas
{{60, 0.747, 0.316}, {8, 0.652, 0.498}, 60, true}, -- Shattrath --> Caverns of Time {{481, 0.747, 0.316}, {161, 0.652, 0.498}, 60, true}, -- Shattrath --> Caverns of Time
-- Requires Revered with Keepers of Time -- Requires Revered with Keepers of Time
{{179, 0.493, 0.504}, {179, 0.571, 0.135}, 5, false, level_limit = 81}, -- Temple of Earth <--> Therazane's Throne {{640, 0.493, 0.504}, {640, 0.571, 0.135}, 5, false, level_limit = 81}, -- Temple of Earth <--> Therazane's Throne
-- Requires Honored with Therazane and dependant on quest #26709 -- Requires Honored with Therazane and dependant on quest #26709
-- Ships -- Ships
{{68, 0.497, 0.784}, {70, 0.234, 0.578}, 210}, -- Moa'ki <--> Kamagua {{488, 0.497, 0.784}, {491, 0.234, 0.578}, 210}, -- Moa'ki <--> Kamagua
{{68, 0.479, 0.788}, {65, 0.789, 0.537}, 210}, -- Moa'ki <--> Unu'pe {{488, 0.479, 0.788}, {486, 0.789, 0.537}, 210}, -- Moa'ki <--> Unu'pe
{{174, 0.390, 0.670}, {11, 0.702, 0.733}, 210}, -- Booty Bay <--> Ratchet {{673, 0.390, 0.670}, {11, 0.702, 0.733}, 210}, -- Booty Bay, Cape of Stranglethorn <--> Ratchet
-- Leave here to keep QH from self-destructing -- Leave here to keep QH from self-destructing
{{24, 0.522, 0.895}, {3, 0.203, 0.540}, 210}, -- Teldrassil <--> Azuremyst Isle {{41, 0.522, 0.895}, {464, 0.203, 0.540}, 210}, -- Teldrassil <--> Azuremyst Isle
{{24, 0.550, 0.938}, {36, 0.223, 0.560}, 210}, -- Teldrassil <--> Stormwind {{41, 0.550, 0.938}, {301, 0.223, 0.560}, 210}, -- Teldrassil <--> Stormwind
-- Unchecked -- Unchecked
{{40, 0.318, 0.503}, {32, 0.347, 0.84}, 130}, -- Burning Steppes <--> Searing Gorge {{29, 0.318, 0.503}, {28, 0.347, 0.84}, 130}, -- Burning Steppes <--> Searing Gorge
-- Route to new zone. Not valid, exists only to keep routing from exploding if you don't have the flight routes there. -- Route to new zone. Not valid, exists only to keep routing from exploding if you don't have the flight routes there.
{{41, 0.5, 0.5}, {64, 0.484, 0.251}, 7200}, -- Eversong Woods <--> Sunwell {{462, 0.5, 0.5}, {499, 0.484, 0.251}, 7200}, -- Eversong Woods <--> Sunwell
{{34, 0.817, 0.461}, {78, 0.492, 0.312}, 86400}, -- EPL Ebon Hold <--> Scarlet Enclave Ebon Hold. Exists solely to fix some pathing crashes. 24-hour boat ride :D {{23, 0.817, 0.461}, {502, 0.492, 0.312}, 86400}, -- EPL Ebon Hold <--> Scarlet Enclave Ebon Hold. Exists solely to fix some pathing crashes. 24-hour boat ride :D
-- Nate's Cataclysm content -- Nate's Cataclysm content
{{178, 0.83, 0.34}, {167, 0.45, 0.23}, 210, true}, -- Vash'jir --> Vash'jir Kelp Forest (One time, One way) {{613, 0.83, 0.34}, {610, 0.45, 0.23}, 210, true}, -- Vash'jir --> Vash'jir Kelp Forest (One time, One way)
{{167, 0.69, 0.60}, {178, 0.80, 0.30}, 5}, -- Vash'jir Kelp Forest <--> Vash'jir {{610, 0.69, 0.60}, {613, 0.80, 0.30}, 5}, -- Vash'jir Kelp Forest <--> Vash'jir
{{178, 0.84, 0.23}, {62, 0.37, 0.58}, 5}, -- Vash'jir <--> The Great Sea (EK Continent, zone 0) {{613, 0.84, 0.23}, {-1, 0.37, 0.58}, 5}, -- Vash'jir <--> The Great Sea (EK Continent, zone 0)
{{62, 0.39, 0.60}, {28, 0.00, 0.20}, 5}, -- The Great Sea (EK Continent, zone 0) <--> Dun Morogh {{-1, 0.39, 0.60}, {27, 0.00, 0.20}, 5}, -- The Great Sea (EK Continent, zone 0) <--> Dun Morogh
{{167, 0.40, 0.64}, {171, 0.56, 0.14}, 5}, -- VKF <--> SE {{610, 0.40, 0.64}, {615, 0.56, 0.14}, 5}, -- VKF <--> SE
{{178, 0.50, 0.28}, {165, 0.72, 0.04}, 5}, -- Vash <--> Vash'jir Depths {{613, 0.50, 0.28}, {614, 0.72, 0.04}, 5}, -- Vash <--> Vash'jir Depths
{{198, 0.85, 0.41}, {19, 0.58, 0.91}, 5}, -- Hyjal <--> Winterspring {{606, 0.85, 0.41}, {281, 0.58, 0.91}, 5}, -- Hyjal <--> Winterspring
{{185, 0.85, 0.41}, {19, 0.58, 0.91}, 5}, -- Hyjal <--> Winterspring {{684, 0.5, 0.5}, {685, 0.5, 0.5}, 5}, -- Ruins of Gilneas <--> Ruins of Gilneas City (Meta info, map doesn't change properly as of 2010-12-11-0156UET)
{{169, 0.5, 0.5}, {170, 0.5, 0.5}, 5}, -- Ruins of Gilneas <--> Ruins of Gilneas City (Meta info, map doesn't change properly as of 2010-12-11-0156UET) {{640, 0.5, 0.5}, {605, 0.5, 0.5}, 86400}, -- DeepHolm <--> Kezan (Meta info for when major error is fixed.)
{{179, 0.5, 0.5}, {180, 0.5, 0.5}, 86400}, -- DeepHolm <--> Kezan (Meta info for when major error is fixed.) {{544, 0.24, 0.77}, {605, 0.22, 0.17}, 90}, -- The Lost Isles <--> Kezan (Meta info for when major error is fixed.)
{{181, 0.24, 0.77}, {180, 0.22, 0.17}, 90}, -- The Lost Isles <--> Kezan (Meta info for when major error is fixed.) {{544, 0.5, 0.5}, {737, 0.5, 0.5}, 86400}, -- The Lost Isles <--> The Maelstrom (Meta info for when major error is fixed.)
{{208, 0.24, 0.77}, {180, 0.22, 0.17}, 90}, -- The Lost Isles <--> Kezan (Meta info for when major error is fixed.) {{751, 0.5, 0.5}, {737, 0.5, 0.5}, 86400}, -- The Maelstrom Continent <--> The Maelstrom (Meta info for when major error is fixed.)
{{209, 0.24, 0.77}, {180, 0.22, 0.17}, 90}, -- The Lost Isles <--> Kezan (Meta info for when major error is fixed.) {{751, 0.5, 0.5}, {321, 0.5, 0.5}, 86400}, -- The Maelstrom Continent <--> Orgrimmar (Meta info for when major error is fixed.)
{{181, 0.5, 0.5}, {182, 0.5, 0.5}, 86400}, -- The Lost Isles <--> The Maelstrom (Meta info for when major error is fixed.)
{{183, 0.5, 0.5}, {182, 0.5, 0.5}, 86400}, -- The Maelstrom Continent <--> The Maelstrom (Meta info for when major error is fixed.)
{{183, 0.5, 0.5}, {1, 0.5, 0.5}, 86400}, -- The Maelstrom Continent <--> Orgrimmar (Meta info for when major error is fixed.)
{{164, 0.84, 0.41}, {8, 0.37, 0.82}, 5}, -- Uldum <--> Tanaris {{720, 0.84, 0.41}, {161, 0.37, 0.82}, 5}, -- Uldum <--> Tanaris
{{164, 0.70, 0.22}, {8, 0.25, 0.66}, 5}, -- Uldum <--> Tanaris {{720, 0.70, 0.22}, {161, 0.25, 0.66}, 5}, -- Uldum <--> Tanaris
{{210, 0.84, 0.41}, {8, 0.37, 0.82}, 5}, -- Uldum <--> Tanaris
{{210, 0.70, 0.22}, {8, 0.25, 0.66}, 5}, -- Uldum <--> Tanaris
{{35, 0.45, 0.85}, {169, 0.60, 0.09}, 5}, -- Silverpine <--> Ruins of Gilneas
{{21, 0.45, 0.85}, {684, 0.60, 0.09}, 5}, -- Silverpine <--> Ruins of Gilneas
--[==[
-- Wrath instance entrances -- Wrath instance entrances
{{80, 0.693, 0.730}, {70, 0.573, 0.467}, 5}, -- UK {{80, 0.693, 0.730}, {70, 0.573, 0.467}, 5}, -- UK
{{86, 0.362, 0.880}, {65, 0.275, 0.260}, 5}, -- Nexus {{86, 0.362, 0.880}, {65, 0.275, 0.260}, 5}, -- Nexus
@ -299,16 +292,17 @@ local static_shared_routes =
{{144, 0.500, 0.500}, {148, 0.500, 0.500}, 5}, {{144, 0.500, 0.500}, {148, 0.500, 0.500}, 5},
{{144, 0.500, 0.500}, {150, 0.500, 0.500}, 5}, {{144, 0.500, 0.500}, {150, 0.500, 0.500}, 5},
{{144, 0.500, 0.500}, {152, 0.500, 0.500}, 5}, {{144, 0.500, 0.500}, {152, 0.500, 0.500}, 5},
--]==]
} }
-- Darkportal is handled specially, depending on whether or not you're level 58+ or not. -- Darkportal is handled specially, depending on whether or not you're level 58+ or not.
local dark_portal_route = {{33, 0.550, 0.541}, {56, 0.898, 0.502}, 60} local dark_portal_route = {{19, 0.550, 0.541}, {465, 0.898, 0.502}, 60}
-- Waygate -- Waygate
local ridingLevel = (select(4,GetAchievementInfo(892)) and 300) or (select(4,GetAchievementInfo(890)) and 225) or (select(4,GetAchievementInfo(889)) and 150) or (select(4,GetAchievementInfo(891)) and 75) or 0 -- this is thanks to Maldivia, who is a fucking genius local ridingLevel = (select(4,GetAchievementInfo(892)) and 300) or (select(4,GetAchievementInfo(890)) and 225) or (select(4,GetAchievementInfo(889)) and 150) or (select(4,GetAchievementInfo(891)) and 75) or 0 -- this is thanks to Maldivia, who is a fucking genius
local has_fmsl = not not GetSpellInfo(GetSpellInfo(90267)) local has_fmsl = not not GetSpellInfo(GetSpellInfo(90267))
if ridingLevel >= 225 and has_fmsl then if ridingLevel >= 225 and has_fmsl then
table.insert(static_shared_routes, {{18, 0.505, 0.078}, {72, 0.403, 0.830}, 60, false, level_limit = 77}) -- Un'Goro Crater <--> Sholozar Basin table.insert(static_shared_routes, {{201, 0.505, 0.078}, {493, 0.403, 0.830}, 60, false, level_limit = 77}) -- Un'Goro Crater <--> Sholazar Basin
-- Dependant on completion of quest #12613 -- Dependant on completion of quest #12613
end end
@ -332,119 +326,119 @@ local static_zone_transitions =
--Outland --Outland
--Northrend --Northrend
{65, 72, 0.527, 0.322}, -- Borean Tundra <--> Scholazar Basin {486, 493, 0.527, 0.322}, -- Borean Tundra <--> Scholazar Basin
--Cataclysm zones --Cataclysm zones
-- Work -- Work
{7, 1, 0.117, 0.936}, -- Durotar <--> Orgrimmar (Front) {4, 321, 0.117, 0.936}, -- Durotar <--> Orgrimmar (Front)
{7, 1, 0.366, 0.253}, -- Durotar <--> Orgrimmar (Side) {4, 321, 0.366, 0.253}, -- Durotar <--> Orgrimmar (Side)
{15, 1, 0.792, 0.017}, -- Azshara <--> Orgrimmar (Back) {181, 321, 0.792, 0.017}, -- Azshara <--> Orgrimmar (Back)
{158, 5, 0.687, 0.2}, -- Ahn'Qiraj <--> Silithus {772, 261, 0.687, 0.2}, -- Ahn'Qiraj <--> Silithus
{168, 174, 0.50, 0.61}, -- Northern Stranglethorn <--> Cape of Stranglethorn {37, 673, 0.50, 0.61}, -- Northern Stranglethorn <--> Cape of Stranglethorn
{38, 168, 0, 0}, -- Stranglethorn World Map Wonkiness --{38, 168, 0, 0}, -- Stranglethorn World Map Wonkiness
{2, 11, 0.687, 0.872}, -- Ashenvale <--> Northern Barrens {43, 11, 0.687, 0.872}, -- Ashenvale <--> Northern Barrens
{2, 6, 0.423, 0.711}, -- Ashenvale <--> Stonetalon Mountains {43, 81, 0.423, 0.711}, -- Ashenvale <--> Stonetalon Mountains
{2, 15, 0.954, 0.484}, -- Ashenvale <--> Azshara {43, 181, 0.954, 0.484}, -- Ashenvale <--> Azshara
{2, 16, 0.289, 0.144}, -- Ashenvale <--> Darkshore {43, 42, 0.289, 0.144}, -- Ashenvale <--> Darkshore
{2, 13, 0.557, 0.29}, -- Ashenvale <--> Felwood {43, 182, 0.557, 0.29}, -- Ashenvale <--> Felwood
{21, 24, 0.894, 0.358}, -- Darnassus <--> Teldrassil {381, 41, 0.894, 0.358}, -- Darnassus <--> Teldrassil
{22, 203, 0.697, 0.604}, -- Mulgore <--> Southern Barrens {9, 607, 0.697, 0.604}, -- Mulgore <--> Southern Barrens
{22, 23, 0.376, 0.33}, -- Mulgore <--> Thunder Bluff {9, 362, 0.376, 0.33}, -- Mulgore <--> Thunder Bluff
{22, 23, 0.403, 0.193}, -- Mulgore <--> Thunder Bluff {9, 362, 0.403, 0.193}, -- Mulgore <--> Thunder Bluff
{3, 12, 0.247, 0.494}, -- Azuremyst Isle <--> The Exodar {464, 471, 0.247, 0.494}, -- Azuremyst Isle <--> The Exodar
{3, 12, 0.369, 0.469}, -- Azuremyst Isle <--> The Exodar {464, 471, 0.369, 0.469}, -- Azuremyst Isle <--> The Exodar
{3, 12, 0.310, 0.487}, -- Azuremyst Isle <--> The Exodar {464, 471, 0.310, 0.487}, -- Azuremyst Isle <--> The Exodar
{3, 12, 0.335, 0.494}, -- Azuremyst Isle <--> The Exodar {464, 471, 0.335, 0.494}, -- Azuremyst Isle <--> The Exodar
{3, 9, 0.42, 0.013}, -- Azuremyst Isle <--> Bloodmyst Isle {464, 476, 0.42, 0.013}, -- Azuremyst Isle <--> Bloodmyst Isle
{4, 6, 0.539, 0.032}, -- Desolace <--> Stonetalon Mountains {101, 81, 0.539, 0.032}, -- Desolace <--> Stonetalon Mountains
{4, 17, 0.428, 0.976}, -- Desolace <--> Feralas {101, 121, 0.428, 0.976}, -- Desolace <--> Feralas
{5, 18, 0.865, 0.115}, -- Silithus <--> Un'Goro Crater {261, 201, 0.865, 0.115}, -- Silithus <--> Un'Goro Crater
{7, 11, 0.341, 0.424}, -- Durotar <--> Northern Barrens {4, 11, 0.341, 0.424}, -- Durotar <--> Northern Barrens
{8, 18, 0.269, 0.516}, -- Tanaris <--> Un'Goro Crater {161, 201, 0.269, 0.516}, -- Tanaris <--> Un'Goro Crater
{8, 14, 0.512, 0.21}, -- Tanaris <--> Thousand Needles {161, 61, 0.512, 0.21}, -- Tanaris <--> Thousand Needles
{10, 14, 0.50, 0.94}, -- Dustwallow Marsh <--> Thousand Needles {141, 61, 0.50, 0.94}, -- Dustwallow Marsh <--> Thousand Needles
{10, 203, 0.287, 0.472}, -- Dustwallow Marsh <--> Southern Barrens {141, 607, 0.287, 0.472}, -- Dustwallow Marsh <--> Southern Barrens
{10, 203, 0.531, 0.104}, -- Dustwallow Marsh <--> Southern Barrens {141, 607, 0.531, 0.104}, -- Dustwallow Marsh <--> Southern Barrens
{203, 11, 0.367, 0.048}, -- Southern Barrens <--> Northern Barrens {607, 11, 0.367, 0.048}, -- Southern Barrens <--> Northern Barrens
{203, 14, 0.43, 0.96}, -- Southern Barrens <--> Thousand Needles {607, 61, 0.43, 0.96}, -- Southern Barrens <--> Thousand Needles
{13, 19, 0.685, 0.06}, -- Felwood <--> Winterspring {182, 281, 0.685, 0.06}, -- Felwood <--> Winterspring
{13, 20, 0.669, -0.063}, -- Felwood <--> Moonglade {182, 241, 0.669, -0.063}, -- Felwood <--> Moonglade
{17, 14, 0.899, 0.46}, -- Feralas <--> Thousand Needles {121, 61, 0.899, 0.46}, -- Feralas <--> Thousand Needles
{6, 11, 0.29, 0.08}, -- Stonetalon Mountains <--> Northern Barrens IS THIS ONE RIGHT? {81, 11, 0.29, 0.08}, -- Stonetalon Mountains <--> Northern Barrens IS THIS ONE RIGHT?
{39, 51, 0.454, 0.89}, -- Arathi Highlands <--> Wetlands {16, 40, 0.454, 0.89}, -- Arathi Highlands <--> Wetlands
{39, 48, 0.2, 0.293}, -- Arathi Highlands <--> Hillsbrad Foothills {16, 24, 0.2, 0.293}, -- Arathi Highlands <--> Hillsbrad Foothills
{27, 29, 0.47, 0.071}, -- Badlands <--> Loch Modan {17, 35, 0.47, 0.071}, -- Badlands <--> Loch Modan
{27, 32, 0.05, 0.53}, -- Badlands <--> Searing Gorge {17, 28, 0.05, 0.53}, -- Badlands <--> Searing Gorge
{33, 46, 0.519, 0.051}, -- Blasted Lands <--> Swamp of Sorrows {19, 38, 0.519, 0.051}, -- Blasted Lands <--> Swamp of Sorrows
{40, 30, 0.79, 0.842}, -- Burning Steppes <--> Redridge Mountains {29, 36, 0.79, 0.842}, -- Burning Steppes <--> Redridge Mountains
{47, 31, 0.324, 0.363}, -- Deadwind Pass <--> Duskwood {32, 34, 0.324, 0.363}, -- Deadwind Pass <--> Duskwood
{47, 46, 0.605, 0.41}, -- Deadwind Pass <--> Swamp of Sorrows {32, 38, 0.605, 0.41}, -- Deadwind Pass <--> Swamp of Sorrows
{28, 25, 0.534, 0.349}, -- Dun Morogh <--> Ironforge {27, 341, 0.534, 0.349}, -- Dun Morogh <--> Ironforge
{28, 29, 0.863, 0.514}, -- Dun Morogh <--> Loch Modan {27, 35, 0.863, 0.514}, -- Dun Morogh <--> Loch Modan
{28, 29, 0.844, 0.31}, -- Dun Morogh <--> Loch Modan {27, 35, 0.844, 0.31}, -- Dun Morogh <--> Loch Modan
{31, 37, 0.801, 0.158}, -- Duskwood <--> Elwynn Forest {34, 30, 0.801, 0.158}, -- Duskwood <--> Elwynn Forest
{31, 37, 0.15, 0.214}, -- Duskwood <--> Elwynn Forest {34, 30, 0.15, 0.214}, -- Duskwood <--> Elwynn Forest
{31, 168, 0.447, 0.884}, -- Duskwood <--> Stranglethorn Vale {34, 689, 0.447, 0.884}, -- Duskwood <--> Stranglethorn Vale
{31, 168, 0.209, 0.863}, -- Duskwood <--> Stranglethorn Vale {34, 689, 0.209, 0.863}, -- Duskwood <--> Stranglethorn Vale
{31, 30, 0.941, 0.103}, -- Duskwood <--> Redridge Mountains {34, 36, 0.941, 0.103}, -- Duskwood <--> Redridge Mountains
{31, 49, 0.079, 0.638}, -- Duskwood <--> Westfall {34, 39, 0.079, 0.638}, -- Duskwood <--> Westfall
{34, 50, 0.077, 0.661}, -- Eastern Plaguelands <--> Western Plaguelands {23, 22, 0.077, 0.661}, -- Eastern Plaguelands <--> Western Plaguelands
{34, 44, 0.575, 0.000}, -- Eastern Plaguelands <--> Ghostlands {23, 463, 0.575, 0.000}, -- Eastern Plaguelands <--> Ghostlands
{37, 36, 0.321, 0.493}, -- Elwynn Forest <--> Stormwind City -- Don't need to convert because it's in Elwynn coordinates, not Stormwind coordinates {30, 301, 0.321, 0.493}, -- Elwynn Forest <--> Stormwind City -- Don't need to convert because it's in Elwynn coordinates, not Stormwind coordinates
{37, 49, 0.202, 0.804}, -- Elwynn Forest <--> Westfall {30, 39, 0.202, 0.804}, -- Elwynn Forest <--> Westfall
{37, 30, 0.944, 0.724}, -- Elwynn Forest <--> Redridge Mountains {30, 36, 0.944, 0.724}, -- Elwynn Forest <--> Redridge Mountains
{41, 52, 0.567, 0.494}, -- Eversong Woods <--> Silvermoon City {462, 480, 0.567, 0.494}, -- Eversong Woods <--> Silvermoon City
{41, 44, 0.486, 0.916}, -- Eversong Woods <--> Ghostlands {462, 463, 0.486, 0.916}, -- Eversong Woods <--> Ghostlands
{35, 43, 0.678, 0.049}, -- Silverpine Forest <--> Tirisfal Glades {21, 20, 0.678, 0.049}, -- Silverpine Forest <--> Tirisfal Glades
{42, 50, 0.217, 0.264}, -- The Hinterlands <--> Western Plaguelands {26, 22, 0.217, 0.264}, -- The Hinterlands <--> Western Plaguelands
{43, 45, 0.619, 0.651}, -- Tirisfal Glades <--> Undercity {20, 382, 0.619, 0.651}, -- Tirisfal Glades <--> Undercity
{43, 50, 0.851, 0.703}, -- Tirisfal Glades <--> Western Plaguelands {20, 22, 0.851, 0.703}, -- Tirisfal Glades <--> Western Plaguelands
{168, 49, 0.292, 0.024}, -- Stranglethorn Vale <--> Westfall {689, 39, 0.292, 0.024}, -- Stranglethorn Vale <--> Westfall
{48, 35, 0.137, 0.458}, -- Hillsbrad Foothills <--> Silverpine Forest {24, 21, 0.137, 0.458}, -- Hillsbrad Foothills <--> Silverpine Forest
{48, 42, 0.899, 0.253}, -- Hillsbrad Foothills <--> The Hinterlands {24, 26, 0.899, 0.253}, -- Hillsbrad Foothills <--> The Hinterlands
{51, 184, 0.80, 0.47}, -- Wetlands <--> Twilight Highlands {40, 700, 0.80, 0.47}, -- Wetlands <--> Twilight Highlands
{29, 51, 0.252, 0}, -- Loch Modan <--> Wetlands {35, 40, 0.252, 0}, -- Loch Modan <--> Wetlands
-- Outland -- Outland
{58, 60, 0.783, 0.545}, -- Nagrand <--> Shattrath City -- this is aldor-only {477, 481, 0.783, 0.545}, -- Nagrand <--> Shattrath City -- this is aldor-only
{60, 55, 0.782, 0.492}, -- Shattrath City <--> Terokkar Forest {481, 478, 0.782, 0.492}, -- Shattrath City <--> Terokkar Forest
{54, 59, 0.842, 0.284}, -- Blade's Edge Mountains <--> Netherstorm {475, 479, 0.842, 0.284}, -- Blade's Edge Mountains <--> Netherstorm
{54, 57, 0.522, 0.996}, -- Blade's Edge Mountains <--> Zangarmarsh {475, 467, 0.522, 0.996}, -- Blade's Edge Mountains <--> Zangarmarsh
{54, 57, 0.312, 0.94}, -- Blade's Edge Mountains <--> Zangarmarsh {475, 467, 0.312, 0.94}, -- Blade's Edge Mountains <--> Zangarmarsh
{56, 55, 0.353, 0.901}, -- Hellfire Peninsula <--> Terokkar Forest {465, 478, 0.353, 0.901}, -- Hellfire Peninsula <--> Terokkar Forest
{56, 57, 0.093, 0.519}, -- Hellfire Peninsula <--> Zangarmarsh {465, 467, 0.093, 0.519}, -- Hellfire Peninsula <--> Zangarmarsh
{58, 55, 0.8, 0.817}, -- Nagrand <--> Terokkar Forest {477, 478, 0.8, 0.817}, -- Nagrand <--> Terokkar Forest
{58, 57, 0.343, 0.159}, -- Nagrand <--> Zangarmarsh {477, 467, 0.343, 0.159}, -- Nagrand <--> Zangarmarsh
{58, 57, 0.754, 0.331}, -- Nagrand <--> Zangarmarsh {477, 467, 0.754, 0.331}, -- Nagrand <--> Zangarmarsh
{53, 55, 0.208, 0.271}, -- Shadowmoon Valley <--> Terokkar Forest {473, 478, 0.208, 0.271}, -- Shadowmoon Valley <--> Terokkar Forest
{55, 57, 0.341, 0.098}, -- Terokkar Forest <--> Zangarmarsh {478, 467, 0.341, 0.098}, -- Terokkar Forest <--> Zangarmarsh
-- Northrend -- Northrend
{65, 68, 0.967, 0.359}, -- Borean Tundra <--> Dragonblight {486, 488, 0.967, 0.359}, -- Borean Tundra <--> Dragonblight
{74, 72, 0.208, 0.191}, -- Wintergrasp <--> Sholazar {501, 493, 0.208, 0.191}, -- Wintergrasp <--> Sholazar
{68, 74, 0.250, 0.410}, -- Dragonblight <--> Wintergrasp {488, 501, 0.250, 0.410}, -- Dragonblight <--> Wintergrasp
{68, 71, 0.359, 0.155}, -- Dragonblight <--> Icecrown {488, 492, 0.359, 0.155}, -- Dragonblight <--> Icecrown
{68, 66, 0.612, 0.142}, -- Dragonblight <--> Crystalsong {488, 510, 0.612, 0.142}, -- Dragonblight <--> Crystalsong
{68, 75, 0.900, 0.200}, -- Dragonblight <--> Zul'Drak {488, 496, 0.900, 0.200}, -- Dragonblight <--> Zul'Drak
{68, 69, 0.924, 0.304}, -- Dragonblight <--> Grizzly Hills {488, 490, 0.924, 0.304}, -- Dragonblight <--> Grizzly Hills
{68, 69, 0.931, 0.634}, -- Dragonblight <--> Grizzly Hills {488, 490, 0.931, 0.634}, -- Dragonblight <--> Grizzly Hills
{70, 69, 0.540, 0.042}, -- Howling Fjord <--> Grizzly Hills {491, 490, 0.540, 0.042}, -- Howling Fjord <--> Grizzly Hills
{70, 69, 0.233, 0.074}, -- Howling Fjord <--> Grizzly Hills {491, 490, 0.233, 0.074}, -- Howling Fjord <--> Grizzly Hills
{70, 69, 0.753, 0.060}, -- Howling Fjord <--> Grizzly Hills {491, 490, 0.753, 0.060}, -- Howling Fjord <--> Grizzly Hills
{69, 75, 0.432, 0.253}, -- Grizzly Hills <--> Zul'Drak {490, 496, 0.432, 0.253}, -- Grizzly Hills <--> Zul'Drak
{69, 75, 0.583, 0.136}, -- Grizzly Hills <--> Zul'Drak {490, 496, 0.583, 0.136}, -- Grizzly Hills <--> Zul'Drak
{66, 75, 0.967, 0.599}, -- Crystalsong <--> Zul'Drak {510, 496, 0.967, 0.599}, -- Crystalsong <--> Zul'Drak
{66, 71, 0.156, 0.085}, -- Crystalsong <--> Icecrown {510, 492, 0.156, 0.085}, -- Crystalsong <--> Icecrown
{66, 73, 0.706, 0.315}, -- Crystalsong <--> Storm Peaks {510, 495, 0.706, 0.315}, -- Crystalsong <--> Storm Peaks
{66, 73, 0.839, 0.340}, -- Crystalsong <--> Storm Peaks {510, 495, 0.839, 0.340}, -- Crystalsong <--> Storm Peaks
{71, 73, 0.920, 0.767}, -- Icecrown <--> Storm Peaks {492, 495, 0.920, 0.767}, -- Icecrown <--> Storm Peaks
} }
if QuestHelper:IsWrath32() then if QuestHelper:IsWrath32() then
table.insert(static_zone_transitions, {153, 71, 0.5, 0.5}) -- Hrothgar's Landing <--> Icecrown table.insert(static_zone_transitions, {541, 492, 0.5, 0.5}) -- Hrothgar's Landing <--> Icecrown
end end
local function convertLostIsles(current, other1, other2) local function convertLostIsles(current, other1, other2)
@ -457,7 +451,7 @@ end
function load_graph_links() function load_graph_links()
local function convert_coordinate(coord) local function convert_coordinate(coord)
QuestHelper: Assert(coord[1] and coord[2] and coord[3]) QuestHelper: Assert(coord[1] and coord[2] and coord[3])
--[==[
-- I hate Blizzard... They can't make up their mind weather we are on TwilightHighlands or TwilightHiglands_terrain1, but we only seem to be on one or the other. -- I hate Blizzard... They can't make up their mind weather we are on TwilightHighlands or TwilightHiglands_terrain1, but we only seem to be on one or the other.
if coord[1] == 177 and not QuestHelper_ZoneLookup[coord[1]] then if coord[1] == 177 and not QuestHelper_ZoneLookup[coord[1]] then
coord[1] = 184 coord[1] = 184
@ -489,10 +483,8 @@ function load_graph_links()
-- Use the lookup table to get the real coordinate. -- Use the lookup table to get the real coordinate.
if converter[coord[1]] then coord[1] = converter[coord[1]]() end if converter[coord[1]] then coord[1] = converter[coord[1]]() end
]==]
local QHZL = QuestHelper_ZoneLookup local QHZL = QuestHelper_ZoneLookup
local test = QHZL[181] or QHZL[208] or QHZL[209]
QuestHelper: Assert(test, "Umm, something is seriously wrong... We're missing a LostIsles terrain.")
QuestHelper: Assert(QuestHelper_ZoneLookup[coord[1]], string.format("Coord[1] = %d", coord[1])) QuestHelper: Assert(QuestHelper_ZoneLookup[coord[1]], string.format("Coord[1] = %d", coord[1]))
local c, x, y = QuestHelper.Astrolabe:GetAbsoluteContinentPosition(QuestHelper_ZoneLookup[coord[1]][1], QuestHelper_ZoneLookup[coord[1]][2], coord[2], coord[3]) local c, x, y = QuestHelper.Astrolabe:GetAbsoluteContinentPosition(QuestHelper_ZoneLookup[coord[1]][1], QuestHelper_ZoneLookup[coord[1]][2], coord[2], coord[3])
QuestHelper: Assert(c) QuestHelper: Assert(c)

Voir le fichier

@ -375,7 +375,7 @@ Route_Core_Init(
rvv = QuestHelper:CreateTable("route controller path shunt returnvalue") rvv = QuestHelper:CreateTable("route controller path shunt returnvalue")
local rv = QH_Graph_Pathmultifind(loc1.loc, lt, reverse, true) local rv = QH_Graph_Pathmultifind(loc1.loc, lt, reverse, true)
QuestHelper: Assert(#lt == #rv, string.format("lt has %d items, rt has %d items. Both should be the same.", #lt, #rv)) --QuestHelper: Assert(#lt == #rv, string.format("lt has %d items, rt has %d items. Both should be the same.", #lt, #rv))
-- We want to store the math.max(sqrt(#rv), 10) shortest paths -- We want to store the math.max(sqrt(#rv), 10) shortest paths
local tostore = complete_pass and math.max(sqrt(#rv), 10) or #rv local tostore = complete_pass and math.max(sqrt(#rv), 10) or #rv

Voir le fichier

@ -1257,10 +1257,6 @@ function QH_Route_Core_ClusterAdd(clust, clustid_used)
-- if we're doing hackery, clust will just be an empty table and we'll retrofit stuff later -- if we're doing hackery, clust will just be an empty table and we'll retrofit stuff later
for _, v in ipairs(clust) do for _, v in ipairs(clust) do
-- Ugly database hack
if v.loc.p == 26 then v.loc.p = 48 end -- Somehow I doubt this is the problem location, but it IS a nice place to make a translation.
if v.loc.p == 38 then v.loc.p = 168 end -- Just following your lead.
-- end hack
local idx = QH_Route_Core_NodeAdd_Internal(v) local idx = QH_Route_Core_NodeAdd_Internal(v)
Storage_NodeAdded(idx) Storage_NodeAdded(idx)
ClusterLookup[idx] = clustid ClusterLookup[idx] = clustid

Voir le fichier

@ -36,6 +36,10 @@ local last_stack = nil
local yield_ct = 0 local yield_ct = 0
local GetTime = GetTime local GetTime = GetTime
local unyieldable = 0 local unyieldable = 0
function QH_Timeslice_GetUnyieldable()
return unyieldable
end
function QH_Timeslice_PushUnyieldable() function QH_Timeslice_PushUnyieldable()
unyieldable = unyieldable + 1 unyieldable = unyieldable + 1
--print(unyieldable) --print(unyieldable)
@ -193,7 +197,7 @@ function QH_Timeslice_Work(time_used, time_this_frame, bonus_time, verbose)
coroutine_running = true coroutine_running = true
QuestHelper: Assert(unyieldable == 0) QuestHelper: Assert(unyieldable == 0)
state, err = coroutine.resume(coro.coro) state, err = coroutine.resume(coro.coro)
QuestHelper: Assert(unyieldable == 0) QuestHelper: Assert(unyieldable == 0, "Unyieldable was " .. unyieldable)
coroutine_running = false coroutine_running = false
end end
local stop = GetTime() local stop = GetTime()

Voir le fichier

@ -10,33 +10,34 @@ QuestHelper_Zones =
{ {
{[0]="Kalimdor", {[0]="Kalimdor",
[1]="Ahn'Qiraj: The Fallen Kingdom", [1]="Ahn'Qiraj: The Fallen Kingdom",
[2]="Ashenvale", [2]="Ammen Vale",
[3]="Azshara", [3]="Ashenvale",
[4]="Azuremyst Isle", [4]="Azshara",
[5]="Bloodmyst Isle", [5]="Azuremyst Isle",
[6]="Darkshore", [6]="Bloodmyst Isle",
[7]="Darnassus", [8]="Darkshore",
[8]="Desolace", [9]="Darnassus",
[9]="Durotar", [10]="Desolace",
[10]="Dustwallow Marsh", [11]="Durotar",
[11]="Felwood", [12]="Dustwallow Marsh",
[12]="Feralas", [14]="Felwood",
[13]="Moonglade", [15]="Feralas",
[14]="Mount Hyjal", [16]="Moonglade",
[15]="Mulgore", [17]="Mount Hyjal",
[16]="Northern Barrens", [18]="Mulgore",
[17]="Orgrimmar", [19]="Northern Barrens",
[18]="Silithus", [20]="Orgrimmar",
[19]="Southern Barrens", [22]="Silithus",
[20]="Stonetalon Mountains", [23]="Southern Barrens",
[21]="Tanaris", [24]="Stonetalon Mountains",
[22]="Teldrassil", [25]="Tanaris",
[23]="The Exodar", [26]="Teldrassil",
[24]="Thousand Needles", [27]="The Exodar",
[25]="Thunder Bluff", [28]="Thousand Needles",
[26]="Uldum", [29]="Thunder Bluff",
[27]="Un'Goro Crater", [30]="Uldum",
[28]="Winterspring" [31]="Un'Goro Crater",
[33]="Winterspring"
}, },
{[0]="Eastern Kingdoms", {[0]="Eastern Kingdoms",
[1]="Abyssal Depths", [1]="Abyssal Depths",
@ -44,40 +45,40 @@ QuestHelper_Zones =
[3]="Badlands", [3]="Badlands",
[4]="Blasted Lands", [4]="Blasted Lands",
[5]="Burning Steppes", [5]="Burning Steppes",
[6]="Deadwind Pass", [7]="Deadwind Pass",
[7]="Dun Morogh", [9]="Dun Morogh",
[8]="Duskwood", [10]="Duskwood",
[9]="Eastern Plaguelands", [11]="Eastern Plaguelands",
[10]="Elwynn Forest", [12]="Elwynn Forest",
[11]="Eversong Woods", [13]="Eversong Woods",
[12]="Ghostlands", [14]="Ghostlands",
[13]="Hillsbrad Foothills", [15]="Hillsbrad Foothills",
[14]="Ironforge", [16]="Ironforge",
[15]="Isle of Quel'Danas", [17]="Isle of Quel'Danas",
[16]="Kelp'thar Forest", [18]="Kelp'thar Forest",
[17]="Loch Modan", [19]="Loch Modan",
[18]="Northern Stranglethorn", [21]="Northern Stranglethorn",
[19]="Redridge Mountains", [23]="Redridge Mountains",
[20]="Ruins of Gilneas", [24]="Ruins of Gilneas",
[21]="Gilneas", -- Actually "Ruins of Gilneas City", but this fixes issues with some non-English clients that have the two zones named the same. [25]="Gilneas", -- Actually "Ruins of Gilneas City", but this fixes issues with some non-English clients that have the two zones named the same.
[22]="Searing Gorge", [26]="Searing Gorge",
[23]="Shimmering Expanse", [27]="Shimmering Expanse",
[24]="Silvermoon City", [28]="Silvermoon City",
[25]="Silverpine Forest", [29]="Silverpine Forest",
[26]="Stormwind City", [30]="Stormwind City",
[27]="Stranglethorn Vale", [31]="Stranglethorn Vale",
[28]="Swamp of Sorrows", [33]="Swamp of Sorrows",
[29]="The Cape of Stranglethorn", [34]="The Cape of Stranglethorn",
[30]="The Hinterlands", [35]="The Hinterlands",
[31]="Tirisfal Glades", [36]="Tirisfal Glades",
[32]="Tol Barad", [37]="Tol Barad",
[33]="Tol Barad Peninsula", [38]="Tol Barad Peninsula",
[34]="Twilight Highlands", [39]="Twilight Highlands",
[35]="Undercity", [40]="Undercity",
[36]="Vashj'ir", [41]="Vashj'ir",
[37]="Western Plaguelands", [42]="Western Plaguelands",
[38]="Westfall", [43]="Westfall",
[39]="Wetlands" [44]="Wetlands"
}, },
{[0]="Outland", {[0]="Outland",
[1]="Blade's Edge Mountains", [1]="Blade's Edge Mountains",
@ -110,66 +111,6 @@ QuestHelper_Zones =
[4]="The Maelstrom" [4]="The Maelstrom"
}, },
[-77]={[0]="ScarletEnclave_Continent", [1]="ScarletEnclave"}, [-77]={[0]="ScarletEnclave_Continent", [1]="ScarletEnclave"},
[-78]={[0]="GilneasCity_Continent", [1]="GilneasCity"},
[-79]={[0]="GilneasZone_Continent", [1]="GilneasZone"},
[-80]={[0]="UtgardeKeep1_Continent", [1]="UtgardeKeep1"},
[-81]={[0]="UtgardeKeep2_Continent", [1]="UtgardeKeep2"},
[-82]={[0]="UtgardeKeep3_Continent", [1]="UtgardeKeep3"},
[-83]={[0]="TheNexus_Continent", [1]="TheNexus"},
[-84]={[0]="AzjolNerub1_Continent", [1]="AzjolNerub1"},
[-85]={[0]="AzjolNerub2_Continent", [1]="AzjolNerub2"},
[-86]={[0]="AzjolNerub3_Continent", [1]="AzjolNerub3"},
[-87]={[0]="Ahnkahet_Continent", [1]="Ahnkahet"},
[-88]={[0]="DrakTharonKeep1_Continent", [1]="DrakTharonKeep1"},
[-89]={[0]="DrakTharonKeep2_Continent", [1]="DrakTharonKeep2"},
[-90]={[0]="VioletHold_Continent", [1]="VioletHold"},
[-91]={[0]="Gundrak_Continent", [1]="Gundrak"},
[-92]={[0]="Ulduar77_Continent", [1]="Ulduar77"},
[-93]={[0]="HallsofLightning1_Continent", [1]="HallsofLightning1"},
[-94]={[0]="HallsofLightning2_Continent", [1]="HallsofLightning2"},
[-95]={[0]="Nexus801_Continent", [1]="Nexus801"},
[-96]={[0]="Nexus802_Continent", [1]="Nexus802"},
[-97]={[0]="Nexus803_Continent", [1]="Nexus803"},
[-98]={[0]="Nexus804_Continent", [1]="Nexus804"},
[-99]={[0]="CoTStratholme1_Continent", [1]="CoTStratholme1"},
[-100]={[0]="CoTStratholme2_Continent", [1]="CoTStratholme2"},
[-101]={[0]="UtgardePinnacle1_Continent", [1]="UtgardePinnacle1"},
[-102]={[0]="UtgardePinnacle2_Continent", [1]="UtgardePinnacle2"},
[-103]={[0]="VaultofArchavon_Continent", [1]="VaultofArchavon"},
[-104]={[0]="Naxxramas1_Continent", [1]="Naxxramas1"},
[-105]={[0]="Naxxramas2_Continent", [1]="Naxxramas2"},
[-106]={[0]="Naxxramas3_Continent", [1]="Naxxramas3"},
[-107]={[0]="Naxxramas4_Continent", [1]="Naxxramas4"},
[-108]={[0]="Naxxramas5_Continent", [1]="Naxxramas5"},
[-109]={[0]="Naxxramas6_Continent", [1]="Naxxramas6"},
[-110]={[0]="TheObsidianSanctum_Continent", [1]="TheObsidianSanctum"},
[-111]={[0]="TheEyeOfEternity_Continent", [1]="TheEyeOfEternity"},
[-112]={[0]="Ulduar_Continent", [1]="Ulduar"},
[-113]={[0]="Ulduar1_Continent", [1]="Ulduar1"},
[-114]={[0]="Ulduar2_Continent", [1]="Ulduar2"},
[-115]={[0]="Ulduar3_Continent", [1]="Ulduar3"},
[-116]={[0]="Ulduar4_Continent", [1]="Ulduar4"},
[-117]={[0]="TheForgeofSouls_Continent", [1]="TheForgeofSouls"},
[-118]={[0]="PitofSaron_Continent", [1]="PitofSaron"},
[-119]={[0]="DeeprunTram_Continent", [1]="DeeprunTram"},
} }
@ -177,177 +118,110 @@ QuestHelper_Zones =
-- Additionally, [CONT_INDEX][ZONE_INDEX] = INDEX will also be added. -- Additionally, [CONT_INDEX][ZONE_INDEX] = INDEX will also be added.
QuestHelper_IndexLookup = QuestHelper_IndexLookup =
{ {
["Orgrimmar"] = {1, 1, 17}, ["Orgrimmar"] = {321, 1, 17},
["Ashenvale"] = {2, 1, 2}, ["Ashenvale"] = {43, 1, 2},
["AzuremystIsle"] = {3, 1, 4}, ["AzuremystIsle"] = {464, 1, 4},
["Desolace"] = {4, 1, 8}, ["Desolace"] = {101, 1, 8},
["Silithus"] = {5, 1, 18}, ["Silithus"] = {261, 1, 18},
["StonetalonMountains"] = {6, 1, 20}, ["StonetalonMountains"] = {81, 1, 20},
["Durotar"] = {7, 1, 9}, ["Durotar"] = {4, 1, 9},
["Tanaris"] = {8, 1, 21}, ["Tanaris"] = {161, 1, 21},
["BloodmystIsle"] = {9, 1, 5}, ["BloodmystIsle"] = {476, 1, 5},
["Dustwallow"] = {10, 1, 10}, ["Dustwallow"] = {141, 1, 10},
["Barrens"] = {11, 1, 16}, ["Barrens"] = {11, 1, 16},
["TheExodar"] = {12, 1, 23}, ["TheExodar"] = {471, 1, 23},
["Felwood"] = {13, 1, 11}, ["Felwood"] = {182, 1, 11},
["ThousandNeedles"] = {14, 1, 24}, ["ThousandNeedles"] = {61, 1, 24},
["Aszhara"] = {15, 1, 3}, ["Aszhara"] = {181, 1, 3},
["Darkshore"] = {16, 1, 6}, ["Darkshore"] = {42, 1, 6},
["Feralas"] = {17, 1, 12}, ["Feralas"] = {121, 1, 12},
["UngoroCrater"] = {18, 1, 27}, ["UngoroCrater"] = {201, 1, 27},
["Winterspring"] = {19, 1, 28}, ["Winterspring"] = {281, 1, 28},
["Moonglade"] = {20, 1, 13}, ["Moonglade"] = {241, 1, 13},
["Darnassus"] = {21, 1, 7}, ["Darnassus"] = {381, 1, 7},
["Mulgore"] = {22, 1, 15}, ["Mulgore"] = {9, 1, 15},
["ThunderBluff"] = {23, 1, 25}, ["ThunderBluff"] = {362, 1, 25},
["Teldrassil"] = {24, 1, 22}, ["Teldrassil"] = {41, 1, 22},
["Ironforge"] = {25, 2, 14}, ["Ironforge"] = {341, 2, 14},
["Badlands"] = {27, 2, 3}, ["Badlands"] = {17, 2, 3},
["DunMorogh"] = {28, 2, 7}, ["DunMorogh"] = {27, 2, 7},
["LochModan"] = {29, 2, 17}, ["LochModan"] = {35, 2, 17},
["Redridge"] = {30, 2, 19}, ["Redridge"] = {36, 2, 19},
["Duskwood"] = {31, 2, 8}, ["Duskwood"] = {34, 2, 8},
["SearingGorge"] = {32, 2, 22}, ["SearingGorge"] = {28, 2, 22},
["BlastedLands"] = {33, 2, 4}, ["BlastedLands"] = {19, 2, 4},
["EasternPlaguelands"] = {34, 2, 9}, ["EasternPlaguelands"] = {23, 2, 9},
["Silverpine"] = {35, 2, 25}, ["Silverpine"] = {21, 2, 25},
["StormwindCity"] = {36, 2, 26}, ["StormwindCity"] = {301, 2, 26},
["Elwynn"] = {37, 2, 10}, ["Elwynn"] = {30, 2, 10},
["StranglethornVale"] = {38, 2, 27}, ["StranglethornVale"] = {689, 2, 27},
["Arathi"] = {39, 2, 2}, ["Arathi"] = {16, 2, 2},
["BurningSteppes"] = {40, 2, 5}, ["BurningSteppes"] = {29, 2, 5},
["EversongWoods"] = {41, 2, 11}, ["EversongWoods"] = {462, 2, 11},
["Hinterlands"] = {42, 2, 30}, ["Hinterlands"] = {26, 2, 30},
["Tirisfal"] = {43, 2, 31}, ["Tirisfal"] = {20, 2, 31},
["Ghostlands"] = {44, 2, 12}, ["Ghostlands"] = {463, 2, 12},
["Undercity"] = {45, 2, 35}, ["Undercity"] = {382, 2, 35},
["SwampOfSorrows"] = {46, 2, 28}, ["SwampOfSorrows"] = {38, 2, 28},
["DeadwindPass"] = {47, 2, 6}, ["DeadwindPass"] = {32, 2, 6},
["HillsbradFoothills"] = {48, 2, 13}, ["HillsbradFoothills"] = {24, 2, 13},
["Westfall"] = {49, 2, 38}, ["Westfall"] = {39, 2, 38},
["WesternPlaguelands"] = {50, 2, 37}, ["WesternPlaguelands"] = {22, 2, 37},
["Wetlands"] = {51, 2, 39}, ["Wetlands"] = {40, 2, 39},
["SilvermoonCity"] = {52, 2, 24}, ["SilvermoonCity"] = {480, 2, 24},
["ShadowmoonValley"] = {53, 3, 5}, ["ShadowmoonValley"] = {473, 3, 5},
["BladesEdgeMountains"] = {54, 3, 1}, ["BladesEdgeMountains"] = {475, 3, 1},
["TerokkarForest"] = {55, 3, 7}, ["TerokkarForest"] = {478, 3, 7},
["Hellfire"] = {56, 3, 2}, ["Hellfire"] = {465, 3, 2},
["Zangarmarsh"] = {57, 3, 8}, ["Zangarmarsh"] = {467, 3, 8},
["Nagrand"] = {58, 3, 3}, ["Nagrand"] = {477, 3, 3},
["Netherstorm"] = {59, 3, 4}, ["Netherstorm"] = {479, 3, 4},
["ShattrathCity"] = {60, 3, 6}, ["ShattrathCity"] = {481, 3, 6},
["Kalimdor"] = {61, 1, 0}, ["Kalimdor"] = {13, 1, 0},
["Azeroth"] = {62, 2, 0}, ["Azeroth"] = {-1, 2, 0},
["Expansion01"] = {63, 3, 0}, ["Expansion01"] = {466, 3, 0},
["Sunwell"] = {64, 2, 15}, ["Sunwell"] = {499, 2, 15},
["BoreanTundra"] = {65, 4, 1}, ["BoreanTundra"] = {486, 4, 1},
["CrystalsongForest"] = {66, 4, 2}, ["CrystalsongForest"] = {510, 4, 2},
["Dalaran"] = {67, 4, 3}, ["Dalaran"] = {504, 4, 3},
["Dragonblight"] = {68, 4, 4}, ["Dragonblight"] = {488, 4, 4},
["GrizzlyHills"] = {69, 4, 5}, ["GrizzlyHills"] = {490, 4, 5},
["HowlingFjord"] = {70, 4, 6}, ["HowlingFjord"] = {491, 4, 6},
["IcecrownGlacier"] = {71, 4, 8}, ["IcecrownGlacier"] = {492, 4, 8},
["SholazarBasin"] = {72, 4, 9}, ["SholazarBasin"] = {493, 4, 9},
["TheStormPeaks"] = {73, 4, 10}, ["TheStormPeaks"] = {495, 4, 10},
["LakeWintergrasp"] = {74, 4, 11}, ["LakeWintergrasp"] = {501, 4, 11},
["ZulDrak"] = {75, 4, 12}, ["ZulDrak"] = {496, 4, 12},
["Northrend"] = {76, 4, 0}, ["Northrend"] = {485, 4, 0},
["HrothgarsLanding"] = {153, 4, 7}, -- wooo consecutive numbering ["HrothgarsLanding"] = {541, 4, 7}, -- wooo consecutive numbering
["AhnQirajTheFallenKingdom"] = {158, 1, 1},
["Hyjal"] = {198, 1, 14}, -- Check
["SouthernBarrens"] = {203, 1, 19},
["Uldum"] = {164, 1, 26}, -- Check
["Uldum_terrain1"] = {210, 1, 26}, -- Check
["VashjirDepths"] = {165, 2, 1}, -- Check
["VashjirKelpForest"] = {167, 2, 16}, -- Check
["StranglethornJungle"] = {168, 2, 18},
["RuinsofGilneas"] = {169, 2, 20},
["RuinsofGilneasCity"] = {170, 2, 21},
["VashjirRuins"] = {171, 2, 23}, -- Check
["TheCapeOfStranglethorn"] = {174, 2, 29},
["TolBarad"] = {175, 2, 32},
["TolBaradDailyArea"] = {176, 2, 33},
["TwilightHighlands_terrain1"] = {177, 2, 34},
["Vashjir"] = {178, 2, 36}, -- Check
["Deepholm"] = {179, 5, 1},
["Kezan"] = {180, 5, 2},
["TheLostIsles"] = {181, 5, 3},
["TheLostIsles_terrain1"] = {208, 5, 3},
["TheLostIsles_terrain2"] = {209, 5, 3},
["TheMaelstrom"] = {182, 5, 4},
["TheMaelstromContinent"] = {183, 5, 0},
["TwilightHighlands"] = {184, 2, 34},
["Hyjal_terrain1"] = {185, 1, 14},
["ScarletEnclave_Continent"] = {77, -77, 0}, ["ScarletEnclave"] = {78, -77, 1},
["UtgardeKeep1_Continent"] = {79, -80, 0}, ["UtgardeKeep1"] = {80, -80, 1},
["UtgardeKeep2_Continent"] = {81, -81, 0}, ["UtgardeKeep2"] = {82, -81, 1},
["UtgardeKeep3_Continent"] = {83, -82, 0}, ["UtgardeKeep3"] = {84, -82, 1},
["TheNexus_Continent"] = {85, -83, 0}, ["TheNexus"] = {86, -83, 1},
["AzjolNerub1_Continent"] = {87, -84, 0}, ["AzjolNerub1"] = {88, -84, 1},
["AzjolNerub2_Continent"] = {89, -85, 0}, ["AzjolNerub2"] = {90, -85, 1},
["AzjolNerub3_Continent"] = {91, -86, 0}, ["AzjolNerub3"] = {92, -86, 1},
["Ahnkahet_Continent"] = {93, -87, 0}, ["Ahnkahet"] = {94, -87, 1},
["DrakTharonKeep1_Continent"] = {95, -88, 0}, ["DrakTharonKeep1"] = {96, -88, 1},
["DrakTharonKeep2_Continent"] = {97, -89, 0}, ["DrakTharonKeep2"] = {98, -89, 1},
["VioletHold_Continent"] = {99, -90, 0}, ["VioletHold"] = {100, -90, 1},
["Gundrak_Continent"] = {101, -91, 0}, ["Gundrak"] = {102, -91, 1},
["Ulduar77_Continent"] = {103, -92, 0}, ["Ulduar77"] = {104, -92, 1}, -- HoS
["HallsofLightning1_Continent"] = {105, -93, 0}, ["HallsofLightning1"] = {106, -93, 1},
["HallsofLightning2_Continent"] = {107, -94, 0}, ["HallsofLightning2"] = {108, -94, 1},
["Nexus801_Continent"] = {109, -95, 0}, ["Nexus801"] = {110 , -95, 1},
["Nexus802_Continent"] = {111, -96, 0}, ["Nexus802"] = {112, -96, 1},
["Nexus803_Continent"] = {113, -97, 0}, ["Nexus803"] = {114, -97, 1},
["Nexus804_Continent"] = {115, -98, 0}, ["Nexus804"] = {116, -98, 1},
["CoTStratholme1_Continent"] = {117, -99, 0}, ["CoTStratholme1"] = {118, -99, 1},
["CoTStratholme2_Continent"] = {119, -100, 0}, ["CoTStratholme2"] = {120, -100, 1},
["UtgardePinnacle1_Continent"] = {121, -101, 0}, ["UtgardePinnacle1"] = {122, -101, 1},
["UtgardePinnacle2_Continent"] = {123, -102, 0}, ["UtgardePinnacle2"] = {124, -102, 1},
["VaultofArchavon_Continent"] = {125, -103, 0}, ["VaultofArchavon"] = {126, -103, 1},
["Naxxramas1_Continent"] = {127, -104, 0}, ["Naxxramas1"] = {128, -104, 1},
["Naxxramas2_Continent"] = {129, -105, 0}, ["Naxxramas2"] = {130, -105, 1},
["Naxxramas3_Continent"] = {131, -106, 0}, ["Naxxramas3"] = {132, -106, 1},
["Naxxramas4_Continent"] = {133, -107, 0}, ["Naxxramas4"] = {134, -107, 1},
["Naxxramas5_Continent"] = {135, -108, 0}, ["Naxxramas5"] = {136, -108, 1},
["Naxxramas6_Continent"] = {137, -109, 0}, ["Naxxramas6"] = {138, -109, 1},
["TheObsidianSanctum_Continent"] = {139, -110, 0}, ["TheObsidianSanctum"] = {140, -110, 1},
["TheEyeOfEternity_Continent"] = {141, -111, 0}, ["TheEyeOfEternity"] = {142, -111, 1},
["Ulduar_Continent"] = {143, -112, 0}, ["Ulduar"] = {144, -112, 1},
["Ulduar1_Continent"] = {145, -113, 0}, ["Ulduar1"] = {146, -113, 1},
["Ulduar2_Continent"] = {147, -114, 0}, ["Ulduar2"] = {148, -114, 1},
["Ulduar3_Continent"] = {149, -115, 0}, ["Ulduar3"] = {150, -115, 1},
["Ulduar4_Continent"] = {151, -116, 0}, ["Ulduar4"] = {152, -116, 1},
["TheForgeofSouls_Continent"] = {154, -117, 0}, ["TheForgeofSouls"] = {155, -117, 1},
["PitofSaron_Continent"] = {156, -118, 0}, ["PitofSaron"] = {157, -118, 1},
["GilneasCity_Continent"] = {204, -78, 0}, ["GilneasCity"] = {205, -78, 1},
["GilneasZone_Continent"] = {206, -79, 0}, ["GilneasZone"] = {207, -79, 1},
["DeeprunTram_Continent"] = {208, -119, 0}, ["DeeprunTram"] = {209, -119, 1},
-- yes virginia 183 is currently the end
["AhnQirajTheFallenKingdom"] = {772, 1, 1},
["Hyjal"] = {606, 1, 14}, -- Check
["SouthernBarrens"] = {607, 1, 19},
["Uldum"] = {720, 1, 26}, -- Check
["Uldum_terrain1"] = {720, 1, 26}, -- Check
["VashjirDepths"] = {614, 2, 1}, -- Check
["VashjirKelpForest"] = {610, 2, 16}, -- Check
["StranglethornJungle"] = {37, 2, 18},
["RuinsofGilneas"] = {684, 2, 20},
["RuinsofGilneasCity"] = {685, 2, 21},
["VashjirRuins"] = {615, 2, 23}, -- Check
["TheCapeOfStranglethorn"] = {673, 2, 29},
["TolBarad"] = {708, 2, 32},
["TolBaradDailyArea"] = {709, 2, 33},
["TwilightHighlands_terrain1"] = {700, 2, 34},
["Vashjir"] = {613, 2, 36}, -- Check
["Deepholm"] = {640, 5, 1},
["Kezan"] = {605, 5, 2},
["TheLostIsles"] = {544, 5, 3},
["TheLostIsles_terrain1"] = {544, 5, 3},
["TheLostIsles_terrain2"] = {544, 5, 3},
["TheMaelstrom"] = {737, 5, 4},
["TheMaelstromContinent"] = {751, 5, 0},
["TwilightHighlands"] = {700, 2, 34},
["Hyjal_terrain1"] = {606, 1, 14},
["ScarletEnclave_Continent"] = {-502, -77, 0}, ["ScarletEnclave"]={502,-77,1},
} }
QuestHelper_RestrictedZones = { -- Everything defaults to "nil" QuestHelper_RestrictedZones = { -- Everything defaults to "nil"

Voir le fichier

@ -1,4 +1,5 @@
function QuestHelper_GetTime() function QuestHelper_GetTime()
if inWorld then return theTime end
if IsMacClient() then return debugprofilestop() if IsMacClient() then return debugprofilestop()
else return debugprofilestop() / 1000 else return debugprofilestop() / 1000
end end
@ -9,7 +10,14 @@ local GetTime = QuestHelper_GetTime
QuestHelper_File["utility.lua"] = "4.0.1.$svnversion$" QuestHelper_File["utility.lua"] = "4.0.1.$svnversion$"
QuestHelper_Loadtime["utility.lua"] = GetTime() QuestHelper_Loadtime["utility.lua"] = GetTime()
local theTime = GetTime()
local inWorld = false
QuestHelper = CreateFrame("Frame", "QuestHelper", nil) QuestHelper = CreateFrame("Frame", "QuestHelper", nil)
local TimeUpdater = CreateFrame("Frame", "TimeUpdater", nil)
TimeUpdater:SetScript("OnUpdate", function () theTime = GetTime() end)
TimeUpdater:RegisterEvent("PLAYER_ENTERING_WORLD")
TimeUpdater:SetScript("OnEvent", function () inWorld = true end)
--[[ static ]] ALLIANCE = 1 --[[ static ]] ALLIANCE = 1
--[[ static ]] HORDE = 2 --[[ static ]] HORDE = 2
@ -131,7 +139,7 @@ function QuestHelper:TextOut(text)
local theme = self:GetColourTheme() local theme = self:GetColourTheme()
DEFAULT_CHAT_FRAME:AddMessage(string.format("|cff%2x%2x%2xQuestHelper: |r%s", theme.message_prefix[1]*255, DEFAULT_CHAT_FRAME:AddMessage(string.format("|cff%2x%2x%2xQuestHelper: |r%s", theme.message_prefix[1]*255,
theme.message_prefix[2]*255, theme.message_prefix[2]*255,
theme.message_prefix[3]*255, text), theme.message_prefix[3]*255, tostring(text)),
theme.message[1], theme.message[1],
theme.message[2], theme.message[2],
theme.message[3]) theme.message[3])