Skip to content

Implement NPC drops export and enhance language localization#7

Open
HordeXL wants to merge 5 commits intoNL0bP:masterfrom
HordeXL:master
Open

Implement NPC drops export and enhance language localization#7
HordeXL wants to merge 5 commits intoNL0bP:masterfrom
HordeXL:master

Conversation

@HordeXL
Copy link
Copy Markdown

@HordeXL HordeXL commented Apr 12, 2026

No description provided.

HordeXL added 5 commits April 10, 2026 15:41
Introduce NPC drop extraction and export UI/logic. Added UI strings and a toolbar button (ExtractNpcDrops) and a new ExtractNpcDropsCommand in MainViewModel which prompts for a file, calls DatabaseService.ExtractNpcDropsAsync, and writes JSON output (with pretty-printing and relaxed JSON escaping). DatabaseService: added NpcDropRecord/ItemDropRecord, implemented ExtractNpcDropsAsync to read loot_pack_dropping_npcs and loots (chunked queries), aggregate item lists per NPC, and report progress. Also changed localized_texts query to select columns dynamically based on language mode and simplified fallback logic. Minor UI string tweak to LangTip to clarify DB content language behavior.
Replace the toolbar language toggle button with a ComboBox (RU/EN/ZH) bound TwoWay to Language. Update MainViewModel so setting Language invokes ApplyLanguageChange(), which recreates UIStrings, persists the selection, and raises property changes for UI and related labels. ToggleLanguage now delegates to ApplyLanguageChange as well.
Add detailed technical implementation documentation for LootMaster covering four core areas: NPC drop extraction (DB queries, aggregation, JSON export), database localization (RU/EN/ZH dynamic field selection and fallback logic), JSON input parsing (multi-format handling and robustness), and UI language switching (state-driven updates, persistence, and DataGrid header refresh). The new markdown provides code snippets and rationale to aid future development and maintenance.
Add many localized UI entries to UIStrings.cs (NPC extraction, common dialog titles, open/save dialog filters/titles, MessageBox texts, import/export messages). Replace hardcoded Russian strings in MainViewModel with corresponding _ui.* properties and methods, including status texts and MessageBox prompts. Convert TryParseGroupChance from static to instance to allow localized warnings. Purpose: centralize localization and remove inline string literals to support multi-language UI and consistent messaging.
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