You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't know C, but it looks like the first two conditions are identical, and the last two conditions are identical. I think in the second condition (theSecondItem->category & (WAND) should be (theSecondItem->category & (STAFF) and in the third condition (theSecondItem->category & (STAFF) should be (theSecondItem->category & (WAND) [or something similar], so it will call properly with a staff and a rune in either order, or a wand and a rune in either order.
As things are, I bet that something calls this code with theFirstItem as the rune and theSecondItem as the staff, the code passes through here, and then bad things are happening somehow.
The text was updated successfully, but these errors were encountered:
I've noticed in a few games that rune presses burn staffs up instead of applying the rune to them.
Looking at the UnBrogue code I suspect that the issue is here, web-brogue/unBrogue/UnBrogueCode/Items.c lines 9431-9441
if ((theFirstItem->category & KEY) && (theFirstItem->kind == KEY_RUNE_WAND) && (theSecondItem->category & (WAND))) {
applyRunetoWandorStaff(theFirstItem, theSecondItem);
}
else if ((theFirstItem->category & KEY) && (theFirstItem->kind == KEY_RUNE_WAND) && (theSecondItem->category & (WAND))) {
applyRunetoWandorStaff(theFirstItem, theSecondItem);
}
else if ((theSecondItem->category & KEY) && (theSecondItem->kind == KEY_RUNE_STAFF) && (theFirstItem->category & (STAFF))) {
applyRunetoWandorStaff(theSecondItem, theFirstItem);
}
else if ((theSecondItem->category & KEY) && (theSecondItem->kind == KEY_RUNE_STAFF) && (theFirstItem->category & (STAFF))) {
applyRunetoWandorStaff(theSecondItem, theFirstItem);
I don't know C, but it looks like the first two conditions are identical, and the last two conditions are identical. I think in the second condition (theSecondItem->category & (WAND) should be (theSecondItem->category & (STAFF) and in the third condition (theSecondItem->category & (STAFF) should be (theSecondItem->category & (WAND) [or something similar], so it will call properly with a staff and a rune in either order, or a wand and a rune in either order.
As things are, I bet that something calls this code with theFirstItem as the rune and theSecondItem as the staff, the code passes through here, and then bad things are happening somehow.
The text was updated successfully, but these errors were encountered: