Remove clue scroll timeout

It is not even working anymore because when clue dissapears from
inventory clue is just reset.

Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
This commit is contained in:
Tomas Slusny
2018-10-05 16:24:51 +02:00
parent 6e417ba6d9
commit a72b137a9e

View File

@@ -30,7 +30,6 @@ import com.google.common.eventbus.Subscribe;
import com.google.inject.Provides;
import java.awt.image.BufferedImage;
import java.time.Duration;
import java.time.Instant;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
@@ -112,9 +111,6 @@ public class ClueScrollPlugin extends Plugin
@Getter
private Item[] inventoryItems;
@Getter
private Instant clueTimeout;
@Inject
@Getter
private Client client;
@@ -348,26 +344,9 @@ public class ClueScrollPlugin extends Plugin
}
}
ClueScroll clue = findClueScroll();
if (clue == null && this.clue != null)
{
// If clue window isn't open, and we don't have a map clue in inventory,
// but we have recorded the player having a clue,
// wait for WAIT_DURATION before discarding the knowledge of the player having a clue.
if (Instant.now().compareTo(clueTimeout.plus(WAIT_DURATION)) < 0)
{
return;
}
}
// If we have a clue, save that knowledge
// so the clue window doesn't have to be open.
if (clue != null)
{
updateClue(clue);
this.clueTimeout = Instant.now();
}
updateClue(findClueScroll());
}
public BufferedImage getClueScrollImage()