diff --git a/Source/items.cpp b/Source/items.cpp index bdbbbeba9..16d53ba86 100644 --- a/Source/items.cpp +++ b/Source/items.cpp @@ -3101,6 +3101,7 @@ void items_427ABA(int x, int y) dItem[x][y] = ii + 1; itemavail[0] = itemavail[MAXITEMS - numitems - 1]; itemactive[numitems] = ii; + gbIsHellfireSaveGame = gbIsHellfire; UnPackItem(&PkSItem, &item[ii]); item[ii]._ix = x; item[ii]._iy = y; diff --git a/Source/pack.cpp b/Source/pack.cpp index 72981a50d..1a2067534 100644 --- a/Source/pack.cpp +++ b/Source/pack.cpp @@ -114,6 +114,7 @@ void PackPlayer(PkPlayerStruct *pPack, int pnum, BOOL manashield) pPack->pDifficulty = SwapLE32(pPlayer->pDifficulty); pPack->pDamAcFlags = SwapLE32(pPlayer->pDamAcFlags); pPack->pDiabloKillLevel = SwapLE32(pPlayer->pDiabloKillLevel); + pPack->bIsHellfire = gbIsHellfire; if (!gbIsMultiplayer || manashield) pPack->pManaShield = SwapLE32(pPlayer->pManaShield); diff --git a/Source/pack.h b/Source/pack.h index ba7ca29a9..97e0dba12 100644 --- a/Source/pack.h +++ b/Source/pack.h @@ -64,19 +64,19 @@ typedef struct PkPlayerStruct { Sint8 pBattleNet; Uint8 pManaShield; Uint8 pDungMsgs2; - Sint8 bReserved[2]; + Sint8 bIsHellfire; + Sint8 bReserved; // For future use Uint16 wReflections; - Sint16 wReserved2; + Sint16 wReserved2; // For future use Sint8 pSplLvl2[10]; // Hellfire spells - Sint16 wReserved8; + Sint16 wReserved8; // For future use Uint32 pDiabloKillLevel; Sint32 pDifficulty; Sint32 pDamAcFlags; - Sint32 dwReserved[5]; + Sint32 dwReserved[5]; // For future use } PkPlayerStruct; #pragma pack(pop) - void PackPlayer(PkPlayerStruct *pPack, int pnum, BOOL manashield); void UnPackPlayer(PkPlayerStruct *pPack, int pnum, BOOL killok); void PackItem(PkItemStruct *id, ItemStruct *is); diff --git a/Source/pfile.cpp b/Source/pfile.cpp index dfa68c434..10e28f4cc 100644 --- a/Source/pfile.cpp +++ b/Source/pfile.cpp @@ -279,6 +279,8 @@ BOOL pfile_ui_set_hero_infos(BOOL (*ui_add_hero_info)(_uiheroinfo *)) _uiheroinfo uihero; strcpy(hero_names[i], pkplr.pName); bool hasSaveGame = pfile_archive_contains_game(archive, i); + if (!hasSaveGame) + gbIsHellfireSaveGame = pkplr.bIsHellfire; UnPackPlayer(&pkplr, 0, FALSE); game_2_ui_player(plr, &uihero, hasSaveGame); ui_add_hero_info(&uihero); @@ -394,6 +396,8 @@ void pfile_read_player_from_save() app_fatal("Unable to load character"); gbValidSaveFile = pfile_archive_contains_game(archive, save_num); + if (!gbValidSaveFile) + gbIsHellfireSaveGame = pkplr.bIsHellfire; UnPackPlayer(&pkplr, myplr, FALSE); pfile_SFileCloseArchive(archive); }