Can't equip same weapon to Secondary Hand

Description

I'm fixing our test characters - and I have BarJack - he has two daggers. I can't equip them to 1 primary and 1 secondary for two weapon fighting. Instead even if Secondary Hand is selected, the dagger quantity increases by 1 in the primary hand.

Environment

None

Activity

Show:
Andrew Maitland
November 12, 2012, 8:21 PM

17:20:43.100 SEVERE main EquipmentSetFacadeImpl:316 Could not find parent for Two Weapons for item Dagger at path 0.1.2

Andrew Maitland
November 29, 2012, 9:01 PM

From Dev Group: c.ross.eskridge AT gmail DOT com
I think I have fixed the bug for CODE-1855, it appears to be a simple logic bug.

I looked at creating a unit test, but I think it would require fairly extensive restructuring of the existing tests.

Index: code/src/java/pcgen/gui2/facade/EquipmentSetFacadeImpl.java
===================================================================
— code/src/java/pcgen/gui2/facade/EquipmentSetFacadeImpl.java (revision 18504)
+++ code/src/java/pcgen/gui2/facade/EquipmentSetFacadeImpl.java (working copy)
@@ -469,8 +469,9 @@
if (parent.equals(existing.getParent())
&& existing.getNodeType() == NodeType.EQUIPMENT)
{
+ //Don't merge the items if they're in different slots
EquipNodeImpl existingImpl = (EquipNodeImpl) existing;
- if (equipSlot != null && equipSlot.equals(existingImpl.getSlot()))
+ if (equipSlot != null && !equipSlot.equals(existingImpl.getSlot()))
{
continue;
}

------------------------------------

Assignee

Unassigned

Reporter

Andrew Maitland

Labels

None

Theme

None

Epic/Theme

None

Pending User Input

None

Affects versions

Priority

Minor
Configure