@@ -5,7 +5,6 @@ local R = Rarity
5
5
local lbz = LibStub (" LibBabble-Zone-3.0" ):GetUnstrictLookupTable ()
6
6
local lbsz = LibStub (" LibBabble-SubZone-3.0" ):GetUnstrictLookupTable ()
7
7
local lbb = LibStub (" LibBabble-Boss-3.0" ):GetUnstrictLookupTable ()
8
- local hbd = LibStub (" HereBeDragons-2.0" )
9
8
10
9
---
11
10
@@ -443,34 +442,6 @@ function R:tcopy(to, from)
443
442
end
444
443
end
445
444
446
- -- Location/Distance/Zone
447
- function R :GetDistanceToItem (item )
448
- local distance = 999999999
449
- if item and type (item ) == " table" and item .coords and type (item .coords ) == " table" then
450
- local playerWorldX , playerWorldY , instance = hbd :GetPlayerWorldPosition ()
451
- for k , v in pairs (item .coords ) do
452
- if v and type (v ) == " table" and v .m and v .i ~= true then
453
- local map = v .m
454
- local x = (v .x or 50 ) / 100
455
- local y = (v .y or 50 ) / 100
456
- local itemWorldX , itemWorldY = hbd :GetWorldCoordinatesFromZone (x , y , map , v .f or 1 )
457
- if itemWorldX ~= nil then -- Library returns nil for instances
458
- local thisDistance =
459
- hbd :GetWorldDistance (instance , itemWorldX , itemWorldY , playerWorldX , playerWorldY )
460
- -- R:Print("map: "..map..", x: "..x..", y: "..y..", itemWorldX: "..itemWorldX..", itemWorldY: "..itemWorldY..", playerWorldX: "..playerWorldX..", playerWorldY: "..playerWorldY..", thisDistance: "..thisDistance)
461
- if thisDistance < distance then
462
- distance = thisDistance
463
- end
464
- end
465
- end
466
- end
467
- end
468
- if distance ~= 999999999 then
469
- return distance
470
- end
471
- return nil
472
- end
473
-
474
445
-- Prepares a set of lookup tables to let us quickly determine if we're interested in various things.
475
446
-- Many of the events we handle fire quite frequently, so speed is of the essence.
476
447
-- Any item that is not enabled for tracking won't show up in these lists.
0 commit comments