A server software implementation, ineroperable with a certain anime game client. The code in this repository is fully custom made for edyoucational purposes and future preservation, no copyrighted code is allowed in this repository.
At the end of An Impromptu Change of Plan, only one of the three Adepti quests fired: Wangshu
When Wangshu saves, the timing on my computer makes it save two times at the same time (for 100301 and 100320).
When this happens, a E11000 duplicate key error collection: grasscutter.quests index: _id_ dup key: { _id: ObjectId('65ceb86e3a88695a7c17d491') } is thrown, and the quest accept system bails. The quest system ends up not accepting the other two Adepti quests.
A long term fix would be for the main quest to not save to the backup database as things change, but to save in batches. For example on world ticks or every 30s worth of world ticks.
This proposed fix makes it gracefully fail and continue to accept quests if saving fails.
Type of changes
[x] Mitigation
[ ] Bug fix
[ ] New feature
[ ] Enhancement
[ ] Documentation
Checklist:
[x] My code follows the style guidelines of this project
[x] My pull request is unique and no other pull requests have been opened for these changes
Description
At the end of An Impromptu Change of Plan, only one of the three Adepti quests fired: Wangshu When Wangshu saves, the timing on my computer makes it save two times at the same time (for 100301 and 100320). When this happens, a
E11000 duplicate key error collection: grasscutter.quests index: _id_ dup key: { _id: ObjectId('65ceb86e3a88695a7c17d491') }
is thrown, and the quest accept system bails. The quest system ends up not accepting the other two Adepti quests.A long term fix would be for the main quest to not save to the backup database as things change, but to save in batches. For example on world ticks or every 30s worth of world ticks.
This proposed fix makes it gracefully fail and continue to accept quests if saving fails.
Type of changes
Checklist: