Skip to content

Commit

Permalink
fix #55
Browse files Browse the repository at this point in the history
  • Loading branch information
shalzuth committed Jul 26, 2022
1 parent 261dc41 commit e493d66
Showing 1 changed file with 27 additions and 23 deletions.
50 changes: 27 additions & 23 deletions LostArkLogger/Parser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -343,34 +343,38 @@ void ProcessPacket(List<Byte> data)
}
}
}
currentEncounter.End = DateTime.Now;
currentEncounter = new Encounter();
currentEncounter.Entities = Encounters.Last().Entities; // preserve entities
if (WasWipe || Encounters.Last().AfterWipe)
Task.Run(() =>
{
Task.Delay(500); // wait 500ms to capture any final damage packets
currentEncounter.End = DateTime.Now;
currentEncounter = new Encounter();
currentEncounter.Entities = Encounters.Last().Entities; // preserve entities
if (WasWipe || Encounters.Last().AfterWipe)
{

currentEncounter.RaidInfos = Encounters.Last().RaidInfos;
currentEncounter.AfterWipe = true; // flag signifying zone after wipe
if (Encounters.Last().AfterWipe)
currentEncounter.RaidInfos = Encounters.Last().RaidInfos;
currentEncounter.AfterWipe = true; // flag signifying zone after wipe
if (Encounters.Last().AfterWipe)
{
Duration = 0; // dont add time for zone inbetween pulls for raid time
currentEncounter.AfterWipe = false;
}
currentEncounter.RaidTime = Encounters.Last().RaidTime + Duration;// update raid duration
WasWipe = false;

}
else if (WasKill)
{
Duration = 0; // dont add time for zone inbetween pulls for raid time
currentEncounter.AfterWipe = false;
WasKill = false;
}
currentEncounter.RaidTime = Encounters.Last().RaidTime + Duration;// update raid duration
WasWipe = false;

}
else if (WasKill)
{
WasKill = false;
}

if (Encounters.Last().Infos.Count <= 15)
{
Encounters.Remove(Encounters.Last());
}
Encounters.Add(currentEncounter);
Logger.AppendLog(2);
if (Encounters.Last().Infos.Count <= 15)
{
Encounters.Remove(Encounters.Last());
}
Encounters.Add(currentEncounter);
Logger.AppendLog(2);
});
}
else if (opcode == OpCodes.PKTInitPC)
{
Expand Down

0 comments on commit e493d66

Please sign in to comment.