♻️ Convert 'plr_class' to a scoped enumeration
This commit is contained in:
parent
660fbfd4c1
commit
7d95bfed39
20 changed files with 553 additions and 553 deletions
|
|
@ -61,7 +61,7 @@ void PackPlayer(PkPlayerStruct *pPack, int pnum, bool manashield)
|
|||
pPack->targx = pPlayer->_ptargx;
|
||||
pPack->targy = pPlayer->_ptargy;
|
||||
strcpy(pPack->pName, pPlayer->_pName);
|
||||
pPack->pClass = pPlayer->_pClass;
|
||||
pPack->pClass = static_cast<Sint8>(pPlayer->_pClass);
|
||||
pPack->pBaseStr = pPlayer->_pBaseStr;
|
||||
pPack->pBaseMag = pPlayer->_pBaseMag;
|
||||
pPack->pBaseDex = pPlayer->_pBaseDex;
|
||||
|
|
@ -233,7 +233,7 @@ void UnPackPlayer(PkPlayerStruct *pPack, int pnum, bool netSync)
|
|||
pPlayer->_pGold = SwapLE32(pPack->pGold);
|
||||
pPlayer->_pMaxHPBase = SwapLE32(pPack->pMaxHPBase);
|
||||
pPlayer->_pHPBase = SwapLE32(pPack->pHPBase);
|
||||
pPlayer->_pBaseToBlk = ToBlkTbl[pPlayer->_pClass];
|
||||
pPlayer->_pBaseToBlk = ToBlkTbl[static_cast<std::size_t>(pPlayer->_pClass)];
|
||||
if (!netSync)
|
||||
if ((int)(pPlayer->_pHPBase & 0xFFFFFFC0) < 64)
|
||||
pPlayer->_pHPBase = 64;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue