Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Add drops for gadgets:
Some Gadgets have drop_ids and grasscutter completely ignores them! I went and put the drop handling next to where the monster drop handing is.
Gadgets only have drop_id when they are not chests (chest_drop_id), so this doesn't effect chests. These guys are super rare, so they don't effect things like rock/crate drops. When drop_id is not in the gadget, it defaults to 0, handleChestDrop quickly exits when drop_id is 0.
Implement QUEST_COND_ITEM_GIVING_FINISHED:
This is the accept version of ContentFinishItemGiving
Took the oppertunity to Rename ContentFinishGivingItem to ItemGiving too
Store accept conditions like fail and finish content are:
The old code checks the input params against every accept conditions in the quest (a bug!). It also has amnesia between checking different conditions. This makes accept conditions with a LOGIC_AND and two types of conditions impossible to accept.
I went and stored a map of int arrays in QuestManager so that grasscutter can remember what accept conditions have already been set. I also went and removed the old tryAcceptSubQuests function (the code should have been deleted when it was moved to it's present location) and a comment block with some false information.
Issues fixed by this PR
Add drops for gadgets:
You collect three crystals for alchemist guy. This makes the rocks drop the crystal. It isn't handled like normal rocks.
QUEST_COND_ITEM_GIVING_FINISHED:
Giving the food to alchemist guy. Unfortunately doesn't make the quest continue because quests 1104415 and 1104416 have two accept conditions each.
Accept conditions:
quests 1104415 and 1104416. Probably super rare otherwise, but I'd bet there are some other quests that might benefit.
Type of changes
Checklist: