ArcdpsExtension
 
Loading...
Searching...
No Matches
ArcdpsExtension::CombatEventHandler Class Reference

#include <CombatEventHandler.h>

Public Member Functions

 CombatEventHandler ()
 
virtual ~CombatEventHandler ()
 
void Event (cbtevent *pEvent, ag *pSrc, ag *pDst, const char *pSkillname, uint64_t pId, uint64_t pRevision=1)
 
bool EventsPending ()
 
void Reset ()
 
void Shutdown ()
 

Protected Member Functions

virtual void EventInternal (cbtevent *pEvent, ag *pSrc, ag *pDst, const char *pSkillname, uint64_t pId, uint64_t pRevision)
 
virtual void AgentAdded (const std::string &pAccountName, const std::string &pCharacterName, uintptr_t pId, uintptr_t pInstanceId, Prof pProfession, uint32_t pElite, bool pSelf, uint16_t pTeam, uint8_t pSubgroup)
 
virtual void AgentRemoved (const std::string &pAccountName, const std::string &pCharacterName, uintptr_t pId, bool pSelf)
 
virtual void TargetChange (uintptr_t pId)
 
virtual void EnterCombat (uint64_t pTime, uintptr_t pAgentId, uint8_t pSubgroup, const ag &pAgent)
 
virtual void ExitCombat (uint64_t pTime, uintptr_t pAgentId, const ag &pAgent)
 
virtual void ChangeUp (uint64_t pTime, uintptr_t pAgentId, const ag &pAgent)
 
virtual void ChangeDead (uint64_t pTime, uintptr_t pAgentId, const ag &pAgent)
 
virtual void ChangeDown (uint64_t pTime, uintptr_t pAgentId, const ag &pAgent)
 
virtual void LogStart (uint64_t pTime, uint32_t pServerTime, uint32_t pLocalTime, uintptr_t pSpeciesId)
 
virtual void LogEnd (uint64_t pTime, uint32_t pServerTime, uint32_t pLocalTime, uintptr_t pSpeciesId)
 
virtual void LogNpcUpdate (uint64_t pTime, uint32_t pServerTime, uint32_t pLocalTime, uintptr_t pSpeciesId)
 
virtual void WeaponSwap (uint64_t pTime, uintptr_t pAgentId, WeaponSet pWeaponSet, const ag &pAgent)
 
virtual void Reward (uint64_t pTime, uintptr_t pSelfId, uintptr_t pRewardId, int32_t pRewardType)
 
virtual void TeamChange (uint64_t pTime, uintptr_t pAgentId, uintptr_t pNewTeam, const ag &pAgent)
 
virtual void StackActive (uint64_t pTime, uintptr_t pAgentId, uintptr_t pStackId, const ag &pAgent)
 
virtual void StackReset (uint64_t pTime, uintptr_t pAgentId, uintptr_t pDuration, uint32_t pStackId, const ag &pAgent)
 
virtual void StatReset (uint64_t pTime)
 
virtual void Extension (uint64_t pTime, cbtevent *pEvent, ag *pSrc, ag *pDst, const char *pSkillname, uint64_t pId)
 
virtual void Delayed (uint64_t pTime, cbtevent *pEvent, ag *pSrc, ag *pDst, const char *pSkillname, uint64_t pId)
 
virtual void InstanceStart (uint64_t pTime, uintptr_t pStartTime)
 
virtual void Tickrate (uint64_t pTime, uintptr_t pData)
 
virtual void Last90BeforeDown (uint64_t pTime, uintptr_t pEnemyAgent, uintptr_t pSinceTime)
 
virtual void Activation (uint64_t pTime, cbtevent *pEvent, const ag &pSrc, const ag &pDst, const char *pSkillname, uint64_t pId)
 
virtual void BuffRemove (uint64_t pTime, const cbtevent *pEvent, const ag &pSrc, const ag &pDst, const char *pSkillname, uint64_t pId, uint32_t pStackId)
 
