A library to determine estimated range.
how to check range between targets ? i want to know the range between target and focus?
In reply to georbig:
Unfortunately this is not possible with this addon, we only get the range to the target / focus, and not the direction or position.
I posted a patch (as an issue) to add some capabilities to this, and allow concurrent item checks (still using your throttling). The latter mainly because otherwise it takes too long for the complete list of ranges to be created (I have tested this, no problems in classic).
Classic has issue with non stop fire event "GET_ITEM_INFO_RECEIVED", mostly seen on TellMeWhen. I contacted Cybeloras#8758 and he said that any calls to GetItemInfo against itemIds that don't exist in classic must be removed when running on the classic client and he can't do anything on own side with it anymore.
In reply to tigjames:
I've added handling of GET_ITEM_INFO_RECEIVED events to throttle the item queries. Give the latest release a try... (v4.3.2)_
In reply to mitchnull:
Thanks, that fixed it :) Upd: ah it was false alarm, it's still here after some time of playing
Are you sure it is caused by LibRangeCheck? It does about 10-20 item queries at most, and only during startup. It shouldn't cause event storm, and especially not "after some time of playing"...
I entered in-game with default TMW wihout configuration, fully default all settings. I checked events and went to afk for 20-30, after that I started trace events and found what GET_ITEM_INFO_RECEIVED started loop again. For some reasons issue is not repeat able and happened with me only once after update to 4.3.2
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" :)
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.