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

Fixes for alchemy dude's quest #2352

Merged
merged 5 commits into from
Sep 10, 2023
Merged

Fixes for alchemy dude's quest #2352

merged 5 commits into from
Sep 10, 2023

Conversation

scooterboo
Copy link
Contributor

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

  • Bug fix
  • New feature
  • Enhancement
  • Documentation

Checklist:

  • My code follows the style guidelines of this project
  • My pull request is unique and no other pull requests have been opened for these changes
  • I have read the Contributing note and Code of conduct
  • I am responsible for any copyright issues with my code if it occurs in the future.

Gadgets only have drop_id when they are not chests (chest_drop_id). When drop_id is not set (0), handleChestDrop quickly exits
Took the oppertunity to Rename ContentFinishGivingItem to ItemGiving
Took the oppertunity to clean up some old code as well

conditions are stored in QuestManager
@KingRainbow44 KingRainbow44 merged commit fbe2b13 into Grasscutters:development Sep 10, 2023
2 checks passed
@scooterboo scooterboo deleted the patch-2 branch September 11, 2023 03:51
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