@@ -20,6 +20,7 @@ var fofDebuffActionID = core.ActionID{SpellID: 117418}
2020
2121func fistsOfFuryTickSpellConfig (monk * Monk , pet * StormEarthAndFirePet ) core.SpellConfig {
2222 numTargets := monk .Env .GetNumTargets ()
23+ results := make ([]* core.SpellResult , numTargets )
2324
2425 config := core.SpellConfig {
2526 ActionID : fofDebuffActionID ,
@@ -33,20 +34,18 @@ func fistsOfFuryTickSpellConfig(monk *Monk, pet *StormEarthAndFirePet) core.Spel
3334 ThreatMultiplier : 1 ,
3435 CritMultiplier : monk .DefaultCritMultiplier (),
3536 ApplyEffects : func (sim * core.Simulation , target * core.Unit , spell * core.Spell ) {
36- results := make ([]* core.SpellResult , numTargets )
3737 baseDamage := monk .CalculateMonkStrikeDamage (sim , spell )
3838
3939 // Damage is split between all mobs, each hit rolls for hit/crit separately
4040 baseDamage /= float64 (numTargets )
4141
42- for idx := int32 (0 ); idx < numTargets ; idx ++ {
43- currentTarget := sim .Environment .GetTargetUnit (idx )
44- result := spell .CalcDamage (sim , currentTarget , baseDamage , spell .OutcomeMeleeSpecialHitAndCrit )
45- results [idx ] = result
42+ for i , enemyTarget := range sim .Encounter .TargetUnits {
43+ result := spell .CalcDamage (sim , enemyTarget , baseDamage , spell .OutcomeMeleeSpecialHitAndCrit )
44+ results [i ] = result
4645 }
4746
48- for idx := int32 ( 0 ); idx < numTargets ; idx ++ {
49- spell .DealDamage (sim , results [ idx ] )
47+ for _ , result := range results {
48+ spell .DealDamage (sim , result )
5049 }
5150 },
5251 }
0 commit comments