spec counter: combine item variations into one weapon

This is to keep specs from multiple variants of a weapon within one counter, like when in a party with multiple players.
This commit is contained in:
Matt Dennis
2021-04-09 21:58:51 -04:00
committed by GitHub
parent a14e864e35
commit 2eb5a8ce32
3 changed files with 16 additions and 14 deletions

View File

@@ -258,6 +258,11 @@ public class SpecialCounterPluginTest
specialCounterPlugin.onVarbitChanged(new VarbitChanged());
specialCounterPlugin.onHitsplatApplied(hitsplat(target, Hitsplat.HitsplatType.DAMAGE_ME));
// Set up spec weapon as BGS(OR)
ItemContainer equipment = mock(ItemContainer.class);
when(equipment.getItem(EquipmentInventorySlot.WEAPON.getSlotIdx())).thenReturn(new Item(ItemID.BANDOS_GODSWORD_OR, 1));
when(client.getItemContainer(InventoryID.EQUIPMENT)).thenReturn(equipment);
// Second special attack
when(client.getVar(VarPlayer.SPECIAL_ATTACK_PERCENT)).thenReturn(0);
specialCounterPlugin.onVarbitChanged(new VarbitChanged());