ba: fix wave timer announce from exiting a tutorial

Co-authored-by: jacoblairm <jacoblairm@gmail.com>
This commit is contained in:
Adam
2019-06-01 19:29:08 -04:00
committed by Adam
parent 35625f4bba
commit 527c7d5172

View File

@@ -177,7 +177,10 @@ public class BarbarianAssaultPlugin extends Plugin
{
overlay.setCurrentRound(null);
if (config.waveTimes() && gameTime != null)
// Use an instance check to determine if this is exiting a game or a tutorial
// After exiting tutorials there is a small delay before changing IN_GAME_BA back to
// 0 whereas when in a real wave it changes while still in the instance.
if (config.waveTimes() && gameTime != null && client.isInInstancedRegion())
{
announceTime("Wave " + currentWave + " duration: ", gameTime.getTime(true));
}