Merge branch 'pr/7' into quest
This commit is contained in:
@@ -738,7 +738,14 @@ public class SlayerPlugin extends Plugin
|
|||||||
|
|
||||||
if (cachedXp != 0)
|
if (cachedXp != 0)
|
||||||
{
|
{
|
||||||
final int taskKillExp = Task.getTask(taskName).getExpectedKillExp();
|
final Task task = Task.getTask(taskName);
|
||||||
|
|
||||||
|
if (task == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
final int taskKillExp = task.getExpectedKillExp();
|
||||||
|
|
||||||
// Only count exp gain as a kill if the task either has no expected exp for a kill, or if the exp gain is equal
|
// Only count exp gain as a kill if the task either has no expected exp for a kill, or if the exp gain is equal
|
||||||
// to the expected exp gain for the task.
|
// to the expected exp gain for the task.
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ import java.util.Collections;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import lombok.AccessLevel;
|
import lombok.AccessLevel;
|
||||||
|
import javax.annotation.Nullable;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import net.runelite.api.ItemID;
|
import net.runelite.api.ItemID;
|
||||||
import net.runelite.api.NpcID;
|
import net.runelite.api.NpcID;
|
||||||
@@ -355,6 +356,7 @@ enum Task
|
|||||||
this.expectedKillExp = 0;
|
this.expectedKillExp = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Nullable
|
||||||
static Task getTask(String taskName)
|
static Task getTask(String taskName)
|
||||||
{
|
{
|
||||||
return tasks.get(taskName.toLowerCase());
|
return tasks.get(taskName.toLowerCase());
|
||||||
|
|||||||
Reference in New Issue
Block a user