A library to determine estimated range.
The library worked on the classic stress test on 8th August. I had to delete (comment) the following lines:948 -- function lib:PLAYER_TALENT_UPDATE()949 -- self:scheduleInit()950 -- end
1047 --frame:RegisterEvent("PLAYER_TALENT_UPDATE")Exaplanation:PLAYER_TALENT_UPDATE does not exist in classic (because it's mainly useful for dual spec). CHARACTER_POINTS_CHANGED handles the event of talent point allocation (which the library is subscribed to already).
Hello, WeakAuras use your lib for it's "Range Check" trigger, but LibRangeCheck-2.0 have issues on classic
On load it error while trying to register unknown event "PLAYER_TALENT_UPDATE"Most items/spells used for range test didn't exists back then so results are not very accurate.We have to disable integration of the lib in classic version of WeakAuras for now.
Please keep us updated if you plan to make it compatible.
In reply to MrBudsz:
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 ;)
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
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?
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.
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!
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.
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?
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.
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)
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.
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.