diff --git a/Source/control.cpp b/Source/control.cpp index 6b9e90f86..3dc468a78 100644 --- a/Source/control.cpp +++ b/Source/control.cpp @@ -1688,7 +1688,7 @@ void CheckChrBtns() } } -void ReleaseChrBtns() +void ReleaseChrBtns(bool addAllStatPoints) { int i; @@ -1700,22 +1700,23 @@ void ReleaseChrBtns() && MouseX <= ChrBtnsRect[i].x + ChrBtnsRect[i].w && MouseY >= ChrBtnsRect[i].y && MouseY <= ChrBtnsRect[i].y + ChrBtnsRect[i].h) { + int statPointsToAdd = addAllStatPoints ? plr[myplr]._pStatPts : 1; switch (i) { case 0: - NetSendCmdParam1(TRUE, CMD_ADDSTR, 1); - plr[myplr]._pStatPts--; + NetSendCmdParam1(TRUE, CMD_ADDSTR, statPointsToAdd); + plr[myplr]._pStatPts -= statPointsToAdd; break; case 1: - NetSendCmdParam1(TRUE, CMD_ADDMAG, 1); - plr[myplr]._pStatPts--; + NetSendCmdParam1(TRUE, CMD_ADDMAG, statPointsToAdd); + plr[myplr]._pStatPts -= statPointsToAdd; break; case 2: - NetSendCmdParam1(TRUE, CMD_ADDDEX, 1); - plr[myplr]._pStatPts--; + NetSendCmdParam1(TRUE, CMD_ADDDEX, statPointsToAdd); + plr[myplr]._pStatPts -= statPointsToAdd; break; case 3: - NetSendCmdParam1(TRUE, CMD_ADDVIT, 1); - plr[myplr]._pStatPts--; + NetSendCmdParam1(TRUE, CMD_ADDVIT, statPointsToAdd); + plr[myplr]._pStatPts -= statPointsToAdd; break; } } diff --git a/Source/control.h b/Source/control.h index cdd206e4c..7e9f4a25b 100644 --- a/Source/control.h +++ b/Source/control.h @@ -79,7 +79,7 @@ void CheckLvlBtn(); void ReleaseLvlBtn(); void DrawLevelUpIcon(); void CheckChrBtns(); -void ReleaseChrBtns(); +void ReleaseChrBtns(bool addAllStatPoints); void DrawDurIcon(); void RedBack(); void DrawSpellBook(); diff --git a/Source/diablo.cpp b/Source/diablo.cpp index d972aad3d..689669560 100644 --- a/Source/diablo.cpp +++ b/Source/diablo.cpp @@ -700,14 +700,15 @@ static BOOL LeftMouseDown(int wParam) return FALSE; } -static void LeftMouseUp() +static void LeftMouseUp(int wParam) { gmenu_left_mouse(FALSE); control_release_talk_btn(); + bool isShiftHeld = wParam & (DVL_MK_SHIFT | DVL_MK_LBUTTON); if (panbtndown) CheckBtnUp(); if (chrbtnactive) - ReleaseChrBtns(); + ReleaseChrBtns(isShiftHeld); if (lvlbtndown) ReleaseLvlBtn(); if (stextflag != STORE_NONE) @@ -1383,7 +1384,7 @@ void GM_Game(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) GetMousePos(lParam); if (sgbMouseDown == CLICK_LEFT) { sgbMouseDown = CLICK_NONE; - LeftMouseUp(); + LeftMouseUp(wParam); track_repeat_walk(FALSE); } return; diff --git a/Source/help.cpp b/Source/help.cpp index c832a457e..040a88c63 100644 --- a/Source/help.cpp +++ b/Source/help.cpp @@ -36,6 +36,7 @@ const char gszSpawnHelpText[] = { "1 - 8: Use that item from your Belt|" "F5, F6, F7, F8: Sets a hot key for a selected skill or spell|" "Shift + Left Click: Use any weapon without moving|" + "Shift + Left Click (on character screen): Assign all stat points|" "|" "|" "$Movement:|" @@ -391,6 +392,7 @@ const char gszHelpText[] = { "1 - 8: Use Belt item|" "F5, F6, F7, F8: Set hot key for skill or spell|" "Shift + Left Click: Attack without moving|" + "Shift + Left Click (on character screen): Assign all stat points|" "|" "$Movement:|" "If you hold the mouse button down while moving, the character " diff --git a/SourceX/controls/plrctrls.cpp b/SourceX/controls/plrctrls.cpp index 829a1d6a0..5672211a6 100644 --- a/SourceX/controls/plrctrls.cpp +++ b/SourceX/controls/plrctrls.cpp @@ -1075,7 +1075,7 @@ void PerformPrimaryAction() && MouseY <= ChrBtnsRect[i].h + ChrBtnsRect[i].y) { chrbtn[i] = 1; chrbtnactive = true; - ReleaseChrBtns(); + ReleaseChrBtns(false); } } return;