-
-
Notifications
You must be signed in to change notification settings - Fork 33
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
Add limit for dragons #792
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SapiensAnatis
added a commit
that referenced
this pull request
May 12, 2024
The changes in #792 introduced a global query filter to PlayerUserData which is being hit in the OAuthCallback, but throwing an exception in IPlayerIdentityService as there is no ViewerId claim at this point in the auth code. Fix that by ignoring query filters since there is a filter here anyway.
SapiensAnatis
added a commit
that referenced
this pull request
May 13, 2024
This is based on player feedback from the changes to save import in #792 to provide a more clear warning about what will happen when importing a save with an excess number of dragons. Since we are not currently able to show feedback on the save import process, we will settle for introducing a dialog in the save export page where most players who end up reimporting their save will have to go first.
SapiensAnatis
added a commit
that referenced
this pull request
May 13, 2024
This is based on player feedback from the changes to save import in #792 to provide a more clear warning about what will happen when importing a save with an excess number of dragons. Since we are not currently able to show feedback on the save import process, we will settle for introducing a dialog in the save export page where most players who end up reimporting their save will have to go first.
SapiensAnatis
added a commit
that referenced
this pull request
May 16, 2024
More fallout from #792 - I forgot that you can trade for multiple dragons at once in treasure trade. After #792 this only gives 1 dragon and scams the player. This is actually quite tricky to handle since each dragon could put you over the limit. This change special-cases dragon trades and splits them up to be sent to the batch reward handler which can process each one individually. To accomplish this the BatchGrantReward method has been expanded to use a fallback for non-batchable entities instead of just throwing.
SapiensAnatis
added a commit
that referenced
this pull request
May 16, 2024
More fallout from #792 - I forgot that you can trade for multiple dragons at once in treasure trade. After #792 this only gives 1 dragon and scams the player, as DragonHandler ignores `Entity.Quantity`. This is actually quite tricky to handle since each dragon could put you over the limit. This change special-cases dragon trades and splits them up to be sent to the batch reward handler one-by-one which can process each one individually. To accomplish this the BatchGrantReward method has been expanded to use a fallback for non-batchable entities instead of just throwing.
SapiensAnatis
added a commit
that referenced
this pull request
Jun 30, 2024
Starts enforcing the maximum dragon limit, with excess going to the present box. Closes #670 On save import, the dragon list will be trimmed, taking the first N dragons according to the `$.user_data.max_dragon_quantity`. This itself is capped at 500 to prevent people from editing it to `int.MaxValue`. Existing saves will not be affected unless they are re-imported. Additionally includes some refactoring of `RewardService` and the summoning logic. The existing 'grant multiple character/dragon' logic has been extracted into `RewardService` as an implementation of a new `IBatchRewardHandler`. `SummonService` now calls this from a support `UnitService` that handles the unique requirement of needing to know whether an added dragon was new, since this cannot be known from the reward grant result.
SapiensAnatis
added a commit
that referenced
this pull request
Jun 30, 2024
The changes in #792 introduced a global query filter to PlayerUserData which is being hit in the OAuthCallback, but throwing an exception in IPlayerIdentityService as there is no ViewerId claim at this point in the auth code. Fix that by ignoring query filters since there is a filter here anyway.
SapiensAnatis
added a commit
that referenced
this pull request
Jun 30, 2024
This is based on player feedback from the changes to save import in #792 to provide a more clear warning about what will happen when importing a save with an excess number of dragons. Since we are not currently able to show feedback on the save import process, we will settle for introducing a dialog in the save export page where most players who end up reimporting their save will have to go first.
SapiensAnatis
added a commit
that referenced
this pull request
Jun 30, 2024
More fallout from #792 - I forgot that you can trade for multiple dragons at once in treasure trade. After #792 this only gives 1 dragon and scams the player, as DragonHandler ignores `Entity.Quantity`. This is actually quite tricky to handle since each dragon could put you over the limit. This change special-cases dragon trades and splits them up to be sent to the batch reward handler one-by-one which can process each one individually. To accomplish this the BatchGrantReward method has been expanded to use a fallback for non-batchable entities instead of just throwing.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Starts enforcing the maximum dragon limit, with excess going to the present box. Closes #670
On save import, the dragon list will be trimmed, taking the first N dragons according to the
$.user_data.max_dragon_quantity
. This itself is capped at 500 to prevent people from editing it toint.MaxValue
. Existing saves will not be affected unless they are re-imported.Additionally includes some refactoring of
RewardService
and the summoning logic. The existing 'grant multiple character/dragon' logic has been extracted intoRewardService
as an implementation of a newIBatchRewardHandler
.SummonService
now calls this from a supportUnitService
that handles the unique requirement of needing to know whether an added dragon was new, since this cannot be known from the reward grant result.