Advertisement
Guest User

Untitled

a guest
Sep 28th, 2015
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.84 KB | None | 0 0
  1. --- HandyNotes_SpecialNPCsEtc.orig.lua 2015-09-28 20:09:49.341970600 +0200
  2. +++ HandyNotes_SpecialNPCsEtc.lua 2015-09-28 20:20:50.527119700 +0200
  3. @@ -12,7 +12,7 @@
  4. ---------------------------------------------------------
  5. HandyNotes_SpecialNPCsEtc = LibStub("AceAddon-3.0"):NewAddon("HandyNotes_SpecialNPCsEtc","AceEvent-3.0")
  6. local HNS = HandyNotes_SpecialNPCsEtc
  7. -local Astrolabe = DongleStub("Astrolabe-1.0")
  8. +local HBD = LibStub("HereBeDragons-1.0")
  9. local L = LibStub("AceLocale-3.0"):GetLocale("HandyNotes_SpecialNPCsEtc")
  10.  
  11.  
  12. @@ -777,9 +777,10 @@
  13. local vGUID = UnitGUID("npc")
  14. local vNpcid = "";
  15.  
  16. - if (not(vGUID == nil)) then
  17. - vNpcid = tonumber(vGUID:sub(-12, -7), 16);
  18. - end;
  19. + if vGUID then
  20. + local type, zero, server_id, instance_id, zone_uid, npc_id, spawn_uid = strsplit("-", vGUID)
  21. + vNpcid = tonumber(npc_id, 16)
  22. + end
  23.  
  24. Msg("VGuild = "..tostring(VGuild),true,DebugTxt);
  25. if ((vGuild == nil) and (sType ~= nil or strlen(sType) > 0)) then
  26. @@ -915,7 +916,7 @@
  27.  
  28. Msg("HNS:AddSpecialNPCsEtcNote: "..tostring(vName),true,DebugTxt);
  29.  
  30. - local mapID, floor, x, y = Astrolabe:GetCurrentPlayerPosition()
  31. + local x, y , mapID, floor = HBD:GetPlayerZonePosition()
  32. if not vName or not mapID then
  33. Msg("HNS:AddSpecialNPCsEtcNote: not vName("..tostring(vName)..") or not mapID("..tostring(mapID)..")",true,DebugTxt);
  34. return
  35. @@ -930,7 +931,7 @@
  36. for coords, name in pairs(db.faction.nodes[mapFile]) do
  37. if vInfo1 == name or vInfo2 == name then
  38. local cx, cy = HandyNotes:getXY(coords)
  39. - local dist = Astrolabe:ComputeDistance(mapID, floor, x, y, mapID, floor, cx, cy)
  40. + local dist = HBD:GetZoneDistance(mapID, floor, x, y, mapID, floor, cx, cy)
  41. -- SpecialNPCsEtc already exists here
  42. if dist <= thres then
  43. -- Let's not move, just update vInfo
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement