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) { switch (i) {
case PanelButtonCharinfo: case PanelButtonCharinfo:
QuestLogIsOpen = false; QuestLogIsOpen = false;
CloseGoldWithdraw();
IsStashOpen = false; IsStashOpen = false;
chrflag = !chrflag; chrflag = !chrflag;
break; break;
case PanelButtonQlog: case PanelButtonQlog:
chrflag = false; chrflag = false;
CloseGoldWithdraw();
IsStashOpen = false; IsStashOpen = false;
if (!QuestLogIsOpen) if (!QuestLogIsOpen)
StartQuestlog(); StartQuestlog();
@ -790,6 +792,7 @@ void CheckBtnUp()
break; break;
case PanelButtonInventory: case PanelButtonInventory:
sbookflag = false; sbookflag = false;
CloseGoldWithdraw();
IsStashOpen = false; IsStashOpen = false;
invflag = !invflag; invflag = !invflag;
if (dropGoldFlag) { if (dropGoldFlag) {
@ -915,6 +918,7 @@ void ReleaseLvlBtn()
auto &mainPanelPosition = GetMainPanel().position; 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) { if (MousePosition.x >= 40 + mainPanelPosition.x && MousePosition.x <= 81 + mainPanelPosition.x && MousePosition.y >= -39 + mainPanelPosition.y && MousePosition.y <= -17 + mainPanelPosition.y) {
QuestLogIsOpen = false; QuestLogIsOpen = false;
CloseGoldWithdraw();
IsStashOpen = false; IsStashOpen = false;
chrflag = true; 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); assert(MousePosition.y < GetMainPanel().position.y || MousePosition.x < GetMainPanel().position.x || MousePosition.x >= GetMainPanel().position.x + PANEL_WIDTH);
if (leveltype == DTYPE_TOWN) { if (leveltype == DTYPE_TOWN) {
CloseGoldWithdraw();
IsStashOpen = false; IsStashOpen = false;
if (pcursitem != -1 && pcurs == CURSOR_HAND) if (pcursitem != -1 && pcurs == CURSOR_HAND)
NetSendCmdLocParam1(true, invflag ? CMD_GOTOGETITEM : CMD_GOTOAGETITEM, cursPosition, pcursitem); NetSendCmdLocParam1(true, invflag ? CMD_GOTOGETITEM : CMD_GOTOAGETITEM, cursPosition, pcursitem);
@ -1334,6 +1335,7 @@ void InventoryKeyPressed()
} }
} }
sbookflag = false; sbookflag = false;
CloseGoldWithdraw();
IsStashOpen = false; IsStashOpen = false;
} }
@ -1354,6 +1356,7 @@ void CharacterSheetKeyPressed()
} }
} }
QuestLogIsOpen = false; QuestLogIsOpen = false;
CloseGoldWithdraw();
IsStashOpen = false; IsStashOpen = false;
} }
@ -1378,6 +1381,7 @@ void QuestLogKeyPressed()
} }
} }
chrflag = false; chrflag = false;
CloseGoldWithdraw();
IsStashOpen = false; IsStashOpen = false;
} }

1
Source/inv.cpp

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

3
Source/miniwin/misc_msg.cpp

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

Loading…
Cancel
Save