chat commands: fix detecting pb when completing leagues tasks
The league task message is in between the kc and pb messages, so just look for the pb message on the same tick as the kc message
This commit is contained in:
@@ -679,4 +679,20 @@ public class ChatCommandsPluginTest
|
||||
|
||||
verify(configManager).setRSProfileConfiguration("killcount", "hallowed sepulchre", 36);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testJadNewPbWithLeagueTask()
|
||||
{
|
||||
ChatMessage chatMessage = new ChatMessage(null, GAMEMESSAGE, "", "Your TzTok-Jad kill count is: <col=ff0000>2</col>.", null, 0);
|
||||
chatCommandsPlugin.onChatMessage(chatMessage);
|
||||
|
||||
chatMessage = new ChatMessage(null, GAMEMESSAGE, "", "Congratulations, you've completed a master task: <col=7f3700>Complete the Fight Caves in 25:00</col>.", null, 0);
|
||||
chatCommandsPlugin.onChatMessage(chatMessage);
|
||||
|
||||
chatMessage = new ChatMessage(null, GAMEMESSAGE, "", "Duration: <col=ff0000>21:58</col> (new personal best)", null, 0);
|
||||
chatCommandsPlugin.onChatMessage(chatMessage);
|
||||
|
||||
verify(configManager).setRSProfileConfiguration(eq("personalbest"), eq("tztok-jad"), eq(21 * 60 + 58));
|
||||
verify(configManager).setRSProfileConfiguration(eq("killcount"), eq("tztok-jad"), eq(2));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user