diff --git a/Source/items.cpp b/Source/items.cpp index dbccefd3f..2d89c01d8 100644 --- a/Source/items.cpp +++ b/Source/items.cpp @@ -20,6 +20,10 @@ int gnNumGetRecords; /* data */ +#ifdef HELLFIRE +int MaxGold = GOLD_MAX_LIMIT; +#endif + BYTE ItemCAnimTbl[169] = { 20, 16, 16, 16, 4, 4, 4, 12, 12, 12, 12, 12, 12, 12, 12, 21, 21, 25, 12, 28, diff --git a/Source/items.h b/Source/items.h index 2ef48f09c..a2e4f002e 100644 --- a/Source/items.h +++ b/Source/items.h @@ -137,6 +137,10 @@ void PutItemRecord(int nSeed, WORD wCI, int nIndex); /* data */ +#ifdef HELLFIRE +extern int MaxGold; +#endif + extern BYTE ItemCAnimTbl[169]; extern char *ItemDropNames[35]; extern BYTE ItemAnimLs[35]; diff --git a/Source/player.cpp b/Source/player.cpp index 63c090444..cf3d9ecef 100644 --- a/Source/player.cpp +++ b/Source/player.cpp @@ -1962,7 +1962,12 @@ void DropHalfPlayersGold(int pnum) hGold = plr[pnum]._pGold >> 1; for (i = 0; i < MAXBELTITEMS && hGold > 0; i++) { - if (plr[pnum].SpdList[i]._itype == ITYPE_GOLD && plr[pnum].SpdList[i]._ivalue != GOLD_MAX_LIMIT) { + if (plr[pnum].SpdList[i]._itype == ITYPE_GOLD && +#ifndef HELLFIRE + plr[pnum].SpdList[i]._ivalue != GOLD_MAX_LIMIT) { +#else + plr[pnum].SpdList[i]._ivalue != MaxGold) { +#endif if (hGold < plr[pnum].SpdList[i]._ivalue) { plr[pnum].SpdList[i]._ivalue -= hGold; SetSpdbarGoldCurs(pnum, i); @@ -2012,7 +2017,12 @@ void DropHalfPlayersGold(int pnum) drawpanflag = 255; if (hGold > 0) { for (i = 0; i < plr[pnum]._pNumInv && hGold > 0; i++) { - if (plr[pnum].InvList[i]._itype == ITYPE_GOLD && plr[pnum].InvList[i]._ivalue != GOLD_MAX_LIMIT) { + if (plr[pnum].InvList[i]._itype == ITYPE_GOLD && +#ifndef HELLFIRE + plr[pnum].InvList[i]._ivalue != GOLD_MAX_LIMIT) { +#else + plr[pnum].InvList[i]._ivalue != MaxGold) { +#endif if (hGold < plr[pnum].InvList[i]._ivalue) { plr[pnum].InvList[i]._ivalue -= hGold; SetGoldCurs(pnum, i);