Range finder API. Based on your current abilities and map points.
Globals
RVAPI_Range.Ranges
- MIN_RANGE: default minimum range
- MAX_RANGE: default maximum range
RVAPI_Range.RangeType
- RANGE_TYPE_MAP: output type based on the map information
- RANGE_TYPE_SPELLS: output type based on the spells information
RVAPI_Range.DelayType*
- DELAY_EXACT_TIME: ???
- DELAY_DIFFERENCE_DETECTED: ???
API Functions v2.0
Function name: API_RegisterTarget()
Description: registers target name for tracking distances
Input:
- CallbackOwner -
- CallbackFunction -
- TargetName - target name
- Delay - delay for an updates
- DelayType - can be one of the following: DELAY_EXACT_TIME, DELAY_DIFFERENCE_DETECTED
- UserData - alias for the third party addons data. You can link your additional data (like user number in the group etc.) to this specific target name
Output: nothing
Function name: API_UnregisterTarget()
Description: unregisters target from the "Range API"
Input:
- CallbackOwner -
- CallbackFunction -
- TargetName - target name
Output: nothing
API Functions v1.02
Function name: API_GetRange()
Description: returns MIN and MAX range for the selected friendly/hostile target
Input:
- targetType - this could be three possible values: GameData.TargetTypes.TARGET_ALLY, GameData.TargetTypes.TARGET_ENEMY and GameData.TargetTypes.TARGET_PET
Output: array of two values
- RangeMin: minimum range value
- RangeMax: maximum range value
API Usage Example v2.0
-- : Lets look for some Mailboxes around us and update our records every one second RVAPI_Range.API_RegisterTarget(MyAddon, MyAddon.OnTargetRangeUpdated, "Mailbox", 1, RVAPI_Range.DelayType.DELAY_EXACT_TIME, nil) -- : Self: equals to the MyAddon -- : Distances: array of the found distances. For instance you can find up to three "Mailboxes" in the Altdorf city -- : RangeType: API is telling us which type of the information we got. This could be one of the following: RANGE_TYPE_MAP, RANGE_TYPE_SPELLS -- : UserData: alias information related to this target. Defined by the third party addons. function MyAddon.OnTargetRangeUpdated(Self, Distances, RangeType, UserData) -- : show the first found range in the debug window d(Distances[1].RangeMin..":"..Distances[1].RangeMax) end
Facts
- Date created
- Dec 06, 2009
- Category
- Last update
- Nov 24, 2010
- Development stage
- Release
- License
- MIT License
- Curse link
- RVAPI_Range (RV)
- Downloads
- 10,933
- Recent files
- R: v2.03 Release for 1.4.0 Nov 24, 2010
- R: v2.02 Release for 1.3.6 Sep 11, 2010
- R: v2.01 Release for 1.3.6 Sep 05, 2010
- R: v2.0 Release for 1.3.6 Aug 25, 2010
- R: v1.02 Release for 1.3.3 Feb 24, 2010