From 0e646cfc322a77f1e944a2c106c80086b8f92c46 Mon Sep 17 00:00:00 2001 From: Jim Whitehead Date: Mon, 1 Dec 2014 18:53:17 +0100 Subject: [PATCH] Properly fork Astrolabe to prevent conflicts --- TomTom.lua | 4 +++- TomTom_Corpse.lua | 2 -- TomTom_POIIntegration.lua | 4 +++- TomTom_Waypoints.lua | 3 ++- libs/Astrolabe/Astrolabe.lua | 12 +++++------- 5 files changed, 13 insertions(+), 12 deletions(-) diff --git a/TomTom.lua b/TomTom.lua index a1372ab..3216ca3 100755 --- a/TomTom.lua +++ b/TomTom.lua @@ -7,12 +7,14 @@ -- Simple localization table for messages local L = TomTomLocals local ldb = LibStub("LibDataBroker-1.1") -local astrolabe = DongleStub("Astrolabe-1.0") local lmd = LibStub("LibMapData-1.0") local addonName, addon = ... local TomTom = addon +addon.astrolabe = DongleStub("Astrolabe-TomTom-1.0") +local astrolabe = addon.astrolabe + -- Local definitions local GetCurrentCursorPosition local WorldMap_OnUpdate diff --git a/TomTom_Corpse.lua b/TomTom_Corpse.lua index 95fd841..337629d 100755 --- a/TomTom_Corpse.lua +++ b/TomTom_Corpse.lua @@ -12,8 +12,6 @@ eventFrame:RegisterEvent("PLAYER_DEAD") eventFrame:RegisterEvent("PLAYER_UNGHOST") eventFrame:Hide() -local astrolabe = DongleStub("Astrolabe-1.0") - -- Local variables to store map, floor, x, y and uid or corpse waypoint local m,f,x,y,uid diff --git a/TomTom_POIIntegration.lua b/TomTom_POIIntegration.lua index f27ca90..20a85da 100755 --- a/TomTom_POIIntegration.lua +++ b/TomTom_POIIntegration.lua @@ -1,3 +1,6 @@ +local addonName, addon = ... +local astrolabe = addon.astrolabe + local enableClicks = true -- True if waypoint-clicking is enabled to set points local enableClosest = true -- True if 'Automatic' quest waypoints are enabled local modifier -- A string representing click-modifiers "CAS", etc. @@ -9,7 +12,6 @@ local modTbl = { } local L = TomTomLocals -local astrolabe = DongleStub("Astrolabe-1.0") -- This function and the related events/hooks are used to automatically -- update the crazy arrow to the closest quest waypoint. diff --git a/TomTom_Waypoints.lua b/TomTom_Waypoints.lua index e013209..5b4c2c5 100755 --- a/TomTom_Waypoints.lua +++ b/TomTom_Waypoints.lua @@ -8,7 +8,8 @@ -- TomTom:AddZWaypoint() and TomTom:RemoveWaypoint() instead. ----------------------------------------------------------------------------]] -local astrolabe = DongleStub("Astrolabe-1.0") +local addon_name, addon = ... +local astrolabe = addon.astrolabe -- Create a tooltip to be used when mousing over waypoints local tooltip = CreateFrame("GameTooltip", "TomTomTooltip", UIParent, "GameTooltipTemplate") diff --git a/libs/Astrolabe/Astrolabe.lua b/libs/Astrolabe/Astrolabe.lua index 87535a0..47979d2 100755 --- a/libs/Astrolabe/Astrolabe.lua +++ b/libs/Astrolabe/Astrolabe.lua @@ -1,6 +1,6 @@ --[[ Name: Astrolabe -Revision: $Rev: 161.1 $ +Revision: $Rev: 161 $ $Date: 2014-10-14 22:59:04 -0700 (Tue, 14 Oct 2014) $ Author(s): Esamynn (esamynn at wowinterface.com) Inspired By: Gatherer by Norganna @@ -41,8 +41,8 @@ Note: -- WARNING!!! -- DO NOT MAKE CHANGES TO THIS LIBRARY WITHOUT FIRST CHANGING THE LIBRARY_VERSION_MAJOR -- STRING (to something unique) OR ELSE YOU MAY BREAK OTHER ADDONS THAT USE THIS LIBRARY!!! -local LIBRARY_VERSION_MAJOR = "Astrolabe-1.0" -local LIBRARY_VERSION_MINOR = 161.1 -- updated version provided with TomTom +local LIBRARY_VERSION_MAJOR = "Astrolabe-TomTom-1.0" +local LIBRARY_VERSION_MINOR = tonumber(string.match("$Revision: 161 $", "(%d+)") or 1) if not DongleStub then error(LIBRARY_VERSION_MAJOR .. " requires DongleStub.") end if not DongleStub:IsNewerVersion(LIBRARY_VERSION_MAJOR, LIBRARY_VERSION_MINOR) then return end @@ -1258,10 +1258,8 @@ local function activate( newInstance, oldInstance ) local contZoneList = newInstance.ContinentList[C]; contZoneList[0] = continents[C*2 - 1]; for Z = 1, (#zones / 2) do - local areaId = zones[Z*2 - 1]; - SetMapByID(areaId); - local zoneKey = GetCurrentMapZone(); - contZoneList[zoneKey] = areaId + contZoneList[Z] = zones[Z*2 - 1]; + SetMapByID(contZoneList[Z]); harvestMapData(HarvestedMapData); end end -- 1.7.9.5