-
Notifications
You must be signed in to change notification settings - Fork 793
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consolidated buy and sell functions of Smith, Witch and Healer #1524
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A good first step in cleaning up this file. But please apply the correct code style.
Submitted for sell functions. |
@joewis Please only apply clang-format to change lines btw |
Patching Wirt into the same store logic proves more tricky than expected, of all reasons, because the item in the buy dialogue is offset by 1 item. I leave him be for now. |
92e9ee7
to
88e5af4
Compare
88e5af4
to
a41e462
Compare
@obligaron I fixed some issues when rebasing and cleaned up some related code with how stores are refreshed. I actually think it fixes a vanilla bug where after drinking enough exiles to use an item it would still appear as red in the store, but haven't confirmed if that was the case. I may have introduced some new issues related to the line number logic since I'll try and also get the boy shop merged with the other vendors so that it's all combined. |
a41e462
to
cccfdc9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't finished reviewing yet but wanted to share the first comments.
Before this pr I didn't looked at the store logic. But now I see why the old code needs refactoring. 😟
Good to see that someone works on this. 👍🙂
Adding to the list: Cain now crashes with segfault when attempting to identify items. |
07ca798
to
c331d1d
Compare
c331d1d
to
e7b1da4
Compare
Introducing S_Scroll, S_StartBuy, S_BuyEnter, S_BuItem function and switch between the respective Item Arrays rather than duplicating the functions for each store. Removed the duplicate functions.
Wirt is not included as his item is not stored in an array (yet).
This approach works for sell functionality as well, I leave that for a separate commit.