Skip to content

Commit

Permalink
Fix #170: D2Game.0x6FCF77E0 rolls seed but then resets it
Browse files Browse the repository at this point in the history
  • Loading branch information
Lectem committed Oct 2, 2024
1 parent 9b45320 commit 5f10151
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions source/D2Game/src/SKILLS/SkillAss.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1069,7 +1069,10 @@ void __fastcall sub_6FCF77E0(D2GameStrc* pGame, D2UnitStrc* pUnit, D2DamageStrc*
nValue = 3;
}

D2SeedStrc tSeedBackup;
SEED_GetSeeds(&pUnit->pSeed, &tSeedBackup.nLowSeed, &tSeedBackup.nHighSeed);
const int32_t nX = ITEMS_RollRandomNumber(&pUnit->pSeed);
SEED_SetSeeds(&pUnit->pSeed, tSeedBackup.nLowSeed, tSeedBackup.nHighSeed);

if (pSkillsTxtRecord->dwFlags[0] & gdwBitMasks[SKILLSFLAGINDEX_PRGSTACK])
{
Expand Down

0 comments on commit 5f10151

Please sign in to comment.