Merge pull request #4079 from deathbeam/fix-sotd-sol
Make SOTD/SOTL timer use chat messsage
This commit is contained in:
@@ -71,7 +71,7 @@ public enum GameTimer
|
|||||||
ANTIPOISON("antipoison", "Antipoison", 90, ChronoUnit.SECONDS),
|
ANTIPOISON("antipoison", "Antipoison", 90, ChronoUnit.SECONDS),
|
||||||
SUPERANTIPOISON("superantipoison", "Superantipoison", 346, ChronoUnit.SECONDS),
|
SUPERANTIPOISON("superantipoison", "Superantipoison", 346, ChronoUnit.SECONDS),
|
||||||
CHARGE("charge", "Charge", 6, ChronoUnit.MINUTES),
|
CHARGE("charge", "Charge", 6, ChronoUnit.MINUTES),
|
||||||
STAFF_OF_THE_DEAD("staffofthedead", "Staff of the Dead", GraphicID.STAFF_OF_THE_DEAD, 1, ChronoUnit.MINUTES);
|
STAFF_OF_THE_DEAD("staffofthedead", "Staff of the Dead", 1, ChronoUnit.MINUTES);
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
private final String imageResource;
|
private final String imageResource;
|
||||||
|
|||||||
@@ -429,10 +429,20 @@ public class TimersPlugin extends Plugin
|
|||||||
createGameTimer(CHARGE);
|
createGameTimer(CHARGE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (event.getMessage().equals("<col=ef1020>Your magical charge fades away.</col>"))
|
if (config.showCharge() && event.getMessage().equals("<col=ef1020>Your magical charge fades away.</col>"))
|
||||||
{
|
{
|
||||||
removeGameTimer(CHARGE);
|
removeGameTimer(CHARGE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (config.showStaffOfTheDead() && event.getMessage().contains("Spirits of deceased evildoers offer you their protection"))
|
||||||
|
{
|
||||||
|
createGameTimer(STAFF_OF_THE_DEAD);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (config.showStaffOfTheDead() && event.getMessage().contains("Your protection fades away"))
|
||||||
|
{
|
||||||
|
removeGameTimer(STAFF_OF_THE_DEAD);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Subscribe
|
@Subscribe
|
||||||
@@ -474,11 +484,6 @@ public class TimersPlugin extends Plugin
|
|||||||
createGameTimer(VENGEANCE);
|
createGameTimer(VENGEANCE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (config.showStaffOfTheDead() && actor.getGraphic() == STAFF_OF_THE_DEAD.getGraphicId())
|
|
||||||
{
|
|
||||||
createGameTimer(STAFF_OF_THE_DEAD);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (config.showFreezes())
|
if (config.showFreezes())
|
||||||
{
|
{
|
||||||
if (actor.getGraphic() == BIND.getGraphicId())
|
if (actor.getGraphic() == BIND.getGraphicId())
|
||||||
|
|||||||
Reference in New Issue
Block a user