Repository navigation
Conversation
WarpInfo.Requirements is a collection of attribute requirements, like the MapRequirements of a map, e.g. a minimum master level or number of resets. It's editable in the admin panel like the other requirement collections and part of the configuration aggregate. The migration adds the foreign key of the warp to the AttributeRequirement table; existing warps get no requirements. The persistence model classes, the compiled model and the generated loader code are regenerated.
WarpAction refuses a warp whose requirements the character doesn't meet, with the same check and message as the requirements of the target map, and before the costs are paid. The check of the map requirements is extracted into an extension of the requirement collection, which both use. The move chat command warps through WarpAction. Bots don't pick warps whose requirements they miss, and the summon party skill doesn't summon a member who misses the requirements of the warp to the map.
…r the open source client WarpRequirementsExtended (C2 F5 0B) follows the WarpListExtended and carries, per warp which requires them, the minimum master level and the minimum number of resets, so that the client can grey out the warps which the character can't use yet. The regenerated packet structure tests also contain the tests of the lucky coin packets, which were missing in the committed file.
Right after the warp list, ShowWarpListExtendedPlugIn sends the minimum master level and resets of the listed warps which have such a requirement; of several requirements of the same attribute, the highest one. Requirements of other attributes stay on the server, and nothing is sent when no warp has one. The original client doesn't get it, because the plugin is only for the open source client.
… place
WarpInfoExtensions decide whether a player may use a warp (its class-reduced level and its
requirements); WarpAction and both bot paths use them. A missed warp requirement is refused with
its own message, which names the attribute and its minimum ("Master Level 50"). The map
requirement message gets the same text: it was looked up by its English value instead of its
resource name, so it came out empty.
…m in The summon picked the warp with the lowest level and checked only its requirements, so a member who misses them was left behind although another warp into the same map would let them in. Tests for the summon and for the bots, which skip warps whose requirements they miss.
…e the bot fulfills them
Not up to standards ⛔🔴 Issues
|
| Category | Results |
|---|---|
| BestPractice | 1 medium |
🟢 Metrics 25 complexity · 12 duplication
Metric Results Complexity 25 Duplication 12
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
This branch has not been deployed
This file contains hidden or 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
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.
Warps can now require attributes, like maps already can: a server can say "Swamp of Calmness needs 5 resets" or "this warp needs master level 50". The open source client (MuMain) learns the master level and resets minimums, so it can grey out the warps a character can't use yet.
What it does
WarpInfo.Requirements: a list ofAttributeRequirement, set up likeGameMapDefinition.MapRequirements(persistence, migrationAddWarpInfoRequirements, captions in en, de, zh-CN). The admin panel edits it like the map requirements.WarpInfoExtensionsdecide who may use a warp (its class-reduced level and its requirements);WarpAction, both bot paths and the bots' warp floor use them.WarpActionchecks the warp's requirements after the map's and before the money. The summon party skill lets a member come when any warp into the map lets them in (before, only the warp with the lowest level counted).WarpRequirementsExtended(C2 F5 0B), only for the open source client (106.3 and later), sent right afterWarpListExtended: count, then per warpIndex(u16),MasterLevel(u16),Resets(u32). It lists only the warps with a master level or resets minimum above 0 (the highest minimum of each attribute; a negative minimum is sent as 0) and isn't sent when none has one. Other attributes are checked by the server only.WarpListExtendedis unchanged too, so released MuMain builds keep working; they ignore the new sub code.How it was checked
MUnique.OpenMU.Tests: 3107 passed, 2 skipped. New: WarpAction with requirements met and missed (with the message), the map requirement message, the plugin's exact bytes (also a negative minimum), no message when only other attributes are required, the summon with two warps into a map, bots skipping warps and their warp floor. Each new test fails when its fix is reverted.MUnique.OpenMU.Network.Packets.Tests: 719/719;MUnique.OpenMU.PlugIns.Tests: 55/55.MUnique.OpenMU.Web.Tests: the 16 NetworkAnalyzer tests that fail in a German culture pass withDOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1; the rest pass.Persistence.Initialization.Tests: 868 passed;ItemStatProfilesDataTest.Season6ItemCountsPerProfilefails here, a master failure fixed by test(items): update the item count of the default stat profile #1528.Decided by me
ShowWarpListExtendedPlugIn, so it always follows the list and covers the same warps.Client side
MuMain reads the message in Mosch0512/MuMain#177 (warp list as data, with master level and resets per warp).