fix pull request #469 - multiple '$' invent slots
Assigning a partial stack of gold to quiver (Qnn$) resulted in an extra '$' slot in inventory, one for the unquivered part and another for the quivered part. Throwing a non-quivered partial stack of gold at self (tnn$.) also resulted in an extra '$' slot after throwing at self was rejected. For the first case, reject the quiver-subset-of-gold attempt. For both cases, recombine the two stacks back to original amount. Fixes #469
This commit is contained in:
@@ -499,6 +499,11 @@ dowieldquiver(void)
|
||||
if (uquiver && uquiver->o_id == g.context.objsplit.parent_oid) {
|
||||
unsplitobj(newquiver);
|
||||
goto already_quivered;
|
||||
} else if (newquiver->oclass == COIN_CLASS) {
|
||||
/* don't allow splitting a stack of coins into quiver */
|
||||
You("can't ready only part of your gold.");
|
||||
unsplitobj(newquiver);
|
||||
return 0;
|
||||
}
|
||||
finish_splitting = TRUE;
|
||||
} else if (newquiver == uquiver) {
|
||||
|
||||
Reference in New Issue
Block a user