File tree Expand file tree Collapse file tree
pkg/optimization/optstats Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -64,9 +64,10 @@ func OptimizerERStat(core *core.Core) (CollectorCustomStats[CustomEnergyStatsBuf
6464 return false
6565 }, "substat-opt-energy-log" )
6666
67- core .Events .Subscribe (event .OnBurst , func (_ ... interface {}) bool {
68- char := core . Player . ActiveChar ( )
67+ core .Events .Subscribe (event .OnEnergyBurst , func (args ... interface {}) bool {
68+ char := args [ 0 ].( * character. CharWrapper )
6969 ind := char .Index
70+ amount := args [2 ].(float64 )
7071
7172 wERsum := 0.0
7273 wsum := 0.0
@@ -82,7 +83,7 @@ func OptimizerERStat(core *core.Core) (CollectorCustomStats[CustomEnergyStatsBuf
8283
8384 erNeeded := 999999999999.9
8485 if charRawParticles [ind ] > 0 {
85- erNeeded = max ((char . EnergyMax - charFlatEnergy [ind ])/ charRawParticles [ind ], 1.0 )
86+ erNeeded = max ((amount - charFlatEnergy [ind ])/ charRawParticles [ind ], 1.0 )
8687 }
8788 erPerParticleEvent [ind ] = nil
8889 rawPerParticleEvent [ind ] = nil
You can’t perform that action at this time.
0 commit comments