More float

This commit is contained in:
Adam
2019-05-11 15:08:40 -04:00
parent a7ab6153f1
commit 4a81250c99
2 changed files with 3 additions and 3 deletions

View File

@@ -122,7 +122,7 @@ public class DpsCounterPlugin extends Plugin
dpsMember.addDamage(hit);
// System.out.println("HIT "+ hit);
if (!partyService.getMembers().isEmpty())
if (hit > 0 && !partyService.getMembers().isEmpty())
{
// Check the player is attacking the boss
if (npc != null && player.getInteracting() == npc)
@@ -147,7 +147,7 @@ public class DpsCounterPlugin extends Plugin
return;
}
DpsMember dpsMember = members.computeIfAbsent(name, n -> new DpsMember(name));
DpsMember dpsMember = members.computeIfAbsent(name, DpsMember::new);
dpsMember.addDamage(dpsUpdate.getHit());
}

View File

@@ -21,6 +21,6 @@ class DpsMember
{
int diff = (int) (Instant.now().toEpochMilli() - start.toEpochMilli()) / 1000;
if (diff == 0) return 0;
return damage / diff;
return (int) ((float) damage / (float) diff);
}
}