-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into stable-mod-id
- Loading branch information
Showing
45 changed files
with
457 additions
and
578 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
...er/EIData/Buffs/BuffSimulators/BuffSimulationItems/BuffSimulationItemBaseWithExtension.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
using GW2EIEvtcParser.ParsedData; | ||
|
||
namespace GW2EIEvtcParser.EIData.BuffSimulators; | ||
|
||
internal class BuffSimulationItemBaseWithExtension : BuffSimulationItemBase | ||
{ | ||
|
||
protected internal BuffSimulationItemBaseWithExtension(BuffStackItem buffStackItem) : base(buffStackItem) | ||
{ | ||
} | ||
public override long SetBuffDistributionItem(BuffDistribution distribs, long start, long end, long buffID) | ||
{ | ||
long cDur = base.SetBuffDistributionItem(distribs, start, end, buffID); | ||
if (cDur > 0) | ||
{ | ||
Dictionary<AgentItem, BuffDistributionItem> distribution = distribs.GetDistrib(buffID); | ||
if (distribution.TryGetValue(_src, out var toModify)) | ||
{ | ||
toModify.IncrementExtension(cDur); | ||
} | ||
else | ||
{ | ||
distribution.Add(_src, new BuffDistributionItem( | ||
0, | ||
0, 0, 0, cDur, 0)); | ||
} | ||
} | ||
return cDur; | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
...a/Buffs/BuffSimulators/BuffSimulationItems/BuffSimulationItemBaseWithExtensionWithSeed.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
using GW2EIEvtcParser.ParsedData; | ||
|
||
namespace GW2EIEvtcParser.EIData.BuffSimulators; | ||
|
||
internal class BuffSimulationItemBaseWithExtensionWithSeed : BuffSimulationItemBaseWithSeed | ||
{ | ||
|
||
protected internal BuffSimulationItemBaseWithExtensionWithSeed(BuffStackItem buffStackItem) : base(buffStackItem) | ||
{ | ||
} | ||
public override long SetBuffDistributionItem(BuffDistribution distribs, long start, long end, long buffID) | ||
{ | ||
long cDur = base.SetBuffDistributionItem(distribs, start, end, buffID); | ||
if (cDur > 0) | ||
{ | ||
Dictionary<AgentItem, BuffDistributionItem> distribution = distribs.GetDistrib(buffID); | ||
if (distribution.TryGetValue(_src, out var toModify)) | ||
{ | ||
toModify.IncrementExtension(cDur); | ||
} | ||
else | ||
{ | ||
distribution.Add(_src, new BuffDistributionItem( | ||
0, | ||
0, 0, 0, cDur, 0)); | ||
} | ||
} | ||
return cDur; | ||
} | ||
} |
45 changes: 45 additions & 0 deletions
45
...cParser/EIData/Buffs/BuffSimulators/BuffSimulationItems/BuffSimulationItemBaseWithSeed.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
using GW2EIEvtcParser.ParsedData; | ||
|
||
namespace GW2EIEvtcParser.EIData.BuffSimulators; | ||
|
||
internal class BuffSimulationItemBaseWithSeed : BuffSimulationItemBase | ||
{ | ||
internal readonly AgentItem _seedSrc; | ||
|
||
protected internal BuffSimulationItemBaseWithSeed(BuffStackItem buffStackItem) : base(buffStackItem) | ||
{ | ||
_seedSrc = buffStackItem.SeedSrc; | ||
} | ||
public override long SetBuffDistributionItem(BuffDistribution distribs, long start, long end, long buffID) | ||
{ | ||
long cDur = base.SetBuffDistributionItem(distribs, start, end, buffID); | ||
if (cDur > 0) | ||
{ | ||
Dictionary<AgentItem, BuffDistributionItem> distribution = distribs.GetDistrib(buffID); | ||
if (distribution.TryGetValue(_seedSrc, out var toModify)) | ||
{ | ||
toModify.IncrementExtended(cDur); | ||
} | ||
else | ||
{ | ||
distribution.Add(_seedSrc, new BuffDistributionItem( | ||
0, | ||
0, 0, 0, 0, cDur)); | ||
} | ||
if (_src == ParserHelper._unknownAgent) | ||
{ | ||
if (distribution.TryGetValue(_seedSrc, out toModify)) | ||
{ | ||
toModify.IncrementUnknownExtension(cDur); | ||
} | ||
else | ||
{ | ||
distribution.Add(_seedSrc, new BuffDistributionItem( | ||
0, | ||
0, 0, cDur, 0, 0)); | ||
} | ||
} | ||
} | ||
return cDur; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.