Skip to content

Commit

Permalink
Fix issue with Hellfire items morphing when transferred to Diablo
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenCWills committed Feb 10, 2025
1 parent d92bdd2 commit 972fff0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Source/pack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,9 @@ void UnPackItem(const ItemPack &packedItem, const Player &player, Item &item, bo
RecreateEar(item, ic, iseed, ivalue & 0xFF, heroName);
} else {
item = {};
item.dwBuff = SDL_SwapLE32(packedItem.dwBuff);
// Item generation logic will assign CF_HELLFIRE based on isHellfire
// so if we carry it over from packedItem, it may be incorrect
item.dwBuff = SDL_SwapLE32(packedItem.dwBuff) & ~CF_HELLFIRE;
RecreateItem(player, item, idx, SDL_SwapLE16(packedItem.iCreateInfo), SDL_SwapLE32(packedItem.iSeed), SDL_SwapLE16(packedItem.wValue), isHellfire);
item._iIdentified = (packedItem.bId & 1) != 0;
item._iMaxDur = packedItem.bMDur;
Expand Down

0 comments on commit 972fff0

Please sign in to comment.