[lua] Fix CoP 5-2 and Container:isVarBitsSet bug - #11001
Conversation
no, it is ANDing the bits, its just that any non-zero bit from any AND sets a non-zero value and the result is based on a partial match of bits ( |
The final check is effectively an OR, right? The for loop ANDs all the bits, but then the function does final check incorrectly? Or am I just misunderstanding bit math? Edit: It's probably my phrasing is wrong but the fix is right? |
|
Ignore my previous comment. I see it now based on what Winter said. I completely brainfarted and my fix was luckily correct. I for some reason thought the for loop was ORing the variable. I don't know why I thought this as the variable isn't anywhere except in bit.band. I'll go ahead and update the PR description. |
6107090 to
bf0e5e6
Compare
|
I was correcting CoP 5-2 when I realized the code had a weird work-around for the isVarBitsSet bug. I noticed I needed to combine the CoP 5-2 fix with this. I checked the other 2 quests and they are coded correctly. I've updated the PR name and description. |
|
This PR has been automatically marked as stale because |
|
Please let me know what you'd like me to change. Right now on LSB, you don't have to kill any of the 3 NMs to trigger the door events for CoP 5-2 |
I affirm:
What does this pull request do?
Fixes CoP 5-2 as well as a bug in Container:isVarBitsSet.
CoP 5-2:
Steps to test these changes
Run through CoP 5-2 as well as Stamp Hunt and Arts and Crafts.