virtual void BuffDamage (uint64_t pTime, cbtevent *pEvent, const ag &pSrc, const ag &pDst, const char *pSkillname, uint64_t pId)
 
virtual void BuffApply (uint64_t pTime, const cbtevent *pEvent, const ag &pSrc, const ag &pDst, const char *pSkillname, uint64_t pId, uint32_t pStackId)
 
virtual void Strike (uint64_t pTime, cbtevent *pEvent, const ag &pSrc, const ag &pDst, const char *pSkillname, uint64_t pId)
 
virtual void BuffInitial (uint64_t pTime, cbtevent *pEvent, const ag &pSrc, const ag &pDst, const char *pSkillname, uint64_t pId, uint32_t pStackId)
 
virtual void Log (const std::string &pText)
 

Protected Attributes

uint64_t mLastEventTime = 0
 

Detailed Description

For every combat event call Event() The virtual protected functions are called for every event. This will happen in the correct order and in a separate thread. Call Shutdown() in mod_release to stop execution of events and stop the thread.

Constructor & Destructor Documentation

◆ CombatEventHandler()

ArcdpsExtension::CombatEventHandler::CombatEventHandler ( )
inlineexplicit

◆ ~CombatEventHandler()

virtual ArcdpsExtension::CombatEventHandler::~CombatEventHandler ( )
inlinevirtual

Member Function Documentation

◆ Activation()

virtual void ArcdpsExtension::CombatEventHandler::Activation ( uint64_t  pTime,
cbtevent pEvent,
const ag pSrc,
const ag pDst,
const char *  pSkillname,
uint64_t  pId 
)
inlineprotectedvirtual

Activation Event, not further deduced. For more information see the arcdps documentation. If you need deduction, change these files and create a PR.

◆ AgentAdded()

virtual void ArcdpsExtension::CombatEventHandler::AgentAdded ( const std::string &  pAccountName,
const std::string &  pCharacterName,
uintptr_t  pId,
uintptr_t  pInstanceId,
Prof  pProfession,
uint32_t  pElite,
bool  pSelf,
uint16_t  pTeam,
uint8_t  pSubgroup 
)
inlineprotectedvirtual

Agent is added to the tracking

Parameters
pAccountNameAccountName of the adedd agent
pCharacterNameCharacterName of the added agent
pIdThe ID of the added agent
pInstanceIdCurrent Map instance ID, used to detect if players are on the same instance.
pProfessionThe Profession of the added agent
pEliteThe Elite specialization of the added agent
pSelftrue if the agent is the local player.
pTeamThe team this agent is part of.
pSubgroupThe subgroup in which this agent is currently (only updated on EnterCombat again)

◆ AgentRemoved()

virtual void ArcdpsExtension::CombatEventHandler::AgentRemoved ( const std::string &  pAccountName,
const std::string &  pCharacterName,
uintptr_t  pId,
bool  pSelf 
)
inlineprotectedvirtual

Agent is removed from tracking.

Parameters
pAccountNameAccountName of the removed agent
pCharacterNameCharacterName of the removed agent
pIdThe ID of the removed agent
pSelftrue if the agent is the local player.

◆ BuffApply()

virtual void ArcdpsExtension::CombatEventHandler::BuffApply ( uint64_t  pTime,
const cbtevent pEvent,
const ag pSrc,
const ag pDst,
const char *  pSkillname,
uint64_t  pId,
uint32_t  pStackId 
)
inlineprotectedvirtual

BuffApply event, not further deduced. This is called every time a stack of a buff is added. For more information see the arcdps documentation. If you need deduction, change these files and create a PR.

◆ BuffDamage()

virtual void ArcdpsExtension::CombatEventHandler::BuffDamage ( uint64_t  pTime,
cbtevent pEvent,
const ag pSrc,
const ag pDst,
const char *  pSkillname,
uint64_t  pId 
)
inlineprotectedvirtual

BuffDamage event, not further deduced. This is called every time the buff simulation shows damage (mostly for condis, which are also buffs). For more information see the arcdps documentation. If you need deduction, change these files and create a PR.

