EQAditu / AdvancedCombatTracker

Advanced Combat Tracker
https://advancedcombattracker.com
116 stars 25 forks source link

chilled to the bone log line has no attacker to parse in log line for EverQuest parser #97

Closed FreedomFaighter closed 5 months ago

FreedomFaighter commented 6 months ago

log line gives person receiving damage victim in next log line is the attacker which the damage should attributed to

FreedomFaighter commented 6 months ago

[Wed Mar 06 21:46:26 2024] <Player2|Victim> was chilled to the bone for <NPC1|damage shield points> points of non-melee damage. [Wed Mar 06 21:46:26 2024] <Player2|Attacker> slashes <NPC1|Victim> for<Player2|damage points> points of damage. (Lucky Critical)

NPC1 is the attacker in line 1

EQAditu commented 6 months ago

I don't really understand. You're talking about a limitation in your own plugin? This isn't really the place for advice or general discussion.

That said, I believe the EQ2 parser handles two such situations like this. Ward absorption and spell reflects. In both cases, information from one log line is temporarily stored to be used when a future log line appears.

In your case, I imagine you would not create a combat action for the first line, but store the victim and damage amount. If the very next line has a matching attacker compared to the previous victim, then you may emit the combat action for the previous line using the newly gained information and then handle the second line normally. (then clear out the temporary data)

FreedomFaighter commented 5 months ago

With back filled damage shield has this filled in best I could manage, point of contention would be storing this information outside a MasterSwing object as the masterswing object can't be altered once created and the current method is to grab those values and create a new object with the filled in attacker name

EQAditu commented 5 months ago

One direction is easier than the other. It's possible you have encountered the more difficult direction where you want to modify already created data? As you said, MasterSwing objects cannot be changed. Because ACT uses incremental caching, it's not good to modify old data because the cache can become incorrect and future calculations will also be incorrect.

If I remember correctly, you don't have to generate a combat action for a given log line. Just keep the pieces of the MasterSwing as temporary variables to use later... then add two at once when you have the proper data. If possible, also create a TimeSorter number at each line so you have a unique value for each MasterSwing.

FreedomFaighter commented 5 months ago

That is what I attempted to do is get a GTS value and hold it over in a temporary MasterSwing until the next logline is read to complete both loglines once the attacker value is grabbed from the victim value in the second logline associated with that combat action

FreedomFaighter commented 5 months ago

Processed by check for default on chilled MasterSwing object not equal to default