- swapping items in tactical could lead to a situation where we don't have enough AP to put the item on the hand cursor anywhere. Now it is allowed to place the item in your inventory. The merc will have negative AP afterwards.

- removing an attachment and closing the UDB could lead to a situation where you don't have enough AP to attach the item on your hand cursor again when you notice that you don't have a slot available in inventory and not enough AP to simply drop the item. Attaching the attachment again is now possible. The merc will have negative AP afterwards.


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6368 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
silversurfer
2013-09-06 19:14:09 +00:00
parent 1201807b09
commit a7ac10d630
2 changed files with 116 additions and 5 deletions
+10 -2
View File
@@ -3891,8 +3891,16 @@ void SMInvClickCallback( MOUSE_REGION * pRegion, INT32 iReason )
}
else //we dont have enough APs to move it to this slot, show a warning message
{
ScreenMsg(FONT_MCOLOR_LTYELLOW, MSG_UI_FEEDBACK, TacticalStr[NOT_ENOUGH_APS_STR]);
fOKToGo = FALSE;
// silversurfer: What if our old slot is occupied now (could happen when we swap items)?
// We will be stuck with an item at the hand cursor and nowhere to put it -> bad. :-(
// So let's check if our old slot is empty and if it is not allow item placement anyway.
if ( gpSMCurrentMerc->inv[ uiLastHandPos ].usItem == NULL )
{
ScreenMsg(FONT_MCOLOR_LTYELLOW, MSG_UI_FEEDBACK, TacticalStr[NOT_ENOUGH_APS_STR]);
fOKToGo = FALSE;
}
else
fOKToGo = TRUE;
}
// We are doing this ourselve, continue