LibRangeCheck-2.0
This library is deprecated. Development moved to the LibRangeCheck-3.0 fork.
A library to determine estimated range.
This library is deprecated. Development moved to the LibRangeCheck-3.0 fork.
A library to determine estimated range.
In reply to MrBudsz:
Hello,
I'll create an updated version that at least loads without errors, not sure if I'll have time to update the spell and item DB to be more accurate on classic... Although if it really is classic, then I can probably just roll back to an earlier list I used back then ;)
In reply to MrBudsz:
Hello,
v4.3.0 should be running on classic without errors now. I'll try to improve the accuracy in a later commit, but right now I cannot test anything...
(presumably all I have to do is restore a previous spell and item list from "classic" time, but I'm not quite sure exactly which version of the list is best for "classic" :)
In reply to mitchnull:
Alright, thanks for the update! Please keep us updated when you think the lib is in a good state for classic or if you need help to test a spell list
Question:
With the new changes coming in 7.1 with not being able to get player coordinates in instances, addons creating Radar effects will break.
I'm trying to come up with a way to create a new Radar with approximated player locations using range checks between all other players in a given instance, maybe even hostile NPCs. Can you think of a way that would be possible? I would imagine everyone in the instance would need to have this library installed and some way to pass data back and forth.
In your opinion, a) is this something that is possible to do; and b) how resource-intensive would on-the-fly calculations like these be?
Thank you
Hello,
This sounds like an interesting experiment. Technically, it should be possible to create an addon like you described using triangulation, etc, but I'm not sure how accurate it would be. I also have no idea how resource intensive it would be. The calculation and range detection shouldn't be that cpu hungry, but a lot depends on the communication protocol (if everyone shares measurements with everyone else in a raid, I guess that'd quickly lead to problems...)
In any case, I'd definitely give it a shot if I were you, sounds like an interesting project, even if it fails due to performance reasons in the end :)
Would it be possible to create an addon where if a raid leader placed a raid marker down and everyone in the raid moved to that marker and did like a /reset to calibrate a reference point? Then the addon made calculations referencing this point to each player.
No, unless the "reference point" is a player or other targetable entity which doesn't move.
@mitch0
Ahhh... I see now. I noticed the "Reinforced Net" with its 80 yard range in you source code already, which is a very specific item. I did not come up to me IsItemInRange() could be used without the actual item in the inventory. Nifty!
@Myth384
Hello,
LibRangeCheck is using item ranges (along with spell ranges) for range estimates. The 80yd range is checked with the item range of "Reinforced Net" (itemid: 35278). See the IsItemInRange() API call.
Hi Mitch, I was wondering how the 80 yard range is determined. I can not find any spell with this range. Your library is even able to determine this distance on a lvl 1 bank alt.
Hi,
I am getting this error in 5.0.4 with my Druid:
Message: ...s\DHUD4\Libs\LibRangeCheck-2.0\LibRangeCheck-2.0.lua:433: GetSpellName(): Invalid spell slot
Is there a specific reason why, this library doesn't yield a precise distance to a party member, when using GetRange()?
I mean, it should be 100% accurate, as you can simply check if the GUID of 'target' equals the GUID of a friendly player, and if that's the case, simply check the map distance?
I mean, all you have to do is to embed LibMapData-1.0 and use the Lib:distance on that?
Hi,
Several reasons:
1) when the lib was created, it was not possible to get accurate distance to group/raid members in instances
2) even now there are places where this check doesn't work
3) this lib is aimed mostly for spell-range estimates, so it's important that the ranges reported match up with the spell ranges (I'm not sure that the LibMapData based ranges would be 100% correct with regards to spell ranges, that is: if my range to a party member is 39.98 yards by coordinates, the engine might still calculate my heals as out-of-range. This sort of thing happened with interact-based distances, that's why I removed them from the normal checks a while back.
4) simplicity. I'd rather keep this lib as simple as possible.
5) consistency. I think it would be confusing that range estimates changed willy-nilly based on what type of unit you're targeting.
cheers,
mitch
Hi Mitch.
And thanks you for reporting back to me!
Would you be okay with me uploading a modified version of your library, with the changes needed, in order to embed LibMapData-1.0? (I know you've released this library into public domain, I just like checking that people are okay with it anyways)
Hi,
Sure, go ahead, just name it something else than LibRangeCheck-X.Y :)
Ideally you should change the name by which it is registered to LibStub, and modify your addons using LibRangeCheck to use your lib instead.
cheers,
mitch
Thanks you, and I'll be sure to rename it, as addon as well as in LibStub.
I think I'll just make a single call library, that combines the results of your library's getRange() and the Distance() of LibMapData.
ps Parnic says hello, btw
pps Not sure if this will affect anything, but the spell Enlightened Judgements under HarmSpells["Paladin"] was spelled as Elnightened Judgements, in LibRangeCheck.lua
It's probably caused by Holy Shock being whacky. Try removing the Holy Shock lines from LibRangeCheck-2.0.lua (should be lines 125 and 129).
could you paste here the output of "/run print(GetSpellInfo(20473))" while you're Holy specced?
thanks,
mitch
I've removed Holy Shock from the spell list. The next IceHUD build should pick up the new version and hopefully your issue will go away.
cheers,
mitch
the output of /run print(GetSpellInfo(20473)) is
"Holy Shock Interface\Icons\Spell_Holy_SearingLight 259 false 0 0 0 40", in case you still want to take a look at it