Skip to content

Commit

Permalink
Merge pull request #1 from diasurgical/nightly
Browse files Browse the repository at this point in the history
Sync with master
  • Loading branch information
galaxyhaxz authored Sep 20, 2018
2 parents 3ab3e21 + 182b2c0 commit 5945c32
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions Source/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2464,7 +2464,7 @@ BOOL __fastcall WeaponDur(int pnum, int durrnd)
}

plr[pnum].InvBody[INVLOC_HAND_LEFT]._iDurability--;
if ( plr[pnum].InvBody[INVLOC_HAND_LEFT]._iDurability != 0) {
if ( plr[pnum].InvBody[INVLOC_HAND_LEFT]._iDurability == 0) {
NetSendCmdDelItem(TRUE, INVLOC_HAND_LEFT);
plr[pnum].InvBody[INVLOC_HAND_LEFT]._itype = ITYPE_NONE;
CalcPlrInv(pnum, TRUE);
Expand All @@ -2478,7 +2478,7 @@ BOOL __fastcall WeaponDur(int pnum, int durrnd)
}

plr[pnum].InvBody[INVLOC_HAND_RIGHT]._iDurability--;
if ( plr[pnum].InvBody[INVLOC_HAND_RIGHT]._iDurability != 0 ) {
if ( plr[pnum].InvBody[INVLOC_HAND_RIGHT]._iDurability == 0 ) {
NetSendCmdDelItem(TRUE, INVLOC_HAND_RIGHT);
plr[pnum].InvBody[INVLOC_HAND_RIGHT]._itype = ITYPE_NONE;
CalcPlrInv(pnum, TRUE);
Expand All @@ -2492,7 +2492,7 @@ BOOL __fastcall WeaponDur(int pnum, int durrnd)
}

plr[pnum].InvBody[INVLOC_HAND_RIGHT]._iDurability--;
if ( plr[pnum].InvBody[INVLOC_HAND_RIGHT]._iDurability != 0 ) {
if ( plr[pnum].InvBody[INVLOC_HAND_RIGHT]._iDurability == 0 ) {
NetSendCmdDelItem(TRUE, INVLOC_HAND_RIGHT);
plr[pnum].InvBody[INVLOC_HAND_RIGHT]._itype = ITYPE_NONE;
CalcPlrInv(pnum, TRUE);
Expand All @@ -2501,14 +2501,16 @@ BOOL __fastcall WeaponDur(int pnum, int durrnd)
}

if ( plr[pnum].InvBody[INVLOC_HAND_RIGHT]._itype == ITYPE_NONE && plr[pnum].InvBody[INVLOC_HAND_LEFT]._itype == ITYPE_SHIELD ) {
if ( plr[pnum].InvBody[INVLOC_HAND_LEFT]._iDurability != 255 ) {
plr[pnum].InvBody[INVLOC_HAND_LEFT]._iDurability--;
if ( plr[pnum].InvBody[INVLOC_HAND_LEFT]._iDurability != 0 ) {
NetSendCmdDelItem(TRUE, INVLOC_HAND_LEFT);
plr[pnum].InvBody[INVLOC_HAND_LEFT]._itype = ITYPE_NONE;
CalcPlrInv(pnum, TRUE);
return TRUE;
}
if ( plr[pnum].InvBody[INVLOC_HAND_LEFT]._iDurability == 255 ) {
return FALSE;
}

plr[pnum].InvBody[INVLOC_HAND_LEFT]._iDurability--;
if ( plr[pnum].InvBody[INVLOC_HAND_LEFT]._iDurability == 0 ) {
NetSendCmdDelItem(TRUE, INVLOC_HAND_LEFT);
plr[pnum].InvBody[INVLOC_HAND_LEFT]._itype = ITYPE_NONE;
CalcPlrInv(pnum, TRUE);
return TRUE;
}
}

Expand Down

0 comments on commit 5945c32

Please sign in to comment.