RVAPI_Entities (RV)

RVAPI Collects an entities information in the 3D world like health, action points, RvR flags, buffs, etc.




Dependencies

Types


EntityData - this the entity structure which belongs to the one unit in the 3D world.
  • EntityId = entityId: the unique value in the 3D world. Always set at creation
  • EntityType = 0: one of the SystemData.TargetObjectType value
  • Name = L"": NPC, Player, static object name
  • Title = L"": ex. Flight Master, Healer
  • CareerName = L"": ex. White Lion, Archmage
  • CareerLine = 0
  • Level = 0
  • Tier = 0: 0 is the default value, 1-CHAMPION, 2-HERO, 3-LORD etc.
  • DifficultyMask = 0
  • IsNPC = false
  • IsPet = false
  • IsPVP = false: is flagged as PvP
  • ShowHealthBar = false
  • HitPointPercent = 0
  • ActionPointPercent = 0
  • MoraleLevel = 0
  • RelationshipColor = {r=0,g=0,b=0}
  • Online = false: available for friendly players only
  • ZoneNumber = 0
  • IsDistant = false: available for groups and warbands
  • IsInSameRegion = false: available for groups and warbands
  • IsGroupLeader = false: available for groups and warbands
  • IsAssistant = false: available for groups and warbands
  • IsMainAssist = false: available for groups and warbands
  • IsMasterLooter = false: available for groups and warbands
  • IsSelf = false
  • IsGroupMember = false: available for groups and warbands
  • IsScenarioGroupMember = false
  • IsWarbandMember = false: available for groups and warbands
  • IsTargeted = false: is targeted by the player
  • IsMouseOvered = false: is mouseovered by the player
  • Pet = {healthPercent = 0}
  • ConType = 0
  • MapPinType = 0
  • SigilEntryId = 0
  • RangeMin = RVAPI_Range.MIN_RANGE: minimum range value for the target
  • RangeMax = RVAPI_Range.MAX_RANGE: maximum range value for the target
  • GroupIndex = 0: available for groups and warbands
  • MemberIndex = 0: available for groups and warbands


Globals


RVAPI_Entities.Events
  • ENTITY_UPDATED: fires only then EntityData structure has been modified. See EntityData type above.
    Output:
    • EntityId - entityId
    • EntityData - entity data itself
  • ENTITY_PARAM_UPDATED: not used
  • ENTITY_LOADING_BEGIN: same as the SystemData.Events.LOADING_BEGIN
    Output:
    • Empty table
  • ENTITY_LOADING_END: same as the SystemData.Events.LOADING_END
    Output:
    • Empty table
  • ENTITY_PLAYER_TARGET_UPDATED: same as the SystemData.Events.PLAYER_TARGET_UPDATED
    Output:
    • TargetClassification - selfhostiletarget,selffriendlytarget,mouseovertarget
    • OldTargetId - old entity ID of the same TargetClassification,or 0 if non
    • NewTargetId - new selected entity ID
    • TargetType - 0 = No Target, 1 = Player, 2 = Player's Pet, 3 = Friendly PC, 4 = Friendly NPC/Pet, 5 = Hostile Player, 6 = Hostile NPC/Pet
  • ENTITY_GROUP_UPDATED: same as the SystemData.Events.GROUP_UPDATED, (safe)
    Output:
    • Empty table
  • ENTITY_GROUP_MEMBER_UPDATED: same as the SystemData.Events.GROUP_STATUS_UPDATED
    Output:
    • MemberIndex - member index in the group, please note the group can hame up to 5!!! members plus player his self
  • ENTITY_BATTLEGROUP_UPDATED: same as the SystemData.Events.BATTLEGROUP_UPDATED, (safe)
    Output:
    • Empty table
  • ENTITY_BATTLEGROUP_MEMBER_UPDATED: same as the SystemData.Events.BATTLEGROUP_MEMBER_UPDATED
    Output:
    • PartyIndex - party index, from 1 to 4
    • MemberIndex - member index, from 1 to 6
  • ENTITY_FORMATION_UPDATED:
    Output:
    • FormationData - same as the BattlegroupData
  • ENTITY_FORMATION_MEMBER_UPDATED:
    Output:
    • GroupIndex - party index, from 1 to 4
    • MemberIndex - group member index, from 1 to 6
    • MemberData - member data
  • ENTITY_FORMATION_MEMBER_DISTANCE_UPDATED:
    Output:
    • GroupIndex - party index, from 1 to 4
    • MemberIndex - group member index, from 1 to 6
    • RangeMin - minimum distance
    • RangeMax - maximum distance
  • ENTITY_PLAYER_PET_UPDATED: same as the SystemData.Events.PLAYER_PET_UPDATED, (safe)
    Output:
    • PetData - same as GameData.Player.Pet
  • ENTITY_PLAYER_PET_HEALTH_UPDATED: not used
  • ENTITY_PLAYER_PET_STATE_UPDATED: not used


API Functions


API_RegisterEventHandler() Description: allow application to register specific event handler Input:
  • Event - See RVAPI_Entities.Events above for available events
  • CallbackOwner - table
  • CallbackFunction - table.function
Output: nothing


API_UnregisterEventHandler() Description: unregisters event handler Input:
  • Event - See RVAPI_Entities.Events above for available events
  • CallbackOwner - table
  • CallbackFunction - table.function
Output: nothing


API_GetEntityData() Description: get entity data by entity ID Input:
  • entityId - unique ID value in the 3D world.
Output:
  • EntityData structure, see above in the types section


API_SetEntityData() Description: set entity data by entity ID Input:
  • entityId - unique ID value in the 3D world.
  • entityData - EntityData structure, see above in the types section
Output: nothing


API_UpdateSystem() Description: updates entities in all possible ways. It is under developing still Input: nothing Output: nothing


API_ResetSystem Description: wipe entities database. Please note it wipes everytime on ENTITY_LOADING_BEGIN event too Input: nothing Output: nothing


API_StartSystem Description: this will start gathering information even if no any callback functions are registered. You can use this if you plan to call API_GetEntityData() separately Input: nothing Output: nothing


API_StopSystem Description: this will stop gathering information. It is highly recommended to call this function together with the API_StartSystem() if you don't plan to use the RVAPI_Entities addon services anymore Input: nothing Output: nothing


API_IsSystemActive Description: returns the current system status Input: nothing Output:
  • true - addon is gathering entities information
  • false - addon is not gathering entities information

You must login to post a comment. Don't have an account? Register to get one!

Facts

Date created
Dec 06, 2009
Category
Last update
Nov 24, 2010
Development stage
Beta
License
MIT License
Curse link
RVAPI_Entities (RV)
Downloads
9,786
Recent files

Authors