|
|
|
@ -908,7 +908,7 @@ void CalcPlrItemVals(int p, BOOL Loadgfx) |
|
|
|
|
|
|
|
|
|
|
|
// check if the current RSplType is a valid/allowed spell
|
|
|
|
// check if the current RSplType is a valid/allowed spell
|
|
|
|
if (plr[p]._pRSplType == RSPLTYPE_CHARGES |
|
|
|
if (plr[p]._pRSplType == RSPLTYPE_CHARGES |
|
|
|
&& !(spl & ((unsigned __int64)1 << (plr[p]._pRSpell - 1)))) { |
|
|
|
&& !(spl & (1ULL << (plr[p]._pRSpell - 1)))) { |
|
|
|
plr[p]._pRSpell = SPL_INVALID; |
|
|
|
plr[p]._pRSpell = SPL_INVALID; |
|
|
|
plr[p]._pRSplType = RSPLTYPE_INVALID; |
|
|
|
plr[p]._pRSplType = RSPLTYPE_INVALID; |
|
|
|
force_redraw = 255; |
|
|
|
force_redraw = 255; |
|
|
|
@ -1154,18 +1154,18 @@ void CalcPlrScrolls(int p) |
|
|
|
for (i = 0; i < plr[p]._pNumInv; i++) { |
|
|
|
for (i = 0; i < plr[p]._pNumInv; i++) { |
|
|
|
if (plr[p].InvList[i]._itype != ITYPE_NONE && (plr[p].InvList[i]._iMiscId == IMISC_SCROLL || plr[p].InvList[i]._iMiscId == IMISC_SCROLLT)) { |
|
|
|
if (plr[p].InvList[i]._itype != ITYPE_NONE && (plr[p].InvList[i]._iMiscId == IMISC_SCROLL || plr[p].InvList[i]._iMiscId == IMISC_SCROLLT)) { |
|
|
|
if (plr[p].InvList[i]._iStatFlag) |
|
|
|
if (plr[p].InvList[i]._iStatFlag) |
|
|
|
plr[p]._pScrlSpells |= (__int64)1 << (plr[p].InvList[i]._iSpell - 1); |
|
|
|
plr[p]._pScrlSpells |= 1ULL << (plr[p].InvList[i]._iSpell - 1); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
for (j = 0; j < MAXBELTITEMS; j++) { |
|
|
|
for (j = 0; j < MAXBELTITEMS; j++) { |
|
|
|
if (plr[p].SpdList[j]._itype != ITYPE_NONE && (plr[p].SpdList[j]._iMiscId == IMISC_SCROLL || plr[p].SpdList[j]._iMiscId == IMISC_SCROLLT)) { |
|
|
|
if (plr[p].SpdList[j]._itype != ITYPE_NONE && (plr[p].SpdList[j]._iMiscId == IMISC_SCROLL || plr[p].SpdList[j]._iMiscId == IMISC_SCROLLT)) { |
|
|
|
if (plr[p].SpdList[j]._iStatFlag) |
|
|
|
if (plr[p].SpdList[j]._iStatFlag) |
|
|
|
plr[p]._pScrlSpells |= (__int64)1 << (plr[p].SpdList[j]._iSpell - 1); |
|
|
|
plr[p]._pScrlSpells |= 1ULL << (plr[p].SpdList[j]._iSpell - 1); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if (plr[p]._pRSplType == RSPLTYPE_SCROLL) { |
|
|
|
if (plr[p]._pRSplType == RSPLTYPE_SCROLL) { |
|
|
|
if (!(plr[p]._pScrlSpells & 1 << (plr[p]._pRSpell - 1))) { |
|
|
|
if (!(plr[p]._pScrlSpells & 1ULL << (plr[p]._pRSpell - 1))) { |
|
|
|
plr[p]._pRSpell = SPL_INVALID; |
|
|
|
plr[p]._pRSpell = SPL_INVALID; |
|
|
|
plr[p]._pRSplType = RSPLTYPE_INVALID; |
|
|
|
plr[p]._pRSplType = RSPLTYPE_INVALID; |
|
|
|
force_redraw = 255; |
|
|
|
force_redraw = 255; |
|
|
|
|