Skip to content

fix(illusion-temple): review fixes of the ticket crafting and update (follow-up to #1473) - #1536

Open
Mosch0512 wants to merge 34 commits into
MUnique:masterfrom
Mosch0512:fix/illusion-temple-ticket-review-fixes
Open

Mosch0512 wants to merge 34 commits into
MUnique:masterfrom
Mosch0512:fix/illusion-temple-ticket-review-fixes

Conversation

@Mosch0512

@Mosch0512 Mosch0512 commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Why

Follow-up to #1473. Its review fixes were committed after the head which got merged, so they're not on master yet. They fix the ticket crafting and the update of #1473.

What

  • Ticket crafting (IllusionTempleTicketCrafting, BaseEventTicketCrafting):
    • The combination gives the ticket which a temple of its level accepts, and prefers an available temple (e.g. when the server owner deactivated one of two temples with different tickets). The ticket of an inactive temple is still used when it's the only one, as that's the ticket the temple accepts once it's active again. A temple without a ticket item (free entry) is skipped. Only when no temple of the level has a ticket item, the result is the item named "Scroll of Blood".
    • An ingredient which is the result item itself is refused (compared by Equals, like the ticket check of the temple entry). Otherwise, a ticket which has the name of an ingredient, like in a partly swapped configuration, would be taken and given back, or lost when the mix fails.
    • When the result item doesn't exist (e.g. renamed by the owner), the crafting refuses the items instead of throwing while the items are checked.
    • Other items in the chaos machine besides the three ingredients are refused when they leave the result no place after the ingredients are removed. The 2x2 Scroll of Blood can need more room than the ingredients free, and the created ticket would then end up in no storage. BaseEventTicketCrafting is shared, so this applies to the Blood Castle mix too (2x2 Invisibility Cloak from 1x2 ingredients): with a full chaos machine it now answers IncorrectBloodCastleItems, where it ran before. With room left, other items are accepted as before. The place is checked by the new IStorage.FitsAfterRemoval, which uses the placement of Storage. The Devil Square mix is unchanged: its 1x1 Devil's Invitation always finds a place where an ingredient was.
    • The result item is looked up by comparing the neutral name as a span, as the lookup now runs on every preview once the ingredients are in the chaos machine.
  • Update (IllusionTempleDataUpdatePlugIn), now version 4, so databases which have version 3 get the new restoration:
    • It sets the original sizes of 13/50 and 13/51 instead of swapping them, so a configuration where the server owner fixed the sizes already, but not the names, gets the right sizes, and a second application changes nothing.
    • It also repairs the items when the server owner gave both items their original names already, but remains of the swap are left: the sizes are still swapped, Lumen the Barmaid sells 13/51, or a covenant drop item group contains 13/51. It then keeps the names, sets the original sizes, points the temple tickets of 13/50 at 13/51, moves only the store items of Lumen the Barmaid to 13/50, and moves 13/51 to 13/50 only in the covenant's drop item groups (their description starts with "Illusion Sorcerer Covenant"). A store item or drop item group of 13/51 which the owner added may be meant for the Scroll of Blood, and a covenant group which the owner already pointed at 13/50 is right, so these stay. On a configuration without remains of the swap, nothing changes, also when the owner changed the sizes or the temple tickets there.
    • The swapped and the renamed-back case are restored by one method each.
    • Its name and description come from PlugInResources, in English, German and Chinese, in the admin panel and on the updates page.

Testing

  • On master b53c704: dotnet build of tests/MUnique.OpenMU.Persistence.Initialization.Tests and tests/MUnique.OpenMU.Tests with -p:ci=true.
  • dotnet test --no-build -p:ci=true:
    • MUnique.OpenMU.Persistence.Initialization.Tests: 928 passed, 0 failed, 12 skipped (the database/manual ones)
    • MUnique.OpenMU.Tests: 3207 passed, 0 failed, 2 skipped
  • New tests:
    • IllusionTempleTicketCraftingTest: the crafting gives the ticket of an inactive temple which is the only one of its level, prefers the ticket of an available temple, and gives the Scroll of Blood without a ticket of the temple; a ticket with the name of the covenant is refused; an event ticket crafting without its result item refuses instead of throwing; other items in the chaos machine (an unrelated one or a second ingredient) are accepted while the result finds a place, and refused by the Illusion Temple and Blood Castle craftings when they leave it none; the Devil Square crafting accepts them; the Scroll of Blood is placed where the ingredients were, after they're removed like the combination does.
    • IllusionTempleTicketItemsTest: a configuration with swapped names, whose sizes the owner fixed already, gets the original sizes (also when applied twice); a configuration with the original names but swapped data is restored and keeps the names (all three swapped states of fix(illusion-temple): make the Scroll of Blood (13/51) the ticket again and give 13/50 back to the Illusion Sorcerer Covenant #1473, from installed version 2 and 3, which the data update service applies again); with the original names and sizes, Lumen's store items, the covenant groups and the temple tickets are repaired; a Scroll of Blood which the owner added to another store stays, and so do a drop item group of the owner with 13/51 and a covenant group which the owner already pointed at 13/50; on a configuration with the original data, the owner's sizes and a temple ticket set to 13/50 stay.
    • IllusionTempleDataTest: a configuration with the original data stays unchanged also from installed version 3.
    • LocalizedUpdatePlugInNameTest: the name and description of the update are localized.

@codacy-production

codacy-production Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Not up to standards ⛔

🔴 Issues 1 minor

Alerts:
⚠ 1 issue (≤ 0 issues of at least minor severity)

Results:
1 new issue

Category Results
BestPractice 1 minor

View in Codacy

🟢 Metrics 53 complexity · 42 duplication

Metric Results
Complexity 53
Duplication 42

View in Codacy

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.

…gredient

In a configuration whose data of 13/50 and 13/51 is only partly swapped, which the update leaves as it is, the ticket has the name of the covenant. The combination took it as the covenant and gave the same ticket back, and lost it when it failed.
…ve them their original names already

The update recognized the swapped data only by the names. A server owner who renamed both items back kept the ticket at 1x2 and the drops on the ticket, and the update left it so. Now the swapped sizes with the original names count as swapped, too, and the update restores the rest of the data, keeping the names.
…panel come from the plug-in resources, in English, German and Chinese
… plug-in resources also on the updates page

The display attribute used the resources, but the Name and Description properties, which the updates page of the admin panel shows, still returned the English constants, and the text was kept twice.
…es the items instead of throwing

The check for the ticket as an ingredient looked up the result item when the items were checked, which happens for every item put into the chaos machine. Without an item of the result name, e.g. renamed by the server owner, it threw there instead of only when mixing.
…giving the items their original names

When the names are swapped, a store item of 13/51 is named the covenant, so it moves to 13/50. When the owner gave the items their original names already, a store item of 13/51 which the owner added may be meant as the Scroll of Blood, so only the items of Lumen the Barmaid, who sells the covenant, move.
…ts ingredients

The result can be bigger than an ingredient, like the 2x2 Scroll of Blood or Invisibility Cloak. Other items in the chaos machine could take the place which it needs after the ingredients are removed; then the mix succeeded, but the created ticket was in no storage. With the three ingredients alone, there's always a place for it.
…h version 3 get the restoration of renamed-back items
…on 3, which the data update service applies again
…, but still gives the ticket of an inactive one
@Mosch0512
Mosch0512 force-pushed the fix/illusion-temple-ticket-review-fixes branch from e2bffe1 to d541792 Compare November 17, 2026 22:39

This branch has not been deployed

No deployments
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.

1 participant