Only show in range Kindlehart Shards
Allowed distance from player when extracting shard is Zero or One.
It's quite difficult to click on these when many fragments are near each other, some in range, some out of range. This happens when dealing with bosses that drop many fragments.
Below change will only show the labels for in-range Kindhart shards, when CTRL-SHIFT is held down (allnames/object filter is active).
The code below only changes this logic if you've done "Switch Object Handle" -> Add Filter. e.g. if you add afilter of "Kindle", you will then only see in range fragments.
file ObjectHandle.lua, function ObjectHandleWindow.CreateObjectHandles()
search for 1151520, and replace the existing loop with the below.
if not IsMobile(objectId) then
local props = ItemProperties.GetObjectProperties(objectId, nil, "Object Handle - check lost item")
local tid = wstring.lower(GetStringFromTid(1151520)) --lost item (Return to gain Honesty)
local tid_shard = GetStringFromTid(1165145) -- Kindlehart Shard
local abort = false
for i=1, table.getn(props) do
if wstring.lower(props[i]) == tid then
lostItem = true
break
elseif(props[i] == tid_shard and ObjectHandleWindow.CurrentFilter ~= "") then -- if it's a Kindlehart Shard, and an object filter is set, only show labels if in range.
if(GetDistanceFromPlayer(objectId) > 1) then
abort = true
end
end
end
if(abort == true) then
continue -- not further processing to do, don't show the label.
end
end