◆ BuffInitial()

virtual void ArcdpsExtension::CombatEventHandler::BuffInitial ( uint64_t  pTime,
cbtevent pEvent,
const ag pSrc,
const ag pDst,
const char *  pSkillname,
uint64_t  pId,
uint32_t  pStackId 
)
inlineprotectedvirtual

◆ BuffRemove()

virtual void ArcdpsExtension::CombatEventHandler::BuffRemove ( uint64_t  pTime,
const cbtevent pEvent,
const ag pSrc,
const ag pDst,
const char *  pSkillname,
uint64_t  pId,
uint32_t  pStackId 
)
inlineprotectedvirtual

BuffRemove event, not further deduced. This is called every time a stack is removed. For more information see the arcdps documentation. If you need deduction, change these files and create a PR.

◆ ChangeDead()

virtual void ArcdpsExtension::CombatEventHandler::ChangeDead ( uint64_t  pTime,
uintptr_t  pAgentId,
const ag pAgent 
)
inlineprotectedvirtual

The agent with the pAgentId is now in Dead.

Parameters
pTimeTime of the event (Windows timegettime function aka. time since startup)
pAgentIdThe ID of the agent
pAgentThe actual agent if it is needed with additional information (charactername)

◆ ChangeDown()

virtual void ArcdpsExtension::CombatEventHandler::ChangeDown ( uint64_t  pTime,
uintptr_t  pAgentId,
const ag pAgent 
)
inlineprotectedvirtual

The agent with the pAgentId is now in Downstate.

Parameters
pTimeTime of the event (Windows timegettime function aka. time since startup)
pAgentIdThe ID of the agent
pAgentThe actual agent if it is needed with additional information (charactername)

◆ ChangeUp()

virtual void ArcdpsExtension::CombatEventHandler::ChangeUp ( uint64_t  pTime,
uintptr_t  pAgentId,
const ag pAgent 
)
inlineprotectedvirtual

The agent with the pAgentId is now in Alive (this is only called when the agent was dead/downed before).

Parameters
pTimeTime of the event (Windows timegettime function aka. time since startup)
pAgentIdThe ID of the agent
pAgentThe actual agent if it is needed with additional information (charactername)

◆ Delayed()

virtual void ArcdpsExtension::CombatEventHandler::Delayed ( uint64_t  pTime,
cbtevent pEvent,
ag pSrc,
ag pDst,
const char *  pSkillname,
uint64_t  pId 
)
inlineprotectedvirtual

This is called by arcdps for events that are delayed as anti-cheat-measure. Mostly known for hidden buffs that you get when you get a mechanic. This has to be parsed by yourself, cause i don't know how this works exactly. If you want to use this you can also parse the events previously and send them over the correct channels.

◆ EnterCombat()

virtual void ArcdpsExtension::CombatEventHandler::EnterCombat ( uint64_t  pTime,
uintptr_t  pAgentId,
uint8_t  pSubgroup,
const ag pAgent 
)
inlineprotectedvirtual

The agent with the pAgentId is now in combat.

Parameters
pTimeTime of the event (Windows timegettime function aka. time since startup)
pAgentIdThe ID of the agent
pAgentThe actual agent if it is needed with additional information (charactername)

◆ Event()

void ArcdpsExtension::CombatEventHandler::Event ( cbtevent pEvent,
ag pSrc,
ag pDst,
const char *  pSkillname,
uint64_t  pId,
uint64_t  pRevision = 1 
)

◆ EventInternal()

void ArcdpsExtension::CombatEventHandler::EventInternal ( cbtevent pEvent,
ag pSrc,
ag pDst,
const char *  pSkillname,
uint64_t  pId,
uint64_t  pRevision 
)
protectedvirtual

All events will call this before they are handled. If you decide to override this function, make sure to also call the parent one, else all other callbacks are never called. Parameters are 1to1 arcdps' parameters

◆ EventsPending()

bool ArcdpsExtension::CombatEventHandler::EventsPending ( )

