From ec9f8ff68541b30caed6cf67d3d4996cb15f5358 Mon Sep 17 00:00:00 2001 From: staphen Date: Sun, 9 Feb 2025 23:02:45 -0500 Subject: [PATCH] Fix issue with Hellfire items morphing when transferred to Diablo --- Source/pack.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Source/pack.cpp b/Source/pack.cpp index 0f917c056..b06ed1eeb 100644 --- a/Source/pack.cpp +++ b/Source/pack.cpp @@ -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;