Browse Source

Close gold withdraw when closing stash

pull/4246/head
Anders Jenbo 4 years ago
parent
commit
e2fef44c9f
  1. 4
      Source/control.cpp
  2. 4
      Source/diablo.cpp
  3. 1
      Source/inv.cpp
  4. 3
      Source/miniwin/misc_msg.cpp

4
Source/control.cpp

@ -769,11 +769,13 @@ void CheckBtnUp()
switch (i) {
case PanelButtonCharinfo:
QuestLogIsOpen = false;
CloseGoldWithdraw();
IsStashOpen = false;
chrflag = !chrflag;
break;
case PanelButtonQlog:
chrflag = false;
CloseGoldWithdraw();
IsStashOpen = false;
if (!QuestLogIsOpen)
StartQuestlog();
@ -790,6 +792,7 @@ void CheckBtnUp()
break;
case PanelButtonInventory:
sbookflag = false;
CloseGoldWithdraw();
IsStashOpen = false;
invflag = !invflag;
if (dropGoldFlag) {
@ -915,6 +918,7 @@ void ReleaseLvlBtn()
auto &mainPanelPosition = GetMainPanel().position;
if (MousePosition.x >= 40 + mainPanelPosition.x && MousePosition.x <= 81 + mainPanelPosition.x && MousePosition.y >= -39 + mainPanelPosition.y && MousePosition.y <= -17 + mainPanelPosition.y) {
QuestLogIsOpen = false;
CloseGoldWithdraw();
IsStashOpen = false;
chrflag = true;
}

4
Source/diablo.cpp

@ -224,6 +224,7 @@ void LeftMouseCmd(bool bShift)
assert(MousePosition.y < GetMainPanel().position.y || MousePosition.x < GetMainPanel().position.x || MousePosition.x >= GetMainPanel().position.x + PANEL_WIDTH);
if (leveltype == DTYPE_TOWN) {
CloseGoldWithdraw();
IsStashOpen = false;
if (pcursitem != -1 && pcurs == CURSOR_HAND)
NetSendCmdLocParam1(true, invflag ? CMD_GOTOGETITEM : CMD_GOTOAGETITEM, cursPosition, pcursitem);
@ -1334,6 +1335,7 @@ void InventoryKeyPressed()
}
}
sbookflag = false;
CloseGoldWithdraw();
IsStashOpen = false;
}
@ -1354,6 +1356,7 @@ void CharacterSheetKeyPressed()
}
}
QuestLogIsOpen = false;
CloseGoldWithdraw();
IsStashOpen = false;
}
@ -1378,6 +1381,7 @@ void QuestLogKeyPressed()
}
}
chrflag = false;
CloseGoldWithdraw();
IsStashOpen = false;
}

1
Source/inv.cpp

@ -2171,6 +2171,7 @@ bool UseInvItem(int pnum, int cii)
void CloseInventory()
{
CloseGoldWithdraw();
IsStashOpen = false;
invflag = false;
}

3
Source/miniwin/misc_msg.cpp

@ -342,6 +342,7 @@ void ProcessGamepadEvents(GameAction &action)
chrflag = false;
QuestLogIsOpen = false;
sbookflag = false;
CloseGoldWithdraw();
IsStashOpen = false;
}
break;
@ -349,6 +350,7 @@ void ProcessGamepadEvents(GameAction &action)
chrflag = !chrflag;
if (chrflag) {
QuestLogIsOpen = false;
CloseGoldWithdraw();
IsStashOpen = false;
spselflag = false;
if (pcurs == CURSOR_DISARM)
@ -360,6 +362,7 @@ void ProcessGamepadEvents(GameAction &action)
if (!QuestLogIsOpen) {
StartQuestlog();
chrflag = false;
CloseGoldWithdraw();
IsStashOpen = false;
spselflag = false;
} else {

Loading…
Cancel
Save