xptracker: add league relic modifiers
This commit is contained in:
@@ -377,7 +377,7 @@ public class XpTrackerPlugin extends Plugin
|
||||
final Actor interacting = client.getLocalPlayer().getInteracting();
|
||||
if (interacting instanceof NPC && COMBAT.contains(skill))
|
||||
{
|
||||
final int xpModifier = worldSetToType(client.getWorldType()).getXpModifier();
|
||||
final int xpModifier = worldSetToType(client.getWorldType()).modifier(client);;
|
||||
final NPC npc = (NPC) interacting;
|
||||
xpState.updateNpcExperience(skill, npc, npcManager.getHealth(npc.getId()), xpModifier);
|
||||
}
|
||||
|
||||
@@ -24,20 +24,47 @@
|
||||
*/
|
||||
package net.runelite.client.plugins.xptracker;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import net.runelite.api.Client;
|
||||
import net.runelite.api.Varbits;
|
||||
import net.runelite.api.WorldType;
|
||||
|
||||
@Getter
|
||||
@RequiredArgsConstructor
|
||||
enum XpWorldType
|
||||
{
|
||||
NORMAL(1),
|
||||
TOURNEY(1),
|
||||
DMM(5),
|
||||
LEAGUE(5);
|
||||
NORMAL,
|
||||
TOURNEY,
|
||||
DMM
|
||||
{
|
||||
@Override
|
||||
int modifier(Client client)
|
||||
{
|
||||
return 5;
|
||||
}
|
||||
},
|
||||
LEAGUE
|
||||
{
|
||||
@Override
|
||||
int modifier(Client client)
|
||||
{
|
||||
if (client.getVar(Varbits.LEAGUE_RELIC_6) != 0)
|
||||
{
|
||||
return 16;
|
||||
}
|
||||
if (client.getVar(Varbits.LEAGUE_RELIC_4) != 0)
|
||||
{
|
||||
return 12;
|
||||
}
|
||||
if (client.getVar(Varbits.LEAGUE_RELIC_2) != 0)
|
||||
{
|
||||
return 8;
|
||||
}
|
||||
return 5;
|
||||
}
|
||||
};
|
||||
|
||||
private final int xpModifier;
|
||||
int modifier(Client client)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
static XpWorldType of(WorldType type)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user