Browse Source

Spend all stat points with shift click

pull/835/head^2
Juliano Goncalves 5 years ago committed by Anders Jenbo
parent
commit
20c44a08ca
  1. 19
      Source/control.cpp
  2. 2
      Source/control.h
  3. 7
      Source/diablo.cpp
  4. 2
      Source/help.cpp
  5. 2
      SourceX/controls/plrctrls.cpp

19
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;
}
}

2
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();

7
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;

2
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 "

2
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;

Loading…
Cancel
Save