dps counter: add option to only count boss damage
This commit is contained in:
@@ -63,4 +63,15 @@ public interface DpsConfig extends Config
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@ConfigItem(
|
||||
position = 3,
|
||||
keyName = "bossDamage",
|
||||
name = "Only boss damage",
|
||||
description = "Only count damage done to the boss, and not to other NPCs"
|
||||
)
|
||||
default boolean bossDamage()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -186,6 +186,13 @@ public class DpsCounterPlugin extends Plugin
|
||||
|
||||
if (hitsplat.isMine())
|
||||
{
|
||||
final int npcId = ((NPC) actor).getId();
|
||||
boolean isBoss = BOSSES.contains(npcId);
|
||||
if (dpsConfig.bossDamage() && !isBoss)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
int hit = hitsplat.getAmount();
|
||||
// Update local member
|
||||
PartyMember localMember = partyService.getLocalMember();
|
||||
@@ -207,7 +214,7 @@ public class DpsCounterPlugin extends Plugin
|
||||
{
|
||||
final int npcId = ((NPC) actor).getId();
|
||||
boolean isBoss = BOSSES.contains(npcId);
|
||||
if (actor != player.getInteracting() && !isBoss)
|
||||
if ((dpsConfig.bossDamage() || actor != player.getInteracting()) && !isBoss)
|
||||
{
|
||||
// only track damage to npcs we are attacking, or is a nearby common boss
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user