Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[ Digsite data, API updates, and Ace3 updates ]--
- Step 1: Archy\Libs\LibArchaeology-0.1\Library.lua @ Line 306
- Replace:
- local raceName, currencyID, raceTexture, raceItemID = GetArchaeologyRaceInfo(raceID)
- With:
- local raceName, raceTexture, raceItemID, currencyID, numFragmentsRequired = GetArchaeologyRaceInfo(raceID)
- Step 2: Archy\Libs\LibArchaeology-0.1\Library.lua @ Line 134
- Replace:
- [L["Northridge Fossil Filed"]] = { continent = 2, map = 22, blob = 55480, race = 3, points = {} },
- With:
- [L["Northridge Fossil Field"]] = { continent = 2, map = 22, blob = 55480, race = 3, points = {} },
- Step 3: Archy\Libs\LibArchaeology-0.1\Library.lua @ Line 243
- Paste After:
- [L["River Delta Digsite"]] = { continent = 1, map = 720, blob = 60350, race = 7, points = {} },
- [L["Cursed Landing Digsite"]] = { continent = 1, map = 720, blob = 60352, race = 7, points = {} },
- [L["Keset Pass Digsite"]] = { continent = 1, map = 720, blob = 60354, race = 7, points = {} },
- [L["Akhenet Fields Digsite"]] = { continent = 1, map = 720, blob = 60356, race = 7, points = {} },
- [L["Obelisk of the Stars Digsite"]] = { continent = 1, map = 720, blob = 60358, race = 7, points = {} },
- [L["Sahket Wastes Digsite"]] = { continent = 1, map = 720, blob = 60361, race = 7, points = {} },
- [L["Schnottz's Landing"]] = { continent = 1, map = 720, blob = 60363, race = 7, points = {} },
- [L["Pit of Fiends Digsite"]] = { continent = 4, map = 492, blob = 60367, race = 5, points = {} },
- [L["Sands of Nasam"]] = { continent = 4, map = 486, blob = 60369, race = 5, points = {} },
- [L["Terrorweb Tunnel Digsite"]] = { continent = 4, map = 23, blob = 60442, race = 5, points = {} },
- [L["Plaguewood Digsite"]] = { continent = 4, map = 23, blob = 60444, race = 5, points = {} },
- Step 4: Archy\Libs\LibArchaeology-0.1\Localization.enUS.lua @ Line 79
- Replace:
- ["Northridge Fossil Filed"] = "Northridge Fossil Filed",
- With:
- ["Northridge Fossil Field"] = "Northridge Fossil Field",
- Step 5: Archy\Libs\LibArchaeology-0.1\Localization.enUS.lua @ Line 234
- Paste After:
- ["River Delta Digsite"] = "River Delta Digsite",
- ["Cursed Landing Digsite"] = "Cursed Landing Digsite",
- ["Keset Pass Digsite"] = "Keset Pass Digsite",
- ["Akhenet Fields Digsite"] = "Akhenet Fields Digsite",
- ["Obelisk of the Stars Digsite"] = "Obelisk of the Stars Digsite",
- ["Sahket Wastes Digsite"] = "Sahket Wastes Digsite",
- ["Schnottz's Landing"] = "Schnottz's Landing",
- ["Pit of Fiends Digsite"] = "Pit of Fiends Digsite",
- ["Sands of Nasam"] = "Sands of Nasam",
- ["Terrorweb Tunnel Digsite"] = "Terrorweb Tunnel Digsite",
- ["Plaguewood Digsite"] = "Plaguewood Digsite",
- Step 6: Repeat step 4 and 5 for other localizations you wish to use, using your own translations if you like.
- Step 7: Download and extract the following to Archy\Libs
- Download:
- http://static.wowace.com/content/files/502/74/Ace3-Release-r1009.zip
- Extract:
- AceAddon-3.0
- AceConfig-3.0
- AceConsole-3.0
- AceDB-3.0
- AceDBOptions-3.0
- AceEvent-3.0
- AceGUI-3.0
- AceHook-3.0
- AceLocale-3.0
- AceTimer-3.0
- --[ New Fragment currency code, Astrolabe updates, and Performance fixes ]--
- Step 1: Archy\Libs\LibArchaeology-0.1\Library.lua @ Lines 1106-1107
- Delete:
- elseif event == "CURRENCY_DISPLAY_UPDATE" then
- CurrenciesUpdated()
- Step 2: Archy\Libs\LibArchaeology-0.1\Library.lua @ Line 1099
- Paste After:
- elseif event == "CHAT_MSG_CURRENCY" then
- CheckCurrency(...)
- Step 3: Archy\Libs\LibArchaeology-0.1\Library.lua @ Lines 1081-1082
- Delete:
- elseif event == "WORLD_MAP_UPDATE" then
- LoadTables()
- Step 4: Archy\Libs\LibArchaeology-0.1\Library.lua @ Line 683
- Paste After:
- -- Returns the distance for all sites in a single position call
- function lib:SiteDistances(sites)
- local playerPos = self:GetPlayerPosition()
- if playerPos then
- for name, site in pairs(sites) do
- for _, conSites in pairs(playerSiteData) do
- for _, site in pairs(conSites) do
- local distance, _, _ = astrolabe:ComputeDistance(playerPos.map, playerPos.floor, playerPos.x, playerPos.y, site.location.map, site.location.floor, site.location.x, site.location.y)
- site.distance = distance
- end
- end
- end
- end
- return sites
- end
- Step 5: Archy\Libs\LibArchaeology-0.1\Library.lua @ Lines 525-541
- Replace:
- local currencyName, currencyAmount, currencyTexture, currencyUnknown, currencyWeeklyMax, currencyTotalMax = GetCurrencyInfo(race.currency.id)
- if not currencyData[race.currency.id] then
- -- print("Currency Updated: ", race.name, " for ", currencyAmount, " fragments")
- currencyData[race.currency.id] = { id = race.currency.id, name = currencyName, amount = currencyAmount }
- lib:GetCurrentArtifactInfo(race.id, true)
- lib.callbacks:Fire("ReceivedFragments", race, currencyAmount)
- else
- if currencyData[race.currency.id].amount ~= currencyAmount then
- if currencyData[race.currency.id].amount < currencyAmount then
- lib:GetCurrentArtifactInfo(race.id, true)
- lib.callbacks:Fire("ReceivedFragments", race, currencyAmount)
- else
- lib.callbacks:Fire("RaceUpdated", race)
- end
- currencyData[race.currency.id].amount = currencyAmount
- end
- end
- With:
- local _, _, _, numFragments, _ = GetArchaeologyRaceInfo(raceID)
- if not currencyData[race.currency.name] then
- -- print("Currency Updated: ", race.name, " for ", currencyAmount, " fragments")
- currencyData[race.currency.name] = { name = currencyName, amount = numFragments }
- lib:GetCurrentArtifactInfo(race.id, true)
- lib.callbacks:Fire("ReceivedFragments", race, numFragments)
- else
- if currencyData[race.currency.name].amount ~= numFragments then
- if currencyData[race.currency.name].amount < numFragments then
- lib:GetCurrentArtifactInfo(race.id, true)
- lib.callbacks:Fire("ReceivedFragments", race, numFragments)
- else
- lib.callbacks:Fire("RaceUpdated", race)
- end
- currencyData[race.currency.name].amount = numFragments
- end
- end
- Step 6: Archy\Libs\LibArchaeology-0.1\Library.lua @ Lines 466-490
- Replace:
- -- Check what we have looted, fragments and keystones
- local function CheckLoot(msg)
- local fragment_type, amount = MatchFormat(msg, CURRENCY_GAINED_MULTIPLE)
- if fragment_type then
- if not GetRaceNameForCurrency(fragment_type) or not GetRaceIDForCurrency(fragment_type) then
- -- we either looted a non-archaeology currency or we are missing cached data, check!
- LoadTables()
- end
- if IsArchaeologyFragment(fragment_type) then -- found fragments looted
- local raceID = GetRaceIDForCurrency(fragment_type)
- lib.callbacks:Fire("ReceivedFragments", raceData[raceID], amount)
- end
- else
- local _, itemLink, amount = ParseLootMessage(msg)
- if not itemLink then return end
- local itemID = GetIDFromLink(itemLink)
- local raceID = GetRaceIDForKeystoneID(itemID)
- if raceID then
- bagRefreshWas = "ReceivedKeystone"
- lastKeystoneAmount = amount
- lastRace = raceData[raceID]
- refreshLastRaceOnBagUpdate = true
- end
- end
- end
- With:
- -- Check what currency we have looted, fragments
- local function CheckCurrency(msg)
- local fragment_type, amount = MatchFormat(msg, CURRENCY_GAINED_MULTIPLE)
- if fragment_type then
- if not GetRaceNameForCurrency(fragment_type) or not GetRaceIDForCurrency(fragment_type) then
- -- we either looted a non-archaeology currency or we are missing cached data, check!
- LoadTables()
- end
- if IsArchaeologyFragment(fragment_type) then -- found fragments looted
- local raceID = GetRaceIDForCurrency(fragment_type)
- lib.callbacks:Fire("ReceivedFragments", raceData[raceID], amount)
- end
- end
- end
- -- Check what we have looted, keystones
- local function CheckLoot(msg)
- local _, itemLink, amount = ParseLootMessage(msg)
- if not itemLink then return end
- local itemID = GetIDFromLink(itemLink)
- local raceID = GetRaceIDForKeystoneID(itemID)
- if raceID then
- bagRefreshWas = "ReceivedKeystone"
- lastKeystoneAmount = amount
- lastRace = raceData[raceID]
- refreshLastRaceOnBagUpdate = true
- end
- end
- Step 7: Archy\Libs\LibArchaeology-0.1\Library.lua @ Lines 316-327
- Replace:
- for raceID = 1, GetNumArchaeologyRaces() do
- local raceName, raceTexture, raceItemID, currencyID, numFragmentsRequired = GetArchaeologyRaceInfo(raceID)
- local currencyName = GetCurrencyInfo(currencyID)
- local itemName, itemLink, itemRarity, itemLevel, itemMinLevel, itemType, itemSubType, itemStackCount, itemEquipLoc, itemTexture, itemSellPrice = GetItemInfo(raceItemID)
- luRaceName[raceName] = raceID
- luCurrencyRace[currencyName] = raceName
- luKeystoneRace[raceItemID] = raceID
- raceData[raceID] = { id = raceID, name = raceName, currency = { id = currencyID, name = currencyName }, texture = raceTexture, keystone = { id = raceItemID, name = itemName, texture = itemTexture } }
- end
- With:
- for raceID = 1,GetNumArchaeologyRaces() do
- local raceName, raceTexture, raceItemID, numFragments, numFragmentsRequired = GetArchaeologyRaceInfo(raceID)
- currencyName = fragmentData[raceName]
- local itemName, itemLink, itemRarity, itemLevel, itemMinLevel, itemType, itemSubType, itemStackCount, itemEquipLoc, itemTexture, itemSellPrice = GetItemInfo(raceItemID)
- luRaceName[raceName] = raceID
- luCurrencyRace[currencyName] = raceName
- luKeystoneRace[raceItemID] = raceID
- raceData[raceID] = { id = raceID, name = raceName, currency = { name = currencyName }, texture = raceTexture, keystone = { id = raceItemID, name = itemName, texture = itemTexture } }
- end
- Step 8: Archy\Libs\LibArchaeology-0.1\Library.lua @ Line 284
- Replace:
- lib.frame:RegisterEvent("CURRENCY_DISPLAY_UPDATE");
- With:
- lib.frame:RegisterEvent("CHAT_MSG_CURRENCY")
- Step 9: Archy\Libs\LibArchaeology-0.1\Library.lua @ Line 36
- Paste After:
- local fragmentData = { -- fragement data table
- ["Night Elf"] = "Night Elf Archaeology Fragment",
- ["Troll"] = "Troll Archaeology Fragment",
- ["Dwarf"] = "Dwarf Archaeology Fragment",
- ["Fossil"] = "Fossil Archaeology Fragment",
- ["Draenei"] = "Draenei Archaeology Fragment",
- ["Orc"] = "Orc Archaeology Fragment",
- ["Nerubian"] = "Nerubian Archaeology Fragment",
- ["Vrykul"] = "Vrykul Archaeology Fragment",
- ["Tol'vir"] = "Tol'vir Archaeology Fragment",
- ["Other"] = "Other Archaeology Fragment",
- }
- Step 9: Archy\Digsite.lua @ Line 82
- Replace:
- self.updateTimer = self:ScheduleRepeatingTimer("Tick", 0.1)
- With:
- self.updateTimer = self:ScheduleRepeatingTimer("Tick", 0.5)
- Step 10: Archy\Digsite.lua @ Lines 227-229
- Replace:
- for _,site in pairs(sites) do
- site.distance = Archy.archData:DistanceToSite(site.name)
- end
- With:
- sites = Archy.archData:SiteDistances(sites)
- Step 11: Archy\Minimap.lua @ Line 72
- Replace:
- self.updateTimer = self:ScheduleRepeatingTimer("Tick", 0.1)
- With:
- self.updateTimer = self:ScheduleRepeatingTimer("Tick", 0.5)
- Step 12: Archy\Libs\LibArchaeology-0.1\
- Delete:
- Astrolabe-1.0\
- Step 13: Download and extract the following to Archy\Libs\Astrolabe-1.0\
- Download:
- http://static.curseforge.net/content/files/488/301/Astrolabe-1.0_r125.zip
- Extract:
- Astrolabe.lua
- AstrolabeMapMonitor.lua
- DongleStub.lua
- lgpl.txt
- Load.xml
- Step 14: Archy\Libs\Astrolabe-1.0\Astrolabe.lua @ line 946
- Paste After:
- SetMapToCurrentZone();
- Step 15: Archy\Libs\Astrolabe-1.0\Astrolabe.lua @ line 348
- Replace:
- return self:GetUnitPosition("player", self.WorldMapVisible);
- With:
- local M, F, x, y, O = self:GetUnitPosition("player", self.WorldMapVisible);
- local data = {
- M = M,
- F = F,
- x = x,
- y = y,
- O = O,
- }
- playerPositionCache = data
- return M, F, x, y, O;
- end
- Step 16: Archy\Libs\Astrolabe-1.0\Astrolabe.lua @ lines 309-337
- Replace:
- function Astrolabe:GetUnitPosition( unit, noMapChange )
- local x, y = GetPlayerMapPosition(unit);
- if ( x <= 0 and y <= 0 ) then
- if ( noMapChange ) then
- -- no valid position on the current map, and we aren't allowed
- -- to change map zoom, so return
- return;
- end
- local lastMapID, lastFloor = GetCurrentMapAreaID(), GetCurrentMapDungeonLevel();
- SetMapToCurrentZone();
- x, y = GetPlayerMapPosition(unit);
- if ( x <= 0 and y <= 0 ) then
- WorldMapZoomOutButton_OnClick();
- x, y = GetPlayerMapPosition(unit);
- if ( x <= 0 and y <= 0 ) then
- -- we are in an instance or otherwise off map
- return;
- end
- end
- local M, F = GetCurrentMapAreaID(), GetCurrentMapDungeonLevel();
- if ( M ~= lastMapID or F ~= lastFloor ) then
- -- set map zoom back to what it was before
- SetMapByID(lastMapID);
- SetDungeonMapLevel(lastFloor);
- end
- return M, F, x, y;
- end
- return GetCurrentMapAreaID(), GetCurrentMapDungeonLevel(), x, y;
- end
- With:
- local WMFOpen = false;
- function Astrolabe:GetUnitPosition( unit, noMapChange )
- if noMapChange then
- WMFOpen = false;
- local WMFChanged = false;
- elseif WMFOpen then
- WMFOpen = false;
- local WMFChanged = true;
- else
- WMFOpen = false;
- local WMFChanged = false;
- end
- local x, y = GetPlayerMapPosition(unit);
- local O, L = GetCurrentMapAreaID(), GetCurrentMapDungeonLevel();
- if ( x <= 0 and y <= 0 ) or (lastMapID == 0) then
- if ( noMapChange ) then
- -- no valid position on the current map, and we aren't allowed
- -- to change map zoom, so return last known position if it exists
- if (playerPositionCache.M) then
- return playerPositionCache.M, playerPositionCache.F, playerPositionCache.x, playerPositionCache.y, playerPositionCache.O;
- else
- return;
- end
- end
- SetMapToCurrentZone();
- x, y = GetPlayerMapPosition(unit);
- local M, F = GetCurrentMapAreaID(), GetCurrentMapDungeonLevel();
- if ( x <= 0 and y <= 0 ) or (newMapID == 0) then
- WorldMapZoomOutButton_OnClick();
- x, y = GetPlayerMapPosition(unit);
- M, F = GetCurrentMapAreaID(), GetCurrentMapDungeonLevel();
- if ( x <= 0 and y <= 0 ) or (newMapID == 0) then
- -- we are in an instance or otherwise off map
- return;
- end
- end
- local M, F = GetCurrentMapAreaID(), GetCurrentMapDungeonLevel();
- if ( M ~= O or F ~= L ) and WMFChanged then
- -- set map zoom back to what it was before
- SetMapByID(O);
- SetDungeonMapLevel(L);
- end
- WMFChanged = false;
- return M, F, x, y, O;
- end
- return O, L, x, y, O;
- end
- Step 17: Archy\Libs\Astrolabe-1.0\Astrolabe.lua @ line 84
- Paste After:
- local playerPositionCache = {}
- playerPositionCache.M, playerPositionCache.F, playerPositionCache.x, playerPositionCache.y, playerPositionCache.O = false
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement