itemcharges: Add support for blood essence
Co-authored-by: Adam <Adam@sigterm.info>
This commit is contained in:
@@ -93,6 +93,10 @@ public class ItemChargePluginTest
|
||||
private static final String ACTIVATE_EXPEDITIOUS_BRACELET = "Your expeditious bracelet helps you progress your slayer task faster. It has 11 charges left.";
|
||||
private static final String BREAK_EXPEDITIOUS_BRACELET = "Your expeditious bracelet helps you progress your slayer task faster. <col=ff0000>It then crumbles to dust.</col>";
|
||||
|
||||
private static final String ACTIVATE_BLOOD_ESSENCE = "You activate the blood essence.";
|
||||
private static final String EXTRACT_BLOOD_ESSENCE = "You manage to extract power from the Blood Essence and craft 67 extra runes.";
|
||||
private static final String CHECK_BLOOD_ESSENCE = "Your blood essence has 56 charges remaining";
|
||||
|
||||
@Mock
|
||||
@Bind
|
||||
private Client client;
|
||||
@@ -421,4 +425,29 @@ public class ItemChargePluginTest
|
||||
itemChargePlugin.onChatMessage(chatMessage);
|
||||
verify(configManager).setRSProfileConfiguration(ItemChargeConfig.GROUP, ItemChargeConfig.KEY_EXPEDITIOUS_BRACELET, 30);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testBloodEssenceActivate()
|
||||
{
|
||||
ChatMessage chatMessage = new ChatMessage(null, ChatMessageType.GAMEMESSAGE, "", ACTIVATE_BLOOD_ESSENCE, "", 0);
|
||||
itemChargePlugin.onChatMessage(chatMessage);
|
||||
verify(configManager).setRSProfileConfiguration(ItemChargeConfig.GROUP, ItemChargeConfig.KEY_BLOOD_ESSENCE, 1000);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testBloodEssenceExtract()
|
||||
{
|
||||
ChatMessage chatMessage = new ChatMessage(null, ChatMessageType.GAMEMESSAGE, "", EXTRACT_BLOOD_ESSENCE, "", 0);
|
||||
when(configManager.getConfiguration(ItemChargeConfig.GROUP, ItemChargeConfig.KEY_BLOOD_ESSENCE, Integer.class)).thenReturn(1000);
|
||||
itemChargePlugin.onChatMessage(chatMessage);
|
||||
verify(configManager).setRSProfileConfiguration(ItemChargeConfig.GROUP, ItemChargeConfig.KEY_BLOOD_ESSENCE, 933);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testBloodEssenceCheck()
|
||||
{
|
||||
ChatMessage chatMessage = new ChatMessage(null, ChatMessageType.GAMEMESSAGE, "", CHECK_BLOOD_ESSENCE, "", 0);
|
||||
itemChargePlugin.onChatMessage(chatMessage);
|
||||
verify(configManager).setRSProfileConfiguration(ItemChargeConfig.GROUP, ItemChargeConfig.KEY_BLOOD_ESSENCE, 56);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user