Skip to content
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

deduplicate NPC sell/buy code #6341

Merged
merged 1 commit into from
Aug 12, 2023
Merged

Conversation

qndel
Copy link
Member

@qndel qndel commented Jul 10, 2023

No description provided.

@qndel
Copy link
Member Author

qndel commented Jul 10, 2023

This changes the code a bit:
adds

} else {
	l -= 4;
}

to places that didn't have it before + different value depending on if the item is identified or not, but I don't expect it to cause any problems - stores only sell identified items after all

@AJenbo AJenbo added this to the 1.6.0 milestone Jul 17, 2023
@AJenbo AJenbo changed the base branch from master to development August 12, 2023 15:48
@AJenbo AJenbo merged commit 1e62775 into diasurgical:development Aug 12, 2023
@@ -348,6 +348,32 @@ bool StoreAutoPlace(Item &item, bool persistItem)
return AutoPlaceItemInInventory(player, item, persistItem);
}

void ScrollVendorStore(Item *itemData, int storeLimit, int idx, int selling = true)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Um, int selling? Why not bool?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Um, int selling? Why not bool?

I think I was messing with other parameters and this must've been a leftover, nice catch ^^

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.

3 participants