From 5817b6915cfa1e0e082223a5a86630398dc20cdf Mon Sep 17 00:00:00 2001 From: "Nathanial.C.Jones" Date: Tue, 31 Jan 2012 03:10:39 +0000 Subject: [PATCH 02/12] Initial implementation of direct querying of WoW for quest info. Also changed planes to be the same as the equivalent mapID. Eliminated instances for the time being, as this whole scheme may go by the wayside in upcoming iterations. WARNING: This revision MAY NOT work at all (and if it does, Elder tracking won't work). With that said, feel free to test and note any issues you discover, with the exception of Elder tracking not working (I didn't touch that at all). --- QuestHelper/db_get.lua | 73 +++++++ QuestHelper/pathfinding.lua | 398 ++++++++++++++++++------------------ QuestHelper/upgrade.lua | 329 +++++++++-------------------- 3 files changed, 368 insertions(+), 432 deletions(-) diff --git a/QuestHelper/db_get.lua b/QuestHelper/db_get.lua index dfb35af..a7a48c1 100644 --- a/QuestHelper/db_get.lua +++ b/QuestHelper/db_get.lua @@ -122,6 +122,12 @@ end function DB_HasItem(group, id) 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 if db[group] then @@ -138,6 +144,45 @@ function DB_HasItem(group, id) return false end +local function GetZonePOIs(c, z) + SetMapZoom(c, z) + local pois = {} + local count = 1 + local hasQuests = false + local numEntries = QuestMapUpdateAllQuests() + QuestPOIUpdateIcons() + local numCompleteedQuests = 0 + local mapID = GetMapInfo() + for i = 1, numEntries do + local questId, questLogIndex = QuestPOIGetQuestIDByVisibleIndex(i) + local _, x, y, objective = QuestPOIGetIconInfo(questId) + if x and y then + local questTitle, level, questTag, suggestedGroup, isHeader, isCollapsed, isComplete, isDaily = GetQuestLogTitle(questLogIndex) + numObjectives = GetNumQuestLeaderBoards(questLogIndex) + if isComplete and isComplete < 0 then + isComplete = false + elseif numObjectives == 0 then + isComplete = true + end + local poi = {} + poi.questLogIndex = questLogIndex + poi.questId = questId + poi.title = questTitle + poi.c = c + poi.z = z + poi.x = x + poi.y = y + poi.p = mapID + poi.completed = isComplete + pois[count] = poi + count = count+1 + hasQuests = true + end + end + + return pois, hasQuests +end + function DB_GetItem(group, id, silent, register) QuestHelper: Assert(initted) @@ -145,6 +190,34 @@ function DB_GetItem(group, id, silent, register) QuestHelper: Assert(id, string.format("%s %s", tostring(group), tostring(id))) local ite = DBC_Get(group, id) + 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. + local origC = GetCurrentMapContinent() + local origZ = GetCurrentMapZone() + + local myPois = {} + local myCount = 1 + for c, cname in ipairs({GetMapContinents()}) do + for z, zname in ipairs({GetMapZones(c)}) do + local pois, zoneHasQuests = GetZonePOIs(c, z) + if zoneHasQuests then + for _, ipoi in ipairs(pois) do + if ipoi.questId == id then + myPois[count] = ipoi + end + end + end + end + end + + SetMapZoom(origC, origZ) + + -- Convert POIs appropriately. + -- Set ite to the correctly formatted POIs. + end + if not ite then if type(id) == "string" then QuestHelper: Assert(not id:match("__.*")) end diff --git a/QuestHelper/pathfinding.lua b/QuestHelper/pathfinding.lua index 6a1ccfa..d3df184 100644 --- a/QuestHelper/pathfinding.lua +++ b/QuestHelper/pathfinding.lua @@ -22,31 +22,32 @@ local dependancy_quest_list = GetQuestsCompleted() local static_alliance_landings = { - {12, 0.476, 0.598, "Exodar via portal"}, -- Exodar - {21, 0.435, 0.787, "Darnassus via portal"}, -- Darnassus - {36, 0.496, 0.865, "Stormwind via portal"}, -- Stormwind - {25, 0.255, 0.084, "Ironforge via portal"}, -- Ironforge - {10, 0.660, 0.490, "Theramore via portal"}, -- Theramore + {471, 0.476, 0.598, "Exodar via portal"}, -- Exodar + {381, 0.435, 0.787, "Darnassus via portal"}, -- Darnassus + {301, 0.496, 0.865, "Stormwind via portal"}, -- Stormwind + {341, 0.255, 0.084, "Ironforge via portal"}, -- Ironforge + {141, 0.660, 0.490, "Theramore via portal"}, -- Theramore, Dustwallow Marsh } local static_horde_landings = { - {1, 0.483, 0.645, "Orgrimmar via portal"}, -- Orgrimmar - {23, 0.222, 0.169, "Thunder Bluff via portal"}, -- Thunder Bluff - {45, 0.845, 0.163, "Undercity via portal"}, -- Undercity - {52, 0.583, 0.192, "Silvermoon City via portal"}, -- Silvermoon City - {46, 0.498, 0.558, "Stonard via portal"}, -- Stonard + {321, 0.483, 0.645, "Orgrimmar via portal"}, -- Orgrimmar + {362, 0.222, 0.169, "Thunder Bluff via portal"}, -- Thunder Bluff + {382, 0.845, 0.163, "Undercity via portal"}, -- Undercity + {480, 0.583, 0.192, "Silvermoon City via portal"}, -- Silvermoon City + {38, 0.498, 0.558, "Stonard via portal"}, -- Stonard, Swamp of Sorrows } local static_shared_landings = { - {67, 0.559, 0.468, "Dalaran via portal"}, -- Dalaran - {60, 0.550, 0.402, "Shattrath via portal"}, -- Shattrath + {504, 0.559, 0.468, "Dalaran via portal"}, -- Dalaran + {481, 0.550, 0.402, "Shattrath via portal"}, -- Shattrath -- Need Tol Barad Port In coordinates + -- Highly doubtful that Tol Barad Port In Coordinates are the same. } 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 whimsey @@ -55,33 +56,33 @@ end -- More storage -- Contingent on player's faction controlling the zone - -- {{74, 0.491, 0.153}, {67, 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) - -- {{175, 0.472, 0.519}, STORMWIND_CATPORTAL_IN, 60, true}, -- Tol Barad --> Stormwind (If Alliance Controlled) + -- {{501, 0.491, 0.153}, {504, 0.268, 0.447}, 5, true}, -- Wingergrasp Keep --> Dalaran + -- {{708, 0.472, 0.519}, ORGRIMMAR_CATPORTAL_IN, 60, true}, -- Tol Barad --> Orgrimmar (If Horde Controlled) + -- {{708, 0.472, 0.519}, STORMWIND_CATPORTAL_IN, 60, true}, -- Tol Barad --> Stormwind (If Alliance Controlled) -- end storage -local BLASTED_LANDS_PORTAL_IN = {33, 0.539, 0.461, "Blasted Lands via portal"} -local ORGRIMMAR_CATPORTAL_IN = {1, 0.500, 0.377, "Orgrimmar via portal"} +local BLASTED_LANDS_PORTAL_IN = {19, 0.539, 0.461, "Blasted Lands via portal"} +local ORGRIMMAR_CATPORTAL_IN = {321, 0.500, 0.377, "Orgrimmar via portal"} -- local STORMWIND_CATPORTAL_IN local static_horde_routes = { -- Portals - {{1, 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 - {{23, 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 + {{321, 0.471, 0.618}, BLASTED_LANDS_PORTAL_IN, 60, true, level_limit = 58}, -- Orgrimmar --> Dark Portal + {{382, 0.853, 0.171}, BLASTED_LANDS_PORTAL_IN, 5, true, level_limit = 58}, -- Undercity --> Dark Portal + {{362, 0.232, 0.135}, BLASTED_LANDS_PORTAL_IN, 60, true, level_limit = 58}, -- Thunder Bluff --> 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. -- 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 - {{184, 0.736, 0.535}, ORGRIMMAR_CATPORTAL_IN, 60, true}, -- Twilight Highlands --> Orgrimmar + {{465, 0.886, 0.477}, {321, 0.483, 0.645}, 60, true}, -- Hellfire Peninsula --> 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 @@ -99,35 +100,35 @@ local static_horde_routes = -- Orgrimmar --> Temple of Earth (Aqua) -- 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. - {{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. - {{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. - {{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. - {{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. -- Zepplins - {{1, 0.526, 0.529}, {168, 0.372, 0.525}, 210}, -- Orgrimmar <--> Grom'gol Base Camp - {{1, 0.506, 0.561}, {43, 0.607, 0.588}, 210}, -- Orgrimmar <--> Tirisfal Glades - {{1, 0.428, 0.653}, {23, 0.152, 0.257}, 210}, -- Orgrimmar <--> Thunder Bluff - {{1, 0.449, 0.619}, {65, 0.414, 0.536}, 210}, -- Orgrimmar <--> Warsong Hold + {{321, 0.526, 0.529}, {37, 0.372, 0.525}, 210}, -- Orgrimmar <--> Grom'gol Base Camp + {{321, 0.506, 0.561}, {20, 0.607, 0.588}, 210}, -- Orgrimmar <--> Tirisfal Glades + {{321, 0.428, 0.653}, {362, 0.152, 0.257}, 210}, -- Orgrimmar <--> Thunder Bluff + {{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 - {{43, 0.590, 0.590}, {70, 0.777, 0.282}, 210}, -- Tirisfal Glades <--> Vengeance Landing + {{20, 0.619, 0.591}, {37, 0.374, 0.509}, 210}, -- Tirisfal Glades <--> Grom'gol Base Camp, Northern Stranglethorn + {{20, 0.590, 0.590}, {491, 0.777, 0.282}, 210}, -- Tirisfal Glades <--> Vengeance Landing -- 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. } @@ -136,20 +137,20 @@ local static_horde_routes = local static_alliance_routes = { -- Portals - {{21,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 - {{25,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 + {{381,0.440,0.782}, BLASTED_LANDS_PORTAL_IN, 60, true, level_limit = 58}, -- Darnassus --> Dark Portal + {{471,0.482,0.630}, BLASTED_LANDS_PORTAL_IN, 60, true, level_limit = 58}, -- Exodar --> Dark Portal + {{341,0.273,0.070}, BLASTED_LANDS_PORTAL_IN, 5, true, level_limit = 58}, -- Ironforge --> 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 - {{21, 0.442, 0.788}, {12, 0.476, 0.598}, 5, true}, -- Darnassus --> Exodar - {{12, 0.476, 0.619}, {21, 0.435, 0.787}, 5, true}, -- Exodar --> Darnassus + {{465, 0.886, 0.528}, {301, 0.496, 0.865}, 60, true}, -- Hellfire Peninsula --> Stormwind + {{381, 0.442, 0.788}, {471, 0.476, 0.598}, 5, true}, -- Darnassus --> Exodar + {{471, 0.476, 0.619}, {381, 0.435, 0.787}, 5, true}, -- Exodar --> Darnassus -- 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. - {{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 <--> Mount Hyjal @@ -158,87 +159,79 @@ local static_alliance_routes = -- Stormwind <--> Vashj'ir -- 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) - {{36, 0.696, 0.311}, {25, 0.770, 0.513}, 180}, -- Stormwind <--> Ironforge + -- Deeprun Tram (Wonder if this needs to be handled differently because of it's nature but this will suffice for now). + -- 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 - -- 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 - {{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.) - {{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.) - {{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.) - {{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.) - {{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.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.) + {{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.) + {{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.) + {{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.) + {{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 = { -- 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 - --{{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}, -- 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 - {{60, 0.486, 0.420}, {64, 0.482, 0.345}, 60, true}, -- Shattrath --> Isle of Quel'Danas + {{504, 0.255, 0.514}, {161, 0.652, 0.498}, 60, true}, -- Dalaran --> Caverns of Time + {{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 - {{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 -- Ships - {{68, 0.497, 0.784}, {70, 0.234, 0.578}, 210}, -- Moa'ki <--> Kamagua - {{68, 0.479, 0.788}, {65, 0.789, 0.537}, 210}, -- Moa'ki <--> Unu'pe - {{174, 0.390, 0.670}, {11, 0.702, 0.733}, 210}, -- Booty Bay <--> Ratchet + {{488, 0.497, 0.784}, {491, 0.234, 0.578}, 210}, -- Moa'ki <--> Kamagua + {{488, 0.479, 0.788}, {486, 0.789, 0.537}, 210}, -- Moa'ki <--> Unu'pe + {{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 - {{24, 0.522, 0.895}, {3, 0.203, 0.540}, 210}, -- Teldrassil <--> Azuremyst Isle - {{24, 0.550, 0.938}, {36, 0.223, 0.560}, 210}, -- Teldrassil <--> Stormwind + {{41, 0.522, 0.895}, {464, 0.203, 0.540}, 210}, -- Teldrassil <--> Azuremyst Isle + {{41, 0.550, 0.938}, {301, 0.223, 0.560}, 210}, -- Teldrassil <--> Stormwind -- 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. - {{41, 0.5, 0.5}, {64, 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 + {{462, 0.5, 0.5}, {64, 0.484, 0.251}, 7200}, -- Eversong Woods <--> Sunwell + {{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 - {{178, 0.83, 0.34}, {167, 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 - {{178, 0.84, 0.23}, {62, 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 - {{167, 0.40, 0.64}, {171, 0.56, 0.14}, 5}, -- VKF <--> SE - {{178, 0.50, 0.28}, {165, 0.72, 0.04}, 5}, -- Vash <--> Vash'jir Depths - {{198, 0.85, 0.41}, {19, 0.58, 0.91}, 5}, -- Hyjal <--> Winterspring - {{185, 0.85, 0.41}, {19, 0.58, 0.91}, 5}, -- Hyjal <--> Winterspring - {{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) - {{179, 0.5, 0.5}, {180, 0.5, 0.5}, 86400}, -- DeepHolm <--> 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.) - {{208, 0.24, 0.77}, {180, 0.22, 0.17}, 90}, -- The Lost Isles <--> Kezan (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.) - {{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.) + {{613, 0.83, 0.34}, {610, 0.45, 0.23}, 210, true}, -- Vash'jir --> Vash'jir Kelp Forest (One time, One way) + {{610, 0.69, 0.60}, {613, 0.80, 0.30}, 5}, -- Vash'jir Kelp Forest <--> Vash'jir + {{613, 0.84, 0.23}, {-1, 0.37, 0.58}, 5}, -- Vash'jir <--> The Great Sea (EK Continent, zone 0) + {{-1, 0.39, 0.60}, {27, 0.00, 0.20}, 5}, -- The Great Sea (EK Continent, zone 0) <--> Dun Morogh + {{610, 0.40, 0.64}, {615, 0.56, 0.14}, 5}, -- VKF <--> SE + {{613, 0.50, 0.28}, {614, 0.72, 0.04}, 5}, -- Vash <--> Vash'jir Depths + {{606, 0.85, 0.41}, {281, 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) + {{640, 0.5, 0.5}, {605, 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.) + {{544, 0.5, 0.5}, {737, 0.5, 0.5}, 86400}, -- The Lost Isles <--> The Maelstrom (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.) + {{751, 0.5, 0.5}, {321, 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 - {{164, 0.70, 0.22}, {8, 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 + {{720, 0.84, 0.41}, {161, 0.37, 0.82}, 5}, -- Uldum <--> Tanaris + {{720, 0.70, 0.22}, {161, 0.25, 0.66}, 5}, -- Uldum <--> Tanaris + {{21, 0.45, 0.85}, {684, 0.60, 0.09}, 5}, -- Silverpine <--> Ruins of Gilneas +--[==[ -- Wrath instance entrances {{80, 0.693, 0.730}, {70, 0.573, 0.467}, 5}, -- UK {{86, 0.362, 0.880}, {65, 0.275, 0.260}, 5}, -- Nexus @@ -299,6 +292,7 @@ local static_shared_routes = {{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}, {152, 0.500, 0.500}, 5}, + --]==] } -- Darkportal is handled specially, depending on whether or not you're level 58+ or not. @@ -308,7 +302,7 @@ local dark_portal_route = {{33, 0.550, 0.541}, {56, 0.898, 0.502}, 60} 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)) 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 end @@ -337,114 +331,114 @@ local static_zone_transitions = --Cataclysm zones -- Work - {7, 1, 0.117, 0.936}, -- Durotar <--> Orgrimmar (Front) - {7, 1, 0.366, 0.253}, -- Durotar <--> Orgrimmar (Side) - {15, 1, 0.792, 0.017}, -- Azshara <--> Orgrimmar (Back) - {158, 5, 0.687, 0.2}, -- Ahn'Qiraj <--> Silithus - {168, 174, 0.50, 0.61}, -- Northern Stranglethorn <--> Cape of Stranglethorn + {4, 321, 0.117, 0.936}, -- Durotar <--> Orgrimmar (Front) + {4, 321, 0.366, 0.253}, -- Durotar <--> Orgrimmar (Side) + {15, 321, 0.792, 0.017}, -- Azshara <--> Orgrimmar (Back) + {772, 261, 0.687, 0.2}, -- Ahn'Qiraj <--> Silithus + {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 - {2, 6, 0.423, 0.711}, -- Ashenvale <--> Stonetalon Mountains - {2, 15, 0.954, 0.484}, -- Ashenvale <--> Azshara - {2, 16, 0.289, 0.144}, -- Ashenvale <--> Darkshore - {2, 13, 0.557, 0.29}, -- Ashenvale <--> Felwood - {21, 24, 0.894, 0.358}, -- Darnassus <--> Teldrassil - {22, 203, 0.697, 0.604}, -- Mulgore <--> Southern Barrens - {22, 23, 0.376, 0.33}, -- Mulgore <--> Thunder Bluff - {22, 23, 0.403, 0.193}, -- Mulgore <--> Thunder Bluff - {3, 12, 0.247, 0.494}, -- Azuremyst Isle <--> The Exodar - {3, 12, 0.369, 0.469}, -- Azuremyst Isle <--> The Exodar - {3, 12, 0.310, 0.487}, -- Azuremyst Isle <--> The Exodar - {3, 12, 0.335, 0.494}, -- Azuremyst Isle <--> The Exodar - {3, 9, 0.42, 0.013}, -- Azuremyst Isle <--> Bloodmyst Isle - {4, 6, 0.539, 0.032}, -- Desolace <--> Stonetalon Mountains - {4, 17, 0.428, 0.976}, -- Desolace <--> Feralas - {5, 18, 0.865, 0.115}, -- Silithus <--> Un'Goro Crater - {7, 11, 0.341, 0.424}, -- Durotar <--> Northern Barrens - {8, 18, 0.269, 0.516}, -- Tanaris <--> Un'Goro Crater - {8, 14, 0.512, 0.21}, -- Tanaris <--> Thousand Needles - {10, 14, 0.50, 0.94}, -- Dustwallow Marsh <--> Thousand Needles - {10, 203, 0.287, 0.472}, -- Dustwallow Marsh <--> Southern Barrens - {10, 203, 0.531, 0.104}, -- Dustwallow Marsh <--> Southern Barrens - {203, 11, 0.367, 0.048}, -- Southern Barrens <--> Northern Barrens - {203, 14, 0.43, 0.96}, -- Southern Barrens <--> Thousand Needles - {13, 19, 0.685, 0.06}, -- Felwood <--> Winterspring - {13, 20, 0.669, -0.063}, -- Felwood <--> Moonglade - {17, 14, 0.899, 0.46}, -- Feralas <--> Thousand Needles - {6, 11, 0.29, 0.08}, -- Stonetalon Mountains <--> Northern Barrens IS THIS ONE RIGHT? - {39, 51, 0.454, 0.89}, -- Arathi Highlands <--> Wetlands - {39, 48, 0.2, 0.293}, -- Arathi Highlands <--> Hillsbrad Foothills - {27, 29, 0.47, 0.071}, -- Badlands <--> Loch Modan - {27, 32, 0.05, 0.53}, -- Badlands <--> Searing Gorge - {33, 46, 0.519, 0.051}, -- Blasted Lands <--> Swamp of Sorrows - {40, 30, 0.79, 0.842}, -- Burning Steppes <--> Redridge Mountains - {47, 31, 0.324, 0.363}, -- Deadwind Pass <--> Duskwood - {47, 46, 0.605, 0.41}, -- Deadwind Pass <--> Swamp of Sorrows - {28, 25, 0.534, 0.349}, -- Dun Morogh <--> Ironforge - {28, 29, 0.863, 0.514}, -- Dun Morogh <--> Loch Modan - {28, 29, 0.844, 0.31}, -- Dun Morogh <--> Loch Modan - {31, 37, 0.801, 0.158}, -- Duskwood <--> Elwynn Forest - {31, 37, 0.15, 0.214}, -- Duskwood <--> Elwynn Forest - {31, 168, 0.447, 0.884}, -- Duskwood <--> Stranglethorn Vale - {31, 168, 0.209, 0.863}, -- Duskwood <--> Stranglethorn Vale - {31, 30, 0.941, 0.103}, -- Duskwood <--> Redridge Mountains - {31, 49, 0.079, 0.638}, -- Duskwood <--> Westfall - {34, 50, 0.077, 0.661}, -- Eastern Plaguelands <--> Western Plaguelands - {34, 44, 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 - {37, 49, 0.202, 0.804}, -- Elwynn Forest <--> Westfall - {37, 30, 0.944, 0.724}, -- Elwynn Forest <--> Redridge Mountains - {41, 52, 0.567, 0.494}, -- Eversong Woods <--> Silvermoon City - {41, 44, 0.486, 0.916}, -- Eversong Woods <--> Ghostlands - {35, 43, 0.678, 0.049}, -- Silverpine Forest <--> Tirisfal Glades - {42, 50, 0.217, 0.264}, -- The Hinterlands <--> Western Plaguelands - {43, 45, 0.619, 0.651}, -- Tirisfal Glades <--> Undercity - {43, 50, 0.851, 0.703}, -- Tirisfal Glades <--> Western Plaguelands - {168, 49, 0.292, 0.024}, -- Stranglethorn Vale <--> Westfall - {48, 35, 0.137, 0.458}, -- Hillsbrad Foothills <--> Silverpine Forest - {48, 42, 0.899, 0.253}, -- Hillsbrad Foothills <--> The Hinterlands - {51, 184, 0.80, 0.47}, -- Wetlands <--> Twilight Highlands - {29, 51, 0.252, 0}, -- Loch Modan <--> Wetlands + {43, 11, 0.687, 0.872}, -- Ashenvale <--> Northern Barrens + {43, 81, 0.423, 0.711}, -- Ashenvale <--> Stonetalon Mountains + {43, 181, 0.954, 0.484}, -- Ashenvale <--> Azshara + {43, 42, 0.289, 0.144}, -- Ashenvale <--> Darkshore + {43, 182, 0.557, 0.29}, -- Ashenvale <--> Felwood + {381, 41, 0.894, 0.358}, -- Darnassus <--> Teldrassil + {9, 607, 0.697, 0.604}, -- Mulgore <--> Southern Barrens + {9, 362, 0.376, 0.33}, -- Mulgore <--> Thunder Bluff + {9, 362, 0.403, 0.193}, -- Mulgore <--> Thunder Bluff + {464, 471, 0.247, 0.494}, -- Azuremyst Isle <--> The Exodar + {464, 471, 0.369, 0.469}, -- Azuremyst Isle <--> The Exodar + {464, 471, 0.310, 0.487}, -- Azuremyst Isle <--> The Exodar + {464, 471, 0.335, 0.494}, -- Azuremyst Isle <--> The Exodar + {464, 476, 0.42, 0.013}, -- Azuremyst Isle <--> Bloodmyst Isle + {101, 81, 0.539, 0.032}, -- Desolace <--> Stonetalon Mountains + {101, 121, 0.428, 0.976}, -- Desolace <--> Feralas + {261, 201, 0.865, 0.115}, -- Silithus <--> Un'Goro Crater + {4, 11, 0.341, 0.424}, -- Durotar <--> Northern Barrens + {161, 201, 0.269, 0.516}, -- Tanaris <--> Un'Goro Crater + {161, 61, 0.512, 0.21}, -- Tanaris <--> Thousand Needles + {141, 61, 0.50, 0.94}, -- Dustwallow Marsh <--> Thousand Needles + {141, 607, 0.287, 0.472}, -- Dustwallow Marsh <--> Southern Barrens + {141, 607, 0.531, 0.104}, -- Dustwallow Marsh <--> Southern Barrens + {607, 11, 0.367, 0.048}, -- Southern Barrens <--> Northern Barrens + {607, 61, 0.43, 0.96}, -- Southern Barrens <--> Thousand Needles + {182, 281, 0.685, 0.06}, -- Felwood <--> Winterspring + {182, 241, 0.669, -0.063}, -- Felwood <--> Moonglade + {121, 61, 0.899, 0.46}, -- Feralas <--> Thousand Needles + {81, 11, 0.29, 0.08}, -- Stonetalon Mountains <--> Northern Barrens IS THIS ONE RIGHT? + {16, 40, 0.454, 0.89}, -- Arathi Highlands <--> Wetlands + {16, 24, 0.2, 0.293}, -- Arathi Highlands <--> Hillsbrad Foothills + {17, 35, 0.47, 0.071}, -- Badlands <--> Loch Modan + {17, 28, 0.05, 0.53}, -- Badlands <--> Searing Gorge + {19, 38, 0.519, 0.051}, -- Blasted Lands <--> Swamp of Sorrows + {29, 36, 0.79, 0.842}, -- Burning Steppes <--> Redridge Mountains + {32, 34, 0.324, 0.363}, -- Deadwind Pass <--> Duskwood + {32, 38, 0.605, 0.41}, -- Deadwind Pass <--> Swamp of Sorrows + {27, 341, 0.534, 0.349}, -- Dun Morogh <--> Ironforge + {27, 35, 0.863, 0.514}, -- Dun Morogh <--> Loch Modan + {27, 35, 0.844, 0.31}, -- Dun Morogh <--> Loch Modan + {34, 30, 0.801, 0.158}, -- Duskwood <--> Elwynn Forest + {34, 30, 0.15, 0.214}, -- Duskwood <--> Elwynn Forest + {34, 689, 0.447, 0.884}, -- Duskwood <--> Stranglethorn Vale + {34, 689, 0.209, 0.863}, -- Duskwood <--> Stranglethorn Vale + {34, 36, 0.941, 0.103}, -- Duskwood <--> Redridge Mountains + {34, 39, 0.079, 0.638}, -- Duskwood <--> Westfall + {23, 22, 0.077, 0.661}, -- Eastern Plaguelands <--> Western Plaguelands + {23, 463, 0.575, 0.000}, -- Eastern Plaguelands <--> Ghostlands + {30, 301, 0.321, 0.493}, -- Elwynn Forest <--> Stormwind City -- Don't need to convert because it's in Elwynn coordinates, not Stormwind coordinates + {30, 39, 0.202, 0.804}, -- Elwynn Forest <--> Westfall + {30, 36, 0.944, 0.724}, -- Elwynn Forest <--> Redridge Mountains + {462, 480, 0.567, 0.494}, -- Eversong Woods <--> Silvermoon City + {462, 463, 0.486, 0.916}, -- Eversong Woods <--> Ghostlands + {21, 20, 0.678, 0.049}, -- Silverpine Forest <--> Tirisfal Glades + {26, 22, 0.217, 0.264}, -- The Hinterlands <--> Western Plaguelands + {20, 382, 0.619, 0.651}, -- Tirisfal Glades <--> Undercity + {20, 22, 0.851, 0.703}, -- Tirisfal Glades <--> Western Plaguelands + {689, 39, 0.292, 0.024}, -- Stranglethorn Vale <--> Westfall + {24, 21, 0.137, 0.458}, -- Hillsbrad Foothills <--> Silverpine Forest + {24, 26, 0.899, 0.253}, -- Hillsbrad Foothills <--> The Hinterlands + {40, 700, 0.80, 0.47}, -- Wetlands <--> Twilight Highlands + {35, 40, 0.252, 0}, -- Loch Modan <--> Wetlands -- Outland - {58, 60, 0.783, 0.545}, -- Nagrand <--> Shattrath City -- this is aldor-only - {60, 55, 0.782, 0.492}, -- Shattrath City <--> Terokkar Forest - {54, 59, 0.842, 0.284}, -- Blade's Edge Mountains <--> Netherstorm - {54, 57, 0.522, 0.996}, -- Blade's Edge Mountains <--> Zangarmarsh - {54, 57, 0.312, 0.94}, -- Blade's Edge Mountains <--> Zangarmarsh - {56, 55, 0.353, 0.901}, -- Hellfire Peninsula <--> Terokkar Forest - {56, 57, 0.093, 0.519}, -- Hellfire Peninsula <--> Zangarmarsh - {58, 55, 0.8, 0.817}, -- Nagrand <--> Terokkar Forest - {58, 57, 0.343, 0.159}, -- Nagrand <--> Zangarmarsh - {58, 57, 0.754, 0.331}, -- Nagrand <--> Zangarmarsh - {53, 55, 0.208, 0.271}, -- Shadowmoon Valley <--> Terokkar Forest - {55, 57, 0.341, 0.098}, -- Terokkar Forest <--> Zangarmarsh + {477, 481, 0.783, 0.545}, -- Nagrand <--> Shattrath City -- this is aldor-only + {481, 478, 0.782, 0.492}, -- Shattrath City <--> Terokkar Forest + {475, 479, 0.842, 0.284}, -- Blade's Edge Mountains <--> Netherstorm + {475, 467, 0.522, 0.996}, -- Blade's Edge Mountains <--> Zangarmarsh + {475, 467, 0.312, 0.94}, -- Blade's Edge Mountains <--> Zangarmarsh + {465, 478, 0.353, 0.901}, -- Hellfire Peninsula <--> Terokkar Forest + {465, 467, 0.093, 0.519}, -- Hellfire Peninsula <--> Zangarmarsh + {477, 478, 0.8, 0.817}, -- Nagrand <--> Terokkar Forest + {477, 467, 0.343, 0.159}, -- Nagrand <--> Zangarmarsh + {477, 467, 0.754, 0.331}, -- Nagrand <--> Zangarmarsh + {473, 478, 0.208, 0.271}, -- Shadowmoon Valley <--> Terokkar Forest + {478, 467, 0.341, 0.098}, -- Terokkar Forest <--> Zangarmarsh -- Northrend - {65, 68, 0.967, 0.359}, -- Borean Tundra <--> Dragonblight - {74, 72, 0.208, 0.191}, -- Wintergrasp <--> Sholazar - {68, 74, 0.250, 0.410}, -- Dragonblight <--> Wintergrasp - {68, 71, 0.359, 0.155}, -- Dragonblight <--> Icecrown - {68, 66, 0.612, 0.142}, -- Dragonblight <--> Crystalsong - {68, 75, 0.900, 0.200}, -- Dragonblight <--> Zul'Drak - {68, 69, 0.924, 0.304}, -- Dragonblight <--> Grizzly Hills - {68, 69, 0.931, 0.634}, -- Dragonblight <--> Grizzly Hills - {70, 69, 0.540, 0.042}, -- Howling Fjord <--> Grizzly Hills - {70, 69, 0.233, 0.074}, -- Howling Fjord <--> Grizzly Hills - {70, 69, 0.753, 0.060}, -- Howling Fjord <--> Grizzly Hills - {69, 75, 0.432, 0.253}, -- Grizzly Hills <--> Zul'Drak - {69, 75, 0.583, 0.136}, -- Grizzly Hills <--> Zul'Drak - {66, 75, 0.967, 0.599}, -- Crystalsong <--> Zul'Drak - {66, 71, 0.156, 0.085}, -- Crystalsong <--> Icecrown - {66, 73, 0.706, 0.315}, -- Crystalsong <--> Storm Peaks - {66, 73, 0.839, 0.340}, -- Crystalsong <--> Storm Peaks - {71, 73, 0.920, 0.767}, -- Icecrown <--> Storm Peaks + {486, 488, 0.967, 0.359}, -- Borean Tundra <--> Dragonblight + {501, 493, 0.208, 0.191}, -- Wintergrasp <--> Sholazar + {488, 501, 0.250, 0.410}, -- Dragonblight <--> Wintergrasp + {488, 492, 0.359, 0.155}, -- Dragonblight <--> Icecrown + {488, 510, 0.612, 0.142}, -- Dragonblight <--> Crystalsong + {488, 496, 0.900, 0.200}, -- Dragonblight <--> Zul'Drak + {488, 490, 0.924, 0.304}, -- Dragonblight <--> Grizzly Hills + {488, 490, 0.931, 0.634}, -- Dragonblight <--> Grizzly Hills + {491, 490, 0.540, 0.042}, -- Howling Fjord <--> Grizzly Hills + {491, 490, 0.233, 0.074}, -- Howling Fjord <--> Grizzly Hills + {491, 490, 0.753, 0.060}, -- Howling Fjord <--> Grizzly Hills + {490, 496, 0.432, 0.253}, -- Grizzly Hills <--> Zul'Drak + {490, 496, 0.583, 0.136}, -- Grizzly Hills <--> Zul'Drak + {510, 496, 0.967, 0.599}, -- Crystalsong <--> Zul'Drak + {510, 492, 0.156, 0.085}, -- Crystalsong <--> Icecrown + {510, 495, 0.706, 0.315}, -- Crystalsong <--> Storm Peaks + {510, 495, 0.839, 0.340}, -- Crystalsong <--> Storm Peaks + {492, 495, 0.920, 0.767}, -- Icecrown <--> Storm Peaks } 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 local function convertLostIsles(current, other1, other2) @@ -457,7 +451,7 @@ end function load_graph_links() local function convert_coordinate(coord) 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. if coord[1] == 177 and not QuestHelper_ZoneLookup[coord[1]] then coord[1] = 184 @@ -489,10 +483,8 @@ function load_graph_links() -- Use the lookup table to get the real coordinate. if converter[coord[1]] then coord[1] = converter[coord[1]]() end - + ]==] 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])) local c, x, y = QuestHelper.Astrolabe:GetAbsoluteContinentPosition(QuestHelper_ZoneLookup[coord[1]][1], QuestHelper_ZoneLookup[coord[1]][2], coord[2], coord[3]) QuestHelper: Assert(c) diff --git a/QuestHelper/upgrade.lua b/QuestHelper/upgrade.lua index 98c8540..8721ef2 100644 --- a/QuestHelper/upgrade.lua +++ b/QuestHelper/upgrade.lua @@ -109,67 +109,6 @@ QuestHelper_Zones = [3]="The Lost Isles", [4]="The Maelstrom" }, - [-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 +116,109 @@ QuestHelper_Zones = -- Additionally, [CONT_INDEX][ZONE_INDEX] = INDEX will also be added. QuestHelper_IndexLookup = { - ["Orgrimmar"] = {1, 1, 17}, - ["Ashenvale"] = {2, 1, 2}, - ["AzuremystIsle"] = {3, 1, 4}, - ["Desolace"] = {4, 1, 8}, - ["Silithus"] = {5, 1, 18}, - ["StonetalonMountains"] = {6, 1, 20}, - ["Durotar"] = {7, 1, 9}, - ["Tanaris"] = {8, 1, 21}, - ["BloodmystIsle"] = {9, 1, 5}, - ["Dustwallow"] = {10, 1, 10}, + ["Orgrimmar"] = {321, 1, 17}, + ["Ashenvale"] = {43, 1, 2}, + ["AzuremystIsle"] = {464, 1, 4}, + ["Desolace"] = {101, 1, 8}, + ["Silithus"] = {261, 1, 18}, + ["StonetalonMountains"] = {81, 1, 20}, + ["Durotar"] = {4, 1, 9}, + ["Tanaris"] = {161, 1, 21}, + ["BloodmystIsle"] = {476, 1, 5}, + ["Dustwallow"] = {141, 1, 10}, ["Barrens"] = {11, 1, 16}, - ["TheExodar"] = {12, 1, 23}, - ["Felwood"] = {13, 1, 11}, - ["ThousandNeedles"] = {14, 1, 24}, - ["Aszhara"] = {15, 1, 3}, - ["Darkshore"] = {16, 1, 6}, - ["Feralas"] = {17, 1, 12}, - ["UngoroCrater"] = {18, 1, 27}, - ["Winterspring"] = {19, 1, 28}, - ["Moonglade"] = {20, 1, 13}, - ["Darnassus"] = {21, 1, 7}, - ["Mulgore"] = {22, 1, 15}, - ["ThunderBluff"] = {23, 1, 25}, - ["Teldrassil"] = {24, 1, 22}, - ["Ironforge"] = {25, 2, 14}, - ["Badlands"] = {27, 2, 3}, - ["DunMorogh"] = {28, 2, 7}, - ["LochModan"] = {29, 2, 17}, - ["Redridge"] = {30, 2, 19}, - ["Duskwood"] = {31, 2, 8}, - ["SearingGorge"] = {32, 2, 22}, - ["BlastedLands"] = {33, 2, 4}, - ["EasternPlaguelands"] = {34, 2, 9}, - ["Silverpine"] = {35, 2, 25}, - ["StormwindCity"] = {36, 2, 26}, - ["Elwynn"] = {37, 2, 10}, - ["StranglethornVale"] = {38, 2, 27}, - ["Arathi"] = {39, 2, 2}, - ["BurningSteppes"] = {40, 2, 5}, - ["EversongWoods"] = {41, 2, 11}, - ["Hinterlands"] = {42, 2, 30}, - ["Tirisfal"] = {43, 2, 31}, - ["Ghostlands"] = {44, 2, 12}, - ["Undercity"] = {45, 2, 35}, - ["SwampOfSorrows"] = {46, 2, 28}, - ["DeadwindPass"] = {47, 2, 6}, - ["HillsbradFoothills"] = {48, 2, 13}, - ["Westfall"] = {49, 2, 38}, - ["WesternPlaguelands"] = {50, 2, 37}, - ["Wetlands"] = {51, 2, 39}, - ["SilvermoonCity"] = {52, 2, 24}, - ["ShadowmoonValley"] = {53, 3, 5}, - ["BladesEdgeMountains"] = {54, 3, 1}, - ["TerokkarForest"] = {55, 3, 7}, - ["Hellfire"] = {56, 3, 2}, - ["Zangarmarsh"] = {57, 3, 8}, - ["Nagrand"] = {58, 3, 3}, - ["Netherstorm"] = {59, 3, 4}, - ["ShattrathCity"] = {60, 3, 6}, - ["Kalimdor"] = {61, 1, 0}, - ["Azeroth"] = {62, 2, 0}, - ["Expansion01"] = {63, 3, 0}, - ["Sunwell"] = {64, 2, 15}, - ["BoreanTundra"] = {65, 4, 1}, - ["CrystalsongForest"] = {66, 4, 2}, - ["Dalaran"] = {67, 4, 3}, - ["Dragonblight"] = {68, 4, 4}, - ["GrizzlyHills"] = {69, 4, 5}, - ["HowlingFjord"] = {70, 4, 6}, - ["IcecrownGlacier"] = {71, 4, 8}, - ["SholazarBasin"] = {72, 4, 9}, - ["TheStormPeaks"] = {73, 4, 10}, - ["LakeWintergrasp"] = {74, 4, 11}, - ["ZulDrak"] = {75, 4, 12}, - ["Northrend"] = {76, 4, 0}, + ["TheExodar"] = {471, 1, 23}, + ["Felwood"] = {182, 1, 11}, + ["ThousandNeedles"] = {61, 1, 24}, + ["Aszhara"] = {181, 1, 3}, + ["Darkshore"] = {42, 1, 6}, + ["Feralas"] = {121, 1, 12}, + ["UngoroCrater"] = {201, 1, 27}, + ["Winterspring"] = {281, 1, 28}, + ["Moonglade"] = {241, 1, 13}, + ["Darnassus"] = {381, 1, 7}, + ["Mulgore"] = {9, 1, 15}, + ["ThunderBluff"] = {362, 1, 25}, + ["Teldrassil"] = {41, 1, 22}, + ["Ironforge"] = {341, 2, 14}, + ["Badlands"] = {17, 2, 3}, + ["DunMorogh"] = {27, 2, 7}, + ["LochModan"] = {35, 2, 17}, + ["Redridge"] = {36, 2, 19}, + ["Duskwood"] = {34, 2, 8}, + ["SearingGorge"] = {28, 2, 22}, + ["BlastedLands"] = {19, 2, 4}, + ["EasternPlaguelands"] = {23, 2, 9}, + ["Silverpine"] = {21, 2, 25}, + ["StormwindCity"] = {301, 2, 26}, + ["Elwynn"] = {30, 2, 10}, + ["StranglethornVale"] = {689, 2, 27}, + ["Arathi"] = {16, 2, 2}, + ["BurningSteppes"] = {29, 2, 5}, + ["EversongWoods"] = {462, 2, 11}, + ["Hinterlands"] = {26, 2, 30}, + ["Tirisfal"] = {20, 2, 31}, + ["Ghostlands"] = {463, 2, 12}, + ["Undercity"] = {382, 2, 35}, + ["SwampOfSorrows"] = {38, 2, 28}, + ["DeadwindPass"] = {32, 2, 6}, + ["HillsbradFoothills"] = {24, 2, 13}, + ["Westfall"] = {39, 2, 38}, + ["WesternPlaguelands"] = {22, 2, 37}, + ["Wetlands"] = {40, 2, 39}, + ["SilvermoonCity"] = {480, 2, 24}, + ["ShadowmoonValley"] = {473, 3, 5}, + ["BladesEdgeMountains"] = {475, 3, 1}, + ["TerokkarForest"] = {478, 3, 7}, + ["Hellfire"] = {465, 3, 2}, + ["Zangarmarsh"] = {467, 3, 8}, + ["Nagrand"] = {477, 3, 3}, + ["Netherstorm"] = {479, 3, 4}, + ["ShattrathCity"] = {481, 3, 6}, + ["Kalimdor"] = {13, 1, 0}, + ["Azeroth"] = {-1, 2, 0}, + ["Expansion01"] = {466, 3, 0}, + ["Sunwell"] = {789, 2, 15}, + ["BoreanTundra"] = {486, 4, 1}, + ["CrystalsongForest"] = {510, 4, 2}, + ["Dalaran"] = {504, 4, 3}, + ["Dragonblight"] = {488, 4, 4}, + ["GrizzlyHills"] = {490, 4, 5}, + ["HowlingFjord"] = {491, 4, 6}, + ["IcecrownGlacier"] = {492, 4, 8}, + ["SholazarBasin"] = {493, 4, 9}, + ["TheStormPeaks"] = {495, 4, 10}, + ["LakeWintergrasp"] = {501, 4, 11}, + ["ZulDrak"] = {496, 4, 12}, + ["Northrend"] = {485, 4, 0}, - ["HrothgarsLanding"] = {153, 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 + ["HrothgarsLanding"] = {541, 4, 7}, -- wooo consecutive numbering + ["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}, } QuestHelper_RestrictedZones = { -- Everything defaults to "nil" From 00a8f01f6508f1a2f3579433fee1aedddf8db097 Mon Sep 17 00:00:00 2001 From: "Nathanial.C.Jones" Date: Tue, 31 Jan 2012 11:36:14 +0000 Subject: [PATCH 03/12] Initial update of Elders to mapID based planes, with the addition of Cat elders. --- QuestHelper/director_find.lua | 133 ++++++++++++++++++---------------- 1 file changed, 72 insertions(+), 61 deletions(-) diff --git a/QuestHelper/director_find.lua b/QuestHelper/director_find.lua index 5473cd0..6c10493 100644 --- a/QuestHelper/director_find.lua +++ b/QuestHelper/director_find.lua @@ -141,77 +141,88 @@ end local elders = { ["Alliance"] = { - ["Bladeswift"] = {21, 39, 32}, --"Darnassus 39 32", - ["Bronzebeard"] = {25, 29, 16}, --"Ironforge 29 16", - ["Hammershout"] = {37, 2, 10}, --"Elwynn Forest 34 50" + ["Bladeswift"] = {381, 39, 32}, --"Darnassus 39 32", + ["Bronzebeard"] = {341, 29, 16}, --"Ironforge 29 16", + ["Hammershout"] = {30, 2, 10}, --"Elwynn Forest 34 50" }, ["Horde"] = { - ["Darkhorn"] = {1, 52, 60}, --"Orgrimmar 52 60", - ["Wheathoof"] = {23, 73.0, 23.3}, --"Thunder Bluff 73.0 23.3", - ["Darkcore"] = {45, 67, 38}, --"Undercity 67 38" + ["Darkhorn"] = {321, 52, 60}, --"Orgrimmar 52 60", + ["Wheathoof"] = {362, 73.0, 23.3}, --"Thunder Bluff 73.0 23.3", + ["Darkcore"] = {382, 67, 38}, --"Undercity 67 38" }, ["Kalimdor"] = { - ["Riversong"] = {2, 35.5, 48.9}, --"Ashenvale 35.5 48.9", - ["Skygleam"] = {15, 64.8, 79.3}, --"Azshara 64.8 79.3", - ["High Mountain"] = {203, 41.5, 47.5}, --"Southern Barrens 41.5 47.5", + ["Riversong"] = {43, 35.5, 48.9}, --"Ashenvale 35.5 48.9", + ["Skygleam"] = {181, 64.8, 79.3}, --"Azshara 64.8 79.3", + ["High Mountain"] = {607, 41.5, 47.5}, --"Southern Barrens 41.5 47.5", ["Moonwarden"] = {11, 48.5, 59.2}, --"Northern Barrens 48.5 59.2", ["Windtotem"] = {11, 68.4, 70}, --"Northern Barrens 68.4 70", - ["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!!!!!!! - ["Runetotem"] = {7, 53.2, 43.6}, --"Durotar 53.2 43.6", - ["Nightwind"] = {13, 38.3, 52.9}, --"Felwood 38.3 52.9", - ["Grimtotem"] = {17, 76.7, 37.9}, --"Feralas 76.7 37.9", - ["Mistwalker"] = {17, 62.6, 31.1}, --"Feralas 62.6 31.1", - ["Bloodhoof"] = {22, 48, 53}, --"Mulgore 48 53", - ["Bladesing"] = {5, 53, 35}, --"Silithus 53 35", - ["Primestone"] = {5, 30.7, 13.3}, --"Silithus 30.7 13.3", - ["Dreamseer"] = {8, 50, 28}, --"Tanaris 50 28", - ["Ragetotem"] = {8, 36, 80}, --"Tanaris 36 80", - ["Bladeleaf"] = {24, 56.8, 53.1}, --"Teldrassil 56.8 53.1", - ["Skyseer"] = {14, 46.3, 51.0}, --"Thousand Needles 46.3 51.0", - ["Morningdew"] = {14, 77.0, 75.6}, --"Thousand Needles 77.0 75.6", - ["Thunderhorn"] = {18, 51, 75}, --"Un'Goro Crater 51 75", - ["Brightspear"] = {19, 53.0, 56.7}, --"Winterspring 53.0 56.7", - ["Stonespire"] = {19, 60.0, 50.0}, --"Winterspring 60.0 50.0", + ["Starweave"] = {42, 49.5, 19.0}, --"Darkshore 49.5 19.0", NOTE TO SELF -- CONVERTING TO LOOKUP VALUES DON'T FORGET TO CHANGE THE FUNCTION!!!!!!! + ["Runetotem"] = {4, 53.2, 43.6}, --"Durotar 53.2 43.6", + ["Nightwind"] = {182, 38.3, 52.9}, --"Felwood 38.3 52.9", + ["Grimtotem"] = {121, 76.7, 37.9}, --"Feralas 76.7 37.9", + ["Mistwalker"] = {121, 62.6, 31.1}, --"Feralas 62.6 31.1", + ["Bloodhoof"] = {9, 48, 53}, --"Mulgore 48 53", + ["Bladesing"] = {261, 53, 35}, --"Silithus 53 35", + ["Primestone"] = {261, 30.7, 13.3}, --"Silithus 30.7 13.3", + ["Dreamseer"] = {161, 50, 28}, --"Tanaris 50 28", + ["Ragetotem"] = {161, 36, 80}, --"Tanaris 36 80", + ["Bladeleaf"] = {41, 56.8, 53.1}, --"Teldrassil 56.8 53.1", + ["Skyseer"] = {61, 46.3, 51.0}, --"Thousand Needles 46.3 51.0", + ["Morningdew"] = {61, 77.0, 75.6}, --"Thousand Needles 77.0 75.6", + ["Thunderhorn"] = {201, 51, 75}, --"Un'Goro Crater 51 75", + ["Brightspear"] = {281, 53.0, 56.7}, --"Winterspring 53.0 56.7", + ["Stonespire"] = {281, 60.0, 50.0}, --"Winterspring 60.0 50.0", }, ["Eastern Kingdoms"] = { - ["Bellowrage"] = {33, 54, 49}, --"Blasted Lands 54 49", - ["Rumblerock"] = {40, 70, 45}, --"Burning Steppes 70 45", - ["Dawnstrider"] = {40, 53, 24}, --"Burning Steppes 53 24", - ["Goldwell"] = {28, 53.9, 49.9}, --"Dun Morogh 53 49", - ["Windrun"] = {34, 35.6, 68.8}, --"Eastern Plaguelands 35 68", - ["Snowcrown"] = {34, 75.7, 54.5}, --"Eastern Plaguelands 75.7 54.5", - ["Stormbrow"] = {37, 40, 63}, --"Elwynn Forest 40 63", - ["Highpeak"] = {42, 50, 48}, --"Hinterlands 50 48", - ["Silvervein"] = {29, 33, 46}, --"Loch Modan 33 46", - ["Ironband"] = {32, 21, 79}, --"Searing Gorge 21 79", - ["Obsidian"] = {35, 45, 41}, --"Silverpine Forest 45 41", - ["Starglade"] = {38, 63, 22}, --"Stranglethorn Vale 63 22", -- Jungle 71 34 - ["Winterhoof"] = {38, 37, 39}, --"Stranglethorn Vale 37 79", -- Cape 39 72 - ["Graveborn"] = {43, 61, 53}, --"Tirisfal Glades 61 53", - ["Moonstrike"] = {50, 69, 73}, --"Western Plaguelands 69 73", - ["Meadowrun"] = {50, 63.5, 36.2}, --"Western Plaguelands 63 36", - ["Skychaser"] = {49, 56, 47}, --"Westfall 56 47" + ["Bellowrage"] = {19, 54, 49}, --"Blasted Lands 54 49", + ["Rumblerock"] = {29, 70, 45}, --"Burning Steppes 70 45", + ["Dawnstrider"] = {29, 53, 24}, --"Burning Steppes 53 24", + ["Goldwell"] = {27, 53.9, 49.9}, --"Dun Morogh 53 49", + ["Windrun"] = {23, 35.6, 68.8}, --"Eastern Plaguelands 35 68", + ["Snowcrown"] = {23, 75.7, 54.5}, --"Eastern Plaguelands 75.7 54.5", + ["Stormbrow"] = {30, 40, 63}, --"Elwynn Forest 40 63", + ["Highpeak"] = {26, 50, 48}, --"Hinterlands 50 48", + ["Silvervein"] = {35, 33, 46}, --"Loch Modan 33 46", + ["Ironband"] = {28, 21, 79}, --"Searing Gorge 21 79", + ["Obsidian"] = {21, 45, 41}, --"Silverpine Forest 45 41", + ["Starglade"] = {689, 63, 22}, --"Stranglethorn Vale 63 22", -- Jungle 71 34 + ["Winterhoof"] = {689, 37, 39}, --"Stranglethorn Vale 37 79", -- Cape 39 72 + ["Graveborn"] = {20, 61, 53}, --"Tirisfal Glades 61 53", + ["Moonstrike"] = {22, 69, 73}, --"Western Plaguelands 69 73", + ["Meadowrun"] = {22, 63.5, 36.2}, --"Western Plaguelands 63 36", + ["Skychaser"] = {39, 56, 47}, --"Westfall 56 47" }, ["Northrend"] = { - ["Arp"] = {65, 57, 44}, --"Borean Tundra 57 44", - ["Northal"] = {65, 34, 34}, --"Borean Tundra 34 34", - ["Pamuya"] = {65, 43, 50}, --"Borean Tundra 43 50", - ["Sardis"] = {65, 59, 66}, --"Borean Tundra 59 66", - ["Morthie"] = {68, 30, 56}, --"Dragonblight 30 56", - ["Skywarden"] = {68, 35, 48}, --"Dragonblight 35 48", - ["Thoim"] = {68, 49, 78}, --"Dragonblight 49 78", - ["Beldak"] = {69, 61, 28}, --"Grizzly Hills 61 28", - ["Lunaro"] = {69, 81, 37}, --"Grizzly Hills 81 37", - ["Whurain"] = {69, 64, 47}, --"Grizzly Hills 64 47", - ["Bluewolf"] = {74, 49, 14}, --"Wintergrasp 49 14", - ["Sandrene"] = {72, 50, 64}, --"Sholazar Basin 50 64", - ["Wanikaya"] = {72, 64, 49}, --"Sholazar Basin 64 49", - ["Fargal"] = {73, 29, 74}, --"Storm Peaks 29 74", - ["Graymane"] = {73, 41, 85}, --"Storm Peaks 41 85", - ["Muraco"] = {73, 64, 51}, --"Storm Peaks 64 51", - ["Stonebeard"] = {73, 31, 38}, --"Storm Peaks 31 38", - ["Tauros"] = {75, 59, 56}, --"Zul'Drak 59 56" - } + ["Arp"] = {486, 57, 44}, --"Borean Tundra 57 44", + ["Northal"] = {486, 34, 34}, --"Borean Tundra 34 34", + ["Pamuya"] = {486, 43, 50}, --"Borean Tundra 43 50", + ["Sardis"] = {486, 59, 66}, --"Borean Tundra 59 66", + ["Morthie"] = {488, 30, 56}, --"Dragonblight 30 56", + ["Skywarden"] = {488, 35, 48}, --"Dragonblight 35 48", + ["Thoim"] = {488, 49, 78}, --"Dragonblight 49 78", + ["Beldak"] = {490, 61, 28}, --"Grizzly Hills 61 28", + ["Lunaro"] = {490, 81, 37}, --"Grizzly Hills 81 37", + ["Whurain"] = {490, 64, 47}, --"Grizzly Hills 64 47", + ["Bluewolf"] = {501, 49, 14}, --"Wintergrasp 49 14", + ["Sandrene"] = {493, 50, 64}, --"Sholazar Basin 50 64", + ["Wanikaya"] = {493, 64, 49}, --"Sholazar Basin 64 49", + ["Fargal"] = {495, 29, 74}, --"Storm Peaks 29 74", + ["Graymane"] = {495, 41, 85}, --"Storm Peaks 41 85", + ["Muraco"] = {495, 64, 51}, --"Storm Peaks 64 51", + ["Stonebeard"] = {495, 31, 38}, --"Storm Peaks 31 38", + ["Tauros"] = {496, 59, 56}, --"Zul'Drak 59 56" + }, + ["Cataclysm"] = { + ["Moonlance"] = {615, 57, 86}, -- Biel'aran Ridge, Shimmering Expanse + ["Windsong"] = {606, 27, 62}, -- Sanctuary of Malorne, Hyjal + ["Evershade"] = {606, 63, 23}, -- Nordrassil, Hyjal + ["Stonebrand"] = {640, 50, 55}, -- Temple of Earth, Deepholm + ["Deepforge"] = {640, 28, 69}, -- Stonehearth, Deepholm + ["Menkhaf"] = {720, 66, 19}, -- Khartut's Tomb, Uldum + ["Sekhemi"] = {720, 32, 63}, -- Ruins of Ammon, Uldum + ["Firebeard"] = {700, 51, 71}, -- Dunward Town Square, Dunward Ruins, Twilight Highlands + ["Darkfeather"] = {700, 52, 33} -- Thundermar Ruins, Twilight Highlands + }, } local function QH_FindElders(elder_or_achievement, all_elders) From 3075954a513bd1e89d2bd994eb6e1e0e6f3a1461 Mon Sep 17 00:00:00 2001 From: "Nathanial.C.Jones" Date: Tue, 31 Jan 2012 13:10:56 +0000 Subject: [PATCH 04/12] Finished update of Elders to mapID based planes, with the addition of Cat elders. --- QuestHelper/custom.lua | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/QuestHelper/custom.lua b/QuestHelper/custom.lua index b96dfca..0424610 100644 --- a/QuestHelper/custom.lua +++ b/QuestHelper/custom.lua @@ -334,7 +334,18 @@ local elders = { ["Muraco"] = "Storm Peaks 64 51", ["Stonebeard"] = "Storm Peaks 31 38", ["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) From bf43ddd2a24e223c048208f3ef81ff27f9a83322 Mon Sep 17 00:00:00 2001 From: "Nathanial.C.Jones" Date: Wed, 1 Feb 2012 01:37:20 +0000 Subject: [PATCH 05/12] Successfully loads with MapIDs as planes... Crashes with quests (not unexpected). This is just a good point to "save." --- QuestHelper/libs/AstrolabeQH/Astrolabe.lua | 83 +++++++++++----------- QuestHelper/pathfinding.lua | 8 +-- QuestHelper/upgrade.lua | 4 +- QuestHelper/utility.lua | 2 +- 4 files changed, 49 insertions(+), 48 deletions(-) diff --git a/QuestHelper/libs/AstrolabeQH/Astrolabe.lua b/QuestHelper/libs/AstrolabeQH/Astrolabe.lua index 5d6bfac..9de5234 100644 --- a/QuestHelper/libs/AstrolabeQH/Astrolabe.lua +++ b/QuestHelper/libs/AstrolabeQH/Astrolabe.lua @@ -194,7 +194,6 @@ function Astrolabe:GetMapVirtualZones(zone) return {[1] = k} end end - local curMapID = GetCurrentMapAreaID() local zones = {GetMapZones(zone)} @@ -1947,65 +1946,65 @@ VContinent(-118, "PitofSaron", 1022.3) VirtualContinentIndexes = { -- Don't change values here, since programs might want to store them ["ScarletEnclave"] = -77, - ["GilneasCity"] = -78, - ["GilneasZone"] = -79, +-- ["GilneasCity"] = -78, +-- ["GilneasZone"] = -79, - ["UtgardeKeep1"] = -80, - ["UtgardeKeep2"] = -81, - ["UtgardeKeep3"] = -82, +-- ["UtgardeKeep1"] = -80, +-- ["UtgardeKeep2"] = -81, +-- ["UtgardeKeep3"] = -82, - ["TheNexus"] = -83, +-- ["TheNexus"] = -83, - ["AzjolNerub1"] = -84, - ["AzjolNerub2"] = -85, - ["AzjolNerub3"] = -86, +-- ["AzjolNerub1"] = -84, +-- ["AzjolNerub2"] = -85, +-- ["AzjolNerub3"] = -86, - ["Ahnkahet"] = -87, +-- ["Ahnkahet"] = -87, - ["DrakTharonKeep1"] = -88, - ["DrakTharonKeep2"] = -89, +-- ["DrakTharonKeep1"] = -88, +-- ["DrakTharonKeep2"] = -89, - ["VioletHold"] = -90, +-- ["VioletHold"] = -90, - ["Gundrak"] = -91, +-- ["Gundrak"] = -91, - ["Ulduar77"] = -92, -- Halls of Stone +-- ["Ulduar77"] = -92, -- Halls of Stone - ["HallsofLightning1"] = -93, - ["HallsofLightning2"] = -94, +-- ["HallsofLightning1"] = -93, +-- ["HallsofLightning2"] = -94, - ["Nexus801"] = -95, -- Oculus - ["Nexus802"] = -96, - ["Nexus803"] = -97, - ["Nexus804"] = -98, +-- ["Nexus801"] = -95, -- Oculus +-- ["Nexus802"] = -96, +-- ["Nexus803"] = -97, +-- ["Nexus804"] = -98, - ["CoTStratholme1"] = -99, - ["CoTStratholme2"] = -100, +-- ["CoTStratholme1"] = -99, +-- ["CoTStratholme2"] = -100, - ["UtgardePinnacle1"] = -101, -- hey they spelled it right - ["UtgardePinnacle2"] = -102, +-- ["UtgardePinnacle1"] = -101, -- hey they spelled it right +-- ["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, - ["Naxxramas2"] = -105, - ["Naxxramas3"] = -106, - ["Naxxramas4"] = -107, - ["Naxxramas5"] = -108, - ["Naxxramas6"] = -109, +-- ["Naxxramas1"] = -104, +-- ["Naxxramas2"] = -105, +-- ["Naxxramas3"] = -106, +-- ["Naxxramas4"] = -107, +-- ["Naxxramas5"] = -108, +-- ["Naxxramas6"] = -109, - ["TheObsidianSanctum"] = -110, +-- ["TheObsidianSanctum"] = -110, - ["TheEyeOfEternity"] = -111, +-- ["TheEyeOfEternity"] = -111, - ["Ulduar"] = -112, - ["Ulduar1"] = -113, - ["Ulduar2"] = -114, - ["Ulduar3"] = -115, - ["Ulduar4"] = -116, +-- ["Ulduar"] = -112, +-- ["Ulduar1"] = -113, +-- ["Ulduar2"] = -114, +-- ["Ulduar3"] = -115, +-- ["Ulduar4"] = -116, - ["TheForgeofSouls"] = -117, - ["PitofSaron"] = -118 +-- ["TheForgeofSouls"] = -117, +-- ["PitofSaron"] = -118 --[[ ["AbyssalMaw"] = -120, ["ThroneOfTheTides"] = -130, diff --git a/QuestHelper/pathfinding.lua b/QuestHelper/pathfinding.lua index d3df184..bd9604d 100644 --- a/QuestHelper/pathfinding.lua +++ b/QuestHelper/pathfinding.lua @@ -209,7 +209,7 @@ local static_shared_routes = {{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. - {{462, 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 {{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 @@ -296,7 +296,7 @@ local static_shared_routes = } -- 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 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 @@ -326,14 +326,14 @@ local static_zone_transitions = --Outland --Northrend - {65, 72, 0.527, 0.322}, -- Borean Tundra <--> Scholazar Basin + {486, 493, 0.527, 0.322}, -- Borean Tundra <--> Scholazar Basin --Cataclysm zones -- Work {4, 321, 0.117, 0.936}, -- Durotar <--> Orgrimmar (Front) {4, 321, 0.366, 0.253}, -- Durotar <--> Orgrimmar (Side) - {15, 321, 0.792, 0.017}, -- Azshara <--> Orgrimmar (Back) + {181, 321, 0.792, 0.017}, -- Azshara <--> Orgrimmar (Back) {772, 261, 0.687, 0.2}, -- Ahn'Qiraj <--> Silithus {37, 673, 0.50, 0.61}, -- Northern Stranglethorn <--> Cape of Stranglethorn diff --git a/QuestHelper/upgrade.lua b/QuestHelper/upgrade.lua index 8721ef2..89cf65b 100644 --- a/QuestHelper/upgrade.lua +++ b/QuestHelper/upgrade.lua @@ -109,6 +109,7 @@ QuestHelper_Zones = [3]="The Lost Isles", [4]="The Maelstrom" }, + [-77]={[0]="ScarletEnclave_Continent", [1]="ScarletEnclave"}, } @@ -178,7 +179,7 @@ QuestHelper_IndexLookup = ["Kalimdor"] = {13, 1, 0}, ["Azeroth"] = {-1, 2, 0}, ["Expansion01"] = {466, 3, 0}, - ["Sunwell"] = {789, 2, 15}, + ["Sunwell"] = {499, 2, 15}, ["BoreanTundra"] = {486, 4, 1}, ["CrystalsongForest"] = {510, 4, 2}, ["Dalaran"] = {504, 4, 3}, @@ -219,6 +220,7 @@ QuestHelper_IndexLookup = ["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" diff --git a/QuestHelper/utility.lua b/QuestHelper/utility.lua index c4f3d3a..6dc943b 100644 --- a/QuestHelper/utility.lua +++ b/QuestHelper/utility.lua @@ -131,7 +131,7 @@ function QuestHelper:TextOut(text) local theme = self:GetColourTheme() 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[3]*255, text), + theme.message_prefix[3]*255, tostring(text)), theme.message[1], theme.message[2], theme.message[3]) From c77bc5fc31535f35e7fdadc8f67074aa7f0a1664 Mon Sep 17 00:00:00 2001 From: "Nathanial.C.Jones" Date: Wed, 8 Feb 2012 03:41:53 +0000 Subject: [PATCH 06/12] Some more changes for using the WoW quest tracking API. Removed the ugly database hacks, they are not necessary with the planes set to be the map ID's and no calls going out to the built in database. Fixed the elders in Stranglethorn. --- QuestHelper/custom.lua | 4 +-- QuestHelper/db_get.lua | 37 ++++++++++++++++------------ QuestHelper/director_achievement.lua | 8 ------ QuestHelper/director_find.lua | 12 ++------- QuestHelper/director_quest.lua | 17 ++----------- QuestHelper/graph_core.lua | 9 ------- QuestHelper/routing_core.lua | 4 --- 7 files changed, 27 insertions(+), 64 deletions(-) diff --git a/QuestHelper/custom.lua b/QuestHelper/custom.lua index 0424610..06296a2 100644 --- a/QuestHelper/custom.lua +++ b/QuestHelper/custom.lua @@ -308,8 +308,8 @@ local elders = { ["Silvervein"] = "Loch Modan 33 46", ["Ironband"] = "Searing Gorge 21 79", ["Obsidian"] = "Silverpine Forest 45 41", - ["Starglade"] = "Stranglethorn Vale 63 22", -- Jungle 71 34 - ["Winterhoof"] = "Stranglethorn Vale 37 79", -- Cape 39 72 + ["Starglade"] = "Northern Stranglethorn 71 34", + ["Winterhoof"] = "The Cape of Stranglethorn 39 72", -- Cape 39 72 ["Graveborn"] = "Tirisfal Glades 61 53", ["Moonstrike"] = "Western Plaguelands 69 73", ["Meadowrun"] = "Western Plaguelands 63 36", diff --git a/QuestHelper/db_get.lua b/QuestHelper/db_get.lua index a7a48c1..cc9b3b9 100644 --- a/QuestHelper/db_get.lua +++ b/QuestHelper/db_get.lua @@ -165,16 +165,24 @@ local function GetZonePOIs(c, z) isComplete = true end local poi = {} - poi.questLogIndex = questLogIndex - poi.questId = questId - poi.title = questTitle - poi.c = c - poi.z = z - poi.x = x - poi.y = y - poi.p = mapID - poi.completed = isComplete - pois[count] = poi + if pois[questId] then poi = pois[questId] + else pois[questId] = poi end + + if not poi.questLogIndex then + poi.questLogIndex = questLogIndex + poi.questId = questId + poi.name = questTitle + poi.criteria = {} + poi.criteria.loc = {} + end + + local loc = {} + loc.c = c + loc.x = x + loc.y = y + loc.p = mapID + loc.completed = isComplete + poi.criteria.loc:insert(loc) count = count+1 hasQuests = true end @@ -194,6 +202,7 @@ function DB_GetItem(group, id, silent, register) -- 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 = {} local origC = GetCurrentMapContinent() local origZ = GetCurrentMapZone() @@ -202,12 +211,8 @@ function DB_GetItem(group, id, silent, register) for c, cname in ipairs({GetMapContinents()}) do for z, zname in ipairs({GetMapZones(c)}) do local pois, zoneHasQuests = GetZonePOIs(c, z) - if zoneHasQuests then - for _, ipoi in ipairs(pois) do - if ipoi.questId == id then - myPois[count] = ipoi - end - end + if zoneHasQuests and pois[id] then + ite:insert(pois[id]) end end end diff --git a/QuestHelper/director_achievement.lua b/QuestHelper/director_achievement.lua index 3603938..6bb579d 100644 --- a/QuestHelper/director_achievement.lua +++ b/QuestHelper/director_achievement.lua @@ -289,20 +289,12 @@ function GetAchievementMetaObjective(achievement) if data.chunk then ttx.solid = horribledupe(data.chunk.solid) 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}}) end end end if data.loc then 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}}) end diff --git a/QuestHelper/director_find.lua b/QuestHelper/director_find.lua index 6c10493..ccdf97f 100644 --- a/QuestHelper/director_find.lua +++ b/QuestHelper/director_find.lua @@ -71,10 +71,6 @@ local function generate_objective(dbi) for _, v in ipairs(dbi.loc) do QuestHelper: Assert(QuestHelper_ParentLookup) 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}) end @@ -185,8 +181,8 @@ local elders = { ["Silvervein"] = {35, 33, 46}, --"Loch Modan 33 46", ["Ironband"] = {28, 21, 79}, --"Searing Gorge 21 79", ["Obsidian"] = {21, 45, 41}, --"Silverpine Forest 45 41", - ["Starglade"] = {689, 63, 22}, --"Stranglethorn Vale 63 22", -- Jungle 71 34 - ["Winterhoof"] = {689, 37, 39}, --"Stranglethorn Vale 37 79", -- Cape 39 72 + ["Starglade"] = {37, 71, 34}, --"Northern Stranglethorn 71 34" + ["Winterhoof"] = {673, 39, 72}, --"The Cape of Stranglethorn 39 72" ["Graveborn"] = {20, 61, 53}, --"Tirisfal Glades 61 53", ["Moonstrike"] = {22, 69, 73}, --"Western Plaguelands 69 73", ["Meadowrun"] = {22, 63.5, 36.2}, --"Western Plaguelands 63 36", @@ -297,10 +293,6 @@ function QH_FindName(name) --[[ assert(dbi) ]] 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) if has_name[dbi.name] then needs_postfix[dbi.name] = true end diff --git a/QuestHelper/director_quest.lua b/QuestHelper/director_quest.lua index 600091a..d348327 100644 --- a/QuestHelper/director_quest.lua +++ b/QuestHelper/director_quest.lua @@ -48,10 +48,6 @@ local function AppendObjlinks(target, source, tooltips, icon, last_name, map_lin for m, v in ipairs(source.loc) do QuestHelper: Assert(target) 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) 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 @@ -121,6 +117,7 @@ local function GetQuestMetaobjective(questid, lbcount, qindex) if not quest_list[questid] then local q = DB_GetItem("quest", questid, true, true) + --[==[ if not lbcount then QuestHelper: TextOut("Missing lbcount, guessing wildly") if q and q.criteria then @@ -132,6 +129,7 @@ local function GetQuestMetaobjective(questid, lbcount, qindex) lbcount = 0 -- heh end end + --]==] -- just doublechecking here if not QuestCriteriaWarningBroadcast and q and q.criteria then for k, v in pairs(q.criteria) do @@ -159,13 +157,6 @@ local function GetQuestMetaobjective(questid, lbcount, qindex) 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)) ---[[ - 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 = {} if q and q.criteria and q.criteria[i] then @@ -209,10 +200,6 @@ local function GetQuestMetaobjective(questid, lbcount, qindex) --print(v.rc, v.rz) --print(QuestHelper_IndexLookup[v.rc]) --print(QuestHelper_IndexLookup[v.rc][v.rz]) --- 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, {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 diff --git a/QuestHelper/graph_core.lua b/QuestHelper/graph_core.lua index 9400c74..7958496 100644 --- a/QuestHelper/graph_core.lua +++ b/QuestHelper/graph_core.lua @@ -151,17 +151,8 @@ function QH_Graph_Pathmultifind(st, nda, reverse, make_path) --stats.dests_complex = 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 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) if plane[cpvp] then --print("Destination plane insertion") diff --git a/QuestHelper/routing_core.lua b/QuestHelper/routing_core.lua index f3778b5..a7e4c5a 100644 --- a/QuestHelper/routing_core.lua +++ b/QuestHelper/routing_core.lua @@ -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 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) Storage_NodeAdded(idx) ClusterLookup[idx] = clustid From 0496df026883f5606bdea1abf9853c6c013820f2 Mon Sep 17 00:00:00 2001 From: "Nathanial.C.Jones" Date: Thu, 9 Feb 2012 03:01:12 +0000 Subject: [PATCH 07/12] Implemented functionality to automatically update the tracked elders by keeping track of their associated quests and whether or not the quests have been completed. This works for a brand new character, but is untested on an established character that has previously completed the achievements. Theoretically it should work on such a character, since the quests are annual quests and the completion status should reset each year. Please note that tracking of regular quests is still not working in this branch. QH WILL, repeat WILL break if you have ANY quests in your log. --- QuestHelper/db_get.lua | 2 + QuestHelper/director_find.lua | 220 ++++++++++++++++++++-------------- QuestHelper/main.lua | 9 ++ 3 files changed, 141 insertions(+), 90 deletions(-) diff --git a/QuestHelper/db_get.lua b/QuestHelper/db_get.lua index cc9b3b9..8ed5677 100644 --- a/QuestHelper/db_get.lua +++ b/QuestHelper/db_get.lua @@ -198,6 +198,8 @@ function DB_GetItem(group, id, silent, register) QuestHelper: Assert(id, string.format("%s %s", tostring(group), tostring(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. diff --git a/QuestHelper/director_find.lua b/QuestHelper/director_find.lua index ccdf97f..0919460 100644 --- a/QuestHelper/director_find.lua +++ b/QuestHelper/director_find.lua @@ -136,90 +136,120 @@ local function QH_FindLoc(locd) end local elders = { - ["Alliance"] = { - ["Bladeswift"] = {381, 39, 32}, --"Darnassus 39 32", - ["Bronzebeard"] = {341, 29, 16}, --"Ironforge 29 16", - ["Hammershout"] = {30, 2, 10}, --"Elwynn Forest 34 50" + ["Alliance"] = { -- Achievement 915 + ["Bladeswift"] = {381, 39, 32, 8718}, --"Darnassus 39 32", + ["Bronzebeard"] = {341, 29, 16, 8866}, --"Ironforge 29 16", + ["Hammershout"] = {30, 2, 10, 8646}, --"Elwynn Forest 34 50" }, - ["Horde"] = { - ["Darkhorn"] = {321, 52, 60}, --"Orgrimmar 52 60", - ["Wheathoof"] = {362, 73.0, 23.3}, --"Thunder Bluff 73.0 23.3", - ["Darkcore"] = {382, 67, 38}, --"Undercity 67 38" + ["Horde"] = { -- Achievement 914 + ["Darkhorn"] = {321, 52, 60, 8677}, --"Orgrimmar 52 60", + ["Wheathoof"] = {362, 73.0, 23.3, 8678}, --"Thunder Bluff 73.0 23.3", + ["Darkcore"] = {382, 67, 38, 8648}, --"Undercity 67 38" }, - ["Kalimdor"] = { - ["Riversong"] = {43, 35.5, 48.9}, --"Ashenvale 35.5 48.9", - ["Skygleam"] = {181, 64.8, 79.3}, --"Azshara 64.8 79.3", - ["High Mountain"] = {607, 41.5, 47.5}, --"Southern Barrens 41.5 47.5", - ["Moonwarden"] = {11, 48.5, 59.2}, --"Northern Barrens 48.5 59.2", - ["Windtotem"] = {11, 68.4, 70}, --"Northern Barrens 68.4 70", - ["Starweave"] = {42, 49.5, 19.0}, --"Darkshore 49.5 19.0", NOTE TO SELF -- CONVERTING TO LOOKUP VALUES DON'T FORGET TO CHANGE THE FUNCTION!!!!!!! - ["Runetotem"] = {4, 53.2, 43.6}, --"Durotar 53.2 43.6", - ["Nightwind"] = {182, 38.3, 52.9}, --"Felwood 38.3 52.9", - ["Grimtotem"] = {121, 76.7, 37.9}, --"Feralas 76.7 37.9", - ["Mistwalker"] = {121, 62.6, 31.1}, --"Feralas 62.6 31.1", - ["Bloodhoof"] = {9, 48, 53}, --"Mulgore 48 53", - ["Bladesing"] = {261, 53, 35}, --"Silithus 53 35", - ["Primestone"] = {261, 30.7, 13.3}, --"Silithus 30.7 13.3", - ["Dreamseer"] = {161, 50, 28}, --"Tanaris 50 28", - ["Ragetotem"] = {161, 36, 80}, --"Tanaris 36 80", - ["Bladeleaf"] = {41, 56.8, 53.1}, --"Teldrassil 56.8 53.1", - ["Skyseer"] = {61, 46.3, 51.0}, --"Thousand Needles 46.3 51.0", - ["Morningdew"] = {61, 77.0, 75.6}, --"Thousand Needles 77.0 75.6", - ["Thunderhorn"] = {201, 51, 75}, --"Un'Goro Crater 51 75", - ["Brightspear"] = {281, 53.0, 56.7}, --"Winterspring 53.0 56.7", - ["Stonespire"] = {281, 60.0, 50.0}, --"Winterspring 60.0 50.0", + ["Kalimdor"] = { -- Achievement 911 + ["Riversong"] = {43, 35.5, 48.9, 8725}, --"Ashenvale 35.5 48.9", + ["Skygleam"] = {181, 64.8, 79.3, 8720}, --"Azshara 64.8 79.3", + ["High Mountain"] = {607, 41.5, 47.5, 8686}, --"Southern Barrens 41.5 47.5", + ["Moonwarden"] = {11, 48.5, 59.2, 8717}, --"Northern Barrens 48.5 59.2", + ["Windtotem"] = {11, 68.4, 70, 8680}, --"Northern Barrens 68.4 70", + ["Starweave"] = {42, 49.5, 19.0, 8721}, --"Darkshore 49.5 19.0", + ["Runetotem"] = {4, 53.2, 43.6, 8670}, --"Durotar 53.2 43.6", + ["Nightwind"] = {182, 38.3, 52.9, 8723}, --"Felwood 38.3 52.9", + ["Grimtotem"] = {121, 76.7, 37.9, 8679}, --"Feralas 76.7 37.9", + ["Mistwalker"] = {121, 62.6, 31.1, 8685}, --"Feralas 62.6 31.1", + ["Bloodhoof"] = {9, 48, 53, 8673}, --"Mulgore 48 53", + ["Bladesing"] = {261, 53, 35, 8719}, --"Silithus 53 35", + ["Primestone"] = {261, 30.7, 13.3, 8654}, --"Silithus 30.7 13.3", + ["Dreamseer"] = {161, 50, 28, 8684}, --"Tanaris 50 28", + ["Ragetotem"] = {161, 36, 80, 8671}, --"Tanaris 36 80", + ["Bladeleaf"] = {41, 56.8, 53.1, 8715}, --"Teldrassil 56.8 53.1", + ["Skyseer"] = {61, 46.3, 51.0, 8682}, --"Thousand Needles 46.3 51.0", + ["Morningdew"] = {61, 77.0, 75.6, 8724}, --"Thousand Needles 77.0 75.6", + ["Thunderhorn"] = {201, 51, 75, 8681}, --"Un'Goro Crater 51 75", + ["Brightspear"] = {281, 53.0, 56.7, 8726}, --"Winterspring 53.0 56.7", + ["Stonespire"] = {281, 60.0, 50.0, 8672}, --"Winterspring 60.0 50.0", }, - ["Eastern Kingdoms"] = { - ["Bellowrage"] = {19, 54, 49}, --"Blasted Lands 54 49", - ["Rumblerock"] = {29, 70, 45}, --"Burning Steppes 70 45", - ["Dawnstrider"] = {29, 53, 24}, --"Burning Steppes 53 24", - ["Goldwell"] = {27, 53.9, 49.9}, --"Dun Morogh 53 49", - ["Windrun"] = {23, 35.6, 68.8}, --"Eastern Plaguelands 35 68", - ["Snowcrown"] = {23, 75.7, 54.5}, --"Eastern Plaguelands 75.7 54.5", - ["Stormbrow"] = {30, 40, 63}, --"Elwynn Forest 40 63", - ["Highpeak"] = {26, 50, 48}, --"Hinterlands 50 48", - ["Silvervein"] = {35, 33, 46}, --"Loch Modan 33 46", - ["Ironband"] = {28, 21, 79}, --"Searing Gorge 21 79", - ["Obsidian"] = {21, 45, 41}, --"Silverpine Forest 45 41", - ["Starglade"] = {37, 71, 34}, --"Northern Stranglethorn 71 34" - ["Winterhoof"] = {673, 39, 72}, --"The Cape of Stranglethorn 39 72" - ["Graveborn"] = {20, 61, 53}, --"Tirisfal Glades 61 53", - ["Moonstrike"] = {22, 69, 73}, --"Western Plaguelands 69 73", - ["Meadowrun"] = {22, 63.5, 36.2}, --"Western Plaguelands 63 36", - ["Skychaser"] = {39, 56, 47}, --"Westfall 56 47" + ["Eastern Kingdoms"] = { -- Achievement 912 + ["Bellowrage"] = {19, 54, 49, 8647}, --"Blasted Lands 54 49", + ["Rumblerock"] = {29, 70, 45, 8636}, --"Burning Steppes 70 45", + ["Dawnstrider"] = {29, 53, 24, 8683}, --"Burning Steppes 53 24", + ["Goldwell"] = {27, 53.9, 49.9, 8653}, --"Dun Morogh 53 49", + ["Windrun"] = {23, 35.6, 68.8, 8688}, --"Eastern Plaguelands 35 68", + ["Snowcrown"] = {23, 75.7, 54.5, 8650}, --"Eastern Plaguelands 75.7 54.5", + ["Stormbrow"] = {30, 40, 63, 8649}, --"Elwynn Forest 40 63", + ["Highpeak"] = {26, 50, 48, 8643}, --"Hinterlands 50 48", + ["Silvervein"] = {35, 33, 46, 8642}, --"Loch Modan 33 46", + ["Ironband"] = {28, 21, 79, 8651}, --"Searing Gorge 21 79", + ["Obsidian"] = {21, 45, 41, 8645}, --"Silverpine Forest 45 41", + ["Starglade"] = {37, 71, 34, 8716}, --"Northern Stranglethorn 71 34" + ["Winterhoof"] = {673, 39, 72, 8674}, --"The Cape of Stranglethorn 39 72" + ["Graveborn"] = {20, 61, 53, 8652}, --"Tirisfal Glades 61 53", + ["Moonstrike"] = {22, 69, 73, 8714}, --"Western Plaguelands 69 73", + ["Meadowrun"] = {22, 63.5, 36.2, 8722}, --"Western Plaguelands 63 36", + ["Skychaser"] = {39, 56, 47, 8675}, --"Westfall 56 47" }, - ["Northrend"] = { - ["Arp"] = {486, 57, 44}, --"Borean Tundra 57 44", - ["Northal"] = {486, 34, 34}, --"Borean Tundra 34 34", - ["Pamuya"] = {486, 43, 50}, --"Borean Tundra 43 50", - ["Sardis"] = {486, 59, 66}, --"Borean Tundra 59 66", - ["Morthie"] = {488, 30, 56}, --"Dragonblight 30 56", - ["Skywarden"] = {488, 35, 48}, --"Dragonblight 35 48", - ["Thoim"] = {488, 49, 78}, --"Dragonblight 49 78", - ["Beldak"] = {490, 61, 28}, --"Grizzly Hills 61 28", - ["Lunaro"] = {490, 81, 37}, --"Grizzly Hills 81 37", - ["Whurain"] = {490, 64, 47}, --"Grizzly Hills 64 47", - ["Bluewolf"] = {501, 49, 14}, --"Wintergrasp 49 14", - ["Sandrene"] = {493, 50, 64}, --"Sholazar Basin 50 64", - ["Wanikaya"] = {493, 64, 49}, --"Sholazar Basin 64 49", - ["Fargal"] = {495, 29, 74}, --"Storm Peaks 29 74", - ["Graymane"] = {495, 41, 85}, --"Storm Peaks 41 85", - ["Muraco"] = {495, 64, 51}, --"Storm Peaks 64 51", - ["Stonebeard"] = {495, 31, 38}, --"Storm Peaks 31 38", - ["Tauros"] = {496, 59, 56}, --"Zul'Drak 59 56" + ["Northrend"] = { -- Achievement 1396 + ["Arp"] = {486, 57, 44, 13033}, --"Borean Tundra 57 44", + ["Northal"] = {486, 34, 34, 13016}, --"Borean Tundra 34 34", + ["Pamuya"] = {486, 43, 50, 13029}, --"Borean Tundra 43 50", + ["Sardis"] = {486, 59, 66, 13012}, --"Borean Tundra 59 66", + ["Morthie"] = {488, 30, 56, 13014}, --"Dragonblight 30 56", + ["Skywarden"] = {488, 35, 48, 13031}, --"Dragonblight 35 48", + ["Thoim"] = {488, 49, 78, 13019}, --"Dragonblight 49 78", + ["Beldak"] = {490, 61, 28, 13013}, --"Grizzly Hills 61 28", + ["Lunaro"] = {490, 81, 37, 13025}, --"Grizzly Hills 81 37", + ["Whurain"] = {490, 64, 47, 13030}, --"Grizzly Hills 64 47", + ["Bluewolf"] = {501, 49, 14, 13026}, --"Wintergrasp 49 14", + ["Sandrene"] = {493, 50, 64, 13018}, --"Sholazar Basin 50 64", + ["Wanikaya"] = {493, 64, 49, 13024}, --"Sholazar Basin 64 49", + ["Fargal"] = {495, 29, 74, 13015}, --"Storm Peaks 29 74", + ["Graymane"] = {495, 41, 85, 13028}, --"Storm Peaks 41 85", + ["Muraco"] = {495, 64, 51, 13032}, --"Storm Peaks 64 51", + ["Stonebeard"] = {495, 31, 38, 13020}, --"Storm Peaks 31 38", + ["Tauros"] = {496, 59, 56, 13027}, --"Zul'Drak 59 56" }, - ["Cataclysm"] = { - ["Moonlance"] = {615, 57, 86}, -- Biel'aran Ridge, Shimmering Expanse - ["Windsong"] = {606, 27, 62}, -- Sanctuary of Malorne, Hyjal - ["Evershade"] = {606, 63, 23}, -- Nordrassil, Hyjal - ["Stonebrand"] = {640, 50, 55}, -- Temple of Earth, Deepholm - ["Deepforge"] = {640, 28, 69}, -- Stonehearth, Deepholm - ["Menkhaf"] = {720, 66, 19}, -- Khartut's Tomb, Uldum - ["Sekhemi"] = {720, 32, 63}, -- Ruins of Ammon, Uldum - ["Firebeard"] = {700, 51, 71}, -- Dunward Town Square, Dunward Ruins, Twilight Highlands - ["Darkfeather"] = {700, 52, 33} -- Thundermar Ruins, Twilight Highlands + ["Cataclysm"] = { -- Achievement 6006 + ["Moonlance"] = {615, 57, 86, 29738}, -- Biel'aran Ridge, Shimmering Expanse + ["Windsong"] = {606, 27, 62, 29739}, -- Sanctuary of Malorne, Hyjal + ["Evershade"] = {606, 63, 23, 29740}, -- Nordrassil, Hyjal + ["Stonebrand"] = {640, 50, 55, 29735}, -- Temple of Earth, Deepholm + ["Deepforge"] = {640, 28, 69, 29734}, -- Stonehearth, Deepholm + ["Menkhaf"] = {720, 66, 19, 29742}, -- Khartut's Tomb, Uldum + ["Sekhemi"] = {720, 32, 63, 29741}, -- Ruins of Ammon, Uldum + ["Firebeard"] = {700, 51, 71, 29737}, -- Dunward Town Square, Dunward Ruins, Twilight Highlands + ["Darkfeather"] = {700, 52, 33, 29736} -- 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}, -- Zul'Farrak 34.52 39.35 + ["Splitrock"] = {,,,8635}, -- Maraudon 51.47, 93.7 + ["Morndeep"] = {,,,8619}, -- Blackrock Depths 50.52 62.97 + ["Jarten"] = {,,,13017}, -- Utgarde Keep 47.4, 69.54 + ["Nurgen"] = {,,,13022}, -- Azjol-Nerub 21.78 43.62 + ["Ohanzee"] = {,,,13065}, -- Gundrak 45.7 61.55 + ["Chogan'gada"] = {,,,13067}, -- Utgarde Pinnacle 47.71 22.99 + ["Starsong"] = {,,,8713}, -- Sunken Temple 62.92 34.46 + ["Stonefort"] = {,,,8644}, -- Blackrock Spire 61.82 40 + ["Farwhisper"] = {,,,8727}, -- Stratholme 78.62 22.14 + ["Igasho"] = {,,,13021}, -- The Nexus 55.18 64.74 + ["Kilias"] = {,,,13023}, -- Drak'tharon Keep 68.85 79.17 + ["Yurauk"] = {,,,13066} -- Halls of Stone 29.39 62.03 + } + --]===] } +local function UpdateElders() + local qid = GetQuestID() + for achievement, eldrs in pairs(elders) do + for elder, elderinfo in pairs(eldrs) do + local z, x, y, id = unpack(elderinfo) + if id == qid then + QH_FindCoord(x, y, z, elder) + end + end + end +end + +QH_Event("QUEST_COMPLETE", UpdateElders) local function QH_FindElders(elder_or_achievement, all_elders) local achievement_match, elder_match = false, false @@ -228,25 +258,35 @@ local function QH_FindElders(elder_or_achievement, all_elders) if elder_or_achievement == string.upper(achievement) then achievement_match = true end end - for elder, elder_loc in pairs(eldrs) do - if not all_elders then - if achievement_match then -- just add it - local locz, locx, locy = unpack(elder_loc) + for elder, elder_info in pairs(eldrs) do + local locz, locx, locy, qid = unpack(elder_info) + local okToAdd = true + if 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) + 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) + 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) - 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 - local locz, locx, locy = unpack(elder_loc) - QH_FindCoord(locx, locy, locz, elder) - 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. - local locz, locx, locy = unpack(elder_loc) - QH_FindCoord(locx, locy, locz, elder) + end end end if achievement_match or elder_match then break end -- We've done our match. end + + local shownEldersCount = 0 + + if shownElders then for k, _ in pairs(shownElders) do shownEldersCount = shownEldersCount + 1 end end + + if shownEldersCount > 0 then shownElders = nil end end function QH_FindName(name) diff --git a/QuestHelper/main.lua b/QuestHelper/main.lua index 3d1df56..b26b2a6 100644 --- a/QuestHelper/main.lua +++ b/QuestHelper/main.lua @@ -182,10 +182,19 @@ local please_submit_enabled = true local please_submit_initted = false local spawned = false + +QHQuestsCompleted = false + QH_Event("ADDON_LOADED", function (addonid) if addonid ~= "QuestHelper" then return end -- ONLY FAST STUFF ALLOWED IN HERE + + QH_Event("QUEST_QUERY_COMPLETE", function () + QHQuestsCompleted = GetQuestsCompleted() + end) + + QueryQuestsCompleted() -- Use DefaultPref as fallback for unset preference keys. setmetatable(QuestHelper_Pref, {__index=QuestHelper_DefaultPref}) From 92ca575dffa0f2d0925c10abe20130fd04278675 Mon Sep 17 00:00:00 2001 From: "Nathanial.C.Jones" Date: Fri, 10 Feb 2012 00:59:22 +0000 Subject: [PATCH 08/12] Added functionality to track the elders based on their associated achievements, and the ability to clear the entire list. "/qh find elder[s] achievement [elder_or_achievement]" will track the incomplete achievements of the specified elder or achievement, or all incomplete elder achievements if none is specified. "/qh find elder[s] clear" will clear the tracker of all tracked elders regardless of completion. --- QuestHelper/director_find.lua | 215 ++++++++++++++++++++-------------- 1 file changed, 127 insertions(+), 88 deletions(-) diff --git a/QuestHelper/director_find.lua b/QuestHelper/director_find.lua index 0919460..3ed6576 100644 --- a/QuestHelper/director_find.lua +++ b/QuestHelper/director_find.lua @@ -137,37 +137,37 @@ end local elders = { ["Alliance"] = { -- Achievement 915 - ["Bladeswift"] = {381, 39, 32, 8718}, --"Darnassus 39 32", - ["Bronzebeard"] = {341, 29, 16, 8866}, --"Ironforge 29 16", - ["Hammershout"] = {30, 2, 10, 8646}, --"Elwynn Forest 34 50" + ["Bladeswift"] = {381, 39, 32, 8718, 1999}, --"Darnassus 39 32", + ["Bronzebeard"] = {341, 29, 16, 8866, 1997}, --"Ironforge 29 16", + ["Hammershout"] = { 30, 2, 10, 8646, 1998}, --"Elwynn Forest 34 50" }, ["Horde"] = { -- Achievement 914 - ["Darkhorn"] = {321, 52, 60, 8677}, --"Orgrimmar 52 60", - ["Wheathoof"] = {362, 73.0, 23.3, 8678}, --"Thunder Bluff 73.0 23.3", - ["Darkcore"] = {382, 67, 38, 8648}, --"Undercity 67 38" + ["Darkhorn"] = {321, 52, 60, 8677, 1991}, --"Orgrimmar 52 60", + ["Wheathoof"] = {362, 73.0, 23.3, 8678, 1993}, --"Thunder Bluff 73.0 23.3", + ["Darkcore"] = {382, 67, 38, 8648, 1992}, --"Undercity 67 38" }, ["Kalimdor"] = { -- Achievement 911 - ["Riversong"] = {43, 35.5, 48.9, 8725}, --"Ashenvale 35.5 48.9", - ["Skygleam"] = {181, 64.8, 79.3, 8720}, --"Azshara 64.8 79.3", - ["High Mountain"] = {607, 41.5, 47.5, 8686}, --"Southern Barrens 41.5 47.5", - ["Moonwarden"] = {11, 48.5, 59.2, 8717}, --"Northern Barrens 48.5 59.2", - ["Windtotem"] = {11, 68.4, 70, 8680}, --"Northern Barrens 68.4 70", - ["Starweave"] = {42, 49.5, 19.0, 8721}, --"Darkshore 49.5 19.0", - ["Runetotem"] = {4, 53.2, 43.6, 8670}, --"Durotar 53.2 43.6", - ["Nightwind"] = {182, 38.3, 52.9, 8723}, --"Felwood 38.3 52.9", - ["Grimtotem"] = {121, 76.7, 37.9, 8679}, --"Feralas 76.7 37.9", - ["Mistwalker"] = {121, 62.6, 31.1, 8685}, --"Feralas 62.6 31.1", - ["Bloodhoof"] = {9, 48, 53, 8673}, --"Mulgore 48 53", - ["Bladesing"] = {261, 53, 35, 8719}, --"Silithus 53 35", - ["Primestone"] = {261, 30.7, 13.3, 8654}, --"Silithus 30.7 13.3", - ["Dreamseer"] = {161, 50, 28, 8684}, --"Tanaris 50 28", - ["Ragetotem"] = {161, 36, 80, 8671}, --"Tanaris 36 80", - ["Bladeleaf"] = {41, 56.8, 53.1, 8715}, --"Teldrassil 56.8 53.1", - ["Skyseer"] = {61, 46.3, 51.0, 8682}, --"Thousand Needles 46.3 51.0", - ["Morningdew"] = {61, 77.0, 75.6, 8724}, --"Thousand Needles 77.0 75.6", - ["Thunderhorn"] = {201, 51, 75, 8681}, --"Un'Goro Crater 51 75", - ["Brightspear"] = {281, 53.0, 56.7, 8726}, --"Winterspring 53.0 56.7", - ["Stonespire"] = {281, 60.0, 50.0, 8672}, --"Winterspring 60.0 50.0", + ["Bladeleaf"] = { 41, 56.8, 53.1, 8715, 1951}, --"Teldrassil 56.8 53.1", + ["Bladesing"] = {261, 53, 35, 8719, 1966}, --"Silithus 53 35", + ["Bloodhoof"] = { 9, 48, 53, 8673, 1953}, --"Mulgore 48 53", + ["Brightspear"] = {281, 53.0, 56.7, 8726, 1963}, --"Winterspring 53.0 56.7", + ["Dreamseer"] = {161, 50, 28, 8684, 1961}, --"Tanaris 50 28", + ["Grimtotem"] = {121, 76.7, 37.9, 8679, 1955}, --"Feralas 76.7 37.9", + ["High Mountain"] = {607, 41.5, 47.5, 8686, 1919}, --"Southern Barrens 41.5 47.5", + ["Mistwalker"] = {121, 62.6, 31.1, 8685, 1956}, --"Feralas 62.6 31.1", + ["Moonwarden"] = { 11, 48.5, 59.2, 8717, 1918}, --"Northern Barrens 48.5 59.2", + ["Morningdew"] = { 61, 77.0, 75.6, 8724, 1959}, --"Thousand Needles 77.0 75.6", + ["Nightwind"] = {182, 38.3, 52.9, 8723, 1957}, --"Felwood 38.3 52.9", + ["Primestone"] = {261, 30.7, 13.3, 8654, 1965}, --"Silithus 30.7 13.3", + ["Ragetotem"] = {161, 36, 80, 8671, 1960}, --"Tanaris 36 80", + ["Riversong"] = { 43, 35.5, 48.9, 8725, 1954}, --"Ashenvale 35.5 48.9", + ["Runetotem"] = { 4, 53.2, 43.6, 8670, 1916}, --"Durotar 53.2 43.6", + ["Skygleam"] = {181, 64.8, 79.3, 8720, 1917}, --"Azshara 64.8 79.3", + ["Skyseer"] = { 61, 46.3, 51.0, 8682, 1958}, --"Thousand Needles 46.3 51.0", + ["Starweave"] = { 42, 49.5, 19.0, 8721, 1952}, --"Darkshore 49.5 19.0", + ["Stonespire"] = {281, 60.0, 50.0, 8672, 1964}, --"Winterspring 60.0 50.0", + ["Thunderhorn"] = {201, 51, 75, 8681, 1962}, --"Un'Goro Crater 51 75", + ["Windtotem"] = { 11, 68.4, 70, 8680, 1920}, --"Northern Barrens 68.4 70", }, ["Eastern Kingdoms"] = { -- Achievement 912 ["Bellowrage"] = {19, 54, 49, 8647}, --"Blasted Lands 54 49", @@ -189,92 +189,131 @@ local elders = { ["Skychaser"] = {39, 56, 47, 8675}, --"Westfall 56 47" }, ["Northrend"] = { -- Achievement 1396 - ["Arp"] = {486, 57, 44, 13033}, --"Borean Tundra 57 44", - ["Northal"] = {486, 34, 34, 13016}, --"Borean Tundra 34 34", - ["Pamuya"] = {486, 43, 50, 13029}, --"Borean Tundra 43 50", - ["Sardis"] = {486, 59, 66, 13012}, --"Borean Tundra 59 66", - ["Morthie"] = {488, 30, 56, 13014}, --"Dragonblight 30 56", - ["Skywarden"] = {488, 35, 48, 13031}, --"Dragonblight 35 48", - ["Thoim"] = {488, 49, 78, 13019}, --"Dragonblight 49 78", - ["Beldak"] = {490, 61, 28, 13013}, --"Grizzly Hills 61 28", - ["Lunaro"] = {490, 81, 37, 13025}, --"Grizzly Hills 81 37", - ["Whurain"] = {490, 64, 47, 13030}, --"Grizzly Hills 64 47", - ["Bluewolf"] = {501, 49, 14, 13026}, --"Wintergrasp 49 14", - ["Sandrene"] = {493, 50, 64, 13018}, --"Sholazar Basin 50 64", - ["Wanikaya"] = {493, 64, 49, 13024}, --"Sholazar Basin 64 49", - ["Fargal"] = {495, 29, 74, 13015}, --"Storm Peaks 29 74", - ["Graymane"] = {495, 41, 85, 13028}, --"Storm Peaks 41 85", - ["Muraco"] = {495, 64, 51, 13032}, --"Storm Peaks 64 51", - ["Stonebeard"] = {495, 31, 38, 13020}, --"Storm Peaks 31 38", - ["Tauros"] = {496, 59, 56, 13027}, --"Zul'Drak 59 56" + ["Arp"] = {486, 57, 44, 13033, 5145}, --"Borean Tundra 57 44", + ["Northal"] = {486, 34, 34, 13016, 5146}, --"Borean Tundra 34 34", + ["Pamuya"] = {486, 43, 50, 13029, 5157}, --"Borean Tundra 43 50", + ["Sardis"] = {486, 59, 66, 13012, 5141}, --"Borean Tundra 59 66", + ["Morthie"] = {488, 30, 56, 13014, 5143}, --"Dragonblight 30 56", + ["Skywarden"] = {488, 35, 48, 13031, 5159}, --"Dragonblight 35 48", + ["Thoim"] = {488, 49, 78, 13019, 5154}, --"Dragonblight 49 78", + ["Beldak"] = {490, 61, 28, 13013, 5142}, --"Grizzly Hills 61 28", + ["Lunaro"] = {490, 81, 37, 13025, 5149}, --"Grizzly Hills 81 37", + ["Whurain"] = {490, 64, 47, 13030, 5158}, --"Grizzly Hills 64 47", + ["Bluewolf"] = {501, 49, 14, 13026, 5150}, --"Wintergrasp 49 14", + ["Sandrene"] = {493, 50, 64, 13018, 5147}, --"Sholazar Basin 50 64", + ["Wanikaya"] = {493, 64, 49, 13024, 5148}, --"Sholazar Basin 64 49", + ["Fargal"] = {495, 29, 74, 13015, 5144}, --"Storm Peaks 29 74", + ["Graymane"] = {495, 41, 85, 13028, 5155}, --"Storm Peaks 41 85", + ["Muraco"] = {495, 64, 51, 13032, 5160}, --"Storm Peaks 64 51", + ["Stonebeard"] = {495, 31, 38, 13020, 5156}, --"Storm Peaks 31 38", + ["Tauros"] = {496, 59, 56, 13027, 5151}, --"Zul'Drak 59 56" }, ["Cataclysm"] = { -- Achievement 6006 - ["Moonlance"] = {615, 57, 86, 29738}, -- Biel'aran Ridge, Shimmering Expanse - ["Windsong"] = {606, 27, 62, 29739}, -- Sanctuary of Malorne, Hyjal - ["Evershade"] = {606, 63, 23, 29740}, -- Nordrassil, Hyjal - ["Stonebrand"] = {640, 50, 55, 29735}, -- Temple of Earth, Deepholm - ["Deepforge"] = {640, 28, 69, 29734}, -- Stonehearth, Deepholm - ["Menkhaf"] = {720, 66, 19, 29742}, -- Khartut's Tomb, Uldum - ["Sekhemi"] = {720, 32, 63, 29741}, -- Ruins of Ammon, Uldum - ["Firebeard"] = {700, 51, 71, 29737}, -- Dunward Town Square, Dunward Ruins, Twilight Highlands - ["Darkfeather"] = {700, 52, 33, 29736} -- Thundermar Ruins, Twilight Highlands + ["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}, -- Zul'Farrak 34.52 39.35 - ["Splitrock"] = {,,,8635}, -- Maraudon 51.47, 93.7 - ["Morndeep"] = {,,,8619}, -- Blackrock Depths 50.52 62.97 - ["Jarten"] = {,,,13017}, -- Utgarde Keep 47.4, 69.54 - ["Nurgen"] = {,,,13022}, -- Azjol-Nerub 21.78 43.62 - ["Ohanzee"] = {,,,13065}, -- Gundrak 45.7 61.55 - ["Chogan'gada"] = {,,,13067}, -- Utgarde Pinnacle 47.71 22.99 - ["Starsong"] = {,,,8713}, -- Sunken Temple 62.92 34.46 - ["Stonefort"] = {,,,8644}, -- Blackrock Spire 61.82 40 - ["Farwhisper"] = {,,,8727}, -- Stratholme 78.62 22.14 - ["Igasho"] = {,,,13021}, -- The Nexus 55.18 64.74 - ["Kilias"] = {,,,13023}, -- Drak'tharon Keep 68.85 79.17 - ["Yurauk"] = {,,,13066} -- Halls of Stone 29.39 62.03 + ["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 } --]===] } + +trackedElders = {} + local function UpdateElders() - local qid = GetQuestID() - for achievement, eldrs in pairs(elders) do - for elder, elderinfo in pairs(eldrs) do - local z, x, y, id = unpack(elderinfo) - if id == qid then - QH_FindCoord(x, y, z, elder) - end - end + 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) +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 elderCount = 0 + for achievement, eldrs in pairs(elders) do if not all_elders then if elder_or_achievement == string.upper(achievement) then achievement_match = true end end for elder, elder_info in pairs(eldrs) do - local locz, locx, locy, qid = unpack(elder_info) + local locz, locx, locy, qid, aid = unpack(elder_info) local okToAdd = true - if qid and QHQuestsCompleted and QHQuestsCompleted[qid] then + 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) + if trackedElders[elder] then trackedElders[elder] = nil + else + trackedElders[elder] = elder_info + elderCount = elderCount + 1 + end end end end @@ -282,29 +321,29 @@ local function QH_FindElders(elder_or_achievement, all_elders) if achievement_match or elder_match then break end -- We've done our match. end - local shownEldersCount = 0 - - if shownElders then for k, _ in pairs(shownElders) do shownEldersCount = shownEldersCount + 1 end end - - if shownEldersCount > 0 then shownElders = nil end + if elderCount == 0 then QuestHelper:TextOut("No elders were added.") end end function QH_FindName(name) local locd = name:match("^loc (.+)") - local elder_loc + local forAchievement = false, elder_loc, temp if not locd then if name:find("^elders?") then - elder_loc = name:match("elders? (.+)") - if not elder_loc then elder_loc = true end + if name:find("^elders? achievement") then + forAchievement = true + elder_loc = name:match("elders? achievement (.+)") + else + elder_loc = name:match("elders? (.+)") + end end end if locd then QH_FindLoc(locd) elseif elder_loc then - if elder_loc == true then QH_FindElders(nil, true) - else QH_FindElders(string.upper(elder_loc)) + if elder_loc == true then QH_FindElders(nil, true, forAchievement) + else QH_FindElders(string.upper(elder_loc), false, forAchievement) end else if not DB_Ready() then From 87617c4eed24c03c32c9fdcbabac3028742998af Mon Sep 17 00:00:00 2001 From: "Nathanial.C.Jones" Date: Wed, 29 Feb 2012 03:27:41 +0000 Subject: [PATCH 09/12] QH Now queries the WoW client for quests, though it doesn't seem to update correctly when a quest is accepted (and though untested, probably doesn't update locations when the WoW poi changes). Added LibMapData and began transitioning map data needs to use LibMapData. Began changing the data collection, yet again. Once this goes beta, the new collection system will be in place... My hope is to allow QH to "learn" as you play, eliminating any need for data compilation, though I will still make attempts to compile said data into a full on db. Added some code that will eventually be usable to get data from LightHeaded. This is not yet implemented in full, but will be the preferred method of QH doesn't know about a quest. Order of preference will eventually be: 1) Learned data, 2) Internal DB, 3) LightHeaded, 4) WoW client. NOTE: THIS COMMIT IS ON THE WOW-DB-GET BRANCH. An alpha release will be up on the downloads page by 6:30 US EST on February 29, 2012 (tomorrow). I THINK I have covered all the changes in this, but I have done so much since my last commit, I cannot be sure. --- QuestHelper/LibMapDataInit.lua | 3 + QuestHelper/QuestHelper.toc | 7 + QuestHelper/arrow.lua | 1 + QuestHelper/collect_location.lua | 59 +- QuestHelper/db_get.lua | 210 ++- QuestHelper/director_quest.lua | 43 +- QuestHelper/dodads.lua | 20 + QuestHelper/libs/AstrolabeQH/Astrolabe.lua | 112 +- .../Changelog-LibMapData-1.0-0.21-release.txt | 25 + .../libs/LibMapData-1.0/LibMapData-1.0.toc | 14 + .../CallbackHandler-1.0.lua | 240 +++ .../CallbackHandler-1.0.xml | 4 + .../LibMapData-1.0/Libs/LibStub/LibStub.lua | 30 + .../LibMapData-1.0/Libs/LibStub/LibStub.toc | 13 + QuestHelper/libs/LibMapData-1.0/library.lua | 1593 +++++++++++++++++ QuestHelper/routing_controller.lua | 2 +- QuestHelper/timeslice.lua | 6 +- QuestHelper/utility.lua | 8 + 18 files changed, 2255 insertions(+), 135 deletions(-) create mode 100644 QuestHelper/LibMapDataInit.lua create mode 100644 QuestHelper/libs/LibMapData-1.0/Changelog-LibMapData-1.0-0.21-release.txt create mode 100644 QuestHelper/libs/LibMapData-1.0/LibMapData-1.0.toc create mode 100644 QuestHelper/libs/LibMapData-1.0/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua create mode 100644 QuestHelper/libs/LibMapData-1.0/Libs/CallbackHandler-1.0/CallbackHandler-1.0.xml create mode 100644 QuestHelper/libs/LibMapData-1.0/Libs/LibStub/LibStub.lua create mode 100644 QuestHelper/libs/LibMapData-1.0/Libs/LibStub/LibStub.toc create mode 100644 QuestHelper/libs/LibMapData-1.0/library.lua diff --git a/QuestHelper/LibMapDataInit.lua b/QuestHelper/LibMapDataInit.lua new file mode 100644 index 0000000..eecfaea --- /dev/null +++ b/QuestHelper/LibMapDataInit.lua @@ -0,0 +1,3 @@ +assert(QuestHelper and type(QuestHelper) == "table", "Ooops, can't load right now.") + +QuestHelper.LibMapData = LibStub("LibMapData-1.0") diff --git a/QuestHelper/QuestHelper.toc b/QuestHelper/QuestHelper.toc index 69b82cd..33f5451 100644 --- a/QuestHelper/QuestHelper.toc +++ b/QuestHelper/QuestHelper.toc @@ -62,6 +62,8 @@ libs\AceConfig-3.0\AceConfig-3.0.xml bst_astrolabe.lua libs\AstrolabeQH\Load.xml +#MapMonitor.lua +#AstroLabeToLibMapDataConversionStub.lua bst_ctl.lua libs\ChatThrottleLib\ChatThrottleLib.xml @@ -70,6 +72,11 @@ bst_range.lua libs\LibRangeCheck-2.0\CallbackHandler-1.0\CallbackHandler-1.0.xml 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 lang.lua diff --git a/QuestHelper/arrow.lua b/QuestHelper/arrow.lua index c49649c..f142380 100644 --- a/QuestHelper/arrow.lua +++ b/QuestHelper/arrow.lua @@ -198,6 +198,7 @@ OnUpdate = function() 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) + --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 = "" diff --git a/QuestHelper/collect_location.lua b/QuestHelper/collect_location.lua index bc966b4..853b063 100644 --- a/QuestHelper/collect_location.lua +++ b/QuestHelper/collect_location.lua @@ -13,11 +13,63 @@ local function signed(c) --return strchar(c) 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) -- 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 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 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. -- Overall we're using a weird 11 bytes on this. Meh. -- Also, any nil values are being turned into MIN_WHATEVER. - local float_x = float(x) - local float_y = float(y) + local float_x = x + local float_y = y 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["c"] = c loc["z"] = z diff --git a/QuestHelper/db_get.lua b/QuestHelper/db_get.lua index 8ed5677..4147ba3 100644 --- a/QuestHelper/db_get.lua +++ b/QuestHelper/db_get.lua @@ -143,52 +143,158 @@ function DB_HasItem(group, id) return false end - -local function GetZonePOIs(c, z) - SetMapZoom(c, z) - local pois = {} - local count = 1 - local hasQuests = false - local numEntries = QuestMapUpdateAllQuests() +local function GetBlizzardQuestInfoFrameMainLoop(qid) + local POIFrame, questFrame + QuestMapUpdateAllQuests() QuestPOIUpdateIcons() - local numCompleteedQuests = 0 - local mapID = GetMapInfo() - for i = 1, numEntries do - local questId, questLogIndex = QuestPOIGetQuestIDByVisibleIndex(i) - local _, x, y, objective = QuestPOIGetIconInfo(questId) - if x and y then - local questTitle, level, questTag, suggestedGroup, isHeader, isCollapsed, isComplete, isDaily = GetQuestLogTitle(questLogIndex) - numObjectives = GetNumQuestLeaderBoards(questLogIndex) - if isComplete and isComplete < 0 then - isComplete = false - elseif numObjectives == 0 then - isComplete = true - end - local poi = {} - if pois[questId] then poi = pois[questId] - else pois[questId] = poi end + WorldMapFrame_UpdateQuests() - if not poi.questLogIndex then - poi.questLogIndex = questLogIndex - poi.questId = questId - poi.name = questTitle - poi.criteria = {} - poi.criteria.loc = {} + for i = 1, MAX_NUM_QUESTS do + questFrame = _G["WorldMapQuestFrame" .. i] + if questFrame then + if questFrame.questId == qid then + POIFrame = questFrame.poiIcon + break end - - local loc = {} - loc.c = c - loc.x = x - loc.y = y - loc.p = mapID - loc.completed = isComplete - poi.criteria.loc:insert(loc) - count = count+1 - hasQuests = true end end - return pois, hasQuests + 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) @@ -204,25 +310,7 @@ function DB_GetItem(group, id, silent, register) -- 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 = {} - local origC = GetCurrentMapContinent() - local origZ = GetCurrentMapZone() - - local myPois = {} - local myCount = 1 - for c, cname in ipairs({GetMapContinents()}) do - for z, zname in ipairs({GetMapZones(c)}) do - local pois, zoneHasQuests = GetZonePOIs(c, z) - if zoneHasQuests and pois[id] then - ite:insert(pois[id]) - end - end - end - - SetMapZoom(origC, origZ) - - -- Convert POIs appropriately. - -- Set ite to the correctly formatted POIs. + ite = GetQuestInfo(id) end if not ite then @@ -312,7 +400,9 @@ function DB_ReleaseItem(ite) if frequencies[ite] == 0 then --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_id[ite] = nil diff --git a/QuestHelper/director_quest.lua b/QuestHelper/director_quest.lua index d348327..8ef125b 100644 --- a/QuestHelper/director_quest.lua +++ b/QuestHelper/director_quest.lua @@ -134,12 +134,14 @@ local function GetQuestMetaobjective(questid, lbcount, qindex) -- just doublechecking here 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 - --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 QuestHelper_ErrorCatcher_ExplicitError(false, string.format("Too many stored objectives (%s %s %s %s)", questid, lbcount, k, select(1, GetQuestLogTitle(qindex)))) else QuestHelper_ErrorCatcher_ExplicitError(false, string.format("Too many stored objectives (%s %s %s %s)", questid, lbcount, k, v)) end + --]==] QuestCriteriaWarningBroadcast = true end end end @@ -172,7 +174,7 @@ local function GetQuestMetaobjective(questid, lbcount, qindex) end 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 end @@ -192,28 +194,29 @@ local function GetQuestMetaobjective(questid, lbcount, qindex) end do - local ttx = {type_quest_finish = true} - --QuestHelper:TextOut(string.format("finny %d", q.finish.loc and #q.finish.loc or -1)) - if q and q.finish and q.finish.loc then - ttx.solid = horribledupe(q.finish.solid) - for m, v in ipairs(q.finish.loc) do - --print(v.rc, v.rz) - --print(QuestHelper_IndexLookup[v.rc]) - --print(QuestHelper_IndexLookup[v.rc][v.rz]) - 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 q and q.finish and q.loc then + local ttx = {type_quest_finish = true} + --QuestHelper:TextOut(string.format("finny %d", q.finish.loc and #q.finish.loc or -1)) + if q and q.finish and q.finish.loc then + ttx.solid = horribledupe(q.finish.solid) + for m, v in ipairs(q.finish.loc) do + --print(v.rc, v.rz) + --print(QuestHelper_IndexLookup[v.rc]) + --print(QuestHelper_IndexLookup[v.rc][v.rz]) + 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 - 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 - ttx.type_quest_unknown = true - end + if #ttx == 0 then + 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 + end - ite.finish = ttx + ite.finish = ttx + end end quest_list[questid] = ite - if q then DB_ReleaseItem(q) end end @@ -799,7 +802,9 @@ function QH_UpdateQuests(force) 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 diff --git a/QuestHelper/dodads.lua b/QuestHelper/dodads.lua index 5898d8d..0ad4957 100644 --- a/QuestHelper/dodads.lua +++ b/QuestHelper/dodads.lua @@ -427,6 +427,26 @@ local function rightclick_menu(obj) 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) local icon = CreateFrame("Button", nil, QuestHelper.map_overlay) icon:SetFrameStrata("FULLSCREEN") diff --git a/QuestHelper/libs/AstrolabeQH/Astrolabe.lua b/QuestHelper/libs/AstrolabeQH/Astrolabe.lua index 9de5234..012d6b3 100644 --- a/QuestHelper/libs/AstrolabeQH/Astrolabe.lua +++ b/QuestHelper/libs/AstrolabeQH/Astrolabe.lua @@ -289,6 +289,8 @@ function Astrolabe:ComputeDistance( c1, z1, x1, y1, c2, z2, x2, y2 ) return dist, xDelta, yDelta; end +local yards + function Astrolabe:TranslateWorldMapPosition( C, Z, xPos, yPos, nC, nZ ) --[[ argcheck(C, 2, "number"); @@ -325,7 +327,7 @@ function Astrolabe:TranslateWorldMapPosition( C, Z, xPos, yPos, nC, nZ ) zoneData = WorldMapSize[C]; local parentContinent = zoneData.parentContinent; 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 -- translate up to world map if we aren't there already xPos = xPos + zoneData.xOffset; @@ -379,6 +381,14 @@ function Astrolabe:GetZoneWidth(c, z) 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 -- for the specified unit, including changing the current map zoom (if needed). @@ -1196,8 +1206,8 @@ WorldMapSize = { AhnQirajTheFallenKingdom = { height = 2700.0, width = 4049.99983215332, - xOffset = 0, - yOffset = 0, + xOffset = -3891.6665, + yOffset = -8033.333, mapID = 772 }, Ashenvale = { @@ -1222,8 +1232,8 @@ WorldMapSize = { mapID = 3524, }, Barrens = { - height = 6756.202067150937, - width = 10133.44343943073, + height = 3831.24987792969, + width = 5745.83332824707, xOffset = 14443.84117394525, yOffset = 11187.32013604393, mapID = 17, @@ -1287,15 +1297,15 @@ WorldMapSize = { Hyjal = { height = 2831.24975585938, width = 4245.83337402344, - xOffset = 0, - yOffset = 0, + xOffset = 929.167, + yOffset = 6195.833, mapID = 606 }, Hyjal_terrain1 = { height = 2831.24975585938, width = 4245.83337402344, - xOffset = 0, - yOffset = 0, + xOffset = 929.167, + yOffset = 6195.833, mapID = 683 }, Moonglade = { @@ -1329,8 +1339,8 @@ WorldMapSize = { SouthernBarrens = { height = 4941.66665649414, width = 7412.5, - xOffset = 0, - yOffset = 0, + xOffset = -1356.25, + yOffset = 204.167, mapID = 607 }, StonetalonMountains = { @@ -1378,8 +1388,8 @@ WorldMapSize = { Uldum = { height = 4129.16650390625, width = 6193.74975585938, - xOffset = 0, - yOffset = 0, + xOffset = -2441.667, + yOffset = -8029.1665, mapID = 720 }, UngoroCrater = { @@ -1519,17 +1529,17 @@ WorldMapSize = { mapID = 44, }, RuinsofGilneas = { - height = 889.583251953125, - width = 593.749877929688, - xOffset = 0, - yOffset = 0, + height = 2097.916668701172, + width = 3145.83325195312, + xOffset = -3439.583, + yOffset = -533.333, mapID = 611 }, RuinsofGilneasCity = { height = 889.583251953125, width = 593.749877929688, - xOffset = 0, - yOffset = 0, + xOffset = -1933.333, + yOffset = -1306.25, mapID = 685 }, SearingGorge = { @@ -1561,8 +1571,8 @@ WorldMapSize = { mapID = 1519, }, StranglethornVale = { -- Split to Vale, Jungle and Cape - height = 4254.18312444072, - width = 6381.248484543122, + height = 4368.75, + width = 6552.0830078125, xOffset = 15951.13375783437, yOffset = 22345.18258706305, mapID = 33, @@ -1570,8 +1580,8 @@ WorldMapSize = { StranglethornJungle = { height = 2733.3330078125, width = 4099.99987792969, - xOffset = 0, - yOffset = 0, + xOffset = -1743.750, + yOffset = -11016.666, mapID = 37 }, Sunwell = { @@ -1591,8 +1601,8 @@ WorldMapSize = { TheCapeOfStranglethorn = { height = 2631.25, width = 3945.83312988281, - xOffset = 0, - yOffset = 0, + xOffset = -2108.333, + yOffset = -12516.666, mapID = 673 }, Tirisfal = { @@ -1605,29 +1615,29 @@ WorldMapSize = { TolBarad = { height = 1343.75, width = 2014.58329248428, - xOffset = 0, - yOffset = 0, + xOffset = -2010.417, + yOffset = -560.417, mapID = 708 }, TolBaradDailyArea = { height = 1224.99993896484, width = 1837.5, - xOffset = 0, - yOffset = 0, + xOffset = -2412.5, + yOffset = 377.083, mapID = 709 }, TwilightHighlands = { height = 3514.5830078125, width = 5270.8330078125, - xOffset = 0, - yOffset = 0, + xOffset = 2437.5, + yOffset = -2156.25, mapID = 700 }, TwilightHighlands_terrain1 = { height = 3514.5830078125, width = 5270.8330078125, - xOffset = 0, - yOffset = 0, + xOffset = 2437.5, + yOffset = -2156.25, mapID = 770 }, Undercity = { @@ -1640,29 +1650,29 @@ WorldMapSize = { Vashjir = { height = 4631.24975585938, width = 6945.83276367188, - xOffset = 0, - yOffset = 0, + xOffset = -8754.166, + yOffset = -3720.833, mapID = 613 }, VashjirDepths = { height = 2716.66650390625, width = 4075.0, - xOffset = 0, - yOffset = 0, + xOffset = -8233.333, + yOffset = -4906.25, mapID = 614 }, VashjirKelpForest = { height = 1868.75024414062, width = 2802.0830078125, - xOffset = 0, - yOffset = 0, + xOffset = -5070.833, + yOffset = -4018.75, mapID = 610 }, VashjirRuins = { height = 3233.3330078125, width = 4849.99963378906, - xOffset = 0, - yOffset = 0, + xOffset = -6681.25, + yOffset = -4756.25, mapID = 615 }, WesternPlaguelands = { @@ -1840,10 +1850,10 @@ WorldMapSize = { mapID = 66, }, HrothgarsLanding = { - height = 2452.7, - width = 2452.7*1.5, - xOffset = 23967.599 - 17549.182, - yOffset = 1027.392 - 1215.431, + height = 2452.083984375, + width = 3677.08312988281, + xOffset = 6418.417, + yOffset = -188.039, } }, }, @@ -1855,12 +1865,12 @@ WorldMapSize = { xOffset = 0.0, yOffset = 0.0, zoneData = { - Deepholm = { height = 3399.999877929688, width = 5099.9987792969, xOffset = 0, yOffset = 0, mapID = 640 }, - Kezan = { height = 900.00048828125, width = 1352.08319091797, xOffset = 0, yOffset = 0, mapID = 605 }, - TheLostIsles = { height = 3010.41665649414, width = 4514.5830078125, xOffset = 0, yOffset = 0, mapID = 544 }, - TheLostIsles_terrain1 = { height = 3010.41665649414, width = 4514.5830078125, xOffset = 0, yOffset = 0, mapID = 681 }, - TheLostIsles_terrain2 = { height = 3010.41665649414, width = 4514.5830078125, xOffset = 0, yOffset = 0, mapID = 682 }, - TheMaelstrom = { height = 1033.33325195312, width = 1550.0, xOffset = 0, yOffset = 0, mapID = 737 } + Deepholm = { height = 3399.999877929688, width = 5099.9987792969, xOffset = -3052.083, yOffset = 2795.833, mapID = 640 }, + Kezan = { height = 900.00048828125, width = 1352.08319091797, xOffset = -2129.167, yOffset = -7731.25, mapID = 605 }, + TheLostIsles = { height = 3010.41665649414, width = 4514.5830078125, xOffset = -4383.333, yOffset = 2881.25, mapID = 544 }, + 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 = -4383.333, yOffset = 2881.25, mapID = 682 }, + TheMaelstrom = { height = 1033.33325195312, width = 1550.0, xOffset = -1556.25, yOffset = 1370.833, mapID = 737 } } } } diff --git a/QuestHelper/libs/LibMapData-1.0/Changelog-LibMapData-1.0-0.21-release.txt b/QuestHelper/libs/LibMapData-1.0/Changelog-LibMapData-1.0-0.21-release.txt new file mode 100644 index 0000000..80783cb --- /dev/null +++ b/QuestHelper/libs/LibMapData-1.0/Changelog-LibMapData-1.0-0.21-release.txt @@ -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 +------------------------------------------------------------------------ diff --git a/QuestHelper/libs/LibMapData-1.0/LibMapData-1.0.toc b/QuestHelper/libs/LibMapData-1.0/LibMapData-1.0.toc new file mode 100644 index 0000000..a15d536 --- /dev/null +++ b/QuestHelper/libs/LibMapData-1.0/LibMapData-1.0.toc @@ -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 diff --git a/QuestHelper/libs/LibMapData-1.0/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua b/QuestHelper/libs/LibMapData-1.0/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua new file mode 100644 index 0000000..e0fe1af --- /dev/null +++ b/QuestHelper/libs/LibMapData-1.0/Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua @@ -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. + diff --git a/QuestHelper/libs/LibMapData-1.0/Libs/CallbackHandler-1.0/CallbackHandler-1.0.xml b/QuestHelper/libs/LibMapData-1.0/Libs/CallbackHandler-1.0/CallbackHandler-1.0.xml new file mode 100644 index 0000000..1aad3a2 --- /dev/null +++ b/QuestHelper/libs/LibMapData-1.0/Libs/CallbackHandler-1.0/CallbackHandler-1.0.xml @@ -0,0 +1,4 @@ + +