Skip to content

Ensure GetMerchantMagicItems preserves seed (alternative to #2529) - #2534

Merged
Interkarma merged 1 commit into
Interkarma:masterfrom
ajrb:magic-shop-theft-randomization-alt
Aug 8, 2023
Merged

Ensure GetMerchantMagicItems preserves seed (alternative to #2529)#2534
Interkarma merged 1 commit into
Interkarma:masterfrom
ajrb:magic-shop-theft-randomization-alt

Conversation

@ajrb

@ajrb ajrb commented Jul 26, 2023

Copy link
Copy Markdown
Collaborator

GetMerchantMagicItems() sets the random seed based on the current day. Any activity reliant on random sequence which occurs after opening the mages item seller will always have the same set of outcomes. Preserve the seed to avoid this.

This is an alternative fix to the one contributed in PR #2529 to limit the effect the change may have on the rest of the codebase. I am pretty sure there would be no ill effects from the other approach, but it's possible and given how close to release of v1.0 I am very cautious.

All credit to @chloelcdev for finding the issue, and contributing a perfectly fine fix.

GetMerchantMagicItems() sets the random seed based on the current day. Any activity reliant on random that occurs after opening the mages item seller will always have the same set of outcomes. Preserve the seed.
@Interkarma

Copy link
Copy Markdown
Owner

Thank you Hazel!

@Interkarma
Interkarma merged commit 3cb5576 into Interkarma:master Aug 8, 2023
Interkarma added a commit that referenced this pull request Aug 8, 2023
#2534 is same fix but at place where seed is broken.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants