Advertisement
Guest User

Archy 1.6.3 Fixes

a guest
Feb 14th, 2011
2,190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.25 KB | None | 0 0
  1. --[ Digsite data, API updates, and Ace3 updates ]--
  2.  
  3. Step 1: Archy\Libs\LibArchaeology-0.1\Library.lua @ Line 306
  4. Replace:
  5. local raceName, currencyID, raceTexture, raceItemID = GetArchaeologyRaceInfo(raceID)
  6. With:
  7. local raceName, raceTexture, raceItemID, currencyID, numFragmentsRequired = GetArchaeologyRaceInfo(raceID)
  8.  
  9. Step 2: Archy\Libs\LibArchaeology-0.1\Library.lua @ Line 134
  10. Replace:
  11. [L["Northridge Fossil Filed"]] = { continent = 2, map = 22, blob = 55480, race = 3, points = {} },
  12. With:
  13. [L["Northridge Fossil Field"]] = { continent = 2, map = 22, blob = 55480, race = 3, points = {} },
  14.  
  15. Step 3: Archy\Libs\LibArchaeology-0.1\Library.lua @ Line 243
  16. Paste After:
  17. [L["River Delta Digsite"]] = { continent = 1, map = 720, blob = 60350, race = 7, points = {} },
  18. [L["Cursed Landing Digsite"]] = { continent = 1, map = 720, blob = 60352, race = 7, points = {} },
  19. [L["Keset Pass Digsite"]] = { continent = 1, map = 720, blob = 60354, race = 7, points = {} },
  20. [L["Akhenet Fields Digsite"]] = { continent = 1, map = 720, blob = 60356, race = 7, points = {} },
  21. [L["Obelisk of the Stars Digsite"]] = { continent = 1, map = 720, blob = 60358, race = 7, points = {} },
  22. [L["Sahket Wastes Digsite"]] = { continent = 1, map = 720, blob = 60361, race = 7, points = {} },
  23. [L["Schnottz's Landing"]] = { continent = 1, map = 720, blob = 60363, race = 7, points = {} },
  24. [L["Pit of Fiends Digsite"]] = { continent = 4, map = 492, blob = 60367, race = 5, points = {} },
  25. [L["Sands of Nasam"]] = { continent = 4, map = 486, blob = 60369, race = 5, points = {} },
  26. [L["Terrorweb Tunnel Digsite"]] = { continent = 4, map = 23, blob = 60442, race = 5, points = {} },
  27. [L["Plaguewood Digsite"]] = { continent = 4, map = 23, blob = 60444, race = 5, points = {} },
  28.  
  29. Step 4: Archy\Libs\LibArchaeology-0.1\Localization.enUS.lua @ Line 79
  30. Replace:
  31. ["Northridge Fossil Filed"] = "Northridge Fossil Filed",
  32. With:
  33. ["Northridge Fossil Field"] = "Northridge Fossil Field",
  34.  
  35. Step 5: Archy\Libs\LibArchaeology-0.1\Localization.enUS.lua @ Line 234
  36. Paste After:
  37. ["River Delta Digsite"] = "River Delta Digsite",
  38. ["Cursed Landing Digsite"] = "Cursed Landing Digsite",
  39. ["Keset Pass Digsite"] = "Keset Pass Digsite",
  40. ["Akhenet Fields Digsite"] = "Akhenet Fields Digsite",
  41. ["Obelisk of the Stars Digsite"] = "Obelisk of the Stars Digsite",
  42. ["Sahket Wastes Digsite"] = "Sahket Wastes Digsite",
  43. ["Schnottz's Landing"] = "Schnottz's Landing",
  44. ["Pit of Fiends Digsite"] = "Pit of Fiends Digsite",
  45. ["Sands of Nasam"] = "Sands of Nasam",
  46. ["Terrorweb Tunnel Digsite"] = "Terrorweb Tunnel Digsite",
  47. ["Plaguewood Digsite"] = "Plaguewood Digsite",
  48.  
  49. Step 6: Repeat step 4 and 5 for other localizations you wish to use, using your own translations if you like.
  50.  
  51. Step 7: Download and extract the following to Archy\Libs
  52. Download:
  53. http://static.wowace.com/content/files/502/74/Ace3-Release-r1009.zip
  54. Extract:
  55. AceAddon-3.0
  56. AceConfig-3.0
  57. AceConsole-3.0
  58. AceDB-3.0
  59. AceDBOptions-3.0
  60. AceEvent-3.0
  61. AceGUI-3.0
  62. AceHook-3.0
  63. AceLocale-3.0
  64. AceTimer-3.0
  65.  
  66.  
  67. --[ New Fragment currency code, Astrolabe updates, and Performance fixes ]--
  68.  
  69. Step 1: Archy\Libs\LibArchaeology-0.1\Library.lua @ Lines 1106-1107
  70. Delete:
  71. elseif event == "CURRENCY_DISPLAY_UPDATE" then
  72. CurrenciesUpdated()
  73.  
  74. Step 2: Archy\Libs\LibArchaeology-0.1\Library.lua @ Line 1099
  75. Paste After:
  76. elseif event == "CHAT_MSG_CURRENCY" then
  77. CheckCurrency(...)
  78.  
  79. Step 3: Archy\Libs\LibArchaeology-0.1\Library.lua @ Lines 1081-1082
  80. Delete:
  81. elseif event == "WORLD_MAP_UPDATE" then
  82. LoadTables()
  83.  
  84. Step 4: Archy\Libs\LibArchaeology-0.1\Library.lua @ Line 683
  85. Paste After:
  86.  
  87. -- Returns the distance for all sites in a single position call
  88. function lib:SiteDistances(sites)
  89. local playerPos = self:GetPlayerPosition()
  90. if playerPos then
  91. for name, site in pairs(sites) do
  92. for _, conSites in pairs(playerSiteData) do
  93. for _, site in pairs(conSites) do
  94. local distance, _, _ = astrolabe:ComputeDistance(playerPos.map, playerPos.floor, playerPos.x, playerPos.y, site.location.map, site.location.floor, site.location.x, site.location.y)
  95. site.distance = distance
  96. end
  97. end
  98. end
  99. end
  100. return sites
  101. end
  102.  
  103. Step 5: Archy\Libs\LibArchaeology-0.1\Library.lua @ Lines 525-541
  104. Replace:
  105. local currencyName, currencyAmount, currencyTexture, currencyUnknown, currencyWeeklyMax, currencyTotalMax = GetCurrencyInfo(race.currency.id)
  106. if not currencyData[race.currency.id] then
  107. -- print("Currency Updated: ", race.name, " for ", currencyAmount, " fragments")
  108. currencyData[race.currency.id] = { id = race.currency.id, name = currencyName, amount = currencyAmount }
  109. lib:GetCurrentArtifactInfo(race.id, true)
  110. lib.callbacks:Fire("ReceivedFragments", race, currencyAmount)
  111. else
  112. if currencyData[race.currency.id].amount ~= currencyAmount then
  113. if currencyData[race.currency.id].amount < currencyAmount then
  114. lib:GetCurrentArtifactInfo(race.id, true)
  115. lib.callbacks:Fire("ReceivedFragments", race, currencyAmount)
  116. else
  117. lib.callbacks:Fire("RaceUpdated", race)
  118. end
  119. currencyData[race.currency.id].amount = currencyAmount
  120. end
  121. end
  122. With:
  123. local _, _, _, numFragments, _ = GetArchaeologyRaceInfo(raceID)
  124. if not currencyData[race.currency.name] then
  125. -- print("Currency Updated: ", race.name, " for ", currencyAmount, " fragments")
  126. currencyData[race.currency.name] = { name = currencyName, amount = numFragments }
  127. lib:GetCurrentArtifactInfo(race.id, true)
  128. lib.callbacks:Fire("ReceivedFragments", race, numFragments)
  129. else
  130. if currencyData[race.currency.name].amount ~= numFragments then
  131. if currencyData[race.currency.name].amount < numFragments then
  132. lib:GetCurrentArtifactInfo(race.id, true)
  133. lib.callbacks:Fire("ReceivedFragments", race, numFragments)
  134. else
  135. lib.callbacks:Fire("RaceUpdated", race)
  136. end
  137. currencyData[race.currency.name].amount = numFragments
  138. end
  139. end
  140.  
  141.  
  142. Step 6: Archy\Libs\LibArchaeology-0.1\Library.lua @ Lines 466-490
  143. Replace:
  144. -- Check what we have looted, fragments and keystones
  145. local function CheckLoot(msg)
  146. local fragment_type, amount = MatchFormat(msg, CURRENCY_GAINED_MULTIPLE)
  147. if fragment_type then
  148. if not GetRaceNameForCurrency(fragment_type) or not GetRaceIDForCurrency(fragment_type) then
  149. -- we either looted a non-archaeology currency or we are missing cached data, check!
  150. LoadTables()
  151. end
  152. if IsArchaeologyFragment(fragment_type) then -- found fragments looted
  153. local raceID = GetRaceIDForCurrency(fragment_type)
  154. lib.callbacks:Fire("ReceivedFragments", raceData[raceID], amount)
  155. end
  156. else
  157. local _, itemLink, amount = ParseLootMessage(msg)
  158. if not itemLink then return end
  159. local itemID = GetIDFromLink(itemLink)
  160. local raceID = GetRaceIDForKeystoneID(itemID)
  161. if raceID then
  162. bagRefreshWas = "ReceivedKeystone"
  163. lastKeystoneAmount = amount
  164. lastRace = raceData[raceID]
  165. refreshLastRaceOnBagUpdate = true
  166. end
  167. end
  168. end
  169. With:
  170. -- Check what currency we have looted, fragments
  171. local function CheckCurrency(msg)
  172. local fragment_type, amount = MatchFormat(msg, CURRENCY_GAINED_MULTIPLE)
  173. if fragment_type then
  174. if not GetRaceNameForCurrency(fragment_type) or not GetRaceIDForCurrency(fragment_type) then
  175. -- we either looted a non-archaeology currency or we are missing cached data, check!
  176. LoadTables()
  177. end
  178. if IsArchaeologyFragment(fragment_type) then -- found fragments looted
  179. local raceID = GetRaceIDForCurrency(fragment_type)
  180. lib.callbacks:Fire("ReceivedFragments", raceData[raceID], amount)
  181. end
  182. end
  183. end
  184.  
  185. -- Check what we have looted, keystones
  186. local function CheckLoot(msg)
  187. local _, itemLink, amount = ParseLootMessage(msg)
  188. if not itemLink then return end
  189. local itemID = GetIDFromLink(itemLink)
  190. local raceID = GetRaceIDForKeystoneID(itemID)
  191. if raceID then
  192. bagRefreshWas = "ReceivedKeystone"
  193. lastKeystoneAmount = amount
  194. lastRace = raceData[raceID]
  195. refreshLastRaceOnBagUpdate = true
  196. end
  197. end
  198.  
  199. Step 7: Archy\Libs\LibArchaeology-0.1\Library.lua @ Lines 316-327
  200. Replace:
  201. for raceID = 1, GetNumArchaeologyRaces() do
  202. local raceName, raceTexture, raceItemID, currencyID, numFragmentsRequired = GetArchaeologyRaceInfo(raceID)
  203.  
  204. local currencyName = GetCurrencyInfo(currencyID)
  205. local itemName, itemLink, itemRarity, itemLevel, itemMinLevel, itemType, itemSubType, itemStackCount, itemEquipLoc, itemTexture, itemSellPrice = GetItemInfo(raceItemID)
  206.  
  207. luRaceName[raceName] = raceID
  208. luCurrencyRace[currencyName] = raceName
  209. luKeystoneRace[raceItemID] = raceID
  210. raceData[raceID] = { id = raceID, name = raceName, currency = { id = currencyID, name = currencyName }, texture = raceTexture, keystone = { id = raceItemID, name = itemName, texture = itemTexture } }
  211.  
  212. end
  213. With:
  214. for raceID = 1,GetNumArchaeologyRaces() do
  215. local raceName, raceTexture, raceItemID, numFragments, numFragmentsRequired = GetArchaeologyRaceInfo(raceID)
  216.  
  217. currencyName = fragmentData[raceName]
  218.  
  219. local itemName, itemLink, itemRarity, itemLevel, itemMinLevel, itemType, itemSubType, itemStackCount, itemEquipLoc, itemTexture, itemSellPrice = GetItemInfo(raceItemID)
  220.  
  221. luRaceName[raceName] = raceID
  222. luCurrencyRace[currencyName] = raceName
  223. luKeystoneRace[raceItemID] = raceID
  224. raceData[raceID] = { id = raceID, name = raceName, currency = { name = currencyName }, texture = raceTexture, keystone = { id = raceItemID, name = itemName, texture = itemTexture } }
  225.  
  226. end
  227.  
  228. Step 8: Archy\Libs\LibArchaeology-0.1\Library.lua @ Line 284
  229. Replace:
  230. lib.frame:RegisterEvent("CURRENCY_DISPLAY_UPDATE");
  231. With:
  232. lib.frame:RegisterEvent("CHAT_MSG_CURRENCY")
  233.  
  234. Step 9: Archy\Libs\LibArchaeology-0.1\Library.lua @ Line 36
  235. Paste After:
  236. local fragmentData = { -- fragement data table
  237. ["Night Elf"] = "Night Elf Archaeology Fragment",
  238. ["Troll"] = "Troll Archaeology Fragment",
  239. ["Dwarf"] = "Dwarf Archaeology Fragment",
  240. ["Fossil"] = "Fossil Archaeology Fragment",
  241. ["Draenei"] = "Draenei Archaeology Fragment",
  242. ["Orc"] = "Orc Archaeology Fragment",
  243. ["Nerubian"] = "Nerubian Archaeology Fragment",
  244. ["Vrykul"] = "Vrykul Archaeology Fragment",
  245. ["Tol'vir"] = "Tol'vir Archaeology Fragment",
  246. ["Other"] = "Other Archaeology Fragment",
  247. }
  248.  
  249. Step 9: Archy\Digsite.lua @ Line 82
  250. Replace:
  251. self.updateTimer = self:ScheduleRepeatingTimer("Tick", 0.1)
  252. With:
  253. self.updateTimer = self:ScheduleRepeatingTimer("Tick", 0.5)
  254.  
  255. Step 10: Archy\Digsite.lua @ Lines 227-229
  256. Replace:
  257.  
  258. for _,site in pairs(sites) do
  259. site.distance = Archy.archData:DistanceToSite(site.name)
  260. end
  261. With:
  262. sites = Archy.archData:SiteDistances(sites)
  263.  
  264. Step 11: Archy\Minimap.lua @ Line 72
  265. Replace:
  266. self.updateTimer = self:ScheduleRepeatingTimer("Tick", 0.1)
  267. With:
  268. self.updateTimer = self:ScheduleRepeatingTimer("Tick", 0.5)
  269.  
  270. Step 12: Archy\Libs\LibArchaeology-0.1\
  271. Delete:
  272. Astrolabe-1.0\
  273.  
  274. Step 13: Download and extract the following to Archy\Libs\Astrolabe-1.0\
  275. Download:
  276. http://static.curseforge.net/content/files/488/301/Astrolabe-1.0_r125.zip
  277. Extract:
  278. Astrolabe.lua
  279. AstrolabeMapMonitor.lua
  280. DongleStub.lua
  281. lgpl.txt
  282. Load.xml
  283.  
  284. Step 14: Archy\Libs\Astrolabe-1.0\Astrolabe.lua @ line 946
  285. Paste After:
  286. SetMapToCurrentZone();
  287.  
  288. Step 15: Archy\Libs\Astrolabe-1.0\Astrolabe.lua @ line 348
  289. Replace:
  290. return self:GetUnitPosition("player", self.WorldMapVisible);
  291. With:
  292. local M, F, x, y, O = self:GetUnitPosition("player", self.WorldMapVisible);
  293. local data = {
  294. M = M,
  295. F = F,
  296. x = x,
  297. y = y,
  298. O = O,
  299. }
  300. playerPositionCache = data
  301. return M, F, x, y, O;
  302. end
  303.  
  304. Step 16: Archy\Libs\Astrolabe-1.0\Astrolabe.lua @ lines 309-337
  305. Replace:
  306. function Astrolabe:GetUnitPosition( unit, noMapChange )
  307. local x, y = GetPlayerMapPosition(unit);
  308. if ( x <= 0 and y <= 0 ) then
  309. if ( noMapChange ) then
  310. -- no valid position on the current map, and we aren't allowed
  311. -- to change map zoom, so return
  312. return;
  313. end
  314. local lastMapID, lastFloor = GetCurrentMapAreaID(), GetCurrentMapDungeonLevel();
  315. SetMapToCurrentZone();
  316. x, y = GetPlayerMapPosition(unit);
  317. if ( x <= 0 and y <= 0 ) then
  318. WorldMapZoomOutButton_OnClick();
  319. x, y = GetPlayerMapPosition(unit);
  320. if ( x <= 0 and y <= 0 ) then
  321. -- we are in an instance or otherwise off map
  322. return;
  323. end
  324. end
  325. local M, F = GetCurrentMapAreaID(), GetCurrentMapDungeonLevel();
  326. if ( M ~= lastMapID or F ~= lastFloor ) then
  327. -- set map zoom back to what it was before
  328. SetMapByID(lastMapID);
  329. SetDungeonMapLevel(lastFloor);
  330. end
  331. return M, F, x, y;
  332. end
  333. return GetCurrentMapAreaID(), GetCurrentMapDungeonLevel(), x, y;
  334. end
  335. With:
  336. local WMFOpen = false;
  337. function Astrolabe:GetUnitPosition( unit, noMapChange )
  338. if noMapChange then
  339. WMFOpen = false;
  340. local WMFChanged = false;
  341. elseif WMFOpen then
  342. WMFOpen = false;
  343. local WMFChanged = true;
  344. else
  345. WMFOpen = false;
  346. local WMFChanged = false;
  347. end
  348. local x, y = GetPlayerMapPosition(unit);
  349. local O, L = GetCurrentMapAreaID(), GetCurrentMapDungeonLevel();
  350. if ( x <= 0 and y <= 0 ) or (lastMapID == 0) then
  351. if ( noMapChange ) then
  352. -- no valid position on the current map, and we aren't allowed
  353. -- to change map zoom, so return last known position if it exists
  354. if (playerPositionCache.M) then
  355. return playerPositionCache.M, playerPositionCache.F, playerPositionCache.x, playerPositionCache.y, playerPositionCache.O;
  356. else
  357. return;
  358. end
  359. end
  360. SetMapToCurrentZone();
  361. x, y = GetPlayerMapPosition(unit);
  362. local M, F = GetCurrentMapAreaID(), GetCurrentMapDungeonLevel();
  363. if ( x <= 0 and y <= 0 ) or (newMapID == 0) then
  364. WorldMapZoomOutButton_OnClick();
  365. x, y = GetPlayerMapPosition(unit);
  366.  
  367. M, F = GetCurrentMapAreaID(), GetCurrentMapDungeonLevel();
  368. if ( x <= 0 and y <= 0 ) or (newMapID == 0) then
  369. -- we are in an instance or otherwise off map
  370. return;
  371. end
  372. end
  373. local M, F = GetCurrentMapAreaID(), GetCurrentMapDungeonLevel();
  374. if ( M ~= O or F ~= L ) and WMFChanged then
  375. -- set map zoom back to what it was before
  376. SetMapByID(O);
  377. SetDungeonMapLevel(L);
  378. end
  379. WMFChanged = false;
  380. return M, F, x, y, O;
  381. end
  382. return O, L, x, y, O;
  383. end
  384.  
  385. Step 17: Archy\Libs\Astrolabe-1.0\Astrolabe.lua @ line 84
  386. Paste After:
  387. local playerPositionCache = {}
  388. playerPositionCache.M, playerPositionCache.F, playerPositionCache.x, playerPositionCache.y, playerPositionCache.O = false
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement