Revert "timers plugin: Improve imbued heart detection"

This reverts commit 45c5df3379.
This commit is contained in:
Jordan Atwood
2020-02-14 09:01:44 -08:00
parent ed8a1b92ba
commit 967fadf59d
2 changed files with 1 additions and 71 deletions

View File

@@ -25,7 +25,6 @@
*/
package net.runelite.client.plugins.timers;
import com.google.common.annotations.VisibleForTesting;
import com.google.inject.Provides;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -44,12 +43,10 @@ import net.runelite.api.ItemID;
import net.runelite.api.NPC;
import net.runelite.api.NpcID;
import net.runelite.api.Player;
import net.runelite.api.Skill;
import net.runelite.api.Varbits;
import net.runelite.api.WorldType;
import net.runelite.api.coords.WorldPoint;
import net.runelite.api.events.AnimationChanged;
import net.runelite.api.events.StatChanged;
import net.runelite.api.events.ChatMessage;
import net.runelite.client.events.ConfigChanged;
import net.runelite.api.events.GameStateChanged;
@@ -115,9 +112,6 @@ public class TimersPlugin extends Plugin
private static final Pattern HALF_TELEBLOCK_PATTERN = Pattern.compile("<col=4f006f>A Tele Block spell has been cast on you by (.+)\\. It will expire in 2 minutes, 30 seconds\\.</col>");
private static final Pattern DIVINE_POTION_PATTERN = Pattern.compile("You drink some of your divine (.+) potion\\.");
@VisibleForTesting
static final int IMBUED_HEART_MIN_CERTAIN_BOOST_LEVEL = 40; // Before this level, other effects can grant boosts of equal amounts
private TimerTimer freezeTimer;
private int freezeTime = -1; // time frozen, in game ticks
@@ -898,24 +892,6 @@ public class TimersPlugin extends Plugin
}
}
@Subscribe
public void onStatChanged(StatChanged statChanged)
{
if (statChanged.getSkill() != Skill.MAGIC || !config.showImbuedHeart())
{
return;
}
final int magicLevel = statChanged.getLevel();
final int boostAmount = statChanged.getBoostedLevel() - magicLevel;
final int heartBoost = 1 + (magicLevel / 10);
if (magicLevel >= IMBUED_HEART_MIN_CERTAIN_BOOST_LEVEL && boostAmount == heartBoost)
{
createGameTimer(IMBUEDHEART);
}
}
private TimerTimer createGameTimer(final GameTimer timer)
{
removeGameTimer(timer);