◆ ExitCombat()

virtual void ArcdpsExtension::CombatEventHandler::ExitCombat ( uint64_t  pTime,
uintptr_t  pAgentId,
const ag pAgent 
)
inlineprotectedvirtual

The agent with the pAgentId is now out of combat.

Parameters
pTimeTime of the event (Windows timegettime function aka. time since startup)
pAgentIdThe ID of the agent
pAgentThe actual agent if it is needed with additional information (charactername)

◆ Extension()

virtual void ArcdpsExtension::CombatEventHandler::Extension ( uint64_t  pTime,
cbtevent pEvent,
ag pSrc,
ag pDst,
const char *  pSkillname,
uint64_t  pId 
)
inlineprotectedvirtual

Extension is used when extensions send events over arcdps (the only addon i know that does this is the healing stats addon). If you want to parse anything of that life, you have to pare it yourself.

◆ InstanceStart()

virtual void ArcdpsExtension::CombatEventHandler::InstanceStart ( uint64_t  pTime,
uintptr_t  pStartTime 
)
inlineprotectedvirtual

Roughly the log-relative ms that the server started the instance.

Parameters
pTimeTime of the event (Windows timegettime function aka time since startup)
pStartTimeroughly the log-relative ms that the server started the instance

◆ Last90BeforeDown()

virtual void ArcdpsExtension::CombatEventHandler::Last90BeforeDown ( uint64_t  pTime,
uintptr_t  pEnemyAgent,
uintptr_t  pSinceTime 
)
inlineprotectedvirtual
Parameters
pTimeTime of the event (Windows timegettime function aka time since startup)
pEnemyAgentenemy agent that went down
pSinceTimetime in ms since last 90% (for downs contribution)

◆ Log()

virtual void ArcdpsExtension::CombatEventHandler::Log ( const std::string &  pText)
inlineprotectedvirtual

◆ LogEnd()

virtual void ArcdpsExtension::CombatEventHandler::LogEnd ( uint64_t  pTime,
uint32_t  pServerTime,
uint32_t  pLocalTime,
uintptr_t  pSpeciesId 
)
inlineprotectedvirtual
Parameters
pTimeTime of the event (Windows timegettime function aka. time since startup)
pServerTimeCurrent unix timestamp on the server (UTC)
pLocalTimeCurrent unix timestamp of local user time
pSpeciesIdSpecies ID of the boss that this Log is for.

◆ LogNpcUpdate()

virtual void ArcdpsExtension::CombatEventHandler::LogNpcUpdate ( uint64_t  pTime,
uint32_t  pServerTime,
uint32_t  pLocalTime,
uintptr_t  pSpeciesId 
)
inlineprotectedvirtual
Parameters
pTimeTime of the event (Windows timegettime function aka. time since startup)
pServerTimeCurrent unix timestamp on the server (UTC)
pLocalTimeCurrent unix timestamp of local user time
pSpeciesIdSpecies ID of the boss that this Log is for.

◆ LogStart()

virtual void ArcdpsExtension::CombatEventHandler::LogStart ( uint64_t  pTime,
uint32_t  pServerTime,
uint32_t  pLocalTime,
uintptr_t  pSpeciesId 
)
inlineprotectedvirtual
Parameters
pTimeTime of the event (Windows timegettime function aka. time since startup)
pServerTimeCurrent unix timestamp on the server (UTC)
pLocalTimeCurrent unix timestamp of local user time
pSpeciesIdSpecies ID of the boss that this Log is for (normally 1).

◆ Reset()

void ArcdpsExtension::CombatEventHandler::Reset ( )
inline

Reset everything here aka. calls Reset on the sequencer. This has no live api uses. Only use in tests!

◆ Reward()

virtual void ArcdpsExtension::CombatEventHandler::Reward ( uint64_t  pTime,
uintptr_t  pSelfId,
uintptr_t  pRewardId,
int32_t  pRewardType 
)
inlineprotectedvirtual

Reward is only called for the local user (these are the wiggly boxes you get).

