Skip to content

feature: add object level and master level to live map - #881

Merged
sven-n merged 2 commits into
MUnique:masterfrom
eduardosmaniotto:feature/live-map-level
Aug 16, 2026
Merged

feature: add object level and master level to live map#881
sven-n merged 2 commits into
MUnique:masterfrom
eduardosmaniotto:feature/live-map-level

Conversation

@eduardosmaniotto

Copy link
Copy Markdown
Contributor

Live map: select players from the list & show level info

Improves the live-map overview in the AdminPanel.

What changed

  • Select players from the list — clicking a row in the player list now selects
    that player's object on the map, exactly like clicking the object itself
    (highlight + info card).
    • New OnSelectPlayer callback from MapPlayerListMap → new
      SelectMapObject(...) JS interop → MapApp.selectObject(objectId).
    • Row action buttons (disconnect/ban/follow) use stopPropagation, so they no
      longer trigger row selection; rows get a pointer cursor.
    • Selection uses the map-object id, which matches the Three.js world key.
  • Show level / master level in the object info card, carried through
    MapObject, CreateMapObject, and the ObjectData/PlayerData types.
  • Rebuilt MUnique.OpenMU.Web.Map.js (+ sourcemap) from TypeScript sources.

@sven-n sven-n left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the change end to end — it's correct and cleanly scoped, no blocking issues. The comments below are minor.

What I verified:

  • MapPlayerList rows key off player.Id from ConcurrentDictionary<int, Player>, which is the same locateable.Id written into MapObject.Id and used as the key in the Three.js world.objects map — so selectObject(objectId) resolves the right mesh.
  • Blazor JS interop serializes with camelCase, so Level/MasterLevel arrive as data.level/data.masterLevel, matching the launcher.
  • Neither GetLevel nor GetMasterLevel can throw or NRE for a player without a selected character (Player.Level is null-guarded; MonsterAttributeHolder.GetValueOfAttribute falls through to 0).
  • WorldObjectPicker keeps no "last picked" state, so driving onObjectPicked from outside the picker can't desync it — a later canvas click still behaves correctly.
  • The committed MUnique.OpenMU.Web.Map.js diff matches the TypeScript change exactly, with no unrelated bundle drift, and MapPlayerList.razor.css fits the CSS-isolation setup already used by Map.razor.css / LiveMap.razor.css in this library.

One thing not covered by an inline comment: the info card was moved above the player list, which is a visible layout change the description doesn't mention. It looks intentional, just worth calling out.


Generated by Claude Code

Comment thread src/Web/Map/Components/Map.razor Outdated
Comment thread src/Web/Map/Map/LocateableExtensions.cs Outdated
Comment thread src/Web/Map/Map/LocateableExtensions.cs
Comment thread src/Web/Map/Scripts/livemap/MapApp.ts
Comment thread src/Web/Map/Components/Map.razor
@sven-n
sven-n merged commit 7cfa4d0 into MUnique:master Aug 16, 2026
2 checks passed
@eduardosmaniotto
eduardosmaniotto deleted the feature/live-map-level branch August 16, 2026 21:37
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