split updates
This commit is contained in:
parent
a58b9e2be5
commit
15eceacab4
@ -186,6 +186,7 @@ namespace DiademCalculator
|
|||||||
|
|
||||||
private bool configOpened;
|
private bool configOpened;
|
||||||
private DateTime lastUpdate;
|
private DateTime lastUpdate;
|
||||||
|
private int updatePresetIndex;
|
||||||
private int minPoints, btnPoints, fshPoints;
|
private int minPoints, btnPoints, fshPoints;
|
||||||
private int minScrips, btnScrips, fshScrips;
|
private int minScrips, btnScrips, fshScrips;
|
||||||
|
|
||||||
@ -247,9 +248,23 @@ namespace DiademCalculator
|
|||||||
|
|
||||||
if ((DateTime.Now - lastUpdate).TotalMilliseconds > 50)
|
if ((DateTime.Now - lastUpdate).TotalMilliseconds > 50)
|
||||||
{
|
{
|
||||||
CalculatePoints(_minerPreset, out minPoints, out minScrips);
|
switch (updatePresetIndex)
|
||||||
CalculatePoints(_botanistPreset, out btnPoints, out btnScrips);
|
{
|
||||||
CalculatePoints(_fisherPreset, out fshPoints, out fshScrips);
|
case 0:
|
||||||
|
CalculatePoints(_minerPreset, out minPoints, out minScrips);
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
CalculatePoints(_botanistPreset, out btnPoints, out btnScrips);
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
CalculatePoints(_fisherPreset, out fshPoints, out fshScrips);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
updatePresetIndex++;
|
||||||
|
if (updatePresetIndex > 2)
|
||||||
|
updatePresetIndex = 0;
|
||||||
|
|
||||||
lastUpdate = DateTime.Now;
|
lastUpdate = DateTime.Now;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user