Parameters
pTimeTime of the event (Windows timegettime function aka. time since startup)
pSelfIdThe Id of the local user
pRewardIdThe Id of the reward you get (not always unique, but mostly)
pRewardTypeThe Type of the reward

◆ Shutdown()

void ArcdpsExtension::CombatEventHandler::Shutdown ( )
inline

◆ StackActive()

virtual void ArcdpsExtension::CombatEventHandler::StackActive ( uint64_t  pTime,
uintptr_t  pAgentId,
uintptr_t  pStackId,
const ag pAgent 
)
inlineprotectedvirtual
Parameters
pTimeTime of the event (Windows timegettime function aka. time since startup)
pAgentIdThe Id of the agent with the buff
pStackIdThe StackId that is marked as active
pAgentThe actual agent if it is needed with additional information (charactername)

◆ StackReset()

virtual void ArcdpsExtension::CombatEventHandler::StackReset ( uint64_t  pTime,
uintptr_t  pAgentId,
uintptr_t  pDuration,
uint32_t  pStackId,
const ag pAgent 
)
inlineprotectedvirtual

Reset the stack to given duration, also disables the stack

Parameters
pTimeTime of the event (Windows timegettime function aka. time since startup)
pAgentIdThe Id of the agent with the buff
pDurationThe Duration to reset to
pStackIdThe StackId that is changed and marked inactive
pAgentThe actual agent if it is needed with additional information (charactername)

◆ StatReset()

virtual void ArcdpsExtension::CombatEventHandler::StatReset ( uint64_t  pTime)
inlineprotectedvirtual

Reset all stats (this is there when the arcdps api resets all it's stats. e.g. after the Xera pre)

Parameters
pTimeTime of the event (Windows timegettime function aka. time since startup)

◆ Strike()

virtual void ArcdpsExtension::CombatEventHandler::Strike ( uint64_t  pTime,
cbtevent pEvent,
const ag pSrc,
const ag pDst,
const char *  pSkillname,
uint64_t  pId 
)
inlineprotectedvirtual

Strike event, not further deduced. This is called for every hit on something. For more information see the arcdps documentation. If you need deduction, change these files and create a PR.

◆ TargetChange()

virtual void ArcdpsExtension::CombatEventHandler::TargetChange ( uintptr_t  pId)
inlineprotectedvirtual

Changed target (this is only called for the local user).

Parameters
pIdThe ID of the agent that is now Targeted

◆ TeamChange()

virtual void ArcdpsExtension::CombatEventHandler::TeamChange ( uint64_t  pTime,
uintptr_t  pAgentId,
uintptr_t  pNewTeam,
const ag pAgent 
)
inlineprotectedvirtual
Parameters
pTimeTime of the event (Windows timegettime function aka. time since startup)
pAgentIdThe Id of the agent
pNewTeamThe new team the agent is now part if
pAgentThe actual agent if it is needed with additional information (charactername)

◆ Tickrate()

virtual void ArcdpsExtension::CombatEventHandler::Tickrate ( uint64_t  pTime,
uintptr_t  pData 
)
inlineprotectedvirtual

Called every 500ms

Parameters
pTimeTime of the event (Windows timegettime function aka time since startup)
pData= 25 - tickrate (when tickrate < 21)

◆ WeaponSwap()

virtual void ArcdpsExtension::CombatEventHandler::WeaponSwap ( uint64_t  pTime,
uintptr_t  pAgentId,
WeaponSet  pWeaponSet,
const ag pAgent 
)
inlineprotectedvirtual
Parameters
pTimeTime of the event (Windows timegettime function aka. time since startup)
pAgentIdThe Id of the agent
pWeaponSetThe weaponSet which was swapped to
pAgentThe actual agent if it is needed with additional information (charactername)

Member Data Documentation

◆ mLastEventTime

uint64_t ArcdpsExtension::CombatEventHandler::mLastEventTime = 0
protected

The time of the currently executed Event. Reset every executed event.


The documentation for this class was generated from the following files: