commit c5595ea08365da1b824b4bcac9f64f2e5b60b3ba Author: BillyCool Date: Tue Apr 21 01:10:25 2026 +1000 Initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1db18dc --- /dev/null +++ b/.gitignore @@ -0,0 +1,409 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Mono auto generated files +mono_crash.* + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Ww][Ii][Nn]32/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# ASP.NET Scaffolding +ScaffoldingReadMe.txt + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.tlog +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Coverlet is a free, cross platform Code Coverage Tool +coverage*.json +coverage*.xml +coverage*.info + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio 6 auto-generated project file (contains which files were open etc.) +*.vbp + +# Visual Studio 6 workspace and project file (working project files containing files to include in project) +*.dsw +*.dsp + +# Visual Studio 6 technical files +*.ncb +*.aps + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# Visual Studio History (VSHistory) files +.vshistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ + +# Fody - auto-generated XML schema +FodyWeavers.xsd + +# VS Code files for those working on multiple tools +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +*.code-workspace + +# Local History for Visual Studio Code +.history/ + +# Windows Installer files from build outputs +*.cab +*.msi +*.msix +*.msm +*.msp + +# JetBrains Rider +*.sln.iml + +# Squad +.gitattributes +.github +.copilot +.squad + +# User Data +src/Data/UserData +.squad-workstream +src/Data/MasterData diff --git a/DISCLAIMER.md b/DISCLAIMER.md new file mode 100644 index 0000000..a452af2 --- /dev/null +++ b/DISCLAIMER.md @@ -0,0 +1,37 @@ +# Disclaimer + +## No Affiliation + +This project is an unofficial, fan-made private server reimplementation for NieR: Reincarnation. It is not affiliated with, endorsed by, or associated with Square Enix Co., Ltd., Applibot, Inc., or any of their subsidiaries or affiliates in any way. + +NieR: Reincarnation, NieR, and all related names, characters, logos, and content are trademarks and intellectual property of Square Enix Co., Ltd. and/or Applibot, Inc. All rights reserved by their respective owners. + +## Purpose + +This project exists solely for **preservation and educational purposes**. NieR: Reincarnation's official servers were shut down on April 30, 2024, making the game otherwise unplayable. This project aims to allow fans to continue experiencing a game they love, with no intent to harm the interests of the original creators. + +## Non-Commercial + +This project is and will remain entirely **non-profit**. No fees are charged for access. No donations are solicited in connection with this project. No attempt is made to monetise the NieR: Reincarnation name, brand, or any associated intellectual property. + +## License Scope + +The [MIT License](./LICENSE) applying to this repository covers **only the original server implementation code** written by the contributors of this project. It does not and cannot grant any rights over NieR: Reincarnation's game assets, artwork, audio, story, characters, data, or any other intellectual property owned by Square Enix or Applibot. + +**No game assets are included in this repository.** This includes but is not limited to: APK files, images, audio files, video files, and game data files. Users are responsible for obtaining any necessary game files through legitimate means. + +## API Definitions and Data Models + +The protocol buffer service definitions and data model classes in this repository represent functional API structure — message shapes, field identifiers, and service method signatures — derived from observing network traffic between the game client and its servers, and from inspection of publicly exposed type signatures and namespaces. They were not copied or extracted from any proprietary source files. Functional interfaces of this nature are not protectable expression under applicable copyright law. + +## Interoperability + +Where any circumvention of technical protection measures was necessary to achieve interoperability with this independently created server software, such acts were undertaken solely for that purpose pursuant to 17 U.S.C. §1201(f) (interoperability exception) and equivalent provisions under applicable law. No such circumvention was undertaken for any other purpose. + +## No Warranty + +This software is provided as-is, with no warranty of any kind. See the [MIT License](./LICENSE) for full terms. + +## Takedown Requests + +If you are a representative of Square Enix Co., Ltd. or Applibot, Inc. and have concerns about this project, please open an issue or contact the repository maintainers directly. We will respond promptly and in good faith. diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..0ca4da3 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 BillyCool + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/MariesWonderland.slnx b/MariesWonderland.slnx new file mode 100644 index 0000000..e9bd3ba --- /dev/null +++ b/MariesWonderland.slnx @@ -0,0 +1,4 @@ + + + + diff --git a/README.md b/README.md new file mode 100644 index 0000000..1ded8a3 --- /dev/null +++ b/README.md @@ -0,0 +1,76 @@ +# Marie's Wonderland + +An open-source server implementation for mobile game NieR Reincarnation. + +## Requirements + +#### PC +- [.NET 10 SDK](https://dotnet.microsoft.com/download) +- [Visual Studio 2026](https://visualstudio.microsoft.com/downloads) or [Rider](https://www.jetbrains.com/rider/) +- [Android Platform Tools](https://developer.android.com/tools/releases/platform-tools) (`adb`) + +#### Phone +- An Android device or an [Android Studio](https://developer.android.com/studio) emulator (physical device not required) + +## Setup overview + +### 1. Run the server +Open `MariesWonderland.slnx` and run the project. + +The server listens on the standard HTTP and HTTPS ports on localhost: +- `http://localhost` (port 80) - used for HTTP asset serving +- `https://localhost` (port 443) - used for gRPC (HTTP/2) + +### 2. Expose the server +The game communicates over gRPC (HTTP/2). You do not need ngrok or an external tunnel if your emulator or device can reach your machine directly. + +- If running on an emulator: configure the emulator to reach the host (Android Studio emulators usually can reach the host). +- If running from a remote device or across a network: open ports 80 and 443 on your firewall/NAT and ensure those ports are forwarded to the machine running the server so the game can reach `http(s)://`. + +Ensure any network path supports HTTP/2 for gRPC traffic on port 443. + +## Configuration +Server settings live in `src/appsettings.development.json`: + +```json +{ + "Server": { + "Paths": { + "AssetDatabase": "", + "MasterDatabase": "", + "ResourcesBaseUrl": "http:///aaaaaaaaaaaaaaaaaaaaaaaa" + }, + "Data": { + "LatestMasterDataVersion": "1234567890", + "UserDataPath": "Data/UserData" + } + } +} +``` + +- The `ResourcesBaseUrl` value must be exactly 43 characters long. +- If you change the length of that segment, you may also need to update the server-side minimal API that serves the short path (the `/aaaaaaaa...` handler) so its expected length matches your new value. + +## Project structure +``` +src/ .NET 10 gRPC + HTTP server + proto/ protobuf service definitions + Services/ gRPC service implementations + Data/ in-memory data stores (master + user) + Models/ entity and type definitions + Extensions/ DI, HTTP, and gRPC helpers + Configuration/ strongly-typed options + Http/ HTTP API handlers (asset serving, etc.) + Interceptors/ gRPC interceptors (diff, logging, auth) + Helpers/ shared game logic helpers +tests/ xUnit test project + Infrastructure/ shared test base classes and fixtures + Interceptors/ interceptor unit tests +``` + +## Disclaimer +See [DISCLAIMER.md](DISCLAIMER.md). + +## Special Thanks + - [onepiecefreak3](https://github.com/onepiecefreak3) + - [Walter-Sparrow](https://github.com/Walter-Sparrow) diff --git a/src/Configuration/ServerOptions.cs b/src/Configuration/ServerOptions.cs new file mode 100644 index 0000000..afeb427 --- /dev/null +++ b/src/Configuration/ServerOptions.cs @@ -0,0 +1,34 @@ +namespace MariesWonderland.Configuration; + +public sealed class ServerOptions +{ + public const string SectionName = "Server"; + + public PathsOptions Paths { get; init; } = new(); + public DataOptions Data { get; init; } = new(); +} + +public sealed class PathsOptions +{ + public string AssetDatabase { get; init; } = string.Empty; + public string MasterDatabase { get; init; } = string.Empty; + + /// + /// Replacement URL written into list.bin in-place when serving asset lists. + /// Must be exactly 43 ASCII bytes to preserve protobuf field lengths. + /// Leave empty to serve list.bin unmodified. + /// + public string ResourcesBaseUrl { get; init; } = string.Empty; +} + +public sealed class DataOptions +{ + public string LatestMasterDataVersion { get; init; } = string.Empty; + public string UserDataPath { get; init; } = string.Empty; + + /// + /// Path to the JSON file used to persist user data between server restarts. + /// If relative, resolved against the application base directory. + /// + public string UserDatabase { get; init; } = "userdata.json"; +} diff --git a/src/Constants.cs b/src/Constants.cs new file mode 100644 index 0000000..faae953 --- /dev/null +++ b/src/Constants.cs @@ -0,0 +1,18 @@ +namespace MariesWonderland; + +public static class Constants +{ + public const long MinPlayerId = 1_000_000_000_000L; // 1e12, 1 trillion + + public const long MaxPlayerId = 2_000_000_000_000L; // 2e12, 2 trillion + + public const long MinUserId = 1_000_000_000_000_000_000L; // 1e18, 1 quintillion + + public const long MaxUserId = 2_000_000_000_000_000_000L; // 2e18, 2 quintillion + + public static readonly List StartingWeaponIds = [100001, 100011, 100021]; // Deathpierce Sword, Deathshot Pistol, Deathstrike Staff, + + public const int StartingDeckCostumeId = 10100; // Rion + + public const int StartingDeckWeaponId = 101001; // Everlasting Cardia +} diff --git a/src/Data/BinaryMasterDataLoader.cs b/src/Data/BinaryMasterDataLoader.cs new file mode 100644 index 0000000..3c5384c --- /dev/null +++ b/src/Data/BinaryMasterDataLoader.cs @@ -0,0 +1,686 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Entities; +using MessagePack; +using MessagePack.Formatters; +using System.Reflection; +using System.Security.Cryptography; +using System.Text; + +namespace MariesWonderland.Data; + +/// +/// Loads all master data tables from the encrypted binary .bin.e database file. +/// The binary format is AES-128-CBC encrypted MessagePack with LZ4Block per-table compression. +/// +public static class BinaryMasterDataLoader +{ + private static readonly byte[] AesKey = Encoding.UTF8.GetBytes("6Cb01321EE5e6bBe"); + private static readonly byte[] AesIv = Encoding.UTF8.GetBytes("EfcAef4CAe5f6DaA"); + + /// + /// Reads and decrypts the .bin.e file at , deserializes + /// all 607 master data tables, and returns a populated . + /// + public static DarkMasterMemoryDatabase Load(string binFilePath) + { + var encrypted = File.ReadAllBytes(binFilePath); + var decrypted = Decrypt(encrypted); + return Parse(decrypted); + } + + /// Decrypts the raw .bin.e file bytes using AES-128-CBC. + private static byte[] Decrypt(byte[] data) + { + using var aes = Aes.Create(); + aes.Mode = CipherMode.CBC; + aes.Key = AesKey; + aes.IV = AesIv; + return aes.CreateDecryptor().TransformFinalBlock(data, 0, data.Length); + } + + /// + /// Parses the decrypted MessagePack binary: reads the table-offset header, then + /// deserializes each EntityM* table from its slice. + /// + private static DarkMasterMemoryDatabase Parse(byte[] data) + { + // Parse the header: Dictionary mapping table names to data positions + var reader = new MessagePackReader(data); + var formatter = new DictionaryFormatter(); + var header = formatter.Deserialize(ref reader, HeaderFormatterResolver.StandardOptions)!; + + // Data section starts immediately after the header + var db = data.AsMemory((int)reader.Consumed); + var options = MessagePackSerializer.DefaultOptions + .WithResolver(new InternStringResolver(MessagePackSerializer.DefaultOptions.Resolver)) + .WithCompression(MessagePackCompression.Lz4Block); + + return new DarkMasterMemoryDatabase + { + EntityMAbilityBehaviourActionBless = Extract(header, db, options), + EntityMAbilityBehaviourActionPassiveSkill = Extract(header, db, options), + EntityMAbilityBehaviourActionStatusDown = Extract(header, db, options), + EntityMAbilityBehaviourActionStatus = Extract(header, db, options), + EntityMAbilityBehaviourGroup = Extract(header, db, options), + EntityMAbilityBehaviour = Extract(header, db, options), + EntityMAbilityDetail = Extract(header, db, options), + EntityMAbilityLevelGroup = Extract(header, db, options), + EntityMAbilityStatus = Extract(header, db, options), + EntityMAbility = Extract(header, db, options), + EntityMActorAnimationCategory = Extract(header, db, options), + EntityMActorAnimationController = Extract(header, db, options), + EntityMActorAnimation = Extract(header, db, options), + EntityMActorObject = Extract(header, db, options), + EntityMActor = Extract(header, db, options), + EntityMAppealDialog = Extract(header, db, options), + EntityMAssetBackground = Extract(header, db, options), + EntityMAssetCalculator = Extract(header, db, options), + EntityMAssetDataSetting = Extract(header, db, options), + EntityMAssetEffect = Extract(header, db, options), + EntityMAssetGradeIcon = Extract(header, db, options), + EntityMAssetTimeline = Extract(header, db, options), + EntityMAssetTurnbattlePrefab = Extract(header, db, options), + EntityMBattleActorAi = Extract(header, db, options), + EntityMBattleActorSkillAiGroup = Extract(header, db, options), + EntityMBattleAdditionalAbility = Extract(header, db, options), + EntityMBattleAttributeDamageCoefficientDefine = Extract(header, db, options), + EntityMBattleAttributeDamageCoefficientGroup = Extract(header, db, options), + EntityMBattleBgmSetGroup = Extract(header, db, options), + EntityMBattleBgmSet = Extract(header, db, options), + EntityMBattleBigHuntDamageThresholdGroup = Extract(header, db, options), + EntityMBattleBigHuntKnockDownGaugeValueConfigGroup = Extract(header, db, options), + EntityMBattleBigHuntPhaseGroup = Extract(header, db, options), + EntityMBattleBigHunt = Extract(header, db, options), + EntityMBattleCompanionSkillAiGroup = Extract(header, db, options), + EntityMBattleCostumeSkillFireAct = Extract(header, db, options), + EntityMBattleCostumeSkillSe = Extract(header, db, options), + EntityMBattleDropReward = Extract(header, db, options), + EntityMBattleEnemySizeTypeConfig = Extract(header, db, options), + EntityMBattleEventGroup = Extract(header, db, options), + EntityMBattleEventReceiverBehaviourGroup = Extract(header, db, options), + EntityMBattleEventReceiverBehaviourHudActSequence = Extract(header, db, options), + EntityMBattleEventReceiverBehaviourRadioMessage = Extract(header, db, options), + EntityMBattleEvent = Extract(header, db, options), + EntityMBattleEventTriggerBehaviourBattleStart = Extract(header, db, options), + EntityMBattleEventTriggerBehaviourGroup = Extract(header, db, options), + EntityMBattleEventTriggerBehaviourWaveStart = Extract(header, db, options), + EntityMBattleGeneralViewConfiguration = Extract(header, db, options), + EntityMBattleGroup = Extract(header, db, options), + EntityMBattleNpcCharacterBoardAbility = Extract(header, db, options), + EntityMBattleNpcCharacterBoardCompleteReward = Extract(header, db, options), + EntityMBattleNpcCharacterBoardStatusUp = Extract(header, db, options), + EntityMBattleNpcCharacterBoard = Extract(header, db, options), + EntityMBattleNpcCharacterCostumeLevelBonus = Extract(header, db, options), + EntityMBattleNpcCharacterRebirth = Extract(header, db, options), + EntityMBattleNpcCharacter = Extract(header, db, options), + EntityMBattleNpcCharacterViewerField = Extract(header, db, options), + EntityMBattleNpcCompanion = Extract(header, db, options), + EntityMBattleNpcCostumeActiveSkill = Extract(header, db, options), + EntityMBattleNpcCostumeAwakenStatusUp = Extract(header, db, options), + EntityMBattleNpcCostumeLevelBonusReevaluate = Extract(header, db, options), + EntityMBattleNpcCostumeLevelBonusReleaseStatus = Extract(header, db, options), + EntityMBattleNpcCostumeLotteryEffectAbility = Extract(header, db, options), + EntityMBattleNpcCostumeLotteryEffectPending = Extract(header, db, options), + EntityMBattleNpcCostumeLotteryEffectStatusUp = Extract(header, db, options), + EntityMBattleNpcCostumeLotteryEffect = Extract(header, db, options), + EntityMBattleNpcCostume = Extract(header, db, options), + EntityMBattleNpcDeckBackup = Extract(header, db, options), + EntityMBattleNpcDeckCharacterDressupCostume = Extract(header, db, options), + EntityMBattleNpcDeckCharacterDropCategory = Extract(header, db, options), + EntityMBattleNpcDeckCharacter = Extract(header, db, options), + EntityMBattleNpcDeckCharacterType = Extract(header, db, options), + EntityMBattleNpcDeckLimitContentBackupRestored = Extract(header, db, options), + EntityMBattleNpcDeckLimitContentBackup = Extract(header, db, options), + EntityMBattleNpcDeckLimitContentDeletedCharacter = Extract(header, db, options), + EntityMBattleNpcDeckLimitContentRestricted = Extract(header, db, options), + EntityMBattleNpcDeckPartsGroup = Extract(header, db, options), + EntityMBattleNpcDeckSubWeaponGroup = Extract(header, db, options), + EntityMBattleNpcDeck = Extract(header, db, options), + EntityMBattleNpcDeckTypeNote = Extract(header, db, options), + EntityMBattleNpcPartsGroupNote = Extract(header, db, options), + EntityMBattleNpcPartsPreset = Extract(header, db, options), + EntityMBattleNpcPartsPresetTag = Extract(header, db, options), + EntityMBattleNpcPartsStatusSub = Extract(header, db, options), + EntityMBattleNpcParts = Extract(header, db, options), + EntityMBattleNpcSpecialEndAct = Extract(header, db, options), + EntityMBattleNpc = Extract(header, db, options), + EntityMBattleNpcWeaponAbilityReevaluate = Extract(header, db, options), + EntityMBattleNpcWeaponAbility = Extract(header, db, options), + EntityMBattleNpcWeaponAwaken = Extract(header, db, options), + EntityMBattleNpcWeaponNoteReevaluate = Extract(header, db, options), + EntityMBattleNpcWeaponNote = Extract(header, db, options), + EntityMBattleNpcWeaponSkill = Extract(header, db, options), + EntityMBattleNpcWeaponStoryReevaluate = Extract(header, db, options), + EntityMBattleNpcWeaponStory = Extract(header, db, options), + EntityMBattleNpcWeapon = Extract(header, db, options), + EntityMBattleProgressUiType = Extract(header, db, options), + EntityMBattleQuestSceneBgmSetGroup = Extract(header, db, options), + EntityMBattleQuestSceneBgm = Extract(header, db, options), + EntityMBattleRentalDeck = Extract(header, db, options), + EntityMBattleSkillBehaviourHitDamageConfiguration = Extract(header, db, options), + EntityMBattleSkillFireActConditionAttributeType = Extract(header, db, options), + EntityMBattleSkillFireActConditionGroup = Extract(header, db, options), + EntityMBattleSkillFireActConditionSkillCategoryType = Extract(header, db, options), + EntityMBattleSkillFireActConditionWeaponType = Extract(header, db, options), + EntityMBattleSkillFireAct = Extract(header, db, options), + EntityMBattle = Extract(header, db, options), + EntityMBeginnerCampaign = Extract(header, db, options), + EntityMBigHuntBossGradeGroupAttribute = Extract(header, db, options), + EntityMBigHuntBossGradeGroup = Extract(header, db, options), + EntityMBigHuntBossQuestGroupChallengeCategory = Extract(header, db, options), + EntityMBigHuntBossQuestGroup = Extract(header, db, options), + EntityMBigHuntBossQuest = Extract(header, db, options), + EntityMBigHuntBoss = Extract(header, db, options), + EntityMBigHuntLink = Extract(header, db, options), + EntityMBigHuntQuestGroup = Extract(header, db, options), + EntityMBigHuntQuestScoreCoefficient = Extract(header, db, options), + EntityMBigHuntQuest = Extract(header, db, options), + EntityMBigHuntRewardGroup = Extract(header, db, options), + EntityMBigHuntSchedule = Extract(header, db, options), + EntityMBigHuntScoreRewardGroupSchedule = Extract(header, db, options), + EntityMBigHuntScoreRewardGroup = Extract(header, db, options), + EntityMBigHuntWeeklyAttributeScoreRewardGroupSchedule = Extract(header, db, options), + EntityMCageMemory = Extract(header, db, options), + EntityMCageOrnamentMainQuestChapterStill = Extract(header, db, options), + EntityMCageOrnamentReward = Extract(header, db, options), + EntityMCageOrnamentStillReleaseCondition = Extract(header, db, options), + EntityMCageOrnament = Extract(header, db, options), + EntityMCatalogCompanion = Extract(header, db, options), + EntityMCatalogCostume = Extract(header, db, options), + EntityMCatalogPartsGroup = Extract(header, db, options), + EntityMCatalogTerm = Extract(header, db, options), + EntityMCatalogThought = Extract(header, db, options), + EntityMCatalogWeapon = Extract(header, db, options), + EntityMCharacterBoardAbilityMaxLevel = Extract(header, db, options), + EntityMCharacterBoardAbility = Extract(header, db, options), + EntityMCharacterBoardAssignment = Extract(header, db, options), + EntityMCharacterBoardCategory = Extract(header, db, options), + EntityMCharacterBoardCompleteRewardGroup = Extract(header, db, options), + EntityMCharacterBoardCompleteReward = Extract(header, db, options), + EntityMCharacterBoardConditionDetail = Extract(header, db, options), + EntityMCharacterBoardConditionGroup = Extract(header, db, options), + EntityMCharacterBoardConditionIgnore = Extract(header, db, options), + EntityMCharacterBoardCondition = Extract(header, db, options), + EntityMCharacterBoardEffectTargetGroup = Extract(header, db, options), + EntityMCharacterBoardGroup = Extract(header, db, options), + EntityMCharacterBoardPanelReleaseEffectGroup = Extract(header, db, options), + EntityMCharacterBoardPanelReleasePossessionGroup = Extract(header, db, options), + EntityMCharacterBoardPanelReleaseRewardGroup = Extract(header, db, options), + EntityMCharacterBoardPanel = Extract(header, db, options), + EntityMCharacterBoardStatusUp = Extract(header, db, options), + EntityMCharacterBoard = Extract(header, db, options), + EntityMCharacterDisplaySwitch = Extract(header, db, options), + EntityMCharacterLevelBonusAbilityGroup = Extract(header, db, options), + EntityMCharacterRebirthMaterialGroup = Extract(header, db, options), + EntityMCharacterRebirthStepGroup = Extract(header, db, options), + EntityMCharacterRebirth = Extract(header, db, options), + EntityMCharacter = Extract(header, db, options), + EntityMCharacterViewerActorIcon = Extract(header, db, options), + EntityMCharacterViewerFieldSettings = Extract(header, db, options), + EntityMCharacterViewerField = Extract(header, db, options), + EntityMCharacterVoiceUnlockCondition = Extract(header, db, options), + EntityMCollectionBonusEffect = Extract(header, db, options), + EntityMCollectionBonusQuestAssignmentGroup = Extract(header, db, options), + EntityMCollectionBonusQuestAssignment = Extract(header, db, options), + EntityMComboCalculationSetting = Extract(header, db, options), + EntityMComebackCampaign = Extract(header, db, options), + EntityMCompanionAbilityGroup = Extract(header, db, options), + EntityMCompanionAbilityLevel = Extract(header, db, options), + EntityMCompanionBaseStatus = Extract(header, db, options), + EntityMCompanionCategory = Extract(header, db, options), + EntityMCompanionDuplicationExchangePossessionGroup = Extract(header, db, options), + EntityMCompanionEnhanced = Extract(header, db, options), + EntityMCompanionEnhancementMaterial = Extract(header, db, options), + EntityMCompanionSkillLevel = Extract(header, db, options), + EntityMCompanionStatusCalculation = Extract(header, db, options), + EntityMCompanion = Extract(header, db, options), + EntityMCompleteMissionGroup = Extract(header, db, options), + EntityMConfig = Extract(header, db, options), + EntityMConsumableItemEffect = Extract(header, db, options), + EntityMConsumableItem = Extract(header, db, options), + EntityMConsumableItemTerm = Extract(header, db, options), + EntityMContentsStory = Extract(header, db, options), + EntityMCostumeAbilityGroup = Extract(header, db, options), + EntityMCostumeAbilityLevelGroup = Extract(header, db, options), + EntityMCostumeActiveSkillEnhancementMaterial = Extract(header, db, options), + EntityMCostumeActiveSkillGroup = Extract(header, db, options), + EntityMCostumeAnimationStep = Extract(header, db, options), + EntityMCostumeAutoOrganizationCondition = Extract(header, db, options), + EntityMCostumeAwakenAbility = Extract(header, db, options), + EntityMCostumeAwakenEffectGroup = Extract(header, db, options), + EntityMCostumeAwakenItemAcquire = Extract(header, db, options), + EntityMCostumeAwakenMaterialGroup = Extract(header, db, options), + EntityMCostumeAwakenPriceGroup = Extract(header, db, options), + EntityMCostumeAwakenStatusUpGroup = Extract(header, db, options), + EntityMCostumeAwakenStepMaterialGroup = Extract(header, db, options), + EntityMCostumeAwaken = Extract(header, db, options), + EntityMCostumeBaseStatus = Extract(header, db, options), + EntityMCostumeCollectionBonusGroup = Extract(header, db, options), + EntityMCostumeCollectionBonus = Extract(header, db, options), + EntityMCostumeDefaultSkillGroup = Extract(header, db, options), + EntityMCostumeDefaultSkillLotteryGroup = Extract(header, db, options), + EntityMCostumeDelete = Extract(header, db, options), + EntityMCostumeDisplayCoordinateAdjustment = Extract(header, db, options), + EntityMCostumeDisplaySwitch = Extract(header, db, options), + EntityMCostumeDuplicationExchangePossessionGroup = Extract(header, db, options), + EntityMCostumeEmblem = Extract(header, db, options), + EntityMCostumeEnhanced = Extract(header, db, options), + EntityMCostumeLevelBonus = Extract(header, db, options), + EntityMCostumeLimitBreakMaterialGroup = Extract(header, db, options), + EntityMCostumeLimitBreakMaterialRarityGroup = Extract(header, db, options), + EntityMCostumeLotteryEffectMaterialGroup = Extract(header, db, options), + EntityMCostumeLotteryEffectOddsGroup = Extract(header, db, options), + EntityMCostumeLotteryEffectReleaseSchedule = Extract(header, db, options), + EntityMCostumeLotteryEffect = Extract(header, db, options), + EntityMCostumeLotteryEffectTargetAbility = Extract(header, db, options), + EntityMCostumeLotteryEffectTargetStatusUp = Extract(header, db, options), + EntityMCostumeOverflowExchangePossessionGroup = Extract(header, db, options), + EntityMCostumeProperAttributeHpBonus = Extract(header, db, options), + EntityMCostumeRarity = Extract(header, db, options), + EntityMCostumeSpecialActActiveSkillConditionAttribute = Extract(header, db, options), + EntityMCostumeSpecialActActiveSkill = Extract(header, db, options), + EntityMCostumeStatusCalculation = Extract(header, db, options), + EntityMCostume = Extract(header, db, options), + EntityMDeckEntrustCoefficientAttribute = Extract(header, db, options), + EntityMDeckEntrustCoefficientPartsSeriesBonusCount = Extract(header, db, options), + EntityMDeckEntrustCoefficientStatus = Extract(header, db, options), + EntityMDokanContentGroup = Extract(header, db, options), + EntityMDokan = Extract(header, db, options), + EntityMDokanText = Extract(header, db, options), + EntityMEnhanceCampaign = Extract(header, db, options), + EntityMEnhanceCampaignTargetGroup = Extract(header, db, options), + EntityMEvaluateCondition = Extract(header, db, options), + EntityMEvaluateConditionValueGroup = Extract(header, db, options), + EntityMEventQuestChapterCharacter = Extract(header, db, options), + EntityMEventQuestChapterDifficultyLimitContentUnlock = Extract(header, db, options), + EntityMEventQuestChapterLimitContentRelation = Extract(header, db, options), + EntityMEventQuestChapter = Extract(header, db, options), + EntityMEventQuestDailyGroupCompleteReward = Extract(header, db, options), + EntityMEventQuestDailyGroupMessage = Extract(header, db, options), + EntityMEventQuestDailyGroup = Extract(header, db, options), + EntityMEventQuestDailyGroupTargetChapter = Extract(header, db, options), + EntityMEventQuestDisplayItemGroup = Extract(header, db, options), + EntityMEventQuestGuerrillaFreeOpenScheduleCorrespondence = Extract(header, db, options), + EntityMEventQuestGuerrillaFreeOpen = Extract(header, db, options), + EntityMEventQuestLabyrinthMob = Extract(header, db, options), + EntityMEventQuestLabyrinthQuestDisplay = Extract(header, db, options), + EntityMEventQuestLabyrinthQuestEffectDescriptionAbility = Extract(header, db, options), + EntityMEventQuestLabyrinthQuestEffectDescriptionFree = Extract(header, db, options), + EntityMEventQuestLabyrinthQuestEffectDisplay = Extract(header, db, options), + EntityMEventQuestLabyrinthRewardGroup = Extract(header, db, options), + EntityMEventQuestLabyrinthSeasonRewardGroup = Extract(header, db, options), + EntityMEventQuestLabyrinthSeason = Extract(header, db, options), + EntityMEventQuestLabyrinthStageAccumulationRewardGroup = Extract(header, db, options), + EntityMEventQuestLabyrinthStage = Extract(header, db, options), + EntityMEventQuestLimitContentDeckRestriction = Extract(header, db, options), + EntityMEventQuestLimitContentDeckRestrictionTarget = Extract(header, db, options), + EntityMEventQuestLimitContent = Extract(header, db, options), + EntityMEventQuestLink = Extract(header, db, options), + EntityMEventQuestSequenceGroup = Extract(header, db, options), + EntityMEventQuestSequence = Extract(header, db, options), + EntityMEventQuestTowerAccumulationRewardGroup = Extract(header, db, options), + EntityMEventQuestTowerAccumulationReward = Extract(header, db, options), + EntityMEventQuestTowerAsset = Extract(header, db, options), + EntityMEventQuestTowerRewardGroup = Extract(header, db, options), + EntityMEventQuestUnlockCondition = Extract(header, db, options), + EntityMExploreGradeAsset = Extract(header, db, options), + EntityMExploreGradeScore = Extract(header, db, options), + EntityMExploreGroup = Extract(header, db, options), + EntityMExplore = Extract(header, db, options), + EntityMExploreUnlockCondition = Extract(header, db, options), + EntityMExtraQuestGroupInMainQuestChapter = Extract(header, db, options), + EntityMExtraQuestGroup = Extract(header, db, options), + EntityMFieldEffectBlessRelation = Extract(header, db, options), + EntityMFieldEffectDecreasePoint = Extract(header, db, options), + EntityMFieldEffectGroup = Extract(header, db, options), + EntityMGachaMedal = Extract(header, db, options), + EntityMGiftText = Extract(header, db, options), + EntityMGimmickAdditionalAsset = Extract(header, db, options), + EntityMGimmickExtraQuest = Extract(header, db, options), + EntityMGimmickGroupEventLog = Extract(header, db, options), + EntityMGimmickGroup = Extract(header, db, options), + EntityMGimmickInterval = Extract(header, db, options), + EntityMGimmickOrnament = Extract(header, db, options), + EntityMGimmickSequenceGroup = Extract(header, db, options), + EntityMGimmickSequenceRewardGroup = Extract(header, db, options), + EntityMGimmickSequenceSchedule = Extract(header, db, options), + EntityMGimmickSequence = Extract(header, db, options), + EntityMGimmick = Extract(header, db, options), + EntityMHeadupDisplayView = Extract(header, db, options), + EntityMHelpCategory = Extract(header, db, options), + EntityMHelpItem = Extract(header, db, options), + EntityMHelpPageGroup = Extract(header, db, options), + EntityMHelp = Extract(header, db, options), + EntityMImportantItemEffectDropCount = Extract(header, db, options), + EntityMImportantItemEffectDropRate = Extract(header, db, options), + EntityMImportantItemEffect = Extract(header, db, options), + EntityMImportantItemEffectTargetItemGroup = Extract(header, db, options), + EntityMImportantItemEffectTargetQuestGroup = Extract(header, db, options), + EntityMImportantItemEffectUnlockFunction = Extract(header, db, options), + EntityMImportantItem = Extract(header, db, options), + EntityMLibraryEventQuestStoryGrouping = Extract(header, db, options), + EntityMLibraryMainQuestGroup = Extract(header, db, options), + EntityMLibraryMainQuestStory = Extract(header, db, options), + EntityMLibraryMovieCategory = Extract(header, db, options), + EntityMLibraryMovie = Extract(header, db, options), + EntityMLibraryMovieUnlockCondition = Extract(header, db, options), + EntityMLibraryRecordGrouping = Extract(header, db, options), + EntityMLibraryStoryGroup = Extract(header, db, options), + EntityMLimitedOpenTextGroup = Extract(header, db, options), + EntityMLimitedOpenText = Extract(header, db, options), + EntityMListSettingAbilityGroup = Extract(header, db, options), + EntityMListSettingAbilityGroupTarget = Extract(header, db, options), + EntityMLoginBonusStamp = Extract(header, db, options), + EntityMLoginBonus = Extract(header, db, options), + EntityMMainQuestChapter = Extract(header, db, options), + EntityMMainQuestPortalCageCharacter = Extract(header, db, options), + EntityMMainQuestRouteAnotherReplayFlowUnlockCondition = Extract(header, db, options), + EntityMMainQuestRoute = Extract(header, db, options), + EntityMMainQuestSeason = Extract(header, db, options), + EntityMMainQuestSequenceGroup = Extract(header, db, options), + EntityMMainQuestSequence = Extract(header, db, options), + EntityMMaintenanceGroup = Extract(header, db, options), + EntityMMaintenance = Extract(header, db, options), + EntityMMaterialSaleObtainPossession = Extract(header, db, options), + EntityMMaterial = Extract(header, db, options), + EntityMMissionClearConditionValueView = Extract(header, db, options), + EntityMMissionGroup = Extract(header, db, options), + EntityMMissionLink = Extract(header, db, options), + EntityMMissionPassLevelGroup = Extract(header, db, options), + EntityMMissionPassMissionGroup = Extract(header, db, options), + EntityMMissionPassRewardGroup = Extract(header, db, options), + EntityMMissionPass = Extract(header, db, options), + EntityMMissionReward = Extract(header, db, options), + EntityMMissionSubCategoryText = Extract(header, db, options), + EntityMMission = Extract(header, db, options), + EntityMMissionTerm = Extract(header, db, options), + EntityMMissionUnlockCondition = Extract(header, db, options), + EntityMMomBanner = Extract(header, db, options), + EntityMMomPointBanner = Extract(header, db, options), + EntityMMovie = Extract(header, db, options), + EntityMNaviCutInContentGroup = Extract(header, db, options), + EntityMNaviCutIn = Extract(header, db, options), + EntityMNaviCutInText = Extract(header, db, options), + EntityMNumericalFunctionParameterGroup = Extract(header, db, options), + EntityMNumericalFunction = Extract(header, db, options), + EntityMNumericalParameterMap = Extract(header, db, options), + EntityMOmikuji = Extract(header, db, options), + EntityMOverrideHitEffectConditionCritical = Extract(header, db, options), + EntityMOverrideHitEffectConditionDamageAttribute = Extract(header, db, options), + EntityMOverrideHitEffectConditionGroup = Extract(header, db, options), + EntityMOverrideHitEffectConditionSkillExecutor = Extract(header, db, options), + EntityMPartsEnhancedSubStatus = Extract(header, db, options), + EntityMPartsEnhanced = Extract(header, db, options), + EntityMPartsGroup = Extract(header, db, options), + EntityMPartsLevelUpPriceGroup = Extract(header, db, options), + EntityMPartsLevelUpRateGroup = Extract(header, db, options), + EntityMPartsRarity = Extract(header, db, options), + EntityMPartsSeriesBonusAbilityGroup = Extract(header, db, options), + EntityMPartsSeries = Extract(header, db, options), + EntityMPartsStatusMain = Extract(header, db, options), + EntityMParts = Extract(header, db, options), + EntityMPlatformPaymentPrice = Extract(header, db, options), + EntityMPlatformPayment = Extract(header, db, options), + EntityMPortalCageAccessPointFunctionGroupSchedule = Extract(header, db, options), + EntityMPortalCageAccessPointFunctionGroup = Extract(header, db, options), + EntityMPortalCageCharacterGroup = Extract(header, db, options), + EntityMPortalCageGate = Extract(header, db, options), + EntityMPortalCageScene = Extract(header, db, options), + EntityMPossessionAcquisitionRoute = Extract(header, db, options), + EntityMPowerCalculationConstantValue = Extract(header, db, options), + EntityMPowerReferenceStatusGroup = Extract(header, db, options), + EntityMPremiumItem = Extract(header, db, options), + EntityMPvpBackground = Extract(header, db, options), + EntityMPvpGradeGroup = Extract(header, db, options), + EntityMPvpGradeOneMatchRewardGroup = Extract(header, db, options), + EntityMPvpGradeOneMatchReward = Extract(header, db, options), + EntityMPvpGrade = Extract(header, db, options), + EntityMPvpGradeWeeklyRewardGroup = Extract(header, db, options), + EntityMPvpReward = Extract(header, db, options), + EntityMPvpSeasonGrade = Extract(header, db, options), + EntityMPvpSeasonGrouping = Extract(header, db, options), + EntityMPvpSeasonRankRewardGroup = Extract(header, db, options), + EntityMPvpSeasonRankRewardPerSeason = Extract(header, db, options), + EntityMPvpSeasonRankRewardRankGroup = Extract(header, db, options), + EntityMPvpSeasonRankReward = Extract(header, db, options), + EntityMPvpSeason = Extract(header, db, options), + EntityMPvpWeeklyRankRewardGroup = Extract(header, db, options), + EntityMPvpWeeklyRankRewardRankGroup = Extract(header, db, options), + EntityMPvpWinStreakCountEffect = Extract(header, db, options), + EntityMQuestBonusAbility = Extract(header, db, options), + EntityMQuestBonusAllyCharacter = Extract(header, db, options), + EntityMQuestBonusCharacterGroup = Extract(header, db, options), + EntityMQuestBonusCostumeGroup = Extract(header, db, options), + EntityMQuestBonusCostumeSettingGroup = Extract(header, db, options), + EntityMQuestBonusDropReward = Extract(header, db, options), + EntityMQuestBonusEffectGroup = Extract(header, db, options), + EntityMQuestBonusExp = Extract(header, db, options), + EntityMQuestBonus = Extract(header, db, options), + EntityMQuestBonusTermGroup = Extract(header, db, options), + EntityMQuestBonusWeaponGroup = Extract(header, db, options), + EntityMQuestCampaignEffectGroup = Extract(header, db, options), + EntityMQuestCampaign = Extract(header, db, options), + EntityMQuestCampaignTargetGroup = Extract(header, db, options), + EntityMQuestCampaignTargetItemGroup = Extract(header, db, options), + EntityMQuestDeckMultiRestrictionGroup = Extract(header, db, options), + EntityMQuestDeckRestrictionGroup = Extract(header, db, options), + EntityMQuestDeckRestrictionGroupUnlock = Extract(header, db, options), + EntityMQuestDisplayAttributeGroup = Extract(header, db, options), + EntityMQuestDisplayEnemyThumbnailReplace = Extract(header, db, options), + EntityMQuestFirstClearRewardGroup = Extract(header, db, options), + EntityMQuestFirstClearRewardSwitch = Extract(header, db, options), + EntityMQuestMissionConditionValueGroup = Extract(header, db, options), + EntityMQuestMissionGroup = Extract(header, db, options), + EntityMQuestMissionReward = Extract(header, db, options), + EntityMQuestMission = Extract(header, db, options), + EntityMQuestPickupRewardGroup = Extract(header, db, options), + EntityMQuestRelationMainFlow = Extract(header, db, options), + EntityMQuestReleaseConditionBigHuntScore = Extract(header, db, options), + EntityMQuestReleaseConditionCharacterLevel = Extract(header, db, options), + EntityMQuestReleaseConditionDeckPower = Extract(header, db, options), + EntityMQuestReleaseConditionGroup = Extract(header, db, options), + EntityMQuestReleaseConditionList = Extract(header, db, options), + EntityMQuestReleaseConditionQuestChallenge = Extract(header, db, options), + EntityMQuestReleaseConditionQuestClear = Extract(header, db, options), + EntityMQuestReleaseConditionUserLevel = Extract(header, db, options), + EntityMQuestReleaseConditionWeaponAcquisition = Extract(header, db, options), + EntityMQuestReplayFlowRewardGroup = Extract(header, db, options), + EntityMQuestSceneBattle = Extract(header, db, options), + EntityMQuestSceneChoiceCostumeEffectGroup = Extract(header, db, options), + EntityMQuestSceneChoiceEffect = Extract(header, db, options), + EntityMQuestSceneChoice = Extract(header, db, options), + EntityMQuestSceneChoiceWeaponEffectGroup = Extract(header, db, options), + EntityMQuestSceneNotConfirmTitleDialog = Extract(header, db, options), + EntityMQuestSceneOutgameBlendshapeMotion = Extract(header, db, options), + EntityMQuestScenePictureBookReplace = Extract(header, db, options), + EntityMQuestScene = Extract(header, db, options), + EntityMQuestScheduleCorrespondence = Extract(header, db, options), + EntityMQuestSchedule = Extract(header, db, options), + EntityMQuest = Extract(header, db, options), + EntityMReport = Extract(header, db, options), + EntityMShopDisplayPrice = Extract(header, db, options), + EntityMShopItemAdditionalContent = Extract(header, db, options), + EntityMShopItemCellGroup = Extract(header, db, options), + EntityMShopItemCellLimitedOpen = Extract(header, db, options), + EntityMShopItemCell = Extract(header, db, options), + EntityMShopItemCellTerm = Extract(header, db, options), + EntityMShopItemContentEffect = Extract(header, db, options), + EntityMShopItemContentMission = Extract(header, db, options), + EntityMShopItemContentPossession = Extract(header, db, options), + EntityMShopItemLimitedStock = Extract(header, db, options), + EntityMShopItem = Extract(header, db, options), + EntityMShopItemUserLevelCondition = Extract(header, db, options), + EntityMShopReplaceableGem = Extract(header, db, options), + EntityMShop = Extract(header, db, options), + EntityMSideStoryQuestLimitContent = Extract(header, db, options), + EntityMSideStoryQuestScene = Extract(header, db, options), + EntityMSideStoryQuest = Extract(header, db, options), + EntityMSkillAbnormalBehaviourActionAbnormalResistance = Extract(header, db, options), + EntityMSkillAbnormalBehaviourActionAttributeDamageCorrection = Extract(header, db, options), + EntityMSkillAbnormalBehaviourActionBuffResistance = Extract(header, db, options), + EntityMSkillAbnormalBehaviourActionDamageMultiplyDetailAlways = Extract(header, db, options), + EntityMSkillAbnormalBehaviourActionDamageMultiply = Extract(header, db, options), + EntityMSkillAbnormalBehaviourActionDamage = Extract(header, db, options), + EntityMSkillAbnormalBehaviourActionDefaultSkillLottery = Extract(header, db, options), + EntityMSkillAbnormalBehaviourActionHitRatioDown = Extract(header, db, options), + EntityMSkillAbnormalBehaviourActionModifyHateValue = Extract(header, db, options), + EntityMSkillAbnormalBehaviourActionOverrideEvasionValue = Extract(header, db, options), + EntityMSkillAbnormalBehaviourActionOverrideHitEffect = Extract(header, db, options), + EntityMSkillAbnormalBehaviourActionRecovery = Extract(header, db, options), + EntityMSkillAbnormalBehaviourActionTurnRestriction = Extract(header, db, options), + EntityMSkillAbnormalBehaviourGroup = Extract(header, db, options), + EntityMSkillAbnormalBehaviour = Extract(header, db, options), + EntityMSkillAbnormalDamageMultiplyDetailAbnormal = Extract(header, db, options), + EntityMSkillAbnormalDamageMultiplyDetailBuffAttached = Extract(header, db, options), + EntityMSkillAbnormalDamageMultiplyDetailCritical = Extract(header, db, options), + EntityMSkillAbnormalDamageMultiplyDetailHitIndex = Extract(header, db, options), + EntityMSkillAbnormalDamageMultiplyDetailSkillfulWeapon = Extract(header, db, options), + EntityMSkillAbnormalLifetimeBehaviourActivateCount = Extract(header, db, options), + EntityMSkillAbnormalLifetimeBehaviourFrameCount = Extract(header, db, options), + EntityMSkillAbnormalLifetimeBehaviourGroup = Extract(header, db, options), + EntityMSkillAbnormalLifetimeBehaviourReceiveDamageCount = Extract(header, db, options), + EntityMSkillAbnormalLifetimeBehaviourTurnCount = Extract(header, db, options), + EntityMSkillAbnormalLifetime = Extract(header, db, options), + EntityMSkillAbnormal = Extract(header, db, options), + EntityMSkillBehaviourActionAbnormal = Extract(header, db, options), + EntityMSkillBehaviourActionActiveSkillDamageCorrection = Extract(header, db, options), + EntityMSkillBehaviourActionAdvanceActiveSkillCooltimeImmediate = Extract(header, db, options), + EntityMSkillBehaviourActionAdvanceActiveSkillCooltime = Extract(header, db, options), + EntityMSkillBehaviourActionAttackClampHp = Extract(header, db, options), + EntityMSkillBehaviourActionAttackCombo = Extract(header, db, options), + EntityMSkillBehaviourActionAttackFixedDamage = Extract(header, db, options), + EntityMSkillBehaviourActionAttackHpRatio = Extract(header, db, options), + EntityMSkillBehaviourActionAttackIgnoreVitality = Extract(header, db, options), + EntityMSkillBehaviourActionAttackMainWeaponAttribute = Extract(header, db, options), + EntityMSkillBehaviourActionAttackSkillfulMainWeaponType = Extract(header, db, options), + EntityMSkillBehaviourActionAttack = Extract(header, db, options), + EntityMSkillBehaviourActionAttackVitality = Extract(header, db, options), + EntityMSkillBehaviourActionAttributeDamageCorrection = Extract(header, db, options), + EntityMSkillBehaviourActionBuff = Extract(header, db, options), + EntityMSkillBehaviourActionChangestep = Extract(header, db, options), + EntityMSkillBehaviourActionDamageCorrectionHpRatio = Extract(header, db, options), + EntityMSkillBehaviourActionDamageMultiply = Extract(header, db, options), + EntityMSkillBehaviourActionDefaultSkillLottery = Extract(header, db, options), + EntityMSkillBehaviourActionExtendBuffCooltime = Extract(header, db, options), + EntityMSkillBehaviourActionHpRatioDamage = Extract(header, db, options), + EntityMSkillBehaviourActionOverlimitDamageMultiply = Extract(header, db, options), + EntityMSkillBehaviourActionRecoveryPointCorrection = Extract(header, db, options), + EntityMSkillBehaviourActionRecovery = Extract(header, db, options), + EntityMSkillBehaviourActionRemoveAbnormal = Extract(header, db, options), + EntityMSkillBehaviourActionRemoveBuff = Extract(header, db, options), + EntityMSkillBehaviourActionShortenActiveSkillCooltime = Extract(header, db, options), + EntityMSkillBehaviourActionSkillRecoveryPowerCorrection = Extract(header, db, options), + EntityMSkillBehaviourActivationConditionActivationUpperCount = Extract(header, db, options), + EntityMSkillBehaviourActivationConditionAttribute = Extract(header, db, options), + EntityMSkillBehaviourActivationConditionGroup = Extract(header, db, options), + EntityMSkillBehaviourActivationConditionHpRatio = Extract(header, db, options), + EntityMSkillBehaviourActivationConditionInSkillFlow = Extract(header, db, options), + EntityMSkillBehaviourActivationConditionWaveNumber = Extract(header, db, options), + EntityMSkillBehaviourActivationMethod = Extract(header, db, options), + EntityMSkillBehaviourGroup = Extract(header, db, options), + EntityMSkillBehaviour = Extract(header, db, options), + EntityMSkillBuff = Extract(header, db, options), + EntityMSkillCasttimeBehaviourActionOnFrameUpdate = Extract(header, db, options), + EntityMSkillCasttimeBehaviourActionOnSkillDamageCondition = Extract(header, db, options), + EntityMSkillCasttimeBehaviourGroup = Extract(header, db, options), + EntityMSkillCasttimeBehaviour = Extract(header, db, options), + EntityMSkillCasttime = Extract(header, db, options), + EntityMSkillCooltimeAdvanceValueOnDefaultSkillGroup = Extract(header, db, options), + EntityMSkillCooltimeBehaviourGroup = Extract(header, db, options), + EntityMSkillCooltimeBehaviourOnExecuteActiveSkill = Extract(header, db, options), + EntityMSkillCooltimeBehaviourOnExecuteCompanionSkill = Extract(header, db, options), + EntityMSkillCooltimeBehaviourOnExecuteDefaultSkill = Extract(header, db, options), + EntityMSkillCooltimeBehaviourOnFrameUpdate = Extract(header, db, options), + EntityMSkillCooltimeBehaviourOnSkillDamage = Extract(header, db, options), + EntityMSkillCooltimeBehaviour = Extract(header, db, options), + EntityMSkillDamageMultiplyAbnormalAttachedValueGroup = Extract(header, db, options), + EntityMSkillDamageMultiplyDetailAbnormalAttached = Extract(header, db, options), + EntityMSkillDamageMultiplyDetailAlways = Extract(header, db, options), + EntityMSkillDamageMultiplyDetailBuffAttached = Extract(header, db, options), + EntityMSkillDamageMultiplyDetailCritical = Extract(header, db, options), + EntityMSkillDamageMultiplyDetailHitIndex = Extract(header, db, options), + EntityMSkillDamageMultiplyDetailSkillfulWeaponType = Extract(header, db, options), + EntityMSkillDamageMultiplyDetailSpecifiedCostumeType = Extract(header, db, options), + EntityMSkillDamageMultiplyHitIndexValueGroup = Extract(header, db, options), + EntityMSkillDamageMultiplyTargetSpecifiedCostumeGroup = Extract(header, db, options), + EntityMSkillDetail = Extract(header, db, options), + EntityMSkillLevelGroup = Extract(header, db, options), + EntityMSkillRemoveAbnormalTargetAbnormalGroup = Extract(header, db, options), + EntityMSkillRemoveBuffFilterStatusKind = Extract(header, db, options), + EntityMSkillReserveUiType = Extract(header, db, options), + EntityMSkill = Extract(header, db, options), + EntityMSmartphoneChatGroupMessage = Extract(header, db, options), + EntityMSmartphoneChatGroup = Extract(header, db, options), + EntityMSpeaker = Extract(header, db, options), + EntityMStainedGlassStatusUpGroup = Extract(header, db, options), + EntityMStainedGlassStatusUpTargetGroup = Extract(header, db, options), + EntityMStainedGlass = Extract(header, db, options), + EntityMThought = Extract(header, db, options), + EntityMTipBackgroundAsset = Extract(header, db, options), + EntityMTipDisplayConditionGroup = Extract(header, db, options), + EntityMTipGroupBackgroundAssetRelation = Extract(header, db, options), + EntityMTipGroupBackgroundAsset = Extract(header, db, options), + EntityMTipGroupSelection = Extract(header, db, options), + EntityMTipGroupSituationSeason = Extract(header, db, options), + EntityMTipGroupSituation = Extract(header, db, options), + EntityMTipGroup = Extract(header, db, options), + EntityMTip = Extract(header, db, options), + EntityMTitleFlowMovie = Extract(header, db, options), + EntityMTitleStillGroup = Extract(header, db, options), + EntityMTitleStill = Extract(header, db, options), + EntityMTutorialConsumePossessionGroup = Extract(header, db, options), + EntityMTutorialDialog = Extract(header, db, options), + EntityMTutorialUnlockCondition = Extract(header, db, options), + EntityMUserLevel = Extract(header, db, options), + EntityMUserQuestSceneGrantPossession = Extract(header, db, options), + EntityMWeaponAbilityEnhancementMaterial = Extract(header, db, options), + EntityMWeaponAbilityGroup = Extract(header, db, options), + EntityMWeaponAwakenAbility = Extract(header, db, options), + EntityMWeaponAwakenEffectGroup = Extract(header, db, options), + EntityMWeaponAwakenMaterialGroup = Extract(header, db, options), + EntityMWeaponAwakenStatusUpGroup = Extract(header, db, options), + EntityMWeaponAwaken = Extract(header, db, options), + EntityMWeaponBaseStatus = Extract(header, db, options), + EntityMWeaponConsumeExchangeConsumableItemGroup = Extract(header, db, options), + EntityMWeaponEnhancedAbility = Extract(header, db, options), + EntityMWeaponEnhancedSkill = Extract(header, db, options), + EntityMWeaponEnhanced = Extract(header, db, options), + EntityMWeaponEvolutionGroup = Extract(header, db, options), + EntityMWeaponEvolutionMaterialGroup = Extract(header, db, options), + EntityMWeaponFieldEffectDecreasePoint = Extract(header, db, options), + EntityMWeaponRarityLimitBreakMaterialGroup = Extract(header, db, options), + EntityMWeaponRarity = Extract(header, db, options), + EntityMWeaponSkillEnhancementMaterial = Extract(header, db, options), + EntityMWeaponSkillGroup = Extract(header, db, options), + EntityMWeaponSpecificEnhance = Extract(header, db, options), + EntityMWeaponSpecificLimitBreakMaterialGroup = Extract(header, db, options), + EntityMWeaponStatusCalculation = Extract(header, db, options), + EntityMWeaponStoryReleaseConditionGroup = Extract(header, db, options), + EntityMWeaponStoryReleaseConditionOperationGroup = Extract(header, db, options), + EntityMWeaponStoryReleaseConditionOperation = Extract(header, db, options), + EntityMWeapon = Extract(header, db, options), + EntityMWebviewMission = Extract(header, db, options), + EntityMWebviewMissionTitleText = Extract(header, db, options), + EntityMWebviewPanelMissionCompleteFlavorText = Extract(header, db, options), + EntityMWebviewPanelMissionPage = Extract(header, db, options), + EntityMWebviewPanelMission = Extract(header, db, options) + }; + } + + /// + /// Extracts a single table from the binary data by looking up the table's offset in the header + /// and deserializing the MessagePack array at that position. + /// Returns an empty list if the table is not present in the header. + /// + private static List Extract(Dictionary header, ReadOnlyMemory db, MessagePackSerializerOptions options) where T : class + { + var attr = typeof(T).GetCustomAttribute() + ?? throw new InvalidOperationException($"{typeof(T).Name} is missing [MemoryTable] attribute."); + + if (!header.TryGetValue(attr.TableName, out var pos)) + return []; + + var slice = db.Slice(pos.Item1, pos.Item2); + return MessagePackSerializer.Deserialize(slice, options)?.ToList() ?? []; + } +} \ No newline at end of file diff --git a/src/Data/DarkMasterMemoryDatabase.cs b/src/Data/DarkMasterMemoryDatabase.cs new file mode 100644 index 0000000..8ebc577 --- /dev/null +++ b/src/Data/DarkMasterMemoryDatabase.cs @@ -0,0 +1,1226 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Data; + +/// +/// Singleton read-only master data database loaded at startup from JSON files. +/// Contains all EntityM* tables (quests, weapons, costumes, gacha, missions, etc.) +/// that define game content and rules. Shared across all user sessions. +/// +public class DarkMasterMemoryDatabase +{ + public List EntityMAbility { get; set; } = []; + + public List EntityMAbilityBehaviour { get; set; } = []; + + public List EntityMAbilityBehaviourActionBless { get; set; } = []; + + public List EntityMAbilityBehaviourActionPassiveSkill { get; set; } = []; + + public List EntityMAbilityBehaviourActionStatus { get; set; } = []; + + public List EntityMAbilityBehaviourActionStatusDown { get; set; } = []; + + public List EntityMAbilityBehaviourGroup { get; set; } = []; + + public List EntityMAbilityDetail { get; set; } = []; + + public List EntityMAbilityLevelGroup { get; set; } = []; + + public List EntityMAbilityStatus { get; set; } = []; + + public List EntityMActor { get; set; } = []; + + public List EntityMActorAnimation { get; set; } = []; + + public List EntityMActorAnimationCategory { get; set; } = []; + + public List EntityMActorAnimationController { get; set; } = []; + + public List EntityMActorObject { get; set; } = []; + + public List EntityMAppealDialog { get; set; } = []; + + public List EntityMAssetBackground { get; set; } = []; + + public List EntityMAssetCalculator { get; set; } = []; + + public List EntityMAssetDataSetting { get; set; } = []; + + public List EntityMAssetEffect { get; set; } = []; + + public List EntityMAssetGradeIcon { get; set; } = []; + + public List EntityMAssetTimeline { get; set; } = []; + + public List EntityMAssetTurnbattlePrefab { get; set; } = []; + + public List EntityMBattle { get; set; } = []; + + public List EntityMBattleActorAi { get; set; } = []; + + public List EntityMBattleActorSkillAiGroup { get; set; } = []; + + public List EntityMBattleAdditionalAbility { get; set; } = []; + + public List EntityMBattleAttributeDamageCoefficientDefine { get; set; } = []; + + public List EntityMBattleAttributeDamageCoefficientGroup { get; set; } = []; + + public List EntityMBattleBgmSet { get; set; } = []; + + public List EntityMBattleBgmSetGroup { get; set; } = []; + + public List EntityMBattleBigHunt { get; set; } = []; + + public List EntityMBattleBigHuntDamageThresholdGroup { get; set; } = []; + + public List EntityMBattleBigHuntKnockDownGaugeValueConfigGroup { get; set; } = []; + + public List EntityMBattleBigHuntPhaseGroup { get; set; } = []; + + public List EntityMBattleCompanionSkillAiGroup { get; set; } = []; + + public List EntityMBattleCostumeSkillFireAct { get; set; } = []; + + public List EntityMBattleCostumeSkillSe { get; set; } = []; + + public List EntityMBattleDropReward { get; set; } = []; + + public List EntityMBattleEnemySizeTypeConfig { get; set; } = []; + + public List EntityMBattleEvent { get; set; } = []; + + public List EntityMBattleEventGroup { get; set; } = []; + + public List EntityMBattleEventReceiverBehaviourGroup { get; set; } = []; + + public List EntityMBattleEventReceiverBehaviourHudActSequence { get; set; } = []; + + public List EntityMBattleEventReceiverBehaviourRadioMessage { get; set; } = []; + + public List EntityMBattleEventTriggerBehaviourBattleStart { get; set; } = []; + + public List EntityMBattleEventTriggerBehaviourGroup { get; set; } = []; + + public List EntityMBattleEventTriggerBehaviourWaveStart { get; set; } = []; + + public List EntityMBattleGeneralViewConfiguration { get; set; } = []; + + public List EntityMBattleGroup { get; set; } = []; + + public List EntityMBattleNpc { get; set; } = []; + + public List EntityMBattleNpcCharacter { get; set; } = []; + + public List EntityMBattleNpcCharacterBoard { get; set; } = []; + + public List EntityMBattleNpcCharacterBoardAbility { get; set; } = []; + + public List EntityMBattleNpcCharacterBoardCompleteReward { get; set; } = []; + + public List EntityMBattleNpcCharacterBoardStatusUp { get; set; } = []; + + public List EntityMBattleNpcCharacterCostumeLevelBonus { get; set; } = []; + + public List EntityMBattleNpcCharacterRebirth { get; set; } = []; + + public List EntityMBattleNpcCharacterViewerField { get; set; } = []; + + public List EntityMBattleNpcCompanion { get; set; } = []; + + public List EntityMBattleNpcCostume { get; set; } = []; + + public List EntityMBattleNpcCostumeActiveSkill { get; set; } = []; + + public List EntityMBattleNpcCostumeAwakenStatusUp { get; set; } = []; + + public List EntityMBattleNpcCostumeLevelBonusReevaluate { get; set; } = []; + + public List EntityMBattleNpcCostumeLevelBonusReleaseStatus { get; set; } = []; + + public List EntityMBattleNpcCostumeLotteryEffect { get; set; } = []; + + public List EntityMBattleNpcCostumeLotteryEffectAbility { get; set; } = []; + + public List EntityMBattleNpcCostumeLotteryEffectPending { get; set; } = []; + + public List EntityMBattleNpcCostumeLotteryEffectStatusUp { get; set; } = []; + + public List EntityMBattleNpcDeck { get; set; } = []; + + public List EntityMBattleNpcDeckBackup { get; set; } = []; + + public List EntityMBattleNpcDeckCharacter { get; set; } = []; + + public List EntityMBattleNpcDeckCharacterDressupCostume { get; set; } = []; + + public List EntityMBattleNpcDeckCharacterDropCategory { get; set; } = []; + + public List EntityMBattleNpcDeckCharacterType { get; set; } = []; + + public List EntityMBattleNpcDeckLimitContentBackup { get; set; } = []; + + public List EntityMBattleNpcDeckLimitContentBackupRestored { get; set; } = []; + + public List EntityMBattleNpcDeckLimitContentDeletedCharacter { get; set; } = []; + + public List EntityMBattleNpcDeckLimitContentRestricted { get; set; } = []; + + public List EntityMBattleNpcDeckPartsGroup { get; set; } = []; + + public List EntityMBattleNpcDeckSubWeaponGroup { get; set; } = []; + + public List EntityMBattleNpcDeckTypeNote { get; set; } = []; + + public List EntityMBattleNpcParts { get; set; } = []; + + public List EntityMBattleNpcPartsGroupNote { get; set; } = []; + + public List EntityMBattleNpcPartsPreset { get; set; } = []; + + public List EntityMBattleNpcPartsPresetTag { get; set; } = []; + + public List EntityMBattleNpcPartsStatusSub { get; set; } = []; + + public List EntityMBattleNpcSpecialEndAct { get; set; } = []; + + public List EntityMBattleNpcWeapon { get; set; } = []; + + public List EntityMBattleNpcWeaponAbility { get; set; } = []; + + public List EntityMBattleNpcWeaponAbilityReevaluate { get; set; } = []; + + public List EntityMBattleNpcWeaponAwaken { get; set; } = []; + + public List EntityMBattleNpcWeaponNote { get; set; } = []; + + public List EntityMBattleNpcWeaponNoteReevaluate { get; set; } = []; + + public List EntityMBattleNpcWeaponSkill { get; set; } = []; + + public List EntityMBattleNpcWeaponStory { get; set; } = []; + + public List EntityMBattleNpcWeaponStoryReevaluate { get; set; } = []; + + public List EntityMBattleProgressUiType { get; set; } = []; + + public List EntityMBattleQuestSceneBgm { get; set; } = []; + + public List EntityMBattleQuestSceneBgmSetGroup { get; set; } = []; + + public List EntityMBattleRentalDeck { get; set; } = []; + + public List EntityMBattleSkillBehaviourHitDamageConfiguration { get; set; } = []; + + public List EntityMBattleSkillFireAct { get; set; } = []; + + public List EntityMBattleSkillFireActConditionAttributeType { get; set; } = []; + + public List EntityMBattleSkillFireActConditionGroup { get; set; } = []; + + public List EntityMBattleSkillFireActConditionSkillCategoryType { get; set; } = []; + + public List EntityMBattleSkillFireActConditionWeaponType { get; set; } = []; + + public List EntityMBeginnerCampaign { get; set; } = []; + + public List EntityMBigHuntBoss { get; set; } = []; + + public List EntityMBigHuntBossGradeGroup { get; set; } = []; + + public List EntityMBigHuntBossGradeGroupAttribute { get; set; } = []; + + public List EntityMBigHuntBossQuest { get; set; } = []; + + public List EntityMBigHuntBossQuestGroup { get; set; } = []; + + public List EntityMBigHuntBossQuestGroupChallengeCategory { get; set; } = []; + + public List EntityMBigHuntLink { get; set; } = []; + + public List EntityMBigHuntQuest { get; set; } = []; + + public List EntityMBigHuntQuestGroup { get; set; } = []; + + public List EntityMBigHuntQuestScoreCoefficient { get; set; } = []; + + public List EntityMBigHuntRewardGroup { get; set; } = []; + + public List EntityMBigHuntSchedule { get; set; } = []; + + public List EntityMBigHuntScoreRewardGroup { get; set; } = []; + + public List EntityMBigHuntScoreRewardGroupSchedule { get; set; } = []; + + public List EntityMBigHuntWeeklyAttributeScoreRewardGroupSchedule { get; set; } = []; + + public List EntityMCageMemory { get; set; } = []; + + public List EntityMCageOrnament { get; set; } = []; + + public List EntityMCageOrnamentMainQuestChapterStill { get; set; } = []; + + public List EntityMCageOrnamentReward { get; set; } = []; + + public List EntityMCageOrnamentStillReleaseCondition { get; set; } = []; + + public List EntityMCatalogCompanion { get; set; } = []; + + public List EntityMCatalogCostume { get; set; } = []; + + public List EntityMCatalogPartsGroup { get; set; } = []; + + public List EntityMCatalogTerm { get; set; } = []; + + public List EntityMCatalogThought { get; set; } = []; + + public List EntityMCatalogWeapon { get; set; } = []; + + public List EntityMCharacter { get; set; } = []; + + public List EntityMCharacterBoard { get; set; } = []; + + public List EntityMCharacterBoardAbility { get; set; } = []; + + public List EntityMCharacterBoardAbilityMaxLevel { get; set; } = []; + + public List EntityMCharacterBoardAssignment { get; set; } = []; + + public List EntityMCharacterBoardCategory { get; set; } = []; + + public List EntityMCharacterBoardCompleteReward { get; set; } = []; + + public List EntityMCharacterBoardCompleteRewardGroup { get; set; } = []; + + public List EntityMCharacterBoardCondition { get; set; } = []; + + public List EntityMCharacterBoardConditionDetail { get; set; } = []; + + public List EntityMCharacterBoardConditionGroup { get; set; } = []; + + public List EntityMCharacterBoardConditionIgnore { get; set; } = []; + + public List EntityMCharacterBoardEffectTargetGroup { get; set; } = []; + + public List EntityMCharacterBoardGroup { get; set; } = []; + + public List EntityMCharacterBoardPanel { get; set; } = []; + + public List EntityMCharacterBoardPanelReleaseEffectGroup { get; set; } = []; + + public List EntityMCharacterBoardPanelReleasePossessionGroup { get; set; } = []; + + public List EntityMCharacterBoardPanelReleaseRewardGroup { get; set; } = []; + + public List EntityMCharacterBoardStatusUp { get; set; } = []; + + public List EntityMCharacterDisplaySwitch { get; set; } = []; + + public List EntityMCharacterLevelBonusAbilityGroup { get; set; } = []; + + public List EntityMCharacterRebirth { get; set; } = []; + + public List EntityMCharacterRebirthMaterialGroup { get; set; } = []; + + public List EntityMCharacterRebirthStepGroup { get; set; } = []; + + public List EntityMCharacterViewerActorIcon { get; set; } = []; + + public List EntityMCharacterViewerField { get; set; } = []; + + public List EntityMCharacterViewerFieldSettings { get; set; } = []; + + public List EntityMCharacterVoiceUnlockCondition { get; set; } = []; + + public List EntityMCollectionBonusEffect { get; set; } = []; + + public List EntityMCollectionBonusQuestAssignment { get; set; } = []; + + public List EntityMCollectionBonusQuestAssignmentGroup { get; set; } = []; + + public List EntityMComboCalculationSetting { get; set; } = []; + + public List EntityMComebackCampaign { get; set; } = []; + + public List EntityMCompanion { get; set; } = []; + + public List EntityMCompanionAbilityGroup { get; set; } = []; + + public List EntityMCompanionAbilityLevel { get; set; } = []; + + public List EntityMCompanionBaseStatus { get; set; } = []; + + public List EntityMCompanionCategory { get; set; } = []; + + public List EntityMCompanionDuplicationExchangePossessionGroup { get; set; } = []; + + public List EntityMCompanionEnhanced { get; set; } = []; + + public List EntityMCompanionEnhancementMaterial { get; set; } = []; + + public List EntityMCompanionSkillLevel { get; set; } = []; + + public List EntityMCompanionStatusCalculation { get; set; } = []; + + public List EntityMCompleteMissionGroup { get; set; } = []; + + public List EntityMConfig { get; set; } = []; + + public List EntityMConsumableItem { get; set; } = []; + + public List EntityMConsumableItemEffect { get; set; } = []; + + public List EntityMConsumableItemTerm { get; set; } = []; + + public List EntityMContentsStory { get; set; } = []; + + public List EntityMCostume { get; set; } = []; + + public List EntityMCostumeAbilityGroup { get; set; } = []; + + public List EntityMCostumeAbilityLevelGroup { get; set; } = []; + + public List EntityMCostumeActiveSkillEnhancementMaterial { get; set; } = []; + + public List EntityMCostumeActiveSkillGroup { get; set; } = []; + + public List EntityMCostumeAnimationStep { get; set; } = []; + + public List EntityMCostumeAutoOrganizationCondition { get; set; } = []; + + public List EntityMCostumeAwaken { get; set; } = []; + + public List EntityMCostumeAwakenAbility { get; set; } = []; + + public List EntityMCostumeAwakenEffectGroup { get; set; } = []; + + public List EntityMCostumeAwakenItemAcquire { get; set; } = []; + + public List EntityMCostumeAwakenMaterialGroup { get; set; } = []; + + public List EntityMCostumeAwakenPriceGroup { get; set; } = []; + + public List EntityMCostumeAwakenStatusUpGroup { get; set; } = []; + + public List EntityMCostumeAwakenStepMaterialGroup { get; set; } = []; + + public List EntityMCostumeBaseStatus { get; set; } = []; + + public List EntityMCostumeCollectionBonus { get; set; } = []; + + public List EntityMCostumeCollectionBonusGroup { get; set; } = []; + + public List EntityMCostumeDefaultSkillGroup { get; set; } = []; + + public List EntityMCostumeDefaultSkillLotteryGroup { get; set; } = []; + + public List EntityMCostumeDelete { get; set; } = []; + + public List EntityMCostumeDisplayCoordinateAdjustment { get; set; } = []; + + public List EntityMCostumeDisplaySwitch { get; set; } = []; + + public List EntityMCostumeDuplicationExchangePossessionGroup { get; set; } = []; + + public List EntityMCostumeEmblem { get; set; } = []; + + public List EntityMCostumeEnhanced { get; set; } = []; + + public List EntityMCostumeLevelBonus { get; set; } = []; + + public List EntityMCostumeLimitBreakMaterialGroup { get; set; } = []; + + public List EntityMCostumeLimitBreakMaterialRarityGroup { get; set; } = []; + + public List EntityMCostumeLotteryEffect { get; set; } = []; + + public List EntityMCostumeLotteryEffectMaterialGroup { get; set; } = []; + + public List EntityMCostumeLotteryEffectOddsGroup { get; set; } = []; + + public List EntityMCostumeLotteryEffectReleaseSchedule { get; set; } = []; + + public List EntityMCostumeLotteryEffectTargetAbility { get; set; } = []; + + public List EntityMCostumeLotteryEffectTargetStatusUp { get; set; } = []; + + public List EntityMCostumeOverflowExchangePossessionGroup { get; set; } = []; + + public List EntityMCostumeProperAttributeHpBonus { get; set; } = []; + + public List EntityMCostumeRarity { get; set; } = []; + + public List EntityMCostumeSpecialActActiveSkill { get; set; } = []; + + public List EntityMCostumeSpecialActActiveSkillConditionAttribute { get; set; } = []; + + public List EntityMCostumeStatusCalculation { get; set; } = []; + + public List EntityMDeckEntrustCoefficientAttribute { get; set; } = []; + + public List EntityMDeckEntrustCoefficientPartsSeriesBonusCount { get; set; } = []; + + public List EntityMDeckEntrustCoefficientStatus { get; set; } = []; + + public List EntityMDokan { get; set; } = []; + + public List EntityMDokanContentGroup { get; set; } = []; + + public List EntityMDokanText { get; set; } = []; + + public List EntityMEnhanceCampaign { get; set; } = []; + + public List EntityMEnhanceCampaignTargetGroup { get; set; } = []; + + public List EntityMEvaluateCondition { get; set; } = []; + + public List EntityMEvaluateConditionValueGroup { get; set; } = []; + + public List EntityMEventQuestChapter { get; set; } = []; + + public List EntityMEventQuestChapterCharacter { get; set; } = []; + + public List EntityMEventQuestChapterDifficultyLimitContentUnlock { get; set; } = []; + + public List EntityMEventQuestChapterLimitContentRelation { get; set; } = []; + + public List EntityMEventQuestDailyGroup { get; set; } = []; + + public List EntityMEventQuestDailyGroupCompleteReward { get; set; } = []; + + public List EntityMEventQuestDailyGroupMessage { get; set; } = []; + + public List EntityMEventQuestDailyGroupTargetChapter { get; set; } = []; + + public List EntityMEventQuestDisplayItemGroup { get; set; } = []; + + public List EntityMEventQuestGuerrillaFreeOpen { get; set; } = []; + + public List EntityMEventQuestGuerrillaFreeOpenScheduleCorrespondence { get; set; } = []; + + public List EntityMEventQuestLabyrinthMob { get; set; } = []; + + public List EntityMEventQuestLabyrinthQuestDisplay { get; set; } = []; + + public List EntityMEventQuestLabyrinthQuestEffectDescriptionAbility { get; set; } = []; + + public List EntityMEventQuestLabyrinthQuestEffectDescriptionFree { get; set; } = []; + + public List EntityMEventQuestLabyrinthQuestEffectDisplay { get; set; } = []; + + public List EntityMEventQuestLabyrinthRewardGroup { get; set; } = []; + + public List EntityMEventQuestLabyrinthSeason { get; set; } = []; + + public List EntityMEventQuestLabyrinthSeasonRewardGroup { get; set; } = []; + + public List EntityMEventQuestLabyrinthStage { get; set; } = []; + + public List EntityMEventQuestLabyrinthStageAccumulationRewardGroup { get; set; } = []; + + public List EntityMEventQuestLimitContent { get; set; } = []; + + public List EntityMEventQuestLimitContentDeckRestriction { get; set; } = []; + + public List EntityMEventQuestLimitContentDeckRestrictionTarget { get; set; } = []; + + public List EntityMEventQuestLink { get; set; } = []; + + public List EntityMEventQuestSequence { get; set; } = []; + + public List EntityMEventQuestSequenceGroup { get; set; } = []; + + public List EntityMEventQuestTowerAccumulationReward { get; set; } = []; + + public List EntityMEventQuestTowerAccumulationRewardGroup { get; set; } = []; + + public List EntityMEventQuestTowerAsset { get; set; } = []; + + public List EntityMEventQuestTowerRewardGroup { get; set; } = []; + + public List EntityMEventQuestUnlockCondition { get; set; } = []; + + public List EntityMExplore { get; set; } = []; + + public List EntityMExploreGradeAsset { get; set; } = []; + + public List EntityMExploreGradeScore { get; set; } = []; + + public List EntityMExploreGroup { get; set; } = []; + + public List EntityMExploreUnlockCondition { get; set; } = []; + + public List EntityMExtraQuestGroup { get; set; } = []; + + public List EntityMExtraQuestGroupInMainQuestChapter { get; set; } = []; + + public List EntityMFieldEffectBlessRelation { get; set; } = []; + + public List EntityMFieldEffectDecreasePoint { get; set; } = []; + + public List EntityMFieldEffectGroup { get; set; } = []; + + public List EntityMGachaMedal { get; set; } = []; + + public List EntityMGiftText { get; set; } = []; + + public List EntityMGimmick { get; set; } = []; + + public List EntityMGimmickAdditionalAsset { get; set; } = []; + + public List EntityMGimmickExtraQuest { get; set; } = []; + + public List EntityMGimmickGroup { get; set; } = []; + + public List EntityMGimmickGroupEventLog { get; set; } = []; + + public List EntityMGimmickInterval { get; set; } = []; + + public List EntityMGimmickOrnament { get; set; } = []; + + public List EntityMGimmickSequence { get; set; } = []; + + public List EntityMGimmickSequenceGroup { get; set; } = []; + + public List EntityMGimmickSequenceRewardGroup { get; set; } = []; + + public List EntityMGimmickSequenceSchedule { get; set; } = []; + + public List EntityMHeadupDisplayView { get; set; } = []; + + public List EntityMHelp { get; set; } = []; + + public List EntityMHelpCategory { get; set; } = []; + + public List EntityMHelpItem { get; set; } = []; + + public List EntityMHelpPageGroup { get; set; } = []; + + public List EntityMImportantItem { get; set; } = []; + + public List EntityMImportantItemEffect { get; set; } = []; + + public List EntityMImportantItemEffectDropCount { get; set; } = []; + + public List EntityMImportantItemEffectDropRate { get; set; } = []; + + public List EntityMImportantItemEffectTargetItemGroup { get; set; } = []; + + public List EntityMImportantItemEffectTargetQuestGroup { get; set; } = []; + + public List EntityMImportantItemEffectUnlockFunction { get; set; } = []; + + public List EntityMLibraryEventQuestStoryGrouping { get; set; } = []; + + public List EntityMLibraryMainQuestGroup { get; set; } = []; + + public List EntityMLibraryMainQuestStory { get; set; } = []; + + public List EntityMLibraryMovie { get; set; } = []; + + public List EntityMLibraryMovieCategory { get; set; } = []; + + public List EntityMLibraryMovieUnlockCondition { get; set; } = []; + + public List EntityMLibraryRecordGrouping { get; set; } = []; + + public List EntityMLibraryStoryGroup { get; set; } = []; + + public List EntityMLimitedOpenText { get; set; } = []; + + public List EntityMLimitedOpenTextGroup { get; set; } = []; + + public List EntityMListSettingAbilityGroup { get; set; } = []; + + public List EntityMListSettingAbilityGroupTarget { get; set; } = []; + + public List EntityMLoginBonus { get; set; } = []; + + public List EntityMLoginBonusStamp { get; set; } = []; + + public List EntityMMainQuestChapter { get; set; } = []; + + public List EntityMMainQuestPortalCageCharacter { get; set; } = []; + + public List EntityMMainQuestRoute { get; set; } = []; + + public List EntityMMainQuestRouteAnotherReplayFlowUnlockCondition { get; set; } = []; + + public List EntityMMainQuestSeason { get; set; } = []; + + public List EntityMMainQuestSequence { get; set; } = []; + + public List EntityMMainQuestSequenceGroup { get; set; } = []; + + public List EntityMMaintenance { get; set; } = []; + + public List EntityMMaintenanceGroup { get; set; } = []; + + public List EntityMMaterial { get; set; } = []; + + public List EntityMMaterialSaleObtainPossession { get; set; } = []; + + public List EntityMMission { get; set; } = []; + + public List EntityMMissionClearConditionValueView { get; set; } = []; + + public List EntityMMissionGroup { get; set; } = []; + + public List EntityMMissionLink { get; set; } = []; + + public List EntityMMissionPass { get; set; } = []; + + public List EntityMMissionPassLevelGroup { get; set; } = []; + + public List EntityMMissionPassMissionGroup { get; set; } = []; + + public List EntityMMissionPassRewardGroup { get; set; } = []; + + public List EntityMMissionReward { get; set; } = []; + + public List EntityMMissionSubCategoryText { get; set; } = []; + + public List EntityMMissionTerm { get; set; } = []; + + public List EntityMMissionUnlockCondition { get; set; } = []; + + public List EntityMMomBanner { get; set; } = []; + + public List EntityMMomPointBanner { get; set; } = []; + + public List EntityMMovie { get; set; } = []; + + public List EntityMNaviCutIn { get; set; } = []; + + public List EntityMNaviCutInContentGroup { get; set; } = []; + + public List EntityMNaviCutInText { get; set; } = []; + + public List EntityMNumericalFunction { get; set; } = []; + + public List EntityMNumericalFunctionParameterGroup { get; set; } = []; + + public List EntityMNumericalParameterMap { get; set; } = []; + + public List EntityMOmikuji { get; set; } = []; + + public List EntityMOverrideHitEffectConditionCritical { get; set; } = []; + + public List EntityMOverrideHitEffectConditionDamageAttribute { get; set; } = []; + + public List EntityMOverrideHitEffectConditionGroup { get; set; } = []; + + public List EntityMOverrideHitEffectConditionSkillExecutor { get; set; } = []; + + public List EntityMParts { get; set; } = []; + + public List EntityMPartsEnhanced { get; set; } = []; + + public List EntityMPartsEnhancedSubStatus { get; set; } = []; + + public List EntityMPartsGroup { get; set; } = []; + + public List EntityMPartsLevelUpPriceGroup { get; set; } = []; + + public List EntityMPartsLevelUpRateGroup { get; set; } = []; + + public List EntityMPartsRarity { get; set; } = []; + + public List EntityMPartsSeries { get; set; } = []; + + public List EntityMPartsSeriesBonusAbilityGroup { get; set; } = []; + + public List EntityMPartsStatusMain { get; set; } = []; + + public List EntityMPlatformPayment { get; set; } = []; + + public List EntityMPlatformPaymentPrice { get; set; } = []; + + public List EntityMPortalCageAccessPointFunctionGroup { get; set; } = []; + + public List EntityMPortalCageAccessPointFunctionGroupSchedule { get; set; } = []; + + public List EntityMPortalCageCharacterGroup { get; set; } = []; + + public List EntityMPortalCageGate { get; set; } = []; + + public List EntityMPortalCageScene { get; set; } = []; + + public List EntityMPossessionAcquisitionRoute { get; set; } = []; + + public List EntityMPowerCalculationConstantValue { get; set; } = []; + + public List EntityMPowerReferenceStatusGroup { get; set; } = []; + + public List EntityMPremiumItem { get; set; } = []; + + public List EntityMPvpBackground { get; set; } = []; + + public List EntityMPvpGrade { get; set; } = []; + + public List EntityMPvpGradeGroup { get; set; } = []; + + public List EntityMPvpGradeOneMatchReward { get; set; } = []; + + public List EntityMPvpGradeOneMatchRewardGroup { get; set; } = []; + + public List EntityMPvpGradeWeeklyRewardGroup { get; set; } = []; + + public List EntityMPvpReward { get; set; } = []; + + public List EntityMPvpSeason { get; set; } = []; + + public List EntityMPvpSeasonGrade { get; set; } = []; + + public List EntityMPvpSeasonGrouping { get; set; } = []; + + public List EntityMPvpSeasonRankReward { get; set; } = []; + + public List EntityMPvpSeasonRankRewardGroup { get; set; } = []; + + public List EntityMPvpSeasonRankRewardPerSeason { get; set; } = []; + + public List EntityMPvpSeasonRankRewardRankGroup { get; set; } = []; + + public List EntityMPvpWeeklyRankRewardGroup { get; set; } = []; + + public List EntityMPvpWeeklyRankRewardRankGroup { get; set; } = []; + + public List EntityMPvpWinStreakCountEffect { get; set; } = []; + + public List EntityMQuest { get; set; } = []; + + public List EntityMQuestBonus { get; set; } = []; + + public List EntityMQuestBonusAbility { get; set; } = []; + + public List EntityMQuestBonusAllyCharacter { get; set; } = []; + + public List EntityMQuestBonusCharacterGroup { get; set; } = []; + + public List EntityMQuestBonusCostumeGroup { get; set; } = []; + + public List EntityMQuestBonusCostumeSettingGroup { get; set; } = []; + + public List EntityMQuestBonusDropReward { get; set; } = []; + + public List EntityMQuestBonusEffectGroup { get; set; } = []; + + public List EntityMQuestBonusExp { get; set; } = []; + + public List EntityMQuestBonusTermGroup { get; set; } = []; + + public List EntityMQuestBonusWeaponGroup { get; set; } = []; + + public List EntityMQuestCampaign { get; set; } = []; + + public List EntityMQuestCampaignEffectGroup { get; set; } = []; + + public List EntityMQuestCampaignTargetGroup { get; set; } = []; + + public List EntityMQuestCampaignTargetItemGroup { get; set; } = []; + + public List EntityMQuestDeckMultiRestrictionGroup { get; set; } = []; + + public List EntityMQuestDeckRestrictionGroup { get; set; } = []; + + public List EntityMQuestDeckRestrictionGroupUnlock { get; set; } = []; + + public List EntityMQuestDisplayAttributeGroup { get; set; } = []; + + public List EntityMQuestDisplayEnemyThumbnailReplace { get; set; } = []; + + public List EntityMQuestFirstClearRewardGroup { get; set; } = []; + + public List EntityMQuestFirstClearRewardSwitch { get; set; } = []; + + public List EntityMQuestMission { get; set; } = []; + + public List EntityMQuestMissionConditionValueGroup { get; set; } = []; + + public List EntityMQuestMissionGroup { get; set; } = []; + + public List EntityMQuestMissionReward { get; set; } = []; + + public List EntityMQuestPickupRewardGroup { get; set; } = []; + + public List EntityMQuestRelationMainFlow { get; set; } = []; + + public List EntityMQuestReleaseConditionBigHuntScore { get; set; } = []; + + public List EntityMQuestReleaseConditionCharacterLevel { get; set; } = []; + + public List EntityMQuestReleaseConditionDeckPower { get; set; } = []; + + public List EntityMQuestReleaseConditionGroup { get; set; } = []; + + public List EntityMQuestReleaseConditionList { get; set; } = []; + + public List EntityMQuestReleaseConditionQuestChallenge { get; set; } = []; + + public List EntityMQuestReleaseConditionQuestClear { get; set; } = []; + + public List EntityMQuestReleaseConditionUserLevel { get; set; } = []; + + public List EntityMQuestReleaseConditionWeaponAcquisition { get; set; } = []; + + public List EntityMQuestReplayFlowRewardGroup { get; set; } = []; + + public List EntityMQuestScene { get; set; } = []; + + public List EntityMQuestSceneBattle { get; set; } = []; + + public List EntityMQuestSceneChoice { get; set; } = []; + + public List EntityMQuestSceneChoiceCostumeEffectGroup { get; set; } = []; + + public List EntityMQuestSceneChoiceEffect { get; set; } = []; + + public List EntityMQuestSceneChoiceWeaponEffectGroup { get; set; } = []; + + public List EntityMQuestSceneNotConfirmTitleDialog { get; set; } = []; + + public List EntityMQuestSceneOutgameBlendshapeMotion { get; set; } = []; + + public List EntityMQuestScenePictureBookReplace { get; set; } = []; + + public List EntityMQuestSchedule { get; set; } = []; + + public List EntityMQuestScheduleCorrespondence { get; set; } = []; + + public List EntityMReport { get; set; } = []; + + public List EntityMShop { get; set; } = []; + + public List EntityMShopDisplayPrice { get; set; } = []; + + public List EntityMShopItem { get; set; } = []; + + public List EntityMShopItemAdditionalContent { get; set; } = []; + + public List EntityMShopItemCell { get; set; } = []; + + public List EntityMShopItemCellGroup { get; set; } = []; + + public List EntityMShopItemCellLimitedOpen { get; set; } = []; + + public List EntityMShopItemCellTerm { get; set; } = []; + + public List EntityMShopItemContentEffect { get; set; } = []; + + public List EntityMShopItemContentMission { get; set; } = []; + + public List EntityMShopItemContentPossession { get; set; } = []; + + public List EntityMShopItemLimitedStock { get; set; } = []; + + public List EntityMShopItemUserLevelCondition { get; set; } = []; + + public List EntityMShopReplaceableGem { get; set; } = []; + + public List EntityMSideStoryQuest { get; set; } = []; + + public List EntityMSideStoryQuestLimitContent { get; set; } = []; + + public List EntityMSideStoryQuestScene { get; set; } = []; + + public List EntityMSkill { get; set; } = []; + + public List EntityMSkillAbnormal { get; set; } = []; + + public List EntityMSkillAbnormalBehaviour { get; set; } = []; + + public List EntityMSkillAbnormalBehaviourActionAbnormalResistance { get; set; } = []; + + public List EntityMSkillAbnormalBehaviourActionAttributeDamageCorrection { get; set; } = []; + + public List EntityMSkillAbnormalBehaviourActionBuffResistance { get; set; } = []; + + public List EntityMSkillAbnormalBehaviourActionDamage { get; set; } = []; + + public List EntityMSkillAbnormalBehaviourActionDamageMultiply { get; set; } = []; + + public List EntityMSkillAbnormalBehaviourActionDamageMultiplyDetailAlways { get; set; } = []; + + public List EntityMSkillAbnormalBehaviourActionDefaultSkillLottery { get; set; } = []; + + public List EntityMSkillAbnormalBehaviourActionHitRatioDown { get; set; } = []; + + public List EntityMSkillAbnormalBehaviourActionModifyHateValue { get; set; } = []; + + public List EntityMSkillAbnormalBehaviourActionOverrideEvasionValue { get; set; } = []; + + public List EntityMSkillAbnormalBehaviourActionOverrideHitEffect { get; set; } = []; + + public List EntityMSkillAbnormalBehaviourActionRecovery { get; set; } = []; + + public List EntityMSkillAbnormalBehaviourActionTurnRestriction { get; set; } = []; + + public List EntityMSkillAbnormalBehaviourGroup { get; set; } = []; + + public List EntityMSkillAbnormalDamageMultiplyDetailAbnormal { get; set; } = []; + + public List EntityMSkillAbnormalDamageMultiplyDetailBuffAttached { get; set; } = []; + + public List EntityMSkillAbnormalDamageMultiplyDetailCritical { get; set; } = []; + + public List EntityMSkillAbnormalDamageMultiplyDetailHitIndex { get; set; } = []; + + public List EntityMSkillAbnormalDamageMultiplyDetailSkillfulWeapon { get; set; } = []; + + public List EntityMSkillAbnormalLifetime { get; set; } = []; + + public List EntityMSkillAbnormalLifetimeBehaviourActivateCount { get; set; } = []; + + public List EntityMSkillAbnormalLifetimeBehaviourFrameCount { get; set; } = []; + + public List EntityMSkillAbnormalLifetimeBehaviourGroup { get; set; } = []; + + public List EntityMSkillAbnormalLifetimeBehaviourReceiveDamageCount { get; set; } = []; + + public List EntityMSkillAbnormalLifetimeBehaviourTurnCount { get; set; } = []; + + public List EntityMSkillBehaviour { get; set; } = []; + + public List EntityMSkillBehaviourActionAbnormal { get; set; } = []; + + public List EntityMSkillBehaviourActionActiveSkillDamageCorrection { get; set; } = []; + + public List EntityMSkillBehaviourActionAdvanceActiveSkillCooltime { get; set; } = []; + + public List EntityMSkillBehaviourActionAdvanceActiveSkillCooltimeImmediate { get; set; } = []; + + public List EntityMSkillBehaviourActionAttack { get; set; } = []; + + public List EntityMSkillBehaviourActionAttackClampHp { get; set; } = []; + + public List EntityMSkillBehaviourActionAttackCombo { get; set; } = []; + + public List EntityMSkillBehaviourActionAttackFixedDamage { get; set; } = []; + + public List EntityMSkillBehaviourActionAttackHpRatio { get; set; } = []; + + public List EntityMSkillBehaviourActionAttackIgnoreVitality { get; set; } = []; + + public List EntityMSkillBehaviourActionAttackMainWeaponAttribute { get; set; } = []; + + public List EntityMSkillBehaviourActionAttackSkillfulMainWeaponType { get; set; } = []; + + public List EntityMSkillBehaviourActionAttackVitality { get; set; } = []; + + public List EntityMSkillBehaviourActionAttributeDamageCorrection { get; set; } = []; + + public List EntityMSkillBehaviourActionBuff { get; set; } = []; + + public List EntityMSkillBehaviourActionChangestep { get; set; } = []; + + public List EntityMSkillBehaviourActionDamageCorrectionHpRatio { get; set; } = []; + + public List EntityMSkillBehaviourActionDamageMultiply { get; set; } = []; + + public List EntityMSkillBehaviourActionDefaultSkillLottery { get; set; } = []; + + public List EntityMSkillBehaviourActionExtendBuffCooltime { get; set; } = []; + + public List EntityMSkillBehaviourActionHpRatioDamage { get; set; } = []; + + public List EntityMSkillBehaviourActionOverlimitDamageMultiply { get; set; } = []; + + public List EntityMSkillBehaviourActionRecovery { get; set; } = []; + + public List EntityMSkillBehaviourActionRecoveryPointCorrection { get; set; } = []; + + public List EntityMSkillBehaviourActionRemoveAbnormal { get; set; } = []; + + public List EntityMSkillBehaviourActionRemoveBuff { get; set; } = []; + + public List EntityMSkillBehaviourActionShortenActiveSkillCooltime { get; set; } = []; + + public List EntityMSkillBehaviourActionSkillRecoveryPowerCorrection { get; set; } = []; + + public List EntityMSkillBehaviourActivationConditionActivationUpperCount { get; set; } = []; + + public List EntityMSkillBehaviourActivationConditionAttribute { get; set; } = []; + + public List EntityMSkillBehaviourActivationConditionGroup { get; set; } = []; + + public List EntityMSkillBehaviourActivationConditionHpRatio { get; set; } = []; + + public List EntityMSkillBehaviourActivationConditionInSkillFlow { get; set; } = []; + + public List EntityMSkillBehaviourActivationConditionWaveNumber { get; set; } = []; + + public List EntityMSkillBehaviourActivationMethod { get; set; } = []; + + public List EntityMSkillBehaviourGroup { get; set; } = []; + + public List EntityMSkillBuff { get; set; } = []; + + public List EntityMSkillCasttime { get; set; } = []; + + public List EntityMSkillCasttimeBehaviour { get; set; } = []; + + public List EntityMSkillCasttimeBehaviourActionOnFrameUpdate { get; set; } = []; + + public List EntityMSkillCasttimeBehaviourActionOnSkillDamageCondition { get; set; } = []; + + public List EntityMSkillCasttimeBehaviourGroup { get; set; } = []; + + public List EntityMSkillCooltimeAdvanceValueOnDefaultSkillGroup { get; set; } = []; + + public List EntityMSkillCooltimeBehaviour { get; set; } = []; + + public List EntityMSkillCooltimeBehaviourGroup { get; set; } = []; + + public List EntityMSkillCooltimeBehaviourOnExecuteActiveSkill { get; set; } = []; + + public List EntityMSkillCooltimeBehaviourOnExecuteCompanionSkill { get; set; } = []; + + public List EntityMSkillCooltimeBehaviourOnExecuteDefaultSkill { get; set; } = []; + + public List EntityMSkillCooltimeBehaviourOnFrameUpdate { get; set; } = []; + + public List EntityMSkillCooltimeBehaviourOnSkillDamage { get; set; } = []; + + public List EntityMSkillDamageMultiplyAbnormalAttachedValueGroup { get; set; } = []; + + public List EntityMSkillDamageMultiplyDetailAbnormalAttached { get; set; } = []; + + public List EntityMSkillDamageMultiplyDetailAlways { get; set; } = []; + + public List EntityMSkillDamageMultiplyDetailBuffAttached { get; set; } = []; + + public List EntityMSkillDamageMultiplyDetailCritical { get; set; } = []; + + public List EntityMSkillDamageMultiplyDetailHitIndex { get; set; } = []; + + public List EntityMSkillDamageMultiplyDetailSkillfulWeaponType { get; set; } = []; + + public List EntityMSkillDamageMultiplyDetailSpecifiedCostumeType { get; set; } = []; + + public List EntityMSkillDamageMultiplyHitIndexValueGroup { get; set; } = []; + + public List EntityMSkillDamageMultiplyTargetSpecifiedCostumeGroup { get; set; } = []; + + public List EntityMSkillDetail { get; set; } = []; + + public List EntityMSkillLevelGroup { get; set; } = []; + + public List EntityMSkillRemoveAbnormalTargetAbnormalGroup { get; set; } = []; + + public List EntityMSkillRemoveBuffFilterStatusKind { get; set; } = []; + + public List EntityMSkillReserveUiType { get; set; } = []; + + public List EntityMSmartphoneChatGroup { get; set; } = []; + + public List EntityMSmartphoneChatGroupMessage { get; set; } = []; + + public List EntityMSpeaker { get; set; } = []; + + public List EntityMStainedGlass { get; set; } = []; + + public List EntityMStainedGlassStatusUpGroup { get; set; } = []; + + public List EntityMStainedGlassStatusUpTargetGroup { get; set; } = []; + + public List EntityMThought { get; set; } = []; + + public List EntityMTip { get; set; } = []; + + public List EntityMTipBackgroundAsset { get; set; } = []; + + public List EntityMTipDisplayConditionGroup { get; set; } = []; + + public List EntityMTipGroup { get; set; } = []; + + public List EntityMTipGroupBackgroundAsset { get; set; } = []; + + public List EntityMTipGroupBackgroundAssetRelation { get; set; } = []; + + public List EntityMTipGroupSelection { get; set; } = []; + + public List EntityMTipGroupSituation { get; set; } = []; + + public List EntityMTipGroupSituationSeason { get; set; } = []; + + public List EntityMTitleFlowMovie { get; set; } = []; + + public List EntityMTitleStill { get; set; } = []; + + public List EntityMTitleStillGroup { get; set; } = []; + + public List EntityMTutorialConsumePossessionGroup { get; set; } = []; + + public List EntityMTutorialDialog { get; set; } = []; + + public List EntityMTutorialUnlockCondition { get; set; } = []; + + public List EntityMUserLevel { get; set; } = []; + + public List EntityMUserQuestSceneGrantPossession { get; set; } = []; + + public List EntityMWeapon { get; set; } = []; + + public List EntityMWeaponAbilityEnhancementMaterial { get; set; } = []; + + public List EntityMWeaponAbilityGroup { get; set; } = []; + + public List EntityMWeaponAwaken { get; set; } = []; + + public List EntityMWeaponAwakenAbility { get; set; } = []; + + public List EntityMWeaponAwakenEffectGroup { get; set; } = []; + + public List EntityMWeaponAwakenMaterialGroup { get; set; } = []; + + public List EntityMWeaponAwakenStatusUpGroup { get; set; } = []; + + public List EntityMWeaponBaseStatus { get; set; } = []; + + public List EntityMWeaponConsumeExchangeConsumableItemGroup { get; set; } = []; + + public List EntityMWeaponEnhanced { get; set; } = []; + + public List EntityMWeaponEnhancedAbility { get; set; } = []; + + public List EntityMWeaponEnhancedSkill { get; set; } = []; + + public List EntityMWeaponEvolutionGroup { get; set; } = []; + + public List EntityMWeaponEvolutionMaterialGroup { get; set; } = []; + + public List EntityMWeaponFieldEffectDecreasePoint { get; set; } = []; + + public List EntityMWeaponRarity { get; set; } = []; + + public List EntityMWeaponRarityLimitBreakMaterialGroup { get; set; } = []; + + public List EntityMWeaponSkillEnhancementMaterial { get; set; } = []; + + public List EntityMWeaponSkillGroup { get; set; } = []; + + public List EntityMWeaponSpecificEnhance { get; set; } = []; + + public List EntityMWeaponSpecificLimitBreakMaterialGroup { get; set; } = []; + + public List EntityMWeaponStatusCalculation { get; set; } = []; + + public List EntityMWeaponStoryReleaseConditionGroup { get; set; } = []; + + public List EntityMWeaponStoryReleaseConditionOperation { get; set; } = []; + + public List EntityMWeaponStoryReleaseConditionOperationGroup { get; set; } = []; + + public List EntityMWebviewMission { get; set; } = []; + + public List EntityMWebviewMissionTitleText { get; set; } = []; + + public List EntityMWebviewPanelMission { get; set; } = []; + + public List EntityMWebviewPanelMissionCompleteFlavorText { get; set; } = []; + + public List EntityMWebviewPanelMissionPage { get; set; } = []; + +} diff --git a/src/Data/DarkUserMemoryDatabase.cs b/src/Data/DarkUserMemoryDatabase.cs new file mode 100644 index 0000000..83427b1 --- /dev/null +++ b/src/Data/DarkUserMemoryDatabase.cs @@ -0,0 +1,244 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Data; + +/// +/// In-memory per-user database holding all client-visible (EntityI*) and server-only (EntityS*) +/// entity collections. One instance exists per logged-in user, keyed by userId in . +/// EntityI* properties are included in diff responses sent to the client; EntityS* properties are +/// server-side bookkeeping that is never transmitted. +/// +public class DarkUserMemoryDatabase +{ + public List EntityIUser { get; set; } = []; + + public List EntityIUserApple { get; set; } = []; + + public List EntityIUserAutoSaleSettingDetail { get; set; } = []; + + public List EntityIUserBeginnerCampaign { get; set; } = []; + + public List EntityIUserBigHuntMaxScore { get; set; } = []; + + public List EntityIUserBigHuntProgressStatus { get; set; } = []; + + public List EntityIUserBigHuntScheduleMaxScore { get; set; } = []; + + public List EntityIUserBigHuntStatus { get; set; } = []; + + public List EntityIUserBigHuntWeeklyMaxScore { get; set; } = []; + + public List EntityIUserBigHuntWeeklyStatus { get; set; } = []; + + public List EntityIUserCageOrnamentReward { get; set; } = []; + + public List EntityIUserCharacter { get; set; } = []; + + public List EntityIUserCharacterBoard { get; set; } = []; + + public List EntityIUserCharacterBoardAbility { get; set; } = []; + + public List EntityIUserCharacterBoardCompleteReward { get; set; } = []; + + public List EntityIUserCharacterBoardStatusUp { get; set; } = []; + + public List EntityIUserCharacterCostumeLevelBonus { get; set; } = []; + + public List EntityIUserCharacterRebirth { get; set; } = []; + + public List EntityIUserCharacterViewerField { get; set; } = []; + + public List EntityIUserComebackCampaign { get; set; } = []; + + public List EntityIUserCompanion { get; set; } = []; + + public List EntityIUserConsumableItem { get; set; } = []; + + public List EntityIUserContentsStory { get; set; } = []; + + public List EntityIUserCostume { get; set; } = []; + + public List EntityIUserCostumeActiveSkill { get; set; } = []; + + public List EntityIUserCostumeAwakenStatusUp { get; set; } = []; + + public List EntityIUserCostumeLevelBonusReleaseStatus { get; set; } = []; + + public List EntityIUserCostumeLotteryEffect { get; set; } = []; + + public List EntityIUserCostumeLotteryEffectAbility { get; set; } = []; + + public List EntityIUserCostumeLotteryEffectPending { get; set; } = []; + + public List EntityIUserCostumeLotteryEffectStatusUp { get; set; } = []; + + public List EntityIUserDeck { get; set; } = []; + + public List EntityIUserDeckCharacter { get; set; } = []; + + public List EntityIUserDeckCharacterDressupCostume { get; set; } = []; + + public List EntityIUserDeckLimitContentDeletedCharacter { get; set; } = []; + + public List EntityIUserDeckLimitContentRestricted { get; set; } = []; + + public List EntityIUserDeckPartsGroup { get; set; } = []; + + public List EntityIUserDeckSubWeaponGroup { get; set; } = []; + + public List EntityIUserDeckTypeNote { get; set; } = []; + + public List EntityIUserDokan { get; set; } = []; + + public List EntityIUserEventQuestDailyGroupCompleteReward { get; set; } = []; + + public List EntityIUserEventQuestGuerrillaFreeOpen { get; set; } = []; + + public List EntityIUserEventQuestLabyrinthSeason { get; set; } = []; + + public List EntityIUserEventQuestLabyrinthStage { get; set; } = []; + + public List EntityIUserEventQuestProgressStatus { get; set; } = []; + + public List EntityIUserEventQuestTowerAccumulationReward { get; set; } = []; + + public List EntityIUserExplore { get; set; } = []; + + public List EntityIUserExploreScore { get; set; } = []; + + public List EntityIUserExtraQuestProgressStatus { get; set; } = []; + + public List EntityIUserFacebook { get; set; } = []; + + public List EntityIUserGem { get; set; } = []; + + public List EntitySUserGift { get; set; } = []; + + public List EntityIUserGimmick { get; set; } = []; + + public List EntityIUserGimmickOrnamentProgress { get; set; } = []; + + public List EntityIUserGimmickSequence { get; set; } = []; + + public List EntityIUserGimmickUnlock { get; set; } = []; + + public List EntityIUserImportantItem { get; set; } = []; + + public List EntityIUserLimitedOpen { get; set; } = []; + + public List EntityIUserLogin { get; set; } = []; + + public List EntityIUserLoginBonus { get; set; } = []; + + public List EntityIUserMainQuestFlowStatus { get; set; } = []; + + public List EntityIUserMainQuestMainFlowStatus { get; set; } = []; + + public List EntityIUserMainQuestProgressStatus { get; set; } = []; + + public List EntityIUserMainQuestReplayFlowStatus { get; set; } = []; + + public List EntityIUserMainQuestSeasonRoute { get; set; } = []; + + public List EntityIUserMaterial { get; set; } = []; + + public List EntityIUserMission { get; set; } = []; + + public List EntityIUserMissionCompletionProgress { get; set; } = []; + + public List EntityIUserMissionPassPoint { get; set; } = []; + + public List EntityIUserMovie { get; set; } = []; + + public List EntityIUserNaviCutIn { get; set; } = []; + + public List EntityIUserOmikuji { get; set; } = []; + + public List EntityIUserParts { get; set; } = []; + + public List EntityIUserPartsGroupNote { get; set; } = []; + + public List EntityIUserPartsPreset { get; set; } = []; + + public List EntityIUserPartsPresetTag { get; set; } = []; + + public List EntityIUserPartsStatusSub { get; set; } = []; + + public List EntityIUserPortalCageStatus { get; set; } = []; + + public List EntityIUserPossessionAutoConvert { get; set; } = []; + + public List EntityIUserPremiumItem { get; set; } = []; + + public List EntityIUserProfile { get; set; } = []; + + public List EntityIUserPvpDefenseDeck { get; set; } = []; + + public List EntityIUserPvpStatus { get; set; } = []; + + public List EntityIUserPvpWeeklyResult { get; set; } = []; + + public List EntityIUserQuest { get; set; } = []; + + public List EntityIUserQuestAutoOrbit { get; set; } = []; + + public List EntityIUserQuestLimitContentStatus { get; set; } = []; + + public List EntityIUserQuestMission { get; set; } = []; + + public List EntityIUserQuestReplayFlowRewardGroup { get; set; } = []; + + public List EntityIUserQuestSceneChoice { get; set; } = []; + + public List EntityIUserQuestSceneChoiceHistory { get; set; } = []; + + public List EntityIUserSetting { get; set; } = []; + + public List EntityIUserShopItem { get; set; } = []; + + public List EntityIUserShopReplaceable { get; set; } = []; + + public List EntityIUserShopReplaceableLineup { get; set; } = []; + + public List EntityIUserSideStoryQuest { get; set; } = []; + + public List EntityIUserSideStoryQuestSceneProgressStatus { get; set; } = []; + + public List EntityIUserStatus { get; set; } = []; + + public List EntityIUserThought { get; set; } = []; + + public List EntityIUserTripleDeck { get; set; } = []; + + public List EntityIUserTutorialProgress { get; set; } = []; + + public List EntityIUserWeapon { get; set; } = []; + + public List EntityIUserWeaponAbility { get; set; } = []; + + public List EntityIUserWeaponAwaken { get; set; } = []; + + public List EntityIUserWeaponNote { get; set; } = []; + + public List EntityIUserWeaponSkill { get; set; } = []; + + public List EntityIUserWeaponStory { get; set; } = []; + + public List EntityIUserWebviewPanelMission { get; set; } = []; + + // Server-exclusive data (EntityS* prefix): never sent to client + public List EntitySUser { get; set; } = []; + + public List EntitySUserDevice { get; set; } = []; + + public List BattleDetails { get; set; } = []; + + public List EntitySQuestSession { get; set; } = []; + + public List EntitySBigHuntSession { get; set; } = []; + + public List EntitySGachaBannerState { get; set; } = []; + + public List EntitySGachaRewardState { get; set; } = []; + +} diff --git a/src/Data/GameConfig.cs b/src/Data/GameConfig.cs new file mode 100644 index 0000000..f098f71 --- /dev/null +++ b/src/Data/GameConfig.cs @@ -0,0 +1,67 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Data; + +/// +/// Game-wide constants loaded from master data at startup. +/// +public class GameConfig +{ + public int ConsumableItemIdForGold { get; init; } + public int ConsumableItemIdForMedal { get; init; } + public int ConsumableItemIdForRareMedal { get; init; } + public int ConsumableItemIdForArenaCoin { get; init; } + public int ConsumableItemIdForExploreTicket { get; init; } + public int ConsumableItemIdForMomPoint { get; init; } + public int ConsumableItemIdForPremiumGachaTicket { get; init; } + public int ConsumableItemIdForQuestSkipTicket { get; init; } + + public int CharacterRebirthAvailableCount { get; init; } + public int CharacterRebirthConsumeGold { get; init; } + + public int CostumeAwakenAvailableCount { get; init; } + public int CostumeLimitBreakAvailableCount { get; init; } + + public int MaterialSameWeaponExpCoefficientPermil { get; init; } + + public int UserStaminaRecoverySecond { get; init; } + public int RewardGachaDailyMaxCount { get; init; } + public int QuestSkipMaxCountAtOnce { get; init; } + + public int WeaponLimitBreakAvailableCount { get; init; } + + /// Builds a from the loaded master config rows. + public static GameConfig From(IEnumerable configs) + { + Dictionary kv = configs.ToDictionary(c => c.ConfigKey, c => c.Value); + + return new GameConfig + { + ConsumableItemIdForGold = ParseInt(kv, "CONSUMABLE_ITEM_ID_FOR_GOLD"), + ConsumableItemIdForMedal = ParseInt(kv, "CONSUMABLE_ITEM_ID_FOR_MEDAL"), + ConsumableItemIdForRareMedal = ParseInt(kv, "CONSUMABLE_ITEM_ID_FOR_RARE_MEDAL"), + ConsumableItemIdForArenaCoin = ParseInt(kv, "CONSUMABLE_ITEM_ID_FOR_ARENA_COIN"), + ConsumableItemIdForExploreTicket = ParseInt(kv, "CONSUMABLE_ITEM_ID_FOR_EXPLORE_TICKET"), + ConsumableItemIdForMomPoint = ParseInt(kv, "CONSUMABLE_ITEM_ID_FOR_MOM_POINT"), + ConsumableItemIdForPremiumGachaTicket = ParseInt(kv, "CONSUMABLE_ITEM_ID_FOR_PREMIUM_GACHA_TICKET"), + ConsumableItemIdForQuestSkipTicket = ParseInt(kv, "CONSUMABLE_ITEM_ID_FOR_QUEST_SKIP_TICKET"), + + CharacterRebirthAvailableCount = ParseInt(kv, "CHARACTER_REBIRTH_AVAILABLE_COUNT"), + CharacterRebirthConsumeGold = ParseInt(kv, "CHARACTER_REBIRTH_CONSUME_GOLD"), + + CostumeAwakenAvailableCount = ParseInt(kv, "COSTUME_AWAKEN_AVAILABLE_COUNT"), + CostumeLimitBreakAvailableCount = ParseInt(kv, "COSTUME_LIMIT_BREAK_AVAILABLE_COUNT"), + + MaterialSameWeaponExpCoefficientPermil = ParseInt(kv, "MATERIAL_SAME_WEAPON_EXP_COEFFICIENT_PERMIL"), + + UserStaminaRecoverySecond = ParseInt(kv, "USER_STAMINA_RECOVERY_SECOND"), + RewardGachaDailyMaxCount = ParseInt(kv, "REWARD_GACHA_DAILY_MAX_COUNT"), + QuestSkipMaxCountAtOnce = ParseInt(kv, "QUEST_SKIP_MAX_COUNT_AT_ONCE"), + + WeaponLimitBreakAvailableCount = ParseInt(kv, "WEAPON_LIMIT_BREAK_AVAILABLE_COUNT"), + }; + } + + private static int ParseInt(Dictionary kv, string key) + => kv.TryGetValue(key, out string? s) && int.TryParse(s, out int v) ? v : 0; +} diff --git a/src/Data/UserDataDiffBuilder.cs b/src/Data/UserDataDiffBuilder.cs new file mode 100644 index 0000000..2ab77cd --- /dev/null +++ b/src/Data/UserDataDiffBuilder.cs @@ -0,0 +1,100 @@ +using MariesWonderland.Proto.Data; +using System.Text.Json; + +namespace MariesWonderland.Data; + +/// +/// Computes the delta between before/after snapshots of a +/// to produce incremental maps for gRPC responses. Uses reflection at +/// startup to discover all EntityI* (client-visible) list properties and builds per-table serializers. +/// +public static class UserDataDiffBuilder +{ + private static readonly JsonSerializerOptions CamelCaseOptions = new() + { + PropertyNamingPolicy = JsonNamingPolicy.CamelCase + }; + + // Maps "IUser" -> func that serializes db.EntityIUser to JSON + private static readonly IReadOnlyDictionary> Serializers; + + /// + /// Builds the table-name → serializer map once via reflection. Only EntityI* list properties + /// are included — EntityS* (server-only) and non-list properties are excluded. + /// + static UserDataDiffBuilder() + { + var serializers = new Dictionary>(); + + foreach (var prop in typeof(DarkUserMemoryDatabase).GetProperties()) + { + // Only include client-visible user data tables (EntityI* prefix, List<> type) + if (!prop.Name.StartsWith("EntityI")) continue; + if (!prop.PropertyType.IsGenericType) continue; + if (prop.PropertyType.GetGenericTypeDefinition() != typeof(List<>)) continue; + + // Strip the "Entity" prefix to get the table key the client expects (e.g. "IUserWeapon") + var tableName = prop.Name["Entity".Length..]; // "EntityIUser" -> "IUser" + var capturedProp = prop; // capture for lambda + serializers[tableName] = db => + { + var list = capturedProp.GetValue(db); + return JsonSerializer.Serialize(list, CamelCaseOptions); + }; + } + + Serializers = serializers; + } + + /// All client-visible user table names (IUser* series, excludes EntityS* and EntityM*). + public static IEnumerable TableNames => Serializers.Keys; + + /// + /// Captures the current state of all non-empty client-visible user tables as serialized JSON. + /// Use this before making changes; pass the result to Delta() after changes. + /// + public static Dictionary Snapshot(DarkUserMemoryDatabase db) + { + var snapshot = new Dictionary(); + foreach (var (table, serialize) in Serializers) + { + var json = serialize(db); + if (json != "[]") + snapshot[table] = json; + } + return snapshot; + } + + /// + /// Serializes a single named table to a JSON array string. + /// Returns "[]" if the table name is not recognised. + /// + public static string SerializeTable(DarkUserMemoryDatabase db, string tableName) + => Serializers.TryGetValue(tableName, out var serialize) ? serialize(db) : "[]"; + + /// + /// Computes only the tables that changed since the snapshot. + /// Use this for incremental API responses (e.g. SetUserName). + /// + public static Dictionary Delta(Dictionary before, DarkUserMemoryDatabase db) + { + Dictionary diff = []; + foreach (var (table, serialize) in Serializers) + { + // Serialize the current (post-mutation) state of this table + var afterJson = serialize(db); + before.TryGetValue(table, out var beforeJson); + beforeJson ??= "[]"; + + // Skip unchanged tables — only emit tables with actual modifications + if (afterJson == beforeJson) continue; + + diff[table] = new DiffData + { + UpdateRecordsJson = afterJson, + DeleteKeysJson = "[]" + }; + } + return diff; + } +} diff --git a/src/Data/UserDataSeeder.cs b/src/Data/UserDataSeeder.cs new file mode 100644 index 0000000..6cb891f --- /dev/null +++ b/src/Data/UserDataSeeder.cs @@ -0,0 +1,57 @@ +using MariesWonderland.Configuration; +using Microsoft.Extensions.Options; +using System.Text.Json; + +namespace MariesWonderland.Data; + +/// +/// Loads pre-seeded user data from Entity*Table.json files on disk into a . +/// Uses reflection to match JSON file names to database properties, allowing new entity types to be +/// loaded without code changes. +/// +public class UserDataSeeder(IOptions options) +{ + private static readonly JsonSerializerOptions JsonOptions = new() + { + PropertyNameCaseInsensitive = true + }; + + private static readonly Type DbType = typeof(DarkUserMemoryDatabase); + + /// + /// Reads all Entity*Table.json files from the configured UserDataPath and populates + /// a new DarkUserMemoryDatabase. Returns an empty database if no files are found. + /// + public DarkUserMemoryDatabase LoadFromFiles() + { + DarkUserMemoryDatabase db = new(); + + string rawPath = options.Value.Data.UserDataPath; + if (string.IsNullOrEmpty(rawPath)) + return db; + + string dataPath = Path.IsPathRooted(rawPath) + ? rawPath + : Path.Combine(AppContext.BaseDirectory, rawPath); + + if (!Directory.Exists(dataPath)) + return db; + + foreach (string file in Directory.EnumerateFiles(dataPath, "Entity*Table.json")) + { + // "EntityIUserCostumeTable.json" → "EntityIUserCostume" + string fileName = Path.GetFileName(file); + string propName = fileName[..^"Table.json".Length]; + + var prop = DbType.GetProperty(propName); + if (prop == null) continue; + + string json = File.ReadAllText(file); + var list = JsonSerializer.Deserialize(json, prop.PropertyType, JsonOptions); + if (list != null) + prop.SetValue(db, list); + } + + return db; + } +} diff --git a/src/Data/UserDataStore.cs b/src/Data/UserDataStore.cs new file mode 100644 index 0000000..d19f9f4 --- /dev/null +++ b/src/Data/UserDataStore.cs @@ -0,0 +1,298 @@ +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; +using System.Text.Json; + +namespace MariesWonderland.Data; + +/// +/// Manages the map of userId → . Handles user registration, +/// session management, and persistence to/from JSON files on disk. +/// +public class UserDataStore(DarkMasterMemoryDatabase masterDb) +{ + private readonly DarkMasterMemoryDatabase _masterDb = masterDb; + private readonly Dictionary _users = []; + private readonly Dictionary _uuidToUserId = []; + private readonly Dictionary _sessions = []; + + /// + /// Look up or create a user by UUID. Returns the userId and whether the user is new. + /// For new users, seeds the initial data into their database. + /// + public (long UserId, bool IsNew) RegisterOrGetUser(string uuid) + { + if (_uuidToUserId.TryGetValue(uuid, out var existingId)) + return (existingId, false); + + var userId = GenerateUserId(); + _uuidToUserId[uuid] = userId; + var db = new DarkUserMemoryDatabase(); + SeedInitialUserData(db, userId); + _users[userId] = db; + return (userId, true); + } + + /// + /// Creates a new authenticated session for the user with the given TTL. + /// + public UserSession CreateSession(long userId, TimeSpan ttl) + { + var key = $"session_{userId}_{Guid.NewGuid():N}"; + var session = new UserSession(key, userId, DateTime.UtcNow.Add(ttl)); + _sessions[key] = session; + return session; + } + + /// + /// Resolves a session key to a userId if the session exists and has not expired. + /// + public bool TryResolveSession(string sessionKey, out long userId) + { + if (_sessions.TryGetValue(sessionKey, out var session) && session.ExpiresAt > DateTime.UtcNow) + { + userId = session.UserId; + return true; + } + userId = 0; + return false; + } + + /// + /// Returns the user's in-memory database, creating an empty one if not found. + /// + public DarkUserMemoryDatabase GetOrCreate(long userId) + { + if (!_users.TryGetValue(userId, out var db)) + { + db = new DarkUserMemoryDatabase(); + _users[userId] = db; + } + return db; + } + + /// + /// Registers a pre-seeded database under a UUID. If the UUID is already mapped, + /// returns the existing userId without overwriting. Otherwise stores the seeded + /// database and maps the UUID to the userId found inside it. + /// + public long SeedUserFromDatabase(string uuid, DarkUserMemoryDatabase seededDb) + { + if (_uuidToUserId.TryGetValue(uuid, out var existingId)) + return existingId; + + long userId = seededDb.EntityIUser.FirstOrDefault()?.UserId ?? GenerateUserId(); + _uuidToUserId[uuid] = userId; + _users[userId] = seededDb; + return userId; + } + + /// + /// Attempts to retrieve a user's database without creating one. + /// + public bool TryGet(long userId, out DarkUserMemoryDatabase db) + => _users.TryGetValue(userId, out db!); + + /// + /// Stores a user database, replacing any existing one for that userId. + /// + public void Set(long userId, DarkUserMemoryDatabase db) + => _users[userId] = db; + + public IReadOnlyDictionary All => _users; + + /// + /// Serialize all user data to a JSON file on disk. + /// + public void Save(string filePath) + { + UserDataSnapshot snapshot = new() + { + Users = _users, + UuidToUserId = _uuidToUserId, + Sessions = _sessions.Values.ToList() + }; + + JsonSerializerOptions options = new() + { + WriteIndented = true + }; + + string json = JsonSerializer.Serialize(snapshot, options); + File.WriteAllText(filePath, json); + } + + /// + /// Deserialize user data from a JSON file on disk, replacing the current in-memory state. + /// Returns the number of users loaded. + /// + public int Load(string filePath) + { + if (!File.Exists(filePath)) + return 0; + + string json = File.ReadAllText(filePath); + UserDataSnapshot? snapshot = JsonSerializer.Deserialize(json); + + if (snapshot is null) + return 0; + + _users.Clear(); + _uuidToUserId.Clear(); + _sessions.Clear(); + + foreach (var (userId, db) in snapshot.Users) + _users[userId] = db; + + foreach (var (uuid, userId) in snapshot.UuidToUserId) + _uuidToUserId[uuid] = userId; + + foreach (UserSession session in snapshot.Sessions) + _sessions[session.SessionKey] = session; + + return _users.Count; + } + + /// + /// Generates a random 19-digit user ID. + /// + private static long GenerateUserId() + { + // Random 19-digit positive long (range: 1e18 to 2e18) + return Random.Shared.NextInt64(Constants.MinUserId, Constants.MaxUserId); + } + + /// + /// Generates a random 12-digit player ID. + /// + private static long GeneratePlayerId() + { + // Random 12-digit positive long (range: 1e12 to 2e12) + return Random.Shared.NextInt64(Constants.MinPlayerId, Constants.MaxPlayerId); + } + + /// + /// Populates a new user database with default records (profile, status, starting weapons, etc.). + /// + private void SeedInitialUserData(DarkUserMemoryDatabase db, long userId) + { + var nowMs = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(); + + db.EntityIUser.Add(new EntityIUser + { + UserId = userId, + PlayerId = GeneratePlayerId(), + OsType = 2, + PlatformType = PlatformType.GOOGLE_PLAY_STORE, + UserRestrictionType = 0, + RegisterDatetime = nowMs, + GameStartDatetime = nowMs + }); + + db.EntityIUserSetting.Add(new EntityIUserSetting + { + UserId = userId, + IsNotifyPurchaseAlert = false + }); + + db.EntityIUserStatus.Add(new EntityIUserStatus + { + UserId = userId, + Level = 1, + Exp = 0, + StaminaMilliValue = 60000, + StaminaUpdateDatetime = nowMs + }); + + db.EntityIUserProfile.Add(new EntityIUserProfile + { + UserId = userId, + Name = string.Empty, + NameUpdateDatetime = nowMs, + Message = string.Empty, + MessageUpdateDatetime = nowMs, + FavoriteCostumeId = 0, + FavoriteCostumeIdUpdateDatetime = nowMs + }); + + db.EntityIUserLogin.Add(new EntityIUserLogin + { + UserId = userId, + TotalLoginCount = 1, + ContinualLoginCount = 1, + MaxContinualLoginCount = 1, + LastLoginDatetime = nowMs, + LastComebackLoginDatetime = 0 + }); + + db.EntityIUserLoginBonus.Add(new EntityIUserLoginBonus + { + UserId = userId, + LoginBonusId = 1, + CurrentPageNumber = 1, + CurrentStampNumber = 0, + LatestRewardReceiveDatetime = 0 + }); + + db.EntityIUserTutorialProgress.Add(new EntityIUserTutorialProgress + { + UserId = userId, + TutorialType = TutorialType.GAME_START, + ProgressPhase = 0, + ChoiceId = 0 + }); + + foreach (int weaponId in Constants.StartingWeaponIds) + { + string uuid = Guid.NewGuid().ToString(); + + db.EntityIUserWeapon.Add(new EntityIUserWeapon + { + UserId = userId, + UserWeaponUuid = uuid, + WeaponId = weaponId, + Level = 1, + Exp = 0, + LimitBreakCount = 0, + IsProtected = true, + AcquisitionDatetime = nowMs + }); + + db.EntityIUserWeaponNote.Add(new EntityIUserWeaponNote + { + UserId = userId, + WeaponId = weaponId, + MaxLevel = 1, + MaxLimitBreakCount = 0, + FirstAcquisitionDatetime = nowMs + }); + + db.EntityIUserWeaponStory.Add(new EntityIUserWeaponStory + { + UserId = userId, + WeaponId = weaponId, + ReleasedMaxStoryIndex = 1 + }); + + EntityMWeapon? masterWeapon = _masterDb.EntityMWeapon.FirstOrDefault(w => w.WeaponId == weaponId); + if (masterWeapon != null) + { + foreach (EntityMWeaponAbilityGroup ag in _masterDb.EntityMWeaponAbilityGroup.Where(g => g.WeaponAbilityGroupId == masterWeapon.WeaponAbilityGroupId)) + db.EntityIUserWeaponAbility.Add(new EntityIUserWeaponAbility { UserId = userId, UserWeaponUuid = uuid, SlotNumber = ag.SlotNumber, Level = 1 }); + + foreach (EntityMWeaponSkillGroup sg in _masterDb.EntityMWeaponSkillGroup.Where(g => g.WeaponSkillGroupId == masterWeapon.WeaponSkillGroupId)) + db.EntityIUserWeaponSkill.Add(new EntityIUserWeaponSkill { UserId = userId, UserWeaponUuid = uuid, SlotNumber = sg.SlotNumber, Level = 1 }); + } + } + } +} + +/// +/// Serializable snapshot of all user data for persistence. +/// +file record UserDataSnapshot +{ + public Dictionary Users { get; init; } = []; + public Dictionary UuidToUserId { get; init; } = []; + public List Sessions { get; init; } = []; +} + diff --git a/src/Data/UserSession.cs b/src/Data/UserSession.cs new file mode 100644 index 0000000..b7ea4c1 --- /dev/null +++ b/src/Data/UserSession.cs @@ -0,0 +1,3 @@ +namespace MariesWonderland.Data; + +public record UserSession(string SessionKey, long UserId, DateTime ExpiresAt); diff --git a/src/Extensions/GrpcContextExtensions.cs b/src/Extensions/GrpcContextExtensions.cs new file mode 100644 index 0000000..230bbc7 --- /dev/null +++ b/src/Extensions/GrpcContextExtensions.cs @@ -0,0 +1,25 @@ +using Grpc.Core; + +namespace MariesWonderland.Extensions; + +/// +/// Extension methods for extracting client-provided headers from gRPC . +/// The client sends userId and session key as custom metadata entries. +/// +public static class GrpcContextExtensions +{ + /// + /// Reads the caller's user ID from the x-apb-user-id request header. + /// + public static long GetUserId(this ServerCallContext context) + { + string? value = context.RequestHeaders.GetValue("x-apb-user-id"); + return value != null && long.TryParse(value, out long id) ? id : 0; + } + + /// + /// Reads the caller's session key from the x-apb-session-key request header. + /// + public static string GetSessionKey(this ServerCallContext context) + => context.RequestHeaders.GetValue("x-apb-session-key") ?? ""; +} diff --git a/src/Extensions/GrpcExtensions.cs b/src/Extensions/GrpcExtensions.cs new file mode 100644 index 0000000..049230e --- /dev/null +++ b/src/Extensions/GrpcExtensions.cs @@ -0,0 +1,58 @@ +using MariesWonderland.Services; + +namespace MariesWonderland.Extensions; + +/// +/// Registers all gRPC service implementations with the ASP.NET Core endpoint routing pipeline. +/// Each MapGrpcService call wires a service class to its protobuf-defined RPC methods. +/// +public static class GrpcExtensions +{ + /// + /// Registers all gRPC service endpoints on the application. + /// + public static WebApplication MapGrpcServices(this WebApplication app) + { + app.MapGrpcService(); + app.MapGrpcService(); + app.MapGrpcService(); + app.MapGrpcService(); + app.MapGrpcService(); + app.MapGrpcService(); + app.MapGrpcService(); + app.MapGrpcService(); + app.MapGrpcService(); + app.MapGrpcService(); + app.MapGrpcService(); + app.MapGrpcService(); + app.MapGrpcService(); + app.MapGrpcService(); + app.MapGrpcService(); + app.MapGrpcService(); + app.MapGrpcService(); + app.MapGrpcService(); + app.MapGrpcService(); + app.MapGrpcService(); + app.MapGrpcService(); + app.MapGrpcService(); + app.MapGrpcService(); + app.MapGrpcService(); + app.MapGrpcService(); + app.MapGrpcService(); + app.MapGrpcService(); + app.MapGrpcService(); + app.MapGrpcService(); + app.MapGrpcService(); + app.MapGrpcService(); + app.MapGrpcService(); + app.MapGrpcService(); + app.MapGrpcService(); + app.MapGrpcService(); + app.MapGrpcService(); + app.MapGrpcService(); + app.MapGrpcService(); + app.MapGrpcService(); + app.MapGrpcService(); + return app; + } +} diff --git a/src/Extensions/HttpApiExtensions.cs b/src/Extensions/HttpApiExtensions.cs new file mode 100644 index 0000000..d59465a --- /dev/null +++ b/src/Extensions/HttpApiExtensions.cs @@ -0,0 +1,283 @@ +using MariesWonderland.Configuration; +using MariesWonderland.Data; +using MariesWonderland.Http; +using Microsoft.Extensions.Options; +using System.Text; + +namespace MariesWonderland.Extensions; + +/// +/// Registers all non-gRPC HTTP endpoints: asset serving (list.bin, asset bundles, master database), +/// debug save/load utilities, terms of service, and the catch-all fallback route. +/// +public static class HttpApiExtensions +{ + // The URL embedded in list.bin pointing to the original CDN (must be exactly 43 ASCII bytes). + private static readonly byte[] ResourcesUrlOriginal = + Encoding.ASCII.GetBytes("https://resources.app.nierreincarnation.com"); + + /// + /// Registers all HTTP endpoints, including asset serving, master database, debug utilities, and the catch-all route. + /// + public static WebApplication MapHttpApis(this WebApplication app) + { + ServerOptions options = app.Services.GetRequiredService>().Value; + string assetDatabaseBasePath = options.Paths.AssetDatabase; + string masterDatabaseBasePath = options.Paths.MasterDatabase; + string resourcesBaseUrl = options.Paths.ResourcesBaseUrl; + string userDatabasePath = Path.IsPathRooted(options.Data.UserDatabase) + ? options.Data.UserDatabase + : Path.Combine(AppContext.BaseDirectory, options.Data.UserDatabase); + + ILogger assetLogger = app.Services.GetRequiredService().CreateLogger(); + AssetDatabase assetDb = new(assetDatabaseBasePath, assetLogger); + + app.MapGet("/", () => "Marie's Wonderland is open for business :marie:"); + + // Debug endpoints for manual save/load + app.MapGet("/debug/save", () => + { + try + { + UserDataStore store = app.Services.GetRequiredService(); + store.Save(userDatabasePath); + return Results.Ok($"Saved {store.All.Count} users to {userDatabasePath}"); + } + catch (Exception ex) + { + return Results.Problem($"Save failed: {ex.Message}"); + } + }); + + app.MapGet("/debug/load", () => + { + try + { + UserDataStore store = app.Services.GetRequiredService(); + int count = store.Load(userDatabasePath); + return count > 0 + ? Results.Ok($"Loaded {count} users from {userDatabasePath}") + : Results.Ok("No save file found."); + } + catch (Exception ex) + { + return Results.Problem($"Load failed: {ex.Message}"); + } + }); + + // ToS. Expects the version wrapped in delimiters like "###123###". + app.MapGet("/web/static/{languagePath}/terms/termsofuse", (string languagePath) => $"Terms of Service

Terms of Service

Language: {languagePath}

Version: ###123###

"); + + // Asset Database — serves list.bin, rewriting the embedded CDN base URL if configured. + // Records which revision the client is using so subsequent asset requests resolve correctly. + app.MapGet("/v1/list/300116832/{revision}", async (string revision, HttpContext ctx) => + { + string clientIp = ctx.Connection.RemoteIpAddress?.ToString() ?? ""; + assetDb.RememberRevision(clientIp, revision); + + byte[] data = await File.ReadAllBytesAsync(Path.Combine(assetDatabaseBasePath, revision, "list.bin")); + RewriteResourcesUrl(data, resourcesBaseUrl, app.Logger); + return Results.Bytes(data, "application/x-protobuf"); + }); + + // Asset Bundles / Resources — resolves objectId via the list.bin index for the client's active revision. + // Path: /aaaaaaaaaaaaaaaaaaaaaaaa/unso-{version}-{type}/{objectId} + // type = "assetbundle" or "resources" (last segment of "unso-…" after splitting on '-') + app.MapGet("/aaaaaaaaaaaaaaaaaaaaaaaa/unso-{version}-{type}/{objectId}", (string version, string type, string objectId, HttpContext ctx) => + { + string clientIp = ctx.Connection.RemoteIpAddress?.ToString() ?? ""; + + foreach (AssetCandidate candidate in assetDb.Resolve(clientIp, type, objectId)) + { + FileInfo info = new(candidate.Path); + if (!info.Exists) continue; + + // Size validation: only enforce when list.bin provided a plausible size (≥ 256 bytes). + if (candidate.ExpectedSize >= 256 && info.Length != candidate.ExpectedSize) + { + app.Logger.LogDebug( + "Asset size mismatch: objectId={ObjectId} path={Path} expected={Expected} actual={Actual} — skipping", + objectId, candidate.Path, candidate.ExpectedSize, info.Length); + continue; + } + + // MD5 validation when the index provided a checksum. + if (!string.IsNullOrEmpty(candidate.ExpectedMD5)) + { + string? actualMd5 = assetDb.ComputeMd5(candidate.Path, info); + if (actualMd5 is not null && !string.Equals(actualMd5, candidate.ExpectedMD5, StringComparison.OrdinalIgnoreCase)) + { + app.Logger.LogDebug( + "Asset MD5 mismatch: objectId={ObjectId} path={Path} expected={Expected} actual={Actual} source={Source} — skipping", + objectId, candidate.Path, candidate.ExpectedMD5, actualMd5, candidate.Source); + continue; + } + } + + // Serve the file — Results.File handles Range requests, ETags, etc. + return Results.File(candidate.Path, "application/octet-stream"); + } + + app.Logger.LogWarning("Asset not found: objectId={ObjectId} type={Type} clientIp={Ip}", objectId, type, clientIp); + return Results.NotFound(); + }); + + // Master Database + app.MapMethods("/assets/release/{masterVersion}/database.bin.e", ["GET", "HEAD"], async (HttpContext ctx, string masterVersion) => + { + var filePath = Path.Combine(masterDatabaseBasePath, $"{masterVersion}.bin.e"); + + var fileInfo = new FileInfo(filePath); + long totalLength = fileInfo.Length; + + // Advertise range support + ctx.Response.Headers.AcceptRanges = "bytes"; + + // Simple ETag using last write ticks & length (optional but useful for clients) + ctx.Response.Headers.ETag = $"\"{fileInfo.LastWriteTimeUtc.Ticks:x}-{totalLength:x}\""; + + // Handle HEAD quickly (send headers only) + bool isHead = string.Equals(ctx.Request.Method, "HEAD", StringComparison.OrdinalIgnoreCase); + + // Parse Range header if present + if (ctx.Request.Headers.TryGetValue("Range", out var rangeHeader)) + { + // Expect single range of form: bytes=start-end + var raw = rangeHeader.ToString(); + if (!raw.StartsWith("bytes=", StringComparison.OrdinalIgnoreCase)) + { + // Malformed range; respond with 416 + ctx.Response.StatusCode = StatusCodes.Status416RangeNotSatisfiable; + ctx.Response.Headers.ContentRange = $"bytes */{totalLength}"; + return; + } + + var rangePart = raw["bytes=".Length..].Trim(); + var parts = rangePart.Split('-', 2); + if (parts.Length != 2) + { + ctx.Response.StatusCode = StatusCodes.Status416RangeNotSatisfiable; + ctx.Response.Headers.ContentRange = $"bytes */{totalLength}"; + return; + } + + bool startParsed = long.TryParse(parts[0], out long start); + bool endParsed = long.TryParse(parts[1], out long end); + + if (!startParsed && endParsed) + { + // suffix range: last 'end' bytes + long suffixLength = end; + if (suffixLength <= 0) + { + ctx.Response.StatusCode = StatusCodes.Status416RangeNotSatisfiable; + ctx.Response.Headers.ContentRange = $"bytes */{totalLength}"; + return; + } + start = Math.Max(0, totalLength - suffixLength); + end = totalLength - 1; + } + else if (startParsed && !endParsed) + { + // range from start to end of file + end = totalLength - 1; + } + else if (!startParsed && !endParsed) + { + ctx.Response.StatusCode = StatusCodes.Status416RangeNotSatisfiable; + ctx.Response.Headers.ContentRange = $"bytes */{totalLength}"; + return; + } + + // Validate + if (start < 0 || end < start || start >= totalLength) + { + ctx.Response.StatusCode = StatusCodes.Status416RangeNotSatisfiable; + ctx.Response.Headers.ContentRange = $"bytes */{totalLength}"; + return; + } + + long length = end - start + 1; + + ctx.Response.StatusCode = StatusCodes.Status206PartialContent; + ctx.Response.Headers.ContentRange = $"bytes {start}-{end}/{totalLength}"; + ctx.Response.ContentType = "application/octet-stream"; + ctx.Response.ContentLength = length; + + if (isHead) + { + return; + } + + // Stream the requested range + await using var fs = new FileStream(filePath, FileMode.Open, FileAccess.Read, FileShare.Read); + fs.Seek(start, SeekOrigin.Begin); + + var buffer = new byte[64 * 1024]; + long remaining = length; + while (remaining > 0) + { + int toRead = (int)Math.Min(buffer.Length, remaining); + int read = await fs.ReadAsync(buffer.AsMemory(0, toRead)); + if (read == 0) break; + await ctx.Response.Body.WriteAsync(buffer.AsMemory(0, read)); + remaining -= read; + } + + return; + } + + // No Range header: return full file + ctx.Response.StatusCode = StatusCodes.Status200OK; + ctx.Response.ContentType = "application/octet-stream"; + ctx.Response.ContentLength = totalLength; + + if (isHead) + { + return; + } + + // Stream the whole file + await using var fullFs = new FileStream(filePath, FileMode.Open, FileAccess.Read, FileShare.Read); + await fullFs.CopyToAsync(ctx.Response.Body); + }); + + // Catch all + app.MapMethods("/{**catchAll}", ["GET", "POST", "PUT", "DELETE", "PATCH",], (HttpContext ctx, string catchAll) => + { + app.Logger.LogWarning("Catchall endpoint hit for {Method} {Path}", ctx.Request.Method, ctx.Request.Path); + return $"You requested: {catchAll}"; + }); + + return app; + } + + /// + /// Rewrites the CDN base URL embedded in list.bin bytes to the configured local URL. + /// The replacement must be exactly 43 ASCII bytes to match the original protobuf field length. + /// + private static void RewriteResourcesUrl(byte[] data, string replacementUrl, ILogger logger) + { + if (string.IsNullOrEmpty(replacementUrl)) + return; + + byte[] replacement = Encoding.ASCII.GetBytes(replacementUrl); + if (replacement.Length != ResourcesUrlOriginal.Length) + { + logger.LogWarning( + "ResourcesBaseUrl is {Length} bytes but must be exactly {Required} bytes — serving list.bin unmodified.", + replacement.Length, ResourcesUrlOriginal.Length); + return; + } + + int idx = data.AsSpan().IndexOf(ResourcesUrlOriginal); + if (idx < 0) + { + logger.LogWarning("CDN URL not found in list.bin — serving unmodified."); + return; + } + + replacement.CopyTo(data, idx); + logger.LogDebug("list.bin: rewrote resource base URL to {Url}", replacementUrl); + } +} diff --git a/src/Extensions/ServiceExtensions.cs b/src/Extensions/ServiceExtensions.cs new file mode 100644 index 0000000..f65b8a9 --- /dev/null +++ b/src/Extensions/ServiceExtensions.cs @@ -0,0 +1,39 @@ +using MariesWonderland.Configuration; +using MariesWonderland.Data; + +namespace MariesWonderland.Extensions; + +/// +/// Dependency injection setup for server configuration and data stores. +/// +public static class ServiceExtensions +{ + /// + /// Binds the configuration section to DI. + /// + public static IServiceCollection AddServerOptions(this IServiceCollection services, IConfiguration configuration) + { + services.Configure(configuration.GetSection(ServerOptions.SectionName)); + return services; + } + + /// + /// Loads the master database and registers and related singletons. + /// + public static IServiceCollection AddDataStores(this IServiceCollection services, IConfiguration configuration) + { + var options = configuration.GetSection(ServerOptions.SectionName).Get()!; + + var binPath = Path.Combine(options.Paths.MasterDatabase, $"{options.Data.LatestMasterDataVersion}.bin.e"); + var masterDb = BinaryMasterDataLoader.Load(binPath); + + var gameConfig = GameConfig.From(masterDb.EntityMConfig); + + services.AddSingleton(masterDb); + services.AddSingleton(gameConfig); + services.AddSingleton(); + services.AddSingleton(); + + return services; + } +} diff --git a/src/Helpers/EntityHelper.cs b/src/Helpers/EntityHelper.cs new file mode 100644 index 0000000..c0f125c --- /dev/null +++ b/src/Helpers/EntityHelper.cs @@ -0,0 +1,38 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Helpers; + +/// +/// Extension methods on for adding and retrieving user entities, +/// supporting both predicate-based and -based lookups with lazy creation. +/// +public static class EntityHelper +{ + /// Adds an entity to a list and returns it (convenience for inline new-entity seeding). + public static T AddNew(this List list, T entity) + { + list.Add(entity); + return entity; + } + + /// Returns the first element matching , creating and adding one via if none match. + public static T GetOrCreate(this List list, Func predicate, Func factory) + { + T? existing = list.FirstOrDefault(predicate); + if (existing is not null) return existing; + T entity = factory(); + list.Add(entity); + return entity; + } + + /// Returns the first element matching by , creating and adding one via if none match. + public static T GetOrCreate(this List list, long userId, Func? factory = null) + where T : IUserEntity, new() + { + T? existing = list.FirstOrDefault(e => e.UserId == userId); + if (existing is not null) return existing; + T entity = factory is not null ? factory() : new T { UserId = userId }; + list.Add(entity); + return entity; + } +} diff --git a/src/Helpers/PossessionHelper.cs b/src/Helpers/PossessionHelper.cs new file mode 100644 index 0000000..cb79c54 --- /dev/null +++ b/src/Helpers/PossessionHelper.cs @@ -0,0 +1,168 @@ +using MariesWonderland.Data; +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Helpers; + +/// +/// Central handler for granting possessions to users. Consolidates the PossessionType switch +/// logic that was duplicated across QuestService, GachaService, RewardService, and TutorialService. +/// +public static class PossessionHelper +{ + /// + /// Grants a possession to the user by type, delegating to type-specific handlers. + /// + public static void Apply(DarkUserMemoryDatabase userDb, long userId, PossessionType type, int id, int count, DarkMasterMemoryDatabase masterDb) + { + long nowMs = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(); + + switch (type) + { + case PossessionType.FREE_GEM: + userDb.EntityIUserGem[0].FreeGem += count; + break; + case PossessionType.PAID_GEM: + userDb.EntityIUserGem[0].PaidGem += count; + break; + case PossessionType.MATERIAL: + { + EntityIUserMaterial? mat = userDb.EntityIUserMaterial.FirstOrDefault(m => m.MaterialId == id); + if (mat == null) + userDb.EntityIUserMaterial.Add(new EntityIUserMaterial { UserId = userId, MaterialId = id, Count = count, FirstAcquisitionDatetime = nowMs }); + else + mat.Count += count; + break; + } + case PossessionType.CONSUMABLE_ITEM: + { + EntityIUserConsumableItem? item = userDb.EntityIUserConsumableItem.FirstOrDefault(c => c.ConsumableItemId == id); + if (item == null) + userDb.EntityIUserConsumableItem.Add(new EntityIUserConsumableItem { UserId = userId, ConsumableItemId = id, Count = count, FirstAcquisitionDatetime = nowMs }); + else + item.Count += count; + break; + } + case PossessionType.IMPORTANT_ITEM: + { + EntityIUserImportantItem? item = userDb.EntityIUserImportantItem.FirstOrDefault(c => c.ImportantItemId == id); + if (item == null) + userDb.EntityIUserImportantItem.Add(new EntityIUserImportantItem { UserId = userId, ImportantItemId = id, Count = count, FirstAcquisitionDatetime = nowMs }); + else + item.Count += count; + break; + } + case PossessionType.PREMIUM_ITEM: + { + EntityIUserPremiumItem? item = userDb.EntityIUserPremiumItem.FirstOrDefault(p => p.PremiumItemId == id); + if (item == null) + userDb.EntityIUserPremiumItem.Add(new EntityIUserPremiumItem { UserId = userId, PremiumItemId = id, AcquisitionDatetime = nowMs }); + else + item.AcquisitionDatetime = nowMs; + break; + } + case PossessionType.WEAPON: + case PossessionType.WEAPON_ENHANCED: + WeaponHelper.GrantWeapon(userDb, userId, id, masterDb); + break; + case PossessionType.COSTUME: + case PossessionType.COSTUME_ENHANCED: + GrantCostume(userDb, userId, id, masterDb); + break; + case PossessionType.COMPANION: + GrantCompanion(userDb, userId, id); + break; + case PossessionType.PARTS: + GrantParts(userDb, userId, id, masterDb); + break; + } + } + + /// + /// Grants a costume to the user, unlocking the associated character if not already owned. + /// + public static void GrantCostume(DarkUserMemoryDatabase userDb, long userId, int costumeId, DarkMasterMemoryDatabase masterDb) + { + long nowMs = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(); + string uuid = Guid.NewGuid().ToString(); + + userDb.EntityIUserCostume.Add(new EntityIUserCostume + { + UserId = userId, + UserCostumeUuid = uuid, + CostumeId = costumeId, + Level = 1, + HeadupDisplayViewId = 1, + AcquisitionDatetime = nowMs + }); + + // Auto-unlock the character tied to this costume if not already owned + EntityMCostume? masterCostume = masterDb.EntityMCostume.FirstOrDefault(c => c.CostumeId == costumeId); + if (masterCostume != null && !userDb.EntityIUserCharacter.Any(c => c.CharacterId == masterCostume.CharacterId)) + userDb.EntityIUserCharacter.Add(new EntityIUserCharacter { UserId = userId, CharacterId = masterCostume.CharacterId, Level = 1 }); + + userDb.EntityIUserCostumeActiveSkill.Add(new EntityIUserCostumeActiveSkill { UserId = userId, UserCostumeUuid = uuid, Level = 1, AcquisitionDatetime = nowMs }); + } + + /// + /// Grants a companion to the user. Skips if the companion is already owned. + /// + public static void GrantCompanion(DarkUserMemoryDatabase userDb, long userId, int companionId) + { + if (userDb.EntityIUserCompanion.Any(c => c.CompanionId == companionId)) return; + + long nowMs = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(); + userDb.EntityIUserCompanion.Add(new EntityIUserCompanion + { + UserId = userId, + UserCompanionUuid = Guid.NewGuid().ToString(), + CompanionId = companionId, + Level = 1, + HeadupDisplayViewId = 1, + AcquisitionDatetime = nowMs + }); + } + + /// + /// Grants a single Parts item to the user. Skips if the user already owns a part with the same PartsId. + /// + public static void GrantParts(DarkUserMemoryDatabase userDb, long userId, int partsId, DarkMasterMemoryDatabase masterDb) + { + if (userDb.EntityIUserParts.Any(p => p.PartsId == partsId)) return; + + long nowMs = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(); + EntityMParts? partsDef = masterDb.EntityMParts.FirstOrDefault(p => p.PartsId == partsId); + // Derive main stat ID from the lottery group: tens digit = tier, ones digit = category + int mainStatId = 0; + if (partsDef != null) + { + int groupId = partsDef.PartsStatusMainLotteryGroupId; + if (groupId > 0) + { + int tier = groupId / 10; + int category = groupId % 10; + mainStatId = (category - 1) * 4 + tier; + } + + if (!userDb.EntityIUserPartsGroupNote.Any(n => n.PartsGroupId == partsDef.PartsGroupId)) + { + userDb.EntityIUserPartsGroupNote.Add(new EntityIUserPartsGroupNote + { + UserId = userId, + PartsGroupId = partsDef.PartsGroupId, + FirstAcquisitionDatetime = nowMs + }); + } + } + + userDb.EntityIUserParts.Add(new EntityIUserParts + { + UserId = userId, + UserPartsUuid = Guid.NewGuid().ToString(), + PartsId = partsId, + Level = 1, + PartsStatusMainId = mainStatId, + AcquisitionDatetime = nowMs + }); + } +} diff --git a/src/Helpers/WeaponHelper.cs b/src/Helpers/WeaponHelper.cs new file mode 100644 index 0000000..1bc8b84 --- /dev/null +++ b/src/Helpers/WeaponHelper.cs @@ -0,0 +1,77 @@ +using MariesWonderland.Data; +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Helpers; + +/// +/// Creates all entities associated with granting a weapon: the weapon instance, note record, +/// ability/skill slots from master data, and story unlocks triggered by the ACQUISITION condition. +/// +public static class WeaponHelper +{ + /// + /// Grants a weapon to the user: creates EntityIUserWeapon, EntityIUserWeaponNote (if new), + /// ability/skill slots, and unlocks weapon stories for the ACQUISITION condition. + /// + public static void GrantWeapon(DarkUserMemoryDatabase userDb, long userId, int weaponId, DarkMasterMemoryDatabase masterDb) + { + long nowMs = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(); + string uuid = Guid.NewGuid().ToString(); + + userDb.EntityIUserWeapon.Add(new EntityIUserWeapon + { + UserId = userId, + UserWeaponUuid = uuid, + WeaponId = weaponId, + Level = 1, + AcquisitionDatetime = nowMs + }); + + // WeaponNote tracks per-weaponId metadata (max level, first acquisition); create only for the first copy + if (!userDb.EntityIUserWeaponNote.Any(n => n.WeaponId == weaponId)) + { + userDb.EntityIUserWeaponNote.Add(new EntityIUserWeaponNote + { + UserId = userId, + WeaponId = weaponId, + MaxLevel = 1, + FirstAcquisitionDatetime = nowMs + }); + } + + // Look up master definition to populate ability/skill slots + EntityMWeapon? masterWeapon = masterDb.EntityMWeapon.FirstOrDefault(w => w.WeaponId == weaponId); + if (masterWeapon == null) return; + + // Create one ability slot per entry in the weapon's ability group + foreach (EntityMWeaponAbilityGroup ag in masterDb.EntityMWeaponAbilityGroup.Where(g => g.WeaponAbilityGroupId == masterWeapon.WeaponAbilityGroupId)) + userDb.EntityIUserWeaponAbility.Add(new EntityIUserWeaponAbility { UserId = userId, UserWeaponUuid = uuid, SlotNumber = ag.SlotNumber, Level = 1 }); + + // Create one skill slot per entry in the weapon's skill group + foreach (EntityMWeaponSkillGroup sg in masterDb.EntityMWeaponSkillGroup.Where(g => g.WeaponSkillGroupId == masterWeapon.WeaponSkillGroupId)) + userDb.EntityIUserWeaponSkill.Add(new EntityIUserWeaponSkill { UserId = userId, UserWeaponUuid = uuid, SlotNumber = sg.SlotNumber, Level = 1 }); + + // Unlock weapon stories for ACQUISITION condition + if (masterWeapon.WeaponStoryReleaseConditionGroupId != 0) + { + foreach (EntityMWeaponStoryReleaseConditionGroup condRow in masterDb.EntityMWeaponStoryReleaseConditionGroup + .Where(c => c.WeaponStoryReleaseConditionGroupId == masterWeapon.WeaponStoryReleaseConditionGroupId + && c.WeaponStoryReleaseConditionType == WeaponStoryReleaseConditionType.ACQUISITION + && c.ConditionValue == 0)) + { + GrantWeaponStory(userDb, masterWeapon.WeaponId, condRow.StoryIndex, userId); + } + } + } + + /// Creates or updates a weapon story unlock record. + public static void GrantWeaponStory(DarkUserMemoryDatabase userDb, int weaponId, int storyIndex, long userId) + { + EntityIUserWeaponStory? existing = userDb.EntityIUserWeaponStory.FirstOrDefault(s => s.WeaponId == weaponId); + if (existing == null) + userDb.EntityIUserWeaponStory.Add(new EntityIUserWeaponStory { UserId = userId, WeaponId = weaponId, ReleasedMaxStoryIndex = storyIndex }); + else + existing.ReleasedMaxStoryIndex = Math.Max(existing.ReleasedMaxStoryIndex, storyIndex); + } +} diff --git a/src/Http/AssetDatabase.cs b/src/Http/AssetDatabase.cs new file mode 100644 index 0000000..fa48d40 --- /dev/null +++ b/src/Http/AssetDatabase.cs @@ -0,0 +1,434 @@ +using System.Collections.Concurrent; +using System.Security.Cryptography; +using System.Text; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace MariesWonderland.Http; + +/// +/// Resolves asset bundle/resource requests by parsing list.bin protobuf indexes and info.json alias maps. +/// +/// +/// Asset revisions are deltas, but revision 0 is a complete superset: it contains every objectId +/// that appears across all 818 revisions (confirmed by exhaustive analysis). Later revisions carry +/// updated versions of existing assets, not new ones. therefore checks the +/// client's current revision first, then falls back to revision 0 — a single 25 MB index that +/// covers the entire asset catalogue. +/// +/// +public sealed class AssetDatabase(string basePath, ILogger logger) +{ + // Lazy-initialized per-revision list.bin indexes (objectId → entry). + private readonly ConcurrentDictionary>> _listBinCache = new(); + + // Lazy-initialized per-revision info.json alias maps (fromName → alias target). + private readonly ConcurrentDictionary?>> _infoCache = new(); + + // Per-client-IP active revision (set when client fetches list.bin). + private readonly ConcurrentDictionary _clientRevisions = new(); + + // Fallback when no per-client revision is known. + private volatile string _lastKnownRevision = "0"; + + /// Records that a client fetched list.bin for the given revision. + public void RememberRevision(string clientIp, string revision) + { + _clientRevisions[clientIp] = revision; + _lastKnownRevision = revision; + } + + /// + /// Resolves an asset request to ordered file-path candidates. + /// Caller should try each candidate in order, validating size and MD5, and serve the first valid one. + /// + /// + /// The client's current revision is checked first. If the objectId is not present (e.g. a + /// recent revision carries only updated entries, not the full catalogue), revision 0 is used + /// as the fallback. Revision 0 is a confirmed superset of all objectIds across every revision. + /// + public IEnumerable Resolve(string clientIp, string assetType, string objectId) + { + string revision = _clientRevisions.TryGetValue(clientIp, out string? rev) ? rev : _lastKnownRevision; + + // If the objectId isn't in the client's current revision, fall back to revision 0. + // Revision 0 is a complete superset — every objectId in the game is present there. + Dictionary? currentIndex = LoadListBinIndex(revision); + if ((currentIndex is null || !currentIndex.ContainsKey(objectId)) && revision != "0") + revision = "0"; + + return ResolveForRevision(revision, assetType, objectId); + } + + private IEnumerable ResolveForRevision(string revision, string assetType, string objectId) + { + Dictionary? index = LoadListBinIndex(revision); + if (index is null || !index.TryGetValue(objectId, out ListBinEntry? entry)) + yield break; + + List<(string Path, bool IsLocaleFallback)> primaryPaths = BuildCandidatePaths(revision, assetType, entry.Path); + HashSet seen = []; + + foreach ((string path, bool isLocaleFallback) in primaryPaths) + { + if (!seen.Add(path)) + { + continue; + } + + yield return new AssetCandidate(path, revision, "list.bin", isLocaleFallback ? "" : entry.MD5, entry.Size, isLocaleFallback); + } + + // info.json alias redirects: if the file name maps to a different target (possibly in another revision) + Dictionary? infoIndex = LoadInfoIndex(revision); + if (infoIndex is not null) + { + foreach ((string path, bool _) in primaryPaths) + { + string baseName = Path.GetFileName(path); + if (!infoIndex.TryGetValue(baseName, out InfoAlias? alias)) continue; + + string targetRevision = alias.ToRevision ?? revision; + string? altPath = BuildAliasPath(path, revision, assetType, targetRevision, alias.ToName); + if (altPath is null) continue; + + string cacheKey = $"{targetRevision}:{altPath}"; + if (!seen.Add(cacheKey)) continue; + + yield return new AssetCandidate(altPath, targetRevision, "info.json redirect", alias.MD5 ?? "", 0); + } + } + } + + /// + /// Builds candidate filesystem paths for a list.bin path string. + /// Original path first, then locale fallbacks. Non-ASCII paths also get mojibake/fullwidth variants. + /// + private List<(string Path, bool IsLocaleFallback)> BuildCandidatePaths(string revision, string assetType, string pathStr) + { + // Safety check on raw path before any substitution + string rawFsPath = pathStr.Replace(')', '/'); + if (rawFsPath.Contains("..") || Path.IsPathRooted(rawFsPath)) + { + return []; + } + + // Build tagged entries: original first, then mojibake/fullwidth variants, then locale fallbacks + List<(string PathStr, bool IsLocaleFallback)> entries = [(pathStr, false)]; + + if (HasNonAscii(pathStr)) + { + entries.Add((Utf8ToMojibake(pathStr), false)); + entries.Add((NormalizeFullwidth(pathStr), false)); + } + + if (pathStr.Contains(")ja)")) + { + entries.Add((pathStr.Replace(")ja)", ")en)"), true)); + } + + if (pathStr.Contains(")ko)")) + { + entries.Add((pathStr.Replace(")ko)", ")en)"), true)); + } + + List<(string Path, bool IsLocaleFallback)> result = []; + HashSet seen = []; + + foreach ((string variant, bool isLocaleFallback) in entries) + { + string cleaned = variant.Replace(')', '/'); + if (cleaned.Contains("..") || Path.IsPathRooted(cleaned)) + { + continue; + } + + if (!seen.Add(cleaned)) + { + continue; + } + + string fullPath = assetType switch + { + "assetbundle" => Path.Combine(basePath, revision, "assetbundle", cleaned + ".assetbundle"), + "resources" => Path.Combine(basePath, revision, "resources", cleaned), + _ => null! + }; + + if (fullPath is not null) + { + result.Add((fullPath, isLocaleFallback)); + } + } + + return result; + } + + private static bool HasNonAscii(string s) => s.Any(c => c >= '\x80'); + + // Re-encodes non-ASCII chars as if each UTF-8 byte were a Latin-1 codepoint (double-encoding). + // Matches filenames extracted by tools that misinterpret UTF-8 paths as Latin-1. + private static string Utf8ToMojibake(string s) => + new string(Encoding.UTF8.GetBytes(s).Select(b => (char)b).ToArray()); + + // Replaces fullwidth Unicode chars (U+FF01–U+FF5E) with their ASCII equivalents (U+0021–U+007E). + private static string NormalizeFullwidth(string s) => + new string(s.Select(c => c is >= '\uFF01' and <= '\uFF5E' ? (char)(c - 0xFF01 + 0x21) : c).ToArray()); + + /// + /// Builds the filesystem path for an info.json alias: same directory structure, different revision + filename. + /// + private string? BuildAliasPath(string originalPath, string originalRevision, string assetType, + string targetRevision, string targetName) + { + string typeRoot = Path.Combine(basePath, originalRevision, assetType); + string rel = Path.GetRelativePath(typeRoot, originalPath); + if (rel.StartsWith("..") || Path.IsPathRooted(rel)) return null; + + string dir = Path.GetDirectoryName(rel) ?? ""; + return Path.Combine(basePath, targetRevision, assetType, dir, targetName); + } + + private Dictionary? LoadListBinIndex(string revision) + { + Lazy> lazy = _listBinCache.GetOrAdd( + revision, rev => new Lazy>(() => + { + string path = Path.Combine(basePath, rev, "list.bin"); + if (!File.Exists(path)) return []; + byte[] data = File.ReadAllBytes(path); + Dictionary index = ListBinParser.Parse(data.AsSpan()); + logger.LogDebug("Loaded list.bin for revision {Revision}: {Count} entries", rev, index.Count); + return index; + })); + return lazy.Value; + } + + private Dictionary? LoadInfoIndex(string revision) + { + Lazy?> lazy = _infoCache.GetOrAdd( + revision, rev => new Lazy?>(() => + { + string path = Path.Combine(basePath, rev, "info.json"); + if (!File.Exists(path)) return null; + try + { + InfoJsonEntry[]? entries = JsonSerializer.Deserialize(File.ReadAllText(path)); + if (entries is null) return null; + + Dictionary result = []; + foreach (InfoJsonEntry e in entries) + { + if (!string.IsNullOrEmpty(e.FromName) && !string.IsNullOrEmpty(e.ToName)) + result[e.FromName] = new InfoAlias(e.ToName, e.ToRevision?.ToString(), e.MD5); + } + return result; + } + catch (Exception ex) + { + logger.LogWarning(ex, "Failed to parse info.json for revision {Revision}", rev); + return null; + } + })); + return lazy.Value; + } + + // MD5 cache: path → (size, modTimeUtcTicks, md5Hex) + private readonly ConcurrentDictionary _md5Cache = new(); + + /// + /// Computes and caches the MD5 hex digest for a file, using cached result when size and modification time are unchanged. + /// + public string? ComputeMd5(string filePath, FileInfo info) + { + long modTicks = info.LastWriteTimeUtc.Ticks; + if (_md5Cache.TryGetValue(filePath, out (long Size, long ModTimeTicks, string Md5) cached) + && cached.Size == info.Length && cached.ModTimeTicks == modTicks) + { + return cached.Md5; + } + + try + { + byte[] hash = MD5.HashData(File.ReadAllBytes(filePath)); + string hex = Convert.ToHexStringLower(hash); + _md5Cache[filePath] = (info.Length, modTicks, hex); + return hex; + } + catch (Exception ex) + { + logger.LogWarning(ex, "Failed to compute MD5 for {FilePath}", filePath); + return null; + } + } +} + +public record ListBinEntry(string Path, long Size, string MD5); +public record AssetCandidate(string Path, string Revision, string Source, string ExpectedMD5, long ExpectedSize, bool IsLocaleFallback = false); +public record InfoAlias(string ToName, string? ToRevision, string? MD5); + +public sealed class InfoJsonEntry +{ + [JsonPropertyName("from-name")] public string FromName { get; init; } = ""; + [JsonPropertyName("to-name")] public string ToName { get; init; } = ""; + [JsonPropertyName("to-revision")] public int? ToRevision { get; init; } + [JsonPropertyName("md5")] public string? MD5 { get; init; } +} + +/// +/// Parses the Octo asset management list.bin binary into a dictionary of objectId → asset entry. +/// +/// +/// list.bin outer format — a protobuf message with mixed fields: +/// +/// Field 1 (varint): revision number (header metadata, skipped) +/// Field 2 (repeated, length-delimited): one entry per asset +/// +/// The outer loop treats every length-delimited field as a potential entry regardless of field +/// number, skipping non-length-delimited fields. +/// +/// +/// +/// Entry inner format: +/// +/// Field 1 (varint): category index (ignored) +/// Field 3 (string): path, using ) as directory separator +/// Field 4 (varint): file size in bytes +/// Field 5 (varint): CRC / hash (ignored) +/// Field 6 (varint): unknown (ignored) +/// Field 9 (varint): asset type index (ignored) +/// Field 10 (string): MD5 hex digest +/// Field 11 (string): objectId — 6-byte ASCII key used in asset request URLs +/// Field 12 (varint): timestamp (8-byte varint — requires reading up to 10 varint bytes) +/// Field 13 (varint): revision number (ignored) +/// +/// +/// +/// +/// Important: varints in list.bin can be up to 8 bytes (field 12 carries a Unix timestamp +/// in milliseconds). The reader must not bail out after 5 bytes (35-bit limit) like a naive +/// int32 varint reader would — it must continue reading up to 10 bytes, discarding high bits +/// that do not fit in int32, as the source format uses 64-bit integers. +/// +/// +internal static class ListBinParser +{ + /// + /// Parses the list.bin binary data into a dictionary mapping objectId to asset entry. + /// + public static Dictionary Parse(ReadOnlySpan data) + { + Dictionary idx = []; + int pos = 0; + + while (pos < data.Length) + { + if (!TryReadVarint(data, ref pos, out int tag)) break; + int wireType = tag & 0x7; + + if (wireType == 2) + { + if (!TryReadVarint(data, ref pos, out int length) || length < 0 || pos + length > data.Length) + break; + + // Always advance past this field, whether or not the entry parses successfully. + int entryStart = pos; + if (TryParseEntry(data.Slice(pos, length), out string? objectId, out ListBinEntry entry) && objectId != null) + idx[objectId] = entry; + + pos = entryStart + length; + } + else + { + // Skip varint / fixed-width outer fields (e.g. field 1 = revision header). + if (!TrySkipField(wireType, data, ref pos)) break; + } + } + + return idx; + } + + private static bool TryParseEntry(ReadOnlySpan data, out string? objectId, out ListBinEntry entry) + { + objectId = null; + string path = ""; + long size = 0; + string md5 = ""; + int pos = 0; + + while (pos < data.Length) + { + if (!TryReadVarint(data, ref pos, out int tag)) { entry = default!; return false; } + int fieldNum = tag >> 3; + int wireType = tag & 0x7; + + switch (fieldNum) + { + case 3: // path + if (wireType != 2 || !TryReadString(data, ref pos, out path)) { entry = default!; return false; } + break; + case 4: // size (varint) + if (wireType != 0 || !TryReadVarint(data, ref pos, out int sz)) { entry = default!; return false; } + if (sz >= 256) size = sz; + break; + case 10: // md5 + if (wireType != 2 || !TryReadString(data, ref pos, out md5)) { entry = default!; return false; } + break; + case 11: // objectId + if (wireType != 2 || !TryReadString(data, ref pos, out string oid)) { entry = default!; return false; } + objectId = oid; + break; + default: + // Unknown field — skip and continue + if (!TrySkipField(wireType, data, ref pos)) { entry = default!; return false; } + break; + } + } + + if (objectId is null || string.IsNullOrEmpty(path)) { entry = default!; return false; } + entry = new ListBinEntry(path, size, md5); + return true; + } + + private static bool TryReadString(ReadOnlySpan data, ref int pos, out string value) + { + value = ""; + if (!TryReadVarint(data, ref pos, out int length) || length < 0 || pos + length > data.Length) + return false; + value = Encoding.UTF8.GetString(data.Slice(pos, length)); + pos += length; + return true; + } + + /// Reads a protobuf varint from at , advancing pos. + private static bool TryReadVarint(ReadOnlySpan data, ref int pos, out int value) + { + value = 0; + int shift = 0; + while (pos < data.Length) + { + byte b = data[pos++]; + // Accumulate into value only while bits fit in int32; still read (and discard) higher bytes. + if (shift < 32) + value |= (b & 0x7F) << shift; + if ((b & 0x80) == 0) return true; + shift += 7; + if (shift >= 70) return false; // max 10 bytes + } + return false; + } + + private static bool TrySkipField(int wireType, ReadOnlySpan data, ref int pos) + { + switch (wireType) + { + case 0: return TryReadVarint(data, ref pos, out _); + case 1: if (pos + 8 > data.Length) return false; pos += 8; return true; + case 2: + if (!TryReadVarint(data, ref pos, out int len) || len < 0 || pos + len > data.Length) return false; + pos += len; return true; + case 5: if (pos + 4 > data.Length) return false; pos += 4; return true; + default: return false; + } + } +} diff --git a/src/Interceptors/AutoSaveInterceptor.cs b/src/Interceptors/AutoSaveInterceptor.cs new file mode 100644 index 0000000..bf00add --- /dev/null +++ b/src/Interceptors/AutoSaveInterceptor.cs @@ -0,0 +1,59 @@ +using Grpc.Core; +using Grpc.Core.Interceptors; +using MariesWonderland.Data; +using MariesWonderland.Extensions; +using System.Text.Json; + +namespace MariesWonderland.Interceptors; + +/// +/// gRPC interceptor that persists the user's in-memory database to a timestamped JSON file in +/// the Saves/ directory after every API call. Runs asynchronously on a background thread so it +/// does not block the response. Useful for debugging and post-mortem analysis. +/// +public class AutoSaveInterceptor(UserDataStore store, ILogger logger) : Interceptor +{ + private static readonly JsonSerializerOptions JsonOptions = new() { WriteIndented = true }; + private static readonly string SavesDirectory = Path.Combine(AppContext.BaseDirectory, "Saves"); + + /// + /// Intercepts gRPC calls to auto-save the user's database to disk after each request. + /// + public override async Task UnaryServerHandler( + TRequest request, + ServerCallContext context, + UnaryServerMethod continuation) + { + TResponse response = await continuation(request, context); + + long userId = context.GetUserId(); + if (userId > 0 && store.TryGet(userId, out DarkUserMemoryDatabase userDb)) + { + string[] parts = context.Method.Split('/', StringSplitOptions.RemoveEmptyEntries); + string methodSuffix = parts.Length >= 2 ? $"{parts[^2]}_{parts[^1]}" : context.Method.TrimStart('/').Replace('/', '_'); + _ = Task.Run(() => SaveUser(userId, userDb, methodSuffix)); + } + + return response; + } + + /// + /// Serializes and writes a user's database to a timestamped JSON file. + /// + private void SaveUser(long userId, DarkUserMemoryDatabase userDb, string methodSuffix) + { + try + { + Directory.CreateDirectory(SavesDirectory); + string timestamp = DateTime.UtcNow.ToString("yyyyMMdd_HHmmss"); + string filePath = Path.Combine(SavesDirectory, $"{userId}_{timestamp}_{methodSuffix}.json"); + string json = JsonSerializer.Serialize(userDb, JsonOptions); + File.WriteAllText(filePath, json); + //logger.LogDebug("Auto-saved user {UserId} to {FilePath}", userId, filePath); + } + catch (Exception ex) + { + logger.LogError(ex, "AutoSaveInterceptor failed to save user {UserId}", userId); + } + } +} diff --git a/src/Interceptors/CommonHeaderInterceptor.cs b/src/Interceptors/CommonHeaderInterceptor.cs new file mode 100644 index 0000000..f2fc374 --- /dev/null +++ b/src/Interceptors/CommonHeaderInterceptor.cs @@ -0,0 +1,28 @@ +using Grpc.Core; +using Grpc.Core.Interceptors; + +namespace MariesWonderland.Interceptors; + +/// +/// gRPC interceptor that appends standard response metadata to every call. +/// Currently adds the x-apb-response-datetime trailer with the server's UTC timestamp +/// in Unix milliseconds, which the client uses for time synchronisation. +/// +public class CommonHeaderInterceptor : Interceptor +{ + /// + /// Runs after the service handler completes and appends the response-datetime trailer. + /// + public override async Task UnaryServerHandler( + TRequest request, + ServerCallContext context, + UnaryServerMethod continuation) + { + TResponse response = await continuation(request, context); + + Metadata trailers = context.ResponseTrailers; + trailers.Add("x-apb-response-datetime", DateTimeOffset.UtcNow.ToUnixTimeMilliseconds().ToString()); + + return response; + } +} diff --git a/src/Interceptors/DiffInterceptor.cs b/src/Interceptors/DiffInterceptor.cs new file mode 100644 index 0000000..e53c95f --- /dev/null +++ b/src/Interceptors/DiffInterceptor.cs @@ -0,0 +1,112 @@ +using Google.Protobuf.Collections; +using Grpc.Core; +using Grpc.Core.Interceptors; +using MariesWonderland.Data; +using MariesWonderland.Extensions; +using MariesWonderland.Proto.Data; +using MariesWonderland.Proto.User; +using System.Collections.Concurrent; +using System.Reflection; + +namespace MariesWonderland.Interceptors; + +/// +/// gRPC interceptor that automatically computes and attaches DiffUserData to every response +/// that declares the field. Takes a before-snapshot of the user's database prior to service execution, +/// then computes the delta after the service mutates state. This means individual services never need +/// to populate DiffUserData manually. +/// Special-cases the RegisterUser flow where no userId is available in request headers: extracts the +/// newly assigned userId from the response to perform a full-state diff against an empty baseline. +/// +public class DiffInterceptor(UserDataStore store, ILogger logger) : Interceptor +{ + private static readonly ConcurrentDictionary PropertyCache = new(); + private static readonly ConcurrentDictionary UserIdPropertyCache = new(); + + /// + /// Intercepts every unary gRPC call. If the response type has a DiffUserData map field, + /// snapshots user state before execution, runs the handler, then populates the diff. + /// + public override async Task UnaryServerHandler( + TRequest request, + ServerCallContext context, + UnaryServerMethod continuation) + { + long userId = context.GetUserId(); + PropertyInfo? diffProp = PropertyCache.GetOrAdd(typeof(TResponse), static t => t.GetProperty(nameof(AuthUserResponse.DiffUserData))); + + // Response type has no DiffUserData property — pass through without snapshotting + if (diffProp is null) + { + return await continuation(request, context); + } + + if (userId != 0) + { + // Normal path: userId is known from request headers — snapshot before, diff after + Dictionary before = store.TryGet(userId, out DarkUserMemoryDatabase userDb) + ? UserDataDiffBuilder.Snapshot(userDb) + : []; + + TResponse response = await continuation(request, context); + + try + { + if (diffProp.GetValue(response) is MapField mapField) + { + Dictionary delta = UserDataDiffBuilder.Delta(before, userDb); + foreach ((string key, DiffData value) in delta) + { + mapField[key] = value; + } + + if (delta.Count > 0) + { + string[] names = [.. delta.Keys]; + Array.Sort(names, StringComparer.Ordinal); + context.ResponseTrailers.Add("x-apb-update-user-data-names", string.Join(",", names)); + } + } + } + catch (Exception ex) + { + logger.LogError(ex, "DiffInterceptor failed to populate DiffUserData on {Method}", context.Method); + } + + return response; + } + else + { + // RegisterUser path: userId=0 in headers because the user doesn't exist yet. + // Run the handler first, then extract the newly assigned userId from the response + // and diff against an empty baseline to send all initial state to the client. + TResponse response = await continuation(request, context); + + try + { + PropertyInfo? userIdProp = UserIdPropertyCache.GetOrAdd(typeof(TResponse), static t => t.GetProperty("UserId")); + + if (userIdProp?.GetValue(response) is long newUserId && newUserId != 0) + { + if (store.TryGet(newUserId, out DarkUserMemoryDatabase userDb)) + { + // Only populate if the map is empty (service didn't set it manually) + if (diffProp.GetValue(response) is MapField mapField && mapField.Count == 0) + { + foreach ((string key, DiffData value) in UserDataDiffBuilder.Delta([], userDb)) + { + mapField[key] = value; + } + } + } + } + } + catch (Exception ex) + { + logger.LogError(ex, "DiffInterceptor failed to populate DiffUserData on {Method}", context.Method); + } + + return response; + } + } +} diff --git a/src/Interceptors/LoggingInterceptor.cs b/src/Interceptors/LoggingInterceptor.cs new file mode 100644 index 0000000..61ed3a7 --- /dev/null +++ b/src/Interceptors/LoggingInterceptor.cs @@ -0,0 +1,172 @@ +using Google.Protobuf; +using Grpc.Core; +using Grpc.Core.Interceptors; +using MariesWonderland.Proto.Data; +using MariesWonderland.Proto.User; +using System.Text; +using System.Text.Json; +using System.Text.Json.Nodes; + +namespace MariesWonderland.Interceptors; + +/// +/// gRPC interceptor that logs every request/response pair. Writes compact JSON summaries to the +/// configured logger at Debug level and full indented payloads to timestamped files in the GRPC/ +/// directory. Large fields (DiffUserData, UserDataJson, TableName) are stripped from log output +/// to keep console logs readable. +/// +public class LoggingInterceptor(ILogger logger) : Interceptor +{ + private static readonly List ExcludedPropertyNames = [ + nameof(AuthUserResponse.DiffUserData), + nameof(TableNameList.TableName), + nameof(UserDataGetResponse.UserDataJson) + ]; + + private static readonly JsonSerializerOptions IndentedOptions = new() { WriteIndented = true }; + private static readonly string GrpcDirectory = Path.Combine(AppContext.BaseDirectory, "GRPC"); + + /// + /// Intercepts gRPC calls to log request/response JSON and write full payloads to disk. + /// + public override async Task UnaryServerHandler( + TRequest request, + ServerCallContext context, + UnaryServerMethod continuation) + { + string methodName = context.Method; + + if (logger.IsEnabled(LogLevel.Debug)) + { + logger.LogDebug("[GRPC] >> {Method} (request)", methodName); + logger.LogDebug("{Json}", SerializeForLog(request)); + } + + TResponse response = await continuation(request, context); + + if (logger.IsEnabled(LogLevel.Debug)) + { + logger.LogDebug("[GRPC] << {Method} (response)", methodName); + logger.LogDebug("{Json}", SerializeForLog(response)); + } + + _ = Task.Run(() => WriteToDisk(methodName, request, response)); + + return response; + } + + /// + /// Writes a timestamped JSON file containing the full request and response for a gRPC call. + /// + private void WriteToDisk(string methodName, TRequest request, TResponse response) + { + try + { + string[] parts = methodName.Split('/', StringSplitOptions.RemoveEmptyEntries); + string methodSuffix = parts.Length >= 2 ? $"{parts[^2]}_{parts[^1]}" : methodName.TrimStart('/').Replace('/', '_'); + string timestamp = DateTime.UtcNow.ToString("yyyyMMdd_HHmmss_fff"); + string fileName = $"{timestamp}_{methodSuffix}.json"; + + Directory.CreateDirectory(GrpcDirectory); + string filePath = Path.Combine(GrpcDirectory, fileName); + + StringBuilder sb = new(); + sb.AppendLine("{"); + sb.AppendLine($" \"method\": {JsonSerializer.Serialize(methodName)},"); + sb.AppendLine($" \"timestamp\": \"{DateTime.UtcNow:O}\","); + sb.AppendLine($" \"request\": {SerializeFull(request)},"); + sb.AppendLine($" \"response\": {SerializeFull(response)}"); + sb.AppendLine("}"); + + File.WriteAllText(filePath, sb.ToString()); + } + catch (Exception ex) + { + logger.LogError(ex, "LoggingInterceptor failed to write GRPC log for {Method}", methodName); + } + } + + /// + /// Serializes an object to indented JSON, using protobuf JSON format for IMessage types. + /// + private static string SerializeFull(object? obj) + { + if (obj is null) return "null"; + if (obj is IMessage message) + { + string json = JsonFormatter.Default.Format(message); + // Re-format with indentation for readability + try + { + JsonNode? node = JsonNode.Parse(json); + return node?.ToJsonString(IndentedOptions) ?? json; + } + catch { return json; } + } + return JsonSerializer.Serialize(obj, IndentedOptions); + } + + /// + /// Serializes an object to compact JSON for log output, stripping excluded properties. + /// + private static string SerializeForLog(object obj) + { + string json = obj is IMessage message + ? JsonFormatter.Default.Format(message) + : JsonSerializer.Serialize(obj); + + return RemovePropertiesFromJson(json); + } + + /// + /// Removes excluded property names from a JSON string. + /// + private static string RemovePropertiesFromJson(string json) + { + try + { + JsonNode? node = JsonNode.Parse(json); + if (node is null) return json; + + RemoveProperties(node); + + // Use compact JSON (no indentation) to match prior logging style. + return node.ToJsonString(new JsonSerializerOptions { WriteIndented = false }); + } + catch + { + // If parsing fails for any reason, return the original JSON so logging still occurs. + return json; + } + } + + /// + /// Recursively removes excluded properties from a JsonNode tree. + /// + private static void RemoveProperties(JsonNode? node) + { + if (node is JsonObject obj) + { + // Iterate over a snapshot of the keys because we'll be mutating the object. + foreach (var key in obj.Select(kvp => kvp.Key).ToList()) + { + if (ExcludedPropertyNames.Contains(key, StringComparer.OrdinalIgnoreCase)) + { + obj.Remove(key); + } + else + { + RemoveProperties(obj[key]); + } + } + } + else if (node is JsonArray arr) + { + foreach (var item in arr) + { + RemoveProperties(item); + } + } + // Primitives (JsonValue) do not contain nested properties; nothing to do. + } +} \ No newline at end of file diff --git a/src/MariesWonderland.csproj b/src/MariesWonderland.csproj new file mode 100644 index 0000000..f67a47b --- /dev/null +++ b/src/MariesWonderland.csproj @@ -0,0 +1,23 @@ + + + + net10.0 + enable + enable + + + + + + + + + + + + + + + + + diff --git a/src/MasterMemory/HeaderFormatterResolver.cs b/src/MasterMemory/HeaderFormatterResolver.cs new file mode 100644 index 0000000..5c5408f --- /dev/null +++ b/src/MasterMemory/HeaderFormatterResolver.cs @@ -0,0 +1,37 @@ +using MessagePack; +using MessagePack.Formatters; + +namespace MariesWonderland.MasterMemory; + +/// +/// MessagePack resolver used exclusively to deserialize the binary database header +/// (Dictionary<string, (int, int)> mapping table names to data offsets). +/// +internal sealed class HeaderFormatterResolver : IFormatterResolver +{ + public static readonly IFormatterResolver Instance = new HeaderFormatterResolver(); + + /// Pre-configured options using this resolver (no compression for header). + public static readonly MessagePackSerializerOptions StandardOptions = + MessagePackSerializerOptions.Standard.WithResolver(Instance); + + private HeaderFormatterResolver() { } + + /// + public IMessagePackFormatter? GetFormatter() + { + if (typeof(T) == typeof(Dictionary)) + return (IMessagePackFormatter)(object)new DictionaryFormatter(); + + if (typeof(T) == typeof(string)) + return (IMessagePackFormatter)(object)NullableStringFormatter.Instance; + + if (typeof(T) == typeof((int, int))) + return (IMessagePackFormatter)(object)new IntIntValueTupleFormatter(); + + if (typeof(T) == typeof(int)) + return (IMessagePackFormatter)(object)Int32Formatter.Instance; + + return null; + } +} diff --git a/src/MasterMemory/IntIntValueTupleFormatter.cs b/src/MasterMemory/IntIntValueTupleFormatter.cs new file mode 100644 index 0000000..05090a8 --- /dev/null +++ b/src/MasterMemory/IntIntValueTupleFormatter.cs @@ -0,0 +1,30 @@ +using MessagePack; +using MessagePack.Formatters; + +namespace MariesWonderland.MasterMemory; + +/// +/// MessagePack formatter for (int, int) value tuples stored as 2-element arrays +/// in the master database binary header. +/// +internal sealed class IntIntValueTupleFormatter : IMessagePackFormatter<(int, int)> +{ + public void Serialize(ref MessagePackWriter writer, (int, int) value, MessagePackSerializerOptions options) + { + writer.WriteArrayHeader(2); + writer.WriteInt32(value.Item1); + writer.WriteInt32(value.Item2); + } + + public (int, int) Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + if (reader.IsNil) + throw new InvalidOperationException("Header tuple entry is nil."); + + var count = reader.ReadArrayHeader(); + if (count != 2) + throw new InvalidOperationException($"Expected 2-element tuple, got {count}."); + + return (reader.ReadInt32(), reader.ReadInt32()); + } +} diff --git a/src/MasterMemory/InternStringResolver.cs b/src/MasterMemory/InternStringResolver.cs new file mode 100644 index 0000000..95bdc48 --- /dev/null +++ b/src/MasterMemory/InternStringResolver.cs @@ -0,0 +1,29 @@ +using MessagePack; +using MessagePack.Formatters; + +namespace MariesWonderland.MasterMemory; + +/// +/// MessagePack resolver that interns deserialized strings to reduce memory usage from +/// repeated values (e.g. asset paths that appear across many master data records). +/// +internal sealed class InternStringResolver : IFormatterResolver, IMessagePackFormatter +{ + private readonly IFormatterResolver _inner; + + public InternStringResolver(IFormatterResolver inner) => _inner = inner; + + /// + public IMessagePackFormatter? GetFormatter() => _inner.GetFormatter(); + + /// + public void Serialize(ref MessagePackWriter writer, string value, MessagePackSerializerOptions options) + => throw new NotSupportedException(); + + /// + public string? Deserialize(ref MessagePackReader reader, MessagePackSerializerOptions options) + { + var value = reader.ReadString(); + return value is not null ? string.Intern(value) : value; + } +} diff --git a/src/MasterMemory/MemoryTableAttribute.cs b/src/MasterMemory/MemoryTableAttribute.cs new file mode 100644 index 0000000..5fa2d41 --- /dev/null +++ b/src/MasterMemory/MemoryTableAttribute.cs @@ -0,0 +1,33 @@ +using System.Text; + +namespace MariesWonderland.MasterMemory; + +/// +/// Maps an EntityM* class name to its binary table key used in the master database header. +/// The table name is derived by converting the class name to snake_case and dropping the +/// leading "entity_" prefix (e.g. "EntityMCharacter" → "m_character"). +/// +[AttributeUsage(AttributeTargets.Class)] +public sealed class MemoryTableAttribute : Attribute +{ + /// The table key as it appears in the binary database header. + public string TableName { get; } + + public MemoryTableAttribute(string tableName) + { + // "EntityMCharacter" → "entity_m_character" → split once on '_' → "m_character" + TableName = ToSnakeCase(tableName).Split('_', 2)[1]; + } + + private static string ToSnakeCase(string value) + { + var sb = new StringBuilder(value.Length + 10); + for (int i = 0; i < value.Length; i++) + { + if (i > 0 && char.IsUpper(value[i])) + sb.Append('_'); + sb.Append(char.ToLowerInvariant(value[i])); + } + return sb.ToString(); + } +} diff --git a/src/Models/Entities/EntityIUser.cs b/src/Models/Entities/EntityIUser.cs new file mode 100644 index 0000000..b13f905 --- /dev/null +++ b/src/Models/Entities/EntityIUser.cs @@ -0,0 +1,26 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUser : IUserEntity +{ + public long UserId { get; set; } + + public long PlayerId { get; set; } + + public int OsType { get; set; } + + public PlatformType PlatformType { get; set; } + + public int UserRestrictionType { get; set; } + + public long RegisterDatetime { get; set; } + + public long GameStartDatetime { get; set; } + + public int BirthYear { get; set; } + + public int BirthMonth { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserApple.cs b/src/Models/Entities/EntityIUserApple.cs new file mode 100644 index 0000000..1b41c50 --- /dev/null +++ b/src/Models/Entities/EntityIUserApple.cs @@ -0,0 +1,12 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserApple : IUserEntity +{ + public long UserId { get; set; } + + public string AppleId { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserAutoSaleSettingDetail.cs b/src/Models/Entities/EntityIUserAutoSaleSettingDetail.cs new file mode 100644 index 0000000..5e80755 --- /dev/null +++ b/src/Models/Entities/EntityIUserAutoSaleSettingDetail.cs @@ -0,0 +1,14 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserAutoSaleSettingDetail : IUserEntity +{ + public long UserId { get; set; } + + public int PossessionAutoSaleItemType { get; set; } + + public string PossessionAutoSaleItemValue { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserBeginnerCampaign.cs b/src/Models/Entities/EntityIUserBeginnerCampaign.cs new file mode 100644 index 0000000..258c291 --- /dev/null +++ b/src/Models/Entities/EntityIUserBeginnerCampaign.cs @@ -0,0 +1,14 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserBeginnerCampaign : IUserEntity +{ + public long UserId { get; set; } + + public int BeginnerCampaignId { get; set; } + + public long CampaignRegisterDatetime { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserBigHuntMaxScore.cs b/src/Models/Entities/EntityIUserBigHuntMaxScore.cs new file mode 100644 index 0000000..1b66ce0 --- /dev/null +++ b/src/Models/Entities/EntityIUserBigHuntMaxScore.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserBigHuntMaxScore : IUserEntity +{ + public long UserId { get; set; } + + public int BigHuntBossId { get; set; } + + public long MaxScore { get; set; } + + public long MaxScoreUpdateDatetime { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserBigHuntProgressStatus.cs b/src/Models/Entities/EntityIUserBigHuntProgressStatus.cs new file mode 100644 index 0000000..563be21 --- /dev/null +++ b/src/Models/Entities/EntityIUserBigHuntProgressStatus.cs @@ -0,0 +1,18 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserBigHuntProgressStatus : IUserEntity +{ + public long UserId { get; set; } + + public int CurrentBigHuntBossQuestId { get; set; } + + public int CurrentBigHuntQuestId { get; set; } + + public int CurrentQuestSceneId { get; set; } + + public bool IsDryRun { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserBigHuntScheduleMaxScore.cs b/src/Models/Entities/EntityIUserBigHuntScheduleMaxScore.cs new file mode 100644 index 0000000..2bcdd28 --- /dev/null +++ b/src/Models/Entities/EntityIUserBigHuntScheduleMaxScore.cs @@ -0,0 +1,18 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserBigHuntScheduleMaxScore : IUserEntity +{ + public long UserId { get; set; } + + public int BigHuntScheduleId { get; set; } + + public int BigHuntBossId { get; set; } + + public long MaxScore { get; set; } + + public long MaxScoreUpdateDatetime { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserBigHuntStatus.cs b/src/Models/Entities/EntityIUserBigHuntStatus.cs new file mode 100644 index 0000000..05b914a --- /dev/null +++ b/src/Models/Entities/EntityIUserBigHuntStatus.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserBigHuntStatus : IUserEntity +{ + public long UserId { get; set; } + + public int BigHuntBossQuestId { get; set; } + + public int DailyChallengeCount { get; set; } + + public long LatestChallengeDatetime { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserBigHuntWeeklyMaxScore.cs b/src/Models/Entities/EntityIUserBigHuntWeeklyMaxScore.cs new file mode 100644 index 0000000..2dfd353 --- /dev/null +++ b/src/Models/Entities/EntityIUserBigHuntWeeklyMaxScore.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserBigHuntWeeklyMaxScore : IUserEntity +{ + public long UserId { get; set; } + + public long BigHuntWeeklyVersion { get; set; } + + public AttributeType AttributeType { get; set; } + + public long MaxScore { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserBigHuntWeeklyStatus.cs b/src/Models/Entities/EntityIUserBigHuntWeeklyStatus.cs new file mode 100644 index 0000000..40fad5b --- /dev/null +++ b/src/Models/Entities/EntityIUserBigHuntWeeklyStatus.cs @@ -0,0 +1,14 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserBigHuntWeeklyStatus : IUserEntity +{ + public long UserId { get; set; } + + public long BigHuntWeeklyVersion { get; set; } + + public bool IsReceivedWeeklyReward { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserCageOrnamentReward.cs b/src/Models/Entities/EntityIUserCageOrnamentReward.cs new file mode 100644 index 0000000..60c535e --- /dev/null +++ b/src/Models/Entities/EntityIUserCageOrnamentReward.cs @@ -0,0 +1,14 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserCageOrnamentReward : IUserEntity +{ + public long UserId { get; set; } + + public int CageOrnamentId { get; set; } + + public long AcquisitionDatetime { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserCharacter.cs b/src/Models/Entities/EntityIUserCharacter.cs new file mode 100644 index 0000000..01a48c1 --- /dev/null +++ b/src/Models/Entities/EntityIUserCharacter.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserCharacter : IUserEntity +{ + public long UserId { get; set; } + + public int CharacterId { get; set; } + + public int Level { get; set; } + + public int Exp { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserCharacterBoard.cs b/src/Models/Entities/EntityIUserCharacterBoard.cs new file mode 100644 index 0000000..a8fa280 --- /dev/null +++ b/src/Models/Entities/EntityIUserCharacterBoard.cs @@ -0,0 +1,20 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserCharacterBoard : IUserEntity +{ + public long UserId { get; set; } + + public int CharacterBoardId { get; set; } + + public int PanelReleaseBit1 { get; set; } + + public int PanelReleaseBit2 { get; set; } + + public int PanelReleaseBit3 { get; set; } + + public int PanelReleaseBit4 { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserCharacterBoardAbility.cs b/src/Models/Entities/EntityIUserCharacterBoardAbility.cs new file mode 100644 index 0000000..eb2f02a --- /dev/null +++ b/src/Models/Entities/EntityIUserCharacterBoardAbility.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserCharacterBoardAbility : IUserEntity +{ + public long UserId { get; set; } + + public int CharacterId { get; set; } + + public int AbilityId { get; set; } + + public int Level { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserCharacterBoardCompleteReward.cs b/src/Models/Entities/EntityIUserCharacterBoardCompleteReward.cs new file mode 100644 index 0000000..a50594c --- /dev/null +++ b/src/Models/Entities/EntityIUserCharacterBoardCompleteReward.cs @@ -0,0 +1,12 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserCharacterBoardCompleteReward : IUserEntity +{ + public long UserId { get; set; } + + public int CharacterBoardCompleteRewardId { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserCharacterBoardStatusUp.cs b/src/Models/Entities/EntityIUserCharacterBoardStatusUp.cs new file mode 100644 index 0000000..a80c5d5 --- /dev/null +++ b/src/Models/Entities/EntityIUserCharacterBoardStatusUp.cs @@ -0,0 +1,26 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserCharacterBoardStatusUp : IUserEntity +{ + public long UserId { get; set; } + + public int CharacterId { get; set; } + + public StatusCalculationType StatusCalculationType { get; set; } + + public int Hp { get; set; } + + public int Attack { get; set; } + + public int Vitality { get; set; } + + public int Agility { get; set; } + + public int CriticalRatio { get; set; } + + public int CriticalAttack { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserCharacterCostumeLevelBonus.cs b/src/Models/Entities/EntityIUserCharacterCostumeLevelBonus.cs new file mode 100644 index 0000000..3d566e2 --- /dev/null +++ b/src/Models/Entities/EntityIUserCharacterCostumeLevelBonus.cs @@ -0,0 +1,26 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserCharacterCostumeLevelBonus : IUserEntity +{ + public long UserId { get; set; } + + public int CharacterId { get; set; } + + public StatusCalculationType StatusCalculationType { get; set; } + + public int Hp { get; set; } + + public int Attack { get; set; } + + public int Vitality { get; set; } + + public int Agility { get; set; } + + public int CriticalRatio { get; set; } + + public int CriticalAttack { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserCharacterRebirth.cs b/src/Models/Entities/EntityIUserCharacterRebirth.cs new file mode 100644 index 0000000..c4235c2 --- /dev/null +++ b/src/Models/Entities/EntityIUserCharacterRebirth.cs @@ -0,0 +1,14 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserCharacterRebirth : IUserEntity +{ + public long UserId { get; set; } + + public int CharacterId { get; set; } + + public int RebirthCount { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserCharacterViewerField.cs b/src/Models/Entities/EntityIUserCharacterViewerField.cs new file mode 100644 index 0000000..227f3c7 --- /dev/null +++ b/src/Models/Entities/EntityIUserCharacterViewerField.cs @@ -0,0 +1,14 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserCharacterViewerField : IUserEntity +{ + public long UserId { get; set; } + + public int CharacterViewerFieldId { get; set; } + + public long ReleaseDatetime { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserComebackCampaign.cs b/src/Models/Entities/EntityIUserComebackCampaign.cs new file mode 100644 index 0000000..0fc4b69 --- /dev/null +++ b/src/Models/Entities/EntityIUserComebackCampaign.cs @@ -0,0 +1,14 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserComebackCampaign : IUserEntity +{ + public long UserId { get; set; } + + public int ComebackCampaignId { get; set; } + + public long ComebackDatetime { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserCompanion.cs b/src/Models/Entities/EntityIUserCompanion.cs new file mode 100644 index 0000000..c7aa11f --- /dev/null +++ b/src/Models/Entities/EntityIUserCompanion.cs @@ -0,0 +1,20 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserCompanion : IUserEntity +{ + public long UserId { get; set; } + + public string UserCompanionUuid { get; set; } + + public int CompanionId { get; set; } + + public int HeadupDisplayViewId { get; set; } + + public int Level { get; set; } + + public long AcquisitionDatetime { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserConsumableItem.cs b/src/Models/Entities/EntityIUserConsumableItem.cs new file mode 100644 index 0000000..7927e14 --- /dev/null +++ b/src/Models/Entities/EntityIUserConsumableItem.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserConsumableItem : IUserEntity +{ + public long UserId { get; set; } + + public int ConsumableItemId { get; set; } + + public int Count { get; set; } + + public long FirstAcquisitionDatetime { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserContentsStory.cs b/src/Models/Entities/EntityIUserContentsStory.cs new file mode 100644 index 0000000..51e43ed --- /dev/null +++ b/src/Models/Entities/EntityIUserContentsStory.cs @@ -0,0 +1,14 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserContentsStory : IUserEntity +{ + public long UserId { get; set; } + + public int ContentsStoryId { get; set; } + + public long PlayDatetime { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserCostume.cs b/src/Models/Entities/EntityIUserCostume.cs new file mode 100644 index 0000000..2a8f151 --- /dev/null +++ b/src/Models/Entities/EntityIUserCostume.cs @@ -0,0 +1,26 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserCostume : IUserEntity +{ + public long UserId { get; set; } + + public string UserCostumeUuid { get; set; } + + public int CostumeId { get; set; } + + public int LimitBreakCount { get; set; } + + public int Level { get; set; } + + public int Exp { get; set; } + + public int HeadupDisplayViewId { get; set; } + + public long AcquisitionDatetime { get; set; } + + public int AwakenCount { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserCostumeActiveSkill.cs b/src/Models/Entities/EntityIUserCostumeActiveSkill.cs new file mode 100644 index 0000000..68735da --- /dev/null +++ b/src/Models/Entities/EntityIUserCostumeActiveSkill.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserCostumeActiveSkill : IUserEntity +{ + public long UserId { get; set; } + + public string UserCostumeUuid { get; set; } + + public int Level { get; set; } + + public long AcquisitionDatetime { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserCostumeAwakenStatusUp.cs b/src/Models/Entities/EntityIUserCostumeAwakenStatusUp.cs new file mode 100644 index 0000000..447e4d1 --- /dev/null +++ b/src/Models/Entities/EntityIUserCostumeAwakenStatusUp.cs @@ -0,0 +1,26 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserCostumeAwakenStatusUp : IUserEntity +{ + public long UserId { get; set; } + + public string UserCostumeUuid { get; set; } + + public StatusCalculationType StatusCalculationType { get; set; } + + public int Hp { get; set; } + + public int Attack { get; set; } + + public int Vitality { get; set; } + + public int Agility { get; set; } + + public int CriticalRatio { get; set; } + + public int CriticalAttack { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserCostumeLevelBonusReleaseStatus.cs b/src/Models/Entities/EntityIUserCostumeLevelBonusReleaseStatus.cs new file mode 100644 index 0000000..c4bed02 --- /dev/null +++ b/src/Models/Entities/EntityIUserCostumeLevelBonusReleaseStatus.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserCostumeLevelBonusReleaseStatus : IUserEntity +{ + public long UserId { get; set; } + + public int CostumeId { get; set; } + + public int LastReleasedBonusLevel { get; set; } + + public int ConfirmedBonusLevel { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserCostumeLotteryEffect.cs b/src/Models/Entities/EntityIUserCostumeLotteryEffect.cs new file mode 100644 index 0000000..28d2707 --- /dev/null +++ b/src/Models/Entities/EntityIUserCostumeLotteryEffect.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserCostumeLotteryEffect : IUserEntity +{ + public long UserId { get; set; } + + public string UserCostumeUuid { get; set; } + + public int SlotNumber { get; set; } + + public int OddsNumber { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserCostumeLotteryEffectAbility.cs b/src/Models/Entities/EntityIUserCostumeLotteryEffectAbility.cs new file mode 100644 index 0000000..0788c2d --- /dev/null +++ b/src/Models/Entities/EntityIUserCostumeLotteryEffectAbility.cs @@ -0,0 +1,18 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserCostumeLotteryEffectAbility : IUserEntity +{ + public long UserId { get; set; } + + public string UserCostumeUuid { get; set; } + + public int SlotNumber { get; set; } + + public int AbilityId { get; set; } + + public int AbilityLevel { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserCostumeLotteryEffectPending.cs b/src/Models/Entities/EntityIUserCostumeLotteryEffectPending.cs new file mode 100644 index 0000000..8799d28 --- /dev/null +++ b/src/Models/Entities/EntityIUserCostumeLotteryEffectPending.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserCostumeLotteryEffectPending : IUserEntity +{ + public long UserId { get; set; } + + public string UserCostumeUuid { get; set; } + + public int SlotNumber { get; set; } + + public int OddsNumber { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserCostumeLotteryEffectStatusUp.cs b/src/Models/Entities/EntityIUserCostumeLotteryEffectStatusUp.cs new file mode 100644 index 0000000..60bd7fd --- /dev/null +++ b/src/Models/Entities/EntityIUserCostumeLotteryEffectStatusUp.cs @@ -0,0 +1,26 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserCostumeLotteryEffectStatusUp : IUserEntity +{ + public long UserId { get; set; } + + public string UserCostumeUuid { get; set; } + + public StatusCalculationType StatusCalculationType { get; set; } + + public int Hp { get; set; } + + public int Attack { get; set; } + + public int Vitality { get; set; } + + public int Agility { get; set; } + + public int CriticalRatio { get; set; } + + public int CriticalAttack { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserDeck.cs b/src/Models/Entities/EntityIUserDeck.cs new file mode 100644 index 0000000..73d6fb2 --- /dev/null +++ b/src/Models/Entities/EntityIUserDeck.cs @@ -0,0 +1,24 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserDeck : IUserEntity +{ + public long UserId { get; set; } + + public DeckType DeckType { get; set; } + + public int UserDeckNumber { get; set; } + + public string UserDeckCharacterUuid01 { get; set; } + + public string UserDeckCharacterUuid02 { get; set; } + + public string UserDeckCharacterUuid03 { get; set; } + + public string Name { get; set; } + + public int Power { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserDeckCharacter.cs b/src/Models/Entities/EntityIUserDeckCharacter.cs new file mode 100644 index 0000000..579d405 --- /dev/null +++ b/src/Models/Entities/EntityIUserDeckCharacter.cs @@ -0,0 +1,22 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserDeckCharacter : IUserEntity +{ + public long UserId { get; set; } + + public string UserDeckCharacterUuid { get; set; } + + public string UserCostumeUuid { get; set; } + + public string MainUserWeaponUuid { get; set; } + + public string UserCompanionUuid { get; set; } + + public int Power { get; set; } + + public string UserThoughtUuid { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserDeckCharacterDressupCostume.cs b/src/Models/Entities/EntityIUserDeckCharacterDressupCostume.cs new file mode 100644 index 0000000..387074e --- /dev/null +++ b/src/Models/Entities/EntityIUserDeckCharacterDressupCostume.cs @@ -0,0 +1,14 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserDeckCharacterDressupCostume : IUserEntity +{ + public long UserId { get; set; } + + public string UserDeckCharacterUuid { get; set; } + + public int DressupCostumeId { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserDeckLimitContentDeletedCharacter.cs b/src/Models/Entities/EntityIUserDeckLimitContentDeletedCharacter.cs new file mode 100644 index 0000000..c8aeb5e --- /dev/null +++ b/src/Models/Entities/EntityIUserDeckLimitContentDeletedCharacter.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserDeckLimitContentDeletedCharacter : IUserEntity +{ + public long UserId { get; set; } + + public int UserDeckNumber { get; set; } + + public int UserDeckCharacterNumber { get; set; } + + public int CostumeId { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserDeckLimitContentRestricted.cs b/src/Models/Entities/EntityIUserDeckLimitContentRestricted.cs new file mode 100644 index 0000000..89272f3 --- /dev/null +++ b/src/Models/Entities/EntityIUserDeckLimitContentRestricted.cs @@ -0,0 +1,20 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserDeckLimitContentRestricted : IUserEntity +{ + public long UserId { get; set; } + + public int EventQuestChapterId { get; set; } + + public int QuestId { get; set; } + + public string DeckRestrictedUuid { get; set; } + + public PossessionType PossessionType { get; set; } + + public string TargetUuid { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserDeckPartsGroup.cs b/src/Models/Entities/EntityIUserDeckPartsGroup.cs new file mode 100644 index 0000000..09a281c --- /dev/null +++ b/src/Models/Entities/EntityIUserDeckPartsGroup.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserDeckPartsGroup : IUserEntity +{ + public long UserId { get; set; } + + public string UserDeckCharacterUuid { get; set; } + + public string UserPartsUuid { get; set; } + + public int SortOrder { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserDeckSubWeaponGroup.cs b/src/Models/Entities/EntityIUserDeckSubWeaponGroup.cs new file mode 100644 index 0000000..b89ebca --- /dev/null +++ b/src/Models/Entities/EntityIUserDeckSubWeaponGroup.cs @@ -0,0 +1,14 @@ +namespace MariesWonderland.Models.Entities; + +public class EntityIUserDeckSubWeaponGroup : IUserEntity +{ + public long UserId { get; set; } + + public string UserDeckCharacterUuid { get; set; } + + public string UserWeaponUuid { get; set; } + + public int SortOrder { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserDeckTypeNote.cs b/src/Models/Entities/EntityIUserDeckTypeNote.cs new file mode 100644 index 0000000..2984f18 --- /dev/null +++ b/src/Models/Entities/EntityIUserDeckTypeNote.cs @@ -0,0 +1,14 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserDeckTypeNote : IUserEntity +{ + public long UserId { get; set; } + + public DeckType DeckType { get; set; } + + public int MaxDeckPower { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserDokan.cs b/src/Models/Entities/EntityIUserDokan.cs new file mode 100644 index 0000000..4ff302d --- /dev/null +++ b/src/Models/Entities/EntityIUserDokan.cs @@ -0,0 +1,14 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserDokan : IUserEntity +{ + public long UserId { get; set; } + + public int DokanId { get; set; } + + public long DisplayDatetime { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserEventQuestDailyGroupCompleteReward.cs b/src/Models/Entities/EntityIUserEventQuestDailyGroupCompleteReward.cs new file mode 100644 index 0000000..1b9fc02 --- /dev/null +++ b/src/Models/Entities/EntityIUserEventQuestDailyGroupCompleteReward.cs @@ -0,0 +1,14 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserEventQuestDailyGroupCompleteReward : IUserEntity +{ + public long UserId { get; set; } + + public int LastRewardReceiveEventQuestDailyGroupId { get; set; } + + public long LastRewardReceiveDatetime { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserEventQuestGuerrillaFreeOpen.cs b/src/Models/Entities/EntityIUserEventQuestGuerrillaFreeOpen.cs new file mode 100644 index 0000000..2943ce4 --- /dev/null +++ b/src/Models/Entities/EntityIUserEventQuestGuerrillaFreeOpen.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserEventQuestGuerrillaFreeOpen : IUserEntity +{ + public long UserId { get; set; } + + public long StartDatetime { get; set; } + + public int OpenMinutes { get; set; } + + public int DailyOpenedCount { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserEventQuestLabyrinthSeason.cs b/src/Models/Entities/EntityIUserEventQuestLabyrinthSeason.cs new file mode 100644 index 0000000..af70050 --- /dev/null +++ b/src/Models/Entities/EntityIUserEventQuestLabyrinthSeason.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserEventQuestLabyrinthSeason : IUserEntity +{ + public long UserId { get; set; } + + public int EventQuestChapterId { get; set; } + + public int LastJoinSeasonNumber { get; set; } + + public int LastSeasonRewardReceivedSeasonNumber { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserEventQuestLabyrinthStage.cs b/src/Models/Entities/EntityIUserEventQuestLabyrinthStage.cs new file mode 100644 index 0000000..814f753 --- /dev/null +++ b/src/Models/Entities/EntityIUserEventQuestLabyrinthStage.cs @@ -0,0 +1,18 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserEventQuestLabyrinthStage : IUserEntity +{ + public long UserId { get; set; } + + public int EventQuestChapterId { get; set; } + + public int StageOrder { get; set; } + + public bool IsReceivedStageClearReward { get; set; } + + public int AccumulationRewardReceivedQuestMissionCount { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserEventQuestProgressStatus.cs b/src/Models/Entities/EntityIUserEventQuestProgressStatus.cs new file mode 100644 index 0000000..4d67aa8 --- /dev/null +++ b/src/Models/Entities/EntityIUserEventQuestProgressStatus.cs @@ -0,0 +1,18 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserEventQuestProgressStatus : IUserEntity +{ + public long UserId { get; set; } + + public int CurrentEventQuestChapterId { get; set; } + + public int CurrentQuestId { get; set; } + + public int CurrentQuestSceneId { get; set; } + + public int HeadQuestSceneId { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserEventQuestTowerAccumulationReward.cs b/src/Models/Entities/EntityIUserEventQuestTowerAccumulationReward.cs new file mode 100644 index 0000000..4988d97 --- /dev/null +++ b/src/Models/Entities/EntityIUserEventQuestTowerAccumulationReward.cs @@ -0,0 +1,14 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserEventQuestTowerAccumulationReward : IUserEntity +{ + public long UserId { get; set; } + + public int EventQuestChapterId { get; set; } + + public int LatestRewardReceiveQuestMissionClearCount { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserExplore.cs b/src/Models/Entities/EntityIUserExplore.cs new file mode 100644 index 0000000..8e6b748 --- /dev/null +++ b/src/Models/Entities/EntityIUserExplore.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserExplore : IUserEntity +{ + public long UserId { get; set; } + + public bool IsUseExploreTicket { get; set; } + + public int PlayingExploreId { get; set; } + + public long LatestPlayDatetime { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserExploreScore.cs b/src/Models/Entities/EntityIUserExploreScore.cs new file mode 100644 index 0000000..8653ba8 --- /dev/null +++ b/src/Models/Entities/EntityIUserExploreScore.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserExploreScore : IUserEntity +{ + public long UserId { get; set; } + + public int ExploreId { get; set; } + + public int MaxScore { get; set; } + + public long MaxScoreUpdateDatetime { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserExtraQuestProgressStatus.cs b/src/Models/Entities/EntityIUserExtraQuestProgressStatus.cs new file mode 100644 index 0000000..d544c49 --- /dev/null +++ b/src/Models/Entities/EntityIUserExtraQuestProgressStatus.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserExtraQuestProgressStatus : IUserEntity +{ + public long UserId { get; set; } + + public int CurrentQuestId { get; set; } + + public int CurrentQuestSceneId { get; set; } + + public int HeadQuestSceneId { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserFacebook.cs b/src/Models/Entities/EntityIUserFacebook.cs new file mode 100644 index 0000000..afc34ba --- /dev/null +++ b/src/Models/Entities/EntityIUserFacebook.cs @@ -0,0 +1,12 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserFacebook : IUserEntity +{ + public long UserId { get; set; } + + public long FacebookId { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserGem.cs b/src/Models/Entities/EntityIUserGem.cs new file mode 100644 index 0000000..2ce144d --- /dev/null +++ b/src/Models/Entities/EntityIUserGem.cs @@ -0,0 +1,12 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserGem : IUserEntity +{ + public long UserId { get; set; } + + public int PaidGem { get; set; } + + public int FreeGem { get; set; } +} diff --git a/src/Models/Entities/EntityIUserGimmick.cs b/src/Models/Entities/EntityIUserGimmick.cs new file mode 100644 index 0000000..97bb9d3 --- /dev/null +++ b/src/Models/Entities/EntityIUserGimmick.cs @@ -0,0 +1,20 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserGimmick : IUserEntity +{ + public long UserId { get; set; } + + public int GimmickSequenceScheduleId { get; set; } + + public int GimmickSequenceId { get; set; } + + public int GimmickId { get; set; } + + public bool IsGimmickCleared { get; set; } + + public long StartDatetime { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserGimmickOrnamentProgress.cs b/src/Models/Entities/EntityIUserGimmickOrnamentProgress.cs new file mode 100644 index 0000000..4e27354 --- /dev/null +++ b/src/Models/Entities/EntityIUserGimmickOrnamentProgress.cs @@ -0,0 +1,22 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserGimmickOrnamentProgress : IUserEntity +{ + public long UserId { get; set; } + + public int GimmickSequenceScheduleId { get; set; } + + public int GimmickSequenceId { get; set; } + + public int GimmickId { get; set; } + + public int GimmickOrnamentIndex { get; set; } + + public int ProgressValueBit { get; set; } + + public long BaseDatetime { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserGimmickSequence.cs b/src/Models/Entities/EntityIUserGimmickSequence.cs new file mode 100644 index 0000000..e16cc32 --- /dev/null +++ b/src/Models/Entities/EntityIUserGimmickSequence.cs @@ -0,0 +1,18 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserGimmickSequence : IUserEntity +{ + public long UserId { get; set; } + + public int GimmickSequenceScheduleId { get; set; } + + public int GimmickSequenceId { get; set; } + + public bool IsGimmickSequenceCleared { get; set; } + + public long ClearDatetime { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserGimmickUnlock.cs b/src/Models/Entities/EntityIUserGimmickUnlock.cs new file mode 100644 index 0000000..bd235fe --- /dev/null +++ b/src/Models/Entities/EntityIUserGimmickUnlock.cs @@ -0,0 +1,18 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserGimmickUnlock : IUserEntity +{ + public long UserId { get; set; } + + public int GimmickSequenceScheduleId { get; set; } + + public int GimmickSequenceId { get; set; } + + public int GimmickId { get; set; } + + public bool IsUnlocked { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserImportantItem.cs b/src/Models/Entities/EntityIUserImportantItem.cs new file mode 100644 index 0000000..d2eaec2 --- /dev/null +++ b/src/Models/Entities/EntityIUserImportantItem.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserImportantItem : IUserEntity +{ + public long UserId { get; set; } + + public int ImportantItemId { get; set; } + + public int Count { get; set; } + + public long FirstAcquisitionDatetime { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserLimitedOpen.cs b/src/Models/Entities/EntityIUserLimitedOpen.cs new file mode 100644 index 0000000..9fab3d2 --- /dev/null +++ b/src/Models/Entities/EntityIUserLimitedOpen.cs @@ -0,0 +1,18 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserLimitedOpen : IUserEntity +{ + public long UserId { get; set; } + + public LimitedOpenTargetType LimitedOpenTargetType { get; set; } + + public int TargetId { get; set; } + + public long OpenDatetime { get; set; } + + public long CloseDatetime { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserLogin.cs b/src/Models/Entities/EntityIUserLogin.cs new file mode 100644 index 0000000..98d9331 --- /dev/null +++ b/src/Models/Entities/EntityIUserLogin.cs @@ -0,0 +1,20 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserLogin : IUserEntity +{ + public long UserId { get; set; } + + public int TotalLoginCount { get; set; } + + public int ContinualLoginCount { get; set; } + + public int MaxContinualLoginCount { get; set; } + + public long LastLoginDatetime { get; set; } + + public long LastComebackLoginDatetime { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserLoginBonus.cs b/src/Models/Entities/EntityIUserLoginBonus.cs new file mode 100644 index 0000000..d804cc8 --- /dev/null +++ b/src/Models/Entities/EntityIUserLoginBonus.cs @@ -0,0 +1,18 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserLoginBonus : IUserEntity +{ + public long UserId { get; set; } + + public int LoginBonusId { get; set; } + + public int CurrentPageNumber { get; set; } + + public int CurrentStampNumber { get; set; } + + public long LatestRewardReceiveDatetime { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserMainQuestFlowStatus.cs b/src/Models/Entities/EntityIUserMainQuestFlowStatus.cs new file mode 100644 index 0000000..e8118c8 --- /dev/null +++ b/src/Models/Entities/EntityIUserMainQuestFlowStatus.cs @@ -0,0 +1,12 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserMainQuestFlowStatus : IUserEntity +{ + public long UserId { get; set; } + + public QuestFlowType CurrentQuestFlowType { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserMainQuestMainFlowStatus.cs b/src/Models/Entities/EntityIUserMainQuestMainFlowStatus.cs new file mode 100644 index 0000000..9c70064 --- /dev/null +++ b/src/Models/Entities/EntityIUserMainQuestMainFlowStatus.cs @@ -0,0 +1,18 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserMainQuestMainFlowStatus : IUserEntity +{ + public long UserId { get; set; } + + public int CurrentMainQuestRouteId { get; set; } + + public int CurrentQuestSceneId { get; set; } + + public int HeadQuestSceneId { get; set; } + + public bool IsReachedLastQuestScene { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserMainQuestProgressStatus.cs b/src/Models/Entities/EntityIUserMainQuestProgressStatus.cs new file mode 100644 index 0000000..2e5adf0 --- /dev/null +++ b/src/Models/Entities/EntityIUserMainQuestProgressStatus.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserMainQuestProgressStatus : IUserEntity +{ + public long UserId { get; set; } + + public int CurrentQuestSceneId { get; set; } + + public int HeadQuestSceneId { get; set; } + + public QuestFlowType CurrentQuestFlowType { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserMainQuestReplayFlowStatus.cs b/src/Models/Entities/EntityIUserMainQuestReplayFlowStatus.cs new file mode 100644 index 0000000..7ccaa7a --- /dev/null +++ b/src/Models/Entities/EntityIUserMainQuestReplayFlowStatus.cs @@ -0,0 +1,14 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserMainQuestReplayFlowStatus : IUserEntity +{ + public long UserId { get; set; } + + public int CurrentHeadQuestSceneId { get; set; } + + public int CurrentQuestSceneId { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserMainQuestSeasonRoute.cs b/src/Models/Entities/EntityIUserMainQuestSeasonRoute.cs new file mode 100644 index 0000000..2baacaf --- /dev/null +++ b/src/Models/Entities/EntityIUserMainQuestSeasonRoute.cs @@ -0,0 +1,14 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserMainQuestSeasonRoute : IUserEntity +{ + public long UserId { get; set; } + + public int MainQuestSeasonId { get; set; } + + public int MainQuestRouteId { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserMaterial.cs b/src/Models/Entities/EntityIUserMaterial.cs new file mode 100644 index 0000000..e31840e --- /dev/null +++ b/src/Models/Entities/EntityIUserMaterial.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserMaterial : IUserEntity +{ + public long UserId { get; set; } + + public int MaterialId { get; set; } + + public int Count { get; set; } + + public long FirstAcquisitionDatetime { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserMission.cs b/src/Models/Entities/EntityIUserMission.cs new file mode 100644 index 0000000..69b547a --- /dev/null +++ b/src/Models/Entities/EntityIUserMission.cs @@ -0,0 +1,20 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserMission : IUserEntity +{ + public long UserId { get; set; } + + public int MissionId { get; set; } + + public long StartDatetime { get; set; } + + public int ProgressValue { get; set; } + + public MissionProgressStatusType MissionProgressStatusType { get; set; } + + public long ClearDatetime { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserMissionCompletionProgress.cs b/src/Models/Entities/EntityIUserMissionCompletionProgress.cs new file mode 100644 index 0000000..820fcc8 --- /dev/null +++ b/src/Models/Entities/EntityIUserMissionCompletionProgress.cs @@ -0,0 +1,14 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserMissionCompletionProgress : IUserEntity +{ + public long UserId { get; set; } + + public int MissionId { get; set; } + + public long ProgressValue { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserMissionPassPoint.cs b/src/Models/Entities/EntityIUserMissionPassPoint.cs new file mode 100644 index 0000000..b3ab272 --- /dev/null +++ b/src/Models/Entities/EntityIUserMissionPassPoint.cs @@ -0,0 +1,18 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserMissionPassPoint : IUserEntity +{ + public long UserId { get; set; } + + public int MissionPassId { get; set; } + + public int Point { get; set; } + + public int PremiumRewardReceivedLevel { get; set; } + + public int NoPremiumRewardReceivedLevel { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserMovie.cs b/src/Models/Entities/EntityIUserMovie.cs new file mode 100644 index 0000000..759909e --- /dev/null +++ b/src/Models/Entities/EntityIUserMovie.cs @@ -0,0 +1,14 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserMovie : IUserEntity +{ + public long UserId { get; set; } + + public int MovieId { get; set; } + + public long LatestViewedDatetime { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserNaviCutIn.cs b/src/Models/Entities/EntityIUserNaviCutIn.cs new file mode 100644 index 0000000..99abfde --- /dev/null +++ b/src/Models/Entities/EntityIUserNaviCutIn.cs @@ -0,0 +1,14 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserNaviCutIn : IUserEntity +{ + public long UserId { get; set; } + + public int NaviCutInId { get; set; } + + public long PlayDatetime { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserOmikuji.cs b/src/Models/Entities/EntityIUserOmikuji.cs new file mode 100644 index 0000000..081d01b --- /dev/null +++ b/src/Models/Entities/EntityIUserOmikuji.cs @@ -0,0 +1,14 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserOmikuji : IUserEntity +{ + public long UserId { get; set; } + + public int OmikujiId { get; set; } + + public long LatestDrawDatetime { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserParts.cs b/src/Models/Entities/EntityIUserParts.cs new file mode 100644 index 0000000..ec72a91 --- /dev/null +++ b/src/Models/Entities/EntityIUserParts.cs @@ -0,0 +1,22 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserParts : IUserEntity +{ + public long UserId { get; set; } + + public string UserPartsUuid { get; set; } + + public int PartsId { get; set; } + + public int Level { get; set; } + + public int PartsStatusMainId { get; set; } + + public bool IsProtected { get; set; } + + public long AcquisitionDatetime { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserPartsGroupNote.cs b/src/Models/Entities/EntityIUserPartsGroupNote.cs new file mode 100644 index 0000000..8f1cf3c --- /dev/null +++ b/src/Models/Entities/EntityIUserPartsGroupNote.cs @@ -0,0 +1,14 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserPartsGroupNote : IUserEntity +{ + public long UserId { get; set; } + + public int PartsGroupId { get; set; } + + public long FirstAcquisitionDatetime { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserPartsPreset.cs b/src/Models/Entities/EntityIUserPartsPreset.cs new file mode 100644 index 0000000..aa0447c --- /dev/null +++ b/src/Models/Entities/EntityIUserPartsPreset.cs @@ -0,0 +1,22 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserPartsPreset : IUserEntity +{ + public long UserId { get; set; } + + public int UserPartsPresetNumber { get; set; } + + public string UserPartsUuid01 { get; set; } + + public string UserPartsUuid02 { get; set; } + + public string UserPartsUuid03 { get; set; } + + public string Name { get; set; } + + public int UserPartsPresetTagNumber { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserPartsPresetTag.cs b/src/Models/Entities/EntityIUserPartsPresetTag.cs new file mode 100644 index 0000000..73600a6 --- /dev/null +++ b/src/Models/Entities/EntityIUserPartsPresetTag.cs @@ -0,0 +1,14 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserPartsPresetTag : IUserEntity +{ + public long UserId { get; set; } + + public int UserPartsPresetTagNumber { get; set; } + + public string Name { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserPartsStatusSub.cs b/src/Models/Entities/EntityIUserPartsStatusSub.cs new file mode 100644 index 0000000..9d86a8c --- /dev/null +++ b/src/Models/Entities/EntityIUserPartsStatusSub.cs @@ -0,0 +1,24 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserPartsStatusSub : IUserEntity +{ + public long UserId { get; set; } + + public string UserPartsUuid { get; set; } + + public int StatusIndex { get; set; } + + public int PartsStatusSubLotteryId { get; set; } + + public int Level { get; set; } + + public StatusKindType StatusKindType { get; set; } + + public StatusCalculationType StatusCalculationType { get; set; } + + public int StatusChangeValue { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserPortalCageStatus.cs b/src/Models/Entities/EntityIUserPortalCageStatus.cs new file mode 100644 index 0000000..ecfa45c --- /dev/null +++ b/src/Models/Entities/EntityIUserPortalCageStatus.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserPortalCageStatus : IUserEntity +{ + public long UserId { get; set; } + + public bool IsCurrentProgress { get; set; } + + public long DropItemStartDatetime { get; set; } + + public int CurrentDropItemCount { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserPossessionAutoConvert.cs b/src/Models/Entities/EntityIUserPossessionAutoConvert.cs new file mode 100644 index 0000000..99ea042 --- /dev/null +++ b/src/Models/Entities/EntityIUserPossessionAutoConvert.cs @@ -0,0 +1,24 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserPossessionAutoConvert : IUserEntity +{ + public long UserId { get; set; } + + public PossessionType PossessionType { get; set; } + + public int PossessionId { get; set; } + + public int FromCount { get; set; } + + public PossessionType ToPossessionType { get; set; } + + public int ToPossessionId { get; set; } + + public int ToCount { get; set; } + + public long ConvertDatetime { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserPremiumItem.cs b/src/Models/Entities/EntityIUserPremiumItem.cs new file mode 100644 index 0000000..f55db56 --- /dev/null +++ b/src/Models/Entities/EntityIUserPremiumItem.cs @@ -0,0 +1,14 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserPremiumItem : IUserEntity +{ + public long UserId { get; set; } + + public int PremiumItemId { get; set; } + + public long AcquisitionDatetime { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserProfile.cs b/src/Models/Entities/EntityIUserProfile.cs new file mode 100644 index 0000000..0c91ff2 --- /dev/null +++ b/src/Models/Entities/EntityIUserProfile.cs @@ -0,0 +1,22 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserProfile : IUserEntity +{ + public long UserId { get; set; } + + public string Name { get; set; } + + public long NameUpdateDatetime { get; set; } + + public string Message { get; set; } + + public long MessageUpdateDatetime { get; set; } + + public int FavoriteCostumeId { get; set; } + + public long FavoriteCostumeIdUpdateDatetime { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserPvpDefenseDeck.cs b/src/Models/Entities/EntityIUserPvpDefenseDeck.cs new file mode 100644 index 0000000..552408e --- /dev/null +++ b/src/Models/Entities/EntityIUserPvpDefenseDeck.cs @@ -0,0 +1,12 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserPvpDefenseDeck : IUserEntity +{ + public long UserId { get; set; } + + public int UserDeckNumber { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserPvpStatus.cs b/src/Models/Entities/EntityIUserPvpStatus.cs new file mode 100644 index 0000000..4ba0b5d --- /dev/null +++ b/src/Models/Entities/EntityIUserPvpStatus.cs @@ -0,0 +1,22 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserPvpStatus : IUserEntity +{ + public long UserId { get; set; } + + public int StaminaMilliValue { get; set; } + + public long StaminaUpdateDatetime { get; set; } + + public int LatestRewardReceivePvpSeasonId { get; set; } + + public long LatestRewardReceivePvpWeeklyVersion { get; set; } + + public int WinStreakCount { get; set; } + + public long WinStreakCountUpdateDatetime { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserPvpWeeklyResult.cs b/src/Models/Entities/EntityIUserPvpWeeklyResult.cs new file mode 100644 index 0000000..b9e0448 --- /dev/null +++ b/src/Models/Entities/EntityIUserPvpWeeklyResult.cs @@ -0,0 +1,20 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserPvpWeeklyResult : IUserEntity +{ + public long UserId { get; set; } + + public long PvpWeeklyVersion { get; set; } + + public int PvpSeasonId { get; set; } + + public int GroupId { get; set; } + + public int FinalPoint { get; set; } + + public int FinalRank { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserQuest.cs b/src/Models/Entities/EntityIUserQuest.cs new file mode 100644 index 0000000..74ff6a5 --- /dev/null +++ b/src/Models/Entities/EntityIUserQuest.cs @@ -0,0 +1,26 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserQuest : IUserEntity +{ + public long UserId { get; set; } + + public int QuestId { get; set; } + + public int QuestStateType { get; set; } + + public bool IsBattleOnly { get; set; } + + public long LatestStartDatetime { get; set; } + + public int ClearCount { get; set; } + + public int DailyClearCount { get; set; } + + public long LastClearDatetime { get; set; } + + public int ShortestClearFrames { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserQuestAutoOrbit.cs b/src/Models/Entities/EntityIUserQuestAutoOrbit.cs new file mode 100644 index 0000000..96cd91f --- /dev/null +++ b/src/Models/Entities/EntityIUserQuestAutoOrbit.cs @@ -0,0 +1,22 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserQuestAutoOrbit : IUserEntity +{ + public long UserId { get; set; } + + public QuestType QuestType { get; set; } + + public int ChapterId { get; set; } + + public int QuestId { get; set; } + + public int MaxAutoOrbitCount { get; set; } + + public int ClearedAutoOrbitCount { get; set; } + + public long LastClearDatetime { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserQuestLimitContentStatus.cs b/src/Models/Entities/EntityIUserQuestLimitContentStatus.cs new file mode 100644 index 0000000..8037ea9 --- /dev/null +++ b/src/Models/Entities/EntityIUserQuestLimitContentStatus.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserQuestLimitContentStatus : IUserEntity +{ + public long UserId { get; set; } + + public int QuestId { get; set; } + + public int LimitContentQuestStatusType { get; set; } + + public int EventQuestChapterId { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserQuestMission.cs b/src/Models/Entities/EntityIUserQuestMission.cs new file mode 100644 index 0000000..2acd5d9 --- /dev/null +++ b/src/Models/Entities/EntityIUserQuestMission.cs @@ -0,0 +1,20 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserQuestMission : IUserEntity +{ + public long UserId { get; set; } + + public int QuestId { get; set; } + + public int QuestMissionId { get; set; } + + public int ProgressValue { get; set; } + + public bool IsClear { get; set; } + + public long LatestClearDatetime { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserQuestReplayFlowRewardGroup.cs b/src/Models/Entities/EntityIUserQuestReplayFlowRewardGroup.cs new file mode 100644 index 0000000..cf4a3c8 --- /dev/null +++ b/src/Models/Entities/EntityIUserQuestReplayFlowRewardGroup.cs @@ -0,0 +1,14 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserQuestReplayFlowRewardGroup : IUserEntity +{ + public long UserId { get; set; } + + public int QuestReplayFlowRewardGroupId { get; set; } + + public long ReceiveDatetime { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserQuestSceneChoice.cs b/src/Models/Entities/EntityIUserQuestSceneChoice.cs new file mode 100644 index 0000000..137f058 --- /dev/null +++ b/src/Models/Entities/EntityIUserQuestSceneChoice.cs @@ -0,0 +1,14 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserQuestSceneChoice : IUserEntity +{ + public long UserId { get; set; } + + public int QuestSceneChoiceGroupingId { get; set; } + + public int QuestSceneChoiceEffectId { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserQuestSceneChoiceHistory.cs b/src/Models/Entities/EntityIUserQuestSceneChoiceHistory.cs new file mode 100644 index 0000000..32bd092 --- /dev/null +++ b/src/Models/Entities/EntityIUserQuestSceneChoiceHistory.cs @@ -0,0 +1,14 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserQuestSceneChoiceHistory : IUserEntity +{ + public long UserId { get; set; } + + public int QuestSceneChoiceEffectId { get; set; } + + public long ChoiceDatetime { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserSetting.cs b/src/Models/Entities/EntityIUserSetting.cs new file mode 100644 index 0000000..6ad3019 --- /dev/null +++ b/src/Models/Entities/EntityIUserSetting.cs @@ -0,0 +1,12 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserSetting : IUserEntity +{ + public long UserId { get; set; } + + public bool IsNotifyPurchaseAlert { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserShopItem.cs b/src/Models/Entities/EntityIUserShopItem.cs new file mode 100644 index 0000000..9e08df5 --- /dev/null +++ b/src/Models/Entities/EntityIUserShopItem.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserShopItem : IUserEntity +{ + public long UserId { get; set; } + + public int ShopItemId { get; set; } + + public int BoughtCount { get; set; } + + public long LatestBoughtCountChangedDatetime { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserShopReplaceable.cs b/src/Models/Entities/EntityIUserShopReplaceable.cs new file mode 100644 index 0000000..ffc25c8 --- /dev/null +++ b/src/Models/Entities/EntityIUserShopReplaceable.cs @@ -0,0 +1,14 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserShopReplaceable : IUserEntity +{ + public long UserId { get; set; } + + public int LineupUpdateCount { get; set; } + + public long LatestLineupUpdateDatetime { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserShopReplaceableLineup.cs b/src/Models/Entities/EntityIUserShopReplaceableLineup.cs new file mode 100644 index 0000000..18c1915 --- /dev/null +++ b/src/Models/Entities/EntityIUserShopReplaceableLineup.cs @@ -0,0 +1,14 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserShopReplaceableLineup : IUserEntity +{ + public long UserId { get; set; } + + public int SlotNumber { get; set; } + + public int ShopItemId { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserSideStoryQuest.cs b/src/Models/Entities/EntityIUserSideStoryQuest.cs new file mode 100644 index 0000000..dc00c53 --- /dev/null +++ b/src/Models/Entities/EntityIUserSideStoryQuest.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserSideStoryQuest : IUserEntity +{ + public long UserId { get; set; } + + public int SideStoryQuestId { get; set; } + + public int HeadSideStoryQuestSceneId { get; set; } + + public int SideStoryQuestStateType { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserSideStoryQuestSceneProgressStatus.cs b/src/Models/Entities/EntityIUserSideStoryQuestSceneProgressStatus.cs new file mode 100644 index 0000000..f9dec15 --- /dev/null +++ b/src/Models/Entities/EntityIUserSideStoryQuestSceneProgressStatus.cs @@ -0,0 +1,14 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserSideStoryQuestSceneProgressStatus : IUserEntity +{ + public long UserId { get; set; } + + public int CurrentSideStoryQuestId { get; set; } + + public int CurrentSideStoryQuestSceneId { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserStatus.cs b/src/Models/Entities/EntityIUserStatus.cs new file mode 100644 index 0000000..437ca66 --- /dev/null +++ b/src/Models/Entities/EntityIUserStatus.cs @@ -0,0 +1,18 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserStatus : IUserEntity +{ + public long UserId { get; set; } + + public int Level { get; set; } + + public int Exp { get; set; } + + public int StaminaMilliValue { get; set; } + + public long StaminaUpdateDatetime { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserThought.cs b/src/Models/Entities/EntityIUserThought.cs new file mode 100644 index 0000000..4934ba4 --- /dev/null +++ b/src/Models/Entities/EntityIUserThought.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserThought : IUserEntity +{ + public long UserId { get; set; } + + public string UserThoughtUuid { get; set; } + + public int ThoughtId { get; set; } + + public long AcquisitionDatetime { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserTripleDeck.cs b/src/Models/Entities/EntityIUserTripleDeck.cs new file mode 100644 index 0000000..82209cd --- /dev/null +++ b/src/Models/Entities/EntityIUserTripleDeck.cs @@ -0,0 +1,22 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserTripleDeck : IUserEntity +{ + public long UserId { get; set; } + + public DeckType DeckType { get; set; } + + public int UserDeckNumber { get; set; } + + public string Name { get; set; } + + public int DeckNumber01 { get; set; } + + public int DeckNumber02 { get; set; } + + public int DeckNumber03 { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserTutorialProgress.cs b/src/Models/Entities/EntityIUserTutorialProgress.cs new file mode 100644 index 0000000..0faeca2 --- /dev/null +++ b/src/Models/Entities/EntityIUserTutorialProgress.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserTutorialProgress : IUserEntity +{ + public long UserId { get; set; } + + public TutorialType TutorialType { get; set; } + + public int ProgressPhase { get; set; } + + public int ChoiceId { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserWeapon.cs b/src/Models/Entities/EntityIUserWeapon.cs new file mode 100644 index 0000000..434d313 --- /dev/null +++ b/src/Models/Entities/EntityIUserWeapon.cs @@ -0,0 +1,24 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserWeapon : IUserEntity +{ + public long UserId { get; set; } + + public string UserWeaponUuid { get; set; } + + public int WeaponId { get; set; } + + public int Level { get; set; } + + public int Exp { get; set; } + + public int LimitBreakCount { get; set; } + + public bool IsProtected { get; set; } + + public long AcquisitionDatetime { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserWeaponAbility.cs b/src/Models/Entities/EntityIUserWeaponAbility.cs new file mode 100644 index 0000000..9d453cf --- /dev/null +++ b/src/Models/Entities/EntityIUserWeaponAbility.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserWeaponAbility : IUserEntity +{ + public long UserId { get; set; } + + public string UserWeaponUuid { get; set; } + + public int SlotNumber { get; set; } + + public int Level { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserWeaponAwaken.cs b/src/Models/Entities/EntityIUserWeaponAwaken.cs new file mode 100644 index 0000000..bffcc81 --- /dev/null +++ b/src/Models/Entities/EntityIUserWeaponAwaken.cs @@ -0,0 +1,12 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserWeaponAwaken : IUserEntity +{ + public long UserId { get; set; } + + public string UserWeaponUuid { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserWeaponNote.cs b/src/Models/Entities/EntityIUserWeaponNote.cs new file mode 100644 index 0000000..53c1372 --- /dev/null +++ b/src/Models/Entities/EntityIUserWeaponNote.cs @@ -0,0 +1,18 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserWeaponNote : IUserEntity +{ + public long UserId { get; set; } + + public int WeaponId { get; set; } + + public int MaxLevel { get; set; } + + public int MaxLimitBreakCount { get; set; } + + public long FirstAcquisitionDatetime { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserWeaponSkill.cs b/src/Models/Entities/EntityIUserWeaponSkill.cs new file mode 100644 index 0000000..b1726d4 --- /dev/null +++ b/src/Models/Entities/EntityIUserWeaponSkill.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserWeaponSkill : IUserEntity +{ + public long UserId { get; set; } + + public string UserWeaponUuid { get; set; } + + public int SlotNumber { get; set; } + + public int Level { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserWeaponStory.cs b/src/Models/Entities/EntityIUserWeaponStory.cs new file mode 100644 index 0000000..d8d354a --- /dev/null +++ b/src/Models/Entities/EntityIUserWeaponStory.cs @@ -0,0 +1,14 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserWeaponStory : IUserEntity +{ + public long UserId { get; set; } + + public int WeaponId { get; set; } + + public int ReleasedMaxStoryIndex { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityIUserWebviewPanelMission.cs b/src/Models/Entities/EntityIUserWebviewPanelMission.cs new file mode 100644 index 0000000..3256640 --- /dev/null +++ b/src/Models/Entities/EntityIUserWebviewPanelMission.cs @@ -0,0 +1,14 @@ +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Entities; + +public class EntityIUserWebviewPanelMission : IUserEntity +{ + public long UserId { get; set; } + + public int WebviewPanelMissionPageId { get; set; } + + public long RewardReceiveDatetime { get; set; } + + public long LatestVersion { get; set; } +} diff --git a/src/Models/Entities/EntityMAbility.cs b/src/Models/Entities/EntityMAbility.cs new file mode 100644 index 0000000..f9d67fb --- /dev/null +++ b/src/Models/Entities/EntityMAbility.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMAbility))] +public class EntityMAbility +{ + [Key(0)] public int AbilityId { get; set; } + + [Key(1)] public int AbilityLevelGroupId { get; set; } +} diff --git a/src/Models/Entities/EntityMAbilityBehaviour.cs b/src/Models/Entities/EntityMAbilityBehaviour.cs new file mode 100644 index 0000000..b37fdef --- /dev/null +++ b/src/Models/Entities/EntityMAbilityBehaviour.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMAbilityBehaviour))] +public class EntityMAbilityBehaviour +{ + [Key(0)] public int AbilityBehaviourId { get; set; } + + [Key(1)] public AbilityBehaviourType AbilityBehaviourType { get; set; } + + [Key(2)] public int AbilityBehaviourActionId { get; set; } +} diff --git a/src/Models/Entities/EntityMAbilityBehaviourActionBless.cs b/src/Models/Entities/EntityMAbilityBehaviourActionBless.cs new file mode 100644 index 0000000..1046bf2 --- /dev/null +++ b/src/Models/Entities/EntityMAbilityBehaviourActionBless.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMAbilityBehaviourActionBless))] +public class EntityMAbilityBehaviourActionBless +{ + [Key(0)] public int AbilityBehaviourActionId { get; set; } + + [Key(1)] public int AbilityId { get; set; } + + [Key(2)] public int DecreasePoint { get; set; } +} diff --git a/src/Models/Entities/EntityMAbilityBehaviourActionPassiveSkill.cs b/src/Models/Entities/EntityMAbilityBehaviourActionPassiveSkill.cs new file mode 100644 index 0000000..e416e2b --- /dev/null +++ b/src/Models/Entities/EntityMAbilityBehaviourActionPassiveSkill.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMAbilityBehaviourActionPassiveSkill))] +public class EntityMAbilityBehaviourActionPassiveSkill +{ + [Key(0)] public int AbilityBehaviourActionId { get; set; } + + [Key(1)] public int SkillDetailId { get; set; } +} diff --git a/src/Models/Entities/EntityMAbilityBehaviourActionStatus.cs b/src/Models/Entities/EntityMAbilityBehaviourActionStatus.cs new file mode 100644 index 0000000..0ddbea7 --- /dev/null +++ b/src/Models/Entities/EntityMAbilityBehaviourActionStatus.cs @@ -0,0 +1,22 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMAbilityBehaviourActionStatus))] +public class EntityMAbilityBehaviourActionStatus +{ + [Key(0)] public int AbilityBehaviourActionId { get; set; } + + [Key(1)] public AbilityBehaviourStatusChangeType AbilityBehaviourStatusChangeType { get; set; } + + [Key(2)] public AttributeConditionType AttributeConditionType { get; set; } + + [Key(3)] public AbilityBehaviourStatusOrganizationConditionType AbilityOrganizationConditionType { get; set; } + + [Key(4)] public int AbilityStatusId { get; set; } + + [Key(5)] public AbilityBehaviourStatusApplyScopeType ApplyScopeType { get; set; } +} diff --git a/src/Models/Entities/EntityMAbilityBehaviourActionStatusDown.cs b/src/Models/Entities/EntityMAbilityBehaviourActionStatusDown.cs new file mode 100644 index 0000000..fc06175 --- /dev/null +++ b/src/Models/Entities/EntityMAbilityBehaviourActionStatusDown.cs @@ -0,0 +1,22 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMAbilityBehaviourActionStatusDown))] +public class EntityMAbilityBehaviourActionStatusDown +{ + [Key(0)] public int AbilityBehaviourActionId { get; set; } + + [Key(1)] public AbilityBehaviourStatusChangeType AbilityBehaviourStatusChangeType { get; set; } + + [Key(2)] public AttributeConditionType AttributeConditionType { get; set; } + + [Key(3)] public AbilityBehaviourStatusOrganizationConditionType AbilityOrganizationConditionType { get; set; } + + [Key(4)] public int AbilityStatusId { get; set; } + + [Key(5)] public AbilityBehaviourStatusApplyScopeType ApplyScopeType { get; set; } +} diff --git a/src/Models/Entities/EntityMAbilityBehaviourGroup.cs b/src/Models/Entities/EntityMAbilityBehaviourGroup.cs new file mode 100644 index 0000000..91c7417 --- /dev/null +++ b/src/Models/Entities/EntityMAbilityBehaviourGroup.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMAbilityBehaviourGroup))] +public class EntityMAbilityBehaviourGroup +{ + [Key(0)] public int AbilityBehaviourGroupId { get; set; } + + [Key(1)] public int AbilityBehaviourIndex { get; set; } + + [Key(2)] public int AbilityBehaviourId { get; set; } +} diff --git a/src/Models/Entities/EntityMAbilityDetail.cs b/src/Models/Entities/EntityMAbilityDetail.cs new file mode 100644 index 0000000..3567498 --- /dev/null +++ b/src/Models/Entities/EntityMAbilityDetail.cs @@ -0,0 +1,22 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMAbilityDetail))] +public class EntityMAbilityDetail +{ + [Key(0)] public int AbilityDetailId { get; set; } + + [Key(1)] public int NameAbilityTextId { get; set; } + + [Key(2)] public int DescriptionAbilityTextId { get; set; } + + [Key(3)] public int AbilityBehaviourGroupId { get; set; } + + [Key(4)] public int AssetCategoryId { get; set; } + + [Key(5)] public int AssetVariationId { get; set; } +} diff --git a/src/Models/Entities/EntityMAbilityLevelGroup.cs b/src/Models/Entities/EntityMAbilityLevelGroup.cs new file mode 100644 index 0000000..dc2bf0f --- /dev/null +++ b/src/Models/Entities/EntityMAbilityLevelGroup.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMAbilityLevelGroup))] +public class EntityMAbilityLevelGroup +{ + [Key(0)] public int AbilityLevelGroupId { get; set; } + + [Key(1)] public int LevelLowerLimit { get; set; } + + [Key(2)] public int AbilityDetailId { get; set; } +} diff --git a/src/Models/Entities/EntityMAbilityStatus.cs b/src/Models/Entities/EntityMAbilityStatus.cs new file mode 100644 index 0000000..15fc50a --- /dev/null +++ b/src/Models/Entities/EntityMAbilityStatus.cs @@ -0,0 +1,26 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMAbilityStatus))] +public class EntityMAbilityStatus +{ + [Key(0)] public int AbilityStatusId { get; set; } + + [Key(1)] public int Agility { get; set; } + + [Key(2)] public int Attack { get; set; } + + [Key(3)] public int CriticalAttackRatioPermil { get; set; } + + [Key(4)] public int CriticalRatioPermil { get; set; } + + [Key(5)] public int EvasionRatioPermil { get; set; } + + [Key(6)] public int Hp { get; set; } + + [Key(7)] public int Vitality { get; set; } +} diff --git a/src/Models/Entities/EntityMActor.cs b/src/Models/Entities/EntityMActor.cs new file mode 100644 index 0000000..bb39252 --- /dev/null +++ b/src/Models/Entities/EntityMActor.cs @@ -0,0 +1,20 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMActor))] +public class EntityMActor +{ + [Key(0)] public int ActorId { get; set; } + + [Key(1)] public int NameActorTextId { get; set; } + + [Key(2)] public string ActorAssetId { get; set; } + + [Key(3)] public string ActorSpeakerIconAssetPath { get; set; } + + [Key(4)] public string AnimatorAssetPath { get; set; } +} diff --git a/src/Models/Entities/EntityMActorAnimation.cs b/src/Models/Entities/EntityMActorAnimation.cs new file mode 100644 index 0000000..e0fd81e --- /dev/null +++ b/src/Models/Entities/EntityMActorAnimation.cs @@ -0,0 +1,22 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMActorAnimation))] +public class EntityMActorAnimation +{ + [Key(0)] public int ActorAnimationId { get; set; } + + [Key(1)] public int ActorId { get; set; } + + [Key(2)] public int ActorAnimationCategoryId { get; set; } + + [Key(3)] public int ActorAnimationType { get; set; } + + [Key(4)] public string AssetPath { get; set; } + + [Key(5)] public bool IsDefault { get; set; } +} diff --git a/src/Models/Entities/EntityMActorAnimationCategory.cs b/src/Models/Entities/EntityMActorAnimationCategory.cs new file mode 100644 index 0000000..e2a6d47 --- /dev/null +++ b/src/Models/Entities/EntityMActorAnimationCategory.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMActorAnimationCategory))] +public class EntityMActorAnimationCategory +{ + [Key(0)] public int ActorAnimationCategoryId { get; set; } + + [Key(1)] public string Name { get; set; } +} diff --git a/src/Models/Entities/EntityMActorAnimationController.cs b/src/Models/Entities/EntityMActorAnimationController.cs new file mode 100644 index 0000000..94593ff --- /dev/null +++ b/src/Models/Entities/EntityMActorAnimationController.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMActorAnimationController))] +public class EntityMActorAnimationController +{ + [Key(0)] public int ActorAnimationControllerId { get; set; } + + [Key(1)] public int ActorId { get; set; } + + [Key(2)] public int ActorAnimationControllerType { get; set; } + + [Key(3)] public string AssetPath { get; set; } +} diff --git a/src/Models/Entities/EntityMActorObject.cs b/src/Models/Entities/EntityMActorObject.cs new file mode 100644 index 0000000..bab399e --- /dev/null +++ b/src/Models/Entities/EntityMActorObject.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMActorObject))] +public class EntityMActorObject +{ + [Key(0)] public int ActorObjectId { get; set; } + + [Key(1)] public int ActorId { get; set; } +} diff --git a/src/Models/Entities/EntityMAppealDialog.cs b/src/Models/Entities/EntityMAppealDialog.cs new file mode 100644 index 0000000..64df93d --- /dev/null +++ b/src/Models/Entities/EntityMAppealDialog.cs @@ -0,0 +1,26 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMAppealDialog))] +public class EntityMAppealDialog +{ + [Key(0)] public int AppealDialogId { get; set; } + + [Key(1)] public int SortOrder { get; set; } + + [Key(2)] public AppealTargetType AppealTargetType { get; set; } + + [Key(3)] public int AppealTargetId { get; set; } + + [Key(4)] public long StartDatetime { get; set; } + + [Key(5)] public long EndDatetime { get; set; } + + [Key(6)] public int TitleTextId { get; set; } + + [Key(7)] public int AssetId { get; set; } +} diff --git a/src/Models/Entities/EntityMAssetBackground.cs b/src/Models/Entities/EntityMAssetBackground.cs new file mode 100644 index 0000000..33b0193 --- /dev/null +++ b/src/Models/Entities/EntityMAssetBackground.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMAssetBackground))] +public class EntityMAssetBackground +{ + [Key(0)] public int AssetBackgroundId { get; set; } + + [Key(1)] public string BackgroundAssetPath { get; set; } + + [Key(2)] public string GlobalEventMapAssetPath { get; set; } +} diff --git a/src/Models/Entities/EntityMAssetCalculator.cs b/src/Models/Entities/EntityMAssetCalculator.cs new file mode 100644 index 0000000..e3518c5 --- /dev/null +++ b/src/Models/Entities/EntityMAssetCalculator.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMAssetCalculator))] +public class EntityMAssetCalculator +{ + [Key(0)] public int AssetCalculatorId { get; set; } + + [Key(1)] public int UseCalculatorType { get; set; } + + [Key(2)] public string AssetPath { get; set; } +} diff --git a/src/Models/Entities/EntityMAssetDataSetting.cs b/src/Models/Entities/EntityMAssetDataSetting.cs new file mode 100644 index 0000000..5539296 --- /dev/null +++ b/src/Models/Entities/EntityMAssetDataSetting.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMAssetDataSetting))] +public class EntityMAssetDataSetting +{ + [Key(0)] public int AssetDataSettingId { get; set; } + + [Key(1)] public string AssetPath { get; set; } +} diff --git a/src/Models/Entities/EntityMAssetEffect.cs b/src/Models/Entities/EntityMAssetEffect.cs new file mode 100644 index 0000000..374f711 --- /dev/null +++ b/src/Models/Entities/EntityMAssetEffect.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMAssetEffect))] +public class EntityMAssetEffect +{ + [Key(0)] public int AssetEffectId { get; set; } + + [Key(1)] public string AssetPath { get; set; } +} diff --git a/src/Models/Entities/EntityMAssetGradeIcon.cs b/src/Models/Entities/EntityMAssetGradeIcon.cs new file mode 100644 index 0000000..2759bd7 --- /dev/null +++ b/src/Models/Entities/EntityMAssetGradeIcon.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMAssetGradeIcon))] +public class EntityMAssetGradeIcon +{ + [Key(0)] public int AssetGradeIconId { get; set; } + + [Key(1)] public int AssetId { get; set; } + + [Key(2)] public int Level { get; set; } + + [Key(3)] public int SeAssetId { get; set; } +} diff --git a/src/Models/Entities/EntityMAssetTimeline.cs b/src/Models/Entities/EntityMAssetTimeline.cs new file mode 100644 index 0000000..56eff0e --- /dev/null +++ b/src/Models/Entities/EntityMAssetTimeline.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMAssetTimeline))] +public class EntityMAssetTimeline +{ + [Key(0)] public int AssetTimelineId { get; set; } + + [Key(1)] public string AssetPath { get; set; } +} diff --git a/src/Models/Entities/EntityMAssetTurnbattlePrefab.cs b/src/Models/Entities/EntityMAssetTurnbattlePrefab.cs new file mode 100644 index 0000000..40f1631 --- /dev/null +++ b/src/Models/Entities/EntityMAssetTurnbattlePrefab.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMAssetTurnbattlePrefab))] +public class EntityMAssetTurnbattlePrefab +{ + [Key(0)] public int AssetTurnbattlePrefabId { get; set; } + + [Key(1)] public string AssetPath { get; set; } +} diff --git a/src/Models/Entities/EntityMBattle.cs b/src/Models/Entities/EntityMBattle.cs new file mode 100644 index 0000000..df3bc52 --- /dev/null +++ b/src/Models/Entities/EntityMBattle.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBattle))] +public class EntityMBattle +{ + [Key(0)] public int BattleId { get; set; } + + [Key(1)] public long BattleNpcId { get; set; } + + [Key(2)] public DeckType DeckType { get; set; } + + [Key(3)] public int BattleNpcDeckNumber { get; set; } +} diff --git a/src/Models/Entities/EntityMBattleActorAi.cs b/src/Models/Entities/EntityMBattleActorAi.cs new file mode 100644 index 0000000..64cf77a --- /dev/null +++ b/src/Models/Entities/EntityMBattleActorAi.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBattleActorAi))] +public class EntityMBattleActorAi +{ + [Key(0)] public int BattleActorAiId { get; set; } + + [Key(1)] public string AssetPath { get; set; } + + [Key(2)] public string Description { get; set; } +} diff --git a/src/Models/Entities/EntityMBattleActorSkillAiGroup.cs b/src/Models/Entities/EntityMBattleActorSkillAiGroup.cs new file mode 100644 index 0000000..d18ac7c --- /dev/null +++ b/src/Models/Entities/EntityMBattleActorSkillAiGroup.cs @@ -0,0 +1,24 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBattleActorSkillAiGroup))] +public class EntityMBattleActorSkillAiGroup +{ + [Key(0)] public int BattleActorSkillAiGroupId { get; set; } + + [Key(1)] public int Priority { get; set; } + + [Key(2)] public BattleSchemeType BattleSchemeType { get; set; } + + [Key(3)] public bool IsPlayerSide { get; set; } + + [Key(4)] public SkillAiUnlockConditionValueType SkillAiUnlockConditionValueType { get; set; } + + [Key(5)] public int SkillAiUnlockConditionValue { get; set; } + + [Key(6)] public int BattleActorSkillAiId { get; set; } +} diff --git a/src/Models/Entities/EntityMBattleAdditionalAbility.cs b/src/Models/Entities/EntityMBattleAdditionalAbility.cs new file mode 100644 index 0000000..d966a47 --- /dev/null +++ b/src/Models/Entities/EntityMBattleAdditionalAbility.cs @@ -0,0 +1,22 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBattleAdditionalAbility))] +public class EntityMBattleAdditionalAbility +{ + [Key(0)] public int BattleGroupId { get; set; } + + [Key(1)] public int TargetActorAppearanceWaveNumber { get; set; } + + [Key(2)] public int AbilityIndex { get; set; } + + [Key(3)] public int AdditionalAbilityApplyScopeType { get; set; } + + [Key(4)] public int AbilityId { get; set; } + + [Key(5)] public int AbilityLevel { get; set; } +} diff --git a/src/Models/Entities/EntityMBattleAttributeDamageCoefficientDefine.cs b/src/Models/Entities/EntityMBattleAttributeDamageCoefficientDefine.cs new file mode 100644 index 0000000..c310245 --- /dev/null +++ b/src/Models/Entities/EntityMBattleAttributeDamageCoefficientDefine.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBattleAttributeDamageCoefficientDefine))] +public class EntityMBattleAttributeDamageCoefficientDefine +{ + [Key(0)] public BattleSchemeType BattleSchemeType { get; set; } + + [Key(1)] public int PlayerAttributeDamageCoefficientGroupId { get; set; } + + [Key(2)] public int NpcAttributeDamageCoefficientGroupId { get; set; } +} diff --git a/src/Models/Entities/EntityMBattleAttributeDamageCoefficientGroup.cs b/src/Models/Entities/EntityMBattleAttributeDamageCoefficientGroup.cs new file mode 100644 index 0000000..716b450 --- /dev/null +++ b/src/Models/Entities/EntityMBattleAttributeDamageCoefficientGroup.cs @@ -0,0 +1,20 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBattleAttributeDamageCoefficientGroup))] +public class EntityMBattleAttributeDamageCoefficientGroup +{ + [Key(0)] public int AttributeDamageCoefficientGroupId { get; set; } + + [Key(1)] public AttributeType SkillExecutorAttributeType { get; set; } + + [Key(2)] public AttributeType SkillTargetAttributeType { get; set; } + + [Key(3)] public AttributeCompatibilityType AttributeCompatibilityType { get; set; } + + [Key(4)] public int DamageCoefficientPermil { get; set; } +} diff --git a/src/Models/Entities/EntityMBattleBgmSet.cs b/src/Models/Entities/EntityMBattleBgmSet.cs new file mode 100644 index 0000000..0e5b5fc --- /dev/null +++ b/src/Models/Entities/EntityMBattleBgmSet.cs @@ -0,0 +1,20 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBattleBgmSet))] +public class EntityMBattleBgmSet +{ + [Key(0)] public int BgmSetId { get; set; } + + [Key(1)] public int TrackNumber { get; set; } + + [Key(2)] public int BgmAssetId { get; set; } + + [Key(3)] public int Stem { get; set; } + + [Key(4)] public int StartWaveNumber { get; set; } +} diff --git a/src/Models/Entities/EntityMBattleBgmSetGroup.cs b/src/Models/Entities/EntityMBattleBgmSetGroup.cs new file mode 100644 index 0000000..6bb3569 --- /dev/null +++ b/src/Models/Entities/EntityMBattleBgmSetGroup.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBattleBgmSetGroup))] +public class EntityMBattleBgmSetGroup +{ + [Key(0)] public int BgmSetGroupId { get; set; } + + [Key(1)] public int BgmSetGroupIndex { get; set; } + + [Key(2)] public int BgmSetId { get; set; } + + [Key(3)] public int RandomWeight { get; set; } +} diff --git a/src/Models/Entities/EntityMBattleBigHunt.cs b/src/Models/Entities/EntityMBattleBigHunt.cs new file mode 100644 index 0000000..9915eb6 --- /dev/null +++ b/src/Models/Entities/EntityMBattleBigHunt.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBattleBigHunt))] +public class EntityMBattleBigHunt +{ + [Key(0)] public int BattleGroupId { get; set; } + + [Key(1)] public int BattleBigHuntPhaseGroupId { get; set; } + + [Key(2)] public int KnockDownGaugeValueConfigGroupId { get; set; } +} diff --git a/src/Models/Entities/EntityMBattleBigHuntDamageThresholdGroup.cs b/src/Models/Entities/EntityMBattleBigHuntDamageThresholdGroup.cs new file mode 100644 index 0000000..7dbf8c1 --- /dev/null +++ b/src/Models/Entities/EntityMBattleBigHuntDamageThresholdGroup.cs @@ -0,0 +1,22 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBattleBigHuntDamageThresholdGroup))] +public class EntityMBattleBigHuntDamageThresholdGroup +{ + [Key(0)] public int KnockDownDamageThresholdGroupId { get; set; } + + [Key(1)] public int KnockDownDamageThresholdGroupOrder { get; set; } + + [Key(2)] public int KnockDownCumulativeDamageThreshold { get; set; } + + [Key(3)] public bool IsKnockDown { get; set; } + + [Key(4)] public int KnockDownDurationFrameCount { get; set; } + + [Key(5)] public int DamageRatio { get; set; } +} diff --git a/src/Models/Entities/EntityMBattleBigHuntKnockDownGaugeValueConfigGroup.cs b/src/Models/Entities/EntityMBattleBigHuntKnockDownGaugeValueConfigGroup.cs new file mode 100644 index 0000000..61b6e35 --- /dev/null +++ b/src/Models/Entities/EntityMBattleBigHuntKnockDownGaugeValueConfigGroup.cs @@ -0,0 +1,20 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBattleBigHuntKnockDownGaugeValueConfigGroup))] +public class EntityMBattleBigHuntKnockDownGaugeValueConfigGroup +{ + [Key(0)] public int KnockDownGaugeValueConfigGroupId { get; set; } + + [Key(1)] public int ActiveSkillHitCount { get; set; } + + [Key(2)] public int DamageValueLowerLimit { get; set; } + + [Key(3)] public int GaugeValueLowerLimit { get; set; } + + [Key(4)] public int CorrectionRatioPermil { get; set; } +} diff --git a/src/Models/Entities/EntityMBattleBigHuntPhaseGroup.cs b/src/Models/Entities/EntityMBattleBigHuntPhaseGroup.cs new file mode 100644 index 0000000..71f0e6b --- /dev/null +++ b/src/Models/Entities/EntityMBattleBigHuntPhaseGroup.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBattleBigHuntPhaseGroup))] +public class EntityMBattleBigHuntPhaseGroup +{ + [Key(0)] public int BattleBigHuntPhaseGroupId { get; set; } + + [Key(1)] public int BattleBigHuntPhaseGroupOrder { get; set; } + + [Key(2)] public int KnockDownDamageThresholdGroupId { get; set; } + + [Key(3)] public int NormalPhaseFrameCount { get; set; } +} diff --git a/src/Models/Entities/EntityMBattleCompanionSkillAiGroup.cs b/src/Models/Entities/EntityMBattleCompanionSkillAiGroup.cs new file mode 100644 index 0000000..2bae0ae --- /dev/null +++ b/src/Models/Entities/EntityMBattleCompanionSkillAiGroup.cs @@ -0,0 +1,24 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBattleCompanionSkillAiGroup))] +public class EntityMBattleCompanionSkillAiGroup +{ + [Key(0)] public int BattleCompanionSkillAiGroupId { get; set; } + + [Key(1)] public int Priority { get; set; } + + [Key(2)] public BattleSchemeType BattleSchemeType { get; set; } + + [Key(3)] public bool IsPlayerSide { get; set; } + + [Key(4)] public SkillAiUnlockConditionValueType SkillAiUnlockConditionValueType { get; set; } + + [Key(5)] public int SkillAiUnlockConditionValue { get; set; } + + [Key(6)] public int BattleCompanionSkillAiId { get; set; } +} diff --git a/src/Models/Entities/EntityMBattleCostumeSkillFireAct.cs b/src/Models/Entities/EntityMBattleCostumeSkillFireAct.cs new file mode 100644 index 0000000..21a1ac4 --- /dev/null +++ b/src/Models/Entities/EntityMBattleCostumeSkillFireAct.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBattleCostumeSkillFireAct))] +public class EntityMBattleCostumeSkillFireAct +{ + [Key(0)] public int CostumeId { get; set; } + + [Key(1)] public int BattleSkillFireActId { get; set; } +} diff --git a/src/Models/Entities/EntityMBattleCostumeSkillSe.cs b/src/Models/Entities/EntityMBattleCostumeSkillSe.cs new file mode 100644 index 0000000..67085ad --- /dev/null +++ b/src/Models/Entities/EntityMBattleCostumeSkillSe.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBattleCostumeSkillSe))] +public class EntityMBattleCostumeSkillSe +{ + [Key(0)] public int CostumeId { get; set; } + + [Key(1)] public int CostumeSkillReadySeAssetId { get; set; } +} diff --git a/src/Models/Entities/EntityMBattleDropReward.cs b/src/Models/Entities/EntityMBattleDropReward.cs new file mode 100644 index 0000000..74fec11 --- /dev/null +++ b/src/Models/Entities/EntityMBattleDropReward.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBattleDropReward))] +public class EntityMBattleDropReward +{ + [Key(0)] public int BattleDropRewardId { get; set; } + + [Key(1)] public PossessionType PossessionType { get; set; } + + [Key(2)] public int PossessionId { get; set; } + + [Key(3)] public int Count { get; set; } +} diff --git a/src/Models/Entities/EntityMBattleEnemySizeTypeConfig.cs b/src/Models/Entities/EntityMBattleEnemySizeTypeConfig.cs new file mode 100644 index 0000000..9655ebd --- /dev/null +++ b/src/Models/Entities/EntityMBattleEnemySizeTypeConfig.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBattleEnemySizeTypeConfig))] +public class EntityMBattleEnemySizeTypeConfig +{ + [Key(0)] public CostumeAssetCategoryType CostumeAssetCategoryType { get; set; } + + [Key(1)] public int ActorSkeletonId { get; set; } + + [Key(2)] public EnemySizeType EnemySizeType { get; set; } +} diff --git a/src/Models/Entities/EntityMBattleEvent.cs b/src/Models/Entities/EntityMBattleEvent.cs new file mode 100644 index 0000000..0437410 --- /dev/null +++ b/src/Models/Entities/EntityMBattleEvent.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBattleEvent))] +public class EntityMBattleEvent +{ + [Key(0)] public int BattleEventId { get; set; } + + [Key(1)] public int BattleEventTriggerBehaviourGroupId { get; set; } + + [Key(2)] public int BattleEventReceiverBehaviourGroupId { get; set; } +} diff --git a/src/Models/Entities/EntityMBattleEventGroup.cs b/src/Models/Entities/EntityMBattleEventGroup.cs new file mode 100644 index 0000000..04e9f13 --- /dev/null +++ b/src/Models/Entities/EntityMBattleEventGroup.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBattleEventGroup))] +public class EntityMBattleEventGroup +{ + [Key(0)] public int BattleEventGroupId { get; set; } + + [Key(1)] public int BattleEventId { get; set; } +} diff --git a/src/Models/Entities/EntityMBattleEventReceiverBehaviourGroup.cs b/src/Models/Entities/EntityMBattleEventReceiverBehaviourGroup.cs new file mode 100644 index 0000000..290e500 --- /dev/null +++ b/src/Models/Entities/EntityMBattleEventReceiverBehaviourGroup.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBattleEventReceiverBehaviourGroup))] +public class EntityMBattleEventReceiverBehaviourGroup +{ + [Key(0)] public int BattleEventReceiverBehaviourGroupId { get; set; } + + [Key(1)] public int ExecuteOrder { get; set; } + + [Key(2)] public int BattleEventReceiverBehaviourType { get; set; } + + [Key(3)] public int BattleEventReceiverBehaviourId { get; set; } +} diff --git a/src/Models/Entities/EntityMBattleEventReceiverBehaviourHudActSequence.cs b/src/Models/Entities/EntityMBattleEventReceiverBehaviourHudActSequence.cs new file mode 100644 index 0000000..6717d5f --- /dev/null +++ b/src/Models/Entities/EntityMBattleEventReceiverBehaviourHudActSequence.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBattleEventReceiverBehaviourHudActSequence))] +public class EntityMBattleEventReceiverBehaviourHudActSequence +{ + [Key(0)] public int BattleEventReceiverBehaviourId { get; set; } + + [Key(1)] public int HudActSequenceId { get; set; } +} diff --git a/src/Models/Entities/EntityMBattleEventReceiverBehaviourRadioMessage.cs b/src/Models/Entities/EntityMBattleEventReceiverBehaviourRadioMessage.cs new file mode 100644 index 0000000..70ad8b5 --- /dev/null +++ b/src/Models/Entities/EntityMBattleEventReceiverBehaviourRadioMessage.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBattleEventReceiverBehaviourRadioMessage))] +public class EntityMBattleEventReceiverBehaviourRadioMessage +{ + [Key(0)] public int BattleEventReceiverBehaviourId { get; set; } + + [Key(1)] public int SpeakerId { get; set; } + + [Key(2)] public string ScenarioKey { get; set; } +} diff --git a/src/Models/Entities/EntityMBattleEventTriggerBehaviourBattleStart.cs b/src/Models/Entities/EntityMBattleEventTriggerBehaviourBattleStart.cs new file mode 100644 index 0000000..887d462 --- /dev/null +++ b/src/Models/Entities/EntityMBattleEventTriggerBehaviourBattleStart.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBattleEventTriggerBehaviourBattleStart))] +public class EntityMBattleEventTriggerBehaviourBattleStart +{ + [Key(0)] public int BattleEventTriggerBehaviourId { get; set; } + + [Key(1)] public bool TriggerOnBattleRestore { get; set; } +} diff --git a/src/Models/Entities/EntityMBattleEventTriggerBehaviourGroup.cs b/src/Models/Entities/EntityMBattleEventTriggerBehaviourGroup.cs new file mode 100644 index 0000000..e7d0980 --- /dev/null +++ b/src/Models/Entities/EntityMBattleEventTriggerBehaviourGroup.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBattleEventTriggerBehaviourGroup))] +public class EntityMBattleEventTriggerBehaviourGroup +{ + [Key(0)] public int BattleEventTriggerBehaviourGroupId { get; set; } + + [Key(1)] public int BattleEventTriggerBehaviourType { get; set; } + + [Key(2)] public int BattleEventTriggerBehaviourId { get; set; } +} diff --git a/src/Models/Entities/EntityMBattleEventTriggerBehaviourWaveStart.cs b/src/Models/Entities/EntityMBattleEventTriggerBehaviourWaveStart.cs new file mode 100644 index 0000000..bbe609f --- /dev/null +++ b/src/Models/Entities/EntityMBattleEventTriggerBehaviourWaveStart.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBattleEventTriggerBehaviourWaveStart))] +public class EntityMBattleEventTriggerBehaviourWaveStart +{ + [Key(0)] public int BattleEventTriggerBehaviourId { get; set; } + + [Key(1)] public int WaveNumber { get; set; } +} diff --git a/src/Models/Entities/EntityMBattleGeneralViewConfiguration.cs b/src/Models/Entities/EntityMBattleGeneralViewConfiguration.cs new file mode 100644 index 0000000..8aaef80 --- /dev/null +++ b/src/Models/Entities/EntityMBattleGeneralViewConfiguration.cs @@ -0,0 +1,24 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBattleGeneralViewConfiguration))] +public class EntityMBattleGeneralViewConfiguration +{ + [Key(0)] public int QuestSceneId { get; set; } + + [Key(1)] public int WaveNumber { get; set; } + + [Key(2)] public bool IsDisableBattleStartVoice { get; set; } + + [Key(3)] public bool IsEnableWhiteFadeout { get; set; } + + [Key(4)] public int EnvSeId { get; set; } + + [Key(5)] public int WaveWinSeId { get; set; } + + [Key(6)] public bool IsDisablePlayWinTimeline { get; set; } +} diff --git a/src/Models/Entities/EntityMBattleGroup.cs b/src/Models/Entities/EntityMBattleGroup.cs new file mode 100644 index 0000000..5263527 --- /dev/null +++ b/src/Models/Entities/EntityMBattleGroup.cs @@ -0,0 +1,26 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBattleGroup))] +public class EntityMBattleGroup +{ + [Key(0)] public int BattleGroupId { get; set; } + + [Key(1)] public int WaveNumber { get; set; } + + [Key(2)] public int BattleId { get; set; } + + [Key(3)] public int WaveStartActAssetId { get; set; } + + [Key(4)] public int WaveEndActAssetId { get; set; } + + [Key(5)] public int BattleCameraControllerAssetId { get; set; } + + [Key(6)] public int BattlePointIndex { get; set; } + + [Key(7)] public BattleStartCameraType BattleStartCameraType { get; set; } +} diff --git a/src/Models/Entities/EntityMBattleNpc.cs b/src/Models/Entities/EntityMBattleNpc.cs new file mode 100644 index 0000000..67c62ad --- /dev/null +++ b/src/Models/Entities/EntityMBattleNpc.cs @@ -0,0 +1,12 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBattleNpc))] +public class EntityMBattleNpc +{ + [Key(0)] public long BattleNpcId { get; set; } +} diff --git a/src/Models/Entities/EntityMBattleNpcCharacter.cs b/src/Models/Entities/EntityMBattleNpcCharacter.cs new file mode 100644 index 0000000..2e39eb7 --- /dev/null +++ b/src/Models/Entities/EntityMBattleNpcCharacter.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBattleNpcCharacter))] +public class EntityMBattleNpcCharacter +{ + [Key(0)] public long BattleNpcId { get; set; } + + [Key(1)] public int CharacterId { get; set; } + + [Key(2)] public int Level { get; set; } + + [Key(3)] public int Exp { get; set; } +} diff --git a/src/Models/Entities/EntityMBattleNpcCharacterBoard.cs b/src/Models/Entities/EntityMBattleNpcCharacterBoard.cs new file mode 100644 index 0000000..c310859 --- /dev/null +++ b/src/Models/Entities/EntityMBattleNpcCharacterBoard.cs @@ -0,0 +1,22 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBattleNpcCharacterBoard))] +public class EntityMBattleNpcCharacterBoard +{ + [Key(0)] public long BattleNpcId { get; set; } + + [Key(1)] public int CharacterBoardId { get; set; } + + [Key(2)] public int PanelReleaseBit1 { get; set; } + + [Key(3)] public int PanelReleaseBit2 { get; set; } + + [Key(4)] public int PanelReleaseBit3 { get; set; } + + [Key(5)] public int PanelReleaseBit4 { get; set; } +} diff --git a/src/Models/Entities/EntityMBattleNpcCharacterBoardAbility.cs b/src/Models/Entities/EntityMBattleNpcCharacterBoardAbility.cs new file mode 100644 index 0000000..4854b8c --- /dev/null +++ b/src/Models/Entities/EntityMBattleNpcCharacterBoardAbility.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBattleNpcCharacterBoardAbility))] +public class EntityMBattleNpcCharacterBoardAbility +{ + [Key(0)] public long BattleNpcId { get; set; } + + [Key(1)] public int CharacterId { get; set; } + + [Key(2)] public int AbilityId { get; set; } + + [Key(3)] public int Level { get; set; } +} diff --git a/src/Models/Entities/EntityMBattleNpcCharacterBoardCompleteReward.cs b/src/Models/Entities/EntityMBattleNpcCharacterBoardCompleteReward.cs new file mode 100644 index 0000000..268c0e9 --- /dev/null +++ b/src/Models/Entities/EntityMBattleNpcCharacterBoardCompleteReward.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBattleNpcCharacterBoardCompleteReward))] +public class EntityMBattleNpcCharacterBoardCompleteReward +{ + [Key(0)] public long BattleNpcId { get; set; } + + [Key(1)] public int CharacterBoardCompleteRewardId { get; set; } +} diff --git a/src/Models/Entities/EntityMBattleNpcCharacterBoardStatusUp.cs b/src/Models/Entities/EntityMBattleNpcCharacterBoardStatusUp.cs new file mode 100644 index 0000000..3bd4277 --- /dev/null +++ b/src/Models/Entities/EntityMBattleNpcCharacterBoardStatusUp.cs @@ -0,0 +1,28 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBattleNpcCharacterBoardStatusUp))] +public class EntityMBattleNpcCharacterBoardStatusUp +{ + [Key(0)] public long BattleNpcId { get; set; } + + [Key(1)] public int CharacterId { get; set; } + + [Key(2)] public StatusCalculationType StatusCalculationType { get; set; } + + [Key(3)] public int Hp { get; set; } + + [Key(4)] public int Attack { get; set; } + + [Key(5)] public int Vitality { get; set; } + + [Key(6)] public int Agility { get; set; } + + [Key(7)] public int CriticalRatio { get; set; } + + [Key(8)] public int CriticalAttack { get; set; } +} diff --git a/src/Models/Entities/EntityMBattleNpcCharacterCostumeLevelBonus.cs b/src/Models/Entities/EntityMBattleNpcCharacterCostumeLevelBonus.cs new file mode 100644 index 0000000..ebc4ca4 --- /dev/null +++ b/src/Models/Entities/EntityMBattleNpcCharacterCostumeLevelBonus.cs @@ -0,0 +1,28 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBattleNpcCharacterCostumeLevelBonus))] +public class EntityMBattleNpcCharacterCostumeLevelBonus +{ + [Key(0)] public long BattleNpcId { get; set; } + + [Key(1)] public int CharacterId { get; set; } + + [Key(2)] public StatusCalculationType StatusCalculationType { get; set; } + + [Key(3)] public int Hp { get; set; } + + [Key(4)] public int Attack { get; set; } + + [Key(5)] public int Vitality { get; set; } + + [Key(6)] public int Agility { get; set; } + + [Key(7)] public int CriticalRatio { get; set; } + + [Key(8)] public int CriticalAttack { get; set; } +} diff --git a/src/Models/Entities/EntityMBattleNpcCharacterRebirth.cs b/src/Models/Entities/EntityMBattleNpcCharacterRebirth.cs new file mode 100644 index 0000000..d9a5b5d --- /dev/null +++ b/src/Models/Entities/EntityMBattleNpcCharacterRebirth.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBattleNpcCharacterRebirth))] +public class EntityMBattleNpcCharacterRebirth +{ + [Key(0)] public long BattleNpcId { get; set; } + + [Key(1)] public int CharacterId { get; set; } + + [Key(2)] public int RebirthCount { get; set; } +} diff --git a/src/Models/Entities/EntityMBattleNpcCharacterViewerField.cs b/src/Models/Entities/EntityMBattleNpcCharacterViewerField.cs new file mode 100644 index 0000000..40f3e05 --- /dev/null +++ b/src/Models/Entities/EntityMBattleNpcCharacterViewerField.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBattleNpcCharacterViewerField))] +public class EntityMBattleNpcCharacterViewerField +{ + [Key(0)] public long BattleNpcId { get; set; } + + [Key(1)] public int CharacterViewerFieldId { get; set; } + + [Key(2)] public long ReleaseDatetime { get; set; } +} diff --git a/src/Models/Entities/EntityMBattleNpcCompanion.cs b/src/Models/Entities/EntityMBattleNpcCompanion.cs new file mode 100644 index 0000000..99b003f --- /dev/null +++ b/src/Models/Entities/EntityMBattleNpcCompanion.cs @@ -0,0 +1,22 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBattleNpcCompanion))] +public class EntityMBattleNpcCompanion +{ + [Key(0)] public long BattleNpcId { get; set; } + + [Key(1)] public string BattleNpcCompanionUuid { get; set; } + + [Key(2)] public int CompanionId { get; set; } + + [Key(3)] public int HeadupDisplayViewId { get; set; } + + [Key(4)] public int Level { get; set; } + + [Key(5)] public long AcquisitionDatetime { get; set; } +} diff --git a/src/Models/Entities/EntityMBattleNpcCostume.cs b/src/Models/Entities/EntityMBattleNpcCostume.cs new file mode 100644 index 0000000..47c9b45 --- /dev/null +++ b/src/Models/Entities/EntityMBattleNpcCostume.cs @@ -0,0 +1,28 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBattleNpcCostume))] +public class EntityMBattleNpcCostume +{ + [Key(0)] public long BattleNpcId { get; set; } + + [Key(1)] public string BattleNpcCostumeUuid { get; set; } + + [Key(2)] public int CostumeId { get; set; } + + [Key(3)] public int LimitBreakCount { get; set; } + + [Key(4)] public int Level { get; set; } + + [Key(5)] public int Exp { get; set; } + + [Key(6)] public int HeadupDisplayViewId { get; set; } + + [Key(7)] public long AcquisitionDatetime { get; set; } + + [Key(8)] public int AwakenCount { get; set; } +} diff --git a/src/Models/Entities/EntityMBattleNpcCostumeActiveSkill.cs b/src/Models/Entities/EntityMBattleNpcCostumeActiveSkill.cs new file mode 100644 index 0000000..7e479bb --- /dev/null +++ b/src/Models/Entities/EntityMBattleNpcCostumeActiveSkill.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBattleNpcCostumeActiveSkill))] +public class EntityMBattleNpcCostumeActiveSkill +{ + [Key(0)] public long BattleNpcId { get; set; } + + [Key(1)] public string BattleNpcCostumeUuid { get; set; } + + [Key(2)] public int Level { get; set; } + + [Key(3)] public long AcquisitionDatetime { get; set; } +} diff --git a/src/Models/Entities/EntityMBattleNpcCostumeAwakenStatusUp.cs b/src/Models/Entities/EntityMBattleNpcCostumeAwakenStatusUp.cs new file mode 100644 index 0000000..a1bcafa --- /dev/null +++ b/src/Models/Entities/EntityMBattleNpcCostumeAwakenStatusUp.cs @@ -0,0 +1,28 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBattleNpcCostumeAwakenStatusUp))] +public class EntityMBattleNpcCostumeAwakenStatusUp +{ + [Key(0)] public long BattleNpcId { get; set; } + + [Key(1)] public string BattleNpcCostumeUuid { get; set; } + + [Key(2)] public StatusCalculationType StatusCalculationType { get; set; } + + [Key(3)] public int Hp { get; set; } + + [Key(4)] public int Attack { get; set; } + + [Key(5)] public int Vitality { get; set; } + + [Key(6)] public int Agility { get; set; } + + [Key(7)] public int CriticalRatio { get; set; } + + [Key(8)] public int CriticalAttack { get; set; } +} diff --git a/src/Models/Entities/EntityMBattleNpcCostumeLevelBonusReevaluate.cs b/src/Models/Entities/EntityMBattleNpcCostumeLevelBonusReevaluate.cs new file mode 100644 index 0000000..aa5e616 --- /dev/null +++ b/src/Models/Entities/EntityMBattleNpcCostumeLevelBonusReevaluate.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBattleNpcCostumeLevelBonusReevaluate))] +public class EntityMBattleNpcCostumeLevelBonusReevaluate +{ + [Key(0)] public long BattleNpcId { get; set; } + + [Key(1)] public long LastReevaluateDatetime { get; set; } +} diff --git a/src/Models/Entities/EntityMBattleNpcCostumeLevelBonusReleaseStatus.cs b/src/Models/Entities/EntityMBattleNpcCostumeLevelBonusReleaseStatus.cs new file mode 100644 index 0000000..4339008 --- /dev/null +++ b/src/Models/Entities/EntityMBattleNpcCostumeLevelBonusReleaseStatus.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBattleNpcCostumeLevelBonusReleaseStatus))] +public class EntityMBattleNpcCostumeLevelBonusReleaseStatus +{ + [Key(0)] public long BattleNpcId { get; set; } + + [Key(1)] public int CostumeId { get; set; } + + [Key(2)] public int LastReleasedBonusLevel { get; set; } + + [Key(3)] public int ConfirmedBonusLevel { get; set; } +} diff --git a/src/Models/Entities/EntityMBattleNpcCostumeLotteryEffect.cs b/src/Models/Entities/EntityMBattleNpcCostumeLotteryEffect.cs new file mode 100644 index 0000000..71abcd3 --- /dev/null +++ b/src/Models/Entities/EntityMBattleNpcCostumeLotteryEffect.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBattleNpcCostumeLotteryEffect))] +public class EntityMBattleNpcCostumeLotteryEffect +{ + [Key(0)] public long BattleNpcId { get; set; } + + [Key(1)] public string BattleNpcCostumeUuid { get; set; } + + [Key(2)] public int SlotNumber { get; set; } + + [Key(3)] public int OddsNumber { get; set; } +} diff --git a/src/Models/Entities/EntityMBattleNpcCostumeLotteryEffectAbility.cs b/src/Models/Entities/EntityMBattleNpcCostumeLotteryEffectAbility.cs new file mode 100644 index 0000000..2a2dd62 --- /dev/null +++ b/src/Models/Entities/EntityMBattleNpcCostumeLotteryEffectAbility.cs @@ -0,0 +1,20 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBattleNpcCostumeLotteryEffectAbility))] +public class EntityMBattleNpcCostumeLotteryEffectAbility +{ + [Key(0)] public long BattleNpcId { get; set; } + + [Key(1)] public string BattleNpcCostumeUuid { get; set; } + + [Key(2)] public int SlotNumber { get; set; } + + [Key(3)] public int AbilityId { get; set; } + + [Key(4)] public int AbilityLevel { get; set; } +} diff --git a/src/Models/Entities/EntityMBattleNpcCostumeLotteryEffectPending.cs b/src/Models/Entities/EntityMBattleNpcCostumeLotteryEffectPending.cs new file mode 100644 index 0000000..9a1b589 --- /dev/null +++ b/src/Models/Entities/EntityMBattleNpcCostumeLotteryEffectPending.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBattleNpcCostumeLotteryEffectPending))] +public class EntityMBattleNpcCostumeLotteryEffectPending +{ + [Key(0)] public long BattleNpcId { get; set; } + + [Key(1)] public string BattleNpcCostumeUuid { get; set; } + + [Key(2)] public int SlotNumber { get; set; } + + [Key(3)] public int OddsNumber { get; set; } +} diff --git a/src/Models/Entities/EntityMBattleNpcCostumeLotteryEffectStatusUp.cs b/src/Models/Entities/EntityMBattleNpcCostumeLotteryEffectStatusUp.cs new file mode 100644 index 0000000..db45de4 --- /dev/null +++ b/src/Models/Entities/EntityMBattleNpcCostumeLotteryEffectStatusUp.cs @@ -0,0 +1,28 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBattleNpcCostumeLotteryEffectStatusUp))] +public class EntityMBattleNpcCostumeLotteryEffectStatusUp +{ + [Key(0)] public long BattleNpcId { get; set; } + + [Key(1)] public string BattleNpcCostumeUuid { get; set; } + + [Key(2)] public StatusCalculationType StatusCalculationType { get; set; } + + [Key(3)] public int Hp { get; set; } + + [Key(4)] public int Attack { get; set; } + + [Key(5)] public int Vitality { get; set; } + + [Key(6)] public int Agility { get; set; } + + [Key(7)] public int CriticalRatio { get; set; } + + [Key(8)] public int CriticalAttack { get; set; } +} diff --git a/src/Models/Entities/EntityMBattleNpcDeck.cs b/src/Models/Entities/EntityMBattleNpcDeck.cs new file mode 100644 index 0000000..ad185b6 --- /dev/null +++ b/src/Models/Entities/EntityMBattleNpcDeck.cs @@ -0,0 +1,26 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBattleNpcDeck))] +public class EntityMBattleNpcDeck +{ + [Key(0)] public long BattleNpcId { get; set; } + + [Key(1)] public DeckType DeckType { get; set; } + + [Key(2)] public int BattleNpcDeckNumber { get; set; } + + [Key(3)] public string BattleNpcDeckCharacterUuid01 { get; set; } + + [Key(4)] public string BattleNpcDeckCharacterUuid02 { get; set; } + + [Key(5)] public string BattleNpcDeckCharacterUuid03 { get; set; } + + [Key(6)] public string Name { get; set; } + + [Key(7)] public int Power { get; set; } +} diff --git a/src/Models/Entities/EntityMBattleNpcDeckBackup.cs b/src/Models/Entities/EntityMBattleNpcDeckBackup.cs new file mode 100644 index 0000000..df0e272 --- /dev/null +++ b/src/Models/Entities/EntityMBattleNpcDeckBackup.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBattleNpcDeckBackup))] +public class EntityMBattleNpcDeckBackup +{ + [Key(0)] public long BattleNpcId { get; set; } + + [Key(1)] public string BattleNpcDeckBackupUuid { get; set; } + + [Key(2)] public string DeckJson { get; set; } +} diff --git a/src/Models/Entities/EntityMBattleNpcDeckCharacter.cs b/src/Models/Entities/EntityMBattleNpcDeckCharacter.cs new file mode 100644 index 0000000..3af0c9a --- /dev/null +++ b/src/Models/Entities/EntityMBattleNpcDeckCharacter.cs @@ -0,0 +1,24 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBattleNpcDeckCharacter))] +public class EntityMBattleNpcDeckCharacter +{ + [Key(0)] public long BattleNpcId { get; set; } + + [Key(1)] public string BattleNpcDeckCharacterUuid { get; set; } + + [Key(2)] public string BattleNpcCostumeUuid { get; set; } + + [Key(3)] public string MainBattleNpcWeaponUuid { get; set; } + + [Key(4)] public string BattleNpcCompanionUuid { get; set; } + + [Key(5)] public int Power { get; set; } + + [Key(6)] public string BattleNpcThoughtUuid { get; set; } +} diff --git a/src/Models/Entities/EntityMBattleNpcDeckCharacterDressupCostume.cs b/src/Models/Entities/EntityMBattleNpcDeckCharacterDressupCostume.cs new file mode 100644 index 0000000..dc5b71e --- /dev/null +++ b/src/Models/Entities/EntityMBattleNpcDeckCharacterDressupCostume.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBattleNpcDeckCharacterDressupCostume))] +public class EntityMBattleNpcDeckCharacterDressupCostume +{ + [Key(0)] public long BattleNpcId { get; set; } + + [Key(1)] public string BattleNpcDeckCharacterUuid { get; set; } + + [Key(2)] public int DressupCostumeId { get; set; } +} diff --git a/src/Models/Entities/EntityMBattleNpcDeckCharacterDropCategory.cs b/src/Models/Entities/EntityMBattleNpcDeckCharacterDropCategory.cs new file mode 100644 index 0000000..d83709b --- /dev/null +++ b/src/Models/Entities/EntityMBattleNpcDeckCharacterDropCategory.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBattleNpcDeckCharacterDropCategory))] +public class EntityMBattleNpcDeckCharacterDropCategory +{ + [Key(0)] public long BattleNpcId { get; set; } + + [Key(1)] public string BattleNpcDeckCharacterUuid { get; set; } + + [Key(2)] public int BattleDropCategoryId { get; set; } +} diff --git a/src/Models/Entities/EntityMBattleNpcDeckCharacterType.cs b/src/Models/Entities/EntityMBattleNpcDeckCharacterType.cs new file mode 100644 index 0000000..1c79278 --- /dev/null +++ b/src/Models/Entities/EntityMBattleNpcDeckCharacterType.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBattleNpcDeckCharacterType))] +public class EntityMBattleNpcDeckCharacterType +{ + [Key(0)] public long BattleNpcId { get; set; } + + [Key(1)] public string BattleNpcDeckCharacterUuid { get; set; } + + [Key(2)] public BattleEnemyType BattleEnemyType { get; set; } +} diff --git a/src/Models/Entities/EntityMBattleNpcDeckLimitContentBackup.cs b/src/Models/Entities/EntityMBattleNpcDeckLimitContentBackup.cs new file mode 100644 index 0000000..27226af --- /dev/null +++ b/src/Models/Entities/EntityMBattleNpcDeckLimitContentBackup.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBattleNpcDeckLimitContentBackup))] +public class EntityMBattleNpcDeckLimitContentBackup +{ + [Key(0)] public long BattleNpcId { get; set; } + + [Key(1)] public int EventQuestChapterId { get; set; } + + [Key(2)] public int EventQuestSequenceSortOrder { get; set; } + + [Key(3)] public string BattleNpcDeckBackupUuid { get; set; } +} diff --git a/src/Models/Entities/EntityMBattleNpcDeckLimitContentBackupRestored.cs b/src/Models/Entities/EntityMBattleNpcDeckLimitContentBackupRestored.cs new file mode 100644 index 0000000..a1b46a6 --- /dev/null +++ b/src/Models/Entities/EntityMBattleNpcDeckLimitContentBackupRestored.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBattleNpcDeckLimitContentBackupRestored))] +public class EntityMBattleNpcDeckLimitContentBackupRestored +{ + [Key(0)] public long BattleNpcId { get; set; } + + [Key(1)] public int EventQuestChapterId { get; set; } + + [Key(2)] public DifficultyType DifficultyType { get; set; } +} diff --git a/src/Models/Entities/EntityMBattleNpcDeckLimitContentDeletedCharacter.cs b/src/Models/Entities/EntityMBattleNpcDeckLimitContentDeletedCharacter.cs new file mode 100644 index 0000000..ae7e6ba --- /dev/null +++ b/src/Models/Entities/EntityMBattleNpcDeckLimitContentDeletedCharacter.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBattleNpcDeckLimitContentDeletedCharacter))] +public class EntityMBattleNpcDeckLimitContentDeletedCharacter +{ + [Key(0)] public long BattleNpcId { get; set; } + + [Key(1)] public int BattleNpcDeckNumber { get; set; } + + [Key(2)] public int BattleNpcDeckCharacterNumber { get; set; } + + [Key(3)] public int CostumeId { get; set; } +} diff --git a/src/Models/Entities/EntityMBattleNpcDeckLimitContentRestricted.cs b/src/Models/Entities/EntityMBattleNpcDeckLimitContentRestricted.cs new file mode 100644 index 0000000..e82577b --- /dev/null +++ b/src/Models/Entities/EntityMBattleNpcDeckLimitContentRestricted.cs @@ -0,0 +1,22 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBattleNpcDeckLimitContentRestricted))] +public class EntityMBattleNpcDeckLimitContentRestricted +{ + [Key(0)] public long BattleNpcId { get; set; } + + [Key(1)] public int EventQuestChapterId { get; set; } + + [Key(2)] public int QuestId { get; set; } + + [Key(3)] public string DeckRestrictedUuid { get; set; } + + [Key(4)] public PossessionType PossessionType { get; set; } + + [Key(5)] public string TargetUuid { get; set; } +} diff --git a/src/Models/Entities/EntityMBattleNpcDeckPartsGroup.cs b/src/Models/Entities/EntityMBattleNpcDeckPartsGroup.cs new file mode 100644 index 0000000..155f8d6 --- /dev/null +++ b/src/Models/Entities/EntityMBattleNpcDeckPartsGroup.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBattleNpcDeckPartsGroup))] +public class EntityMBattleNpcDeckPartsGroup +{ + [Key(0)] public long BattleNpcId { get; set; } + + [Key(1)] public string BattleNpcDeckCharacterUuid { get; set; } + + [Key(2)] public string BattleNpcPartsUuid { get; set; } + + [Key(3)] public int SortOrder { get; set; } +} diff --git a/src/Models/Entities/EntityMBattleNpcDeckSubWeaponGroup.cs b/src/Models/Entities/EntityMBattleNpcDeckSubWeaponGroup.cs new file mode 100644 index 0000000..3759ec4 --- /dev/null +++ b/src/Models/Entities/EntityMBattleNpcDeckSubWeaponGroup.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBattleNpcDeckSubWeaponGroup))] +public class EntityMBattleNpcDeckSubWeaponGroup +{ + [Key(0)] public long BattleNpcId { get; set; } + + [Key(1)] public string BattleNpcDeckCharacterUuid { get; set; } + + [Key(2)] public string BattleNpcWeaponUuid { get; set; } + + [Key(3)] public int SortOrder { get; set; } +} diff --git a/src/Models/Entities/EntityMBattleNpcDeckTypeNote.cs b/src/Models/Entities/EntityMBattleNpcDeckTypeNote.cs new file mode 100644 index 0000000..9b99e7f --- /dev/null +++ b/src/Models/Entities/EntityMBattleNpcDeckTypeNote.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBattleNpcDeckTypeNote))] +public class EntityMBattleNpcDeckTypeNote +{ + [Key(0)] public long BattleNpcId { get; set; } + + [Key(1)] public DeckType DeckType { get; set; } + + [Key(2)] public int MaxDeckPower { get; set; } +} diff --git a/src/Models/Entities/EntityMBattleNpcParts.cs b/src/Models/Entities/EntityMBattleNpcParts.cs new file mode 100644 index 0000000..795bf76 --- /dev/null +++ b/src/Models/Entities/EntityMBattleNpcParts.cs @@ -0,0 +1,24 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBattleNpcParts))] +public class EntityMBattleNpcParts +{ + [Key(0)] public long BattleNpcId { get; set; } + + [Key(1)] public string BattleNpcPartsUuid { get; set; } + + [Key(2)] public int PartsId { get; set; } + + [Key(3)] public int Level { get; set; } + + [Key(4)] public int PartsStatusMainId { get; set; } + + [Key(5)] public bool IsProtected { get; set; } + + [Key(6)] public long AcquisitionDatetime { get; set; } +} diff --git a/src/Models/Entities/EntityMBattleNpcPartsGroupNote.cs b/src/Models/Entities/EntityMBattleNpcPartsGroupNote.cs new file mode 100644 index 0000000..407425b --- /dev/null +++ b/src/Models/Entities/EntityMBattleNpcPartsGroupNote.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBattleNpcPartsGroupNote))] +public class EntityMBattleNpcPartsGroupNote +{ + [Key(0)] public long BattleNpcId { get; set; } + + [Key(1)] public int PartsGroupId { get; set; } + + [Key(2)] public long FirstAcquisitionDatetime { get; set; } +} diff --git a/src/Models/Entities/EntityMBattleNpcPartsPreset.cs b/src/Models/Entities/EntityMBattleNpcPartsPreset.cs new file mode 100644 index 0000000..05b89d8 --- /dev/null +++ b/src/Models/Entities/EntityMBattleNpcPartsPreset.cs @@ -0,0 +1,24 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBattleNpcPartsPreset))] +public class EntityMBattleNpcPartsPreset +{ + [Key(0)] public long BattleNpcId { get; set; } + + [Key(1)] public int BattleNpcPartsPresetNumber { get; set; } + + [Key(2)] public string BattleNpcPartsUuid01 { get; set; } + + [Key(3)] public string BattleNpcPartsUuid02 { get; set; } + + [Key(4)] public string BattleNpcPartsUuid03 { get; set; } + + [Key(5)] public string Name { get; set; } + + [Key(6)] public int BattleNpcPartsPresetTagNumber { get; set; } +} diff --git a/src/Models/Entities/EntityMBattleNpcPartsPresetTag.cs b/src/Models/Entities/EntityMBattleNpcPartsPresetTag.cs new file mode 100644 index 0000000..fa7fdb0 --- /dev/null +++ b/src/Models/Entities/EntityMBattleNpcPartsPresetTag.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBattleNpcPartsPresetTag))] +public class EntityMBattleNpcPartsPresetTag +{ + [Key(0)] public long BattleNpcId { get; set; } + + [Key(1)] public int BattleNpcPartsPresetTagNumber { get; set; } + + [Key(2)] public string Name { get; set; } +} diff --git a/src/Models/Entities/EntityMBattleNpcPartsStatusSub.cs b/src/Models/Entities/EntityMBattleNpcPartsStatusSub.cs new file mode 100644 index 0000000..57d99d7 --- /dev/null +++ b/src/Models/Entities/EntityMBattleNpcPartsStatusSub.cs @@ -0,0 +1,26 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBattleNpcPartsStatusSub))] +public class EntityMBattleNpcPartsStatusSub +{ + [Key(0)] public long BattleNpcId { get; set; } + + [Key(1)] public string BattleNpcPartsUuid { get; set; } + + [Key(2)] public int StatusIndex { get; set; } + + [Key(3)] public int PartsStatusSubLotteryId { get; set; } + + [Key(4)] public int Level { get; set; } + + [Key(5)] public StatusKindType StatusKindType { get; set; } + + [Key(6)] public StatusCalculationType StatusCalculationType { get; set; } + + [Key(7)] public int StatusChangeValue { get; set; } +} diff --git a/src/Models/Entities/EntityMBattleNpcSpecialEndAct.cs b/src/Models/Entities/EntityMBattleNpcSpecialEndAct.cs new file mode 100644 index 0000000..79ae6a8 --- /dev/null +++ b/src/Models/Entities/EntityMBattleNpcSpecialEndAct.cs @@ -0,0 +1,20 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBattleNpcSpecialEndAct))] +public class EntityMBattleNpcSpecialEndAct +{ + [Key(0)] public int QuestSceneId { get; set; } + + [Key(1)] public int WaveNumber { get; set; } + + [Key(2)] public long BattleNpcId { get; set; } + + [Key(3)] public string BattleNpcDeckCharacterUuid { get; set; } + + [Key(4)] public SpecialEndBattleActType SpecialEndBattleActType { get; set; } +} diff --git a/src/Models/Entities/EntityMBattleNpcWeapon.cs b/src/Models/Entities/EntityMBattleNpcWeapon.cs new file mode 100644 index 0000000..b7f4adc --- /dev/null +++ b/src/Models/Entities/EntityMBattleNpcWeapon.cs @@ -0,0 +1,26 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBattleNpcWeapon))] +public class EntityMBattleNpcWeapon +{ + [Key(0)] public long BattleNpcId { get; set; } + + [Key(1)] public string BattleNpcWeaponUuid { get; set; } + + [Key(2)] public int WeaponId { get; set; } + + [Key(3)] public int Level { get; set; } + + [Key(4)] public int Exp { get; set; } + + [Key(5)] public int LimitBreakCount { get; set; } + + [Key(6)] public bool IsProtected { get; set; } + + [Key(7)] public long AcquisitionDatetime { get; set; } +} diff --git a/src/Models/Entities/EntityMBattleNpcWeaponAbility.cs b/src/Models/Entities/EntityMBattleNpcWeaponAbility.cs new file mode 100644 index 0000000..fd356f7 --- /dev/null +++ b/src/Models/Entities/EntityMBattleNpcWeaponAbility.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBattleNpcWeaponAbility))] +public class EntityMBattleNpcWeaponAbility +{ + [Key(0)] public long BattleNpcId { get; set; } + + [Key(1)] public string BattleNpcWeaponUuid { get; set; } + + [Key(2)] public int SlotNumber { get; set; } + + [Key(3)] public int Level { get; set; } +} diff --git a/src/Models/Entities/EntityMBattleNpcWeaponAbilityReevaluate.cs b/src/Models/Entities/EntityMBattleNpcWeaponAbilityReevaluate.cs new file mode 100644 index 0000000..0633b98 --- /dev/null +++ b/src/Models/Entities/EntityMBattleNpcWeaponAbilityReevaluate.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBattleNpcWeaponAbilityReevaluate))] +public class EntityMBattleNpcWeaponAbilityReevaluate +{ + [Key(0)] public long BattleNpcId { get; set; } + + [Key(1)] public long LastReevaluateDatetime { get; set; } +} diff --git a/src/Models/Entities/EntityMBattleNpcWeaponAwaken.cs b/src/Models/Entities/EntityMBattleNpcWeaponAwaken.cs new file mode 100644 index 0000000..92eb37d --- /dev/null +++ b/src/Models/Entities/EntityMBattleNpcWeaponAwaken.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBattleNpcWeaponAwaken))] +public class EntityMBattleNpcWeaponAwaken +{ + [Key(0)] public long BattleNpcId { get; set; } + + [Key(1)] public string BattleNpcWeaponUuid { get; set; } +} diff --git a/src/Models/Entities/EntityMBattleNpcWeaponNote.cs b/src/Models/Entities/EntityMBattleNpcWeaponNote.cs new file mode 100644 index 0000000..7db0869 --- /dev/null +++ b/src/Models/Entities/EntityMBattleNpcWeaponNote.cs @@ -0,0 +1,20 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBattleNpcWeaponNote))] +public class EntityMBattleNpcWeaponNote +{ + [Key(0)] public long BattleNpcId { get; set; } + + [Key(1)] public int WeaponId { get; set; } + + [Key(2)] public int MaxLevel { get; set; } + + [Key(3)] public int MaxLimitBreakCount { get; set; } + + [Key(4)] public long FirstAcquisitionDatetime { get; set; } +} diff --git a/src/Models/Entities/EntityMBattleNpcWeaponNoteReevaluate.cs b/src/Models/Entities/EntityMBattleNpcWeaponNoteReevaluate.cs new file mode 100644 index 0000000..b9ab6e7 --- /dev/null +++ b/src/Models/Entities/EntityMBattleNpcWeaponNoteReevaluate.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBattleNpcWeaponNoteReevaluate))] +public class EntityMBattleNpcWeaponNoteReevaluate +{ + [Key(0)] public long BattleNpcId { get; set; } + + [Key(1)] public long LastReevaluateDatetime { get; set; } +} diff --git a/src/Models/Entities/EntityMBattleNpcWeaponSkill.cs b/src/Models/Entities/EntityMBattleNpcWeaponSkill.cs new file mode 100644 index 0000000..518eabe --- /dev/null +++ b/src/Models/Entities/EntityMBattleNpcWeaponSkill.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBattleNpcWeaponSkill))] +public class EntityMBattleNpcWeaponSkill +{ + [Key(0)] public long BattleNpcId { get; set; } + + [Key(1)] public string BattleNpcWeaponUuid { get; set; } + + [Key(2)] public int SlotNumber { get; set; } + + [Key(3)] public int Level { get; set; } +} diff --git a/src/Models/Entities/EntityMBattleNpcWeaponStory.cs b/src/Models/Entities/EntityMBattleNpcWeaponStory.cs new file mode 100644 index 0000000..ff8cd89 --- /dev/null +++ b/src/Models/Entities/EntityMBattleNpcWeaponStory.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBattleNpcWeaponStory))] +public class EntityMBattleNpcWeaponStory +{ + [Key(0)] public long BattleNpcId { get; set; } + + [Key(1)] public int WeaponId { get; set; } + + [Key(2)] public int ReleasedMaxStoryIndex { get; set; } +} diff --git a/src/Models/Entities/EntityMBattleNpcWeaponStoryReevaluate.cs b/src/Models/Entities/EntityMBattleNpcWeaponStoryReevaluate.cs new file mode 100644 index 0000000..c778a4f --- /dev/null +++ b/src/Models/Entities/EntityMBattleNpcWeaponStoryReevaluate.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBattleNpcWeaponStoryReevaluate))] +public class EntityMBattleNpcWeaponStoryReevaluate +{ + [Key(0)] public long BattleNpcId { get; set; } + + [Key(1)] public long LastReevaluateDatetime { get; set; } +} diff --git a/src/Models/Entities/EntityMBattleProgressUiType.cs b/src/Models/Entities/EntityMBattleProgressUiType.cs new file mode 100644 index 0000000..b6e4aef --- /dev/null +++ b/src/Models/Entities/EntityMBattleProgressUiType.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBattleProgressUiType))] +public class EntityMBattleProgressUiType +{ + [Key(0)] public int QuestSceneId { get; set; } + + [Key(1)] public int BattleProgressUiTypeId { get; set; } +} diff --git a/src/Models/Entities/EntityMBattleQuestSceneBgm.cs b/src/Models/Entities/EntityMBattleQuestSceneBgm.cs new file mode 100644 index 0000000..17c6d41 --- /dev/null +++ b/src/Models/Entities/EntityMBattleQuestSceneBgm.cs @@ -0,0 +1,20 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBattleQuestSceneBgm))] +public class EntityMBattleQuestSceneBgm +{ + [Key(0)] public int QuestSceneId { get; set; } + + [Key(1)] public int StartWaveNumber { get; set; } + + [Key(2)] public int BgmId { get; set; } + + [Key(3)] public int Stem { get; set; } + + [Key(4)] public int TrackNumber { get; set; } +} diff --git a/src/Models/Entities/EntityMBattleQuestSceneBgmSetGroup.cs b/src/Models/Entities/EntityMBattleQuestSceneBgmSetGroup.cs new file mode 100644 index 0000000..aca4e20 --- /dev/null +++ b/src/Models/Entities/EntityMBattleQuestSceneBgmSetGroup.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBattleQuestSceneBgmSetGroup))] +public class EntityMBattleQuestSceneBgmSetGroup +{ + [Key(0)] public int QuestSceneId { get; set; } + + [Key(1)] public int BgmSetGroupId { get; set; } +} diff --git a/src/Models/Entities/EntityMBattleRentalDeck.cs b/src/Models/Entities/EntityMBattleRentalDeck.cs new file mode 100644 index 0000000..3d308b4 --- /dev/null +++ b/src/Models/Entities/EntityMBattleRentalDeck.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBattleRentalDeck))] +public class EntityMBattleRentalDeck +{ + [Key(0)] public int BattleGroupId { get; set; } + + [Key(1)] public long BattleNpcId { get; set; } + + [Key(2)] public DeckType DeckType { get; set; } + + [Key(3)] public int BattleNpcDeckNumber { get; set; } +} diff --git a/src/Models/Entities/EntityMBattleSkillBehaviourHitDamageConfiguration.cs b/src/Models/Entities/EntityMBattleSkillBehaviourHitDamageConfiguration.cs new file mode 100644 index 0000000..96c6036 --- /dev/null +++ b/src/Models/Entities/EntityMBattleSkillBehaviourHitDamageConfiguration.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBattleSkillBehaviourHitDamageConfiguration))] +public class EntityMBattleSkillBehaviourHitDamageConfiguration +{ + [Key(0)] public SkillCategoryType SkillCategoryType { get; set; } + + [Key(1)] public int HitCount { get; set; } + + [Key(2)] public int HitIndexLowerLimit { get; set; } + + [Key(3)] public int DamageCoefficientValuePermil { get; set; } +} diff --git a/src/Models/Entities/EntityMBattleSkillFireAct.cs b/src/Models/Entities/EntityMBattleSkillFireAct.cs new file mode 100644 index 0000000..ce9049d --- /dev/null +++ b/src/Models/Entities/EntityMBattleSkillFireAct.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBattleSkillFireAct))] +public class EntityMBattleSkillFireAct +{ + [Key(0)] public int BattleSkillFireActId { get; set; } + + [Key(1)] public int BattleSkillFireActConditionGroupId { get; set; } + + [Key(2)] public BattleSkillFireActConditionGroupType BattleSkillFireActConditionGroupType { get; set; } + + [Key(3)] public int BattleSkillFireActAssetId { get; set; } +} diff --git a/src/Models/Entities/EntityMBattleSkillFireActConditionAttributeType.cs b/src/Models/Entities/EntityMBattleSkillFireActConditionAttributeType.cs new file mode 100644 index 0000000..b67b28b --- /dev/null +++ b/src/Models/Entities/EntityMBattleSkillFireActConditionAttributeType.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBattleSkillFireActConditionAttributeType))] +public class EntityMBattleSkillFireActConditionAttributeType +{ + [Key(0)] public int BattleSkillFireActConditionId { get; set; } + + [Key(1)] public AttributeType AttributeType { get; set; } +} diff --git a/src/Models/Entities/EntityMBattleSkillFireActConditionGroup.cs b/src/Models/Entities/EntityMBattleSkillFireActConditionGroup.cs new file mode 100644 index 0000000..85a2b6d --- /dev/null +++ b/src/Models/Entities/EntityMBattleSkillFireActConditionGroup.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBattleSkillFireActConditionGroup))] +public class EntityMBattleSkillFireActConditionGroup +{ + [Key(0)] public int BattleSkillFireActConditionGroupId { get; set; } + + [Key(1)] public int BattleSkillFireActConditionGroupOrder { get; set; } + + [Key(2)] public BattleSkillFireActConditionType BattleSkillFireActConditionType { get; set; } + + [Key(3)] public int BattleSkillFireActConditionId { get; set; } +} diff --git a/src/Models/Entities/EntityMBattleSkillFireActConditionSkillCategoryType.cs b/src/Models/Entities/EntityMBattleSkillFireActConditionSkillCategoryType.cs new file mode 100644 index 0000000..48ace2f --- /dev/null +++ b/src/Models/Entities/EntityMBattleSkillFireActConditionSkillCategoryType.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBattleSkillFireActConditionSkillCategoryType))] +public class EntityMBattleSkillFireActConditionSkillCategoryType +{ + [Key(0)] public int BattleSkillFireActConditionId { get; set; } + + [Key(1)] public SkillCategoryType SkillCategoryType { get; set; } +} diff --git a/src/Models/Entities/EntityMBattleSkillFireActConditionWeaponType.cs b/src/Models/Entities/EntityMBattleSkillFireActConditionWeaponType.cs new file mode 100644 index 0000000..85da8e4 --- /dev/null +++ b/src/Models/Entities/EntityMBattleSkillFireActConditionWeaponType.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBattleSkillFireActConditionWeaponType))] +public class EntityMBattleSkillFireActConditionWeaponType +{ + [Key(0)] public int BattleSkillFireActConditionId { get; set; } + + [Key(1)] public WeaponType WeaponType { get; set; } +} diff --git a/src/Models/Entities/EntityMBeginnerCampaign.cs b/src/Models/Entities/EntityMBeginnerCampaign.cs new file mode 100644 index 0000000..d81c863 --- /dev/null +++ b/src/Models/Entities/EntityMBeginnerCampaign.cs @@ -0,0 +1,20 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBeginnerCampaign))] +public class EntityMBeginnerCampaign +{ + [Key(0)] public int BeginnerCampaignId { get; set; } + + [Key(1)] public long BeginnerJudgeStartDatetime { get; set; } + + [Key(2)] public long BeginnerJudgeEndDatetime { get; set; } + + [Key(3)] public int GrantCampaignTermDayCount { get; set; } + + [Key(4)] public int CampaignUnlockQuestId { get; set; } +} diff --git a/src/Models/Entities/EntityMBigHuntBoss.cs b/src/Models/Entities/EntityMBigHuntBoss.cs new file mode 100644 index 0000000..a43d903 --- /dev/null +++ b/src/Models/Entities/EntityMBigHuntBoss.cs @@ -0,0 +1,20 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBigHuntBoss))] +public class EntityMBigHuntBoss +{ + [Key(0)] public int BigHuntBossId { get; set; } + + [Key(1)] public int BigHuntBossGradeGroupId { get; set; } + + [Key(2)] public int NameBigHuntBossTextId { get; set; } + + [Key(3)] public int BigHuntBossAssetId { get; set; } + + [Key(4)] public AttributeType AttributeType { get; set; } +} diff --git a/src/Models/Entities/EntityMBigHuntBossGradeGroup.cs b/src/Models/Entities/EntityMBigHuntBossGradeGroup.cs new file mode 100644 index 0000000..1b63a5a --- /dev/null +++ b/src/Models/Entities/EntityMBigHuntBossGradeGroup.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBigHuntBossGradeGroup))] +public class EntityMBigHuntBossGradeGroup +{ + [Key(0)] public int BigHuntBossGradeGroupId { get; set; } + + [Key(1)] public long NecessaryScore { get; set; } + + [Key(2)] public int AssetGradeIconId { get; set; } +} diff --git a/src/Models/Entities/EntityMBigHuntBossGradeGroupAttribute.cs b/src/Models/Entities/EntityMBigHuntBossGradeGroupAttribute.cs new file mode 100644 index 0000000..4886634 --- /dev/null +++ b/src/Models/Entities/EntityMBigHuntBossGradeGroupAttribute.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBigHuntBossGradeGroupAttribute))] +public class EntityMBigHuntBossGradeGroupAttribute +{ + [Key(0)] public AttributeType AttributeType { get; set; } + + [Key(1)] public int BigHuntBossGradeGroupId { get; set; } +} diff --git a/src/Models/Entities/EntityMBigHuntBossQuest.cs b/src/Models/Entities/EntityMBigHuntBossQuest.cs new file mode 100644 index 0000000..82dcbdc --- /dev/null +++ b/src/Models/Entities/EntityMBigHuntBossQuest.cs @@ -0,0 +1,24 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBigHuntBossQuest))] +public class EntityMBigHuntBossQuest +{ + [Key(0)] public int BigHuntBossQuestId { get; set; } + + [Key(1)] public int BigHuntBossId { get; set; } + + [Key(2)] public int BigHuntQuestGroupId { get; set; } + + [Key(3)] public int BigHuntBossQuestScoreCoefficientId { get; set; } + + [Key(4)] public int BigHuntScoreRewardGroupScheduleId { get; set; } + + [Key(5)] public int BigHuntLinkId { get; set; } + + [Key(6)] public int DailyChallengeCount { get; set; } +} diff --git a/src/Models/Entities/EntityMBigHuntBossQuestGroup.cs b/src/Models/Entities/EntityMBigHuntBossQuestGroup.cs new file mode 100644 index 0000000..f9ca80d --- /dev/null +++ b/src/Models/Entities/EntityMBigHuntBossQuestGroup.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBigHuntBossQuestGroup))] +public class EntityMBigHuntBossQuestGroup +{ + [Key(0)] public int BigHuntBossQuestGroupId { get; set; } + + [Key(1)] public int SortOrder { get; set; } + + [Key(2)] public int BigHuntBossQuestId { get; set; } +} diff --git a/src/Models/Entities/EntityMBigHuntBossQuestGroupChallengeCategory.cs b/src/Models/Entities/EntityMBigHuntBossQuestGroupChallengeCategory.cs new file mode 100644 index 0000000..26a0aa0 --- /dev/null +++ b/src/Models/Entities/EntityMBigHuntBossQuestGroupChallengeCategory.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBigHuntBossQuestGroupChallengeCategory))] +public class EntityMBigHuntBossQuestGroupChallengeCategory +{ + [Key(0)] public int BigHuntBossQuestGroupChallengeCategoryId { get; set; } + + [Key(1)] public int SortOrder { get; set; } + + [Key(2)] public int BigHuntBossQuestGroupId { get; set; } +} diff --git a/src/Models/Entities/EntityMBigHuntLink.cs b/src/Models/Entities/EntityMBigHuntLink.cs new file mode 100644 index 0000000..1ab2f22 --- /dev/null +++ b/src/Models/Entities/EntityMBigHuntLink.cs @@ -0,0 +1,20 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBigHuntLink))] +public class EntityMBigHuntLink +{ + [Key(0)] public int BigHuntLinkId { get; set; } + + [Key(1)] public DomainType DestinationDomainType { get; set; } + + [Key(2)] public int DestinationDomainId { get; set; } + + [Key(3)] public PossessionType PossessionType { get; set; } + + [Key(4)] public int PossessionId { get; set; } +} diff --git a/src/Models/Entities/EntityMBigHuntQuest.cs b/src/Models/Entities/EntityMBigHuntQuest.cs new file mode 100644 index 0000000..6fb5697 --- /dev/null +++ b/src/Models/Entities/EntityMBigHuntQuest.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBigHuntQuest))] +public class EntityMBigHuntQuest +{ + [Key(0)] public int BigHuntQuestId { get; set; } + + [Key(1)] public int QuestId { get; set; } + + [Key(2)] public int BigHuntQuestScoreCoefficientId { get; set; } +} diff --git a/src/Models/Entities/EntityMBigHuntQuestGroup.cs b/src/Models/Entities/EntityMBigHuntQuestGroup.cs new file mode 100644 index 0000000..de795dc --- /dev/null +++ b/src/Models/Entities/EntityMBigHuntQuestGroup.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBigHuntQuestGroup))] +public class EntityMBigHuntQuestGroup +{ + [Key(0)] public int BigHuntQuestGroupId { get; set; } + + [Key(1)] public int SortOrder { get; set; } + + [Key(2)] public int BigHuntQuestId { get; set; } +} diff --git a/src/Models/Entities/EntityMBigHuntQuestScoreCoefficient.cs b/src/Models/Entities/EntityMBigHuntQuestScoreCoefficient.cs new file mode 100644 index 0000000..fc1468b --- /dev/null +++ b/src/Models/Entities/EntityMBigHuntQuestScoreCoefficient.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBigHuntQuestScoreCoefficient))] +public class EntityMBigHuntQuestScoreCoefficient +{ + [Key(0)] public int BigHuntQuestScoreCoefficientId { get; set; } + + [Key(1)] public int ScoreDifficultBonusPermil { get; set; } +} diff --git a/src/Models/Entities/EntityMBigHuntRewardGroup.cs b/src/Models/Entities/EntityMBigHuntRewardGroup.cs new file mode 100644 index 0000000..01e0dea --- /dev/null +++ b/src/Models/Entities/EntityMBigHuntRewardGroup.cs @@ -0,0 +1,20 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBigHuntRewardGroup))] +public class EntityMBigHuntRewardGroup +{ + [Key(0)] public int BigHuntRewardGroupId { get; set; } + + [Key(1)] public int SortOrder { get; set; } + + [Key(2)] public PossessionType PossessionType { get; set; } + + [Key(3)] public int PossessionId { get; set; } + + [Key(4)] public int Count { get; set; } +} diff --git a/src/Models/Entities/EntityMBigHuntSchedule.cs b/src/Models/Entities/EntityMBigHuntSchedule.cs new file mode 100644 index 0000000..14fd944 --- /dev/null +++ b/src/Models/Entities/EntityMBigHuntSchedule.cs @@ -0,0 +1,20 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBigHuntSchedule))] +public class EntityMBigHuntSchedule +{ + [Key(0)] public int BigHuntScheduleId { get; set; } + + [Key(1)] public long NoticeStartDatetime { get; set; } + + [Key(2)] public long ChallengeStartDatetime { get; set; } + + [Key(3)] public long ChallengeEndDatetime { get; set; } + + [Key(4)] public int SeasonAssetId { get; set; } +} diff --git a/src/Models/Entities/EntityMBigHuntScoreRewardGroup.cs b/src/Models/Entities/EntityMBigHuntScoreRewardGroup.cs new file mode 100644 index 0000000..e276109 --- /dev/null +++ b/src/Models/Entities/EntityMBigHuntScoreRewardGroup.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBigHuntScoreRewardGroup))] +public class EntityMBigHuntScoreRewardGroup +{ + [Key(0)] public int BigHuntScoreRewardGroupId { get; set; } + + [Key(1)] public long NecessaryScore { get; set; } + + [Key(2)] public int BigHuntRewardGroupId { get; set; } +} diff --git a/src/Models/Entities/EntityMBigHuntScoreRewardGroupSchedule.cs b/src/Models/Entities/EntityMBigHuntScoreRewardGroupSchedule.cs new file mode 100644 index 0000000..713a506 --- /dev/null +++ b/src/Models/Entities/EntityMBigHuntScoreRewardGroupSchedule.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBigHuntScoreRewardGroupSchedule))] +public class EntityMBigHuntScoreRewardGroupSchedule +{ + [Key(0)] public int BigHuntScoreRewardGroupScheduleId { get; set; } + + [Key(1)] public int GroupIndex { get; set; } + + [Key(2)] public int BigHuntScoreRewardGroupId { get; set; } + + [Key(3)] public long StartDatetime { get; set; } +} diff --git a/src/Models/Entities/EntityMBigHuntWeeklyAttributeScoreRewardGroupSchedule.cs b/src/Models/Entities/EntityMBigHuntWeeklyAttributeScoreRewardGroupSchedule.cs new file mode 100644 index 0000000..5938ad1 --- /dev/null +++ b/src/Models/Entities/EntityMBigHuntWeeklyAttributeScoreRewardGroupSchedule.cs @@ -0,0 +1,20 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMBigHuntWeeklyAttributeScoreRewardGroupSchedule))] +public class EntityMBigHuntWeeklyAttributeScoreRewardGroupSchedule +{ + [Key(0)] public int BigHuntWeeklyAttributeScoreRewardGroupScheduleId { get; set; } + + [Key(1)] public AttributeType AttributeType { get; set; } + + [Key(2)] public int GroupIndex { get; set; } + + [Key(3)] public int BigHuntScoreRewardGroupId { get; set; } + + [Key(4)] public long StartDatetime { get; set; } +} diff --git a/src/Models/Entities/EntityMCageMemory.cs b/src/Models/Entities/EntityMCageMemory.cs new file mode 100644 index 0000000..dfc9e74 --- /dev/null +++ b/src/Models/Entities/EntityMCageMemory.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCageMemory))] +public class EntityMCageMemory +{ + [Key(0)] public int CageMemoryId { get; set; } + + [Key(1)] public int MainQuestSeasonId { get; set; } + + [Key(2)] public int SortOrder { get; set; } + + [Key(3)] public int CageMemoryAssetId { get; set; } +} diff --git a/src/Models/Entities/EntityMCageOrnament.cs b/src/Models/Entities/EntityMCageOrnament.cs new file mode 100644 index 0000000..ad5831e --- /dev/null +++ b/src/Models/Entities/EntityMCageOrnament.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCageOrnament))] +public class EntityMCageOrnament +{ + [Key(0)] public int CageOrnamentId { get; set; } + + [Key(1)] public long StartDatetime { get; set; } + + [Key(2)] public long EndDatetime { get; set; } + + [Key(3)] public int CageOrnamentRewardId { get; set; } +} diff --git a/src/Models/Entities/EntityMCageOrnamentMainQuestChapterStill.cs b/src/Models/Entities/EntityMCageOrnamentMainQuestChapterStill.cs new file mode 100644 index 0000000..ccbc952 --- /dev/null +++ b/src/Models/Entities/EntityMCageOrnamentMainQuestChapterStill.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCageOrnamentMainQuestChapterStill))] +public class EntityMCageOrnamentMainQuestChapterStill +{ + [Key(0)] public int MainQuestChapterId { get; set; } + + [Key(1)] public int CageOrnamentStillReleaseConditionId { get; set; } +} diff --git a/src/Models/Entities/EntityMCageOrnamentReward.cs b/src/Models/Entities/EntityMCageOrnamentReward.cs new file mode 100644 index 0000000..fe2a135 --- /dev/null +++ b/src/Models/Entities/EntityMCageOrnamentReward.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCageOrnamentReward))] +public class EntityMCageOrnamentReward +{ + [Key(0)] public int CageOrnamentRewardId { get; set; } + + [Key(1)] public PossessionType PossessionType { get; set; } + + [Key(2)] public int PossessionId { get; set; } + + [Key(3)] public int Count { get; set; } +} diff --git a/src/Models/Entities/EntityMCageOrnamentStillReleaseCondition.cs b/src/Models/Entities/EntityMCageOrnamentStillReleaseCondition.cs new file mode 100644 index 0000000..32538a4 --- /dev/null +++ b/src/Models/Entities/EntityMCageOrnamentStillReleaseCondition.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCageOrnamentStillReleaseCondition))] +public class EntityMCageOrnamentStillReleaseCondition +{ + [Key(0)] public int CageOrnamentStillReleaseConditionId { get; set; } + + [Key(1)] public int CageOrnamentId { get; set; } +} diff --git a/src/Models/Entities/EntityMCatalogCompanion.cs b/src/Models/Entities/EntityMCatalogCompanion.cs new file mode 100644 index 0000000..7877bb6 --- /dev/null +++ b/src/Models/Entities/EntityMCatalogCompanion.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCatalogCompanion))] +public class EntityMCatalogCompanion +{ + [Key(0)] public int CompanionId { get; set; } + + [Key(1)] public int SortOrder { get; set; } + + [Key(2)] public int CatalogTermId { get; set; } +} diff --git a/src/Models/Entities/EntityMCatalogCostume.cs b/src/Models/Entities/EntityMCatalogCostume.cs new file mode 100644 index 0000000..af2a348 --- /dev/null +++ b/src/Models/Entities/EntityMCatalogCostume.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCatalogCostume))] +public class EntityMCatalogCostume +{ + [Key(0)] public int CostumeId { get; set; } + + [Key(1)] public int SortOrder { get; set; } + + [Key(2)] public int CatalogTermId { get; set; } +} diff --git a/src/Models/Entities/EntityMCatalogPartsGroup.cs b/src/Models/Entities/EntityMCatalogPartsGroup.cs new file mode 100644 index 0000000..49a3529 --- /dev/null +++ b/src/Models/Entities/EntityMCatalogPartsGroup.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCatalogPartsGroup))] +public class EntityMCatalogPartsGroup +{ + [Key(0)] public int PartsGroupId { get; set; } + + [Key(1)] public int SortOrder { get; set; } + + [Key(2)] public int CatalogTermId { get; set; } +} diff --git a/src/Models/Entities/EntityMCatalogTerm.cs b/src/Models/Entities/EntityMCatalogTerm.cs new file mode 100644 index 0000000..89e8c5d --- /dev/null +++ b/src/Models/Entities/EntityMCatalogTerm.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCatalogTerm))] +public class EntityMCatalogTerm +{ + [Key(0)] public int CatalogTermId { get; set; } + + [Key(1)] public long StartDatetime { get; set; } +} diff --git a/src/Models/Entities/EntityMCatalogThought.cs b/src/Models/Entities/EntityMCatalogThought.cs new file mode 100644 index 0000000..67572ab --- /dev/null +++ b/src/Models/Entities/EntityMCatalogThought.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCatalogThought))] +public class EntityMCatalogThought +{ + [Key(0)] public int ThoughtId { get; set; } + + [Key(1)] public int SortOrder { get; set; } + + [Key(2)] public int CatalogTermId { get; set; } +} diff --git a/src/Models/Entities/EntityMCatalogWeapon.cs b/src/Models/Entities/EntityMCatalogWeapon.cs new file mode 100644 index 0000000..f98c52d --- /dev/null +++ b/src/Models/Entities/EntityMCatalogWeapon.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCatalogWeapon))] +public class EntityMCatalogWeapon +{ + [Key(0)] public int WeaponId { get; set; } + + [Key(1)] public int SortOrder { get; set; } + + [Key(2)] public int CatalogTermId { get; set; } +} diff --git a/src/Models/Entities/EntityMCharacter.cs b/src/Models/Entities/EntityMCharacter.cs new file mode 100644 index 0000000..c97c2cd --- /dev/null +++ b/src/Models/Entities/EntityMCharacter.cs @@ -0,0 +1,36 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCharacter))] +public class EntityMCharacter +{ + [Key(0)] public int CharacterId { get; set; } + + [Key(1)] public int CharacterLevelBonusAbilityGroupId { get; set; } + + [Key(2)] public int NameCharacterTextId { get; set; } + + [Key(3)] public int CharacterAssetId { get; set; } + + [Key(4)] public int SortOrder { get; set; } + + [Key(5)] public int DefaultCostumeId { get; set; } + + [Key(6)] public int DefaultWeaponId { get; set; } + + [Key(7)] public int EndCostumeId { get; set; } + + [Key(8)] public int EndWeaponId { get; set; } + + [Key(9)] public int MaxLevelNumericalFunctionId { get; set; } + + [Key(10)] public int RequiredExpForLevelUpNumericalParameterMapId { get; set; } + + [Key(11)] public int ListSettingCostumeGroupType { get; set; } + + [Key(12)] public long ListSettingDisplayStartDatetime { get; set; } +} diff --git a/src/Models/Entities/EntityMCharacterBoard.cs b/src/Models/Entities/EntityMCharacterBoard.cs new file mode 100644 index 0000000..67bd65f --- /dev/null +++ b/src/Models/Entities/EntityMCharacterBoard.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCharacterBoard))] +public class EntityMCharacterBoard +{ + [Key(0)] public int CharacterBoardId { get; set; } + + [Key(1)] public int CharacterBoardGroupId { get; set; } + + [Key(2)] public int CharacterBoardUnlockConditionGroupId { get; set; } + + [Key(3)] public int ReleaseRank { get; set; } +} diff --git a/src/Models/Entities/EntityMCharacterBoardAbility.cs b/src/Models/Entities/EntityMCharacterBoardAbility.cs new file mode 100644 index 0000000..aeb86eb --- /dev/null +++ b/src/Models/Entities/EntityMCharacterBoardAbility.cs @@ -0,0 +1,15 @@ +using MariesWonderland.MasterMemory; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCharacterBoardAbility))] +public class EntityMCharacterBoardAbility +{ + [Key(0)] public int CharacterBoardAbilityId { get; set; } + + [Key(1)] public int CharacterBoardEffectTargetGroupId { get; set; } + + [Key(2)] public int AbilityId { get; set; } +} diff --git a/src/Models/Entities/EntityMCharacterBoardAbilityMaxLevel.cs b/src/Models/Entities/EntityMCharacterBoardAbilityMaxLevel.cs new file mode 100644 index 0000000..90641c2 --- /dev/null +++ b/src/Models/Entities/EntityMCharacterBoardAbilityMaxLevel.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCharacterBoardAbilityMaxLevel))] +public class EntityMCharacterBoardAbilityMaxLevel +{ + [Key(0)] public int CharacterId { get; set; } + + [Key(1)] public int AbilityId { get; set; } + + [Key(2)] public int MaxLevel { get; set; } +} diff --git a/src/Models/Entities/EntityMCharacterBoardAssignment.cs b/src/Models/Entities/EntityMCharacterBoardAssignment.cs new file mode 100644 index 0000000..669b0c2 --- /dev/null +++ b/src/Models/Entities/EntityMCharacterBoardAssignment.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCharacterBoardAssignment))] +public class EntityMCharacterBoardAssignment +{ + [Key(0)] public int CharacterId { get; set; } + + [Key(1)] public int CharacterBoardCategoryId { get; set; } + + [Key(2)] public int SortOrder { get; set; } + + [Key(3)] public CharacterBoardAssignmentType CharacterBoardAssignmentType { get; set; } +} diff --git a/src/Models/Entities/EntityMCharacterBoardCategory.cs b/src/Models/Entities/EntityMCharacterBoardCategory.cs new file mode 100644 index 0000000..da4379d --- /dev/null +++ b/src/Models/Entities/EntityMCharacterBoardCategory.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCharacterBoardCategory))] +public class EntityMCharacterBoardCategory +{ + [Key(0)] public int CharacterBoardCategoryId { get; set; } + + [Key(1)] public int SortOrder { get; set; } +} diff --git a/src/Models/Entities/EntityMCharacterBoardCompleteReward.cs b/src/Models/Entities/EntityMCharacterBoardCompleteReward.cs new file mode 100644 index 0000000..592e0f8 --- /dev/null +++ b/src/Models/Entities/EntityMCharacterBoardCompleteReward.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCharacterBoardCompleteReward))] +public class EntityMCharacterBoardCompleteReward +{ + [Key(0)] public int CharacterBoardCompleteRewardId { get; set; } + + [Key(1)] public int CharacterBoardCompleteRewardGroupId { get; set; } + + [Key(2)] public int CharacterBoardCompleteRewardConditionGroupId { get; set; } +} diff --git a/src/Models/Entities/EntityMCharacterBoardCompleteRewardGroup.cs b/src/Models/Entities/EntityMCharacterBoardCompleteRewardGroup.cs new file mode 100644 index 0000000..5a204fd --- /dev/null +++ b/src/Models/Entities/EntityMCharacterBoardCompleteRewardGroup.cs @@ -0,0 +1,20 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCharacterBoardCompleteRewardGroup))] +public class EntityMCharacterBoardCompleteRewardGroup +{ + [Key(0)] public int CharacterBoardCompleteRewardGroupId { get; set; } + + [Key(1)] public PossessionType PossessionType { get; set; } + + [Key(2)] public int PossessionId { get; set; } + + [Key(3)] public int Count { get; set; } + + [Key(4)] public int SortOrder { get; set; } +} diff --git a/src/Models/Entities/EntityMCharacterBoardCondition.cs b/src/Models/Entities/EntityMCharacterBoardCondition.cs new file mode 100644 index 0000000..412cd4d --- /dev/null +++ b/src/Models/Entities/EntityMCharacterBoardCondition.cs @@ -0,0 +1,22 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCharacterBoardCondition))] +public class EntityMCharacterBoardCondition +{ + [Key(0)] public int CharacterBoardConditionGroupId { get; set; } + + [Key(1)] public int GroupIndex { get; set; } + + [Key(2)] public CharacterBoardConditionType CharacterBoardConditionType { get; set; } + + [Key(3)] public int CharacterBoardConditionDetailId { get; set; } + + [Key(4)] public int CharacterBoardConditionIgnoreId { get; set; } + + [Key(5)] public int ConditionValue { get; set; } +} diff --git a/src/Models/Entities/EntityMCharacterBoardConditionDetail.cs b/src/Models/Entities/EntityMCharacterBoardConditionDetail.cs new file mode 100644 index 0000000..659674a --- /dev/null +++ b/src/Models/Entities/EntityMCharacterBoardConditionDetail.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCharacterBoardConditionDetail))] +public class EntityMCharacterBoardConditionDetail +{ + [Key(0)] public int CharacterBoardConditionDetailId { get; set; } + + [Key(1)] public int DetailIndex { get; set; } + + [Key(2)] public int ConditionValue { get; set; } +} diff --git a/src/Models/Entities/EntityMCharacterBoardConditionGroup.cs b/src/Models/Entities/EntityMCharacterBoardConditionGroup.cs new file mode 100644 index 0000000..b205e9d --- /dev/null +++ b/src/Models/Entities/EntityMCharacterBoardConditionGroup.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCharacterBoardConditionGroup))] +public class EntityMCharacterBoardConditionGroup +{ + [Key(0)] public int CharacterBoardConditionGroupId { get; set; } + + [Key(1)] public ConditionOperationType ConditionOperationType { get; set; } +} diff --git a/src/Models/Entities/EntityMCharacterBoardConditionIgnore.cs b/src/Models/Entities/EntityMCharacterBoardConditionIgnore.cs new file mode 100644 index 0000000..b2e6ce2 --- /dev/null +++ b/src/Models/Entities/EntityMCharacterBoardConditionIgnore.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCharacterBoardConditionIgnore))] +public class EntityMCharacterBoardConditionIgnore +{ + [Key(0)] public int CharacterBoardConditionIgnoreId { get; set; } + + [Key(1)] public int IgnoreIndex { get; set; } + + [Key(2)] public int ConditionValue { get; set; } +} diff --git a/src/Models/Entities/EntityMCharacterBoardEffectTargetGroup.cs b/src/Models/Entities/EntityMCharacterBoardEffectTargetGroup.cs new file mode 100644 index 0000000..7627fc0 --- /dev/null +++ b/src/Models/Entities/EntityMCharacterBoardEffectTargetGroup.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCharacterBoardEffectTargetGroup))] +public class EntityMCharacterBoardEffectTargetGroup +{ + [Key(0)] public int CharacterBoardEffectTargetGroupId { get; set; } + + [Key(1)] public int GroupIndex { get; set; } + + [Key(2)] public CharacterBoardEffectType CharacterBoardEffectTargetType { get; set; } + + [Key(3)] public int TargetValue { get; set; } +} diff --git a/src/Models/Entities/EntityMCharacterBoardGroup.cs b/src/Models/Entities/EntityMCharacterBoardGroup.cs new file mode 100644 index 0000000..5d95944 --- /dev/null +++ b/src/Models/Entities/EntityMCharacterBoardGroup.cs @@ -0,0 +1,20 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCharacterBoardGroup))] +public class EntityMCharacterBoardGroup +{ + [Key(0)] public int CharacterBoardGroupId { get; set; } + + [Key(1)] public int CharacterBoardCategoryId { get; set; } + + [Key(2)] public int SortOrder { get; set; } + + [Key(3)] public CharacterBoardGroupType CharacterBoardGroupType { get; set; } + + [Key(4)] public int TextAssetId { get; set; } +} diff --git a/src/Models/Entities/EntityMCharacterBoardPanel.cs b/src/Models/Entities/EntityMCharacterBoardPanel.cs new file mode 100644 index 0000000..2597aff --- /dev/null +++ b/src/Models/Entities/EntityMCharacterBoardPanel.cs @@ -0,0 +1,28 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCharacterBoardPanel))] +public class EntityMCharacterBoardPanel +{ + [Key(0)] public int CharacterBoardPanelId { get; set; } + + [Key(1)] public int CharacterBoardId { get; set; } + + [Key(2)] public int CharacterBoardPanelUnlockConditionGroupId { get; set; } + + [Key(3)] public int CharacterBoardPanelReleasePossessionGroupId { get; set; } + + [Key(4)] public int CharacterBoardPanelReleaseRewardGroupId { get; set; } + + [Key(5)] public int CharacterBoardPanelReleaseEffectGroupId { get; set; } + + [Key(6)] public int SortOrder { get; set; } + + [Key(7)] public int ParentCharacterBoardPanelId { get; set; } + + [Key(8)] public int PlaceIndex { get; set; } +} diff --git a/src/Models/Entities/EntityMCharacterBoardPanelReleaseEffectGroup.cs b/src/Models/Entities/EntityMCharacterBoardPanelReleaseEffectGroup.cs new file mode 100644 index 0000000..0616f0a --- /dev/null +++ b/src/Models/Entities/EntityMCharacterBoardPanelReleaseEffectGroup.cs @@ -0,0 +1,20 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCharacterBoardPanelReleaseEffectGroup))] +public class EntityMCharacterBoardPanelReleaseEffectGroup +{ + [Key(0)] public int CharacterBoardPanelReleaseEffectGroupId { get; set; } + + [Key(1)] public int SortOrder { get; set; } + + [Key(2)] public CharacterBoardEffectType CharacterBoardEffectType { get; set; } + + [Key(3)] public int CharacterBoardEffectId { get; set; } + + [Key(4)] public int EffectValue { get; set; } +} diff --git a/src/Models/Entities/EntityMCharacterBoardPanelReleasePossessionGroup.cs b/src/Models/Entities/EntityMCharacterBoardPanelReleasePossessionGroup.cs new file mode 100644 index 0000000..94d8d64 --- /dev/null +++ b/src/Models/Entities/EntityMCharacterBoardPanelReleasePossessionGroup.cs @@ -0,0 +1,20 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCharacterBoardPanelReleasePossessionGroup))] +public class EntityMCharacterBoardPanelReleasePossessionGroup +{ + [Key(0)] public int CharacterBoardPanelReleasePossessionGroupId { get; set; } + + [Key(1)] public PossessionType PossessionType { get; set; } + + [Key(2)] public int PossessionId { get; set; } + + [Key(3)] public int Count { get; set; } + + [Key(4)] public int SortOrder { get; set; } +} diff --git a/src/Models/Entities/EntityMCharacterBoardPanelReleaseRewardGroup.cs b/src/Models/Entities/EntityMCharacterBoardPanelReleaseRewardGroup.cs new file mode 100644 index 0000000..390aaa6 --- /dev/null +++ b/src/Models/Entities/EntityMCharacterBoardPanelReleaseRewardGroup.cs @@ -0,0 +1,20 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCharacterBoardPanelReleaseRewardGroup))] +public class EntityMCharacterBoardPanelReleaseRewardGroup +{ + [Key(0)] public int CharacterBoardPanelReleaseRewardGroupId { get; set; } + + [Key(1)] public PossessionType PossessionType { get; set; } + + [Key(2)] public int PossessionId { get; set; } + + [Key(3)] public int Count { get; set; } + + [Key(4)] public int SortOrder { get; set; } +} diff --git a/src/Models/Entities/EntityMCharacterBoardStatusUp.cs b/src/Models/Entities/EntityMCharacterBoardStatusUp.cs new file mode 100644 index 0000000..4359921 --- /dev/null +++ b/src/Models/Entities/EntityMCharacterBoardStatusUp.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCharacterBoardStatusUp))] +public class EntityMCharacterBoardStatusUp +{ + [Key(0)] public int CharacterBoardStatusUpId { get; set; } + + [Key(1)] public CharacterBoardStatusUpType CharacterBoardStatusUpType { get; set; } + + [Key(2)] public int CharacterBoardEffectTargetGroupId { get; set; } +} diff --git a/src/Models/Entities/EntityMCharacterDisplaySwitch.cs b/src/Models/Entities/EntityMCharacterDisplaySwitch.cs new file mode 100644 index 0000000..9831a4a --- /dev/null +++ b/src/Models/Entities/EntityMCharacterDisplaySwitch.cs @@ -0,0 +1,22 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCharacterDisplaySwitch))] +public class EntityMCharacterDisplaySwitch +{ + [Key(0)] public int CharacterId { get; set; } + + [Key(1)] public int NameCharacterTextId { get; set; } + + [Key(2)] public int DefaultCostumeId { get; set; } + + [Key(3)] public int DefaultWeaponId { get; set; } + + [Key(4)] public int DisplayConditionClearQuestId { get; set; } + + [Key(5)] public int CharacterAssetId { get; set; } +} diff --git a/src/Models/Entities/EntityMCharacterLevelBonusAbilityGroup.cs b/src/Models/Entities/EntityMCharacterLevelBonusAbilityGroup.cs new file mode 100644 index 0000000..7b148ae --- /dev/null +++ b/src/Models/Entities/EntityMCharacterLevelBonusAbilityGroup.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCharacterLevelBonusAbilityGroup))] +public class EntityMCharacterLevelBonusAbilityGroup +{ + [Key(0)] public int CharacterLevelBonusAbilityGroupId { get; set; } + + [Key(1)] public int ActivationCharacterLevel { get; set; } + + [Key(2)] public int AbilityId { get; set; } + + [Key(3)] public int AbilityLevel { get; set; } +} diff --git a/src/Models/Entities/EntityMCharacterRebirth.cs b/src/Models/Entities/EntityMCharacterRebirth.cs new file mode 100644 index 0000000..e70dde9 --- /dev/null +++ b/src/Models/Entities/EntityMCharacterRebirth.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCharacterRebirth))] +public class EntityMCharacterRebirth +{ + [Key(0)] public int CharacterId { get; set; } + + [Key(1)] public int CharacterRebirthStepGroupId { get; set; } + + [Key(2)] public int SortOrder { get; set; } + + [Key(3)] public CharacterAssignmentType CharacterAssignmentType { get; set; } +} diff --git a/src/Models/Entities/EntityMCharacterRebirthMaterialGroup.cs b/src/Models/Entities/EntityMCharacterRebirthMaterialGroup.cs new file mode 100644 index 0000000..74b5029 --- /dev/null +++ b/src/Models/Entities/EntityMCharacterRebirthMaterialGroup.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCharacterRebirthMaterialGroup))] +public class EntityMCharacterRebirthMaterialGroup +{ + [Key(0)] public int CharacterRebirthMaterialGroupId { get; set; } + + [Key(1)] public int MaterialId { get; set; } + + [Key(2)] public int Count { get; set; } + + [Key(3)] public int SortOrder { get; set; } +} diff --git a/src/Models/Entities/EntityMCharacterRebirthStepGroup.cs b/src/Models/Entities/EntityMCharacterRebirthStepGroup.cs new file mode 100644 index 0000000..fdd8e48 --- /dev/null +++ b/src/Models/Entities/EntityMCharacterRebirthStepGroup.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCharacterRebirthStepGroup))] +public class EntityMCharacterRebirthStepGroup +{ + [Key(0)] public int CharacterRebirthStepGroupId { get; set; } + + [Key(1)] public int BeforeRebirthCount { get; set; } + + [Key(2)] public int CostumeLevelLimitUp { get; set; } + + [Key(3)] public int CharacterRebirthMaterialGroupId { get; set; } +} diff --git a/src/Models/Entities/EntityMCharacterViewerActorIcon.cs b/src/Models/Entities/EntityMCharacterViewerActorIcon.cs new file mode 100644 index 0000000..a2ce5cc --- /dev/null +++ b/src/Models/Entities/EntityMCharacterViewerActorIcon.cs @@ -0,0 +1,22 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCharacterViewerActorIcon))] +public class EntityMCharacterViewerActorIcon +{ + [Key(0)] public CostumeAssetCategoryType CostumeAssetCategoryType { get; set; } + + [Key(1)] public int SkeletonId { get; set; } + + [Key(2)] public int AssetVariationId { get; set; } + + [Key(3)] public int OverrideCostumeAssetCategoryType { get; set; } + + [Key(4)] public int OverrideIconSkeletonId { get; set; } + + [Key(5)] public int OverrideIconAssetVariationId { get; set; } +} diff --git a/src/Models/Entities/EntityMCharacterViewerField.cs b/src/Models/Entities/EntityMCharacterViewerField.cs new file mode 100644 index 0000000..efdf6e3 --- /dev/null +++ b/src/Models/Entities/EntityMCharacterViewerField.cs @@ -0,0 +1,22 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCharacterViewerField))] +public class EntityMCharacterViewerField +{ + [Key(0)] public int CharacterViewerFieldId { get; set; } + + [Key(1)] public int ReleaseEvaluateConditionId { get; set; } + + [Key(2)] public long PublishDatetime { get; set; } + + [Key(3)] public int CharacterViewerFieldAssetId { get; set; } + + [Key(4)] public int AssetBackgroundId { get; set; } + + [Key(5)] public int SortOrder { get; set; } +} diff --git a/src/Models/Entities/EntityMCharacterViewerFieldSettings.cs b/src/Models/Entities/EntityMCharacterViewerFieldSettings.cs new file mode 100644 index 0000000..2383558 --- /dev/null +++ b/src/Models/Entities/EntityMCharacterViewerFieldSettings.cs @@ -0,0 +1,22 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCharacterViewerFieldSettings))] +public class EntityMCharacterViewerFieldSettings +{ + [Key(0)] public int AssetBackgroundId { get; set; } + + [Key(1)] public int BgmAssetId { get; set; } + + [Key(2)] public int Stem { get; set; } + + [Key(3)] public int BattleFieldLocaleSettingIndex { get; set; } + + [Key(4)] public int PostProcessConfigurationIndex { get; set; } + + [Key(5)] public int BattlePointIndex { get; set; } +} diff --git a/src/Models/Entities/EntityMCharacterVoiceUnlockCondition.cs b/src/Models/Entities/EntityMCharacterVoiceUnlockCondition.cs new file mode 100644 index 0000000..182d848 --- /dev/null +++ b/src/Models/Entities/EntityMCharacterVoiceUnlockCondition.cs @@ -0,0 +1,20 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCharacterVoiceUnlockCondition))] +public class EntityMCharacterVoiceUnlockCondition +{ + [Key(0)] public int CharacterId { get; set; } + + [Key(1)] public int SortOrder { get; set; } + + [Key(2)] public CharacterVoiceUnlockConditionType CharacterVoiceUnlockConditionType { get; set; } + + [Key(3)] public int ConditionValue { get; set; } + + [Key(4)] public int VoiceAssetId { get; set; } +} diff --git a/src/Models/Entities/EntityMCollectionBonusEffect.cs b/src/Models/Entities/EntityMCollectionBonusEffect.cs new file mode 100644 index 0000000..f30600a --- /dev/null +++ b/src/Models/Entities/EntityMCollectionBonusEffect.cs @@ -0,0 +1,24 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCollectionBonusEffect))] +public class EntityMCollectionBonusEffect +{ + [Key(0)] public int CollectionBonusEffectId { get; set; } + + [Key(1)] public CollectionBonusEffectType CollectionBonusEffectType { get; set; } + + [Key(2)] public int Amount00 { get; set; } + + [Key(3)] public int Amount01 { get; set; } + + [Key(4)] public int Amount02 { get; set; } + + [Key(5)] public int Amount03 { get; set; } + + [Key(6)] public int Amount04 { get; set; } +} diff --git a/src/Models/Entities/EntityMCollectionBonusQuestAssignment.cs b/src/Models/Entities/EntityMCollectionBonusQuestAssignment.cs new file mode 100644 index 0000000..790fe9b --- /dev/null +++ b/src/Models/Entities/EntityMCollectionBonusQuestAssignment.cs @@ -0,0 +1,22 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCollectionBonusQuestAssignment))] +public class EntityMCollectionBonusQuestAssignment +{ + [Key(0)] public int CollectionBonusQuestAssignmentId { get; set; } + + [Key(1)] public QuestAssignmentType QuestAssignmentType { get; set; } + + [Key(2)] public int MainQuestChapterId { get; set; } + + [Key(3)] public int EventQuestChapterId { get; set; } + + [Key(4)] public int QuestId { get; set; } + + [Key(5)] public int SortOrder { get; set; } +} diff --git a/src/Models/Entities/EntityMCollectionBonusQuestAssignmentGroup.cs b/src/Models/Entities/EntityMCollectionBonusQuestAssignmentGroup.cs new file mode 100644 index 0000000..eb57aad --- /dev/null +++ b/src/Models/Entities/EntityMCollectionBonusQuestAssignmentGroup.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCollectionBonusQuestAssignmentGroup))] +public class EntityMCollectionBonusQuestAssignmentGroup +{ + [Key(0)] public int CollectionBonusQuestAssignmentGroupId { get; set; } + + [Key(1)] public int CollectionBonusQuestAssignmentId { get; set; } +} diff --git a/src/Models/Entities/EntityMComboCalculationSetting.cs b/src/Models/Entities/EntityMComboCalculationSetting.cs new file mode 100644 index 0000000..dc60352 --- /dev/null +++ b/src/Models/Entities/EntityMComboCalculationSetting.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMComboCalculationSetting))] +public class EntityMComboCalculationSetting +{ + [Key(0)] public int ComboCountLowerLimit { get; set; } + + [Key(1)] public int DamageCoefficientPermil { get; set; } + + [Key(2)] public int UiEffectIndex { get; set; } +} diff --git a/src/Models/Entities/EntityMComebackCampaign.cs b/src/Models/Entities/EntityMComebackCampaign.cs new file mode 100644 index 0000000..d6f2f5b --- /dev/null +++ b/src/Models/Entities/EntityMComebackCampaign.cs @@ -0,0 +1,24 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMComebackCampaign))] +public class EntityMComebackCampaign +{ + [Key(0)] public int ComebackCampaignId { get; set; } + + [Key(1)] public long ComebackJudgeStartDatetime { get; set; } + + [Key(2)] public long ComebackJudgeEndDatetime { get; set; } + + [Key(3)] public int ComebackJudgeDayCount { get; set; } + + [Key(4)] public int GrantCampaignTermDayCount { get; set; } + + [Key(5)] public int CampaignUnlockQuestId { get; set; } + + [Key(6)] public int ComebackCampaignGradeGroupId { get; set; } +} diff --git a/src/Models/Entities/EntityMCompanion.cs b/src/Models/Entities/EntityMCompanion.cs new file mode 100644 index 0000000..c16cd03 --- /dev/null +++ b/src/Models/Entities/EntityMCompanion.cs @@ -0,0 +1,32 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCompanion))] +public class EntityMCompanion +{ + [Key(0)] public int CompanionId { get; set; } + + [Key(1)] public AttributeType AttributeType { get; set; } + + [Key(2)] public int CompanionCategoryType { get; set; } + + [Key(3)] public int CompanionBaseStatusId { get; set; } + + [Key(4)] public int CompanionStatusCalculationId { get; set; } + + [Key(5)] public int SkillId { get; set; } + + [Key(6)] public int CompanionAbilityGroupId { get; set; } + + [Key(7)] public int ActorId { get; set; } + + [Key(8)] public int ActorSkeletonId { get; set; } + + [Key(9)] public int AssetVariationId { get; set; } + + [Key(10)] public int CharacterMoverBattleActorAiId { get; set; } +} diff --git a/src/Models/Entities/EntityMCompanionAbilityGroup.cs b/src/Models/Entities/EntityMCompanionAbilityGroup.cs new file mode 100644 index 0000000..2dc396b --- /dev/null +++ b/src/Models/Entities/EntityMCompanionAbilityGroup.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCompanionAbilityGroup))] +public class EntityMCompanionAbilityGroup +{ + [Key(0)] public int CompanionAbilityGroupId { get; set; } + + [Key(1)] public int SlotNumber { get; set; } + + [Key(2)] public int AbilityId { get; set; } +} diff --git a/src/Models/Entities/EntityMCompanionAbilityLevel.cs b/src/Models/Entities/EntityMCompanionAbilityLevel.cs new file mode 100644 index 0000000..f965017 --- /dev/null +++ b/src/Models/Entities/EntityMCompanionAbilityLevel.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCompanionAbilityLevel))] +public class EntityMCompanionAbilityLevel +{ + [Key(0)] public int CompanionLevelLowerLimit { get; set; } + + [Key(1)] public int AbilityLevel { get; set; } +} diff --git a/src/Models/Entities/EntityMCompanionBaseStatus.cs b/src/Models/Entities/EntityMCompanionBaseStatus.cs new file mode 100644 index 0000000..e7d1c81 --- /dev/null +++ b/src/Models/Entities/EntityMCompanionBaseStatus.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCompanionBaseStatus))] +public class EntityMCompanionBaseStatus +{ + [Key(0)] public int CompanionBaseStatusId { get; set; } + + [Key(1)] public int Attack { get; set; } + + [Key(2)] public int Hp { get; set; } + + [Key(3)] public int Vitality { get; set; } +} diff --git a/src/Models/Entities/EntityMCompanionCategory.cs b/src/Models/Entities/EntityMCompanionCategory.cs new file mode 100644 index 0000000..98504f6 --- /dev/null +++ b/src/Models/Entities/EntityMCompanionCategory.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCompanionCategory))] +public class EntityMCompanionCategory +{ + [Key(0)] public int CompanionCategoryType { get; set; } + + [Key(1)] public int EnhancementCostNumericalFunctionId { get; set; } +} diff --git a/src/Models/Entities/EntityMCompanionDuplicationExchangePossessionGroup.cs b/src/Models/Entities/EntityMCompanionDuplicationExchangePossessionGroup.cs new file mode 100644 index 0000000..a571d98 --- /dev/null +++ b/src/Models/Entities/EntityMCompanionDuplicationExchangePossessionGroup.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCompanionDuplicationExchangePossessionGroup))] +public class EntityMCompanionDuplicationExchangePossessionGroup +{ + [Key(0)] public int CompanionId { get; set; } + + [Key(1)] public PossessionType PossessionType { get; set; } + + [Key(2)] public int PossessionId { get; set; } + + [Key(3)] public int Count { get; set; } +} diff --git a/src/Models/Entities/EntityMCompanionEnhanced.cs b/src/Models/Entities/EntityMCompanionEnhanced.cs new file mode 100644 index 0000000..09ebff3 --- /dev/null +++ b/src/Models/Entities/EntityMCompanionEnhanced.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCompanionEnhanced))] +public class EntityMCompanionEnhanced +{ + [Key(0)] public int CompanionEnhancedId { get; set; } + + [Key(1)] public int CompanionId { get; set; } + + [Key(2)] public int Level { get; set; } +} diff --git a/src/Models/Entities/EntityMCompanionEnhancementMaterial.cs b/src/Models/Entities/EntityMCompanionEnhancementMaterial.cs new file mode 100644 index 0000000..4600f96 --- /dev/null +++ b/src/Models/Entities/EntityMCompanionEnhancementMaterial.cs @@ -0,0 +1,20 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCompanionEnhancementMaterial))] +public class EntityMCompanionEnhancementMaterial +{ + [Key(0)] public int CompanionCategoryType { get; set; } + + [Key(1)] public int Level { get; set; } + + [Key(2)] public int MaterialId { get; set; } + + [Key(3)] public int Count { get; set; } + + [Key(4)] public int SortOrder { get; set; } +} diff --git a/src/Models/Entities/EntityMCompanionSkillLevel.cs b/src/Models/Entities/EntityMCompanionSkillLevel.cs new file mode 100644 index 0000000..5de8ac6 --- /dev/null +++ b/src/Models/Entities/EntityMCompanionSkillLevel.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCompanionSkillLevel))] +public class EntityMCompanionSkillLevel +{ + [Key(0)] public int CompanionLevelLowerLimit { get; set; } + + [Key(1)] public int SkillLevel { get; set; } +} diff --git a/src/Models/Entities/EntityMCompanionStatusCalculation.cs b/src/Models/Entities/EntityMCompanionStatusCalculation.cs new file mode 100644 index 0000000..6d888fb --- /dev/null +++ b/src/Models/Entities/EntityMCompanionStatusCalculation.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCompanionStatusCalculation))] +public class EntityMCompanionStatusCalculation +{ + [Key(0)] public int CompanionStatusCalculationId { get; set; } + + [Key(1)] public int AttackNumericalFunctionId { get; set; } + + [Key(2)] public int HpNumericalFunctionId { get; set; } + + [Key(3)] public int VitalityNumericalFunctionId { get; set; } +} diff --git a/src/Models/Entities/EntityMCompleteMissionGroup.cs b/src/Models/Entities/EntityMCompleteMissionGroup.cs new file mode 100644 index 0000000..03bb5d2 --- /dev/null +++ b/src/Models/Entities/EntityMCompleteMissionGroup.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCompleteMissionGroup))] +public class EntityMCompleteMissionGroup +{ + [Key(0)] public int MissionId { get; set; } + + [Key(1)] public PossessionType PossessionType { get; set; } + + [Key(2)] public int PossessionId { get; set; } + + [Key(3)] public int SortOrder { get; set; } +} diff --git a/src/Models/Entities/EntityMConfig.cs b/src/Models/Entities/EntityMConfig.cs new file mode 100644 index 0000000..224ed4c --- /dev/null +++ b/src/Models/Entities/EntityMConfig.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMConfig))] +public class EntityMConfig +{ + [Key(0)] public string ConfigKey { get; set; } + + [Key(1)] public string Value { get; set; } +} diff --git a/src/Models/Entities/EntityMConsumableItem.cs b/src/Models/Entities/EntityMConsumableItem.cs new file mode 100644 index 0000000..b7ceb49 --- /dev/null +++ b/src/Models/Entities/EntityMConsumableItem.cs @@ -0,0 +1,26 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMConsumableItem))] +public class EntityMConsumableItem +{ + [Key(0)] public int ConsumableItemId { get; set; } + + [Key(1)] public ConsumableItemType ConsumableItemType { get; set; } + + [Key(2)] public int SortOrder { get; set; } + + [Key(3)] public int SellPrice { get; set; } + + [Key(4)] public int ConsumableItemTermId { get; set; } + + [Key(5)] public string AssetName { get; set; } + + [Key(6)] public int AssetCategoryId { get; set; } + + [Key(7)] public int AssetVariationId { get; set; } +} diff --git a/src/Models/Entities/EntityMConsumableItemEffect.cs b/src/Models/Entities/EntityMConsumableItemEffect.cs new file mode 100644 index 0000000..344d4ab --- /dev/null +++ b/src/Models/Entities/EntityMConsumableItemEffect.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMConsumableItemEffect))] +public class EntityMConsumableItemEffect +{ + [Key(0)] public int ConsumableItemId { get; set; } + + [Key(1)] public EffectTargetType EffectTargetType { get; set; } + + [Key(2)] public EffectValueType EffectValueType { get; set; } + + [Key(3)] public int EffectValue { get; set; } +} diff --git a/src/Models/Entities/EntityMConsumableItemTerm.cs b/src/Models/Entities/EntityMConsumableItemTerm.cs new file mode 100644 index 0000000..d752153 --- /dev/null +++ b/src/Models/Entities/EntityMConsumableItemTerm.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMConsumableItemTerm))] +public class EntityMConsumableItemTerm +{ + [Key(0)] public int ConsumableItemTermId { get; set; } + + [Key(1)] public long StartDatetime { get; set; } + + [Key(2)] public long EndDatetime { get; set; } +} diff --git a/src/Models/Entities/EntityMContentsStory.cs b/src/Models/Entities/EntityMContentsStory.cs new file mode 100644 index 0000000..7c925e1 --- /dev/null +++ b/src/Models/Entities/EntityMContentsStory.cs @@ -0,0 +1,28 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMContentsStory))] +public class EntityMContentsStory +{ + [Key(0)] public int ContentsStoryId { get; set; } + + [Key(1)] public QuestSceneType QuestSceneType { get; set; } + + [Key(2)] public int AssetBackgroundId { get; set; } + + [Key(3)] public int EventMapNumberUpper { get; set; } + + [Key(4)] public int EventMapNumberLower { get; set; } + + [Key(5)] public bool IsForcedPlay { get; set; } + + [Key(6)] public UnlockConditionType ContentsStoryUnlockConditionType { get; set; } + + [Key(7)] public int ConditionValue { get; set; } + + [Key(8)] public int UnlockEvaluateConditionId { get; set; } +} diff --git a/src/Models/Entities/EntityMCostume.cs b/src/Models/Entities/EntityMCostume.cs new file mode 100644 index 0000000..f76019f --- /dev/null +++ b/src/Models/Entities/EntityMCostume.cs @@ -0,0 +1,50 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCostume))] +public class EntityMCostume +{ + [Key(0)] public int CostumeId { get; set; } + + [Key(1)] public int CharacterId { get; set; } + + [Key(2)] public int ActorId { get; set; } + + [Key(3)] public CostumeAssetCategoryType CostumeAssetCategoryType { get; set; } + + [Key(4)] public int ActorSkeletonId { get; set; } + + [Key(5)] public int AssetVariationId { get; set; } + + [Key(6)] public WeaponType SkillfulWeaponType { get; set; } + + [Key(7)] public RarityType RarityType { get; set; } + + [Key(8)] public int CostumeBaseStatusId { get; set; } + + [Key(9)] public int CostumeStatusCalculationId { get; set; } + + [Key(10)] public int CostumeLimitBreakMaterialGroupId { get; set; } + + [Key(11)] public int CostumeAbilityGroupId { get; set; } + + [Key(12)] public int CostumeActiveSkillGroupId { get; set; } + + [Key(13)] public int CounterSkillDetailId { get; set; } + + [Key(14)] public int CharacterMoverBattleActorAiId { get; set; } + + [Key(15)] public int CostumeDefaultSkillGroupId { get; set; } + + [Key(16)] public int CostumeLevelBonusId { get; set; } + + [Key(17)] public int DefaultActorSkillAiId { get; set; } + + [Key(18)] public int CostumeEmblemAssetId { get; set; } + + [Key(19)] public int BattleActorSkillAiGroupId { get; set; } +} diff --git a/src/Models/Entities/EntityMCostumeAbilityGroup.cs b/src/Models/Entities/EntityMCostumeAbilityGroup.cs new file mode 100644 index 0000000..c46ca4e --- /dev/null +++ b/src/Models/Entities/EntityMCostumeAbilityGroup.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCostumeAbilityGroup))] +public class EntityMCostumeAbilityGroup +{ + [Key(0)] public int CostumeAbilityGroupId { get; set; } + + [Key(1)] public int SlotNumber { get; set; } + + [Key(2)] public int AbilityId { get; set; } + + [Key(3)] public int CostumeAbilityLevelGroupId { get; set; } +} diff --git a/src/Models/Entities/EntityMCostumeAbilityLevelGroup.cs b/src/Models/Entities/EntityMCostumeAbilityLevelGroup.cs new file mode 100644 index 0000000..cf58861 --- /dev/null +++ b/src/Models/Entities/EntityMCostumeAbilityLevelGroup.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCostumeAbilityLevelGroup))] +public class EntityMCostumeAbilityLevelGroup +{ + [Key(0)] public int CostumeAbilityLevelGroupId { get; set; } + + [Key(1)] public int CostumeLimitBreakCountLowerLimit { get; set; } + + [Key(2)] public int AbilityLevel { get; set; } +} diff --git a/src/Models/Entities/EntityMCostumeActiveSkillEnhancementMaterial.cs b/src/Models/Entities/EntityMCostumeActiveSkillEnhancementMaterial.cs new file mode 100644 index 0000000..7b4db2b --- /dev/null +++ b/src/Models/Entities/EntityMCostumeActiveSkillEnhancementMaterial.cs @@ -0,0 +1,20 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCostumeActiveSkillEnhancementMaterial))] +public class EntityMCostumeActiveSkillEnhancementMaterial +{ + [Key(0)] public int CostumeActiveSkillEnhancementMaterialId { get; set; } + + [Key(1)] public int SkillLevel { get; set; } + + [Key(2)] public int MaterialId { get; set; } + + [Key(3)] public int Count { get; set; } + + [Key(4)] public int SortOrder { get; set; } +} diff --git a/src/Models/Entities/EntityMCostumeActiveSkillGroup.cs b/src/Models/Entities/EntityMCostumeActiveSkillGroup.cs new file mode 100644 index 0000000..491d10f --- /dev/null +++ b/src/Models/Entities/EntityMCostumeActiveSkillGroup.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCostumeActiveSkillGroup))] +public class EntityMCostumeActiveSkillGroup +{ + [Key(0)] public int CostumeActiveSkillGroupId { get; set; } + + [Key(1)] public int CostumeLimitBreakCountLowerLimit { get; set; } + + [Key(2)] public int CostumeActiveSkillId { get; set; } + + [Key(3)] public int CostumeActiveSkillEnhancementMaterialId { get; set; } +} diff --git a/src/Models/Entities/EntityMCostumeAnimationStep.cs b/src/Models/Entities/EntityMCostumeAnimationStep.cs new file mode 100644 index 0000000..e2ccafb --- /dev/null +++ b/src/Models/Entities/EntityMCostumeAnimationStep.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCostumeAnimationStep))] +public class EntityMCostumeAnimationStep +{ + [Key(0)] public int CostumeId { get; set; } + + [Key(1)] public int Step { get; set; } + + [Key(2)] public int ActorAnimationId { get; set; } +} diff --git a/src/Models/Entities/EntityMCostumeAutoOrganizationCondition.cs b/src/Models/Entities/EntityMCostumeAutoOrganizationCondition.cs new file mode 100644 index 0000000..018e92f --- /dev/null +++ b/src/Models/Entities/EntityMCostumeAutoOrganizationCondition.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCostumeAutoOrganizationCondition))] +public class EntityMCostumeAutoOrganizationCondition +{ + [Key(0)] public int CostumeId { get; set; } + + [Key(1)] public CostumeAutoOrganizationConditionType CostumeAutoOrganizationConditionType { get; set; } + + [Key(2)] public int TargetValue { get; set; } +} diff --git a/src/Models/Entities/EntityMCostumeAwaken.cs b/src/Models/Entities/EntityMCostumeAwaken.cs new file mode 100644 index 0000000..740222f --- /dev/null +++ b/src/Models/Entities/EntityMCostumeAwaken.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCostumeAwaken))] +public class EntityMCostumeAwaken +{ + [Key(0)] public int CostumeId { get; set; } + + [Key(1)] public int CostumeAwakenEffectGroupId { get; set; } + + [Key(2)] public int CostumeAwakenStepMaterialGroupId { get; set; } + + [Key(3)] public int CostumeAwakenPriceGroupId { get; set; } +} diff --git a/src/Models/Entities/EntityMCostumeAwakenAbility.cs b/src/Models/Entities/EntityMCostumeAwakenAbility.cs new file mode 100644 index 0000000..fa4d1a1 --- /dev/null +++ b/src/Models/Entities/EntityMCostumeAwakenAbility.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCostumeAwakenAbility))] +public class EntityMCostumeAwakenAbility +{ + [Key(0)] public int CostumeAwakenAbilityId { get; set; } + + [Key(1)] public int AbilityId { get; set; } + + [Key(2)] public int AbilityLevel { get; set; } +} diff --git a/src/Models/Entities/EntityMCostumeAwakenEffectGroup.cs b/src/Models/Entities/EntityMCostumeAwakenEffectGroup.cs new file mode 100644 index 0000000..f7227d9 --- /dev/null +++ b/src/Models/Entities/EntityMCostumeAwakenEffectGroup.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCostumeAwakenEffectGroup))] +public class EntityMCostumeAwakenEffectGroup +{ + [Key(0)] public int CostumeAwakenEffectGroupId { get; set; } + + [Key(1)] public int AwakenStep { get; set; } + + [Key(2)] public CostumeAwakenEffectType CostumeAwakenEffectType { get; set; } + + [Key(3)] public int CostumeAwakenEffectId { get; set; } +} diff --git a/src/Models/Entities/EntityMCostumeAwakenItemAcquire.cs b/src/Models/Entities/EntityMCostumeAwakenItemAcquire.cs new file mode 100644 index 0000000..3d7712d --- /dev/null +++ b/src/Models/Entities/EntityMCostumeAwakenItemAcquire.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCostumeAwakenItemAcquire))] +public class EntityMCostumeAwakenItemAcquire +{ + [Key(0)] public int CostumeAwakenItemAcquireId { get; set; } + + [Key(1)] public PossessionType PossessionType { get; set; } + + [Key(2)] public int PossessionId { get; set; } + + [Key(3)] public int Count { get; set; } +} diff --git a/src/Models/Entities/EntityMCostumeAwakenMaterialGroup.cs b/src/Models/Entities/EntityMCostumeAwakenMaterialGroup.cs new file mode 100644 index 0000000..d395a54 --- /dev/null +++ b/src/Models/Entities/EntityMCostumeAwakenMaterialGroup.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCostumeAwakenMaterialGroup))] +public class EntityMCostumeAwakenMaterialGroup +{ + [Key(0)] public int CostumeAwakenMaterialGroupId { get; set; } + + [Key(1)] public int MaterialId { get; set; } + + [Key(2)] public int Count { get; set; } + + [Key(3)] public int SortOrder { get; set; } +} diff --git a/src/Models/Entities/EntityMCostumeAwakenPriceGroup.cs b/src/Models/Entities/EntityMCostumeAwakenPriceGroup.cs new file mode 100644 index 0000000..133ed8f --- /dev/null +++ b/src/Models/Entities/EntityMCostumeAwakenPriceGroup.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCostumeAwakenPriceGroup))] +public class EntityMCostumeAwakenPriceGroup +{ + [Key(0)] public int CostumeAwakenPriceGroupId { get; set; } + + [Key(1)] public int AwakenStepLowerLimit { get; set; } + + [Key(2)] public int Gold { get; set; } +} diff --git a/src/Models/Entities/EntityMCostumeAwakenStatusUpGroup.cs b/src/Models/Entities/EntityMCostumeAwakenStatusUpGroup.cs new file mode 100644 index 0000000..e620e0a --- /dev/null +++ b/src/Models/Entities/EntityMCostumeAwakenStatusUpGroup.cs @@ -0,0 +1,20 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCostumeAwakenStatusUpGroup))] +public class EntityMCostumeAwakenStatusUpGroup +{ + [Key(0)] public int CostumeAwakenStatusUpGroupId { get; set; } + + [Key(1)] public int SortOrder { get; set; } + + [Key(2)] public StatusKindType StatusKindType { get; set; } + + [Key(3)] public StatusCalculationType StatusCalculationType { get; set; } + + [Key(4)] public int EffectValue { get; set; } +} diff --git a/src/Models/Entities/EntityMCostumeAwakenStepMaterialGroup.cs b/src/Models/Entities/EntityMCostumeAwakenStepMaterialGroup.cs new file mode 100644 index 0000000..02eb808 --- /dev/null +++ b/src/Models/Entities/EntityMCostumeAwakenStepMaterialGroup.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCostumeAwakenStepMaterialGroup))] +public class EntityMCostumeAwakenStepMaterialGroup +{ + [Key(0)] public int CostumeAwakenStepMaterialGroupId { get; set; } + + [Key(1)] public int AwakenStepLowerLimit { get; set; } + + [Key(2)] public int CostumeAwakenMaterialGroupId { get; set; } +} diff --git a/src/Models/Entities/EntityMCostumeBaseStatus.cs b/src/Models/Entities/EntityMCostumeBaseStatus.cs new file mode 100644 index 0000000..20ee5a4 --- /dev/null +++ b/src/Models/Entities/EntityMCostumeBaseStatus.cs @@ -0,0 +1,26 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCostumeBaseStatus))] +public class EntityMCostumeBaseStatus +{ + [Key(0)] public int CostumeBaseStatusId { get; set; } + + [Key(1)] public int Hp { get; set; } + + [Key(2)] public int Attack { get; set; } + + [Key(3)] public int Vitality { get; set; } + + [Key(4)] public int Agility { get; set; } + + [Key(5)] public int CriticalRatioPermil { get; set; } + + [Key(6)] public int CriticalAttackRatioPermil { get; set; } + + [Key(7)] public int EvasionRatioPermil { get; set; } +} diff --git a/src/Models/Entities/EntityMCostumeCollectionBonus.cs b/src/Models/Entities/EntityMCostumeCollectionBonus.cs new file mode 100644 index 0000000..7ac0384 --- /dev/null +++ b/src/Models/Entities/EntityMCostumeCollectionBonus.cs @@ -0,0 +1,26 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCostumeCollectionBonus))] +public class EntityMCostumeCollectionBonus +{ + [Key(0)] public int CollectionBonusId { get; set; } + + [Key(1)] public int CollectionBonusTextId { get; set; } + + [Key(2)] public int CollectionBonusGroupId { get; set; } + + [Key(3)] public int CollectionBonusQuestAssignmentGroupId { get; set; } + + [Key(4)] public int CollectionBonusEffectId { get; set; } + + [Key(5)] public long StartDatetime { get; set; } + + [Key(6)] public long EndDatetime { get; set; } + + [Key(7)] public int GroupingId { get; set; } +} diff --git a/src/Models/Entities/EntityMCostumeCollectionBonusGroup.cs b/src/Models/Entities/EntityMCostumeCollectionBonusGroup.cs new file mode 100644 index 0000000..bf05e5b --- /dev/null +++ b/src/Models/Entities/EntityMCostumeCollectionBonusGroup.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCostumeCollectionBonusGroup))] +public class EntityMCostumeCollectionBonusGroup +{ + [Key(0)] public int CollectionBonusGroupId { get; set; } + + [Key(1)] public int CostumeId { get; set; } + + [Key(2)] public int SortOrder { get; set; } +} diff --git a/src/Models/Entities/EntityMCostumeDefaultSkillGroup.cs b/src/Models/Entities/EntityMCostumeDefaultSkillGroup.cs new file mode 100644 index 0000000..23788d8 --- /dev/null +++ b/src/Models/Entities/EntityMCostumeDefaultSkillGroup.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCostumeDefaultSkillGroup))] +public class EntityMCostumeDefaultSkillGroup +{ + [Key(0)] public int CostumeDefaultSkillGroupId { get; set; } + + [Key(1)] public CostumeDefaultSkillLotteryType CostumeDefaultSkillLotteryType { get; set; } + + [Key(2)] public int CostumeDefaultSkillLotteryGroupId { get; set; } +} diff --git a/src/Models/Entities/EntityMCostumeDefaultSkillLotteryGroup.cs b/src/Models/Entities/EntityMCostumeDefaultSkillLotteryGroup.cs new file mode 100644 index 0000000..bf9576a --- /dev/null +++ b/src/Models/Entities/EntityMCostumeDefaultSkillLotteryGroup.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCostumeDefaultSkillLotteryGroup))] +public class EntityMCostumeDefaultSkillLotteryGroup +{ + [Key(0)] public int CostumeDefaultSkillLotteryGroupId { get; set; } + + [Key(1)] public int SkillDetailId { get; set; } + + [Key(2)] public int ProbabilityWeight { get; set; } +} diff --git a/src/Models/Entities/EntityMCostumeDelete.cs b/src/Models/Entities/EntityMCostumeDelete.cs new file mode 100644 index 0000000..403d83b --- /dev/null +++ b/src/Models/Entities/EntityMCostumeDelete.cs @@ -0,0 +1,20 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCostumeDelete))] +public class EntityMCostumeDelete +{ + [Key(0)] public int CostumeId { get; set; } + + [Key(1)] public int DeleteConditionClearQuestId { get; set; } + + [Key(2)] public int CostumeAlternativeGroupId { get; set; } + + [Key(3)] public TutorialType DeleteCostumeTutorialType { get; set; } + + [Key(4)] public int MaterialReturnGiftGrantRouteType { get; set; } +} diff --git a/src/Models/Entities/EntityMCostumeDisplayCoordinateAdjustment.cs b/src/Models/Entities/EntityMCostumeDisplayCoordinateAdjustment.cs new file mode 100644 index 0000000..1602bbd --- /dev/null +++ b/src/Models/Entities/EntityMCostumeDisplayCoordinateAdjustment.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCostumeDisplayCoordinateAdjustment))] +public class EntityMCostumeDisplayCoordinateAdjustment +{ + [Key(0)] public int CostumeId { get; set; } + + [Key(1)] public DisplayCoordinateAdjustmentFunctionType DisplayCoordinateAdjustmentFunctionType { get; set; } + + [Key(2)] public int HorizontalCoordinateCountPermil { get; set; } + + [Key(3)] public int VerticalCoordinateCountPermil { get; set; } +} diff --git a/src/Models/Entities/EntityMCostumeDisplaySwitch.cs b/src/Models/Entities/EntityMCostumeDisplaySwitch.cs new file mode 100644 index 0000000..7c1e08c --- /dev/null +++ b/src/Models/Entities/EntityMCostumeDisplaySwitch.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCostumeDisplaySwitch))] +public class EntityMCostumeDisplaySwitch +{ + [Key(0)] public int CostumeId { get; set; } + + [Key(1)] public int DisplayConditionClearQuestId { get; set; } + + [Key(2)] public int DisplayDeletedExpressionAssetId { get; set; } +} diff --git a/src/Models/Entities/EntityMCostumeDuplicationExchangePossessionGroup.cs b/src/Models/Entities/EntityMCostumeDuplicationExchangePossessionGroup.cs new file mode 100644 index 0000000..cb670e3 --- /dev/null +++ b/src/Models/Entities/EntityMCostumeDuplicationExchangePossessionGroup.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCostumeDuplicationExchangePossessionGroup))] +public class EntityMCostumeDuplicationExchangePossessionGroup +{ + [Key(0)] public int CostumeId { get; set; } + + [Key(1)] public PossessionType PossessionType { get; set; } + + [Key(2)] public int PossessionId { get; set; } + + [Key(3)] public int Count { get; set; } +} diff --git a/src/Models/Entities/EntityMCostumeEmblem.cs b/src/Models/Entities/EntityMCostumeEmblem.cs new file mode 100644 index 0000000..822ea41 --- /dev/null +++ b/src/Models/Entities/EntityMCostumeEmblem.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCostumeEmblem))] +public class EntityMCostumeEmblem +{ + [Key(0)] public int CostumeEmblemAssetId { get; set; } + + [Key(1)] public int SortOrder { get; set; } +} diff --git a/src/Models/Entities/EntityMCostumeEnhanced.cs b/src/Models/Entities/EntityMCostumeEnhanced.cs new file mode 100644 index 0000000..6438a2d --- /dev/null +++ b/src/Models/Entities/EntityMCostumeEnhanced.cs @@ -0,0 +1,22 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCostumeEnhanced))] +public class EntityMCostumeEnhanced +{ + [Key(0)] public int CostumeEnhancedId { get; set; } + + [Key(1)] public int CostumeId { get; set; } + + [Key(2)] public int LimitBreakCount { get; set; } + + [Key(3)] public int Level { get; set; } + + [Key(4)] public int ActiveSkillLevel { get; set; } + + [Key(5)] public int AwakenCount { get; set; } +} diff --git a/src/Models/Entities/EntityMCostumeLevelBonus.cs b/src/Models/Entities/EntityMCostumeLevelBonus.cs new file mode 100644 index 0000000..59f48bf --- /dev/null +++ b/src/Models/Entities/EntityMCostumeLevelBonus.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCostumeLevelBonus))] +public class EntityMCostumeLevelBonus +{ + [Key(0)] public int CostumeLevelBonusId { get; set; } + + [Key(1)] public int Level { get; set; } + + [Key(2)] public CostumeLevelBonusType CostumeLevelBonusType { get; set; } + + [Key(3)] public int EffectValue { get; set; } +} diff --git a/src/Models/Entities/EntityMCostumeLimitBreakMaterialGroup.cs b/src/Models/Entities/EntityMCostumeLimitBreakMaterialGroup.cs new file mode 100644 index 0000000..209993b --- /dev/null +++ b/src/Models/Entities/EntityMCostumeLimitBreakMaterialGroup.cs @@ -0,0 +1,20 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCostumeLimitBreakMaterialGroup))] +public class EntityMCostumeLimitBreakMaterialGroup +{ + [Key(0)] public int CostumeLimitBreakMaterialGroupId { get; set; } + + [Key(1)] public int MaterialId { get; set; } + + [Key(2)] public int Count { get; set; } + + [Key(3)] public int SortOrder { get; set; } + + [Key(4)] public int CostumeOverflowExchangePossessionGroupId { get; set; } +} diff --git a/src/Models/Entities/EntityMCostumeLimitBreakMaterialRarityGroup.cs b/src/Models/Entities/EntityMCostumeLimitBreakMaterialRarityGroup.cs new file mode 100644 index 0000000..eb73c90 --- /dev/null +++ b/src/Models/Entities/EntityMCostumeLimitBreakMaterialRarityGroup.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCostumeLimitBreakMaterialRarityGroup))] +public class EntityMCostumeLimitBreakMaterialRarityGroup +{ + [Key(0)] public int CostumeLimitBreakMaterialRarityGroupId { get; set; } + + [Key(1)] public int MaterialId { get; set; } + + [Key(2)] public int Count { get; set; } + + [Key(3)] public int SortOrder { get; set; } +} diff --git a/src/Models/Entities/EntityMCostumeLotteryEffect.cs b/src/Models/Entities/EntityMCostumeLotteryEffect.cs new file mode 100644 index 0000000..a571e80 --- /dev/null +++ b/src/Models/Entities/EntityMCostumeLotteryEffect.cs @@ -0,0 +1,22 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCostumeLotteryEffect))] +public class EntityMCostumeLotteryEffect +{ + [Key(0)] public int CostumeId { get; set; } + + [Key(1)] public int SlotNumber { get; set; } + + [Key(2)] public int CostumeLotteryEffectOddsGroupId { get; set; } + + [Key(3)] public int CostumeLotteryEffectUnlockMaterialGroupId { get; set; } + + [Key(4)] public int CostumeLotteryEffectDrawMaterialGroupId { get; set; } + + [Key(5)] public int CostumeLotteryEffectReleaseScheduleId { get; set; } +} diff --git a/src/Models/Entities/EntityMCostumeLotteryEffectMaterialGroup.cs b/src/Models/Entities/EntityMCostumeLotteryEffectMaterialGroup.cs new file mode 100644 index 0000000..3670d85 --- /dev/null +++ b/src/Models/Entities/EntityMCostumeLotteryEffectMaterialGroup.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCostumeLotteryEffectMaterialGroup))] +public class EntityMCostumeLotteryEffectMaterialGroup +{ + [Key(0)] public int CostumeLotteryEffectMaterialGroupId { get; set; } + + [Key(1)] public int MaterialId { get; set; } + + [Key(2)] public int Count { get; set; } + + [Key(3)] public int SortOrder { get; set; } +} diff --git a/src/Models/Entities/EntityMCostumeLotteryEffectOddsGroup.cs b/src/Models/Entities/EntityMCostumeLotteryEffectOddsGroup.cs new file mode 100644 index 0000000..30acd70 --- /dev/null +++ b/src/Models/Entities/EntityMCostumeLotteryEffectOddsGroup.cs @@ -0,0 +1,22 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCostumeLotteryEffectOddsGroup))] +public class EntityMCostumeLotteryEffectOddsGroup +{ + [Key(0)] public int CostumeLotteryEffectOddsGroupId { get; set; } + + [Key(1)] public int OddsNumber { get; set; } + + [Key(2)] public int Weight { get; set; } + + [Key(3)] public CostumeLotteryEffectType CostumeLotteryEffectType { get; set; } + + [Key(4)] public int CostumeLotteryEffectTargetId { get; set; } + + [Key(5)] public RarityType RarityType { get; set; } +} diff --git a/src/Models/Entities/EntityMCostumeLotteryEffectReleaseSchedule.cs b/src/Models/Entities/EntityMCostumeLotteryEffectReleaseSchedule.cs new file mode 100644 index 0000000..e081bc8 --- /dev/null +++ b/src/Models/Entities/EntityMCostumeLotteryEffectReleaseSchedule.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCostumeLotteryEffectReleaseSchedule))] +public class EntityMCostumeLotteryEffectReleaseSchedule +{ + [Key(0)] public int CostumeLotteryEffectReleaseScheduleId { get; set; } + + [Key(1)] public long ReleaseDatetime { get; set; } +} diff --git a/src/Models/Entities/EntityMCostumeLotteryEffectTargetAbility.cs b/src/Models/Entities/EntityMCostumeLotteryEffectTargetAbility.cs new file mode 100644 index 0000000..88af0b6 --- /dev/null +++ b/src/Models/Entities/EntityMCostumeLotteryEffectTargetAbility.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCostumeLotteryEffectTargetAbility))] +public class EntityMCostumeLotteryEffectTargetAbility +{ + [Key(0)] public int CostumeLotteryEffectTargetAbilityId { get; set; } + + [Key(1)] public int AbilityId { get; set; } + + [Key(2)] public int AbilityLevel { get; set; } +} diff --git a/src/Models/Entities/EntityMCostumeLotteryEffectTargetStatusUp.cs b/src/Models/Entities/EntityMCostumeLotteryEffectTargetStatusUp.cs new file mode 100644 index 0000000..d04d529 --- /dev/null +++ b/src/Models/Entities/EntityMCostumeLotteryEffectTargetStatusUp.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCostumeLotteryEffectTargetStatusUp))] +public class EntityMCostumeLotteryEffectTargetStatusUp +{ + [Key(0)] public int CostumeLotteryEffectTargetStatusUpId { get; set; } + + [Key(1)] public StatusKindType StatusKindType { get; set; } + + [Key(2)] public StatusCalculationType StatusCalculationType { get; set; } + + [Key(3)] public int EffectValue { get; set; } +} diff --git a/src/Models/Entities/EntityMCostumeOverflowExchangePossessionGroup.cs b/src/Models/Entities/EntityMCostumeOverflowExchangePossessionGroup.cs new file mode 100644 index 0000000..57d7f37 --- /dev/null +++ b/src/Models/Entities/EntityMCostumeOverflowExchangePossessionGroup.cs @@ -0,0 +1,20 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCostumeOverflowExchangePossessionGroup))] +public class EntityMCostumeOverflowExchangePossessionGroup +{ + [Key(0)] public int MaterialId { get; set; } + + [Key(1)] public int SortOrder { get; set; } + + [Key(2)] public PossessionType PossessionType { get; set; } + + [Key(3)] public int PossessionId { get; set; } + + [Key(4)] public int Count { get; set; } +} diff --git a/src/Models/Entities/EntityMCostumeProperAttributeHpBonus.cs b/src/Models/Entities/EntityMCostumeProperAttributeHpBonus.cs new file mode 100644 index 0000000..ebe4976 --- /dev/null +++ b/src/Models/Entities/EntityMCostumeProperAttributeHpBonus.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCostumeProperAttributeHpBonus))] +public class EntityMCostumeProperAttributeHpBonus +{ + [Key(0)] public int CostumeId { get; set; } + + [Key(1)] public AttributeType CostumeProperAttributeType { get; set; } + + [Key(2)] public int MainWeaponHpAdditionalValue { get; set; } + + [Key(3)] public int SubWeaponHpAdditionalValue { get; set; } +} diff --git a/src/Models/Entities/EntityMCostumeRarity.cs b/src/Models/Entities/EntityMCostumeRarity.cs new file mode 100644 index 0000000..a4975df --- /dev/null +++ b/src/Models/Entities/EntityMCostumeRarity.cs @@ -0,0 +1,26 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCostumeRarity))] +public class EntityMCostumeRarity +{ + [Key(0)] public RarityType RarityType { get; set; } + + [Key(1)] public int CostumeLimitBreakMaterialRarityGroupId { get; set; } + + [Key(2)] public int EnhancementCostByMaterialNumericalFunctionId { get; set; } + + [Key(3)] public int LimitBreakCostNumericalFunctionId { get; set; } + + [Key(4)] public int MaxLevelNumericalFunctionId { get; set; } + + [Key(5)] public int RequiredExpForLevelUpNumericalParameterMapId { get; set; } + + [Key(6)] public int ActiveSkillMaxLevelNumericalFunctionId { get; set; } + + [Key(7)] public int ActiveSkillEnhancementCostNumericalFunctionId { get; set; } +} diff --git a/src/Models/Entities/EntityMCostumeSpecialActActiveSkill.cs b/src/Models/Entities/EntityMCostumeSpecialActActiveSkill.cs new file mode 100644 index 0000000..e790e74 --- /dev/null +++ b/src/Models/Entities/EntityMCostumeSpecialActActiveSkill.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCostumeSpecialActActiveSkill))] +public class EntityMCostumeSpecialActActiveSkill +{ + [Key(0)] public int CostumeId { get; set; } + + [Key(1)] public int SkillActIndex { get; set; } + + [Key(2)] public CostumeSpecialActActiveSkillConditionType CostumeSpecialActActiveSkillConditionType { get; set; } + + [Key(3)] public int CostumeSpecialActActiveSkillConditionId { get; set; } +} diff --git a/src/Models/Entities/EntityMCostumeSpecialActActiveSkillConditionAttribute.cs b/src/Models/Entities/EntityMCostumeSpecialActActiveSkillConditionAttribute.cs new file mode 100644 index 0000000..1cb7377 --- /dev/null +++ b/src/Models/Entities/EntityMCostumeSpecialActActiveSkillConditionAttribute.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCostumeSpecialActActiveSkillConditionAttribute))] +public class EntityMCostumeSpecialActActiveSkillConditionAttribute +{ + [Key(0)] public int CostumeSpecialActActiveSkillConditionId { get; set; } + + [Key(1)] public AttributeType CostumeSpecialActActiveSkillConditionAttributeType { get; set; } +} diff --git a/src/Models/Entities/EntityMCostumeStatusCalculation.cs b/src/Models/Entities/EntityMCostumeStatusCalculation.cs new file mode 100644 index 0000000..3ddbb6e --- /dev/null +++ b/src/Models/Entities/EntityMCostumeStatusCalculation.cs @@ -0,0 +1,26 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMCostumeStatusCalculation))] +public class EntityMCostumeStatusCalculation +{ + [Key(0)] public int CostumeStatusCalculationId { get; set; } + + [Key(1)] public int HpNumericalFunctionId { get; set; } + + [Key(2)] public int AttackNumericalFunctionId { get; set; } + + [Key(3)] public int VitalityNumericalFunctionId { get; set; } + + [Key(4)] public int AgilityNumericalFunctionId { get; set; } + + [Key(5)] public int CriticalRatioPermilNumericalFunctionId { get; set; } + + [Key(6)] public int CriticalAttackRatioPermilNumericalFunctionId { get; set; } + + [Key(7)] public int EvasionRatioPermilNumericalFunctionId { get; set; } +} diff --git a/src/Models/Entities/EntityMDeckEntrustCoefficientAttribute.cs b/src/Models/Entities/EntityMDeckEntrustCoefficientAttribute.cs new file mode 100644 index 0000000..0b60af6 --- /dev/null +++ b/src/Models/Entities/EntityMDeckEntrustCoefficientAttribute.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMDeckEntrustCoefficientAttribute))] +public class EntityMDeckEntrustCoefficientAttribute +{ + [Key(0)] public AttributeType EntrustAttributeType { get; set; } + + [Key(1)] public AttributeType AttributeType { get; set; } + + [Key(2)] public int CoefficientPermil { get; set; } +} diff --git a/src/Models/Entities/EntityMDeckEntrustCoefficientPartsSeriesBonusCount.cs b/src/Models/Entities/EntityMDeckEntrustCoefficientPartsSeriesBonusCount.cs new file mode 100644 index 0000000..4f336b9 --- /dev/null +++ b/src/Models/Entities/EntityMDeckEntrustCoefficientPartsSeriesBonusCount.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMDeckEntrustCoefficientPartsSeriesBonusCount))] +public class EntityMDeckEntrustCoefficientPartsSeriesBonusCount +{ + [Key(0)] public int PartsSeriesBonusCount { get; set; } + + [Key(1)] public int CoefficientPermil { get; set; } +} diff --git a/src/Models/Entities/EntityMDeckEntrustCoefficientStatus.cs b/src/Models/Entities/EntityMDeckEntrustCoefficientStatus.cs new file mode 100644 index 0000000..6a26c5e --- /dev/null +++ b/src/Models/Entities/EntityMDeckEntrustCoefficientStatus.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMDeckEntrustCoefficientStatus))] +public class EntityMDeckEntrustCoefficientStatus +{ + [Key(0)] public int EntrustDeckStatusType { get; set; } + + [Key(1)] public int DeckStatusType { get; set; } + + [Key(2)] public int CoefficientPermil { get; set; } +} diff --git a/src/Models/Entities/EntityMDokan.cs b/src/Models/Entities/EntityMDokan.cs new file mode 100644 index 0000000..196a5f7 --- /dev/null +++ b/src/Models/Entities/EntityMDokan.cs @@ -0,0 +1,26 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMDokan))] +public class EntityMDokan +{ + [Key(0)] public int DokanId { get; set; } + + [Key(1)] public int SortOrder { get; set; } + + [Key(2)] public DokanType DokanType { get; set; } + + [Key(3)] public long StartDatetime { get; set; } + + [Key(4)] public long EndDatetime { get; set; } + + [Key(5)] public int DokanContentGroupId { get; set; } + + [Key(6)] public TargetUserStatusType TargetUserStatusType { get; set; } + + [Key(7)] public MainFunctionType UnlockMainFunctionType { get; set; } +} diff --git a/src/Models/Entities/EntityMDokanContentGroup.cs b/src/Models/Entities/EntityMDokanContentGroup.cs new file mode 100644 index 0000000..0946a00 --- /dev/null +++ b/src/Models/Entities/EntityMDokanContentGroup.cs @@ -0,0 +1,20 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMDokanContentGroup))] +public class EntityMDokanContentGroup +{ + [Key(0)] public int DokanContentGroupId { get; set; } + + [Key(1)] public int ContentIndex { get; set; } + + [Key(2)] public int ImageId { get; set; } + + [Key(3)] public int MovieId { get; set; } + + [Key(4)] public int DokanTextId { get; set; } +} diff --git a/src/Models/Entities/EntityMDokanText.cs b/src/Models/Entities/EntityMDokanText.cs new file mode 100644 index 0000000..9803964 --- /dev/null +++ b/src/Models/Entities/EntityMDokanText.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMDokanText))] +public class EntityMDokanText +{ + [Key(0)] public int DokanTextId { get; set; } + + [Key(1)] public LanguageType LanguageType { get; set; } + + [Key(2)] public string Text { get; set; } +} diff --git a/src/Models/Entities/EntityMEnhanceCampaign.cs b/src/Models/Entities/EntityMEnhanceCampaign.cs new file mode 100644 index 0000000..cf9907b --- /dev/null +++ b/src/Models/Entities/EntityMEnhanceCampaign.cs @@ -0,0 +1,26 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMEnhanceCampaign))] +public class EntityMEnhanceCampaign +{ + [Key(0)] public int EnhanceCampaignId { get; set; } + + [Key(1)] public int EnhanceCampaignTargetGroupId { get; set; } + + [Key(2)] public EnhanceCampaignEffectType EnhanceCampaignEffectType { get; set; } + + [Key(3)] public int EnhanceCampaignEffectValue { get; set; } + + [Key(4)] public long StartDatetime { get; set; } + + [Key(5)] public long EndDatetime { get; set; } + + [Key(6)] public TargetUserStatusType TargetUserStatusType { get; set; } + + [Key(7)] public int SortOrder { get; set; } +} diff --git a/src/Models/Entities/EntityMEnhanceCampaignTargetGroup.cs b/src/Models/Entities/EntityMEnhanceCampaignTargetGroup.cs new file mode 100644 index 0000000..9ffdf81 --- /dev/null +++ b/src/Models/Entities/EntityMEnhanceCampaignTargetGroup.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMEnhanceCampaignTargetGroup))] +public class EntityMEnhanceCampaignTargetGroup +{ + [Key(0)] public int EnhanceCampaignTargetGroupId { get; set; } + + [Key(1)] public int EnhanceCampaignTargetIndex { get; set; } + + [Key(2)] public EnhanceCampaignTargetType EnhanceCampaignTargetType { get; set; } + + [Key(3)] public int EnhanceCampaignTargetValue { get; set; } +} diff --git a/src/Models/Entities/EntityMEvaluateCondition.cs b/src/Models/Entities/EntityMEvaluateCondition.cs new file mode 100644 index 0000000..ab65348 --- /dev/null +++ b/src/Models/Entities/EntityMEvaluateCondition.cs @@ -0,0 +1,20 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMEvaluateCondition))] +public class EntityMEvaluateCondition +{ + [Key(0)] public int EvaluateConditionId { get; set; } + + [Key(1)] public EvaluateConditionFunctionType EvaluateConditionFunctionType { get; set; } + + [Key(2)] public EvaluateConditionEvaluateType EvaluateConditionEvaluateType { get; set; } + + [Key(3)] public int EvaluateConditionValueGroupId { get; set; } + + [Key(4)] public int NameEvaluateConditionTextId { get; set; } +} diff --git a/src/Models/Entities/EntityMEvaluateConditionValueGroup.cs b/src/Models/Entities/EntityMEvaluateConditionValueGroup.cs new file mode 100644 index 0000000..f7dfbc9 --- /dev/null +++ b/src/Models/Entities/EntityMEvaluateConditionValueGroup.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMEvaluateConditionValueGroup))] +public class EntityMEvaluateConditionValueGroup +{ + [Key(0)] public int EvaluateConditionValueGroupId { get; set; } + + [Key(1)] public int GroupIndex { get; set; } + + [Key(2)] public long Value { get; set; } +} diff --git a/src/Models/Entities/EntityMEventQuestChapter.cs b/src/Models/Entities/EntityMEventQuestChapter.cs new file mode 100644 index 0000000..a775d6a --- /dev/null +++ b/src/Models/Entities/EntityMEventQuestChapter.cs @@ -0,0 +1,32 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMEventQuestChapter))] +public class EntityMEventQuestChapter +{ + [Key(0)] public int EventQuestChapterId { get; set; } + + [Key(1)] public EventQuestType EventQuestType { get; set; } + + [Key(2)] public int SortOrder { get; set; } + + [Key(3)] public int NameEventQuestTextId { get; set; } + + [Key(4)] public int BannerAssetId { get; set; } + + [Key(5)] public int EventQuestLinkId { get; set; } + + [Key(6)] public int EventQuestDisplayItemGroupId { get; set; } + + [Key(7)] public int EventQuestSequenceGroupId { get; set; } + + [Key(8)] public long StartDatetime { get; set; } + + [Key(9)] public long EndDatetime { get; set; } + + [Key(10)] public int DisplaySortOrder { get; set; } +} diff --git a/src/Models/Entities/EntityMEventQuestChapterCharacter.cs b/src/Models/Entities/EntityMEventQuestChapterCharacter.cs new file mode 100644 index 0000000..0c33bdf --- /dev/null +++ b/src/Models/Entities/EntityMEventQuestChapterCharacter.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMEventQuestChapterCharacter))] +public class EntityMEventQuestChapterCharacter +{ + [Key(0)] public int EventQuestChapterId { get; set; } + + [Key(1)] public int CharacterId { get; set; } +} diff --git a/src/Models/Entities/EntityMEventQuestChapterDifficultyLimitContentUnlock.cs b/src/Models/Entities/EntityMEventQuestChapterDifficultyLimitContentUnlock.cs new file mode 100644 index 0000000..f88aaec --- /dev/null +++ b/src/Models/Entities/EntityMEventQuestChapterDifficultyLimitContentUnlock.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMEventQuestChapterDifficultyLimitContentUnlock))] +public class EntityMEventQuestChapterDifficultyLimitContentUnlock +{ + [Key(0)] public int EventQuestChapterId { get; set; } + + [Key(1)] public DifficultyType DifficultyType { get; set; } + + [Key(2)] public int UnlockEvaluateConditionId { get; set; } +} diff --git a/src/Models/Entities/EntityMEventQuestChapterLimitContentRelation.cs b/src/Models/Entities/EntityMEventQuestChapterLimitContentRelation.cs new file mode 100644 index 0000000..407f5be --- /dev/null +++ b/src/Models/Entities/EntityMEventQuestChapterLimitContentRelation.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMEventQuestChapterLimitContentRelation))] +public class EntityMEventQuestChapterLimitContentRelation +{ + [Key(0)] public int EventQuestChapterId { get; set; } + + [Key(1)] public int EventQuestLimitContentId { get; set; } +} diff --git a/src/Models/Entities/EntityMEventQuestDailyGroup.cs b/src/Models/Entities/EntityMEventQuestDailyGroup.cs new file mode 100644 index 0000000..88cee4d --- /dev/null +++ b/src/Models/Entities/EntityMEventQuestDailyGroup.cs @@ -0,0 +1,22 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMEventQuestDailyGroup))] +public class EntityMEventQuestDailyGroup +{ + [Key(0)] public int EventQuestDailyGroupId { get; set; } + + [Key(1)] public long StartDatetime { get; set; } + + [Key(2)] public long EndDatetime { get; set; } + + [Key(3)] public int EventQuestDailyGroupTargetChapterId { get; set; } + + [Key(4)] public int EventQuestDailyGroupCompleteRewardId { get; set; } + + [Key(5)] public int EventQuestDailyGroupMessageId { get; set; } +} diff --git a/src/Models/Entities/EntityMEventQuestDailyGroupCompleteReward.cs b/src/Models/Entities/EntityMEventQuestDailyGroupCompleteReward.cs new file mode 100644 index 0000000..d193d49 --- /dev/null +++ b/src/Models/Entities/EntityMEventQuestDailyGroupCompleteReward.cs @@ -0,0 +1,20 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMEventQuestDailyGroupCompleteReward))] +public class EntityMEventQuestDailyGroupCompleteReward +{ + [Key(0)] public int EventQuestDailyGroupCompleteRewardId { get; set; } + + [Key(1)] public int SortOrder { get; set; } + + [Key(2)] public PossessionType PossessionType { get; set; } + + [Key(3)] public int PossessionId { get; set; } + + [Key(4)] public int Count { get; set; } +} diff --git a/src/Models/Entities/EntityMEventQuestDailyGroupMessage.cs b/src/Models/Entities/EntityMEventQuestDailyGroupMessage.cs new file mode 100644 index 0000000..260525c --- /dev/null +++ b/src/Models/Entities/EntityMEventQuestDailyGroupMessage.cs @@ -0,0 +1,20 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMEventQuestDailyGroupMessage))] +public class EntityMEventQuestDailyGroupMessage +{ + [Key(0)] public int EventQuestDailyGroupMessageId { get; set; } + + [Key(1)] public int OddsNumber { get; set; } + + [Key(2)] public int Weight { get; set; } + + [Key(3)] public int BeforeClearMessageTextId { get; set; } + + [Key(4)] public int AfterClearMessageTextId { get; set; } +} diff --git a/src/Models/Entities/EntityMEventQuestDailyGroupTargetChapter.cs b/src/Models/Entities/EntityMEventQuestDailyGroupTargetChapter.cs new file mode 100644 index 0000000..dc0e075 --- /dev/null +++ b/src/Models/Entities/EntityMEventQuestDailyGroupTargetChapter.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMEventQuestDailyGroupTargetChapter))] +public class EntityMEventQuestDailyGroupTargetChapter +{ + [Key(0)] public int EventQuestDailyGroupTargetChapterId { get; set; } + + [Key(1)] public int SortOrder { get; set; } + + [Key(2)] public int EventQuestChapterId { get; set; } +} diff --git a/src/Models/Entities/EntityMEventQuestDisplayItemGroup.cs b/src/Models/Entities/EntityMEventQuestDisplayItemGroup.cs new file mode 100644 index 0000000..79f7278 --- /dev/null +++ b/src/Models/Entities/EntityMEventQuestDisplayItemGroup.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMEventQuestDisplayItemGroup))] +public class EntityMEventQuestDisplayItemGroup +{ + [Key(0)] public int EventQuestDisplayItemGroupId { get; set; } + + [Key(1)] public int SortOrder { get; set; } + + [Key(2)] public PossessionType PossessionType { get; set; } + + [Key(3)] public int PossessionId { get; set; } +} diff --git a/src/Models/Entities/EntityMEventQuestGuerrillaFreeOpen.cs b/src/Models/Entities/EntityMEventQuestGuerrillaFreeOpen.cs new file mode 100644 index 0000000..de02daf --- /dev/null +++ b/src/Models/Entities/EntityMEventQuestGuerrillaFreeOpen.cs @@ -0,0 +1,20 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMEventQuestGuerrillaFreeOpen))] +public class EntityMEventQuestGuerrillaFreeOpen +{ + [Key(0)] public int EventQuestGuerrillaFreeOpenId { get; set; } + + [Key(1)] public int OpenMinutes { get; set; } + + [Key(2)] public int DailyOpenMaxCount { get; set; } + + [Key(3)] public long StartDatetime { get; set; } + + [Key(4)] public long EndDatetime { get; set; } +} diff --git a/src/Models/Entities/EntityMEventQuestGuerrillaFreeOpenScheduleCorrespondence.cs b/src/Models/Entities/EntityMEventQuestGuerrillaFreeOpenScheduleCorrespondence.cs new file mode 100644 index 0000000..2c49900 --- /dev/null +++ b/src/Models/Entities/EntityMEventQuestGuerrillaFreeOpenScheduleCorrespondence.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMEventQuestGuerrillaFreeOpenScheduleCorrespondence))] +public class EntityMEventQuestGuerrillaFreeOpenScheduleCorrespondence +{ + [Key(0)] public int QuestId { get; set; } + + [Key(1)] public int QuestScheduleId { get; set; } +} diff --git a/src/Models/Entities/EntityMEventQuestLabyrinthMob.cs b/src/Models/Entities/EntityMEventQuestLabyrinthMob.cs new file mode 100644 index 0000000..8b10b1a --- /dev/null +++ b/src/Models/Entities/EntityMEventQuestLabyrinthMob.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMEventQuestLabyrinthMob))] +public class EntityMEventQuestLabyrinthMob +{ + [Key(0)] public int EventQuestLabyrinthMobId { get; set; } + + [Key(1)] public int MobAssetId { get; set; } + + [Key(2)] public int BeforeStageClearTextAssetId { get; set; } + + [Key(3)] public int AfterStageClearTextAssetId { get; set; } +} diff --git a/src/Models/Entities/EntityMEventQuestLabyrinthQuestDisplay.cs b/src/Models/Entities/EntityMEventQuestLabyrinthQuestDisplay.cs new file mode 100644 index 0000000..2520b82 --- /dev/null +++ b/src/Models/Entities/EntityMEventQuestLabyrinthQuestDisplay.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMEventQuestLabyrinthQuestDisplay))] +public class EntityMEventQuestLabyrinthQuestDisplay +{ + [Key(0)] public int QuestId { get; set; } + + [Key(1)] public int BgAssetId { get; set; } + + [Key(2)] public int MobId { get; set; } +} diff --git a/src/Models/Entities/EntityMEventQuestLabyrinthQuestEffectDescriptionAbility.cs b/src/Models/Entities/EntityMEventQuestLabyrinthQuestEffectDescriptionAbility.cs new file mode 100644 index 0000000..c3e896f --- /dev/null +++ b/src/Models/Entities/EntityMEventQuestLabyrinthQuestEffectDescriptionAbility.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMEventQuestLabyrinthQuestEffectDescriptionAbility))] +public class EntityMEventQuestLabyrinthQuestEffectDescriptionAbility +{ + [Key(0)] public int EventQuestLabyrinthQuestEffectDescriptionId { get; set; } + + [Key(1)] public int AbilityId { get; set; } + + [Key(2)] public int AbilityLevel { get; set; } +} diff --git a/src/Models/Entities/EntityMEventQuestLabyrinthQuestEffectDescriptionFree.cs b/src/Models/Entities/EntityMEventQuestLabyrinthQuestEffectDescriptionFree.cs new file mode 100644 index 0000000..2ff51d8 --- /dev/null +++ b/src/Models/Entities/EntityMEventQuestLabyrinthQuestEffectDescriptionFree.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMEventQuestLabyrinthQuestEffectDescriptionFree))] +public class EntityMEventQuestLabyrinthQuestEffectDescriptionFree +{ + [Key(0)] public int EventQuestLabyrinthQuestEffectDescriptionId { get; set; } + + [Key(1)] public int AssetId { get; set; } +} diff --git a/src/Models/Entities/EntityMEventQuestLabyrinthQuestEffectDisplay.cs b/src/Models/Entities/EntityMEventQuestLabyrinthQuestEffectDisplay.cs new file mode 100644 index 0000000..1b1b43a --- /dev/null +++ b/src/Models/Entities/EntityMEventQuestLabyrinthQuestEffectDisplay.cs @@ -0,0 +1,20 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMEventQuestLabyrinthQuestEffectDisplay))] +public class EntityMEventQuestLabyrinthQuestEffectDisplay +{ + [Key(0)] public int QuestId { get; set; } + + [Key(1)] public int SortOrder { get; set; } + + [Key(2)] public LabyrinthQuestEffectDescriptionType LabyrinthQuestEffectDescriptionType { get; set; } + + [Key(3)] public int EventQuestLabyrinthQuestEffectDescriptionId { get; set; } + + [Key(4)] public AttributeType EffectTargetWeaponAttributeType { get; set; } +} diff --git a/src/Models/Entities/EntityMEventQuestLabyrinthRewardGroup.cs b/src/Models/Entities/EntityMEventQuestLabyrinthRewardGroup.cs new file mode 100644 index 0000000..29f1592 --- /dev/null +++ b/src/Models/Entities/EntityMEventQuestLabyrinthRewardGroup.cs @@ -0,0 +1,20 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMEventQuestLabyrinthRewardGroup))] +public class EntityMEventQuestLabyrinthRewardGroup +{ + [Key(0)] public int EventQuestLabyrinthRewardGroupId { get; set; } + + [Key(1)] public int SortOrder { get; set; } + + [Key(2)] public PossessionType PossessionType { get; set; } + + [Key(3)] public int PossessionId { get; set; } + + [Key(4)] public int Count { get; set; } +} diff --git a/src/Models/Entities/EntityMEventQuestLabyrinthSeason.cs b/src/Models/Entities/EntityMEventQuestLabyrinthSeason.cs new file mode 100644 index 0000000..deed6fd --- /dev/null +++ b/src/Models/Entities/EntityMEventQuestLabyrinthSeason.cs @@ -0,0 +1,20 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMEventQuestLabyrinthSeason))] +public class EntityMEventQuestLabyrinthSeason +{ + [Key(0)] public int EventQuestChapterId { get; set; } + + [Key(1)] public int SeasonNumber { get; set; } + + [Key(2)] public long StartDatetime { get; set; } + + [Key(3)] public long EndDatetime { get; set; } + + [Key(4)] public int SeasonRewardGroupId { get; set; } +} diff --git a/src/Models/Entities/EntityMEventQuestLabyrinthSeasonRewardGroup.cs b/src/Models/Entities/EntityMEventQuestLabyrinthSeasonRewardGroup.cs new file mode 100644 index 0000000..0aa7326 --- /dev/null +++ b/src/Models/Entities/EntityMEventQuestLabyrinthSeasonRewardGroup.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMEventQuestLabyrinthSeasonRewardGroup))] +public class EntityMEventQuestLabyrinthSeasonRewardGroup +{ + [Key(0)] public int EventQuestLabyrinthSeasonRewardGroupId { get; set; } + + [Key(1)] public int HeadQuestId { get; set; } + + [Key(2)] public int EventQuestLabyrinthRewardGroupId { get; set; } +} diff --git a/src/Models/Entities/EntityMEventQuestLabyrinthStage.cs b/src/Models/Entities/EntityMEventQuestLabyrinthStage.cs new file mode 100644 index 0000000..6af4e20 --- /dev/null +++ b/src/Models/Entities/EntityMEventQuestLabyrinthStage.cs @@ -0,0 +1,28 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMEventQuestLabyrinthStage))] +public class EntityMEventQuestLabyrinthStage +{ + [Key(0)] public int EventQuestChapterId { get; set; } + + [Key(1)] public int StageOrder { get; set; } + + [Key(2)] public int StartSequenceSortOrder { get; set; } + + [Key(3)] public int EndSequenceSortOrder { get; set; } + + [Key(4)] public int StageClearRewardGroupId { get; set; } + + [Key(5)] public int StageAccumulationRewardGroupId { get; set; } + + [Key(6)] public int Mob1Id { get; set; } + + [Key(7)] public int Mob2Id { get; set; } + + [Key(8)] public int TreasureAssetId { get; set; } +} diff --git a/src/Models/Entities/EntityMEventQuestLabyrinthStageAccumulationRewardGroup.cs b/src/Models/Entities/EntityMEventQuestLabyrinthStageAccumulationRewardGroup.cs new file mode 100644 index 0000000..c27c972 --- /dev/null +++ b/src/Models/Entities/EntityMEventQuestLabyrinthStageAccumulationRewardGroup.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMEventQuestLabyrinthStageAccumulationRewardGroup))] +public class EntityMEventQuestLabyrinthStageAccumulationRewardGroup +{ + [Key(0)] public int EventQuestLabyrinthStageAccumulationRewardGroupId { get; set; } + + [Key(1)] public int QuestMissionClearCount { get; set; } + + [Key(2)] public int EventQuestLabyrinthRewardGroupId { get; set; } +} diff --git a/src/Models/Entities/EntityMEventQuestLimitContent.cs b/src/Models/Entities/EntityMEventQuestLimitContent.cs new file mode 100644 index 0000000..7f1052e --- /dev/null +++ b/src/Models/Entities/EntityMEventQuestLimitContent.cs @@ -0,0 +1,26 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMEventQuestLimitContent))] +public class EntityMEventQuestLimitContent +{ + [Key(0)] public int EventQuestLimitContentId { get; set; } + + [Key(1)] public int CostumeId { get; set; } + + [Key(2)] public int UnlockEvaluateConditionId { get; set; } + + [Key(3)] public int SortOrder { get; set; } + + [Key(4)] public int DeckGroupNumber { get; set; } + + [Key(5)] public long StartDatetime { get; set; } + + [Key(6)] public long EndDatetime { get; set; } + + [Key(7)] public int EventQuestLimitContentDeckRestrictionId { get; set; } +} diff --git a/src/Models/Entities/EntityMEventQuestLimitContentDeckRestriction.cs b/src/Models/Entities/EntityMEventQuestLimitContentDeckRestriction.cs new file mode 100644 index 0000000..6a43524 --- /dev/null +++ b/src/Models/Entities/EntityMEventQuestLimitContentDeckRestriction.cs @@ -0,0 +1,20 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMEventQuestLimitContentDeckRestriction))] +public class EntityMEventQuestLimitContentDeckRestriction +{ + [Key(0)] public int EventQuestLimitContentDeckRestrictionId { get; set; } + + [Key(1)] public int GroupIndex { get; set; } + + [Key(2)] public int EventQuestLimitContentDeckRestrictionTargetId { get; set; } + + [Key(3)] public long StartDatetime { get; set; } + + [Key(4)] public long EndDatetime { get; set; } +} diff --git a/src/Models/Entities/EntityMEventQuestLimitContentDeckRestrictionTarget.cs b/src/Models/Entities/EntityMEventQuestLimitContentDeckRestrictionTarget.cs new file mode 100644 index 0000000..44b665f --- /dev/null +++ b/src/Models/Entities/EntityMEventQuestLimitContentDeckRestrictionTarget.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMEventQuestLimitContentDeckRestrictionTarget))] +public class EntityMEventQuestLimitContentDeckRestrictionTarget +{ + [Key(0)] public int EventQuestLimitContentDeckRestrictionTargetId { get; set; } + + [Key(1)] public LimitContentDeckRestrictionType LimitContentDeckRestrictionType { get; set; } +} diff --git a/src/Models/Entities/EntityMEventQuestLink.cs b/src/Models/Entities/EntityMEventQuestLink.cs new file mode 100644 index 0000000..61cbbd6 --- /dev/null +++ b/src/Models/Entities/EntityMEventQuestLink.cs @@ -0,0 +1,20 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMEventQuestLink))] +public class EntityMEventQuestLink +{ + [Key(0)] public int EventQuestLinkId { get; set; } + + [Key(1)] public DomainType DestinationDomainType { get; set; } + + [Key(2)] public int DestinationDomainId { get; set; } + + [Key(3)] public PossessionType PossessionType { get; set; } + + [Key(4)] public int PossessionId { get; set; } +} diff --git a/src/Models/Entities/EntityMEventQuestSequence.cs b/src/Models/Entities/EntityMEventQuestSequence.cs new file mode 100644 index 0000000..5c57f78 --- /dev/null +++ b/src/Models/Entities/EntityMEventQuestSequence.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMEventQuestSequence))] +public class EntityMEventQuestSequence +{ + [Key(0)] public int EventQuestSequenceId { get; set; } + + [Key(1)] public int SortOrder { get; set; } + + [Key(2)] public int QuestId { get; set; } +} diff --git a/src/Models/Entities/EntityMEventQuestSequenceGroup.cs b/src/Models/Entities/EntityMEventQuestSequenceGroup.cs new file mode 100644 index 0000000..4f28e0e --- /dev/null +++ b/src/Models/Entities/EntityMEventQuestSequenceGroup.cs @@ -0,0 +1,17 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMEventQuestSequenceGroup))] +public class EntityMEventQuestSequenceGroup +{ + // Properties + [Key(0)] public int EventQuestSequenceGroupId { get; set; } + + [Key(1)] public DifficultyType DifficultyType { get; set; } + + [Key(2)] public int EventQuestSequenceId { get; set; } +} diff --git a/src/Models/Entities/EntityMEventQuestTowerAccumulationReward.cs b/src/Models/Entities/EntityMEventQuestTowerAccumulationReward.cs new file mode 100644 index 0000000..d5aee6d --- /dev/null +++ b/src/Models/Entities/EntityMEventQuestTowerAccumulationReward.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMEventQuestTowerAccumulationReward))] +public class EntityMEventQuestTowerAccumulationReward +{ + [Key(0)] public int EventQuestChapterId { get; set; } + + [Key(1)] public int EventQuestTowerAccumulationRewardGroupId { get; set; } +} diff --git a/src/Models/Entities/EntityMEventQuestTowerAccumulationRewardGroup.cs b/src/Models/Entities/EntityMEventQuestTowerAccumulationRewardGroup.cs new file mode 100644 index 0000000..4e79294 --- /dev/null +++ b/src/Models/Entities/EntityMEventQuestTowerAccumulationRewardGroup.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMEventQuestTowerAccumulationRewardGroup))] +public class EntityMEventQuestTowerAccumulationRewardGroup +{ + [Key(0)] public int EventQuestTowerAccumulationRewardGroupId { get; set; } + + [Key(1)] public int QuestMissionClearCount { get; set; } + + [Key(2)] public int EventQuestTowerRewardGroupId { get; set; } +} diff --git a/src/Models/Entities/EntityMEventQuestTowerAsset.cs b/src/Models/Entities/EntityMEventQuestTowerAsset.cs new file mode 100644 index 0000000..a56da41 --- /dev/null +++ b/src/Models/Entities/EntityMEventQuestTowerAsset.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMEventQuestTowerAsset))] +public class EntityMEventQuestTowerAsset +{ + [Key(0)] public int EventQuestChapterId { get; set; } + + [Key(1)] public int AssetId { get; set; } +} diff --git a/src/Models/Entities/EntityMEventQuestTowerRewardGroup.cs b/src/Models/Entities/EntityMEventQuestTowerRewardGroup.cs new file mode 100644 index 0000000..f0c9255 --- /dev/null +++ b/src/Models/Entities/EntityMEventQuestTowerRewardGroup.cs @@ -0,0 +1,20 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMEventQuestTowerRewardGroup))] +public class EntityMEventQuestTowerRewardGroup +{ + [Key(0)] public int EventQuestTowerRewardGroupId { get; set; } + + [Key(1)] public int SortOrder { get; set; } + + [Key(2)] public PossessionType PossessionType { get; set; } + + [Key(3)] public int PossessionId { get; set; } + + [Key(4)] public int Count { get; set; } +} diff --git a/src/Models/Entities/EntityMEventQuestUnlockCondition.cs b/src/Models/Entities/EntityMEventQuestUnlockCondition.cs new file mode 100644 index 0000000..1e86c12 --- /dev/null +++ b/src/Models/Entities/EntityMEventQuestUnlockCondition.cs @@ -0,0 +1,22 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMEventQuestUnlockCondition))] +public class EntityMEventQuestUnlockCondition +{ + [Key(0)] public EventQuestType EventQuestType { get; set; } + + [Key(1)] public int CharacterId { get; set; } + + [Key(2)] public int QuestId { get; set; } + + [Key(3)] public UnlockConditionType UnlockConditionType { get; set; } + + [Key(4)] public int ConditionValue { get; set; } + + [Key(5)] public int UnlockEvaluateConditionId { get; set; } +} diff --git a/src/Models/Entities/EntityMExplore.cs b/src/Models/Entities/EntityMExplore.cs new file mode 100644 index 0000000..836251a --- /dev/null +++ b/src/Models/Entities/EntityMExplore.cs @@ -0,0 +1,20 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMExplore))] +public class EntityMExplore +{ + [Key(0)] public int ExploreId { get; set; } + + [Key(1)] public int ExploreUnlockConditionId { get; set; } + + [Key(2)] public long StartDatetime { get; set; } + + [Key(3)] public int ConsumeItemCount { get; set; } + + [Key(4)] public int RewardLotteryCount { get; set; } +} diff --git a/src/Models/Entities/EntityMExploreGradeAsset.cs b/src/Models/Entities/EntityMExploreGradeAsset.cs new file mode 100644 index 0000000..a77e1ac --- /dev/null +++ b/src/Models/Entities/EntityMExploreGradeAsset.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMExploreGradeAsset))] +public class EntityMExploreGradeAsset +{ + [Key(0)] public int ExploreGradeId { get; set; } + + [Key(1)] public int AssetGradeIconId { get; set; } +} diff --git a/src/Models/Entities/EntityMExploreGradeScore.cs b/src/Models/Entities/EntityMExploreGradeScore.cs new file mode 100644 index 0000000..98fa7c4 --- /dev/null +++ b/src/Models/Entities/EntityMExploreGradeScore.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMExploreGradeScore))] +public class EntityMExploreGradeScore +{ + [Key(0)] public int ExploreId { get; set; } + + [Key(1)] public int NecessaryScore { get; set; } + + [Key(2)] public int ExploreGradeId { get; set; } +} diff --git a/src/Models/Entities/EntityMExploreGroup.cs b/src/Models/Entities/EntityMExploreGroup.cs new file mode 100644 index 0000000..12cb14d --- /dev/null +++ b/src/Models/Entities/EntityMExploreGroup.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMExploreGroup))] +public class EntityMExploreGroup +{ + [Key(0)] public int ExploreGroupId { get; set; } + + [Key(1)] public DifficultyType DifficultyType { get; set; } + + [Key(2)] public int ExploreId { get; set; } +} diff --git a/src/Models/Entities/EntityMExploreUnlockCondition.cs b/src/Models/Entities/EntityMExploreUnlockCondition.cs new file mode 100644 index 0000000..27f82cd --- /dev/null +++ b/src/Models/Entities/EntityMExploreUnlockCondition.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMExploreUnlockCondition))] +public class EntityMExploreUnlockCondition +{ + [Key(0)] public int ExploreUnlockConditionId { get; set; } + + [Key(1)] public ExploreUnlockConditionType ExploreUnlockConditionType { get; set; } + + [Key(2)] public int ConditionValue { get; set; } +} diff --git a/src/Models/Entities/EntityMExtraQuestGroup.cs b/src/Models/Entities/EntityMExtraQuestGroup.cs new file mode 100644 index 0000000..bb84764 --- /dev/null +++ b/src/Models/Entities/EntityMExtraQuestGroup.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMExtraQuestGroup))] +public class EntityMExtraQuestGroup +{ + [Key(0)] public int QuestId { get; set; } + + [Key(1)] public int ExtraQuestIndex { get; set; } + + [Key(2)] public int ExtraQuestId { get; set; } +} diff --git a/src/Models/Entities/EntityMExtraQuestGroupInMainQuestChapter.cs b/src/Models/Entities/EntityMExtraQuestGroupInMainQuestChapter.cs new file mode 100644 index 0000000..caa074c --- /dev/null +++ b/src/Models/Entities/EntityMExtraQuestGroupInMainQuestChapter.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMExtraQuestGroupInMainQuestChapter))] +public class EntityMExtraQuestGroupInMainQuestChapter +{ + [Key(0)] public int MainQuestChapterId { get; set; } + + [Key(1)] public int ExtraQuestIndex { get; set; } + + [Key(2)] public int ExtraQuestId { get; set; } +} diff --git a/src/Models/Entities/EntityMFieldEffectBlessRelation.cs b/src/Models/Entities/EntityMFieldEffectBlessRelation.cs new file mode 100644 index 0000000..821742e --- /dev/null +++ b/src/Models/Entities/EntityMFieldEffectBlessRelation.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMFieldEffectBlessRelation))] +public class EntityMFieldEffectBlessRelation +{ + [Key(0)] public int FieldEffectGroupId { get; set; } + + [Key(1)] public int FieldEffectBlessRelationIndex { get; set; } + + [Key(2)] public int WeaponId { get; set; } +} diff --git a/src/Models/Entities/EntityMFieldEffectDecreasePoint.cs b/src/Models/Entities/EntityMFieldEffectDecreasePoint.cs new file mode 100644 index 0000000..66d2746 --- /dev/null +++ b/src/Models/Entities/EntityMFieldEffectDecreasePoint.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMFieldEffectDecreasePoint))] +public class EntityMFieldEffectDecreasePoint +{ + [Key(0)] public int WeaponId { get; set; } + + [Key(1)] public int FieldEffectAbilityId { get; set; } + + [Key(2)] public int DecreasePoint { get; set; } +} diff --git a/src/Models/Entities/EntityMFieldEffectGroup.cs b/src/Models/Entities/EntityMFieldEffectGroup.cs new file mode 100644 index 0000000..2438e20 --- /dev/null +++ b/src/Models/Entities/EntityMFieldEffectGroup.cs @@ -0,0 +1,22 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMFieldEffectGroup))] +public class EntityMFieldEffectGroup +{ + [Key(0)] public int FieldEffectGroupId { get; set; } + + [Key(1)] public int FieldEffectGroupIndex { get; set; } + + [Key(2)] public int AbilityId { get; set; } + + [Key(3)] public int DefaultAbilityLevel { get; set; } + + [Key(4)] public FieldEffectApplyScopeType FieldEffectApplyScopeType { get; set; } + + [Key(5)] public int FieldEffectAssetId { get; set; } +} diff --git a/src/Models/Entities/EntityMGachaMedal.cs b/src/Models/Entities/EntityMGachaMedal.cs new file mode 100644 index 0000000..9991c93 --- /dev/null +++ b/src/Models/Entities/EntityMGachaMedal.cs @@ -0,0 +1,22 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMGachaMedal))] +public class EntityMGachaMedal +{ + [Key(0)] public int GachaMedalId { get; set; } + + [Key(1)] public int CeilingCount { get; set; } + + [Key(2)] public int ConsumableItemId { get; set; } + + [Key(3)] public int ShopTransitionGachaId { get; set; } + + [Key(4)] public long AutoConvertDatetime { get; set; } + + [Key(5)] public int ConversionRate { get; set; } +} diff --git a/src/Models/Entities/EntityMGiftText.cs b/src/Models/Entities/EntityMGiftText.cs new file mode 100644 index 0000000..ad0cfb5 --- /dev/null +++ b/src/Models/Entities/EntityMGiftText.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMGiftText))] +public class EntityMGiftText +{ + [Key(0)] public int GiftTextId { get; set; } + + [Key(1)] public LanguageType LanguageType { get; set; } + + [Key(2)] public string Text { get; set; } +} diff --git a/src/Models/Entities/EntityMGimmick.cs b/src/Models/Entities/EntityMGimmick.cs new file mode 100644 index 0000000..c22883c --- /dev/null +++ b/src/Models/Entities/EntityMGimmick.cs @@ -0,0 +1,20 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMGimmick))] +public class EntityMGimmick +{ + [Key(0)] public int GimmickId { get; set; } + + [Key(1)] public GimmickType GimmickType { get; set; } + + [Key(2)] public int GimmickOrnamentGroupId { get; set; } + + [Key(3)] public int ClearEvaluateConditionId { get; set; } + + [Key(4)] public int ReleaseEvaluateConditionId { get; set; } +} diff --git a/src/Models/Entities/EntityMGimmickAdditionalAsset.cs b/src/Models/Entities/EntityMGimmickAdditionalAsset.cs new file mode 100644 index 0000000..a2f53da --- /dev/null +++ b/src/Models/Entities/EntityMGimmickAdditionalAsset.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMGimmickAdditionalAsset))] +public class EntityMGimmickAdditionalAsset +{ + [Key(0)] public int GimmickId { get; set; } + + [Key(1)] public string GimmickTexturePath { get; set; } +} diff --git a/src/Models/Entities/EntityMGimmickExtraQuest.cs b/src/Models/Entities/EntityMGimmickExtraQuest.cs new file mode 100644 index 0000000..bdd11ff --- /dev/null +++ b/src/Models/Entities/EntityMGimmickExtraQuest.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMGimmickExtraQuest))] +public class EntityMGimmickExtraQuest +{ + [Key(0)] public int GimmickId { get; set; } + + [Key(1)] public int GimmickOrnamentIndex { get; set; } + + [Key(2)] public int ExtraQuestId { get; set; } +} diff --git a/src/Models/Entities/EntityMGimmickGroup.cs b/src/Models/Entities/EntityMGimmickGroup.cs new file mode 100644 index 0000000..9a06993 --- /dev/null +++ b/src/Models/Entities/EntityMGimmickGroup.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMGimmickGroup))] +public class EntityMGimmickGroup +{ + [Key(0)] public int GimmickGroupId { get; set; } + + [Key(1)] public int GroupIndex { get; set; } + + [Key(2)] public int GimmickId { get; set; } +} diff --git a/src/Models/Entities/EntityMGimmickGroupEventLog.cs b/src/Models/Entities/EntityMGimmickGroupEventLog.cs new file mode 100644 index 0000000..344f85e --- /dev/null +++ b/src/Models/Entities/EntityMGimmickGroupEventLog.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMGimmickGroupEventLog))] +public class EntityMGimmickGroupEventLog +{ + [Key(0)] public int GimmickGroupId { get; set; } + + [Key(1)] public int EventLogTextId { get; set; } + + [Key(2)] public int SortOrder { get; set; } +} diff --git a/src/Models/Entities/EntityMGimmickInterval.cs b/src/Models/Entities/EntityMGimmickInterval.cs new file mode 100644 index 0000000..7c3657e --- /dev/null +++ b/src/Models/Entities/EntityMGimmickInterval.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMGimmickInterval))] +public class EntityMGimmickInterval +{ + [Key(0)] public int GimmickId { get; set; } + + [Key(1)] public int InitialValue { get; set; } + + [Key(2)] public int MaxValue { get; set; } + + [Key(3)] public int IntervalValue { get; set; } +} diff --git a/src/Models/Entities/EntityMGimmickOrnament.cs b/src/Models/Entities/EntityMGimmickOrnament.cs new file mode 100644 index 0000000..b7a6b85 --- /dev/null +++ b/src/Models/Entities/EntityMGimmickOrnament.cs @@ -0,0 +1,40 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMGimmickOrnament))] +public class EntityMGimmickOrnament +{ + [Key(0)] public int GimmickOrnamentGroupId { get; set; } + + [Key(1)] public int GimmickOrnamentIndex { get; set; } + + [Key(2)] public int GimmickOrnamentViewId { get; set; } + + [Key(3)] public int Count { get; set; } + + [Key(4)] public int ChapterId { get; set; } + + [Key(5)] public float PositionX { get; set; } + + [Key(6)] public float PositionY { get; set; } + + [Key(7)] public float PositionZ { get; set; } + + [Key(8)] public float Rotation { get; set; } + + [Key(9)] public float Scale { get; set; } + + [Key(10)] public int SortOrder { get; set; } + + [Key(11)] public int AssetBackgroundId { get; set; } + + [Key(12)] public int IconDifficultyValue { get; set; } + + [Key(13)] public float RotationX { get; set; } + + [Key(14)] public float RotationZ { get; set; } +} diff --git a/src/Models/Entities/EntityMGimmickSequence.cs b/src/Models/Entities/EntityMGimmickSequence.cs new file mode 100644 index 0000000..9dcccbd --- /dev/null +++ b/src/Models/Entities/EntityMGimmickSequence.cs @@ -0,0 +1,26 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMGimmickSequence))] +public class EntityMGimmickSequence +{ + [Key(0)] public int GimmickSequenceId { get; set; } + + [Key(1)] public int GimmickSequenceClearConditionType { get; set; } + + [Key(2)] public int NextGimmickSequenceGroupId { get; set; } + + [Key(3)] public int GimmickGroupId { get; set; } + + [Key(4)] public int GimmickSequenceRewardGroupId { get; set; } + + [Key(5)] public FlowType FlowType { get; set; } + + [Key(6)] public int ProgressRequireHour { get; set; } + + [Key(7)] public long ProgressStartDatetime { get; set; } +} diff --git a/src/Models/Entities/EntityMGimmickSequenceGroup.cs b/src/Models/Entities/EntityMGimmickSequenceGroup.cs new file mode 100644 index 0000000..630db0c --- /dev/null +++ b/src/Models/Entities/EntityMGimmickSequenceGroup.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMGimmickSequenceGroup))] +public class EntityMGimmickSequenceGroup +{ + [Key(0)] public int GimmickSequenceGroupId { get; set; } + + [Key(1)] public int GroupIndex { get; set; } + + [Key(2)] public int GimmickSequenceId { get; set; } +} diff --git a/src/Models/Entities/EntityMGimmickSequenceRewardGroup.cs b/src/Models/Entities/EntityMGimmickSequenceRewardGroup.cs new file mode 100644 index 0000000..98303f4 --- /dev/null +++ b/src/Models/Entities/EntityMGimmickSequenceRewardGroup.cs @@ -0,0 +1,20 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMGimmickSequenceRewardGroup))] +public class EntityMGimmickSequenceRewardGroup +{ + [Key(0)] public int GimmickSequenceRewardGroupId { get; set; } + + [Key(1)] public int GroupIndex { get; set; } + + [Key(2)] public PossessionType PossessionType { get; set; } + + [Key(3)] public int PossessionId { get; set; } + + [Key(4)] public int Count { get; set; } +} diff --git a/src/Models/Entities/EntityMGimmickSequenceSchedule.cs b/src/Models/Entities/EntityMGimmickSequenceSchedule.cs new file mode 100644 index 0000000..ac14be8 --- /dev/null +++ b/src/Models/Entities/EntityMGimmickSequenceSchedule.cs @@ -0,0 +1,20 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMGimmickSequenceSchedule))] +public class EntityMGimmickSequenceSchedule +{ + [Key(0)] public int GimmickSequenceScheduleId { get; set; } + + [Key(1)] public long StartDatetime { get; set; } + + [Key(2)] public long EndDatetime { get; set; } + + [Key(3)] public int FirstGimmickSequenceId { get; set; } + + [Key(4)] public int ReleaseEvaluateConditionId { get; set; } +} diff --git a/src/Models/Entities/EntityMHeadupDisplayView.cs b/src/Models/Entities/EntityMHeadupDisplayView.cs new file mode 100644 index 0000000..a1f0fa0 --- /dev/null +++ b/src/Models/Entities/EntityMHeadupDisplayView.cs @@ -0,0 +1,22 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMHeadupDisplayView))] +public class EntityMHeadupDisplayView +{ + [Key(0)] public int HeadupDisplayViewId { get; set; } + + [Key(1)] public ViewSkillButtonType ViewSkillButtonType { get; set; } + + [Key(2)] public HpBarDisplayType HpBarDisplayType { get; set; } + + [Key(3)] public ViewNameTextType ViewNameTextType { get; set; } + + [Key(4)] public ViewBuffAbnormalType ViewBuffAbnormalType { get; set; } + + [Key(5)] public ViewLevelTextType ViewLevelTextType { get; set; } +} diff --git a/src/Models/Entities/EntityMHelp.cs b/src/Models/Entities/EntityMHelp.cs new file mode 100644 index 0000000..cd4857d --- /dev/null +++ b/src/Models/Entities/EntityMHelp.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMHelp))] +public class EntityMHelp +{ + [Key(0)] public HelpType HelpType { get; set; } + + [Key(1)] public int HelpItemId { get; set; } + + [Key(2)] public int HelpPageGroupId { get; set; } +} diff --git a/src/Models/Entities/EntityMHelpCategory.cs b/src/Models/Entities/EntityMHelpCategory.cs new file mode 100644 index 0000000..f83af85 --- /dev/null +++ b/src/Models/Entities/EntityMHelpCategory.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMHelpCategory))] +public class EntityMHelpCategory +{ + [Key(0)] public int HelpCategoryId { get; set; } + + [Key(1)] public int SortOrder { get; set; } + + [Key(2)] public int TitleTextAssetId { get; set; } + + [Key(3)] public bool IsHiddenOnList { get; set; } +} diff --git a/src/Models/Entities/EntityMHelpItem.cs b/src/Models/Entities/EntityMHelpItem.cs new file mode 100644 index 0000000..430cd47 --- /dev/null +++ b/src/Models/Entities/EntityMHelpItem.cs @@ -0,0 +1,24 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMHelpItem))] +public class EntityMHelpItem +{ + [Key(0)] public int HelpItemId { get; set; } + + [Key(1)] public int HelpCategoryId { get; set; } + + [Key(2)] public int SortOrder { get; set; } + + [Key(3)] public int TotalPageCount { get; set; } + + [Key(4)] public int TitleTextAssetId { get; set; } + + [Key(5)] public string AssetName { get; set; } + + [Key(6)] public bool IsHiddenOnList { get; set; } +} diff --git a/src/Models/Entities/EntityMHelpPageGroup.cs b/src/Models/Entities/EntityMHelpPageGroup.cs new file mode 100644 index 0000000..ec3981d --- /dev/null +++ b/src/Models/Entities/EntityMHelpPageGroup.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMHelpPageGroup))] +public class EntityMHelpPageGroup +{ + [Key(0)] public int HelpPageGroupId { get; set; } + + [Key(1)] public int SortOrder { get; set; } + + [Key(2)] public int HelpPageId { get; set; } +} diff --git a/src/Models/Entities/EntityMImportantItem.cs b/src/Models/Entities/EntityMImportantItem.cs new file mode 100644 index 0000000..bad4bba --- /dev/null +++ b/src/Models/Entities/EntityMImportantItem.cs @@ -0,0 +1,32 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMImportantItem))] +public class EntityMImportantItem +{ + [Key(0)] public int ImportantItemId { get; set; } + + [Key(1)] public int NameImportantItemTextId { get; set; } + + [Key(2)] public int DescriptionImportantItemTextId { get; set; } + + [Key(3)] public int SortOrder { get; set; } + + [Key(4)] public int AssetCategoryId { get; set; } + + [Key(5)] public int AssetVariationId { get; set; } + + [Key(6)] public int ImportantItemEffectId { get; set; } + + [Key(7)] public int ReportId { get; set; } + + [Key(8)] public int CageMemoryId { get; set; } + + [Key(9)] public int ImportantItemType { get; set; } + + [Key(10)] public int ExternalReferenceId { get; set; } +} diff --git a/src/Models/Entities/EntityMImportantItemEffect.cs b/src/Models/Entities/EntityMImportantItemEffect.cs new file mode 100644 index 0000000..c60ff99 --- /dev/null +++ b/src/Models/Entities/EntityMImportantItemEffect.cs @@ -0,0 +1,24 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMImportantItemEffect))] +public class EntityMImportantItemEffect +{ + [Key(0)] public int ImportantItemEffectId { get; set; } + + [Key(1)] public int ImportantItemEffectGroupingId { get; set; } + + [Key(2)] public int Priority { get; set; } + + [Key(3)] public int ImportantItemEffectType { get; set; } + + [Key(4)] public int ImportantItemEffectTargetId { get; set; } + + [Key(5)] public long StartDatetime { get; set; } + + [Key(6)] public long EndDatetime { get; set; } +} diff --git a/src/Models/Entities/EntityMImportantItemEffectDropCount.cs b/src/Models/Entities/EntityMImportantItemEffectDropCount.cs new file mode 100644 index 0000000..82064e6 --- /dev/null +++ b/src/Models/Entities/EntityMImportantItemEffectDropCount.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMImportantItemEffectDropCount))] +public class EntityMImportantItemEffectDropCount +{ + [Key(0)] public int ImportantItemEffectDropCountId { get; set; } + + [Key(1)] public int CountPermil { get; set; } + + [Key(2)] public int ImportantItemEffectTargetQuestGroupId { get; set; } + + [Key(3)] public int ImportantItemEffectTargetItemGroupId { get; set; } +} diff --git a/src/Models/Entities/EntityMImportantItemEffectDropRate.cs b/src/Models/Entities/EntityMImportantItemEffectDropRate.cs new file mode 100644 index 0000000..9e4a936 --- /dev/null +++ b/src/Models/Entities/EntityMImportantItemEffectDropRate.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMImportantItemEffectDropRate))] +public class EntityMImportantItemEffectDropRate +{ + [Key(0)] public int ImportantItemEffectDropRateId { get; set; } + + [Key(1)] public int RatePermil { get; set; } + + [Key(2)] public int ImportantItemEffectTargetQuestGroupId { get; set; } + + [Key(3)] public int ImportantItemEffectTargetItemGroupId { get; set; } +} diff --git a/src/Models/Entities/EntityMImportantItemEffectTargetItemGroup.cs b/src/Models/Entities/EntityMImportantItemEffectTargetItemGroup.cs new file mode 100644 index 0000000..c83411e --- /dev/null +++ b/src/Models/Entities/EntityMImportantItemEffectTargetItemGroup.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMImportantItemEffectTargetItemGroup))] +public class EntityMImportantItemEffectTargetItemGroup +{ + [Key(0)] public int ImportantItemEffectTargetItemGroupId { get; set; } + + [Key(1)] public int TargetIndex { get; set; } + + [Key(2)] public PossessionType PossessionType { get; set; } + + [Key(3)] public int PossessionId { get; set; } +} diff --git a/src/Models/Entities/EntityMImportantItemEffectTargetQuestGroup.cs b/src/Models/Entities/EntityMImportantItemEffectTargetQuestGroup.cs new file mode 100644 index 0000000..58fb799 --- /dev/null +++ b/src/Models/Entities/EntityMImportantItemEffectTargetQuestGroup.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMImportantItemEffectTargetQuestGroup))] +public class EntityMImportantItemEffectTargetQuestGroup +{ + [Key(0)] public int ImportantItemEffectTargetQuestGroupId { get; set; } + + [Key(1)] public int TargetIndex { get; set; } + + [Key(2)] public ImportantItemEffectTargetQuestGroupType ImportantItemEffectTargetQuestGroupType { get; set; } + + [Key(3)] public int TargetValue { get; set; } +} diff --git a/src/Models/Entities/EntityMImportantItemEffectUnlockFunction.cs b/src/Models/Entities/EntityMImportantItemEffectUnlockFunction.cs new file mode 100644 index 0000000..ea616d8 --- /dev/null +++ b/src/Models/Entities/EntityMImportantItemEffectUnlockFunction.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMImportantItemEffectUnlockFunction))] +public class EntityMImportantItemEffectUnlockFunction +{ + [Key(0)] public int ImportantItemEffectUnlockFunctionId { get; set; } + + [Key(1)] public int ImportantItemEffectUnlockFunctionType { get; set; } + + [Key(2)] public int UnlockFunctionEffectValue { get; set; } +} diff --git a/src/Models/Entities/EntityMLibraryEventQuestStoryGrouping.cs b/src/Models/Entities/EntityMLibraryEventQuestStoryGrouping.cs new file mode 100644 index 0000000..76df290 --- /dev/null +++ b/src/Models/Entities/EntityMLibraryEventQuestStoryGrouping.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMLibraryEventQuestStoryGrouping))] +public class EntityMLibraryEventQuestStoryGrouping +{ + [Key(0)] public int LibraryStoryGroupingId { get; set; } + + [Key(1)] public int EventQuestChapterId { get; set; } + + [Key(2)] public int SortOrder { get; set; } +} diff --git a/src/Models/Entities/EntityMLibraryMainQuestGroup.cs b/src/Models/Entities/EntityMLibraryMainQuestGroup.cs new file mode 100644 index 0000000..bb970e0 --- /dev/null +++ b/src/Models/Entities/EntityMLibraryMainQuestGroup.cs @@ -0,0 +1,22 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMLibraryMainQuestGroup))] +public class EntityMLibraryMainQuestGroup +{ + [Key(0)] public int LibraryMainQuestGroupId { get; set; } + + [Key(1)] public int MainQuestChapterId { get; set; } + + [Key(2)] public int SortOrder { get; set; } + + [Key(3)] public int ChapterTextAssetId { get; set; } + + [Key(4)] public int FirstStillAssetOrder { get; set; } + + [Key(5)] public int SecondStillAssetOrder { get; set; } +} diff --git a/src/Models/Entities/EntityMLibraryMainQuestStory.cs b/src/Models/Entities/EntityMLibraryMainQuestStory.cs new file mode 100644 index 0000000..7054c41 --- /dev/null +++ b/src/Models/Entities/EntityMLibraryMainQuestStory.cs @@ -0,0 +1,20 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMLibraryMainQuestStory))] +public class EntityMLibraryMainQuestStory +{ + [Key(0)] public int LibraryMainQuestGroupId { get; set; } + + [Key(1)] public int SortOrder { get; set; } + + [Key(2)] public int RecollectionSceneId { get; set; } + + [Key(3)] public int LibraryMainQuestStoryUnlockEvaluateConditionId { get; set; } + + [Key(4)] public int TextAssetId { get; set; } +} diff --git a/src/Models/Entities/EntityMLibraryMovie.cs b/src/Models/Entities/EntityMLibraryMovie.cs new file mode 100644 index 0000000..65a1cdf --- /dev/null +++ b/src/Models/Entities/EntityMLibraryMovie.cs @@ -0,0 +1,24 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMLibraryMovie))] +public class EntityMLibraryMovie +{ + [Key(0)] public int LibraryMovieId { get; set; } + + [Key(1)] public int TitleLibraryTextId { get; set; } + + [Key(2)] public int LibraryMovieCategoryId { get; set; } + + [Key(3)] public int SortOrder { get; set; } + + [Key(4)] public int LibraryMovieUnlockConditionId { get; set; } + + [Key(5)] public int LibraryMovieUnlockEvaluateConditionId { get; set; } + + [Key(6)] public int MovieId { get; set; } +} diff --git a/src/Models/Entities/EntityMLibraryMovieCategory.cs b/src/Models/Entities/EntityMLibraryMovieCategory.cs new file mode 100644 index 0000000..7a41b1b --- /dev/null +++ b/src/Models/Entities/EntityMLibraryMovieCategory.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMLibraryMovieCategory))] +public class EntityMLibraryMovieCategory +{ + [Key(0)] public int LibraryMovieCategoryId { get; set; } + + [Key(1)] public int NameLibraryTextId { get; set; } + + [Key(2)] public int SortOrder { get; set; } +} diff --git a/src/Models/Entities/EntityMLibraryMovieUnlockCondition.cs b/src/Models/Entities/EntityMLibraryMovieUnlockCondition.cs new file mode 100644 index 0000000..4f911f1 --- /dev/null +++ b/src/Models/Entities/EntityMLibraryMovieUnlockCondition.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMLibraryMovieUnlockCondition))] +public class EntityMLibraryMovieUnlockCondition +{ + [Key(0)] public int LibraryMovieUnlockConditionId { get; set; } + + [Key(1)] public UnlockConditionType UnlockConditionType { get; set; } + + [Key(2)] public int ConditionValue { get; set; } +} diff --git a/src/Models/Entities/EntityMLibraryRecordGrouping.cs b/src/Models/Entities/EntityMLibraryRecordGrouping.cs new file mode 100644 index 0000000..0867c0e --- /dev/null +++ b/src/Models/Entities/EntityMLibraryRecordGrouping.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMLibraryRecordGrouping))] +public class EntityMLibraryRecordGrouping +{ + [Key(0)] public LibraryRecordType LibraryRecordType { get; set; } + + [Key(1)] public int SortOrder { get; set; } + + [Key(2)] public int LibraryRecordAssetId { get; set; } +} diff --git a/src/Models/Entities/EntityMLibraryStoryGroup.cs b/src/Models/Entities/EntityMLibraryStoryGroup.cs new file mode 100644 index 0000000..2ebbe11 --- /dev/null +++ b/src/Models/Entities/EntityMLibraryStoryGroup.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMLibraryStoryGroup))] +public class EntityMLibraryStoryGroup +{ + [Key(0)] public int QuestId { get; set; } + + [Key(1)] public int SortOrder { get; set; } + + [Key(2)] public int StartQuestSceneId { get; set; } + + [Key(3)] public int EndQuestSceneId { get; set; } +} diff --git a/src/Models/Entities/EntityMLimitedOpenText.cs b/src/Models/Entities/EntityMLimitedOpenText.cs new file mode 100644 index 0000000..9c005b7 --- /dev/null +++ b/src/Models/Entities/EntityMLimitedOpenText.cs @@ -0,0 +1,20 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMLimitedOpenText))] +public class EntityMLimitedOpenText +{ + [Key(0)] public LimitedOpenTargetType LimitedOpenTargetType { get; set; } + + [Key(1)] public int TargetId { get; set; } + + [Key(2)] public int OpenAchievementTextAssetId { get; set; } + + [Key(3)] public int LocalPushTextAssetId { get; set; } + + [Key(4)] public int OpenAchievementTextGroupId { get; set; } +} diff --git a/src/Models/Entities/EntityMLimitedOpenTextGroup.cs b/src/Models/Entities/EntityMLimitedOpenTextGroup.cs new file mode 100644 index 0000000..0693fb3 --- /dev/null +++ b/src/Models/Entities/EntityMLimitedOpenTextGroup.cs @@ -0,0 +1,20 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMLimitedOpenTextGroup))] +public class EntityMLimitedOpenTextGroup +{ + [Key(0)] public int LimitedOpenTextGroupId { get; set; } + + [Key(1)] public int SortOrder { get; set; } + + [Key(2)] public LimitedOpenTextDisplayConditionType LimitedOpenTextDisplayConditionType { get; set; } + + [Key(3)] public int LimitedOpenTextDisplayConditionValue { get; set; } + + [Key(4)] public int TextAssetId { get; set; } +} diff --git a/src/Models/Entities/EntityMListSettingAbilityGroup.cs b/src/Models/Entities/EntityMListSettingAbilityGroup.cs new file mode 100644 index 0000000..dc2a274 --- /dev/null +++ b/src/Models/Entities/EntityMListSettingAbilityGroup.cs @@ -0,0 +1,22 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMListSettingAbilityGroup))] +public class EntityMListSettingAbilityGroup +{ + [Key(0)] public int ListSettingAbilityGroupId { get; set; } + + [Key(1)] public int SortOrder { get; set; } + + [Key(2)] public int ListSettingAbilityGroupTargetId { get; set; } + + [Key(3)] public int AssetId { get; set; } + + [Key(4)] public ListSettingAbilityGroupType ListSettingAbilityGroupType { get; set; } + + [Key(5)] public long ListSettingDisplayStartDatetime { get; set; } +} diff --git a/src/Models/Entities/EntityMListSettingAbilityGroupTarget.cs b/src/Models/Entities/EntityMListSettingAbilityGroupTarget.cs new file mode 100644 index 0000000..359ef40 --- /dev/null +++ b/src/Models/Entities/EntityMListSettingAbilityGroupTarget.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMListSettingAbilityGroupTarget))] +public class EntityMListSettingAbilityGroupTarget +{ + [Key(0)] public int ListSettingAbilityGroupTargetId { get; set; } + + [Key(1)] public int SortOrder { get; set; } + + [Key(2)] public int AbilityId { get; set; } +} diff --git a/src/Models/Entities/EntityMLoginBonus.cs b/src/Models/Entities/EntityMLoginBonus.cs new file mode 100644 index 0000000..9d6f830 --- /dev/null +++ b/src/Models/Entities/EntityMLoginBonus.cs @@ -0,0 +1,26 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMLoginBonus))] +public class EntityMLoginBonus +{ + [Key(0)] public int LoginBonusId { get; set; } + + [Key(1)] public int SortOrder { get; set; } + + [Key(2)] public int LoginBonusStartConditionId { get; set; } + + [Key(3)] public int TotalPageCount { get; set; } + + [Key(4)] public long StartDatetime { get; set; } + + [Key(5)] public long EndDatetime { get; set; } + + [Key(6)] public long StampReceiveEndDatetime { get; set; } + + [Key(7)] public string LoginBonusAssetName { get; set; } +} diff --git a/src/Models/Entities/EntityMLoginBonusStamp.cs b/src/Models/Entities/EntityMLoginBonusStamp.cs new file mode 100644 index 0000000..7616370 --- /dev/null +++ b/src/Models/Entities/EntityMLoginBonusStamp.cs @@ -0,0 +1,22 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMLoginBonusStamp))] +public class EntityMLoginBonusStamp +{ + [Key(0)] public int LoginBonusId { get; set; } + + [Key(1)] public int LowerPageNumber { get; set; } + + [Key(2)] public int StampNumber { get; set; } + + [Key(3)] public PossessionType RewardPossessionType { get; set; } + + [Key(4)] public int RewardPossessionId { get; set; } + + [Key(5)] public int RewardCount { get; set; } +} diff --git a/src/Models/Entities/EntityMMainQuestChapter.cs b/src/Models/Entities/EntityMMainQuestChapter.cs new file mode 100644 index 0000000..070a612 --- /dev/null +++ b/src/Models/Entities/EntityMMainQuestChapter.cs @@ -0,0 +1,26 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMMainQuestChapter))] +public class EntityMMainQuestChapter +{ + [Key(0)] public int MainQuestChapterId { get; set; } + + [Key(1)] public int MainQuestRouteId { get; set; } + + [Key(2)] public int SortOrder { get; set; } + + [Key(3)] public int MainQuestSequenceGroupId { get; set; } + + [Key(4)] public int PortalCageCharacterGroupId { get; set; } + + [Key(5)] public long StartDatetime { get; set; } + + [Key(6)] public bool IsInvisibleInLibrary { get; set; } + + [Key(7)] public int JoinLibraryChapterId { get; set; } +} diff --git a/src/Models/Entities/EntityMMainQuestPortalCageCharacter.cs b/src/Models/Entities/EntityMMainQuestPortalCageCharacter.cs new file mode 100644 index 0000000..48fe87f --- /dev/null +++ b/src/Models/Entities/EntityMMainQuestPortalCageCharacter.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMMainQuestPortalCageCharacter))] +public class EntityMMainQuestPortalCageCharacter +{ + [Key(0)] public int QuestSceneId { get; set; } + + [Key(1)] public int PortalCageCharacterGroupId { get; set; } +} diff --git a/src/Models/Entities/EntityMMainQuestRoute.cs b/src/Models/Entities/EntityMMainQuestRoute.cs new file mode 100644 index 0000000..523fdca --- /dev/null +++ b/src/Models/Entities/EntityMMainQuestRoute.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMMainQuestRoute))] +public class EntityMMainQuestRoute +{ + [Key(0)] public int MainQuestRouteId { get; set; } + + [Key(1)] public int MainQuestSeasonId { get; set; } + + [Key(2)] public int SortOrder { get; set; } + + [Key(3)] public int CharacterId { get; set; } +} diff --git a/src/Models/Entities/EntityMMainQuestRouteAnotherReplayFlowUnlockCondition.cs b/src/Models/Entities/EntityMMainQuestRouteAnotherReplayFlowUnlockCondition.cs new file mode 100644 index 0000000..8cccd9c --- /dev/null +++ b/src/Models/Entities/EntityMMainQuestRouteAnotherReplayFlowUnlockCondition.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMMainQuestRouteAnotherReplayFlowUnlockCondition))] +public class EntityMMainQuestRouteAnotherReplayFlowUnlockCondition +{ + [Key(0)] public int MainQuestRouteId { get; set; } + + [Key(1)] public int UnlockEvaluateConditionId { get; set; } + + [Key(2)] public int UnlockTargetMainQuestRouteId { get; set; } +} diff --git a/src/Models/Entities/EntityMMainQuestSeason.cs b/src/Models/Entities/EntityMMainQuestSeason.cs new file mode 100644 index 0000000..e6b61bd --- /dev/null +++ b/src/Models/Entities/EntityMMainQuestSeason.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMMainQuestSeason))] +public class EntityMMainQuestSeason +{ + [Key(0)] public int MainQuestSeasonId { get; set; } + + [Key(1)] public int SortOrder { get; set; } +} diff --git a/src/Models/Entities/EntityMMainQuestSequence.cs b/src/Models/Entities/EntityMMainQuestSequence.cs new file mode 100644 index 0000000..133267c --- /dev/null +++ b/src/Models/Entities/EntityMMainQuestSequence.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMMainQuestSequence))] +public class EntityMMainQuestSequence +{ + [Key(0)] public int MainQuestSequenceId { get; set; } + + [Key(1)] public int SortOrder { get; set; } + + [Key(2)] public int QuestId { get; set; } +} diff --git a/src/Models/Entities/EntityMMainQuestSequenceGroup.cs b/src/Models/Entities/EntityMMainQuestSequenceGroup.cs new file mode 100644 index 0000000..3456857 --- /dev/null +++ b/src/Models/Entities/EntityMMainQuestSequenceGroup.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMMainQuestSequenceGroup))] +public class EntityMMainQuestSequenceGroup +{ + [Key(0)] public int MainQuestSequenceGroupId { get; set; } + + [Key(1)] public DifficultyType DifficultyType { get; set; } + + [Key(2)] public int MainQuestSequenceId { get; set; } +} diff --git a/src/Models/Entities/EntityMMaintenance.cs b/src/Models/Entities/EntityMMaintenance.cs new file mode 100644 index 0000000..ae06b80 --- /dev/null +++ b/src/Models/Entities/EntityMMaintenance.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMMaintenance))] +public class EntityMMaintenance +{ + [Key(0)] public int MaintenanceId { get; set; } + + [Key(1)] public long StartDatetime { get; set; } + + [Key(2)] public long EndDatetime { get; set; } + + [Key(3)] public int MaintenanceGroupId { get; set; } +} diff --git a/src/Models/Entities/EntityMMaintenanceGroup.cs b/src/Models/Entities/EntityMMaintenanceGroup.cs new file mode 100644 index 0000000..0e1a449 --- /dev/null +++ b/src/Models/Entities/EntityMMaintenanceGroup.cs @@ -0,0 +1,22 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMMaintenanceGroup))] +public class EntityMMaintenanceGroup +{ + [Key(0)] public int MaintenanceGroupId { get; set; } + + [Key(1)] public string ApiPath { get; set; } + + [Key(2)] public int Priority { get; set; } + + [Key(3)] public ScreenTransitionType ScreenTransitionType { get; set; } + + [Key(4)] public MaintenanceBlockFunctionType BlockFunctionType { get; set; } + + [Key(5)] public string BlockFunctionValue { get; set; } +} diff --git a/src/Models/Entities/EntityMMaterial.cs b/src/Models/Entities/EntityMMaterial.cs new file mode 100644 index 0000000..2f00d8b --- /dev/null +++ b/src/Models/Entities/EntityMMaterial.cs @@ -0,0 +1,32 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMMaterial))] +public class EntityMMaterial +{ + [Key(0)] public int MaterialId { get; set; } + + [Key(1)] public MaterialType MaterialType { get; set; } + + [Key(2)] public RarityType RarityType { get; set; } + + [Key(3)] public WeaponType WeaponType { get; set; } + + [Key(4)] public AttributeType AttributeType { get; set; } + + [Key(5)] public int EffectValue { get; set; } + + [Key(6)] public int SellPrice { get; set; } + + [Key(7)] public string AssetName { get; set; } + + [Key(8)] public int AssetCategoryId { get; set; } + + [Key(9)] public int AssetVariationId { get; set; } + + [Key(10)] public int MaterialSaleObtainPossessionId { get; set; } +} diff --git a/src/Models/Entities/EntityMMaterialSaleObtainPossession.cs b/src/Models/Entities/EntityMMaterialSaleObtainPossession.cs new file mode 100644 index 0000000..183759e --- /dev/null +++ b/src/Models/Entities/EntityMMaterialSaleObtainPossession.cs @@ -0,0 +1,20 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMMaterialSaleObtainPossession))] +public class EntityMMaterialSaleObtainPossession +{ + [Key(0)] public int MaterialSaleObtainPossessionId { get; set; } + + [Key(1)] public int SortOrder { get; set; } + + [Key(2)] public PossessionType PossessionType { get; set; } + + [Key(3)] public int PossessionId { get; set; } + + [Key(4)] public int Count { get; set; } +} diff --git a/src/Models/Entities/EntityMMission.cs b/src/Models/Entities/EntityMMission.cs new file mode 100644 index 0000000..5e28de7 --- /dev/null +++ b/src/Models/Entities/EntityMMission.cs @@ -0,0 +1,44 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMMission))] +public class EntityMMission +{ + [Key(0)] public int MissionId { get; set; } + + [Key(1)] public int MissionGroupId { get; set; } + + [Key(2)] public int SortOrderInMissionGroup { get; set; } + + [Key(3)] public int MissionUnlockConditionId { get; set; } + + [Key(4)] public bool IsNotShowBeforeClear { get; set; } + + [Key(5)] public int NameMissionTextId { get; set; } + + [Key(6)] public int MissionLinkId { get; set; } + + [Key(7)] public MissionClearConditionType MissionClearConditionType { get; set; } + + [Key(8)] public int MissionClearConditionGroupId { get; set; } + + [Key(9)] public int ClearConditionValue { get; set; } + + [Key(10)] public int MissionClearConditionOptionGroupId { get; set; } + + [Key(11)] public int MissionRewardId { get; set; } + + [Key(12)] public int MissionTermId { get; set; } + + [Key(13)] public int MinExpirationDays { get; set; } + + [Key(14)] public MainFunctionType RelatedMainFunctionType { get; set; } + + [Key(15)] public int MissionClearConditionOptionDetailGroupId { get; set; } + + [Key(16)] public int MissionUnlockConditionDetailGroupId { get; set; } +} diff --git a/src/Models/Entities/EntityMMissionClearConditionValueView.cs b/src/Models/Entities/EntityMMissionClearConditionValueView.cs new file mode 100644 index 0000000..76ba79a --- /dev/null +++ b/src/Models/Entities/EntityMMissionClearConditionValueView.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMMissionClearConditionValueView))] +public class EntityMMissionClearConditionValueView +{ + [Key(0)] public MissionClearConditionType MissionClearConditionType { get; set; } + + [Key(1)] public int ViewClearConditionValue { get; set; } +} diff --git a/src/Models/Entities/EntityMMissionGroup.cs b/src/Models/Entities/EntityMMissionGroup.cs new file mode 100644 index 0000000..a4e87a4 --- /dev/null +++ b/src/Models/Entities/EntityMMissionGroup.cs @@ -0,0 +1,24 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMMissionGroup))] +public class EntityMMissionGroup +{ + [Key(0)] public int MissionGroupId { get; set; } + + [Key(1)] public MissionCategoryType MissionCategoryType { get; set; } + + [Key(2)] public int LabelMissionTextId { get; set; } + + [Key(3)] public int SortOrderInLabel { get; set; } + + [Key(4)] public int AssetId { get; set; } + + [Key(5)] public int MissionGroupUnlockConditionGroupId { get; set; } + + [Key(6)] public int MissionSubCategoryId { get; set; } +} diff --git a/src/Models/Entities/EntityMMissionLink.cs b/src/Models/Entities/EntityMMissionLink.cs new file mode 100644 index 0000000..b95733f --- /dev/null +++ b/src/Models/Entities/EntityMMissionLink.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMMissionLink))] +public class EntityMMissionLink +{ + [Key(0)] public int MissionLinkId { get; set; } + + [Key(1)] public DomainType DestinationDomainType { get; set; } + + [Key(2)] public int DestinationDomainId { get; set; } +} diff --git a/src/Models/Entities/EntityMMissionPass.cs b/src/Models/Entities/EntityMMissionPass.cs new file mode 100644 index 0000000..f478fa0 --- /dev/null +++ b/src/Models/Entities/EntityMMissionPass.cs @@ -0,0 +1,22 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMMissionPass))] +public class EntityMMissionPass +{ + [Key(0)] public int MissionPassId { get; set; } + + [Key(1)] public long StartDatetime { get; set; } + + [Key(2)] public long EndDatetime { get; set; } + + [Key(3)] public int PremiumItemId { get; set; } + + [Key(4)] public int MissionPassLevelGroupId { get; set; } + + [Key(5)] public int MissionPassRewardGroupId { get; set; } +} diff --git a/src/Models/Entities/EntityMMissionPassLevelGroup.cs b/src/Models/Entities/EntityMMissionPassLevelGroup.cs new file mode 100644 index 0000000..095b937 --- /dev/null +++ b/src/Models/Entities/EntityMMissionPassLevelGroup.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMMissionPassLevelGroup))] +public class EntityMMissionPassLevelGroup +{ + [Key(0)] public int MissionPassLevelGroupId { get; set; } + + [Key(1)] public int Level { get; set; } + + [Key(2)] public int NecessaryPoint { get; set; } +} diff --git a/src/Models/Entities/EntityMMissionPassMissionGroup.cs b/src/Models/Entities/EntityMMissionPassMissionGroup.cs new file mode 100644 index 0000000..e467d6d --- /dev/null +++ b/src/Models/Entities/EntityMMissionPassMissionGroup.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMMissionPassMissionGroup))] +public class EntityMMissionPassMissionGroup +{ + [Key(0)] public int MissionPassId { get; set; } + + [Key(1)] public int MissionGroupId { get; set; } +} diff --git a/src/Models/Entities/EntityMMissionPassRewardGroup.cs b/src/Models/Entities/EntityMMissionPassRewardGroup.cs new file mode 100644 index 0000000..e533324 --- /dev/null +++ b/src/Models/Entities/EntityMMissionPassRewardGroup.cs @@ -0,0 +1,24 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMMissionPassRewardGroup))] +public class EntityMMissionPassRewardGroup +{ + [Key(0)] public int MissionPassRewardGroupId { get; set; } + + [Key(1)] public int Level { get; set; } + + [Key(2)] public bool IsPremium { get; set; } + + [Key(3)] public int SortOrder { get; set; } + + [Key(4)] public PossessionType PossessionType { get; set; } + + [Key(5)] public int PossessionId { get; set; } + + [Key(6)] public int Count { get; set; } +} diff --git a/src/Models/Entities/EntityMMissionReward.cs b/src/Models/Entities/EntityMMissionReward.cs new file mode 100644 index 0000000..76e8b3f --- /dev/null +++ b/src/Models/Entities/EntityMMissionReward.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMMissionReward))] +public class EntityMMissionReward +{ + [Key(0)] public int MissionRewardId { get; set; } + + [Key(1)] public PossessionType PossessionType { get; set; } + + [Key(2)] public int PossessionId { get; set; } + + [Key(3)] public int Count { get; set; } +} diff --git a/src/Models/Entities/EntityMMissionSubCategoryText.cs b/src/Models/Entities/EntityMMissionSubCategoryText.cs new file mode 100644 index 0000000..bee915d --- /dev/null +++ b/src/Models/Entities/EntityMMissionSubCategoryText.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMMissionSubCategoryText))] +public class EntityMMissionSubCategoryText +{ + [Key(0)] public int MissionSubCategoryId { get; set; } + + [Key(1)] public int TextId { get; set; } +} diff --git a/src/Models/Entities/EntityMMissionTerm.cs b/src/Models/Entities/EntityMMissionTerm.cs new file mode 100644 index 0000000..5105a3f --- /dev/null +++ b/src/Models/Entities/EntityMMissionTerm.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMMissionTerm))] +public class EntityMMissionTerm +{ + [Key(0)] public int MissionTermId { get; set; } + + [Key(1)] public long StartDatetime { get; set; } + + [Key(2)] public long EndDatetime { get; set; } +} diff --git a/src/Models/Entities/EntityMMissionUnlockCondition.cs b/src/Models/Entities/EntityMMissionUnlockCondition.cs new file mode 100644 index 0000000..2710922 --- /dev/null +++ b/src/Models/Entities/EntityMMissionUnlockCondition.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMMissionUnlockCondition))] +public class EntityMMissionUnlockCondition +{ + [Key(0)] public int MissionUnlockConditionId { get; set; } + + [Key(1)] public MissionUnlockConditionType MissionUnlockConditionType { get; set; } + + [Key(2)] public int ConditionValue { get; set; } +} diff --git a/src/Models/Entities/EntityMMomBanner.cs b/src/Models/Entities/EntityMMomBanner.cs new file mode 100644 index 0000000..af92b87 --- /dev/null +++ b/src/Models/Entities/EntityMMomBanner.cs @@ -0,0 +1,28 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMMomBanner))] +public class EntityMMomBanner +{ + [Key(0)] public int MomBannerId { get; set; } + + [Key(1)] public int SortOrderDesc { get; set; } + + [Key(2)] public DomainType DestinationDomainType { get; set; } + + [Key(3)] public int DestinationDomainId { get; set; } + + [Key(4)] public string BannerAssetName { get; set; } + + [Key(5)] public bool IsEmphasis { get; set; } + + [Key(6)] public long StartDatetime { get; set; } + + [Key(7)] public long EndDatetime { get; set; } + + [Key(8)] public TargetUserStatusType TargetUserStatusType { get; set; } +} diff --git a/src/Models/Entities/EntityMMomPointBanner.cs b/src/Models/Entities/EntityMMomPointBanner.cs new file mode 100644 index 0000000..c28fbca --- /dev/null +++ b/src/Models/Entities/EntityMMomPointBanner.cs @@ -0,0 +1,20 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMMomPointBanner))] +public class EntityMMomPointBanner +{ + [Key(0)] public int MomPointBannerId { get; set; } + + [Key(1)] public int BannerAssetId { get; set; } + + [Key(2)] public int DestinationInformationId { get; set; } + + [Key(3)] public long StartDatetime { get; set; } + + [Key(4)] public long EndDatetime { get; set; } +} diff --git a/src/Models/Entities/EntityMMovie.cs b/src/Models/Entities/EntityMMovie.cs new file mode 100644 index 0000000..3c84477 --- /dev/null +++ b/src/Models/Entities/EntityMMovie.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMMovie))] +public class EntityMMovie +{ + [Key(0)] public int MovieId { get; set; } + + [Key(1)] public int AssetId { get; set; } +} diff --git a/src/Models/Entities/EntityMNaviCutIn.cs b/src/Models/Entities/EntityMNaviCutIn.cs new file mode 100644 index 0000000..c24a02d --- /dev/null +++ b/src/Models/Entities/EntityMNaviCutIn.cs @@ -0,0 +1,24 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMNaviCutIn))] +public class EntityMNaviCutIn +{ + [Key(0)] public int NaviCutInId { get; set; } + + [Key(1)] public CutInFunctionType RelatedCutInFunctionType { get; set; } + + [Key(2)] public int SortOrder { get; set; } + + [Key(3)] public long StartDatetime { get; set; } + + [Key(4)] public long EndDatetime { get; set; } + + [Key(5)] public int NaviCutInContentGroupId { get; set; } + + [Key(6)] public int RelatedCutInFunctionValue { get; set; } +} diff --git a/src/Models/Entities/EntityMNaviCutInContentGroup.cs b/src/Models/Entities/EntityMNaviCutInContentGroup.cs new file mode 100644 index 0000000..f98608c --- /dev/null +++ b/src/Models/Entities/EntityMNaviCutInContentGroup.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMNaviCutInContentGroup))] +public class EntityMNaviCutInContentGroup +{ + [Key(0)] public int NaviCutInContentGroupId { get; set; } + + [Key(1)] public int ContentIndex { get; set; } + + [Key(2)] public int NaviCutInTextId { get; set; } +} diff --git a/src/Models/Entities/EntityMNaviCutInText.cs b/src/Models/Entities/EntityMNaviCutInText.cs new file mode 100644 index 0000000..4a384e3 --- /dev/null +++ b/src/Models/Entities/EntityMNaviCutInText.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMNaviCutInText))] +public class EntityMNaviCutInText +{ + [Key(0)] public int NaviCutInTextId { get; set; } + + [Key(1)] public LanguageType LanguageType { get; set; } + + [Key(2)] public string Text { get; set; } +} diff --git a/src/Models/Entities/EntityMNumericalFunction.cs b/src/Models/Entities/EntityMNumericalFunction.cs new file mode 100644 index 0000000..04499fb --- /dev/null +++ b/src/Models/Entities/EntityMNumericalFunction.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMNumericalFunction))] +public class EntityMNumericalFunction +{ + [Key(0)] public int NumericalFunctionId { get; set; } + + [Key(1)] public NumericalFunctionType NumericalFunctionType { get; set; } + + [Key(2)] public int NumericalFunctionParameterGroupId { get; set; } +} diff --git a/src/Models/Entities/EntityMNumericalFunctionParameterGroup.cs b/src/Models/Entities/EntityMNumericalFunctionParameterGroup.cs new file mode 100644 index 0000000..e7f7d8a --- /dev/null +++ b/src/Models/Entities/EntityMNumericalFunctionParameterGroup.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMNumericalFunctionParameterGroup))] +public class EntityMNumericalFunctionParameterGroup +{ + [Key(0)] public int NumericalFunctionParameterGroupId { get; set; } + + [Key(1)] public int ParameterIndex { get; set; } + + [Key(2)] public int ParameterValue { get; set; } +} diff --git a/src/Models/Entities/EntityMNumericalParameterMap.cs b/src/Models/Entities/EntityMNumericalParameterMap.cs new file mode 100644 index 0000000..e396eae --- /dev/null +++ b/src/Models/Entities/EntityMNumericalParameterMap.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMNumericalParameterMap))] +public class EntityMNumericalParameterMap +{ + [Key(0)] public int NumericalParameterMapId { get; set; } + + [Key(1)] public int ParameterKey { get; set; } + + [Key(2)] public int ParameterValue { get; set; } +} diff --git a/src/Models/Entities/EntityMOmikuji.cs b/src/Models/Entities/EntityMOmikuji.cs new file mode 100644 index 0000000..0b92ed9 --- /dev/null +++ b/src/Models/Entities/EntityMOmikuji.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMOmikuji))] +public class EntityMOmikuji +{ + [Key(0)] public int OmikujiId { get; set; } + + [Key(1)] public long StartDatetime { get; set; } + + [Key(2)] public long EndDatetime { get; set; } + + [Key(3)] public int OmikujiAssetId { get; set; } +} diff --git a/src/Models/Entities/EntityMOverrideHitEffectConditionCritical.cs b/src/Models/Entities/EntityMOverrideHitEffectConditionCritical.cs new file mode 100644 index 0000000..886d7c5 --- /dev/null +++ b/src/Models/Entities/EntityMOverrideHitEffectConditionCritical.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMOverrideHitEffectConditionCritical))] +public class EntityMOverrideHitEffectConditionCritical +{ + [Key(0)] public int OverrideHitEffectConditionId { get; set; } + + [Key(1)] public bool IsCritical { get; set; } +} diff --git a/src/Models/Entities/EntityMOverrideHitEffectConditionDamageAttribute.cs b/src/Models/Entities/EntityMOverrideHitEffectConditionDamageAttribute.cs new file mode 100644 index 0000000..4f861f1 --- /dev/null +++ b/src/Models/Entities/EntityMOverrideHitEffectConditionDamageAttribute.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMOverrideHitEffectConditionDamageAttribute))] +public class EntityMOverrideHitEffectConditionDamageAttribute +{ + [Key(0)] public int OverrideHitEffectConditionId { get; set; } + + [Key(1)] public bool IsExcepting { get; set; } + + [Key(2)] public AttributeType AttributeType { get; set; } +} diff --git a/src/Models/Entities/EntityMOverrideHitEffectConditionGroup.cs b/src/Models/Entities/EntityMOverrideHitEffectConditionGroup.cs new file mode 100644 index 0000000..76693c5 --- /dev/null +++ b/src/Models/Entities/EntityMOverrideHitEffectConditionGroup.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMOverrideHitEffectConditionGroup))] +public class EntityMOverrideHitEffectConditionGroup +{ + [Key(0)] public int OverrideHitEffectConditionGroupId { get; set; } + + [Key(1)] public int ConditionIndex { get; set; } + + [Key(2)] public int ConditionType { get; set; } + + [Key(3)] public int OverrideHitEffectConditionId { get; set; } +} diff --git a/src/Models/Entities/EntityMOverrideHitEffectConditionSkillExecutor.cs b/src/Models/Entities/EntityMOverrideHitEffectConditionSkillExecutor.cs new file mode 100644 index 0000000..3c26af3 --- /dev/null +++ b/src/Models/Entities/EntityMOverrideHitEffectConditionSkillExecutor.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMOverrideHitEffectConditionSkillExecutor))] +public class EntityMOverrideHitEffectConditionSkillExecutor +{ + [Key(0)] public int OverrideHitEffectConditionId { get; set; } + + [Key(1)] public int SkillOwnerCategoryType { get; set; } +} diff --git a/src/Models/Entities/EntityMParts.cs b/src/Models/Entities/EntityMParts.cs new file mode 100644 index 0000000..eda8798 --- /dev/null +++ b/src/Models/Entities/EntityMParts.cs @@ -0,0 +1,22 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMParts))] +public class EntityMParts +{ + [Key(0)] public int PartsId { get; set; } + + [Key(1)] public RarityType RarityType { get; set; } + + [Key(2)] public int PartsGroupId { get; set; } + + [Key(3)] public int PartsStatusMainLotteryGroupId { get; set; } + + [Key(4)] public int PartsStatusSubLotteryGroupId { get; set; } + + [Key(5)] public int PartsInitialLotteryId { get; set; } +} diff --git a/src/Models/Entities/EntityMPartsEnhanced.cs b/src/Models/Entities/EntityMPartsEnhanced.cs new file mode 100644 index 0000000..edc8680 --- /dev/null +++ b/src/Models/Entities/EntityMPartsEnhanced.cs @@ -0,0 +1,22 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMPartsEnhanced))] +public class EntityMPartsEnhanced +{ + [Key(0)] public int PartsEnhancedId { get; set; } + + [Key(1)] public int PartsId { get; set; } + + [Key(2)] public int PartsStatusMainId { get; set; } + + [Key(3)] public int Level { get; set; } + + [Key(4)] public bool IsRandomSubStatusCount { get; set; } + + [Key(5)] public int SubStatusCount { get; set; } +} diff --git a/src/Models/Entities/EntityMPartsEnhancedSubStatus.cs b/src/Models/Entities/EntityMPartsEnhancedSubStatus.cs new file mode 100644 index 0000000..2f2788a --- /dev/null +++ b/src/Models/Entities/EntityMPartsEnhancedSubStatus.cs @@ -0,0 +1,24 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMPartsEnhancedSubStatus))] +public class EntityMPartsEnhancedSubStatus +{ + [Key(0)] public int PartsEnhancedId { get; set; } + + [Key(1)] public int StatusIndex { get; set; } + + [Key(2)] public int PartsStatusSubLotteryId { get; set; } + + [Key(3)] public int Level { get; set; } + + [Key(4)] public StatusKindType StatusKindType { get; set; } + + [Key(5)] public StatusCalculationType StatusCalculationType { get; set; } + + [Key(6)] public int FixedStatusChangeValue { get; set; } +} diff --git a/src/Models/Entities/EntityMPartsGroup.cs b/src/Models/Entities/EntityMPartsGroup.cs new file mode 100644 index 0000000..a210851 --- /dev/null +++ b/src/Models/Entities/EntityMPartsGroup.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMPartsGroup))] +public class EntityMPartsGroup +{ + [Key(0)] public int PartsGroupId { get; set; } + + [Key(1)] public int PartsSeriesId { get; set; } + + [Key(2)] public int SortOrder { get; set; } + + [Key(3)] public int PartsGroupAssetId { get; set; } +} diff --git a/src/Models/Entities/EntityMPartsLevelUpPriceGroup.cs b/src/Models/Entities/EntityMPartsLevelUpPriceGroup.cs new file mode 100644 index 0000000..6efd800 --- /dev/null +++ b/src/Models/Entities/EntityMPartsLevelUpPriceGroup.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMPartsLevelUpPriceGroup))] +public class EntityMPartsLevelUpPriceGroup +{ + [Key(0)] public int PartsLevelUpPriceGroupId { get; set; } + + [Key(1)] public int LevelLowerLimit { get; set; } + + [Key(2)] public int Gold { get; set; } +} diff --git a/src/Models/Entities/EntityMPartsLevelUpRateGroup.cs b/src/Models/Entities/EntityMPartsLevelUpRateGroup.cs new file mode 100644 index 0000000..89a5a5a --- /dev/null +++ b/src/Models/Entities/EntityMPartsLevelUpRateGroup.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMPartsLevelUpRateGroup))] +public class EntityMPartsLevelUpRateGroup +{ + [Key(0)] public int PartsLevelUpRateGroupId { get; set; } + + [Key(1)] public int LevelLowerLimit { get; set; } + + [Key(2)] public int SuccessRatePermil { get; set; } +} diff --git a/src/Models/Entities/EntityMPartsRarity.cs b/src/Models/Entities/EntityMPartsRarity.cs new file mode 100644 index 0000000..8752ce0 --- /dev/null +++ b/src/Models/Entities/EntityMPartsRarity.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMPartsRarity))] +public class EntityMPartsRarity +{ + [Key(0)] public RarityType RarityType { get; set; } + + [Key(1)] public int PartsLevelUpRateGroupId { get; set; } + + [Key(2)] public int PartsLevelUpPriceGroupId { get; set; } + + [Key(3)] public int SellPriceNumericalFunctionId { get; set; } +} diff --git a/src/Models/Entities/EntityMPartsSeries.cs b/src/Models/Entities/EntityMPartsSeries.cs new file mode 100644 index 0000000..b00fd78 --- /dev/null +++ b/src/Models/Entities/EntityMPartsSeries.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMPartsSeries))] +public class EntityMPartsSeries +{ + [Key(0)] public int PartsSeriesId { get; set; } + + [Key(1)] public int PartsSeriesBonusAbilityGroupId { get; set; } + + [Key(2)] public int PartsSeriesAssetId { get; set; } + + [Key(3)] public long ListSettingDisplayStartDatetime { get; set; } +} diff --git a/src/Models/Entities/EntityMPartsSeriesBonusAbilityGroup.cs b/src/Models/Entities/EntityMPartsSeriesBonusAbilityGroup.cs new file mode 100644 index 0000000..73473ac --- /dev/null +++ b/src/Models/Entities/EntityMPartsSeriesBonusAbilityGroup.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMPartsSeriesBonusAbilityGroup))] +public class EntityMPartsSeriesBonusAbilityGroup +{ + [Key(0)] public int PartsSeriesBonusAbilityGroupId { get; set; } + + [Key(1)] public int SetCount { get; set; } + + [Key(2)] public int AbilityId { get; set; } + + [Key(3)] public int AbilityLevel { get; set; } +} diff --git a/src/Models/Entities/EntityMPartsStatusMain.cs b/src/Models/Entities/EntityMPartsStatusMain.cs new file mode 100644 index 0000000..8ad91d6 --- /dev/null +++ b/src/Models/Entities/EntityMPartsStatusMain.cs @@ -0,0 +1,20 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMPartsStatusMain))] +public class EntityMPartsStatusMain +{ + [Key(0)] public int PartsStatusMainId { get; set; } + + [Key(1)] public StatusKindType StatusKindType { get; set; } + + [Key(2)] public StatusCalculationType StatusCalculationType { get; set; } + + [Key(3)] public int StatusChangeInitialValue { get; set; } + + [Key(4)] public int StatusNumericalFunctionId { get; set; } +} diff --git a/src/Models/Entities/EntityMPlatformPayment.cs b/src/Models/Entities/EntityMPlatformPayment.cs new file mode 100644 index 0000000..c01e722 --- /dev/null +++ b/src/Models/Entities/EntityMPlatformPayment.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMPlatformPayment))] +public class EntityMPlatformPayment +{ + [Key(0)] public int PlatformPaymentId { get; set; } + + [Key(1)] public PlatformType PlatformType { get; set; } + + [Key(2)] public string ProductIdSuffix { get; set; } +} diff --git a/src/Models/Entities/EntityMPlatformPaymentPrice.cs b/src/Models/Entities/EntityMPlatformPaymentPrice.cs new file mode 100644 index 0000000..6940a16 --- /dev/null +++ b/src/Models/Entities/EntityMPlatformPaymentPrice.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMPlatformPaymentPrice))] +public class EntityMPlatformPaymentPrice +{ + [Key(0)] public int PlatformPaymentId { get; set; } + + [Key(1)] public PlatformType PlatformType { get; set; } + + [Key(2)] public int CurrencyType { get; set; } + + [Key(3)] public decimal Price { get; set; } +} diff --git a/src/Models/Entities/EntityMPortalCageAccessPointFunctionGroup.cs b/src/Models/Entities/EntityMPortalCageAccessPointFunctionGroup.cs new file mode 100644 index 0000000..011de53 --- /dev/null +++ b/src/Models/Entities/EntityMPortalCageAccessPointFunctionGroup.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMPortalCageAccessPointFunctionGroup))] +public class EntityMPortalCageAccessPointFunctionGroup +{ + [Key(0)] public int AccessPointFunctionGroupId { get; set; } + + [Key(1)] public int AccessPointFunctionIndex { get; set; } + + [Key(2)] public int AccessPointFunctionId { get; set; } +} diff --git a/src/Models/Entities/EntityMPortalCageAccessPointFunctionGroupSchedule.cs b/src/Models/Entities/EntityMPortalCageAccessPointFunctionGroupSchedule.cs new file mode 100644 index 0000000..381e7af --- /dev/null +++ b/src/Models/Entities/EntityMPortalCageAccessPointFunctionGroupSchedule.cs @@ -0,0 +1,22 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMPortalCageAccessPointFunctionGroupSchedule))] +public class EntityMPortalCageAccessPointFunctionGroupSchedule +{ + [Key(0)] public int PortalCageAccessPointFunctionGroupScheduleId { get; set; } + + [Key(1)] public int PriorityDesc { get; set; } + + [Key(2)] public int AccessPointType { get; set; } + + [Key(3)] public int AccessPointFunctionGroupId { get; set; } + + [Key(4)] public long StartDatetime { get; set; } + + [Key(5)] public long EndDatetime { get; set; } +} diff --git a/src/Models/Entities/EntityMPortalCageCharacterGroup.cs b/src/Models/Entities/EntityMPortalCageCharacterGroup.cs new file mode 100644 index 0000000..2e2b8fa --- /dev/null +++ b/src/Models/Entities/EntityMPortalCageCharacterGroup.cs @@ -0,0 +1,20 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMPortalCageCharacterGroup))] +public class EntityMPortalCageCharacterGroup +{ + [Key(0)] public int PortalCageCharacterGroupId { get; set; } + + [Key(1)] public int PlayerCharacterActorObjectId { get; set; } + + [Key(2)] public int NaviCharacterActorObjectId { get; set; } + + [Key(3)] public int NaviMenuActorObjectId { get; set; } + + [Key(4)] public TutorialType TutorialType { get; set; } +} diff --git a/src/Models/Entities/EntityMPortalCageGate.cs b/src/Models/Entities/EntityMPortalCageGate.cs new file mode 100644 index 0000000..f11d1e6 --- /dev/null +++ b/src/Models/Entities/EntityMPortalCageGate.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMPortalCageGate))] +public class EntityMPortalCageGate +{ + [Key(0)] public int PortalCageGateId { get; set; } + + [Key(1)] public int GatePositionIndex { get; set; } + + [Key(2)] public int PortalCageAccessPointFunctionGroupScheduleId { get; set; } +} diff --git a/src/Models/Entities/EntityMPortalCageScene.cs b/src/Models/Entities/EntityMPortalCageScene.cs new file mode 100644 index 0000000..831c035 --- /dev/null +++ b/src/Models/Entities/EntityMPortalCageScene.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMPortalCageScene))] +public class EntityMPortalCageScene +{ + [Key(0)] public int PortalCageSceneId { get; set; } + + [Key(1)] public int PortalCageCharacterGroupId { get; set; } + + [Key(2)] public int PortalCageDropId { get; set; } + + [Key(3)] public int PortalCageGateId { get; set; } +} diff --git a/src/Models/Entities/EntityMPossessionAcquisitionRoute.cs b/src/Models/Entities/EntityMPossessionAcquisitionRoute.cs new file mode 100644 index 0000000..bd6bf9a --- /dev/null +++ b/src/Models/Entities/EntityMPossessionAcquisitionRoute.cs @@ -0,0 +1,26 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMPossessionAcquisitionRoute))] +public class EntityMPossessionAcquisitionRoute +{ + [Key(0)] public PossessionType PossessionType { get; set; } + + [Key(1)] public int PossessionId { get; set; } + + [Key(2)] public int SortOrder { get; set; } + + [Key(3)] public TransitionRouteType AcquisitionRouteType { get; set; } + + [Key(4)] public int RouteId { get; set; } + + [Key(5)] public string RelationValue { get; set; } + + [Key(6)] public long StartDatetime { get; set; } + + [Key(7)] public long EndDatetime { get; set; } +} diff --git a/src/Models/Entities/EntityMPowerCalculationConstantValue.cs b/src/Models/Entities/EntityMPowerCalculationConstantValue.cs new file mode 100644 index 0000000..f484a22 --- /dev/null +++ b/src/Models/Entities/EntityMPowerCalculationConstantValue.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMPowerCalculationConstantValue))] +public class EntityMPowerCalculationConstantValue +{ + [Key(0)] public PowerCalculationConstantValueType PowerCalculationConstantValueType { get; set; } + + [Key(1)] public int ConstantValue { get; set; } +} diff --git a/src/Models/Entities/EntityMPowerReferenceStatusGroup.cs b/src/Models/Entities/EntityMPowerReferenceStatusGroup.cs new file mode 100644 index 0000000..2d179f9 --- /dev/null +++ b/src/Models/Entities/EntityMPowerReferenceStatusGroup.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMPowerReferenceStatusGroup))] +public class EntityMPowerReferenceStatusGroup +{ + [Key(0)] public int PowerReferenceStatusGroupId { get; set; } + + [Key(1)] public StatusKindType ReferenceStatusType { get; set; } + + [Key(2)] public AttributeConditionType AttributeConditionType { get; set; } + + [Key(3)] public int CoefficientValuePermil { get; set; } +} diff --git a/src/Models/Entities/EntityMPremiumItem.cs b/src/Models/Entities/EntityMPremiumItem.cs new file mode 100644 index 0000000..2a03003 --- /dev/null +++ b/src/Models/Entities/EntityMPremiumItem.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMPremiumItem))] +public class EntityMPremiumItem +{ + [Key(0)] public int PremiumItemId { get; set; } + + [Key(1)] public int PremiumItemType { get; set; } + + [Key(2)] public long StartDatetime { get; set; } + + [Key(3)] public long EndDatetime { get; set; } +} diff --git a/src/Models/Entities/EntityMPvpBackground.cs b/src/Models/Entities/EntityMPvpBackground.cs new file mode 100644 index 0000000..951c75f --- /dev/null +++ b/src/Models/Entities/EntityMPvpBackground.cs @@ -0,0 +1,28 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMPvpBackground))] +public class EntityMPvpBackground +{ + [Key(0)] public int AssetBackgroundId { get; set; } + + [Key(1)] public int BattleFieldLocaleSettingIndex { get; set; } + + [Key(2)] public int BattlePointIndex { get; set; } + + [Key(3)] public int RandomWeight { get; set; } + + [Key(4)] public int PostProcessConfigurationIndex { get; set; } + + [Key(5)] public int BattleCameraControllerAssetId { get; set; } + + [Key(6)] public BattleStartCameraType BattleStartCameraType { get; set; } + + [Key(7)] public int WaveStartActAssetId { get; set; } + + [Key(8)] public int WaveEndActAssetId { get; set; } +} diff --git a/src/Models/Entities/EntityMPvpGrade.cs b/src/Models/Entities/EntityMPvpGrade.cs new file mode 100644 index 0000000..a5e9461 --- /dev/null +++ b/src/Models/Entities/EntityMPvpGrade.cs @@ -0,0 +1,20 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMPvpGrade))] +public class EntityMPvpGrade +{ + [Key(0)] public int PvpGradeId { get; set; } + + [Key(1)] public int NecessaryPvpPoint { get; set; } + + [Key(2)] public int IconAssetId { get; set; } + + [Key(3)] public int PvpGradeWeeklyRewardGroupId { get; set; } + + [Key(4)] public int PvpGradeOneMatchRewardGroupId { get; set; } +} diff --git a/src/Models/Entities/EntityMPvpGradeGroup.cs b/src/Models/Entities/EntityMPvpGradeGroup.cs new file mode 100644 index 0000000..9ba8bba --- /dev/null +++ b/src/Models/Entities/EntityMPvpGradeGroup.cs @@ -0,0 +1,22 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMPvpGradeGroup))] +public class EntityMPvpGradeGroup +{ + [Key(0)] public int PvpGradeGroupId { get; set; } + + [Key(1)] public int PvpGradeId { get; set; } + + [Key(2)] public int NecessaryPvpPoint { get; set; } + + [Key(3)] public int IconAssetId { get; set; } + + [Key(4)] public int PvpGradeWeeklyRewardGroupId { get; set; } + + [Key(5)] public int PvpGradeOneMatchRewardGroupId { get; set; } +} diff --git a/src/Models/Entities/EntityMPvpGradeOneMatchReward.cs b/src/Models/Entities/EntityMPvpGradeOneMatchReward.cs new file mode 100644 index 0000000..84526f3 --- /dev/null +++ b/src/Models/Entities/EntityMPvpGradeOneMatchReward.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMPvpGradeOneMatchReward))] +public class EntityMPvpGradeOneMatchReward +{ + [Key(0)] public int PvpGradeOneMatchRewardId { get; set; } + + [Key(1)] public int PvpRewardId { get; set; } + + [Key(2)] public int SortOrder { get; set; } +} diff --git a/src/Models/Entities/EntityMPvpGradeOneMatchRewardGroup.cs b/src/Models/Entities/EntityMPvpGradeOneMatchRewardGroup.cs new file mode 100644 index 0000000..3f22335 --- /dev/null +++ b/src/Models/Entities/EntityMPvpGradeOneMatchRewardGroup.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMPvpGradeOneMatchRewardGroup))] +public class EntityMPvpGradeOneMatchRewardGroup +{ + [Key(0)] public int PvpGradeOneMatchRewardGroupId { get; set; } + + [Key(1)] public int PvpGradeOneMatchRewardId { get; set; } + + [Key(2)] public int Weight { get; set; } +} diff --git a/src/Models/Entities/EntityMPvpGradeWeeklyRewardGroup.cs b/src/Models/Entities/EntityMPvpGradeWeeklyRewardGroup.cs new file mode 100644 index 0000000..e07a0c6 --- /dev/null +++ b/src/Models/Entities/EntityMPvpGradeWeeklyRewardGroup.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMPvpGradeWeeklyRewardGroup))] +public class EntityMPvpGradeWeeklyRewardGroup +{ + [Key(0)] public int PvpGradeWeeklyRewardGroupId { get; set; } + + [Key(1)] public int PvpRewardId { get; set; } + + [Key(2)] public int SortOrder { get; set; } +} diff --git a/src/Models/Entities/EntityMPvpReward.cs b/src/Models/Entities/EntityMPvpReward.cs new file mode 100644 index 0000000..6f3fa5b --- /dev/null +++ b/src/Models/Entities/EntityMPvpReward.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMPvpReward))] +public class EntityMPvpReward +{ + [Key(0)] public int PvpRewardId { get; set; } + + [Key(1)] public PossessionType PossessionType { get; set; } + + [Key(2)] public int PossessionId { get; set; } + + [Key(3)] public int Count { get; set; } +} diff --git a/src/Models/Entities/EntityMPvpSeason.cs b/src/Models/Entities/EntityMPvpSeason.cs new file mode 100644 index 0000000..5693531 --- /dev/null +++ b/src/Models/Entities/EntityMPvpSeason.cs @@ -0,0 +1,32 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMPvpSeason))] +public class EntityMPvpSeason +{ + [Key(0)] public int PvpSeasonId { get; set; } + + [Key(1)] public string NameAssetPath { get; set; } + + [Key(2)] public long SeasonStartDatetime { get; set; } + + [Key(3)] public long SeasonEndDatetime { get; set; } + + [Key(4)] public int PvpSeasonGroupingId { get; set; } + + [Key(5)] public bool IsInvalid { get; set; } + + [Key(6)] public int PvpWeeklyRankRewardRankGroupId { get; set; } + + [Key(7)] public int PvpSeasonRankRewardRankGroupId { get; set; } + + [Key(8)] public int PvpGradeGroupId { get; set; } + + [Key(9)] public int PvpInitialPointAdditionGroupId { get; set; } + + [Key(10)] public int PvpSeasonDeckPowerThresholdGroupingId { get; set; } +} diff --git a/src/Models/Entities/EntityMPvpSeasonGrade.cs b/src/Models/Entities/EntityMPvpSeasonGrade.cs new file mode 100644 index 0000000..734b3b8 --- /dev/null +++ b/src/Models/Entities/EntityMPvpSeasonGrade.cs @@ -0,0 +1,22 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMPvpSeasonGrade))] +public class EntityMPvpSeasonGrade +{ + [Key(0)] public int PvpGradeId { get; set; } + + [Key(1)] public int PvpSeasonId { get; set; } + + [Key(2)] public int NecessaryPvpPoint { get; set; } + + [Key(3)] public int IconAssetId { get; set; } + + [Key(4)] public int PvpGradeWeeklyRewardGroupId { get; set; } + + [Key(5)] public int PvpGradeOneMatchRewardGroupId { get; set; } +} diff --git a/src/Models/Entities/EntityMPvpSeasonGrouping.cs b/src/Models/Entities/EntityMPvpSeasonGrouping.cs new file mode 100644 index 0000000..0088ea8 --- /dev/null +++ b/src/Models/Entities/EntityMPvpSeasonGrouping.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMPvpSeasonGrouping))] +public class EntityMPvpSeasonGrouping +{ + [Key(0)] public int PvpSeasonGroupingId { get; set; } + + [Key(1)] public int GroupId { get; set; } + + [Key(2)] public int DivideWeight { get; set; } +} diff --git a/src/Models/Entities/EntityMPvpSeasonRankReward.cs b/src/Models/Entities/EntityMPvpSeasonRankReward.cs new file mode 100644 index 0000000..cf0bed7 --- /dev/null +++ b/src/Models/Entities/EntityMPvpSeasonRankReward.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMPvpSeasonRankReward))] +public class EntityMPvpSeasonRankReward +{ + [Key(0)] public int RankLowerLimit { get; set; } + + [Key(1)] public int PvpSeasonRankRewardGroupId { get; set; } +} diff --git a/src/Models/Entities/EntityMPvpSeasonRankRewardGroup.cs b/src/Models/Entities/EntityMPvpSeasonRankRewardGroup.cs new file mode 100644 index 0000000..31dd08a --- /dev/null +++ b/src/Models/Entities/EntityMPvpSeasonRankRewardGroup.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMPvpSeasonRankRewardGroup))] +public class EntityMPvpSeasonRankRewardGroup +{ + [Key(0)] public int PvpSeasonRankRewardGroupId { get; set; } + + [Key(1)] public int PvpRewardId { get; set; } + + [Key(2)] public int SortOrder { get; set; } +} diff --git a/src/Models/Entities/EntityMPvpSeasonRankRewardPerSeason.cs b/src/Models/Entities/EntityMPvpSeasonRankRewardPerSeason.cs new file mode 100644 index 0000000..6067715 --- /dev/null +++ b/src/Models/Entities/EntityMPvpSeasonRankRewardPerSeason.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMPvpSeasonRankRewardPerSeason))] +public class EntityMPvpSeasonRankRewardPerSeason +{ + [Key(0)] public int RankLowerLimit { get; set; } + + [Key(1)] public int PvpSeasonId { get; set; } + + [Key(2)] public int PvpSeasonRankRewardGroupId { get; set; } +} diff --git a/src/Models/Entities/EntityMPvpSeasonRankRewardRankGroup.cs b/src/Models/Entities/EntityMPvpSeasonRankRewardRankGroup.cs new file mode 100644 index 0000000..faf1f50 --- /dev/null +++ b/src/Models/Entities/EntityMPvpSeasonRankRewardRankGroup.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMPvpSeasonRankRewardRankGroup))] +public class EntityMPvpSeasonRankRewardRankGroup +{ + [Key(0)] public int PvpSeasonRankRewardRankGroupId { get; set; } + + [Key(1)] public int RankLowerLimit { get; set; } + + [Key(2)] public int PvpSeasonRankRewardGroupId { get; set; } +} diff --git a/src/Models/Entities/EntityMPvpWeeklyRankRewardGroup.cs b/src/Models/Entities/EntityMPvpWeeklyRankRewardGroup.cs new file mode 100644 index 0000000..86d7488 --- /dev/null +++ b/src/Models/Entities/EntityMPvpWeeklyRankRewardGroup.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMPvpWeeklyRankRewardGroup))] +public class EntityMPvpWeeklyRankRewardGroup +{ + [Key(0)] public int PvpWeeklyRankRewardGroupId { get; set; } + + [Key(1)] public int PvpRewardId { get; set; } + + [Key(2)] public int SortOrder { get; set; } +} diff --git a/src/Models/Entities/EntityMPvpWeeklyRankRewardRankGroup.cs b/src/Models/Entities/EntityMPvpWeeklyRankRewardRankGroup.cs new file mode 100644 index 0000000..be60ba5 --- /dev/null +++ b/src/Models/Entities/EntityMPvpWeeklyRankRewardRankGroup.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMPvpWeeklyRankRewardRankGroup))] +public class EntityMPvpWeeklyRankRewardRankGroup +{ + [Key(0)] public int PvpWeeklyRankRewardRankGroupId { get; set; } + + [Key(1)] public int RankLowerLimit { get; set; } + + [Key(2)] public int PvpWeeklyRankRewardGroupId { get; set; } +} diff --git a/src/Models/Entities/EntityMPvpWinStreakCountEffect.cs b/src/Models/Entities/EntityMPvpWinStreakCountEffect.cs new file mode 100644 index 0000000..57d728d --- /dev/null +++ b/src/Models/Entities/EntityMPvpWinStreakCountEffect.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMPvpWinStreakCountEffect))] +public class EntityMPvpWinStreakCountEffect +{ + [Key(0)] public int WinStreakCount { get; set; } + + [Key(1)] public int AbilityId { get; set; } + + [Key(2)] public int AbilityLevel { get; set; } +} diff --git a/src/Models/Entities/EntityMQuest.cs b/src/Models/Entities/EntityMQuest.cs new file mode 100644 index 0000000..89e1568 --- /dev/null +++ b/src/Models/Entities/EntityMQuest.cs @@ -0,0 +1,62 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMQuest))] +public class EntityMQuest +{ + [Key(0)] public int QuestId { get; set; } + + [Key(1)] public int NameQuestTextId { get; set; } + + [Key(2)] public int PictureBookNameQuestTextId { get; set; } + + [Key(3)] public int QuestReleaseConditionListId { get; set; } + + [Key(4)] public int StoryQuestTextId { get; set; } + + [Key(5)] public int QuestDisplayAttributeGroupId { get; set; } + + [Key(6)] public int RecommendedDeckPower { get; set; } + + [Key(7)] public int QuestFirstClearRewardGroupId { get; set; } + + [Key(8)] public int QuestPickupRewardGroupId { get; set; } + + [Key(9)] public int QuestDeckRestrictionGroupId { get; set; } + + [Key(10)] public int QuestMissionGroupId { get; set; } + + [Key(11)] public int Stamina { get; set; } + + [Key(12)] public int UserExp { get; set; } + + [Key(13)] public int CharacterExp { get; set; } + + [Key(14)] public int CostumeExp { get; set; } + + [Key(15)] public int Gold { get; set; } + + [Key(16)] public int DailyClearableCount { get; set; } + + [Key(17)] public bool IsRunInTheBackground { get; set; } + + [Key(18)] public bool IsCountedAsQuest { get; set; } + + [Key(19)] public int QuestBonusId { get; set; } + + [Key(20)] public bool IsNotShowAfterClear { get; set; } + + [Key(21)] public bool IsBigWinTarget { get; set; } + + [Key(22)] public bool IsUsableSkipTicket { get; set; } + + [Key(23)] public int QuestReplayFlowRewardGroupId { get; set; } + + [Key(24)] public int InvisibleQuestMissionGroupId { get; set; } + + [Key(25)] public int FieldEffectGroupId { get; set; } +} diff --git a/src/Models/Entities/EntityMQuestBonus.cs b/src/Models/Entities/EntityMQuestBonus.cs new file mode 100644 index 0000000..da7b812 --- /dev/null +++ b/src/Models/Entities/EntityMQuestBonus.cs @@ -0,0 +1,22 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMQuestBonus))] +public class EntityMQuestBonus +{ + [Key(0)] public int QuestBonusId { get; set; } + + [Key(1)] public int QuestBonusCharacterGroupId { get; set; } + + [Key(2)] public int QuestBonusCostumeGroupId { get; set; } + + [Key(3)] public int QuestBonusWeaponGroupId { get; set; } + + [Key(4)] public int QuestBonusCostumeSettingGroupId { get; set; } + + [Key(5)] public int QuestBonusAllyCharacterId { get; set; } +} diff --git a/src/Models/Entities/EntityMQuestBonusAbility.cs b/src/Models/Entities/EntityMQuestBonusAbility.cs new file mode 100644 index 0000000..5215ff2 --- /dev/null +++ b/src/Models/Entities/EntityMQuestBonusAbility.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMQuestBonusAbility))] +public class EntityMQuestBonusAbility +{ + [Key(0)] public int QuestBonusEffectId { get; set; } + + [Key(1)] public int AbilityId { get; set; } + + [Key(2)] public int Level { get; set; } +} diff --git a/src/Models/Entities/EntityMQuestBonusAllyCharacter.cs b/src/Models/Entities/EntityMQuestBonusAllyCharacter.cs new file mode 100644 index 0000000..e8c2057 --- /dev/null +++ b/src/Models/Entities/EntityMQuestBonusAllyCharacter.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMQuestBonusAllyCharacter))] +public class EntityMQuestBonusAllyCharacter +{ + [Key(0)] public int QuestBonusAllyCharacterId { get; set; } + + [Key(1)] public int QuestBonusEffectGroupId { get; set; } + + [Key(2)] public int QuestBonusTermGroupId { get; set; } +} diff --git a/src/Models/Entities/EntityMQuestBonusCharacterGroup.cs b/src/Models/Entities/EntityMQuestBonusCharacterGroup.cs new file mode 100644 index 0000000..09580ab --- /dev/null +++ b/src/Models/Entities/EntityMQuestBonusCharacterGroup.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMQuestBonusCharacterGroup))] +public class EntityMQuestBonusCharacterGroup +{ + [Key(0)] public int QuestBonusCharacterGroupId { get; set; } + + [Key(1)] public int CharacterId { get; set; } + + [Key(2)] public int QuestBonusEffectGroupId { get; set; } + + [Key(3)] public int QuestBonusTermGroupId { get; set; } +} diff --git a/src/Models/Entities/EntityMQuestBonusCostumeGroup.cs b/src/Models/Entities/EntityMQuestBonusCostumeGroup.cs new file mode 100644 index 0000000..f8a0c41 --- /dev/null +++ b/src/Models/Entities/EntityMQuestBonusCostumeGroup.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMQuestBonusCostumeGroup))] +public class EntityMQuestBonusCostumeGroup +{ + [Key(0)] public int QuestBonusCostumeGroupId { get; set; } + + [Key(1)] public int CostumeId { get; set; } + + [Key(2)] public int QuestBonusEffectGroupId { get; set; } + + [Key(3)] public int QuestBonusTermGroupId { get; set; } +} diff --git a/src/Models/Entities/EntityMQuestBonusCostumeSettingGroup.cs b/src/Models/Entities/EntityMQuestBonusCostumeSettingGroup.cs new file mode 100644 index 0000000..252fd9c --- /dev/null +++ b/src/Models/Entities/EntityMQuestBonusCostumeSettingGroup.cs @@ -0,0 +1,20 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMQuestBonusCostumeSettingGroup))] +public class EntityMQuestBonusCostumeSettingGroup +{ + [Key(0)] public int QuestBonusCostumeSettingGroupId { get; set; } + + [Key(1)] public int CostumeId { get; set; } + + [Key(2)] public int LimitBreakCountLowerLimit { get; set; } + + [Key(3)] public int QuestBonusEffectGroupId { get; set; } + + [Key(4)] public int QuestBonusTermGroupId { get; set; } +} diff --git a/src/Models/Entities/EntityMQuestBonusDropReward.cs b/src/Models/Entities/EntityMQuestBonusDropReward.cs new file mode 100644 index 0000000..276921b --- /dev/null +++ b/src/Models/Entities/EntityMQuestBonusDropReward.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMQuestBonusDropReward))] +public class EntityMQuestBonusDropReward +{ + [Key(0)] public int QuestBonusEffectId { get; set; } + + [Key(1)] public PossessionType PossessionType { get; set; } + + [Key(2)] public int PossessionId { get; set; } + + [Key(3)] public int AdditionalCount { get; set; } +} diff --git a/src/Models/Entities/EntityMQuestBonusEffectGroup.cs b/src/Models/Entities/EntityMQuestBonusEffectGroup.cs new file mode 100644 index 0000000..6825b04 --- /dev/null +++ b/src/Models/Entities/EntityMQuestBonusEffectGroup.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMQuestBonusEffectGroup))] +public class EntityMQuestBonusEffectGroup +{ + [Key(0)] public int QuestBonusEffectGroupId { get; set; } + + [Key(1)] public int SortOrder { get; set; } + + [Key(2)] public QuestBonusType QuestBonusType { get; set; } + + [Key(3)] public int QuestBonusEffectId { get; set; } +} diff --git a/src/Models/Entities/EntityMQuestBonusExp.cs b/src/Models/Entities/EntityMQuestBonusExp.cs new file mode 100644 index 0000000..95e36cb --- /dev/null +++ b/src/Models/Entities/EntityMQuestBonusExp.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMQuestBonusExp))] +public class EntityMQuestBonusExp +{ + [Key(0)] public int QuestBonusEffectId { get; set; } + + [Key(1)] public int ExpType { get; set; } + + [Key(2)] public int BonusValuePermil { get; set; } +} diff --git a/src/Models/Entities/EntityMQuestBonusTermGroup.cs b/src/Models/Entities/EntityMQuestBonusTermGroup.cs new file mode 100644 index 0000000..0318f9d --- /dev/null +++ b/src/Models/Entities/EntityMQuestBonusTermGroup.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMQuestBonusTermGroup))] +public class EntityMQuestBonusTermGroup +{ + [Key(0)] public int QuestBonusTermGroupId { get; set; } + + [Key(1)] public int SortOrder { get; set; } + + [Key(2)] public long StartDatetime { get; set; } + + [Key(3)] public long EndDatetime { get; set; } +} diff --git a/src/Models/Entities/EntityMQuestBonusWeaponGroup.cs b/src/Models/Entities/EntityMQuestBonusWeaponGroup.cs new file mode 100644 index 0000000..c28b2d8 --- /dev/null +++ b/src/Models/Entities/EntityMQuestBonusWeaponGroup.cs @@ -0,0 +1,20 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMQuestBonusWeaponGroup))] +public class EntityMQuestBonusWeaponGroup +{ + [Key(0)] public int QuestBonusWeaponGroupId { get; set; } + + [Key(1)] public int WeaponId { get; set; } + + [Key(2)] public int LimitBreakCountLowerLimit { get; set; } + + [Key(3)] public int QuestBonusEffectGroupId { get; set; } + + [Key(4)] public int QuestBonusTermGroupId { get; set; } +} diff --git a/src/Models/Entities/EntityMQuestCampaign.cs b/src/Models/Entities/EntityMQuestCampaign.cs new file mode 100644 index 0000000..8756cff --- /dev/null +++ b/src/Models/Entities/EntityMQuestCampaign.cs @@ -0,0 +1,24 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMQuestCampaign))] +public class EntityMQuestCampaign +{ + [Key(0)] public int QuestCampaignId { get; set; } + + [Key(1)] public int QuestCampaignTargetGroupId { get; set; } + + [Key(2)] public int QuestCampaignEffectGroupId { get; set; } + + [Key(3)] public long StartDatetime { get; set; } + + [Key(4)] public long EndDatetime { get; set; } + + [Key(5)] public TargetUserStatusType TargetUserStatusType { get; set; } + + [Key(6)] public int SortOrder { get; set; } +} diff --git a/src/Models/Entities/EntityMQuestCampaignEffectGroup.cs b/src/Models/Entities/EntityMQuestCampaignEffectGroup.cs new file mode 100644 index 0000000..4cce476 --- /dev/null +++ b/src/Models/Entities/EntityMQuestCampaignEffectGroup.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMQuestCampaignEffectGroup))] +public class EntityMQuestCampaignEffectGroup +{ + [Key(0)] public int QuestCampaignEffectGroupId { get; set; } + + [Key(1)] public QuestCampaignEffectType QuestCampaignEffectType { get; set; } + + [Key(2)] public int QuestCampaignEffectValue { get; set; } + + [Key(3)] public int QuestCampaignTargetItemGroupId { get; set; } +} diff --git a/src/Models/Entities/EntityMQuestCampaignTargetGroup.cs b/src/Models/Entities/EntityMQuestCampaignTargetGroup.cs new file mode 100644 index 0000000..7a35be4 --- /dev/null +++ b/src/Models/Entities/EntityMQuestCampaignTargetGroup.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMQuestCampaignTargetGroup))] +public class EntityMQuestCampaignTargetGroup +{ + [Key(0)] public int QuestCampaignTargetGroupId { get; set; } + + [Key(1)] public int QuestCampaignTargetIndex { get; set; } + + [Key(2)] public QuestCampaignTargetType QuestCampaignTargetType { get; set; } + + [Key(3)] public int QuestCampaignTargetValue { get; set; } +} diff --git a/src/Models/Entities/EntityMQuestCampaignTargetItemGroup.cs b/src/Models/Entities/EntityMQuestCampaignTargetItemGroup.cs new file mode 100644 index 0000000..ab223a7 --- /dev/null +++ b/src/Models/Entities/EntityMQuestCampaignTargetItemGroup.cs @@ -0,0 +1,20 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMQuestCampaignTargetItemGroup))] +public class EntityMQuestCampaignTargetItemGroup +{ + [Key(0)] public int QuestCampaignTargetItemGroupId { get; set; } + + [Key(1)] public int TargetIndex { get; set; } + + [Key(2)] public PossessionType PossessionType { get; set; } + + [Key(3)] public int PossessionId { get; set; } + + [Key(4)] public int Count { get; set; } +} diff --git a/src/Models/Entities/EntityMQuestDeckMultiRestrictionGroup.cs b/src/Models/Entities/EntityMQuestDeckMultiRestrictionGroup.cs new file mode 100644 index 0000000..ebf4e17 --- /dev/null +++ b/src/Models/Entities/EntityMQuestDeckMultiRestrictionGroup.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMQuestDeckMultiRestrictionGroup))] +public class EntityMQuestDeckMultiRestrictionGroup +{ + [Key(0)] public int QuestDeckMultiRestrictionGroupId { get; set; } + + [Key(1)] public int GroupIndex { get; set; } + + [Key(2)] public int RestrictionValue { get; set; } +} diff --git a/src/Models/Entities/EntityMQuestDeckRestrictionGroup.cs b/src/Models/Entities/EntityMQuestDeckRestrictionGroup.cs new file mode 100644 index 0000000..4415b86 --- /dev/null +++ b/src/Models/Entities/EntityMQuestDeckRestrictionGroup.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMQuestDeckRestrictionGroup))] +public class EntityMQuestDeckRestrictionGroup +{ + [Key(0)] public int QuestDeckRestrictionGroupId { get; set; } + + [Key(1)] public int SlotNumber { get; set; } + + [Key(2)] public QuestDeckRestrictionType QuestDeckRestrictionType { get; set; } + + [Key(3)] public int RestrictionValue { get; set; } +} diff --git a/src/Models/Entities/EntityMQuestDeckRestrictionGroupUnlock.cs b/src/Models/Entities/EntityMQuestDeckRestrictionGroupUnlock.cs new file mode 100644 index 0000000..d609d2d --- /dev/null +++ b/src/Models/Entities/EntityMQuestDeckRestrictionGroupUnlock.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMQuestDeckRestrictionGroupUnlock))] +public class EntityMQuestDeckRestrictionGroupUnlock +{ + [Key(0)] public int QuestDeckRestrictionGroupId { get; set; } + + [Key(1)] public int UnlockEvaluateConditionId { get; set; } +} diff --git a/src/Models/Entities/EntityMQuestDisplayAttributeGroup.cs b/src/Models/Entities/EntityMQuestDisplayAttributeGroup.cs new file mode 100644 index 0000000..2becc36 --- /dev/null +++ b/src/Models/Entities/EntityMQuestDisplayAttributeGroup.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMQuestDisplayAttributeGroup))] +public class EntityMQuestDisplayAttributeGroup +{ + [Key(0)] public int QuestDisplayAttributeGroupId { get; set; } + + [Key(1)] public int SortOrder { get; set; } + + [Key(2)] public QuestDisplayAttributeType QuestDisplayAttributeType { get; set; } + + [Key(3)] public QuestDisplayAttributeIconSizeType QuestDisplayAttributeIconSizeType { get; set; } +} diff --git a/src/Models/Entities/EntityMQuestDisplayEnemyThumbnailReplace.cs b/src/Models/Entities/EntityMQuestDisplayEnemyThumbnailReplace.cs new file mode 100644 index 0000000..b549639 --- /dev/null +++ b/src/Models/Entities/EntityMQuestDisplayEnemyThumbnailReplace.cs @@ -0,0 +1,20 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMQuestDisplayEnemyThumbnailReplace))] +public class EntityMQuestDisplayEnemyThumbnailReplace +{ + [Key(0)] public int QuestId { get; set; } + + [Key(1)] public int Priority { get; set; } + + [Key(2)] public EnemyThumbnailReplaceConditionType ReplaceConditionType { get; set; } + + [Key(3)] public EnemyThumbnailReplaceMethodType ReplaceMethodType { get; set; } + + [Key(4)] public int ReplaceValue { get; set; } +} diff --git a/src/Models/Entities/EntityMQuestFirstClearRewardGroup.cs b/src/Models/Entities/EntityMQuestFirstClearRewardGroup.cs new file mode 100644 index 0000000..c836fd3 --- /dev/null +++ b/src/Models/Entities/EntityMQuestFirstClearRewardGroup.cs @@ -0,0 +1,24 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMQuestFirstClearRewardGroup))] +public class EntityMQuestFirstClearRewardGroup +{ + [Key(0)] public int QuestFirstClearRewardGroupId { get; set; } + + [Key(1)] public QuestFirstClearRewardType QuestFirstClearRewardType { get; set; } + + [Key(2)] public int SortOrder { get; set; } + + [Key(3)] public PossessionType PossessionType { get; set; } + + [Key(4)] public int PossessionId { get; set; } + + [Key(5)] public int Count { get; set; } + + [Key(6)] public bool IsPickup { get; set; } +} diff --git a/src/Models/Entities/EntityMQuestFirstClearRewardSwitch.cs b/src/Models/Entities/EntityMQuestFirstClearRewardSwitch.cs new file mode 100644 index 0000000..2e0d852 --- /dev/null +++ b/src/Models/Entities/EntityMQuestFirstClearRewardSwitch.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMQuestFirstClearRewardSwitch))] +public class EntityMQuestFirstClearRewardSwitch +{ + [Key(0)] public int QuestId { get; set; } + + [Key(1)] public int QuestFirstClearRewardGroupId { get; set; } + + [Key(2)] public int SwitchConditionClearQuestId { get; set; } +} diff --git a/src/Models/Entities/EntityMQuestMission.cs b/src/Models/Entities/EntityMQuestMission.cs new file mode 100644 index 0000000..0910a48 --- /dev/null +++ b/src/Models/Entities/EntityMQuestMission.cs @@ -0,0 +1,20 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMQuestMission))] +public class EntityMQuestMission +{ + [Key(0)] public int QuestMissionId { get; set; } + + [Key(1)] public QuestMissionConditionType QuestMissionConditionType { get; set; } + + [Key(2)] public int ConditionValue { get; set; } + + [Key(3)] public int QuestMissionRewardId { get; set; } + + [Key(4)] public int QuestMissionConditionValueGroupId { get; set; } +} diff --git a/src/Models/Entities/EntityMQuestMissionConditionValueGroup.cs b/src/Models/Entities/EntityMQuestMissionConditionValueGroup.cs new file mode 100644 index 0000000..40d169f --- /dev/null +++ b/src/Models/Entities/EntityMQuestMissionConditionValueGroup.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMQuestMissionConditionValueGroup))] +public class EntityMQuestMissionConditionValueGroup +{ + [Key(0)] public int QuestMissionConditionValueGroupId { get; set; } + + [Key(1)] public int SortOrder { get; set; } + + [Key(2)] public int ConditionValue { get; set; } +} diff --git a/src/Models/Entities/EntityMQuestMissionGroup.cs b/src/Models/Entities/EntityMQuestMissionGroup.cs new file mode 100644 index 0000000..9383178 --- /dev/null +++ b/src/Models/Entities/EntityMQuestMissionGroup.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMQuestMissionGroup))] +public class EntityMQuestMissionGroup +{ + [Key(0)] public int QuestMissionGroupId { get; set; } + + [Key(1)] public int SortOrder { get; set; } + + [Key(2)] public int QuestMissionId { get; set; } +} diff --git a/src/Models/Entities/EntityMQuestMissionReward.cs b/src/Models/Entities/EntityMQuestMissionReward.cs new file mode 100644 index 0000000..bde0564 --- /dev/null +++ b/src/Models/Entities/EntityMQuestMissionReward.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMQuestMissionReward))] +public class EntityMQuestMissionReward +{ + [Key(0)] public int QuestMissionRewardId { get; set; } + + [Key(1)] public PossessionType PossessionType { get; set; } + + [Key(2)] public int PossessionId { get; set; } + + [Key(3)] public int Count { get; set; } +} diff --git a/src/Models/Entities/EntityMQuestPickupRewardGroup.cs b/src/Models/Entities/EntityMQuestPickupRewardGroup.cs new file mode 100644 index 0000000..b1bb289 --- /dev/null +++ b/src/Models/Entities/EntityMQuestPickupRewardGroup.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMQuestPickupRewardGroup))] +public class EntityMQuestPickupRewardGroup +{ + [Key(0)] public int QuestPickupRewardGroupId { get; set; } + + [Key(1)] public int SortOrder { get; set; } + + [Key(2)] public int BattleDropRewardId { get; set; } +} diff --git a/src/Models/Entities/EntityMQuestRelationMainFlow.cs b/src/Models/Entities/EntityMQuestRelationMainFlow.cs new file mode 100644 index 0000000..1deb067 --- /dev/null +++ b/src/Models/Entities/EntityMQuestRelationMainFlow.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMQuestRelationMainFlow))] +public class EntityMQuestRelationMainFlow +{ + [Key(0)] public int MainFlowQuestId { get; set; } + + [Key(1)] public DifficultyType DifficultyType { get; set; } + + [Key(2)] public int ReplayFlowQuestId { get; set; } + + [Key(3)] public int SubFlowQuestId { get; set; } +} diff --git a/src/Models/Entities/EntityMQuestReleaseConditionBigHuntScore.cs b/src/Models/Entities/EntityMQuestReleaseConditionBigHuntScore.cs new file mode 100644 index 0000000..6f9c3e0 --- /dev/null +++ b/src/Models/Entities/EntityMQuestReleaseConditionBigHuntScore.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMQuestReleaseConditionBigHuntScore))] +public class EntityMQuestReleaseConditionBigHuntScore +{ + [Key(0)] public int QuestReleaseConditionId { get; set; } + + [Key(1)] public int BigHuntBossId { get; set; } + + [Key(2)] public long NecessaryScore { get; set; } +} diff --git a/src/Models/Entities/EntityMQuestReleaseConditionCharacterLevel.cs b/src/Models/Entities/EntityMQuestReleaseConditionCharacterLevel.cs new file mode 100644 index 0000000..f32d89c --- /dev/null +++ b/src/Models/Entities/EntityMQuestReleaseConditionCharacterLevel.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMQuestReleaseConditionCharacterLevel))] +public class EntityMQuestReleaseConditionCharacterLevel +{ + [Key(0)] public int QuestReleaseConditionId { get; set; } + + [Key(1)] public int CharacterId { get; set; } + + [Key(2)] public int CharacterLevel { get; set; } +} diff --git a/src/Models/Entities/EntityMQuestReleaseConditionDeckPower.cs b/src/Models/Entities/EntityMQuestReleaseConditionDeckPower.cs new file mode 100644 index 0000000..c2ec9a6 --- /dev/null +++ b/src/Models/Entities/EntityMQuestReleaseConditionDeckPower.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMQuestReleaseConditionDeckPower))] +public class EntityMQuestReleaseConditionDeckPower +{ + [Key(0)] public int QuestReleaseConditionId { get; set; } + + [Key(1)] public int MaxDeckPower { get; set; } +} diff --git a/src/Models/Entities/EntityMQuestReleaseConditionGroup.cs b/src/Models/Entities/EntityMQuestReleaseConditionGroup.cs new file mode 100644 index 0000000..2761288 --- /dev/null +++ b/src/Models/Entities/EntityMQuestReleaseConditionGroup.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMQuestReleaseConditionGroup))] +public class EntityMQuestReleaseConditionGroup +{ + [Key(0)] public int QuestReleaseConditionGroupId { get; set; } + + [Key(1)] public int SortOrder { get; set; } + + [Key(2)] public QuestReleaseConditionType QuestReleaseConditionType { get; set; } + + [Key(3)] public int QuestReleaseConditionId { get; set; } +} diff --git a/src/Models/Entities/EntityMQuestReleaseConditionList.cs b/src/Models/Entities/EntityMQuestReleaseConditionList.cs new file mode 100644 index 0000000..cbfa507 --- /dev/null +++ b/src/Models/Entities/EntityMQuestReleaseConditionList.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMQuestReleaseConditionList))] +public class EntityMQuestReleaseConditionList +{ + [Key(0)] public int QuestReleaseConditionListId { get; set; } + + [Key(1)] public int QuestReleaseConditionGroupId { get; set; } + + [Key(2)] public ConditionOperationType ConditionOperationType { get; set; } +} diff --git a/src/Models/Entities/EntityMQuestReleaseConditionQuestChallenge.cs b/src/Models/Entities/EntityMQuestReleaseConditionQuestChallenge.cs new file mode 100644 index 0000000..941c111 --- /dev/null +++ b/src/Models/Entities/EntityMQuestReleaseConditionQuestChallenge.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMQuestReleaseConditionQuestChallenge))] +public class EntityMQuestReleaseConditionQuestChallenge +{ + [Key(0)] public int QuestReleaseConditionId { get; set; } + + [Key(1)] public int QuestId { get; set; } +} diff --git a/src/Models/Entities/EntityMQuestReleaseConditionQuestClear.cs b/src/Models/Entities/EntityMQuestReleaseConditionQuestClear.cs new file mode 100644 index 0000000..e85d051 --- /dev/null +++ b/src/Models/Entities/EntityMQuestReleaseConditionQuestClear.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMQuestReleaseConditionQuestClear))] +public class EntityMQuestReleaseConditionQuestClear +{ + [Key(0)] public int QuestReleaseConditionId { get; set; } + + [Key(1)] public int QuestId { get; set; } +} diff --git a/src/Models/Entities/EntityMQuestReleaseConditionUserLevel.cs b/src/Models/Entities/EntityMQuestReleaseConditionUserLevel.cs new file mode 100644 index 0000000..47568ee --- /dev/null +++ b/src/Models/Entities/EntityMQuestReleaseConditionUserLevel.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMQuestReleaseConditionUserLevel))] +public class EntityMQuestReleaseConditionUserLevel +{ + [Key(0)] public int QuestReleaseConditionId { get; set; } + + [Key(1)] public int UserLevel { get; set; } +} diff --git a/src/Models/Entities/EntityMQuestReleaseConditionWeaponAcquisition.cs b/src/Models/Entities/EntityMQuestReleaseConditionWeaponAcquisition.cs new file mode 100644 index 0000000..b567068 --- /dev/null +++ b/src/Models/Entities/EntityMQuestReleaseConditionWeaponAcquisition.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMQuestReleaseConditionWeaponAcquisition))] +public class EntityMQuestReleaseConditionWeaponAcquisition +{ + [Key(0)] public int QuestReleaseConditionId { get; set; } + + [Key(1)] public int WeaponId { get; set; } +} diff --git a/src/Models/Entities/EntityMQuestReplayFlowRewardGroup.cs b/src/Models/Entities/EntityMQuestReplayFlowRewardGroup.cs new file mode 100644 index 0000000..b10bd1e --- /dev/null +++ b/src/Models/Entities/EntityMQuestReplayFlowRewardGroup.cs @@ -0,0 +1,20 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMQuestReplayFlowRewardGroup))] +public class EntityMQuestReplayFlowRewardGroup +{ + [Key(0)] public int QuestReplayFlowRewardGroupId { get; set; } + + [Key(1)] public int SortOrder { get; set; } + + [Key(2)] public PossessionType PossessionType { get; set; } + + [Key(3)] public int PossessionId { get; set; } + + [Key(4)] public int Count { get; set; } +} diff --git a/src/Models/Entities/EntityMQuestScene.cs b/src/Models/Entities/EntityMQuestScene.cs new file mode 100644 index 0000000..0b792be --- /dev/null +++ b/src/Models/Entities/EntityMQuestScene.cs @@ -0,0 +1,32 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMQuestScene))] +public class EntityMQuestScene +{ + [Key(0)] public int QuestSceneId { get; set; } + + [Key(1)] public int QuestId { get; set; } + + [Key(2)] public int SortOrder { get; set; } + + [Key(3)] public QuestSceneType QuestSceneType { get; set; } + + [Key(4)] public int AssetBackgroundId { get; set; } + + [Key(5)] public int EventMapNumberUpper { get; set; } + + [Key(6)] public int EventMapNumberLower { get; set; } + + [Key(7)] public bool IsMainFlowQuestTarget { get; set; } + + [Key(8)] public bool IsBattleOnlyTarget { get; set; } + + [Key(9)] public QuestResultType QuestResultType { get; set; } + + [Key(10)] public bool IsStorySkipTarget { get; set; } +} diff --git a/src/Models/Entities/EntityMQuestSceneBattle.cs b/src/Models/Entities/EntityMQuestSceneBattle.cs new file mode 100644 index 0000000..3c07f32 --- /dev/null +++ b/src/Models/Entities/EntityMQuestSceneBattle.cs @@ -0,0 +1,22 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMQuestSceneBattle))] +public class EntityMQuestSceneBattle +{ + [Key(0)] public int QuestSceneId { get; set; } + + [Key(1)] public int BattleGroupId { get; set; } + + [Key(2)] public int BattleDropBoxGroupId { get; set; } + + [Key(3)] public int BattleFieldLocaleSettingIndex { get; set; } + + [Key(4)] public int BattleEventGroupId { get; set; } + + [Key(5)] public int PostProcessConfigurationIndex { get; set; } +} diff --git a/src/Models/Entities/EntityMQuestSceneChoice.cs b/src/Models/Entities/EntityMQuestSceneChoice.cs new file mode 100644 index 0000000..54ef3b4 --- /dev/null +++ b/src/Models/Entities/EntityMQuestSceneChoice.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMQuestSceneChoice))] +public class EntityMQuestSceneChoice +{ + [Key(0)] public int MainFlowQuestSceneId { get; set; } + + [Key(1)] public QuestFlowType QuestFlowType { get; set; } + + [Key(2)] public int ChoiceNumber { get; set; } + + [Key(3)] public int QuestSceneChoiceEffectId { get; set; } +} diff --git a/src/Models/Entities/EntityMQuestSceneChoiceCostumeEffectGroup.cs b/src/Models/Entities/EntityMQuestSceneChoiceCostumeEffectGroup.cs new file mode 100644 index 0000000..81ac08e --- /dev/null +++ b/src/Models/Entities/EntityMQuestSceneChoiceCostumeEffectGroup.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMQuestSceneChoiceCostumeEffectGroup))] +public class EntityMQuestSceneChoiceCostumeEffectGroup +{ + [Key(0)] public int QuestSceneChoiceCostumeEffectGroupId { get; set; } + + [Key(1)] public int SortOrder { get; set; } + + [Key(2)] public int CostumeId { get; set; } +} diff --git a/src/Models/Entities/EntityMQuestSceneChoiceEffect.cs b/src/Models/Entities/EntityMQuestSceneChoiceEffect.cs new file mode 100644 index 0000000..dfa4995 --- /dev/null +++ b/src/Models/Entities/EntityMQuestSceneChoiceEffect.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMQuestSceneChoiceEffect))] +public class EntityMQuestSceneChoiceEffect +{ + [Key(0)] public int QuestSceneChoiceEffectId { get; set; } + + [Key(1)] public int QuestSceneChoiceGroupingId { get; set; } + + [Key(2)] public int QuestSceneChoiceCostumeEffectGroupId { get; set; } + + [Key(3)] public int QuestSceneChoiceWeaponEffectGroupId { get; set; } +} diff --git a/src/Models/Entities/EntityMQuestSceneChoiceWeaponEffectGroup.cs b/src/Models/Entities/EntityMQuestSceneChoiceWeaponEffectGroup.cs new file mode 100644 index 0000000..f3af91b --- /dev/null +++ b/src/Models/Entities/EntityMQuestSceneChoiceWeaponEffectGroup.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMQuestSceneChoiceWeaponEffectGroup))] +public class EntityMQuestSceneChoiceWeaponEffectGroup +{ + [Key(0)] public int QuestSceneChoiceWeaponEffectGroupId { get; set; } + + [Key(1)] public int SortOrder { get; set; } + + [Key(2)] public int WeaponId { get; set; } +} diff --git a/src/Models/Entities/EntityMQuestSceneNotConfirmTitleDialog.cs b/src/Models/Entities/EntityMQuestSceneNotConfirmTitleDialog.cs new file mode 100644 index 0000000..f18a3b1 --- /dev/null +++ b/src/Models/Entities/EntityMQuestSceneNotConfirmTitleDialog.cs @@ -0,0 +1,12 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMQuestSceneNotConfirmTitleDialog))] +public class EntityMQuestSceneNotConfirmTitleDialog +{ + [Key(0)] public int QuestSceneId { get; set; } +} diff --git a/src/Models/Entities/EntityMQuestSceneOutgameBlendshapeMotion.cs b/src/Models/Entities/EntityMQuestSceneOutgameBlendshapeMotion.cs new file mode 100644 index 0000000..cdc1f64 --- /dev/null +++ b/src/Models/Entities/EntityMQuestSceneOutgameBlendshapeMotion.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMQuestSceneOutgameBlendshapeMotion))] +public class EntityMQuestSceneOutgameBlendshapeMotion +{ + [Key(0)] public int QuestSceneId { get; set; } + + [Key(1)] public int ActorAnimationId { get; set; } +} diff --git a/src/Models/Entities/EntityMQuestScenePictureBookReplace.cs b/src/Models/Entities/EntityMQuestScenePictureBookReplace.cs new file mode 100644 index 0000000..410437c --- /dev/null +++ b/src/Models/Entities/EntityMQuestScenePictureBookReplace.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMQuestScenePictureBookReplace))] +public class EntityMQuestScenePictureBookReplace +{ + [Key(0)] public int QuestSceneId { get; set; } + + [Key(1)] public int PictureBookNameQuestTextId { get; set; } + + [Key(2)] public bool IsExcludeSubflow { get; set; } + + [Key(3)] public bool IsExcludeRecollection { get; set; } +} diff --git a/src/Models/Entities/EntityMQuestSchedule.cs b/src/Models/Entities/EntityMQuestSchedule.cs new file mode 100644 index 0000000..14be11f --- /dev/null +++ b/src/Models/Entities/EntityMQuestSchedule.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMQuestSchedule))] +public class EntityMQuestSchedule +{ + [Key(0)] public int QuestScheduleId { get; set; } + + [Key(1)] public string QuestScheduleCronExpression { get; set; } + + [Key(2)] public long StartDatetime { get; set; } + + [Key(3)] public long EndDatetime { get; set; } +} diff --git a/src/Models/Entities/EntityMQuestScheduleCorrespondence.cs b/src/Models/Entities/EntityMQuestScheduleCorrespondence.cs new file mode 100644 index 0000000..a7f49dc --- /dev/null +++ b/src/Models/Entities/EntityMQuestScheduleCorrespondence.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMQuestScheduleCorrespondence))] +public class EntityMQuestScheduleCorrespondence +{ + [Key(0)] public int QuestId { get; set; } + + [Key(1)] public int QuestScheduleId { get; set; } +} diff --git a/src/Models/Entities/EntityMReport.cs b/src/Models/Entities/EntityMReport.cs new file mode 100644 index 0000000..713e720 --- /dev/null +++ b/src/Models/Entities/EntityMReport.cs @@ -0,0 +1,20 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMReport))] +public class EntityMReport +{ + [Key(0)] public int ReportId { get; set; } + + [Key(1)] public int MainQuestSeasonId { get; set; } + + [Key(2)] public int CharacterId { get; set; } + + [Key(3)] public int ReportNumber { get; set; } + + [Key(4)] public int ReportAssetId { get; set; } +} diff --git a/src/Models/Entities/EntityMShop.cs b/src/Models/Entities/EntityMShop.cs new file mode 100644 index 0000000..4cf90f4 --- /dev/null +++ b/src/Models/Entities/EntityMShop.cs @@ -0,0 +1,34 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMShop))] +public class EntityMShop +{ + [Key(0)] public int ShopId { get; set; } + + [Key(1)] public ShopGroupType ShopGroupType { get; set; } + + [Key(2)] public int SortOrderInShopGroup { get; set; } + + [Key(3)] public ShopType ShopType { get; set; } + + [Key(4)] public int NameShopTextId { get; set; } + + [Key(5)] public ShopUpdatableLabelType ShopUpdatableLabelType { get; set; } + + [Key(6)] public ShopExchangeType ShopExchangeType { get; set; } + + [Key(7)] public int ShopItemCellGroupId { get; set; } + + [Key(8)] public MainFunctionType RelatedMainFunctionType { get; set; } + + [Key(9)] public long StartDatetime { get; set; } + + [Key(10)] public long EndDatetime { get; set; } + + [Key(11)] public int LimitedOpenId { get; set; } +} diff --git a/src/Models/Entities/EntityMShopDisplayPrice.cs b/src/Models/Entities/EntityMShopDisplayPrice.cs new file mode 100644 index 0000000..d0c6c0d --- /dev/null +++ b/src/Models/Entities/EntityMShopDisplayPrice.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMShopDisplayPrice))] +public class EntityMShopDisplayPrice +{ + [Key(0)] public PriceType PriceType { get; set; } + + [Key(1)] public int PriceId { get; set; } + + [Key(2)] public int SortOrder { get; set; } +} diff --git a/src/Models/Entities/EntityMShopItem.cs b/src/Models/Entities/EntityMShopItem.cs new file mode 100644 index 0000000..0a1660c --- /dev/null +++ b/src/Models/Entities/EntityMShopItem.cs @@ -0,0 +1,36 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMShopItem))] +public class EntityMShopItem +{ + [Key(0)] public int ShopItemId { get; set; } + + [Key(1)] public int NameShopTextId { get; set; } + + [Key(2)] public int DescriptionShopTextId { get; set; } + + [Key(3)] public int ShopItemContentType { get; set; } + + [Key(4)] public PriceType PriceType { get; set; } + + [Key(5)] public int PriceId { get; set; } + + [Key(6)] public int Price { get; set; } + + [Key(7)] public int RegularPrice { get; set; } + + [Key(8)] public ShopPromotionType ShopPromotionType { get; set; } + + [Key(9)] public int ShopItemLimitedStockId { get; set; } + + [Key(10)] public int AssetCategoryId { get; set; } + + [Key(11)] public int AssetVariationId { get; set; } + + [Key(12)] public ShopItemDecorationType ShopItemDecorationType { get; set; } +} diff --git a/src/Models/Entities/EntityMShopItemAdditionalContent.cs b/src/Models/Entities/EntityMShopItemAdditionalContent.cs new file mode 100644 index 0000000..155b715 --- /dev/null +++ b/src/Models/Entities/EntityMShopItemAdditionalContent.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMShopItemAdditionalContent))] +public class EntityMShopItemAdditionalContent +{ + [Key(0)] public int ShopItemAdditionalContentId { get; set; } + + [Key(1)] public PossessionType PossessionType { get; set; } + + [Key(2)] public int PossessionId { get; set; } + + [Key(3)] public int Count { get; set; } +} diff --git a/src/Models/Entities/EntityMShopItemCell.cs b/src/Models/Entities/EntityMShopItemCell.cs new file mode 100644 index 0000000..bd5d45b --- /dev/null +++ b/src/Models/Entities/EntityMShopItemCell.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMShopItemCell))] +public class EntityMShopItemCell +{ + [Key(0)] public int ShopItemCellId { get; set; } + + [Key(1)] public int StepNumber { get; set; } + + [Key(2)] public int ShopItemId { get; set; } +} diff --git a/src/Models/Entities/EntityMShopItemCellGroup.cs b/src/Models/Entities/EntityMShopItemCellGroup.cs new file mode 100644 index 0000000..b2b6118 --- /dev/null +++ b/src/Models/Entities/EntityMShopItemCellGroup.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMShopItemCellGroup))] +public class EntityMShopItemCellGroup +{ + [Key(0)] public int ShopItemCellGroupId { get; set; } + + [Key(1)] public int ShopItemCellId { get; set; } + + [Key(2)] public int SortOrder { get; set; } + + [Key(3)] public int ShopItemCellTermId { get; set; } +} diff --git a/src/Models/Entities/EntityMShopItemCellLimitedOpen.cs b/src/Models/Entities/EntityMShopItemCellLimitedOpen.cs new file mode 100644 index 0000000..23bd043 --- /dev/null +++ b/src/Models/Entities/EntityMShopItemCellLimitedOpen.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMShopItemCellLimitedOpen))] +public class EntityMShopItemCellLimitedOpen +{ + [Key(0)] public int ShopItemCellId { get; set; } + + [Key(1)] public int LimitedOpenId { get; set; } +} diff --git a/src/Models/Entities/EntityMShopItemCellTerm.cs b/src/Models/Entities/EntityMShopItemCellTerm.cs new file mode 100644 index 0000000..dc47362 --- /dev/null +++ b/src/Models/Entities/EntityMShopItemCellTerm.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMShopItemCellTerm))] +public class EntityMShopItemCellTerm +{ + [Key(0)] public int ShopItemCellTermId { get; set; } + + [Key(1)] public long StartDatetime { get; set; } + + [Key(2)] public long EndDatetime { get; set; } +} diff --git a/src/Models/Entities/EntityMShopItemContentEffect.cs b/src/Models/Entities/EntityMShopItemContentEffect.cs new file mode 100644 index 0000000..7c39e98 --- /dev/null +++ b/src/Models/Entities/EntityMShopItemContentEffect.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMShopItemContentEffect))] +public class EntityMShopItemContentEffect +{ + [Key(0)] public int ShopItemId { get; set; } + + [Key(1)] public EffectTargetType EffectTargetType { get; set; } + + [Key(2)] public EffectValueType EffectValueType { get; set; } + + [Key(3)] public int EffectValue { get; set; } +} diff --git a/src/Models/Entities/EntityMShopItemContentMission.cs b/src/Models/Entities/EntityMShopItemContentMission.cs new file mode 100644 index 0000000..44d2257 --- /dev/null +++ b/src/Models/Entities/EntityMShopItemContentMission.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMShopItemContentMission))] +public class EntityMShopItemContentMission +{ + [Key(0)] public int ShopItemId { get; set; } + + [Key(1)] public int MissionGroupId { get; set; } + + [Key(2)] public bool IsReevaluateOnGrant { get; set; } +} diff --git a/src/Models/Entities/EntityMShopItemContentPossession.cs b/src/Models/Entities/EntityMShopItemContentPossession.cs new file mode 100644 index 0000000..3580c7d --- /dev/null +++ b/src/Models/Entities/EntityMShopItemContentPossession.cs @@ -0,0 +1,20 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMShopItemContentPossession))] +public class EntityMShopItemContentPossession +{ + [Key(0)] public int ShopItemId { get; set; } + + [Key(1)] public PossessionType PossessionType { get; set; } + + [Key(2)] public int PossessionId { get; set; } + + [Key(3)] public int SortOrder { get; set; } + + [Key(4)] public int Count { get; set; } +} diff --git a/src/Models/Entities/EntityMShopItemLimitedStock.cs b/src/Models/Entities/EntityMShopItemLimitedStock.cs new file mode 100644 index 0000000..de2e6d6 --- /dev/null +++ b/src/Models/Entities/EntityMShopItemLimitedStock.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMShopItemLimitedStock))] +public class EntityMShopItemLimitedStock +{ + [Key(0)] public int ShopItemLimitedStockId { get; set; } + + [Key(1)] public int MaxCount { get; set; } + + [Key(2)] public AutoResetType ShopItemAutoResetType { get; set; } + + [Key(3)] public int ShopItemAutoResetPeriod { get; set; } +} diff --git a/src/Models/Entities/EntityMShopItemUserLevelCondition.cs b/src/Models/Entities/EntityMShopItemUserLevelCondition.cs new file mode 100644 index 0000000..da53fef --- /dev/null +++ b/src/Models/Entities/EntityMShopItemUserLevelCondition.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMShopItemUserLevelCondition))] +public class EntityMShopItemUserLevelCondition +{ + [Key(0)] public int ShopItemId { get; set; } + + [Key(1)] public int UserLevelUpperLimit { get; set; } + + [Key(2)] public int UserLevelLowerLimit { get; set; } + + [Key(3)] public int ShopItemAdditionalContentId { get; set; } +} diff --git a/src/Models/Entities/EntityMShopReplaceableGem.cs b/src/Models/Entities/EntityMShopReplaceableGem.cs new file mode 100644 index 0000000..111bffe --- /dev/null +++ b/src/Models/Entities/EntityMShopReplaceableGem.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMShopReplaceableGem))] +public class EntityMShopReplaceableGem +{ + [Key(0)] public int LineupUpdateCountLowerLimit { get; set; } + + [Key(1)] public int NecessaryGem { get; set; } +} diff --git a/src/Models/Entities/EntityMSideStoryQuest.cs b/src/Models/Entities/EntityMSideStoryQuest.cs new file mode 100644 index 0000000..12eb009 --- /dev/null +++ b/src/Models/Entities/EntityMSideStoryQuest.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSideStoryQuest))] +public class EntityMSideStoryQuest +{ + [Key(0)] public int SideStoryQuestId { get; set; } + + [Key(1)] public int SideStoryQuestType { get; set; } + + [Key(2)] public int TargetId { get; set; } +} diff --git a/src/Models/Entities/EntityMSideStoryQuestLimitContent.cs b/src/Models/Entities/EntityMSideStoryQuestLimitContent.cs new file mode 100644 index 0000000..73c99d6 --- /dev/null +++ b/src/Models/Entities/EntityMSideStoryQuestLimitContent.cs @@ -0,0 +1,20 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSideStoryQuestLimitContent))] +public class EntityMSideStoryQuestLimitContent +{ + [Key(0)] public int SideStoryQuestLimitContentId { get; set; } + + [Key(1)] public int CharacterId { get; set; } + + [Key(2)] public int EventQuestChapterId { get; set; } + + [Key(3)] public DifficultyType DifficultyType { get; set; } + + [Key(4)] public int NextSideStoryQuestId { get; set; } +} diff --git a/src/Models/Entities/EntityMSideStoryQuestScene.cs b/src/Models/Entities/EntityMSideStoryQuestScene.cs new file mode 100644 index 0000000..7404d08 --- /dev/null +++ b/src/Models/Entities/EntityMSideStoryQuestScene.cs @@ -0,0 +1,22 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSideStoryQuestScene))] +public class EntityMSideStoryQuestScene +{ + [Key(0)] public int SideStoryQuestId { get; set; } + + [Key(1)] public int SideStoryQuestSceneId { get; set; } + + [Key(2)] public int SortOrder { get; set; } + + [Key(3)] public int AssetBackgroundId { get; set; } + + [Key(4)] public int EventMapNumberUpper { get; set; } + + [Key(5)] public int EventMapNumberLower { get; set; } +} diff --git a/src/Models/Entities/EntityMSkill.cs b/src/Models/Entities/EntityMSkill.cs new file mode 100644 index 0000000..20a2dcf --- /dev/null +++ b/src/Models/Entities/EntityMSkill.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkill))] +public class EntityMSkill +{ + [Key(0)] public int SkillId { get; set; } + + [Key(1)] public int SkillLevelGroupId { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillAbnormal.cs b/src/Models/Entities/EntityMSkillAbnormal.cs new file mode 100644 index 0000000..855e6ac --- /dev/null +++ b/src/Models/Entities/EntityMSkillAbnormal.cs @@ -0,0 +1,20 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillAbnormal))] +public class EntityMSkillAbnormal +{ + [Key(0)] public int SkillAbnormalId { get; set; } + + [Key(1)] public int SkillAbnormalTypeId { get; set; } + + [Key(2)] public AbnormalPolarityType AbnormalPolarityType { get; set; } + + [Key(3)] public int SkillAbnormalLifetimeId { get; set; } + + [Key(4)] public int SkillAbnormalBehaviourGroupId { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillAbnormalBehaviour.cs b/src/Models/Entities/EntityMSkillAbnormalBehaviour.cs new file mode 100644 index 0000000..781c4a4 --- /dev/null +++ b/src/Models/Entities/EntityMSkillAbnormalBehaviour.cs @@ -0,0 +1,20 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillAbnormalBehaviour))] +public class EntityMSkillAbnormalBehaviour +{ + [Key(0)] public int SkillAbnormalBehaviourId { get; set; } + + [Key(1)] public AbnormalBehaviourActionType AbnormalBehaviourActionType { get; set; } + + [Key(2)] public AbnormalBehaviourActivationMethodType AbnormalBehaviourActivationMethodType { get; set; } + + [Key(3)] public AbnormalBehaviourDeactivationMethodType AbnormalBehaviourDeactivationMethodType { get; set; } + + [Key(4)] public int SkillAbnormalBehaviourActionId { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillAbnormalBehaviourActionAbnormalResistance.cs b/src/Models/Entities/EntityMSkillAbnormalBehaviourActionAbnormalResistance.cs new file mode 100644 index 0000000..d775ae1 --- /dev/null +++ b/src/Models/Entities/EntityMSkillAbnormalBehaviourActionAbnormalResistance.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillAbnormalBehaviourActionAbnormalResistance))] +public class EntityMSkillAbnormalBehaviourActionAbnormalResistance +{ + [Key(0)] public int SkillAbnormalBehaviourActionId { get; set; } + + [Key(1)] public AbnormalResistancePolarityType AbnormalResistancePolarityType { get; set; } + + [Key(2)] public int AbnormalResistanceSkillAbnormalTypeId { get; set; } + + [Key(3)] public int BlockProbabilityPermil { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillAbnormalBehaviourActionAttributeDamageCorrection.cs b/src/Models/Entities/EntityMSkillAbnormalBehaviourActionAttributeDamageCorrection.cs new file mode 100644 index 0000000..149fd70 --- /dev/null +++ b/src/Models/Entities/EntityMSkillAbnormalBehaviourActionAttributeDamageCorrection.cs @@ -0,0 +1,22 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillAbnormalBehaviourActionAttributeDamageCorrection))] +public class EntityMSkillAbnormalBehaviourActionAttributeDamageCorrection +{ + [Key(0)] public int SkillAbnormalBehaviourActionId { get; set; } + + [Key(1)] public AttributeType AttributeType { get; set; } + + [Key(2)] public CorrectionTargetDamageType CorrectionTargetDamageType { get; set; } + + [Key(3)] public int CorrectionValuePermil { get; set; } + + [Key(4)] public DamageCorrectionOverlapType DamageCorrectionOverlapType { get; set; } + + [Key(5)] public bool IsExcepting { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillAbnormalBehaviourActionBuffResistance.cs b/src/Models/Entities/EntityMSkillAbnormalBehaviourActionBuffResistance.cs new file mode 100644 index 0000000..acfc905 --- /dev/null +++ b/src/Models/Entities/EntityMSkillAbnormalBehaviourActionBuffResistance.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillAbnormalBehaviourActionBuffResistance))] +public class EntityMSkillAbnormalBehaviourActionBuffResistance +{ + [Key(0)] public int SkillAbnormalBehaviourActionId { get; set; } + + [Key(1)] public BuffResistanceType BuffResistanceType { get; set; } + + [Key(2)] public BuffResistanceStatusKindType BuffResistanceStatusKindType { get; set; } + + [Key(3)] public int BlockProbabilityPermil { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillAbnormalBehaviourActionDamage.cs b/src/Models/Entities/EntityMSkillAbnormalBehaviourActionDamage.cs new file mode 100644 index 0000000..73d51c4 --- /dev/null +++ b/src/Models/Entities/EntityMSkillAbnormalBehaviourActionDamage.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillAbnormalBehaviourActionDamage))] +public class EntityMSkillAbnormalBehaviourActionDamage +{ + [Key(0)] public int SkillAbnormalBehaviourActionId { get; set; } + + [Key(1)] public AbnormalBehaviourDamageType AbnormalBehaviourDamageType { get; set; } + + [Key(2)] public int Power { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillAbnormalBehaviourActionDamageMultiply.cs b/src/Models/Entities/EntityMSkillAbnormalBehaviourActionDamageMultiply.cs new file mode 100644 index 0000000..b983c62 --- /dev/null +++ b/src/Models/Entities/EntityMSkillAbnormalBehaviourActionDamageMultiply.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillAbnormalBehaviourActionDamageMultiply))] +public class EntityMSkillAbnormalBehaviourActionDamageMultiply +{ + [Key(0)] public int SkillAbnormalBehaviourActionId { get; set; } + + [Key(1)] public DamageMultiplyDetailType DamageMultiplyDetailType { get; set; } + + [Key(2)] public DamageMultiplyTargetType DamageMultiplyTargetType { get; set; } + + [Key(3)] public int DamageMultiplyAbnormalDetailId { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillAbnormalBehaviourActionDamageMultiplyDetailAlways.cs b/src/Models/Entities/EntityMSkillAbnormalBehaviourActionDamageMultiplyDetailAlways.cs new file mode 100644 index 0000000..d199173 --- /dev/null +++ b/src/Models/Entities/EntityMSkillAbnormalBehaviourActionDamageMultiplyDetailAlways.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillAbnormalBehaviourActionDamageMultiplyDetailAlways))] +public class EntityMSkillAbnormalBehaviourActionDamageMultiplyDetailAlways +{ + [Key(0)] public int DamageMultiplyAbnormalDetailId { get; set; } + + [Key(1)] public int DamageMultiplyCoefficientValuePermil { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillAbnormalBehaviourActionDefaultSkillLottery.cs b/src/Models/Entities/EntityMSkillAbnormalBehaviourActionDefaultSkillLottery.cs new file mode 100644 index 0000000..b1fb6c7 --- /dev/null +++ b/src/Models/Entities/EntityMSkillAbnormalBehaviourActionDefaultSkillLottery.cs @@ -0,0 +1,20 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillAbnormalBehaviourActionDefaultSkillLottery))] +public class EntityMSkillAbnormalBehaviourActionDefaultSkillLottery +{ + [Key(0)] public int SkillAbnormalBehaviourActionId { get; set; } + + [Key(1)] public int TargetCountLower { get; set; } + + [Key(2)] public int TargetCountUpper { get; set; } + + [Key(3)] public int ValuePermil { get; set; } + + [Key(4)] public int CalculationType { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillAbnormalBehaviourActionHitRatioDown.cs b/src/Models/Entities/EntityMSkillAbnormalBehaviourActionHitRatioDown.cs new file mode 100644 index 0000000..98adb53 --- /dev/null +++ b/src/Models/Entities/EntityMSkillAbnormalBehaviourActionHitRatioDown.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillAbnormalBehaviourActionHitRatioDown))] +public class EntityMSkillAbnormalBehaviourActionHitRatioDown +{ + [Key(0)] public int SkillAbnormalBehaviourActionId { get; set; } + + [Key(1)] public int Value { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillAbnormalBehaviourActionModifyHateValue.cs b/src/Models/Entities/EntityMSkillAbnormalBehaviourActionModifyHateValue.cs new file mode 100644 index 0000000..a7dd4d5 --- /dev/null +++ b/src/Models/Entities/EntityMSkillAbnormalBehaviourActionModifyHateValue.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillAbnormalBehaviourActionModifyHateValue))] +public class EntityMSkillAbnormalBehaviourActionModifyHateValue +{ + [Key(0)] public int SkillAbnormalBehaviourActionId { get; set; } + + [Key(1)] public HateValueCalculationType HateValueCalculationType { get; set; } + + [Key(2)] public int ModifyValue { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillAbnormalBehaviourActionOverrideEvasionValue.cs b/src/Models/Entities/EntityMSkillAbnormalBehaviourActionOverrideEvasionValue.cs new file mode 100644 index 0000000..348c98c --- /dev/null +++ b/src/Models/Entities/EntityMSkillAbnormalBehaviourActionOverrideEvasionValue.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillAbnormalBehaviourActionOverrideEvasionValue))] +public class EntityMSkillAbnormalBehaviourActionOverrideEvasionValue +{ + [Key(0)] public int SkillAbnormalBehaviourActionId { get; set; } + + [Key(1)] public int CorrectionValuePermil { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillAbnormalBehaviourActionOverrideHitEffect.cs b/src/Models/Entities/EntityMSkillAbnormalBehaviourActionOverrideHitEffect.cs new file mode 100644 index 0000000..1bad47f --- /dev/null +++ b/src/Models/Entities/EntityMSkillAbnormalBehaviourActionOverrideHitEffect.cs @@ -0,0 +1,28 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillAbnormalBehaviourActionOverrideHitEffect))] +public class EntityMSkillAbnormalBehaviourActionOverrideHitEffect +{ + [Key(0)] public int SkillAbnormalBehaviourActionId { get; set; } + + [Key(1)] public int OverrideEffectId { get; set; } + + [Key(2)] public int OverrideSeId { get; set; } + + [Key(3)] public int Priority { get; set; } + + [Key(4)] public bool DisablePlayHitVoice { get; set; } + + [Key(5)] public bool PlayOnMiss { get; set; } + + [Key(6)] public bool ForceRotateOnHit { get; set; } + + [Key(7)] public int OverrideHitEffectConditionGroupId { get; set; } + + [Key(8)] public int OverrideHitEffectConditionOperationType { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillAbnormalBehaviourActionRecovery.cs b/src/Models/Entities/EntityMSkillAbnormalBehaviourActionRecovery.cs new file mode 100644 index 0000000..3e4edd9 --- /dev/null +++ b/src/Models/Entities/EntityMSkillAbnormalBehaviourActionRecovery.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillAbnormalBehaviourActionRecovery))] +public class EntityMSkillAbnormalBehaviourActionRecovery +{ + [Key(0)] public int SkillAbnormalBehaviourActionId { get; set; } + + [Key(1)] public AbnormalBehaviourRecoveryType AbnormalBehaviourRecoveryType { get; set; } + + [Key(2)] public int Value { get; set; } + + [Key(3)] public int Upper { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillAbnormalBehaviourActionTurnRestriction.cs b/src/Models/Entities/EntityMSkillAbnormalBehaviourActionTurnRestriction.cs new file mode 100644 index 0000000..8dba3d9 --- /dev/null +++ b/src/Models/Entities/EntityMSkillAbnormalBehaviourActionTurnRestriction.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillAbnormalBehaviourActionTurnRestriction))] +public class EntityMSkillAbnormalBehaviourActionTurnRestriction +{ + [Key(0)] public int SkillBehaviourActionId { get; set; } + + [Key(1)] public int TurnRestrictionProbabilityPermil { get; set; } + + [Key(2)] public AbnormalBehaviourTurnRestrictionSkillType AbnormalBehaviourTurnRestrictionSkillType { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillAbnormalBehaviourGroup.cs b/src/Models/Entities/EntityMSkillAbnormalBehaviourGroup.cs new file mode 100644 index 0000000..a88ddaf --- /dev/null +++ b/src/Models/Entities/EntityMSkillAbnormalBehaviourGroup.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillAbnormalBehaviourGroup))] +public class EntityMSkillAbnormalBehaviourGroup +{ + [Key(0)] public int SkillAbnormalBehaviourGroupId { get; set; } + + [Key(1)] public int AbnormalBehaviourIndex { get; set; } + + [Key(2)] public int SkillAbnormalBehaviourId { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillAbnormalDamageMultiplyDetailAbnormal.cs b/src/Models/Entities/EntityMSkillAbnormalDamageMultiplyDetailAbnormal.cs new file mode 100644 index 0000000..056364e --- /dev/null +++ b/src/Models/Entities/EntityMSkillAbnormalDamageMultiplyDetailAbnormal.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillAbnormalDamageMultiplyDetailAbnormal))] +public class EntityMSkillAbnormalDamageMultiplyDetailAbnormal +{ + [Key(0)] public int DamageMultiplyAbnormalDetailId { get; set; } + + [Key(1)] public int SkillDamageMultiplyAbnormalAttachedValueGroupId { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillAbnormalDamageMultiplyDetailBuffAttached.cs b/src/Models/Entities/EntityMSkillAbnormalDamageMultiplyDetailBuffAttached.cs new file mode 100644 index 0000000..6aedc77 --- /dev/null +++ b/src/Models/Entities/EntityMSkillAbnormalDamageMultiplyDetailBuffAttached.cs @@ -0,0 +1,20 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillAbnormalDamageMultiplyDetailBuffAttached))] +public class EntityMSkillAbnormalDamageMultiplyDetailBuffAttached +{ + [Key(0)] public int DamageMultiplyAbnormalDetailId { get; set; } + + [Key(1)] public int BuffAttachedTargetType { get; set; } + + [Key(2)] public int TargetBuffType { get; set; } + + [Key(3)] public int TargetStatusKindType { get; set; } + + [Key(4)] public int DamageMultiplyCoefficientValuePermil { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillAbnormalDamageMultiplyDetailCritical.cs b/src/Models/Entities/EntityMSkillAbnormalDamageMultiplyDetailCritical.cs new file mode 100644 index 0000000..1a3b396 --- /dev/null +++ b/src/Models/Entities/EntityMSkillAbnormalDamageMultiplyDetailCritical.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillAbnormalDamageMultiplyDetailCritical))] +public class EntityMSkillAbnormalDamageMultiplyDetailCritical +{ + [Key(0)] public int DamageMultiplyAbnormalDetailId { get; set; } + + [Key(1)] public bool IsCritical { get; set; } + + [Key(2)] public int DamageMultiplyCoefficientValuePermil { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillAbnormalDamageMultiplyDetailHitIndex.cs b/src/Models/Entities/EntityMSkillAbnormalDamageMultiplyDetailHitIndex.cs new file mode 100644 index 0000000..4509987 --- /dev/null +++ b/src/Models/Entities/EntityMSkillAbnormalDamageMultiplyDetailHitIndex.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillAbnormalDamageMultiplyDetailHitIndex))] +public class EntityMSkillAbnormalDamageMultiplyDetailHitIndex +{ + [Key(0)] public int DamageMultiplyAbnormalDetailId { get; set; } + + [Key(1)] public int SkillDamageMultiplyHitIndexValueGroupId { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillAbnormalDamageMultiplyDetailSkillfulWeapon.cs b/src/Models/Entities/EntityMSkillAbnormalDamageMultiplyDetailSkillfulWeapon.cs new file mode 100644 index 0000000..469cca0 --- /dev/null +++ b/src/Models/Entities/EntityMSkillAbnormalDamageMultiplyDetailSkillfulWeapon.cs @@ -0,0 +1,20 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillAbnormalDamageMultiplyDetailSkillfulWeapon))] +public class EntityMSkillAbnormalDamageMultiplyDetailSkillfulWeapon +{ + [Key(0)] public int DamageMultiplyAbnormalDetailId { get; set; } + + [Key(1)] public int ConditionTargetType { get; set; } + + [Key(2)] public WeaponType WeaponType { get; set; } + + [Key(3)] public bool IsSkillfulMainWeapon { get; set; } + + [Key(4)] public int DamageMultiplyCoefficientValuePermil { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillAbnormalLifetime.cs b/src/Models/Entities/EntityMSkillAbnormalLifetime.cs new file mode 100644 index 0000000..7177f3a --- /dev/null +++ b/src/Models/Entities/EntityMSkillAbnormalLifetime.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillAbnormalLifetime))] +public class EntityMSkillAbnormalLifetime +{ + [Key(0)] public int SkillAbnormalLifetimeId { get; set; } + + [Key(1)] public int SkillAbnormalLifetimeBehaviourGroupId { get; set; } + + [Key(2)] public AbnormalLifetimeBehaviourConditionType AbnormalLifetimeBehaviourConditionType { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillAbnormalLifetimeBehaviourActivateCount.cs b/src/Models/Entities/EntityMSkillAbnormalLifetimeBehaviourActivateCount.cs new file mode 100644 index 0000000..6bd039d --- /dev/null +++ b/src/Models/Entities/EntityMSkillAbnormalLifetimeBehaviourActivateCount.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillAbnormalLifetimeBehaviourActivateCount))] +public class EntityMSkillAbnormalLifetimeBehaviourActivateCount +{ + [Key(0)] public int SkillAbnormalLifetimeBehaviourId { get; set; } + + [Key(1)] public int ActivateCount { get; set; } + + [Key(2)] public int AbnormalBehaviourIndex { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillAbnormalLifetimeBehaviourFrameCount.cs b/src/Models/Entities/EntityMSkillAbnormalLifetimeBehaviourFrameCount.cs new file mode 100644 index 0000000..cb29fc6 --- /dev/null +++ b/src/Models/Entities/EntityMSkillAbnormalLifetimeBehaviourFrameCount.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillAbnormalLifetimeBehaviourFrameCount))] +public class EntityMSkillAbnormalLifetimeBehaviourFrameCount +{ + [Key(0)] public int SkillAbnormalLifetimeBehaviourId { get; set; } + + [Key(1)] public int FrameCount { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillAbnormalLifetimeBehaviourGroup.cs b/src/Models/Entities/EntityMSkillAbnormalLifetimeBehaviourGroup.cs new file mode 100644 index 0000000..bdc141d --- /dev/null +++ b/src/Models/Entities/EntityMSkillAbnormalLifetimeBehaviourGroup.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillAbnormalLifetimeBehaviourGroup))] +public class EntityMSkillAbnormalLifetimeBehaviourGroup +{ + [Key(0)] public int SkillAbnormalLifetimeBehaviourGroupId { get; set; } + + [Key(1)] public int AbnormalLifetimeBehaviourIndex { get; set; } + + [Key(2)] public AbnormalLifetimeMethodType AbnormalLifetimeMethodType { get; set; } + + [Key(3)] public int SkillAbnormalLifetimeBehaviourId { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillAbnormalLifetimeBehaviourReceiveDamageCount.cs b/src/Models/Entities/EntityMSkillAbnormalLifetimeBehaviourReceiveDamageCount.cs new file mode 100644 index 0000000..b5f441e --- /dev/null +++ b/src/Models/Entities/EntityMSkillAbnormalLifetimeBehaviourReceiveDamageCount.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillAbnormalLifetimeBehaviourReceiveDamageCount))] +public class EntityMSkillAbnormalLifetimeBehaviourReceiveDamageCount +{ + [Key(0)] public int SkillAbnormalLifetimeBehaviourId { get; set; } + + [Key(1)] public int ReceiveDamageCount { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillAbnormalLifetimeBehaviourTurnCount.cs b/src/Models/Entities/EntityMSkillAbnormalLifetimeBehaviourTurnCount.cs new file mode 100644 index 0000000..09b582d --- /dev/null +++ b/src/Models/Entities/EntityMSkillAbnormalLifetimeBehaviourTurnCount.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillAbnormalLifetimeBehaviourTurnCount))] +public class EntityMSkillAbnormalLifetimeBehaviourTurnCount +{ + [Key(0)] public int SkillAbnormalLifetimeBehaviourId { get; set; } + + [Key(1)] public int TurnCount { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillBehaviour.cs b/src/Models/Entities/EntityMSkillBehaviour.cs new file mode 100644 index 0000000..f6542fe --- /dev/null +++ b/src/Models/Entities/EntityMSkillBehaviour.cs @@ -0,0 +1,28 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillBehaviour))] +public class EntityMSkillBehaviour +{ + [Key(0)] public int SkillBehaviourId { get; set; } + + [Key(1)] public SkillBehaviourType SkillBehaviourType { get; set; } + + [Key(2)] public int SkillBehaviourActionId { get; set; } + + [Key(3)] public int SkillBehaviourActivationMethodId { get; set; } + + [Key(4)] public int SkillBehaviourAssetCalculatorId { get; set; } + + [Key(5)] public int HitRatioPermil { get; set; } + + [Key(6)] public SkillBehaviourLifetimeCalculationMethodType SkillBehaviourLifetimeCalculationMethodType { get; set; } + + [Key(7)] public int LifetimeCount { get; set; } + + [Key(8)] public int SkillTargetScopeAssetCalculatorId { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillBehaviourActionAbnormal.cs b/src/Models/Entities/EntityMSkillBehaviourActionAbnormal.cs new file mode 100644 index 0000000..4755443 --- /dev/null +++ b/src/Models/Entities/EntityMSkillBehaviourActionAbnormal.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillBehaviourActionAbnormal))] +public class EntityMSkillBehaviourActionAbnormal +{ + [Key(0)] public int SkillBehaviourActionId { get; set; } + + [Key(1)] public int SkillBehaviourAbnormalId { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillBehaviourActionActiveSkillDamageCorrection.cs b/src/Models/Entities/EntityMSkillBehaviourActionActiveSkillDamageCorrection.cs new file mode 100644 index 0000000..60a1e1f --- /dev/null +++ b/src/Models/Entities/EntityMSkillBehaviourActionActiveSkillDamageCorrection.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillBehaviourActionActiveSkillDamageCorrection))] +public class EntityMSkillBehaviourActionActiveSkillDamageCorrection +{ + [Key(0)] public int SkillBehaviourActionId { get; set; } + + [Key(1)] public int CorrectionValuePermil { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillBehaviourActionAdvanceActiveSkillCooltime.cs b/src/Models/Entities/EntityMSkillBehaviourActionAdvanceActiveSkillCooltime.cs new file mode 100644 index 0000000..7b7a485 --- /dev/null +++ b/src/Models/Entities/EntityMSkillBehaviourActionAdvanceActiveSkillCooltime.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillBehaviourActionAdvanceActiveSkillCooltime))] +public class EntityMSkillBehaviourActionAdvanceActiveSkillCooltime +{ + [Key(0)] public int SkillBehaviourActionId { get; set; } + + [Key(1)] public SkillCooltimeAdvanceType SkillCooltimeAdvanceType { get; set; } + + [Key(2)] public ActiveSkillType ActiveSkillType { get; set; } + + [Key(3)] public int AdvanceValue { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillBehaviourActionAdvanceActiveSkillCooltimeImmediate.cs b/src/Models/Entities/EntityMSkillBehaviourActionAdvanceActiveSkillCooltimeImmediate.cs new file mode 100644 index 0000000..7ba132f --- /dev/null +++ b/src/Models/Entities/EntityMSkillBehaviourActionAdvanceActiveSkillCooltimeImmediate.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillBehaviourActionAdvanceActiveSkillCooltimeImmediate))] +public class EntityMSkillBehaviourActionAdvanceActiveSkillCooltimeImmediate +{ + [Key(0)] public int SkillBehaviourActionId { get; set; } + + [Key(1)] public SkillCooltimeAdvanceType SkillCooltimeAdvanceType { get; set; } + + [Key(2)] public ActiveSkillType ActiveSkillType { get; set; } + + [Key(3)] public int AdvanceValue { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillBehaviourActionAttack.cs b/src/Models/Entities/EntityMSkillBehaviourActionAttack.cs new file mode 100644 index 0000000..843ea71 --- /dev/null +++ b/src/Models/Entities/EntityMSkillBehaviourActionAttack.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillBehaviourActionAttack))] +public class EntityMSkillBehaviourActionAttack +{ + [Key(0)] public int SkillBehaviourActionId { get; set; } + + [Key(1)] public int SkillPower { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillBehaviourActionAttackClampHp.cs b/src/Models/Entities/EntityMSkillBehaviourActionAttackClampHp.cs new file mode 100644 index 0000000..76f2d3a --- /dev/null +++ b/src/Models/Entities/EntityMSkillBehaviourActionAttackClampHp.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillBehaviourActionAttackClampHp))] +public class EntityMSkillBehaviourActionAttackClampHp +{ + [Key(0)] public int SkillBehaviourActionId { get; set; } + + [Key(1)] public int SkillPower { get; set; } + + [Key(2)] public int ClampThresholdHpRatioPermil { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillBehaviourActionAttackCombo.cs b/src/Models/Entities/EntityMSkillBehaviourActionAttackCombo.cs new file mode 100644 index 0000000..73e3288 --- /dev/null +++ b/src/Models/Entities/EntityMSkillBehaviourActionAttackCombo.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillBehaviourActionAttackCombo))] +public class EntityMSkillBehaviourActionAttackCombo +{ + [Key(0)] public int SkillBehaviourActionId { get; set; } + + [Key(1)] public int SkillPowerCalculationId { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillBehaviourActionAttackFixedDamage.cs b/src/Models/Entities/EntityMSkillBehaviourActionAttackFixedDamage.cs new file mode 100644 index 0000000..ddf8e31 --- /dev/null +++ b/src/Models/Entities/EntityMSkillBehaviourActionAttackFixedDamage.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillBehaviourActionAttackFixedDamage))] +public class EntityMSkillBehaviourActionAttackFixedDamage +{ + [Key(0)] public int SkillBehaviourActionId { get; set; } + + [Key(1)] public int DamageValue { get; set; } + + [Key(2)] public bool ForceDamage { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillBehaviourActionAttackHpRatio.cs b/src/Models/Entities/EntityMSkillBehaviourActionAttackHpRatio.cs new file mode 100644 index 0000000..4531cfd --- /dev/null +++ b/src/Models/Entities/EntityMSkillBehaviourActionAttackHpRatio.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillBehaviourActionAttackHpRatio))] +public class EntityMSkillBehaviourActionAttackHpRatio +{ + [Key(0)] public int SkillBehaviourActionId { get; set; } + + [Key(1)] public int SkillPowerCalculationId { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillBehaviourActionAttackIgnoreVitality.cs b/src/Models/Entities/EntityMSkillBehaviourActionAttackIgnoreVitality.cs new file mode 100644 index 0000000..122640c --- /dev/null +++ b/src/Models/Entities/EntityMSkillBehaviourActionAttackIgnoreVitality.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillBehaviourActionAttackIgnoreVitality))] +public class EntityMSkillBehaviourActionAttackIgnoreVitality +{ + [Key(0)] public int SkillBehaviourActionId { get; set; } + + [Key(1)] public int SkillPower { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillBehaviourActionAttackMainWeaponAttribute.cs b/src/Models/Entities/EntityMSkillBehaviourActionAttackMainWeaponAttribute.cs new file mode 100644 index 0000000..a452c64 --- /dev/null +++ b/src/Models/Entities/EntityMSkillBehaviourActionAttackMainWeaponAttribute.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillBehaviourActionAttackMainWeaponAttribute))] +public class EntityMSkillBehaviourActionAttackMainWeaponAttribute +{ + [Key(0)] public int SkillBehaviourActionId { get; set; } + + [Key(1)] public int SkillPower { get; set; } + + [Key(2)] public AttributeType AttributeType { get; set; } + + [Key(3)] public int MagnificationRate { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillBehaviourActionAttackSkillfulMainWeaponType.cs b/src/Models/Entities/EntityMSkillBehaviourActionAttackSkillfulMainWeaponType.cs new file mode 100644 index 0000000..3ad61d5 --- /dev/null +++ b/src/Models/Entities/EntityMSkillBehaviourActionAttackSkillfulMainWeaponType.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillBehaviourActionAttackSkillfulMainWeaponType))] +public class EntityMSkillBehaviourActionAttackSkillfulMainWeaponType +{ + [Key(0)] public int SkillBehaviourActionId { get; set; } + + [Key(1)] public int SkillPower { get; set; } + + [Key(2)] public int MagnificationRate { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillBehaviourActionAttackVitality.cs b/src/Models/Entities/EntityMSkillBehaviourActionAttackVitality.cs new file mode 100644 index 0000000..827efba --- /dev/null +++ b/src/Models/Entities/EntityMSkillBehaviourActionAttackVitality.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillBehaviourActionAttackVitality))] +public class EntityMSkillBehaviourActionAttackVitality +{ + [Key(0)] public int SkillBehaviourActionId { get; set; } + + [Key(1)] public int SkillPower { get; set; } + + [Key(2)] public int AttackWeight { get; set; } + + [Key(3)] public int VitalityWeight { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillBehaviourActionAttributeDamageCorrection.cs b/src/Models/Entities/EntityMSkillBehaviourActionAttributeDamageCorrection.cs new file mode 100644 index 0000000..7243e22 --- /dev/null +++ b/src/Models/Entities/EntityMSkillBehaviourActionAttributeDamageCorrection.cs @@ -0,0 +1,22 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillBehaviourActionAttributeDamageCorrection))] +public class EntityMSkillBehaviourActionAttributeDamageCorrection +{ + [Key(0)] public int SkillBehaviourActionId { get; set; } + + [Key(1)] public AttributeType AttributeType { get; set; } + + [Key(2)] public CorrectionTargetDamageType CorrectionTargetDamageType { get; set; } + + [Key(3)] public int CorrectionValuePermil { get; set; } + + [Key(4)] public DamageCorrectionOverlapType DamageCorrectionOverlapType { get; set; } + + [Key(5)] public bool IsExcepting { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillBehaviourActionBuff.cs b/src/Models/Entities/EntityMSkillBehaviourActionBuff.cs new file mode 100644 index 0000000..594b08b --- /dev/null +++ b/src/Models/Entities/EntityMSkillBehaviourActionBuff.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillBehaviourActionBuff))] +public class EntityMSkillBehaviourActionBuff +{ + [Key(0)] public int SkillBehaviourActionId { get; set; } + + [Key(1)] public int SkillBuffId { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillBehaviourActionChangestep.cs b/src/Models/Entities/EntityMSkillBehaviourActionChangestep.cs new file mode 100644 index 0000000..cca8211 --- /dev/null +++ b/src/Models/Entities/EntityMSkillBehaviourActionChangestep.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillBehaviourActionChangestep))] +public class EntityMSkillBehaviourActionChangestep +{ + [Key(0)] public int SkillBehaviourActionId { get; set; } + + [Key(1)] public int Step { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillBehaviourActionDamageCorrectionHpRatio.cs b/src/Models/Entities/EntityMSkillBehaviourActionDamageCorrectionHpRatio.cs new file mode 100644 index 0000000..1f5bcaa --- /dev/null +++ b/src/Models/Entities/EntityMSkillBehaviourActionDamageCorrectionHpRatio.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillBehaviourActionDamageCorrectionHpRatio))] +public class EntityMSkillBehaviourActionDamageCorrectionHpRatio +{ + [Key(0)] public int SkillBehaviourActionId { get; set; } + + [Key(1)] public int CorrectionMaxValuePermil { get; set; } + + [Key(2)] public DamageCorrectionHpRatioType DamageCorrectionHpRatioType { get; set; } + + [Key(3)] public int ActivationThresholdHpRatioPermil { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillBehaviourActionDamageMultiply.cs b/src/Models/Entities/EntityMSkillBehaviourActionDamageMultiply.cs new file mode 100644 index 0000000..5edbe66 --- /dev/null +++ b/src/Models/Entities/EntityMSkillBehaviourActionDamageMultiply.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillBehaviourActionDamageMultiply))] +public class EntityMSkillBehaviourActionDamageMultiply +{ + [Key(0)] public int SkillBehaviourActionId { get; set; } + + [Key(1)] public DamageMultiplyDetailType DamageMultiplyDetailType { get; set; } + + [Key(2)] public int SkillDamageMultiplyDetailId { get; set; } + + [Key(3)] public DamageMultiplyTargetType DamageMultiplyTargetType { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillBehaviourActionDefaultSkillLottery.cs b/src/Models/Entities/EntityMSkillBehaviourActionDefaultSkillLottery.cs new file mode 100644 index 0000000..c5ad44d --- /dev/null +++ b/src/Models/Entities/EntityMSkillBehaviourActionDefaultSkillLottery.cs @@ -0,0 +1,20 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillBehaviourActionDefaultSkillLottery))] +public class EntityMSkillBehaviourActionDefaultSkillLottery +{ + [Key(0)] public int SkillBehaviourActionId { get; set; } + + [Key(1)] public int TargetCountLower { get; set; } + + [Key(2)] public int TargetCountUpper { get; set; } + + [Key(3)] public int ValuePermil { get; set; } + + [Key(4)] public int CalculationType { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillBehaviourActionExtendBuffCooltime.cs b/src/Models/Entities/EntityMSkillBehaviourActionExtendBuffCooltime.cs new file mode 100644 index 0000000..475901a --- /dev/null +++ b/src/Models/Entities/EntityMSkillBehaviourActionExtendBuffCooltime.cs @@ -0,0 +1,22 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillBehaviourActionExtendBuffCooltime))] +public class EntityMSkillBehaviourActionExtendBuffCooltime +{ + [Key(0)] public int SkillBehaviourActionId { get; set; } + + [Key(1)] public ExtendBuffCooltimeBuffType ExtendBuffCooltimeBuffType { get; set; } + + [Key(2)] public ExtendBuffCooltimeStatusType ExtendBuffCooltimeStatusType { get; set; } + + [Key(3)] public ExtendBuffCooltimeTargetSkillType ExtendBuffCooltimeTargetSkillType { get; set; } + + [Key(4)] public ExtendBuffCooltimeExtendType ExtendBuffCooltimeExtendType { get; set; } + + [Key(5)] public int ExtendValue { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillBehaviourActionHpRatioDamage.cs b/src/Models/Entities/EntityMSkillBehaviourActionHpRatioDamage.cs new file mode 100644 index 0000000..c847783 --- /dev/null +++ b/src/Models/Entities/EntityMSkillBehaviourActionHpRatioDamage.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillBehaviourActionHpRatioDamage))] +public class EntityMSkillBehaviourActionHpRatioDamage +{ + [Key(0)] public int SkillBehaviourActionId { get; set; } + + [Key(1)] public int CalculateDenominatorType { get; set; } + + [Key(2)] public int DamageRatioPermil { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillBehaviourActionOverlimitDamageMultiply.cs b/src/Models/Entities/EntityMSkillBehaviourActionOverlimitDamageMultiply.cs new file mode 100644 index 0000000..0ff6b3d --- /dev/null +++ b/src/Models/Entities/EntityMSkillBehaviourActionOverlimitDamageMultiply.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillBehaviourActionOverlimitDamageMultiply))] +public class EntityMSkillBehaviourActionOverlimitDamageMultiply +{ + [Key(0)] public int SkillBehaviourActionId { get; set; } + + [Key(1)] public DamageMultiplyDetailType DamageMultiplyDetailType { get; set; } + + [Key(2)] public int SkillDamageMultiplyDetailId { get; set; } + + [Key(3)] public DamageMultiplyTargetType DamageMultiplyTargetType { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillBehaviourActionRecovery.cs b/src/Models/Entities/EntityMSkillBehaviourActionRecovery.cs new file mode 100644 index 0000000..426a034 --- /dev/null +++ b/src/Models/Entities/EntityMSkillBehaviourActionRecovery.cs @@ -0,0 +1,22 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillBehaviourActionRecovery))] +public class EntityMSkillBehaviourActionRecovery +{ + [Key(0)] public int SkillBehaviourActionId { get; set; } + + [Key(1)] public int SkillPower { get; set; } + + [Key(2)] public int FixedRecoveryPoint { get; set; } + + [Key(3)] public int HpRatioRecoveryPointPermil { get; set; } + + [Key(4)] public int RecoveryPointMinValue { get; set; } + + [Key(5)] public int RecoveryPointMaxValue { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillBehaviourActionRecoveryPointCorrection.cs b/src/Models/Entities/EntityMSkillBehaviourActionRecoveryPointCorrection.cs new file mode 100644 index 0000000..e41381c --- /dev/null +++ b/src/Models/Entities/EntityMSkillBehaviourActionRecoveryPointCorrection.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillBehaviourActionRecoveryPointCorrection))] +public class EntityMSkillBehaviourActionRecoveryPointCorrection +{ + [Key(0)] public int SkillBehaviourActionId { get; set; } + + [Key(1)] public RecoveryPointCorrectionTargetSkillType RecoveryPointCorrectionTargetSkillType { get; set; } + + [Key(2)] public int RecoveryPointCorrectionCoefficientValue { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillBehaviourActionRemoveAbnormal.cs b/src/Models/Entities/EntityMSkillBehaviourActionRemoveAbnormal.cs new file mode 100644 index 0000000..5f55574 --- /dev/null +++ b/src/Models/Entities/EntityMSkillBehaviourActionRemoveAbnormal.cs @@ -0,0 +1,22 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillBehaviourActionRemoveAbnormal))] +public class EntityMSkillBehaviourActionRemoveAbnormal +{ + [Key(0)] public int SkillBehaviourActionId { get; set; } + + [Key(1)] public int TargetPolarityType { get; set; } + + [Key(2)] public int SkillRemoveAbnormalTargetAbnormalGroupId { get; set; } + + [Key(3)] public RemoveAbnormalTargetType RemoveAbnormalTargetType { get; set; } + + [Key(4)] public int RemoveCountUpper { get; set; } + + [Key(5)] public int RemoveKindCountUpper { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillBehaviourActionRemoveBuff.cs b/src/Models/Entities/EntityMSkillBehaviourActionRemoveBuff.cs new file mode 100644 index 0000000..2f9fb40 --- /dev/null +++ b/src/Models/Entities/EntityMSkillBehaviourActionRemoveBuff.cs @@ -0,0 +1,22 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillBehaviourActionRemoveBuff))] +public class EntityMSkillBehaviourActionRemoveBuff +{ + [Key(0)] public int SkillBehaviourActionId { get; set; } + + [Key(1)] public int RemoveCount { get; set; } + + [Key(2)] public BuffType BuffType { get; set; } + + [Key(3)] public SkillRemoveBuffFilteringType SkillRemoveBuffFilteringType { get; set; } + + [Key(4)] public int SkillRemoveBuffFilteringId { get; set; } + + [Key(5)] public SkillRemoveBuffChoosingType SkillRemoveBuffChoosingType { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillBehaviourActionShortenActiveSkillCooltime.cs b/src/Models/Entities/EntityMSkillBehaviourActionShortenActiveSkillCooltime.cs new file mode 100644 index 0000000..87099b9 --- /dev/null +++ b/src/Models/Entities/EntityMSkillBehaviourActionShortenActiveSkillCooltime.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillBehaviourActionShortenActiveSkillCooltime))] +public class EntityMSkillBehaviourActionShortenActiveSkillCooltime +{ + [Key(0)] public int SkillBehaviourActionId { get; set; } + + [Key(1)] public ActiveSkillType ActiveSkillType { get; set; } + + [Key(2)] public int ShortenValuePermil { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillBehaviourActionSkillRecoveryPowerCorrection.cs b/src/Models/Entities/EntityMSkillBehaviourActionSkillRecoveryPowerCorrection.cs new file mode 100644 index 0000000..ba9197e --- /dev/null +++ b/src/Models/Entities/EntityMSkillBehaviourActionSkillRecoveryPowerCorrection.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillBehaviourActionSkillRecoveryPowerCorrection))] +public class EntityMSkillBehaviourActionSkillRecoveryPowerCorrection +{ + [Key(0)] public int SkillBehaviourActionId { get; set; } + + [Key(1)] public int CorrectionValuePermil { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillBehaviourActivationConditionActivationUpperCount.cs b/src/Models/Entities/EntityMSkillBehaviourActivationConditionActivationUpperCount.cs new file mode 100644 index 0000000..52428ea --- /dev/null +++ b/src/Models/Entities/EntityMSkillBehaviourActivationConditionActivationUpperCount.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillBehaviourActivationConditionActivationUpperCount))] +public class EntityMSkillBehaviourActivationConditionActivationUpperCount +{ + [Key(0)] public int SkillBehaviourActivationConditionId { get; set; } + + [Key(1)] public int ActivationUpperCount { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillBehaviourActivationConditionAttribute.cs b/src/Models/Entities/EntityMSkillBehaviourActivationConditionAttribute.cs new file mode 100644 index 0000000..658f744 --- /dev/null +++ b/src/Models/Entities/EntityMSkillBehaviourActivationConditionAttribute.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillBehaviourActivationConditionAttribute))] +public class EntityMSkillBehaviourActivationConditionAttribute +{ + [Key(0)] public int SkillBehaviourActivationConditionId { get; set; } + + [Key(1)] public int SkillBehaviourActivationConditionAttributeType { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillBehaviourActivationConditionGroup.cs b/src/Models/Entities/EntityMSkillBehaviourActivationConditionGroup.cs new file mode 100644 index 0000000..c27a729 --- /dev/null +++ b/src/Models/Entities/EntityMSkillBehaviourActivationConditionGroup.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillBehaviourActivationConditionGroup))] +public class EntityMSkillBehaviourActivationConditionGroup +{ + [Key(0)] public int SkillBehaviourActivationConditionGroupId { get; set; } + + [Key(1)] public int ConditionCheckOrder { get; set; } + + [Key(2)] public SkillBehaviourActivationConditionType SkillBehaviourActivationConditionType { get; set; } + + [Key(3)] public int SkillBehaviourActivationConditionId { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillBehaviourActivationConditionHpRatio.cs b/src/Models/Entities/EntityMSkillBehaviourActivationConditionHpRatio.cs new file mode 100644 index 0000000..0f50ec7 --- /dev/null +++ b/src/Models/Entities/EntityMSkillBehaviourActivationConditionHpRatio.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillBehaviourActivationConditionHpRatio))] +public class EntityMSkillBehaviourActivationConditionHpRatio +{ + [Key(0)] public int SkillBehaviourActivationConditionId { get; set; } + + [Key(1)] public SkillBehaviourActivationConditionHpRatioThresholdType SkillBehaviourActivationConditionHpRatioThresholdType { get; set; } + + [Key(2)] public int ThresholdRatioPermil { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillBehaviourActivationConditionInSkillFlow.cs b/src/Models/Entities/EntityMSkillBehaviourActivationConditionInSkillFlow.cs new file mode 100644 index 0000000..084d570 --- /dev/null +++ b/src/Models/Entities/EntityMSkillBehaviourActivationConditionInSkillFlow.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillBehaviourActivationConditionInSkillFlow))] +public class EntityMSkillBehaviourActivationConditionInSkillFlow +{ + [Key(0)] public int SkillBehaviourActivationConditionId { get; set; } + + [Key(1)] public int RunningSkillBehaviourType { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillBehaviourActivationConditionWaveNumber.cs b/src/Models/Entities/EntityMSkillBehaviourActivationConditionWaveNumber.cs new file mode 100644 index 0000000..515d107 --- /dev/null +++ b/src/Models/Entities/EntityMSkillBehaviourActivationConditionWaveNumber.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillBehaviourActivationConditionWaveNumber))] +public class EntityMSkillBehaviourActivationConditionWaveNumber +{ + [Key(0)] public int SkillBehaviourActivationConditionId { get; set; } + + [Key(1)] public int WaveNumber { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillBehaviourActivationMethod.cs b/src/Models/Entities/EntityMSkillBehaviourActivationMethod.cs new file mode 100644 index 0000000..763c524 --- /dev/null +++ b/src/Models/Entities/EntityMSkillBehaviourActivationMethod.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillBehaviourActivationMethod))] +public class EntityMSkillBehaviourActivationMethod +{ + [Key(0)] public int SkillBehaviourActivationMethodId { get; set; } + + [Key(1)] public ActivationMethodType ActivationMethodType { get; set; } + + [Key(2)] public int SkillBehaviourActivationConditionGroupId { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillBehaviourGroup.cs b/src/Models/Entities/EntityMSkillBehaviourGroup.cs new file mode 100644 index 0000000..cc1f9cf --- /dev/null +++ b/src/Models/Entities/EntityMSkillBehaviourGroup.cs @@ -0,0 +1,22 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillBehaviourGroup))] +public class EntityMSkillBehaviourGroup +{ + [Key(0)] public int SkillBehaviourGroupId { get; set; } + + [Key(1)] public int SkillBehaviourId { get; set; } + + [Key(2)] public int SkillBehaviourIndex { get; set; } + + [Key(3)] public int TargetSelectorIndex { get; set; } + + [Key(4)] public int SkillHitStartIndex { get; set; } + + [Key(5)] public int SkillHitEndIndex { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillBuff.cs b/src/Models/Entities/EntityMSkillBuff.cs new file mode 100644 index 0000000..7470a70 --- /dev/null +++ b/src/Models/Entities/EntityMSkillBuff.cs @@ -0,0 +1,22 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillBuff))] +public class EntityMSkillBuff +{ + [Key(0)] public int SkillBuffId { get; set; } + + [Key(1)] public string BuffKey { get; set; } + + [Key(2)] public BuffType BuffType { get; set; } + + [Key(3)] public int Power { get; set; } + + [Key(4)] public int CooltimeFrameCount { get; set; } + + [Key(5)] public int IconId { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillCasttime.cs b/src/Models/Entities/EntityMSkillCasttime.cs new file mode 100644 index 0000000..fd3f8f0 --- /dev/null +++ b/src/Models/Entities/EntityMSkillCasttime.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillCasttime))] +public class EntityMSkillCasttime +{ + [Key(0)] public int SkillCasttimeId { get; set; } + + [Key(1)] public int SkillCasttimeValue { get; set; } + + [Key(2)] public int SkillCasttimeBehaviourGroupId { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillCasttimeBehaviour.cs b/src/Models/Entities/EntityMSkillCasttimeBehaviour.cs new file mode 100644 index 0000000..5b34759 --- /dev/null +++ b/src/Models/Entities/EntityMSkillCasttimeBehaviour.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillCasttimeBehaviour))] +public class EntityMSkillCasttimeBehaviour +{ + [Key(0)] public int SkillCasttimeBehaviourId { get; set; } + + [Key(1)] public SkillCasttimeBehaviourType SkillCasttimeBehaviourType { get; set; } + + [Key(2)] public int SkillCasttimeBehaviourActionId { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillCasttimeBehaviourActionOnFrameUpdate.cs b/src/Models/Entities/EntityMSkillCasttimeBehaviourActionOnFrameUpdate.cs new file mode 100644 index 0000000..f88ba83 --- /dev/null +++ b/src/Models/Entities/EntityMSkillCasttimeBehaviourActionOnFrameUpdate.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillCasttimeBehaviourActionOnFrameUpdate))] +public class EntityMSkillCasttimeBehaviourActionOnFrameUpdate +{ + [Key(0)] public int SkillCasttimeBehaviourActionId { get; set; } + + [Key(1)] public int SkillCasttimeAdvanceValuePerFrame { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillCasttimeBehaviourActionOnSkillDamageCondition.cs b/src/Models/Entities/EntityMSkillCasttimeBehaviourActionOnSkillDamageCondition.cs new file mode 100644 index 0000000..0224f91 --- /dev/null +++ b/src/Models/Entities/EntityMSkillCasttimeBehaviourActionOnSkillDamageCondition.cs @@ -0,0 +1,20 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillCasttimeBehaviourActionOnSkillDamageCondition))] +public class EntityMSkillCasttimeBehaviourActionOnSkillDamageCondition +{ + [Key(0)] public int SkillCasttimeBehaviourActionId { get; set; } + + [Key(1)] public int SkillCasttimeUpdateValue { get; set; } + + [Key(2)] public SkillCasttimeAdvanceType SkillCasttimeAdvanceType { get; set; } + + [Key(3)] public int DamageCompareType { get; set; } + + [Key(4)] public int DamageConditionValue { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillCasttimeBehaviourGroup.cs b/src/Models/Entities/EntityMSkillCasttimeBehaviourGroup.cs new file mode 100644 index 0000000..fecd28c --- /dev/null +++ b/src/Models/Entities/EntityMSkillCasttimeBehaviourGroup.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillCasttimeBehaviourGroup))] +public class EntityMSkillCasttimeBehaviourGroup +{ + [Key(0)] public int SkillCasttimeBehaviourGroupId { get; set; } + + [Key(1)] public int SkillCasttimeBehaviourIndex { get; set; } + + [Key(2)] public int SkillCasttimeBehaviourId { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillCooltimeAdvanceValueOnDefaultSkillGroup.cs b/src/Models/Entities/EntityMSkillCooltimeAdvanceValueOnDefaultSkillGroup.cs new file mode 100644 index 0000000..c6591a1 --- /dev/null +++ b/src/Models/Entities/EntityMSkillCooltimeAdvanceValueOnDefaultSkillGroup.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillCooltimeAdvanceValueOnDefaultSkillGroup))] +public class EntityMSkillCooltimeAdvanceValueOnDefaultSkillGroup +{ + [Key(0)] public int SkillCooltimeAdvanceValueOnDefaultSkillGroupId { get; set; } + + [Key(1)] public int SkillHitCountLowerLimit { get; set; } + + [Key(2)] public int SkillCooltimeAdvanceValue { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillCooltimeBehaviour.cs b/src/Models/Entities/EntityMSkillCooltimeBehaviour.cs new file mode 100644 index 0000000..987bd1d --- /dev/null +++ b/src/Models/Entities/EntityMSkillCooltimeBehaviour.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillCooltimeBehaviour))] +public class EntityMSkillCooltimeBehaviour +{ + [Key(0)] public int SkillCooltimeBehaviourId { get; set; } + + [Key(1)] public SkillCooltimeBehaviourType SkillCooltimeBehaviourType { get; set; } + + [Key(2)] public int SkillCooltimeBehaviourActionId { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillCooltimeBehaviourGroup.cs b/src/Models/Entities/EntityMSkillCooltimeBehaviourGroup.cs new file mode 100644 index 0000000..bb7cdac --- /dev/null +++ b/src/Models/Entities/EntityMSkillCooltimeBehaviourGroup.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillCooltimeBehaviourGroup))] +public class EntityMSkillCooltimeBehaviourGroup +{ + [Key(0)] public int SkillCooltimeBehaviourGroupId { get; set; } + + [Key(1)] public int SkillCooltimeBehaviourId { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillCooltimeBehaviourOnExecuteActiveSkill.cs b/src/Models/Entities/EntityMSkillCooltimeBehaviourOnExecuteActiveSkill.cs new file mode 100644 index 0000000..beb38e2 --- /dev/null +++ b/src/Models/Entities/EntityMSkillCooltimeBehaviourOnExecuteActiveSkill.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillCooltimeBehaviourOnExecuteActiveSkill))] +public class EntityMSkillCooltimeBehaviourOnExecuteActiveSkill +{ + [Key(0)] public int SkillCooltimeBehaviourActionId { get; set; } + + [Key(1)] public int SkillCooltimeAdvanceValue { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillCooltimeBehaviourOnExecuteCompanionSkill.cs b/src/Models/Entities/EntityMSkillCooltimeBehaviourOnExecuteCompanionSkill.cs new file mode 100644 index 0000000..19eed7b --- /dev/null +++ b/src/Models/Entities/EntityMSkillCooltimeBehaviourOnExecuteCompanionSkill.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillCooltimeBehaviourOnExecuteCompanionSkill))] +public class EntityMSkillCooltimeBehaviourOnExecuteCompanionSkill +{ + [Key(0)] public int SkillCooltimeBehaviourActionId { get; set; } + + [Key(1)] public int SkillCooltimeAdvanceValue { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillCooltimeBehaviourOnExecuteDefaultSkill.cs b/src/Models/Entities/EntityMSkillCooltimeBehaviourOnExecuteDefaultSkill.cs new file mode 100644 index 0000000..f6b3d01 --- /dev/null +++ b/src/Models/Entities/EntityMSkillCooltimeBehaviourOnExecuteDefaultSkill.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillCooltimeBehaviourOnExecuteDefaultSkill))] +public class EntityMSkillCooltimeBehaviourOnExecuteDefaultSkill +{ + [Key(0)] public int SkillCooltimeBehaviourActionId { get; set; } + + [Key(1)] public int SkillCooltimeAdvanceValueOnDefaultSkillGroupId { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillCooltimeBehaviourOnFrameUpdate.cs b/src/Models/Entities/EntityMSkillCooltimeBehaviourOnFrameUpdate.cs new file mode 100644 index 0000000..f36a88d --- /dev/null +++ b/src/Models/Entities/EntityMSkillCooltimeBehaviourOnFrameUpdate.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillCooltimeBehaviourOnFrameUpdate))] +public class EntityMSkillCooltimeBehaviourOnFrameUpdate +{ + [Key(0)] public int SkillCooltimeBehaviourActionId { get; set; } + + [Key(1)] public int SkillCooltimeAdvanceValuePerFrame { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillCooltimeBehaviourOnSkillDamage.cs b/src/Models/Entities/EntityMSkillCooltimeBehaviourOnSkillDamage.cs new file mode 100644 index 0000000..2f8617b --- /dev/null +++ b/src/Models/Entities/EntityMSkillCooltimeBehaviourOnSkillDamage.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillCooltimeBehaviourOnSkillDamage))] +public class EntityMSkillCooltimeBehaviourOnSkillDamage +{ + [Key(0)] public int SkillCooltimeBehaviourActionId { get; set; } + + [Key(1)] public int SkillCooltimeAdvanceValueCalculationId { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillDamageMultiplyAbnormalAttachedValueGroup.cs b/src/Models/Entities/EntityMSkillDamageMultiplyAbnormalAttachedValueGroup.cs new file mode 100644 index 0000000..e8801e2 --- /dev/null +++ b/src/Models/Entities/EntityMSkillDamageMultiplyAbnormalAttachedValueGroup.cs @@ -0,0 +1,22 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillDamageMultiplyAbnormalAttachedValueGroup))] +public class EntityMSkillDamageMultiplyAbnormalAttachedValueGroup +{ + [Key(0)] public int SkillDamageMultiplyAbnormalAttachedValueGroupId { get; set; } + + [Key(1)] public int SkillDamageMultiplyAbnormalAttachedValueGroupIndex { get; set; } + + [Key(2)] public DamageMultiplyAbnormalAttachedPolarityConditionType PolarityConditionType { get; set; } + + [Key(3)] public int SkillAbnormalTypeIdCondition { get; set; } + + [Key(4)] public DamageMultiplyAbnormalAttachedTargetType TargetType { get; set; } + + [Key(5)] public int DamageMultiplyCoefficientValuePermil { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillDamageMultiplyDetailAbnormalAttached.cs b/src/Models/Entities/EntityMSkillDamageMultiplyDetailAbnormalAttached.cs new file mode 100644 index 0000000..d39d8ff --- /dev/null +++ b/src/Models/Entities/EntityMSkillDamageMultiplyDetailAbnormalAttached.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillDamageMultiplyDetailAbnormalAttached))] +public class EntityMSkillDamageMultiplyDetailAbnormalAttached +{ + [Key(0)] public int SkillDamageMultiplyDetailId { get; set; } + + [Key(1)] public int SkillDamageMultiplyAbnormalAttachedValueGroupId { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillDamageMultiplyDetailAlways.cs b/src/Models/Entities/EntityMSkillDamageMultiplyDetailAlways.cs new file mode 100644 index 0000000..4e98ad2 --- /dev/null +++ b/src/Models/Entities/EntityMSkillDamageMultiplyDetailAlways.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillDamageMultiplyDetailAlways))] +public class EntityMSkillDamageMultiplyDetailAlways +{ + [Key(0)] public int SkillDamageMultiplyDetailId { get; set; } + + [Key(1)] public int DamageMultiplyCoefficientValuePermil { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillDamageMultiplyDetailBuffAttached.cs b/src/Models/Entities/EntityMSkillDamageMultiplyDetailBuffAttached.cs new file mode 100644 index 0000000..5940535 --- /dev/null +++ b/src/Models/Entities/EntityMSkillDamageMultiplyDetailBuffAttached.cs @@ -0,0 +1,20 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillDamageMultiplyDetailBuffAttached))] +public class EntityMSkillDamageMultiplyDetailBuffAttached +{ + [Key(0)] public int SkillDamageMultiplyDetailId { get; set; } + + [Key(1)] public DamageMultiplyBuffAttachedConditionTargetType BuffAttachedTargetType { get; set; } + + [Key(2)] public DamageMultiplyBuffAttachedTargetBuffType TargetBuffType { get; set; } + + [Key(3)] public DamageMultiplyBuffAttachedTargetStatusKindType TargetStatusKindType { get; set; } + + [Key(4)] public int DamageMultiplyCoefficientValuePermil { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillDamageMultiplyDetailCritical.cs b/src/Models/Entities/EntityMSkillDamageMultiplyDetailCritical.cs new file mode 100644 index 0000000..6d5bb6a --- /dev/null +++ b/src/Models/Entities/EntityMSkillDamageMultiplyDetailCritical.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillDamageMultiplyDetailCritical))] +public class EntityMSkillDamageMultiplyDetailCritical +{ + [Key(0)] public int SkillDamageMultiplyDetailId { get; set; } + + [Key(1)] public bool IsCritical { get; set; } + + [Key(2)] public int DamageMultiplyCoefficientValuePermil { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillDamageMultiplyDetailHitIndex.cs b/src/Models/Entities/EntityMSkillDamageMultiplyDetailHitIndex.cs new file mode 100644 index 0000000..2e9e6c0 --- /dev/null +++ b/src/Models/Entities/EntityMSkillDamageMultiplyDetailHitIndex.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillDamageMultiplyDetailHitIndex))] +public class EntityMSkillDamageMultiplyDetailHitIndex +{ + [Key(0)] public int SkillDamageMultiplyDetailId { get; set; } + + [Key(1)] public int SkillDamageMultiplyHitIndexValueGroupId { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillDamageMultiplyDetailSkillfulWeaponType.cs b/src/Models/Entities/EntityMSkillDamageMultiplyDetailSkillfulWeaponType.cs new file mode 100644 index 0000000..3c990b9 --- /dev/null +++ b/src/Models/Entities/EntityMSkillDamageMultiplyDetailSkillfulWeaponType.cs @@ -0,0 +1,20 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillDamageMultiplyDetailSkillfulWeaponType))] +public class EntityMSkillDamageMultiplyDetailSkillfulWeaponType +{ + [Key(0)] public int SkillDamageMultiplyDetailId { get; set; } + + [Key(1)] public DamageMultiplySkillfulWeaponConditionTargetType ConditionTargetType { get; set; } + + [Key(2)] public WeaponType WeaponType { get; set; } + + [Key(3)] public bool IsSkillfulMainWeapon { get; set; } + + [Key(4)] public int DamageMultiplyCoefficientValuePermil { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillDamageMultiplyDetailSpecifiedCostumeType.cs b/src/Models/Entities/EntityMSkillDamageMultiplyDetailSpecifiedCostumeType.cs new file mode 100644 index 0000000..0d56b88 --- /dev/null +++ b/src/Models/Entities/EntityMSkillDamageMultiplyDetailSpecifiedCostumeType.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillDamageMultiplyDetailSpecifiedCostumeType))] +public class EntityMSkillDamageMultiplyDetailSpecifiedCostumeType +{ + [Key(0)] public int SkillDamageMultiplyDetailId { get; set; } + + [Key(1)] public DamageMultiplySpecifiedCostumeConditionTargetType SpecifiedCostumeConditionTargetType { get; set; } + + [Key(2)] public int TargetSpecifiedCostumeGroupId { get; set; } + + [Key(3)] public int DamageMultiplyCoefficientValuePermil { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillDamageMultiplyHitIndexValueGroup.cs b/src/Models/Entities/EntityMSkillDamageMultiplyHitIndexValueGroup.cs new file mode 100644 index 0000000..d07d519 --- /dev/null +++ b/src/Models/Entities/EntityMSkillDamageMultiplyHitIndexValueGroup.cs @@ -0,0 +1,22 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillDamageMultiplyHitIndexValueGroup))] +public class EntityMSkillDamageMultiplyHitIndexValueGroup +{ + [Key(0)] public int SkillDamageMultiplyHitIndexValueGroupId { get; set; } + + [Key(1)] public int SkillDamageMultiplyHitIndexValueGroupIndex { get; set; } + + [Key(2)] public int TotalHitCountConditionLower { get; set; } + + [Key(3)] public int TotalHitCountConditionUpper { get; set; } + + [Key(4)] public int HitIndex { get; set; } + + [Key(5)] public int DamageMultiplyCoefficientValuePermil { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillDamageMultiplyTargetSpecifiedCostumeGroup.cs b/src/Models/Entities/EntityMSkillDamageMultiplyTargetSpecifiedCostumeGroup.cs new file mode 100644 index 0000000..0b9066b --- /dev/null +++ b/src/Models/Entities/EntityMSkillDamageMultiplyTargetSpecifiedCostumeGroup.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillDamageMultiplyTargetSpecifiedCostumeGroup))] +public class EntityMSkillDamageMultiplyTargetSpecifiedCostumeGroup +{ + [Key(0)] public int TargetSpecifiedCostumeGroupId { get; set; } + + [Key(1)] public int TargetSpecifiedCostumeGroupIndex { get; set; } + + [Key(2)] public int CostumeId { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillDetail.cs b/src/Models/Entities/EntityMSkillDetail.cs new file mode 100644 index 0000000..ed3e018 --- /dev/null +++ b/src/Models/Entities/EntityMSkillDetail.cs @@ -0,0 +1,50 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillDetail))] +public class EntityMSkillDetail +{ + [Key(0)] public int SkillDetailId { get; set; } + + [Key(1)] public int SkillBehaviourGroupId { get; set; } + + [Key(2)] public int NameSkillTextId { get; set; } + + [Key(3)] public int SkillCooltimeValue { get; set; } + + [Key(4)] public int SkillCooltimeBehaviourGroupId { get; set; } + + [Key(5)] public int CasttimeFrameCount { get; set; } + + [Key(6)] public int HitRatioPermil { get; set; } + + [Key(7)] public int SkillRangeMilli { get; set; } + + [Key(8)] public int SkillHitAssetCalculatorId { get; set; } + + [Key(9)] public bool IsCounterApplicable { get; set; } + + [Key(10)] public bool IsComboCalculationTarget { get; set; } + + [Key(11)] public int SkillAssetCategoryId { get; set; } + + [Key(12)] public int SkillAssetVariationId { get; set; } + + [Key(13)] public int DescriptionSkillTextId { get; set; } + + [Key(14)] public SkillActType SkillActType { get; set; } + + [Key(15)] public int SkillHitCount { get; set; } + + [Key(16)] public int SkillPowerBaseValue { get; set; } + + [Key(17)] public PowerCalculationReferenceStatusType PowerCalculationReferenceStatusType { get; set; } + + [Key(18)] public int PowerReferenceStatusGroupId { get; set; } + + [Key(19)] public int SkillCasttimeId { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillLevelGroup.cs b/src/Models/Entities/EntityMSkillLevelGroup.cs new file mode 100644 index 0000000..8f000c5 --- /dev/null +++ b/src/Models/Entities/EntityMSkillLevelGroup.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillLevelGroup))] +public class EntityMSkillLevelGroup +{ + [Key(0)] public int SkillLevelGroupId { get; set; } + + [Key(1)] public int LevelLowerLimit { get; set; } + + [Key(2)] public int SkillDetailId { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillRemoveAbnormalTargetAbnormalGroup.cs b/src/Models/Entities/EntityMSkillRemoveAbnormalTargetAbnormalGroup.cs new file mode 100644 index 0000000..8a76f24 --- /dev/null +++ b/src/Models/Entities/EntityMSkillRemoveAbnormalTargetAbnormalGroup.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillRemoveAbnormalTargetAbnormalGroup))] +public class EntityMSkillRemoveAbnormalTargetAbnormalGroup +{ + [Key(0)] public int SkillRemoveAbnormalTargetAbnormalGroupId { get; set; } + + [Key(1)] public int SkillRemoveAbnormalTargetAbnormalGroupIndex { get; set; } + + [Key(2)] public int AbnormalTypeId { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillRemoveBuffFilterStatusKind.cs b/src/Models/Entities/EntityMSkillRemoveBuffFilterStatusKind.cs new file mode 100644 index 0000000..0d2ccaa --- /dev/null +++ b/src/Models/Entities/EntityMSkillRemoveBuffFilterStatusKind.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillRemoveBuffFilterStatusKind))] +public class EntityMSkillRemoveBuffFilterStatusKind +{ + [Key(0)] public int SkillRemoveBuffFilteringId { get; set; } + + [Key(1)] public int FilterIndex { get; set; } + + [Key(2)] public StatusKindType StatusKindType { get; set; } +} diff --git a/src/Models/Entities/EntityMSkillReserveUiType.cs b/src/Models/Entities/EntityMSkillReserveUiType.cs new file mode 100644 index 0000000..2631878 --- /dev/null +++ b/src/Models/Entities/EntityMSkillReserveUiType.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSkillReserveUiType))] +public class EntityMSkillReserveUiType +{ + [Key(0)] public int SkillDetailId { get; set; } + + [Key(1)] public int SkillReserveUiTypeId { get; set; } +} diff --git a/src/Models/Entities/EntityMSmartphoneChatGroup.cs b/src/Models/Entities/EntityMSmartphoneChatGroup.cs new file mode 100644 index 0000000..655db41 --- /dev/null +++ b/src/Models/Entities/EntityMSmartphoneChatGroup.cs @@ -0,0 +1,20 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSmartphoneChatGroup))] +public class EntityMSmartphoneChatGroup +{ + [Key(0)] public int SmartphoneChatGroupId { get; set; } + + [Key(1)] public int SmartphoneGroupUnlockSceneId { get; set; } + + [Key(2)] public int SmartphoneGroupUnlockValue { get; set; } + + [Key(3)] public int SortOrder { get; set; } + + [Key(4)] public int SmartphoneGroupEndSceneId { get; set; } +} diff --git a/src/Models/Entities/EntityMSmartphoneChatGroupMessage.cs b/src/Models/Entities/EntityMSmartphoneChatGroupMessage.cs new file mode 100644 index 0000000..39749cb --- /dev/null +++ b/src/Models/Entities/EntityMSmartphoneChatGroupMessage.cs @@ -0,0 +1,20 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSmartphoneChatGroupMessage))] +public class EntityMSmartphoneChatGroupMessage +{ + [Key(0)] public int SmartphoneChatGroupId { get; set; } + + [Key(1)] public int SortOrder { get; set; } + + [Key(2)] public int SmartphoneMessageUnlockSceneId { get; set; } + + [Key(3)] public int SmartphoneMessageUnlockValue { get; set; } + + [Key(4)] public int SenderCharacterId { get; set; } +} diff --git a/src/Models/Entities/EntityMSpeaker.cs b/src/Models/Entities/EntityMSpeaker.cs new file mode 100644 index 0000000..95c99c3 --- /dev/null +++ b/src/Models/Entities/EntityMSpeaker.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMSpeaker))] +public class EntityMSpeaker +{ + [Key(0)] public int ActorObjectId { get; set; } + + [Key(1)] public int NameSpeakerTextId { get; set; } + + [Key(2)] public SpeakerIconType SpeakerIconType { get; set; } + + [Key(3)] public int SpeakerIconIndex { get; set; } +} diff --git a/src/Models/Entities/EntityMStainedGlass.cs b/src/Models/Entities/EntityMStainedGlass.cs new file mode 100644 index 0000000..290df45 --- /dev/null +++ b/src/Models/Entities/EntityMStainedGlass.cs @@ -0,0 +1,32 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMStainedGlass))] +public class EntityMStainedGlass +{ + [Key(0)] public int StainedGlassId { get; set; } + + [Key(1)] public StainedGlassCategoryType StainedGlassCategoryType { get; set; } + + [Key(2)] public int ImageAssetId { get; set; } + + [Key(3)] public int TitleTextId { get; set; } + + [Key(4)] public int EffectDescriptionTextId { get; set; } + + [Key(5)] public int FlavorTextId { get; set; } + + [Key(6)] public int SortOrder { get; set; } + + [Key(7)] public long EmptyDisplayStartDatetime { get; set; } + + [Key(8)] public long LockDisplayStartDatetime { get; set; } + + [Key(9)] public int StainedGlassStatusUpTargetGroupId { get; set; } + + [Key(10)] public int StainedGlassStatusUpGroupId { get; set; } +} diff --git a/src/Models/Entities/EntityMStainedGlassStatusUpGroup.cs b/src/Models/Entities/EntityMStainedGlassStatusUpGroup.cs new file mode 100644 index 0000000..75c0904 --- /dev/null +++ b/src/Models/Entities/EntityMStainedGlassStatusUpGroup.cs @@ -0,0 +1,20 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMStainedGlassStatusUpGroup))] +public class EntityMStainedGlassStatusUpGroup +{ + [Key(0)] public int StainedGlassStatusUpGroupId { get; set; } + + [Key(1)] public int GroupIndex { get; set; } + + [Key(2)] public StatusKindType StatusKindType { get; set; } + + [Key(3)] public StatusCalculationType StatusCalculationType { get; set; } + + [Key(4)] public int EffectValue { get; set; } +} diff --git a/src/Models/Entities/EntityMStainedGlassStatusUpTargetGroup.cs b/src/Models/Entities/EntityMStainedGlassStatusUpTargetGroup.cs new file mode 100644 index 0000000..d9b4779 --- /dev/null +++ b/src/Models/Entities/EntityMStainedGlassStatusUpTargetGroup.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMStainedGlassStatusUpTargetGroup))] +public class EntityMStainedGlassStatusUpTargetGroup +{ + [Key(0)] public int StainedGlassStatusUpTargetGroupId { get; set; } + + [Key(1)] public int GroupIndex { get; set; } + + [Key(2)] public StainedGlassStatusUpTargetType StatusUpTargetType { get; set; } + + [Key(3)] public int TargetValue { get; set; } +} diff --git a/src/Models/Entities/EntityMThought.cs b/src/Models/Entities/EntityMThought.cs new file mode 100644 index 0000000..db2f125 --- /dev/null +++ b/src/Models/Entities/EntityMThought.cs @@ -0,0 +1,20 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMThought))] +public class EntityMThought +{ + [Key(0)] public int ThoughtId { get; set; } + + [Key(1)] public RarityType RarityType { get; set; } + + [Key(2)] public int AbilityId { get; set; } + + [Key(3)] public int AbilityLevel { get; set; } + + [Key(4)] public int ThoughtAssetId { get; set; } +} diff --git a/src/Models/Entities/EntityMTip.cs b/src/Models/Entities/EntityMTip.cs new file mode 100644 index 0000000..ce60678 --- /dev/null +++ b/src/Models/Entities/EntityMTip.cs @@ -0,0 +1,24 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMTip))] +public class EntityMTip +{ + [Key(0)] public int TipId { get; set; } + + [Key(1)] public int TitleTipTextId { get; set; } + + [Key(2)] public int ContentTipTextId { get; set; } + + [Key(3)] public int TipDisplayConditionGroupId { get; set; } + + [Key(4)] public string BackgroundAssetName { get; set; } + + [Key(5)] public long StartDatetime { get; set; } + + [Key(6)] public long EndDatetime { get; set; } +} diff --git a/src/Models/Entities/EntityMTipBackgroundAsset.cs b/src/Models/Entities/EntityMTipBackgroundAsset.cs new file mode 100644 index 0000000..2ebb981 --- /dev/null +++ b/src/Models/Entities/EntityMTipBackgroundAsset.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMTipBackgroundAsset))] +public class EntityMTipBackgroundAsset +{ + [Key(0)] public int TipBackgroundAssetId { get; set; } + + [Key(1)] public string BackgroundAssetName { get; set; } +} diff --git a/src/Models/Entities/EntityMTipDisplayConditionGroup.cs b/src/Models/Entities/EntityMTipDisplayConditionGroup.cs new file mode 100644 index 0000000..d04788b --- /dev/null +++ b/src/Models/Entities/EntityMTipDisplayConditionGroup.cs @@ -0,0 +1,20 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMTipDisplayConditionGroup))] +public class EntityMTipDisplayConditionGroup +{ + [Key(0)] public int TipDisplayConditionGroupId { get; set; } + + [Key(1)] public int SortOrder { get; set; } + + [Key(2)] public TipDisplayConditionType TipDisplayConditionType { get; set; } + + [Key(3)] public int ConditionValue { get; set; } + + [Key(4)] public ConditionOperationType ConditionOperationType { get; set; } +} diff --git a/src/Models/Entities/EntityMTipGroup.cs b/src/Models/Entities/EntityMTipGroup.cs new file mode 100644 index 0000000..010e702 --- /dev/null +++ b/src/Models/Entities/EntityMTipGroup.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMTipGroup))] +public class EntityMTipGroup +{ + [Key(0)] public int TipGroupId { get; set; } + + [Key(1)] public int NameTextId { get; set; } +} diff --git a/src/Models/Entities/EntityMTipGroupBackgroundAsset.cs b/src/Models/Entities/EntityMTipGroupBackgroundAsset.cs new file mode 100644 index 0000000..8c9a269 --- /dev/null +++ b/src/Models/Entities/EntityMTipGroupBackgroundAsset.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMTipGroupBackgroundAsset))] +public class EntityMTipGroupBackgroundAsset +{ + [Key(0)] public int TipGroupId { get; set; } + + [Key(1)] public string BackgroundAssetName { get; set; } + + [Key(2)] public int DisplayConditionClearQuestId { get; set; } +} diff --git a/src/Models/Entities/EntityMTipGroupBackgroundAssetRelation.cs b/src/Models/Entities/EntityMTipGroupBackgroundAssetRelation.cs new file mode 100644 index 0000000..fe6169b --- /dev/null +++ b/src/Models/Entities/EntityMTipGroupBackgroundAssetRelation.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMTipGroupBackgroundAssetRelation))] +public class EntityMTipGroupBackgroundAssetRelation +{ + [Key(0)] public int TipGroupId { get; set; } + + [Key(1)] public int TipBackgroundAssetId { get; set; } + + [Key(2)] public int TipDisplayConditionGroupId { get; set; } +} diff --git a/src/Models/Entities/EntityMTipGroupSelection.cs b/src/Models/Entities/EntityMTipGroupSelection.cs new file mode 100644 index 0000000..a26f887 --- /dev/null +++ b/src/Models/Entities/EntityMTipGroupSelection.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMTipGroupSelection))] +public class EntityMTipGroupSelection +{ + [Key(0)] public int TipGroupId { get; set; } + + [Key(1)] public int TipId { get; set; } + + [Key(2)] public int EncounterRatePermil { get; set; } +} diff --git a/src/Models/Entities/EntityMTipGroupSituation.cs b/src/Models/Entities/EntityMTipGroupSituation.cs new file mode 100644 index 0000000..5ebd4df --- /dev/null +++ b/src/Models/Entities/EntityMTipGroupSituation.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMTipGroupSituation))] +public class EntityMTipGroupSituation +{ + [Key(0)] public TipSituationType TipSituationType { get; set; } + + [Key(1)] public int TipGroupId { get; set; } + + [Key(2)] public int Weight { get; set; } + + [Key(3)] public int TargetId { get; set; } +} diff --git a/src/Models/Entities/EntityMTipGroupSituationSeason.cs b/src/Models/Entities/EntityMTipGroupSituationSeason.cs new file mode 100644 index 0000000..4f5d237 --- /dev/null +++ b/src/Models/Entities/EntityMTipGroupSituationSeason.cs @@ -0,0 +1,20 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMTipGroupSituationSeason))] +public class EntityMTipGroupSituationSeason +{ + [Key(0)] public TipSituationType TipSituationType { get; set; } + + [Key(1)] public int TipSituationSeasonId { get; set; } + + [Key(2)] public int TipGroupId { get; set; } + + [Key(3)] public int Weight { get; set; } + + [Key(4)] public int TargetId { get; set; } +} diff --git a/src/Models/Entities/EntityMTitleFlowMovie.cs b/src/Models/Entities/EntityMTitleFlowMovie.cs new file mode 100644 index 0000000..468487f --- /dev/null +++ b/src/Models/Entities/EntityMTitleFlowMovie.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMTitleFlowMovie))] +public class EntityMTitleFlowMovie +{ + [Key(0)] public int TitleFlowMovieId { get; set; } + + [Key(1)] public int MovieId { get; set; } + + [Key(2)] public long StartDatetime { get; set; } + + [Key(3)] public long EndDatetime { get; set; } +} diff --git a/src/Models/Entities/EntityMTitleStill.cs b/src/Models/Entities/EntityMTitleStill.cs new file mode 100644 index 0000000..e0209ed --- /dev/null +++ b/src/Models/Entities/EntityMTitleStill.cs @@ -0,0 +1,20 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMTitleStill))] +public class EntityMTitleStill +{ + [Key(0)] public int TitleStillId { get; set; } + + [Key(1)] public int TitleStillGroupId { get; set; } + + [Key(2)] public int ReleaseEvaluateConditionId { get; set; } + + [Key(3)] public TitleStillLogoType TitleStillLogoType { get; set; } + + [Key(4)] public string AssetName { get; set; } +} diff --git a/src/Models/Entities/EntityMTitleStillGroup.cs b/src/Models/Entities/EntityMTitleStillGroup.cs new file mode 100644 index 0000000..d983ac5 --- /dev/null +++ b/src/Models/Entities/EntityMTitleStillGroup.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMTitleStillGroup))] +public class EntityMTitleStillGroup +{ + [Key(0)] public int TitleStillGroupId { get; set; } + + [Key(1)] public int DisplayStillCount { get; set; } + + [Key(2)] public int Weight { get; set; } + + [Key(3)] public int Priority { get; set; } +} diff --git a/src/Models/Entities/EntityMTutorialConsumePossessionGroup.cs b/src/Models/Entities/EntityMTutorialConsumePossessionGroup.cs new file mode 100644 index 0000000..ec6771b --- /dev/null +++ b/src/Models/Entities/EntityMTutorialConsumePossessionGroup.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMTutorialConsumePossessionGroup))] +public class EntityMTutorialConsumePossessionGroup +{ + [Key(0)] public TutorialType TutorialType { get; set; } + + [Key(1)] public PossessionType PossessionType { get; set; } + + [Key(2)] public int PossessionId { get; set; } + + [Key(3)] public int Count { get; set; } +} diff --git a/src/Models/Entities/EntityMTutorialDialog.cs b/src/Models/Entities/EntityMTutorialDialog.cs new file mode 100644 index 0000000..6c0af76 --- /dev/null +++ b/src/Models/Entities/EntityMTutorialDialog.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMTutorialDialog))] +public class EntityMTutorialDialog +{ + [Key(0)] public TutorialType TutorialType { get; set; } + + [Key(1)] public HelpType HelpType { get; set; } +} diff --git a/src/Models/Entities/EntityMTutorialUnlockCondition.cs b/src/Models/Entities/EntityMTutorialUnlockCondition.cs new file mode 100644 index 0000000..d09ab69 --- /dev/null +++ b/src/Models/Entities/EntityMTutorialUnlockCondition.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMTutorialUnlockCondition))] +public class EntityMTutorialUnlockCondition +{ + [Key(0)] public TutorialType TutorialType { get; set; } + + [Key(1)] public TutorialUnlockConditionType TutorialUnlockConditionType { get; set; } + + [Key(2)] public int ConditionValue { get; set; } +} diff --git a/src/Models/Entities/EntityMUserLevel.cs b/src/Models/Entities/EntityMUserLevel.cs new file mode 100644 index 0000000..f163ddf --- /dev/null +++ b/src/Models/Entities/EntityMUserLevel.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMUserLevel))] +public class EntityMUserLevel +{ + [Key(0)] public int UserLevel { get; set; } + + [Key(1)] public int MaxStamina { get; set; } +} diff --git a/src/Models/Entities/EntityMUserQuestSceneGrantPossession.cs b/src/Models/Entities/EntityMUserQuestSceneGrantPossession.cs new file mode 100644 index 0000000..677980e --- /dev/null +++ b/src/Models/Entities/EntityMUserQuestSceneGrantPossession.cs @@ -0,0 +1,22 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMUserQuestSceneGrantPossession))] +public class EntityMUserQuestSceneGrantPossession +{ + [Key(0)] public int QuestSceneId { get; set; } + + [Key(1)] public PossessionType PossessionType { get; set; } + + [Key(2)] public int PossessionId { get; set; } + + [Key(3)] public int Count { get; set; } + + [Key(4)] public bool IsGift { get; set; } + + [Key(5)] public bool IsDebug { get; set; } +} diff --git a/src/Models/Entities/EntityMWeapon.cs b/src/Models/Entities/EntityMWeapon.cs new file mode 100644 index 0000000..e52dee8 --- /dev/null +++ b/src/Models/Entities/EntityMWeapon.cs @@ -0,0 +1,46 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMWeapon))] +public class EntityMWeapon +{ + [Key(0)] public int WeaponId { get; set; } + + [Key(1)] public int WeaponCategoryType { get; set; } + + [Key(2)] public WeaponType WeaponType { get; set; } + + [Key(3)] public int AssetVariationId { get; set; } + + [Key(4)] public RarityType RarityType { get; set; } + + [Key(5)] public AttributeType AttributeType { get; set; } + + [Key(6)] public bool IsRestrictDiscard { get; set; } + + [Key(7)] public int WeaponBaseStatusId { get; set; } + + [Key(8)] public int WeaponStatusCalculationId { get; set; } + + [Key(9)] public int WeaponSkillGroupId { get; set; } + + [Key(10)] public int WeaponAbilityGroupId { get; set; } + + [Key(11)] public int WeaponEvolutionMaterialGroupId { get; set; } + + [Key(12)] public int WeaponEvolutionGrantPossessionGroupId { get; set; } + + [Key(13)] public int WeaponStoryReleaseConditionGroupId { get; set; } + + [Key(14)] public int WeaponSpecificEnhanceId { get; set; } + + [Key(15)] public int WeaponSpecificLimitBreakMaterialGroupId { get; set; } + + [Key(16)] public int CharacterWalkaroundRangeType { get; set; } + + [Key(17)] public bool IsRecyclable { get; set; } +} diff --git a/src/Models/Entities/EntityMWeaponAbilityEnhancementMaterial.cs b/src/Models/Entities/EntityMWeaponAbilityEnhancementMaterial.cs new file mode 100644 index 0000000..5057494 --- /dev/null +++ b/src/Models/Entities/EntityMWeaponAbilityEnhancementMaterial.cs @@ -0,0 +1,20 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMWeaponAbilityEnhancementMaterial))] +public class EntityMWeaponAbilityEnhancementMaterial +{ + [Key(0)] public int WeaponAbilityEnhancementMaterialId { get; set; } + + [Key(1)] public int AbilityLevel { get; set; } + + [Key(2)] public int MaterialId { get; set; } + + [Key(3)] public int Count { get; set; } + + [Key(4)] public int SortOrder { get; set; } +} diff --git a/src/Models/Entities/EntityMWeaponAbilityGroup.cs b/src/Models/Entities/EntityMWeaponAbilityGroup.cs new file mode 100644 index 0000000..2f0a0b6 --- /dev/null +++ b/src/Models/Entities/EntityMWeaponAbilityGroup.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMWeaponAbilityGroup))] +public class EntityMWeaponAbilityGroup +{ + [Key(0)] public int WeaponAbilityGroupId { get; set; } + + [Key(1)] public int SlotNumber { get; set; } + + [Key(2)] public int AbilityId { get; set; } + + [Key(3)] public int WeaponAbilityEnhancementMaterialId { get; set; } +} diff --git a/src/Models/Entities/EntityMWeaponAwaken.cs b/src/Models/Entities/EntityMWeaponAwaken.cs new file mode 100644 index 0000000..4a6c96f --- /dev/null +++ b/src/Models/Entities/EntityMWeaponAwaken.cs @@ -0,0 +1,20 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMWeaponAwaken))] +public class EntityMWeaponAwaken +{ + [Key(0)] public int WeaponId { get; set; } + + [Key(1)] public int WeaponAwakenEffectGroupId { get; set; } + + [Key(2)] public int WeaponAwakenMaterialGroupId { get; set; } + + [Key(3)] public int ConsumeGold { get; set; } + + [Key(4)] public int LevelLimitUp { get; set; } +} diff --git a/src/Models/Entities/EntityMWeaponAwakenAbility.cs b/src/Models/Entities/EntityMWeaponAwakenAbility.cs new file mode 100644 index 0000000..1a3047a --- /dev/null +++ b/src/Models/Entities/EntityMWeaponAwakenAbility.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMWeaponAwakenAbility))] +public class EntityMWeaponAwakenAbility +{ + [Key(0)] public int WeaponAwakenAbilityId { get; set; } + + [Key(1)] public int AbilityId { get; set; } + + [Key(2)] public int AbilityLevel { get; set; } +} diff --git a/src/Models/Entities/EntityMWeaponAwakenEffectGroup.cs b/src/Models/Entities/EntityMWeaponAwakenEffectGroup.cs new file mode 100644 index 0000000..beb5e71 --- /dev/null +++ b/src/Models/Entities/EntityMWeaponAwakenEffectGroup.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMWeaponAwakenEffectGroup))] +public class EntityMWeaponAwakenEffectGroup +{ + [Key(0)] public int WeaponAwakenEffectGroupId { get; set; } + + [Key(1)] public int WeaponAwakenEffectType { get; set; } + + [Key(2)] public int WeaponAwakenEffectId { get; set; } +} diff --git a/src/Models/Entities/EntityMWeaponAwakenMaterialGroup.cs b/src/Models/Entities/EntityMWeaponAwakenMaterialGroup.cs new file mode 100644 index 0000000..5cc7637 --- /dev/null +++ b/src/Models/Entities/EntityMWeaponAwakenMaterialGroup.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMWeaponAwakenMaterialGroup))] +public class EntityMWeaponAwakenMaterialGroup +{ + [Key(0)] public int WeaponAwakenMaterialGroupId { get; set; } + + [Key(1)] public int MaterialId { get; set; } + + [Key(2)] public int Count { get; set; } + + [Key(3)] public int SortOrder { get; set; } +} diff --git a/src/Models/Entities/EntityMWeaponAwakenStatusUpGroup.cs b/src/Models/Entities/EntityMWeaponAwakenStatusUpGroup.cs new file mode 100644 index 0000000..6e15d39 --- /dev/null +++ b/src/Models/Entities/EntityMWeaponAwakenStatusUpGroup.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMWeaponAwakenStatusUpGroup))] +public class EntityMWeaponAwakenStatusUpGroup +{ + [Key(0)] public int WeaponAwakenStatusUpGroupId { get; set; } + + [Key(1)] public StatusKindType StatusKindType { get; set; } + + [Key(2)] public StatusCalculationType StatusCalculationType { get; set; } + + [Key(3)] public int EffectValue { get; set; } +} diff --git a/src/Models/Entities/EntityMWeaponBaseStatus.cs b/src/Models/Entities/EntityMWeaponBaseStatus.cs new file mode 100644 index 0000000..5c32498 --- /dev/null +++ b/src/Models/Entities/EntityMWeaponBaseStatus.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMWeaponBaseStatus))] +public class EntityMWeaponBaseStatus +{ + [Key(0)] public int WeaponBaseStatusId { get; set; } + + [Key(1)] public int Hp { get; set; } + + [Key(2)] public int Attack { get; set; } + + [Key(3)] public int Vitality { get; set; } +} diff --git a/src/Models/Entities/EntityMWeaponConsumeExchangeConsumableItemGroup.cs b/src/Models/Entities/EntityMWeaponConsumeExchangeConsumableItemGroup.cs new file mode 100644 index 0000000..55ddff6 --- /dev/null +++ b/src/Models/Entities/EntityMWeaponConsumeExchangeConsumableItemGroup.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMWeaponConsumeExchangeConsumableItemGroup))] +public class EntityMWeaponConsumeExchangeConsumableItemGroup +{ + [Key(0)] public int WeaponId { get; set; } + + [Key(1)] public int ConsumableItemId { get; set; } + + [Key(2)] public int Count { get; set; } +} diff --git a/src/Models/Entities/EntityMWeaponEnhanced.cs b/src/Models/Entities/EntityMWeaponEnhanced.cs new file mode 100644 index 0000000..e0645b2 --- /dev/null +++ b/src/Models/Entities/EntityMWeaponEnhanced.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMWeaponEnhanced))] +public class EntityMWeaponEnhanced +{ + [Key(0)] public int WeaponEnhancedId { get; set; } + + [Key(1)] public int WeaponId { get; set; } + + [Key(2)] public int Level { get; set; } + + [Key(3)] public int LimitBreakCount { get; set; } +} diff --git a/src/Models/Entities/EntityMWeaponEnhancedAbility.cs b/src/Models/Entities/EntityMWeaponEnhancedAbility.cs new file mode 100644 index 0000000..ad3a032 --- /dev/null +++ b/src/Models/Entities/EntityMWeaponEnhancedAbility.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMWeaponEnhancedAbility))] +public class EntityMWeaponEnhancedAbility +{ + [Key(0)] public int WeaponEnhancedId { get; set; } + + [Key(1)] public int AbilityId { get; set; } + + [Key(2)] public int Level { get; set; } +} diff --git a/src/Models/Entities/EntityMWeaponEnhancedSkill.cs b/src/Models/Entities/EntityMWeaponEnhancedSkill.cs new file mode 100644 index 0000000..6c80b0d --- /dev/null +++ b/src/Models/Entities/EntityMWeaponEnhancedSkill.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMWeaponEnhancedSkill))] +public class EntityMWeaponEnhancedSkill +{ + [Key(0)] public int WeaponEnhancedId { get; set; } + + [Key(1)] public int SkillId { get; set; } + + [Key(2)] public int Level { get; set; } +} diff --git a/src/Models/Entities/EntityMWeaponEvolutionGroup.cs b/src/Models/Entities/EntityMWeaponEvolutionGroup.cs new file mode 100644 index 0000000..09e261c --- /dev/null +++ b/src/Models/Entities/EntityMWeaponEvolutionGroup.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMWeaponEvolutionGroup))] +public class EntityMWeaponEvolutionGroup +{ + [Key(0)] public int WeaponEvolutionGroupId { get; set; } + + [Key(1)] public int EvolutionOrder { get; set; } + + [Key(2)] public int WeaponId { get; set; } +} diff --git a/src/Models/Entities/EntityMWeaponEvolutionMaterialGroup.cs b/src/Models/Entities/EntityMWeaponEvolutionMaterialGroup.cs new file mode 100644 index 0000000..37276b1 --- /dev/null +++ b/src/Models/Entities/EntityMWeaponEvolutionMaterialGroup.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMWeaponEvolutionMaterialGroup))] +public class EntityMWeaponEvolutionMaterialGroup +{ + [Key(0)] public int WeaponEvolutionMaterialGroupId { get; set; } + + [Key(1)] public int MaterialId { get; set; } + + [Key(2)] public int Count { get; set; } + + [Key(3)] public int SortOrder { get; set; } +} diff --git a/src/Models/Entities/EntityMWeaponFieldEffectDecreasePoint.cs b/src/Models/Entities/EntityMWeaponFieldEffectDecreasePoint.cs new file mode 100644 index 0000000..cb53987 --- /dev/null +++ b/src/Models/Entities/EntityMWeaponFieldEffectDecreasePoint.cs @@ -0,0 +1,26 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMWeaponFieldEffectDecreasePoint))] +public class EntityMWeaponFieldEffectDecreasePoint +{ + [Key(0)] public int WeaponId { get; set; } + + [Key(1)] public int RelationIndex { get; set; } + + [Key(2)] public int FieldEffectGroupId { get; set; } + + [Key(3)] public int FieldEffectAbilityId { get; set; } + + [Key(4)] public int DecreasePoint { get; set; } + + [Key(5)] public int WeaponAbilityId { get; set; } + + [Key(6)] public bool IsWeaponAwaken { get; set; } + + [Key(7)] public int AutoOrganizationCoefficientPermil { get; set; } +} diff --git a/src/Models/Entities/EntityMWeaponRarity.cs b/src/Models/Entities/EntityMWeaponRarity.cs new file mode 100644 index 0000000..bd188f3 --- /dev/null +++ b/src/Models/Entities/EntityMWeaponRarity.cs @@ -0,0 +1,38 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMWeaponRarity))] +public class EntityMWeaponRarity +{ + [Key(0)] public RarityType RarityType { get; set; } + + [Key(1)] public int BaseEnhancementObtainedExp { get; set; } + + [Key(2)] public int SellPriceNumericalFunctionId { get; set; } + + [Key(3)] public int MaxLevelNumericalFunctionId { get; set; } + + [Key(4)] public int MaxSkillLevelNumericalFunctionId { get; set; } + + [Key(5)] public int MaxAbilityLevelNumericalFunctionId { get; set; } + + [Key(6)] public int RequiredExpForLevelUpNumericalParameterMapId { get; set; } + + [Key(7)] public int EnhancementCostByWeaponNumericalFunctionId { get; set; } + + [Key(8)] public int EnhancementCostByMaterialNumericalFunctionId { get; set; } + + [Key(9)] public int SkillEnhancementCostNumericalFunctionId { get; set; } + + [Key(10)] public int AbilityEnhancementCostNumericalFunctionId { get; set; } + + [Key(11)] public int LimitBreakCostByWeaponNumericalFunctionId { get; set; } + + [Key(12)] public int LimitBreakCostByMaterialNumericalFunctionId { get; set; } + + [Key(13)] public int EvolutionCostNumericalFunctionId { get; set; }// 0x44 +} diff --git a/src/Models/Entities/EntityMWeaponRarityLimitBreakMaterialGroup.cs b/src/Models/Entities/EntityMWeaponRarityLimitBreakMaterialGroup.cs new file mode 100644 index 0000000..a7af734 --- /dev/null +++ b/src/Models/Entities/EntityMWeaponRarityLimitBreakMaterialGroup.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMWeaponRarityLimitBreakMaterialGroup))] +public class EntityMWeaponRarityLimitBreakMaterialGroup +{ + [Key(0)] public RarityType RarityType { get; set; } + + [Key(1)] public int MaterialId { get; set; } + + [Key(2)] public int Count { get; set; } + + [Key(3)] public int SortOrder { get; set; } +} diff --git a/src/Models/Entities/EntityMWeaponSkillEnhancementMaterial.cs b/src/Models/Entities/EntityMWeaponSkillEnhancementMaterial.cs new file mode 100644 index 0000000..fea0547 --- /dev/null +++ b/src/Models/Entities/EntityMWeaponSkillEnhancementMaterial.cs @@ -0,0 +1,20 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMWeaponSkillEnhancementMaterial))] +public class EntityMWeaponSkillEnhancementMaterial +{ + [Key(0)] public int WeaponSkillEnhancementMaterialId { get; set; } + + [Key(1)] public int SkillLevel { get; set; } + + [Key(2)] public int MaterialId { get; set; } + + [Key(3)] public int Count { get; set; } + + [Key(4)] public int SortOrder { get; set; } +} diff --git a/src/Models/Entities/EntityMWeaponSkillGroup.cs b/src/Models/Entities/EntityMWeaponSkillGroup.cs new file mode 100644 index 0000000..d174a8a --- /dev/null +++ b/src/Models/Entities/EntityMWeaponSkillGroup.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMWeaponSkillGroup))] +public class EntityMWeaponSkillGroup +{ + [Key(0)] public int WeaponSkillGroupId { get; set; } + + [Key(1)] public int SlotNumber { get; set; } + + [Key(2)] public int SkillId { get; set; } + + [Key(3)] public int WeaponSkillEnhancementMaterialId { get; set; } +} diff --git a/src/Models/Entities/EntityMWeaponSpecificEnhance.cs b/src/Models/Entities/EntityMWeaponSpecificEnhance.cs new file mode 100644 index 0000000..9e198a4 --- /dev/null +++ b/src/Models/Entities/EntityMWeaponSpecificEnhance.cs @@ -0,0 +1,38 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMWeaponSpecificEnhance))] +public class EntityMWeaponSpecificEnhance +{ + [Key(0)] public int WeaponSpecificEnhanceId { get; set; } + + [Key(1)] public int BaseEnhancementObtainedExp { get; set; } + + [Key(2)] public int SellPriceNumericalFunctionId { get; set; } + + [Key(3)] public int MaxLevelNumericalFunctionId { get; set; } + + [Key(4)] public int MaxSkillLevelNumericalFunctionId { get; set; } + + [Key(5)] public int MaxAbilityLevelNumericalFunctionId { get; set; } + + [Key(6)] public int RequiredExpForLevelUpNumericalParameterMapId { get; set; } + + [Key(7)] public int EnhancementCostByWeaponNumericalFunctionId { get; set; } + + [Key(8)] public int EnhancementCostByMaterialNumericalFunctionId { get; set; } + + [Key(9)] public int SkillEnhancementCostNumericalFunctionId { get; set; } + + [Key(10)] public int AbilityEnhancementCostNumericalFunctionId { get; set; } + + [Key(11)] public int LimitBreakCostByWeaponNumericalFunctionId { get; set; } + + [Key(12)] public int LimitBreakCostByMaterialNumericalFunctionId { get; set; } + + [Key(13)] public int EvolutionCostNumericalFunctionId { get; set; } +} diff --git a/src/Models/Entities/EntityMWeaponSpecificLimitBreakMaterialGroup.cs b/src/Models/Entities/EntityMWeaponSpecificLimitBreakMaterialGroup.cs new file mode 100644 index 0000000..90b0eba --- /dev/null +++ b/src/Models/Entities/EntityMWeaponSpecificLimitBreakMaterialGroup.cs @@ -0,0 +1,20 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMWeaponSpecificLimitBreakMaterialGroup))] +public class EntityMWeaponSpecificLimitBreakMaterialGroup +{ + [Key(0)] public int WeaponSpecificLimitBreakMaterialGroupId { get; set; } + + [Key(1)] public int LimitBreakCountLowerLimit { get; set; } + + [Key(2)] public int MaterialId { get; set; } + + [Key(3)] public int Count { get; set; } + + [Key(4)] public int SortOrder { get; set; } +} diff --git a/src/Models/Entities/EntityMWeaponStatusCalculation.cs b/src/Models/Entities/EntityMWeaponStatusCalculation.cs new file mode 100644 index 0000000..7948674 --- /dev/null +++ b/src/Models/Entities/EntityMWeaponStatusCalculation.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMWeaponStatusCalculation))] +public class EntityMWeaponStatusCalculation +{ + [Key(0)] public int WeaponStatusCalculationId { get; set; } + + [Key(1)] public int HpNumericalFunctionId { get; set; } + + [Key(2)] public int AttackNumericalFunctionId { get; set; } + + [Key(3)] public int VitalityNumericalFunctionId { get; set; } +} diff --git a/src/Models/Entities/EntityMWeaponStoryReleaseConditionGroup.cs b/src/Models/Entities/EntityMWeaponStoryReleaseConditionGroup.cs new file mode 100644 index 0000000..5cfa55c --- /dev/null +++ b/src/Models/Entities/EntityMWeaponStoryReleaseConditionGroup.cs @@ -0,0 +1,20 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMWeaponStoryReleaseConditionGroup))] +public class EntityMWeaponStoryReleaseConditionGroup +{ + [Key(0)] public int WeaponStoryReleaseConditionGroupId { get; set; } + + [Key(1)] public int StoryIndex { get; set; } + + [Key(2)] public WeaponStoryReleaseConditionType WeaponStoryReleaseConditionType { get; set; } + + [Key(3)] public int ConditionValue { get; set; } + + [Key(4)] public int WeaponStoryReleaseConditionOperationGroupId { get; set; } +} diff --git a/src/Models/Entities/EntityMWeaponStoryReleaseConditionOperation.cs b/src/Models/Entities/EntityMWeaponStoryReleaseConditionOperation.cs new file mode 100644 index 0000000..b2218f4 --- /dev/null +++ b/src/Models/Entities/EntityMWeaponStoryReleaseConditionOperation.cs @@ -0,0 +1,18 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMWeaponStoryReleaseConditionOperation))] +public class EntityMWeaponStoryReleaseConditionOperation +{ + [Key(0)] public int WeaponStoryReleaseConditionOperationGroupId { get; set; } + + [Key(1)] public int SortOrder { get; set; } + + [Key(2)] public WeaponStoryReleaseConditionType WeaponStoryReleaseConditionType { get; set; } + + [Key(3)] public int ConditionValue { get; set; } +} diff --git a/src/Models/Entities/EntityMWeaponStoryReleaseConditionOperationGroup.cs b/src/Models/Entities/EntityMWeaponStoryReleaseConditionOperationGroup.cs new file mode 100644 index 0000000..6d303f6 --- /dev/null +++ b/src/Models/Entities/EntityMWeaponStoryReleaseConditionOperationGroup.cs @@ -0,0 +1,14 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMWeaponStoryReleaseConditionOperationGroup))] +public class EntityMWeaponStoryReleaseConditionOperationGroup +{ + [Key(0)] public int WeaponStoryReleaseConditionOperationGroupId { get; set; } + + [Key(1)] public ConditionOperationType ConditionOperationType { get; set; } +} diff --git a/src/Models/Entities/EntityMWebviewMission.cs b/src/Models/Entities/EntityMWebviewMission.cs new file mode 100644 index 0000000..184410e --- /dev/null +++ b/src/Models/Entities/EntityMWebviewMission.cs @@ -0,0 +1,22 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMWebviewMission))] +public class EntityMWebviewMission +{ + [Key(0)] public int WebviewMissionId { get; set; } + + [Key(1)] public int TitleTextId { get; set; } + + [Key(2)] public int WebviewMissionType { get; set; } + + [Key(3)] public int WebviewMissionTargetId { get; set; } + + [Key(4)] public long StartDatetime { get; set; } + + [Key(5)] public long EndDatetime { get; set; } +} diff --git a/src/Models/Entities/EntityMWebviewMissionTitleText.cs b/src/Models/Entities/EntityMWebviewMissionTitleText.cs new file mode 100644 index 0000000..ae3682c --- /dev/null +++ b/src/Models/Entities/EntityMWebviewMissionTitleText.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMWebviewMissionTitleText))] +public class EntityMWebviewMissionTitleText +{ + [Key(0)] public int WebviewMissionTitleTextId { get; set; } + + [Key(1)] public LanguageType LanguageType { get; set; } + + [Key(2)] public string Text { get; set; } +} diff --git a/src/Models/Entities/EntityMWebviewPanelMission.cs b/src/Models/Entities/EntityMWebviewPanelMission.cs new file mode 100644 index 0000000..0ca8892 --- /dev/null +++ b/src/Models/Entities/EntityMWebviewPanelMission.cs @@ -0,0 +1,20 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMWebviewPanelMission))] +public class EntityMWebviewPanelMission +{ + [Key(0)] public int WebviewPanelMissionId { get; set; } + + [Key(1)] public int Page { get; set; } + + [Key(2)] public int WebviewPanelMissionPageId { get; set; } + + [Key(3)] public long StartDatetime { get; set; } + + [Key(4)] public long EndDatetime { get; set; } +} diff --git a/src/Models/Entities/EntityMWebviewPanelMissionCompleteFlavorText.cs b/src/Models/Entities/EntityMWebviewPanelMissionCompleteFlavorText.cs new file mode 100644 index 0000000..3e5c5e2 --- /dev/null +++ b/src/Models/Entities/EntityMWebviewPanelMissionCompleteFlavorText.cs @@ -0,0 +1,16 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMWebviewPanelMissionCompleteFlavorText))] +public class EntityMWebviewPanelMissionCompleteFlavorText +{ + [Key(0)] public int WebviewPanelMissionCompleteFlavorTextId { get; set; } + + [Key(1)] public LanguageType LanguageType { get; set; } + + [Key(2)] public string CompleteFlavorText { get; set; } +} diff --git a/src/Models/Entities/EntityMWebviewPanelMissionPage.cs b/src/Models/Entities/EntityMWebviewPanelMissionPage.cs new file mode 100644 index 0000000..45b0e79 --- /dev/null +++ b/src/Models/Entities/EntityMWebviewPanelMissionPage.cs @@ -0,0 +1,24 @@ +using MariesWonderland.MasterMemory; +using MariesWonderland.Models.Type; +using MessagePack; + +namespace MariesWonderland.Models.Entities; + +[MessagePackObject] +[MemoryTable(nameof(EntityMWebviewPanelMissionPage))] +public class EntityMWebviewPanelMissionPage +{ + [Key(0)] public int WebviewPanelMissionPageId { get; set; } + + [Key(1)] public int WebviewPanelMissionPanelGroupId { get; set; } + + [Key(2)] public int WebviewPanelMissionBgPartsGroupId { get; set; } + + [Key(3)] public int WebviewPanelMissionCompleteFlavorTextId { get; set; } + + [Key(4)] public string ImageFileName { get; set; } + + [Key(5)] public int ImageAssetId { get; set; } + + [Key(6)] public int WebviewPanelMissionPageRewardGroupId { get; set; } +} diff --git a/src/Models/Entities/EntitySBattleDetail.cs b/src/Models/Entities/EntitySBattleDetail.cs new file mode 100644 index 0000000..0cb6059 --- /dev/null +++ b/src/Models/Entities/EntitySBattleDetail.cs @@ -0,0 +1,37 @@ +using MariesWonderland.Proto.Battle; + +namespace MariesWonderland.Models.Entities; + +/// +/// Server-side battle record captured at FinishWave. Never sent to the client. +/// +public class EntitySBattleDetail : IUserEntity +{ + // Server-side context fields (not in proto). + public long UserId { get; set; } + public int QuestId { get; set; } + public DateTime RecordedAt { get; set; } + + // Top-level FinishWaveRequest fields. + /// Raw base64-encoded MessagePack blob from FinishWaveRequest.battleBinary. + public string BattleBinary { get; set; } = string.Empty; + public long ElapsedFrameCount { get; set; } + + // BattleDetail message scalar fields. + public int MaxDamage { get; set; } + public int PlayerCostumeActiveSkillUsedCount { get; set; } + public int PlayerWeaponActiveSkillUsedCount { get; set; } + public int PlayerCompanionSkillUsedCount { get; set; } + public int CriticalCount { get; set; } + public int ComboCount { get; set; } + public int ComboMaxDamage { get; set; } + public long TotalRecoverPoint { get; set; } + + /// Computed: count of costumes in CostumeBattleInfoList where IsAlive is false. + public int CharacterDeathCount => CostumeBattleInfoList.Count(c => !c.IsAlive); + + // Nested lists — use proto-generated types directly. + public List CostumeBattleInfoList { get; set; } = []; + public List UserPartyResultInfoList { get; set; } = []; + public List NpcPartyResultInfoList { get; set; } = []; +} diff --git a/src/Models/Entities/EntitySBigHuntSession.cs b/src/Models/Entities/EntitySBigHuntSession.cs new file mode 100644 index 0000000..bba8eca --- /dev/null +++ b/src/Models/Entities/EntitySBigHuntSession.cs @@ -0,0 +1,17 @@ +namespace MariesWonderland.Models.Entities; + +/// +/// Server-side BigHunt session state. Tracks in-progress battle data and deck selection. +/// Never sent to the client. +/// +public class EntitySBigHuntSession : IUserEntity +{ + public long UserId { get; set; } + public byte[] BattleBinary { get; set; } = []; + public int DeckNumber { get; set; } + public int DeckType { get; set; } + public int UserTripleDeckNumber { get; set; } + public int BossKnockDownCount { get; set; } + public int MaxComboCount { get; set; } + public long TotalDamage { get; set; } +} diff --git a/src/Models/Entities/EntitySGachaBannerState.cs b/src/Models/Entities/EntitySGachaBannerState.cs new file mode 100644 index 0000000..9d97f93 --- /dev/null +++ b/src/Models/Entities/EntitySGachaBannerState.cs @@ -0,0 +1,20 @@ +namespace MariesWonderland.Models.Entities; + +public class EntitySGachaBannerState : IUserEntity +{ + public long UserId { get; set; } + + public int GachaId { get; set; } + + public int BoxNumber { get; set; } = 1; + + public int DrawCount { get; set; } + + public int MedalCount { get; set; } + + public int StepNumber { get; set; } + + public int LoopCount { get; set; } + + public Dictionary BoxDrewCounts { get; set; } = []; +} diff --git a/src/Models/Entities/EntitySGachaRewardState.cs b/src/Models/Entities/EntitySGachaRewardState.cs new file mode 100644 index 0000000..e6ea2a9 --- /dev/null +++ b/src/Models/Entities/EntitySGachaRewardState.cs @@ -0,0 +1,14 @@ +namespace MariesWonderland.Models.Entities; + +public class EntitySGachaRewardState : IUserEntity +{ + public long UserId { get; set; } + + public long LastRewardDrawDate { get; set; } + + public int TodaysCurrentDrawCount { get; set; } + + public int DailyMaxCount { get; set; } + + public bool RewardAvailable { get; set; } = true; +} diff --git a/src/Models/Entities/EntitySQuestSession.cs b/src/Models/Entities/EntitySQuestSession.cs new file mode 100644 index 0000000..eaab662 --- /dev/null +++ b/src/Models/Entities/EntitySQuestSession.cs @@ -0,0 +1,13 @@ +namespace MariesWonderland.Models.Entities; + +/// +/// Server-side quest session record. Created when a quest starts, deleted when it finishes or is retired. +/// Tracks which deck slot the player selected so EXP can be applied only to units in that deck. +/// Never sent to the client. +/// +public class EntitySQuestSession : IUserEntity +{ + public long UserId { get; set; } + public int QuestId { get; set; } + public int UserDeckNumber { get; set; } +} diff --git a/src/Models/Entities/EntitySUser.cs b/src/Models/Entities/EntitySUser.cs new file mode 100644 index 0000000..b3a278e --- /dev/null +++ b/src/Models/Entities/EntitySUser.cs @@ -0,0 +1,10 @@ +namespace MariesWonderland.Models.Entities; + +public class EntitySUser : IUserEntity +{ + public long UserId { get; set; } + + public string BackupToken { get; set; } = ""; + + public long ChargeMoneyThisMonth { get; set; } +} diff --git a/src/Models/Entities/EntitySUserDevice.cs b/src/Models/Entities/EntitySUserDevice.cs new file mode 100644 index 0000000..245abe1 --- /dev/null +++ b/src/Models/Entities/EntitySUserDevice.cs @@ -0,0 +1,15 @@ +namespace MariesWonderland.Models.Entities; + +public class EntitySUserDevice : IUserEntity +{ + public long UserId { get; set; } + public string Uuid { get; set; } = ""; + public string AdvertisingId { get; set; } = ""; + public bool IsTrackingEnabled { get; set; } + public string IdentifierForVendor { get; set; } = ""; + public string DeviceToken { get; set; } = ""; + public string MacAddress { get; set; } = ""; + public string RegistrationId { get; set; } = ""; + public long RegisteredAt { get; set; } + public long LastAuthAt { get; set; } +} diff --git a/src/Models/Entities/EntitySUserGift.cs b/src/Models/Entities/EntitySUserGift.cs new file mode 100644 index 0000000..46510ae --- /dev/null +++ b/src/Models/Entities/EntitySUserGift.cs @@ -0,0 +1,25 @@ +namespace MariesWonderland.Models.Entities; + +public class EntitySUserGift : IUserEntity +{ + public long UserId { get; set; } + + public string UserGiftUuid { get; set; } = string.Empty; + + public int PossessionType { get; set; } + + public int PossessionId { get; set; } + + public int Count { get; set; } + + public long GrantDatetime { get; set; } + + public int DescriptionGiftTextId { get; set; } + + public byte[] EquipmentData { get; set; } = []; + + public long ExpirationDatetime { get; set; } + + /// Unix milliseconds. Zero means the gift has not been received yet. + public long ReceivedDatetime { get; set; } +} diff --git a/src/Models/Entities/IUserEntity.cs b/src/Models/Entities/IUserEntity.cs new file mode 100644 index 0000000..e31e037 --- /dev/null +++ b/src/Models/Entities/IUserEntity.cs @@ -0,0 +1,6 @@ +namespace MariesWonderland.Models.Entities; + +public interface IUserEntity +{ + long UserId { get; set; } +} diff --git a/src/Models/Tables/EntityIUserAppleTable.cs b/src/Models/Tables/EntityIUserAppleTable.cs new file mode 100644 index 0000000..17649ed --- /dev/null +++ b/src/Models/Tables/EntityIUserAppleTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserAppleTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserAppleTable(EntityIUserApple[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.UserId; + } + + public EntityIUserApple FindByUserId(long key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityIUserAutoSaleSettingDetailTable.cs b/src/Models/Tables/EntityIUserAutoSaleSettingDetailTable.cs new file mode 100644 index 0000000..298c528 --- /dev/null +++ b/src/Models/Tables/EntityIUserAutoSaleSettingDetailTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserAutoSaleSettingDetailTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserAutoSaleSettingDetailTable(EntityIUserAutoSaleSettingDetail[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.UserId, element.PossessionAutoSaleItemType); + } + + public bool TryFindByUserIdAndPossessionAutoSaleItemType(ValueTuple key, out EntityIUserAutoSaleSettingDetail result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer<(long, int)>.Default, key, out result); +} diff --git a/src/Models/Tables/EntityIUserBeginnerCampaignTable.cs b/src/Models/Tables/EntityIUserBeginnerCampaignTable.cs new file mode 100644 index 0000000..1804ace --- /dev/null +++ b/src/Models/Tables/EntityIUserBeginnerCampaignTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserBeginnerCampaignTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserBeginnerCampaignTable(EntityIUserBeginnerCampaign[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.UserId; + } + + public EntityIUserBeginnerCampaign FindByUserId(long key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityIUserBigHuntMaxScoreTable.cs b/src/Models/Tables/EntityIUserBigHuntMaxScoreTable.cs new file mode 100644 index 0000000..4e0875c --- /dev/null +++ b/src/Models/Tables/EntityIUserBigHuntMaxScoreTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserBigHuntMaxScoreTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserBigHuntMaxScoreTable(EntityIUserBigHuntMaxScore[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.UserId, element.BigHuntBossId); + } + + public EntityIUserBigHuntMaxScore FindByUserIdAndBigHuntBossId(ValueTuple key) => FindUniqueCore(data, primaryIndexSelector, Comparer<(long, int)>.Default, key); +} diff --git a/src/Models/Tables/EntityIUserBigHuntProgressStatusTable.cs b/src/Models/Tables/EntityIUserBigHuntProgressStatusTable.cs new file mode 100644 index 0000000..955d566 --- /dev/null +++ b/src/Models/Tables/EntityIUserBigHuntProgressStatusTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserBigHuntProgressStatusTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserBigHuntProgressStatusTable(EntityIUserBigHuntProgressStatus[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.UserId; + } + + public EntityIUserBigHuntProgressStatus FindByUserId(long key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityIUserBigHuntScheduleMaxScoreTable.cs b/src/Models/Tables/EntityIUserBigHuntScheduleMaxScoreTable.cs new file mode 100644 index 0000000..7ef40d3 --- /dev/null +++ b/src/Models/Tables/EntityIUserBigHuntScheduleMaxScoreTable.cs @@ -0,0 +1,19 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserBigHuntScheduleMaxScoreTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserBigHuntScheduleMaxScoreTable(EntityIUserBigHuntScheduleMaxScore[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.UserId, element.BigHuntScheduleId, element.BigHuntBossId); + } + + public EntityIUserBigHuntScheduleMaxScore FindByUserIdAndBigHuntScheduleIdAndBigHuntBossId(ValueTuple key) => + FindUniqueCore(data, primaryIndexSelector, Comparer<(long, int, int)>.Default, key); + + public bool TryFindByUserIdAndBigHuntScheduleIdAndBigHuntBossId(ValueTuple key, out EntityIUserBigHuntScheduleMaxScore result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer<(long, int, int)>.Default, key, out result); +} diff --git a/src/Models/Tables/EntityIUserBigHuntStatusTable.cs b/src/Models/Tables/EntityIUserBigHuntStatusTable.cs new file mode 100644 index 0000000..c7e96bf --- /dev/null +++ b/src/Models/Tables/EntityIUserBigHuntStatusTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserBigHuntStatusTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserBigHuntStatusTable(EntityIUserBigHuntStatus[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.UserId, element.BigHuntBossQuestId); + } + + public EntityIUserBigHuntStatus FindByUserIdAndBigHuntBossQuestId(ValueTuple key) => FindUniqueCore(data, primaryIndexSelector, Comparer<(long, int)>.Default, key); +} diff --git a/src/Models/Tables/EntityIUserBigHuntWeeklyMaxScoreTable.cs b/src/Models/Tables/EntityIUserBigHuntWeeklyMaxScoreTable.cs new file mode 100644 index 0000000..480a7e7 --- /dev/null +++ b/src/Models/Tables/EntityIUserBigHuntWeeklyMaxScoreTable.cs @@ -0,0 +1,17 @@ +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserBigHuntWeeklyMaxScoreTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserBigHuntWeeklyMaxScoreTable(EntityIUserBigHuntWeeklyMaxScore[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.UserId, element.BigHuntWeeklyVersion, element.AttributeType); + } + + public bool TryFindByUserIdAndBigHuntWeeklyVersionAndAttributeType(ValueTuple key, out EntityIUserBigHuntWeeklyMaxScore result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer<(long, long, AttributeType)>.Default, key, out result); +} diff --git a/src/Models/Tables/EntityIUserBigHuntWeeklyStatusTable.cs b/src/Models/Tables/EntityIUserBigHuntWeeklyStatusTable.cs new file mode 100644 index 0000000..a79820e --- /dev/null +++ b/src/Models/Tables/EntityIUserBigHuntWeeklyStatusTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserBigHuntWeeklyStatusTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserBigHuntWeeklyStatusTable(EntityIUserBigHuntWeeklyStatus[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.UserId, element.BigHuntWeeklyVersion); + } +} diff --git a/src/Models/Tables/EntityIUserCageOrnamentRewardTable.cs b/src/Models/Tables/EntityIUserCageOrnamentRewardTable.cs new file mode 100644 index 0000000..7ad0b42 --- /dev/null +++ b/src/Models/Tables/EntityIUserCageOrnamentRewardTable.cs @@ -0,0 +1,18 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserCageOrnamentRewardTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserCageOrnamentRewardTable(EntityIUserCageOrnamentReward[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.UserId, element.CageOrnamentId); + } + + public EntityIUserCageOrnamentReward FindByUserIdAndCageOrnamentId(ValueTuple key) => FindUniqueCore(data, primaryIndexSelector, Comparer<(long, int)>.Default, key); + + public bool TryFindByUserIdAndCageOrnamentId(ValueTuple key, out EntityIUserCageOrnamentReward result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer<(long, int)>.Default, key, out result); +} diff --git a/src/Models/Tables/EntityIUserCharacterBoardAbilityTable.cs b/src/Models/Tables/EntityIUserCharacterBoardAbilityTable.cs new file mode 100644 index 0000000..6eded0e --- /dev/null +++ b/src/Models/Tables/EntityIUserCharacterBoardAbilityTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserCharacterBoardAbilityTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserCharacterBoardAbilityTable(EntityIUserCharacterBoardAbility[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.UserId, element.CharacterId, element.AbilityId); + } + + public bool TryFindByUserIdAndCharacterIdAndAbilityId(ValueTuple key, out EntityIUserCharacterBoardAbility result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer<(long, int, int)>.Default, key, out result); +} diff --git a/src/Models/Tables/EntityIUserCharacterBoardCompleteRewardTable.cs b/src/Models/Tables/EntityIUserCharacterBoardCompleteRewardTable.cs new file mode 100644 index 0000000..8dc4f08 --- /dev/null +++ b/src/Models/Tables/EntityIUserCharacterBoardCompleteRewardTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserCharacterBoardCompleteRewardTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserCharacterBoardCompleteRewardTable(EntityIUserCharacterBoardCompleteReward[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.UserId, element.CharacterBoardCompleteRewardId); + } +} diff --git a/src/Models/Tables/EntityIUserCharacterBoardStatusUpTable.cs b/src/Models/Tables/EntityIUserCharacterBoardStatusUpTable.cs new file mode 100644 index 0000000..b04d242 --- /dev/null +++ b/src/Models/Tables/EntityIUserCharacterBoardStatusUpTable.cs @@ -0,0 +1,20 @@ +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserCharacterBoardStatusUpTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserCharacterBoardStatusUpTable(EntityIUserCharacterBoardStatusUp[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.UserId, element.CharacterId, element.StatusCalculationType); + } + + public EntityIUserCharacterBoardStatusUp FindByUserIdAndCharacterIdAndStatusCalculationType(ValueTuple key) => + FindUniqueCore(data, primaryIndexSelector, Comparer<(long, int, StatusCalculationType)>.Default, key); + + public RangeView FindRangeByUserIdAndCharacterIdAndStatusCalculationType(ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer<(long, int, StatusCalculationType)>.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityIUserCharacterBoardTable.cs b/src/Models/Tables/EntityIUserCharacterBoardTable.cs new file mode 100644 index 0000000..747e93e --- /dev/null +++ b/src/Models/Tables/EntityIUserCharacterBoardTable.cs @@ -0,0 +1,18 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserCharacterBoardTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserCharacterBoardTable(EntityIUserCharacterBoard[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.UserId, element.CharacterBoardId); + } + + public EntityIUserCharacterBoard FindByUserIdAndCharacterBoardId(ValueTuple key) => FindUniqueCore(data, primaryIndexSelector, Comparer<(long, int)>.Default, key); + + public bool TryFindByUserIdAndCharacterBoardId(ValueTuple key, out EntityIUserCharacterBoard result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer<(long, int)>.Default, key, out result); +} diff --git a/src/Models/Tables/EntityIUserCharacterCostumeLevelBonusTable.cs b/src/Models/Tables/EntityIUserCharacterCostumeLevelBonusTable.cs new file mode 100644 index 0000000..cee8b06 --- /dev/null +++ b/src/Models/Tables/EntityIUserCharacterCostumeLevelBonusTable.cs @@ -0,0 +1,21 @@ +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserCharacterCostumeLevelBonusTable : TableBase +{ + private readonly Func primaryIndexSelector; + private readonly Func secondaryIndexSelector; + + public EntityIUserCharacterCostumeLevelBonusTable(EntityIUserCharacterCostumeLevelBonus[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.UserId, element.CharacterId, element.StatusCalculationType); + secondaryIndexSelector = element => element.CharacterId; + } + + public bool TryFindByUserIdAndCharacterIdAndStatusCalculationType(ValueTuple key, out EntityIUserCharacterCostumeLevelBonus result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer<(long, int, StatusCalculationType)>.Default, key, out result); + + public RangeView FindByCharacterId(int key) => FindManyCore(data, secondaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityIUserCharacterRebirthTable.cs b/src/Models/Tables/EntityIUserCharacterRebirthTable.cs new file mode 100644 index 0000000..367e22c --- /dev/null +++ b/src/Models/Tables/EntityIUserCharacterRebirthTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserCharacterRebirthTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserCharacterRebirthTable(EntityIUserCharacterRebirth[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.UserId, element.CharacterId); + } + + public EntityIUserCharacterRebirth FindByUserIdAndCharacterId(ValueTuple key) => FindUniqueCore(data, primaryIndexSelector, Comparer<(long, int)>.Default, key); +} diff --git a/src/Models/Tables/EntityIUserCharacterTable.cs b/src/Models/Tables/EntityIUserCharacterTable.cs new file mode 100644 index 0000000..8f8a9e5 --- /dev/null +++ b/src/Models/Tables/EntityIUserCharacterTable.cs @@ -0,0 +1,18 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserCharacterTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserCharacterTable(EntityIUserCharacter[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.UserId, element.CharacterId); + } + + public EntityIUserCharacter FindByUserIdAndCharacterId(ValueTuple key) => FindUniqueCore(data, primaryIndexSelector, Comparer<(long, int)>.Default, key); + + public bool TryFindByUserIdAndCharacterId(ValueTuple key, out EntityIUserCharacter result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer<(long, int)>.Default, key, out result); +} diff --git a/src/Models/Tables/EntityIUserCharacterViewerFieldTable.cs b/src/Models/Tables/EntityIUserCharacterViewerFieldTable.cs new file mode 100644 index 0000000..3150335 --- /dev/null +++ b/src/Models/Tables/EntityIUserCharacterViewerFieldTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserCharacterViewerFieldTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserCharacterViewerFieldTable(EntityIUserCharacterViewerField[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.UserId, element.CharacterViewerFieldId); + } +} diff --git a/src/Models/Tables/EntityIUserComebackCampaignTable.cs b/src/Models/Tables/EntityIUserComebackCampaignTable.cs new file mode 100644 index 0000000..7974ad2 --- /dev/null +++ b/src/Models/Tables/EntityIUserComebackCampaignTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserComebackCampaignTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserComebackCampaignTable(EntityIUserComebackCampaign[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.UserId; + } + + public EntityIUserComebackCampaign FindByUserId(long key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityIUserCompanionTable.cs b/src/Models/Tables/EntityIUserCompanionTable.cs new file mode 100644 index 0000000..0f650b9 --- /dev/null +++ b/src/Models/Tables/EntityIUserCompanionTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserCompanionTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserCompanionTable(EntityIUserCompanion[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.UserId, element.UserCompanionUuid); + } + + public EntityIUserCompanion FindByUserIdAndUserCompanionUuid(ValueTuple key) => FindUniqueCore(data, primaryIndexSelector, Comparer<(long, string)>.Default, key); +} diff --git a/src/Models/Tables/EntityIUserConsumableItemTable.cs b/src/Models/Tables/EntityIUserConsumableItemTable.cs new file mode 100644 index 0000000..defb9fa --- /dev/null +++ b/src/Models/Tables/EntityIUserConsumableItemTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserConsumableItemTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserConsumableItemTable(EntityIUserConsumableItem[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.UserId, element.ConsumableItemId); + } + + public bool TryFindByUserIdAndConsumableItemId(ValueTuple key, out EntityIUserConsumableItem result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer<(long, int)>.Default, key, out result); +} diff --git a/src/Models/Tables/EntityIUserContentsStoryTable.cs b/src/Models/Tables/EntityIUserContentsStoryTable.cs new file mode 100644 index 0000000..72bead3 --- /dev/null +++ b/src/Models/Tables/EntityIUserContentsStoryTable.cs @@ -0,0 +1,18 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserContentsStoryTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserContentsStoryTable(EntityIUserContentsStory[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.UserId, element.ContentsStoryId); + } + + public EntityIUserContentsStory FindByUserIdAndContentsStoryId(ValueTuple key) => FindUniqueCore(data, primaryIndexSelector, Comparer<(long, int)>.Default, key); + + public bool TryFindByUserIdAndContentsStoryId(ValueTuple key, out EntityIUserContentsStory result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer<(long, int)>.Default, key, out result); +} diff --git a/src/Models/Tables/EntityIUserCostumeActiveSkillTable.cs b/src/Models/Tables/EntityIUserCostumeActiveSkillTable.cs new file mode 100644 index 0000000..8cd5b7a --- /dev/null +++ b/src/Models/Tables/EntityIUserCostumeActiveSkillTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserCostumeActiveSkillTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserCostumeActiveSkillTable(EntityIUserCostumeActiveSkill[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.UserId, element.UserCostumeUuid); + } + + public EntityIUserCostumeActiveSkill FindByUserIdAndUserCostumeUuid(ValueTuple key) => FindUniqueCore(data, primaryIndexSelector, Comparer<(long, string)>.Default, key); +} diff --git a/src/Models/Tables/EntityIUserCostumeAwakenStatusUpTable.cs b/src/Models/Tables/EntityIUserCostumeAwakenStatusUpTable.cs new file mode 100644 index 0000000..9cb6a26 --- /dev/null +++ b/src/Models/Tables/EntityIUserCostumeAwakenStatusUpTable.cs @@ -0,0 +1,17 @@ +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserCostumeAwakenStatusUpTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserCostumeAwakenStatusUpTable(EntityIUserCostumeAwakenStatusUp[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.UserId, element.UserCostumeUuid, element.StatusCalculationType); + } + + public bool TryFindByUserIdAndUserCostumeUuidAndStatusCalculationType(ValueTuple key, out EntityIUserCostumeAwakenStatusUp result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer<(long, string, StatusCalculationType)>.Default, key, out result); +} diff --git a/src/Models/Tables/EntityIUserCostumeLevelBonusReleaseStatusTable.cs b/src/Models/Tables/EntityIUserCostumeLevelBonusReleaseStatusTable.cs new file mode 100644 index 0000000..091bc63 --- /dev/null +++ b/src/Models/Tables/EntityIUserCostumeLevelBonusReleaseStatusTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserCostumeLevelBonusReleaseStatusTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserCostumeLevelBonusReleaseStatusTable(EntityIUserCostumeLevelBonusReleaseStatus[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.UserId, element.CostumeId); + } + + public bool TryFindByUserIdAndCostumeId(ValueTuple key, out EntityIUserCostumeLevelBonusReleaseStatus result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer<(long, int)>.Default, key, out result); +} diff --git a/src/Models/Tables/EntityIUserCostumeLotteryEffectAbilityTable.cs b/src/Models/Tables/EntityIUserCostumeLotteryEffectAbilityTable.cs new file mode 100644 index 0000000..59a1add --- /dev/null +++ b/src/Models/Tables/EntityIUserCostumeLotteryEffectAbilityTable.cs @@ -0,0 +1,18 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserCostumeLotteryEffectAbilityTable : TableBase +{ + private readonly Func primaryIndexSelector; + private readonly Func secondaryIndexSelector; + + public EntityIUserCostumeLotteryEffectAbilityTable(EntityIUserCostumeLotteryEffectAbility[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.UserId, element.UserCostumeUuid, element.SlotNumber); + secondaryIndexSelector = element => (element.UserId, element.UserCostumeUuid); + } + + public RangeView FindByUserIdAndUserCostumeUuid(ValueTuple key) => + FindManyCore(data, secondaryIndexSelector, Comparer<(long, string)>.Default, key); +} diff --git a/src/Models/Tables/EntityIUserCostumeLotteryEffectPendingTable.cs b/src/Models/Tables/EntityIUserCostumeLotteryEffectPendingTable.cs new file mode 100644 index 0000000..c187582 --- /dev/null +++ b/src/Models/Tables/EntityIUserCostumeLotteryEffectPendingTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserCostumeLotteryEffectPendingTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserCostumeLotteryEffectPendingTable(EntityIUserCostumeLotteryEffectPending[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.UserId, element.UserCostumeUuid); + } + + public bool TryFindByUserIdAndUserCostumeUuid(ValueTuple key, out EntityIUserCostumeLotteryEffectPending result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer<(long, string)>.Default, key, out result); +} diff --git a/src/Models/Tables/EntityIUserCostumeLotteryEffectStatusUpTable.cs b/src/Models/Tables/EntityIUserCostumeLotteryEffectStatusUpTable.cs new file mode 100644 index 0000000..68a660e --- /dev/null +++ b/src/Models/Tables/EntityIUserCostumeLotteryEffectStatusUpTable.cs @@ -0,0 +1,17 @@ +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserCostumeLotteryEffectStatusUpTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserCostumeLotteryEffectStatusUpTable(EntityIUserCostumeLotteryEffectStatusUp[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.UserId, element.UserCostumeUuid, element.StatusCalculationType); + } + + public bool TryFindByUserIdAndUserCostumeUuidAndStatusCalculationType(ValueTuple key, out EntityIUserCostumeLotteryEffectStatusUp result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer<(long, string, StatusCalculationType)>.Default, key, out result); +} diff --git a/src/Models/Tables/EntityIUserCostumeLotteryEffectTable.cs b/src/Models/Tables/EntityIUserCostumeLotteryEffectTable.cs new file mode 100644 index 0000000..f50c260 --- /dev/null +++ b/src/Models/Tables/EntityIUserCostumeLotteryEffectTable.cs @@ -0,0 +1,19 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserCostumeLotteryEffectTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserCostumeLotteryEffectTable(EntityIUserCostumeLotteryEffect[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.UserId, element.UserCostumeUuid, element.SlotNumber); + } + + public bool TryFindByUserIdAndUserCostumeUuidAndSlotNumber(ValueTuple key, out EntityIUserCostumeLotteryEffect result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer<(long, string, int)>.Default, key, out result); + + public RangeView FindRangeByUserIdAndUserCostumeUuidAndSlotNumber(ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer<(long, string, int)>.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityIUserCostumeTable.cs b/src/Models/Tables/EntityIUserCostumeTable.cs new file mode 100644 index 0000000..76055db --- /dev/null +++ b/src/Models/Tables/EntityIUserCostumeTable.cs @@ -0,0 +1,18 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserCostumeTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserCostumeTable(EntityIUserCostume[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.UserId, element.UserCostumeUuid); + } + + public EntityIUserCostume FindByUserIdAndUserCostumeUuid(ValueTuple key) => FindUniqueCore(data, primaryIndexSelector, Comparer<(long, string)>.Default, key); + + public bool TryFindByUserIdAndUserCostumeUuid(ValueTuple key, out EntityIUserCostume result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer<(long, string)>.Default, key, out result); +} diff --git a/src/Models/Tables/EntityIUserDeckCharacterDressupCostumeTable.cs b/src/Models/Tables/EntityIUserDeckCharacterDressupCostumeTable.cs new file mode 100644 index 0000000..056beb9 --- /dev/null +++ b/src/Models/Tables/EntityIUserDeckCharacterDressupCostumeTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserDeckCharacterDressupCostumeTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserDeckCharacterDressupCostumeTable(EntityIUserDeckCharacterDressupCostume[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.UserId, element.UserDeckCharacterUuid); + } + + public bool TryFindByUserIdAndUserDeckCharacterUuid(ValueTuple key, out EntityIUserDeckCharacterDressupCostume result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer<(long, string)>.Default, key, out result); +} diff --git a/src/Models/Tables/EntityIUserDeckCharacterTable.cs b/src/Models/Tables/EntityIUserDeckCharacterTable.cs new file mode 100644 index 0000000..48e0464 --- /dev/null +++ b/src/Models/Tables/EntityIUserDeckCharacterTable.cs @@ -0,0 +1,19 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserDeckCharacterTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserDeckCharacterTable(EntityIUserDeckCharacter[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.UserId, element.UserDeckCharacterUuid); + } + + public EntityIUserDeckCharacter FindByUserIdAndUserDeckCharacterUuid(ValueTuple key) => + FindUniqueCore(data, primaryIndexSelector, Comparer<(long, string)>.Default, key); + + public bool TryFindByUserIdAndUserDeckCharacterUuid(ValueTuple key, out EntityIUserDeckCharacter result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer<(long, string)>.Default, key, out result); +} diff --git a/src/Models/Tables/EntityIUserDeckLimitContentDeletedCharacterTable.cs b/src/Models/Tables/EntityIUserDeckLimitContentDeletedCharacterTable.cs new file mode 100644 index 0000000..7139f92 --- /dev/null +++ b/src/Models/Tables/EntityIUserDeckLimitContentDeletedCharacterTable.cs @@ -0,0 +1,18 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserDeckLimitContentDeletedCharacterTable : TableBase +{ + private readonly Func primaryIndexSelector; + private readonly Func secondaryIndexSelector; + + public EntityIUserDeckLimitContentDeletedCharacterTable(EntityIUserDeckLimitContentDeletedCharacter[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.UserId, element.UserDeckNumber, element.UserDeckCharacterNumber); + secondaryIndexSelector = element => (element.UserId, element.UserDeckNumber); + } + + public RangeView FindByUserIdAndUserDeckNumber(ValueTuple key) => + FindManyCore(data, secondaryIndexSelector, Comparer<(long, int)>.Default, key); +} diff --git a/src/Models/Tables/EntityIUserDeckLimitContentRestrictedTable.cs b/src/Models/Tables/EntityIUserDeckLimitContentRestrictedTable.cs new file mode 100644 index 0000000..999ffc0 --- /dev/null +++ b/src/Models/Tables/EntityIUserDeckLimitContentRestrictedTable.cs @@ -0,0 +1,19 @@ +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserDeckLimitContentRestrictedTable : TableBase +{ + private readonly Func primaryIndexSelector; + private readonly Func secondaryIndexSelector; + + public EntityIUserDeckLimitContentRestrictedTable(EntityIUserDeckLimitContentRestricted[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.UserId, element.EventQuestChapterId, element.QuestId, element.DeckRestrictedUuid); + secondaryIndexSelector = element => (element.EventQuestChapterId, element.PossessionType); + } + + public RangeView FindByEventQuestChapterIdAndPossessionType(ValueTuple key) => + FindManyCore(data, secondaryIndexSelector, Comparer<(int, PossessionType)>.Default, key); +} diff --git a/src/Models/Tables/EntityIUserDeckPartsGroupTable.cs b/src/Models/Tables/EntityIUserDeckPartsGroupTable.cs new file mode 100644 index 0000000..2aa56cf --- /dev/null +++ b/src/Models/Tables/EntityIUserDeckPartsGroupTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserDeckPartsGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserDeckPartsGroupTable(EntityIUserDeckPartsGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.UserId, element.UserDeckCharacterUuid, element.UserPartsUuid); + } + + public EntityIUserDeckPartsGroup FindByUserIdAndUserDeckCharacterUuidAndUserPartsUuid((long, string, string) key) => + FindUniqueCore(data, primaryIndexSelector, Comparer<(long, string, string)>.Default, key); +} diff --git a/src/Models/Tables/EntityIUserDeckSubWeaponGroupTable.cs b/src/Models/Tables/EntityIUserDeckSubWeaponGroupTable.cs new file mode 100644 index 0000000..2906de6 --- /dev/null +++ b/src/Models/Tables/EntityIUserDeckSubWeaponGroupTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserDeckSubWeaponGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserDeckSubWeaponGroupTable(EntityIUserDeckSubWeaponGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.UserId, element.UserDeckCharacterUuid, element.UserWeaponUuid); + } + + public EntityIUserDeckSubWeaponGroup FindByUserIdAndUserDeckCharacterUuidAndUserWeaponUuid((long, string, string) key) => + FindUniqueCore(data, primaryIndexSelector, Comparer<(long, string, string)>.Default, key); +} diff --git a/src/Models/Tables/EntityIUserDeckTable.cs b/src/Models/Tables/EntityIUserDeckTable.cs new file mode 100644 index 0000000..d171172 --- /dev/null +++ b/src/Models/Tables/EntityIUserDeckTable.cs @@ -0,0 +1,20 @@ +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserDeckTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserDeckTable(EntityIUserDeck[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.UserId, element.DeckType, element.UserDeckNumber); + } + + public EntityIUserDeck FindByUserIdAndDeckTypeAndUserDeckNumber(ValueTuple key) => + FindUniqueCore(data, primaryIndexSelector, Comparer<(long, DeckType, int)>.Default, key); + + public bool TryFindByUserIdAndDeckTypeAndUserDeckNumber(ValueTuple key, out EntityIUserDeck result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer<(long, DeckType, int)>.Default, key, out result); +} diff --git a/src/Models/Tables/EntityIUserDeckTypeNoteTable.cs b/src/Models/Tables/EntityIUserDeckTypeNoteTable.cs new file mode 100644 index 0000000..a2f9e3f --- /dev/null +++ b/src/Models/Tables/EntityIUserDeckTypeNoteTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserDeckTypeNoteTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserDeckTypeNoteTable(EntityIUserDeckTypeNote[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.UserId, element.DeckType); + } + + public EntityIUserDeckTypeNote FindByUserIdAndDeckType((long, DeckType) key) => FindUniqueCore(data, primaryIndexSelector, Comparer<(long, DeckType)>.Default, key); +} diff --git a/src/Models/Tables/EntityIUserDokanTable.cs b/src/Models/Tables/EntityIUserDokanTable.cs new file mode 100644 index 0000000..0c65393 --- /dev/null +++ b/src/Models/Tables/EntityIUserDokanTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserDokanTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserDokanTable(EntityIUserDokan[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.UserId, element.DokanId); + } + + public bool TryFindByUserIdAndDokanId(ValueTuple key, out EntityIUserDokan result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer<(long, int)>.Default, key, out result); +} diff --git a/src/Models/Tables/EntityIUserEventQuestDailyGroupCompleteRewardTable.cs b/src/Models/Tables/EntityIUserEventQuestDailyGroupCompleteRewardTable.cs new file mode 100644 index 0000000..4962b4b --- /dev/null +++ b/src/Models/Tables/EntityIUserEventQuestDailyGroupCompleteRewardTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserEventQuestDailyGroupCompleteRewardTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserEventQuestDailyGroupCompleteRewardTable(EntityIUserEventQuestDailyGroupCompleteReward[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.UserId; + } + + public bool TryFindByUserId(long key, out EntityIUserEventQuestDailyGroupCompleteReward result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer.Default, key, out result); +} diff --git a/src/Models/Tables/EntityIUserEventQuestGuerrillaFreeOpenTable.cs b/src/Models/Tables/EntityIUserEventQuestGuerrillaFreeOpenTable.cs new file mode 100644 index 0000000..a685c32 --- /dev/null +++ b/src/Models/Tables/EntityIUserEventQuestGuerrillaFreeOpenTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserEventQuestGuerrillaFreeOpenTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserEventQuestGuerrillaFreeOpenTable(EntityIUserEventQuestGuerrillaFreeOpen[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.UserId; + } + + public bool TryFindByUserId(long key, out EntityIUserEventQuestGuerrillaFreeOpen result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer.Default, key, out result); +} diff --git a/src/Models/Tables/EntityIUserEventQuestLabyrinthSeasonTable.cs b/src/Models/Tables/EntityIUserEventQuestLabyrinthSeasonTable.cs new file mode 100644 index 0000000..4f096fc --- /dev/null +++ b/src/Models/Tables/EntityIUserEventQuestLabyrinthSeasonTable.cs @@ -0,0 +1,22 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserEventQuestLabyrinthSeasonTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserEventQuestLabyrinthSeasonTable(EntityIUserEventQuestLabyrinthSeason[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.UserId, element.EventQuestChapterId); + } + + public EntityIUserEventQuestLabyrinthSeason FindByUserIdAndEventQuestChapterId(ValueTuple key) => + FindUniqueCore(data, primaryIndexSelector, Comparer<(long, int)>.Default, key); + + public bool TryFindByUserIdAndEventQuestChapterId(ValueTuple key, out EntityIUserEventQuestLabyrinthSeason result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer<(long, int)>.Default, key, out result); + + public RangeView FindRangeByUserIdAndEventQuestChapterId(ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer<(long, int)>.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityIUserEventQuestLabyrinthStageTable.cs b/src/Models/Tables/EntityIUserEventQuestLabyrinthStageTable.cs new file mode 100644 index 0000000..be7908f --- /dev/null +++ b/src/Models/Tables/EntityIUserEventQuestLabyrinthStageTable.cs @@ -0,0 +1,19 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserEventQuestLabyrinthStageTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserEventQuestLabyrinthStageTable(EntityIUserEventQuestLabyrinthStage[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.UserId, element.EventQuestChapterId, element.StageOrder); + } + + public EntityIUserEventQuestLabyrinthStage FindByUserIdAndEventQuestChapterIdAndStageOrder(ValueTuple key) => + FindUniqueCore(data, primaryIndexSelector, Comparer<(long, int, int)>.Default, key); + + public bool TryFindByUserIdAndEventQuestChapterIdAndStageOrder(ValueTuple key, out EntityIUserEventQuestLabyrinthStage result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer<(long, int, int)>.Default, key, out result); +} diff --git a/src/Models/Tables/EntityIUserEventQuestProgressStatusTable.cs b/src/Models/Tables/EntityIUserEventQuestProgressStatusTable.cs new file mode 100644 index 0000000..c80e327 --- /dev/null +++ b/src/Models/Tables/EntityIUserEventQuestProgressStatusTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserEventQuestProgressStatusTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserEventQuestProgressStatusTable(EntityIUserEventQuestProgressStatus[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.UserId; + } + + public EntityIUserEventQuestProgressStatus FindByUserId(long key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityIUserEventQuestTowerAccumulationRewardTable.cs b/src/Models/Tables/EntityIUserEventQuestTowerAccumulationRewardTable.cs new file mode 100644 index 0000000..28b8f0b --- /dev/null +++ b/src/Models/Tables/EntityIUserEventQuestTowerAccumulationRewardTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserEventQuestTowerAccumulationRewardTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserEventQuestTowerAccumulationRewardTable(EntityIUserEventQuestTowerAccumulationReward[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.UserId, element.EventQuestChapterId); + } + + public EntityIUserEventQuestTowerAccumulationReward FindByUserIdAndEventQuestChapterId(ValueTuple key) => + FindUniqueCore(data, primaryIndexSelector, Comparer<(long, int)>.Default, key); +} diff --git a/src/Models/Tables/EntityIUserExploreScoreTable.cs b/src/Models/Tables/EntityIUserExploreScoreTable.cs new file mode 100644 index 0000000..92cd647 --- /dev/null +++ b/src/Models/Tables/EntityIUserExploreScoreTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserExploreScoreTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserExploreScoreTable(EntityIUserExploreScore[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.UserId, element.ExploreId); + } + + public EntityIUserExploreScore FindByUserIdAndExploreId(ValueTuple key) => FindUniqueCore(data, primaryIndexSelector, Comparer<(long, int)>.Default, key); +} diff --git a/src/Models/Tables/EntityIUserExploreTable.cs b/src/Models/Tables/EntityIUserExploreTable.cs new file mode 100644 index 0000000..cc408bd --- /dev/null +++ b/src/Models/Tables/EntityIUserExploreTable.cs @@ -0,0 +1,17 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserExploreTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserExploreTable(EntityIUserExplore[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.UserId; + } + + public EntityIUserExplore FindByUserId(long key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); + + public bool TryFindByUserId(long key, out EntityIUserExplore result) => TryFindUniqueCore(data, primaryIndexSelector, Comparer.Default, key, out result); +} diff --git a/src/Models/Tables/EntityIUserExtraQuestProgressStatusTable.cs b/src/Models/Tables/EntityIUserExtraQuestProgressStatusTable.cs new file mode 100644 index 0000000..56461a0 --- /dev/null +++ b/src/Models/Tables/EntityIUserExtraQuestProgressStatusTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserExtraQuestProgressStatusTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserExtraQuestProgressStatusTable(EntityIUserExtraQuestProgressStatus[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.UserId; + } + + public EntityIUserExtraQuestProgressStatus FindByUserId(long key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityIUserFacebookTable.cs b/src/Models/Tables/EntityIUserFacebookTable.cs new file mode 100644 index 0000000..a242365 --- /dev/null +++ b/src/Models/Tables/EntityIUserFacebookTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserFacebookTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserFacebookTable(EntityIUserFacebook[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.UserId; + } + + public EntityIUserFacebook FindByUserId(long key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityIUserGemTable.cs b/src/Models/Tables/EntityIUserGemTable.cs new file mode 100644 index 0000000..d6d1691 --- /dev/null +++ b/src/Models/Tables/EntityIUserGemTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserGemTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserGemTable(EntityIUserGem[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.UserId; + } + + public EntityIUserGem FindByUserId(long key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityIUserGimmickOrnamentProgressTable.cs b/src/Models/Tables/EntityIUserGimmickOrnamentProgressTable.cs new file mode 100644 index 0000000..36c66f6 --- /dev/null +++ b/src/Models/Tables/EntityIUserGimmickOrnamentProgressTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserGimmickOrnamentProgressTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserGimmickOrnamentProgressTable(EntityIUserGimmickOrnamentProgress[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.UserId, element.GimmickSequenceScheduleId, element.GimmickSequenceId, element.GimmickId, element.GimmickOrnamentIndex); + } + + public EntityIUserGimmickOrnamentProgress FindByUserId((long, int, int, int, int) key) => FindUniqueCore(data, primaryIndexSelector, Comparer<(long, int, int, int, int)>.Default, key); +} diff --git a/src/Models/Tables/EntityIUserGimmickSequenceTable.cs b/src/Models/Tables/EntityIUserGimmickSequenceTable.cs new file mode 100644 index 0000000..51ae5e9 --- /dev/null +++ b/src/Models/Tables/EntityIUserGimmickSequenceTable.cs @@ -0,0 +1,18 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserGimmickSequenceTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserGimmickSequenceTable(EntityIUserGimmickSequence[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.UserId, element.GimmickSequenceScheduleId); + } + + public EntityIUserGimmickSequence FindByUserId((long, int) key) + { + return FindUniqueCore(data, primaryIndexSelector, Comparer<(long, int)>.Default, key); + } +} diff --git a/src/Models/Tables/EntityIUserGimmickTable.cs b/src/Models/Tables/EntityIUserGimmickTable.cs new file mode 100644 index 0000000..8f189ac --- /dev/null +++ b/src/Models/Tables/EntityIUserGimmickTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserGimmickTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserGimmickTable(EntityIUserGimmick[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.UserId, element.GimmickSequenceScheduleId, element.GimmickSequenceId, element.GimmickId); + } + + public EntityIUserGimmick FindByUserId((long, int, int, int) key) => FindUniqueCore(data, primaryIndexSelector, Comparer<(long, int, int, int)>.Default, key); +} diff --git a/src/Models/Tables/EntityIUserGimmickUnlockTable.cs b/src/Models/Tables/EntityIUserGimmickUnlockTable.cs new file mode 100644 index 0000000..a084611 --- /dev/null +++ b/src/Models/Tables/EntityIUserGimmickUnlockTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserGimmickUnlockTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserGimmickUnlockTable(EntityIUserGimmickUnlock[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.UserId, element.GimmickSequenceScheduleId, element.GimmickSequenceId, element.GimmickId); + } + + public bool TryFindByUserIdAndGimmickSequenceScheduleIdAndGimmickSequenceIdAndGimmickId(ValueTuple key, out EntityIUserGimmickUnlock result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer<(long, int, int, int)>.Default, key, out result); +} diff --git a/src/Models/Tables/EntityIUserImportantItemTable.cs b/src/Models/Tables/EntityIUserImportantItemTable.cs new file mode 100644 index 0000000..646bac2 --- /dev/null +++ b/src/Models/Tables/EntityIUserImportantItemTable.cs @@ -0,0 +1,21 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserImportantItemTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserImportantItemTable(EntityIUserImportantItem[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.UserId, element.ImportantItemId); + } + + public EntityIUserImportantItem FindByUserIdAndImportantItemId(ValueTuple key) => FindUniqueCore(data, primaryIndexSelector, Comparer<(long, int)>.Default, key); + + public bool TryFindByUserIdAndImportantItemId(ValueTuple key, out EntityIUserImportantItem result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer<(long, int)>.Default, key, out result); + + public RangeView FindRangeByUserIdAndImportantItemId(ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer<(long, int)>.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityIUserLimitedOpenTable.cs b/src/Models/Tables/EntityIUserLimitedOpenTable.cs new file mode 100644 index 0000000..0f75c81 --- /dev/null +++ b/src/Models/Tables/EntityIUserLimitedOpenTable.cs @@ -0,0 +1,17 @@ +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserLimitedOpenTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserLimitedOpenTable(EntityIUserLimitedOpen[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.UserId, element.LimitedOpenTargetType, element.TargetId); + } + + public EntityIUserLimitedOpen FindByUserIdAndLimitedOpenTargetTypeAndTargetId(ValueTuple key) => + FindUniqueCore(data, primaryIndexSelector, Comparer<(long, LimitedOpenTargetType, int)>.Default, key); +} diff --git a/src/Models/Tables/EntityIUserLoginBonusTable.cs b/src/Models/Tables/EntityIUserLoginBonusTable.cs new file mode 100644 index 0000000..12276ed --- /dev/null +++ b/src/Models/Tables/EntityIUserLoginBonusTable.cs @@ -0,0 +1,18 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserLoginBonusTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserLoginBonusTable(EntityIUserLoginBonus[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.UserId, element.LoginBonusId); + } + + public EntityIUserLoginBonus FindByUserIdAndLoginBonusId(ValueTuple key) => FindUniqueCore(data, primaryIndexSelector, Comparer<(long, int)>.Default, key); + + public bool TryFindByUserIdAndLoginBonusId(ValueTuple key, out EntityIUserLoginBonus result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer<(long, int)>.Default, key, out result); +} diff --git a/src/Models/Tables/EntityIUserLoginTable.cs b/src/Models/Tables/EntityIUserLoginTable.cs new file mode 100644 index 0000000..df1e5f6 --- /dev/null +++ b/src/Models/Tables/EntityIUserLoginTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserLoginTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserLoginTable(EntityIUserLogin[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.UserId; + } +} diff --git a/src/Models/Tables/EntityIUserMainQuestFlowStatusTable.cs b/src/Models/Tables/EntityIUserMainQuestFlowStatusTable.cs new file mode 100644 index 0000000..2cd2c5b --- /dev/null +++ b/src/Models/Tables/EntityIUserMainQuestFlowStatusTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserMainQuestFlowStatusTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserMainQuestFlowStatusTable(EntityIUserMainQuestFlowStatus[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.UserId; + } + + public EntityIUserMainQuestFlowStatus FindByUserId(long key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityIUserMainQuestMainFlowStatusTable.cs b/src/Models/Tables/EntityIUserMainQuestMainFlowStatusTable.cs new file mode 100644 index 0000000..bd7d187 --- /dev/null +++ b/src/Models/Tables/EntityIUserMainQuestMainFlowStatusTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserMainQuestMainFlowStatusTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserMainQuestMainFlowStatusTable(EntityIUserMainQuestMainFlowStatus[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.UserId; + } + + public EntityIUserMainQuestMainFlowStatus FindByUserId(long key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityIUserMainQuestProgressStatusTable.cs b/src/Models/Tables/EntityIUserMainQuestProgressStatusTable.cs new file mode 100644 index 0000000..5989db0 --- /dev/null +++ b/src/Models/Tables/EntityIUserMainQuestProgressStatusTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserMainQuestProgressStatusTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserMainQuestProgressStatusTable(EntityIUserMainQuestProgressStatus[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.UserId; + } + + public EntityIUserMainQuestProgressStatus FindByUserId(long key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityIUserMainQuestReplayFlowStatusTable.cs b/src/Models/Tables/EntityIUserMainQuestReplayFlowStatusTable.cs new file mode 100644 index 0000000..9a1adc1 --- /dev/null +++ b/src/Models/Tables/EntityIUserMainQuestReplayFlowStatusTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserMainQuestReplayFlowStatusTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserMainQuestReplayFlowStatusTable(EntityIUserMainQuestReplayFlowStatus[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.UserId; + } + + public EntityIUserMainQuestReplayFlowStatus FindByUserId(long key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityIUserMainQuestSeasonRouteTable.cs b/src/Models/Tables/EntityIUserMainQuestSeasonRouteTable.cs new file mode 100644 index 0000000..46ba361 --- /dev/null +++ b/src/Models/Tables/EntityIUserMainQuestSeasonRouteTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserMainQuestSeasonRouteTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserMainQuestSeasonRouteTable(EntityIUserMainQuestSeasonRoute[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.UserId, element.MainQuestSeasonId); + } + + public EntityIUserMainQuestSeasonRoute FindByUserIdAndMainQuestSeasonId(ValueTuple key) => FindUniqueCore(data, primaryIndexSelector, Comparer<(long, int)>.Default, key); +} diff --git a/src/Models/Tables/EntityIUserMaterialTable.cs b/src/Models/Tables/EntityIUserMaterialTable.cs new file mode 100644 index 0000000..40fd500 --- /dev/null +++ b/src/Models/Tables/EntityIUserMaterialTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserMaterialTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserMaterialTable(EntityIUserMaterial[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.UserId, element.MaterialId); + } + + public EntityIUserMaterial FindByUserIdAndMaterialId(ValueTuple key) => FindUniqueCore(data, primaryIndexSelector, Comparer<(long, int)>.Default, key); +} diff --git a/src/Models/Tables/EntityIUserMissionCompletionProgressTable.cs b/src/Models/Tables/EntityIUserMissionCompletionProgressTable.cs new file mode 100644 index 0000000..f0c869c --- /dev/null +++ b/src/Models/Tables/EntityIUserMissionCompletionProgressTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserMissionCompletionProgressTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserMissionCompletionProgressTable(EntityIUserMissionCompletionProgress[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.UserId, element.MissionId); + } +} diff --git a/src/Models/Tables/EntityIUserMissionPassPointTable.cs b/src/Models/Tables/EntityIUserMissionPassPointTable.cs new file mode 100644 index 0000000..f232497 --- /dev/null +++ b/src/Models/Tables/EntityIUserMissionPassPointTable.cs @@ -0,0 +1,18 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserMissionPassPointTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserMissionPassPointTable(EntityIUserMissionPassPoint[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.UserId, element.MissionPassId); + } + + public EntityIUserMissionPassPoint FindByUserIdAndMissionPassId(ValueTuple key) => FindUniqueCore(data, primaryIndexSelector, Comparer<(long, int)>.Default, key); + + public bool TryFindByUserIdAndMissionPassId(ValueTuple key, out EntityIUserMissionPassPoint result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer<(long, int)>.Default, key, out result); +} diff --git a/src/Models/Tables/EntityIUserMissionTable.cs b/src/Models/Tables/EntityIUserMissionTable.cs new file mode 100644 index 0000000..78aac1b --- /dev/null +++ b/src/Models/Tables/EntityIUserMissionTable.cs @@ -0,0 +1,18 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserMissionTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserMissionTable(EntityIUserMission[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.UserId, element.MissionId); + } + + public EntityIUserMission FindByUserIdAndMissionId(ValueTuple key) => FindUniqueCore(data, primaryIndexSelector, Comparer<(long, int)>.Default, key); + + public bool TryFindByUserIdAndMissionId(ValueTuple key, out EntityIUserMission result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer<(long, int)>.Default, key, out result); +} diff --git a/src/Models/Tables/EntityIUserMovieTable.cs b/src/Models/Tables/EntityIUserMovieTable.cs new file mode 100644 index 0000000..7604cf5 --- /dev/null +++ b/src/Models/Tables/EntityIUserMovieTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserMovieTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserMovieTable(EntityIUserMovie[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.UserId, element.MovieId); + } + + public bool TryFindByUserIdAndMovieId(ValueTuple key, out EntityIUserMovie result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer<(long, int)>.Default, key, out result); +} diff --git a/src/Models/Tables/EntityIUserNaviCutInTable.cs b/src/Models/Tables/EntityIUserNaviCutInTable.cs new file mode 100644 index 0000000..d4116a0 --- /dev/null +++ b/src/Models/Tables/EntityIUserNaviCutInTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserNaviCutInTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserNaviCutInTable(EntityIUserNaviCutIn[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.UserId, element.NaviCutInId); + } + + public bool TryFindByUserIdAndNaviCutInId(ValueTuple key, out EntityIUserNaviCutIn result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer<(long, int)>.Default, key, out result); +} diff --git a/src/Models/Tables/EntityIUserOmikujiTable.cs b/src/Models/Tables/EntityIUserOmikujiTable.cs new file mode 100644 index 0000000..a321468 --- /dev/null +++ b/src/Models/Tables/EntityIUserOmikujiTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserOmikujiTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserOmikujiTable(EntityIUserOmikuji[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.UserId, element.OmikujiId); + } + + public EntityIUserOmikuji FindByUserIdAndOmikujiId(ValueTuple key) => FindUniqueCore(data, primaryIndexSelector, Comparer<(long, int)>.Default, key); +} diff --git a/src/Models/Tables/EntityIUserPartsGroupNoteTable.cs b/src/Models/Tables/EntityIUserPartsGroupNoteTable.cs new file mode 100644 index 0000000..f75e81d --- /dev/null +++ b/src/Models/Tables/EntityIUserPartsGroupNoteTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserPartsGroupNoteTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserPartsGroupNoteTable(EntityIUserPartsGroupNote[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.UserId, element.PartsGroupId); + } + + public bool TryFindByUserIdAndPartsGroupId(ValueTuple key, out EntityIUserPartsGroupNote result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer<(long, int)>.Default, key, out result); +} diff --git a/src/Models/Tables/EntityIUserPartsPresetTable.cs b/src/Models/Tables/EntityIUserPartsPresetTable.cs new file mode 100644 index 0000000..724a7fc --- /dev/null +++ b/src/Models/Tables/EntityIUserPartsPresetTable.cs @@ -0,0 +1,19 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserPartsPresetTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserPartsPresetTable(EntityIUserPartsPreset[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.UserId, element.UserPartsPresetNumber); + } + + public EntityIUserPartsPreset FindByUserIdAndUserPartsPresetNumber(ValueTuple key) => + FindUniqueCore(data, primaryIndexSelector, Comparer<(long, int)>.Default, key); + + public bool TryFindByUserIdAndUserPartsPresetNumber(ValueTuple key, out EntityIUserPartsPreset result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer<(long, int)>.Default, key, out result); +} diff --git a/src/Models/Tables/EntityIUserPartsPresetTagTable.cs b/src/Models/Tables/EntityIUserPartsPresetTagTable.cs new file mode 100644 index 0000000..c7461ce --- /dev/null +++ b/src/Models/Tables/EntityIUserPartsPresetTagTable.cs @@ -0,0 +1,19 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserPartsPresetTagTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserPartsPresetTagTable(EntityIUserPartsPresetTag[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.UserId, element.UserPartsPresetTagNumber); + } + + public EntityIUserPartsPresetTag FindByUserIdAndUserPartsPresetTagNumber(ValueTuple key) => + FindUniqueCore(data, primaryIndexSelector, Comparer<(long, int)>.Default, key); + + public bool TryFindByUserIdAndUserPartsPresetTagNumber(ValueTuple key, out EntityIUserPartsPresetTag result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer<(long, int)>.Default, key, out result); +} diff --git a/src/Models/Tables/EntityIUserPartsStatusSubTable.cs b/src/Models/Tables/EntityIUserPartsStatusSubTable.cs new file mode 100644 index 0000000..755ed70 --- /dev/null +++ b/src/Models/Tables/EntityIUserPartsStatusSubTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserPartsStatusSubTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserPartsStatusSubTable(EntityIUserPartsStatusSub[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.UserId, element.UserPartsUuid, element.StatusIndex); + } + + public EntityIUserPartsStatusSub FindByUserIdAndUserPartsUuidAndStatusIndex((long, string, int) key) => + FindUniqueCore(data, primaryIndexSelector, Comparer<(long, string, int)>.Default, key); +} diff --git a/src/Models/Tables/EntityIUserPartsTable.cs b/src/Models/Tables/EntityIUserPartsTable.cs new file mode 100644 index 0000000..16ac46f --- /dev/null +++ b/src/Models/Tables/EntityIUserPartsTable.cs @@ -0,0 +1,18 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserPartsTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserPartsTable(EntityIUserParts[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.UserId, element.UserPartsUuid); + } + + public EntityIUserParts FindByUserIdAndUserPartsUuid(ValueTuple key) => FindUniqueCore(data, primaryIndexSelector, Comparer<(long, string)>.Default, key); + + public bool TryFindByUserIdAndUserPartsUuid(ValueTuple key, out EntityIUserParts result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer<(long, string)>.Default, key, out result); +} diff --git a/src/Models/Tables/EntityIUserPortalCageStatusTable.cs b/src/Models/Tables/EntityIUserPortalCageStatusTable.cs new file mode 100644 index 0000000..453b55f --- /dev/null +++ b/src/Models/Tables/EntityIUserPortalCageStatusTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserPortalCageStatusTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserPortalCageStatusTable(EntityIUserPortalCageStatus[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.UserId; + } + + public EntityIUserPortalCageStatus FindByUserId(long key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityIUserPossessionAutoConvertTable.cs b/src/Models/Tables/EntityIUserPossessionAutoConvertTable.cs new file mode 100644 index 0000000..6b4785c --- /dev/null +++ b/src/Models/Tables/EntityIUserPossessionAutoConvertTable.cs @@ -0,0 +1,14 @@ +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserPossessionAutoConvertTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserPossessionAutoConvertTable(EntityIUserPossessionAutoConvert[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.UserId, element.PossessionType, element.PossessionId); + } +} diff --git a/src/Models/Tables/EntityIUserPremiumItemTable.cs b/src/Models/Tables/EntityIUserPremiumItemTable.cs new file mode 100644 index 0000000..dbd4ff2 --- /dev/null +++ b/src/Models/Tables/EntityIUserPremiumItemTable.cs @@ -0,0 +1,18 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserPremiumItemTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserPremiumItemTable(EntityIUserPremiumItem[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.UserId, element.PremiumItemId); + } + + public EntityIUserPremiumItem FindByUserIdAndPremiumItemId(ValueTuple key) => FindUniqueCore(data, primaryIndexSelector, Comparer<(long, int)>.Default, key); + + public bool TryFindByUserIdAndPremiumItemId(ValueTuple key, out EntityIUserPremiumItem result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer<(long, int)>.Default, key, out result); +} diff --git a/src/Models/Tables/EntityIUserProfileTable.cs b/src/Models/Tables/EntityIUserProfileTable.cs new file mode 100644 index 0000000..16ab7ea --- /dev/null +++ b/src/Models/Tables/EntityIUserProfileTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserProfileTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserProfileTable(EntityIUserProfile[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.UserId; + } + + public EntityIUserProfile FindByUserId(long key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityIUserPvpDefenseDeckTable.cs b/src/Models/Tables/EntityIUserPvpDefenseDeckTable.cs new file mode 100644 index 0000000..192fd2d --- /dev/null +++ b/src/Models/Tables/EntityIUserPvpDefenseDeckTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserPvpDefenseDeckTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserPvpDefenseDeckTable(EntityIUserPvpDefenseDeck[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.UserId; + } + + public EntityIUserPvpDefenseDeck FindByUserId(long key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityIUserPvpStatusTable.cs b/src/Models/Tables/EntityIUserPvpStatusTable.cs new file mode 100644 index 0000000..40df753 --- /dev/null +++ b/src/Models/Tables/EntityIUserPvpStatusTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserPvpStatusTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserPvpStatusTable(EntityIUserPvpStatus[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.UserId; + } + + public EntityIUserPvpStatus FindByUserId(long key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityIUserPvpWeeklyResultTable.cs b/src/Models/Tables/EntityIUserPvpWeeklyResultTable.cs new file mode 100644 index 0000000..70dbfbb --- /dev/null +++ b/src/Models/Tables/EntityIUserPvpWeeklyResultTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserPvpWeeklyResultTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserPvpWeeklyResultTable(EntityIUserPvpWeeklyResult[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.UserId, element.PvpWeeklyVersion); + } +} diff --git a/src/Models/Tables/EntityIUserQuestAutoOrbitTable.cs b/src/Models/Tables/EntityIUserQuestAutoOrbitTable.cs new file mode 100644 index 0000000..9097860 --- /dev/null +++ b/src/Models/Tables/EntityIUserQuestAutoOrbitTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserQuestAutoOrbitTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserQuestAutoOrbitTable(EntityIUserQuestAutoOrbit[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.UserId; + } + + public EntityIUserQuestAutoOrbit FindByUserId(long key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityIUserQuestLimitContentStatusTable.cs b/src/Models/Tables/EntityIUserQuestLimitContentStatusTable.cs new file mode 100644 index 0000000..ce7be72 --- /dev/null +++ b/src/Models/Tables/EntityIUserQuestLimitContentStatusTable.cs @@ -0,0 +1,17 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserQuestLimitContentStatusTable : TableBase +{ + private readonly Func primaryIndexSelector; + private readonly Func secondaryIndexSelector; + + public EntityIUserQuestLimitContentStatusTable(EntityIUserQuestLimitContentStatus[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.UserId, element.QuestId); + secondaryIndexSelector = element => element.EventQuestChapterId; + } + + public EntityIUserQuestLimitContentStatus FindByUserIdAndQuestId(ValueTuple key) => FindUniqueCore(data, primaryIndexSelector, Comparer<(long, int)>.Default, key); +} diff --git a/src/Models/Tables/EntityIUserQuestMissionTable.cs b/src/Models/Tables/EntityIUserQuestMissionTable.cs new file mode 100644 index 0000000..640e67f --- /dev/null +++ b/src/Models/Tables/EntityIUserQuestMissionTable.cs @@ -0,0 +1,19 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserQuestMissionTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserQuestMissionTable(EntityIUserQuestMission[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.UserId, element.QuestId, element.QuestMissionId); + } + + public EntityIUserQuestMission FindByUserIdAndQuestIdAndQuestMissionId(ValueTuple key) => + FindUniqueCore(data, primaryIndexSelector, Comparer<(long, int, int)>.Default, key); + + public bool TryFindByUserIdAndQuestIdAndQuestMissionId(ValueTuple key, out EntityIUserQuestMission result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer<(long, int, int)>.Default, key, out result); +} diff --git a/src/Models/Tables/EntityIUserQuestReplayFlowRewardGroupTable.cs b/src/Models/Tables/EntityIUserQuestReplayFlowRewardGroupTable.cs new file mode 100644 index 0000000..d9569ff --- /dev/null +++ b/src/Models/Tables/EntityIUserQuestReplayFlowRewardGroupTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserQuestReplayFlowRewardGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserQuestReplayFlowRewardGroupTable(EntityIUserQuestReplayFlowRewardGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.UserId, element.QuestReplayFlowRewardGroupId); + } + + public bool TryFindByUserIdAndQuestReplayFlowRewardGroupId(ValueTuple key, out EntityIUserQuestReplayFlowRewardGroup result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer<(long, int)>.Default, key, out result); +} diff --git a/src/Models/Tables/EntityIUserQuestSceneChoiceHistoryTable.cs b/src/Models/Tables/EntityIUserQuestSceneChoiceHistoryTable.cs new file mode 100644 index 0000000..cbfd9da --- /dev/null +++ b/src/Models/Tables/EntityIUserQuestSceneChoiceHistoryTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserQuestSceneChoiceHistoryTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserQuestSceneChoiceHistoryTable(EntityIUserQuestSceneChoiceHistory[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.UserId, element.QuestSceneChoiceEffectId); + } + + public bool TryFindByUserIdAndQuestSceneChoiceEffectId(ValueTuple key, out EntityIUserQuestSceneChoiceHistory result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer<(long, int)>.Default, key, out result); +} diff --git a/src/Models/Tables/EntityIUserQuestSceneChoiceTable.cs b/src/Models/Tables/EntityIUserQuestSceneChoiceTable.cs new file mode 100644 index 0000000..d603268 --- /dev/null +++ b/src/Models/Tables/EntityIUserQuestSceneChoiceTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserQuestSceneChoiceTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserQuestSceneChoiceTable(EntityIUserQuestSceneChoice[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.UserId, element.QuestSceneChoiceGroupingId); + } + + public bool TryFindByUserIdAndQuestSceneChoiceGroupingId(ValueTuple key, out EntityIUserQuestSceneChoice result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer<(long, int)>.Default, key, out result); +} diff --git a/src/Models/Tables/EntityIUserQuestTable.cs b/src/Models/Tables/EntityIUserQuestTable.cs new file mode 100644 index 0000000..1e3b07a --- /dev/null +++ b/src/Models/Tables/EntityIUserQuestTable.cs @@ -0,0 +1,18 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserQuestTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserQuestTable(EntityIUserQuest[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.UserId, element.QuestId); + } + + public EntityIUserQuest FindByUserIdAndQuestId(ValueTuple key) => FindUniqueCore(data, primaryIndexSelector, Comparer<(long, int)>.Default, key); + + public bool TryFindByUserIdAndQuestId(ValueTuple key, out EntityIUserQuest result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer<(long, int)>.Default, key, out result); +} diff --git a/src/Models/Tables/EntityIUserSettingTable.cs b/src/Models/Tables/EntityIUserSettingTable.cs new file mode 100644 index 0000000..f762020 --- /dev/null +++ b/src/Models/Tables/EntityIUserSettingTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserSettingTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserSettingTable(EntityIUserSetting[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.UserId; + } + + public bool TryFindByUserId(long key, out EntityIUserSetting result) => TryFindUniqueCore(data, primaryIndexSelector, Comparer.Default, key, out result); +} diff --git a/src/Models/Tables/EntityIUserShopItemTable.cs b/src/Models/Tables/EntityIUserShopItemTable.cs new file mode 100644 index 0000000..52c0c01 --- /dev/null +++ b/src/Models/Tables/EntityIUserShopItemTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserShopItemTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserShopItemTable(EntityIUserShopItem[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.UserId, element.ShopItemId); + } + + public EntityIUserShopItem FindByUserIdAndShopItemId((long, int) key) => FindUniqueCore(data, primaryIndexSelector, Comparer<(long, int)>.Default, key); +} diff --git a/src/Models/Tables/EntityIUserShopReplaceableLineupTable.cs b/src/Models/Tables/EntityIUserShopReplaceableLineupTable.cs new file mode 100644 index 0000000..36487d4 --- /dev/null +++ b/src/Models/Tables/EntityIUserShopReplaceableLineupTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserShopReplaceableLineupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserShopReplaceableLineupTable(EntityIUserShopReplaceableLineup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.UserId, element.SlotNumber); + } + + public RangeView FindRangeByUserIdAndSlotNumber(ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer<(long, int)>.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityIUserShopReplaceableTable.cs b/src/Models/Tables/EntityIUserShopReplaceableTable.cs new file mode 100644 index 0000000..f7bde66 --- /dev/null +++ b/src/Models/Tables/EntityIUserShopReplaceableTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserShopReplaceableTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserShopReplaceableTable(EntityIUserShopReplaceable[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.UserId; + } + + public EntityIUserShopReplaceable FindByUserId(long key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityIUserSideStoryQuestSceneProgressStatusTable.cs b/src/Models/Tables/EntityIUserSideStoryQuestSceneProgressStatusTable.cs new file mode 100644 index 0000000..1c073fa --- /dev/null +++ b/src/Models/Tables/EntityIUserSideStoryQuestSceneProgressStatusTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserSideStoryQuestSceneProgressStatusTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserSideStoryQuestSceneProgressStatusTable(EntityIUserSideStoryQuestSceneProgressStatus[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.UserId; + } + + public EntityIUserSideStoryQuestSceneProgressStatus FindByUserId(long key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityIUserSideStoryQuestTable.cs b/src/Models/Tables/EntityIUserSideStoryQuestTable.cs new file mode 100644 index 0000000..edb5b09 --- /dev/null +++ b/src/Models/Tables/EntityIUserSideStoryQuestTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserSideStoryQuestTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserSideStoryQuestTable(EntityIUserSideStoryQuest[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.UserId, element.SideStoryQuestId); + } +} diff --git a/src/Models/Tables/EntityIUserStatusTable.cs b/src/Models/Tables/EntityIUserStatusTable.cs new file mode 100644 index 0000000..38f68b1 --- /dev/null +++ b/src/Models/Tables/EntityIUserStatusTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserStatusTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserStatusTable(EntityIUserStatus[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.UserId; + } + + public EntityIUserStatus FindByUserId(long key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityIUserTable.cs b/src/Models/Tables/EntityIUserTable.cs new file mode 100644 index 0000000..947d163 --- /dev/null +++ b/src/Models/Tables/EntityIUserTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserTable(EntityIUser[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.UserId; + } + + public EntityIUser FindByUserId(long key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityIUserThoughtTable.cs b/src/Models/Tables/EntityIUserThoughtTable.cs new file mode 100644 index 0000000..314dd34 --- /dev/null +++ b/src/Models/Tables/EntityIUserThoughtTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserThoughtTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserThoughtTable(EntityIUserThought[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.UserId, element.UserThoughtUuid); + } + + public bool TryFindByUserIdAndUserThoughtUuid(ValueTuple key, out EntityIUserThought result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer<(long, string)>.Default, key, out result); +} diff --git a/src/Models/Tables/EntityIUserTripleDeckTable.cs b/src/Models/Tables/EntityIUserTripleDeckTable.cs new file mode 100644 index 0000000..ec3d555 --- /dev/null +++ b/src/Models/Tables/EntityIUserTripleDeckTable.cs @@ -0,0 +1,20 @@ +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserTripleDeckTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserTripleDeckTable(EntityIUserTripleDeck[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.UserId, element.DeckType, element.UserDeckNumber); + } + + public EntityIUserTripleDeck FindByUserIdAndDeckTypeAndUserDeckNumber(ValueTuple key) => + FindUniqueCore(data, primaryIndexSelector, Comparer<(long, DeckType, int)>.Default, key); + + public bool TryFindByUserIdAndDeckTypeAndUserDeckNumber(ValueTuple key, out EntityIUserTripleDeck result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer<(long, DeckType, int)>.Default, key, out result); +} diff --git a/src/Models/Tables/EntityIUserTutorialProgressTable.cs b/src/Models/Tables/EntityIUserTutorialProgressTable.cs new file mode 100644 index 0000000..920310a --- /dev/null +++ b/src/Models/Tables/EntityIUserTutorialProgressTable.cs @@ -0,0 +1,17 @@ +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserTutorialProgressTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserTutorialProgressTable(EntityIUserTutorialProgress[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.UserId, element.TutorialType); + } + + public bool TryFindByUserIdAndTutorialType(ValueTuple key, out EntityIUserTutorialProgress result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer<(long, TutorialType)>.Default, key, out result); +} diff --git a/src/Models/Tables/EntityIUserWeaponAbilityTable.cs b/src/Models/Tables/EntityIUserWeaponAbilityTable.cs new file mode 100644 index 0000000..7d390f2 --- /dev/null +++ b/src/Models/Tables/EntityIUserWeaponAbilityTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserWeaponAbilityTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserWeaponAbilityTable(EntityIUserWeaponAbility[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.UserId, element.UserWeaponUuid, element.SlotNumber); + } + + public bool TryFindByUserIdAndUserWeaponUuidAndSlotNumber(ValueTuple key, out EntityIUserWeaponAbility result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer<(long, string, int)>.Default, key, out result); +} diff --git a/src/Models/Tables/EntityIUserWeaponAwakenTable.cs b/src/Models/Tables/EntityIUserWeaponAwakenTable.cs new file mode 100644 index 0000000..9ab0cd3 --- /dev/null +++ b/src/Models/Tables/EntityIUserWeaponAwakenTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserWeaponAwakenTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserWeaponAwakenTable(EntityIUserWeaponAwaken[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.UserId, element.UserWeaponUuid); + } + + public bool TryFindByUserIdAndUserWeaponUuid(ValueTuple key, out EntityIUserWeaponAwaken result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer<(long, string)>.Default, key, out result); +} diff --git a/src/Models/Tables/EntityIUserWeaponNoteTable.cs b/src/Models/Tables/EntityIUserWeaponNoteTable.cs new file mode 100644 index 0000000..f61abef --- /dev/null +++ b/src/Models/Tables/EntityIUserWeaponNoteTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserWeaponNoteTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserWeaponNoteTable(EntityIUserWeaponNote[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.UserId, element.WeaponId); + } + + public bool TryFindByUserIdAndWeaponId(ValueTuple key, out EntityIUserWeaponNote result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer<(long, int)>.Default, key, out result); +} diff --git a/src/Models/Tables/EntityIUserWeaponSkillTable.cs b/src/Models/Tables/EntityIUserWeaponSkillTable.cs new file mode 100644 index 0000000..ecda795 --- /dev/null +++ b/src/Models/Tables/EntityIUserWeaponSkillTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserWeaponSkillTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserWeaponSkillTable(EntityIUserWeaponSkill[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.UserId, element.UserWeaponUuid, element.SlotNumber); + } + + public bool TryFindByUserIdAndUserWeaponUuidAndSlotNumber(ValueTuple key, out EntityIUserWeaponSkill result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer<(long, string, int)>.Default, key, out result); +} diff --git a/src/Models/Tables/EntityIUserWeaponStoryTable.cs b/src/Models/Tables/EntityIUserWeaponStoryTable.cs new file mode 100644 index 0000000..d9578fa --- /dev/null +++ b/src/Models/Tables/EntityIUserWeaponStoryTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserWeaponStoryTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserWeaponStoryTable(EntityIUserWeaponStory[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.UserId, element.WeaponId); + } + + public EntityIUserWeaponStory FindByUserIdAndWeaponId(ValueTuple key) => FindUniqueCore(data, primaryIndexSelector, Comparer<(long, int)>.Default, key); +} diff --git a/src/Models/Tables/EntityIUserWeaponTable.cs b/src/Models/Tables/EntityIUserWeaponTable.cs new file mode 100644 index 0000000..28c7b04 --- /dev/null +++ b/src/Models/Tables/EntityIUserWeaponTable.cs @@ -0,0 +1,18 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserWeaponTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserWeaponTable(EntityIUserWeapon[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.UserId, element.UserWeaponUuid); + } + + public EntityIUserWeapon FindByUserIdAndUserWeaponUuid(ValueTuple key) => FindUniqueCore(data, primaryIndexSelector, Comparer<(long, string)>.Default, key); + + public bool TryFindByUserIdAndUserWeaponUuid(ValueTuple key, out EntityIUserWeapon result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer<(long, string)>.Default, key, out result); +} diff --git a/src/Models/Tables/EntityIUserWebviewPanelMissionTable.cs b/src/Models/Tables/EntityIUserWebviewPanelMissionTable.cs new file mode 100644 index 0000000..8f5efea --- /dev/null +++ b/src/Models/Tables/EntityIUserWebviewPanelMissionTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityIUserWebviewPanelMissionTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityIUserWebviewPanelMissionTable(EntityIUserWebviewPanelMission[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.UserId, element.WebviewPanelMissionPageId); + } + + public EntityIUserWebviewPanelMission FindByUserIdAndWebviewPanelMissionPageId(ValueTuple key) => + FindUniqueCore(data, primaryIndexSelector, Comparer<(long, int)>.Default, key); +} diff --git a/src/Models/Tables/EntityMAbilityBehaviourActionBlessTable.cs b/src/Models/Tables/EntityMAbilityBehaviourActionBlessTable.cs new file mode 100644 index 0000000..b4f18e9 --- /dev/null +++ b/src/Models/Tables/EntityMAbilityBehaviourActionBlessTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMAbilityBehaviourActionBlessTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMAbilityBehaviourActionBlessTable(EntityMAbilityBehaviourActionBless[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.AbilityBehaviourActionId; + } + + public EntityMAbilityBehaviourActionBless FindByAbilityBehaviourActionId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMAbilityBehaviourActionPassiveSkillTable.cs b/src/Models/Tables/EntityMAbilityBehaviourActionPassiveSkillTable.cs new file mode 100644 index 0000000..df88c68 --- /dev/null +++ b/src/Models/Tables/EntityMAbilityBehaviourActionPassiveSkillTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMAbilityBehaviourActionPassiveSkillTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMAbilityBehaviourActionPassiveSkillTable(EntityMAbilityBehaviourActionPassiveSkill[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.AbilityBehaviourActionId; + } + + public EntityMAbilityBehaviourActionPassiveSkill FindByAbilityBehaviourActionId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMAbilityBehaviourActionStatusDownTable.cs b/src/Models/Tables/EntityMAbilityBehaviourActionStatusDownTable.cs new file mode 100644 index 0000000..5a49055 --- /dev/null +++ b/src/Models/Tables/EntityMAbilityBehaviourActionStatusDownTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMAbilityBehaviourActionStatusDownTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMAbilityBehaviourActionStatusDownTable(EntityMAbilityBehaviourActionStatusDown[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.AbilityBehaviourActionId; + } + + public EntityMAbilityBehaviourActionStatusDown FindByAbilityBehaviourActionId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMAbilityBehaviourActionStatusTable.cs b/src/Models/Tables/EntityMAbilityBehaviourActionStatusTable.cs new file mode 100644 index 0000000..7a05d6f --- /dev/null +++ b/src/Models/Tables/EntityMAbilityBehaviourActionStatusTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMAbilityBehaviourActionStatusTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMAbilityBehaviourActionStatusTable(EntityMAbilityBehaviourActionStatus[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.AbilityBehaviourActionId; + } + + public EntityMAbilityBehaviourActionStatus FindByAbilityBehaviourActionId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMAbilityBehaviourGroupTable.cs b/src/Models/Tables/EntityMAbilityBehaviourGroupTable.cs new file mode 100644 index 0000000..946576e --- /dev/null +++ b/src/Models/Tables/EntityMAbilityBehaviourGroupTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMAbilityBehaviourGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMAbilityBehaviourGroupTable(EntityMAbilityBehaviourGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.AbilityBehaviourGroupId, element.AbilityBehaviourIndex); + } + + public RangeView FindRangeByAbilityBehaviourGroupIdAndAbilityBehaviourIndex(ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityMAbilityBehaviourTable.cs b/src/Models/Tables/EntityMAbilityBehaviourTable.cs new file mode 100644 index 0000000..c41f7b1 --- /dev/null +++ b/src/Models/Tables/EntityMAbilityBehaviourTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMAbilityBehaviourTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMAbilityBehaviourTable(EntityMAbilityBehaviour[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.AbilityBehaviourId; + } + + public EntityMAbilityBehaviour FindByAbilityBehaviourId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMAbilityDetailTable.cs b/src/Models/Tables/EntityMAbilityDetailTable.cs new file mode 100644 index 0000000..800f024 --- /dev/null +++ b/src/Models/Tables/EntityMAbilityDetailTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMAbilityDetailTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMAbilityDetailTable(EntityMAbilityDetail[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.AbilityDetailId; + } + + public EntityMAbilityDetail FindByAbilityDetailId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMAbilityLevelGroupTable.cs b/src/Models/Tables/EntityMAbilityLevelGroupTable.cs new file mode 100644 index 0000000..d30ed1b --- /dev/null +++ b/src/Models/Tables/EntityMAbilityLevelGroupTable.cs @@ -0,0 +1,20 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMAbilityLevelGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + private readonly Func secondaryIndexSelector; + + public EntityMAbilityLevelGroupTable(EntityMAbilityLevelGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.AbilityLevelGroupId, element.LevelLowerLimit); + secondaryIndexSelector = element => element.AbilityLevelGroupId; + } + + public EntityMAbilityLevelGroup FindClosestByAbilityLevelGroupIdAndLevelLowerLimit(ValueTuple key, bool selectLower = true) => + FindUniqueClosestCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, key, selectLower); + + public RangeView FindByAbilityLevelGroupId(int key) => FindManyCore(data, secondaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMAbilityStatusTable.cs b/src/Models/Tables/EntityMAbilityStatusTable.cs new file mode 100644 index 0000000..fee5d22 --- /dev/null +++ b/src/Models/Tables/EntityMAbilityStatusTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMAbilityStatusTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMAbilityStatusTable(EntityMAbilityStatus[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.AbilityStatusId; + } + + public EntityMAbilityStatus FindByAbilityStatusId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMAbilityTable.cs b/src/Models/Tables/EntityMAbilityTable.cs new file mode 100644 index 0000000..1f23d9d --- /dev/null +++ b/src/Models/Tables/EntityMAbilityTable.cs @@ -0,0 +1,17 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMAbilityTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMAbilityTable(EntityMAbility[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.AbilityId; + } + + public EntityMAbility FindByAbilityId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); + + public bool TryFindByAbilityId(int key, out EntityMAbility result) => TryFindUniqueCore(data, primaryIndexSelector, Comparer.Default, key, out result); +} diff --git a/src/Models/Tables/EntityMActorAnimationCategoryTable.cs b/src/Models/Tables/EntityMActorAnimationCategoryTable.cs new file mode 100644 index 0000000..e55ee2f --- /dev/null +++ b/src/Models/Tables/EntityMActorAnimationCategoryTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMActorAnimationCategoryTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMActorAnimationCategoryTable(EntityMActorAnimationCategory[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.ActorAnimationCategoryId; + } +} diff --git a/src/Models/Tables/EntityMActorAnimationControllerTable.cs b/src/Models/Tables/EntityMActorAnimationControllerTable.cs new file mode 100644 index 0000000..725a064 --- /dev/null +++ b/src/Models/Tables/EntityMActorAnimationControllerTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMActorAnimationControllerTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMActorAnimationControllerTable(EntityMActorAnimationController[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.ActorAnimationControllerId; + } +} diff --git a/src/Models/Tables/EntityMActorAnimationTable.cs b/src/Models/Tables/EntityMActorAnimationTable.cs new file mode 100644 index 0000000..19e8e0e --- /dev/null +++ b/src/Models/Tables/EntityMActorAnimationTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMActorAnimationTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMActorAnimationTable(EntityMActorAnimation[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.ActorAnimationId; + } + + public EntityMActorAnimation FindByActorAnimationId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMActorObjectTable.cs b/src/Models/Tables/EntityMActorObjectTable.cs new file mode 100644 index 0000000..6a57a6f --- /dev/null +++ b/src/Models/Tables/EntityMActorObjectTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMActorObjectTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMActorObjectTable(EntityMActorObject[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.ActorObjectId; + } + + public EntityMActorObject FindByActorObjectId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMActorTable.cs b/src/Models/Tables/EntityMActorTable.cs new file mode 100644 index 0000000..2415e5d --- /dev/null +++ b/src/Models/Tables/EntityMActorTable.cs @@ -0,0 +1,17 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMActorTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMActorTable(EntityMActor[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.ActorId; + } + + public EntityMActor FindByActorId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); + + public bool TryFindByActorId(int key, out EntityMActor result) => TryFindUniqueCore(data, primaryIndexSelector, Comparer.Default, key, out result); +} diff --git a/src/Models/Tables/EntityMAppealDialogTable.cs b/src/Models/Tables/EntityMAppealDialogTable.cs new file mode 100644 index 0000000..b5d61ab --- /dev/null +++ b/src/Models/Tables/EntityMAppealDialogTable.cs @@ -0,0 +1,18 @@ +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Tables; + +public class EntityMAppealDialogTable : TableBase +{ + private readonly Func primaryIndexSelector; + private readonly Func secondaryIndexSelector; + + public EntityMAppealDialogTable(EntityMAppealDialog[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.AppealDialogId; + secondaryIndexSelector = element => element.AppealTargetType; + } + + public RangeView FindByAppealTargetType(AppealTargetType key) => FindManyCore(data, secondaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMAssetBackgroundTable.cs b/src/Models/Tables/EntityMAssetBackgroundTable.cs new file mode 100644 index 0000000..6ee338b --- /dev/null +++ b/src/Models/Tables/EntityMAssetBackgroundTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMAssetBackgroundTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMAssetBackgroundTable(EntityMAssetBackground[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.AssetBackgroundId; + } + + public EntityMAssetBackground FindByAssetBackgroundId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMAssetCalculatorTable.cs b/src/Models/Tables/EntityMAssetCalculatorTable.cs new file mode 100644 index 0000000..ef5d16f --- /dev/null +++ b/src/Models/Tables/EntityMAssetCalculatorTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMAssetCalculatorTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMAssetCalculatorTable(EntityMAssetCalculator[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.AssetCalculatorId; + } + + public EntityMAssetCalculator FindByAssetCalculatorId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMAssetDataSettingTable.cs b/src/Models/Tables/EntityMAssetDataSettingTable.cs new file mode 100644 index 0000000..cbf375a --- /dev/null +++ b/src/Models/Tables/EntityMAssetDataSettingTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMAssetDataSettingTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMAssetDataSettingTable(EntityMAssetDataSetting[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.AssetDataSettingId; + } +} diff --git a/src/Models/Tables/EntityMAssetEffectTable.cs b/src/Models/Tables/EntityMAssetEffectTable.cs new file mode 100644 index 0000000..1b67e0e --- /dev/null +++ b/src/Models/Tables/EntityMAssetEffectTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMAssetEffectTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMAssetEffectTable(EntityMAssetEffect[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.AssetEffectId; + } +} diff --git a/src/Models/Tables/EntityMAssetGradeIconTable.cs b/src/Models/Tables/EntityMAssetGradeIconTable.cs new file mode 100644 index 0000000..1c807c0 --- /dev/null +++ b/src/Models/Tables/EntityMAssetGradeIconTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMAssetGradeIconTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMAssetGradeIconTable(EntityMAssetGradeIcon[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.AssetGradeIconId; + } + + public EntityMAssetGradeIcon FindByAssetGradeIconId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMAssetTimelineTable.cs b/src/Models/Tables/EntityMAssetTimelineTable.cs new file mode 100644 index 0000000..8375be0 --- /dev/null +++ b/src/Models/Tables/EntityMAssetTimelineTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMAssetTimelineTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMAssetTimelineTable(EntityMAssetTimeline[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.AssetTimelineId; + } + + public EntityMAssetTimeline FindByAssetTimelineId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMAssetTurnbattlePrefabTable.cs b/src/Models/Tables/EntityMAssetTurnbattlePrefabTable.cs new file mode 100644 index 0000000..1af8d60 --- /dev/null +++ b/src/Models/Tables/EntityMAssetTurnbattlePrefabTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMAssetTurnbattlePrefabTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMAssetTurnbattlePrefabTable(EntityMAssetTurnbattlePrefab[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.AssetTurnbattlePrefabId; + } +} diff --git a/src/Models/Tables/EntityMBattleActorAiTable.cs b/src/Models/Tables/EntityMBattleActorAiTable.cs new file mode 100644 index 0000000..391f676 --- /dev/null +++ b/src/Models/Tables/EntityMBattleActorAiTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBattleActorAiTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBattleActorAiTable(EntityMBattleActorAi[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.BattleActorAiId; + } + + public EntityMBattleActorAi FindByBattleActorAiId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMBattleActorSkillAiGroupTable.cs b/src/Models/Tables/EntityMBattleActorSkillAiGroupTable.cs new file mode 100644 index 0000000..9f57e4e --- /dev/null +++ b/src/Models/Tables/EntityMBattleActorSkillAiGroupTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBattleActorSkillAiGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBattleActorSkillAiGroupTable(EntityMBattleActorSkillAiGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.BattleActorSkillAiGroupId, element.Priority); + } + + public RangeView FindRangeByBattleActorSkillAiGroupIdAndPriority(ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityMBattleAdditionalAbilityTable.cs b/src/Models/Tables/EntityMBattleAdditionalAbilityTable.cs new file mode 100644 index 0000000..856ffdb --- /dev/null +++ b/src/Models/Tables/EntityMBattleAdditionalAbilityTable.cs @@ -0,0 +1,18 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBattleAdditionalAbilityTable : TableBase +{ + private readonly Func primaryIndexSelector; + private readonly Func secondaryIndexSelector; + + public EntityMBattleAdditionalAbilityTable(EntityMBattleAdditionalAbility[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.BattleGroupId, element.TargetActorAppearanceWaveNumber, element.AbilityIndex); + secondaryIndexSelector = element => (element.BattleGroupId, element.TargetActorAppearanceWaveNumber); + } + + public RangeView FindByBattleGroupIdAndTargetActorAppearanceWaveNumber(ValueTuple key) => + FindManyCore(data, secondaryIndexSelector, Comparer<(int, int)>.Default, key); +} diff --git a/src/Models/Tables/EntityMBattleAttributeDamageCoefficientDefineTable.cs b/src/Models/Tables/EntityMBattleAttributeDamageCoefficientDefineTable.cs new file mode 100644 index 0000000..6229d25 --- /dev/null +++ b/src/Models/Tables/EntityMBattleAttributeDamageCoefficientDefineTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBattleAttributeDamageCoefficientDefineTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBattleAttributeDamageCoefficientDefineTable(EntityMBattleAttributeDamageCoefficientDefine[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.BattleSchemeType; + } + + public EntityMBattleAttributeDamageCoefficientDefine FindByBattleSchemeType(BattleSchemeType key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMBattleAttributeDamageCoefficientGroupTable.cs b/src/Models/Tables/EntityMBattleAttributeDamageCoefficientGroupTable.cs new file mode 100644 index 0000000..3e73f3e --- /dev/null +++ b/src/Models/Tables/EntityMBattleAttributeDamageCoefficientGroupTable.cs @@ -0,0 +1,14 @@ +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBattleAttributeDamageCoefficientGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBattleAttributeDamageCoefficientGroupTable(EntityMBattleAttributeDamageCoefficientGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.AttributeDamageCoefficientGroupId, element.SkillExecutorAttributeType, element.SkillTargetAttributeType); + } +} diff --git a/src/Models/Tables/EntityMBattleBgmSetGroupTable.cs b/src/Models/Tables/EntityMBattleBgmSetGroupTable.cs new file mode 100644 index 0000000..d73de9e --- /dev/null +++ b/src/Models/Tables/EntityMBattleBgmSetGroupTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBattleBgmSetGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBattleBgmSetGroupTable(EntityMBattleBgmSetGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.BgmSetGroupId, element.BgmSetGroupIndex); + } + + public RangeView FindRangeByBgmSetGroupIdAndBgmSetGroupIndex(ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityMBattleBgmSetTable.cs b/src/Models/Tables/EntityMBattleBgmSetTable.cs new file mode 100644 index 0000000..356e74e --- /dev/null +++ b/src/Models/Tables/EntityMBattleBgmSetTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBattleBgmSetTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBattleBgmSetTable(EntityMBattleBgmSet[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.BgmSetId, element.TrackNumber); + } + + public RangeView FindRangeByBgmSetIdAndTrackNumber(ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityMBattleBigHuntDamageThresholdGroupTable.cs b/src/Models/Tables/EntityMBattleBigHuntDamageThresholdGroupTable.cs new file mode 100644 index 0000000..c39a978 --- /dev/null +++ b/src/Models/Tables/EntityMBattleBigHuntDamageThresholdGroupTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBattleBigHuntDamageThresholdGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBattleBigHuntDamageThresholdGroupTable(EntityMBattleBigHuntDamageThresholdGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.KnockDownDamageThresholdGroupId, element.KnockDownDamageThresholdGroupOrder); + } + + public RangeView FindRangeByKnockDownDamageThresholdGroupIdAndKnockDownDamageThresholdGroupOrder(ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityMBattleBigHuntKnockDownGaugeValueConfigGroupTable.cs b/src/Models/Tables/EntityMBattleBigHuntKnockDownGaugeValueConfigGroupTable.cs new file mode 100644 index 0000000..1047a68 --- /dev/null +++ b/src/Models/Tables/EntityMBattleBigHuntKnockDownGaugeValueConfigGroupTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBattleBigHuntKnockDownGaugeValueConfigGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBattleBigHuntKnockDownGaugeValueConfigGroupTable(EntityMBattleBigHuntKnockDownGaugeValueConfigGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.KnockDownGaugeValueConfigGroupId, element.ActiveSkillHitCount, element.DamageValueLowerLimit); + } + + public RangeView FindRangeByKnockDownGaugeValueConfigGroupIdAndActiveSkillHitCountAndDamageValueLowerLimit(ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer<(int, int, int)>.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityMBattleBigHuntPhaseGroupTable.cs b/src/Models/Tables/EntityMBattleBigHuntPhaseGroupTable.cs new file mode 100644 index 0000000..f4c8981 --- /dev/null +++ b/src/Models/Tables/EntityMBattleBigHuntPhaseGroupTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBattleBigHuntPhaseGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBattleBigHuntPhaseGroupTable(EntityMBattleBigHuntPhaseGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.BattleBigHuntPhaseGroupId, element.BattleBigHuntPhaseGroupOrder); + } + + public RangeView FindRangeByBattleBigHuntPhaseGroupIdAndBattleBigHuntPhaseGroupOrder(ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityMBattleBigHuntTable.cs b/src/Models/Tables/EntityMBattleBigHuntTable.cs new file mode 100644 index 0000000..146c94c --- /dev/null +++ b/src/Models/Tables/EntityMBattleBigHuntTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBattleBigHuntTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBattleBigHuntTable(EntityMBattleBigHunt[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.BattleGroupId; + } + + public EntityMBattleBigHunt FindByBattleGroupId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMBattleCompanionSkillAiGroupTable.cs b/src/Models/Tables/EntityMBattleCompanionSkillAiGroupTable.cs new file mode 100644 index 0000000..554f268 --- /dev/null +++ b/src/Models/Tables/EntityMBattleCompanionSkillAiGroupTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBattleCompanionSkillAiGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBattleCompanionSkillAiGroupTable(EntityMBattleCompanionSkillAiGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.BattleCompanionSkillAiGroupId, element.Priority); + } +} diff --git a/src/Models/Tables/EntityMBattleCostumeSkillFireActTable.cs b/src/Models/Tables/EntityMBattleCostumeSkillFireActTable.cs new file mode 100644 index 0000000..b316ef2 --- /dev/null +++ b/src/Models/Tables/EntityMBattleCostumeSkillFireActTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBattleCostumeSkillFireActTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBattleCostumeSkillFireActTable(EntityMBattleCostumeSkillFireAct[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.CostumeId; + } + + public bool TryFindByCostumeId(int key, out EntityMBattleCostumeSkillFireAct result) => TryFindUniqueCore(data, primaryIndexSelector, Comparer.Default, key, out result); +} diff --git a/src/Models/Tables/EntityMBattleCostumeSkillSeTable.cs b/src/Models/Tables/EntityMBattleCostumeSkillSeTable.cs new file mode 100644 index 0000000..b402d4d --- /dev/null +++ b/src/Models/Tables/EntityMBattleCostumeSkillSeTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBattleCostumeSkillSeTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBattleCostumeSkillSeTable(EntityMBattleCostumeSkillSe[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.CostumeId; + } + + public bool TryFindByCostumeId(int key, out EntityMBattleCostumeSkillSe result) => TryFindUniqueCore(data, primaryIndexSelector, Comparer.Default, key, out result); +} diff --git a/src/Models/Tables/EntityMBattleDropRewardTable.cs b/src/Models/Tables/EntityMBattleDropRewardTable.cs new file mode 100644 index 0000000..7c7ff90 --- /dev/null +++ b/src/Models/Tables/EntityMBattleDropRewardTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBattleDropRewardTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBattleDropRewardTable(EntityMBattleDropReward[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.BattleDropRewardId; + } + + public EntityMBattleDropReward FindByBattleDropRewardId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMBattleEnemySizeTypeConfigTable.cs b/src/Models/Tables/EntityMBattleEnemySizeTypeConfigTable.cs new file mode 100644 index 0000000..8002931 --- /dev/null +++ b/src/Models/Tables/EntityMBattleEnemySizeTypeConfigTable.cs @@ -0,0 +1,17 @@ +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBattleEnemySizeTypeConfigTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBattleEnemySizeTypeConfigTable(EntityMBattleEnemySizeTypeConfig[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.CostumeAssetCategoryType, element.ActorSkeletonId); + } + + public bool TryFindByCostumeAssetCategoryTypeAndActorSkeletonId(ValueTuple key, out EntityMBattleEnemySizeTypeConfig result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer<(CostumeAssetCategoryType, int)>.Default, key, out result); +} diff --git a/src/Models/Tables/EntityMBattleEventGroupTable.cs b/src/Models/Tables/EntityMBattleEventGroupTable.cs new file mode 100644 index 0000000..dbe20ae --- /dev/null +++ b/src/Models/Tables/EntityMBattleEventGroupTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBattleEventGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBattleEventGroupTable(EntityMBattleEventGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.BattleEventGroupId, element.BattleEventId); + } + + public RangeView FindRangeByBattleEventGroupIdAndBattleEventId(ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityMBattleEventReceiverBehaviourGroupTable.cs b/src/Models/Tables/EntityMBattleEventReceiverBehaviourGroupTable.cs new file mode 100644 index 0000000..ac1f34e --- /dev/null +++ b/src/Models/Tables/EntityMBattleEventReceiverBehaviourGroupTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBattleEventReceiverBehaviourGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBattleEventReceiverBehaviourGroupTable(EntityMBattleEventReceiverBehaviourGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.BattleEventReceiverBehaviourGroupId, element.ExecuteOrder); + } + + public RangeView FindRangeByBattleEventReceiverBehaviourGroupIdAndExecuteOrder(ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityMBattleEventReceiverBehaviourHudActSequenceTable.cs b/src/Models/Tables/EntityMBattleEventReceiverBehaviourHudActSequenceTable.cs new file mode 100644 index 0000000..7ceb52c --- /dev/null +++ b/src/Models/Tables/EntityMBattleEventReceiverBehaviourHudActSequenceTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBattleEventReceiverBehaviourHudActSequenceTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBattleEventReceiverBehaviourHudActSequenceTable(EntityMBattleEventReceiverBehaviourHudActSequence[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.BattleEventReceiverBehaviourId; + } + + public EntityMBattleEventReceiverBehaviourHudActSequence FindByBattleEventReceiverBehaviourId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMBattleEventReceiverBehaviourRadioMessageTable.cs b/src/Models/Tables/EntityMBattleEventReceiverBehaviourRadioMessageTable.cs new file mode 100644 index 0000000..6ac25d5 --- /dev/null +++ b/src/Models/Tables/EntityMBattleEventReceiverBehaviourRadioMessageTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBattleEventReceiverBehaviourRadioMessageTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBattleEventReceiverBehaviourRadioMessageTable(EntityMBattleEventReceiverBehaviourRadioMessage[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.BattleEventReceiverBehaviourId; + } + + public EntityMBattleEventReceiverBehaviourRadioMessage FindByBattleEventReceiverBehaviourId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMBattleEventTable.cs b/src/Models/Tables/EntityMBattleEventTable.cs new file mode 100644 index 0000000..e4b10a9 --- /dev/null +++ b/src/Models/Tables/EntityMBattleEventTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBattleEventTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBattleEventTable(EntityMBattleEvent[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.BattleEventId; + } + + public EntityMBattleEvent FindByBattleEventId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMBattleEventTriggerBehaviourBattleStartTable.cs b/src/Models/Tables/EntityMBattleEventTriggerBehaviourBattleStartTable.cs new file mode 100644 index 0000000..0f1e1ab --- /dev/null +++ b/src/Models/Tables/EntityMBattleEventTriggerBehaviourBattleStartTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBattleEventTriggerBehaviourBattleStartTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBattleEventTriggerBehaviourBattleStartTable(EntityMBattleEventTriggerBehaviourBattleStart[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.BattleEventTriggerBehaviourId; + } + + public EntityMBattleEventTriggerBehaviourBattleStart FindByBattleEventTriggerBehaviourId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMBattleEventTriggerBehaviourGroupTable.cs b/src/Models/Tables/EntityMBattleEventTriggerBehaviourGroupTable.cs new file mode 100644 index 0000000..c4661d3 --- /dev/null +++ b/src/Models/Tables/EntityMBattleEventTriggerBehaviourGroupTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBattleEventTriggerBehaviourGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBattleEventTriggerBehaviourGroupTable(EntityMBattleEventTriggerBehaviourGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.BattleEventTriggerBehaviourGroupId, element.BattleEventTriggerBehaviourType, element.BattleEventTriggerBehaviourId); + } +} diff --git a/src/Models/Tables/EntityMBattleEventTriggerBehaviourWaveStartTable.cs b/src/Models/Tables/EntityMBattleEventTriggerBehaviourWaveStartTable.cs new file mode 100644 index 0000000..1aadd08 --- /dev/null +++ b/src/Models/Tables/EntityMBattleEventTriggerBehaviourWaveStartTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBattleEventTriggerBehaviourWaveStartTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBattleEventTriggerBehaviourWaveStartTable(EntityMBattleEventTriggerBehaviourWaveStart[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.BattleEventTriggerBehaviourId; + } + + public EntityMBattleEventTriggerBehaviourWaveStart FindByBattleEventTriggerBehaviourId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMBattleGeneralViewConfigurationTable.cs b/src/Models/Tables/EntityMBattleGeneralViewConfigurationTable.cs new file mode 100644 index 0000000..d38f8db --- /dev/null +++ b/src/Models/Tables/EntityMBattleGeneralViewConfigurationTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBattleGeneralViewConfigurationTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBattleGeneralViewConfigurationTable(EntityMBattleGeneralViewConfiguration[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.QuestSceneId, element.WaveNumber); + } + + public bool TryFindByQuestSceneIdAndWaveNumber(ValueTuple key, out EntityMBattleGeneralViewConfiguration result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, key, out result); +} diff --git a/src/Models/Tables/EntityMBattleGroupTable.cs b/src/Models/Tables/EntityMBattleGroupTable.cs new file mode 100644 index 0000000..e481aca --- /dev/null +++ b/src/Models/Tables/EntityMBattleGroupTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBattleGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBattleGroupTable(EntityMBattleGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.BattleGroupId, element.WaveNumber); + } + + public RangeView FindRangeByBattleGroupIdAndWaveNumber(ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityMBattleNpcCharacterBoardAbilityTable.cs b/src/Models/Tables/EntityMBattleNpcCharacterBoardAbilityTable.cs new file mode 100644 index 0000000..6c450b3 --- /dev/null +++ b/src/Models/Tables/EntityMBattleNpcCharacterBoardAbilityTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBattleNpcCharacterBoardAbilityTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBattleNpcCharacterBoardAbilityTable(EntityMBattleNpcCharacterBoardAbility[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.BattleNpcId, element.CharacterId, element.AbilityId); + } +} diff --git a/src/Models/Tables/EntityMBattleNpcCharacterBoardCompleteRewardTable.cs b/src/Models/Tables/EntityMBattleNpcCharacterBoardCompleteRewardTable.cs new file mode 100644 index 0000000..bb427de --- /dev/null +++ b/src/Models/Tables/EntityMBattleNpcCharacterBoardCompleteRewardTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBattleNpcCharacterBoardCompleteRewardTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBattleNpcCharacterBoardCompleteRewardTable(EntityMBattleNpcCharacterBoardCompleteReward[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.BattleNpcId, element.CharacterBoardCompleteRewardId); + } +} diff --git a/src/Models/Tables/EntityMBattleNpcCharacterBoardStatusUpTable.cs b/src/Models/Tables/EntityMBattleNpcCharacterBoardStatusUpTable.cs new file mode 100644 index 0000000..18c1b76 --- /dev/null +++ b/src/Models/Tables/EntityMBattleNpcCharacterBoardStatusUpTable.cs @@ -0,0 +1,14 @@ +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBattleNpcCharacterBoardStatusUpTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBattleNpcCharacterBoardStatusUpTable(EntityMBattleNpcCharacterBoardStatusUp[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.BattleNpcId, element.CharacterId, element.StatusCalculationType); + } +} diff --git a/src/Models/Tables/EntityMBattleNpcCharacterBoardTable.cs b/src/Models/Tables/EntityMBattleNpcCharacterBoardTable.cs new file mode 100644 index 0000000..f11fb00 --- /dev/null +++ b/src/Models/Tables/EntityMBattleNpcCharacterBoardTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBattleNpcCharacterBoardTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBattleNpcCharacterBoardTable(EntityMBattleNpcCharacterBoard[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.BattleNpcId, element.CharacterBoardId); + } +} diff --git a/src/Models/Tables/EntityMBattleNpcCharacterCostumeLevelBonusTable.cs b/src/Models/Tables/EntityMBattleNpcCharacterCostumeLevelBonusTable.cs new file mode 100644 index 0000000..3e8adfa --- /dev/null +++ b/src/Models/Tables/EntityMBattleNpcCharacterCostumeLevelBonusTable.cs @@ -0,0 +1,14 @@ +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBattleNpcCharacterCostumeLevelBonusTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBattleNpcCharacterCostumeLevelBonusTable(EntityMBattleNpcCharacterCostumeLevelBonus[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.BattleNpcId, element.CharacterId, element.StatusCalculationType); + } +} diff --git a/src/Models/Tables/EntityMBattleNpcCharacterRebirthTable.cs b/src/Models/Tables/EntityMBattleNpcCharacterRebirthTable.cs new file mode 100644 index 0000000..32c39cb --- /dev/null +++ b/src/Models/Tables/EntityMBattleNpcCharacterRebirthTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBattleNpcCharacterRebirthTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBattleNpcCharacterRebirthTable(EntityMBattleNpcCharacterRebirth[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.BattleNpcId, element.CharacterId); + } +} diff --git a/src/Models/Tables/EntityMBattleNpcCharacterTable.cs b/src/Models/Tables/EntityMBattleNpcCharacterTable.cs new file mode 100644 index 0000000..854a79b --- /dev/null +++ b/src/Models/Tables/EntityMBattleNpcCharacterTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBattleNpcCharacterTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBattleNpcCharacterTable(EntityMBattleNpcCharacter[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.BattleNpcId, element.CharacterId); + } + + public EntityMBattleNpcCharacter FindByBattleNpcIdAndCharacterId(ValueTuple key) => FindUniqueCore(data, primaryIndexSelector, Comparer<(long, int)>.Default, key); +} diff --git a/src/Models/Tables/EntityMBattleNpcCharacterViewerFieldTable.cs b/src/Models/Tables/EntityMBattleNpcCharacterViewerFieldTable.cs new file mode 100644 index 0000000..5db917c --- /dev/null +++ b/src/Models/Tables/EntityMBattleNpcCharacterViewerFieldTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBattleNpcCharacterViewerFieldTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBattleNpcCharacterViewerFieldTable(EntityMBattleNpcCharacterViewerField[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.BattleNpcId, element.CharacterViewerFieldId); + } +} diff --git a/src/Models/Tables/EntityMBattleNpcCompanionTable.cs b/src/Models/Tables/EntityMBattleNpcCompanionTable.cs new file mode 100644 index 0000000..4d40570 --- /dev/null +++ b/src/Models/Tables/EntityMBattleNpcCompanionTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBattleNpcCompanionTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBattleNpcCompanionTable(EntityMBattleNpcCompanion[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.BattleNpcId, element.BattleNpcCompanionUuid); + } + + public EntityMBattleNpcCompanion FindByBattleNpcIdAndBattleNpcCompanionUuid(ValueTuple key) => + FindUniqueCore(data, primaryIndexSelector, Comparer<(long, string)>.Default, key); +} diff --git a/src/Models/Tables/EntityMBattleNpcCostumeActiveSkillTable.cs b/src/Models/Tables/EntityMBattleNpcCostumeActiveSkillTable.cs new file mode 100644 index 0000000..99cedd5 --- /dev/null +++ b/src/Models/Tables/EntityMBattleNpcCostumeActiveSkillTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBattleNpcCostumeActiveSkillTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBattleNpcCostumeActiveSkillTable(EntityMBattleNpcCostumeActiveSkill[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.BattleNpcId, element.BattleNpcCostumeUuid); + } + + public EntityMBattleNpcCostumeActiveSkill FindByBattleNpcIdAndBattleNpcCostumeUuid(ValueTuple key) => + FindUniqueCore(data, primaryIndexSelector, Comparer<(long, string)>.Default, key); +} diff --git a/src/Models/Tables/EntityMBattleNpcCostumeAwakenStatusUpTable.cs b/src/Models/Tables/EntityMBattleNpcCostumeAwakenStatusUpTable.cs new file mode 100644 index 0000000..79f8fbf --- /dev/null +++ b/src/Models/Tables/EntityMBattleNpcCostumeAwakenStatusUpTable.cs @@ -0,0 +1,14 @@ +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBattleNpcCostumeAwakenStatusUpTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBattleNpcCostumeAwakenStatusUpTable(EntityMBattleNpcCostumeAwakenStatusUp[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.BattleNpcId, element.BattleNpcCostumeUuid, element.StatusCalculationType); + } +} diff --git a/src/Models/Tables/EntityMBattleNpcCostumeLevelBonusReevaluateTable.cs b/src/Models/Tables/EntityMBattleNpcCostumeLevelBonusReevaluateTable.cs new file mode 100644 index 0000000..f5e6ad1 --- /dev/null +++ b/src/Models/Tables/EntityMBattleNpcCostumeLevelBonusReevaluateTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBattleNpcCostumeLevelBonusReevaluateTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBattleNpcCostumeLevelBonusReevaluateTable(EntityMBattleNpcCostumeLevelBonusReevaluate[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.BattleNpcId; + } +} diff --git a/src/Models/Tables/EntityMBattleNpcCostumeLevelBonusReleaseStatusTable.cs b/src/Models/Tables/EntityMBattleNpcCostumeLevelBonusReleaseStatusTable.cs new file mode 100644 index 0000000..076be9e --- /dev/null +++ b/src/Models/Tables/EntityMBattleNpcCostumeLevelBonusReleaseStatusTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBattleNpcCostumeLevelBonusReleaseStatusTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBattleNpcCostumeLevelBonusReleaseStatusTable(EntityMBattleNpcCostumeLevelBonusReleaseStatus[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.BattleNpcId, element.CostumeId); + } +} diff --git a/src/Models/Tables/EntityMBattleNpcCostumeLotteryEffectAbilityTable.cs b/src/Models/Tables/EntityMBattleNpcCostumeLotteryEffectAbilityTable.cs new file mode 100644 index 0000000..c9bd90e --- /dev/null +++ b/src/Models/Tables/EntityMBattleNpcCostumeLotteryEffectAbilityTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBattleNpcCostumeLotteryEffectAbilityTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBattleNpcCostumeLotteryEffectAbilityTable(EntityMBattleNpcCostumeLotteryEffectAbility[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.BattleNpcId, element.BattleNpcCostumeUuid, element.SlotNumber); + } +} diff --git a/src/Models/Tables/EntityMBattleNpcCostumeLotteryEffectPendingTable.cs b/src/Models/Tables/EntityMBattleNpcCostumeLotteryEffectPendingTable.cs new file mode 100644 index 0000000..9e48839 --- /dev/null +++ b/src/Models/Tables/EntityMBattleNpcCostumeLotteryEffectPendingTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBattleNpcCostumeLotteryEffectPendingTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBattleNpcCostumeLotteryEffectPendingTable(EntityMBattleNpcCostumeLotteryEffectPending[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.BattleNpcId, element.BattleNpcCostumeUuid); + } +} diff --git a/src/Models/Tables/EntityMBattleNpcCostumeLotteryEffectStatusUpTable.cs b/src/Models/Tables/EntityMBattleNpcCostumeLotteryEffectStatusUpTable.cs new file mode 100644 index 0000000..df64fed --- /dev/null +++ b/src/Models/Tables/EntityMBattleNpcCostumeLotteryEffectStatusUpTable.cs @@ -0,0 +1,14 @@ +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBattleNpcCostumeLotteryEffectStatusUpTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBattleNpcCostumeLotteryEffectStatusUpTable(EntityMBattleNpcCostumeLotteryEffectStatusUp[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.BattleNpcId, element.BattleNpcCostumeUuid, element.StatusCalculationType); + } +} diff --git a/src/Models/Tables/EntityMBattleNpcCostumeLotteryEffectTable.cs b/src/Models/Tables/EntityMBattleNpcCostumeLotteryEffectTable.cs new file mode 100644 index 0000000..f6dc279 --- /dev/null +++ b/src/Models/Tables/EntityMBattleNpcCostumeLotteryEffectTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBattleNpcCostumeLotteryEffectTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBattleNpcCostumeLotteryEffectTable(EntityMBattleNpcCostumeLotteryEffect[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.BattleNpcId, element.BattleNpcCostumeUuid, element.SlotNumber); + } +} diff --git a/src/Models/Tables/EntityMBattleNpcCostumeTable.cs b/src/Models/Tables/EntityMBattleNpcCostumeTable.cs new file mode 100644 index 0000000..045d31b --- /dev/null +++ b/src/Models/Tables/EntityMBattleNpcCostumeTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBattleNpcCostumeTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBattleNpcCostumeTable(EntityMBattleNpcCostume[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.BattleNpcId, element.BattleNpcCostumeUuid); + } + + public EntityMBattleNpcCostume FindByBattleNpcIdAndBattleNpcCostumeUuid(ValueTuple key) => + FindUniqueCore(data, primaryIndexSelector, Comparer<(long, string)>.Default, key); +} diff --git a/src/Models/Tables/EntityMBattleNpcDeckBackupTable.cs b/src/Models/Tables/EntityMBattleNpcDeckBackupTable.cs new file mode 100644 index 0000000..9edab0c --- /dev/null +++ b/src/Models/Tables/EntityMBattleNpcDeckBackupTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBattleNpcDeckBackupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBattleNpcDeckBackupTable(EntityMBattleNpcDeckBackup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.BattleNpcId, element.BattleNpcDeckBackupUuid); + } +} diff --git a/src/Models/Tables/EntityMBattleNpcDeckCharacterDressupCostumeTable.cs b/src/Models/Tables/EntityMBattleNpcDeckCharacterDressupCostumeTable.cs new file mode 100644 index 0000000..c35179d --- /dev/null +++ b/src/Models/Tables/EntityMBattleNpcDeckCharacterDressupCostumeTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBattleNpcDeckCharacterDressupCostumeTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBattleNpcDeckCharacterDressupCostumeTable(EntityMBattleNpcDeckCharacterDressupCostume[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.BattleNpcId, element.BattleNpcDeckCharacterUuid); + } +} diff --git a/src/Models/Tables/EntityMBattleNpcDeckCharacterDropCategoryTable.cs b/src/Models/Tables/EntityMBattleNpcDeckCharacterDropCategoryTable.cs new file mode 100644 index 0000000..54b1c12 --- /dev/null +++ b/src/Models/Tables/EntityMBattleNpcDeckCharacterDropCategoryTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBattleNpcDeckCharacterDropCategoryTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBattleNpcDeckCharacterDropCategoryTable(EntityMBattleNpcDeckCharacterDropCategory[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.BattleNpcId, element.BattleNpcDeckCharacterUuid); + } + + public EntityMBattleNpcDeckCharacterDropCategory FindByBattleNpcIdAndBattleNpcDeckCharacterUuid(ValueTuple key) => + FindUniqueCore(data, primaryIndexSelector, Comparer<(long, string)>.Default, key); +} diff --git a/src/Models/Tables/EntityMBattleNpcDeckCharacterTable.cs b/src/Models/Tables/EntityMBattleNpcDeckCharacterTable.cs new file mode 100644 index 0000000..e51dbb1 --- /dev/null +++ b/src/Models/Tables/EntityMBattleNpcDeckCharacterTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBattleNpcDeckCharacterTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBattleNpcDeckCharacterTable(EntityMBattleNpcDeckCharacter[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.BattleNpcId, element.BattleNpcDeckCharacterUuid); + } + + public EntityMBattleNpcDeckCharacter FindByBattleNpcIdAndBattleNpcDeckCharacterUuid(ValueTuple key) => + FindUniqueCore(data, primaryIndexSelector, Comparer<(long, string)>.Default, key); +} diff --git a/src/Models/Tables/EntityMBattleNpcDeckCharacterTypeTable.cs b/src/Models/Tables/EntityMBattleNpcDeckCharacterTypeTable.cs new file mode 100644 index 0000000..242ee0c --- /dev/null +++ b/src/Models/Tables/EntityMBattleNpcDeckCharacterTypeTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBattleNpcDeckCharacterTypeTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBattleNpcDeckCharacterTypeTable(EntityMBattleNpcDeckCharacterType[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.BattleNpcId, element.BattleNpcDeckCharacterUuid); + } + + public EntityMBattleNpcDeckCharacterType FindByBattleNpcIdAndBattleNpcDeckCharacterUuid(ValueTuple key) => + FindUniqueCore(data, primaryIndexSelector, Comparer<(long, string)>.Default, key); +} diff --git a/src/Models/Tables/EntityMBattleNpcDeckLimitContentBackupRestoredTable.cs b/src/Models/Tables/EntityMBattleNpcDeckLimitContentBackupRestoredTable.cs new file mode 100644 index 0000000..c1a2d49 --- /dev/null +++ b/src/Models/Tables/EntityMBattleNpcDeckLimitContentBackupRestoredTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBattleNpcDeckLimitContentBackupRestoredTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBattleNpcDeckLimitContentBackupRestoredTable(EntityMBattleNpcDeckLimitContentBackupRestored[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.BattleNpcId, element.EventQuestChapterId); + } +} diff --git a/src/Models/Tables/EntityMBattleNpcDeckLimitContentBackupTable.cs b/src/Models/Tables/EntityMBattleNpcDeckLimitContentBackupTable.cs new file mode 100644 index 0000000..f365ec0 --- /dev/null +++ b/src/Models/Tables/EntityMBattleNpcDeckLimitContentBackupTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBattleNpcDeckLimitContentBackupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBattleNpcDeckLimitContentBackupTable(EntityMBattleNpcDeckLimitContentBackup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.BattleNpcId, element.EventQuestChapterId, element.EventQuestSequenceSortOrder); + } +} diff --git a/src/Models/Tables/EntityMBattleNpcDeckLimitContentDeletedCharacterTable.cs b/src/Models/Tables/EntityMBattleNpcDeckLimitContentDeletedCharacterTable.cs new file mode 100644 index 0000000..19c7d6f --- /dev/null +++ b/src/Models/Tables/EntityMBattleNpcDeckLimitContentDeletedCharacterTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBattleNpcDeckLimitContentDeletedCharacterTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBattleNpcDeckLimitContentDeletedCharacterTable(EntityMBattleNpcDeckLimitContentDeletedCharacter[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.BattleNpcId, element.BattleNpcDeckNumber, element.BattleNpcDeckCharacterNumber); + } +} diff --git a/src/Models/Tables/EntityMBattleNpcDeckLimitContentRestrictedTable.cs b/src/Models/Tables/EntityMBattleNpcDeckLimitContentRestrictedTable.cs new file mode 100644 index 0000000..5ae40d4 --- /dev/null +++ b/src/Models/Tables/EntityMBattleNpcDeckLimitContentRestrictedTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBattleNpcDeckLimitContentRestrictedTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBattleNpcDeckLimitContentRestrictedTable(EntityMBattleNpcDeckLimitContentRestricted[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.BattleNpcId, element.EventQuestChapterId, element.QuestId, element.DeckRestrictedUuid); + } +} diff --git a/src/Models/Tables/EntityMBattleNpcDeckPartsGroupTable.cs b/src/Models/Tables/EntityMBattleNpcDeckPartsGroupTable.cs new file mode 100644 index 0000000..cb3c95b --- /dev/null +++ b/src/Models/Tables/EntityMBattleNpcDeckPartsGroupTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBattleNpcDeckPartsGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBattleNpcDeckPartsGroupTable(EntityMBattleNpcDeckPartsGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.BattleNpcId, element.BattleNpcDeckCharacterUuid, element.BattleNpcPartsUuid); + } +} diff --git a/src/Models/Tables/EntityMBattleNpcDeckSubWeaponGroupTable.cs b/src/Models/Tables/EntityMBattleNpcDeckSubWeaponGroupTable.cs new file mode 100644 index 0000000..71161fd --- /dev/null +++ b/src/Models/Tables/EntityMBattleNpcDeckSubWeaponGroupTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBattleNpcDeckSubWeaponGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBattleNpcDeckSubWeaponGroupTable(EntityMBattleNpcDeckSubWeaponGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.BattleNpcId, element.BattleNpcDeckCharacterUuid, element.BattleNpcWeaponUuid); + } +} diff --git a/src/Models/Tables/EntityMBattleNpcDeckTable.cs b/src/Models/Tables/EntityMBattleNpcDeckTable.cs new file mode 100644 index 0000000..5cb318f --- /dev/null +++ b/src/Models/Tables/EntityMBattleNpcDeckTable.cs @@ -0,0 +1,17 @@ +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBattleNpcDeckTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBattleNpcDeckTable(EntityMBattleNpcDeck[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.BattleNpcId, element.DeckType, element.BattleNpcDeckNumber); + } + + public EntityMBattleNpcDeck FindByBattleNpcIdAndDeckTypeAndBattleNpcDeckNumber(ValueTuple key) => + FindUniqueCore(data, primaryIndexSelector, Comparer<(long, DeckType, int)>.Default, key); +} diff --git a/src/Models/Tables/EntityMBattleNpcDeckTypeNoteTable.cs b/src/Models/Tables/EntityMBattleNpcDeckTypeNoteTable.cs new file mode 100644 index 0000000..b61092b --- /dev/null +++ b/src/Models/Tables/EntityMBattleNpcDeckTypeNoteTable.cs @@ -0,0 +1,14 @@ +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBattleNpcDeckTypeNoteTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBattleNpcDeckTypeNoteTable(EntityMBattleNpcDeckTypeNote[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.BattleNpcId, element.DeckType); + } +} diff --git a/src/Models/Tables/EntityMBattleNpcPartsGroupNoteTable.cs b/src/Models/Tables/EntityMBattleNpcPartsGroupNoteTable.cs new file mode 100644 index 0000000..b11e888 --- /dev/null +++ b/src/Models/Tables/EntityMBattleNpcPartsGroupNoteTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBattleNpcPartsGroupNoteTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBattleNpcPartsGroupNoteTable(EntityMBattleNpcPartsGroupNote[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.BattleNpcId, element.PartsGroupId); + } +} diff --git a/src/Models/Tables/EntityMBattleNpcPartsPresetTable.cs b/src/Models/Tables/EntityMBattleNpcPartsPresetTable.cs new file mode 100644 index 0000000..0fcf06c --- /dev/null +++ b/src/Models/Tables/EntityMBattleNpcPartsPresetTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBattleNpcPartsPresetTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBattleNpcPartsPresetTable(EntityMBattleNpcPartsPreset[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.BattleNpcId, element.BattleNpcPartsPresetNumber); + } +} diff --git a/src/Models/Tables/EntityMBattleNpcPartsPresetTagTable.cs b/src/Models/Tables/EntityMBattleNpcPartsPresetTagTable.cs new file mode 100644 index 0000000..bf7b956 --- /dev/null +++ b/src/Models/Tables/EntityMBattleNpcPartsPresetTagTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBattleNpcPartsPresetTagTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBattleNpcPartsPresetTagTable(EntityMBattleNpcPartsPresetTag[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.BattleNpcId, element.BattleNpcPartsPresetTagNumber); + } +} diff --git a/src/Models/Tables/EntityMBattleNpcPartsStatusSubTable.cs b/src/Models/Tables/EntityMBattleNpcPartsStatusSubTable.cs new file mode 100644 index 0000000..96ad249 --- /dev/null +++ b/src/Models/Tables/EntityMBattleNpcPartsStatusSubTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBattleNpcPartsStatusSubTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBattleNpcPartsStatusSubTable(EntityMBattleNpcPartsStatusSub[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.BattleNpcId, element.BattleNpcPartsUuid, element.StatusIndex); + } +} diff --git a/src/Models/Tables/EntityMBattleNpcPartsTable.cs b/src/Models/Tables/EntityMBattleNpcPartsTable.cs new file mode 100644 index 0000000..c93ac83 --- /dev/null +++ b/src/Models/Tables/EntityMBattleNpcPartsTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBattleNpcPartsTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBattleNpcPartsTable(EntityMBattleNpcParts[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.BattleNpcId, element.BattleNpcPartsUuid); + } + + public EntityMBattleNpcParts FindByBattleNpcIdAndBattleNpcPartsUuid(ValueTuple key) => + FindUniqueCore(data, primaryIndexSelector, Comparer<(long, string)>.Default, key); +} diff --git a/src/Models/Tables/EntityMBattleNpcSpecialEndActTable.cs b/src/Models/Tables/EntityMBattleNpcSpecialEndActTable.cs new file mode 100644 index 0000000..1e11c44 --- /dev/null +++ b/src/Models/Tables/EntityMBattleNpcSpecialEndActTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBattleNpcSpecialEndActTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBattleNpcSpecialEndActTable(EntityMBattleNpcSpecialEndAct[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.QuestSceneId, element.WaveNumber, element.BattleNpcId, element.BattleNpcDeckCharacterUuid); + } + + public EntityMBattleNpcSpecialEndAct FindByQuestSceneIdAndWaveNumberAndBattleNpcIdAndBattleNpcDeckCharacterUuid(ValueTuple key) => + FindUniqueCore(data, primaryIndexSelector, Comparer<(int, int, long, string)>.Default, key); +} diff --git a/src/Models/Tables/EntityMBattleNpcTable.cs b/src/Models/Tables/EntityMBattleNpcTable.cs new file mode 100644 index 0000000..1626083 --- /dev/null +++ b/src/Models/Tables/EntityMBattleNpcTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBattleNpcTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBattleNpcTable(EntityMBattleNpc[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.BattleNpcId; + } +} diff --git a/src/Models/Tables/EntityMBattleNpcWeaponAbilityReevaluateTable.cs b/src/Models/Tables/EntityMBattleNpcWeaponAbilityReevaluateTable.cs new file mode 100644 index 0000000..0d9c564 --- /dev/null +++ b/src/Models/Tables/EntityMBattleNpcWeaponAbilityReevaluateTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBattleNpcWeaponAbilityReevaluateTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBattleNpcWeaponAbilityReevaluateTable(EntityMBattleNpcWeaponAbilityReevaluate[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.BattleNpcId; + } +} diff --git a/src/Models/Tables/EntityMBattleNpcWeaponAbilityTable.cs b/src/Models/Tables/EntityMBattleNpcWeaponAbilityTable.cs new file mode 100644 index 0000000..c1054f3 --- /dev/null +++ b/src/Models/Tables/EntityMBattleNpcWeaponAbilityTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBattleNpcWeaponAbilityTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBattleNpcWeaponAbilityTable(EntityMBattleNpcWeaponAbility[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.BattleNpcId, element.BattleNpcWeaponUuid, element.SlotNumber); + } +} diff --git a/src/Models/Tables/EntityMBattleNpcWeaponAwakenTable.cs b/src/Models/Tables/EntityMBattleNpcWeaponAwakenTable.cs new file mode 100644 index 0000000..7142971 --- /dev/null +++ b/src/Models/Tables/EntityMBattleNpcWeaponAwakenTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBattleNpcWeaponAwakenTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBattleNpcWeaponAwakenTable(EntityMBattleNpcWeaponAwaken[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.BattleNpcId, element.BattleNpcWeaponUuid); + } +} diff --git a/src/Models/Tables/EntityMBattleNpcWeaponNoteReevaluateTable.cs b/src/Models/Tables/EntityMBattleNpcWeaponNoteReevaluateTable.cs new file mode 100644 index 0000000..e2173dd --- /dev/null +++ b/src/Models/Tables/EntityMBattleNpcWeaponNoteReevaluateTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBattleNpcWeaponNoteReevaluateTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBattleNpcWeaponNoteReevaluateTable(EntityMBattleNpcWeaponNoteReevaluate[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.BattleNpcId; + } +} diff --git a/src/Models/Tables/EntityMBattleNpcWeaponNoteTable.cs b/src/Models/Tables/EntityMBattleNpcWeaponNoteTable.cs new file mode 100644 index 0000000..4e444de --- /dev/null +++ b/src/Models/Tables/EntityMBattleNpcWeaponNoteTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBattleNpcWeaponNoteTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBattleNpcWeaponNoteTable(EntityMBattleNpcWeaponNote[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.BattleNpcId, element.WeaponId); + } +} diff --git a/src/Models/Tables/EntityMBattleNpcWeaponSkillTable.cs b/src/Models/Tables/EntityMBattleNpcWeaponSkillTable.cs new file mode 100644 index 0000000..27ec9c9 --- /dev/null +++ b/src/Models/Tables/EntityMBattleNpcWeaponSkillTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBattleNpcWeaponSkillTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBattleNpcWeaponSkillTable(EntityMBattleNpcWeaponSkill[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.BattleNpcId, element.BattleNpcWeaponUuid, element.SlotNumber); + } +} diff --git a/src/Models/Tables/EntityMBattleNpcWeaponStoryReevaluateTable.cs b/src/Models/Tables/EntityMBattleNpcWeaponStoryReevaluateTable.cs new file mode 100644 index 0000000..d3f166f --- /dev/null +++ b/src/Models/Tables/EntityMBattleNpcWeaponStoryReevaluateTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBattleNpcWeaponStoryReevaluateTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBattleNpcWeaponStoryReevaluateTable(EntityMBattleNpcWeaponStoryReevaluate[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.BattleNpcId; + } +} diff --git a/src/Models/Tables/EntityMBattleNpcWeaponStoryTable.cs b/src/Models/Tables/EntityMBattleNpcWeaponStoryTable.cs new file mode 100644 index 0000000..874fcae --- /dev/null +++ b/src/Models/Tables/EntityMBattleNpcWeaponStoryTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBattleNpcWeaponStoryTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBattleNpcWeaponStoryTable(EntityMBattleNpcWeaponStory[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.BattleNpcId, element.WeaponId); + } +} diff --git a/src/Models/Tables/EntityMBattleNpcWeaponTable.cs b/src/Models/Tables/EntityMBattleNpcWeaponTable.cs new file mode 100644 index 0000000..7c7d675 --- /dev/null +++ b/src/Models/Tables/EntityMBattleNpcWeaponTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBattleNpcWeaponTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBattleNpcWeaponTable(EntityMBattleNpcWeapon[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.BattleNpcId, element.BattleNpcWeaponUuid); + } + + public EntityMBattleNpcWeapon FindByBattleNpcIdAndBattleNpcWeaponUuid(ValueTuple key) => + FindUniqueCore(data, primaryIndexSelector, Comparer<(long, string)>.Default, key); +} diff --git a/src/Models/Tables/EntityMBattleProgressUiTypeTable.cs b/src/Models/Tables/EntityMBattleProgressUiTypeTable.cs new file mode 100644 index 0000000..921e373 --- /dev/null +++ b/src/Models/Tables/EntityMBattleProgressUiTypeTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBattleProgressUiTypeTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBattleProgressUiTypeTable(EntityMBattleProgressUiType[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.QuestSceneId; + } + + public bool TryFindByQuestSceneId(int key, out EntityMBattleProgressUiType result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer.Default, key, out result); +} diff --git a/src/Models/Tables/EntityMBattleQuestSceneBgmSetGroupTable.cs b/src/Models/Tables/EntityMBattleQuestSceneBgmSetGroupTable.cs new file mode 100644 index 0000000..7b2f2c8 --- /dev/null +++ b/src/Models/Tables/EntityMBattleQuestSceneBgmSetGroupTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBattleQuestSceneBgmSetGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBattleQuestSceneBgmSetGroupTable(EntityMBattleQuestSceneBgmSetGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.QuestSceneId; + } + + public EntityMBattleQuestSceneBgmSetGroup FindByQuestSceneId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMBattleQuestSceneBgmTable.cs b/src/Models/Tables/EntityMBattleQuestSceneBgmTable.cs new file mode 100644 index 0000000..2bd589d --- /dev/null +++ b/src/Models/Tables/EntityMBattleQuestSceneBgmTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBattleQuestSceneBgmTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBattleQuestSceneBgmTable(EntityMBattleQuestSceneBgm[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.QuestSceneId, element.StartWaveNumber); + } +} diff --git a/src/Models/Tables/EntityMBattleRentalDeckTable.cs b/src/Models/Tables/EntityMBattleRentalDeckTable.cs new file mode 100644 index 0000000..f8cb31a --- /dev/null +++ b/src/Models/Tables/EntityMBattleRentalDeckTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBattleRentalDeckTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBattleRentalDeckTable(EntityMBattleRentalDeck[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.BattleGroupId; + } + + public EntityMBattleRentalDeck FindByBattleGroupId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMBattleSkillBehaviourHitDamageConfigurationTable.cs b/src/Models/Tables/EntityMBattleSkillBehaviourHitDamageConfigurationTable.cs new file mode 100644 index 0000000..ebddbfc --- /dev/null +++ b/src/Models/Tables/EntityMBattleSkillBehaviourHitDamageConfigurationTable.cs @@ -0,0 +1,14 @@ +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBattleSkillBehaviourHitDamageConfigurationTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBattleSkillBehaviourHitDamageConfigurationTable(EntityMBattleSkillBehaviourHitDamageConfiguration[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.SkillCategoryType, element.HitCount, element.HitIndexLowerLimit); + } +} diff --git a/src/Models/Tables/EntityMBattleSkillFireActConditionAttributeTypeTable.cs b/src/Models/Tables/EntityMBattleSkillFireActConditionAttributeTypeTable.cs new file mode 100644 index 0000000..733bfb9 --- /dev/null +++ b/src/Models/Tables/EntityMBattleSkillFireActConditionAttributeTypeTable.cs @@ -0,0 +1,17 @@ +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBattleSkillFireActConditionAttributeTypeTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBattleSkillFireActConditionAttributeTypeTable(EntityMBattleSkillFireActConditionAttributeType[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.BattleSkillFireActConditionId; + } + + public bool TryFindByBattleSkillFireActConditionId(int key, out EntityMBattleSkillFireActConditionAttributeType result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer.Default, key, out result); +} diff --git a/src/Models/Tables/EntityMBattleSkillFireActConditionGroupTable.cs b/src/Models/Tables/EntityMBattleSkillFireActConditionGroupTable.cs new file mode 100644 index 0000000..cb375e2 --- /dev/null +++ b/src/Models/Tables/EntityMBattleSkillFireActConditionGroupTable.cs @@ -0,0 +1,17 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBattleSkillFireActConditionGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + private readonly Func secondaryIndexSelector; + + public EntityMBattleSkillFireActConditionGroupTable(EntityMBattleSkillFireActConditionGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.BattleSkillFireActConditionGroupId, element.BattleSkillFireActConditionGroupOrder); + secondaryIndexSelector = element => element.BattleSkillFireActConditionGroupId; + } + + public RangeView FindByBattleSkillFireActConditionGroupId(int key) => FindManyCore(data, secondaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMBattleSkillFireActConditionSkillCategoryTypeTable.cs b/src/Models/Tables/EntityMBattleSkillFireActConditionSkillCategoryTypeTable.cs new file mode 100644 index 0000000..135c8bf --- /dev/null +++ b/src/Models/Tables/EntityMBattleSkillFireActConditionSkillCategoryTypeTable.cs @@ -0,0 +1,17 @@ +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBattleSkillFireActConditionSkillCategoryTypeTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBattleSkillFireActConditionSkillCategoryTypeTable(EntityMBattleSkillFireActConditionSkillCategoryType[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.BattleSkillFireActConditionId; + } + + public bool TryFindByBattleSkillFireActConditionId(int key, out EntityMBattleSkillFireActConditionSkillCategoryType result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer.Default, key, out result); +} diff --git a/src/Models/Tables/EntityMBattleSkillFireActConditionWeaponTypeTable.cs b/src/Models/Tables/EntityMBattleSkillFireActConditionWeaponTypeTable.cs new file mode 100644 index 0000000..295c695 --- /dev/null +++ b/src/Models/Tables/EntityMBattleSkillFireActConditionWeaponTypeTable.cs @@ -0,0 +1,17 @@ +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBattleSkillFireActConditionWeaponTypeTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBattleSkillFireActConditionWeaponTypeTable(EntityMBattleSkillFireActConditionWeaponType[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.BattleSkillFireActConditionId; + } + + public bool TryFindByBattleSkillFireActConditionId(int key, out EntityMBattleSkillFireActConditionWeaponType result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer.Default, key, out result); +} diff --git a/src/Models/Tables/EntityMBattleSkillFireActTable.cs b/src/Models/Tables/EntityMBattleSkillFireActTable.cs new file mode 100644 index 0000000..732c9f5 --- /dev/null +++ b/src/Models/Tables/EntityMBattleSkillFireActTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBattleSkillFireActTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBattleSkillFireActTable(EntityMBattleSkillFireAct[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.BattleSkillFireActId; + } + + public bool TryFindByBattleSkillFireActId(int key, out EntityMBattleSkillFireAct result) => TryFindUniqueCore(data, primaryIndexSelector, Comparer.Default, key, out result); +} diff --git a/src/Models/Tables/EntityMBattleTable.cs b/src/Models/Tables/EntityMBattleTable.cs new file mode 100644 index 0000000..3f107f4 --- /dev/null +++ b/src/Models/Tables/EntityMBattleTable.cs @@ -0,0 +1,17 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBattleTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBattleTable(EntityMBattle[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.BattleId; + } + + public EntityMBattle FindByBattleId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); + + public bool TryFindByBattleId(int key, out EntityMBattle result) => TryFindUniqueCore(data, primaryIndexSelector, Comparer.Default, key, out result); +} diff --git a/src/Models/Tables/EntityMBeginnerCampaignTable.cs b/src/Models/Tables/EntityMBeginnerCampaignTable.cs new file mode 100644 index 0000000..848d3e0 --- /dev/null +++ b/src/Models/Tables/EntityMBeginnerCampaignTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBeginnerCampaignTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBeginnerCampaignTable(EntityMBeginnerCampaign[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.BeginnerCampaignId; + } + + public EntityMBeginnerCampaign FindByBeginnerCampaignId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMBigHuntBossGradeGroupAttributeTable.cs b/src/Models/Tables/EntityMBigHuntBossGradeGroupAttributeTable.cs new file mode 100644 index 0000000..0ee814a --- /dev/null +++ b/src/Models/Tables/EntityMBigHuntBossGradeGroupAttributeTable.cs @@ -0,0 +1,14 @@ +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBigHuntBossGradeGroupAttributeTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBigHuntBossGradeGroupAttributeTable(EntityMBigHuntBossGradeGroupAttribute[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.AttributeType; + } +} diff --git a/src/Models/Tables/EntityMBigHuntBossGradeGroupTable.cs b/src/Models/Tables/EntityMBigHuntBossGradeGroupTable.cs new file mode 100644 index 0000000..d5e543b --- /dev/null +++ b/src/Models/Tables/EntityMBigHuntBossGradeGroupTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBigHuntBossGradeGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBigHuntBossGradeGroupTable(EntityMBigHuntBossGradeGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.BigHuntBossGradeGroupId, element.NecessaryScore); + } + + public EntityMBigHuntBossGradeGroup FindClosestByBigHuntBossGradeGroupIdAndNecessaryScore(ValueTuple key, bool selectLower = true) => + FindUniqueClosestCore(data, primaryIndexSelector, Comparer<(int, long)>.Default, key, selectLower); +} diff --git a/src/Models/Tables/EntityMBigHuntBossQuestGroupChallengeCategoryTable.cs b/src/Models/Tables/EntityMBigHuntBossQuestGroupChallengeCategoryTable.cs new file mode 100644 index 0000000..0d79ab1 --- /dev/null +++ b/src/Models/Tables/EntityMBigHuntBossQuestGroupChallengeCategoryTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBigHuntBossQuestGroupChallengeCategoryTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBigHuntBossQuestGroupChallengeCategoryTable(EntityMBigHuntBossQuestGroupChallengeCategory[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.BigHuntBossQuestGroupChallengeCategoryId, element.SortOrder); + } +} diff --git a/src/Models/Tables/EntityMBigHuntBossQuestGroupTable.cs b/src/Models/Tables/EntityMBigHuntBossQuestGroupTable.cs new file mode 100644 index 0000000..86eb29d --- /dev/null +++ b/src/Models/Tables/EntityMBigHuntBossQuestGroupTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBigHuntBossQuestGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBigHuntBossQuestGroupTable(EntityMBigHuntBossQuestGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.BigHuntBossQuestGroupId, element.SortOrder); + } + + public RangeView FindRangeByBigHuntBossQuestGroupIdAndSortOrder(ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityMBigHuntBossQuestTable.cs b/src/Models/Tables/EntityMBigHuntBossQuestTable.cs new file mode 100644 index 0000000..8bc3f91 --- /dev/null +++ b/src/Models/Tables/EntityMBigHuntBossQuestTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBigHuntBossQuestTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBigHuntBossQuestTable(EntityMBigHuntBossQuest[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.BigHuntBossQuestId; + } + + public EntityMBigHuntBossQuest FindByBigHuntBossQuestId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMBigHuntBossTable.cs b/src/Models/Tables/EntityMBigHuntBossTable.cs new file mode 100644 index 0000000..f4ff5f0 --- /dev/null +++ b/src/Models/Tables/EntityMBigHuntBossTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBigHuntBossTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBigHuntBossTable(EntityMBigHuntBoss[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.BigHuntBossId; + } + + public EntityMBigHuntBoss FindByBigHuntBossId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMBigHuntLinkTable.cs b/src/Models/Tables/EntityMBigHuntLinkTable.cs new file mode 100644 index 0000000..c93db6f --- /dev/null +++ b/src/Models/Tables/EntityMBigHuntLinkTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBigHuntLinkTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBigHuntLinkTable(EntityMBigHuntLink[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.BigHuntLinkId; + } +} diff --git a/src/Models/Tables/EntityMBigHuntQuestGroupTable.cs b/src/Models/Tables/EntityMBigHuntQuestGroupTable.cs new file mode 100644 index 0000000..3481031 --- /dev/null +++ b/src/Models/Tables/EntityMBigHuntQuestGroupTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBigHuntQuestGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBigHuntQuestGroupTable(EntityMBigHuntQuestGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.BigHuntQuestGroupId, element.SortOrder); + } +} diff --git a/src/Models/Tables/EntityMBigHuntQuestScoreCoefficientTable.cs b/src/Models/Tables/EntityMBigHuntQuestScoreCoefficientTable.cs new file mode 100644 index 0000000..59d0cc9 --- /dev/null +++ b/src/Models/Tables/EntityMBigHuntQuestScoreCoefficientTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBigHuntQuestScoreCoefficientTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBigHuntQuestScoreCoefficientTable(EntityMBigHuntQuestScoreCoefficient[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.BigHuntQuestScoreCoefficientId; + } + + public EntityMBigHuntQuestScoreCoefficient FindByBigHuntQuestScoreCoefficientId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMBigHuntQuestTable.cs b/src/Models/Tables/EntityMBigHuntQuestTable.cs new file mode 100644 index 0000000..0eb70e0 --- /dev/null +++ b/src/Models/Tables/EntityMBigHuntQuestTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBigHuntQuestTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBigHuntQuestTable(EntityMBigHuntQuest[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.BigHuntQuestId; + } + + public EntityMBigHuntQuest FindByBigHuntQuestId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMBigHuntRewardGroupTable.cs b/src/Models/Tables/EntityMBigHuntRewardGroupTable.cs new file mode 100644 index 0000000..68c1038 --- /dev/null +++ b/src/Models/Tables/EntityMBigHuntRewardGroupTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBigHuntRewardGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBigHuntRewardGroupTable(EntityMBigHuntRewardGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.BigHuntRewardGroupId, element.SortOrder); + } + + public RangeView FindRangeByBigHuntRewardGroupIdAndSortOrder(ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityMBigHuntScheduleTable.cs b/src/Models/Tables/EntityMBigHuntScheduleTable.cs new file mode 100644 index 0000000..b322a42 --- /dev/null +++ b/src/Models/Tables/EntityMBigHuntScheduleTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBigHuntScheduleTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBigHuntScheduleTable(EntityMBigHuntSchedule[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.BigHuntScheduleId; + } + + public EntityMBigHuntSchedule FindByBigHuntScheduleId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMBigHuntScoreRewardGroupScheduleTable.cs b/src/Models/Tables/EntityMBigHuntScoreRewardGroupScheduleTable.cs new file mode 100644 index 0000000..4169ede --- /dev/null +++ b/src/Models/Tables/EntityMBigHuntScoreRewardGroupScheduleTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBigHuntScoreRewardGroupScheduleTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBigHuntScoreRewardGroupScheduleTable(EntityMBigHuntScoreRewardGroupSchedule[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.BigHuntScoreRewardGroupScheduleId, element.GroupIndex); + } +} diff --git a/src/Models/Tables/EntityMBigHuntScoreRewardGroupTable.cs b/src/Models/Tables/EntityMBigHuntScoreRewardGroupTable.cs new file mode 100644 index 0000000..8a7a468 --- /dev/null +++ b/src/Models/Tables/EntityMBigHuntScoreRewardGroupTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBigHuntScoreRewardGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBigHuntScoreRewardGroupTable(EntityMBigHuntScoreRewardGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.BigHuntScoreRewardGroupId, element.NecessaryScore); + } +} diff --git a/src/Models/Tables/EntityMBigHuntWeeklyAttributeScoreRewardGroupScheduleTable.cs b/src/Models/Tables/EntityMBigHuntWeeklyAttributeScoreRewardGroupScheduleTable.cs new file mode 100644 index 0000000..a7fecc1 --- /dev/null +++ b/src/Models/Tables/EntityMBigHuntWeeklyAttributeScoreRewardGroupScheduleTable.cs @@ -0,0 +1,14 @@ +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Tables; + +public class EntityMBigHuntWeeklyAttributeScoreRewardGroupScheduleTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMBigHuntWeeklyAttributeScoreRewardGroupScheduleTable(EntityMBigHuntWeeklyAttributeScoreRewardGroupSchedule[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.BigHuntWeeklyAttributeScoreRewardGroupScheduleId, element.AttributeType, element.GroupIndex); + } +} diff --git a/src/Models/Tables/EntityMCageMemoryTable.cs b/src/Models/Tables/EntityMCageMemoryTable.cs new file mode 100644 index 0000000..7e3bf8f --- /dev/null +++ b/src/Models/Tables/EntityMCageMemoryTable.cs @@ -0,0 +1,17 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCageMemoryTable : TableBase +{ + private readonly Func primaryIndexSelector; + private readonly Func secondaryIndexSelector; + + public EntityMCageMemoryTable(EntityMCageMemory[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.CageMemoryId; + secondaryIndexSelector = element => element.MainQuestSeasonId; + } + + public EntityMCageMemory FindByCageMemoryId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMCageOrnamentMainQuestChapterStillTable.cs b/src/Models/Tables/EntityMCageOrnamentMainQuestChapterStillTable.cs new file mode 100644 index 0000000..8593b5d --- /dev/null +++ b/src/Models/Tables/EntityMCageOrnamentMainQuestChapterStillTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCageOrnamentMainQuestChapterStillTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMCageOrnamentMainQuestChapterStillTable(EntityMCageOrnamentMainQuestChapterStill[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.MainQuestChapterId; + } + + public EntityMCageOrnamentMainQuestChapterStill FindByMainQuestChapterId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMCageOrnamentRewardTable.cs b/src/Models/Tables/EntityMCageOrnamentRewardTable.cs new file mode 100644 index 0000000..624c446 --- /dev/null +++ b/src/Models/Tables/EntityMCageOrnamentRewardTable.cs @@ -0,0 +1,14 @@ +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCageOrnamentRewardTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMCageOrnamentRewardTable(EntityMCageOrnamentReward[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.CageOrnamentRewardId, element.PossessionType, element.PossessionId); + } +} diff --git a/src/Models/Tables/EntityMCageOrnamentStillReleaseConditionTable.cs b/src/Models/Tables/EntityMCageOrnamentStillReleaseConditionTable.cs new file mode 100644 index 0000000..c9e8f1d --- /dev/null +++ b/src/Models/Tables/EntityMCageOrnamentStillReleaseConditionTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCageOrnamentStillReleaseConditionTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMCageOrnamentStillReleaseConditionTable(EntityMCageOrnamentStillReleaseCondition[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.CageOrnamentStillReleaseConditionId, element.CageOrnamentId); + } +} diff --git a/src/Models/Tables/EntityMCageOrnamentTable.cs b/src/Models/Tables/EntityMCageOrnamentTable.cs new file mode 100644 index 0000000..ebdc23e --- /dev/null +++ b/src/Models/Tables/EntityMCageOrnamentTable.cs @@ -0,0 +1,20 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCageOrnamentTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMCageOrnamentTable(EntityMCageOrnament[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.CageOrnamentId; + } + + public EntityMCageOrnament FindByCageOrnamentId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); + + public bool TryFindByCageOrnamentId(int key, out EntityMCageOrnament result) => TryFindUniqueCore(data, primaryIndexSelector, Comparer.Default, key, out result); + + public RangeView FindRangeByCageOrnamentId(int min, int max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityMCatalogCompanionTable.cs b/src/Models/Tables/EntityMCatalogCompanionTable.cs new file mode 100644 index 0000000..ea612b3 --- /dev/null +++ b/src/Models/Tables/EntityMCatalogCompanionTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCatalogCompanionTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMCatalogCompanionTable(EntityMCatalogCompanion[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.CompanionId; + } + + public EntityMCatalogCompanion FindByCompanionId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMCatalogCostumeTable.cs b/src/Models/Tables/EntityMCatalogCostumeTable.cs new file mode 100644 index 0000000..d2ec84f --- /dev/null +++ b/src/Models/Tables/EntityMCatalogCostumeTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCatalogCostumeTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMCatalogCostumeTable(EntityMCatalogCostume[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.CostumeId; + } + + public bool TryFindByCostumeId(int key, out EntityMCatalogCostume result) => TryFindUniqueCore(data, primaryIndexSelector, Comparer.Default, key, out result); +} diff --git a/src/Models/Tables/EntityMCatalogPartsGroupTable.cs b/src/Models/Tables/EntityMCatalogPartsGroupTable.cs new file mode 100644 index 0000000..436201d --- /dev/null +++ b/src/Models/Tables/EntityMCatalogPartsGroupTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCatalogPartsGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMCatalogPartsGroupTable(EntityMCatalogPartsGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.PartsGroupId; + } + + public EntityMCatalogPartsGroup FindByPartsGroupId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMCatalogTermTable.cs b/src/Models/Tables/EntityMCatalogTermTable.cs new file mode 100644 index 0000000..7b59090 --- /dev/null +++ b/src/Models/Tables/EntityMCatalogTermTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCatalogTermTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMCatalogTermTable(EntityMCatalogTerm[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.CatalogTermId; + } + + public EntityMCatalogTerm FindByCatalogTermId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMCatalogThoughtTable.cs b/src/Models/Tables/EntityMCatalogThoughtTable.cs new file mode 100644 index 0000000..2d8b986 --- /dev/null +++ b/src/Models/Tables/EntityMCatalogThoughtTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCatalogThoughtTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMCatalogThoughtTable(EntityMCatalogThought[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.ThoughtId; + } + + public EntityMCatalogThought FindByThoughtId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMCatalogWeaponTable.cs b/src/Models/Tables/EntityMCatalogWeaponTable.cs new file mode 100644 index 0000000..f4f6788 --- /dev/null +++ b/src/Models/Tables/EntityMCatalogWeaponTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCatalogWeaponTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMCatalogWeaponTable(EntityMCatalogWeapon[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.WeaponId; + } + + public EntityMCatalogWeapon FindByWeaponId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMCharacterBoardAbilityMaxLevelTable.cs b/src/Models/Tables/EntityMCharacterBoardAbilityMaxLevelTable.cs new file mode 100644 index 0000000..7c3b37e --- /dev/null +++ b/src/Models/Tables/EntityMCharacterBoardAbilityMaxLevelTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCharacterBoardAbilityMaxLevelTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMCharacterBoardAbilityMaxLevelTable(EntityMCharacterBoardAbilityMaxLevel[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.CharacterId, element.AbilityId); + } + + public EntityMCharacterBoardAbilityMaxLevel FindByCharacterIdAndAbilityId(ValueTuple key) => FindUniqueCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, key); +} diff --git a/src/Models/Tables/EntityMCharacterBoardAbilityTable.cs b/src/Models/Tables/EntityMCharacterBoardAbilityTable.cs new file mode 100644 index 0000000..0affe87 --- /dev/null +++ b/src/Models/Tables/EntityMCharacterBoardAbilityTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCharacterBoardAbilityTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMCharacterBoardAbilityTable(EntityMCharacterBoardAbility[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.CharacterBoardAbilityId; + } + + public bool TryFindByCharacterBoardAbilityId(int key, out EntityMCharacterBoardAbility result) => TryFindUniqueCore(data, primaryIndexSelector, Comparer.Default, key, out result); +} diff --git a/src/Models/Tables/EntityMCharacterBoardAssignmentTable.cs b/src/Models/Tables/EntityMCharacterBoardAssignmentTable.cs new file mode 100644 index 0000000..ce77c28 --- /dev/null +++ b/src/Models/Tables/EntityMCharacterBoardAssignmentTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCharacterBoardAssignmentTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMCharacterBoardAssignmentTable(EntityMCharacterBoardAssignment[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.CharacterId; + } + + public EntityMCharacterBoardAssignment FindByCharacterId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMCharacterBoardCategoryTable.cs b/src/Models/Tables/EntityMCharacterBoardCategoryTable.cs new file mode 100644 index 0000000..892daee --- /dev/null +++ b/src/Models/Tables/EntityMCharacterBoardCategoryTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCharacterBoardCategoryTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMCharacterBoardCategoryTable(EntityMCharacterBoardCategory[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.CharacterBoardCategoryId; + } + + public EntityMCharacterBoardCategory FindByCharacterBoardCategoryId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMCharacterBoardCompleteRewardGroupTable.cs b/src/Models/Tables/EntityMCharacterBoardCompleteRewardGroupTable.cs new file mode 100644 index 0000000..46f88dc --- /dev/null +++ b/src/Models/Tables/EntityMCharacterBoardCompleteRewardGroupTable.cs @@ -0,0 +1,14 @@ +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCharacterBoardCompleteRewardGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMCharacterBoardCompleteRewardGroupTable(EntityMCharacterBoardCompleteRewardGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.CharacterBoardCompleteRewardGroupId, element.PossessionType, element.PossessionId); + } +} diff --git a/src/Models/Tables/EntityMCharacterBoardCompleteRewardTable.cs b/src/Models/Tables/EntityMCharacterBoardCompleteRewardTable.cs new file mode 100644 index 0000000..6cd6846 --- /dev/null +++ b/src/Models/Tables/EntityMCharacterBoardCompleteRewardTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCharacterBoardCompleteRewardTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMCharacterBoardCompleteRewardTable(EntityMCharacterBoardCompleteReward[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.CharacterBoardCompleteRewardId; + } +} diff --git a/src/Models/Tables/EntityMCharacterBoardConditionDetailTable.cs b/src/Models/Tables/EntityMCharacterBoardConditionDetailTable.cs new file mode 100644 index 0000000..11de908 --- /dev/null +++ b/src/Models/Tables/EntityMCharacterBoardConditionDetailTable.cs @@ -0,0 +1,19 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCharacterBoardConditionDetailTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMCharacterBoardConditionDetailTable(EntityMCharacterBoardConditionDetail[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.CharacterBoardConditionDetailId, element.DetailIndex); + } + + public EntityMCharacterBoardConditionDetail FindByCharacterBoardConditionDetailIdAndDetailIndex(ValueTuple key) => + FindUniqueCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, key); + + public EntityMCharacterBoardConditionDetail FindClosestByCharacterBoardConditionDetailIdAndDetailIndex(ValueTuple key, bool selectLower = true) => + FindUniqueClosestCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, key, selectLower); +} diff --git a/src/Models/Tables/EntityMCharacterBoardConditionGroupTable.cs b/src/Models/Tables/EntityMCharacterBoardConditionGroupTable.cs new file mode 100644 index 0000000..97b4896 --- /dev/null +++ b/src/Models/Tables/EntityMCharacterBoardConditionGroupTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCharacterBoardConditionGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMCharacterBoardConditionGroupTable(EntityMCharacterBoardConditionGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.CharacterBoardConditionGroupId; + } + + public EntityMCharacterBoardConditionGroup FindByCharacterBoardConditionGroupId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMCharacterBoardConditionIgnoreTable.cs b/src/Models/Tables/EntityMCharacterBoardConditionIgnoreTable.cs new file mode 100644 index 0000000..05433a3 --- /dev/null +++ b/src/Models/Tables/EntityMCharacterBoardConditionIgnoreTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCharacterBoardConditionIgnoreTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMCharacterBoardConditionIgnoreTable(EntityMCharacterBoardConditionIgnore[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.CharacterBoardConditionIgnoreId, element.IgnoreIndex); + } +} diff --git a/src/Models/Tables/EntityMCharacterBoardConditionTable.cs b/src/Models/Tables/EntityMCharacterBoardConditionTable.cs new file mode 100644 index 0000000..0fba689 --- /dev/null +++ b/src/Models/Tables/EntityMCharacterBoardConditionTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCharacterBoardConditionTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMCharacterBoardConditionTable(EntityMCharacterBoardCondition[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.CharacterBoardConditionGroupId, element.GroupIndex); + } + + public RangeView FindRangeByCharacterBoardConditionGroupIdAndGroupIndex(ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityMCharacterBoardEffectTargetGroupTable.cs b/src/Models/Tables/EntityMCharacterBoardEffectTargetGroupTable.cs new file mode 100644 index 0000000..1441418 --- /dev/null +++ b/src/Models/Tables/EntityMCharacterBoardEffectTargetGroupTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCharacterBoardEffectTargetGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMCharacterBoardEffectTargetGroupTable(EntityMCharacterBoardEffectTargetGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.CharacterBoardEffectTargetGroupId, element.GroupIndex); + } + + public RangeView FindRangeByCharacterBoardEffectTargetGroupIdAndGroupIndex(ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityMCharacterBoardGroupTable.cs b/src/Models/Tables/EntityMCharacterBoardGroupTable.cs new file mode 100644 index 0000000..6b0e04f --- /dev/null +++ b/src/Models/Tables/EntityMCharacterBoardGroupTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCharacterBoardGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMCharacterBoardGroupTable(EntityMCharacterBoardGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.CharacterBoardGroupId; + } + + public EntityMCharacterBoardGroup FindByCharacterBoardGroupId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMCharacterBoardPanelReleaseEffectGroupTable.cs b/src/Models/Tables/EntityMCharacterBoardPanelReleaseEffectGroupTable.cs new file mode 100644 index 0000000..a8e5e71 --- /dev/null +++ b/src/Models/Tables/EntityMCharacterBoardPanelReleaseEffectGroupTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCharacterBoardPanelReleaseEffectGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMCharacterBoardPanelReleaseEffectGroupTable(EntityMCharacterBoardPanelReleaseEffectGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.CharacterBoardPanelReleaseEffectGroupId, element.SortOrder); + } + + public EntityMCharacterBoardPanelReleaseEffectGroup FindByCharacterBoardPanelReleaseEffectGroupIdAndSortOrder(ValueTuple key) => + FindUniqueCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, key); +} diff --git a/src/Models/Tables/EntityMCharacterBoardPanelReleasePossessionGroupTable.cs b/src/Models/Tables/EntityMCharacterBoardPanelReleasePossessionGroupTable.cs new file mode 100644 index 0000000..304a1aa --- /dev/null +++ b/src/Models/Tables/EntityMCharacterBoardPanelReleasePossessionGroupTable.cs @@ -0,0 +1,18 @@ +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCharacterBoardPanelReleasePossessionGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMCharacterBoardPanelReleasePossessionGroupTable(EntityMCharacterBoardPanelReleasePossessionGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.CharacterBoardPanelReleasePossessionGroupId, element.PossessionType, element.PossessionId); + } + + public RangeView FindRangeByCharacterBoardPanelReleasePossessionGroupIdAndPossessionTypeAndPossessionId( + ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer<(int, PossessionType, int)>.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityMCharacterBoardPanelReleaseRewardGroupTable.cs b/src/Models/Tables/EntityMCharacterBoardPanelReleaseRewardGroupTable.cs new file mode 100644 index 0000000..683451f --- /dev/null +++ b/src/Models/Tables/EntityMCharacterBoardPanelReleaseRewardGroupTable.cs @@ -0,0 +1,14 @@ +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCharacterBoardPanelReleaseRewardGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMCharacterBoardPanelReleaseRewardGroupTable(EntityMCharacterBoardPanelReleaseRewardGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.CharacterBoardPanelReleaseRewardGroupId, element.PossessionType, element.PossessionId); + } +} diff --git a/src/Models/Tables/EntityMCharacterBoardPanelTable.cs b/src/Models/Tables/EntityMCharacterBoardPanelTable.cs new file mode 100644 index 0000000..b75a520 --- /dev/null +++ b/src/Models/Tables/EntityMCharacterBoardPanelTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCharacterBoardPanelTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMCharacterBoardPanelTable(EntityMCharacterBoardPanel[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.CharacterBoardPanelId; + } + + public EntityMCharacterBoardPanel FindByCharacterBoardPanelId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMCharacterBoardStatusUpTable.cs b/src/Models/Tables/EntityMCharacterBoardStatusUpTable.cs new file mode 100644 index 0000000..626836d --- /dev/null +++ b/src/Models/Tables/EntityMCharacterBoardStatusUpTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCharacterBoardStatusUpTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMCharacterBoardStatusUpTable(EntityMCharacterBoardStatusUp[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.CharacterBoardStatusUpId; + } + + public bool TryFindByCharacterBoardStatusUpId(int key, out EntityMCharacterBoardStatusUp result) => TryFindUniqueCore(data, primaryIndexSelector, Comparer.Default, key, out result); +} diff --git a/src/Models/Tables/EntityMCharacterBoardTable.cs b/src/Models/Tables/EntityMCharacterBoardTable.cs new file mode 100644 index 0000000..02aee82 --- /dev/null +++ b/src/Models/Tables/EntityMCharacterBoardTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCharacterBoardTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMCharacterBoardTable(EntityMCharacterBoard[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.CharacterBoardId; + } + + public EntityMCharacterBoard FindByCharacterBoardId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMCharacterDisplaySwitchTable.cs b/src/Models/Tables/EntityMCharacterDisplaySwitchTable.cs new file mode 100644 index 0000000..057bcd6 --- /dev/null +++ b/src/Models/Tables/EntityMCharacterDisplaySwitchTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCharacterDisplaySwitchTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMCharacterDisplaySwitchTable(EntityMCharacterDisplaySwitch[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.CharacterId; + } + + public EntityMCharacterDisplaySwitch FindByCharacterId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMCharacterLevelBonusAbilityGroupTable.cs b/src/Models/Tables/EntityMCharacterLevelBonusAbilityGroupTable.cs new file mode 100644 index 0000000..02af20a --- /dev/null +++ b/src/Models/Tables/EntityMCharacterLevelBonusAbilityGroupTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCharacterLevelBonusAbilityGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMCharacterLevelBonusAbilityGroupTable(EntityMCharacterLevelBonusAbilityGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.CharacterLevelBonusAbilityGroupId, element.ActivationCharacterLevel); + } + + public RangeView FindRangeByCharacterLevelBonusAbilityGroupIdAndActivationCharacterLevel(ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityMCharacterRebirthMaterialGroupTable.cs b/src/Models/Tables/EntityMCharacterRebirthMaterialGroupTable.cs new file mode 100644 index 0000000..d8a09e7 --- /dev/null +++ b/src/Models/Tables/EntityMCharacterRebirthMaterialGroupTable.cs @@ -0,0 +1,17 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCharacterRebirthMaterialGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + private readonly Func secondaryIndexSelector; + + public EntityMCharacterRebirthMaterialGroupTable(EntityMCharacterRebirthMaterialGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.CharacterRebirthMaterialGroupId, element.MaterialId); + secondaryIndexSelector = element => element.CharacterRebirthMaterialGroupId; + } + + public RangeView FindByCharacterRebirthMaterialGroupId(int key) => FindManyCore(data, secondaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMCharacterRebirthStepGroupTable.cs b/src/Models/Tables/EntityMCharacterRebirthStepGroupTable.cs new file mode 100644 index 0000000..f370671 --- /dev/null +++ b/src/Models/Tables/EntityMCharacterRebirthStepGroupTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCharacterRebirthStepGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMCharacterRebirthStepGroupTable(EntityMCharacterRebirthStepGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.CharacterRebirthStepGroupId, element.BeforeRebirthCount); + } + + public EntityMCharacterRebirthStepGroup FindByCharacterRebirthStepGroupIdAndBeforeRebirthCount(ValueTuple key) => + FindUniqueCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, key); +} diff --git a/src/Models/Tables/EntityMCharacterRebirthTable.cs b/src/Models/Tables/EntityMCharacterRebirthTable.cs new file mode 100644 index 0000000..505c2cc --- /dev/null +++ b/src/Models/Tables/EntityMCharacterRebirthTable.cs @@ -0,0 +1,20 @@ +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCharacterRebirthTable : TableBase +{ + private readonly Func primaryIndexSelector; + private readonly Func secondaryIndexSelector; + + public EntityMCharacterRebirthTable(EntityMCharacterRebirth[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.CharacterId; + secondaryIndexSelector = element => element.CharacterAssignmentType; + } + + public EntityMCharacterRebirth FindByCharacterId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); + + public RangeView FindByCharacterAssignmentType(CharacterAssignmentType key) => FindManyCore(data, secondaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMCharacterTable.cs b/src/Models/Tables/EntityMCharacterTable.cs new file mode 100644 index 0000000..361f7f2 --- /dev/null +++ b/src/Models/Tables/EntityMCharacterTable.cs @@ -0,0 +1,19 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCharacterTable : TableBase +{ + private readonly Func primaryIndexSelector; + private readonly Func secondaryIndexSelector; + + public EntityMCharacterTable(EntityMCharacter[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.CharacterId; + secondaryIndexSelector = element => element.EndWeaponId; + } + + public EntityMCharacter FindByCharacterId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); + + public RangeView FindByEndWeaponId(int key) => FindManyCore(data, secondaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMCharacterViewerActorIconTable.cs b/src/Models/Tables/EntityMCharacterViewerActorIconTable.cs new file mode 100644 index 0000000..dfb99dc --- /dev/null +++ b/src/Models/Tables/EntityMCharacterViewerActorIconTable.cs @@ -0,0 +1,17 @@ +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCharacterViewerActorIconTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMCharacterViewerActorIconTable(EntityMCharacterViewerActorIcon[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.CostumeAssetCategoryType, element.SkeletonId, element.AssetVariationId); + } + + public bool TryFindByCostumeAssetCategoryTypeAndSkeletonIdAndAssetVariationId(ValueTuple key, out EntityMCharacterViewerActorIcon result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer<(CostumeAssetCategoryType, int, int)>.Default, key, out result); +} diff --git a/src/Models/Tables/EntityMCharacterViewerFieldSettingsTable.cs b/src/Models/Tables/EntityMCharacterViewerFieldSettingsTable.cs new file mode 100644 index 0000000..54fa17e --- /dev/null +++ b/src/Models/Tables/EntityMCharacterViewerFieldSettingsTable.cs @@ -0,0 +1,17 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCharacterViewerFieldSettingsTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMCharacterViewerFieldSettingsTable(EntityMCharacterViewerFieldSettings[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.AssetBackgroundId; + } + + public EntityMCharacterViewerFieldSettings FindByAssetBackgroundId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); + + public bool TryFindByAssetBackgroundId(int key, out EntityMCharacterViewerFieldSettings result) => TryFindUniqueCore(data, primaryIndexSelector, Comparer.Default, key, out result); +} diff --git a/src/Models/Tables/EntityMCharacterViewerFieldTable.cs b/src/Models/Tables/EntityMCharacterViewerFieldTable.cs new file mode 100644 index 0000000..77eda57 --- /dev/null +++ b/src/Models/Tables/EntityMCharacterViewerFieldTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCharacterViewerFieldTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMCharacterViewerFieldTable(EntityMCharacterViewerField[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.CharacterViewerFieldId; + } + + public EntityMCharacterViewerField FindByCharacterViewerFieldId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMCharacterVoiceUnlockConditionTable.cs b/src/Models/Tables/EntityMCharacterVoiceUnlockConditionTable.cs new file mode 100644 index 0000000..eb85dea --- /dev/null +++ b/src/Models/Tables/EntityMCharacterVoiceUnlockConditionTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCharacterVoiceUnlockConditionTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMCharacterVoiceUnlockConditionTable(EntityMCharacterVoiceUnlockCondition[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.CharacterId, element.SortOrder); + } + + public EntityMCharacterVoiceUnlockCondition FindByCharacterIdAndSortOrder(ValueTuple key) => FindUniqueCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, key); +} diff --git a/src/Models/Tables/EntityMCollectionBonusEffectTable.cs b/src/Models/Tables/EntityMCollectionBonusEffectTable.cs new file mode 100644 index 0000000..4163e7e --- /dev/null +++ b/src/Models/Tables/EntityMCollectionBonusEffectTable.cs @@ -0,0 +1,20 @@ +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCollectionBonusEffectTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMCollectionBonusEffectTable(EntityMCollectionBonusEffect[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.CollectionBonusEffectId, element.CollectionBonusEffectType); + } + + public EntityMCollectionBonusEffect FindByCollectionBonusEffectIdAndCollectionBonusEffectType(ValueTuple key) => + FindUniqueCore(data, primaryIndexSelector, Comparer<(int, CollectionBonusEffectType)>.Default, key); + + public RangeView FindRangeByCollectionBonusEffectIdAndCollectionBonusEffectType(ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer<(int, CollectionBonusEffectType)>.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityMCollectionBonusQuestAssignmentGroupTable.cs b/src/Models/Tables/EntityMCollectionBonusQuestAssignmentGroupTable.cs new file mode 100644 index 0000000..dfc0dd5 --- /dev/null +++ b/src/Models/Tables/EntityMCollectionBonusQuestAssignmentGroupTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCollectionBonusQuestAssignmentGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMCollectionBonusQuestAssignmentGroupTable(EntityMCollectionBonusQuestAssignmentGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.CollectionBonusQuestAssignmentGroupId, element.CollectionBonusQuestAssignmentId); + } + + public RangeView FindRangeByCollectionBonusQuestAssignmentGroupIdAndCollectionBonusQuestAssignmentId(ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityMCollectionBonusQuestAssignmentTable.cs b/src/Models/Tables/EntityMCollectionBonusQuestAssignmentTable.cs new file mode 100644 index 0000000..400d7ad --- /dev/null +++ b/src/Models/Tables/EntityMCollectionBonusQuestAssignmentTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCollectionBonusQuestAssignmentTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMCollectionBonusQuestAssignmentTable(EntityMCollectionBonusQuestAssignment[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.CollectionBonusQuestAssignmentId; + } + + public EntityMCollectionBonusQuestAssignment FindByCollectionBonusQuestAssignmentId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMComboCalculationSettingTable.cs b/src/Models/Tables/EntityMComboCalculationSettingTable.cs new file mode 100644 index 0000000..d8cc7dc --- /dev/null +++ b/src/Models/Tables/EntityMComboCalculationSettingTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMComboCalculationSettingTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMComboCalculationSettingTable(EntityMComboCalculationSetting[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.ComboCountLowerLimit; + } +} diff --git a/src/Models/Tables/EntityMComebackCampaignTable.cs b/src/Models/Tables/EntityMComebackCampaignTable.cs new file mode 100644 index 0000000..69b3215 --- /dev/null +++ b/src/Models/Tables/EntityMComebackCampaignTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMComebackCampaignTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMComebackCampaignTable(EntityMComebackCampaign[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.ComebackCampaignId; + } + + public EntityMComebackCampaign FindByComebackCampaignId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMCompanionAbilityGroupTable.cs b/src/Models/Tables/EntityMCompanionAbilityGroupTable.cs new file mode 100644 index 0000000..48111d1 --- /dev/null +++ b/src/Models/Tables/EntityMCompanionAbilityGroupTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCompanionAbilityGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMCompanionAbilityGroupTable(EntityMCompanionAbilityGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.CompanionAbilityGroupId, element.SlotNumber); + } + + public EntityMCompanionAbilityGroup FindByCompanionAbilityGroupIdAndSlotNumber(ValueTuple key) => FindUniqueCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, key); +} diff --git a/src/Models/Tables/EntityMCompanionAbilityLevelTable.cs b/src/Models/Tables/EntityMCompanionAbilityLevelTable.cs new file mode 100644 index 0000000..b36b07d --- /dev/null +++ b/src/Models/Tables/EntityMCompanionAbilityLevelTable.cs @@ -0,0 +1,19 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCompanionAbilityLevelTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMCompanionAbilityLevelTable(EntityMCompanionAbilityLevel[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.CompanionLevelLowerLimit; + } + + public EntityMCompanionAbilityLevel FindClosestByCompanionLevelLowerLimit(int key, bool selectLower = true) => + FindUniqueClosestCore(data, primaryIndexSelector, Comparer.Default, key, selectLower); + + public RangeView FindRangeByCompanionLevelLowerLimit(int min, int max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityMCompanionBaseStatusTable.cs b/src/Models/Tables/EntityMCompanionBaseStatusTable.cs new file mode 100644 index 0000000..47b7ea6 --- /dev/null +++ b/src/Models/Tables/EntityMCompanionBaseStatusTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCompanionBaseStatusTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMCompanionBaseStatusTable(EntityMCompanionBaseStatus[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.CompanionBaseStatusId; + } + + public EntityMCompanionBaseStatus FindByCompanionBaseStatusId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMCompanionCategoryTable.cs b/src/Models/Tables/EntityMCompanionCategoryTable.cs new file mode 100644 index 0000000..602cfb5 --- /dev/null +++ b/src/Models/Tables/EntityMCompanionCategoryTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCompanionCategoryTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMCompanionCategoryTable(EntityMCompanionCategory[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.CompanionCategoryType; + } + + public EntityMCompanionCategory FindByCompanionCategoryType(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMCompanionDuplicationExchangePossessionGroupTable.cs b/src/Models/Tables/EntityMCompanionDuplicationExchangePossessionGroupTable.cs new file mode 100644 index 0000000..06b2a50 --- /dev/null +++ b/src/Models/Tables/EntityMCompanionDuplicationExchangePossessionGroupTable.cs @@ -0,0 +1,14 @@ +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCompanionDuplicationExchangePossessionGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMCompanionDuplicationExchangePossessionGroupTable(EntityMCompanionDuplicationExchangePossessionGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.CompanionId, element.PossessionType); + } +} diff --git a/src/Models/Tables/EntityMCompanionEnhancedTable.cs b/src/Models/Tables/EntityMCompanionEnhancedTable.cs new file mode 100644 index 0000000..304cd54 --- /dev/null +++ b/src/Models/Tables/EntityMCompanionEnhancedTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCompanionEnhancedTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMCompanionEnhancedTable(EntityMCompanionEnhanced[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.CompanionEnhancedId; + } + + public bool TryFindByCompanionEnhancedId(int key, out EntityMCompanionEnhanced result) => TryFindUniqueCore(data, primaryIndexSelector, Comparer.Default, key, out result); +} diff --git a/src/Models/Tables/EntityMCompanionEnhancementMaterialTable.cs b/src/Models/Tables/EntityMCompanionEnhancementMaterialTable.cs new file mode 100644 index 0000000..2ad43d4 --- /dev/null +++ b/src/Models/Tables/EntityMCompanionEnhancementMaterialTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCompanionEnhancementMaterialTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMCompanionEnhancementMaterialTable(EntityMCompanionEnhancementMaterial[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.CompanionCategoryType, element.Level, element.MaterialId); + } +} diff --git a/src/Models/Tables/EntityMCompanionSkillLevelTable.cs b/src/Models/Tables/EntityMCompanionSkillLevelTable.cs new file mode 100644 index 0000000..bda2093 --- /dev/null +++ b/src/Models/Tables/EntityMCompanionSkillLevelTable.cs @@ -0,0 +1,19 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCompanionSkillLevelTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMCompanionSkillLevelTable(EntityMCompanionSkillLevel[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.CompanionLevelLowerLimit; + } + + public EntityMCompanionSkillLevel FindClosestByCompanionLevelLowerLimit(int key, bool selectLower = true) => + FindUniqueClosestCore(data, primaryIndexSelector, Comparer.Default, key, selectLower); + + public RangeView FindRangeByCompanionLevelLowerLimit(int min, int max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityMCompanionStatusCalculationTable.cs b/src/Models/Tables/EntityMCompanionStatusCalculationTable.cs new file mode 100644 index 0000000..821c924 --- /dev/null +++ b/src/Models/Tables/EntityMCompanionStatusCalculationTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCompanionStatusCalculationTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMCompanionStatusCalculationTable(EntityMCompanionStatusCalculation[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.CompanionStatusCalculationId; + } + + public EntityMCompanionStatusCalculation FindByCompanionStatusCalculationId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMCompanionTable.cs b/src/Models/Tables/EntityMCompanionTable.cs new file mode 100644 index 0000000..8beb93c --- /dev/null +++ b/src/Models/Tables/EntityMCompanionTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCompanionTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMCompanionTable(EntityMCompanion[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.CompanionId; + } + + public EntityMCompanion FindByCompanionId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMCompleteMissionGroupTable.cs b/src/Models/Tables/EntityMCompleteMissionGroupTable.cs new file mode 100644 index 0000000..615b52b --- /dev/null +++ b/src/Models/Tables/EntityMCompleteMissionGroupTable.cs @@ -0,0 +1,14 @@ +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCompleteMissionGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMCompleteMissionGroupTable(EntityMCompleteMissionGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.MissionId, element.PossessionType, element.PossessionId); + } +} diff --git a/src/Models/Tables/EntityMConfigTable.cs b/src/Models/Tables/EntityMConfigTable.cs new file mode 100644 index 0000000..3e8bc73 --- /dev/null +++ b/src/Models/Tables/EntityMConfigTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMConfigTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMConfigTable(EntityMConfig[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.ConfigKey; + } + + public EntityMConfig FindByConfigKey(string key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMConsumableItemEffectTable.cs b/src/Models/Tables/EntityMConsumableItemEffectTable.cs new file mode 100644 index 0000000..0e0e965 --- /dev/null +++ b/src/Models/Tables/EntityMConsumableItemEffectTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMConsumableItemEffectTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMConsumableItemEffectTable(EntityMConsumableItemEffect[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.ConsumableItemId; + } + + public EntityMConsumableItemEffect FindByConsumableItemId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMConsumableItemTable.cs b/src/Models/Tables/EntityMConsumableItemTable.cs new file mode 100644 index 0000000..68fe5ba --- /dev/null +++ b/src/Models/Tables/EntityMConsumableItemTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMConsumableItemTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMConsumableItemTable(EntityMConsumableItem[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.ConsumableItemId; + } + + public EntityMConsumableItem FindByConsumableItemId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMConsumableItemTermTable.cs b/src/Models/Tables/EntityMConsumableItemTermTable.cs new file mode 100644 index 0000000..f9ad379 --- /dev/null +++ b/src/Models/Tables/EntityMConsumableItemTermTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMConsumableItemTermTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMConsumableItemTermTable(EntityMConsumableItemTerm[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.ConsumableItemTermId; + } + + public EntityMConsumableItemTerm FindByConsumableItemTermId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMContentsStoryTable.cs b/src/Models/Tables/EntityMContentsStoryTable.cs new file mode 100644 index 0000000..0e9f892 --- /dev/null +++ b/src/Models/Tables/EntityMContentsStoryTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMContentsStoryTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMContentsStoryTable(EntityMContentsStory[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.ContentsStoryId; + } + + public EntityMContentsStory FindByContentsStoryId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMCostumeAbilityGroupTable.cs b/src/Models/Tables/EntityMCostumeAbilityGroupTable.cs new file mode 100644 index 0000000..7bbf7bf --- /dev/null +++ b/src/Models/Tables/EntityMCostumeAbilityGroupTable.cs @@ -0,0 +1,17 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCostumeAbilityGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + private readonly Func secondaryIndexSelector; + + public EntityMCostumeAbilityGroupTable(EntityMCostumeAbilityGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.CostumeAbilityGroupId, element.SlotNumber); + secondaryIndexSelector = element => element.CostumeAbilityGroupId; + } + + public RangeView FindByCostumeAbilityGroupId(int key) => FindManyCore(data, secondaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMCostumeAbilityLevelGroupTable.cs b/src/Models/Tables/EntityMCostumeAbilityLevelGroupTable.cs new file mode 100644 index 0000000..608b1eb --- /dev/null +++ b/src/Models/Tables/EntityMCostumeAbilityLevelGroupTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCostumeAbilityLevelGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMCostumeAbilityLevelGroupTable(EntityMCostumeAbilityLevelGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.CostumeAbilityLevelGroupId, element.CostumeLimitBreakCountLowerLimit); + } + + public EntityMCostumeAbilityLevelGroup FindClosestByCostumeAbilityLevelGroupIdAndCostumeLimitBreakCountLowerLimit(ValueTuple key, bool selectLower = true) => + FindUniqueClosestCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, key, selectLower); +} diff --git a/src/Models/Tables/EntityMCostumeActiveSkillEnhancementMaterialTable.cs b/src/Models/Tables/EntityMCostumeActiveSkillEnhancementMaterialTable.cs new file mode 100644 index 0000000..c7cd2dd --- /dev/null +++ b/src/Models/Tables/EntityMCostumeActiveSkillEnhancementMaterialTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCostumeActiveSkillEnhancementMaterialTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMCostumeActiveSkillEnhancementMaterialTable(EntityMCostumeActiveSkillEnhancementMaterial[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.CostumeActiveSkillEnhancementMaterialId, element.SkillLevel, element.MaterialId); + } + + public RangeView FindRangeByCostumeActiveSkillEnhancementMaterialIdAndSkillLevelAndMaterialId(ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer<(int, int, int)>.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityMCostumeActiveSkillGroupTable.cs b/src/Models/Tables/EntityMCostumeActiveSkillGroupTable.cs new file mode 100644 index 0000000..6e0717d --- /dev/null +++ b/src/Models/Tables/EntityMCostumeActiveSkillGroupTable.cs @@ -0,0 +1,19 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCostumeActiveSkillGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMCostumeActiveSkillGroupTable(EntityMCostumeActiveSkillGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.CostumeActiveSkillGroupId, element.CostumeLimitBreakCountLowerLimit); + } + + public EntityMCostumeActiveSkillGroup FindByCostumeActiveSkillGroupIdAndCostumeLimitBreakCountLowerLimit(ValueTuple key) => + FindUniqueCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, key); + + public EntityMCostumeActiveSkillGroup FindClosestByCostumeActiveSkillGroupIdAndCostumeLimitBreakCountLowerLimit(ValueTuple key, bool selectLower = true) => + FindUniqueClosestCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, key, selectLower); +} diff --git a/src/Models/Tables/EntityMCostumeAnimationStepTable.cs b/src/Models/Tables/EntityMCostumeAnimationStepTable.cs new file mode 100644 index 0000000..cc69dc9 --- /dev/null +++ b/src/Models/Tables/EntityMCostumeAnimationStepTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCostumeAnimationStepTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMCostumeAnimationStepTable(EntityMCostumeAnimationStep[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.CostumeId, element.Step, element.ActorAnimationId); + } +} diff --git a/src/Models/Tables/EntityMCostumeAutoOrganizationConditionTable.cs b/src/Models/Tables/EntityMCostumeAutoOrganizationConditionTable.cs new file mode 100644 index 0000000..e8a3ed5 --- /dev/null +++ b/src/Models/Tables/EntityMCostumeAutoOrganizationConditionTable.cs @@ -0,0 +1,21 @@ +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCostumeAutoOrganizationConditionTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMCostumeAutoOrganizationConditionTable(EntityMCostumeAutoOrganizationCondition[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.CostumeId, element.CostumeAutoOrganizationConditionType); + } + + public bool TryFindByCostumeIdAndCostumeAutoOrganizationConditionType(ValueTuple key, out EntityMCostumeAutoOrganizationCondition result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer<(int, CostumeAutoOrganizationConditionType)>.Default, key, out result); + + public RangeView FindRangeByCostumeIdAndCostumeAutoOrganizationConditionType(ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer<(int, CostumeAutoOrganizationConditionType)>.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityMCostumeAwakenAbilityTable.cs b/src/Models/Tables/EntityMCostumeAwakenAbilityTable.cs new file mode 100644 index 0000000..a80afdb --- /dev/null +++ b/src/Models/Tables/EntityMCostumeAwakenAbilityTable.cs @@ -0,0 +1,17 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCostumeAwakenAbilityTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMCostumeAwakenAbilityTable(EntityMCostumeAwakenAbility[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.CostumeAwakenAbilityId; + } + + public EntityMCostumeAwakenAbility FindByCostumeAwakenAbilityId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); + + public bool TryFindByCostumeAwakenAbilityId(int key, out EntityMCostumeAwakenAbility result) => TryFindUniqueCore(data, primaryIndexSelector, Comparer.Default, key, out result); +} diff --git a/src/Models/Tables/EntityMCostumeAwakenEffectGroupTable.cs b/src/Models/Tables/EntityMCostumeAwakenEffectGroupTable.cs new file mode 100644 index 0000000..c37a84d --- /dev/null +++ b/src/Models/Tables/EntityMCostumeAwakenEffectGroupTable.cs @@ -0,0 +1,25 @@ +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCostumeAwakenEffectGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + private readonly Func secondaryIndexSelector; + + public EntityMCostumeAwakenEffectGroupTable(EntityMCostumeAwakenEffectGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.CostumeAwakenEffectGroupId, element.AwakenStep, element.CostumeAwakenEffectType); + secondaryIndexSelector = element => (element.CostumeAwakenEffectGroupId, element.CostumeAwakenEffectType); + } + + public RangeView FindRangeByCostumeAwakenEffectGroupIdAndAwakenStepAndCostumeAwakenEffectType(ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer<(int, int, CostumeAwakenEffectType)>.Default, min, max, ascendant); + + public RangeView FindByCostumeAwakenEffectGroupIdAndCostumeAwakenEffectType(ValueTuple key) => + FindManyCore(data, secondaryIndexSelector, Comparer<(int, CostumeAwakenEffectType)>.Default, key); + + public RangeView FindRangeByCostumeAwakenEffectGroupIdAndCostumeAwakenEffectType(ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, secondaryIndexSelector, Comparer<(int, CostumeAwakenEffectType)>.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityMCostumeAwakenItemAcquireTable.cs b/src/Models/Tables/EntityMCostumeAwakenItemAcquireTable.cs new file mode 100644 index 0000000..f094774 --- /dev/null +++ b/src/Models/Tables/EntityMCostumeAwakenItemAcquireTable.cs @@ -0,0 +1,17 @@ +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCostumeAwakenItemAcquireTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMCostumeAwakenItemAcquireTable(EntityMCostumeAwakenItemAcquire[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.CostumeAwakenItemAcquireId, element.PossessionType, element.PossessionId); + } + + public RangeView FindRangeByCostumeAwakenItemAcquireIdAndPossessionTypeAndPossessionId(ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer<(int, PossessionType, int)>.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityMCostumeAwakenMaterialGroupTable.cs b/src/Models/Tables/EntityMCostumeAwakenMaterialGroupTable.cs new file mode 100644 index 0000000..fdb3f0a --- /dev/null +++ b/src/Models/Tables/EntityMCostumeAwakenMaterialGroupTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCostumeAwakenMaterialGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMCostumeAwakenMaterialGroupTable(EntityMCostumeAwakenMaterialGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.CostumeAwakenMaterialGroupId, element.MaterialId); + } + + public RangeView FindRangeByCostumeAwakenMaterialGroupIdAndMaterialId(ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityMCostumeAwakenPriceGroupTable.cs b/src/Models/Tables/EntityMCostumeAwakenPriceGroupTable.cs new file mode 100644 index 0000000..02a8145 --- /dev/null +++ b/src/Models/Tables/EntityMCostumeAwakenPriceGroupTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCostumeAwakenPriceGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMCostumeAwakenPriceGroupTable(EntityMCostumeAwakenPriceGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.CostumeAwakenPriceGroupId, element.AwakenStepLowerLimit); + } + + public RangeView FindRangeByCostumeAwakenPriceGroupIdAndAwakenStepLowerLimit(ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityMCostumeAwakenStatusUpGroupTable.cs b/src/Models/Tables/EntityMCostumeAwakenStatusUpGroupTable.cs new file mode 100644 index 0000000..4332c5d --- /dev/null +++ b/src/Models/Tables/EntityMCostumeAwakenStatusUpGroupTable.cs @@ -0,0 +1,18 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCostumeAwakenStatusUpGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + private readonly Func secondaryIndexSelector; + + public EntityMCostumeAwakenStatusUpGroupTable(EntityMCostumeAwakenStatusUpGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.CostumeAwakenStatusUpGroupId, element.SortOrder); + secondaryIndexSelector = element => element.CostumeAwakenStatusUpGroupId; + } + + public RangeView FindRangeByCostumeAwakenStatusUpGroupIdAndSortOrder(ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityMCostumeAwakenStepMaterialGroupTable.cs b/src/Models/Tables/EntityMCostumeAwakenStepMaterialGroupTable.cs new file mode 100644 index 0000000..3d42206 --- /dev/null +++ b/src/Models/Tables/EntityMCostumeAwakenStepMaterialGroupTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCostumeAwakenStepMaterialGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMCostumeAwakenStepMaterialGroupTable(EntityMCostumeAwakenStepMaterialGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.CostumeAwakenStepMaterialGroupId, element.AwakenStepLowerLimit); + } + + public RangeView FindRangeByCostumeAwakenStepMaterialGroupIdAndAwakenStepLowerLimit(ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityMCostumeAwakenTable.cs b/src/Models/Tables/EntityMCostumeAwakenTable.cs new file mode 100644 index 0000000..23a9441 --- /dev/null +++ b/src/Models/Tables/EntityMCostumeAwakenTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCostumeAwakenTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMCostumeAwakenTable(EntityMCostumeAwaken[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.CostumeId; + } + + public bool TryFindByCostumeId(int key, out EntityMCostumeAwaken result) => TryFindUniqueCore(data, primaryIndexSelector, Comparer.Default, key, out result); +} diff --git a/src/Models/Tables/EntityMCostumeBaseStatusTable.cs b/src/Models/Tables/EntityMCostumeBaseStatusTable.cs new file mode 100644 index 0000000..9cbfcde --- /dev/null +++ b/src/Models/Tables/EntityMCostumeBaseStatusTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCostumeBaseStatusTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMCostumeBaseStatusTable(EntityMCostumeBaseStatus[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.CostumeBaseStatusId; + } + + public EntityMCostumeBaseStatus FindByCostumeBaseStatusId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMCostumeCollectionBonusGroupTable.cs b/src/Models/Tables/EntityMCostumeCollectionBonusGroupTable.cs new file mode 100644 index 0000000..7eaf916 --- /dev/null +++ b/src/Models/Tables/EntityMCostumeCollectionBonusGroupTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCostumeCollectionBonusGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMCostumeCollectionBonusGroupTable(EntityMCostumeCollectionBonusGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.CollectionBonusGroupId, element.CostumeId); + } +} diff --git a/src/Models/Tables/EntityMCostumeCollectionBonusTable.cs b/src/Models/Tables/EntityMCostumeCollectionBonusTable.cs new file mode 100644 index 0000000..5d6d58e --- /dev/null +++ b/src/Models/Tables/EntityMCostumeCollectionBonusTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCostumeCollectionBonusTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMCostumeCollectionBonusTable(EntityMCostumeCollectionBonus[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.CollectionBonusId; + } + + public RangeView FindRangeByCollectionBonusId(int min, int max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityMCostumeDefaultSkillGroupTable.cs b/src/Models/Tables/EntityMCostumeDefaultSkillGroupTable.cs new file mode 100644 index 0000000..0a9b8be --- /dev/null +++ b/src/Models/Tables/EntityMCostumeDefaultSkillGroupTable.cs @@ -0,0 +1,17 @@ +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCostumeDefaultSkillGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMCostumeDefaultSkillGroupTable(EntityMCostumeDefaultSkillGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.CostumeDefaultSkillGroupId, element.CostumeDefaultSkillLotteryType); + } + + public EntityMCostumeDefaultSkillGroup FindByCostumeDefaultSkillGroupIdAndCostumeDefaultSkillLotteryType(ValueTuple key) => + FindUniqueCore(data, primaryIndexSelector, Comparer<(int, CostumeDefaultSkillLotteryType)>.Default, key); +} diff --git a/src/Models/Tables/EntityMCostumeDefaultSkillLotteryGroupTable.cs b/src/Models/Tables/EntityMCostumeDefaultSkillLotteryGroupTable.cs new file mode 100644 index 0000000..f0c0982 --- /dev/null +++ b/src/Models/Tables/EntityMCostumeDefaultSkillLotteryGroupTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCostumeDefaultSkillLotteryGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMCostumeDefaultSkillLotteryGroupTable(EntityMCostumeDefaultSkillLotteryGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.CostumeDefaultSkillLotteryGroupId, element.SkillDetailId); + } + + public RangeView FindRangeByCostumeDefaultSkillLotteryGroupIdAndSkillDetailId(ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityMCostumeDeleteTable.cs b/src/Models/Tables/EntityMCostumeDeleteTable.cs new file mode 100644 index 0000000..cc091da --- /dev/null +++ b/src/Models/Tables/EntityMCostumeDeleteTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCostumeDeleteTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMCostumeDeleteTable(EntityMCostumeDelete[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.CostumeId; + } + + public bool TryFindByCostumeId(int key, out EntityMCostumeDelete result) => TryFindUniqueCore(data, primaryIndexSelector, Comparer.Default, key, out result); +} diff --git a/src/Models/Tables/EntityMCostumeDisplayCoordinateAdjustmentTable.cs b/src/Models/Tables/EntityMCostumeDisplayCoordinateAdjustmentTable.cs new file mode 100644 index 0000000..ce6a7d2 --- /dev/null +++ b/src/Models/Tables/EntityMCostumeDisplayCoordinateAdjustmentTable.cs @@ -0,0 +1,17 @@ +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCostumeDisplayCoordinateAdjustmentTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMCostumeDisplayCoordinateAdjustmentTable(EntityMCostumeDisplayCoordinateAdjustment[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.CostumeId, element.DisplayCoordinateAdjustmentFunctionType); + } + + public EntityMCostumeDisplayCoordinateAdjustment FindByCostumeIdAndDisplayCoordinateAdjustmentFunctionType(ValueTuple key) => + FindUniqueCore(data, primaryIndexSelector, Comparer<(int, DisplayCoordinateAdjustmentFunctionType)>.Default, key); +} diff --git a/src/Models/Tables/EntityMCostumeDisplaySwitchTable.cs b/src/Models/Tables/EntityMCostumeDisplaySwitchTable.cs new file mode 100644 index 0000000..a6d658c --- /dev/null +++ b/src/Models/Tables/EntityMCostumeDisplaySwitchTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCostumeDisplaySwitchTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMCostumeDisplaySwitchTable(EntityMCostumeDisplaySwitch[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.CostumeId; + } + + public bool TryFindByCostumeId(int key, out EntityMCostumeDisplaySwitch result) => TryFindUniqueCore(data, primaryIndexSelector, Comparer.Default, key, out result); +} diff --git a/src/Models/Tables/EntityMCostumeDuplicationExchangePossessionGroupTable.cs b/src/Models/Tables/EntityMCostumeDuplicationExchangePossessionGroupTable.cs new file mode 100644 index 0000000..a1e0850 --- /dev/null +++ b/src/Models/Tables/EntityMCostumeDuplicationExchangePossessionGroupTable.cs @@ -0,0 +1,14 @@ +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCostumeDuplicationExchangePossessionGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMCostumeDuplicationExchangePossessionGroupTable(EntityMCostumeDuplicationExchangePossessionGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.CostumeId, element.PossessionType, element.PossessionId); + } +} diff --git a/src/Models/Tables/EntityMCostumeEmblemTable.cs b/src/Models/Tables/EntityMCostumeEmblemTable.cs new file mode 100644 index 0000000..8b6fc98 --- /dev/null +++ b/src/Models/Tables/EntityMCostumeEmblemTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCostumeEmblemTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMCostumeEmblemTable(EntityMCostumeEmblem[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.CostumeEmblemAssetId; + } + + public EntityMCostumeEmblem FindByCostumeEmblemAssetId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMCostumeEnhancedTable.cs b/src/Models/Tables/EntityMCostumeEnhancedTable.cs new file mode 100644 index 0000000..8eb2f96 --- /dev/null +++ b/src/Models/Tables/EntityMCostumeEnhancedTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCostumeEnhancedTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMCostumeEnhancedTable(EntityMCostumeEnhanced[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.CostumeEnhancedId; + } + + public bool TryFindByCostumeEnhancedId(int key, out EntityMCostumeEnhanced result) => TryFindUniqueCore(data, primaryIndexSelector, Comparer.Default, key, out result); +} diff --git a/src/Models/Tables/EntityMCostumeLevelBonusTable.cs b/src/Models/Tables/EntityMCostumeLevelBonusTable.cs new file mode 100644 index 0000000..e27b225 --- /dev/null +++ b/src/Models/Tables/EntityMCostumeLevelBonusTable.cs @@ -0,0 +1,19 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCostumeLevelBonusTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMCostumeLevelBonusTable(EntityMCostumeLevelBonus[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.CostumeLevelBonusId, element.Level); + } + + public bool TryFindByCostumeLevelBonusIdAndLevel(ValueTuple key, out EntityMCostumeLevelBonus result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, key, out result); + + public RangeView FindRangeByCostumeLevelBonusIdAndLevel(ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityMCostumeLimitBreakMaterialGroupTable.cs b/src/Models/Tables/EntityMCostumeLimitBreakMaterialGroupTable.cs new file mode 100644 index 0000000..066ead2 --- /dev/null +++ b/src/Models/Tables/EntityMCostumeLimitBreakMaterialGroupTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCostumeLimitBreakMaterialGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMCostumeLimitBreakMaterialGroupTable(EntityMCostumeLimitBreakMaterialGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.CostumeLimitBreakMaterialGroupId, element.MaterialId); + } + + public RangeView FindRangeByCostumeLimitBreakMaterialGroupIdAndMaterialId(ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityMCostumeLimitBreakMaterialRarityGroupTable.cs b/src/Models/Tables/EntityMCostumeLimitBreakMaterialRarityGroupTable.cs new file mode 100644 index 0000000..2ec5fec --- /dev/null +++ b/src/Models/Tables/EntityMCostumeLimitBreakMaterialRarityGroupTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCostumeLimitBreakMaterialRarityGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMCostumeLimitBreakMaterialRarityGroupTable(EntityMCostumeLimitBreakMaterialRarityGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.CostumeLimitBreakMaterialRarityGroupId, element.MaterialId); + } +} diff --git a/src/Models/Tables/EntityMCostumeLotteryEffectMaterialGroupTable.cs b/src/Models/Tables/EntityMCostumeLotteryEffectMaterialGroupTable.cs new file mode 100644 index 0000000..c7b779a --- /dev/null +++ b/src/Models/Tables/EntityMCostumeLotteryEffectMaterialGroupTable.cs @@ -0,0 +1,18 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCostumeLotteryEffectMaterialGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + private readonly Func secondaryIndexSelector; + + public EntityMCostumeLotteryEffectMaterialGroupTable(EntityMCostumeLotteryEffectMaterialGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.CostumeLotteryEffectMaterialGroupId, element.MaterialId); + secondaryIndexSelector = element => element.CostumeLotteryEffectMaterialGroupId; + } + + public RangeView FindByCostumeLotteryEffectMaterialGroupId(int key) => + FindManyCore(data, secondaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMCostumeLotteryEffectOddsGroupTable.cs b/src/Models/Tables/EntityMCostumeLotteryEffectOddsGroupTable.cs new file mode 100644 index 0000000..8b142d4 --- /dev/null +++ b/src/Models/Tables/EntityMCostumeLotteryEffectOddsGroupTable.cs @@ -0,0 +1,21 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCostumeLotteryEffectOddsGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + private readonly Func secondaryIndexSelector; + + public EntityMCostumeLotteryEffectOddsGroupTable(EntityMCostumeLotteryEffectOddsGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.CostumeLotteryEffectOddsGroupId, element.OddsNumber); + secondaryIndexSelector = element => element.CostumeLotteryEffectOddsGroupId; + } + + public bool TryFindByCostumeLotteryEffectOddsGroupIdAndOddsNumber(ValueTuple key, out EntityMCostumeLotteryEffectOddsGroup result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, key, out result); + + public RangeView FindByCostumeLotteryEffectOddsGroupId(int key) => + FindManyCore(data, secondaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMCostumeLotteryEffectOddsGroupTableTable.cs b/src/Models/Tables/EntityMCostumeLotteryEffectOddsGroupTableTable.cs new file mode 100644 index 0000000..f56eed1 --- /dev/null +++ b/src/Models/Tables/EntityMCostumeLotteryEffectOddsGroupTableTable.cs @@ -0,0 +1,21 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCostumeLotteryEffectOddsGroupTableTable : TableBase +{ + private readonly Func primaryIndexSelector; + private readonly Func secondaryIndexSelector; + + public EntityMCostumeLotteryEffectOddsGroupTableTable(EntityMCostumeLotteryEffectOddsGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.CostumeLotteryEffectOddsGroupId, element.OddsNumber); + secondaryIndexSelector = element => element.CostumeLotteryEffectOddsGroupId; + } + + public bool TryFindByCostumeLotteryEffectOddsGroupIdAndOddsNumber(ValueTuple key, out EntityMCostumeLotteryEffectOddsGroup result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, key, out result); + + public RangeView FindByCostumeLotteryEffectOddsGroupId(int key) => + FindManyCore(data, secondaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMCostumeLotteryEffectReleaseScheduleTable.cs b/src/Models/Tables/EntityMCostumeLotteryEffectReleaseScheduleTable.cs new file mode 100644 index 0000000..b83c34e --- /dev/null +++ b/src/Models/Tables/EntityMCostumeLotteryEffectReleaseScheduleTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCostumeLotteryEffectReleaseScheduleTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMCostumeLotteryEffectReleaseScheduleTable(EntityMCostumeLotteryEffectReleaseSchedule[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.CostumeLotteryEffectReleaseScheduleId; + } + + public bool TryFindByCostumeLotteryEffectReleaseScheduleId(int key, out EntityMCostumeLotteryEffectReleaseSchedule result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer.Default, key, out result); +} diff --git a/src/Models/Tables/EntityMCostumeLotteryEffectTable.cs b/src/Models/Tables/EntityMCostumeLotteryEffectTable.cs new file mode 100644 index 0000000..7943fd6 --- /dev/null +++ b/src/Models/Tables/EntityMCostumeLotteryEffectTable.cs @@ -0,0 +1,19 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCostumeLotteryEffectTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMCostumeLotteryEffectTable(EntityMCostumeLotteryEffect[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.CostumeId, element.SlotNumber); + } + + public bool TryFindByCostumeIdAndSlotNumber(ValueTuple key, out EntityMCostumeLotteryEffect result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, key, out result); + + public RangeView FindRangeByCostumeIdAndSlotNumber(ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityMCostumeLotteryEffectTargetAbilityTable.cs b/src/Models/Tables/EntityMCostumeLotteryEffectTargetAbilityTable.cs new file mode 100644 index 0000000..a9e5d71 --- /dev/null +++ b/src/Models/Tables/EntityMCostumeLotteryEffectTargetAbilityTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCostumeLotteryEffectTargetAbilityTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMCostumeLotteryEffectTargetAbilityTable(EntityMCostumeLotteryEffectTargetAbility[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.CostumeLotteryEffectTargetAbilityId; + } + + public EntityMCostumeLotteryEffectTargetAbility FindByCostumeLotteryEffectTargetAbilityId(int key) => + FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMCostumeLotteryEffectTargetStatusUpTable.cs b/src/Models/Tables/EntityMCostumeLotteryEffectTargetStatusUpTable.cs new file mode 100644 index 0000000..e8a9d75 --- /dev/null +++ b/src/Models/Tables/EntityMCostumeLotteryEffectTargetStatusUpTable.cs @@ -0,0 +1,19 @@ +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCostumeLotteryEffectTargetStatusUpTable : TableBase +{ + private readonly Func primaryIndexSelector; + private readonly Func secondaryIndexSelector; + + public EntityMCostumeLotteryEffectTargetStatusUpTable(EntityMCostumeLotteryEffectTargetStatusUp[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.CostumeLotteryEffectTargetStatusUpId, element.StatusKindType, element.StatusCalculationType); + secondaryIndexSelector = element => element.CostumeLotteryEffectTargetStatusUpId; + } + + public RangeView FindByCostumeLotteryEffectTargetStatusUpId(int key) => + FindManyCore(data, secondaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMCostumeOverflowExchangePossessionGroupTable.cs b/src/Models/Tables/EntityMCostumeOverflowExchangePossessionGroupTable.cs new file mode 100644 index 0000000..dea8eb0 --- /dev/null +++ b/src/Models/Tables/EntityMCostumeOverflowExchangePossessionGroupTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCostumeOverflowExchangePossessionGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMCostumeOverflowExchangePossessionGroupTable(EntityMCostumeOverflowExchangePossessionGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.MaterialId, element.SortOrder); + } +} diff --git a/src/Models/Tables/EntityMCostumeProperAttributeHpBonusTable.cs b/src/Models/Tables/EntityMCostumeProperAttributeHpBonusTable.cs new file mode 100644 index 0000000..c4e7b6c --- /dev/null +++ b/src/Models/Tables/EntityMCostumeProperAttributeHpBonusTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCostumeProperAttributeHpBonusTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMCostumeProperAttributeHpBonusTable(EntityMCostumeProperAttributeHpBonus[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.CostumeId; + } + + public bool TryFindByCostumeId(int key, out EntityMCostumeProperAttributeHpBonus result) => TryFindUniqueCore(data, primaryIndexSelector, Comparer.Default, key, out result); +} diff --git a/src/Models/Tables/EntityMCostumeRarityTable.cs b/src/Models/Tables/EntityMCostumeRarityTable.cs new file mode 100644 index 0000000..e85c7a2 --- /dev/null +++ b/src/Models/Tables/EntityMCostumeRarityTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCostumeRarityTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMCostumeRarityTable(EntityMCostumeRarity[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.RarityType; + } + + public EntityMCostumeRarity FindByRarityType(RarityType key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMCostumeSpecialActActiveSkillConditionAttributeTable.cs b/src/Models/Tables/EntityMCostumeSpecialActActiveSkillConditionAttributeTable.cs new file mode 100644 index 0000000..f3c1a35 --- /dev/null +++ b/src/Models/Tables/EntityMCostumeSpecialActActiveSkillConditionAttributeTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCostumeSpecialActActiveSkillConditionAttributeTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMCostumeSpecialActActiveSkillConditionAttributeTable(EntityMCostumeSpecialActActiveSkillConditionAttribute[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.CostumeSpecialActActiveSkillConditionId; + } + + public bool TryFindByCostumeSpecialActActiveSkillConditionId(int key, out EntityMCostumeSpecialActActiveSkillConditionAttribute result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer.Default, key, out result); +} diff --git a/src/Models/Tables/EntityMCostumeSpecialActActiveSkillTable.cs b/src/Models/Tables/EntityMCostumeSpecialActActiveSkillTable.cs new file mode 100644 index 0000000..8b92738 --- /dev/null +++ b/src/Models/Tables/EntityMCostumeSpecialActActiveSkillTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCostumeSpecialActActiveSkillTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMCostumeSpecialActActiveSkillTable(EntityMCostumeSpecialActActiveSkill[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.CostumeId; + } + + public bool TryFindByCostumeId(int key, out EntityMCostumeSpecialActActiveSkill result) => TryFindUniqueCore(data, primaryIndexSelector, Comparer.Default, key, out result); +} diff --git a/src/Models/Tables/EntityMCostumeStatusCalculationTable.cs b/src/Models/Tables/EntityMCostumeStatusCalculationTable.cs new file mode 100644 index 0000000..211d0ee --- /dev/null +++ b/src/Models/Tables/EntityMCostumeStatusCalculationTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCostumeStatusCalculationTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMCostumeStatusCalculationTable(EntityMCostumeStatusCalculation[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.CostumeStatusCalculationId; + } + + public EntityMCostumeStatusCalculation FindByCostumeStatusCalculationId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMCostumeTable.cs b/src/Models/Tables/EntityMCostumeTable.cs new file mode 100644 index 0000000..b13fde0 --- /dev/null +++ b/src/Models/Tables/EntityMCostumeTable.cs @@ -0,0 +1,21 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMCostumeTable : TableBase +{ + private readonly Func primaryIndexSelector; + private readonly Func secondaryIndexSelector; + + public EntityMCostumeTable(EntityMCostume[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.CostumeId; + secondaryIndexSelector = element => element.CharacterId; + } + + public EntityMCostume FindByCostumeId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); + + public bool TryFindByCostumeId(int key, out EntityMCostume result) => TryFindUniqueCore(data, primaryIndexSelector, Comparer.Default, key, out result); + + public RangeView FindByCharacterId(int key) => FindManyCore(data, secondaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMDeckEntrustCoefficientAttributeTable.cs b/src/Models/Tables/EntityMDeckEntrustCoefficientAttributeTable.cs new file mode 100644 index 0000000..dba6d66 --- /dev/null +++ b/src/Models/Tables/EntityMDeckEntrustCoefficientAttributeTable.cs @@ -0,0 +1,14 @@ +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Tables; + +public class EntityMDeckEntrustCoefficientAttributeTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMDeckEntrustCoefficientAttributeTable(EntityMDeckEntrustCoefficientAttribute[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.EntrustAttributeType, element.AttributeType); + } +} diff --git a/src/Models/Tables/EntityMDeckEntrustCoefficientPartsSeriesBonusCountTable.cs b/src/Models/Tables/EntityMDeckEntrustCoefficientPartsSeriesBonusCountTable.cs new file mode 100644 index 0000000..bb246a5 --- /dev/null +++ b/src/Models/Tables/EntityMDeckEntrustCoefficientPartsSeriesBonusCountTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMDeckEntrustCoefficientPartsSeriesBonusCountTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMDeckEntrustCoefficientPartsSeriesBonusCountTable(EntityMDeckEntrustCoefficientPartsSeriesBonusCount[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.PartsSeriesBonusCount; + } +} diff --git a/src/Models/Tables/EntityMDeckEntrustCoefficientStatusTable.cs b/src/Models/Tables/EntityMDeckEntrustCoefficientStatusTable.cs new file mode 100644 index 0000000..789c02d --- /dev/null +++ b/src/Models/Tables/EntityMDeckEntrustCoefficientStatusTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMDeckEntrustCoefficientStatusTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMDeckEntrustCoefficientStatusTable(EntityMDeckEntrustCoefficientStatus[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.EntrustDeckStatusType, element.DeckStatusType); + } +} diff --git a/src/Models/Tables/EntityMDokanContentGroupTable.cs b/src/Models/Tables/EntityMDokanContentGroupTable.cs new file mode 100644 index 0000000..fa9b4d3 --- /dev/null +++ b/src/Models/Tables/EntityMDokanContentGroupTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMDokanContentGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMDokanContentGroupTable(EntityMDokanContentGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.DokanContentGroupId, element.ContentIndex); + } +} diff --git a/src/Models/Tables/EntityMDokanTable.cs b/src/Models/Tables/EntityMDokanTable.cs new file mode 100644 index 0000000..a609ff2 --- /dev/null +++ b/src/Models/Tables/EntityMDokanTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMDokanTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMDokanTable(EntityMDokan[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.DokanId; + } +} diff --git a/src/Models/Tables/EntityMDokanTextTable.cs b/src/Models/Tables/EntityMDokanTextTable.cs new file mode 100644 index 0000000..6458228 --- /dev/null +++ b/src/Models/Tables/EntityMDokanTextTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Tables; + +public class EntityMDokanTextTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMDokanTextTable(EntityMDokanText[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.DokanTextId, element.LanguageType); + } + + public EntityMDokanText FindByDokanTextIdAndLanguageType(ValueTuple key) => FindUniqueCore(data, primaryIndexSelector, Comparer<(int, LanguageType)>.Default, key); +} diff --git a/src/Models/Tables/EntityMEnhanceCampaignTable.cs b/src/Models/Tables/EntityMEnhanceCampaignTable.cs new file mode 100644 index 0000000..3277f9a --- /dev/null +++ b/src/Models/Tables/EntityMEnhanceCampaignTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMEnhanceCampaignTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMEnhanceCampaignTable(EntityMEnhanceCampaign[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.EnhanceCampaignId; + } +} diff --git a/src/Models/Tables/EntityMEnhanceCampaignTargetGroupTable.cs b/src/Models/Tables/EntityMEnhanceCampaignTargetGroupTable.cs new file mode 100644 index 0000000..223a7c8 --- /dev/null +++ b/src/Models/Tables/EntityMEnhanceCampaignTargetGroupTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMEnhanceCampaignTargetGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMEnhanceCampaignTargetGroupTable(EntityMEnhanceCampaignTargetGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.EnhanceCampaignTargetGroupId, element.EnhanceCampaignTargetIndex); + } + + public RangeView FindRangeByEnhanceCampaignTargetGroupIdAndEnhanceCampaignTargetIndex(ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityMEvaluateConditionTable.cs b/src/Models/Tables/EntityMEvaluateConditionTable.cs new file mode 100644 index 0000000..eb863df --- /dev/null +++ b/src/Models/Tables/EntityMEvaluateConditionTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMEvaluateConditionTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMEvaluateConditionTable(EntityMEvaluateCondition[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.EvaluateConditionId; + } + + public EntityMEvaluateCondition FindByEvaluateConditionId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMEvaluateConditionValueGroupTable.cs b/src/Models/Tables/EntityMEvaluateConditionValueGroupTable.cs new file mode 100644 index 0000000..aaa4210 --- /dev/null +++ b/src/Models/Tables/EntityMEvaluateConditionValueGroupTable.cs @@ -0,0 +1,19 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMEvaluateConditionValueGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMEvaluateConditionValueGroupTable(EntityMEvaluateConditionValueGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.EvaluateConditionValueGroupId, element.GroupIndex); + } + + public EntityMEvaluateConditionValueGroup FindByEvaluateConditionValueGroupIdAndGroupIndex(ValueTuple key) => + FindUniqueCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, key); + + public RangeView FindRangeByEvaluateConditionValueGroupIdAndGroupIndex(ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityMEventQuestChapterCharacterTable.cs b/src/Models/Tables/EntityMEventQuestChapterCharacterTable.cs new file mode 100644 index 0000000..4daa6b8 --- /dev/null +++ b/src/Models/Tables/EntityMEventQuestChapterCharacterTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMEventQuestChapterCharacterTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMEventQuestChapterCharacterTable(EntityMEventQuestChapterCharacter[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.EventQuestChapterId; + } + + public EntityMEventQuestChapterCharacter FindByEventQuestChapterId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMEventQuestChapterDifficultyLimitContentUnlockTable.cs b/src/Models/Tables/EntityMEventQuestChapterDifficultyLimitContentUnlockTable.cs new file mode 100644 index 0000000..e3b21dc --- /dev/null +++ b/src/Models/Tables/EntityMEventQuestChapterDifficultyLimitContentUnlockTable.cs @@ -0,0 +1,19 @@ +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Tables; + +public class EntityMEventQuestChapterDifficultyLimitContentUnlockTable : TableBase +{ + private readonly Func primaryIndexSelector; + private readonly Func secondaryIndexSelector; + + public EntityMEventQuestChapterDifficultyLimitContentUnlockTable(EntityMEventQuestChapterDifficultyLimitContentUnlock[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.EventQuestChapterId, element.DifficultyType); + secondaryIndexSelector = element => element.EventQuestChapterId; + } + + public bool TryFindByEventQuestChapterIdAndDifficultyType(ValueTuple key, out EntityMEventQuestChapterDifficultyLimitContentUnlock result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer<(int, DifficultyType)>.Default, key, out result); +} diff --git a/src/Models/Tables/EntityMEventQuestChapterLimitContentRelationTable.cs b/src/Models/Tables/EntityMEventQuestChapterLimitContentRelationTable.cs new file mode 100644 index 0000000..037d8c3 --- /dev/null +++ b/src/Models/Tables/EntityMEventQuestChapterLimitContentRelationTable.cs @@ -0,0 +1,22 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMEventQuestChapterLimitContentRelationTable : TableBase +{ + private readonly Func primaryIndexSelector; + private readonly Func secondaryIndexSelector; + + public EntityMEventQuestChapterLimitContentRelationTable(EntityMEventQuestChapterLimitContentRelation[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.EventQuestChapterId; + secondaryIndexSelector = element => element.EventQuestLimitContentId; + } + + public EntityMEventQuestChapterLimitContentRelation FindByEventQuestChapterId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); + + public bool TryFindByEventQuestChapterId(int key, out EntityMEventQuestChapterLimitContentRelation result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer.Default, key, out result); + + public RangeView FindByEventQuestLimitContentId(int key) => FindManyCore(data, secondaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMEventQuestChapterTable.cs b/src/Models/Tables/EntityMEventQuestChapterTable.cs new file mode 100644 index 0000000..4ef59de --- /dev/null +++ b/src/Models/Tables/EntityMEventQuestChapterTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMEventQuestChapterTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMEventQuestChapterTable(EntityMEventQuestChapter[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.EventQuestChapterId; + } + + public EntityMEventQuestChapter FindByEventQuestChapterId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMEventQuestDailyGroupCompleteRewardTable.cs b/src/Models/Tables/EntityMEventQuestDailyGroupCompleteRewardTable.cs new file mode 100644 index 0000000..8ff13fc --- /dev/null +++ b/src/Models/Tables/EntityMEventQuestDailyGroupCompleteRewardTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMEventQuestDailyGroupCompleteRewardTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMEventQuestDailyGroupCompleteRewardTable(EntityMEventQuestDailyGroupCompleteReward[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.EventQuestDailyGroupCompleteRewardId, element.SortOrder); + } +} diff --git a/src/Models/Tables/EntityMEventQuestDailyGroupMessageTable.cs b/src/Models/Tables/EntityMEventQuestDailyGroupMessageTable.cs new file mode 100644 index 0000000..42b4ad2 --- /dev/null +++ b/src/Models/Tables/EntityMEventQuestDailyGroupMessageTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMEventQuestDailyGroupMessageTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMEventQuestDailyGroupMessageTable(EntityMEventQuestDailyGroupMessage[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.EventQuestDailyGroupMessageId, element.OddsNumber); + } + + public bool TryFindByEventQuestDailyGroupMessageIdAndOddsNumber(ValueTuple key, out EntityMEventQuestDailyGroupMessage result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, key, out result); +} diff --git a/src/Models/Tables/EntityMEventQuestDailyGroupTable.cs b/src/Models/Tables/EntityMEventQuestDailyGroupTable.cs new file mode 100644 index 0000000..0302c5a --- /dev/null +++ b/src/Models/Tables/EntityMEventQuestDailyGroupTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMEventQuestDailyGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMEventQuestDailyGroupTable(EntityMEventQuestDailyGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.EventQuestDailyGroupId; + } +} diff --git a/src/Models/Tables/EntityMEventQuestDailyGroupTargetChapterTable.cs b/src/Models/Tables/EntityMEventQuestDailyGroupTargetChapterTable.cs new file mode 100644 index 0000000..7f20e8d --- /dev/null +++ b/src/Models/Tables/EntityMEventQuestDailyGroupTargetChapterTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMEventQuestDailyGroupTargetChapterTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMEventQuestDailyGroupTargetChapterTable(EntityMEventQuestDailyGroupTargetChapter[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.EventQuestDailyGroupTargetChapterId, element.SortOrder); + } +} diff --git a/src/Models/Tables/EntityMEventQuestDisplayItemGroupTable.cs b/src/Models/Tables/EntityMEventQuestDisplayItemGroupTable.cs new file mode 100644 index 0000000..eb86ab8 --- /dev/null +++ b/src/Models/Tables/EntityMEventQuestDisplayItemGroupTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMEventQuestDisplayItemGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMEventQuestDisplayItemGroupTable(EntityMEventQuestDisplayItemGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.EventQuestDisplayItemGroupId, element.SortOrder); + } +} diff --git a/src/Models/Tables/EntityMEventQuestGuerrillaFreeOpenScheduleCorrespondenceTable.cs b/src/Models/Tables/EntityMEventQuestGuerrillaFreeOpenScheduleCorrespondenceTable.cs new file mode 100644 index 0000000..bca9b0a --- /dev/null +++ b/src/Models/Tables/EntityMEventQuestGuerrillaFreeOpenScheduleCorrespondenceTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMEventQuestGuerrillaFreeOpenScheduleCorrespondenceTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMEventQuestGuerrillaFreeOpenScheduleCorrespondenceTable(EntityMEventQuestGuerrillaFreeOpenScheduleCorrespondence[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.QuestId, element.QuestScheduleId); + } + + public RangeView FindRangeByQuestIdAndQuestScheduleId(ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityMEventQuestGuerrillaFreeOpenTable.cs b/src/Models/Tables/EntityMEventQuestGuerrillaFreeOpenTable.cs new file mode 100644 index 0000000..d3e1c3a --- /dev/null +++ b/src/Models/Tables/EntityMEventQuestGuerrillaFreeOpenTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMEventQuestGuerrillaFreeOpenTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMEventQuestGuerrillaFreeOpenTable(EntityMEventQuestGuerrillaFreeOpen[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.EventQuestGuerrillaFreeOpenId; + } +} diff --git a/src/Models/Tables/EntityMEventQuestLabyrinthMobTable.cs b/src/Models/Tables/EntityMEventQuestLabyrinthMobTable.cs new file mode 100644 index 0000000..47353c4 --- /dev/null +++ b/src/Models/Tables/EntityMEventQuestLabyrinthMobTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMEventQuestLabyrinthMobTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMEventQuestLabyrinthMobTable(EntityMEventQuestLabyrinthMob[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.EventQuestLabyrinthMobId; + } + + public bool TryFindByEventQuestLabyrinthMobId(int key, out EntityMEventQuestLabyrinthMob result) => TryFindUniqueCore(data, primaryIndexSelector, Comparer.Default, key, out result); +} diff --git a/src/Models/Tables/EntityMEventQuestLabyrinthQuestDisplayTable.cs b/src/Models/Tables/EntityMEventQuestLabyrinthQuestDisplayTable.cs new file mode 100644 index 0000000..10f958c --- /dev/null +++ b/src/Models/Tables/EntityMEventQuestLabyrinthQuestDisplayTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMEventQuestLabyrinthQuestDisplayTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMEventQuestLabyrinthQuestDisplayTable(EntityMEventQuestLabyrinthQuestDisplay[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.QuestId; + } + + public bool TryFindByQuestId(int key, out EntityMEventQuestLabyrinthQuestDisplay result) => TryFindUniqueCore(data, primaryIndexSelector, Comparer.Default, key, out result); +} diff --git a/src/Models/Tables/EntityMEventQuestLabyrinthQuestEffectDescriptionAbilityTable.cs b/src/Models/Tables/EntityMEventQuestLabyrinthQuestEffectDescriptionAbilityTable.cs new file mode 100644 index 0000000..e3df4ef --- /dev/null +++ b/src/Models/Tables/EntityMEventQuestLabyrinthQuestEffectDescriptionAbilityTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMEventQuestLabyrinthQuestEffectDescriptionAbilityTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMEventQuestLabyrinthQuestEffectDescriptionAbilityTable(EntityMEventQuestLabyrinthQuestEffectDescriptionAbility[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.EventQuestLabyrinthQuestEffectDescriptionId; + } + + public EntityMEventQuestLabyrinthQuestEffectDescriptionAbility FindByEventQuestLabyrinthQuestEffectDescriptionId(int key) => + FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMEventQuestLabyrinthQuestEffectDescriptionFreeTable.cs b/src/Models/Tables/EntityMEventQuestLabyrinthQuestEffectDescriptionFreeTable.cs new file mode 100644 index 0000000..2dda2ad --- /dev/null +++ b/src/Models/Tables/EntityMEventQuestLabyrinthQuestEffectDescriptionFreeTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMEventQuestLabyrinthQuestEffectDescriptionFreeTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMEventQuestLabyrinthQuestEffectDescriptionFreeTable(EntityMEventQuestLabyrinthQuestEffectDescriptionFree[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.EventQuestLabyrinthQuestEffectDescriptionId; + } + + public EntityMEventQuestLabyrinthQuestEffectDescriptionFree FindByEventQuestLabyrinthQuestEffectDescriptionId(int key) => + FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMEventQuestLabyrinthQuestEffectDisplayTable.cs b/src/Models/Tables/EntityMEventQuestLabyrinthQuestEffectDisplayTable.cs new file mode 100644 index 0000000..71e2ecf --- /dev/null +++ b/src/Models/Tables/EntityMEventQuestLabyrinthQuestEffectDisplayTable.cs @@ -0,0 +1,17 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMEventQuestLabyrinthQuestEffectDisplayTable : TableBase +{ + private readonly Func primaryIndexSelector; + private readonly Func secondaryIndexSelector; + + public EntityMEventQuestLabyrinthQuestEffectDisplayTable(EntityMEventQuestLabyrinthQuestEffectDisplay[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.QuestId, element.SortOrder); + secondaryIndexSelector = element => element.QuestId; + } + + public RangeView FindByQuestId(int key) => FindManyCore(data, secondaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMEventQuestLabyrinthRewardGroupTable.cs b/src/Models/Tables/EntityMEventQuestLabyrinthRewardGroupTable.cs new file mode 100644 index 0000000..ec88862 --- /dev/null +++ b/src/Models/Tables/EntityMEventQuestLabyrinthRewardGroupTable.cs @@ -0,0 +1,17 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMEventQuestLabyrinthRewardGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + private readonly Func secondaryIndexSelector; + + public EntityMEventQuestLabyrinthRewardGroupTable(EntityMEventQuestLabyrinthRewardGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.EventQuestLabyrinthRewardGroupId, element.SortOrder); + secondaryIndexSelector = element => element.EventQuestLabyrinthRewardGroupId; + } + + public RangeView FindByEventQuestLabyrinthRewardGroupId(int key) => FindManyCore(data, secondaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMEventQuestLabyrinthSeasonRewardGroupTable.cs b/src/Models/Tables/EntityMEventQuestLabyrinthSeasonRewardGroupTable.cs new file mode 100644 index 0000000..d419d12 --- /dev/null +++ b/src/Models/Tables/EntityMEventQuestLabyrinthSeasonRewardGroupTable.cs @@ -0,0 +1,21 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMEventQuestLabyrinthSeasonRewardGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + private readonly Func secondaryIndexSelector; + + public EntityMEventQuestLabyrinthSeasonRewardGroupTable(EntityMEventQuestLabyrinthSeasonRewardGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.EventQuestLabyrinthSeasonRewardGroupId, element.HeadQuestId); + secondaryIndexSelector = element => element.EventQuestLabyrinthSeasonRewardGroupId; + } + + public EntityMEventQuestLabyrinthSeasonRewardGroup FindByEventQuestLabyrinthSeasonRewardGroupIdAndHeadQuestId(ValueTuple key) => + FindUniqueCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, key); + + public RangeView FindByEventQuestLabyrinthSeasonRewardGroupId(int key) => + FindManyCore(data, secondaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMEventQuestLabyrinthSeasonTable.cs b/src/Models/Tables/EntityMEventQuestLabyrinthSeasonTable.cs new file mode 100644 index 0000000..d500954 --- /dev/null +++ b/src/Models/Tables/EntityMEventQuestLabyrinthSeasonTable.cs @@ -0,0 +1,19 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMEventQuestLabyrinthSeasonTable : TableBase +{ + private readonly Func primaryIndexSelector; + private readonly Func secondaryIndexSelector; + + public EntityMEventQuestLabyrinthSeasonTable(EntityMEventQuestLabyrinthSeason[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.EventQuestChapterId, element.SeasonNumber); + secondaryIndexSelector = element => element.EventQuestChapterId; + } + + public EntityMEventQuestLabyrinthSeason FindByEventQuestChapterIdAndSeasonNumber(ValueTuple key) => FindUniqueCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, key); + + public RangeView FindByEventQuestChapterId(int key) => FindManyCore(data, secondaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMEventQuestLabyrinthStageAccumulationRewardGroupTable.cs b/src/Models/Tables/EntityMEventQuestLabyrinthStageAccumulationRewardGroupTable.cs new file mode 100644 index 0000000..d7104c8 --- /dev/null +++ b/src/Models/Tables/EntityMEventQuestLabyrinthStageAccumulationRewardGroupTable.cs @@ -0,0 +1,18 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMEventQuestLabyrinthStageAccumulationRewardGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + private readonly Func secondaryIndexSelector; + + public EntityMEventQuestLabyrinthStageAccumulationRewardGroupTable(EntityMEventQuestLabyrinthStageAccumulationRewardGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.EventQuestLabyrinthStageAccumulationRewardGroupId, element.QuestMissionClearCount); + secondaryIndexSelector = element => element.EventQuestLabyrinthStageAccumulationRewardGroupId; + } + + public RangeView FindByEventQuestLabyrinthStageAccumulationRewardGroupId(int key) => + FindManyCore(data, secondaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMEventQuestLabyrinthStageTable.cs b/src/Models/Tables/EntityMEventQuestLabyrinthStageTable.cs new file mode 100644 index 0000000..c016700 --- /dev/null +++ b/src/Models/Tables/EntityMEventQuestLabyrinthStageTable.cs @@ -0,0 +1,19 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMEventQuestLabyrinthStageTable : TableBase +{ + private readonly Func primaryIndexSelector; + private readonly Func secondaryIndexSelector; + + public EntityMEventQuestLabyrinthStageTable(EntityMEventQuestLabyrinthStage[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.EventQuestChapterId, element.StageOrder); + secondaryIndexSelector = element => element.EventQuestChapterId; + } + + public EntityMEventQuestLabyrinthStage FindByEventQuestChapterIdAndStageOrder(ValueTuple key) => FindUniqueCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, key); + + public RangeView FindByEventQuestChapterId(int key) => FindManyCore(data, secondaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMEventQuestLimitContentDeckRestrictionTable.cs b/src/Models/Tables/EntityMEventQuestLimitContentDeckRestrictionTable.cs new file mode 100644 index 0000000..4667152 --- /dev/null +++ b/src/Models/Tables/EntityMEventQuestLimitContentDeckRestrictionTable.cs @@ -0,0 +1,18 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMEventQuestLimitContentDeckRestrictionTable : TableBase +{ + private readonly Func primaryIndexSelector; + private readonly Func secondaryIndexSelector; + + public EntityMEventQuestLimitContentDeckRestrictionTable(EntityMEventQuestLimitContentDeckRestriction[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.EventQuestLimitContentDeckRestrictionId, element.GroupIndex); + secondaryIndexSelector = element => element.EventQuestLimitContentDeckRestrictionId; + } + + public RangeView FindByEventQuestLimitContentDeckRestrictionId(int key) => + FindManyCore(data, secondaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMEventQuestLimitContentDeckRestrictionTargetTable.cs b/src/Models/Tables/EntityMEventQuestLimitContentDeckRestrictionTargetTable.cs new file mode 100644 index 0000000..6f07237 --- /dev/null +++ b/src/Models/Tables/EntityMEventQuestLimitContentDeckRestrictionTargetTable.cs @@ -0,0 +1,19 @@ +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Tables; + +public class EntityMEventQuestLimitContentDeckRestrictionTargetTable : TableBase +{ + private readonly Func primaryIndexSelector; + private readonly Func secondaryIndexSelector; + + public EntityMEventQuestLimitContentDeckRestrictionTargetTable(EntityMEventQuestLimitContentDeckRestrictionTarget[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.EventQuestLimitContentDeckRestrictionTargetId, element.LimitContentDeckRestrictionType); + secondaryIndexSelector = element => element.EventQuestLimitContentDeckRestrictionTargetId; + } + + public RangeView FindByEventQuestLimitContentDeckRestrictionTargetId(int key) => + FindManyCore(data, secondaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMEventQuestLimitContentTable.cs b/src/Models/Tables/EntityMEventQuestLimitContentTable.cs new file mode 100644 index 0000000..5c99bce --- /dev/null +++ b/src/Models/Tables/EntityMEventQuestLimitContentTable.cs @@ -0,0 +1,17 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMEventQuestLimitContentTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMEventQuestLimitContentTable(EntityMEventQuestLimitContent[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.EventQuestLimitContentId; + } + + public EntityMEventQuestLimitContent FindByEventQuestLimitContentId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); + + public bool TryFindByEventQuestLimitContentId(int key, out EntityMEventQuestLimitContent result) => TryFindUniqueCore(data, primaryIndexSelector, Comparer.Default, key, out result); +} diff --git a/src/Models/Tables/EntityMEventQuestLinkTable.cs b/src/Models/Tables/EntityMEventQuestLinkTable.cs new file mode 100644 index 0000000..af63db5 --- /dev/null +++ b/src/Models/Tables/EntityMEventQuestLinkTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMEventQuestLinkTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMEventQuestLinkTable(EntityMEventQuestLink[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.EventQuestLinkId; + } + + public EntityMEventQuestLink FindByEventQuestLinkId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMEventQuestSequenceGroupTable.cs b/src/Models/Tables/EntityMEventQuestSequenceGroupTable.cs new file mode 100644 index 0000000..5790fc9 --- /dev/null +++ b/src/Models/Tables/EntityMEventQuestSequenceGroupTable.cs @@ -0,0 +1,20 @@ +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Tables; + +public class EntityMEventQuestSequenceGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMEventQuestSequenceGroupTable(EntityMEventQuestSequenceGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.EventQuestSequenceGroupId, element.DifficultyType); + } + + public EntityMEventQuestSequenceGroup FindByEventQuestSequenceGroupIdAndDifficultyType(ValueTuple key) => + FindUniqueCore(data, primaryIndexSelector, Comparer<(int, DifficultyType)>.Default, key); + + public RangeView FindRangeByEventQuestSequenceGroupIdAndDifficultyType(ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer<(int, DifficultyType)>.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityMEventQuestSequenceTable.cs b/src/Models/Tables/EntityMEventQuestSequenceTable.cs new file mode 100644 index 0000000..68630aa --- /dev/null +++ b/src/Models/Tables/EntityMEventQuestSequenceTable.cs @@ -0,0 +1,19 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMEventQuestSequenceTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMEventQuestSequenceTable(EntityMEventQuestSequence[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.EventQuestSequenceId, element.SortOrder); + } + + public EntityMEventQuestSequence FindByEventQuestSequenceIdAndSortOrder(ValueTuple key) => + FindUniqueCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, key); + + public RangeView FindRangeByEventQuestSequenceIdAndSortOrder(ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityMEventQuestTowerAccumulationRewardGroupTable.cs b/src/Models/Tables/EntityMEventQuestTowerAccumulationRewardGroupTable.cs new file mode 100644 index 0000000..f5e703b --- /dev/null +++ b/src/Models/Tables/EntityMEventQuestTowerAccumulationRewardGroupTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMEventQuestTowerAccumulationRewardGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMEventQuestTowerAccumulationRewardGroupTable(EntityMEventQuestTowerAccumulationRewardGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.EventQuestTowerAccumulationRewardGroupId, element.QuestMissionClearCount); + } +} diff --git a/src/Models/Tables/EntityMEventQuestTowerAccumulationRewardTable.cs b/src/Models/Tables/EntityMEventQuestTowerAccumulationRewardTable.cs new file mode 100644 index 0000000..caac191 --- /dev/null +++ b/src/Models/Tables/EntityMEventQuestTowerAccumulationRewardTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMEventQuestTowerAccumulationRewardTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMEventQuestTowerAccumulationRewardTable(EntityMEventQuestTowerAccumulationReward[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.EventQuestChapterId; + } + + public EntityMEventQuestTowerAccumulationReward FindByEventQuestChapterId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMEventQuestTowerAssetTable.cs b/src/Models/Tables/EntityMEventQuestTowerAssetTable.cs new file mode 100644 index 0000000..f9c32f6 --- /dev/null +++ b/src/Models/Tables/EntityMEventQuestTowerAssetTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMEventQuestTowerAssetTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMEventQuestTowerAssetTable(EntityMEventQuestTowerAsset[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.EventQuestChapterId; + } + + public EntityMEventQuestTowerAsset FindByEventQuestChapterId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMEventQuestTowerRewardGroupTable.cs b/src/Models/Tables/EntityMEventQuestTowerRewardGroupTable.cs new file mode 100644 index 0000000..a20a512 --- /dev/null +++ b/src/Models/Tables/EntityMEventQuestTowerRewardGroupTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMEventQuestTowerRewardGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMEventQuestTowerRewardGroupTable(EntityMEventQuestTowerRewardGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.EventQuestTowerRewardGroupId, element.SortOrder); + } + + public EntityMEventQuestTowerRewardGroup FindByEventQuestTowerRewardGroupIdAndSortOrder(ValueTuple key) => + FindUniqueCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, key); +} diff --git a/src/Models/Tables/EntityMEventQuestUnlockConditionTable.cs b/src/Models/Tables/EntityMEventQuestUnlockConditionTable.cs new file mode 100644 index 0000000..43fffd7 --- /dev/null +++ b/src/Models/Tables/EntityMEventQuestUnlockConditionTable.cs @@ -0,0 +1,22 @@ +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Tables; + +public class EntityMEventQuestUnlockConditionTable : TableBase +{ + private readonly Func primaryIndexSelector; + private readonly Func secondaryIndexSelector; + + public EntityMEventQuestUnlockConditionTable(EntityMEventQuestUnlockCondition[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.EventQuestType, element.CharacterId, element.QuestId); + secondaryIndexSelector = element => (element.EventQuestType, element.UnlockConditionType); + } + + public EntityMEventQuestUnlockCondition FindByEventQuestTypeAndCharacterIdAndQuestId(ValueTuple key) => + FindUniqueCore(data, primaryIndexSelector, Comparer<(EventQuestType, int, int)>.Default, key); + + public RangeView FindByEventQuestTypeAndUnlockConditionType(ValueTuple key) => + FindManyCore(data, secondaryIndexSelector, Comparer<(EventQuestType, UnlockConditionType)>.Default, key); +} diff --git a/src/Models/Tables/EntityMExploreGradeAssetTable.cs b/src/Models/Tables/EntityMExploreGradeAssetTable.cs new file mode 100644 index 0000000..05f341d --- /dev/null +++ b/src/Models/Tables/EntityMExploreGradeAssetTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMExploreGradeAssetTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMExploreGradeAssetTable(EntityMExploreGradeAsset[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.ExploreGradeId; + } + + public EntityMExploreGradeAsset FindByExploreGradeId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMExploreGradeScoreTable.cs b/src/Models/Tables/EntityMExploreGradeScoreTable.cs new file mode 100644 index 0000000..d62a81a --- /dev/null +++ b/src/Models/Tables/EntityMExploreGradeScoreTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMExploreGradeScoreTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMExploreGradeScoreTable(EntityMExploreGradeScore[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.ExploreId, element.NecessaryScore); + } + + public EntityMExploreGradeScore FindClosestByExploreIdAndNecessaryScore(ValueTuple key, bool selectLower = true) => + FindUniqueClosestCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, key, selectLower); +} diff --git a/src/Models/Tables/EntityMExploreGroupTable.cs b/src/Models/Tables/EntityMExploreGroupTable.cs new file mode 100644 index 0000000..c5e6f05 --- /dev/null +++ b/src/Models/Tables/EntityMExploreGroupTable.cs @@ -0,0 +1,20 @@ +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Tables; + +public class EntityMExploreGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + private readonly Func secondaryIndexSelector; + + public EntityMExploreGroupTable(EntityMExploreGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.ExploreGroupId, element.DifficultyType); + secondaryIndexSelector = element => element.ExploreId; + } + + public EntityMExploreGroup FindByExploreGroupIdAndDifficultyType(ValueTuple key) => FindUniqueCore(data, primaryIndexSelector, Comparer<(int, DifficultyType)>.Default, key); + + public RangeView FindByExploreId(int key) => FindManyCore(data, secondaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMExploreTable.cs b/src/Models/Tables/EntityMExploreTable.cs new file mode 100644 index 0000000..5e53b20 --- /dev/null +++ b/src/Models/Tables/EntityMExploreTable.cs @@ -0,0 +1,18 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMExploreTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMExploreTable(EntityMExplore[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.ExploreId; + } + + public EntityMExplore FindByExploreId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); + + public RangeView FindRangeByExploreId(int min, int max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityMExploreUnlockConditionTable.cs b/src/Models/Tables/EntityMExploreUnlockConditionTable.cs new file mode 100644 index 0000000..68b80ff --- /dev/null +++ b/src/Models/Tables/EntityMExploreUnlockConditionTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMExploreUnlockConditionTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMExploreUnlockConditionTable(EntityMExploreUnlockCondition[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.ExploreUnlockConditionId; + } + + public EntityMExploreUnlockCondition FindByExploreUnlockConditionId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMExtraQuestGroupInMainQuestChapterTable.cs b/src/Models/Tables/EntityMExtraQuestGroupInMainQuestChapterTable.cs new file mode 100644 index 0000000..21cf7e7 --- /dev/null +++ b/src/Models/Tables/EntityMExtraQuestGroupInMainQuestChapterTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMExtraQuestGroupInMainQuestChapterTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMExtraQuestGroupInMainQuestChapterTable(EntityMExtraQuestGroupInMainQuestChapter[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.MainQuestChapterId, element.ExtraQuestIndex); + } + + public bool TryFindByMainQuestChapterIdAndExtraQuestIndex(ValueTuple key, out EntityMExtraQuestGroupInMainQuestChapter result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, key, out result); +} diff --git a/src/Models/Tables/EntityMExtraQuestGroupTable.cs b/src/Models/Tables/EntityMExtraQuestGroupTable.cs new file mode 100644 index 0000000..f371508 --- /dev/null +++ b/src/Models/Tables/EntityMExtraQuestGroupTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMExtraQuestGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMExtraQuestGroupTable(EntityMExtraQuestGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.QuestId, element.ExtraQuestIndex); + } +} diff --git a/src/Models/Tables/EntityMFieldEffectBlessRelationTable.cs b/src/Models/Tables/EntityMFieldEffectBlessRelationTable.cs new file mode 100644 index 0000000..e7b1605 --- /dev/null +++ b/src/Models/Tables/EntityMFieldEffectBlessRelationTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMFieldEffectBlessRelationTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMFieldEffectBlessRelationTable(EntityMFieldEffectBlessRelation[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.FieldEffectGroupId, element.FieldEffectBlessRelationIndex); + } +} diff --git a/src/Models/Tables/EntityMFieldEffectDecreasePointTable.cs b/src/Models/Tables/EntityMFieldEffectDecreasePointTable.cs new file mode 100644 index 0000000..6e88159 --- /dev/null +++ b/src/Models/Tables/EntityMFieldEffectDecreasePointTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMFieldEffectDecreasePointTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMFieldEffectDecreasePointTable(EntityMFieldEffectDecreasePoint[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.WeaponId, element.FieldEffectAbilityId); + } +} diff --git a/src/Models/Tables/EntityMFieldEffectGroupTable.cs b/src/Models/Tables/EntityMFieldEffectGroupTable.cs new file mode 100644 index 0000000..90164c9 --- /dev/null +++ b/src/Models/Tables/EntityMFieldEffectGroupTable.cs @@ -0,0 +1,17 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMFieldEffectGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + private readonly Func secondaryIndexSelector; + + public EntityMFieldEffectGroupTable(EntityMFieldEffectGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.FieldEffectGroupId, element.FieldEffectGroupIndex); + secondaryIndexSelector = element => element.FieldEffectGroupId; + } + + public RangeView FindByFieldEffectGroupId(int key) => FindManyCore(data, secondaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMGachaMedalTable.cs b/src/Models/Tables/EntityMGachaMedalTable.cs new file mode 100644 index 0000000..2c6ef14 --- /dev/null +++ b/src/Models/Tables/EntityMGachaMedalTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMGachaMedalTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMGachaMedalTable(EntityMGachaMedal[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.GachaMedalId; + } + + public EntityMGachaMedal FindByGachaMedalId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMGiftTextTable.cs b/src/Models/Tables/EntityMGiftTextTable.cs new file mode 100644 index 0000000..9cd10c5 --- /dev/null +++ b/src/Models/Tables/EntityMGiftTextTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Tables; + +public class EntityMGiftTextTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMGiftTextTable(EntityMGiftText[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.GiftTextId, element.LanguageType); + } + + public EntityMGiftText FindByGiftTextIdAndLanguageType(ValueTuple key) => FindUniqueCore(data, primaryIndexSelector, Comparer<(int, LanguageType)>.Default, key); +} diff --git a/src/Models/Tables/EntityMGimmickAdditionalAssetTable.cs b/src/Models/Tables/EntityMGimmickAdditionalAssetTable.cs new file mode 100644 index 0000000..41e20b4 --- /dev/null +++ b/src/Models/Tables/EntityMGimmickAdditionalAssetTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMGimmickAdditionalAssetTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMGimmickAdditionalAssetTable(EntityMGimmickAdditionalAsset[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.GimmickId; + } +} diff --git a/src/Models/Tables/EntityMGimmickExtraQuestTable.cs b/src/Models/Tables/EntityMGimmickExtraQuestTable.cs new file mode 100644 index 0000000..860f326 --- /dev/null +++ b/src/Models/Tables/EntityMGimmickExtraQuestTable.cs @@ -0,0 +1,19 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMGimmickExtraQuestTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMGimmickExtraQuestTable(EntityMGimmickExtraQuest[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.GimmickId, element.GimmickOrnamentIndex); + } + + public EntityMGimmickExtraQuest FindByGimmickIdAndGimmickOrnamentIndex(ValueTuple key) => + FindUniqueCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, key); + + public bool TryFindByGimmickIdAndGimmickOrnamentIndex(ValueTuple key, out EntityMGimmickExtraQuest result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, key, out result); +} diff --git a/src/Models/Tables/EntityMGimmickGroupEventLogTable.cs b/src/Models/Tables/EntityMGimmickGroupEventLogTable.cs new file mode 100644 index 0000000..062d02a --- /dev/null +++ b/src/Models/Tables/EntityMGimmickGroupEventLogTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMGimmickGroupEventLogTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMGimmickGroupEventLogTable(EntityMGimmickGroupEventLog[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.GimmickGroupId; + } + + public bool TryFindByGimmickGroupId(int key, out EntityMGimmickGroupEventLog result) => TryFindUniqueCore(data, primaryIndexSelector, Comparer.Default, key, out result); +} diff --git a/src/Models/Tables/EntityMGimmickGroupTable.cs b/src/Models/Tables/EntityMGimmickGroupTable.cs new file mode 100644 index 0000000..c3ad01e --- /dev/null +++ b/src/Models/Tables/EntityMGimmickGroupTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMGimmickGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMGimmickGroupTable(EntityMGimmickGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.GimmickGroupId, element.GroupIndex); + } +} diff --git a/src/Models/Tables/EntityMGimmickIntervalTable.cs b/src/Models/Tables/EntityMGimmickIntervalTable.cs new file mode 100644 index 0000000..7f49245 --- /dev/null +++ b/src/Models/Tables/EntityMGimmickIntervalTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMGimmickIntervalTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMGimmickIntervalTable(EntityMGimmickInterval[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.GimmickId; + } +} diff --git a/src/Models/Tables/EntityMGimmickOrnamentTable.cs b/src/Models/Tables/EntityMGimmickOrnamentTable.cs new file mode 100644 index 0000000..cb9e128 --- /dev/null +++ b/src/Models/Tables/EntityMGimmickOrnamentTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMGimmickOrnamentTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMGimmickOrnamentTable(EntityMGimmickOrnament[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.GimmickOrnamentGroupId, element.GimmickOrnamentIndex); + } +} diff --git a/src/Models/Tables/EntityMGimmickSequenceGroupTable.cs b/src/Models/Tables/EntityMGimmickSequenceGroupTable.cs new file mode 100644 index 0000000..5210039 --- /dev/null +++ b/src/Models/Tables/EntityMGimmickSequenceGroupTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMGimmickSequenceGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMGimmickSequenceGroupTable(EntityMGimmickSequenceGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.GimmickSequenceGroupId, element.GroupIndex); + } +} diff --git a/src/Models/Tables/EntityMGimmickSequenceRewardGroupTable.cs b/src/Models/Tables/EntityMGimmickSequenceRewardGroupTable.cs new file mode 100644 index 0000000..da0643c --- /dev/null +++ b/src/Models/Tables/EntityMGimmickSequenceRewardGroupTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMGimmickSequenceRewardGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMGimmickSequenceRewardGroupTable(EntityMGimmickSequenceRewardGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.GimmickSequenceRewardGroupId, element.GroupIndex); + } + + public bool TryFindByGimmickSequenceRewardGroupIdAndGroupIndex(ValueTuple key, out EntityMGimmickSequenceRewardGroup result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, key, out result); +} diff --git a/src/Models/Tables/EntityMGimmickSequenceScheduleTable.cs b/src/Models/Tables/EntityMGimmickSequenceScheduleTable.cs new file mode 100644 index 0000000..f805228 --- /dev/null +++ b/src/Models/Tables/EntityMGimmickSequenceScheduleTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMGimmickSequenceScheduleTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMGimmickSequenceScheduleTable(EntityMGimmickSequenceSchedule[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.GimmickSequenceScheduleId; + } +} diff --git a/src/Models/Tables/EntityMGimmickSequenceTable.cs b/src/Models/Tables/EntityMGimmickSequenceTable.cs new file mode 100644 index 0000000..46d9bbb --- /dev/null +++ b/src/Models/Tables/EntityMGimmickSequenceTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMGimmickSequenceTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMGimmickSequenceTable(EntityMGimmickSequence[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.GimmickSequenceId; + } + + public EntityMGimmickSequence FindByGimmickSequenceId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMGimmickTable.cs b/src/Models/Tables/EntityMGimmickTable.cs new file mode 100644 index 0000000..5219400 --- /dev/null +++ b/src/Models/Tables/EntityMGimmickTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMGimmickTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMGimmickTable(EntityMGimmick[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.GimmickId; + } + + public EntityMGimmick FindByGimmickId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMHeadupDisplayViewTable.cs b/src/Models/Tables/EntityMHeadupDisplayViewTable.cs new file mode 100644 index 0000000..cb7ea95 --- /dev/null +++ b/src/Models/Tables/EntityMHeadupDisplayViewTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMHeadupDisplayViewTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMHeadupDisplayViewTable(EntityMHeadupDisplayView[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.HeadupDisplayViewId; + } + + public EntityMHeadupDisplayView FindByHeadupDisplayViewId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMHelpCategoryTable.cs b/src/Models/Tables/EntityMHelpCategoryTable.cs new file mode 100644 index 0000000..546ef60 --- /dev/null +++ b/src/Models/Tables/EntityMHelpCategoryTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMHelpCategoryTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMHelpCategoryTable(EntityMHelpCategory[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.HelpCategoryId; + } +} diff --git a/src/Models/Tables/EntityMHelpItemTable.cs b/src/Models/Tables/EntityMHelpItemTable.cs new file mode 100644 index 0000000..e4677a7 --- /dev/null +++ b/src/Models/Tables/EntityMHelpItemTable.cs @@ -0,0 +1,19 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMHelpItemTable : TableBase +{ + private readonly Func primaryIndexSelector; + private readonly Func secondaryIndexSelector; + + public EntityMHelpItemTable(EntityMHelpItem[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.HelpItemId; + secondaryIndexSelector = element => element.HelpCategoryId; + } + + public EntityMHelpItem FindByHelpItemId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); + + public RangeView FindByHelpCategoryId(int key) => FindManyCore(data, secondaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMHelpPageGroupTable.cs b/src/Models/Tables/EntityMHelpPageGroupTable.cs new file mode 100644 index 0000000..51f56ca --- /dev/null +++ b/src/Models/Tables/EntityMHelpPageGroupTable.cs @@ -0,0 +1,18 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMHelpPageGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + private readonly Func secondaryIndexSelector; + + public EntityMHelpPageGroupTable(EntityMHelpPageGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.HelpPageGroupId, element.SortOrder); + secondaryIndexSelector = element => element.HelpPageGroupId; + } + + public RangeView FindRangeByHelpPageGroupIdAndSortOrder(ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityMHelpTable.cs b/src/Models/Tables/EntityMHelpTable.cs new file mode 100644 index 0000000..420ef3e --- /dev/null +++ b/src/Models/Tables/EntityMHelpTable.cs @@ -0,0 +1,18 @@ +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Tables; + +public class EntityMHelpTable : TableBase +{ + private readonly Func primaryIndexSelector; + private readonly Func secondaryIndexSelector; + + public EntityMHelpTable(EntityMHelp[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.HelpType; + secondaryIndexSelector = element => element.HelpPageGroupId; + } + + public bool TryFindByHelpType(HelpType key, out EntityMHelp result) => TryFindUniqueCore(data, primaryIndexSelector, Comparer.Default, key, out result); +} diff --git a/src/Models/Tables/EntityMImportantItemEffectDropCountTable.cs b/src/Models/Tables/EntityMImportantItemEffectDropCountTable.cs new file mode 100644 index 0000000..f4a4dae --- /dev/null +++ b/src/Models/Tables/EntityMImportantItemEffectDropCountTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMImportantItemEffectDropCountTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMImportantItemEffectDropCountTable(EntityMImportantItemEffectDropCount[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.ImportantItemEffectDropCountId; + } +} diff --git a/src/Models/Tables/EntityMImportantItemEffectDropRateTable.cs b/src/Models/Tables/EntityMImportantItemEffectDropRateTable.cs new file mode 100644 index 0000000..3b39fae --- /dev/null +++ b/src/Models/Tables/EntityMImportantItemEffectDropRateTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMImportantItemEffectDropRateTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMImportantItemEffectDropRateTable(EntityMImportantItemEffectDropRate[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.ImportantItemEffectDropRateId; + } +} diff --git a/src/Models/Tables/EntityMImportantItemEffectTable.cs b/src/Models/Tables/EntityMImportantItemEffectTable.cs new file mode 100644 index 0000000..48ad9d3 --- /dev/null +++ b/src/Models/Tables/EntityMImportantItemEffectTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMImportantItemEffectTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMImportantItemEffectTable(EntityMImportantItemEffect[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.ImportantItemEffectId; + } + + public EntityMImportantItemEffect FindByImportantItemEffectId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMImportantItemEffectTargetItemGroupTable.cs b/src/Models/Tables/EntityMImportantItemEffectTargetItemGroupTable.cs new file mode 100644 index 0000000..0ceda34 --- /dev/null +++ b/src/Models/Tables/EntityMImportantItemEffectTargetItemGroupTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMImportantItemEffectTargetItemGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMImportantItemEffectTargetItemGroupTable(EntityMImportantItemEffectTargetItemGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.ImportantItemEffectTargetItemGroupId, element.TargetIndex); + } +} diff --git a/src/Models/Tables/EntityMImportantItemEffectTargetQuestGroupTable.cs b/src/Models/Tables/EntityMImportantItemEffectTargetQuestGroupTable.cs new file mode 100644 index 0000000..627dea1 --- /dev/null +++ b/src/Models/Tables/EntityMImportantItemEffectTargetQuestGroupTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMImportantItemEffectTargetQuestGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMImportantItemEffectTargetQuestGroupTable(EntityMImportantItemEffectTargetQuestGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.ImportantItemEffectTargetQuestGroupId, element.TargetIndex); + } +} diff --git a/src/Models/Tables/EntityMImportantItemEffectUnlockFunctionTable.cs b/src/Models/Tables/EntityMImportantItemEffectUnlockFunctionTable.cs new file mode 100644 index 0000000..76e4f61 --- /dev/null +++ b/src/Models/Tables/EntityMImportantItemEffectUnlockFunctionTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMImportantItemEffectUnlockFunctionTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMImportantItemEffectUnlockFunctionTable(EntityMImportantItemEffectUnlockFunction[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.ImportantItemEffectUnlockFunctionId; + } +} diff --git a/src/Models/Tables/EntityMImportantItemTable.cs b/src/Models/Tables/EntityMImportantItemTable.cs new file mode 100644 index 0000000..178d640 --- /dev/null +++ b/src/Models/Tables/EntityMImportantItemTable.cs @@ -0,0 +1,21 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMImportantItemTable : TableBase +{ + private readonly Func primaryIndexSelector; + private readonly Func secondaryIndexSelector; + + public EntityMImportantItemTable(EntityMImportantItem[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.ImportantItemId; + secondaryIndexSelector = element => element.ImportantItemType; + } + + public EntityMImportantItem FindByImportantItemId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); + + public bool TryFindByImportantItemId(int key, out EntityMImportantItem result) => TryFindUniqueCore(data, primaryIndexSelector, Comparer.Default, key, out result); + + public RangeView FindByImportantItemType(int key) => FindManyCore(data, secondaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMLibraryEventQuestStoryGroupingTable.cs b/src/Models/Tables/EntityMLibraryEventQuestStoryGroupingTable.cs new file mode 100644 index 0000000..2c91200 --- /dev/null +++ b/src/Models/Tables/EntityMLibraryEventQuestStoryGroupingTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMLibraryEventQuestStoryGroupingTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMLibraryEventQuestStoryGroupingTable(EntityMLibraryEventQuestStoryGrouping[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.LibraryStoryGroupingId, element.EventQuestChapterId); + } +} diff --git a/src/Models/Tables/EntityMLibraryMainQuestGroupTable.cs b/src/Models/Tables/EntityMLibraryMainQuestGroupTable.cs new file mode 100644 index 0000000..2f7a3d4 --- /dev/null +++ b/src/Models/Tables/EntityMLibraryMainQuestGroupTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMLibraryMainQuestGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMLibraryMainQuestGroupTable(EntityMLibraryMainQuestGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.LibraryMainQuestGroupId; + } +} diff --git a/src/Models/Tables/EntityMLibraryMainQuestStoryTable.cs b/src/Models/Tables/EntityMLibraryMainQuestStoryTable.cs new file mode 100644 index 0000000..dd49606 --- /dev/null +++ b/src/Models/Tables/EntityMLibraryMainQuestStoryTable.cs @@ -0,0 +1,17 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMLibraryMainQuestStoryTable : TableBase +{ + private readonly Func primaryIndexSelector; + private readonly Func secondaryIndexSelector; + + public EntityMLibraryMainQuestStoryTable(EntityMLibraryMainQuestStory[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.LibraryMainQuestGroupId, element.SortOrder); + secondaryIndexSelector = element => element.LibraryMainQuestGroupId; + } + + public RangeView FindByLibraryMainQuestGroupId(int key) => FindManyCore(data, secondaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMLibraryMovieCategoryTable.cs b/src/Models/Tables/EntityMLibraryMovieCategoryTable.cs new file mode 100644 index 0000000..24635e1 --- /dev/null +++ b/src/Models/Tables/EntityMLibraryMovieCategoryTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMLibraryMovieCategoryTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMLibraryMovieCategoryTable(EntityMLibraryMovieCategory[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.LibraryMovieCategoryId; + } +} diff --git a/src/Models/Tables/EntityMLibraryMovieTable.cs b/src/Models/Tables/EntityMLibraryMovieTable.cs new file mode 100644 index 0000000..714f081 --- /dev/null +++ b/src/Models/Tables/EntityMLibraryMovieTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMLibraryMovieTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMLibraryMovieTable(EntityMLibraryMovie[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.LibraryMovieId; + } +} diff --git a/src/Models/Tables/EntityMLibraryMovieUnlockConditionTable.cs b/src/Models/Tables/EntityMLibraryMovieUnlockConditionTable.cs new file mode 100644 index 0000000..1c4ea92 --- /dev/null +++ b/src/Models/Tables/EntityMLibraryMovieUnlockConditionTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMLibraryMovieUnlockConditionTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMLibraryMovieUnlockConditionTable(EntityMLibraryMovieUnlockCondition[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.LibraryMovieUnlockConditionId; + } + + public EntityMLibraryMovieUnlockCondition FindByLibraryMovieUnlockConditionId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMLibraryRecordGroupingTable.cs b/src/Models/Tables/EntityMLibraryRecordGroupingTable.cs new file mode 100644 index 0000000..dba9267 --- /dev/null +++ b/src/Models/Tables/EntityMLibraryRecordGroupingTable.cs @@ -0,0 +1,14 @@ +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Tables; + +public class EntityMLibraryRecordGroupingTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMLibraryRecordGroupingTable(EntityMLibraryRecordGrouping[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.LibraryRecordType; + } +} diff --git a/src/Models/Tables/EntityMLibraryStoryGroupTable.cs b/src/Models/Tables/EntityMLibraryStoryGroupTable.cs new file mode 100644 index 0000000..b9b761d --- /dev/null +++ b/src/Models/Tables/EntityMLibraryStoryGroupTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMLibraryStoryGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMLibraryStoryGroupTable(EntityMLibraryStoryGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.QuestId, element.SortOrder); + } + + public bool TryFindByQuestIdAndSortOrder(ValueTuple key, out EntityMLibraryStoryGroup result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, key, out result); +} diff --git a/src/Models/Tables/EntityMLimitedOpenTextGroupTable.cs b/src/Models/Tables/EntityMLimitedOpenTextGroupTable.cs new file mode 100644 index 0000000..effbc87 --- /dev/null +++ b/src/Models/Tables/EntityMLimitedOpenTextGroupTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMLimitedOpenTextGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMLimitedOpenTextGroupTable(EntityMLimitedOpenTextGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.LimitedOpenTextGroupId, element.SortOrder); + } +} diff --git a/src/Models/Tables/EntityMLimitedOpenTextTable.cs b/src/Models/Tables/EntityMLimitedOpenTextTable.cs new file mode 100644 index 0000000..94db0e0 --- /dev/null +++ b/src/Models/Tables/EntityMLimitedOpenTextTable.cs @@ -0,0 +1,17 @@ +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Tables; + +public class EntityMLimitedOpenTextTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMLimitedOpenTextTable(EntityMLimitedOpenText[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.LimitedOpenTargetType, element.TargetId); + } + + public EntityMLimitedOpenText FindByLimitedOpenTargetTypeAndTargetId(ValueTuple key) => + FindUniqueCore(data, primaryIndexSelector, Comparer<(LimitedOpenTargetType, int)>.Default, key); +} diff --git a/src/Models/Tables/EntityMListSettingAbilityGroupTable.cs b/src/Models/Tables/EntityMListSettingAbilityGroupTable.cs new file mode 100644 index 0000000..4a2f8d8 --- /dev/null +++ b/src/Models/Tables/EntityMListSettingAbilityGroupTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMListSettingAbilityGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMListSettingAbilityGroupTable(EntityMListSettingAbilityGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.ListSettingAbilityGroupId; + } + + public EntityMListSettingAbilityGroup FindByListSettingAbilityGroupId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMListSettingAbilityGroupTargetTable.cs b/src/Models/Tables/EntityMListSettingAbilityGroupTargetTable.cs new file mode 100644 index 0000000..899523d --- /dev/null +++ b/src/Models/Tables/EntityMListSettingAbilityGroupTargetTable.cs @@ -0,0 +1,17 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMListSettingAbilityGroupTargetTable : TableBase +{ + private readonly Func primaryIndexSelector; + private readonly Func secondaryIndexSelector; + + public EntityMListSettingAbilityGroupTargetTable(EntityMListSettingAbilityGroupTarget[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.ListSettingAbilityGroupTargetId, element.SortOrder); + secondaryIndexSelector = element => element.ListSettingAbilityGroupTargetId; + } + + public RangeView FindByListSettingAbilityGroupTargetId(int key) => FindManyCore(data, secondaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMLoginBonusStampTable.cs b/src/Models/Tables/EntityMLoginBonusStampTable.cs new file mode 100644 index 0000000..9007fc8 --- /dev/null +++ b/src/Models/Tables/EntityMLoginBonusStampTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMLoginBonusStampTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMLoginBonusStampTable(EntityMLoginBonusStamp[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.LoginBonusId, element.LowerPageNumber, element.StampNumber); + } +} diff --git a/src/Models/Tables/EntityMLoginBonusTable.cs b/src/Models/Tables/EntityMLoginBonusTable.cs new file mode 100644 index 0000000..1a6dd72 --- /dev/null +++ b/src/Models/Tables/EntityMLoginBonusTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMLoginBonusTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMLoginBonusTable(EntityMLoginBonus[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.LoginBonusId; + } + + public EntityMLoginBonus FindByLoginBonusId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMMainQuestChapterTable.cs b/src/Models/Tables/EntityMMainQuestChapterTable.cs new file mode 100644 index 0000000..7d91b7e --- /dev/null +++ b/src/Models/Tables/EntityMMainQuestChapterTable.cs @@ -0,0 +1,17 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMMainQuestChapterTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMMainQuestChapterTable(EntityMMainQuestChapter[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.MainQuestChapterId; + } + + public EntityMMainQuestChapter FindByMainQuestChapterId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); + + public bool TryFindByMainQuestChapterId(int key, out EntityMMainQuestChapter result) => TryFindUniqueCore(data, primaryIndexSelector, Comparer.Default, key, out result); +} diff --git a/src/Models/Tables/EntityMMainQuestPortalCageCharacterTable.cs b/src/Models/Tables/EntityMMainQuestPortalCageCharacterTable.cs new file mode 100644 index 0000000..2da32fb --- /dev/null +++ b/src/Models/Tables/EntityMMainQuestPortalCageCharacterTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMMainQuestPortalCageCharacterTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMMainQuestPortalCageCharacterTable(EntityMMainQuestPortalCageCharacter[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.QuestSceneId; + } +} diff --git a/src/Models/Tables/EntityMMainQuestRouteAnotherReplayFlowUnlockConditionTable.cs b/src/Models/Tables/EntityMMainQuestRouteAnotherReplayFlowUnlockConditionTable.cs new file mode 100644 index 0000000..c637363 --- /dev/null +++ b/src/Models/Tables/EntityMMainQuestRouteAnotherReplayFlowUnlockConditionTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMMainQuestRouteAnotherReplayFlowUnlockConditionTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMMainQuestRouteAnotherReplayFlowUnlockConditionTable(EntityMMainQuestRouteAnotherReplayFlowUnlockCondition[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.MainQuestRouteId; + } + + public bool TryFindByMainQuestRouteId(int key, out EntityMMainQuestRouteAnotherReplayFlowUnlockCondition result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer.Default, key, out result); +} diff --git a/src/Models/Tables/EntityMMainQuestRouteTable.cs b/src/Models/Tables/EntityMMainQuestRouteTable.cs new file mode 100644 index 0000000..faba44c --- /dev/null +++ b/src/Models/Tables/EntityMMainQuestRouteTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMMainQuestRouteTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMMainQuestRouteTable(EntityMMainQuestRoute[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.MainQuestRouteId; + } + + public EntityMMainQuestRoute FindByMainQuestRouteId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMMainQuestSeasonTable.cs b/src/Models/Tables/EntityMMainQuestSeasonTable.cs new file mode 100644 index 0000000..863d65a --- /dev/null +++ b/src/Models/Tables/EntityMMainQuestSeasonTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMMainQuestSeasonTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMMainQuestSeasonTable(EntityMMainQuestSeason[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.MainQuestSeasonId; + } + + public EntityMMainQuestSeason FindByMainQuestSeasonId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMMainQuestSequenceGroupTable.cs b/src/Models/Tables/EntityMMainQuestSequenceGroupTable.cs new file mode 100644 index 0000000..b640a67 --- /dev/null +++ b/src/Models/Tables/EntityMMainQuestSequenceGroupTable.cs @@ -0,0 +1,20 @@ +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Tables; + +public class EntityMMainQuestSequenceGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMMainQuestSequenceGroupTable(EntityMMainQuestSequenceGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.MainQuestSequenceGroupId, element.DifficultyType); + } + + public EntityMMainQuestSequenceGroup FindByMainQuestSequenceGroupIdAndDifficultyType(ValueTuple key) => + FindUniqueCore(data, primaryIndexSelector, Comparer<(int, DifficultyType)>.Default, key); + + public bool TryFindByMainQuestSequenceGroupIdAndDifficultyType(ValueTuple key, out EntityMMainQuestSequenceGroup result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer<(int, DifficultyType)>.Default, key, out result); +} diff --git a/src/Models/Tables/EntityMMainQuestSequenceTable.cs b/src/Models/Tables/EntityMMainQuestSequenceTable.cs new file mode 100644 index 0000000..20073ef --- /dev/null +++ b/src/Models/Tables/EntityMMainQuestSequenceTable.cs @@ -0,0 +1,19 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMMainQuestSequenceTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMMainQuestSequenceTable(EntityMMainQuestSequence[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.MainQuestSequenceId, element.SortOrder); + } + + public EntityMMainQuestSequence FindClosestByMainQuestSequenceIdAndSortOrder(ValueTuple key, bool selectLower = true) => + FindUniqueClosestCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, key, selectLower); + + public RangeView FindRangeByMainQuestSequenceIdAndSortOrder(ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityMMaintenanceGroupTable.cs b/src/Models/Tables/EntityMMaintenanceGroupTable.cs new file mode 100644 index 0000000..a8f3e89 --- /dev/null +++ b/src/Models/Tables/EntityMMaintenanceGroupTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMMaintenanceGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMMaintenanceGroupTable(EntityMMaintenanceGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.MaintenanceGroupId, element.ApiPath); + } +} diff --git a/src/Models/Tables/EntityMMaintenanceTable.cs b/src/Models/Tables/EntityMMaintenanceTable.cs new file mode 100644 index 0000000..10f17ca --- /dev/null +++ b/src/Models/Tables/EntityMMaintenanceTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMMaintenanceTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMMaintenanceTable(EntityMMaintenance[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.MaintenanceId; + } +} diff --git a/src/Models/Tables/EntityMMaterialSaleObtainPossessionTable.cs b/src/Models/Tables/EntityMMaterialSaleObtainPossessionTable.cs new file mode 100644 index 0000000..3fd6810 --- /dev/null +++ b/src/Models/Tables/EntityMMaterialSaleObtainPossessionTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMMaterialSaleObtainPossessionTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMMaterialSaleObtainPossessionTable(EntityMMaterialSaleObtainPossession[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.MaterialSaleObtainPossessionId, element.SortOrder); + } +} diff --git a/src/Models/Tables/EntityMMaterialTable.cs b/src/Models/Tables/EntityMMaterialTable.cs new file mode 100644 index 0000000..b4215f8 --- /dev/null +++ b/src/Models/Tables/EntityMMaterialTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMMaterialTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMMaterialTable(EntityMMaterial[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.MaterialId; + } + + public EntityMMaterial FindByMaterialId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMMissionClearConditionValueViewTable.cs b/src/Models/Tables/EntityMMissionClearConditionValueViewTable.cs new file mode 100644 index 0000000..46b86f5 --- /dev/null +++ b/src/Models/Tables/EntityMMissionClearConditionValueViewTable.cs @@ -0,0 +1,17 @@ +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Tables; + +public class EntityMMissionClearConditionValueViewTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMMissionClearConditionValueViewTable(EntityMMissionClearConditionValueView[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.MissionClearConditionType; + } + + public bool TryFindByMissionClearConditionType(MissionClearConditionType key, out EntityMMissionClearConditionValueView result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer.Default, key, out result); +} diff --git a/src/Models/Tables/EntityMMissionGroupTable.cs b/src/Models/Tables/EntityMMissionGroupTable.cs new file mode 100644 index 0000000..6108700 --- /dev/null +++ b/src/Models/Tables/EntityMMissionGroupTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMMissionGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMMissionGroupTable(EntityMMissionGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.MissionGroupId; + } + + public EntityMMissionGroup FindByMissionGroupId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMMissionLinkTable.cs b/src/Models/Tables/EntityMMissionLinkTable.cs new file mode 100644 index 0000000..17c8ef6 --- /dev/null +++ b/src/Models/Tables/EntityMMissionLinkTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMMissionLinkTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMMissionLinkTable(EntityMMissionLink[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.MissionLinkId; + } + + public EntityMMissionLink FindByMissionLinkId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMMissionPassLevelGroupTable.cs b/src/Models/Tables/EntityMMissionPassLevelGroupTable.cs new file mode 100644 index 0000000..0044bad --- /dev/null +++ b/src/Models/Tables/EntityMMissionPassLevelGroupTable.cs @@ -0,0 +1,27 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMMissionPassLevelGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + private readonly Func secondaryIndexSelector; + + public EntityMMissionPassLevelGroupTable(EntityMMissionPassLevelGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.MissionPassLevelGroupId, element.Level); + secondaryIndexSelector = element => element.MissionPassLevelGroupId; + } + + public EntityMMissionPassLevelGroup FindByMissionPassLevelGroupIdAndLevel(ValueTuple key) => + FindUniqueCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, key); + + public RangeView FindByMissionPassLevelGroupId(int key) + { + var result = data + .Where(x => x.MissionPassLevelGroupId == key) + .ToArray(); + + return new RangeView(result, 0, result.Length, true); + } +} diff --git a/src/Models/Tables/EntityMMissionPassMissionGroupTable.cs b/src/Models/Tables/EntityMMissionPassMissionGroupTable.cs new file mode 100644 index 0000000..a8ef22a --- /dev/null +++ b/src/Models/Tables/EntityMMissionPassMissionGroupTable.cs @@ -0,0 +1,17 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMMissionPassMissionGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + private readonly Func secondaryIndexSelector; + + public EntityMMissionPassMissionGroupTable(EntityMMissionPassMissionGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.MissionPassId, element.MissionGroupId); + secondaryIndexSelector = element => element.MissionPassId; + } + + public RangeView FindByMissionPassId(int key) => FindManyCore(data, secondaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMMissionPassRewardGroupTable.cs b/src/Models/Tables/EntityMMissionPassRewardGroupTable.cs new file mode 100644 index 0000000..1b06e44 --- /dev/null +++ b/src/Models/Tables/EntityMMissionPassRewardGroupTable.cs @@ -0,0 +1,17 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMMissionPassRewardGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + private readonly Func secondaryIndexSelector; + + public EntityMMissionPassRewardGroupTable(EntityMMissionPassRewardGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.MissionPassRewardGroupId, element.Level, element.IsPremium, element.SortOrder); + secondaryIndexSelector = element => element.MissionPassRewardGroupId; + } + + public RangeView FindByMissionPassRewardGroupId(int key) => FindManyCore(data, secondaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMMissionPassTable.cs b/src/Models/Tables/EntityMMissionPassTable.cs new file mode 100644 index 0000000..641d293 --- /dev/null +++ b/src/Models/Tables/EntityMMissionPassTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMMissionPassTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMMissionPassTable(EntityMMissionPass[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.MissionPassId; + } + + public EntityMMissionPass FindByMissionPassId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMMissionRewardTable.cs b/src/Models/Tables/EntityMMissionRewardTable.cs new file mode 100644 index 0000000..21f5e18 --- /dev/null +++ b/src/Models/Tables/EntityMMissionRewardTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMMissionRewardTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMMissionRewardTable(EntityMMissionReward[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.MissionRewardId; + } + + public EntityMMissionReward FindByMissionRewardId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMMissionSubCategoryTextTable.cs b/src/Models/Tables/EntityMMissionSubCategoryTextTable.cs new file mode 100644 index 0000000..f1bb85f --- /dev/null +++ b/src/Models/Tables/EntityMMissionSubCategoryTextTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMMissionSubCategoryTextTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMMissionSubCategoryTextTable(EntityMMissionSubCategoryText[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.MissionSubCategoryId; + } + + public EntityMMissionSubCategoryText FindByMissionSubCategoryId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMMissionTable.cs b/src/Models/Tables/EntityMMissionTable.cs new file mode 100644 index 0000000..e9d1298 --- /dev/null +++ b/src/Models/Tables/EntityMMissionTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMMissionTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMMissionTable(EntityMMission[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.MissionId; + } + + public EntityMMission FindByMissionId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMMissionTermTable.cs b/src/Models/Tables/EntityMMissionTermTable.cs new file mode 100644 index 0000000..e132239 --- /dev/null +++ b/src/Models/Tables/EntityMMissionTermTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMMissionTermTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMMissionTermTable(EntityMMissionTerm[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.MissionTermId; + } + + public EntityMMissionTerm FindByMissionTermId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMMissionUnlockConditionTable.cs b/src/Models/Tables/EntityMMissionUnlockConditionTable.cs new file mode 100644 index 0000000..e7a8e3a --- /dev/null +++ b/src/Models/Tables/EntityMMissionUnlockConditionTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMMissionUnlockConditionTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMMissionUnlockConditionTable(EntityMMissionUnlockCondition[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.MissionUnlockConditionId; + } + + public EntityMMissionUnlockCondition FindByMissionUnlockConditionId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMMomBannerTable.cs b/src/Models/Tables/EntityMMomBannerTable.cs new file mode 100644 index 0000000..ed1c074 --- /dev/null +++ b/src/Models/Tables/EntityMMomBannerTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMMomBannerTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMMomBannerTable(EntityMMomBanner[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.MomBannerId; + } +} diff --git a/src/Models/Tables/EntityMMomPointBannerTable.cs b/src/Models/Tables/EntityMMomPointBannerTable.cs new file mode 100644 index 0000000..836095f --- /dev/null +++ b/src/Models/Tables/EntityMMomPointBannerTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMMomPointBannerTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMMomPointBannerTable(EntityMMomPointBanner[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.MomPointBannerId; + } +} diff --git a/src/Models/Tables/EntityMMovieTable.cs b/src/Models/Tables/EntityMMovieTable.cs new file mode 100644 index 0000000..ca2259d --- /dev/null +++ b/src/Models/Tables/EntityMMovieTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMMovieTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMMovieTable(EntityMMovie[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.MovieId; + } + + public EntityMMovie FindByMovieId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMNaviCutInContentGroupTable.cs b/src/Models/Tables/EntityMNaviCutInContentGroupTable.cs new file mode 100644 index 0000000..f36eb14 --- /dev/null +++ b/src/Models/Tables/EntityMNaviCutInContentGroupTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMNaviCutInContentGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMNaviCutInContentGroupTable(EntityMNaviCutInContentGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.NaviCutInContentGroupId, element.ContentIndex); + } +} diff --git a/src/Models/Tables/EntityMNaviCutInTable.cs b/src/Models/Tables/EntityMNaviCutInTable.cs new file mode 100644 index 0000000..5a1911c --- /dev/null +++ b/src/Models/Tables/EntityMNaviCutInTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMNaviCutInTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMNaviCutInTable(EntityMNaviCutIn[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.NaviCutInId; + } +} diff --git a/src/Models/Tables/EntityMNaviCutInTextTable.cs b/src/Models/Tables/EntityMNaviCutInTextTable.cs new file mode 100644 index 0000000..ee364c2 --- /dev/null +++ b/src/Models/Tables/EntityMNaviCutInTextTable.cs @@ -0,0 +1,17 @@ +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Tables; + +public class EntityMNaviCutInTextTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMNaviCutInTextTable(EntityMNaviCutInText[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.NaviCutInTextId, element.LanguageType); + } + + public EntityMNaviCutInText FindByNaviCutInTextIdAndLanguageType(ValueTuple key) => + FindUniqueCore(data, primaryIndexSelector, Comparer<(int, LanguageType)>.Default, key); +} diff --git a/src/Models/Tables/EntityMNumericalFunctionParameterGroupTable.cs b/src/Models/Tables/EntityMNumericalFunctionParameterGroupTable.cs new file mode 100644 index 0000000..7dc0d0e --- /dev/null +++ b/src/Models/Tables/EntityMNumericalFunctionParameterGroupTable.cs @@ -0,0 +1,18 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMNumericalFunctionParameterGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + private readonly Func secondaryIndexSelector; + + public EntityMNumericalFunctionParameterGroupTable(EntityMNumericalFunctionParameterGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.NumericalFunctionParameterGroupId, element.ParameterIndex); + secondaryIndexSelector = element => element.NumericalFunctionParameterGroupId; + } + + public RangeView FindByNumericalFunctionParameterGroupId(int key) => + FindManyCore(data, secondaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMNumericalFunctionTable.cs b/src/Models/Tables/EntityMNumericalFunctionTable.cs new file mode 100644 index 0000000..1ae154b --- /dev/null +++ b/src/Models/Tables/EntityMNumericalFunctionTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMNumericalFunctionTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMNumericalFunctionTable(EntityMNumericalFunction[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.NumericalFunctionId; + } + + public EntityMNumericalFunction FindByNumericalFunctionId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMNumericalParameterMapTable.cs b/src/Models/Tables/EntityMNumericalParameterMapTable.cs new file mode 100644 index 0000000..08ff559 --- /dev/null +++ b/src/Models/Tables/EntityMNumericalParameterMapTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMNumericalParameterMapTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMNumericalParameterMapTable(EntityMNumericalParameterMap[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.NumericalParameterMapId, element.ParameterKey); + } + + public EntityMNumericalParameterMap FindByNumericalParameterMapIdAndParameterKey(ValueTuple key) => + FindUniqueCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, key); +} diff --git a/src/Models/Tables/EntityMOmikujiTable.cs b/src/Models/Tables/EntityMOmikujiTable.cs new file mode 100644 index 0000000..1e8c6f1 --- /dev/null +++ b/src/Models/Tables/EntityMOmikujiTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMOmikujiTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMOmikujiTable(EntityMOmikuji[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.OmikujiId; + } +} diff --git a/src/Models/Tables/EntityMOverrideHitEffectConditionCriticalTable.cs b/src/Models/Tables/EntityMOverrideHitEffectConditionCriticalTable.cs new file mode 100644 index 0000000..2cf680b --- /dev/null +++ b/src/Models/Tables/EntityMOverrideHitEffectConditionCriticalTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMOverrideHitEffectConditionCriticalTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMOverrideHitEffectConditionCriticalTable(EntityMOverrideHitEffectConditionCritical[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.OverrideHitEffectConditionId; + } + + public EntityMOverrideHitEffectConditionCritical FindByOverrideHitEffectConditionId(int key) => + FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMOverrideHitEffectConditionDamageAttributeTable.cs b/src/Models/Tables/EntityMOverrideHitEffectConditionDamageAttributeTable.cs new file mode 100644 index 0000000..6b3a40b --- /dev/null +++ b/src/Models/Tables/EntityMOverrideHitEffectConditionDamageAttributeTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMOverrideHitEffectConditionDamageAttributeTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMOverrideHitEffectConditionDamageAttributeTable(EntityMOverrideHitEffectConditionDamageAttribute[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.OverrideHitEffectConditionId; + } + + public EntityMOverrideHitEffectConditionDamageAttribute FindByOverrideHitEffectConditionId(int key) => + FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMOverrideHitEffectConditionGroupTable.cs b/src/Models/Tables/EntityMOverrideHitEffectConditionGroupTable.cs new file mode 100644 index 0000000..f79427a --- /dev/null +++ b/src/Models/Tables/EntityMOverrideHitEffectConditionGroupTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMOverrideHitEffectConditionGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMOverrideHitEffectConditionGroupTable(EntityMOverrideHitEffectConditionGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.OverrideHitEffectConditionGroupId, element.ConditionIndex); + } + + public RangeView FindRangeByOverrideHitEffectConditionGroupIdAndConditionIndex(ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityMOverrideHitEffectConditionSkillExecutorTable.cs b/src/Models/Tables/EntityMOverrideHitEffectConditionSkillExecutorTable.cs new file mode 100644 index 0000000..e67a660 --- /dev/null +++ b/src/Models/Tables/EntityMOverrideHitEffectConditionSkillExecutorTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMOverrideHitEffectConditionSkillExecutorTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMOverrideHitEffectConditionSkillExecutorTable(EntityMOverrideHitEffectConditionSkillExecutor[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.OverrideHitEffectConditionId; + } + + public EntityMOverrideHitEffectConditionSkillExecutor FindByOverrideHitEffectConditionId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMPartsEnhancedSubStatusTable.cs b/src/Models/Tables/EntityMPartsEnhancedSubStatusTable.cs new file mode 100644 index 0000000..bee9f60 --- /dev/null +++ b/src/Models/Tables/EntityMPartsEnhancedSubStatusTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMPartsEnhancedSubStatusTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMPartsEnhancedSubStatusTable(EntityMPartsEnhancedSubStatus[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.PartsEnhancedId, element.StatusIndex); + } +} diff --git a/src/Models/Tables/EntityMPartsEnhancedTable.cs b/src/Models/Tables/EntityMPartsEnhancedTable.cs new file mode 100644 index 0000000..a2a63ea --- /dev/null +++ b/src/Models/Tables/EntityMPartsEnhancedTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMPartsEnhancedTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMPartsEnhancedTable(EntityMPartsEnhanced[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.PartsEnhancedId; + } + + public bool TryFindByPartsEnhancedId(int key, out EntityMPartsEnhanced result) => TryFindUniqueCore(data, primaryIndexSelector, Comparer.Default, key, out result); +} diff --git a/src/Models/Tables/EntityMPartsGroupTable.cs b/src/Models/Tables/EntityMPartsGroupTable.cs new file mode 100644 index 0000000..6a7bf69 --- /dev/null +++ b/src/Models/Tables/EntityMPartsGroupTable.cs @@ -0,0 +1,17 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMPartsGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMPartsGroupTable(EntityMPartsGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.PartsGroupId; + } + + public EntityMPartsGroup FindByPartsGroupId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); + + public bool TryFindByPartsGroupId(int key, out EntityMPartsGroup result) => TryFindUniqueCore(data, primaryIndexSelector, Comparer.Default, key, out result); +} diff --git a/src/Models/Tables/EntityMPartsLevelUpPriceGroupTable.cs b/src/Models/Tables/EntityMPartsLevelUpPriceGroupTable.cs new file mode 100644 index 0000000..89c07a5 --- /dev/null +++ b/src/Models/Tables/EntityMPartsLevelUpPriceGroupTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMPartsLevelUpPriceGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMPartsLevelUpPriceGroupTable(EntityMPartsLevelUpPriceGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.PartsLevelUpPriceGroupId, element.LevelLowerLimit); + } + + public EntityMPartsLevelUpPriceGroup FindByPartsLevelUpPriceGroupIdAndLevelLowerLimit(ValueTuple key) => + FindUniqueCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, key); +} diff --git a/src/Models/Tables/EntityMPartsLevelUpRateGroupTable.cs b/src/Models/Tables/EntityMPartsLevelUpRateGroupTable.cs new file mode 100644 index 0000000..246e5ee --- /dev/null +++ b/src/Models/Tables/EntityMPartsLevelUpRateGroupTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMPartsLevelUpRateGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMPartsLevelUpRateGroupTable(EntityMPartsLevelUpRateGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.PartsLevelUpRateGroupId, element.LevelLowerLimit); + } + + public EntityMPartsLevelUpRateGroup FindByPartsLevelUpRateGroupIdAndLevelLowerLimit(ValueTuple key) => + FindUniqueCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, key); +} diff --git a/src/Models/Tables/EntityMPartsRarityTable.cs b/src/Models/Tables/EntityMPartsRarityTable.cs new file mode 100644 index 0000000..f969961 --- /dev/null +++ b/src/Models/Tables/EntityMPartsRarityTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Tables; + +public class EntityMPartsRarityTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMPartsRarityTable(EntityMPartsRarity[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.RarityType; + } + + public EntityMPartsRarity FindByRarityType(RarityType key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMPartsSeriesBonusAbilityGroupTable.cs b/src/Models/Tables/EntityMPartsSeriesBonusAbilityGroupTable.cs new file mode 100644 index 0000000..1914c11 --- /dev/null +++ b/src/Models/Tables/EntityMPartsSeriesBonusAbilityGroupTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMPartsSeriesBonusAbilityGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMPartsSeriesBonusAbilityGroupTable(EntityMPartsSeriesBonusAbilityGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.PartsSeriesBonusAbilityGroupId, element.SetCount, element.AbilityId); + } + + public RangeView FindRangeByPartsSeriesBonusAbilityGroupIdAndSetCountAndAbilityId(ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer<(int, int, int)>.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityMPartsSeriesTable.cs b/src/Models/Tables/EntityMPartsSeriesTable.cs new file mode 100644 index 0000000..cb49d13 --- /dev/null +++ b/src/Models/Tables/EntityMPartsSeriesTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMPartsSeriesTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMPartsSeriesTable(EntityMPartsSeries[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.PartsSeriesId; + } + + public EntityMPartsSeries FindByPartsSeriesId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMPartsStatusMainTable.cs b/src/Models/Tables/EntityMPartsStatusMainTable.cs new file mode 100644 index 0000000..bce3643 --- /dev/null +++ b/src/Models/Tables/EntityMPartsStatusMainTable.cs @@ -0,0 +1,17 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMPartsStatusMainTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMPartsStatusMainTable(EntityMPartsStatusMain[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.PartsStatusMainId; + } + + public EntityMPartsStatusMain FindByPartsStatusMainId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); + + public bool TryFindByPartsStatusMainId(int key, out EntityMPartsStatusMain result) => TryFindUniqueCore(data, primaryIndexSelector, Comparer.Default, key, out result); +} diff --git a/src/Models/Tables/EntityMPartsTable.cs b/src/Models/Tables/EntityMPartsTable.cs new file mode 100644 index 0000000..25e513d --- /dev/null +++ b/src/Models/Tables/EntityMPartsTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMPartsTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMPartsTable(EntityMParts[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.PartsId; + } + + public EntityMParts FindByPartsId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMPlatformPaymentPriceTable.cs b/src/Models/Tables/EntityMPlatformPaymentPriceTable.cs new file mode 100644 index 0000000..fdbcc98 --- /dev/null +++ b/src/Models/Tables/EntityMPlatformPaymentPriceTable.cs @@ -0,0 +1,17 @@ +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Tables; + +public class EntityMPlatformPaymentPriceTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMPlatformPaymentPriceTable(EntityMPlatformPaymentPrice[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.PlatformPaymentId, element.PlatformType); + } + + public EntityMPlatformPaymentPrice FindByPlatformPaymentIdAndPlatformType(ValueTuple key) => + FindUniqueCore(data, primaryIndexSelector, Comparer<(int, PlatformType)>.Default, key); +} diff --git a/src/Models/Tables/EntityMPlatformPaymentTable.cs b/src/Models/Tables/EntityMPlatformPaymentTable.cs new file mode 100644 index 0000000..b00739b --- /dev/null +++ b/src/Models/Tables/EntityMPlatformPaymentTable.cs @@ -0,0 +1,17 @@ +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Tables; + +public class EntityMPlatformPaymentTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMPlatformPaymentTable(EntityMPlatformPayment[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.PlatformPaymentId, element.PlatformType); + } + + public EntityMPlatformPayment FindByPlatformPaymentIdAndPlatformType(ValueTuple key) => + FindUniqueCore(data, primaryIndexSelector, Comparer<(int, PlatformType)>.Default, key); +} diff --git a/src/Models/Tables/EntityMPortalCageAccessPointFunctionGroupScheduleTable.cs b/src/Models/Tables/EntityMPortalCageAccessPointFunctionGroupScheduleTable.cs new file mode 100644 index 0000000..76f20f5 --- /dev/null +++ b/src/Models/Tables/EntityMPortalCageAccessPointFunctionGroupScheduleTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMPortalCageAccessPointFunctionGroupScheduleTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMPortalCageAccessPointFunctionGroupScheduleTable(EntityMPortalCageAccessPointFunctionGroupSchedule[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.PortalCageAccessPointFunctionGroupScheduleId, element.PriorityDesc); + } +} diff --git a/src/Models/Tables/EntityMPortalCageAccessPointFunctionGroupTable.cs b/src/Models/Tables/EntityMPortalCageAccessPointFunctionGroupTable.cs new file mode 100644 index 0000000..d81b6de --- /dev/null +++ b/src/Models/Tables/EntityMPortalCageAccessPointFunctionGroupTable.cs @@ -0,0 +1,19 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMPortalCageAccessPointFunctionGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMPortalCageAccessPointFunctionGroupTable(EntityMPortalCageAccessPointFunctionGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.AccessPointFunctionGroupId, element.AccessPointFunctionIndex); + } + + public EntityMPortalCageAccessPointFunctionGroup FindByAccessPointFunctionGroupIdAndAccessPointFunctionIndex(ValueTuple key) => + FindUniqueCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, key); + + public RangeView FindRangeByAccessPointFunctionGroupIdAndAccessPointFunctionIndex(ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityMPortalCageCharacterGroupTable.cs b/src/Models/Tables/EntityMPortalCageCharacterGroupTable.cs new file mode 100644 index 0000000..e75f3bf --- /dev/null +++ b/src/Models/Tables/EntityMPortalCageCharacterGroupTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMPortalCageCharacterGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMPortalCageCharacterGroupTable(EntityMPortalCageCharacterGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.PortalCageCharacterGroupId; + } + + public bool TryFindByPortalCageCharacterGroupId(int key, out EntityMPortalCageCharacterGroup result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer.Default, key, out result); +} diff --git a/src/Models/Tables/EntityMPortalCageGateTable.cs b/src/Models/Tables/EntityMPortalCageGateTable.cs new file mode 100644 index 0000000..8d395b4 --- /dev/null +++ b/src/Models/Tables/EntityMPortalCageGateTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMPortalCageGateTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMPortalCageGateTable(EntityMPortalCageGate[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.PortalCageGateId, element.GatePositionIndex); + } + + public EntityMPortalCageGate FindByPortalCageGateIdAndGatePositionIndex(ValueTuple key) => + FindUniqueCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, key); +} diff --git a/src/Models/Tables/EntityMPortalCageSceneTable.cs b/src/Models/Tables/EntityMPortalCageSceneTable.cs new file mode 100644 index 0000000..ade140f --- /dev/null +++ b/src/Models/Tables/EntityMPortalCageSceneTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMPortalCageSceneTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMPortalCageSceneTable(EntityMPortalCageScene[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.PortalCageSceneId; + } +} diff --git a/src/Models/Tables/EntityMPossessionAcquisitionRouteTable.cs b/src/Models/Tables/EntityMPossessionAcquisitionRouteTable.cs new file mode 100644 index 0000000..7e8cf16 --- /dev/null +++ b/src/Models/Tables/EntityMPossessionAcquisitionRouteTable.cs @@ -0,0 +1,17 @@ +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Tables; + +public class EntityMPossessionAcquisitionRouteTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMPossessionAcquisitionRouteTable(EntityMPossessionAcquisitionRoute[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.PossessionType, element.PossessionId, element.SortOrder); + } + + public RangeView FindRangeByPossessionTypeAndPossessionIdAndSortOrder(ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer<(PossessionType, int, int)>.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityMPowerCalculationConstantValueTable.cs b/src/Models/Tables/EntityMPowerCalculationConstantValueTable.cs new file mode 100644 index 0000000..ee4450c --- /dev/null +++ b/src/Models/Tables/EntityMPowerCalculationConstantValueTable.cs @@ -0,0 +1,14 @@ +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Tables; + +public class EntityMPowerCalculationConstantValueTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMPowerCalculationConstantValueTable(EntityMPowerCalculationConstantValue[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.PowerCalculationConstantValueType; + } +} diff --git a/src/Models/Tables/EntityMPowerReferenceStatusGroupTable.cs b/src/Models/Tables/EntityMPowerReferenceStatusGroupTable.cs new file mode 100644 index 0000000..62d3116 --- /dev/null +++ b/src/Models/Tables/EntityMPowerReferenceStatusGroupTable.cs @@ -0,0 +1,17 @@ +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Tables; + +public class EntityMPowerReferenceStatusGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMPowerReferenceStatusGroupTable(EntityMPowerReferenceStatusGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.PowerReferenceStatusGroupId, element.ReferenceStatusType); + } + + public RangeView FindRangeByPowerReferenceStatusGroupIdAndReferenceStatusType(ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer<(int, StatusKindType)>.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityMPremiumItemTable.cs b/src/Models/Tables/EntityMPremiumItemTable.cs new file mode 100644 index 0000000..933a909 --- /dev/null +++ b/src/Models/Tables/EntityMPremiumItemTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMPremiumItemTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMPremiumItemTable(EntityMPremiumItem[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.PremiumItemId; + } +} diff --git a/src/Models/Tables/EntityMPvpBackgroundTable.cs b/src/Models/Tables/EntityMPvpBackgroundTable.cs new file mode 100644 index 0000000..49df892 --- /dev/null +++ b/src/Models/Tables/EntityMPvpBackgroundTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMPvpBackgroundTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMPvpBackgroundTable(EntityMPvpBackground[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.AssetBackgroundId, element.BattleFieldLocaleSettingIndex, element.BattlePointIndex); + } +} diff --git a/src/Models/Tables/EntityMPvpGradeGroupTable.cs b/src/Models/Tables/EntityMPvpGradeGroupTable.cs new file mode 100644 index 0000000..176adeb --- /dev/null +++ b/src/Models/Tables/EntityMPvpGradeGroupTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMPvpGradeGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMPvpGradeGroupTable(EntityMPvpGradeGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.PvpGradeGroupId, element.PvpGradeId); + } + + public RangeView FindRangeByPvpGradeGroupIdAndPvpGradeId(ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityMPvpGradeOneMatchRewardGroupTable.cs b/src/Models/Tables/EntityMPvpGradeOneMatchRewardGroupTable.cs new file mode 100644 index 0000000..e7c3058 --- /dev/null +++ b/src/Models/Tables/EntityMPvpGradeOneMatchRewardGroupTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMPvpGradeOneMatchRewardGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMPvpGradeOneMatchRewardGroupTable(EntityMPvpGradeOneMatchRewardGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.PvpGradeOneMatchRewardGroupId, element.PvpGradeOneMatchRewardId); + } +} diff --git a/src/Models/Tables/EntityMPvpGradeOneMatchRewardTable.cs b/src/Models/Tables/EntityMPvpGradeOneMatchRewardTable.cs new file mode 100644 index 0000000..d48bdf3 --- /dev/null +++ b/src/Models/Tables/EntityMPvpGradeOneMatchRewardTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMPvpGradeOneMatchRewardTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMPvpGradeOneMatchRewardTable(EntityMPvpGradeOneMatchReward[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.PvpGradeOneMatchRewardId, element.PvpRewardId); + } +} diff --git a/src/Models/Tables/EntityMPvpGradeTable.cs b/src/Models/Tables/EntityMPvpGradeTable.cs new file mode 100644 index 0000000..a1e477a --- /dev/null +++ b/src/Models/Tables/EntityMPvpGradeTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMPvpGradeTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMPvpGradeTable(EntityMPvpGrade[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.PvpGradeId; + } +} diff --git a/src/Models/Tables/EntityMPvpGradeWeeklyRewardGroupTable.cs b/src/Models/Tables/EntityMPvpGradeWeeklyRewardGroupTable.cs new file mode 100644 index 0000000..9f2d98a --- /dev/null +++ b/src/Models/Tables/EntityMPvpGradeWeeklyRewardGroupTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMPvpGradeWeeklyRewardGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMPvpGradeWeeklyRewardGroupTable(EntityMPvpGradeWeeklyRewardGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.PvpGradeWeeklyRewardGroupId, element.PvpRewardId); + } +} diff --git a/src/Models/Tables/EntityMPvpRewardTable.cs b/src/Models/Tables/EntityMPvpRewardTable.cs new file mode 100644 index 0000000..c9635e7 --- /dev/null +++ b/src/Models/Tables/EntityMPvpRewardTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMPvpRewardTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMPvpRewardTable(EntityMPvpReward[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.PvpRewardId; + } + + public EntityMPvpReward FindByPvpRewardId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMPvpSeasonGradeTable.cs b/src/Models/Tables/EntityMPvpSeasonGradeTable.cs new file mode 100644 index 0000000..23883c5 --- /dev/null +++ b/src/Models/Tables/EntityMPvpSeasonGradeTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMPvpSeasonGradeTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMPvpSeasonGradeTable(EntityMPvpSeasonGrade[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.PvpGradeId, element.PvpSeasonId); + } +} diff --git a/src/Models/Tables/EntityMPvpSeasonGroupingTable.cs b/src/Models/Tables/EntityMPvpSeasonGroupingTable.cs new file mode 100644 index 0000000..f1f23bc --- /dev/null +++ b/src/Models/Tables/EntityMPvpSeasonGroupingTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMPvpSeasonGroupingTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMPvpSeasonGroupingTable(EntityMPvpSeasonGrouping[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.PvpSeasonGroupingId, element.GroupId); + } +} diff --git a/src/Models/Tables/EntityMPvpSeasonRankRewardGroupTable.cs b/src/Models/Tables/EntityMPvpSeasonRankRewardGroupTable.cs new file mode 100644 index 0000000..bfda49e --- /dev/null +++ b/src/Models/Tables/EntityMPvpSeasonRankRewardGroupTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMPvpSeasonRankRewardGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMPvpSeasonRankRewardGroupTable(EntityMPvpSeasonRankRewardGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.PvpSeasonRankRewardGroupId, element.PvpRewardId); + } + + public RangeView FindRangeByPvpSeasonRankRewardGroupIdAndPvpRewardId(ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityMPvpSeasonRankRewardPerSeasonTable.cs b/src/Models/Tables/EntityMPvpSeasonRankRewardPerSeasonTable.cs new file mode 100644 index 0000000..23ca61a --- /dev/null +++ b/src/Models/Tables/EntityMPvpSeasonRankRewardPerSeasonTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMPvpSeasonRankRewardPerSeasonTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMPvpSeasonRankRewardPerSeasonTable(EntityMPvpSeasonRankRewardPerSeason[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.RankLowerLimit, element.PvpSeasonId); + } +} diff --git a/src/Models/Tables/EntityMPvpSeasonRankRewardRankGroupTable.cs b/src/Models/Tables/EntityMPvpSeasonRankRewardRankGroupTable.cs new file mode 100644 index 0000000..3326151 --- /dev/null +++ b/src/Models/Tables/EntityMPvpSeasonRankRewardRankGroupTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMPvpSeasonRankRewardRankGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMPvpSeasonRankRewardRankGroupTable(EntityMPvpSeasonRankRewardRankGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.PvpSeasonRankRewardRankGroupId, element.RankLowerLimit); + } + + public RangeView FindRangeByPvpSeasonRankRewardRankGroupIdAndRankLowerLimit(ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityMPvpSeasonRankRewardTable.cs b/src/Models/Tables/EntityMPvpSeasonRankRewardTable.cs new file mode 100644 index 0000000..6a51f6e --- /dev/null +++ b/src/Models/Tables/EntityMPvpSeasonRankRewardTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMPvpSeasonRankRewardTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMPvpSeasonRankRewardTable(EntityMPvpSeasonRankReward[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.RankLowerLimit; + } +} diff --git a/src/Models/Tables/EntityMPvpSeasonTable.cs b/src/Models/Tables/EntityMPvpSeasonTable.cs new file mode 100644 index 0000000..9369abb --- /dev/null +++ b/src/Models/Tables/EntityMPvpSeasonTable.cs @@ -0,0 +1,17 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMPvpSeasonTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMPvpSeasonTable(EntityMPvpSeason[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.PvpSeasonId; + } + + public EntityMPvpSeason FindByPvpSeasonId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); + + public bool TryFindByPvpSeasonId(int key, out EntityMPvpSeason result) => TryFindUniqueCore(data, primaryIndexSelector, Comparer.Default, key, out result); +} diff --git a/src/Models/Tables/EntityMPvpWeeklyRankRewardGroupTable.cs b/src/Models/Tables/EntityMPvpWeeklyRankRewardGroupTable.cs new file mode 100644 index 0000000..aa29b29 --- /dev/null +++ b/src/Models/Tables/EntityMPvpWeeklyRankRewardGroupTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMPvpWeeklyRankRewardGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMPvpWeeklyRankRewardGroupTable(EntityMPvpWeeklyRankRewardGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.PvpWeeklyRankRewardGroupId, element.PvpRewardId); + } + + public RangeView FindRangeByPvpWeeklyRankRewardGroupIdAndPvpRewardId(ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityMPvpWeeklyRankRewardRankGroupTable.cs b/src/Models/Tables/EntityMPvpWeeklyRankRewardRankGroupTable.cs new file mode 100644 index 0000000..48c5cb5 --- /dev/null +++ b/src/Models/Tables/EntityMPvpWeeklyRankRewardRankGroupTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMPvpWeeklyRankRewardRankGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMPvpWeeklyRankRewardRankGroupTable(EntityMPvpWeeklyRankRewardRankGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.PvpWeeklyRankRewardRankGroupId, element.RankLowerLimit); + } + + public RangeView FindRangeByPvpWeeklyRankRewardRankGroupIdAndRankLowerLimit(ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityMPvpWinStreakCountEffectTable.cs b/src/Models/Tables/EntityMPvpWinStreakCountEffectTable.cs new file mode 100644 index 0000000..fcacc05 --- /dev/null +++ b/src/Models/Tables/EntityMPvpWinStreakCountEffectTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMPvpWinStreakCountEffectTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMPvpWinStreakCountEffectTable(EntityMPvpWinStreakCountEffect[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.WinStreakCount; + } + + public EntityMPvpWinStreakCountEffect FindClosestByWinStreakCount(int key, bool selectLower = true) => + FindUniqueClosestCore(data, primaryIndexSelector, Comparer.Default, key, selectLower); +} diff --git a/src/Models/Tables/EntityMQuestBonusAbilityTable.cs b/src/Models/Tables/EntityMQuestBonusAbilityTable.cs new file mode 100644 index 0000000..139ae0b --- /dev/null +++ b/src/Models/Tables/EntityMQuestBonusAbilityTable.cs @@ -0,0 +1,17 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMQuestBonusAbilityTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMQuestBonusAbilityTable(EntityMQuestBonusAbility[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.QuestBonusEffectId; + } + + public EntityMQuestBonusAbility FindByQuestBonusEffectId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); + + public bool TryFindByQuestBonusEffectId(int key, out EntityMQuestBonusAbility result) => TryFindUniqueCore(data, primaryIndexSelector, Comparer.Default, key, out result); +} diff --git a/src/Models/Tables/EntityMQuestBonusAllyCharacterTable.cs b/src/Models/Tables/EntityMQuestBonusAllyCharacterTable.cs new file mode 100644 index 0000000..a17a292 --- /dev/null +++ b/src/Models/Tables/EntityMQuestBonusAllyCharacterTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMQuestBonusAllyCharacterTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMQuestBonusAllyCharacterTable(EntityMQuestBonusAllyCharacter[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.QuestBonusAllyCharacterId; + } + + public bool TryFindByQuestBonusAllyCharacterId(int key, out EntityMQuestBonusAllyCharacter result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer.Default, key, out result); +} diff --git a/src/Models/Tables/EntityMQuestBonusCharacterGroupTable.cs b/src/Models/Tables/EntityMQuestBonusCharacterGroupTable.cs new file mode 100644 index 0000000..ff2d837 --- /dev/null +++ b/src/Models/Tables/EntityMQuestBonusCharacterGroupTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMQuestBonusCharacterGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMQuestBonusCharacterGroupTable(EntityMQuestBonusCharacterGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.QuestBonusCharacterGroupId, element.CharacterId); + } + + public RangeView FindRangeByQuestBonusCharacterGroupIdAndCharacterId(ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityMQuestBonusCostumeGroupTable.cs b/src/Models/Tables/EntityMQuestBonusCostumeGroupTable.cs new file mode 100644 index 0000000..fdc4387 --- /dev/null +++ b/src/Models/Tables/EntityMQuestBonusCostumeGroupTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMQuestBonusCostumeGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMQuestBonusCostumeGroupTable(EntityMQuestBonusCostumeGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.QuestBonusCostumeGroupId, element.CostumeId); + } +} diff --git a/src/Models/Tables/EntityMQuestBonusCostumeSettingGroupTable.cs b/src/Models/Tables/EntityMQuestBonusCostumeSettingGroupTable.cs new file mode 100644 index 0000000..a25646f --- /dev/null +++ b/src/Models/Tables/EntityMQuestBonusCostumeSettingGroupTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMQuestBonusCostumeSettingGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMQuestBonusCostumeSettingGroupTable(EntityMQuestBonusCostumeSettingGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.QuestBonusCostumeSettingGroupId, element.CostumeId, element.LimitBreakCountLowerLimit); + } + + public RangeView FindRangeByQuestBonusCostumeSettingGroupIdAndCostumeIdAndLimitBreakCountLowerLimit(ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer<(int, int, int)>.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityMQuestBonusDropRewardTable.cs b/src/Models/Tables/EntityMQuestBonusDropRewardTable.cs new file mode 100644 index 0000000..432dc67 --- /dev/null +++ b/src/Models/Tables/EntityMQuestBonusDropRewardTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMQuestBonusDropRewardTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMQuestBonusDropRewardTable(EntityMQuestBonusDropReward[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.QuestBonusEffectId; + } + + public EntityMQuestBonusDropReward FindByQuestBonusEffectId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMQuestBonusEffectGroupTable.cs b/src/Models/Tables/EntityMQuestBonusEffectGroupTable.cs new file mode 100644 index 0000000..c57c17e --- /dev/null +++ b/src/Models/Tables/EntityMQuestBonusEffectGroupTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMQuestBonusEffectGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMQuestBonusEffectGroupTable(EntityMQuestBonusEffectGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.QuestBonusEffectGroupId, element.SortOrder); + } + + public RangeView FindRangeByQuestBonusEffectGroupIdAndSortOrder(ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityMQuestBonusExpTable.cs b/src/Models/Tables/EntityMQuestBonusExpTable.cs new file mode 100644 index 0000000..db47ee1 --- /dev/null +++ b/src/Models/Tables/EntityMQuestBonusExpTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMQuestBonusExpTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMQuestBonusExpTable(EntityMQuestBonusExp[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.QuestBonusEffectId; + } + + public EntityMQuestBonusExp FindByQuestBonusEffectId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMQuestBonusTable.cs b/src/Models/Tables/EntityMQuestBonusTable.cs new file mode 100644 index 0000000..9255106 --- /dev/null +++ b/src/Models/Tables/EntityMQuestBonusTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMQuestBonusTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMQuestBonusTable(EntityMQuestBonus[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.QuestBonusId; + } + + public EntityMQuestBonus FindByQuestBonusId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMQuestBonusTermGroupTable.cs b/src/Models/Tables/EntityMQuestBonusTermGroupTable.cs new file mode 100644 index 0000000..2ecad31 --- /dev/null +++ b/src/Models/Tables/EntityMQuestBonusTermGroupTable.cs @@ -0,0 +1,17 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMQuestBonusTermGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + private readonly Func secondaryIndexSelector; + + public EntityMQuestBonusTermGroupTable(EntityMQuestBonusTermGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.QuestBonusTermGroupId, element.SortOrder); + secondaryIndexSelector = element => element.QuestBonusTermGroupId; + } + + public RangeView FindByQuestBonusTermGroupId(int key) => FindManyCore(data, secondaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMQuestBonusWeaponGroupTable.cs b/src/Models/Tables/EntityMQuestBonusWeaponGroupTable.cs new file mode 100644 index 0000000..0ecab3a --- /dev/null +++ b/src/Models/Tables/EntityMQuestBonusWeaponGroupTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMQuestBonusWeaponGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMQuestBonusWeaponGroupTable(EntityMQuestBonusWeaponGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.QuestBonusWeaponGroupId, element.WeaponId, element.LimitBreakCountLowerLimit); + } + + public RangeView FindRangeByQuestBonusWeaponGroupIdAndWeaponIdAndLimitBreakCountLowerLimit(ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer<(int, int, int)>.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityMQuestCampaignEffectGroupTable.cs b/src/Models/Tables/EntityMQuestCampaignEffectGroupTable.cs new file mode 100644 index 0000000..2d225c6 --- /dev/null +++ b/src/Models/Tables/EntityMQuestCampaignEffectGroupTable.cs @@ -0,0 +1,17 @@ +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Tables; + +public class EntityMQuestCampaignEffectGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMQuestCampaignEffectGroupTable(EntityMQuestCampaignEffectGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.QuestCampaignEffectGroupId, element.QuestCampaignEffectType); + } + + public RangeView FindRangeByQuestCampaignEffectGroupIdAndQuestCampaignEffectType(ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer<(int, QuestCampaignEffectType)>.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityMQuestCampaignTable.cs b/src/Models/Tables/EntityMQuestCampaignTable.cs new file mode 100644 index 0000000..71ebfc6 --- /dev/null +++ b/src/Models/Tables/EntityMQuestCampaignTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMQuestCampaignTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMQuestCampaignTable(EntityMQuestCampaign[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.QuestCampaignId; + } +} diff --git a/src/Models/Tables/EntityMQuestCampaignTargetGroupTable.cs b/src/Models/Tables/EntityMQuestCampaignTargetGroupTable.cs new file mode 100644 index 0000000..703b10d --- /dev/null +++ b/src/Models/Tables/EntityMQuestCampaignTargetGroupTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMQuestCampaignTargetGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMQuestCampaignTargetGroupTable(EntityMQuestCampaignTargetGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.QuestCampaignTargetGroupId, element.QuestCampaignTargetIndex); + } + + public RangeView FindRangeByQuestCampaignTargetGroupIdAndQuestCampaignTargetIndex(ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityMQuestCampaignTargetItemGroupTable.cs b/src/Models/Tables/EntityMQuestCampaignTargetItemGroupTable.cs new file mode 100644 index 0000000..219d460 --- /dev/null +++ b/src/Models/Tables/EntityMQuestCampaignTargetItemGroupTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMQuestCampaignTargetItemGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMQuestCampaignTargetItemGroupTable(EntityMQuestCampaignTargetItemGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.QuestCampaignTargetItemGroupId, element.TargetIndex); + } +} diff --git a/src/Models/Tables/EntityMQuestDeckMultiRestrictionGroupTable.cs b/src/Models/Tables/EntityMQuestDeckMultiRestrictionGroupTable.cs new file mode 100644 index 0000000..b57e917 --- /dev/null +++ b/src/Models/Tables/EntityMQuestDeckMultiRestrictionGroupTable.cs @@ -0,0 +1,17 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMQuestDeckMultiRestrictionGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + private readonly Func secondaryIndexSelector; + + public EntityMQuestDeckMultiRestrictionGroupTable(EntityMQuestDeckMultiRestrictionGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.QuestDeckMultiRestrictionGroupId, element.GroupIndex); + secondaryIndexSelector = element => (element.QuestDeckMultiRestrictionGroupId); + } + + public RangeView FindByQuestDeckMultiRestrictionGroupId(int key) => FindManyCore(data, secondaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMQuestDeckRestrictionGroupTable.cs b/src/Models/Tables/EntityMQuestDeckRestrictionGroupTable.cs new file mode 100644 index 0000000..f40032c --- /dev/null +++ b/src/Models/Tables/EntityMQuestDeckRestrictionGroupTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMQuestDeckRestrictionGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMQuestDeckRestrictionGroupTable(EntityMQuestDeckRestrictionGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.QuestDeckRestrictionGroupId, element.SlotNumber); + } + + public RangeView FindRangeByQuestDeckRestrictionGroupIdAndSlotNumber(ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityMQuestDeckRestrictionGroupUnlockTable.cs b/src/Models/Tables/EntityMQuestDeckRestrictionGroupUnlockTable.cs new file mode 100644 index 0000000..78b6d03 --- /dev/null +++ b/src/Models/Tables/EntityMQuestDeckRestrictionGroupUnlockTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMQuestDeckRestrictionGroupUnlockTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMQuestDeckRestrictionGroupUnlockTable(EntityMQuestDeckRestrictionGroupUnlock[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.QuestDeckRestrictionGroupId; + } + + public EntityMQuestDeckRestrictionGroupUnlock FindByQuestDeckRestrictionGroupId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMQuestDisplayAttributeGroupTable.cs b/src/Models/Tables/EntityMQuestDisplayAttributeGroupTable.cs new file mode 100644 index 0000000..11de3e8 --- /dev/null +++ b/src/Models/Tables/EntityMQuestDisplayAttributeGroupTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMQuestDisplayAttributeGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMQuestDisplayAttributeGroupTable(EntityMQuestDisplayAttributeGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.QuestDisplayAttributeGroupId, element.SortOrder); + } +} diff --git a/src/Models/Tables/EntityMQuestDisplayEnemyThumbnailReplaceTable.cs b/src/Models/Tables/EntityMQuestDisplayEnemyThumbnailReplaceTable.cs new file mode 100644 index 0000000..81675f1 --- /dev/null +++ b/src/Models/Tables/EntityMQuestDisplayEnemyThumbnailReplaceTable.cs @@ -0,0 +1,17 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMQuestDisplayEnemyThumbnailReplaceTable : TableBase +{ + private readonly Func primaryIndexSelector; + private readonly Func secondaryIndexSelector; + + public EntityMQuestDisplayEnemyThumbnailReplaceTable(EntityMQuestDisplayEnemyThumbnailReplace[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.QuestId, element.Priority); + secondaryIndexSelector = element => element.QuestId; + } + + public RangeView FindByQuestId(int key) => FindManyCore(data, secondaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMQuestFirstClearRewardGroupTable.cs b/src/Models/Tables/EntityMQuestFirstClearRewardGroupTable.cs new file mode 100644 index 0000000..dbdbafa --- /dev/null +++ b/src/Models/Tables/EntityMQuestFirstClearRewardGroupTable.cs @@ -0,0 +1,22 @@ +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Tables; + +public class EntityMQuestFirstClearRewardGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + private readonly Func secondaryIndexSelector; + + public EntityMQuestFirstClearRewardGroupTable(EntityMQuestFirstClearRewardGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.QuestFirstClearRewardGroupId, element.QuestFirstClearRewardType, element.SortOrder); + secondaryIndexSelector = element => (element.QuestFirstClearRewardGroupId, element.QuestFirstClearRewardType); + } + + public RangeView FindRangeByQuestFirstClearRewardGroupIdAndQuestFirstClearRewardTypeAndSortOrder(ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer<(int, QuestFirstClearRewardType, int)>.Default, min, max, ascendant); + + public RangeView FindByQuestFirstClearRewardGroupIdAndQuestFirstClearRewardType(ValueTuple key) => + FindManyCore(data, secondaryIndexSelector, Comparer<(int, QuestFirstClearRewardType)>.Default, key); +} diff --git a/src/Models/Tables/EntityMQuestFirstClearRewardSwitchTable.cs b/src/Models/Tables/EntityMQuestFirstClearRewardSwitchTable.cs new file mode 100644 index 0000000..6c273bd --- /dev/null +++ b/src/Models/Tables/EntityMQuestFirstClearRewardSwitchTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMQuestFirstClearRewardSwitchTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMQuestFirstClearRewardSwitchTable(EntityMQuestFirstClearRewardSwitch[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.QuestId; + } + + public bool TryFindByQuestId(int key, out EntityMQuestFirstClearRewardSwitch result) => TryFindUniqueCore(data, primaryIndexSelector, Comparer.Default, key, out result); +} diff --git a/src/Models/Tables/EntityMQuestMissionConditionValueGroupTable.cs b/src/Models/Tables/EntityMQuestMissionConditionValueGroupTable.cs new file mode 100644 index 0000000..8f77bf1 --- /dev/null +++ b/src/Models/Tables/EntityMQuestMissionConditionValueGroupTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMQuestMissionConditionValueGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMQuestMissionConditionValueGroupTable(EntityMQuestMissionConditionValueGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.QuestMissionConditionValueGroupId, element.SortOrder); + } + + public RangeView FindRangeByQuestMissionConditionValueGroupIdAndSortOrder(ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityMQuestMissionGroupTable.cs b/src/Models/Tables/EntityMQuestMissionGroupTable.cs new file mode 100644 index 0000000..ed0b9ca --- /dev/null +++ b/src/Models/Tables/EntityMQuestMissionGroupTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMQuestMissionGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMQuestMissionGroupTable(EntityMQuestMissionGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.QuestMissionGroupId, element.SortOrder); + } + + public RangeView FindRangeByQuestMissionGroupIdAndSortOrder(ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityMQuestMissionRewardTable.cs b/src/Models/Tables/EntityMQuestMissionRewardTable.cs new file mode 100644 index 0000000..dc2bd5b --- /dev/null +++ b/src/Models/Tables/EntityMQuestMissionRewardTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMQuestMissionRewardTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMQuestMissionRewardTable(EntityMQuestMissionReward[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.QuestMissionRewardId; + } +} diff --git a/src/Models/Tables/EntityMQuestMissionTable.cs b/src/Models/Tables/EntityMQuestMissionTable.cs new file mode 100644 index 0000000..46c8498 --- /dev/null +++ b/src/Models/Tables/EntityMQuestMissionTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMQuestMissionTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMQuestMissionTable(EntityMQuestMission[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.QuestMissionId; + } + + public EntityMQuestMission FindByQuestMissionId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMQuestPickupRewardGroupTable.cs b/src/Models/Tables/EntityMQuestPickupRewardGroupTable.cs new file mode 100644 index 0000000..3032598 --- /dev/null +++ b/src/Models/Tables/EntityMQuestPickupRewardGroupTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMQuestPickupRewardGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMQuestPickupRewardGroupTable(EntityMQuestPickupRewardGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.QuestPickupRewardGroupId, element.SortOrder); + } +} diff --git a/src/Models/Tables/EntityMQuestRelationMainFlowTable.cs b/src/Models/Tables/EntityMQuestRelationMainFlowTable.cs new file mode 100644 index 0000000..275bef9 --- /dev/null +++ b/src/Models/Tables/EntityMQuestRelationMainFlowTable.cs @@ -0,0 +1,20 @@ +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Tables; + +public class EntityMQuestRelationMainFlowTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMQuestRelationMainFlowTable(EntityMQuestRelationMainFlow[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.MainFlowQuestId, element.DifficultyType); + } + + public bool TryFindByMainFlowQuestIdAndDifficultyType(ValueTuple key, out EntityMQuestRelationMainFlow result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer<(int, DifficultyType)>.Default, key, out result); + + public RangeView FindRangeByMainFlowQuestIdAndDifficultyType(ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer<(int, DifficultyType)>.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityMQuestReleaseConditionBigHuntScoreTable.cs b/src/Models/Tables/EntityMQuestReleaseConditionBigHuntScoreTable.cs new file mode 100644 index 0000000..bd12512 --- /dev/null +++ b/src/Models/Tables/EntityMQuestReleaseConditionBigHuntScoreTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMQuestReleaseConditionBigHuntScoreTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMQuestReleaseConditionBigHuntScoreTable(EntityMQuestReleaseConditionBigHuntScore[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.QuestReleaseConditionId; + } + + public EntityMQuestReleaseConditionBigHuntScore FindByQuestReleaseConditionId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMQuestReleaseConditionCharacterLevelTable.cs b/src/Models/Tables/EntityMQuestReleaseConditionCharacterLevelTable.cs new file mode 100644 index 0000000..0634bbd --- /dev/null +++ b/src/Models/Tables/EntityMQuestReleaseConditionCharacterLevelTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMQuestReleaseConditionCharacterLevelTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMQuestReleaseConditionCharacterLevelTable(EntityMQuestReleaseConditionCharacterLevel[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.QuestReleaseConditionId; + } + + public EntityMQuestReleaseConditionCharacterLevel FindByQuestReleaseConditionId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMQuestReleaseConditionDeckPowerTable.cs b/src/Models/Tables/EntityMQuestReleaseConditionDeckPowerTable.cs new file mode 100644 index 0000000..136eda5 --- /dev/null +++ b/src/Models/Tables/EntityMQuestReleaseConditionDeckPowerTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMQuestReleaseConditionDeckPowerTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMQuestReleaseConditionDeckPowerTable(EntityMQuestReleaseConditionDeckPower[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.QuestReleaseConditionId; + } + + public EntityMQuestReleaseConditionDeckPower FindByQuestReleaseConditionId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMQuestReleaseConditionGroupTable.cs b/src/Models/Tables/EntityMQuestReleaseConditionGroupTable.cs new file mode 100644 index 0000000..847d4bc --- /dev/null +++ b/src/Models/Tables/EntityMQuestReleaseConditionGroupTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMQuestReleaseConditionGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMQuestReleaseConditionGroupTable(EntityMQuestReleaseConditionGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.QuestReleaseConditionGroupId, element.SortOrder); + } + + public RangeView FindRangeByQuestReleaseConditionGroupIdAndSortOrder(ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityMQuestReleaseConditionListTable.cs b/src/Models/Tables/EntityMQuestReleaseConditionListTable.cs new file mode 100644 index 0000000..0c0b923 --- /dev/null +++ b/src/Models/Tables/EntityMQuestReleaseConditionListTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMQuestReleaseConditionListTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMQuestReleaseConditionListTable(EntityMQuestReleaseConditionList[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.QuestReleaseConditionListId; + } + + public EntityMQuestReleaseConditionList FindByQuestReleaseConditionListId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMQuestReleaseConditionQuestChallengeTable.cs b/src/Models/Tables/EntityMQuestReleaseConditionQuestChallengeTable.cs new file mode 100644 index 0000000..9fa05ca --- /dev/null +++ b/src/Models/Tables/EntityMQuestReleaseConditionQuestChallengeTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMQuestReleaseConditionQuestChallengeTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMQuestReleaseConditionQuestChallengeTable(EntityMQuestReleaseConditionQuestChallenge[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.QuestReleaseConditionId; + } + + public EntityMQuestReleaseConditionQuestChallenge FindByQuestReleaseConditionId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMQuestReleaseConditionQuestClearTable.cs b/src/Models/Tables/EntityMQuestReleaseConditionQuestClearTable.cs new file mode 100644 index 0000000..5d5df2e --- /dev/null +++ b/src/Models/Tables/EntityMQuestReleaseConditionQuestClearTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMQuestReleaseConditionQuestClearTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMQuestReleaseConditionQuestClearTable(EntityMQuestReleaseConditionQuestClear[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.QuestReleaseConditionId; + } + + public EntityMQuestReleaseConditionQuestClear FindByQuestReleaseConditionId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMQuestReleaseConditionUserLevelTable.cs b/src/Models/Tables/EntityMQuestReleaseConditionUserLevelTable.cs new file mode 100644 index 0000000..0b17c2b --- /dev/null +++ b/src/Models/Tables/EntityMQuestReleaseConditionUserLevelTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMQuestReleaseConditionUserLevelTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMQuestReleaseConditionUserLevelTable(EntityMQuestReleaseConditionUserLevel[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.QuestReleaseConditionId; + } + + public EntityMQuestReleaseConditionUserLevel FindByQuestReleaseConditionId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMQuestReleaseConditionWeaponAcquisitionTable.cs b/src/Models/Tables/EntityMQuestReleaseConditionWeaponAcquisitionTable.cs new file mode 100644 index 0000000..0d2bbb6 --- /dev/null +++ b/src/Models/Tables/EntityMQuestReleaseConditionWeaponAcquisitionTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMQuestReleaseConditionWeaponAcquisitionTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMQuestReleaseConditionWeaponAcquisitionTable(EntityMQuestReleaseConditionWeaponAcquisition[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.QuestReleaseConditionId; + } + + public EntityMQuestReleaseConditionWeaponAcquisition FindByQuestReleaseConditionId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMQuestReplayFlowRewardGroupTable.cs b/src/Models/Tables/EntityMQuestReplayFlowRewardGroupTable.cs new file mode 100644 index 0000000..eb2566e --- /dev/null +++ b/src/Models/Tables/EntityMQuestReplayFlowRewardGroupTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMQuestReplayFlowRewardGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMQuestReplayFlowRewardGroupTable(EntityMQuestReplayFlowRewardGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.QuestReplayFlowRewardGroupId, element.SortOrder); + } + + public RangeView FindRangeByQuestReplayFlowRewardGroupIdAndSortOrder(ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityMQuestSceneBattleTable.cs b/src/Models/Tables/EntityMQuestSceneBattleTable.cs new file mode 100644 index 0000000..11e1255 --- /dev/null +++ b/src/Models/Tables/EntityMQuestSceneBattleTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMQuestSceneBattleTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMQuestSceneBattleTable(EntityMQuestSceneBattle[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.QuestSceneId; + } + + public EntityMQuestSceneBattle FindByQuestSceneId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMQuestSceneChoiceCostumeEffectGroupTable.cs b/src/Models/Tables/EntityMQuestSceneChoiceCostumeEffectGroupTable.cs new file mode 100644 index 0000000..7b8507c --- /dev/null +++ b/src/Models/Tables/EntityMQuestSceneChoiceCostumeEffectGroupTable.cs @@ -0,0 +1,17 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMQuestSceneChoiceCostumeEffectGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + private readonly Func secondaryIndexSelector; + + public EntityMQuestSceneChoiceCostumeEffectGroupTable(EntityMQuestSceneChoiceCostumeEffectGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.QuestSceneChoiceCostumeEffectGroupId, element.SortOrder); + secondaryIndexSelector = element => element.CostumeId; + } + + public RangeView FindByCostumeId(int key) => FindManyCore(data, secondaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMQuestSceneChoiceEffectTable.cs b/src/Models/Tables/EntityMQuestSceneChoiceEffectTable.cs new file mode 100644 index 0000000..09b5a6f --- /dev/null +++ b/src/Models/Tables/EntityMQuestSceneChoiceEffectTable.cs @@ -0,0 +1,24 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMQuestSceneChoiceEffectTable : TableBase +{ + private readonly Func primaryIndexSelector; + private readonly Func secondaryIndexSelector; + + public EntityMQuestSceneChoiceEffectTable(EntityMQuestSceneChoiceEffect[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.QuestSceneChoiceEffectId; + secondaryIndexSelector = element => (element.QuestSceneChoiceCostumeEffectGroupId, element.QuestSceneChoiceWeaponEffectGroupId); + } + + public RangeView FindByQuestSceneChoiceCostumeEffectGroupId(int key) + { + var result = data + .Where(x => x.QuestSceneChoiceCostumeEffectGroupId == key) + .ToArray(); + + return new RangeView(result, 0, result.Length - 1, true); + } +} diff --git a/src/Models/Tables/EntityMQuestSceneChoiceTable.cs b/src/Models/Tables/EntityMQuestSceneChoiceTable.cs new file mode 100644 index 0000000..e5a1ffa --- /dev/null +++ b/src/Models/Tables/EntityMQuestSceneChoiceTable.cs @@ -0,0 +1,14 @@ +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Tables; + +public class EntityMQuestSceneChoiceTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMQuestSceneChoiceTable(EntityMQuestSceneChoice[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.MainFlowQuestSceneId, element.QuestFlowType, element.ChoiceNumber); + } +} diff --git a/src/Models/Tables/EntityMQuestSceneChoiceWeaponEffectGroupTable.cs b/src/Models/Tables/EntityMQuestSceneChoiceWeaponEffectGroupTable.cs new file mode 100644 index 0000000..6bf5dce --- /dev/null +++ b/src/Models/Tables/EntityMQuestSceneChoiceWeaponEffectGroupTable.cs @@ -0,0 +1,17 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMQuestSceneChoiceWeaponEffectGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + private readonly Func secondaryIndexSelector; + + public EntityMQuestSceneChoiceWeaponEffectGroupTable(EntityMQuestSceneChoiceWeaponEffectGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.QuestSceneChoiceWeaponEffectGroupId, element.SortOrder); + secondaryIndexSelector = element => element.WeaponId; + } + + public RangeView FindByWeaponId(int key) => FindManyCore(data, secondaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMQuestSceneNotConfirmTitleDialogTable.cs b/src/Models/Tables/EntityMQuestSceneNotConfirmTitleDialogTable.cs new file mode 100644 index 0000000..2de64da --- /dev/null +++ b/src/Models/Tables/EntityMQuestSceneNotConfirmTitleDialogTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMQuestSceneNotConfirmTitleDialogTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMQuestSceneNotConfirmTitleDialogTable(EntityMQuestSceneNotConfirmTitleDialog[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.QuestSceneId; + } + + public EntityMQuestSceneNotConfirmTitleDialog FindByQuestSceneId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMQuestSceneOutgameBlendshapeMotionTable.cs b/src/Models/Tables/EntityMQuestSceneOutgameBlendshapeMotionTable.cs new file mode 100644 index 0000000..1900f62 --- /dev/null +++ b/src/Models/Tables/EntityMQuestSceneOutgameBlendshapeMotionTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMQuestSceneOutgameBlendshapeMotionTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMQuestSceneOutgameBlendshapeMotionTable(EntityMQuestSceneOutgameBlendshapeMotion[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.QuestSceneId; + } + + public EntityMQuestSceneOutgameBlendshapeMotion FindByQuestSceneId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMQuestScenePictureBookReplaceTable.cs b/src/Models/Tables/EntityMQuestScenePictureBookReplaceTable.cs new file mode 100644 index 0000000..6729b43 --- /dev/null +++ b/src/Models/Tables/EntityMQuestScenePictureBookReplaceTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMQuestScenePictureBookReplaceTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMQuestScenePictureBookReplaceTable(EntityMQuestScenePictureBookReplace[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.QuestSceneId; + } + + public bool TryFindByQuestSceneId(int key, out EntityMQuestScenePictureBookReplace result) => TryFindUniqueCore(data, primaryIndexSelector, Comparer.Default, key, out result); +} diff --git a/src/Models/Tables/EntityMQuestSceneTable.cs b/src/Models/Tables/EntityMQuestSceneTable.cs new file mode 100644 index 0000000..7f62412 --- /dev/null +++ b/src/Models/Tables/EntityMQuestSceneTable.cs @@ -0,0 +1,17 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMQuestSceneTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMQuestSceneTable(EntityMQuestScene[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.QuestSceneId; + } + + public EntityMQuestScene FindByQuestSceneId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); + + public bool TryFindByQuestSceneId(int key, out EntityMQuestScene result) => TryFindUniqueCore(data, primaryIndexSelector, Comparer.Default, key, out result); +} diff --git a/src/Models/Tables/EntityMQuestScheduleCorrespondenceTable.cs b/src/Models/Tables/EntityMQuestScheduleCorrespondenceTable.cs new file mode 100644 index 0000000..571d62c --- /dev/null +++ b/src/Models/Tables/EntityMQuestScheduleCorrespondenceTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMQuestScheduleCorrespondenceTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMQuestScheduleCorrespondenceTable(EntityMQuestScheduleCorrespondence[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.QuestId, element.QuestScheduleId); + } + + public RangeView FindRangeByQuestIdAndQuestScheduleId(ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityMQuestScheduleTable.cs b/src/Models/Tables/EntityMQuestScheduleTable.cs new file mode 100644 index 0000000..c81477c --- /dev/null +++ b/src/Models/Tables/EntityMQuestScheduleTable.cs @@ -0,0 +1,17 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMQuestScheduleTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMQuestScheduleTable(EntityMQuestSchedule[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.QuestScheduleId; + } + + public EntityMQuestSchedule FindByQuestScheduleId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); + + public bool TryFindByQuestScheduleId(int key, out EntityMQuestSchedule result) => TryFindUniqueCore(data, primaryIndexSelector, Comparer.Default, key, out result); +} diff --git a/src/Models/Tables/EntityMQuestTable.cs b/src/Models/Tables/EntityMQuestTable.cs new file mode 100644 index 0000000..d2743af --- /dev/null +++ b/src/Models/Tables/EntityMQuestTable.cs @@ -0,0 +1,17 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMQuestTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMQuestTable(EntityMQuest[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.QuestId; + } + + public EntityMQuest FindByQuestId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); + + public bool TryFindByQuestId(int key, out EntityMQuest result) => TryFindUniqueCore(data, primaryIndexSelector, Comparer.Default, key, out result); +} diff --git a/src/Models/Tables/EntityMReportTable.cs b/src/Models/Tables/EntityMReportTable.cs new file mode 100644 index 0000000..d3829ae --- /dev/null +++ b/src/Models/Tables/EntityMReportTable.cs @@ -0,0 +1,17 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMReportTable : TableBase +{ + private readonly Func primaryIndexSelector; + private readonly Func secondaryIndexSelector; + + public EntityMReportTable(EntityMReport[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.ReportId; + secondaryIndexSelector = element => element.MainQuestSeasonId; + } + + public EntityMReport FindByReportId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMShopDisplayPriceTable.cs b/src/Models/Tables/EntityMShopDisplayPriceTable.cs new file mode 100644 index 0000000..3272ce5 --- /dev/null +++ b/src/Models/Tables/EntityMShopDisplayPriceTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Tables; + +public class EntityMShopDisplayPriceTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMShopDisplayPriceTable(EntityMShopDisplayPrice[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.PriceType, element.PriceId); + } + + public EntityMShopDisplayPrice FindByPriceTypeAndPriceId(ValueTuple key) => FindUniqueCore(data, primaryIndexSelector, Comparer<(PriceType, int)>.Default, key); +} diff --git a/src/Models/Tables/EntityMShopItemAdditionalContentTable.cs b/src/Models/Tables/EntityMShopItemAdditionalContentTable.cs new file mode 100644 index 0000000..e6d3d7a --- /dev/null +++ b/src/Models/Tables/EntityMShopItemAdditionalContentTable.cs @@ -0,0 +1,14 @@ +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Tables; + +public class EntityMShopItemAdditionalContentTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMShopItemAdditionalContentTable(EntityMShopItemAdditionalContent[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.ShopItemAdditionalContentId, element.PossessionType, element.PossessionId); + } +} diff --git a/src/Models/Tables/EntityMShopItemCellGroupTable.cs b/src/Models/Tables/EntityMShopItemCellGroupTable.cs new file mode 100644 index 0000000..ea87441 --- /dev/null +++ b/src/Models/Tables/EntityMShopItemCellGroupTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMShopItemCellGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMShopItemCellGroupTable(EntityMShopItemCellGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.ShopItemCellGroupId, element.ShopItemCellId); + } + + public RangeView FindRangeByShopItemCellGroupIdAndShopItemCellId(ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityMShopItemCellLimitedOpenTable.cs b/src/Models/Tables/EntityMShopItemCellLimitedOpenTable.cs new file mode 100644 index 0000000..4f6f4bf --- /dev/null +++ b/src/Models/Tables/EntityMShopItemCellLimitedOpenTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMShopItemCellLimitedOpenTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMShopItemCellLimitedOpenTable(EntityMShopItemCellLimitedOpen[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.ShopItemCellId; + } + + public EntityMShopItemCellLimitedOpen FindByShopItemCellId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMShopItemCellTable.cs b/src/Models/Tables/EntityMShopItemCellTable.cs new file mode 100644 index 0000000..35c3ea6 --- /dev/null +++ b/src/Models/Tables/EntityMShopItemCellTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMShopItemCellTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMShopItemCellTable(EntityMShopItemCell[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.ShopItemCellId, element.StepNumber); + } + + public RangeView FindRangeByShopItemCellIdAndStepNumber(ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityMShopItemCellTermTable.cs b/src/Models/Tables/EntityMShopItemCellTermTable.cs new file mode 100644 index 0000000..7404b5d --- /dev/null +++ b/src/Models/Tables/EntityMShopItemCellTermTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMShopItemCellTermTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMShopItemCellTermTable(EntityMShopItemCellTerm[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.ShopItemCellTermId; + } + + public EntityMShopItemCellTerm FindByShopItemCellTermId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMShopItemContentEffectTable.cs b/src/Models/Tables/EntityMShopItemContentEffectTable.cs new file mode 100644 index 0000000..0bfc97b --- /dev/null +++ b/src/Models/Tables/EntityMShopItemContentEffectTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMShopItemContentEffectTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMShopItemContentEffectTable(EntityMShopItemContentEffect[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.ShopItemId; + } + + public EntityMShopItemContentEffect FindByShopItemId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMShopItemContentMissionTable.cs b/src/Models/Tables/EntityMShopItemContentMissionTable.cs new file mode 100644 index 0000000..c99fd25 --- /dev/null +++ b/src/Models/Tables/EntityMShopItemContentMissionTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMShopItemContentMissionTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMShopItemContentMissionTable(EntityMShopItemContentMission[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.ShopItemId; + } + + public EntityMShopItemContentMission FindByShopItemId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMShopItemContentPossessionTable.cs b/src/Models/Tables/EntityMShopItemContentPossessionTable.cs new file mode 100644 index 0000000..72ebf50 --- /dev/null +++ b/src/Models/Tables/EntityMShopItemContentPossessionTable.cs @@ -0,0 +1,14 @@ +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Tables; + +public class EntityMShopItemContentPossessionTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMShopItemContentPossessionTable(EntityMShopItemContentPossession[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.ShopItemId, element.PossessionType, element.PossessionId); + } +} diff --git a/src/Models/Tables/EntityMShopItemLimitedStockTable.cs b/src/Models/Tables/EntityMShopItemLimitedStockTable.cs new file mode 100644 index 0000000..4a20e37 --- /dev/null +++ b/src/Models/Tables/EntityMShopItemLimitedStockTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMShopItemLimitedStockTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMShopItemLimitedStockTable(EntityMShopItemLimitedStock[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.ShopItemLimitedStockId; + } + + public EntityMShopItemLimitedStock FindByShopItemLimitedStockId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMShopItemTable.cs b/src/Models/Tables/EntityMShopItemTable.cs new file mode 100644 index 0000000..68a23e7 --- /dev/null +++ b/src/Models/Tables/EntityMShopItemTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMShopItemTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMShopItemTable(EntityMShopItem[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.ShopItemId; + } + + public EntityMShopItem FindByShopItemId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMShopItemUserLevelConditionTable.cs b/src/Models/Tables/EntityMShopItemUserLevelConditionTable.cs new file mode 100644 index 0000000..20507fc --- /dev/null +++ b/src/Models/Tables/EntityMShopItemUserLevelConditionTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMShopItemUserLevelConditionTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMShopItemUserLevelConditionTable(EntityMShopItemUserLevelCondition[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.ShopItemId; + } +} diff --git a/src/Models/Tables/EntityMShopReplaceableGemTable.cs b/src/Models/Tables/EntityMShopReplaceableGemTable.cs new file mode 100644 index 0000000..5022bfd --- /dev/null +++ b/src/Models/Tables/EntityMShopReplaceableGemTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMShopReplaceableGemTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMShopReplaceableGemTable(EntityMShopReplaceableGem[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.LineupUpdateCountLowerLimit; + } +} diff --git a/src/Models/Tables/EntityMShopTable.cs b/src/Models/Tables/EntityMShopTable.cs new file mode 100644 index 0000000..119a27f --- /dev/null +++ b/src/Models/Tables/EntityMShopTable.cs @@ -0,0 +1,17 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMShopTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMShopTable(EntityMShop[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.ShopId; + } + + public EntityMShop FindByShopId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); + + public bool TryFindByShopId(int key, out EntityMShop result) => TryFindUniqueCore(data, primaryIndexSelector, Comparer.Default, key, out result); +} diff --git a/src/Models/Tables/EntityMSideStoryQuestLimitContentTable.cs b/src/Models/Tables/EntityMSideStoryQuestLimitContentTable.cs new file mode 100644 index 0000000..5aaea63 --- /dev/null +++ b/src/Models/Tables/EntityMSideStoryQuestLimitContentTable.cs @@ -0,0 +1,21 @@ +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSideStoryQuestLimitContentTable : TableBase +{ + private readonly Func primaryIndexSelector; + private readonly Func secondaryIndexSelector; + + public EntityMSideStoryQuestLimitContentTable(EntityMSideStoryQuestLimitContent[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.SideStoryQuestLimitContentId; + secondaryIndexSelector = element => (element.EventQuestChapterId, element.DifficultyType); + } + + public EntityMSideStoryQuestLimitContent FindBySideStoryQuestLimitContentId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); + + public RangeView FindByEventQuestChapterIdAndDifficultyType(ValueTuple key) => + FindManyCore(data, secondaryIndexSelector, Comparer<(int, DifficultyType)>.Default, key); +} diff --git a/src/Models/Tables/EntityMSideStoryQuestSceneTable.cs b/src/Models/Tables/EntityMSideStoryQuestSceneTable.cs new file mode 100644 index 0000000..533494f --- /dev/null +++ b/src/Models/Tables/EntityMSideStoryQuestSceneTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSideStoryQuestSceneTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSideStoryQuestSceneTable(EntityMSideStoryQuestScene[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.SideStoryQuestId, element.SideStoryQuestSceneId); + } + + public EntityMSideStoryQuestScene FindBySideStoryQuestIdAndSideStoryQuestSceneId(ValueTuple key) => + FindUniqueCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, key); +} diff --git a/src/Models/Tables/EntityMSideStoryQuestTable.cs b/src/Models/Tables/EntityMSideStoryQuestTable.cs new file mode 100644 index 0000000..b534a73 --- /dev/null +++ b/src/Models/Tables/EntityMSideStoryQuestTable.cs @@ -0,0 +1,23 @@ +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSideStoryQuestTable : TableBase +{ + private readonly Func primaryIndexSelector; + private readonly Func secondaryIndexSelector; + + public EntityMSideStoryQuestTable(EntityMSideStoryQuest[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.SideStoryQuestId; + secondaryIndexSelector = element => (element.SideStoryQuestType, element.TargetId); + } + + public EntityMSideStoryQuest FindBySideStoryQuestId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); + + public bool TryFindBySideStoryQuestId(int key, out EntityMSideStoryQuest result) => TryFindUniqueCore(data, primaryIndexSelector, Comparer.Default, key, out result); + + public RangeView FindBySideStoryQuestTypeAndTargetId(ValueTuple key) => + FindManyCore(data, secondaryIndexSelector, Comparer<(int, int)>.Default, key); +} diff --git a/src/Models/Tables/EntityMSkillAbnormalBehaviourActionAbnormalResistanceTable.cs b/src/Models/Tables/EntityMSkillAbnormalBehaviourActionAbnormalResistanceTable.cs new file mode 100644 index 0000000..a56666b --- /dev/null +++ b/src/Models/Tables/EntityMSkillAbnormalBehaviourActionAbnormalResistanceTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillAbnormalBehaviourActionAbnormalResistanceTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillAbnormalBehaviourActionAbnormalResistanceTable(EntityMSkillAbnormalBehaviourActionAbnormalResistance[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.SkillAbnormalBehaviourActionId; + } + + public EntityMSkillAbnormalBehaviourActionAbnormalResistance FindBySkillAbnormalBehaviourActionId(int key) => + FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMSkillAbnormalBehaviourActionAttributeDamageCorrectionTable.cs b/src/Models/Tables/EntityMSkillAbnormalBehaviourActionAttributeDamageCorrectionTable.cs new file mode 100644 index 0000000..3186f48 --- /dev/null +++ b/src/Models/Tables/EntityMSkillAbnormalBehaviourActionAttributeDamageCorrectionTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillAbnormalBehaviourActionAttributeDamageCorrectionTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillAbnormalBehaviourActionAttributeDamageCorrectionTable(EntityMSkillAbnormalBehaviourActionAttributeDamageCorrection[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.SkillAbnormalBehaviourActionId; + } + + public EntityMSkillAbnormalBehaviourActionAttributeDamageCorrection FindBySkillAbnormalBehaviourActionId(int key) => + FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMSkillAbnormalBehaviourActionBuffResistanceTable.cs b/src/Models/Tables/EntityMSkillAbnormalBehaviourActionBuffResistanceTable.cs new file mode 100644 index 0000000..bd98385 --- /dev/null +++ b/src/Models/Tables/EntityMSkillAbnormalBehaviourActionBuffResistanceTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillAbnormalBehaviourActionBuffResistanceTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillAbnormalBehaviourActionBuffResistanceTable(EntityMSkillAbnormalBehaviourActionBuffResistance[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.SkillAbnormalBehaviourActionId; + } + + public EntityMSkillAbnormalBehaviourActionBuffResistance FindBySkillAbnormalBehaviourActionId(int key) => + FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMSkillAbnormalBehaviourActionDamageMultiplyDetailAlwaysTable.cs b/src/Models/Tables/EntityMSkillAbnormalBehaviourActionDamageMultiplyDetailAlwaysTable.cs new file mode 100644 index 0000000..551c708 --- /dev/null +++ b/src/Models/Tables/EntityMSkillAbnormalBehaviourActionDamageMultiplyDetailAlwaysTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillAbnormalBehaviourActionDamageMultiplyDetailAlwaysTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillAbnormalBehaviourActionDamageMultiplyDetailAlwaysTable(EntityMSkillAbnormalBehaviourActionDamageMultiplyDetailAlways[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.DamageMultiplyAbnormalDetailId; + } + + public EntityMSkillAbnormalBehaviourActionDamageMultiplyDetailAlways FindByDamageMultiplyAbnormalDetailId(int key) => + FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMSkillAbnormalBehaviourActionDamageMultiplyTable.cs b/src/Models/Tables/EntityMSkillAbnormalBehaviourActionDamageMultiplyTable.cs new file mode 100644 index 0000000..1c29278 --- /dev/null +++ b/src/Models/Tables/EntityMSkillAbnormalBehaviourActionDamageMultiplyTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillAbnormalBehaviourActionDamageMultiplyTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillAbnormalBehaviourActionDamageMultiplyTable(EntityMSkillAbnormalBehaviourActionDamageMultiply[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.SkillAbnormalBehaviourActionId; + } + + public EntityMSkillAbnormalBehaviourActionDamageMultiply FindBySkillAbnormalBehaviourActionId(int key) => + FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMSkillAbnormalBehaviourActionDamageTable.cs b/src/Models/Tables/EntityMSkillAbnormalBehaviourActionDamageTable.cs new file mode 100644 index 0000000..15085ba --- /dev/null +++ b/src/Models/Tables/EntityMSkillAbnormalBehaviourActionDamageTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillAbnormalBehaviourActionDamageTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillAbnormalBehaviourActionDamageTable(EntityMSkillAbnormalBehaviourActionDamage[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.SkillAbnormalBehaviourActionId; + } + + public EntityMSkillAbnormalBehaviourActionDamage FindBySkillAbnormalBehaviourActionId(int key) => + FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMSkillAbnormalBehaviourActionDefaultSkillLotteryTable.cs b/src/Models/Tables/EntityMSkillAbnormalBehaviourActionDefaultSkillLotteryTable.cs new file mode 100644 index 0000000..6d9722d --- /dev/null +++ b/src/Models/Tables/EntityMSkillAbnormalBehaviourActionDefaultSkillLotteryTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillAbnormalBehaviourActionDefaultSkillLotteryTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillAbnormalBehaviourActionDefaultSkillLotteryTable(EntityMSkillAbnormalBehaviourActionDefaultSkillLottery[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.SkillAbnormalBehaviourActionId; + } + + public EntityMSkillAbnormalBehaviourActionDefaultSkillLottery FindBySkillAbnormalBehaviourActionId(int key) => + FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMSkillAbnormalBehaviourActionHitRatioDownTable.cs b/src/Models/Tables/EntityMSkillAbnormalBehaviourActionHitRatioDownTable.cs new file mode 100644 index 0000000..9081f22 --- /dev/null +++ b/src/Models/Tables/EntityMSkillAbnormalBehaviourActionHitRatioDownTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillAbnormalBehaviourActionHitRatioDownTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillAbnormalBehaviourActionHitRatioDownTable(EntityMSkillAbnormalBehaviourActionHitRatioDown[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.SkillAbnormalBehaviourActionId; + } + + public EntityMSkillAbnormalBehaviourActionHitRatioDown FindBySkillAbnormalBehaviourActionId(int key) => + FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMSkillAbnormalBehaviourActionModifyHateValueTable.cs b/src/Models/Tables/EntityMSkillAbnormalBehaviourActionModifyHateValueTable.cs new file mode 100644 index 0000000..89dea46 --- /dev/null +++ b/src/Models/Tables/EntityMSkillAbnormalBehaviourActionModifyHateValueTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillAbnormalBehaviourActionModifyHateValueTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillAbnormalBehaviourActionModifyHateValueTable(EntityMSkillAbnormalBehaviourActionModifyHateValue[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.SkillAbnormalBehaviourActionId; + } + + public EntityMSkillAbnormalBehaviourActionModifyHateValue FindBySkillAbnormalBehaviourActionId(int key) => + FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMSkillAbnormalBehaviourActionOverrideEvasionValueTable.cs b/src/Models/Tables/EntityMSkillAbnormalBehaviourActionOverrideEvasionValueTable.cs new file mode 100644 index 0000000..3bef6bf --- /dev/null +++ b/src/Models/Tables/EntityMSkillAbnormalBehaviourActionOverrideEvasionValueTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillAbnormalBehaviourActionOverrideEvasionValueTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillAbnormalBehaviourActionOverrideEvasionValueTable(EntityMSkillAbnormalBehaviourActionOverrideEvasionValue[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.SkillAbnormalBehaviourActionId; + } + + public EntityMSkillAbnormalBehaviourActionOverrideEvasionValue FindBySkillAbnormalBehaviourActionId(int key) => + FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMSkillAbnormalBehaviourActionOverrideHitEffectTable.cs b/src/Models/Tables/EntityMSkillAbnormalBehaviourActionOverrideHitEffectTable.cs new file mode 100644 index 0000000..390986e --- /dev/null +++ b/src/Models/Tables/EntityMSkillAbnormalBehaviourActionOverrideHitEffectTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillAbnormalBehaviourActionOverrideHitEffectTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillAbnormalBehaviourActionOverrideHitEffectTable(EntityMSkillAbnormalBehaviourActionOverrideHitEffect[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.SkillAbnormalBehaviourActionId; + } + + public EntityMSkillAbnormalBehaviourActionOverrideHitEffect FindBySkillAbnormalBehaviourActionId(int key) => + FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMSkillAbnormalBehaviourActionRecoveryTable.cs b/src/Models/Tables/EntityMSkillAbnormalBehaviourActionRecoveryTable.cs new file mode 100644 index 0000000..9f1c39d --- /dev/null +++ b/src/Models/Tables/EntityMSkillAbnormalBehaviourActionRecoveryTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillAbnormalBehaviourActionRecoveryTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillAbnormalBehaviourActionRecoveryTable(EntityMSkillAbnormalBehaviourActionRecovery[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.SkillAbnormalBehaviourActionId; + } + + public EntityMSkillAbnormalBehaviourActionRecovery FindBySkillAbnormalBehaviourActionId(int key) => + FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMSkillAbnormalBehaviourActionTurnRestrictionTable.cs b/src/Models/Tables/EntityMSkillAbnormalBehaviourActionTurnRestrictionTable.cs new file mode 100644 index 0000000..2a47bf9 --- /dev/null +++ b/src/Models/Tables/EntityMSkillAbnormalBehaviourActionTurnRestrictionTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillAbnormalBehaviourActionTurnRestrictionTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillAbnormalBehaviourActionTurnRestrictionTable(EntityMSkillAbnormalBehaviourActionTurnRestriction[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.SkillBehaviourActionId; + } + + public EntityMSkillAbnormalBehaviourActionTurnRestriction FindBySkillBehaviourActionId(int key) => + FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMSkillAbnormalBehaviourGroupTable.cs b/src/Models/Tables/EntityMSkillAbnormalBehaviourGroupTable.cs new file mode 100644 index 0000000..55c4722 --- /dev/null +++ b/src/Models/Tables/EntityMSkillAbnormalBehaviourGroupTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillAbnormalBehaviourGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillAbnormalBehaviourGroupTable(EntityMSkillAbnormalBehaviourGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.SkillAbnormalBehaviourGroupId, element.AbnormalBehaviourIndex); + } +} diff --git a/src/Models/Tables/EntityMSkillAbnormalBehaviourTable.cs b/src/Models/Tables/EntityMSkillAbnormalBehaviourTable.cs new file mode 100644 index 0000000..bca2d64 --- /dev/null +++ b/src/Models/Tables/EntityMSkillAbnormalBehaviourTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillAbnormalBehaviourTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillAbnormalBehaviourTable(EntityMSkillAbnormalBehaviour[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.SkillAbnormalBehaviourId; + } + + public EntityMSkillAbnormalBehaviour FindBySkillAbnormalBehaviourId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMSkillAbnormalDamageMultiplyDetailAbnormalTable.cs b/src/Models/Tables/EntityMSkillAbnormalDamageMultiplyDetailAbnormalTable.cs new file mode 100644 index 0000000..ac08155 --- /dev/null +++ b/src/Models/Tables/EntityMSkillAbnormalDamageMultiplyDetailAbnormalTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillAbnormalDamageMultiplyDetailAbnormalTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillAbnormalDamageMultiplyDetailAbnormalTable(EntityMSkillAbnormalDamageMultiplyDetailAbnormal[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.DamageMultiplyAbnormalDetailId; + } + + public bool TryFindByDamageMultiplyAbnormalDetailId(int key, out EntityMSkillAbnormalDamageMultiplyDetailAbnormal result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer.Default, key, out result); +} diff --git a/src/Models/Tables/EntityMSkillAbnormalDamageMultiplyDetailBuffAttachedTable.cs b/src/Models/Tables/EntityMSkillAbnormalDamageMultiplyDetailBuffAttachedTable.cs new file mode 100644 index 0000000..5ec6cc1 --- /dev/null +++ b/src/Models/Tables/EntityMSkillAbnormalDamageMultiplyDetailBuffAttachedTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillAbnormalDamageMultiplyDetailBuffAttachedTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillAbnormalDamageMultiplyDetailBuffAttachedTable(EntityMSkillAbnormalDamageMultiplyDetailBuffAttached[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.DamageMultiplyAbnormalDetailId; + } + + public bool TryFindByDamageMultiplyAbnormalDetailId(int key, out EntityMSkillAbnormalDamageMultiplyDetailBuffAttached result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer.Default, key, out result); +} diff --git a/src/Models/Tables/EntityMSkillAbnormalDamageMultiplyDetailCriticalTable.cs b/src/Models/Tables/EntityMSkillAbnormalDamageMultiplyDetailCriticalTable.cs new file mode 100644 index 0000000..2fe0b78 --- /dev/null +++ b/src/Models/Tables/EntityMSkillAbnormalDamageMultiplyDetailCriticalTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillAbnormalDamageMultiplyDetailCriticalTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillAbnormalDamageMultiplyDetailCriticalTable(EntityMSkillAbnormalDamageMultiplyDetailCritical[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.DamageMultiplyAbnormalDetailId; + } + + public bool TryFindByDamageMultiplyAbnormalDetailId(int key, out EntityMSkillAbnormalDamageMultiplyDetailCritical result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer.Default, key, out result); +} diff --git a/src/Models/Tables/EntityMSkillAbnormalDamageMultiplyDetailHitIndexTable.cs b/src/Models/Tables/EntityMSkillAbnormalDamageMultiplyDetailHitIndexTable.cs new file mode 100644 index 0000000..9c69336 --- /dev/null +++ b/src/Models/Tables/EntityMSkillAbnormalDamageMultiplyDetailHitIndexTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillAbnormalDamageMultiplyDetailHitIndexTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillAbnormalDamageMultiplyDetailHitIndexTable(EntityMSkillAbnormalDamageMultiplyDetailHitIndex[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.DamageMultiplyAbnormalDetailId; + } + + public EntityMSkillAbnormalDamageMultiplyDetailHitIndex FindByDamageMultiplyAbnormalDetailId(int key) => + FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMSkillAbnormalDamageMultiplyDetailSkillfulWeaponTable.cs b/src/Models/Tables/EntityMSkillAbnormalDamageMultiplyDetailSkillfulWeaponTable.cs new file mode 100644 index 0000000..ae0f9ae --- /dev/null +++ b/src/Models/Tables/EntityMSkillAbnormalDamageMultiplyDetailSkillfulWeaponTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillAbnormalDamageMultiplyDetailSkillfulWeaponTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillAbnormalDamageMultiplyDetailSkillfulWeaponTable(EntityMSkillAbnormalDamageMultiplyDetailSkillfulWeapon[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.DamageMultiplyAbnormalDetailId; + } + + public bool TryFindByDamageMultiplyAbnormalDetailId(int key, out EntityMSkillAbnormalDamageMultiplyDetailSkillfulWeapon result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer.Default, key, out result); +} diff --git a/src/Models/Tables/EntityMSkillAbnormalLifetimeBehaviourActivateCountTable.cs b/src/Models/Tables/EntityMSkillAbnormalLifetimeBehaviourActivateCountTable.cs new file mode 100644 index 0000000..6872cf7 --- /dev/null +++ b/src/Models/Tables/EntityMSkillAbnormalLifetimeBehaviourActivateCountTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillAbnormalLifetimeBehaviourActivateCountTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillAbnormalLifetimeBehaviourActivateCountTable(EntityMSkillAbnormalLifetimeBehaviourActivateCount[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.SkillAbnormalLifetimeBehaviourId; + } + + public EntityMSkillAbnormalLifetimeBehaviourActivateCount FindBySkillAbnormalLifetimeBehaviourId(int key) => + FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMSkillAbnormalLifetimeBehaviourFrameCountTable.cs b/src/Models/Tables/EntityMSkillAbnormalLifetimeBehaviourFrameCountTable.cs new file mode 100644 index 0000000..23b207b --- /dev/null +++ b/src/Models/Tables/EntityMSkillAbnormalLifetimeBehaviourFrameCountTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillAbnormalLifetimeBehaviourFrameCountTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillAbnormalLifetimeBehaviourFrameCountTable(EntityMSkillAbnormalLifetimeBehaviourFrameCount[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.SkillAbnormalLifetimeBehaviourId; + } + + public EntityMSkillAbnormalLifetimeBehaviourFrameCount FindBySkillAbnormalLifetimeBehaviourId(int key) => + FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMSkillAbnormalLifetimeBehaviourGroupTable.cs b/src/Models/Tables/EntityMSkillAbnormalLifetimeBehaviourGroupTable.cs new file mode 100644 index 0000000..96246eb --- /dev/null +++ b/src/Models/Tables/EntityMSkillAbnormalLifetimeBehaviourGroupTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillAbnormalLifetimeBehaviourGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillAbnormalLifetimeBehaviourGroupTable(EntityMSkillAbnormalLifetimeBehaviourGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.SkillAbnormalLifetimeBehaviourGroupId, element.AbnormalLifetimeBehaviourIndex); + } +} diff --git a/src/Models/Tables/EntityMSkillAbnormalLifetimeBehaviourReceiveDamageCountTable.cs b/src/Models/Tables/EntityMSkillAbnormalLifetimeBehaviourReceiveDamageCountTable.cs new file mode 100644 index 0000000..a40dbf9 --- /dev/null +++ b/src/Models/Tables/EntityMSkillAbnormalLifetimeBehaviourReceiveDamageCountTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillAbnormalLifetimeBehaviourReceiveDamageCountTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillAbnormalLifetimeBehaviourReceiveDamageCountTable(EntityMSkillAbnormalLifetimeBehaviourReceiveDamageCount[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.SkillAbnormalLifetimeBehaviourId; + } + + public EntityMSkillAbnormalLifetimeBehaviourReceiveDamageCount FindBySkillAbnormalLifetimeBehaviourId(int key) => + FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMSkillAbnormalLifetimeBehaviourTurnCountTable.cs b/src/Models/Tables/EntityMSkillAbnormalLifetimeBehaviourTurnCountTable.cs new file mode 100644 index 0000000..76461e1 --- /dev/null +++ b/src/Models/Tables/EntityMSkillAbnormalLifetimeBehaviourTurnCountTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillAbnormalLifetimeBehaviourTurnCountTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillAbnormalLifetimeBehaviourTurnCountTable(EntityMSkillAbnormalLifetimeBehaviourTurnCount[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.SkillAbnormalLifetimeBehaviourId; + } + + public EntityMSkillAbnormalLifetimeBehaviourTurnCount FindBySkillAbnormalLifetimeBehaviourId(int key) => + FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMSkillAbnormalLifetimeTable.cs b/src/Models/Tables/EntityMSkillAbnormalLifetimeTable.cs new file mode 100644 index 0000000..58479bd --- /dev/null +++ b/src/Models/Tables/EntityMSkillAbnormalLifetimeTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillAbnormalLifetimeTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillAbnormalLifetimeTable(EntityMSkillAbnormalLifetime[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.SkillAbnormalLifetimeId; + } + + public EntityMSkillAbnormalLifetime FindBySkillAbnormalLifetimeId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMSkillAbnormalTable.cs b/src/Models/Tables/EntityMSkillAbnormalTable.cs new file mode 100644 index 0000000..ecdaf4e --- /dev/null +++ b/src/Models/Tables/EntityMSkillAbnormalTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillAbnormalTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillAbnormalTable(EntityMSkillAbnormal[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.SkillAbnormalId; + } + + public EntityMSkillAbnormal FindBySkillAbnormalId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMSkillBehaviourActionAbnormalTable.cs b/src/Models/Tables/EntityMSkillBehaviourActionAbnormalTable.cs new file mode 100644 index 0000000..07ae613 --- /dev/null +++ b/src/Models/Tables/EntityMSkillBehaviourActionAbnormalTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillBehaviourActionAbnormalTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillBehaviourActionAbnormalTable(EntityMSkillBehaviourActionAbnormal[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.SkillBehaviourActionId; + } + + public EntityMSkillBehaviourActionAbnormal FindBySkillBehaviourActionId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMSkillBehaviourActionActiveSkillDamageCorrectionTable.cs b/src/Models/Tables/EntityMSkillBehaviourActionActiveSkillDamageCorrectionTable.cs new file mode 100644 index 0000000..6eb7511 --- /dev/null +++ b/src/Models/Tables/EntityMSkillBehaviourActionActiveSkillDamageCorrectionTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillBehaviourActionActiveSkillDamageCorrectionTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillBehaviourActionActiveSkillDamageCorrectionTable(EntityMSkillBehaviourActionActiveSkillDamageCorrection[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.SkillBehaviourActionId; + } + + public EntityMSkillBehaviourActionActiveSkillDamageCorrection FindBySkillBehaviourActionId(int key) => + FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMSkillBehaviourActionAdvanceActiveSkillCooltimeImmediateTable.cs b/src/Models/Tables/EntityMSkillBehaviourActionAdvanceActiveSkillCooltimeImmediateTable.cs new file mode 100644 index 0000000..e9505f7 --- /dev/null +++ b/src/Models/Tables/EntityMSkillBehaviourActionAdvanceActiveSkillCooltimeImmediateTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillBehaviourActionAdvanceActiveSkillCooltimeImmediateTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillBehaviourActionAdvanceActiveSkillCooltimeImmediateTable(EntityMSkillBehaviourActionAdvanceActiveSkillCooltimeImmediate[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.SkillBehaviourActionId; + } + + public EntityMSkillBehaviourActionAdvanceActiveSkillCooltimeImmediate FindBySkillBehaviourActionId(int key) => + FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMSkillBehaviourActionAdvanceActiveSkillCooltimeTable.cs b/src/Models/Tables/EntityMSkillBehaviourActionAdvanceActiveSkillCooltimeTable.cs new file mode 100644 index 0000000..927178e --- /dev/null +++ b/src/Models/Tables/EntityMSkillBehaviourActionAdvanceActiveSkillCooltimeTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillBehaviourActionAdvanceActiveSkillCooltimeTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillBehaviourActionAdvanceActiveSkillCooltimeTable(EntityMSkillBehaviourActionAdvanceActiveSkillCooltime[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.SkillBehaviourActionId; + } + + public EntityMSkillBehaviourActionAdvanceActiveSkillCooltime FindBySkillBehaviourActionId(int key) => + FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMSkillBehaviourActionAttackClampHpTable.cs b/src/Models/Tables/EntityMSkillBehaviourActionAttackClampHpTable.cs new file mode 100644 index 0000000..8394031 --- /dev/null +++ b/src/Models/Tables/EntityMSkillBehaviourActionAttackClampHpTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillBehaviourActionAttackClampHpTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillBehaviourActionAttackClampHpTable(EntityMSkillBehaviourActionAttackClampHp[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.SkillBehaviourActionId; + } + + public bool TryFindBySkillBehaviourActionId(int key, out EntityMSkillBehaviourActionAttackClampHp result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer.Default, key, out result); +} diff --git a/src/Models/Tables/EntityMSkillBehaviourActionAttackComboTable.cs b/src/Models/Tables/EntityMSkillBehaviourActionAttackComboTable.cs new file mode 100644 index 0000000..9a98071 --- /dev/null +++ b/src/Models/Tables/EntityMSkillBehaviourActionAttackComboTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillBehaviourActionAttackComboTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillBehaviourActionAttackComboTable(EntityMSkillBehaviourActionAttackCombo[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.SkillBehaviourActionId; + } + + public EntityMSkillBehaviourActionAttackCombo FindBySkillBehaviourActionId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMSkillBehaviourActionAttackFixedDamageTable.cs b/src/Models/Tables/EntityMSkillBehaviourActionAttackFixedDamageTable.cs new file mode 100644 index 0000000..371e311 --- /dev/null +++ b/src/Models/Tables/EntityMSkillBehaviourActionAttackFixedDamageTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillBehaviourActionAttackFixedDamageTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillBehaviourActionAttackFixedDamageTable(EntityMSkillBehaviourActionAttackFixedDamage[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.SkillBehaviourActionId; + } + + public EntityMSkillBehaviourActionAttackFixedDamage FindBySkillBehaviourActionId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMSkillBehaviourActionAttackHpRatioTable.cs b/src/Models/Tables/EntityMSkillBehaviourActionAttackHpRatioTable.cs new file mode 100644 index 0000000..1c46391 --- /dev/null +++ b/src/Models/Tables/EntityMSkillBehaviourActionAttackHpRatioTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillBehaviourActionAttackHpRatioTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillBehaviourActionAttackHpRatioTable(EntityMSkillBehaviourActionAttackHpRatio[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.SkillBehaviourActionId; + } + + public EntityMSkillBehaviourActionAttackHpRatio FindBySkillBehaviourActionId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMSkillBehaviourActionAttackIgnoreVitalityTable.cs b/src/Models/Tables/EntityMSkillBehaviourActionAttackIgnoreVitalityTable.cs new file mode 100644 index 0000000..3d09ef3 --- /dev/null +++ b/src/Models/Tables/EntityMSkillBehaviourActionAttackIgnoreVitalityTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillBehaviourActionAttackIgnoreVitalityTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillBehaviourActionAttackIgnoreVitalityTable(EntityMSkillBehaviourActionAttackIgnoreVitality[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.SkillBehaviourActionId; + } + + public EntityMSkillBehaviourActionAttackIgnoreVitality FindBySkillBehaviourActionId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMSkillBehaviourActionAttackMainWeaponAttributeTable.cs b/src/Models/Tables/EntityMSkillBehaviourActionAttackMainWeaponAttributeTable.cs new file mode 100644 index 0000000..fdd3d4b --- /dev/null +++ b/src/Models/Tables/EntityMSkillBehaviourActionAttackMainWeaponAttributeTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillBehaviourActionAttackMainWeaponAttributeTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillBehaviourActionAttackMainWeaponAttributeTable(EntityMSkillBehaviourActionAttackMainWeaponAttribute[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.SkillBehaviourActionId; + } + + public EntityMSkillBehaviourActionAttackMainWeaponAttribute FindBySkillBehaviourActionId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMSkillBehaviourActionAttackSkillfulMainWeaponTypeTable.cs b/src/Models/Tables/EntityMSkillBehaviourActionAttackSkillfulMainWeaponTypeTable.cs new file mode 100644 index 0000000..7c62569 --- /dev/null +++ b/src/Models/Tables/EntityMSkillBehaviourActionAttackSkillfulMainWeaponTypeTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillBehaviourActionAttackSkillfulMainWeaponTypeTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillBehaviourActionAttackSkillfulMainWeaponTypeTable(EntityMSkillBehaviourActionAttackSkillfulMainWeaponType[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.SkillBehaviourActionId; + } + + public EntityMSkillBehaviourActionAttackSkillfulMainWeaponType FindBySkillBehaviourActionId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMSkillBehaviourActionAttackTable.cs b/src/Models/Tables/EntityMSkillBehaviourActionAttackTable.cs new file mode 100644 index 0000000..1adf20c --- /dev/null +++ b/src/Models/Tables/EntityMSkillBehaviourActionAttackTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillBehaviourActionAttackTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillBehaviourActionAttackTable(EntityMSkillBehaviourActionAttack[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.SkillBehaviourActionId; + } + + public EntityMSkillBehaviourActionAttack FindBySkillBehaviourActionId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMSkillBehaviourActionAttackVitalityTable.cs b/src/Models/Tables/EntityMSkillBehaviourActionAttackVitalityTable.cs new file mode 100644 index 0000000..bffd29e --- /dev/null +++ b/src/Models/Tables/EntityMSkillBehaviourActionAttackVitalityTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillBehaviourActionAttackVitalityTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillBehaviourActionAttackVitalityTable(EntityMSkillBehaviourActionAttackVitality[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.SkillBehaviourActionId; + } + + public bool TryFindBySkillBehaviourActionId(int key, out EntityMSkillBehaviourActionAttackVitality result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer.Default, key, out result); +} diff --git a/src/Models/Tables/EntityMSkillBehaviourActionAttributeDamageCorrectionTable.cs b/src/Models/Tables/EntityMSkillBehaviourActionAttributeDamageCorrectionTable.cs new file mode 100644 index 0000000..2886f62 --- /dev/null +++ b/src/Models/Tables/EntityMSkillBehaviourActionAttributeDamageCorrectionTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillBehaviourActionAttributeDamageCorrectionTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillBehaviourActionAttributeDamageCorrectionTable(EntityMSkillBehaviourActionAttributeDamageCorrection[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.SkillBehaviourActionId; + } + + public EntityMSkillBehaviourActionAttributeDamageCorrection FindBySkillBehaviourActionId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMSkillBehaviourActionBuffTable.cs b/src/Models/Tables/EntityMSkillBehaviourActionBuffTable.cs new file mode 100644 index 0000000..a5de739 --- /dev/null +++ b/src/Models/Tables/EntityMSkillBehaviourActionBuffTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillBehaviourActionBuffTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillBehaviourActionBuffTable(EntityMSkillBehaviourActionBuff[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.SkillBehaviourActionId; + } + + public EntityMSkillBehaviourActionBuff FindBySkillBehaviourActionId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMSkillBehaviourActionChangestepTable.cs b/src/Models/Tables/EntityMSkillBehaviourActionChangestepTable.cs new file mode 100644 index 0000000..a38fed3 --- /dev/null +++ b/src/Models/Tables/EntityMSkillBehaviourActionChangestepTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillBehaviourActionChangestepTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillBehaviourActionChangestepTable(EntityMSkillBehaviourActionChangestep[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.SkillBehaviourActionId; + } + + public EntityMSkillBehaviourActionChangestep FindBySkillBehaviourActionId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMSkillBehaviourActionDamageCorrectionHpRatioTable.cs b/src/Models/Tables/EntityMSkillBehaviourActionDamageCorrectionHpRatioTable.cs new file mode 100644 index 0000000..a72d826 --- /dev/null +++ b/src/Models/Tables/EntityMSkillBehaviourActionDamageCorrectionHpRatioTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillBehaviourActionDamageCorrectionHpRatioTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillBehaviourActionDamageCorrectionHpRatioTable(EntityMSkillBehaviourActionDamageCorrectionHpRatio[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.SkillBehaviourActionId; + } + + public EntityMSkillBehaviourActionDamageCorrectionHpRatio FindBySkillBehaviourActionId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMSkillBehaviourActionDamageMultiplyTable.cs b/src/Models/Tables/EntityMSkillBehaviourActionDamageMultiplyTable.cs new file mode 100644 index 0000000..54a335a --- /dev/null +++ b/src/Models/Tables/EntityMSkillBehaviourActionDamageMultiplyTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillBehaviourActionDamageMultiplyTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillBehaviourActionDamageMultiplyTable(EntityMSkillBehaviourActionDamageMultiply[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.SkillBehaviourActionId; + } + + public EntityMSkillBehaviourActionDamageMultiply FindBySkillBehaviourActionId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMSkillBehaviourActionDefaultSkillLotteryTable.cs b/src/Models/Tables/EntityMSkillBehaviourActionDefaultSkillLotteryTable.cs new file mode 100644 index 0000000..ec9ed3b --- /dev/null +++ b/src/Models/Tables/EntityMSkillBehaviourActionDefaultSkillLotteryTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillBehaviourActionDefaultSkillLotteryTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillBehaviourActionDefaultSkillLotteryTable(EntityMSkillBehaviourActionDefaultSkillLottery[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.SkillBehaviourActionId; + } + + public EntityMSkillBehaviourActionDefaultSkillLottery FindBySkillBehaviourActionId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMSkillBehaviourActionExtendBuffCooltimeTable.cs b/src/Models/Tables/EntityMSkillBehaviourActionExtendBuffCooltimeTable.cs new file mode 100644 index 0000000..892e626 --- /dev/null +++ b/src/Models/Tables/EntityMSkillBehaviourActionExtendBuffCooltimeTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillBehaviourActionExtendBuffCooltimeTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillBehaviourActionExtendBuffCooltimeTable(EntityMSkillBehaviourActionExtendBuffCooltime[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.SkillBehaviourActionId; + } + + public EntityMSkillBehaviourActionExtendBuffCooltime FindBySkillBehaviourActionId(int key) => + FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMSkillBehaviourActionHpRatioDamageTable.cs b/src/Models/Tables/EntityMSkillBehaviourActionHpRatioDamageTable.cs new file mode 100644 index 0000000..f3fdd61 --- /dev/null +++ b/src/Models/Tables/EntityMSkillBehaviourActionHpRatioDamageTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillBehaviourActionHpRatioDamageTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillBehaviourActionHpRatioDamageTable(EntityMSkillBehaviourActionHpRatioDamage[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.SkillBehaviourActionId; + } + + public EntityMSkillBehaviourActionHpRatioDamage FindBySkillBehaviourActionId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMSkillBehaviourActionOverlimitDamageMultiplyTable.cs b/src/Models/Tables/EntityMSkillBehaviourActionOverlimitDamageMultiplyTable.cs new file mode 100644 index 0000000..8708876 --- /dev/null +++ b/src/Models/Tables/EntityMSkillBehaviourActionOverlimitDamageMultiplyTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillBehaviourActionOverlimitDamageMultiplyTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillBehaviourActionOverlimitDamageMultiplyTable(EntityMSkillBehaviourActionOverlimitDamageMultiply[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.SkillBehaviourActionId; + } + + public EntityMSkillBehaviourActionOverlimitDamageMultiply FindBySkillBehaviourActionId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMSkillBehaviourActionRecoveryPointCorrectionTable.cs b/src/Models/Tables/EntityMSkillBehaviourActionRecoveryPointCorrectionTable.cs new file mode 100644 index 0000000..6992875 --- /dev/null +++ b/src/Models/Tables/EntityMSkillBehaviourActionRecoveryPointCorrectionTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillBehaviourActionRecoveryPointCorrectionTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillBehaviourActionRecoveryPointCorrectionTable(EntityMSkillBehaviourActionRecoveryPointCorrection[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.SkillBehaviourActionId; + } +} diff --git a/src/Models/Tables/EntityMSkillBehaviourActionRecoveryTable.cs b/src/Models/Tables/EntityMSkillBehaviourActionRecoveryTable.cs new file mode 100644 index 0000000..6205661 --- /dev/null +++ b/src/Models/Tables/EntityMSkillBehaviourActionRecoveryTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillBehaviourActionRecoveryTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillBehaviourActionRecoveryTable(EntityMSkillBehaviourActionRecovery[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.SkillBehaviourActionId; + } + + public EntityMSkillBehaviourActionRecovery FindBySkillBehaviourActionId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMSkillBehaviourActionRemoveAbnormalTable.cs b/src/Models/Tables/EntityMSkillBehaviourActionRemoveAbnormalTable.cs new file mode 100644 index 0000000..aed8137 --- /dev/null +++ b/src/Models/Tables/EntityMSkillBehaviourActionRemoveAbnormalTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillBehaviourActionRemoveAbnormalTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillBehaviourActionRemoveAbnormalTable(EntityMSkillBehaviourActionRemoveAbnormal[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.SkillBehaviourActionId; + } + + public EntityMSkillBehaviourActionRemoveAbnormal FindBySkillBehaviourActionId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMSkillBehaviourActionRemoveBuffTable.cs b/src/Models/Tables/EntityMSkillBehaviourActionRemoveBuffTable.cs new file mode 100644 index 0000000..f3d016f --- /dev/null +++ b/src/Models/Tables/EntityMSkillBehaviourActionRemoveBuffTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillBehaviourActionRemoveBuffTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillBehaviourActionRemoveBuffTable(EntityMSkillBehaviourActionRemoveBuff[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.SkillBehaviourActionId; + } + + public EntityMSkillBehaviourActionRemoveBuff FindBySkillBehaviourActionId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMSkillBehaviourActionShortenActiveSkillCooltimeTable.cs b/src/Models/Tables/EntityMSkillBehaviourActionShortenActiveSkillCooltimeTable.cs new file mode 100644 index 0000000..1474509 --- /dev/null +++ b/src/Models/Tables/EntityMSkillBehaviourActionShortenActiveSkillCooltimeTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillBehaviourActionShortenActiveSkillCooltimeTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillBehaviourActionShortenActiveSkillCooltimeTable(EntityMSkillBehaviourActionShortenActiveSkillCooltime[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.SkillBehaviourActionId; + } + + public EntityMSkillBehaviourActionShortenActiveSkillCooltime FindBySkillBehaviourActionId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMSkillBehaviourActionSkillRecoveryPowerCorrectionTable.cs b/src/Models/Tables/EntityMSkillBehaviourActionSkillRecoveryPowerCorrectionTable.cs new file mode 100644 index 0000000..1a3a9db --- /dev/null +++ b/src/Models/Tables/EntityMSkillBehaviourActionSkillRecoveryPowerCorrectionTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillBehaviourActionSkillRecoveryPowerCorrectionTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillBehaviourActionSkillRecoveryPowerCorrectionTable(EntityMSkillBehaviourActionSkillRecoveryPowerCorrection[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.SkillBehaviourActionId; + } + + public EntityMSkillBehaviourActionSkillRecoveryPowerCorrection FindBySkillBehaviourActionId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMSkillBehaviourActivationConditionActivationUpperCountTable.cs b/src/Models/Tables/EntityMSkillBehaviourActivationConditionActivationUpperCountTable.cs new file mode 100644 index 0000000..ad202ef --- /dev/null +++ b/src/Models/Tables/EntityMSkillBehaviourActivationConditionActivationUpperCountTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillBehaviourActivationConditionActivationUpperCountTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillBehaviourActivationConditionActivationUpperCountTable(EntityMSkillBehaviourActivationConditionActivationUpperCount[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.SkillBehaviourActivationConditionId; + } + + public EntityMSkillBehaviourActivationConditionActivationUpperCount FindBySkillBehaviourActivationConditionId(int key) => + FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMSkillBehaviourActivationConditionAttributeTable.cs b/src/Models/Tables/EntityMSkillBehaviourActivationConditionAttributeTable.cs new file mode 100644 index 0000000..6fd7422 --- /dev/null +++ b/src/Models/Tables/EntityMSkillBehaviourActivationConditionAttributeTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillBehaviourActivationConditionAttributeTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillBehaviourActivationConditionAttributeTable(EntityMSkillBehaviourActivationConditionAttribute[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.SkillBehaviourActivationConditionId; + } + + public EntityMSkillBehaviourActivationConditionAttribute FindBySkillBehaviourActivationConditionId(int key) => + FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMSkillBehaviourActivationConditionGroupTable.cs b/src/Models/Tables/EntityMSkillBehaviourActivationConditionGroupTable.cs new file mode 100644 index 0000000..8f1a352 --- /dev/null +++ b/src/Models/Tables/EntityMSkillBehaviourActivationConditionGroupTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillBehaviourActivationConditionGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillBehaviourActivationConditionGroupTable(EntityMSkillBehaviourActivationConditionGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.SkillBehaviourActivationConditionGroupId, element.ConditionCheckOrder); + } + + public RangeView FindRangeBySkillBehaviourActivationConditionGroupIdAndConditionCheckOrder(ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityMSkillBehaviourActivationConditionHpRatioTable.cs b/src/Models/Tables/EntityMSkillBehaviourActivationConditionHpRatioTable.cs new file mode 100644 index 0000000..c3a3827 --- /dev/null +++ b/src/Models/Tables/EntityMSkillBehaviourActivationConditionHpRatioTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillBehaviourActivationConditionHpRatioTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillBehaviourActivationConditionHpRatioTable(EntityMSkillBehaviourActivationConditionHpRatio[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.SkillBehaviourActivationConditionId; + } + + public EntityMSkillBehaviourActivationConditionHpRatio FindBySkillBehaviourActivationConditionId(int key) => + FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMSkillBehaviourActivationConditionInSkillFlowTable.cs b/src/Models/Tables/EntityMSkillBehaviourActivationConditionInSkillFlowTable.cs new file mode 100644 index 0000000..03044d7 --- /dev/null +++ b/src/Models/Tables/EntityMSkillBehaviourActivationConditionInSkillFlowTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillBehaviourActivationConditionInSkillFlowTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillBehaviourActivationConditionInSkillFlowTable(EntityMSkillBehaviourActivationConditionInSkillFlow[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.SkillBehaviourActivationConditionId; + } + + public EntityMSkillBehaviourActivationConditionInSkillFlow FindBySkillBehaviourActivationConditionId(int key) => + FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMSkillBehaviourActivationConditionWaveNumberTable.cs b/src/Models/Tables/EntityMSkillBehaviourActivationConditionWaveNumberTable.cs new file mode 100644 index 0000000..c76d1b0 --- /dev/null +++ b/src/Models/Tables/EntityMSkillBehaviourActivationConditionWaveNumberTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillBehaviourActivationConditionWaveNumberTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillBehaviourActivationConditionWaveNumberTable(EntityMSkillBehaviourActivationConditionWaveNumber[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.SkillBehaviourActivationConditionId; + } + + public EntityMSkillBehaviourActivationConditionWaveNumber FindBySkillBehaviourActivationConditionId(int key) => + FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMSkillBehaviourActivationMethodTable.cs b/src/Models/Tables/EntityMSkillBehaviourActivationMethodTable.cs new file mode 100644 index 0000000..b6da05c --- /dev/null +++ b/src/Models/Tables/EntityMSkillBehaviourActivationMethodTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillBehaviourActivationMethodTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillBehaviourActivationMethodTable(EntityMSkillBehaviourActivationMethod[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.SkillBehaviourActivationMethodId; + } + + public EntityMSkillBehaviourActivationMethod FindBySkillBehaviourActivationMethodId(int key) => + FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMSkillBehaviourGroupTable.cs b/src/Models/Tables/EntityMSkillBehaviourGroupTable.cs new file mode 100644 index 0000000..1057593 --- /dev/null +++ b/src/Models/Tables/EntityMSkillBehaviourGroupTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillBehaviourGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillBehaviourGroupTable(EntityMSkillBehaviourGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.SkillBehaviourGroupId, element.SkillBehaviourId); + } + + public RangeView FindRangeBySkillBehaviourGroupIdAndSkillBehaviourId(ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityMSkillBehaviourTable.cs b/src/Models/Tables/EntityMSkillBehaviourTable.cs new file mode 100644 index 0000000..29be224 --- /dev/null +++ b/src/Models/Tables/EntityMSkillBehaviourTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillBehaviourTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillBehaviourTable(EntityMSkillBehaviour[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.SkillBehaviourId; + } + + public EntityMSkillBehaviour FindBySkillBehaviourId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMSkillBuffTable.cs b/src/Models/Tables/EntityMSkillBuffTable.cs new file mode 100644 index 0000000..d005fc4 --- /dev/null +++ b/src/Models/Tables/EntityMSkillBuffTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillBuffTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillBuffTable(EntityMSkillBuff[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.SkillBuffId; + } + + public EntityMSkillBuff FindBySkillBuffId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMSkillCasttimeBehaviourActionOnFrameUpdateTable.cs b/src/Models/Tables/EntityMSkillCasttimeBehaviourActionOnFrameUpdateTable.cs new file mode 100644 index 0000000..e435f2a --- /dev/null +++ b/src/Models/Tables/EntityMSkillCasttimeBehaviourActionOnFrameUpdateTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillCasttimeBehaviourActionOnFrameUpdateTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillCasttimeBehaviourActionOnFrameUpdateTable(EntityMSkillCasttimeBehaviourActionOnFrameUpdate[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.SkillCasttimeBehaviourActionId; + } + + public bool TryFindBySkillCasttimeBehaviourActionId(int key, out EntityMSkillCasttimeBehaviourActionOnFrameUpdate result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer.Default, key, out result); +} diff --git a/src/Models/Tables/EntityMSkillCasttimeBehaviourActionOnSkillDamageConditionTable.cs b/src/Models/Tables/EntityMSkillCasttimeBehaviourActionOnSkillDamageConditionTable.cs new file mode 100644 index 0000000..2312909 --- /dev/null +++ b/src/Models/Tables/EntityMSkillCasttimeBehaviourActionOnSkillDamageConditionTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillCasttimeBehaviourActionOnSkillDamageConditionTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillCasttimeBehaviourActionOnSkillDamageConditionTable(EntityMSkillCasttimeBehaviourActionOnSkillDamageCondition[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.SkillCasttimeBehaviourActionId; + } + + public bool TryFindBySkillCasttimeBehaviourActionId(int key, out EntityMSkillCasttimeBehaviourActionOnSkillDamageCondition result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer.Default, key, out result); +} diff --git a/src/Models/Tables/EntityMSkillCasttimeBehaviourGroupTable.cs b/src/Models/Tables/EntityMSkillCasttimeBehaviourGroupTable.cs new file mode 100644 index 0000000..16efb8a --- /dev/null +++ b/src/Models/Tables/EntityMSkillCasttimeBehaviourGroupTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillCasttimeBehaviourGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillCasttimeBehaviourGroupTable(EntityMSkillCasttimeBehaviourGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.SkillCasttimeBehaviourGroupId, element.SkillCasttimeBehaviourIndex); + } + + public RangeView FindRangeBySkillCasttimeBehaviourGroupIdAndSkillCasttimeBehaviourIndex(ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityMSkillCasttimeBehaviourTable.cs b/src/Models/Tables/EntityMSkillCasttimeBehaviourTable.cs new file mode 100644 index 0000000..5487530 --- /dev/null +++ b/src/Models/Tables/EntityMSkillCasttimeBehaviourTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillCasttimeBehaviourTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillCasttimeBehaviourTable(EntityMSkillCasttimeBehaviour[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.SkillCasttimeBehaviourId; + } + + public EntityMSkillCasttimeBehaviour FindBySkillCasttimeBehaviourId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMSkillCasttimeTable.cs b/src/Models/Tables/EntityMSkillCasttimeTable.cs new file mode 100644 index 0000000..a46caf0 --- /dev/null +++ b/src/Models/Tables/EntityMSkillCasttimeTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillCasttimeTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillCasttimeTable(EntityMSkillCasttime[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.SkillCasttimeId; + } + + public EntityMSkillCasttime FindBySkillCasttimeId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMSkillCooltimeAdvanceValueOnDefaultSkillGroupTable.cs b/src/Models/Tables/EntityMSkillCooltimeAdvanceValueOnDefaultSkillGroupTable.cs new file mode 100644 index 0000000..3331ec0 --- /dev/null +++ b/src/Models/Tables/EntityMSkillCooltimeAdvanceValueOnDefaultSkillGroupTable.cs @@ -0,0 +1,17 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillCooltimeAdvanceValueOnDefaultSkillGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillCooltimeAdvanceValueOnDefaultSkillGroupTable(EntityMSkillCooltimeAdvanceValueOnDefaultSkillGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.SkillCooltimeAdvanceValueOnDefaultSkillGroupId, element.SkillHitCountLowerLimit); + } + + public RangeView FindRangeBySkillCooltimeAdvanceValueOnDefaultSkillGroupIdAndSkillHitCountLowerLimit( + ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityMSkillCooltimeBehaviourGroupTable.cs b/src/Models/Tables/EntityMSkillCooltimeBehaviourGroupTable.cs new file mode 100644 index 0000000..ddc1954 --- /dev/null +++ b/src/Models/Tables/EntityMSkillCooltimeBehaviourGroupTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillCooltimeBehaviourGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillCooltimeBehaviourGroupTable(EntityMSkillCooltimeBehaviourGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.SkillCooltimeBehaviourGroupId, element.SkillCooltimeBehaviourId); + } + + public RangeView FindRangeBySkillCooltimeBehaviourGroupIdAndSkillCooltimeBehaviourId(ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityMSkillCooltimeBehaviourOnExecuteActiveSkillTable.cs b/src/Models/Tables/EntityMSkillCooltimeBehaviourOnExecuteActiveSkillTable.cs new file mode 100644 index 0000000..6aa5751 --- /dev/null +++ b/src/Models/Tables/EntityMSkillCooltimeBehaviourOnExecuteActiveSkillTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillCooltimeBehaviourOnExecuteActiveSkillTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillCooltimeBehaviourOnExecuteActiveSkillTable(EntityMSkillCooltimeBehaviourOnExecuteActiveSkill[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.SkillCooltimeBehaviourActionId; + } + + public bool TryFindBySkillCooltimeBehaviourActionId(int key, out EntityMSkillCooltimeBehaviourOnExecuteActiveSkill result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer.Default, key, out result); +} diff --git a/src/Models/Tables/EntityMSkillCooltimeBehaviourOnExecuteCompanionSkillTable.cs b/src/Models/Tables/EntityMSkillCooltimeBehaviourOnExecuteCompanionSkillTable.cs new file mode 100644 index 0000000..f12573a --- /dev/null +++ b/src/Models/Tables/EntityMSkillCooltimeBehaviourOnExecuteCompanionSkillTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillCooltimeBehaviourOnExecuteCompanionSkillTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillCooltimeBehaviourOnExecuteCompanionSkillTable(EntityMSkillCooltimeBehaviourOnExecuteCompanionSkill[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.SkillCooltimeBehaviourActionId; + } + + public bool TryFindBySkillCooltimeBehaviourActionId(int key, out EntityMSkillCooltimeBehaviourOnExecuteCompanionSkill result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer.Default, key, out result); +} diff --git a/src/Models/Tables/EntityMSkillCooltimeBehaviourOnExecuteDefaultSkillTable.cs b/src/Models/Tables/EntityMSkillCooltimeBehaviourOnExecuteDefaultSkillTable.cs new file mode 100644 index 0000000..0dee378 --- /dev/null +++ b/src/Models/Tables/EntityMSkillCooltimeBehaviourOnExecuteDefaultSkillTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillCooltimeBehaviourOnExecuteDefaultSkillTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillCooltimeBehaviourOnExecuteDefaultSkillTable(EntityMSkillCooltimeBehaviourOnExecuteDefaultSkill[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.SkillCooltimeBehaviourActionId; + } + + public bool TryFindBySkillCooltimeBehaviourActionId(int key, out EntityMSkillCooltimeBehaviourOnExecuteDefaultSkill result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer.Default, key, out result); +} diff --git a/src/Models/Tables/EntityMSkillCooltimeBehaviourOnFrameUpdateTable.cs b/src/Models/Tables/EntityMSkillCooltimeBehaviourOnFrameUpdateTable.cs new file mode 100644 index 0000000..4ad1390 --- /dev/null +++ b/src/Models/Tables/EntityMSkillCooltimeBehaviourOnFrameUpdateTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillCooltimeBehaviourOnFrameUpdateTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillCooltimeBehaviourOnFrameUpdateTable(EntityMSkillCooltimeBehaviourOnFrameUpdate[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.SkillCooltimeBehaviourActionId; + } + + public bool TryFindBySkillCooltimeBehaviourActionId(int key, out EntityMSkillCooltimeBehaviourOnFrameUpdate result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer.Default, key, out result); +} diff --git a/src/Models/Tables/EntityMSkillCooltimeBehaviourOnSkillDamageTable.cs b/src/Models/Tables/EntityMSkillCooltimeBehaviourOnSkillDamageTable.cs new file mode 100644 index 0000000..106bd4c --- /dev/null +++ b/src/Models/Tables/EntityMSkillCooltimeBehaviourOnSkillDamageTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillCooltimeBehaviourOnSkillDamageTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillCooltimeBehaviourOnSkillDamageTable(EntityMSkillCooltimeBehaviourOnSkillDamage[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.SkillCooltimeBehaviourActionId; + } + + public bool TryFindBySkillCooltimeBehaviourActionId(int key, out EntityMSkillCooltimeBehaviourOnSkillDamage result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer.Default, key, out result); +} diff --git a/src/Models/Tables/EntityMSkillCooltimeBehaviourTable.cs b/src/Models/Tables/EntityMSkillCooltimeBehaviourTable.cs new file mode 100644 index 0000000..0ab1bcd --- /dev/null +++ b/src/Models/Tables/EntityMSkillCooltimeBehaviourTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillCooltimeBehaviourTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillCooltimeBehaviourTable(EntityMSkillCooltimeBehaviour[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.SkillCooltimeBehaviourId; + } + + public EntityMSkillCooltimeBehaviour FindBySkillCooltimeBehaviourId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMSkillDamageMultiplyAbnormalAttachedValueGroupTable.cs b/src/Models/Tables/EntityMSkillDamageMultiplyAbnormalAttachedValueGroupTable.cs new file mode 100644 index 0000000..567590a --- /dev/null +++ b/src/Models/Tables/EntityMSkillDamageMultiplyAbnormalAttachedValueGroupTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillDamageMultiplyAbnormalAttachedValueGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillDamageMultiplyAbnormalAttachedValueGroupTable(EntityMSkillDamageMultiplyAbnormalAttachedValueGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.SkillDamageMultiplyAbnormalAttachedValueGroupId, element.SkillDamageMultiplyAbnormalAttachedValueGroupIndex); + } + + public RangeView FindRangeBySkillDamageMultiplyAbnormalAttachedValueGroupIdAndSkillDamageMultiplyAbnormalAttachedValueGroupIndex(ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityMSkillDamageMultiplyDetailAbnormalAttachedTable.cs b/src/Models/Tables/EntityMSkillDamageMultiplyDetailAbnormalAttachedTable.cs new file mode 100644 index 0000000..148aa65 --- /dev/null +++ b/src/Models/Tables/EntityMSkillDamageMultiplyDetailAbnormalAttachedTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillDamageMultiplyDetailAbnormalAttachedTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillDamageMultiplyDetailAbnormalAttachedTable(EntityMSkillDamageMultiplyDetailAbnormalAttached[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.SkillDamageMultiplyDetailId; + } + + public EntityMSkillDamageMultiplyDetailAbnormalAttached FindBySkillDamageMultiplyDetailId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMSkillDamageMultiplyDetailAlwaysTable.cs b/src/Models/Tables/EntityMSkillDamageMultiplyDetailAlwaysTable.cs new file mode 100644 index 0000000..61ff84d --- /dev/null +++ b/src/Models/Tables/EntityMSkillDamageMultiplyDetailAlwaysTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillDamageMultiplyDetailAlwaysTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillDamageMultiplyDetailAlwaysTable(EntityMSkillDamageMultiplyDetailAlways[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.SkillDamageMultiplyDetailId; + } + + public EntityMSkillDamageMultiplyDetailAlways FindBySkillDamageMultiplyDetailId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMSkillDamageMultiplyDetailBuffAttachedTable.cs b/src/Models/Tables/EntityMSkillDamageMultiplyDetailBuffAttachedTable.cs new file mode 100644 index 0000000..d331a90 --- /dev/null +++ b/src/Models/Tables/EntityMSkillDamageMultiplyDetailBuffAttachedTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillDamageMultiplyDetailBuffAttachedTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillDamageMultiplyDetailBuffAttachedTable(EntityMSkillDamageMultiplyDetailBuffAttached[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.SkillDamageMultiplyDetailId; + } + + public bool TryFindBySkillDamageMultiplyDetailId(int key, out EntityMSkillDamageMultiplyDetailBuffAttached result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer.Default, key, out result); +} diff --git a/src/Models/Tables/EntityMSkillDamageMultiplyDetailCriticalTable.cs b/src/Models/Tables/EntityMSkillDamageMultiplyDetailCriticalTable.cs new file mode 100644 index 0000000..e14c7b3 --- /dev/null +++ b/src/Models/Tables/EntityMSkillDamageMultiplyDetailCriticalTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillDamageMultiplyDetailCriticalTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillDamageMultiplyDetailCriticalTable(EntityMSkillDamageMultiplyDetailCritical[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.SkillDamageMultiplyDetailId; + } + + public EntityMSkillDamageMultiplyDetailCritical FindBySkillDamageMultiplyDetailId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMSkillDamageMultiplyDetailHitIndexTable.cs b/src/Models/Tables/EntityMSkillDamageMultiplyDetailHitIndexTable.cs new file mode 100644 index 0000000..8435f1e --- /dev/null +++ b/src/Models/Tables/EntityMSkillDamageMultiplyDetailHitIndexTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillDamageMultiplyDetailHitIndexTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillDamageMultiplyDetailHitIndexTable(EntityMSkillDamageMultiplyDetailHitIndex[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.SkillDamageMultiplyDetailId; + } + + public EntityMSkillDamageMultiplyDetailHitIndex FindBySkillDamageMultiplyDetailId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMSkillDamageMultiplyDetailSkillfulWeaponTypeTable.cs b/src/Models/Tables/EntityMSkillDamageMultiplyDetailSkillfulWeaponTypeTable.cs new file mode 100644 index 0000000..972bb6c --- /dev/null +++ b/src/Models/Tables/EntityMSkillDamageMultiplyDetailSkillfulWeaponTypeTable.cs @@ -0,0 +1,17 @@ +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillDamageMultiplyDetailSkillfulWeaponTypeTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillDamageMultiplyDetailSkillfulWeaponTypeTable(EntityMSkillDamageMultiplyDetailSkillfulWeaponType[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.SkillDamageMultiplyDetailId; + } + + public bool TryFindBySkillDamageMultiplyDetailId(int key, out EntityMSkillDamageMultiplyDetailSkillfulWeaponType result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer.Default, key, out result); +} diff --git a/src/Models/Tables/EntityMSkillDamageMultiplyDetailSpecifiedCostumeTypeTable.cs b/src/Models/Tables/EntityMSkillDamageMultiplyDetailSpecifiedCostumeTypeTable.cs new file mode 100644 index 0000000..657a059 --- /dev/null +++ b/src/Models/Tables/EntityMSkillDamageMultiplyDetailSpecifiedCostumeTypeTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillDamageMultiplyDetailSpecifiedCostumeTypeTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillDamageMultiplyDetailSpecifiedCostumeTypeTable(EntityMSkillDamageMultiplyDetailSpecifiedCostumeType[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.SkillDamageMultiplyDetailId; + } + + public bool TryFindBySkillDamageMultiplyDetailId(int key, out EntityMSkillDamageMultiplyDetailSpecifiedCostumeType result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer.Default, key, out result); +} diff --git a/src/Models/Tables/EntityMSkillDamageMultiplyHitIndexValueGroupTable.cs b/src/Models/Tables/EntityMSkillDamageMultiplyHitIndexValueGroupTable.cs new file mode 100644 index 0000000..f1e5e23 --- /dev/null +++ b/src/Models/Tables/EntityMSkillDamageMultiplyHitIndexValueGroupTable.cs @@ -0,0 +1,17 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillDamageMultiplyHitIndexValueGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillDamageMultiplyHitIndexValueGroupTable(EntityMSkillDamageMultiplyHitIndexValueGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.SkillDamageMultiplyHitIndexValueGroupId, element.SkillDamageMultiplyHitIndexValueGroupIndex); + } + + public RangeView FindRangeBySkillDamageMultiplyHitIndexValueGroupIdAndSkillDamageMultiplyHitIndexValueGroupIndex( + ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityMSkillDamageMultiplyTargetSpecifiedCostumeGroupTable.cs b/src/Models/Tables/EntityMSkillDamageMultiplyTargetSpecifiedCostumeGroupTable.cs new file mode 100644 index 0000000..90a6d3f --- /dev/null +++ b/src/Models/Tables/EntityMSkillDamageMultiplyTargetSpecifiedCostumeGroupTable.cs @@ -0,0 +1,18 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillDamageMultiplyTargetSpecifiedCostumeGroupTable : TableBase +{ + private readonly Func> primaryIndexSelector; + private readonly Func secondaryIndexSelector; + + public EntityMSkillDamageMultiplyTargetSpecifiedCostumeGroupTable(EntityMSkillDamageMultiplyTargetSpecifiedCostumeGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.TargetSpecifiedCostumeGroupId, element.TargetSpecifiedCostumeGroupIndex); + secondaryIndexSelector = element => element.TargetSpecifiedCostumeGroupId; + } + + public RangeView FindByTargetSpecifiedCostumeGroupId(int key) => + FindManyCore(data, secondaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMSkillDetailTable.cs b/src/Models/Tables/EntityMSkillDetailTable.cs new file mode 100644 index 0000000..2ff25b6 --- /dev/null +++ b/src/Models/Tables/EntityMSkillDetailTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillDetailTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillDetailTable(EntityMSkillDetail[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.SkillDetailId; + } + + public EntityMSkillDetail FindBySkillDetailId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMSkillLevelGroupTable.cs b/src/Models/Tables/EntityMSkillLevelGroupTable.cs new file mode 100644 index 0000000..4a9ef39 --- /dev/null +++ b/src/Models/Tables/EntityMSkillLevelGroupTable.cs @@ -0,0 +1,20 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillLevelGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + private readonly Func secondaryIndexSelector; + + public EntityMSkillLevelGroupTable(EntityMSkillLevelGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.SkillLevelGroupId, element.LevelLowerLimit); + secondaryIndexSelector = element => element.SkillLevelGroupId; + } + + public EntityMSkillLevelGroup FindClosestBySkillLevelGroupIdAndLevelLowerLimit(ValueTuple key, bool selectLower = true) => + FindUniqueClosestCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, key, selectLower); + + public RangeView FindBySkillLevelGroupId(int key) => FindManyCore(data, secondaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMSkillRemoveAbnormalTargetAbnormalGroupTable.cs b/src/Models/Tables/EntityMSkillRemoveAbnormalTargetAbnormalGroupTable.cs new file mode 100644 index 0000000..212af36 --- /dev/null +++ b/src/Models/Tables/EntityMSkillRemoveAbnormalTargetAbnormalGroupTable.cs @@ -0,0 +1,17 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillRemoveAbnormalTargetAbnormalGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillRemoveAbnormalTargetAbnormalGroupTable(EntityMSkillRemoveAbnormalTargetAbnormalGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.SkillRemoveAbnormalTargetAbnormalGroupId, element.SkillRemoveAbnormalTargetAbnormalGroupIndex); + } + + public RangeView FindRangeBySkillRemoveAbnormalTargetAbnormalGroupIdAndSkillRemoveAbnormalTargetAbnormalGroupIndex( + ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityMSkillRemoveBuffFilterStatusKindTable.cs b/src/Models/Tables/EntityMSkillRemoveBuffFilterStatusKindTable.cs new file mode 100644 index 0000000..66ecd03 --- /dev/null +++ b/src/Models/Tables/EntityMSkillRemoveBuffFilterStatusKindTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillRemoveBuffFilterStatusKindTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillRemoveBuffFilterStatusKindTable(EntityMSkillRemoveBuffFilterStatusKind[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.SkillRemoveBuffFilteringId, element.FilterIndex); + } + + public RangeView FindRangeBySkillRemoveBuffFilteringIdAndFilterIndex(ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityMSkillReserveUiTypeTable.cs b/src/Models/Tables/EntityMSkillReserveUiTypeTable.cs new file mode 100644 index 0000000..ee0eafc --- /dev/null +++ b/src/Models/Tables/EntityMSkillReserveUiTypeTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillReserveUiTypeTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillReserveUiTypeTable(EntityMSkillReserveUiType[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.SkillDetailId; + } + + public bool TryFindBySkillDetailId(int key, out EntityMSkillReserveUiType result) => TryFindUniqueCore(data, primaryIndexSelector, Comparer.Default, key, out result); +} diff --git a/src/Models/Tables/EntityMSkillTable.cs b/src/Models/Tables/EntityMSkillTable.cs new file mode 100644 index 0000000..e39c759 --- /dev/null +++ b/src/Models/Tables/EntityMSkillTable.cs @@ -0,0 +1,17 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSkillTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSkillTable(EntityMSkill[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.SkillId; + } + + public EntityMSkill FindBySkillId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); + + public bool TryFindBySkillId(int key, out EntityMSkill result) => TryFindUniqueCore(data, primaryIndexSelector, Comparer.Default, key, out result); +} diff --git a/src/Models/Tables/EntityMSmartphoneChatGroupMessageTable.cs b/src/Models/Tables/EntityMSmartphoneChatGroupMessageTable.cs new file mode 100644 index 0000000..8185870 --- /dev/null +++ b/src/Models/Tables/EntityMSmartphoneChatGroupMessageTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSmartphoneChatGroupMessageTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSmartphoneChatGroupMessageTable(EntityMSmartphoneChatGroupMessage[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.SmartphoneChatGroupId, element.SortOrder); + } + + public RangeView FindRangeBySmartphoneChatGroupIdAndSortOrder(ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityMSmartphoneChatGroupTable.cs b/src/Models/Tables/EntityMSmartphoneChatGroupTable.cs new file mode 100644 index 0000000..e6bb0a3 --- /dev/null +++ b/src/Models/Tables/EntityMSmartphoneChatGroupTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSmartphoneChatGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSmartphoneChatGroupTable(EntityMSmartphoneChatGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.SmartphoneChatGroupId; + } + + public RangeView FindRangeBySmartphoneChatGroupId(int min, int max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityMSpeakerTable.cs b/src/Models/Tables/EntityMSpeakerTable.cs new file mode 100644 index 0000000..b880b02 --- /dev/null +++ b/src/Models/Tables/EntityMSpeakerTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMSpeakerTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMSpeakerTable(EntityMSpeaker[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.ActorObjectId; + } + + public EntityMSpeaker FindByActorObjectId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMStainedGlassStatusUpGroupTable.cs b/src/Models/Tables/EntityMStainedGlassStatusUpGroupTable.cs new file mode 100644 index 0000000..9d07b6b --- /dev/null +++ b/src/Models/Tables/EntityMStainedGlassStatusUpGroupTable.cs @@ -0,0 +1,17 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMStainedGlassStatusUpGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + private readonly Func secondaryIndexSelector; + + public EntityMStainedGlassStatusUpGroupTable(EntityMStainedGlassStatusUpGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.StainedGlassStatusUpGroupId, element.GroupIndex); + secondaryIndexSelector = element => element.StainedGlassStatusUpGroupId; + } + + public RangeView FindByStainedGlassStatusUpGroupId(int key) => FindManyCore(data, secondaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMStainedGlassStatusUpTargetGroupTable.cs b/src/Models/Tables/EntityMStainedGlassStatusUpTargetGroupTable.cs new file mode 100644 index 0000000..6459837 --- /dev/null +++ b/src/Models/Tables/EntityMStainedGlassStatusUpTargetGroupTable.cs @@ -0,0 +1,17 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMStainedGlassStatusUpTargetGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + private readonly Func secondaryIndexSelector; + + public EntityMStainedGlassStatusUpTargetGroupTable(EntityMStainedGlassStatusUpTargetGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.StainedGlassStatusUpTargetGroupId, element.GroupIndex); + secondaryIndexSelector = element => element.StainedGlassStatusUpTargetGroupId; + } + + public RangeView FindByStainedGlassStatusUpTargetGroupId(int key) => FindManyCore(data, secondaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMStainedGlassTable.cs b/src/Models/Tables/EntityMStainedGlassTable.cs new file mode 100644 index 0000000..4dab215 --- /dev/null +++ b/src/Models/Tables/EntityMStainedGlassTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMStainedGlassTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMStainedGlassTable(EntityMStainedGlass[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.StainedGlassId; + } + + public EntityMStainedGlass FindByStainedGlassId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMThoughtTable.cs b/src/Models/Tables/EntityMThoughtTable.cs new file mode 100644 index 0000000..4d65b3a --- /dev/null +++ b/src/Models/Tables/EntityMThoughtTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMThoughtTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMThoughtTable(EntityMThought[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.ThoughtId; + } + + public bool TryFindByThoughtId(int key, out EntityMThought result) => TryFindUniqueCore(data, primaryIndexSelector, Comparer.Default, key, out result); +} diff --git a/src/Models/Tables/EntityMTipBackgroundAssetTable.cs b/src/Models/Tables/EntityMTipBackgroundAssetTable.cs new file mode 100644 index 0000000..62b28bb --- /dev/null +++ b/src/Models/Tables/EntityMTipBackgroundAssetTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMTipBackgroundAssetTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMTipBackgroundAssetTable(EntityMTipBackgroundAsset[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.TipBackgroundAssetId; + } + + public EntityMTipBackgroundAsset FindByTipBackgroundAssetId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMTipDisplayConditionGroupTable.cs b/src/Models/Tables/EntityMTipDisplayConditionGroupTable.cs new file mode 100644 index 0000000..1e03172 --- /dev/null +++ b/src/Models/Tables/EntityMTipDisplayConditionGroupTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMTipDisplayConditionGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMTipDisplayConditionGroupTable(EntityMTipDisplayConditionGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.TipDisplayConditionGroupId, element.SortOrder); + } + + public RangeView FindRangeByTipDisplayConditionGroupIdAndSortOrder(ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityMTipGroupBackgroundAssetRelationTable.cs b/src/Models/Tables/EntityMTipGroupBackgroundAssetRelationTable.cs new file mode 100644 index 0000000..aa66fc3 --- /dev/null +++ b/src/Models/Tables/EntityMTipGroupBackgroundAssetRelationTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMTipGroupBackgroundAssetRelationTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMTipGroupBackgroundAssetRelationTable(EntityMTipGroupBackgroundAssetRelation[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.TipGroupId, element.TipBackgroundAssetId); + } +} diff --git a/src/Models/Tables/EntityMTipGroupBackgroundAssetTable.cs b/src/Models/Tables/EntityMTipGroupBackgroundAssetTable.cs new file mode 100644 index 0000000..ea1ed2f --- /dev/null +++ b/src/Models/Tables/EntityMTipGroupBackgroundAssetTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMTipGroupBackgroundAssetTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMTipGroupBackgroundAssetTable(EntityMTipGroupBackgroundAsset[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.TipGroupId, element.BackgroundAssetName); + } +} diff --git a/src/Models/Tables/EntityMTipGroupSelectionTable.cs b/src/Models/Tables/EntityMTipGroupSelectionTable.cs new file mode 100644 index 0000000..beb2cf8 --- /dev/null +++ b/src/Models/Tables/EntityMTipGroupSelectionTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMTipGroupSelectionTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMTipGroupSelectionTable(EntityMTipGroupSelection[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.TipGroupId, element.TipId); + } +} diff --git a/src/Models/Tables/EntityMTipGroupSituationSeasonTable.cs b/src/Models/Tables/EntityMTipGroupSituationSeasonTable.cs new file mode 100644 index 0000000..e5ea39b --- /dev/null +++ b/src/Models/Tables/EntityMTipGroupSituationSeasonTable.cs @@ -0,0 +1,14 @@ +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Tables; + +public class EntityMTipGroupSituationSeasonTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMTipGroupSituationSeasonTable(EntityMTipGroupSituationSeason[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.TipSituationType, element.TipSituationSeasonId, element.TipGroupId); + } +} diff --git a/src/Models/Tables/EntityMTipGroupSituationTable.cs b/src/Models/Tables/EntityMTipGroupSituationTable.cs new file mode 100644 index 0000000..ace5301 --- /dev/null +++ b/src/Models/Tables/EntityMTipGroupSituationTable.cs @@ -0,0 +1,14 @@ +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Tables; + +public class EntityMTipGroupSituationTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMTipGroupSituationTable(EntityMTipGroupSituation[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.TipSituationType, element.TipGroupId); + } +} diff --git a/src/Models/Tables/EntityMTipGroupTable.cs b/src/Models/Tables/EntityMTipGroupTable.cs new file mode 100644 index 0000000..12baade --- /dev/null +++ b/src/Models/Tables/EntityMTipGroupTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMTipGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMTipGroupTable(EntityMTipGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.TipGroupId; + } + + public EntityMTipGroup FindByTipGroupId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMTipTable.cs b/src/Models/Tables/EntityMTipTable.cs new file mode 100644 index 0000000..6e8f10d --- /dev/null +++ b/src/Models/Tables/EntityMTipTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMTipTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMTipTable(EntityMTip[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.TipId; + } + + public EntityMTip FindByTipId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMTitleFlowMovieTable.cs b/src/Models/Tables/EntityMTitleFlowMovieTable.cs new file mode 100644 index 0000000..9002115 --- /dev/null +++ b/src/Models/Tables/EntityMTitleFlowMovieTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMTitleFlowMovieTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMTitleFlowMovieTable(EntityMTitleFlowMovie[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.TitleFlowMovieId; + } +} diff --git a/src/Models/Tables/EntityMTitleStillGroupTable.cs b/src/Models/Tables/EntityMTitleStillGroupTable.cs new file mode 100644 index 0000000..4c1e38b --- /dev/null +++ b/src/Models/Tables/EntityMTitleStillGroupTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMTitleStillGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMTitleStillGroupTable(EntityMTitleStillGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.TitleStillGroupId; + } + + public EntityMTitleStillGroup FindByTitleStillGroupId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMTitleStillTable.cs b/src/Models/Tables/EntityMTitleStillTable.cs new file mode 100644 index 0000000..c9f6b61 --- /dev/null +++ b/src/Models/Tables/EntityMTitleStillTable.cs @@ -0,0 +1,19 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMTitleStillTable : TableBase +{ + private readonly Func primaryIndexSelector; + private readonly Func secondaryIndexSelector; + + public EntityMTitleStillTable(EntityMTitleStill[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.TitleStillId; + secondaryIndexSelector = element => element.TitleStillGroupId; + } + + public EntityMTitleStill FindByTitleStillId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); + + public RangeView FindByTitleStillGroupId(int key) => FindManyCore(data, secondaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMTutorialConsumePossessionGroupTable.cs b/src/Models/Tables/EntityMTutorialConsumePossessionGroupTable.cs new file mode 100644 index 0000000..3d09e21 --- /dev/null +++ b/src/Models/Tables/EntityMTutorialConsumePossessionGroupTable.cs @@ -0,0 +1,20 @@ +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Tables; + +public class EntityMTutorialConsumePossessionGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + private readonly Func secondaryIndexSelector; + + public EntityMTutorialConsumePossessionGroupTable(EntityMTutorialConsumePossessionGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.TutorialType, element.PossessionType, element.PossessionId); + secondaryIndexSelector = element => element.TutorialType; + } + + public RangeView FindByTutorialType(TutorialType key) => + FindManyCore(data, secondaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMTutorialDialogTable.cs b/src/Models/Tables/EntityMTutorialDialogTable.cs new file mode 100644 index 0000000..e4e7bf1 --- /dev/null +++ b/src/Models/Tables/EntityMTutorialDialogTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Tables; + +public class EntityMTutorialDialogTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMTutorialDialogTable(EntityMTutorialDialog[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.TutorialType; + } + + public EntityMTutorialDialog FindByTutorialType(TutorialType key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMTutorialUnlockConditionTable.cs b/src/Models/Tables/EntityMTutorialUnlockConditionTable.cs new file mode 100644 index 0000000..704e623 --- /dev/null +++ b/src/Models/Tables/EntityMTutorialUnlockConditionTable.cs @@ -0,0 +1,19 @@ +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Tables; + +public class EntityMTutorialUnlockConditionTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMTutorialUnlockConditionTable(EntityMTutorialUnlockCondition[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.TutorialType; + } + + public EntityMTutorialUnlockCondition FindByTutorialType(TutorialType key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); + + public bool TryFindByTutorialType(TutorialType key, out EntityMTutorialUnlockCondition result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer.Default, key, out result); +} diff --git a/src/Models/Tables/EntityMUserLevelTable.cs b/src/Models/Tables/EntityMUserLevelTable.cs new file mode 100644 index 0000000..55db84b --- /dev/null +++ b/src/Models/Tables/EntityMUserLevelTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMUserLevelTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMUserLevelTable(EntityMUserLevel[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.UserLevel; + } + + public EntityMUserLevel FindByUserLevel(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMUserQuestSceneGrantPossessionTable.cs b/src/Models/Tables/EntityMUserQuestSceneGrantPossessionTable.cs new file mode 100644 index 0000000..4c3800e --- /dev/null +++ b/src/Models/Tables/EntityMUserQuestSceneGrantPossessionTable.cs @@ -0,0 +1,17 @@ +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Tables; + +public class EntityMUserQuestSceneGrantPossessionTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMUserQuestSceneGrantPossessionTable(EntityMUserQuestSceneGrantPossession[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.QuestSceneId, element.PossessionType, element.PossessionId); + } + + public RangeView FindRangeByQuestSceneIdAndPossessionTypeAndPossessionId(ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer<(int, PossessionType, int)>.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityMWeaponAbilityEnhancementMaterialTable.cs b/src/Models/Tables/EntityMWeaponAbilityEnhancementMaterialTable.cs new file mode 100644 index 0000000..335a313 --- /dev/null +++ b/src/Models/Tables/EntityMWeaponAbilityEnhancementMaterialTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMWeaponAbilityEnhancementMaterialTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMWeaponAbilityEnhancementMaterialTable(EntityMWeaponAbilityEnhancementMaterial[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.WeaponAbilityEnhancementMaterialId, element.AbilityLevel, element.MaterialId); + } + + public RangeView FindRangeByWeaponAbilityEnhancementMaterialIdAndAbilityLevelAndMaterialId(ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer<(int, int, int)>.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityMWeaponAbilityGroupTable.cs b/src/Models/Tables/EntityMWeaponAbilityGroupTable.cs new file mode 100644 index 0000000..664166b --- /dev/null +++ b/src/Models/Tables/EntityMWeaponAbilityGroupTable.cs @@ -0,0 +1,18 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMWeaponAbilityGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMWeaponAbilityGroupTable(EntityMWeaponAbilityGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.WeaponAbilityGroupId, element.SlotNumber); + } + + public EntityMWeaponAbilityGroup FindByWeaponAbilityGroupIdAndSlotNumber(ValueTuple key) => FindUniqueCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, key); + + public RangeView FindRangeByWeaponAbilityGroupIdAndSlotNumber(ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityMWeaponAwakenAbilityTable.cs b/src/Models/Tables/EntityMWeaponAwakenAbilityTable.cs new file mode 100644 index 0000000..da539d0 --- /dev/null +++ b/src/Models/Tables/EntityMWeaponAwakenAbilityTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMWeaponAwakenAbilityTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMWeaponAwakenAbilityTable(EntityMWeaponAwakenAbility[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.WeaponAwakenAbilityId; + } + + public EntityMWeaponAwakenAbility FindByWeaponAwakenAbilityId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMWeaponAwakenEffectGroupTable.cs b/src/Models/Tables/EntityMWeaponAwakenEffectGroupTable.cs new file mode 100644 index 0000000..f787d91 --- /dev/null +++ b/src/Models/Tables/EntityMWeaponAwakenEffectGroupTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMWeaponAwakenEffectGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMWeaponAwakenEffectGroupTable(EntityMWeaponAwakenEffectGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.WeaponAwakenEffectGroupId, element.WeaponAwakenEffectType); + } + + public EntityMWeaponAwakenEffectGroup FindByWeaponAwakenEffectGroupIdAndWeaponAwakenEffectType(ValueTuple key) => + FindUniqueCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, key); +} diff --git a/src/Models/Tables/EntityMWeaponAwakenMaterialGroupTable.cs b/src/Models/Tables/EntityMWeaponAwakenMaterialGroupTable.cs new file mode 100644 index 0000000..4e850b3 --- /dev/null +++ b/src/Models/Tables/EntityMWeaponAwakenMaterialGroupTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMWeaponAwakenMaterialGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMWeaponAwakenMaterialGroupTable(EntityMWeaponAwakenMaterialGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.WeaponAwakenMaterialGroupId, element.MaterialId); + } + + public RangeView FindRangeByWeaponAwakenMaterialGroupIdAndMaterialId(ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityMWeaponAwakenStatusUpGroupTable.cs b/src/Models/Tables/EntityMWeaponAwakenStatusUpGroupTable.cs new file mode 100644 index 0000000..9ae091f --- /dev/null +++ b/src/Models/Tables/EntityMWeaponAwakenStatusUpGroupTable.cs @@ -0,0 +1,18 @@ +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Tables; + +public class EntityMWeaponAwakenStatusUpGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + private readonly Func secondaryIndexSelector; + + public EntityMWeaponAwakenStatusUpGroupTable(EntityMWeaponAwakenStatusUpGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.WeaponAwakenStatusUpGroupId, element.StatusKindType, element.StatusCalculationType); + secondaryIndexSelector = element => element.WeaponAwakenStatusUpGroupId; + } + + public RangeView FindByWeaponAwakenStatusUpGroupId(int key) => FindManyCore(data, secondaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMWeaponAwakenTable.cs b/src/Models/Tables/EntityMWeaponAwakenTable.cs new file mode 100644 index 0000000..9dfaf4d --- /dev/null +++ b/src/Models/Tables/EntityMWeaponAwakenTable.cs @@ -0,0 +1,17 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMWeaponAwakenTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMWeaponAwakenTable(EntityMWeaponAwaken[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.WeaponId; + } + + public EntityMWeaponAwaken FindByWeaponId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); + + public bool TryFindByWeaponId(int key, out EntityMWeaponAwaken result) => TryFindUniqueCore(data, primaryIndexSelector, Comparer.Default, key, out result); +} diff --git a/src/Models/Tables/EntityMWeaponBaseStatusTable.cs b/src/Models/Tables/EntityMWeaponBaseStatusTable.cs new file mode 100644 index 0000000..3024f64 --- /dev/null +++ b/src/Models/Tables/EntityMWeaponBaseStatusTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMWeaponBaseStatusTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMWeaponBaseStatusTable(EntityMWeaponBaseStatus[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.WeaponBaseStatusId; + } + + public EntityMWeaponBaseStatus FindByWeaponBaseStatusId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMWeaponConsumeExchangeConsumableItemGroupTable.cs b/src/Models/Tables/EntityMWeaponConsumeExchangeConsumableItemGroupTable.cs new file mode 100644 index 0000000..c417cbb --- /dev/null +++ b/src/Models/Tables/EntityMWeaponConsumeExchangeConsumableItemGroupTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMWeaponConsumeExchangeConsumableItemGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMWeaponConsumeExchangeConsumableItemGroupTable(EntityMWeaponConsumeExchangeConsumableItemGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.WeaponId, element.ConsumableItemId); + } + + public EntityMWeaponConsumeExchangeConsumableItemGroup FindByWeaponIdAndConsumableItemId(ValueTuple key) => + FindUniqueCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, key); +} diff --git a/src/Models/Tables/EntityMWeaponEnhancedAbilityTable.cs b/src/Models/Tables/EntityMWeaponEnhancedAbilityTable.cs new file mode 100644 index 0000000..20527a9 --- /dev/null +++ b/src/Models/Tables/EntityMWeaponEnhancedAbilityTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMWeaponEnhancedAbilityTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMWeaponEnhancedAbilityTable(EntityMWeaponEnhancedAbility[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.WeaponEnhancedId, element.AbilityId); + } + + public bool TryFindByWeaponEnhancedIdAndAbilityId(ValueTuple key, out EntityMWeaponEnhancedAbility result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, key, out result); +} diff --git a/src/Models/Tables/EntityMWeaponEnhancedSkillTable.cs b/src/Models/Tables/EntityMWeaponEnhancedSkillTable.cs new file mode 100644 index 0000000..01c19c8 --- /dev/null +++ b/src/Models/Tables/EntityMWeaponEnhancedSkillTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMWeaponEnhancedSkillTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMWeaponEnhancedSkillTable(EntityMWeaponEnhancedSkill[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.WeaponEnhancedId, element.SkillId); + } + + public bool TryFindByWeaponEnhancedIdAndSkillId(ValueTuple key, out EntityMWeaponEnhancedSkill result) => + TryFindUniqueCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, key, out result); +} diff --git a/src/Models/Tables/EntityMWeaponEnhancedTable.cs b/src/Models/Tables/EntityMWeaponEnhancedTable.cs new file mode 100644 index 0000000..aeb912f --- /dev/null +++ b/src/Models/Tables/EntityMWeaponEnhancedTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMWeaponEnhancedTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMWeaponEnhancedTable(EntityMWeaponEnhanced[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.WeaponEnhancedId; + } + + public bool TryFindByWeaponEnhancedId(int key, out EntityMWeaponEnhanced result) => TryFindUniqueCore(data, primaryIndexSelector, Comparer.Default, key, out result); +} diff --git a/src/Models/Tables/EntityMWeaponEvolutionGroupTable.cs b/src/Models/Tables/EntityMWeaponEvolutionGroupTable.cs new file mode 100644 index 0000000..1a67461 --- /dev/null +++ b/src/Models/Tables/EntityMWeaponEvolutionGroupTable.cs @@ -0,0 +1,39 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMWeaponEvolutionGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + private readonly Func secondaryIndexSelector; + + public EntityMWeaponEvolutionGroupTable(EntityMWeaponEvolutionGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.WeaponEvolutionGroupId, element.EvolutionOrder); + secondaryIndexSelector = element => (element.WeaponEvolutionGroupId, element.WeaponId); + } + + public EntityMWeaponEvolutionGroup FindByWeaponEvolutionGroupIdAndEvolutionOrder(ValueTuple key) => + FindUniqueCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, key); + + public EntityMWeaponEvolutionGroup FindClosestByWeaponEvolutionGroupIdAndEvolutionOrder(ValueTuple key, bool selectLower = true) => + FindUniqueClosestCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, key, selectLower); + + public RangeView FindByWeaponEvolutionGroupId(int key) + { + var result = data + .Where(x => x.WeaponEvolutionGroupId == key) + .ToArray(); + + return new RangeView(result, 0, result.Length, true); + } + + public RangeView FindByWeaponId(int key) + { + var result = data + .Where(x => x.WeaponId == key) + .ToArray(); + + return new RangeView(result, 0, result.Length, true); + } +} diff --git a/src/Models/Tables/EntityMWeaponEvolutionMaterialGroupTable.cs b/src/Models/Tables/EntityMWeaponEvolutionMaterialGroupTable.cs new file mode 100644 index 0000000..f8a612e --- /dev/null +++ b/src/Models/Tables/EntityMWeaponEvolutionMaterialGroupTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMWeaponEvolutionMaterialGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMWeaponEvolutionMaterialGroupTable(EntityMWeaponEvolutionMaterialGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.WeaponEvolutionMaterialGroupId, element.MaterialId); + } +} diff --git a/src/Models/Tables/EntityMWeaponFieldEffectDecreasePointTable.cs b/src/Models/Tables/EntityMWeaponFieldEffectDecreasePointTable.cs new file mode 100644 index 0000000..0a071d0 --- /dev/null +++ b/src/Models/Tables/EntityMWeaponFieldEffectDecreasePointTable.cs @@ -0,0 +1,21 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMWeaponFieldEffectDecreasePointTable : TableBase +{ + private readonly Func primaryIndexSelector; + private readonly Func secondaryIndexSelector; + + public EntityMWeaponFieldEffectDecreasePointTable(EntityMWeaponFieldEffectDecreasePoint[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.WeaponId, element.RelationIndex); + secondaryIndexSelector = element => (element.WeaponId, element.IsWeaponAwaken); + } + + public RangeView FindRangeByWeaponIdAndRelationIndex(ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, min, max, ascendant); + + public RangeView FindRangeByWeaponIdAndIsWeaponAwaken(ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, secondaryIndexSelector, Comparer<(int, bool)>.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityMWeaponRarityLimitBreakMaterialGroupTable.cs b/src/Models/Tables/EntityMWeaponRarityLimitBreakMaterialGroupTable.cs new file mode 100644 index 0000000..dd2cd40 --- /dev/null +++ b/src/Models/Tables/EntityMWeaponRarityLimitBreakMaterialGroupTable.cs @@ -0,0 +1,14 @@ +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Tables; + +public class EntityMWeaponRarityLimitBreakMaterialGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMWeaponRarityLimitBreakMaterialGroupTable(EntityMWeaponRarityLimitBreakMaterialGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.RarityType, element.MaterialId); + } +} diff --git a/src/Models/Tables/EntityMWeaponRarityTable.cs b/src/Models/Tables/EntityMWeaponRarityTable.cs new file mode 100644 index 0000000..53a4b5a --- /dev/null +++ b/src/Models/Tables/EntityMWeaponRarityTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Tables; + +public class EntityMWeaponRarityTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMWeaponRarityTable(EntityMWeaponRarity[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.RarityType; + } + + public EntityMWeaponRarity FindByRarityType(RarityType key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMWeaponSkillEnhancementMaterialTable.cs b/src/Models/Tables/EntityMWeaponSkillEnhancementMaterialTable.cs new file mode 100644 index 0000000..d75424e --- /dev/null +++ b/src/Models/Tables/EntityMWeaponSkillEnhancementMaterialTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMWeaponSkillEnhancementMaterialTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMWeaponSkillEnhancementMaterialTable(EntityMWeaponSkillEnhancementMaterial[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.WeaponSkillEnhancementMaterialId, element.SkillLevel, element.MaterialId); + } + + public RangeView FindRangeByWeaponSkillEnhancementMaterialIdAndSkillLevelAndMaterialId(ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer<(int, int, int)>.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityMWeaponSkillGroupTable.cs b/src/Models/Tables/EntityMWeaponSkillGroupTable.cs new file mode 100644 index 0000000..3994398 --- /dev/null +++ b/src/Models/Tables/EntityMWeaponSkillGroupTable.cs @@ -0,0 +1,18 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMWeaponSkillGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMWeaponSkillGroupTable(EntityMWeaponSkillGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.WeaponSkillGroupId, element.SlotNumber); + } + + public EntityMWeaponSkillGroup FindByWeaponSkillGroupIdAndSlotNumber(ValueTuple key) => FindUniqueCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, key); + + public RangeView FindRangeByWeaponSkillGroupIdAndSlotNumber(ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityMWeaponSpecificEnhanceTable.cs b/src/Models/Tables/EntityMWeaponSpecificEnhanceTable.cs new file mode 100644 index 0000000..6012137 --- /dev/null +++ b/src/Models/Tables/EntityMWeaponSpecificEnhanceTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMWeaponSpecificEnhanceTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMWeaponSpecificEnhanceTable(EntityMWeaponSpecificEnhance[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.WeaponSpecificEnhanceId; + } + + public EntityMWeaponSpecificEnhance FindByWeaponSpecificEnhanceId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMWeaponSpecificLimitBreakMaterialGroupTable.cs b/src/Models/Tables/EntityMWeaponSpecificLimitBreakMaterialGroupTable.cs new file mode 100644 index 0000000..f0beab5 --- /dev/null +++ b/src/Models/Tables/EntityMWeaponSpecificLimitBreakMaterialGroupTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMWeaponSpecificLimitBreakMaterialGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMWeaponSpecificLimitBreakMaterialGroupTable(EntityMWeaponSpecificLimitBreakMaterialGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.WeaponSpecificLimitBreakMaterialGroupId, element.LimitBreakCountLowerLimit, element.MaterialId); + } +} diff --git a/src/Models/Tables/EntityMWeaponStatusCalculationTable.cs b/src/Models/Tables/EntityMWeaponStatusCalculationTable.cs new file mode 100644 index 0000000..8398ea4 --- /dev/null +++ b/src/Models/Tables/EntityMWeaponStatusCalculationTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMWeaponStatusCalculationTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMWeaponStatusCalculationTable(EntityMWeaponStatusCalculation[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.WeaponStatusCalculationId; + } + + public EntityMWeaponStatusCalculation FindByWeaponStatusCalculationId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMWeaponStoryReleaseConditionGroupTable.cs b/src/Models/Tables/EntityMWeaponStoryReleaseConditionGroupTable.cs new file mode 100644 index 0000000..a8429b1 --- /dev/null +++ b/src/Models/Tables/EntityMWeaponStoryReleaseConditionGroupTable.cs @@ -0,0 +1,19 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMWeaponStoryReleaseConditionGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMWeaponStoryReleaseConditionGroupTable(EntityMWeaponStoryReleaseConditionGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.WeaponStoryReleaseConditionGroupId, element.StoryIndex); + } + + public EntityMWeaponStoryReleaseConditionGroup FindByWeaponStoryReleaseConditionGroupIdAndStoryIndex(ValueTuple key) => + FindUniqueCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, key); + + public RangeView FindRangeByWeaponStoryReleaseConditionGroupIdAndStoryIndex(ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityMWeaponStoryReleaseConditionOperationGroupTable.cs b/src/Models/Tables/EntityMWeaponStoryReleaseConditionOperationGroupTable.cs new file mode 100644 index 0000000..a71aed3 --- /dev/null +++ b/src/Models/Tables/EntityMWeaponStoryReleaseConditionOperationGroupTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMWeaponStoryReleaseConditionOperationGroupTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMWeaponStoryReleaseConditionOperationGroupTable(EntityMWeaponStoryReleaseConditionOperationGroup[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.WeaponStoryReleaseConditionOperationGroupId; + } + + public EntityMWeaponStoryReleaseConditionOperationGroup FindByWeaponStoryReleaseConditionOperationGroupId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMWeaponStoryReleaseConditionOperationTable.cs b/src/Models/Tables/EntityMWeaponStoryReleaseConditionOperationTable.cs new file mode 100644 index 0000000..aef5367 --- /dev/null +++ b/src/Models/Tables/EntityMWeaponStoryReleaseConditionOperationTable.cs @@ -0,0 +1,16 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMWeaponStoryReleaseConditionOperationTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMWeaponStoryReleaseConditionOperationTable(EntityMWeaponStoryReleaseConditionOperation[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.WeaponStoryReleaseConditionOperationGroupId, element.SortOrder); + } + + public RangeView FindRangeByWeaponStoryReleaseConditionOperationGroupIdAndSortOrder(ValueTuple min, ValueTuple max, bool ascendant = true) => + FindUniqueRangeCore(data, primaryIndexSelector, Comparer<(int, int)>.Default, min, max, ascendant); +} diff --git a/src/Models/Tables/EntityMWeaponTable.cs b/src/Models/Tables/EntityMWeaponTable.cs new file mode 100644 index 0000000..0e56f81 --- /dev/null +++ b/src/Models/Tables/EntityMWeaponTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMWeaponTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMWeaponTable(EntityMWeapon[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.WeaponId; + } + + public EntityMWeapon FindByWeaponId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMWebviewMissionTable.cs b/src/Models/Tables/EntityMWebviewMissionTable.cs new file mode 100644 index 0000000..70e44e5 --- /dev/null +++ b/src/Models/Tables/EntityMWebviewMissionTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMWebviewMissionTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMWebviewMissionTable(EntityMWebviewMission[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.WebviewMissionId; + } +} diff --git a/src/Models/Tables/EntityMWebviewMissionTitleTextTable.cs b/src/Models/Tables/EntityMWebviewMissionTitleTextTable.cs new file mode 100644 index 0000000..ef8e587 --- /dev/null +++ b/src/Models/Tables/EntityMWebviewMissionTitleTextTable.cs @@ -0,0 +1,17 @@ +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Tables; + +public class EntityMWebviewMissionTitleTextTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMWebviewMissionTitleTextTable(EntityMWebviewMissionTitleText[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.WebviewMissionTitleTextId, element.LanguageType); + } + + public EntityMWebviewMissionTitleText FindByWebviewMissionTitleTextIdAndLanguageType(ValueTuple key) => + FindUniqueCore(data, primaryIndexSelector, Comparer<(int, LanguageType)>.Default, key); +} diff --git a/src/Models/Tables/EntityMWebviewPanelMissionCompleteFlavorTextTable.cs b/src/Models/Tables/EntityMWebviewPanelMissionCompleteFlavorTextTable.cs new file mode 100644 index 0000000..b50b523 --- /dev/null +++ b/src/Models/Tables/EntityMWebviewPanelMissionCompleteFlavorTextTable.cs @@ -0,0 +1,17 @@ +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; + +namespace MariesWonderland.Models.Tables; + +public class EntityMWebviewPanelMissionCompleteFlavorTextTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMWebviewPanelMissionCompleteFlavorTextTable(EntityMWebviewPanelMissionCompleteFlavorText[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.WebviewPanelMissionCompleteFlavorTextId, element.LanguageType); + } + + public EntityMWebviewPanelMissionCompleteFlavorText FindByWebviewPanelMissionCompleteFlavorTextIdAndLanguageType(ValueTuple key) => + FindUniqueCore(data, primaryIndexSelector, Comparer<(int, LanguageType)>.Default, key); +} diff --git a/src/Models/Tables/EntityMWebviewPanelMissionPageTable.cs b/src/Models/Tables/EntityMWebviewPanelMissionPageTable.cs new file mode 100644 index 0000000..3d9514b --- /dev/null +++ b/src/Models/Tables/EntityMWebviewPanelMissionPageTable.cs @@ -0,0 +1,15 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMWebviewPanelMissionPageTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMWebviewPanelMissionPageTable(EntityMWebviewPanelMissionPage[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => element.WebviewPanelMissionPageId; + } + + public EntityMWebviewPanelMissionPage FindByWebviewPanelMissionPageId(int key) => FindUniqueCore(data, primaryIndexSelector, Comparer.Default, key); +} diff --git a/src/Models/Tables/EntityMWebviewPanelMissionTable.cs b/src/Models/Tables/EntityMWebviewPanelMissionTable.cs new file mode 100644 index 0000000..cc81585 --- /dev/null +++ b/src/Models/Tables/EntityMWebviewPanelMissionTable.cs @@ -0,0 +1,13 @@ +using MariesWonderland.Models.Entities; + +namespace MariesWonderland.Models.Tables; + +public class EntityMWebviewPanelMissionTable : TableBase +{ + private readonly Func primaryIndexSelector; + + public EntityMWebviewPanelMissionTable(EntityMWebviewPanelMission[] sortedData) : base(sortedData) + { + primaryIndexSelector = element => (element.WebviewPanelMissionId, element.Page); + } +} diff --git a/src/Models/Tables/RangeView.cs b/src/Models/Tables/RangeView.cs new file mode 100644 index 0000000..77ffa60 --- /dev/null +++ b/src/Models/Tables/RangeView.cs @@ -0,0 +1,51 @@ +using System.Collections; + +namespace MariesWonderland.Models.Tables; + +public readonly struct RangeView : IReadOnlyList +{ + public static RangeView Empty; + + private readonly T[] OrderedData; + + private readonly int Left; + + private readonly int Right; + + private readonly bool Ascendant; + + private readonly bool HasValue; + + public int Count => HasValue ? Right + 1 - Left : 0; + + public T this[int index] + { + get + { + index = Ascendant ? Left + index : Right - index; + return OrderedData[index]; + } + } + + public RangeView(T[] orderedData, int left, int right, bool ascendant) + { + OrderedData = orderedData; + Left = left; + Right = right; + Ascendant = ascendant; + HasValue = left <= right && orderedData.Length != 0; + } + + public IEnumerator GetEnumerator() + { + var enumeration = OrderedData.Skip(Left).Take(Count); + if (!Ascendant) + { + enumeration = enumeration.Reverse(); + } + + return enumeration.GetEnumerator(); + } + + IEnumerator IEnumerable.GetEnumerator() => GetEnumerator(); +} diff --git a/src/Models/Tables/TableBase.cs b/src/Models/Tables/TableBase.cs new file mode 100644 index 0000000..f03869f --- /dev/null +++ b/src/Models/Tables/TableBase.cs @@ -0,0 +1,68 @@ +namespace MariesWonderland.Models.Tables; + +public abstract class TableBase +{ + protected TElement[] data; + + public int Count => data.Length; + + public RangeView All => new(data, 0, data.Length - 1, true); + + public TElement[] GetRawDataUnsafe() => data; + + public void SetRawDataUnsafe(TElement[] data) => this.data = data; + + protected TableBase(TElement[] sortedData) + { + data = sortedData; + } + + protected static TElement ThrowKeyNotFound(TKey key) + { + throw new KeyNotFoundException($"DataType: {key.GetType().Name}, Key: {key}"); + } + + protected static TElement FindUniqueCore(TElement[] indexArray, Func keySelector, IComparer comparer, TKey key, bool throwIfNotFound = false) + { + var foundElement = Array.Find(indexArray, x => comparer.Compare(keySelector(x), key) == 0); + + if (foundElement == null && throwIfNotFound) + { + ThrowKeyNotFound(key); + } + + return foundElement!; + } + + protected static bool TryFindUniqueCore(TElement[] indexArray, Func keySelector, IComparer comparer, TKey key, out TElement result) + { + result = Array.Find(indexArray, x => comparer.Compare(keySelector(x), key) == 0); + + return result != null; + } + + protected static TElement FindUniqueClosestCore(TElement[] indexArray, Func keySelector, IComparer comparer, TKey key, bool selectLower) + { + var ordered = indexArray.Select(x => (comparer.Compare(keySelector(x), key), x)).OrderBy(x => x.Item1); + + return selectLower + ? ordered.LastOrDefault(x => x.Item1 <= 0).x + : ordered.FirstOrDefault(x => x.Item1 >= 0).x; + } + + protected static RangeView FindUniqueRangeCore(TElement[] indexArray, Func keySelector, IComparer comparer, TKey min, TKey max, bool ascendant) + { + var keys = indexArray.Select(keySelector).ToArray(); + var left = Array.FindIndex(keys, key => comparer.Compare(key, min) >= 0); + var right = Array.FindLastIndex(keys, key => comparer.Compare(key, max) <= 0); + + return new RangeView(indexArray, left, right, ascendant); + } + + protected static RangeView FindManyCore(TElement[] indexKeys, Func keySelector, IComparer comparer, TKey key) + { + var foundElements = indexKeys.Where(x => comparer.Compare(keySelector(x), key) == 0).ToArray(); + + return new RangeView(foundElements, 0, foundElements.Length - 1, true); + } +} diff --git a/src/Models/Type/AbilityBehaviourStatusApplyScopeType.cs b/src/Models/Type/AbilityBehaviourStatusApplyScopeType.cs new file mode 100644 index 0000000..f46a96b --- /dev/null +++ b/src/Models/Type/AbilityBehaviourStatusApplyScopeType.cs @@ -0,0 +1,8 @@ +namespace MariesWonderland.Models.Type; + +public enum AbilityBehaviourStatusApplyScopeType +{ + UNKNOWN = 0, + ACTOR = 1, + PARTY = 2 +} diff --git a/src/Models/Type/AbilityBehaviourStatusChangeType.cs b/src/Models/Type/AbilityBehaviourStatusChangeType.cs new file mode 100644 index 0000000..3624a4e --- /dev/null +++ b/src/Models/Type/AbilityBehaviourStatusChangeType.cs @@ -0,0 +1,8 @@ +namespace MariesWonderland.Models.Type; + +public enum AbilityBehaviourStatusChangeType +{ + UNKNOWN = 0, + ADD = 1, + MULTIPLY = 2 +} diff --git a/src/Models/Type/AbilityBehaviourStatusOrganizationConditionType.cs b/src/Models/Type/AbilityBehaviourStatusOrganizationConditionType.cs new file mode 100644 index 0000000..27d4a11 --- /dev/null +++ b/src/Models/Type/AbilityBehaviourStatusOrganizationConditionType.cs @@ -0,0 +1,10 @@ +namespace MariesWonderland.Models.Type; + +public enum AbilityBehaviourStatusOrganizationConditionType +{ + UNKNOWN = 0, + COSTUME = 1, + WEAPON = 2, + COMPANION = 3, + ALL = 4 +} diff --git a/src/Models/Type/AbilityBehaviourType.cs b/src/Models/Type/AbilityBehaviourType.cs new file mode 100644 index 0000000..74f2d79 --- /dev/null +++ b/src/Models/Type/AbilityBehaviourType.cs @@ -0,0 +1,10 @@ +namespace MariesWonderland.Models.Type; + +public enum AbilityBehaviourType +{ + UNKNOWN = 0, + PASSIVE_SKILL = 1, + RESIST_ABNORMAL = 2, + STATUS = 3, + BLESS = 4 +} diff --git a/src/Models/Type/AbnormalBehaviourActionType.cs b/src/Models/Type/AbnormalBehaviourActionType.cs new file mode 100644 index 0000000..dc4cac9 --- /dev/null +++ b/src/Models/Type/AbnormalBehaviourActionType.cs @@ -0,0 +1,19 @@ +namespace MariesWonderland.Models.Type; + +public enum AbnormalBehaviourActionType +{ + UNKNOWN = 0, + DAMAGE = 1, + TURN_RESTRICTION = 2, + ATTRIBUTE_DAMAGE_CORRECTION = 3, + RECOVERY = 4, + HIT_RATIO_DOWN = 5, + DEFAULT_SKILL_LOTTERY_CORRECTION = 6, + DAMAGE_MULTIPLY = 7, + ABNORMAL_RESISTANCE = 8, + BUFF_RESISTANCE = 9, + OVERRIDE_HIT_EFFECT = 10, + MODIFY_HATE_VALUE = 11, + UNDEAD = 12, + OVERRIDE_EVASION_VALUE = 13 +} diff --git a/src/Models/Type/AbnormalBehaviourActivationMethodType.cs b/src/Models/Type/AbnormalBehaviourActivationMethodType.cs new file mode 100644 index 0000000..463de7d --- /dev/null +++ b/src/Models/Type/AbnormalBehaviourActivationMethodType.cs @@ -0,0 +1,15 @@ +namespace MariesWonderland.Models.Type; + +public enum AbnormalBehaviourActivationMethodType +{ + UNKNOWN = 0, + AFTER_SKILL_EXECUTE = 1, + AFTER_SKILL_EXECUTE_SELF = 2, + BEFORE_SKILL_EXECUTE = 3, + BEFORE_SKILL_EXECUTE_SELF = 4, + END_TURN = 5, + END_TURN_SELF = 6, + START_TURN = 7, + START_TURN_SELF = 8, + ON_ATTACH = 9 +} diff --git a/src/Models/Type/AbnormalBehaviourDamageType.cs b/src/Models/Type/AbnormalBehaviourDamageType.cs new file mode 100644 index 0000000..9b43aac --- /dev/null +++ b/src/Models/Type/AbnormalBehaviourDamageType.cs @@ -0,0 +1,8 @@ +namespace MariesWonderland.Models.Type; + +public enum AbnormalBehaviourDamageType +{ + UNKNOWN = 0, + FIXED_DAMAGE = 1, + HP_RATIO_DAMAGE = 2 +} diff --git a/src/Models/Type/AbnormalBehaviourDeactivationMethodType.cs b/src/Models/Type/AbnormalBehaviourDeactivationMethodType.cs new file mode 100644 index 0000000..355d373 --- /dev/null +++ b/src/Models/Type/AbnormalBehaviourDeactivationMethodType.cs @@ -0,0 +1,16 @@ +namespace MariesWonderland.Models.Type; + +public enum AbnormalBehaviourDeactivationMethodType +{ + UNKNOWN = 0, + AFTER_SKILL_EXECUTE = 1, + AFTER_SKILL_EXECUTE_SELF = 2, + BEFORE_SKILL_EXECUTE = 3, + BEFORE_SKILL_EXECUTE_SELF = 4, + END_TURN = 5, + END_TURN_SELF = 6, + START_TURN = 7, + START_TURN_SELF = 8, + NOTHING = 9, + ON_DETACH = 10 +} diff --git a/src/Models/Type/AbnormalBehaviourRecoveryType.cs b/src/Models/Type/AbnormalBehaviourRecoveryType.cs new file mode 100644 index 0000000..54f316c --- /dev/null +++ b/src/Models/Type/AbnormalBehaviourRecoveryType.cs @@ -0,0 +1,8 @@ +namespace MariesWonderland.Models.Type; + +public enum AbnormalBehaviourRecoveryType +{ + UNKNOWN = 0, + FIXED_RECOVERY = 1, + HP_RATIO_RECOVERY = 2 +} diff --git a/src/Models/Type/AbnormalBehaviourTurnRestrictionSkillType.cs b/src/Models/Type/AbnormalBehaviourTurnRestrictionSkillType.cs new file mode 100644 index 0000000..6b7ec76 --- /dev/null +++ b/src/Models/Type/AbnormalBehaviourTurnRestrictionSkillType.cs @@ -0,0 +1,9 @@ +namespace MariesWonderland.Models.Type; + +public enum AbnormalBehaviourTurnRestrictionSkillType +{ + UNKNOWN = 0, + DEFAULT_SKILL = 1, + ACTIVE_SKILL = 2, + PASSIVE_SKILL = 3 +} diff --git a/src/Models/Type/AbnormalLifetimeBehaviourConditionType.cs b/src/Models/Type/AbnormalLifetimeBehaviourConditionType.cs new file mode 100644 index 0000000..00b1e0a --- /dev/null +++ b/src/Models/Type/AbnormalLifetimeBehaviourConditionType.cs @@ -0,0 +1,8 @@ +namespace MariesWonderland.Models.Type; + +public enum AbnormalLifetimeBehaviourConditionType +{ + UNKNOWN = 0, + AND = 1, + OR = 2 +} diff --git a/src/Models/Type/AbnormalLifetimeMethodType.cs b/src/Models/Type/AbnormalLifetimeMethodType.cs new file mode 100644 index 0000000..f727261 --- /dev/null +++ b/src/Models/Type/AbnormalLifetimeMethodType.cs @@ -0,0 +1,11 @@ +namespace MariesWonderland.Models.Type; + +public enum AbnormalLifetimeMethodType +{ + UNKNOWN = 0, + FRAME_COUNT = 1, + TARGET_TURN_COUNT = 2, + TOTAL_TURN_COUNT = 3, + ACTIVATE_COUNT = 4, + RECEIVE_DAMAGE_COUNT = 5 +} diff --git a/src/Models/Type/AbnormalPolarityType.cs b/src/Models/Type/AbnormalPolarityType.cs new file mode 100644 index 0000000..2c698a1 --- /dev/null +++ b/src/Models/Type/AbnormalPolarityType.cs @@ -0,0 +1,8 @@ +namespace MariesWonderland.Models.Type; + +public enum AbnormalPolarityType +{ + UNKNOWN = 0, + POSITIVE = 1, + NEGATIVE = 2 +} diff --git a/src/Models/Type/AbnormalResistancePolarityType.cs b/src/Models/Type/AbnormalResistancePolarityType.cs new file mode 100644 index 0000000..c09042f --- /dev/null +++ b/src/Models/Type/AbnormalResistancePolarityType.cs @@ -0,0 +1,9 @@ +namespace MariesWonderland.Models.Type; + +public enum AbnormalResistancePolarityType +{ + UNKNOWN = 0, + POSITIVE = 1, + NEGATIVE = 2, + DONT_CARE = 3 +} diff --git a/src/Models/Type/ActivationMethodType.cs b/src/Models/Type/ActivationMethodType.cs new file mode 100644 index 0000000..df4e4ef --- /dev/null +++ b/src/Models/Type/ActivationMethodType.cs @@ -0,0 +1,13 @@ +namespace MariesWonderland.Models.Type; + +public enum ActivationMethodType +{ + UNKNOWN = 0, + IMMEDIATE = 1, + AFTER_SKILL_EXECUTE = 2, + BEFORE_CALCULATE_SKILL_BEHAVIOUR = 3, + AFTER_CALCULATE_SKILL_BEHAVIOUR = 4, + TO_SKILL_BEHAVIOUR_HIT = 5, + BATTLE_START = 6, + PRE_IMMEDIATE = 7 +} diff --git a/src/Models/Type/ActiveSkillType.cs b/src/Models/Type/ActiveSkillType.cs new file mode 100644 index 0000000..4eac6ef --- /dev/null +++ b/src/Models/Type/ActiveSkillType.cs @@ -0,0 +1,9 @@ +namespace MariesWonderland.Models.Type; + +public enum ActiveSkillType +{ + UNKNOWN = 0, + ALL_ACTIVE_SKILL = 1, + WEAPON_ACTIVE_SKILL = 2, + COSTUME_ACTIVE_SKILL = 3 +} diff --git a/src/Models/Type/AppealTargetType.cs b/src/Models/Type/AppealTargetType.cs new file mode 100644 index 0000000..68ac2e8 --- /dev/null +++ b/src/Models/Type/AppealTargetType.cs @@ -0,0 +1,7 @@ +namespace MariesWonderland.Models.Type; + +public enum AppealTargetType +{ + UNKNOWN = 0, + SHOP = 1 +} diff --git a/src/Models/Type/AttributeCompatibilityType.cs b/src/Models/Type/AttributeCompatibilityType.cs new file mode 100644 index 0000000..764b052 --- /dev/null +++ b/src/Models/Type/AttributeCompatibilityType.cs @@ -0,0 +1,9 @@ +namespace MariesWonderland.Models.Type; + +public enum AttributeCompatibilityType +{ + UNKNOWN = 0, + EVEN = 1, + GOOD = 2, + BAD = 3 +} diff --git a/src/Models/Type/AttributeConditionType.cs b/src/Models/Type/AttributeConditionType.cs new file mode 100644 index 0000000..753eb24 --- /dev/null +++ b/src/Models/Type/AttributeConditionType.cs @@ -0,0 +1,13 @@ +namespace MariesWonderland.Models.Type; + +public enum AttributeConditionType +{ + UNKNOWN = 0, + DARK = 1, + FIRE = 2, + LIGHT = 3, + WATER = 5, + WIND = 6, + NOTHING = 7, + ALL = 8 +} diff --git a/src/Models/Type/AttributeType.cs b/src/Models/Type/AttributeType.cs new file mode 100644 index 0000000..f832b2a --- /dev/null +++ b/src/Models/Type/AttributeType.cs @@ -0,0 +1,12 @@ +namespace MariesWonderland.Models.Type; + +public enum AttributeType +{ + UNKNOWN = 0, + FIRE = 2, + WATER = 5, + WIND = 6, + LIGHT = 3, + DARK = 1, + NOTHING = 4 +} diff --git a/src/Models/Type/AutoResetType.cs b/src/Models/Type/AutoResetType.cs new file mode 100644 index 0000000..f488f2f --- /dev/null +++ b/src/Models/Type/AutoResetType.cs @@ -0,0 +1,9 @@ +namespace MariesWonderland.Models.Type; + +public enum AutoResetType +{ + UNKNOWN = 0, + NONE = 1, + DAILY = 2, + MONTHLY = 3 +} diff --git a/src/Models/Type/BattleAdditionalAbilityApplyScopeType.cs b/src/Models/Type/BattleAdditionalAbilityApplyScopeType.cs new file mode 100644 index 0000000..05f0ef0 --- /dev/null +++ b/src/Models/Type/BattleAdditionalAbilityApplyScopeType.cs @@ -0,0 +1,8 @@ +namespace MariesWonderland.Models.Type; + +public enum BattleAdditionalAbilityApplyScopeType +{ + UNKNOWN = 0, + BOSS = 1, + ENEMY_ALL = 2 +} diff --git a/src/Models/Type/BattleEnemyType.cs b/src/Models/Type/BattleEnemyType.cs new file mode 100644 index 0000000..9c10969 --- /dev/null +++ b/src/Models/Type/BattleEnemyType.cs @@ -0,0 +1,8 @@ +namespace MariesWonderland.Models.Type; + +public enum BattleEnemyType +{ + UNKNOWN = 0, + NORMAL = 1, + BOSS = 2 +} diff --git a/src/Models/Type/BattleEventReceiverType.cs b/src/Models/Type/BattleEventReceiverType.cs new file mode 100644 index 0000000..27ff12b --- /dev/null +++ b/src/Models/Type/BattleEventReceiverType.cs @@ -0,0 +1,8 @@ +namespace MariesWonderland.Models.Type; + +public enum BattleEventReceiverType +{ + UNKNOWN = 0, + RADIO_MESSAGE = 1, + HUD_ACT_SEQUENCE = 2 +} diff --git a/src/Models/Type/BattleSchemeType.cs b/src/Models/Type/BattleSchemeType.cs new file mode 100644 index 0000000..d82a295 --- /dev/null +++ b/src/Models/Type/BattleSchemeType.cs @@ -0,0 +1,8 @@ +namespace MariesWonderland.Models.Type; + +public enum BattleSchemeType +{ + UNKNOWN = 0, + DEFAULT = 1, + PVP = 2 +} diff --git a/src/Models/Type/BattleSkillFireActConditionGroupType.cs b/src/Models/Type/BattleSkillFireActConditionGroupType.cs new file mode 100644 index 0000000..dc1301d --- /dev/null +++ b/src/Models/Type/BattleSkillFireActConditionGroupType.cs @@ -0,0 +1,8 @@ +namespace MariesWonderland.Models.Type; + +public enum BattleSkillFireActConditionGroupType +{ + UNKNOWN = 0, + AND = 1, + OR = 2 +} diff --git a/src/Models/Type/BattleSkillFireActConditionType.cs b/src/Models/Type/BattleSkillFireActConditionType.cs new file mode 100644 index 0000000..70ba52e --- /dev/null +++ b/src/Models/Type/BattleSkillFireActConditionType.cs @@ -0,0 +1,9 @@ +namespace MariesWonderland.Models.Type; + +public enum BattleSkillFireActConditionType +{ + UNKNOWN = 0, + WEAPON_TYPE = 1, + ATTRIBUTE_TYPE = 2, + SKILL_CATEGORY_TYPE = 3 +} diff --git a/src/Models/Type/BattleStartCameraType.cs b/src/Models/Type/BattleStartCameraType.cs new file mode 100644 index 0000000..6ec619b --- /dev/null +++ b/src/Models/Type/BattleStartCameraType.cs @@ -0,0 +1,9 @@ +namespace MariesWonderland.Models.Type; + +public enum BattleStartCameraType +{ + UNKNOWN = 0, + FOLLOW_ACTOR = 1, + FOLLOW_PATH = 2, + FOLLOW_ACTOR_OFFSET = 3 +} diff --git a/src/Models/Type/BigHuntBattleReportRandomDisplayType.cs b/src/Models/Type/BigHuntBattleReportRandomDisplayType.cs new file mode 100644 index 0000000..809595e --- /dev/null +++ b/src/Models/Type/BigHuntBattleReportRandomDisplayType.cs @@ -0,0 +1,14 @@ +namespace MariesWonderland.Models.Type; + +public enum BigHuntBattleReportRandomDisplayType +{ + UNKNOWN = 0, + CRITICAL_COUNT = 1, + MAX_DAMAGE = 2, + MIN_DAMAGE = 3, + DEFAULT_SKILL_HIT_COUNT = 4, + MOVE_COUNT = 5, + DAMAGE_RECEIVE_COUNT = 6, + SUPPORT_SKILL_HIT_COUNT = 7, + DAMAGE_RANDOM_AMPLITUDE_SCORE = 8 +} diff --git a/src/Models/Type/BuffResistanceStatusKindType.cs b/src/Models/Type/BuffResistanceStatusKindType.cs new file mode 100644 index 0000000..d0fd9a4 --- /dev/null +++ b/src/Models/Type/BuffResistanceStatusKindType.cs @@ -0,0 +1,14 @@ +namespace MariesWonderland.Models.Type; + +public enum BuffResistanceStatusKindType +{ + UNKNOWN = 0, + AGILITY = 1, + ATTACK = 2, + CRITICAL_ATTACK = 3, + CRITICAL_RATIO = 4, + EVASION_RATIO = 5, + HP = 6, + VITALITY = 7, + DONT_CARE = 8 +} diff --git a/src/Models/Type/BuffResistanceType.cs b/src/Models/Type/BuffResistanceType.cs new file mode 100644 index 0000000..8505e21 --- /dev/null +++ b/src/Models/Type/BuffResistanceType.cs @@ -0,0 +1,9 @@ +namespace MariesWonderland.Models.Type; + +public enum BuffResistanceType +{ + UNKNOWN = 0, + BUFF = 1, + DEBUFF = 2, + DONT_CARE = 3, +} diff --git a/src/Models/Type/BuffType.cs b/src/Models/Type/BuffType.cs new file mode 100644 index 0000000..1d85410 --- /dev/null +++ b/src/Models/Type/BuffType.cs @@ -0,0 +1,8 @@ +namespace MariesWonderland.Models.Type; + +public enum BuffType +{ + UNKNOWN = 0, + BUFF = 1, + DEBUFF = 2, +} diff --git a/src/Models/Type/CharacterAssignmentType.cs b/src/Models/Type/CharacterAssignmentType.cs new file mode 100644 index 0000000..770fe69 --- /dev/null +++ b/src/Models/Type/CharacterAssignmentType.cs @@ -0,0 +1,8 @@ +namespace MariesWonderland.Models.Type; + +public enum CharacterAssignmentType +{ + UNKNOWN = 0, + ORIGINAL = 1, + COLLABORATION = 2 +} diff --git a/src/Models/Type/CharacterBoardAssignmentType.cs b/src/Models/Type/CharacterBoardAssignmentType.cs new file mode 100644 index 0000000..33244bf --- /dev/null +++ b/src/Models/Type/CharacterBoardAssignmentType.cs @@ -0,0 +1,8 @@ +namespace MariesWonderland.Models.Type; + +public enum CharacterBoardAssignmentType +{ + UNKNOWN = 0, + ORIGINAL = 1, + COLLABORATION = 2 +} diff --git a/src/Models/Type/CharacterBoardConditionType.cs b/src/Models/Type/CharacterBoardConditionType.cs new file mode 100644 index 0000000..c14b8e1 --- /dev/null +++ b/src/Models/Type/CharacterBoardConditionType.cs @@ -0,0 +1,13 @@ +namespace MariesWonderland.Models.Type; + +public enum CharacterBoardConditionType +{ + UNKNOWN = 0, + PANEL_RELEASE_BY_ID = 1, + BOARD_ALL_RELEASE_BY_ID = 2, + QUEST_CLEAR_BY_ID = 3, + MAIN_FUNCTION_RELEASED = 4, + CHARACTER_TOTAL_RANK = 5, + CHARACTER_TOTAL_COSTUME_LEVEL = 6, + ALL_CHARACTER_TOTAL_COSTUME_LEVEL = 7 +} diff --git a/src/Models/Type/CharacterBoardEffectType.cs b/src/Models/Type/CharacterBoardEffectType.cs new file mode 100644 index 0000000..3db26f3 --- /dev/null +++ b/src/Models/Type/CharacterBoardEffectType.cs @@ -0,0 +1,8 @@ +namespace MariesWonderland.Models.Type; + +public enum CharacterBoardEffectType +{ + UNKNOWN = 0, + ABILITY = 1, + STATUS_UP = 2 +} diff --git a/src/Models/Type/CharacterBoardGroupType.cs b/src/Models/Type/CharacterBoardGroupType.cs new file mode 100644 index 0000000..a02a20a --- /dev/null +++ b/src/Models/Type/CharacterBoardGroupType.cs @@ -0,0 +1,8 @@ +namespace MariesWonderland.Models.Type; + +public enum CharacterBoardGroupType +{ + UNKNOWN = 0, + BASIC = 1, + BIG_HUNT = 2 +} diff --git a/src/Models/Type/CharacterBoardStatusUpType.cs b/src/Models/Type/CharacterBoardStatusUpType.cs new file mode 100644 index 0000000..7300a5c --- /dev/null +++ b/src/Models/Type/CharacterBoardStatusUpType.cs @@ -0,0 +1,16 @@ +namespace MariesWonderland.Models.Type; + +public enum CharacterBoardStatusUpType +{ + UNKNOWN = 0, + AGILITY_ADD = 1, + AGILITY_MULTIPLY = 2, + ATTACK_ADD = 3, + ATTACK_MULTIPLY = 4, + CRITICAL_ATTACK_ADD = 5, + CRITICAL_RATIO_ADD = 6, + HP_ADD = 7, + HP_MULTIPLY = 8, + VITALITY_ADD = 9, + VITALITY_MULTIPLY = 10 +} diff --git a/src/Models/Type/CharacterVoiceUnlockConditionType.cs b/src/Models/Type/CharacterVoiceUnlockConditionType.cs new file mode 100644 index 0000000..dd45575 --- /dev/null +++ b/src/Models/Type/CharacterVoiceUnlockConditionType.cs @@ -0,0 +1,8 @@ +namespace MariesWonderland.Models.Type; + +public enum CharacterVoiceUnlockConditionType +{ + UNKNOWN = 0, + NONE = 1, + QUEST_CLEAR = 2 +} diff --git a/src/Models/Type/CollectionBonusEffectType.cs b/src/Models/Type/CollectionBonusEffectType.cs new file mode 100644 index 0000000..4784896 --- /dev/null +++ b/src/Models/Type/CollectionBonusEffectType.cs @@ -0,0 +1,12 @@ +namespace MariesWonderland.Models.Type; + +public enum CollectionBonusEffectType +{ + UNKNOWN = 0, + CHARACTER_EXP = 1, + COSTUME_EXP = 2, + DROP_RATE = 3, + GOLD = 4, + USER_EXP = 5, + DROP_NUM_COEF = 6 +} diff --git a/src/Models/Type/CompareType.cs b/src/Models/Type/CompareType.cs new file mode 100644 index 0000000..1353ba7 --- /dev/null +++ b/src/Models/Type/CompareType.cs @@ -0,0 +1,12 @@ +namespace MariesWonderland.Models.Type; + +public enum CompareType +{ + UNKNOWN = 0, + EQUAL = 1, + NOT_EQUAL = 2, + GREATER = 3, + GREATER_EQUAL = 4, + LESS = 5, + LESS_EQUAL = 6 +} diff --git a/src/Models/Type/ConditionOperationType.cs b/src/Models/Type/ConditionOperationType.cs new file mode 100644 index 0000000..1a1dc6a --- /dev/null +++ b/src/Models/Type/ConditionOperationType.cs @@ -0,0 +1,8 @@ +namespace MariesWonderland.Models.Type; + +public enum ConditionOperationType +{ + UNKNOWN = 0, + AND = 1, + OR = 2 +} diff --git a/src/Models/Type/ConsumableItemType.cs b/src/Models/Type/ConsumableItemType.cs new file mode 100644 index 0000000..9202800 --- /dev/null +++ b/src/Models/Type/ConsumableItemType.cs @@ -0,0 +1,14 @@ +namespace MariesWonderland.Models.Type; + +public enum ConsumableItemType +{ + UNKNOWN = 0, + GOLD = 100, + MEDAL = 110, + GACHA_MEDAL = 120, + MOM_POINT = 130, + GACHA_TICKET = 200, + EXPLORE_TICKET = 201, + QUEST_SKIP_TICKET = 202, + EFFECT = 300 +} diff --git a/src/Models/Type/CorrectionTargetDamageType.cs b/src/Models/Type/CorrectionTargetDamageType.cs new file mode 100644 index 0000000..0c234b9 --- /dev/null +++ b/src/Models/Type/CorrectionTargetDamageType.cs @@ -0,0 +1,8 @@ +namespace MariesWonderland.Models.Type; + +public enum CorrectionTargetDamageType +{ + UNKNOWN = 0, + DEAL_DAMAGE = 1, + RECEIVE_DAMAGE = 2 +} diff --git a/src/Models/Type/CostumeAssetCategoryType.cs b/src/Models/Type/CostumeAssetCategoryType.cs new file mode 100644 index 0000000..d8534d7 --- /dev/null +++ b/src/Models/Type/CostumeAssetCategoryType.cs @@ -0,0 +1,8 @@ +namespace MariesWonderland.Models.Type; + +public enum CostumeAssetCategoryType +{ + UNKNOWN = 0, + NORMAL = 1, + ENEMY = 2 +} diff --git a/src/Models/Type/CostumeAutoOrganizationConditionType.cs b/src/Models/Type/CostumeAutoOrganizationConditionType.cs new file mode 100644 index 0000000..5f05882 --- /dev/null +++ b/src/Models/Type/CostumeAutoOrganizationConditionType.cs @@ -0,0 +1,12 @@ +namespace MariesWonderland.Models.Type; + +public enum CostumeAutoOrganizationConditionType +{ + UNKNOWN = 0, + RECOVERY_COEFFICIENT_FIRE = 1, + RECOVERY_COEFFICIENT_WATER = 2, + RECOVERY_COEFFICIENT_WIND = 3, + RECOVERY_COEFFICIENT_LIGHT = 4, + RECOVERY_COEFFICIENT_DARK = 5, + ATTACKER_IGNORE_TARGET = 6 +} diff --git a/src/Models/Type/CostumeAwakenEffectType.cs b/src/Models/Type/CostumeAwakenEffectType.cs new file mode 100644 index 0000000..0a9e58b --- /dev/null +++ b/src/Models/Type/CostumeAwakenEffectType.cs @@ -0,0 +1,9 @@ +namespace MariesWonderland.Models.Type; + +public enum CostumeAwakenEffectType +{ + UNKNOWN = 0, + STATUS_UP = 1, + ABILITY = 2, + ITEM_ACQUIRE = 3 +} diff --git a/src/Models/Type/CostumeDefaultSkillLotteryType.cs b/src/Models/Type/CostumeDefaultSkillLotteryType.cs new file mode 100644 index 0000000..5a3809e --- /dev/null +++ b/src/Models/Type/CostumeDefaultSkillLotteryType.cs @@ -0,0 +1,8 @@ +namespace MariesWonderland.Models.Type; + +public enum CostumeDefaultSkillLotteryType +{ + UNKNOWN = 0, + SKILLFUL_WEAPON = 1, + COMMON_WEAPON = 2 +} diff --git a/src/Models/Type/CostumeLevelBonusType.cs b/src/Models/Type/CostumeLevelBonusType.cs new file mode 100644 index 0000000..92dae72 --- /dev/null +++ b/src/Models/Type/CostumeLevelBonusType.cs @@ -0,0 +1,16 @@ +namespace MariesWonderland.Models.Type; + +public enum CostumeLevelBonusType +{ + UNKNOWN = 0, + AGILITY_ADD = 1, + AGILITY_MULTIPLY = 2, + ATTACK_ADD = 3, + ATTACK_MULTIPLY = 4, + CRITICAL_ATTACK_ADD = 5, + CRITICAL_RATIO_ADD = 6, + HP_ADD = 7, + HP_MULTIPLY = 8, + VITALITY_ADD = 9, + VITALITY_MULTIPLY = 10 +} diff --git a/src/Models/Type/CostumeLotteryEffectType.cs b/src/Models/Type/CostumeLotteryEffectType.cs new file mode 100644 index 0000000..4cf3dc6 --- /dev/null +++ b/src/Models/Type/CostumeLotteryEffectType.cs @@ -0,0 +1,8 @@ +namespace MariesWonderland.Models.Type; + +public enum CostumeLotteryEffectType +{ + UNKNOWN = 0, + ABILITY = 1, + STATUS_UP = 2 +} diff --git a/src/Models/Type/CostumeSpecialActActiveSkillConditionType.cs b/src/Models/Type/CostumeSpecialActActiveSkillConditionType.cs new file mode 100644 index 0000000..ce39846 --- /dev/null +++ b/src/Models/Type/CostumeSpecialActActiveSkillConditionType.cs @@ -0,0 +1,8 @@ +namespace MariesWonderland.Models.Type; + +public enum CostumeSpecialActActiveSkillConditionType +{ + UNKNOWN = 0, + ALWAYS = 1, + ATTRIBUTE_MAIN_WEAPON = 2 +} diff --git a/src/Models/Type/CutInFunctionType.cs b/src/Models/Type/CutInFunctionType.cs new file mode 100644 index 0000000..305b84c --- /dev/null +++ b/src/Models/Type/CutInFunctionType.cs @@ -0,0 +1,15 @@ +namespace MariesWonderland.Models.Type; + +public enum CutInFunctionType +{ + UNKNOWN = 0, + PVP = 1, + EVENT_QUEST = 2, + EXPLORATION = 3, + GACHA = 4, + HOME = 5, + BIG_HUNT = 6, + WORLD_MAP = 7, + LIMIT_CONTENT = 8, + ANOTHER_ROUTE = 9 +} diff --git a/src/Models/Type/DamageCorrectionHpRatioType.cs b/src/Models/Type/DamageCorrectionHpRatioType.cs new file mode 100644 index 0000000..a6eab07 --- /dev/null +++ b/src/Models/Type/DamageCorrectionHpRatioType.cs @@ -0,0 +1,8 @@ +namespace MariesWonderland.Models.Type; + +public enum DamageCorrectionHpRatioType +{ + UNKNOWN = 0, + LOWER = 1, + HIGHER = 2 +} diff --git a/src/Models/Type/DamageCorrectionOverlapType.cs b/src/Models/Type/DamageCorrectionOverlapType.cs new file mode 100644 index 0000000..24185c1 --- /dev/null +++ b/src/Models/Type/DamageCorrectionOverlapType.cs @@ -0,0 +1,8 @@ +namespace MariesWonderland.Models.Type; + +public enum DamageCorrectionOverlapType +{ + UNKNOWN = 0, + CUMULATIVE = 1, + EXTREMUM = 2 +} diff --git a/src/Models/Type/DamageMultiplyAbnormalAttachedPolarityConditionType.cs b/src/Models/Type/DamageMultiplyAbnormalAttachedPolarityConditionType.cs new file mode 100644 index 0000000..b4818bb --- /dev/null +++ b/src/Models/Type/DamageMultiplyAbnormalAttachedPolarityConditionType.cs @@ -0,0 +1,9 @@ +namespace MariesWonderland.Models.Type; + +public enum DamageMultiplyAbnormalAttachedPolarityConditionType +{ + UNKNOWN = 0, + POSITIVE = 1, + NEGATIVE = 2, + DONT_CARE = 3 +} diff --git a/src/Models/Type/DamageMultiplyAbnormalAttachedTargetType.cs b/src/Models/Type/DamageMultiplyAbnormalAttachedTargetType.cs new file mode 100644 index 0000000..9caae05 --- /dev/null +++ b/src/Models/Type/DamageMultiplyAbnormalAttachedTargetType.cs @@ -0,0 +1,8 @@ +namespace MariesWonderland.Models.Type; + +public enum DamageMultiplyAbnormalAttachedTargetType +{ + UNKNOWN = 0, + SKILL_EXECUTOR = 1, + SKILL_TARGET = 2 +} diff --git a/src/Models/Type/DamageMultiplyBuffAttachedConditionTargetType.cs b/src/Models/Type/DamageMultiplyBuffAttachedConditionTargetType.cs new file mode 100644 index 0000000..9c569b4 --- /dev/null +++ b/src/Models/Type/DamageMultiplyBuffAttachedConditionTargetType.cs @@ -0,0 +1,8 @@ +namespace MariesWonderland.Models.Type; + +public enum DamageMultiplyBuffAttachedConditionTargetType +{ + UNKNOWN = 0, + SKILL_EXECUTOR = 1, + SKILL_TARGET = 2 +} diff --git a/src/Models/Type/DamageMultiplyBuffAttachedTargetBuffType.cs b/src/Models/Type/DamageMultiplyBuffAttachedTargetBuffType.cs new file mode 100644 index 0000000..da3245f --- /dev/null +++ b/src/Models/Type/DamageMultiplyBuffAttachedTargetBuffType.cs @@ -0,0 +1,9 @@ +namespace MariesWonderland.Models.Type; + +public enum DamageMultiplyBuffAttachedTargetBuffType +{ + UNKNOWN = 0, + BUFF = 1, + DEBUFF = 2, + DONT_CARE = 3 +} diff --git a/src/Models/Type/DamageMultiplyBuffAttachedTargetStatusKindType.cs b/src/Models/Type/DamageMultiplyBuffAttachedTargetStatusKindType.cs new file mode 100644 index 0000000..0f511cd --- /dev/null +++ b/src/Models/Type/DamageMultiplyBuffAttachedTargetStatusKindType.cs @@ -0,0 +1,14 @@ +namespace MariesWonderland.Models.Type; + +public enum DamageMultiplyBuffAttachedTargetStatusKindType +{ + UNKNOWN = 0, + AGILITY = 1, + ATTACK = 2, + CRITICAL_ATTACK = 3, + CRITICAL_RATIO = 4, + EVASION_RATIO = 5, + HP = 6, + VITALITY = 7, + DONT_CARE = 8 +} diff --git a/src/Models/Type/DamageMultiplyDetailType.cs b/src/Models/Type/DamageMultiplyDetailType.cs new file mode 100644 index 0000000..4c97e67 --- /dev/null +++ b/src/Models/Type/DamageMultiplyDetailType.cs @@ -0,0 +1,13 @@ +namespace MariesWonderland.Models.Type; + +public enum DamageMultiplyDetailType +{ + UNKNOWN = 0, + ALWAYS = 1, + CRITICAL = 2, + HIT_INDEX = 3, + ABNORMAL_ATTACHED = 4, + SKILLFUL_WEAPON_TYPE = 5, + BUFF_ATTACHED = 6, + SPECIFIED_COSTUME = 7 +} diff --git a/src/Models/Type/DamageMultiplySkillfulWeaponConditionTargetType.cs b/src/Models/Type/DamageMultiplySkillfulWeaponConditionTargetType.cs new file mode 100644 index 0000000..c6189fb --- /dev/null +++ b/src/Models/Type/DamageMultiplySkillfulWeaponConditionTargetType.cs @@ -0,0 +1,8 @@ +namespace MariesWonderland.Models.Type; + +public enum DamageMultiplySkillfulWeaponConditionTargetType +{ + UNKNOWN = 0, + SKILL_EXECUTOR = 1, + SKILL_TARGET = 2 +} diff --git a/src/Models/Type/DamageMultiplySpecifiedCostumeConditionTargetType.cs b/src/Models/Type/DamageMultiplySpecifiedCostumeConditionTargetType.cs new file mode 100644 index 0000000..4519794 --- /dev/null +++ b/src/Models/Type/DamageMultiplySpecifiedCostumeConditionTargetType.cs @@ -0,0 +1,8 @@ +namespace MariesWonderland.Models.Type; + +public enum DamageMultiplySpecifiedCostumeConditionTargetType +{ + UNKNOWN = 0, + SKILL_EXECUTOR = 1, + SKILL_TARGET = 2 +} diff --git a/src/Models/Type/DamageMultiplyTargetType.cs b/src/Models/Type/DamageMultiplyTargetType.cs new file mode 100644 index 0000000..762c0e9 --- /dev/null +++ b/src/Models/Type/DamageMultiplyTargetType.cs @@ -0,0 +1,8 @@ +namespace MariesWonderland.Models.Type; + +public enum DamageMultiplyTargetType +{ + UNKNOWN = 0, + RECEIVE_DAMAGE = 1, + DEAL_DAMAGE = 2 +} diff --git a/src/Models/Type/DeckType.cs b/src/Models/Type/DeckType.cs new file mode 100644 index 0000000..7b88506 --- /dev/null +++ b/src/Models/Type/DeckType.cs @@ -0,0 +1,12 @@ +namespace MariesWonderland.Models.Type; + +public enum DeckType +{ + UNKNOWN = 0, + QUEST = 1, + PVP = 2, + MULTI = 3, + RESTRICTED_QUEST = 4, + BIG_HUNT = 5, + RESTRICTED_LIMIT_CONTENT_QUEST = 6 +} diff --git a/src/Models/Type/DifficultyType.cs b/src/Models/Type/DifficultyType.cs new file mode 100644 index 0000000..8398772 --- /dev/null +++ b/src/Models/Type/DifficultyType.cs @@ -0,0 +1,10 @@ +namespace MariesWonderland.Models.Type; + +public enum DifficultyType +{ + UNKNOWN = 0, + NORMAL = 1, + HARD = 2, + VERY_HARD = 3, + EX_HARD = 4 +} diff --git a/src/Models/Type/DisplayCoordinateAdjustmentFunctionType.cs b/src/Models/Type/DisplayCoordinateAdjustmentFunctionType.cs new file mode 100644 index 0000000..9df8548 --- /dev/null +++ b/src/Models/Type/DisplayCoordinateAdjustmentFunctionType.cs @@ -0,0 +1,13 @@ +namespace MariesWonderland.Models.Type; + +public enum DisplayCoordinateAdjustmentFunctionType +{ + UNKNOWN = 0, + GACHA_RESULT = 1, + PROFILE = 2, + CHARACTER_DISPLAY_QUEST = 3, + LIMIT_QUEST_CHARACTER_CELL = 4, + CHARACTER_ENHANCE = 5, + CHARACTER_DETAIL = 6, + REBIRTH_CONFIRMATION = 7 +} diff --git a/src/Models/Type/DokanType.cs b/src/Models/Type/DokanType.cs new file mode 100644 index 0000000..482acb1 --- /dev/null +++ b/src/Models/Type/DokanType.cs @@ -0,0 +1,8 @@ +namespace MariesWonderland.Models.Type; + +public enum DokanType +{ + UNKNOWN = 0, + APPEAL = 1, + FUNCTION_INTRODUCTION = 3 +} diff --git a/src/Models/Type/DomainType.cs b/src/Models/Type/DomainType.cs new file mode 100644 index 0000000..b6d4686 --- /dev/null +++ b/src/Models/Type/DomainType.cs @@ -0,0 +1,38 @@ +namespace MariesWonderland.Models.Type; + +public enum DomainType +{ + UNKNOWN = 0, + GACHA = 1, + SHOP = 2, + EXCHANGE_SHOP = 3, + QUEST = 4, + PVP = 5, + ENHANCEMENT = 6, + ENHANCEMENT_WEAPON = 7, + ENHANCEMENT_COSTUME = 8, + ENHANCEMENT_COMPANION = 9, + ENHANCEMENT_PARTS = 10, + ITEM_LIST = 11, + DECK = 12, + EXPLORATION = 13, + LIBRARY = 14, + MENU = 15, + CAGE = 16, + SETTING_FAVORITE_COSTUME = 17, + QUEST_NORMAL = 18, + QUEST_HARD = 19, + QUEST_VERYHARD = 20, + LOGIN_BONUS = 21, + MISSION = 22, + INFORMATION = 23, + MAIN_QUEST_CHAPTER = 24, + EVENT_QUEST_CHAPTER = 25, + QUIZ = 26, + WEBVIEW_MISSION = 27, + FRIEND = 28, + BIG_HUNT = 29, + CHARACTER_BOARD = 30, + QUEST_EXHARD = 31, + CHARACTER_REBIRTH = 32 +} diff --git a/src/Models/Type/EffectTargetType.cs b/src/Models/Type/EffectTargetType.cs new file mode 100644 index 0000000..97fb76c --- /dev/null +++ b/src/Models/Type/EffectTargetType.cs @@ -0,0 +1,8 @@ +namespace MariesWonderland.Models.Type; + +public enum EffectTargetType +{ + UNKNOWN = 0, + STAMINA_RECOVERY = 1, + BATTLE_POINT_RECOVERY = 2 +} diff --git a/src/Models/Type/EffectValueType.cs b/src/Models/Type/EffectValueType.cs new file mode 100644 index 0000000..8cbaaf1 --- /dev/null +++ b/src/Models/Type/EffectValueType.cs @@ -0,0 +1,8 @@ +namespace MariesWonderland.Models.Type; + +public enum EffectValueType +{ + UNKNOWN = 0, + FIXED_VALUE = 1, + PERMIL_VALUE = 2 +} diff --git a/src/Models/Type/EnemySizeType.cs b/src/Models/Type/EnemySizeType.cs new file mode 100644 index 0000000..3f1a448 --- /dev/null +++ b/src/Models/Type/EnemySizeType.cs @@ -0,0 +1,10 @@ +namespace MariesWonderland.Models.Type; + +public enum EnemySizeType +{ + UNKNOWN = 0, + SMALL = 1, + MEDIUM = 2, + LARGE = 3, + EX_LARGE = 4 +} diff --git a/src/Models/Type/EnemyThumbnailReplaceConditionType.cs b/src/Models/Type/EnemyThumbnailReplaceConditionType.cs new file mode 100644 index 0000000..a7e9740 --- /dev/null +++ b/src/Models/Type/EnemyThumbnailReplaceConditionType.cs @@ -0,0 +1,8 @@ +namespace MariesWonderland.Models.Type; + +public enum EnemyThumbnailReplaceConditionType +{ + UNKNOWN = 0, + QUEST_NOT_CLEAR = 1, + ALWAYS = 2 +} diff --git a/src/Models/Type/EnemyThumbnailReplaceMethodType.cs b/src/Models/Type/EnemyThumbnailReplaceMethodType.cs new file mode 100644 index 0000000..e72c47d --- /dev/null +++ b/src/Models/Type/EnemyThumbnailReplaceMethodType.cs @@ -0,0 +1,8 @@ +namespace MariesWonderland.Models.Type; + +public enum EnemyThumbnailReplaceMethodType +{ + UNKNOWN = 0, + SAME_ACTOR = 1, + REPLACE_ACTOR = 2 +} diff --git a/src/Models/Type/EnhanceCampaignEffectType.cs b/src/Models/Type/EnhanceCampaignEffectType.cs new file mode 100644 index 0000000..b60ba01 --- /dev/null +++ b/src/Models/Type/EnhanceCampaignEffectType.cs @@ -0,0 +1,8 @@ +namespace MariesWonderland.Models.Type; + +public enum EnhanceCampaignEffectType +{ + UNKNOWN = 0, + PROBABILITY_PER_MILE = 1, + ADDITIONAL_PER_MILE = 2 +} diff --git a/src/Models/Type/EnhanceCampaignTargetType.cs b/src/Models/Type/EnhanceCampaignTargetType.cs new file mode 100644 index 0000000..1608cfd --- /dev/null +++ b/src/Models/Type/EnhanceCampaignTargetType.cs @@ -0,0 +1,17 @@ +namespace MariesWonderland.Models.Type; + +public enum EnhanceCampaignTargetType +{ + UNKNOWN = 0, + COSTUME_ALL = 1, + WEAPON_ALL = 2, + PARTS_ALL = 3, + COSTUME_CHARACTER_ID = 11, + COSTUME_SKILLFUL_WEAPON_TYPE_ID = 12, + COSTUME_ID = 13, + WEAPON_TYPE_ID = 21, + WEAPON_ATTRIBUTE_TYPE_ID = 22, + WEAPON_ID = 23, + PARTS_SERIES_ID = 31, + PARTS_ID = 32 +} diff --git a/src/Models/Type/EvaluateConditionEvaluateType.cs b/src/Models/Type/EvaluateConditionEvaluateType.cs new file mode 100644 index 0000000..541dc72 --- /dev/null +++ b/src/Models/Type/EvaluateConditionEvaluateType.cs @@ -0,0 +1,12 @@ +namespace MariesWonderland.Models.Type; + +public enum EvaluateConditionEvaluateType +{ + UNKNOWN = 0, + AND = 1, + OR = 2, + GE = 3, + ID_CONTAIN = 4, + EQ = 5, + LE = 6 +} diff --git a/src/Models/Type/EvaluateConditionFunctionType.cs b/src/Models/Type/EvaluateConditionFunctionType.cs new file mode 100644 index 0000000..47d4cc3 --- /dev/null +++ b/src/Models/Type/EvaluateConditionFunctionType.cs @@ -0,0 +1,18 @@ +namespace MariesWonderland.Models.Type; + +public enum EvaluateConditionFunctionType +{ + UNKNOWN = 0, + RECURSION = 1, + CAGE_TREASURE_HUNT = 2, + CAGE_INTERVAL_DROP_ITEM = 3, + QUEST_CLEAR = 4, + GIMMICK_BIT_COUNT = 5, + WEAPON_ACQUISITION = 6, + TUTORIAL = 7, + MISSION_CLEAR = 8, + QUEST_MISSION_CLEAR = 9, + OTHER_GIMMICK_BIT_COUNT = 10, + QUEST_SCENE_CHOICE = 11, + QUEST_NOT_CLEAR = 12 +} diff --git a/src/Models/Type/EventQuestMenuCategoryType.cs b/src/Models/Type/EventQuestMenuCategoryType.cs new file mode 100644 index 0000000..ee144aa --- /dev/null +++ b/src/Models/Type/EventQuestMenuCategoryType.cs @@ -0,0 +1,8 @@ +namespace MariesWonderland.Models.Type; + +public enum EventQuestMenuCategoryType +{ + Unknown = 0, + EventDefault = 1, + CharacterExQuest = 2 +} diff --git a/src/Models/Type/EventQuestType.cs b/src/Models/Type/EventQuestType.cs new file mode 100644 index 0000000..44ef156 --- /dev/null +++ b/src/Models/Type/EventQuestType.cs @@ -0,0 +1,18 @@ +namespace MariesWonderland.Models.Type; + +public enum EventQuestType +{ + UNKNOWN = 0, + MARATHON = 1, + HUNT = 2, + DUNGEON = 3, + DAY_OF_THE_WEEK = 4, + GUERRILLA = 5, + CHARACTER = 6, + END_CONTENTS = 7, + PORTAL_CAGE = 8, + SPECIAL = 9, + TOWER = 10, + LIMIT_CONTENT = 11, + LABYRINTH = 12 +} diff --git a/src/Models/Type/ExploreUnlockConditionType.cs b/src/Models/Type/ExploreUnlockConditionType.cs new file mode 100644 index 0000000..9b1222e --- /dev/null +++ b/src/Models/Type/ExploreUnlockConditionType.cs @@ -0,0 +1,8 @@ +namespace MariesWonderland.Models.Type; + +public enum ExploreUnlockConditionType +{ + UNKNOWN = 0, + MAIN_QUEST_CLEAR = 1, + EXPLORE_SCORE_OVER_IN_SAME_GROUP_AND_ONE_LOW_DIFFICULTY = 2 +} diff --git a/src/Models/Type/ExtendBuffCooltimeBuffType.cs b/src/Models/Type/ExtendBuffCooltimeBuffType.cs new file mode 100644 index 0000000..0de27b0 --- /dev/null +++ b/src/Models/Type/ExtendBuffCooltimeBuffType.cs @@ -0,0 +1,9 @@ +namespace MariesWonderland.Models.Type; + +public enum ExtendBuffCooltimeBuffType +{ + UNKNOWN = 0, + BUFF = 1, + DEBUFF = 2, + DONT_CARE = 3 +} diff --git a/src/Models/Type/ExtendBuffCooltimeExtendType.cs b/src/Models/Type/ExtendBuffCooltimeExtendType.cs new file mode 100644 index 0000000..d24809d --- /dev/null +++ b/src/Models/Type/ExtendBuffCooltimeExtendType.cs @@ -0,0 +1,9 @@ +namespace MariesWonderland.Models.Type; + +public enum ExtendBuffCooltimeExtendType +{ + UNKNOWN = 0, + ADD = 1, + SUB = 2, + MULTIPLY = 3 +} diff --git a/src/Models/Type/ExtendBuffCooltimeStatusType.cs b/src/Models/Type/ExtendBuffCooltimeStatusType.cs new file mode 100644 index 0000000..f7ff8d9 --- /dev/null +++ b/src/Models/Type/ExtendBuffCooltimeStatusType.cs @@ -0,0 +1,14 @@ +namespace MariesWonderland.Models.Type; + +public enum ExtendBuffCooltimeStatusType +{ + UNKNOWN = 0, + AGILITY = 1, + ATTACK = 2, + CRITICAL_ATTACK = 3, + CRITICAL_RATIO = 4, + EVASION_RATIO = 5, + HP = 6, + VITALITY = 7, + DONT_CARE = 8 +} diff --git a/src/Models/Type/ExtendBuffCooltimeTargetSkillType.cs b/src/Models/Type/ExtendBuffCooltimeTargetSkillType.cs new file mode 100644 index 0000000..5ad41c0 --- /dev/null +++ b/src/Models/Type/ExtendBuffCooltimeTargetSkillType.cs @@ -0,0 +1,9 @@ +namespace MariesWonderland.Models.Type; + +public enum ExtendBuffCooltimeTargetSkillType +{ + UNKNOWN = 0, + COSTUME_ACTIVE = 1, + WEAPON_ACTIVE = 2, + COSTUME_OR_WEAPON_ACTIVE = 3 +} diff --git a/src/Models/Type/FieldEffectApplyScopeType.cs b/src/Models/Type/FieldEffectApplyScopeType.cs new file mode 100644 index 0000000..b0a1c80 --- /dev/null +++ b/src/Models/Type/FieldEffectApplyScopeType.cs @@ -0,0 +1,8 @@ +namespace MariesWonderland.Models.Type; + +public enum FieldEffectApplyScopeType +{ + UNKNOWN = 0, + PLAYER_ACTOR = 1, + ALL_ACTOR = 2 +} diff --git a/src/Models/Type/FlowType.cs b/src/Models/Type/FlowType.cs new file mode 100644 index 0000000..1a918c9 --- /dev/null +++ b/src/Models/Type/FlowType.cs @@ -0,0 +1,9 @@ +namespace MariesWonderland.Models.Type; + +public enum FlowType +{ + UNKNOWN = 0, + MAIN = 1, + REPLAY = 2, + MAIN_AND_REPLAY = 3 +} diff --git a/src/Models/Type/GachaAutoResetType.cs b/src/Models/Type/GachaAutoResetType.cs new file mode 100644 index 0000000..b119529 --- /dev/null +++ b/src/Models/Type/GachaAutoResetType.cs @@ -0,0 +1,9 @@ +namespace MariesWonderland.Models.Type; + +public enum GachaAutoResetType +{ + UNKNOWN = 0, + NONE = 1, + DAILY = 2, + MONTHLY = 3 +} diff --git a/src/Models/Type/GachaBadgeType.cs b/src/Models/Type/GachaBadgeType.cs new file mode 100644 index 0000000..3cc42c3 --- /dev/null +++ b/src/Models/Type/GachaBadgeType.cs @@ -0,0 +1,12 @@ +namespace MariesWonderland.Models.Type; + +public enum GachaBadgeType +{ + UNKNOWN = 0, + NONE = 1, + LIMITED_EXEC_COUNT = 2, + LIMITED_PAID_GEM = 3, + LIMITED_PAID_GEM_AND_EXEC_COUNT = 4, + CURRENT_STEP_COUNT = 5, + CURRENT_STEP_COUNT_AND_LIMITED_PAID_GEM = 6 +} diff --git a/src/Models/Type/GachaDecorationType.cs b/src/Models/Type/GachaDecorationType.cs new file mode 100644 index 0000000..71dac5d --- /dev/null +++ b/src/Models/Type/GachaDecorationType.cs @@ -0,0 +1,8 @@ +namespace MariesWonderland.Models.Type; + +public enum GachaDecorationType +{ + UNKNOWN = 0, + NORMAL = 1, + FESTIVAL = 2, +} diff --git a/src/Models/Type/GachaLabelType.cs b/src/Models/Type/GachaLabelType.cs new file mode 100644 index 0000000..00268bf --- /dev/null +++ b/src/Models/Type/GachaLabelType.cs @@ -0,0 +1,11 @@ +namespace MariesWonderland.Models.Type; + +public enum GachaLabelType +{ + UNKNOWN = 0, + PREMIUM = 1, + EVENT = 2, + CHAPTER = 3, + PORTAL_CAGE = 4, + RECYCLE = 5 +} diff --git a/src/Models/Type/GachaModeType.cs b/src/Models/Type/GachaModeType.cs new file mode 100644 index 0000000..014d98d --- /dev/null +++ b/src/Models/Type/GachaModeType.cs @@ -0,0 +1,9 @@ +namespace MariesWonderland.Models.Type; + +public enum GachaModeType +{ + UNKNOWN = 0, + BASIC = 1, + STEPUP = 2, + BOX = 3 +} diff --git a/src/Models/Type/GachaUnlockConditionType.cs b/src/Models/Type/GachaUnlockConditionType.cs new file mode 100644 index 0000000..8ab6380 --- /dev/null +++ b/src/Models/Type/GachaUnlockConditionType.cs @@ -0,0 +1,11 @@ +namespace MariesWonderland.Models.Type; + +public enum GachaUnlockConditionType +{ + UNKNOWN = 0, + NONE = 1, + USER_RANK_GREATER_OR_EQUAL = 2, + WITHIN_HOURS_FROM_GAME_STARTED = 3, + MAIN_QUEST_CLEAR = 4, + MAIN_FUNCTION_RELEASED = 5 +} diff --git a/src/Models/Type/GiftExpirationFilterType.cs b/src/Models/Type/GiftExpirationFilterType.cs new file mode 100644 index 0000000..c936f5d --- /dev/null +++ b/src/Models/Type/GiftExpirationFilterType.cs @@ -0,0 +1,9 @@ +namespace MariesWonderland.Models.Type; + +public enum GiftExpirationFilterType +{ + UNKNOWN = 0, + NONE = 1, + ONLY_EXPIRE = 2, + ONLY_NOT_EXPIRE = 3 +} diff --git a/src/Models/Type/GiftRewardKindFilterType.cs b/src/Models/Type/GiftRewardKindFilterType.cs new file mode 100644 index 0000000..e708f44 --- /dev/null +++ b/src/Models/Type/GiftRewardKindFilterType.cs @@ -0,0 +1,15 @@ +namespace MariesWonderland.Models.Type; + +public enum GiftRewardKindFilterType +{ + UNKNOWN = 0, + NONE = 1, + GEM = 2, + GOLD = 3, + WEAPON = 4, + COMPANION = 5, + PARTS = 6, + MATERIAL = 7, + OTHER = 8, + COSTUME = 9 +} diff --git a/src/Models/Type/GimmickType.cs b/src/Models/Type/GimmickType.cs new file mode 100644 index 0000000..cf48ee8 --- /dev/null +++ b/src/Models/Type/GimmickType.cs @@ -0,0 +1,17 @@ +namespace MariesWonderland.Models.Type; + +public enum GimmickType +{ + UNKNOWN = 0, + CAGE_TREASURE_HUNT = 1, + CAGE_INTERVAL_DROP_ITEM = 2, + BROKEN_OBELISK = 3, + IRON_GRILL = 4, + RADIO_MESSAGE = 5, + FIRST_BROKEN_OBELISK = 6, + MAP_ONLY_CAGE_TREASURE_HUNT = 7, + MAP_ONLY_CAGE_INTERVAL_DROP_ITEM = 8, + REPORT = 9, + CAGE_MEMORY = 10, + MAP_ONLY_HIDE_OBELISK = 11 +} diff --git a/src/Models/Type/HateValueCalculationType.cs b/src/Models/Type/HateValueCalculationType.cs new file mode 100644 index 0000000..3cde01e --- /dev/null +++ b/src/Models/Type/HateValueCalculationType.cs @@ -0,0 +1,9 @@ +namespace MariesWonderland.Models.Type; + +public enum HateValueCalculationType +{ + UNKNOWN = 0, + ADD = 1, + MULTIPLY = 2, + SUBTRACT = 3 +} diff --git a/src/Models/Type/HelpType.cs b/src/Models/Type/HelpType.cs new file mode 100644 index 0000000..5a317ff --- /dev/null +++ b/src/Models/Type/HelpType.cs @@ -0,0 +1,122 @@ +namespace MariesWonderland.Models.Type; + +public enum HelpType +{ + UNKNOWN = 0, + QUEST_TOP_SCREEN = 1, + QUEST_MAIN_SCREEN = 2, + QUEST_SUB_SCREEN = 3, + QUEST_CHARACTER_SCREEN = 4, + QUEST_END_SCREEN = 5, + BIG_HUNT_SCREEN = 6, + ARENA_TOP_SCREEN = 7, + LIBRARY_EVENT_STORY_SCREEN = 8, + LIBRARY_CHARACTER_STORY_SCREEN = 9, + LIBRARY_MAIN_STORY_SCREEN = 10, + LIBRARY_CATALOG_SCREEN = 11, + LIBRARY_MOVIE_SCREEN = 12, + ENHANCE_TOP_SCREEN = 13, + ENHANCE_COSTUME_SCREEN = 14, + ENHANCE_MEMORY_SCREEN = 15, + ENHANCE_WEAPON_SCREEN = 16, + ENHANCE_COMPANION_SCREEN = 17, + CHARACTER_BOARD_LIST_SCREEN = 18, + LIST_SELL_SCREEN = 19, + GACHA_TOP_SCREEN = 20, + ORGANIZATION_SCREEN = 21, + SEARCH_SCREEN = 22, + MENU_TOP_SCREEN = 23, + SHOP_TOP_SCREEN = 24, + SHOP_PREMIUM_SCREEN = 25, + SHOP_EXCHANGE_SCREEN = 26, + WORLD_MAP_TOP_SCREEN = 27, + CHARACTER_BOARD_SCREEN = 28, + LIBRARY_RECORD_SCREEN = 29, + LIBRARY_CARD_STORY_SCREEN = 30, + LIBRARY_SECRET_REPORT_SCREEN = 31, + LIBRARY_CAGE_MEMORY_SCREEN = 32, + THOUGHT_ORGANIZATION_SCREEN = 33, + PORTAL_CAGE_TUTORIAL = 1001, + DAILY_QUEST_TUTORIAL = 1002, + DAILY_GACHA_TUTORIAL = 1003, + QUEST_HARD_TUTORIAL = 1004, + QUEST_VERY_HARD_TUTORIAL = 1005, + PORTAL_CAGE_DROP_ITEM_TUTORIAL = 1006, + END_CONTENTS_QUEST_TUTORIAL = 1007, + SMART_PHONE_FIRST_TUTORIAL = 1008, + SMART_PHONE_SECOND_TUTORIAL = 1009, + CHARACTER_BOARD_TUTORIAL = 1010, + EVET_QUEST_TUTORIAL = 1011, + BIG_WIN_BONUS_TUTORIAL = 1012, + BLACK_BIRD_TUTORIAL = 1013, + BATTLE_TUTORIAL = 1014, + BATTLE_CHARACTER_TUTORIAL = 1015, + BATTLE_COMPANION_TUTORIAL = 1016, + BATTLE_SKILL_CANCEL_TUTORIAL = 1017, + MINIGAME_SHOOTING_TUTORIAL = 1018, + MINIGAME_FLYING_MOM_TUTORIAL = 1019, + GOHOBI_TUTORIAL = 1020, + EVENT_QUEST_DAY_OF_THE_WEEK_TUTORIAL = 1021, + EVENT_QUEST_GUERRILLA_TUTORIAL = 1022, + LIBRARY_TUTORIAL = 1023, + EVENT_QUEST_CHARACTER_TUTORIAL = 1024, + SUB_QUEST_TUTORIAL = 1025, + ARENA_TUTORIAL = 1026, + ENHANCE_TUTORIAL = 1027, + DECK_TUTORIAL = 1028, + EXPLORE_TUTORIAL = 1029, + BIG_HUNT_TUTORIAL = 1030, + END_CONTENTS_QUEST_UNLOCK_TUTORIAL = 1031, + QUEST_SKIP_TUTORIAL = 1032, + WORLD_MAP_UNLOCK_TUTORIAL = 1033, + WORLD_MAP_FIRST_TUTORIAL = 1034, + WORLD_MAP_BLACK_BIRD_TUTORIAL = 1035, + WORLD_MAP_APPLE_TUTORIAL = 1036, + WORLD_MAP_SKIP_TUTORIAL = 1037, + WORLD_MAP_FIRST_LOSE_TUTORIAL = 1038, + DUNGEON_TUTORIAL = 1039, + CHARACTER_BOARD_UNLOCK_TUTORIAL = 1040, + TRIPLE_DECK_TUTORIAL = 1041, + CHARACTER_BOARD_BASIC_TUTORIAL = 1042, + CHARACTER_BOARD_BIG_HUNT_TUTORIAL = 1043, + PORTAL_CAGE_DAILY_GACHA_TUTORIAL = 1044, + PARTS_TUTORIAL = 1045, + CAGE_TUTORIAL = 1046, + COSTUME_LEVEL_BONUS_TUTORIAL = 1047, + WORLD_MAP_REPORT_TUTORIAL = 1048, + BOSS_SPECIAL_EFFECT_TUTORIAL = 1049, + EVENT_QUEST_GUERRILLA_FREE_OPEN_TUTORIAL = 1050, + EXPLORE_HARD_TUTORIAL = 1051, + CAGE_MEMORY_TUTORIAL = 1052, + BATTLE_CERTAIN_KILL_SKILL_TUTORIAL = 1053, + DRESSUP_COSTUME_TUTORIAL = 1054, + COSTUME_AWAKEN_TUTORIAL = 1055, + THOUGHT_ORGANIZATION_TUTORIAL = 1056, + HIDE_OBELISK_TUTORIAL = 1057, + LIMIT_CONTENT_TUTORIAL = 1058, + FIELD_EFFECT_TUTORIAL = 1059, + LIMIT_CONTENT_CAGE_TUTORIAL = 1060, + CHARACTER_VIEWER_TUTORIAL = 1061, + CHARACTER_VIEWER_FIELD_SELECT = 1062, + CHARACTER_VIEWER_ABOUT = 1063, + CHARACTER_VIEWER_OPERATION = 1064, + CHARACTER_VIEWER_MENU = 1065, + CHARACTER_VIEWER_CREATE = 1066, + CHARACTER_VIEWER_CAMERA = 1067, + CHARACTER_VIEWER_MOTION = 1068, + RECYCLE_GACHA_TUTORIAL = 1069, + MOM_POINT_TUTORIAL = 1070, + STAINED_GLASS_TUTORIAL = 1071, + LIBRARY_STAINED_GLASS_SCREEN = 1072, + CHARACTER_VIEWER_FACIAL = 1073, + CHARACTER_REBIRTH_LIST_SCREEN = 1074, + CHARACTER_REBIRTH_TUTORIAL = 1075, + WEAPON_AWAKEN_TUTORIAL = 1076, + EVENT_QUEST_LABYRINTH_TUTORIAL = 1077, + MISSION_PASS = 1079, + WEAPON_ALL_ORGANIZATION_TUTORIAL = 1080, + COSTUME_LOTTERY_EFFECT_TUTORIAL = 1081, + ANOTHER_ROUTE_TUTORIAL = 1082, + DELETE_COSTUME_FIO_TUTORIAL = 1083, + REWARD_ROULETTE_TUTORIAL = 10001 +} diff --git a/src/Models/Type/HpBarDisplayType.cs b/src/Models/Type/HpBarDisplayType.cs new file mode 100644 index 0000000..ac11e6b --- /dev/null +++ b/src/Models/Type/HpBarDisplayType.cs @@ -0,0 +1,10 @@ +namespace MariesWonderland.Models.Type; + +public enum HpBarDisplayType +{ + UNKNOWN = 0, + STANDARD = 1, + FOLLOW_TARGET = 2, + LARGE = 3, + NONE = 4 +} diff --git a/src/Models/Type/HpRatioDamageCalculateDenominatorType.cs b/src/Models/Type/HpRatioDamageCalculateDenominatorType.cs new file mode 100644 index 0000000..2a268c8 --- /dev/null +++ b/src/Models/Type/HpRatioDamageCalculateDenominatorType.cs @@ -0,0 +1,8 @@ +namespace MariesWonderland.Models.Type; + +public enum HpRatioDamageCalculateDenominatorType +{ + UNKNOWN = 0, + CURRENT_HP = 1, + MAX_HP = 2 +} diff --git a/src/Models/Type/ImportantItemEffectTargetQuestGroupType.cs b/src/Models/Type/ImportantItemEffectTargetQuestGroupType.cs new file mode 100644 index 0000000..cc8f243 --- /dev/null +++ b/src/Models/Type/ImportantItemEffectTargetQuestGroupType.cs @@ -0,0 +1,14 @@ +namespace MariesWonderland.Models.Type; + +public enum ImportantItemEffectTargetQuestGroupType +{ + UNKNOWN = 0, + WHOLE_QUEST = 1, + QUEST_TYPE = 2, + EVENT_QUEST_TYPE = 3, + MAIN_QUEST_CHAPTER_ID = 4, + MAIN_QUEST_QUEST_ID = 5, + SUB_QUEST_CHAPTER_ID = 6, + SUB_QUEST_QUEST_ID = 7, + MAIN_QUEST_DIFFICULTY_TYPE = 8 +} diff --git a/src/Models/Type/LabyrinthQuestEffectDescriptionType.cs b/src/Models/Type/LabyrinthQuestEffectDescriptionType.cs new file mode 100644 index 0000000..7ecf5a2 --- /dev/null +++ b/src/Models/Type/LabyrinthQuestEffectDescriptionType.cs @@ -0,0 +1,8 @@ +namespace MariesWonderland.Models.Type; + +public enum LabyrinthQuestEffectDescriptionType +{ + UNKNOWN = 0, + FREE = 1, + ABILITY = 2 +} diff --git a/src/Models/Type/LanguageType.cs b/src/Models/Type/LanguageType.cs new file mode 100644 index 0000000..b2f2c00 --- /dev/null +++ b/src/Models/Type/LanguageType.cs @@ -0,0 +1,9 @@ +namespace MariesWonderland.Models.Type; + +public enum LanguageType +{ + UNKNOWN = 0, + JA = 1, + EN = 2, + KO = 3 +} diff --git a/src/Models/Type/LibraryRecordType.cs b/src/Models/Type/LibraryRecordType.cs new file mode 100644 index 0000000..3a24f75 --- /dev/null +++ b/src/Models/Type/LibraryRecordType.cs @@ -0,0 +1,11 @@ +namespace MariesWonderland.Models.Type; + +public enum LibraryRecordType +{ + UNKNOWN = 0, + CARD_STORY = 1, + REPORT = 2, + CAGE_MEMORY = 3, + LIMIT_CONTENT = 4, + STAINED_GLASS = 5 +} diff --git a/src/Models/Type/LimitContentDeckRestrictionType.cs b/src/Models/Type/LimitContentDeckRestrictionType.cs new file mode 100644 index 0000000..ba9bc54 --- /dev/null +++ b/src/Models/Type/LimitContentDeckRestrictionType.cs @@ -0,0 +1,8 @@ +namespace MariesWonderland.Models.Type; + +public enum LimitContentDeckRestrictionType +{ + UNKNOWN = 0, + COSTUME = 1, + WEAPON = 2 +} diff --git a/src/Models/Type/LimitedOpenTargetType.cs b/src/Models/Type/LimitedOpenTargetType.cs new file mode 100644 index 0000000..182db1c --- /dev/null +++ b/src/Models/Type/LimitedOpenTargetType.cs @@ -0,0 +1,11 @@ +namespace MariesWonderland.Models.Type; + +public enum LimitedOpenTargetType +{ + UNKNOWN = 0, + SHOP = 1, + GACHA = 2, + NONE = 3, + STEPUP_GACHA = 4, + SHOP_ITEM_CELL = 5 +} diff --git a/src/Models/Type/LimitedOpenTextDisplayConditionType.cs b/src/Models/Type/LimitedOpenTextDisplayConditionType.cs new file mode 100644 index 0000000..d3bfaa4 --- /dev/null +++ b/src/Models/Type/LimitedOpenTextDisplayConditionType.cs @@ -0,0 +1,8 @@ +namespace MariesWonderland.Models.Type; + +public enum LimitedOpenTextDisplayConditionType +{ + UNKNOWN = 0, + COUNT = 1, + LEFT_HOUR_COUNT = 2 +} diff --git a/src/Models/Type/ListSettingAbilityGroupType.cs b/src/Models/Type/ListSettingAbilityGroupType.cs new file mode 100644 index 0000000..6e83466 --- /dev/null +++ b/src/Models/Type/ListSettingAbilityGroupType.cs @@ -0,0 +1,11 @@ +namespace MariesWonderland.Models.Type; + +public enum ListSettingAbilityGroupType +{ + UNKNOWN = 0, + COSTUME = 1, + WEAPON = 2, + COMPANION = 3, + THOUGHT = 4, + BLESS = 5 +} diff --git a/src/Models/Type/ListSettingCostumeGroupType.cs b/src/Models/Type/ListSettingCostumeGroupType.cs new file mode 100644 index 0000000..f556d04 --- /dev/null +++ b/src/Models/Type/ListSettingCostumeGroupType.cs @@ -0,0 +1,8 @@ +namespace MariesWonderland.Models.Type; + +public enum ListSettingCostumeGroupType +{ + UNKNOWN = 0, + INDIVIDUAL = 1, + OTHER = 2 +} diff --git a/src/Models/Type/LotteryRatioCorrectionCalculationType.cs b/src/Models/Type/LotteryRatioCorrectionCalculationType.cs new file mode 100644 index 0000000..5d772b3 --- /dev/null +++ b/src/Models/Type/LotteryRatioCorrectionCalculationType.cs @@ -0,0 +1,9 @@ +namespace MariesWonderland.Models.Type; + +public enum LotteryRatioCorrectionCalculationType +{ + UNKNOWN = 0, + ADD = 1, + SUBTRACT = 2, + MULTIPLY = 3 +} diff --git a/src/Models/Type/MainFunctionType.cs b/src/Models/Type/MainFunctionType.cs new file mode 100644 index 0000000..3472b4b --- /dev/null +++ b/src/Models/Type/MainFunctionType.cs @@ -0,0 +1,22 @@ +namespace MariesWonderland.Models.Type; + +public enum MainFunctionType +{ + UNKNOWN = 0, + NONE = 1, + PVP = 2, + EVENT_QUEST = 3, + EXPLORATION = 4, + END_CONTENTS = 5, + LIBRARY = 6, + ENHANCE_COMPANION = 7, + ENHANCE_PARTS = 8, + PREMIUM_GACHA = 9, + BIG_HUNT = 10, + CHARACTER_BOARD = 11, + WORLD_MAP = 12, + DRESSUP_COSTUME = 13, + AWAKEN_COSTUME = 14, + LIMIT_CONTENT = 15, + CHARACTER_VIEWER = 16 +} diff --git a/src/Models/Type/MaintenanceBlockFunctionType.cs b/src/Models/Type/MaintenanceBlockFunctionType.cs new file mode 100644 index 0000000..8563cae --- /dev/null +++ b/src/Models/Type/MaintenanceBlockFunctionType.cs @@ -0,0 +1,37 @@ +namespace MariesWonderland.Models.Type; + +public enum MaintenanceBlockFunctionType +{ + UNKNOWN = 0, + NONE = 1, + CHARACTER_ENHANCE = 2, + WEAPON_ENHANCE = 3, + COMPANION_ENHANCE = 4, + PARTS_ENHANCE = 5, + LIST_SELL = 6, + DECK = 7, + SUB_QUEST_ALL = 8, + PVP = 9, + EXPLORE = 10, + GACHA = 11, + SHOP = 12, + GIFT = 13, + MISSION = 14, + FRIEND = 15, + MENU = 16, + MAMA_BANNER = 17, + BRIDGE = 18, + SUB_QUEST_CHAPTER_ID = 19, + SUB_QUEST_QUEST_ID = 20, + SUB_QUEST_EVENT_QUEST_TYPE = 21, + REWARD_GACHA = 22, + BIG_HUNT = 23, + CHARACTER_BOARD = 24, + WORLD_MAP = 25, + LIMIT_CONTENT = 26, + LIMIT_CONTENT_CHARACTER = 27, + CHARACTER_VIEWER = 28, + SUB_QUEST_EVENT_QUEST_DAILY_GROUP = 29, + CHARACTER_REBIRTH = 30, + MISSION_PASS = 31 +} diff --git a/src/Models/Type/MaterialType.cs b/src/Models/Type/MaterialType.cs new file mode 100644 index 0000000..9f695c6 --- /dev/null +++ b/src/Models/Type/MaterialType.cs @@ -0,0 +1,20 @@ +namespace MariesWonderland.Models.Type; + +public enum MaterialType +{ + UNKNOWN = 0, + WEAPON_ENHANCEMENT = 10, + COSTUME_ENHANCEMENT = 20, + COMPANION_ENHANCEMENT = 30, + WEAPON_SKILL_ENHANCEMENT = 40, + COSTUME_SKILL_ENHANCEMENT = 50, + COMMON_SKILL_ENHANCEMENT = 60, + WEAPON_EVOLUTION = 70, + WEAPON_LIMIT_BREAK = 80, + COSTUME_LIMIT_BREAK = 90, + CHARACTER_BOARD_RELEASE = 100, + COSTUME_AWAKEN = 110, + CHARACTER_REBIRTH = 120, + WEAPON_AWAKEN = 130, + COSTUME_LOTTERY_EFFECT_UNLOCK = 140 +} diff --git a/src/Models/Type/MissionCategoryType.cs b/src/Models/Type/MissionCategoryType.cs new file mode 100644 index 0000000..e0fbb8e --- /dev/null +++ b/src/Models/Type/MissionCategoryType.cs @@ -0,0 +1,16 @@ +namespace MariesWonderland.Models.Type; + +public enum MissionCategoryType +{ + UNKNOWN = 0, + DAILY = 1, + CHALLENGE = 2, + SPECIAL = 3, + WEBVIEW_MISSION = 4, + COMPLETE = 5, + SHOP_PURCHASE = 6, + EVALUATE = 7, + MOM_POINT = 8, + MISSION_PASS_DAILY = 9, + MISSION_PASS_SPECIAL = 10 +} diff --git a/src/Models/Type/MissionClearConditionType.cs b/src/Models/Type/MissionClearConditionType.cs new file mode 100644 index 0000000..565a831 --- /dev/null +++ b/src/Models/Type/MissionClearConditionType.cs @@ -0,0 +1,77 @@ +namespace MariesWonderland.Models.Type; + +public enum MissionClearConditionType +{ + UNKNOWN = 0, + QUEST_CLEAR_BY_COUNT = 1, + QUEST_CLEAR_BY_ID = 2, + POSSESSION_ADD_BY_COUNT = 3, + WEAPON_ENHANCE_BY_COUNT = 5, + WEAPON_ENHANCE_SKILL_BY_COUNT = 6, + WEAPON_EVOLVE_BY_COUNT = 7, + WEAPON_LIMIT_BREAK_BY_COUNT = 8, + COSTUME_ENHANCE_BY_COUNT = 9, + COSTUME_ACTIVE_SKILL_ENHANCE_BY_COUNT = 10, + COSTUME_LIMIT_BREAK_BY_COUNT = 11, + COMPANION_ENHANCE_BY_COUNT = 12, + PARTS_ENHANCE_BY_COUNT = 13, + PARTS_ADD_BY_COUNT = 14, + PVP_FINISH_BY_COUNT = 15, + PVP_FINISH_BY_WIN_COUNT = 16, + PVP_FINISH_BY_WIN_STREAK_COUNT = 17, + GACHA_DRAW_BY_COUNT = 18, + GACHA_EXEC_BY_COUNT = 19, + GACHA_DRAW_BY_GACHA_LABEL_TYPE = 20, + SHOP_BUY_BY_COUNT = 21, + USER_LEVEL = 22, + USER_LOGIN_BY_COUNT = 23, + MISSION_CLEAR_BY_COUNT = 25, + EXPLORE_FINISH_BY_COUNT = 26, + SET_FAVORITE_CHARACTER = 27, + MAX_DECK_POWER = 28, + EXPLORE_HIGH_SCORE = 29, + MISSION_CLEAR_FOR_ALL_DAILY = 30, + MAMA_TAP_BY_COUNT = 31, + TOWER_WALKED_DISTANCE = 32, + CAGE_ORNAMENT_REWARD_ACQUIRED_BY_COUNT = 33, + DEFEAT_BOSS_COUNT = 35, + QUEST_BATTLE_RETIRED_COUNT = 36, + QUEST_BATTLE_ANNIHILATED_COUNT = 37, + COMPLETE_TRANSFER_SETTINGS = 38, + LIBRARY_ELEMENT_COUNT = 39, + COSTUME_MAX_LEVEL = 40, + COSTUME_SKILL_MAX_LEVEL = 41, + COSTUME_ABILITY_MAX_LEVEL = 42, + WEAPON_MAX_LEVEL = 43, + WEAPON_SKILL_MAX_LEVEL = 44, + WEAPON_ABILITY_MAX_LEVEL = 45, + COMPANION_MAX_LEVEL = 46, + PARTS_MAX_LEVEL = 47, + QUIZ = 48, + POSSESSION_COMPLETE = 49, + CHEER_FRIEND_BY_COUNT = 50, + BIG_HUNT_PLAY_BY_COUNT = 51, + BIG_HUNT_BOSS_KNOCK_DOWN = 52, + BIG_HUNT_HIGH_SCORE = 53, + CHARACTER_BOARD_PANEL_RELEASE_BY_COUNT = 54, + DEFEAT_WIZARD_COUNT = 55, + USER_MESSAGE_MATCH_WORD = 56, + TITLE_TRANSITION_BY_COUNT = 57, + WEAPON_PROTECT_BY_COUNT = 58, + EXPLORE_SCORE = 59, + REPORT_COUNT = 60, + RHYTHM_INTERACTION_TAP_COUNT = 61, + QUEST_CLEAR_BY_COUNT_WITHOUT_SKIP = 62, + CHARACTER_BOARD_FULL_OPEN = 63, + WEAPON_COUNT_WITH_LEVEL_GE = 64, + CONSUME_STAMINA_AMOUNT = 65, + COSTUME_AWAKEN_COUNT = 66, + USER_LOGIN_BY_COUNT_FROM_UNLOCK = 67, + MISSION_CLEAR_FOR_ALL_DAILY_BY_SUB_CATEGORY_ID = 68, + PVP_RANK = 69, + WEAPON_AWAKEN_COUNT = 70, + CHARACTER_REBIRTH_COUNT = 71, + COSTUME_LOTTERY_EFFECT_SLOT_UNLOCK_COUNT = 72, + COSTUME_LOTTERY_EFFECT_DRAW_COUNT = 73, + PVP_FINISH_BY_WIN_STREAK_COUNT_FROM_UNLOCK = 74 +} diff --git a/src/Models/Type/MissionProgressStatusType.cs b/src/Models/Type/MissionProgressStatusType.cs new file mode 100644 index 0000000..8874ece --- /dev/null +++ b/src/Models/Type/MissionProgressStatusType.cs @@ -0,0 +1,9 @@ +namespace MariesWonderland.Models.Type; + +public enum MissionProgressStatusType +{ + UNKNOWN = 0, + IN_PROGRESS = 1, + CLEAR = 2, + REWARD_RECEIVED = 9 +} diff --git a/src/Models/Type/MissionUnlockConditionType.cs b/src/Models/Type/MissionUnlockConditionType.cs new file mode 100644 index 0000000..47840ea --- /dev/null +++ b/src/Models/Type/MissionUnlockConditionType.cs @@ -0,0 +1,12 @@ +namespace MariesWonderland.Models.Type; + +public enum MissionUnlockConditionType +{ + UNKNOWN = 0, + GRANT = 1, + QUEST_CLEAR = 2, + MISSION_CLEAR_BY_ID = 3, + MISSION_CLEAR_FOR_ALL_DAILY = 4, + WEBVIEW_PANEL_MISSION_CLEAR_BY_PAGE_NUMBER = 5, + EVALUATE = 6 +} diff --git a/src/Models/Type/NumericalFunctionType.cs b/src/Models/Type/NumericalFunctionType.cs new file mode 100644 index 0000000..7a7fd89 --- /dev/null +++ b/src/Models/Type/NumericalFunctionType.cs @@ -0,0 +1,14 @@ +namespace MariesWonderland.Models.Type; + +// Dark.Generated.Type.NumericalFunctionType +public enum NumericalFunctionType +{ + UNKNOWN = 0, + LINEAR = 1, + MONOMIAL = 2, + DUPLEX_LINEAR = 3, + LINEAR_PERMIL = 4, + POLYNOMIAL_THIRD = 5, + POLYNOMIAL_THIRD_PERMIL = 6, + PARTS_MAIN_OPTION = 7 +} diff --git a/src/Models/Type/OverrideHitEffectConditionSkillOwnerCategoryType.cs b/src/Models/Type/OverrideHitEffectConditionSkillOwnerCategoryType.cs new file mode 100644 index 0000000..cc7c0f6 --- /dev/null +++ b/src/Models/Type/OverrideHitEffectConditionSkillOwnerCategoryType.cs @@ -0,0 +1,9 @@ +namespace MariesWonderland.Models.Type; + +public enum OverrideHitEffectConditionSkillOwnerCategoryType +{ + UNKNOWN = 0, + SELF = 1, + ALLY_PARTY = 2, + ENEMY_PARTY = 3 +} diff --git a/src/Models/Type/OverrideHitEffectConditionType.cs b/src/Models/Type/OverrideHitEffectConditionType.cs new file mode 100644 index 0000000..1e9d04f --- /dev/null +++ b/src/Models/Type/OverrideHitEffectConditionType.cs @@ -0,0 +1,10 @@ +namespace MariesWonderland.Models.Type; + +public enum OverrideHitEffectConditionType +{ + UNKNOWN = 0, + ALWAYS = 1, + DAMAGE_ATTRIBUTE = 2, + CRITICAL = 3, + SKILL_OWNER_CATEGORY = 4 +} diff --git a/src/Models/Type/PlatformType.cs b/src/Models/Type/PlatformType.cs new file mode 100644 index 0000000..7f756d7 --- /dev/null +++ b/src/Models/Type/PlatformType.cs @@ -0,0 +1,9 @@ +namespace MariesWonderland.Models.Type; + +public enum PlatformType +{ + UNKNOWN = 0, + APP_STORE = 1, + GOOGLE_PLAY_STORE = 2, + AMAZON_APP_STORE = 8 +} diff --git a/src/Models/Type/PortalCageAccessPointType.cs b/src/Models/Type/PortalCageAccessPointType.cs new file mode 100644 index 0000000..c3fd65b --- /dev/null +++ b/src/Models/Type/PortalCageAccessPointType.cs @@ -0,0 +1,11 @@ +namespace MariesWonderland.Models.Type; + +public enum PortalCageAccessPointType +{ + UNKNOWN = 0, + NONE = 1, + MAIN_QUEST = 2, + DAILY_QUEST = 3, + EVENT_QUEST = 4, + DAILY_GACHA = 5 +} diff --git a/src/Models/Type/PossessionType.cs b/src/Models/Type/PossessionType.cs new file mode 100644 index 0000000..d6e99e9 --- /dev/null +++ b/src/Models/Type/PossessionType.cs @@ -0,0 +1,22 @@ +namespace MariesWonderland.Models.Type; + +public enum PossessionType +{ + UNKNOWN = 0, + COSTUME = 1, + WEAPON = 2, + COMPANION = 3, + PARTS = 4, + MATERIAL = 5, + CONSUMABLE_ITEM = 6, + COSTUME_ENHANCED = 7, + WEAPON_ENHANCED = 8, + COMPANION_ENHANCED = 9, + PARTS_ENHANCED = 10, + PAID_GEM = 11, + FREE_GEM = 12, + IMPORTANT_ITEM = 13, + THOUGHT = 14, + MISSION_PASS_POINT = 15, + PREMIUM_ITEM = 16 +} diff --git a/src/Models/Type/PowerCalculationConstantValueType.cs b/src/Models/Type/PowerCalculationConstantValueType.cs new file mode 100644 index 0000000..5a61ac5 --- /dev/null +++ b/src/Models/Type/PowerCalculationConstantValueType.cs @@ -0,0 +1,57 @@ +namespace MariesWonderland.Models.Type; + +public enum PowerCalculationConstantValueType +{ + UNKNOWN = 0, + COSTUME_ATTACK_COEFFICIENT = 1, + COSTUME_HP_COEFFICIENT = 2, + COSTUME_VITALITY_COEFFICIENT = 3, + WEAPON_ATTACK_COEFFICIENT = 4, + WEAPON_HP_COEFFICIENT = 5, + WEAPON_VITALITY_COEFFICIENT = 6, + COMPANION_ATTACK_COEFFICIENT = 7, + COMPANION_HP_COEFFICIENT = 8, + COMPANION_VITALITY_COEFFICIENT = 9, + PARTS_ADD_POWER_AGILITY_COEFFICIENT = 10, + PARTS_ADD_POWER_ATTACK_COEFFICIENT = 11, + PARTS_ADD_POWER_CRITICAL_ATTACK_COEFFICIENT = 12, + PARTS_ADD_POWER_CRITICAL_RATIO_COEFFICIENT = 13, + PARTS_ADD_POWER_EVASION_RATIO_COEFFICIENT = 14, + PARTS_ADD_POWER_HP_COEFFICIENT = 15, + PARTS_ADD_POWER_VITALITY_COEFFICIENT = 16, + PARTS_MUL_POWER_AGILITY_BASE_VALUE = 17, + PARTS_MUL_POWER_ATTACK_BASE_VALUE = 18, + PARTS_MUL_POWER_CRITICAL_ATTACK_BASE_VALUE = 19, + PARTS_MUL_POWER_CRITICAL_RATIO_BASE_VALUE = 20, + PARTS_MUL_POWER_EVASION_RATIO_BASE_VALUE = 21, + PARTS_MUL_POWER_HP_BASE_VALUE = 22, + PARTS_MUL_POWER_VITALITY_BASE_VALUE = 23, + CHARACTER_BOARD_ADD_POWER_AGILITY_COEFFICIENT = 24, + CHARACTER_BOARD_ADD_POWER_ATTACK_COEFFICIENT = 25, + CHARACTER_BOARD_ADD_POWER_CRITICAL_ATTACK_COEFFICIENT = 26, + CHARACTER_BOARD_ADD_POWER_CRITICAL_RATIO_COEFFICIENT = 27, + CHARACTER_BOARD_ADD_POWER_EVASION_RATIO_COEFFICIENT = 28, + CHARACTER_BOARD_ADD_POWER_HP_COEFFICIENT = 29, + CHARACTER_BOARD_ADD_POWER_VITALITY_COEFFICIENT = 30, + CHARACTER_BOARD_MUL_POWER_AGILITY_BASE_VALUE = 31, + CHARACTER_BOARD_MUL_POWER_ATTACK_BASE_VALUE = 32, + CHARACTER_BOARD_MUL_POWER_CRITICAL_ATTACK_BASE_VALUE = 33, + CHARACTER_BOARD_MUL_POWER_CRITICAL_RATIO_BASE_VALUE = 34, + CHARACTER_BOARD_MUL_POWER_EVASION_RATIO_BASE_VALUE = 35, + CHARACTER_BOARD_MUL_POWER_HP_BASE_VALUE = 36, + CHARACTER_BOARD_MUL_POWER_VITALITY_BASE_VALUE = 37, + CHARACTER_RANK_ADD_POWER_AGILITY_COEFFICIENT = 38, + CHARACTER_RANK_ADD_POWER_ATTACK_COEFFICIENT = 39, + CHARACTER_RANK_ADD_POWER_CRITICAL_ATTACK_COEFFICIENT = 40, + CHARACTER_RANK_ADD_POWER_CRITICAL_RATIO_COEFFICIENT = 41, + CHARACTER_RANK_ADD_POWER_EVASION_RATIO_COEFFICIENT = 42, + CHARACTER_RANK_ADD_POWER_HP_COEFFICIENT = 43, + CHARACTER_RANK_ADD_POWER_VITALITY_COEFFICIENT = 44, + CHARACTER_RANK_MUL_POWER_AGILITY_BASE_VALUE = 45, + CHARACTER_RANK_MUL_POWER_ATTACK_BASE_VALUE = 46, + CHARACTER_RANK_MUL_POWER_CRITICAL_ATTACK_BASE_VALUE = 47, + CHARACTER_RANK_MUL_POWER_CRITICAL_RATIO_BASE_VALUE = 48, + CHARACTER_RANK_MUL_POWER_EVASION_RATIO_BASE_VALUE = 49, + CHARACTER_RANK_MUL_POWER_HP_BASE_VALUE = 50, + CHARACTER_RANK_MUL_POWER_VITALITY_BASE_VALUE = 51 +} diff --git a/src/Models/Type/PowerCalculationReferenceStatusType.cs b/src/Models/Type/PowerCalculationReferenceStatusType.cs new file mode 100644 index 0000000..5564dcc --- /dev/null +++ b/src/Models/Type/PowerCalculationReferenceStatusType.cs @@ -0,0 +1,9 @@ +namespace MariesWonderland.Models.Type; + +public enum PowerCalculationReferenceStatusType +{ + UNKNOWN = 0, + SELF = 1, + PARTY = 2, + NONE = 3 +} diff --git a/src/Models/Type/PriceType.cs b/src/Models/Type/PriceType.cs new file mode 100644 index 0000000..bcff384 --- /dev/null +++ b/src/Models/Type/PriceType.cs @@ -0,0 +1,10 @@ +namespace MariesWonderland.Models.Type; + +public enum PriceType +{ + UNKNOWN = 0, + CONSUMABLE_ITEM = 1, + GEM = 2, + PAID_GEM = 3, + PLATFORM_PAYMENT = 4 +} diff --git a/src/Models/Type/QuestAssignmentType.cs b/src/Models/Type/QuestAssignmentType.cs new file mode 100644 index 0000000..603da14 --- /dev/null +++ b/src/Models/Type/QuestAssignmentType.cs @@ -0,0 +1,12 @@ +namespace MariesWonderland.Models.Type; + +public enum QuestAssignmentType +{ + UNKNOWN = 0, + QUEST = 1, + MAIN_CHAPTER = 2, + EVENT_CHAPTER = 3, + EVENT_DUNGEON = 4, + EVENT_DAY_OF_THE_WEEK = 5, + EVENT_GUERRILLA = 6 +} diff --git a/src/Models/Type/QuestBonusType.cs b/src/Models/Type/QuestBonusType.cs new file mode 100644 index 0000000..d58ecbc --- /dev/null +++ b/src/Models/Type/QuestBonusType.cs @@ -0,0 +1,9 @@ +namespace MariesWonderland.Models.Type; + +public enum QuestBonusType +{ + UNKNOWN = 0, + ABILITY = 1, + EXP = 2, + DROP_REWARD = 3 +} diff --git a/src/Models/Type/QuestCampaignEffectType.cs b/src/Models/Type/QuestCampaignEffectType.cs new file mode 100644 index 0000000..dbb122e --- /dev/null +++ b/src/Models/Type/QuestCampaignEffectType.cs @@ -0,0 +1,11 @@ +namespace MariesWonderland.Models.Type; + +public enum QuestCampaignEffectType +{ + UNKNOWN = 0, + DROP_RATE = 1, + DROP_COUNT = 2, + STAMINA_CONSUME_AMOUNT = 3, + CLEAR_REWARD_GOLD_COUNT = 4, + DROP_ITEM_ADD = 5 +} diff --git a/src/Models/Type/QuestCampaignTargetType.cs b/src/Models/Type/QuestCampaignTargetType.cs new file mode 100644 index 0000000..8a28177 --- /dev/null +++ b/src/Models/Type/QuestCampaignTargetType.cs @@ -0,0 +1,13 @@ +namespace MariesWonderland.Models.Type; + +public enum QuestCampaignTargetType +{ + UNKNOWN = 0, + WHOLE_QUEST = 1, + QUEST_TYPE = 2, + EVENT_QUEST_TYPE = 3, + MAIN_QUEST_CHAPTER_ID = 4, + MAIN_QUEST_QUEST_ID = 5, + SUB_QUEST_CHAPTER_ID = 6, + SUB_QUEST_QUEST_ID = 7 +} diff --git a/src/Models/Type/QuestDeckRestrictionType.cs b/src/Models/Type/QuestDeckRestrictionType.cs new file mode 100644 index 0000000..b32da05 --- /dev/null +++ b/src/Models/Type/QuestDeckRestrictionType.cs @@ -0,0 +1,12 @@ +namespace MariesWonderland.Models.Type; + +public enum QuestDeckRestrictionType +{ + UNKNOWN = 0, + CHARACTER_ID = 1, + COSTUME_ID = 2, + PROPER_ATTRIBUTE_TYPE = 3, + FORBIDDEN_CHARACTER_ID_MULTI = 4, + FORBIDDEN_COSTUME_ID_MULTI = 5, + FORBIDDEN = 99 +} diff --git a/src/Models/Type/QuestDisplayAttributeIconSizeType.cs b/src/Models/Type/QuestDisplayAttributeIconSizeType.cs new file mode 100644 index 0000000..b8172bb --- /dev/null +++ b/src/Models/Type/QuestDisplayAttributeIconSizeType.cs @@ -0,0 +1,8 @@ +namespace MariesWonderland.Models.Type; + +public enum QuestDisplayAttributeIconSizeType +{ + UNKNOWN = 0, + SMALL = 1, + LARGE = 2 +} diff --git a/src/Models/Type/QuestDisplayAttributeType.cs b/src/Models/Type/QuestDisplayAttributeType.cs new file mode 100644 index 0000000..af08416 --- /dev/null +++ b/src/Models/Type/QuestDisplayAttributeType.cs @@ -0,0 +1,14 @@ +namespace MariesWonderland.Models.Type; + +public enum QuestDisplayAttributeType +{ + UNKNOWN = 0, + FIRE = 2, + WATER = 5, + WIND = 6, + LIGHT = 3, + DARK = 1, + NOTHING = 4, + VARIOUS = 90, + ALL = 100 +} diff --git a/src/Models/Type/QuestFirstClearRewardType.cs b/src/Models/Type/QuestFirstClearRewardType.cs new file mode 100644 index 0000000..bd7f11d --- /dev/null +++ b/src/Models/Type/QuestFirstClearRewardType.cs @@ -0,0 +1,11 @@ +namespace MariesWonderland.Models.Type; + +public enum QuestFirstClearRewardType +{ + UNKNOWN = 0, + NORMAL = 1, + OBELISK_FIRST = 2, + OBELISK_SECOND = 3, + FULL_RESULT = 4, + NOT_SHOW = 5 +} diff --git a/src/Models/Type/QuestFlowType.cs b/src/Models/Type/QuestFlowType.cs new file mode 100644 index 0000000..f45bf0c --- /dev/null +++ b/src/Models/Type/QuestFlowType.cs @@ -0,0 +1,10 @@ +namespace MariesWonderland.Models.Type; + +public enum QuestFlowType +{ + UNKNOWN = 0, + MAIN_FLOW = 1, + SUB_FLOW = 2, + REPLAY_FLOW = 3, + ANOTHER_ROUTE_REPLAY_FLOW = 4 +} diff --git a/src/Models/Type/QuestMissionConditionType.cs b/src/Models/Type/QuestMissionConditionType.cs new file mode 100644 index 0000000..ff41e0d --- /dev/null +++ b/src/Models/Type/QuestMissionConditionType.cs @@ -0,0 +1,81 @@ +namespace MariesWonderland.Models.Type; + +public enum QuestMissionConditionType +{ + UNKNOWN = 0, + LESS_THAN_OR_EQUAL_X_PEOPLE_NOT_ALIVE = 1, + MAX_DAMAGE = 2, + SPECIFIED_COSTUME_IS_IN_DECK = 3, + SPECIFIED_CHARACTER_IS_IN_DECK = 4, + SPECIFIED_ATTRIBUTE_MAIN_WEAPON_IS_IN_DECK = 5, + GREATER_THAN_OR_EQUAL_X_COSTUME_SKILL_USE_COUNT = 6, + GREATER_THAN_OR_EQUAL_X_WEAPON_SKILL_USE_COUNT = 7, + GREATER_THAN_OR_EQUAL_X_COMPANION_SKILL_USE_COUNT = 8, + COSTUME_SKILLFUL_WEAPON_ALL_CHARACTER = 9, + COSTUME_SKILLFUL_WEAPON_ANY_CHARACTER = 10, + COSTUME_RARITY_EQ_ALL_CHARACTER = 11, + COSTUME_RARITY_GE_ALL_CHARACTER = 12, + COSTUME_RARITY_LE_ALL_CHARACTER = 13, + COSTUME_RARITY_EQ_ANY_CHARACTER = 14, + COSTUME_RARITY_GE_ANY_CHARACTER = 15, + COSTUME_RARITY_LE_ANY_CHARACTER = 16, + WEAPON_EVOLUTION_GROUP_ID = 17, + SPECIFIED_ATTRIBUTE_WEAPON_IS_IN_DECK = 18, + SPECIFIED_ATTRIBUTE_MAIN_WEAPON_ALL_CHARACTER = 19, + SPECIFIED_ATTRIBUTE_WEAPON_ALL_CHARACTER = 20, + WEAPON_MAN_SKILLFUL_WEAPON_ALL_CHARACTER = 21, + WEAPON_SKILLFUL_WEAPON_ALL_CHARACTER = 22, + WEAPON_MAN_SKILLFUL_WEAPON_ANY_CHARACTER = 23, + WEAPON_SKILLFUL_WEAPON_ANY_CHARACTER = 24, + WEAPON_RARITY_EQ_ALL_CHARACTER = 25, + WEAPON_RARITY_GE_ALL_CHARACTER = 26, + WEAPON_RARITY_LE_ALL_CHARACTER = 27, + WEAPON_MAIN_RARITY_EQ_ALL_CHARACTER = 28, + WEAPON_MAIN_RARITY_GE_ALL_CHARACTER = 29, + WEAPON_MAIN_RARITY_LE_ALL_CHARACTER = 30, + WEAPON_RARITY_EQ_ANY_CHARACTER = 31, + WEAPON_RARITY_GE_ANY_CHARACTER = 32, + WEAPON_RARITY_LE_ANY_CHARACTER = 33, + WEAPON_MAIN_RARITY_EQ_ANY_CHARACTER = 34, + WEAPON_MAIN_RARITY_GE_ANY_CHARACTER = 35, + WEAPON_MAIN_RARITY_LE_ANY_CHARACTER = 36, + COMPANION_ID = 37, + COMPANION_ATTRIBUTE = 38, + COMPANION_CATEGORY = 39, + PARTS_ID = 40, + PARTS_GROUP_ID = 41, + PARTS_RARITY_EQ = 42, + PARTS_RARITY_GE = 43, + PARTS_RARITY_LE = 44, + DECK_POWER_GE = 45, + DECK_POWER_LE = 46, + DECK_COSTUME_NUM_EQ = 47, + DECK_COSTUME_NUM_GE = 48, + DECK_COSTUME_NUM_LE = 49, + CRITICAL_COUNT_GE = 50, + MIN_HP_PERCENTAGE_GE = 51, + COMBO_COUNT_GE = 52, + COMBO_MAX_DAMAGE_GE = 53, + LESS_THAN_OR_EQUAL_X_COSTUME_SKILL_USE_COUNT = 54, + LESS_THAN_OR_EQUAL_X_WEAPON_SKILL_USE_COUNT = 55, + LESS_THAN_OR_EQUAL_X_COMPANION_SKILL_USE_COUNT = 56, + WITHOUT_RECOVERY_SKILL = 57, + WITHOUT_COSTUME_SKILL = 58, + WITHOUT_WEAPON_SKILL = 59, + WITHOUT_COMPANION_SKILL = 60, + CHARACTER_CONTAIN_ALL = 61, + CHARACTER_CONTAIN_ANY = 62, + COSTUME_CONTAIN_ALL = 63, + COSTUME_CONTAIN_ANY = 64, + COSTUME_SKILLFUL_WEAPON_CONTAIN_ALL = 65, + COSTUME_SKILLFUL_WEAPON_CONTAIN_ANY = 66, + ATTRIBUTE_MAIN_WEAPON_CONTAIN_ALL = 67, + ATTRIBUTE_MAIN_WEAPON_CONTAIN_ANY = 68, + ATTRIBUTE_WEAPON_CONTAIN_ALL = 69, + ATTRIBUTE_WEAPON_CONTAIN_ANY = 70, + WEAPON_MAN_SKILLFUL_WEAPON_CONTAIN_ALL = 71, + WEAPON_MAN_SKILLFUL_WEAPON_CONTAIN_ANY = 72, + WEAPON_SKILLFUL_WEAPON_CONTAIN_ALL = 73, + WEAPON_SKILLFUL_WEAPON_CONTAIN_ANY = 74, + COMPLETE = 9999 +} diff --git a/src/Models/Type/QuestReleaseConditionType.cs b/src/Models/Type/QuestReleaseConditionType.cs new file mode 100644 index 0000000..d267200 --- /dev/null +++ b/src/Models/Type/QuestReleaseConditionType.cs @@ -0,0 +1,13 @@ +namespace MariesWonderland.Models.Type; + +public enum QuestReleaseConditionType +{ + UNKNOWN = 0, + USER_LEVEL = 1, + CHARACTER_LEVEL = 2, + DECK_POWER = 3, + QUEST_CLEAR = 4, + WEAPON_ACQUISITION = 5, + BIG_HUNT_SCORE = 6, + QUEST_CHALLENGE = 7 +} diff --git a/src/Models/Type/QuestResultType.cs b/src/Models/Type/QuestResultType.cs new file mode 100644 index 0000000..8586ee7 --- /dev/null +++ b/src/Models/Type/QuestResultType.cs @@ -0,0 +1,9 @@ +namespace MariesWonderland.Models.Type; + +public enum QuestResultType +{ + UNKNOWN = 0, + NONE = 1, + HALF_RESULT = 2, + FULL_RESULT = 3 +} diff --git a/src/Models/Type/QuestSceneType.cs b/src/Models/Type/QuestSceneType.cs new file mode 100644 index 0000000..cda5cef --- /dev/null +++ b/src/Models/Type/QuestSceneType.cs @@ -0,0 +1,11 @@ +namespace MariesWonderland.Models.Type; + +public enum QuestSceneType +{ + UNKNOWN = 0, + TOWER = 1, + PICTURE_BOOK = 2, + FIELD = 3, + NOVEL = 4, + LIMIT_CONTENT = 5 +} diff --git a/src/Models/Type/QuestStateType.cs b/src/Models/Type/QuestStateType.cs new file mode 100644 index 0000000..db88314 --- /dev/null +++ b/src/Models/Type/QuestStateType.cs @@ -0,0 +1,9 @@ +namespace MariesWonderland.Models.Type; + +public enum QuestStateType +{ + UNKNOWN = 0, + ACTIVE = 1, + CLEARED = 2, + CHALLENGE = 4, +} diff --git a/src/Models/Type/QuestStorySkipType.cs b/src/Models/Type/QuestStorySkipType.cs new file mode 100644 index 0000000..cd3f14a --- /dev/null +++ b/src/Models/Type/QuestStorySkipType.cs @@ -0,0 +1,10 @@ +namespace MariesWonderland.Models.Type; + +public enum QuestStorySkipType +{ + UNKNOWN = 0, + NOT_SKIPPED = 1, + SKIP_PICTURE_BOOK_IN_MAIN_FLOW = 2, + SKIP_IN_MAINFLOW = 3, + SKIP_BY_BATTLE_ONLY_IN_SUB_FLOW = 4 +} diff --git a/src/Models/Type/QuestType.cs b/src/Models/Type/QuestType.cs new file mode 100644 index 0000000..c565d21 --- /dev/null +++ b/src/Models/Type/QuestType.cs @@ -0,0 +1,10 @@ +namespace MariesWonderland.Models.Type; + +public enum QuestType +{ + UNKNOWN = 0, + MAIN_QUEST = 1, + EVENT_QUEST = 2, + EXTRA_QUEST = 3, + BIG_HUNT_QUEST = 4, +} diff --git a/src/Models/Type/RarityType.cs b/src/Models/Type/RarityType.cs new file mode 100644 index 0000000..b5f5553 --- /dev/null +++ b/src/Models/Type/RarityType.cs @@ -0,0 +1,11 @@ +namespace MariesWonderland.Models.Type; + +public enum RarityType +{ + UNKNOWN = 0, + NORMAL = 10, + RARE = 20, + S_RARE = 30, + SS_RARE = 40, + LEGEND = 50 +} diff --git a/src/Models/Type/RecoveryPointCorrectionTargetSkillType.cs b/src/Models/Type/RecoveryPointCorrectionTargetSkillType.cs new file mode 100644 index 0000000..f09509d --- /dev/null +++ b/src/Models/Type/RecoveryPointCorrectionTargetSkillType.cs @@ -0,0 +1,9 @@ +namespace MariesWonderland.Models.Type; + +public enum RecoveryPointCorrectionTargetSkillType +{ + UNKNOWN = 0, + COSTUME_ACTIVE = 1, + WEAPON_ACTIVE = 2, + COSTUME_OR_WEAPON_ACTIVE = 3 +} diff --git a/src/Models/Type/RemoveAbnormalTargetType.cs b/src/Models/Type/RemoveAbnormalTargetType.cs new file mode 100644 index 0000000..c0cece9 --- /dev/null +++ b/src/Models/Type/RemoveAbnormalTargetType.cs @@ -0,0 +1,9 @@ +namespace MariesWonderland.Models.Type; + +public enum RemoveAbnormalTargetType +{ + UNKNOWN = 0, + NEWEST = 1, + OLDEST = 2, + RANDOM = 3 +} diff --git a/src/Models/Type/ScreenTransitionType.cs b/src/Models/Type/ScreenTransitionType.cs new file mode 100644 index 0000000..1baf281 --- /dev/null +++ b/src/Models/Type/ScreenTransitionType.cs @@ -0,0 +1,13 @@ +namespace MariesWonderland.Models.Type; + +public enum ScreenTransitionType +{ + Success = 0, + Stay = 1, + FunctionTop = 2, + Title = 3, + StayAndUserAuth = 4, + None = 5, + FatalRetry = 8, + FatalNoRetry = 9 +} diff --git a/src/Models/Type/ShopExchangeType.cs b/src/Models/Type/ShopExchangeType.cs new file mode 100644 index 0000000..09835f7 --- /dev/null +++ b/src/Models/Type/ShopExchangeType.cs @@ -0,0 +1,14 @@ +namespace MariesWonderland.Models.Type; + +public enum ShopExchangeType +{ + UNKNOWN = 0, + NO_SETTINGS = 1, + MEDAL = 2, + RARE_MEDAL = 3, + PVP = 4, + EVENT = 5, + GACHA_MEDAL = 6, + BIG_HUNT = 7, + MOM_POINT = 8 +} diff --git a/src/Models/Type/ShopGroupType.cs b/src/Models/Type/ShopGroupType.cs new file mode 100644 index 0000000..3454be3 --- /dev/null +++ b/src/Models/Type/ShopGroupType.cs @@ -0,0 +1,10 @@ +namespace MariesWonderland.Models.Type; + +public enum ShopGroupType +{ + UNKNOWN = 0, + PREMIUM_SHOP = 1, + ITEM_SHOP = 3, + EXCHANGE_SHOP = 4, + RECOVERY_SHOP = 5 +} diff --git a/src/Models/Type/ShopItemDecorationType.cs b/src/Models/Type/ShopItemDecorationType.cs new file mode 100644 index 0000000..3768cc6 --- /dev/null +++ b/src/Models/Type/ShopItemDecorationType.cs @@ -0,0 +1,8 @@ +namespace MariesWonderland.Models.Type; + +public enum ShopItemDecorationType +{ + UNKNOWN = 0, + DEFAULT = 1, + RAINBOW = 2 +} diff --git a/src/Models/Type/ShopPromotionType.cs b/src/Models/Type/ShopPromotionType.cs new file mode 100644 index 0000000..15c319d --- /dev/null +++ b/src/Models/Type/ShopPromotionType.cs @@ -0,0 +1,11 @@ +namespace MariesWonderland.Models.Type; + +public enum ShopPromotionType +{ + UNKNOWN = 0, + NOTHING = 1, + PICKUP = 2, + SALE = 3, + INCREASE = 4, + DAILY_LIMITED = 5 +} diff --git a/src/Models/Type/ShopType.cs b/src/Models/Type/ShopType.cs new file mode 100644 index 0000000..03f19ae --- /dev/null +++ b/src/Models/Type/ShopType.cs @@ -0,0 +1,17 @@ +namespace MariesWonderland.Models.Type; + +public enum ShopType +{ + UNKNOWN = 0, + GEM_SHOP = 1, + GOLD_SHOP = 2, + ITEM_SHOP = 3, + EXCHANGE_SHOP = 4, + STAMINA_RECOVERY_SHOP = 5, + BATTLE_POINT_RECOVERY_SHOP = 6, + PREMIUM_PACK_SHOP = 7, + PACK_SHOP = 8, + MISSION_SHOP = 9, + MOM_SHOP = 10, + PREMIUM_MISSION_PASS_SHOP = 11 +} diff --git a/src/Models/Type/ShopUpdatableLabelType.cs b/src/Models/Type/ShopUpdatableLabelType.cs new file mode 100644 index 0000000..0137310 --- /dev/null +++ b/src/Models/Type/ShopUpdatableLabelType.cs @@ -0,0 +1,10 @@ +namespace MariesWonderland.Models.Type; + +public enum ShopUpdatableLabelType +{ + UNKNOWN = 0, + FORBIDDEN = 1, + DAY = 2, + WEEK = 3, + MONTH = 4, +} diff --git a/src/Models/Type/SkillActType.cs b/src/Models/Type/SkillActType.cs new file mode 100644 index 0000000..46689d4 --- /dev/null +++ b/src/Models/Type/SkillActType.cs @@ -0,0 +1,14 @@ +namespace MariesWonderland.Models.Type; + +public enum SkillActType +{ + UNKNOWN = 0, + SINGLE_ATTACK_1 = 1, + SINGLE_ATTACK_2 = 2, + SINGLE_ATTACK_3 = 3, + SINGLE_ATTACK_4 = 4, + SINGLE_ATTACK_5 = 5, + ALL_ATTACK = 6, + SPECIAL = 7, + COUNTER = 8 +} diff --git a/src/Models/Type/SkillAiUnlockConditionValueType.cs b/src/Models/Type/SkillAiUnlockConditionValueType.cs new file mode 100644 index 0000000..38a7bfe --- /dev/null +++ b/src/Models/Type/SkillAiUnlockConditionValueType.cs @@ -0,0 +1,9 @@ +namespace MariesWonderland.Models.Type; + +public enum SkillAiUnlockConditionValueType +{ + UNKNOWN = 0, + NONE = 1, + UNLOCK_FUNCTION_TYPE = 2, + PVP_RANK = 3 +} diff --git a/src/Models/Type/SkillBehaviourActivationConditionHpRatioThresholdType.cs b/src/Models/Type/SkillBehaviourActivationConditionHpRatioThresholdType.cs new file mode 100644 index 0000000..348232e --- /dev/null +++ b/src/Models/Type/SkillBehaviourActivationConditionHpRatioThresholdType.cs @@ -0,0 +1,10 @@ +namespace MariesWonderland.Models.Type; + +public enum SkillBehaviourActivationConditionHpRatioThresholdType +{ + UNKNOWN = 0, + GREATER = 1, + GREATER_EQUAL = 2, + LESS = 3, + LESS_EQUAL = 4 +} diff --git a/src/Models/Type/SkillBehaviourActivationConditionType.cs b/src/Models/Type/SkillBehaviourActivationConditionType.cs new file mode 100644 index 0000000..7c1d3f8 --- /dev/null +++ b/src/Models/Type/SkillBehaviourActivationConditionType.cs @@ -0,0 +1,18 @@ +namespace MariesWonderland.Models.Type; + +public enum SkillBehaviourActivationConditionType +{ + UNKNOWN = 0, + ALWAYS = 1, + IN_SKILL_FLOW = 2, + IN_SKILL_FLOW_COUNTER = 3, + IS_SKILL_TARGET = 4, + IS_SKILL_EXECUTOR = 5, + HP_RATIO = 6, + ACTIVATION_UPPER_COUNT = 7, + WAVE_NUMBER = 8, + IS_EXECUTOR_ALIVE = 9, + ATTRIBUTE = 10, + SKILLFUL_MAIN_WEAPON_TYPE = 11, + IS_SKILL_EXECUTOR_OR_COUNTER = 12 +} diff --git a/src/Models/Type/SkillBehaviourLifetimeCalculationMethodType.cs b/src/Models/Type/SkillBehaviourLifetimeCalculationMethodType.cs new file mode 100644 index 0000000..134efc0 --- /dev/null +++ b/src/Models/Type/SkillBehaviourLifetimeCalculationMethodType.cs @@ -0,0 +1,12 @@ +namespace MariesWonderland.Models.Type; + +public enum SkillBehaviourLifetimeCalculationMethodType +{ + UNKNOWN = 0, + FRAME_COUNT = 1, + WAVE_COUNT = 2, + ACTION_COUNT = 3, + DEFAULT_SKILL_EXECUTE_COUNT = 4, + ACTIVE_SKILL_EXECUTE_COUNT = 5, + ONESHOT = 6 +} diff --git a/src/Models/Type/SkillBehaviourType.cs b/src/Models/Type/SkillBehaviourType.cs new file mode 100644 index 0000000..96c4048 --- /dev/null +++ b/src/Models/Type/SkillBehaviourType.cs @@ -0,0 +1,38 @@ +namespace MariesWonderland.Models.Type; + +public enum SkillBehaviourType +{ + UNKNOWN = 0, + ABNORMAL = 1, + ATTACK = 2, + BUFF = 3, + FORCE = 4, + NOTHING = 5, + RECOVERY = 6, + CHANGE_STEP = 7, + ATTRIBUTE_DAMAGE_CORRECTION = 8, + ACTIVE_SKILL_DAMAGE_CORRECTION = 9, + RECOVERY_SKILL_POWER_CORRECTION = 10, + DAMAGE_CORRECTION_HP_RATIO = 11, + ADVANCE_ACTIVE_SKILL_COOLTIME = 12, + ADVANCE_ACTIVE_SKILL_COOLTIME_IMMEDIATE = 13, + REVIVAL = 14, + DEFAULT_SKILL_LOTTERY_CORRECTION = 15, + ATTACK_HP_RATIO = 16, + ATTACK_COMBO = 17, + SHORTEN_ACTIVE_SKILL_COOLTIME = 18, + REMOVE_BUFF = 19, + DAMAGE_MULTIPLY = 20, + ATTACK_IGNORE_VITALITY = 21, + REMOVE_ABNORMAL = 22, + REMOVE_ABNORMAL_SILENT = 23, + ATTACK_FIXED_DAMAGE = 24, + ATTACK_VITALITY = 25, + HP_RATIO_DAMAGE = 26, + ATTACK_MAIN_WEAPON_ATTRIBUTE = 27, + ATTACK_CLAMP_MAX_HP = 28, + ATTACK_SKILLFUL_MAIN_WEAPON_TYPE = 29, + EXTEND_BUFF_COOLTIME = 30, + RECOVERY_POINT_CORRECTION = 31, + OVERLIMIT_DAMAGE_MULTIPLY = 32 +} diff --git a/src/Models/Type/SkillCasttimeAdvanceType.cs b/src/Models/Type/SkillCasttimeAdvanceType.cs new file mode 100644 index 0000000..992c64b --- /dev/null +++ b/src/Models/Type/SkillCasttimeAdvanceType.cs @@ -0,0 +1,8 @@ +namespace MariesWonderland.Models.Type; + +public enum SkillCasttimeAdvanceType +{ + UNKNOWN = 0, + INCREMENT = 1, + DECREMENT = 2 +} diff --git a/src/Models/Type/SkillCasttimeBehaviourType.cs b/src/Models/Type/SkillCasttimeBehaviourType.cs new file mode 100644 index 0000000..0fbe8fd --- /dev/null +++ b/src/Models/Type/SkillCasttimeBehaviourType.cs @@ -0,0 +1,8 @@ +namespace MariesWonderland.Models.Type; + +public enum SkillCasttimeBehaviourType +{ + UNKNOWN = 0, + FRAME_UPDATE = 1, + SKILL_DAMAGE_CONDITION = 2 +} diff --git a/src/Models/Type/SkillCategoryType.cs b/src/Models/Type/SkillCategoryType.cs new file mode 100644 index 0000000..ea5a504 --- /dev/null +++ b/src/Models/Type/SkillCategoryType.cs @@ -0,0 +1,11 @@ +namespace MariesWonderland.Models.Type; + +public enum SkillCategoryType +{ + UNKNOWN = 0, + ACTIVE_SKILL = 1, + COUNTER_SKILL = 2, + DEFAULT_SKILL = 3, + PASSIVE_SKILL = 4, + COSTUME_ACTIVE_SKILL = 5 +} diff --git a/src/Models/Type/SkillCooltimeAdvanceType.cs b/src/Models/Type/SkillCooltimeAdvanceType.cs new file mode 100644 index 0000000..b080fd1 --- /dev/null +++ b/src/Models/Type/SkillCooltimeAdvanceType.cs @@ -0,0 +1,8 @@ +namespace MariesWonderland.Models.Type; + +public enum SkillCooltimeAdvanceType +{ + UNKNOWN = 0, + ADD = 1, + MULTIPLY = 2 +} diff --git a/src/Models/Type/SkillCooltimeBehaviourType.cs b/src/Models/Type/SkillCooltimeBehaviourType.cs new file mode 100644 index 0000000..9546aff --- /dev/null +++ b/src/Models/Type/SkillCooltimeBehaviourType.cs @@ -0,0 +1,11 @@ +namespace MariesWonderland.Models.Type; + +public enum SkillCooltimeBehaviourType +{ + UNKNOWN = 0, + FRAME_UPDATE = 1, + EXECUTE_DEFAULT_SKILL = 2, + EXECUTE_COMPANION_SKILL = 3, + EXECUTE_ACTIVE_SKILL = 4, + SKILL_DAMAGE = 5 +} diff --git a/src/Models/Type/SkillRemoveBuffChoosingType.cs b/src/Models/Type/SkillRemoveBuffChoosingType.cs new file mode 100644 index 0000000..fb28602 --- /dev/null +++ b/src/Models/Type/SkillRemoveBuffChoosingType.cs @@ -0,0 +1,7 @@ +namespace MariesWonderland.Models.Type; + +public enum SkillRemoveBuffChoosingType +{ + UNKNOWN = 0, + RANDOM = 1 +} diff --git a/src/Models/Type/SkillRemoveBuffFilteringType.cs b/src/Models/Type/SkillRemoveBuffFilteringType.cs new file mode 100644 index 0000000..77f6203 --- /dev/null +++ b/src/Models/Type/SkillRemoveBuffFilteringType.cs @@ -0,0 +1,8 @@ +namespace MariesWonderland.Models.Type; + +public enum SkillRemoveBuffFilteringType +{ + UNKNOWN = 0, + NONE = 1, + STATUS_KIND = 2 +} diff --git a/src/Models/Type/SpeakerIconType.cs b/src/Models/Type/SpeakerIconType.cs new file mode 100644 index 0000000..97e3d78 --- /dev/null +++ b/src/Models/Type/SpeakerIconType.cs @@ -0,0 +1,9 @@ +namespace MariesWonderland.Models.Type; + +public enum SpeakerIconType +{ + UNKNOWN = 0, + NONE = 1, + COMMON = 2, + UNIQUE = 3 +} diff --git a/src/Models/Type/SpecialEndBattleActType.cs b/src/Models/Type/SpecialEndBattleActType.cs new file mode 100644 index 0000000..9e1cb49 --- /dev/null +++ b/src/Models/Type/SpecialEndBattleActType.cs @@ -0,0 +1,10 @@ +namespace MariesWonderland.Models.Type; + +public enum SpecialEndBattleActType +{ + UNKNOWN = 0, + ALIVE_AND_DISABLE_WEAPON = 1, + BACK_HEAVY_AND_IMPULSE = 2, + WITHOUT_DEATH_EFFECT = 3, + ALIVE_AND_DISABLE_WEAPON_IDLE = 4 +} diff --git a/src/Models/Type/StainedGlassCategoryType.cs b/src/Models/Type/StainedGlassCategoryType.cs new file mode 100644 index 0000000..539ba9e --- /dev/null +++ b/src/Models/Type/StainedGlassCategoryType.cs @@ -0,0 +1,9 @@ +namespace MariesWonderland.Models.Type; + +public enum StainedGlassCategoryType +{ + UNKNOWN = 0, + MAIN = 1, + EVENT = 2, + OTHER = 3 +} diff --git a/src/Models/Type/StainedGlassStatusUpTargetType.cs b/src/Models/Type/StainedGlassStatusUpTargetType.cs new file mode 100644 index 0000000..f9de57c --- /dev/null +++ b/src/Models/Type/StainedGlassStatusUpTargetType.cs @@ -0,0 +1,8 @@ +namespace MariesWonderland.Models.Type; + +public enum StainedGlassStatusUpTargetType +{ + UNKNOWN = 0, + CHARACTER = 1, + SKILLFUL_WEAPON = 2 +} diff --git a/src/Models/Type/StatusCalculationType.cs b/src/Models/Type/StatusCalculationType.cs new file mode 100644 index 0000000..a378865 --- /dev/null +++ b/src/Models/Type/StatusCalculationType.cs @@ -0,0 +1,8 @@ +namespace MariesWonderland.Models.Type; + +public enum StatusCalculationType +{ + UNKNOWN = 0, + ADD = 1, + MULTIPLY = 2 +} diff --git a/src/Models/Type/StatusChangeType.cs b/src/Models/Type/StatusChangeType.cs new file mode 100644 index 0000000..a9affdd --- /dev/null +++ b/src/Models/Type/StatusChangeType.cs @@ -0,0 +1,20 @@ +namespace MariesWonderland.Models.Type; + +public enum StatusChangeType +{ + UNKNOWN = 0, + AGILITY_ADD = 1, + AGILITY_MULTIPLY = 2, + ATTACK_ADD = 3, + ATTACK_MULTIPLY = 4, + CRITICAL_ATTACK_ADD = 5, + CRITICAL_ATTACK_MULTIPLY = 6, + CRITICAL_RATIO_ADD = 7, + CRITICAL_RATIO_MULTIPLY = 8, + EVASION_RATIO_ADD = 9, + EVASION_RATIO_MULTIPLY = 10, + HP_ADD = 11, + HP_MULTIPLY = 12, + VITALITY_ADD = 13, + VITALITY_MULTIPLY = 14 +} diff --git a/src/Models/Type/StatusKindType.cs b/src/Models/Type/StatusKindType.cs new file mode 100644 index 0000000..0bb8a1a --- /dev/null +++ b/src/Models/Type/StatusKindType.cs @@ -0,0 +1,13 @@ +namespace MariesWonderland.Models.Type; + +public enum StatusKindType +{ + UNKNOWN = 0, + AGILITY = 1, + ATTACK = 2, + CRITICAL_ATTACK = 3, + CRITICAL_RATIO = 4, + EVASION_RATIO = 5, + HP = 6, + VITALITY = 7 +} diff --git a/src/Models/Type/SystemLanguage.cs b/src/Models/Type/SystemLanguage.cs new file mode 100644 index 0000000..6c8c35a --- /dev/null +++ b/src/Models/Type/SystemLanguage.cs @@ -0,0 +1,48 @@ +namespace MariesWonderland.Models.Type; + +public enum SystemLanguage +{ + Afrikaans = 0, + Arabic = 1, + Basque = 2, + Belarusian = 3, + Bulgarian = 4, + Catalan = 5, + Chinese = 6, + Czech = 7, + Danish = 8, + Dutch = 9, + English = 10, + Estonian = 11, + Faroese = 12, + Finnish = 13, + French = 14, + German = 15, + Greek = 16, + Hebrew = 17, + Icelandic = 19, + Indonesian = 20, + Italian = 21, + Japanese = 22, + Korean = 23, + Latvian = 24, + Lithuanian = 25, + Norwegian = 26, + Polish = 27, + Portuguese = 28, + Romanian = 29, + Russian = 30, + SerboCroatian = 31, + Slovak = 32, + Slovenian = 33, + Spanish = 34, + Swedish = 35, + Thai = 36, + Turkish = 37, + Ukrainian = 38, + Vietnamese = 39, + ChineseSimplified = 40, + ChineseTraditional = 41, + Unknown = 42, + Hungarian = 18 +} diff --git a/src/Models/Type/TargetUserStatusType.cs b/src/Models/Type/TargetUserStatusType.cs new file mode 100644 index 0000000..c2e9db7 --- /dev/null +++ b/src/Models/Type/TargetUserStatusType.cs @@ -0,0 +1,10 @@ +namespace MariesWonderland.Models.Type; + +public enum TargetUserStatusType +{ + UNKNOWN = 0, + ALL = 1, + COMEBACK = 2, + BEGINNER = 3, + COMEBACK_GRADE = 4 +} diff --git a/src/Models/Type/TipDisplayConditionType.cs b/src/Models/Type/TipDisplayConditionType.cs new file mode 100644 index 0000000..3f70054 --- /dev/null +++ b/src/Models/Type/TipDisplayConditionType.cs @@ -0,0 +1,21 @@ +namespace MariesWonderland.Models.Type; + +public enum TipDisplayConditionType +{ + UNKNOWN = 0, + DEFAULT = 1, + COMEBACK_DAYS = 2, + TIP_ID_DISPLAYED_ON_THE_SAME_DAY = 3, + TIP_ID_NOT_DISPLAYED_ON_THE_SAME_DAY = 4, + QUEST_CLEAR = 5, + FRIEND_COUNT = 6, + QUEST_NOT_CLEAR = 7, + TIP_ID_DISPLAYED = 8, + TIP_ID_NOT_DISPLAYED = 9, + TIP_BACKGROUND_ASSET_ID_DISPLAYED_ON_THE_SAME_DAY = 10, + TIP_BACKGROUND_ASSET_ID_NOT_DISPLAYED_ON_THE_SAME_DAY = 11, + TIP_BACKGROUND_ASSET_ID_DISPLAYED = 12, + TIP_BACKGROUND_ASSET_ID_NOT_DISPLAYED = 13, + USER_CURRENT_SEASON_ID = 14, + USER_CURRENT_ROUTE_ID = 15 +} diff --git a/src/Models/Type/TipSituationType.cs b/src/Models/Type/TipSituationType.cs new file mode 100644 index 0000000..0a46a62 --- /dev/null +++ b/src/Models/Type/TipSituationType.cs @@ -0,0 +1,15 @@ +namespace MariesWonderland.Models.Type; + +public enum TipSituationType +{ + UNKNOWN = 0, + DEFAULT = 1, + ASSET_INITIAL_DOWNLOAD = 2, + AFTER_LOSED_BATTLE = 3, + TRANSITION_BATTLE = 4, + TITLE = 5, + TRANSITION_QUEST_BY_SEASON_ID = 6, + TRANSITION_QUEST_BY_MAIN_CHAPTER_ID = 7, + TRANSITION_QUEST_BY_EVENT_CHAPTER_ID = 8, + TRANSITION_CAGE_BY_SEASON_ID = 9 +} diff --git a/src/Models/Type/TitleStillLogoType.cs b/src/Models/Type/TitleStillLogoType.cs new file mode 100644 index 0000000..765f3f5 --- /dev/null +++ b/src/Models/Type/TitleStillLogoType.cs @@ -0,0 +1,8 @@ +namespace MariesWonderland.Models.Type; + +public enum TitleStillLogoType +{ + UNKNOWN = 0, + WHITE = 1, + BLACK = 2 +} diff --git a/src/Models/Type/TransitionRouteType.cs b/src/Models/Type/TransitionRouteType.cs new file mode 100644 index 0000000..ea86e6c --- /dev/null +++ b/src/Models/Type/TransitionRouteType.cs @@ -0,0 +1,12 @@ +namespace MariesWonderland.Models.Type; + +public enum TransitionRouteType +{ + Unknown = 0, + Quest = 1, + Shop = 2, + Gacha = 3, + LoginBonus = 4, + Mission = 5, + Info = 6 +} diff --git a/src/Models/Type/TutorialType.cs b/src/Models/Type/TutorialType.cs new file mode 100644 index 0000000..1c47858 --- /dev/null +++ b/src/Models/Type/TutorialType.cs @@ -0,0 +1,106 @@ +namespace MariesWonderland.Models.Type; + +public enum TutorialType +{ + UNKNOWN = 0, + GAME_START = 1, + MENU_FIRST = 2, + MENU_SECOND = 3, + BATTLE_WEAPON_SKILL = 4, + BATTLE_COSTUME_SKILL = 5, + BLACK_BIRD = 6, + ENHANCE = 7, + COMPANION = 8, + PARTS = 9, + EXPLORE = 10, + PVP = 11, + MAIN_QUEST_HARD = 12, + MAIN_QUEST_VERY_HARD = 13, + EVENT_QUEST_FIRST = 14, + EVENT_QUEST_CHARACTER = 15, + EVENT_QUEST_MARATHON = 16, + EVENT_QUEST_HUNT = 17, + EVENT_QUEST_DUNGEON = 18, + EVENT_QUEST_DAY_OF_THE_WEEK = 19, + EVENT_QUEST_GUERRILLA = 20, + END_CONTENTS = 21, + END_CONTENTS_QUEST = 22, + EXPLORE_GAME_1 = 23, + EXPLORE_GAME_2 = 24, + PORTAL_CAGE = 25, + PORTAL_CAGE_MAIN_QUEST = 26, + CAGE = 27, + PORTAL_CAGE_DAILY_QUEST = 28, + PORTAL_CAGE_DAILY_GACHA = 29, + PORTAL_CAGE_DROP_ITEM = 30, + PORTAL_CAGE_REACHED_LAST_QUEST_SCENE = 31, + PORTAL_CAGE_CHARACTER_1 = 32, + PORTAL_CAGE_CHARACTER_2 = 33, + PORTAL_CAGE_CHARACTER_3 = 34, + PORTAL_CAGE_CHARACTER_4 = 35, + PORTAL_CAGE_CHARACTER_5 = 36, + BLACK_BIRD_CHARACTER_1 = 37, + BLACK_BIRD_CHARACTER_2 = 38, + BLACK_BIRD_CHARACTER_3 = 39, + GOHOBI = 40, + GOHOBI_DROP = 41, + BATTLE_CANCEL_ENEMY_SKILL_CAST_1 = 42, + BATTLE_CANCEL_ENEMY_SKILL_CAST_2 = 43, + LOSE_FIRST = 44, + REWARD_GACHA = 45, + BIG_WIN_BONUS_FIRST = 46, + BIG_HUNT = 47, + TRIPLE_DECK = 48, + CHARACTER_BOARD = 49, + CHARACTER_BOARD_BASIC = 50, + CHARACTER_BOARD_BIG_HUNT = 51, + WORLD_MAP = 52, + MAP_ITEM_FULL = 53, + WORLD_MAP_BLACK_BIRD = 54, + WORLD_MAP_TREASURE = 55, + BROKEN_OBELISK = 56, + LOSE_FIRST_AFTER_CHAPTER = 57, + REPLAY_FLOW_SKIP = 58, + WORLD_MAP_OUTGAME = 59, + BATTLE_CERTAIN_KILL_SKILL = 60, + SMART_PHONE_FIRST = 101, + PHOTO_FIRST = 102, + DAILY_GACHA = 103, + PORTAL_CAGE_SEASON = 104, + QUEST_SKIP = 201, + PORTAL_CAGE_CHAPTER = 202, + CHARACTER_BOARD_UNLOCK_TUTORIAL = 301, + BLACK_BIRD_SISTERS_FIRST = 401, + COSTUME_LEVEL_BONUS = 501, + WORLD_MAP_REPORT = 601, + BOSS_SPECIAL_EFFECT = 701, + EVENT_QUEST_GUERRILLA_FREE_OPEN = 801, + EXPLORE_HARD = 901, + CAGE_MEMORY = 1001, + DRESSUP_COSTUME = 1101, + COSTUME_AWAKEN = 1201, + THOUGHT_ORGANIZATION = 1202, + HIDE_OBELISK = 1301, + LIMIT_CONTENT = 1302, + FIELD_EFFECT = 1303, + LIMIT_CONTENT_CAGE = 1304, + CHARACTER_VIEWER = 1305, + RECYCLE_GACHA = 1306, + MOM_POINT = 1401, + STAINED_GLASS = 1402, + CHARACTER_REBIRTH = 1501, + WEAPON_AWAKEN = 1502, + EVENT_QUEST_LABYRINTH = 1503, + MISSION_PASS = 1701, + WEAPON_ALL_ORGANIZATION = 1702, + COSTUME_LOTTERY_EFFECT = 1801, + MAIN_QUEST_3_3_TICKET_GET_1 = 1901, + MAIN_QUEST_3_3_TICKET_GET_2 = 1902, + MAIN_QUEST_3_3_TICKET_GET_3 = 1903, + MAIN_QUEST_3_3_TICKET_GET_4 = 1904, + MAIN_QUEST_3_3_TICKET_GET_5 = 1905, + MAIN_QUEST_3_3_TICKET_CONSUME = 1906, + MAIN_QUEST_3_3_NOISE_WALL_CLEAR = 1907, + ANOTHER_ROUTE = 2001, + DELETE_COSTUME_FIO = 2101 +} diff --git a/src/Models/Type/TutorialUnlockConditionType.cs b/src/Models/Type/TutorialUnlockConditionType.cs new file mode 100644 index 0000000..604c534 --- /dev/null +++ b/src/Models/Type/TutorialUnlockConditionType.cs @@ -0,0 +1,9 @@ +namespace MariesWonderland.Models.Type; + +public enum TutorialUnlockConditionType +{ + UNKNOWN = 0, + FUNCTION_RELEASED = 1, + REACH_SPECIFIED_QUEST_SCENE = 2, + UNTIL_REACH_SPECIFIED_QUEST_SCENE = 3 +} diff --git a/src/Models/Type/UnlockConditionType.cs b/src/Models/Type/UnlockConditionType.cs new file mode 100644 index 0000000..e5f495d --- /dev/null +++ b/src/Models/Type/UnlockConditionType.cs @@ -0,0 +1,8 @@ +namespace MariesWonderland.Models.Type; + +public enum UnlockConditionType +{ + UNKNOWN = 0, + QUEST_CLEAR = 1, + REACH_SPECIFIED_CHARACTER_LEVEL = 2 +} diff --git a/src/Models/Type/ViewBuffAbnormalType.cs b/src/Models/Type/ViewBuffAbnormalType.cs new file mode 100644 index 0000000..60d2a57 --- /dev/null +++ b/src/Models/Type/ViewBuffAbnormalType.cs @@ -0,0 +1,10 @@ +namespace MariesWonderland.Models.Type; + +public enum ViewBuffAbnormalType +{ + UNKNOWN = 0, + NONE = 1, + BOTTOM_FIXED = 2, + TOP_FIXED = 3, + FOLLOW_TARGET = 4 +} diff --git a/src/Models/Type/ViewLevelTextType.cs b/src/Models/Type/ViewLevelTextType.cs new file mode 100644 index 0000000..5e3053e --- /dev/null +++ b/src/Models/Type/ViewLevelTextType.cs @@ -0,0 +1,9 @@ +namespace MariesWonderland.Models.Type; + +public enum ViewLevelTextType +{ + UNKNOWN = 0, + NOTHING = 1, + FOLLOW_TARGET = 2, + TOP_FIXED = 3 +} diff --git a/src/Models/Type/ViewNameTextType.cs b/src/Models/Type/ViewNameTextType.cs new file mode 100644 index 0000000..55ec53d --- /dev/null +++ b/src/Models/Type/ViewNameTextType.cs @@ -0,0 +1,11 @@ +namespace MariesWonderland.Models.Type; + +public enum ViewNameTextType +{ + UNKNOWN = 0, + SMALL_FIXED = 1, + MEDIUM_FIXED = 2, + LARGE_FIXED = 3, + FOLLOW_TARGET = 4, + NONE = 5 +} diff --git a/src/Models/Type/ViewSkillButtonType.cs b/src/Models/Type/ViewSkillButtonType.cs new file mode 100644 index 0000000..8bd0caa --- /dev/null +++ b/src/Models/Type/ViewSkillButtonType.cs @@ -0,0 +1,10 @@ +namespace MariesWonderland.Models.Type; + +public enum ViewSkillButtonType +{ + UNKNOWN = 0, + ZERO = 1, + ONE = 2, + TWO = 3, + LARGE = 4 +} diff --git a/src/Models/Type/WeaponStoryReleaseConditionType.cs b/src/Models/Type/WeaponStoryReleaseConditionType.cs new file mode 100644 index 0000000..fe04020 --- /dev/null +++ b/src/Models/Type/WeaponStoryReleaseConditionType.cs @@ -0,0 +1,13 @@ +namespace MariesWonderland.Models.Type; + +public enum WeaponStoryReleaseConditionType +{ + UNKNOWN = 0, + ACQUISITION = 1, + REACH_SPECIFIED_LEVEL = 2, + REACH_INITIAL_MAX_LEVEL = 3, + REACH_ONCE_EVOLVED_MAX_LEVEL = 4, + REACH_SPECIFIED_EVOLUTION_COUNT = 5, + QUEST_CLEAR = 6, + MAIN_FLOW_SCENE_PROGRESS = 7 +} diff --git a/src/Models/Type/WeaponType.cs b/src/Models/Type/WeaponType.cs new file mode 100644 index 0000000..3e6790f --- /dev/null +++ b/src/Models/Type/WeaponType.cs @@ -0,0 +1,14 @@ +namespace MariesWonderland.Models.Type; + +public enum WeaponType +{ + UNKNOWN = 0, + SWORD = 1, + SPEAR = 2, + BIG_SWORD = 3, + FIST = 4, + STAFF = 5, + GUN = 6, + COMPANION = 7, + MT_WEAPON = 8 +} diff --git a/src/Models/Type/WorldMapEnableGimmickType.cs b/src/Models/Type/WorldMapEnableGimmickType.cs new file mode 100644 index 0000000..bd0bda8 --- /dev/null +++ b/src/Models/Type/WorldMapEnableGimmickType.cs @@ -0,0 +1,9 @@ +namespace MariesWonderland.Models.Type; + +public enum WorldMapEnableGimmickType +{ + None = 0, + NotStart = 1, + InProgress = 2, + Cleared = 3 +} diff --git a/src/Models/Type/WorldMapGimmickSequenceProgressType.cs b/src/Models/Type/WorldMapGimmickSequenceProgressType.cs new file mode 100644 index 0000000..d860389 --- /dev/null +++ b/src/Models/Type/WorldMapGimmickSequenceProgressType.cs @@ -0,0 +1,9 @@ +namespace MariesWonderland.Models.Type; + +public enum WorldMapGimmickSequenceProgressType +{ + None = 0, + RequireHourOnly = 1, + StartDateTimeOnly = 2, + RequireHourAndStartDateTime = 3 +} diff --git a/src/Program.cs b/src/Program.cs new file mode 100644 index 0000000..c3a467d --- /dev/null +++ b/src/Program.cs @@ -0,0 +1,61 @@ +using MariesWonderland.Configuration; +using MariesWonderland.Data; +using MariesWonderland.Extensions; +using MariesWonderland.Interceptors; +using Microsoft.AspNetCore.Server.Kestrel.Core; +using Microsoft.Extensions.Options; + +namespace MariesWonderland; + +public static class Program +{ + public static void Main(string[] args) + { + var builder = WebApplication.CreateBuilder(args); + + builder.WebHost.ConfigureKestrel(options => + { + options.ListenAnyIP(80, x => x.Protocols = HttpProtocols.Http1AndHttp2); + options.ListenAnyIP(443, x => + { + //var cert = X509CertificateLoader.LoadPkcs12FromFile(@"E:\Downloads\cert_key\cert.pfx", "yourpassword"); + //x.UseHttps(cert); + x.Protocols = HttpProtocols.Http2; + }); + }); + + builder.Services.AddSingleton(); + builder.Services.AddSingleton(); + builder.Services.AddSingleton(); + builder.Services.AddSingleton(); + builder.Services.AddGrpc(options => + { + options.Interceptors.Add(); + options.Interceptors.Add(); + options.Interceptors.Add(); + options.Interceptors.Add(); + }); + builder.Services.AddServerOptions(builder.Configuration); + builder.Services.AddDataStores(builder.Configuration); + + var app = builder.Build(); + + // Load user data on startup + UserDataStore userDataStore = app.Services.GetRequiredService(); + ServerOptions serverOptions = app.Services.GetRequiredService>().Value; + string userDatabasePath = Path.IsPathRooted(serverOptions.Data.UserDatabase) + ? serverOptions.Data.UserDatabase + : Path.Combine(AppContext.BaseDirectory, serverOptions.Data.UserDatabase); + + int loadedUsers = userDataStore.Load(userDatabasePath); + if (loadedUsers > 0) + { + app.Logger.LogInformation("Loaded {Count} users from {Path}", loadedUsers, userDatabasePath); + } + + app.MapGrpcServices(); + app.MapHttpApis(); + + app.Run(); + } +} \ No newline at end of file diff --git a/src/Properties/launchSettings.json b/src/Properties/launchSettings.json new file mode 100644 index 0000000..3a22cd7 --- /dev/null +++ b/src/Properties/launchSettings.json @@ -0,0 +1,14 @@ +{ + "$schema": "http://json.schemastore.org/launchsettings.json", + "profiles": { + "https": { + "commandName": "Project", + "dotnetRunMessages": true, + "launchBrowser": false, + "applicationUrl": "https://localhost:7776;http://localhost:7777", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + } + } +} diff --git a/src/Services/BannerService.cs b/src/Services/BannerService.cs new file mode 100644 index 0000000..1981af3 --- /dev/null +++ b/src/Services/BannerService.cs @@ -0,0 +1,114 @@ +using Grpc.Core; +using MariesWonderland.Data; +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; +using MariesWonderland.Proto.Banner; + +namespace MariesWonderland.Services; + +public class BannerService(DarkMasterMemoryDatabase masterDb) : MariesWonderland.Proto.Banner.BannerService.BannerServiceBase +{ + private readonly DarkMasterMemoryDatabase _masterDb = masterDb; + + /// Returns available gacha banners grouped into term-limited and chapter categories for the Mama banner screen. + public override Task GetMamaBanner(GetMamaBannerRequest request, ServerCallContext context) + { + Dictionary medalByGachaId = []; + foreach (EntityMGachaMedal medal in _masterDb.EntityMGachaMedal) + { + medalByGachaId[medal.ShopTransitionGachaId] = medal; + } + + List termLimited = []; + HashSet seenStepUpGroups = []; + GachaBanner? latestChapter = null; + + foreach (EntityMMomBanner banner in _masterDb.EntityMMomBanner) + { + if (banner.DestinationDomainType != DomainType.GACHA) + { + continue; + } + + int gachaId = banner.DestinationDomainId; + + GachaLabelType labelType = InferGachaLabelType(banner.BannerAssetName); + + // Chapter gachas (common_ prefix) are exempt from the medal requirement. + if (!medalByGachaId.ContainsKey(gachaId) && labelType != GachaLabelType.CHAPTER) + { + continue; + } + + // Skip portal cage and recycle banners (not displayed on home screen). + if (labelType is GachaLabelType.PORTAL_CAGE or GachaLabelType.RECYCLE) + { + continue; + } + + // Step-up banners: truncate to group ID (562001 → 562) using StepUpGroupDivisor. + // Multiple raw step IDs map to the same group, so deduplicate. + if (banner.BannerAssetName.StartsWith("step_up_", StringComparison.Ordinal)) + { + gachaId /= 1000; + if (!seenStepUpGroups.Add(gachaId)) + { + continue; + } + } + + GachaBanner b = new() + { + GachaLabelType = (int)labelType, + GachaAssetName = banner.BannerAssetName, + GachaId = gachaId + }; + + switch (labelType) + { + case GachaLabelType.EVENT: + case GachaLabelType.PREMIUM: + termLimited.Add(b); + break; + case GachaLabelType.CHAPTER: + if (latestChapter is null || gachaId > latestChapter.GachaId) + { + latestChapter = b; + } + break; + } + } + + GetMamaBannerResponse response = new() + { + LatestChapterGacha = latestChapter, + IsExistUnreadPop = false + }; + response.TermLimitedGacha.AddRange(termLimited); + + return Task.FromResult(response); + } + + /// + /// Master data has no GachaLabelType field, so we infer from the banner asset name prefix. + /// All term-limited gachas (step_up_, limited_, etc.) use PREMIUM (value 1). + /// + private static GachaLabelType InferGachaLabelType(string assetName) + { + if (assetName.StartsWith("common_", StringComparison.Ordinal)) + { + return GachaLabelType.CHAPTER; + } + if (assetName.StartsWith("portal_cage_", StringComparison.Ordinal)) + { + return GachaLabelType.PORTAL_CAGE; + } + if (assetName.StartsWith("recycle_", StringComparison.Ordinal)) + { + return GachaLabelType.RECYCLE; + } + // All term-limited gachas (step_up_, limited_, event_, etc.) default to PREMIUM (value 1). + return GachaLabelType.PREMIUM; + } +} + diff --git a/src/Services/BattleService.cs b/src/Services/BattleService.cs new file mode 100644 index 0000000..ab486d0 --- /dev/null +++ b/src/Services/BattleService.cs @@ -0,0 +1,69 @@ +using Grpc.Core; +using MariesWonderland.Data; +using MariesWonderland.Extensions; +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; +using MariesWonderland.Proto.Battle; + +namespace MariesWonderland.Services; + +public class BattleService(UserDataStore store) : MariesWonderland.Proto.Battle.BattleService.BattleServiceBase +{ + private readonly UserDataStore _store = store; + + /// Initializes a battle wave; currently a no-op that returns empty response. + public override Task StartWave(StartWaveRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + + return Task.FromResult(new StartWaveResponse()); + } + + /// Records battle results and tracks shortest clear time. + public override Task FinishWave(FinishWaveRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + + long nowMs = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(); + BattleDetail? detail = request.BattleDetail; + + // Find the currently active quest so we can associate this battle with it. + EntityIUserQuest? activeQuest = userDb.EntityIUserQuest + .FirstOrDefault(q => q.QuestStateType == (int)QuestStateType.ACTIVE); + + // Save full battle record mirroring the proto request structure. + EntitySBattleDetail battleRecord = new() + { + QuestId = activeQuest?.QuestId ?? 0, + UserId = userId, + ElapsedFrameCount = request.ElapsedFrameCount, + BattleBinary = request.BattleBinary.ToBase64(), + RecordedAt = DateTime.UtcNow, + MaxDamage = detail?.MaxDamage ?? 0, + PlayerCostumeActiveSkillUsedCount = detail?.PlayerCostumeActiveSkillUsedCount ?? 0, + PlayerWeaponActiveSkillUsedCount = detail?.PlayerWeaponActiveSkillUsedCount ?? 0, + PlayerCompanionSkillUsedCount = detail?.PlayerCompanionSkillUsedCount ?? 0, + CriticalCount = detail?.CriticalCount ?? 0, + ComboCount = detail?.ComboCount ?? 0, + ComboMaxDamage = detail?.ComboMaxDamage ?? 0, + TotalRecoverPoint = detail?.TotalRecoverPoint ?? 0, + CostumeBattleInfoList = detail != null ? [.. detail.CostumeBattleInfo] : [], + UserPartyResultInfoList = [.. request.UserPartyResultInfoList], + NpcPartyResultInfoList = [.. request.NpcPartyResultInfoList], + }; + userDb.BattleDetails.Add(battleRecord); + + if (activeQuest != null) + { + // Track shortest clear time. + if (activeQuest.ShortestClearFrames == 0 || request.ElapsedFrameCount < activeQuest.ShortestClearFrames) + { + activeQuest.ShortestClearFrames = (int)request.ElapsedFrameCount; + } + } + + return Task.FromResult(new FinishWaveResponse()); + } +} diff --git a/src/Services/BigHuntService.cs b/src/Services/BigHuntService.cs new file mode 100644 index 0000000..4eb45f4 --- /dev/null +++ b/src/Services/BigHuntService.cs @@ -0,0 +1,772 @@ +using Google.Protobuf.WellKnownTypes; +using Grpc.Core; +using MariesWonderland.Data; +using MariesWonderland.Extensions; +using MariesWonderland.Helpers; +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; +using MariesWonderland.Proto.BigHunt; + +namespace MariesWonderland.Services; + +public class BigHuntService(UserDataStore store, DarkMasterMemoryDatabase masterDb) + : MariesWonderland.Proto.BigHunt.BighuntService.BighuntServiceBase +{ + private readonly UserDataStore _store = store; + private readonly DarkMasterMemoryDatabase _masterDb = masterDb; + + /// + /// Begins a BigHunt quest run: deducts stamina for the selected quest, records the player's deck choice, + /// and initialises per-boss-quest status tracking. + /// + public override Task StartBigHuntQuest(StartBigHuntQuestRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + long nowMs = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(); + + EntityMBigHuntQuest? bhQuest = _masterDb.EntityMBigHuntQuest + .FirstOrDefault(q => q.BigHuntQuestId == request.BigHuntQuestId); + + if (bhQuest is not null) + { + HandleBigHuntQuestStart(userDb, userId, bhQuest.QuestId, request.UserDeckNumber, nowMs); + } + + // Set progress status + EntityIUserBigHuntProgressStatus progress = GetOrCreateProgress(userDb, userId); + progress.CurrentBigHuntBossQuestId = request.BigHuntBossQuestId; + progress.CurrentBigHuntQuestId = request.BigHuntQuestId; + progress.CurrentQuestSceneId = 0; + progress.IsDryRun = request.IsDryRun; + + // Store deck number in server-side session + EntitySBigHuntSession session = GetOrCreateSession(userDb, userId); + session.DeckNumber = request.UserDeckNumber; + + // Update per-boss-quest status + EntityIUserBigHuntStatus status = GetOrCreateStatus(userDb, userId, request.BigHuntBossQuestId); + status.DailyChallengeCount++; + status.LatestChallengeDatetime = nowMs; + + return Task.FromResult(new StartBigHuntQuestResponse()); + } + + /// + /// Advances the player's current quest scene checkpoint during an active hunt run. + /// + public override Task UpdateBigHuntQuestSceneProgress(UpdateBigHuntQuestSceneProgressRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + + EntityIUserBigHuntProgressStatus progress = GetOrCreateProgress(userDb, userId); + progress.CurrentQuestSceneId = request.QuestSceneId; + + return Task.FromResult(new UpdateBigHuntQuestSceneProgressResponse()); + } + + /// + /// Concludes a hunt run: computes the final score from damage and permil bonuses (difficulty, alive, combo), + /// updates high scores at boss/schedule/weekly levels, issues newly unlocked threshold rewards, and clears + /// the in-progress session state. Returns an empty score info for retired or dry-run runs. + /// + public override Task FinishBigHuntQuest(FinishBigHuntQuestRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + long nowMs = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(); + + EntityMBigHuntQuest? bhQuest = _masterDb.EntityMBigHuntQuest + .FirstOrDefault(q => q.BigHuntQuestId == request.BigHuntQuestId); + EntityMBigHuntBossQuest? bossQuest = _masterDb.EntityMBigHuntBossQuest + .FirstOrDefault(q => q.BigHuntBossQuestId == request.BigHuntBossQuestId); + EntityMBigHuntBoss? boss = bossQuest is not null + ? _masterDb.EntityMBigHuntBoss.FirstOrDefault(b => b.BigHuntBossId == bossQuest.BigHuntBossId) + : null; + + if (bhQuest is not null) + { + HandleBigHuntQuestFinish(userDb, userId, bhQuest.QuestId, request.IsRetired, nowMs); + } + + EntityIUserBigHuntProgressStatus progress = GetOrCreateProgress(userDb, userId); + EntitySBigHuntSession session = GetOrCreateSession(userDb, userId); + + // Retired or dry run — clear progress and return empty score info. + if (request.IsRetired || progress.IsDryRun) + { + ClearProgress(progress); + return Task.FromResult(new FinishBigHuntQuestResponse + { + ScoreInfo = new BigHuntScoreInfo(), + BattleReport = new BigHuntBattleReport() + }); + } + + // --- Scoring engine --- + long totalDamage = session.TotalDamage; + long baseScore = totalDamage; + + int difficultyBonusPermil = 0; + if (bhQuest is not null) + { + EntityMBigHuntQuestScoreCoefficient? coeff = _masterDb.EntityMBigHuntQuestScoreCoefficient + .FirstOrDefault(c => c.BigHuntQuestScoreCoefficientId == bhQuest.BigHuntQuestScoreCoefficientId); + if (coeff is not null) + { + difficultyBonusPermil = coeff.ScoreDifficultBonusPermil; + } + } + + int aliveBonusPermil = 500; + + int maxComboBonusPermil = session.MaxComboCount switch + { + >= 100 => 300, + >= 50 => 200, + >= 20 => 100, + _ => 0 + }; + + long userScore = baseScore * (1000 + difficultyBonusPermil + aliveBonusPermil + maxComboBonusPermil) / 1000; + + // --- High-score tracking (per-boss) --- + bool isHighScore = false; + long oldMaxScore = 0; + if (bossQuest is not null) + { + EntityIUserBigHuntMaxScore? maxScoreEntry = userDb.EntityIUserBigHuntMaxScore + .FirstOrDefault(m => m.BigHuntBossId == bossQuest.BigHuntBossId); + oldMaxScore = maxScoreEntry?.MaxScore ?? 0; + + if (userScore > oldMaxScore) + { + isHighScore = true; + if (maxScoreEntry is null) + { + userDb.EntityIUserBigHuntMaxScore.Add(new EntityIUserBigHuntMaxScore + { + UserId = userId, + BigHuntBossId = bossQuest.BigHuntBossId, + MaxScore = userScore, + MaxScoreUpdateDatetime = nowMs + }); + } + else + { + maxScoreEntry.MaxScore = userScore; + maxScoreEntry.MaxScoreUpdateDatetime = nowMs; + } + } + } + + // --- High-score tracking (per-schedule) --- + int activeScheduleId = ResolveActiveScheduleId(nowMs); + if (bossQuest is not null && activeScheduleId > 0) + { + EntityIUserBigHuntScheduleMaxScore? schedMax = userDb.EntityIUserBigHuntScheduleMaxScore + .FirstOrDefault(m => m.UserId == userId + && m.BigHuntScheduleId == activeScheduleId + && m.BigHuntBossId == bossQuest.BigHuntBossId); + + if (schedMax is null) + { + if (userScore > 0) + { + userDb.EntityIUserBigHuntScheduleMaxScore.Add(new EntityIUserBigHuntScheduleMaxScore + { + UserId = userId, + BigHuntScheduleId = activeScheduleId, + BigHuntBossId = bossQuest.BigHuntBossId, + MaxScore = userScore, + MaxScoreUpdateDatetime = nowMs + }); + } + } + else if (userScore > schedMax.MaxScore) + { + schedMax.MaxScore = userScore; + schedMax.MaxScoreUpdateDatetime = nowMs; + } + } + + // --- High-score tracking (per-weekly-attribute) --- + long weeklyVersion = WeeklyVersion(nowMs); + if (boss is not null) + { + EntityIUserBigHuntWeeklyMaxScore? weeklyMax = userDb.EntityIUserBigHuntWeeklyMaxScore + .FirstOrDefault(m => m.UserId == userId + && m.BigHuntWeeklyVersion == weeklyVersion + && m.AttributeType == boss.AttributeType); + + if (weeklyMax is null) + { + if (userScore > 0) + { + userDb.EntityIUserBigHuntWeeklyMaxScore.Add(new EntityIUserBigHuntWeeklyMaxScore + { + UserId = userId, + BigHuntWeeklyVersion = weeklyVersion, + AttributeType = boss.AttributeType, + MaxScore = userScore + }); + } + } + else if (userScore > weeklyMax.MaxScore) + { + weeklyMax.MaxScore = userScore; + } + } + + // Grade icon + int assetGradeIconId = bossQuest is not null + ? ResolveGradeIconId(bossQuest.BigHuntBossId, userScore) + : 0; + + BigHuntScoreInfo scoreInfo = new() + { + UserScore = userScore, + IsHighScore = isHighScore, + TotalDamage = totalDamage, + BaseScore = baseScore, + DifficultyBonusPermil = difficultyBonusPermil, + AliveBonusPermil = aliveBonusPermil, + MaxComboBonusPermil = maxComboBonusPermil, + AssetGradeIconId = assetGradeIconId + }; + + // --- Reward collection on high score --- + List scoreRewards = []; + if (isHighScore && bossQuest is not null) + { + int rewardGroupId = ResolveActiveScoreRewardGroupId(bossQuest.BigHuntScoreRewardGroupScheduleId, nowMs); + if (rewardGroupId > 0) + { + List<(PossessionType Type, int Id, int Count)> newItems = CollectNewRewards(rewardGroupId, oldMaxScore, userScore); + foreach ((PossessionType type, int id, int count) in newItems) + { + GrantPossessionViaPossessionHelper(userDb, userId, type, id, count); + scoreRewards.Add(new BigHuntReward + { + PossessionType = (int)type, + PossessionId = id, + Count = count + }); + } + } + } + + // Clear progress and battle state + ClearProgress(progress); + session.BattleBinary = []; + session.TotalDamage = 0; + session.MaxComboCount = 0; + session.BossKnockDownCount = 0; + session.DeckType = 0; + session.UserTripleDeckNumber = 0; + + FinishBigHuntQuestResponse response = new() + { + ScoreInfo = scoreInfo, + BattleReport = new BigHuntBattleReport() + }; + response.ScoreReward.AddRange(scoreRewards); + + return Task.FromResult(response); + } + + /// + /// Resumes a BigHunt quest after a disconnect: restores the saved battle binary and deck choice, + /// and increments the daily challenge count for the boss quest. + /// + public override Task RestartBigHuntQuest(RestartBigHuntQuestRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + long nowMs = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(); + + EntityMBigHuntQuest? bhQuest = _masterDb.EntityMBigHuntQuest + .FirstOrDefault(q => q.BigHuntQuestId == request.BigHuntQuestId); + + EntitySBigHuntSession session = GetOrCreateSession(userDb, userId); + + if (bhQuest is not null) + { + HandleBigHuntQuestStart(userDb, userId, bhQuest.QuestId, session.DeckNumber, nowMs); + } + + // Reset scene progress + EntityIUserBigHuntProgressStatus progress = GetOrCreateProgress(userDb, userId); + progress.CurrentQuestSceneId = 0; + + // Increment daily challenge count + EntityIUserBigHuntStatus status = GetOrCreateStatus(userDb, userId, request.BigHuntBossQuestId); + status.DailyChallengeCount++; + status.LatestChallengeDatetime = nowMs; + + RestartBigHuntQuestResponse response = new() + { + BattleBinary = Google.Protobuf.ByteString.CopyFrom(session.BattleBinary), + DeckNumber = session.DeckNumber + }; + + return Task.FromResult(response); + } + + /// + /// Applies a bulk skip of one or more hunt attempts, incrementing the daily challenge counter + /// without entering combat. + /// + public override Task SkipBigHuntQuest(SkipBigHuntQuestRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + long nowMs = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(); + + EntityIUserBigHuntStatus status = GetOrCreateStatus(userDb, userId, request.BigHuntBossQuestId); + status.DailyChallengeCount += request.SkipCount; + status.LatestChallengeDatetime = nowMs; + + return Task.FromResult(new SkipBigHuntQuestResponse()); + } + + /// + /// Persists mid-battle state to the server session: the raw battle binary snapshot plus + /// accumulated damage, combo, and boss knockdown statistics for restart recovery and scoring. + /// + /// + /// Persists the battle binary and detail (damage, combo, knock-downs) from the client into the session. + /// + public override Task SaveBigHuntBattleInfo(SaveBigHuntBattleInfoRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + + EntitySBigHuntSession session = GetOrCreateSession(userDb, userId); + session.BattleBinary = request.BattleBinary.ToByteArray(); + + if (request.BigHuntBattleDetail is not null) + { + // Sum damage across all costumes in the party + long totalDamage = 0; + foreach (Proto.Battle.CostumeBattleInfo ci in request.BigHuntBattleDetail.CostumeBattleInfo) + { + if (ci is not null) + { + totalDamage += ci.TotalDamage; + } + } + + // Persist battle statistics used for scoring and restart + session.DeckType = request.BigHuntBattleDetail.DeckType; + session.UserTripleDeckNumber = request.BigHuntBattleDetail.UserTripleDeckNumber; + session.BossKnockDownCount = request.BigHuntBattleDetail.BossKnockDownCount; + session.MaxComboCount = request.BigHuntBattleDetail.MaxComboCount; + session.TotalDamage = totalDamage; + } + + return Task.FromResult(new SaveBigHuntBattleInfoResponse()); + } + + /// + /// Returns the player's BigHunt overview: weekly score results and grade icons per boss attribute, + /// the current week's uncollected rewards, and last week's earned rewards. + /// + /// + /// Returns the top-level summary view: weekly score results, weekly rewards, and last week's rewards for all bosses. + /// + public override Task GetBigHuntTopData(Empty request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + long nowMs = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(); + long weeklyVersion = WeeklyVersion(nowMs); + + // Build weekly score results for each boss + List weeklyScoreResults = []; + foreach (EntityMBigHuntBoss boss in _masterDb.EntityMBigHuntBoss) + { + EntityIUserBigHuntWeeklyMaxScore? ws = userDb.EntityIUserBigHuntWeeklyMaxScore + .FirstOrDefault(m => m.UserId == userId + && m.BigHuntWeeklyVersion == weeklyVersion + && m.AttributeType == boss.AttributeType); + + long maxScore = ws?.MaxScore ?? 0; + int gradeIconId = ResolveGradeIconId(boss.BigHuntBossId, maxScore); + + weeklyScoreResults.Add(new WeeklyScoreResult + { + AttributeType = (int)boss.AttributeType, + BeforeMaxScore = maxScore, + CurrentMaxScore = maxScore, + BeforeAssetGradeIconId = gradeIconId, + CurrentAssetGradeIconId = gradeIconId, + AfterMaxScore = maxScore, + AfterAssetGradeIconId = gradeIconId + }); + } + + // Check if weekly reward was already received + EntityIUserBigHuntWeeklyStatus? weeklyStatus = userDb.EntityIUserBigHuntWeeklyStatus + .FirstOrDefault(s => s.BigHuntWeeklyVersion == weeklyVersion); + + // Resolve current week rewards + List weeklyRewards = ResolveWeeklyRewards(userDb, userId, weeklyVersion, nowMs); + + // Resolve last week rewards + long lastWeekVersion = weeklyVersion - (7L * 24 * 60 * 60 * 1000); + List lastWeekRewards = ResolveWeeklyRewards(userDb, userId, lastWeekVersion, nowMs); + + GetBigHuntTopDataResponse response = new() + { + IsReceivedWeeklyScoreReward = weeklyStatus?.IsReceivedWeeklyReward ?? false + }; + response.WeeklyScoreResult.AddRange(weeklyScoreResults); + response.WeeklyScoreReward.AddRange(weeklyRewards); + response.LastWeekWeeklyScoreReward.AddRange(lastWeekRewards); + + return Task.FromResult(response); + } + + // ────────── Quest state helpers ────────── + + /// + /// Initializes quest and mission state for the underlying quest, and transitions its state to active. + /// + private void HandleBigHuntQuestStart(DarkUserMemoryDatabase userDb, long userId, int questId, int deckNumber, long nowMs) + { + EntityMQuest? masterQuest = _masterDb.EntityMQuest.FirstOrDefault(q => q.QuestId == questId); + + EntityIUserQuest userQuest = userDb.EntityIUserQuest + .FirstOrDefault(q => q.QuestId == questId) + ?? AddEntity(userDb.EntityIUserQuest, new EntityIUserQuest { UserId = userId, QuestId = questId }); + + // Initialize quest missions + if (masterQuest is not null && masterQuest.QuestMissionGroupId != 0) + { + foreach (EntityMQuestMissionGroup missionGroupRow in _masterDb.EntityMQuestMissionGroup + .Where(g => g.QuestMissionGroupId == masterQuest.QuestMissionGroupId)) + { + if (!userDb.EntityIUserQuestMission.Any(m => m.QuestId == questId && m.QuestMissionId == missionGroupRow.QuestMissionId)) + userDb.EntityIUserQuestMission.Add(new EntityIUserQuestMission { UserId = userId, QuestId = questId, QuestMissionId = missionGroupRow.QuestMissionId }); + } + } + + userQuest.QuestStateType = (int)QuestStateType.ACTIVE; + userQuest.LatestStartDatetime = nowMs; + } + + /// + /// Marks the quest cleared, applies first-clear and drop rewards on success, + /// and clears quest missions. + /// + private void HandleBigHuntQuestFinish(DarkUserMemoryDatabase userDb, long userId, int questId, bool isRetired, long nowMs) + { + EntityMQuest? masterQuest = _masterDb.EntityMQuest.FirstOrDefault(q => q.QuestId == questId); + EntityIUserQuest? userQuest = userDb.EntityIUserQuest + .FirstOrDefault(q => q.QuestId == questId); + + if (userQuest is not null && !isRetired) + { + // First-clear rewards + if (userQuest.ClearCount == 0 && masterQuest is not null && masterQuest.QuestFirstClearRewardGroupId != 0) + { + int rewardGroupId = masterQuest.QuestFirstClearRewardGroupId; + EntityMQuestFirstClearRewardSwitch? switchRow = _masterDb.EntityMQuestFirstClearRewardSwitch + .FirstOrDefault(s => s.QuestId == questId); + if (switchRow != null) + { + EntityIUserQuest? prereq = userDb.EntityIUserQuest + .FirstOrDefault(q => q.QuestId == switchRow.SwitchConditionClearQuestId); + if (prereq != null && prereq.QuestStateType == (int)QuestStateType.CLEARED) + rewardGroupId = switchRow.QuestFirstClearRewardGroupId; + } + + foreach (EntityMQuestFirstClearRewardGroup reward in _masterDb.EntityMQuestFirstClearRewardGroup + .Where(r => r.QuestFirstClearRewardGroupId == rewardGroupId)) + { + PossessionHelper.Apply(userDb, userId, reward.PossessionType, reward.PossessionId, reward.Count, _masterDb); + } + } + + // Drop rewards + if (masterQuest is not null && masterQuest.QuestPickupRewardGroupId != 0) + { + foreach (EntityMQuestPickupRewardGroup pickup in _masterDb.EntityMQuestPickupRewardGroup + .Where(p => p.QuestPickupRewardGroupId == masterQuest.QuestPickupRewardGroupId)) + { + EntityMBattleDropReward? drop = _masterDb.EntityMBattleDropReward + .FirstOrDefault(d => d.BattleDropRewardId == pickup.BattleDropRewardId); + if (drop != null) + PossessionHelper.Apply(userDb, userId, drop.PossessionType, drop.PossessionId, drop.Count, _masterDb); + } + } + + userQuest.QuestStateType = (int)QuestStateType.CLEARED; + userQuest.ClearCount++; + userQuest.DailyClearCount++; + userQuest.LastClearDatetime = nowMs; + } + + // Clear quest missions + if (masterQuest is not null && masterQuest.QuestMissionGroupId != 0) + { + foreach (EntityMQuestMissionGroup missionGroupRow in _masterDb.EntityMQuestMissionGroup + .Where(g => g.QuestMissionGroupId == masterQuest.QuestMissionGroupId)) + { + EntityIUserQuestMission? userMission = userDb.EntityIUserQuestMission + .FirstOrDefault(m => m.QuestId == questId && m.QuestMissionId == missionGroupRow.QuestMissionId); + if (userMission is null) + { + userMission = new EntityIUserQuestMission { UserId = userId, QuestId = questId, QuestMissionId = missionGroupRow.QuestMissionId }; + userDb.EntityIUserQuestMission.Add(userMission); + } + userMission.IsClear = true; + userMission.ProgressValue = 1; + userMission.LatestClearDatetime = nowMs; + } + } + } + + // ────────── Catalog resolution helpers ────────── + + /// + /// Returns the ID of the schedule whose challenge window contains , + /// falling back to the schedule with the most recently ended window. + /// + private int ResolveActiveScheduleId(long nowMs) + { + EntityMBigHuntSchedule? active = _masterDb.EntityMBigHuntSchedule + .FirstOrDefault(s => nowMs >= s.ChallengeStartDatetime && nowMs <= s.ChallengeEndDatetime); + + if (active is not null) + { + return active.BigHuntScheduleId; + } + + // Fall back to schedule with latest end datetime. + return _masterDb.EntityMBigHuntSchedule + .OrderByDescending(s => s.ChallengeEndDatetime) + .Select(s => s.BigHuntScheduleId) + .FirstOrDefault(); + } + + /// + /// Returns the highest grade icon ID whose score threshold the player's score meets for the given boss, + /// or 0 if no threshold is reached. + /// + private int ResolveGradeIconId(int bossId, long score) + { + EntityMBigHuntBoss? boss = _masterDb.EntityMBigHuntBoss + .FirstOrDefault(b => b.BigHuntBossId == bossId); + if (boss is null) + { + return 0; + } + + // Thresholds sorted ascending by NecessaryScore; last one where score >= threshold wins. + int iconId = 0; + foreach (EntityMBigHuntBossGradeGroup g in _masterDb.EntityMBigHuntBossGradeGroup + .Where(g => g.BigHuntBossGradeGroupId == boss.BigHuntBossGradeGroupId) + .OrderBy(g => g.NecessaryScore)) + { + if (score >= g.NecessaryScore) + { + iconId = g.AssetGradeIconId; + } + else + { + break; + } + } + + return iconId; + } + + /// + /// Returns the score reward group ID in effect for a given boss-quest score reward group schedule at . + /// + private int ResolveActiveScoreRewardGroupId(int scheduleId, long nowMs) + { + // Entries sorted descending by start datetime; first one where nowMs >= start wins. + List entries = [.. _masterDb.EntityMBigHuntScoreRewardGroupSchedule + .Where(e => e.BigHuntScoreRewardGroupScheduleId == scheduleId) + .OrderByDescending(e => e.StartDatetime)]; + + foreach (EntityMBigHuntScoreRewardGroupSchedule entry in entries) + { + if (nowMs >= entry.StartDatetime) + { + return entry.BigHuntScoreRewardGroupId; + } + } + + return entries.Count > 0 ? entries[^1].BigHuntScoreRewardGroupId : 0; + } + + /// + /// Returns the weekly score reward group ID in effect for a given schedule and boss attribute type at . + /// + private int ResolveActiveWeeklyRewardGroupId(int scheduleId, AttributeType attributeType, long nowMs) + { + List entries = + [.. _masterDb.EntityMBigHuntWeeklyAttributeScoreRewardGroupSchedule + .Where(e => e.BigHuntWeeklyAttributeScoreRewardGroupScheduleId == scheduleId + && e.AttributeType == attributeType) + .OrderByDescending(e => e.StartDatetime)]; + + foreach (EntityMBigHuntWeeklyAttributeScoreRewardGroupSchedule entry in entries) + { + if (nowMs >= entry.StartDatetime) + { + return entry.BigHuntScoreRewardGroupId; + } + } + + return entries.Count > 0 ? entries[^1].BigHuntScoreRewardGroupId : 0; + } + + /// + /// Returns all reward items whose score thresholds fall within the range (, ], + /// i.e. thresholds newly crossed by the player's improved score. + /// + private List<(PossessionType Type, int Id, int Count)> CollectNewRewards(int scoreRewardGroupId, long oldMax, long newMax) + { + List<(PossessionType, int, int)> items = []; + + foreach (EntityMBigHuntScoreRewardGroup threshold in _masterDb.EntityMBigHuntScoreRewardGroup + .Where(t => t.BigHuntScoreRewardGroupId == scoreRewardGroupId) + .OrderBy(t => t.NecessaryScore)) + { + if (threshold.NecessaryScore > oldMax && threshold.NecessaryScore <= newMax) + { + foreach (EntityMBigHuntRewardGroup reward in _masterDb.EntityMBigHuntRewardGroup + .Where(r => r.BigHuntRewardGroupId == threshold.BigHuntRewardGroupId)) + { + items.Add((reward.PossessionType, reward.PossessionId, reward.Count)); + } + } + } + + return items; + } + + /// + /// Builds the list of weekly reward items earned across all boss attributes for a given week version, + /// based on the player's weekly max scores. + /// + private List ResolveWeeklyRewards(DarkUserMemoryDatabase userDb, long userId, long weeklyVersion, long nowMs) + { + List rewards = []; + + foreach (EntityMBigHuntBoss boss in _masterDb.EntityMBigHuntBoss) + { + int rewardGroupId = ResolveActiveWeeklyRewardGroupId(1, boss.AttributeType, nowMs); + if (rewardGroupId == 0) + { + continue; + } + + EntityIUserBigHuntWeeklyMaxScore? ws = userDb.EntityIUserBigHuntWeeklyMaxScore + .FirstOrDefault(m => m.UserId == userId + && m.BigHuntWeeklyVersion == weeklyVersion + && m.AttributeType == boss.AttributeType); + + long maxScore = ws?.MaxScore ?? 0; + + foreach ((PossessionType type, int id, int count) in CollectNewRewards(rewardGroupId, 0, maxScore)) + { + rewards.Add(new BigHuntReward + { + PossessionType = (int)type, + PossessionId = id, + Count = count + }); + } + } + + return rewards; + } + + // ────────── State accessors ────────── + + /// + /// Gets or initialises the player's BigHunt in-progress quest status record. + /// + private static EntityIUserBigHuntProgressStatus GetOrCreateProgress(DarkUserMemoryDatabase userDb, long userId) + { + return userDb.EntityIUserBigHuntProgressStatus + .FirstOrDefault(p => p.UserId == userId) + ?? AddEntity(userDb.EntityIUserBigHuntProgressStatus, new EntityIUserBigHuntProgressStatus { UserId = userId }); + } + + /// + /// Gets or initialises the player's per-boss-quest challenge status record. + /// + private static EntityIUserBigHuntStatus GetOrCreateStatus(DarkUserMemoryDatabase userDb, long userId, int bossQuestId) + { + return userDb.EntityIUserBigHuntStatus + .FirstOrDefault(s => s.BigHuntBossQuestId == bossQuestId) + ?? AddEntity(userDb.EntityIUserBigHuntStatus, new EntityIUserBigHuntStatus + { + UserId = userId, + BigHuntBossQuestId = bossQuestId + }); + } + + /// + /// Gets or initialises the player's server-side battle session record. + /// + private static EntitySBigHuntSession GetOrCreateSession(DarkUserMemoryDatabase userDb, long userId) + { + return userDb.EntitySBigHuntSession + .FirstOrDefault(s => s.UserId == userId) + ?? AddEntity(userDb.EntitySBigHuntSession, new EntitySBigHuntSession { UserId = userId }); + } + + /// + /// Resets all fields on a BigHunt progress status record to their default (no active hunt) values. + /// + private static void ClearProgress(EntityIUserBigHuntProgressStatus progress) + { + progress.CurrentBigHuntBossQuestId = 0; + progress.CurrentBigHuntQuestId = 0; + progress.CurrentQuestSceneId = 0; + progress.IsDryRun = false; + } + + // ────────── Possession grant ────────── + + /// + /// Routes possession grants through PossessionHelper.Apply for consistent handling. + /// + private void GrantPossessionViaPossessionHelper(DarkUserMemoryDatabase userDb, long userId, PossessionType possessionType, int possessionId, int count) + { + PossessionHelper.Apply(userDb, userId, possessionType, possessionId, count, _masterDb); + } + + // ────────── Time helpers ────────── + + /// + /// Returns Monday 00:00 UTC of the week containing the given timestamp, as millis. + /// + private static long WeeklyVersion(long millis) + { + DateTimeOffset dto = DateTimeOffset.FromUnixTimeMilliseconds(millis); + DateTime utc = dto.UtcDateTime; + int weekday = (int)utc.DayOfWeek; + if (weekday == 0) { weekday = 7; } // Sunday = 7 + DateTime monday = utc.Date.AddDays(-(weekday - 1)); + return new DateTimeOffset(monday, TimeSpan.Zero).ToUnixTimeMilliseconds(); + } + + /// + /// Appends an entity to the given list and returns it, enabling inline initialisation. + /// + private static T AddEntity(List list, T entity) + { + list.Add(entity); + return entity; + } +} diff --git a/src/Services/CageOrnamentService.cs b/src/Services/CageOrnamentService.cs new file mode 100644 index 0000000..603ec45 --- /dev/null +++ b/src/Services/CageOrnamentService.cs @@ -0,0 +1,94 @@ +using Grpc.Core; +using MariesWonderland.Data; +using MariesWonderland.Extensions; +using MariesWonderland.Helpers; +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; +using MariesWonderland.Proto.CageOrnament; + +namespace MariesWonderland.Services; + +public class CageOrnamentService(UserDataStore store, DarkMasterMemoryDatabase masterDb) + : MariesWonderland.Proto.CageOrnament.CageornamentService.CageornamentServiceBase +{ + private readonly UserDataStore _store = store; + private readonly DarkMasterMemoryDatabase _masterDb = masterDb; + + /// + /// Claims the ornament's reward: records the acquisition, grants the possession, and returns the reward details. + /// + public override Task ReceiveReward(ReceiveRewardRequest request, ServerCallContext context) + { + EntityMCageOrnament? ornament = _masterDb.EntityMCageOrnament + .FirstOrDefault(o => o.CageOrnamentId == request.CageOrnamentId); + + if (ornament is null) + { + return Task.FromResult(new ReceiveRewardResponse()); + } + + EntityMCageOrnamentReward? reward = _masterDb.EntityMCageOrnamentReward + .FirstOrDefault(r => r.CageOrnamentRewardId == ornament.CageOrnamentRewardId); + + if (reward is null) + { + return Task.FromResult(new ReceiveRewardResponse()); + } + + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + long nowMs = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(); + + // Track the reward acquisition state. + EntityIUserCageOrnamentReward? existing = userDb.EntityIUserCageOrnamentReward + .FirstOrDefault(r => r.CageOrnamentId == request.CageOrnamentId); + + if (existing is null) + { + userDb.EntityIUserCageOrnamentReward.Add(new EntityIUserCageOrnamentReward + { + UserId = userId, + CageOrnamentId = request.CageOrnamentId, + AcquisitionDatetime = nowMs + }); + } + + PossessionHelper.Apply(userDb, userId, reward.PossessionType, reward.PossessionId, reward.Count, _masterDb); + + ReceiveRewardResponse response = new(); + response.CageOrnamentReward.Add(new CageOrnamentReward + { + PossessionType = (int)reward.PossessionType, + PossessionId = reward.PossessionId, + Count = reward.Count + }); + + return Task.FromResult(response); + } + + /// + /// Records that the user has accessed this cage ornament, creating an access entry if one does not yet exist. + /// + public override Task RecordAccess(RecordAccessRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + long nowMs = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(); + + // Create access record if it doesn't exist + bool exists = userDb.EntityIUserCageOrnamentReward + .Any(r => r.CageOrnamentId == request.CageOrnamentId); + + if (!exists) + { + userDb.EntityIUserCageOrnamentReward.Add(new EntityIUserCageOrnamentReward + { + UserId = userId, + CageOrnamentId = request.CageOrnamentId, + AcquisitionDatetime = nowMs + }); + } + + return Task.FromResult(new RecordAccessResponse()); + } +} \ No newline at end of file diff --git a/src/Services/CharacterBoardService.cs b/src/Services/CharacterBoardService.cs new file mode 100644 index 0000000..00851e3 --- /dev/null +++ b/src/Services/CharacterBoardService.cs @@ -0,0 +1,362 @@ +using Grpc.Core; +using MariesWonderland.Data; +using MariesWonderland.Extensions; +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; +using MariesWonderland.Proto.CharacterBoard; + +namespace MariesWonderland.Services; + +public class CharacterBoardService(DarkMasterMemoryDatabase masterDb, UserDataStore store) + : MariesWonderland.Proto.CharacterBoard.CharacterboardService.CharacterboardServiceBase +{ + private readonly DarkMasterMemoryDatabase _masterDb = masterDb; + private readonly UserDataStore _store = store; + + /// Unlocks character board panels: deducts material costs, sets release bits, and applies stat/ability effects. + public override Task ReleasePanel(ReleasePanelRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + + foreach (int panelId in request.CharacterBoardPanelId) + { + EntityMCharacterBoardPanel? panel = null; + foreach (EntityMCharacterBoardPanel p in _masterDb.EntityMCharacterBoardPanel) + { + if (p.CharacterBoardPanelId == panelId) + { + panel = p; + break; + } + } + + if (panel == null) + { + continue; + } + + ConsumeCosts(userDb, panel); + SetReleaseBit(userDb, userId, panel); + ApplyEffects(userDb, userId, panel); + } + + return Task.FromResult(new ReleasePanelResponse()); + } + + /// Deducts the material/gem costs required to release a character board panel. + private void ConsumeCosts(DarkUserMemoryDatabase userDb, EntityMCharacterBoardPanel panel) + { + foreach (EntityMCharacterBoardPanelReleasePossessionGroup cost in _masterDb.EntityMCharacterBoardPanelReleasePossessionGroup) + { + if (cost.CharacterBoardPanelReleasePossessionGroupId != panel.CharacterBoardPanelReleasePossessionGroupId) + { + continue; + } + + DeductPossession(userDb, cost.PossessionType, cost.PossessionId, cost.Count); + } + } + + /// Subtracts a possession (material, consumable, or gem) from the user's inventory. + private static void DeductPossession(DarkUserMemoryDatabase userDb, PossessionType possessionType, int possessionId, int count) + { + switch (possessionType) + { + case PossessionType.MATERIAL: + { + EntityIUserMaterial? mat = null; + foreach (EntityIUserMaterial m in userDb.EntityIUserMaterial) + { + if (m.MaterialId == possessionId) + { + mat = m; + break; + } + } + + if (mat != null) + { + mat.Count -= count; + if (mat.Count <= 0) + { + userDb.EntityIUserMaterial.Remove(mat); + } + } + break; + } + case PossessionType.CONSUMABLE_ITEM: + { + EntityIUserConsumableItem? item = null; + foreach (EntityIUserConsumableItem ci in userDb.EntityIUserConsumableItem) + { + if (ci.ConsumableItemId == possessionId) + { + item = ci; + break; + } + } + + if (item != null) + { + item.Count -= count; + if (item.Count <= 0) + { + userDb.EntityIUserConsumableItem.Remove(item); + } + } + break; + } + case PossessionType.PAID_GEM: + { + EntityIUserGem? gem = userDb.EntityIUserGem.Count > 0 ? userDb.EntityIUserGem[0] : null; + if (gem != null) + { + gem.PaidGem -= count; + } + break; + } + case PossessionType.FREE_GEM: + { + EntityIUserGem? gem = userDb.EntityIUserGem.Count > 0 ? userDb.EntityIUserGem[0] : null; + if (gem != null) + { + gem.FreeGem -= count; + } + break; + } + } + } + + /// Sets the release bit for a panel on the user's character board, using bitfield-packed storage (32 panels per field). + private static void SetReleaseBit(DarkUserMemoryDatabase userDb, long userId, EntityMCharacterBoardPanel panel) + { + int boardId = panel.CharacterBoardId; + + EntityIUserCharacterBoard? board = null; + foreach (EntityIUserCharacterBoard b in userDb.EntityIUserCharacterBoard) + { + if (b.CharacterBoardId == boardId) + { + board = b; + break; + } + } + + if (board == null) + { + board = new EntityIUserCharacterBoard + { + UserId = userId, + CharacterBoardId = boardId + }; + userDb.EntityIUserCharacterBoard.Add(board); + } + + int bitFieldIndex = (panel.SortOrder - 1) / 32; + int bitPosition = (panel.SortOrder - 1) % 32; + int mask = 1 << bitPosition; + + switch (bitFieldIndex) + { + case 0: + board.PanelReleaseBit1 |= mask; + break; + case 1: + board.PanelReleaseBit2 |= mask; + break; + case 2: + board.PanelReleaseBit3 |= mask; + break; + case 3: + board.PanelReleaseBit4 |= mask; + break; + } + } + + /// Applies the panel's release effects (ability unlocks or stat boosts) to the character. + private void ApplyEffects(DarkUserMemoryDatabase userDb, long userId, EntityMCharacterBoardPanel panel) + { + foreach (EntityMCharacterBoardPanelReleaseEffectGroup eff in _masterDb.EntityMCharacterBoardPanelReleaseEffectGroup) + { + if (eff.CharacterBoardPanelReleaseEffectGroupId != panel.CharacterBoardPanelReleaseEffectGroupId) + { + continue; + } + + switch (eff.CharacterBoardEffectType) + { + case CharacterBoardEffectType.ABILITY: + ApplyAbilityEffect(userDb, userId, eff); + break; + case CharacterBoardEffectType.STATUS_UP: + ApplyStatusUpEffect(userDb, userId, eff); + break; + } + } + } + + /// Grants or levels up a character ability from a board panel release, capped by the master-defined max level. + private void ApplyAbilityEffect(DarkUserMemoryDatabase userDb, long userId, EntityMCharacterBoardPanelReleaseEffectGroup eff) + { + EntityMCharacterBoardAbility? ability = null; + foreach (EntityMCharacterBoardAbility a in _masterDb.EntityMCharacterBoardAbility) + { + if (a.CharacterBoardAbilityId == eff.CharacterBoardEffectId) + { + ability = a; + break; + } + } + + if (ability == null) + { + return; + } + + int characterId = ResolveCharacterId(ability.CharacterBoardEffectTargetGroupId); + if (characterId == 0) + { + return; + } + + // Find or create ability state + EntityIUserCharacterBoardAbility? state = null; + foreach (EntityIUserCharacterBoardAbility a in userDb.EntityIUserCharacterBoardAbility) + { + if (a.CharacterId == characterId && a.AbilityId == ability.AbilityId) + { + state = a; + break; + } + } + + if (state == null) + { + state = new EntityIUserCharacterBoardAbility + { + UserId = userId, + CharacterId = characterId, + AbilityId = ability.AbilityId, + Level = 0 + }; + userDb.EntityIUserCharacterBoardAbility.Add(state); + } + + state.Level += eff.EffectValue; + + // Clamp to max level if defined + foreach (EntityMCharacterBoardAbilityMaxLevel maxLvl in _masterDb.EntityMCharacterBoardAbilityMaxLevel) + { + if (maxLvl.CharacterId == characterId && maxLvl.AbilityId == ability.AbilityId) + { + if (state.Level > maxLvl.MaxLevel) + { + state.Level = maxLvl.MaxLevel; + } + break; + } + } + } + + /// Applies a stat increase (HP, ATK, AGI, VIT, CRIT) to a character from a board panel release. + private void ApplyStatusUpEffect(DarkUserMemoryDatabase userDb, long userId, EntityMCharacterBoardPanelReleaseEffectGroup eff) + { + EntityMCharacterBoardStatusUp? statusUp = null; + foreach (EntityMCharacterBoardStatusUp s in _masterDb.EntityMCharacterBoardStatusUp) + { + if (s.CharacterBoardStatusUpId == eff.CharacterBoardEffectId) + { + statusUp = s; + break; + } + } + + if (statusUp == null) + { + return; + } + + int characterId = ResolveCharacterId(statusUp.CharacterBoardEffectTargetGroupId); + if (characterId == 0) + { + return; + } + + StatusCalculationType calcType = StatusUpTypeToCalcType(statusUp.CharacterBoardStatusUpType); + + // Find or create status up state + EntityIUserCharacterBoardStatusUp? state = null; + foreach (EntityIUserCharacterBoardStatusUp s in userDb.EntityIUserCharacterBoardStatusUp) + { + if (s.CharacterId == characterId && s.StatusCalculationType == calcType) + { + state = s; + break; + } + } + + if (state == null) + { + state = new EntityIUserCharacterBoardStatusUp + { + UserId = userId, + CharacterId = characterId, + StatusCalculationType = calcType + }; + userDb.EntityIUserCharacterBoardStatusUp.Add(state); + } + + switch (statusUp.CharacterBoardStatusUpType) + { + case CharacterBoardStatusUpType.AGILITY_ADD: + case CharacterBoardStatusUpType.AGILITY_MULTIPLY: + state.Agility += eff.EffectValue; + break; + case CharacterBoardStatusUpType.ATTACK_ADD: + case CharacterBoardStatusUpType.ATTACK_MULTIPLY: + state.Attack += eff.EffectValue; + break; + case CharacterBoardStatusUpType.CRITICAL_ATTACK_ADD: + state.CriticalAttack += eff.EffectValue; + break; + case CharacterBoardStatusUpType.CRITICAL_RATIO_ADD: + state.CriticalRatio += eff.EffectValue; + break; + case CharacterBoardStatusUpType.HP_ADD: + case CharacterBoardStatusUpType.HP_MULTIPLY: + state.Hp += eff.EffectValue; + break; + case CharacterBoardStatusUpType.VITALITY_ADD: + case CharacterBoardStatusUpType.VITALITY_MULTIPLY: + state.Vitality += eff.EffectValue; + break; + } + } + + /// Resolves a CharacterBoardEffectTargetGroupId to its target character ID. + private int ResolveCharacterId(int targetGroupId) + { + foreach (EntityMCharacterBoardEffectTargetGroup t in _masterDb.EntityMCharacterBoardEffectTargetGroup) + { + if (t.CharacterBoardEffectTargetGroupId == targetGroupId && t.TargetValue != 0) + { + return t.TargetValue; + } + } + return 0; + } + + /// Maps a CharacterBoardStatusUpType to its calculation type (ADD or MULTIPLY). + private static StatusCalculationType StatusUpTypeToCalcType(CharacterBoardStatusUpType t) + { + return t switch + { + CharacterBoardStatusUpType.AGILITY_MULTIPLY or + CharacterBoardStatusUpType.ATTACK_MULTIPLY or + CharacterBoardStatusUpType.HP_MULTIPLY or + CharacterBoardStatusUpType.VITALITY_MULTIPLY => StatusCalculationType.MULTIPLY, + _ => StatusCalculationType.ADD + }; + } +} diff --git a/src/Services/CharacterService.cs b/src/Services/CharacterService.cs new file mode 100644 index 0000000..9385df4 --- /dev/null +++ b/src/Services/CharacterService.cs @@ -0,0 +1,135 @@ +using Grpc.Core; +using MariesWonderland.Data; +using MariesWonderland.Extensions; +using MariesWonderland.Models.Entities; +using MariesWonderland.Proto.Character; + +namespace MariesWonderland.Services; + +public class CharacterService(DarkMasterMemoryDatabase masterDb, UserDataStore store, GameConfig gameConfig) + : MariesWonderland.Proto.Character.CharacterService.CharacterServiceBase +{ + private readonly DarkMasterMemoryDatabase _masterDb = masterDb; + private readonly UserDataStore _store = store; + private readonly GameConfig _gameConfig = gameConfig; + + /// Performs character rebirth: deducts gold and materials per step, advancing the rebirth count. + public override Task Rebirth(RebirthRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + + // Look up the rebirth step group for this character + EntityMCharacterRebirth? rebirthMaster = null; + foreach (EntityMCharacterRebirth r in _masterDb.EntityMCharacterRebirth) + { + if (r.CharacterId == request.CharacterId) + { + rebirthMaster = r; + break; + } + } + + if (rebirthMaster == null) + { + return Task.FromResult(new RebirthResponse()); + } + + int stepGroupId = rebirthMaster.CharacterRebirthStepGroupId; + + // Find or create user rebirth record + EntityIUserCharacterRebirth? userRebirth = null; + foreach (EntityIUserCharacterRebirth ur in userDb.EntityIUserCharacterRebirth) + { + if (ur.CharacterId == request.CharacterId) + { + userRebirth = ur; + break; + } + } + + if (userRebirth == null) + { + userRebirth = new EntityIUserCharacterRebirth + { + UserId = userId, + CharacterId = request.CharacterId, + RebirthCount = 0 + }; + userDb.EntityIUserCharacterRebirth.Add(userRebirth); + } + + int currentCount = userRebirth.RebirthCount; + int targetCount = currentCount + request.RebirthCount; + + int completedCount = currentCount; + for (int count = currentCount; count < targetCount; count++) + { + // Find the step row for this group and count + EntityMCharacterRebirthStepGroup? step = null; + foreach (EntityMCharacterRebirthStepGroup s in _masterDb.EntityMCharacterRebirthStepGroup) + { + if (s.CharacterRebirthStepGroupId == stepGroupId && s.BeforeRebirthCount == count) + { + step = s; + break; + } + } + + if (step == null) + { + break; + } + + // Deduct gold + EntityIUserConsumableItem? gold = null; + foreach (EntityIUserConsumableItem ci in userDb.EntityIUserConsumableItem) + { + if (ci.ConsumableItemId == _gameConfig.ConsumableItemIdForGold) + { + gold = ci; + break; + } + } + + if (gold != null) + { + gold.Count = Math.Max(gold.Count - _gameConfig.CharacterRebirthConsumeGold, 0); + } + + // Deduct materials + foreach (EntityMCharacterRebirthMaterialGroup mat in _masterDb.EntityMCharacterRebirthMaterialGroup) + { + if (mat.CharacterRebirthMaterialGroupId != step.CharacterRebirthMaterialGroupId) + { + continue; + } + + EntityIUserMaterial? userMat = null; + foreach (EntityIUserMaterial m in userDb.EntityIUserMaterial) + { + if (m.MaterialId == mat.MaterialId) + { + userMat = m; + break; + } + } + + if (userMat != null) + { + userMat.Count -= mat.Count; + if (userMat.Count <= 0) + { + userDb.EntityIUserMaterial.Remove(userMat); + } + } + } + + completedCount = count + 1; + } + + userRebirth.RebirthCount = completedCount; + + return Task.FromResult(new RebirthResponse()); + } +} diff --git a/src/Services/CharacterViewerService.cs b/src/Services/CharacterViewerService.cs new file mode 100644 index 0000000..0994df6 --- /dev/null +++ b/src/Services/CharacterViewerService.cs @@ -0,0 +1,113 @@ +using Google.Protobuf.WellKnownTypes; +using Grpc.Core; +using MariesWonderland.Data; +using MariesWonderland.Extensions; +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; +using MariesWonderland.Proto.CharacterViewer; + +namespace MariesWonderland.Services; + +public class CharacterViewerService(UserDataStore store, DarkMasterMemoryDatabase masterDb) + : MariesWonderland.Proto.CharacterViewer.CharacterviewerService.CharacterviewerServiceBase +{ + private readonly UserDataStore _store = store; + private readonly DarkMasterMemoryDatabase _masterDb = masterDb; + + /// Returns the character viewer top screen with all unlocked field IDs based on quest clear conditions. + public override Task CharacterViewerTop(Empty request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + + Dictionary conditionToQuestId = BuildConditionQuestMap(); + + // Collect cleared quest IDs to evaluate unlock prerequisites + HashSet clearedQuests = []; + foreach (EntityIUserQuest quest in userDb.EntityIUserQuest) + { + if (quest.QuestStateType == (int)QuestStateType.CLEARED) + { + clearedQuests.Add(quest.QuestId); + } + } + + long nowMs = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(); + List releasedFieldIds = []; + + // Check each field's release condition and track newly unlocked ones + foreach (EntityMCharacterViewerField field in _masterDb.EntityMCharacterViewerField) + { + bool isReleased; + if (field.ReleaseEvaluateConditionId == 0) + { + isReleased = true; + } + else if (conditionToQuestId.TryGetValue(field.ReleaseEvaluateConditionId, out long requiredQuestId)) + { + isReleased = clearedQuests.Contains((int)requiredQuestId); + } + else + { + isReleased = false; + } + + if (!isReleased) + { + continue; + } + + releasedFieldIds.Add(field.CharacterViewerFieldId); + + bool alreadyTracked = userDb.EntityIUserCharacterViewerField + .Any(f => f.CharacterViewerFieldId == field.CharacterViewerFieldId); + + if (!alreadyTracked) + { + userDb.EntityIUserCharacterViewerField.Add(new EntityIUserCharacterViewerField + { + UserId = userId, + CharacterViewerFieldId = field.CharacterViewerFieldId, + ReleaseDatetime = nowMs + }); + } + } + + releasedFieldIds.Sort(); + + CharacterViewerTopResponse response = new(); + response.ReleaseCharacterViewerFieldId.AddRange(releasedFieldIds); + + return Task.FromResult(response); + } + + /// Builds a mapping from EvaluateConditionId to required quest ID for QUEST_CLEAR conditions. + private Dictionary BuildConditionQuestMap() + { + Dictionary<(int GroupId, int GroupIndex), long> vgByKey = []; + foreach (EntityMEvaluateConditionValueGroup vg in _masterDb.EntityMEvaluateConditionValueGroup) + { + vgByKey[(vg.EvaluateConditionValueGroupId, vg.GroupIndex)] = vg.Value; + } + + Dictionary conditionToQuestId = []; + foreach (EntityMEvaluateCondition cond in _masterDb.EntityMEvaluateCondition) + { + if (cond.EvaluateConditionFunctionType != EvaluateConditionFunctionType.QUEST_CLEAR) + { + continue; + } + if (cond.EvaluateConditionEvaluateType != EvaluateConditionEvaluateType.ID_CONTAIN) + { + continue; + } + if (vgByKey.TryGetValue((cond.EvaluateConditionValueGroupId, 1), out long questId)) + { + conditionToQuestId[cond.EvaluateConditionId] = questId; + } + } + + return conditionToQuestId; + } +} + diff --git a/src/Services/CompanionService.cs b/src/Services/CompanionService.cs new file mode 100644 index 0000000..d638493 --- /dev/null +++ b/src/Services/CompanionService.cs @@ -0,0 +1,191 @@ +using Grpc.Core; +using MariesWonderland.Data; +using MariesWonderland.Extensions; +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; +using MariesWonderland.Proto.Companion; + +namespace MariesWonderland.Services; + +public class CompanionService(DarkMasterMemoryDatabase masterDb, UserDataStore store, GameConfig gameConfig) + : MariesWonderland.Proto.Companion.CompanionService.CompanionServiceBase +{ + private const int CompanionMaxLevel = 50; + + private readonly DarkMasterMemoryDatabase _masterDb = masterDb; + private readonly UserDataStore _store = store; + private readonly GameConfig _gameConfig = gameConfig; + + /// Levels up a companion by deducting gold and materials per level, capping at the max companion level. + public override Task Enhance(EnhanceRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + + // Find the user's companion by UUID + EntityIUserCompanion? companion = null; + foreach (EntityIUserCompanion c in userDb.EntityIUserCompanion) + { + if (c.UserCompanionUuid == request.UserCompanionUuid) + { + companion = c; + break; + } + } + + if (companion == null) + { + return Task.FromResult(new EnhanceResponse()); + } + + // Find companion master data + EntityMCompanion? compDef = null; + foreach (EntityMCompanion mc in _masterDb.EntityMCompanion) + { + if (mc.CompanionId == companion.CompanionId) + { + compDef = mc; + break; + } + } + + if (compDef == null) + { + return Task.FromResult(new EnhanceResponse()); + } + + int targetLevel = companion.Level + request.AddLevelCount; + if (targetLevel > CompanionMaxLevel) + { + targetLevel = CompanionMaxLevel; + } + + // Find gold cost function for this category + EntityMCompanionCategory? category = null; + foreach (EntityMCompanionCategory cat in _masterDb.EntityMCompanionCategory) + { + if (cat.CompanionCategoryType == compDef.CompanionCategoryType) + { + category = cat; + break; + } + } + + for (int lvl = companion.Level; lvl < targetLevel; lvl++) + { + // Deduct gold cost + if (category != null) + { + int goldCost = EvaluateNumericalFunction(category.EnhancementCostNumericalFunctionId, lvl); + + EntityIUserConsumableItem? gold = null; + foreach (EntityIUserConsumableItem ci in userDb.EntityIUserConsumableItem) + { + if (ci.ConsumableItemId == _gameConfig.ConsumableItemIdForGold) + { + gold = ci; + break; + } + } + + if (gold != null) + { + gold.Count -= goldCost; + } + } + + // Deduct materials for this level + foreach (EntityMCompanionEnhancementMaterial mat in _masterDb.EntityMCompanionEnhancementMaterial) + { + if (mat.CompanionCategoryType == compDef.CompanionCategoryType && mat.Level == lvl) + { + EntityIUserMaterial? userMat = null; + foreach (EntityIUserMaterial m in userDb.EntityIUserMaterial) + { + if (m.MaterialId == mat.MaterialId) + { + userMat = m; + break; + } + } + + if (userMat != null) + { + userMat.Count -= mat.Count; + } + } + } + } + + companion.Level = targetLevel; + + return Task.FromResult(new EnhanceResponse()); + } + + /// Evaluates a master data numerical function (linear, monomial, polynomial) for a given input value. + private int EvaluateNumericalFunction(int functionId, int value) + { + EntityMNumericalFunction? func = null; + foreach (EntityMNumericalFunction f in _masterDb.EntityMNumericalFunction) + { + if (f.NumericalFunctionId == functionId) + { + func = f; + break; + } + } + + if (func == null) + { + return 0; + } + + List<(int Index, int Value)> paramEntries = []; + foreach (EntityMNumericalFunctionParameterGroup pg in _masterDb.EntityMNumericalFunctionParameterGroup) + { + if (pg.NumericalFunctionParameterGroupId == func.NumericalFunctionParameterGroupId) + { + paramEntries.Add((pg.ParameterIndex, pg.ParameterValue)); + } + } + paramEntries.Sort((a, b) => a.Index.CompareTo(b.Index)); + + int[] p = new int[paramEntries.Count]; + for (int i = 0; i < paramEntries.Count; i++) + { + p[i] = paramEntries[i].Value; + } + + return func.NumericalFunctionType switch + { + NumericalFunctionType.LINEAR when p.Length >= 2 => p[1] + p[0] * value, + NumericalFunctionType.MONOMIAL when p.Length >= 2 => EvaluateMonomial(p, value), + NumericalFunctionType.LINEAR_PERMIL when p.Length >= 2 => p[0] * value / 1000 + p[1], + NumericalFunctionType.POLYNOMIAL_THIRD when p.Length >= 4 => p[3] + (p[2] + (p[1] + p[0] * value) * value) * value, + NumericalFunctionType.POLYNOMIAL_THIRD_PERMIL when p.Length >= 4 => + p[0] * value * value * value / 1000 + + p[1] * value * value / 1000 + + p[2] * value / 1000 + + p[3], + _ => 0 + }; + } + + /// Evaluates a monomial function: p[0] * (value - 1) ^ p[1]. + private static int EvaluateMonomial(int[] p, int value) + { + int v = value - 1; + int result = v; + int counter = p[1]; + if (counter > 1) + { + counter--; + while (counter > 0) + { + counter--; + result *= v; + } + } + return result * p[0]; + } +} diff --git a/src/Services/ConfigService.cs b/src/Services/ConfigService.cs new file mode 100644 index 0000000..4a7cdae --- /dev/null +++ b/src/Services/ConfigService.cs @@ -0,0 +1,14 @@ +using Google.Protobuf.WellKnownTypes; +using Grpc.Core; +using MariesWonderland.Proto.Config; + +namespace MariesWonderland.Services; + +public class ConfigService : MariesWonderland.Proto.Config.ConfigService.ConfigServiceBase +{ + /// Returns an empty response. Review server configuration not yet implemented. + public override Task GetReviewServerConfig(Empty request, ServerCallContext context) + { + return Task.FromResult(new GetReviewServerConfigResponse()); + } +} diff --git a/src/Services/ConsumableItemService.cs b/src/Services/ConsumableItemService.cs new file mode 100644 index 0000000..e612878 --- /dev/null +++ b/src/Services/ConsumableItemService.cs @@ -0,0 +1,99 @@ +using Grpc.Core; +using MariesWonderland.Data; +using MariesWonderland.Extensions; +using MariesWonderland.Models.Entities; +using MariesWonderland.Proto.ConsumableItem; + +namespace MariesWonderland.Services; + +public class ConsumableItemService(DarkMasterMemoryDatabase masterDb, UserDataStore store, GameConfig gameConfig) + : MariesWonderland.Proto.ConsumableItem.ConsumableitemService.ConsumableitemServiceBase +{ + private readonly DarkMasterMemoryDatabase _masterDb = masterDb; + private readonly UserDataStore _store = store; + private readonly GameConfig _gameConfig = gameConfig; + + /// Returns an empty response. Consumable item use effects not yet implemented. + public override Task UseEffectItem(UseEffectItemRequest request, ServerCallContext context) + { + return Task.FromResult(new UseEffectItemResponse()); + } + + /// Sells consumable items for gold, removing depleted entries from inventory. + public override Task Sell(SellRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + + int totalGold = 0; + + foreach (SellPossession item in request.ConsumableItemPossession) + { + EntityMConsumableItem? masterRow = null; + foreach (EntityMConsumableItem m in _masterDb.EntityMConsumableItem) + { + if (m.ConsumableItemId == item.ConsumableItemId) + { + masterRow = m; + break; + } + } + + if (masterRow == null) + { + continue; + } + + EntityIUserConsumableItem? userItem = null; + foreach (EntityIUserConsumableItem u in userDb.EntityIUserConsumableItem) + { + if (u.ConsumableItemId == item.ConsumableItemId) + { + userItem = u; + break; + } + } + + if (userItem == null || userItem.Count < item.Count) + { + continue; + } + + userItem.Count -= item.Count; + if (userItem.Count == 0) + { + userDb.EntityIUserConsumableItem.Remove(userItem); + } + + totalGold += masterRow.SellPrice * item.Count; + } + + if (totalGold > 0) + { + AddGold(userDb, userId, totalGold); + } + + return Task.FromResult(new SellResponse()); + } + + /// Adds gold (consumable item ID 1) to the user's inventory, creating the entry if needed. + private void AddGold(DarkUserMemoryDatabase userDb, long userId, int amount) + { + foreach (EntityIUserConsumableItem ci in userDb.EntityIUserConsumableItem) + { + if (ci.ConsumableItemId == _gameConfig.ConsumableItemIdForGold) + { + ci.Count += amount; + return; + } + } + + userDb.EntityIUserConsumableItem.Add(new EntityIUserConsumableItem + { + UserId = userId, + ConsumableItemId = _gameConfig.ConsumableItemIdForGold, + Count = amount, + FirstAcquisitionDatetime = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds() + }); + } +} diff --git a/src/Services/ContentsStoryService.cs b/src/Services/ContentsStoryService.cs new file mode 100644 index 0000000..b5fc635 --- /dev/null +++ b/src/Services/ContentsStoryService.cs @@ -0,0 +1,40 @@ +using Grpc.Core; +using MariesWonderland.Data; +using MariesWonderland.Extensions; +using MariesWonderland.Models.Entities; +using MariesWonderland.Proto.ContentsStory; + +namespace MariesWonderland.Services; + +public class ContentsStoryService(UserDataStore store) + : MariesWonderland.Proto.ContentsStory.ContentsstoryService.ContentsstoryServiceBase +{ + private readonly UserDataStore _store = store; + + /// Records that a contents story entry has been played, tracking the play timestamp. + public override Task RegisterPlayed(RegisterPlayedRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + long nowMs = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(); + + EntityIUserContentsStory? existing = userDb.EntityIUserContentsStory + .FirstOrDefault(s => s.ContentsStoryId == request.ContentsStoryId); + + if (existing is null) + { + userDb.EntityIUserContentsStory.Add(new EntityIUserContentsStory + { + UserId = userId, + ContentsStoryId = request.ContentsStoryId, + PlayDatetime = nowMs + }); + } + else + { + existing.PlayDatetime = nowMs; + } + + return Task.FromResult(new RegisterPlayedResponse()); + } +} diff --git a/src/Services/CostumeService.cs b/src/Services/CostumeService.cs new file mode 100644 index 0000000..fdd5197 --- /dev/null +++ b/src/Services/CostumeService.cs @@ -0,0 +1,806 @@ +using Grpc.Core; +using MariesWonderland.Data; +using MariesWonderland.Extensions; +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; +using MariesWonderland.Proto.Costume; + +namespace MariesWonderland.Services; + +public class CostumeService(DarkMasterMemoryDatabase masterDb, UserDataStore store, GameConfig gameConfig) + : MariesWonderland.Proto.Costume.CostumeService.CostumeServiceBase +{ + private readonly DarkMasterMemoryDatabase _masterDb = masterDb; + private readonly UserDataStore _store = store; + private readonly GameConfig _gameConfig = gameConfig; + + /// + /// Enhances a costume using materials: deducts materials and gold, adds EXP, recalculates level. + /// + /// + /// Enhances a costume using enhancement materials to gain EXP. Materials matching the costume's weapon type grant a 1.5x EXP bonus. + /// + public override Task Enhance(EnhanceRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + + EntityIUserCostume? costume = null; + foreach (EntityIUserCostume c in userDb.EntityIUserCostume) + { + if (c.UserCostumeUuid == request.UserCostumeUuid) + { + costume = c; + break; + } + } + + if (costume == null) + { + return Task.FromResult(new EnhanceResponse()); + } + + EntityMCostume? costumeMaster = null; + foreach (EntityMCostume cm in _masterDb.EntityMCostume) + { + if (cm.CostumeId == costume.CostumeId) + { + costumeMaster = cm; + break; + } + } + + if (costumeMaster == null) + { + return Task.FromResult(new EnhanceResponse()); + } + + // Filter master data to only costume-enhancement materials + Dictionary materialCatalog = []; + foreach (EntityMMaterial mat in _masterDb.EntityMMaterial) + { + if (mat.MaterialType == MaterialType.COSTUME_ENHANCEMENT) + { + materialCatalog[mat.MaterialId] = mat; + } + } + + // Consume materials and calculate total EXP gained + int totalExp = 0; + int totalMaterialCount = 0; + + foreach (KeyValuePair entry in request.Materials) + { + int materialId = entry.Key; + int count = entry.Value; + + if (!materialCatalog.TryGetValue(materialId, out EntityMMaterial? mat)) + { + continue; + } + + EntityIUserMaterial? userMat = null; + foreach (EntityIUserMaterial m in userDb.EntityIUserMaterial) + { + if (m.MaterialId == materialId) + { + userMat = m; + break; + } + } + + if (userMat == null || userMat.Count < count) + { + continue; + } + + userMat.Count -= count; + totalMaterialCount += count; + + // Apply 1.5x EXP bonus when material weapon type matches the costume's proficient weapon type + int expPerUnit = mat.EffectValue; + if (mat.WeaponType != WeaponType.UNKNOWN && mat.WeaponType == costumeMaster.SkillfulWeaponType) + { + expPerUnit = expPerUnit * _gameConfig.MaterialSameWeaponExpCoefficientPermil / 1000; + } + + totalExp += expPerUnit * count; + } + + // Look up rarity-based cost and EXP threshold parameters + EntityMCostumeRarity? rarityRow = null; + foreach (EntityMCostumeRarity r in _masterDb.EntityMCostumeRarity) + { + if (r.RarityType == costumeMaster.RarityType) + { + rarityRow = r; + break; + } + } + + // Deduct gold cost scaled by number of materials used + if (totalMaterialCount > 0 && rarityRow != null) + { + int goldCost = EvaluateNumericalFunction(rarityRow.EnhancementCostByMaterialNumericalFunctionId, totalMaterialCount); + + EntityIUserConsumableItem? gold = null; + foreach (EntityIUserConsumableItem ci in userDb.EntityIUserConsumableItem) + { + if (ci.ConsumableItemId == _gameConfig.ConsumableItemIdForGold) + { + gold = ci; + break; + } + } + + if (gold != null) + { + gold.Count -= goldCost; + } + } + + // Apply EXP and recalculate level from rarity-specific thresholds + costume.Exp += totalExp; + + if (rarityRow != null) + { + (costume.Level, costume.Exp) = CalculateCostumeLevelAndCap(costume.Exp, rarityRow.RequiredExpForLevelUpNumericalParameterMapId); + } + + return Task.FromResult(new EnhanceResponse { IsGreatSuccess = false }); + } + + /// + /// Calculates the costume level from accumulated EXP and caps EXP at the max threshold. + /// + private (int Level, int CappedExp) CalculateCostumeLevelAndCap(int exp, int paramMapId) + { + int maxKey = 0; + foreach (EntityMNumericalParameterMap row in _masterDb.EntityMNumericalParameterMap) + { + if (row.NumericalParameterMapId == paramMapId && row.ParameterKey > maxKey) + { + maxKey = row.ParameterKey; + } + } + + int[] thresholds = new int[maxKey + 1]; + foreach (EntityMNumericalParameterMap row in _masterDb.EntityMNumericalParameterMap) + { + if (row.NumericalParameterMapId == paramMapId && row.ParameterKey < thresholds.Length) + { + thresholds[row.ParameterKey] = row.ParameterValue; + } + } + + int level = 1; + for (int lvl = 1; lvl < thresholds.Length; lvl++) + { + if (exp >= thresholds[lvl]) + { + level = lvl; + } + else + { + break; + } + } + + // Cap EXP at the last threshold (max level cap) + if (thresholds.Length > 0 && exp > thresholds[^1]) + { + exp = thresholds[^1]; + } + + return (level, exp); + } + + /// + /// Evaluates a numerical function (linear, monomial, polynomial) from master data parameters. + /// + /// + /// Evaluates a master data numerical function (LINEAR, MONOMIAL, POLYNOMIAL, etc.) used for cost and threshold calculations. + /// + private int EvaluateNumericalFunction(int functionId, int value) + { + EntityMNumericalFunction? func = null; + foreach (EntityMNumericalFunction f in _masterDb.EntityMNumericalFunction) + { + if (f.NumericalFunctionId == functionId) + { + func = f; + break; + } + } + + if (func == null) + { + return 0; + } + + List<(int Index, int Value)> paramEntries = []; + foreach (EntityMNumericalFunctionParameterGroup pg in _masterDb.EntityMNumericalFunctionParameterGroup) + { + if (pg.NumericalFunctionParameterGroupId == func.NumericalFunctionParameterGroupId) + { + paramEntries.Add((pg.ParameterIndex, pg.ParameterValue)); + } + } + paramEntries.Sort((a, b) => a.Index.CompareTo(b.Index)); + + int[] p = new int[paramEntries.Count]; + for (int i = 0; i < paramEntries.Count; i++) + { + p[i] = paramEntries[i].Value; + } + + return func.NumericalFunctionType switch + { + NumericalFunctionType.LINEAR when p.Length >= 2 => p[1] + p[0] * value, + NumericalFunctionType.MONOMIAL when p.Length >= 2 => EvaluateMonomial(p, value), + NumericalFunctionType.LINEAR_PERMIL when p.Length >= 2 => p[0] * value / 1000 + p[1], + NumericalFunctionType.POLYNOMIAL_THIRD when p.Length >= 4 => p[3] + (p[2] + (p[1] + p[0] * value) * value) * value, + NumericalFunctionType.POLYNOMIAL_THIRD_PERMIL when p.Length >= 4 => + p[0] * value * value * value / 1000 + + p[1] * value * value / 1000 + + p[2] * value / 1000 + + p[3], + _ => 0 + }; + } + + /// + /// Evaluates a monomial function: p[0] * (value - 1)^p[1]. + /// + /// + /// Computes a monomial function: coefficient * (value - 1) ^ exponent. + /// + private static int EvaluateMonomial(int[] p, int value) + { + int v = value - 1; + int result = v; + int counter = p[1]; + if (counter > 1) + { + counter--; + while (counter > 0) + { + counter--; + result *= v; + } + } + return result * p[0]; + } + + /// + /// Limit-breaks a costume using materials: deducts materials and gold, increments break count. + /// + /// + /// Limit breaks a costume using materials, raising its max level cap. Capped at 4 total limit breaks. + /// + public override Task LimitBreak(LimitBreakRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + + EntityIUserCostume? costume = null; + foreach (EntityIUserCostume c in userDb.EntityIUserCostume) + { + if (c.UserCostumeUuid == request.UserCostumeUuid) + { + costume = c; + break; + } + } + + if (costume == null || costume.LimitBreakCount >= _gameConfig.CostumeLimitBreakAvailableCount) + { + return Task.FromResult(new LimitBreakResponse()); + } + + EntityMCostume? costumeMaster = null; + foreach (EntityMCostume cm in _masterDb.EntityMCostume) + { + if (cm.CostumeId == costume.CostumeId) + { + costumeMaster = cm; + break; + } + } + + if (costumeMaster == null) + { + return Task.FromResult(new LimitBreakResponse()); + } + + // Consume limit break materials + int totalMaterialCount = 0; + foreach (KeyValuePair entry in request.Materials) + { + int materialId = entry.Key; + int count = entry.Value; + + EntityIUserMaterial? userMat = FindUserMaterial(userDb, materialId); + if (userMat == null) + { + continue; + } + + if (userMat.Count < count) + { + count = userMat.Count; + } + + userMat.Count -= count; + totalMaterialCount += count; + } + + // Deduct gold cost based on costume rarity + if (totalMaterialCount > 0) + { + EntityMCostumeRarity? rarityRow = null; + foreach (EntityMCostumeRarity r in _masterDb.EntityMCostumeRarity) + { + if (r.RarityType == costumeMaster.RarityType) + { + rarityRow = r; + break; + } + } + + if (rarityRow != null) + { + int goldCost = EvaluateNumericalFunction(rarityRow.LimitBreakCostNumericalFunctionId, totalMaterialCount); + SubtractGold(userDb, goldCost); + } + } + + costume.LimitBreakCount++; + + return Task.FromResult(new LimitBreakResponse()); + } + + /// + /// Awakens a costume: deducts materials and gold, applies awaken effects (status up, item acquire). + /// + /// + /// Awakens a costume to the next step, consuming materials and gold. Each step may grant stat bonuses, abilities, or items. + /// + public override Task Awaken(AwakenRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + + EntityIUserCostume? costume = null; + foreach (EntityIUserCostume c in userDb.EntityIUserCostume) + { + if (c.UserCostumeUuid == request.UserCostumeUuid) + { + costume = c; + break; + } + } + + if (costume == null) + { + return Task.FromResult(new AwakenResponse()); + } + + EntityMCostumeAwaken? awakenRow = null; + foreach (EntityMCostumeAwaken a in _masterDb.EntityMCostumeAwaken) + { + if (a.CostumeId == costume.CostumeId) + { + awakenRow = a; + break; + } + } + + if (awakenRow == null) + { + return Task.FromResult(new AwakenResponse()); + } + + int nextStep = costume.AwakenCount + 1; + + // Find gold cost from the price tier matching this awaken step + int goldCost = 0; + int bestStepLimit = -1; + foreach (EntityMCostumeAwakenPriceGroup pg in _masterDb.EntityMCostumeAwakenPriceGroup) + { + if (pg.CostumeAwakenPriceGroupId == awakenRow.CostumeAwakenPriceGroupId + && pg.AwakenStepLowerLimit <= nextStep + && pg.AwakenStepLowerLimit > bestStepLimit) + { + bestStepLimit = pg.AwakenStepLowerLimit; + goldCost = pg.Gold; + } + } + + if (goldCost > 0) + { + SubtractGold(userDb, goldCost); + } + + // Consume awakening materials + foreach (KeyValuePair entry in request.Materials) + { + int materialId = entry.Key; + int count = entry.Value; + + EntityIUserMaterial? userMat = FindUserMaterial(userDb, materialId); + if (userMat == null) + { + continue; + } + + if (userMat.Count < count) + { + count = userMat.Count; + } + + userMat.Count -= count; + } + + costume.AwakenCount = nextStep; + + // Apply the awaken step's effect (stat boost, ability unlock, or item grant) + EntityMCostumeAwakenEffectGroup? effect = null; + foreach (EntityMCostumeAwakenEffectGroup eg in _masterDb.EntityMCostumeAwakenEffectGroup) + { + if (eg.CostumeAwakenEffectGroupId == awakenRow.CostumeAwakenEffectGroupId + && eg.AwakenStep == nextStep) + { + effect = eg; + break; + } + } + + if (effect != null) + { + switch (effect.CostumeAwakenEffectType) + { + case CostumeAwakenEffectType.STATUS_UP: + ApplyAwakenStatusUp(userDb, userId, request.UserCostumeUuid, effect.CostumeAwakenEffectId); + break; + case CostumeAwakenEffectType.ABILITY: + break; + case CostumeAwakenEffectType.ITEM_ACQUIRE: + ApplyAwakenItemAcquire(userDb, userId, effect.CostumeAwakenEffectId); + break; + } + } + + return Task.FromResult(new AwakenResponse()); + } + + /// + /// Levels up a costume's active skill: deducts materials and gold per level. + /// + /// + /// Levels up a costume's active skill by spending materials and gold. Max skill level is determined by costume rarity. + /// + public override Task EnhanceActiveSkill(EnhanceActiveSkillRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + + EntityIUserCostume? costume = null; + foreach (EntityIUserCostume c in userDb.EntityIUserCostume) + { + if (c.UserCostumeUuid == request.UserCostumeUuid) + { + costume = c; + break; + } + } + + if (costume == null) + { + return Task.FromResult(new EnhanceActiveSkillResponse()); + } + + EntityMCostume? costumeMaster = null; + foreach (EntityMCostume cm in _masterDb.EntityMCostume) + { + if (cm.CostumeId == costume.CostumeId) + { + costumeMaster = cm; + break; + } + } + + if (costumeMaster == null) + { + return Task.FromResult(new EnhanceActiveSkillResponse()); + } + + // Select the skill group tier unlocked by the costume's limit break count + int enhanceMatId = -1; + int bestLbThreshold = -1; + foreach (EntityMCostumeActiveSkillGroup g in _masterDb.EntityMCostumeActiveSkillGroup) + { + if (g.CostumeActiveSkillGroupId == costumeMaster.CostumeActiveSkillGroupId + && g.CostumeLimitBreakCountLowerLimit <= costume.LimitBreakCount + && g.CostumeLimitBreakCountLowerLimit > bestLbThreshold) + { + bestLbThreshold = g.CostumeLimitBreakCountLowerLimit; + enhanceMatId = g.CostumeActiveSkillEnhancementMaterialId; + } + } + + if (enhanceMatId < 0) + { + return Task.FromResult(new EnhanceActiveSkillResponse()); + } + + // Look up the user's current active skill level + EntityIUserCostumeActiveSkill? skill = null; + foreach (EntityIUserCostumeActiveSkill s in userDb.EntityIUserCostumeActiveSkill) + { + if (s.UserCostumeUuid == request.UserCostumeUuid) + { + skill = s; + break; + } + } + + int currentLevel = skill?.Level ?? 0; + + // Determine max skill level from costume rarity + EntityMCostumeRarity? rarityRow = null; + foreach (EntityMCostumeRarity r in _masterDb.EntityMCostumeRarity) + { + if (r.RarityType == costumeMaster.RarityType) + { + rarityRow = r; + break; + } + } + + if (rarityRow == null) + { + return Task.FromResult(new EnhanceActiveSkillResponse()); + } + + int maxLevel = EvaluateNumericalFunction(rarityRow.ActiveSkillMaxLevelNumericalFunctionId, 1); + + // Cap the requested level increase at the max + int addCount = request.AddLevelCount; + if (currentLevel + addCount > maxLevel) + { + addCount = maxLevel - currentLevel; + } + + if (addCount <= 0) + { + return Task.FromResult(new EnhanceActiveSkillResponse()); + } + + // Deduct materials and gold for each level gained + for (int lvl = currentLevel; lvl < currentLevel + addCount; lvl++) + { + foreach (EntityMCostumeActiveSkillEnhancementMaterial mat in _masterDb.EntityMCostumeActiveSkillEnhancementMaterial) + { + if (mat.CostumeActiveSkillEnhancementMaterialId == enhanceMatId && mat.SkillLevel == lvl) + { + EntityIUserMaterial? userMat = FindUserMaterial(userDb, mat.MaterialId); + if (userMat != null) + { + int cost = mat.Count; + if (userMat.Count < cost) + { + cost = userMat.Count; + } + userMat.Count -= cost; + } + } + } + + int goldCost = EvaluateNumericalFunction(rarityRow.ActiveSkillEnhancementCostNumericalFunctionId, lvl + 1); + SubtractGold(userDb, goldCost); + } + + // Create the active skill record on first enhancement + if (skill == null) + { + skill = new EntityIUserCostumeActiveSkill + { + UserId = userId, + UserCostumeUuid = request.UserCostumeUuid, + AcquisitionDatetime = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(), + }; + userDb.EntityIUserCostumeActiveSkill.Add(skill); + } + + skill.Level = currentLevel + addCount; + + return Task.FromResult(new EnhanceActiveSkillResponse()); + } + + /// + /// Stub for level bonus confirmation; returns empty response. + /// + /// + /// Acknowledges that the player has seen the level bonus notification. No server-side state change needed. + /// + public override Task RegisterLevelBonusConfirmed(RegisterLevelBonusConfirmedRequest request, ServerCallContext context) + { + return Task.FromResult(new RegisterLevelBonusConfirmedResponse()); + } + + /// + /// Stub for lottery effect slot unlock; returns empty response. + /// + /// + /// Unlocks a lottery effect slot on a costume. Not yet implemented. + /// + public override Task UnlockLotteryEffectSlot(UnlockLotteryEffectSlotRequest request, ServerCallContext context) + { + return Task.FromResult(new UnlockLotteryEffectSlotResponse()); + } + + /// + /// Stub for lottery effect draw; returns empty response. + /// + /// + /// Draws a random lottery effect for a costume slot. Not yet implemented. + /// + public override Task DrawLotteryEffect(DrawLotteryEffectRequest request, ServerCallContext context) + { + return Task.FromResult(new DrawLotteryEffectResponse()); + } + + /// + /// Stub for lottery effect confirmation; returns empty response. + /// + /// + /// Confirms and locks in a drawn lottery effect for a costume. Not yet implemented. + /// + public override Task ConfirmLotteryEffect(ConfirmLotteryEffectRequest request, ServerCallContext context) + { + return Task.FromResult(new ConfirmLotteryEffectResponse()); + } + + /// + /// Applies stat increases from a costume awaken status-up effect. + /// + /// + /// Applies awakening stat bonuses (HP, ATK, VIT, AGI, CRIT, etc.) to the costume's awaken status record. + /// + private void ApplyAwakenStatusUp(DarkUserMemoryDatabase userDb, long userId, string userCostumeUuid, int statusUpGroupId) + { + foreach (EntityMCostumeAwakenStatusUpGroup row in _masterDb.EntityMCostumeAwakenStatusUpGroup) + { + if (row.CostumeAwakenStatusUpGroupId != statusUpGroupId) + { + continue; + } + + EntityIUserCostumeAwakenStatusUp? state = null; + foreach (EntityIUserCostumeAwakenStatusUp s in userDb.EntityIUserCostumeAwakenStatusUp) + { + if (s.UserCostumeUuid == userCostumeUuid && s.StatusCalculationType == row.StatusCalculationType) + { + state = s; + break; + } + } + + if (state == null) + { + state = new EntityIUserCostumeAwakenStatusUp + { + UserId = userId, + UserCostumeUuid = userCostumeUuid, + StatusCalculationType = row.StatusCalculationType, + }; + userDb.EntityIUserCostumeAwakenStatusUp.Add(state); + } + + switch (row.StatusKindType) + { + case StatusKindType.HP: + state.Hp += row.EffectValue; + break; + case StatusKindType.ATTACK: + state.Attack += row.EffectValue; + break; + case StatusKindType.VITALITY: + state.Vitality += row.EffectValue; + break; + case StatusKindType.AGILITY: + state.Agility += row.EffectValue; + break; + case StatusKindType.CRITICAL_RATIO: + state.CriticalRatio += row.EffectValue; + break; + case StatusKindType.CRITICAL_ATTACK: + state.CriticalAttack += row.EffectValue; + break; + } + } + } + + /// + /// Grants a thought item from a costume awaken item-acquire effect. + /// + /// + /// Grants a thought item as an awakening reward, creating a new inventory entry if not already owned. + /// + private void ApplyAwakenItemAcquire(DarkUserMemoryDatabase userDb, long userId, int itemAcquireId) + { + EntityMCostumeAwakenItemAcquire? acq = null; + foreach (EntityMCostumeAwakenItemAcquire a in _masterDb.EntityMCostumeAwakenItemAcquire) + { + if (a.CostumeAwakenItemAcquireId == itemAcquireId) + { + acq = a; + break; + } + } + + if (acq == null) + { + return; + } + + string uuid = $"awaken-thought-{acq.PossessionId}"; + foreach (EntityIUserThought t in userDb.EntityIUserThought) + { + if (t.UserThoughtUuid == uuid) + { + return; + } + } + + userDb.EntityIUserThought.Add(new EntityIUserThought + { + UserId = userId, + UserThoughtUuid = uuid, + ThoughtId = acq.PossessionId, + AcquisitionDatetime = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(), + }); + } + + /// + /// Finds a user's material record by material ID. + /// + /// + /// Looks up a user's material inventory entry by material ID. + /// + private static EntityIUserMaterial? FindUserMaterial(DarkUserMemoryDatabase userDb, int materialId) + { + foreach (EntityIUserMaterial m in userDb.EntityIUserMaterial) + { + if (m.MaterialId == materialId) + { + return m; + } + } + return null; + } + + /// + /// Deducts gold (consumable item ID 1) from the user's inventory. + /// + /// + /// Deducts gold (consumable item ID 1) from the user's inventory. + /// + private void SubtractGold(DarkUserMemoryDatabase userDb, int amount) + { + if (amount <= 0) + { + return; + } + + foreach (EntityIUserConsumableItem ci in userDb.EntityIUserConsumableItem) + { + if (ci.ConsumableItemId == _gameConfig.ConsumableItemIdForGold) + { + ci.Count -= amount; + return; + } + } + } +} diff --git a/src/Services/DataService.cs b/src/Services/DataService.cs new file mode 100644 index 0000000..adb751e --- /dev/null +++ b/src/Services/DataService.cs @@ -0,0 +1,58 @@ +using Google.Protobuf.WellKnownTypes; +using Grpc.Core; +using MariesWonderland.Configuration; +using MariesWonderland.Data; +using MariesWonderland.Extensions; +using MariesWonderland.Proto.Data; +using Microsoft.Extensions.Options; + +namespace MariesWonderland.Services; + +public class DataService(IOptions options, UserDataStore userDataStore) + : MariesWonderland.Proto.Data.DataService.DataServiceBase +{ + private readonly DataOptions _data = options.Value.Data; + + /// Returns the latest master data version so the client can check if an asset update is needed. + public override Task GetLatestMasterDataVersion(Empty request, ServerCallContext context) + { + return Task.FromResult(new MasterDataGetLatestVersionResponse + { + LatestMasterDataVersion = _data.LatestMasterDataVersion + }); + } + + /// Returns the sorted list of user data table names used for diff-based synchronization. + public override Task GetUserDataNameV2(Empty request, ServerCallContext context) + { + TableNameList tableNameList = new(); + tableNameList.TableName.AddRange(UserDataDiffBuilder.TableNames.Order()); + + UserDataGetNameResponseV2 response = new(); + response.TableNameList.Add(tableNameList); + + return Task.FromResult(response); + } + + /// Returns the full user state for the requested tables, serialized as JSON. Validates session before responding. + public override Task GetUserData(UserDataGetRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + string sessionKey = context.GetSessionKey(); + + if (!userDataStore.TryResolveSession(sessionKey, out long resolvedUserId) || resolvedUserId != userId) + { + throw new RpcException(new Status(StatusCode.Unauthenticated, "Invalid or expired session.")); + } + + DarkUserMemoryDatabase userDb = userDataStore.GetOrCreate(userId); + UserDataGetResponse response = new(); + + foreach (string tableName in request.TableName) + { + response.UserDataJson[tableName] = UserDataDiffBuilder.SerializeTable(userDb, tableName); + } + + return Task.FromResult(response); + } +} diff --git a/src/Services/DeckService.cs b/src/Services/DeckService.cs new file mode 100644 index 0000000..b3820fa --- /dev/null +++ b/src/Services/DeckService.cs @@ -0,0 +1,283 @@ +using Grpc.Core; +using MariesWonderland.Data; +using MariesWonderland.Extensions; +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; +using MariesWonderland.Proto.Deck; + +namespace MariesWonderland.Services; + +public class DeckService(UserDataStore store) : MariesWonderland.Proto.Deck.DeckService.DeckServiceBase +{ + private readonly UserDataStore _store = store; + + /// Renames a deck. + public override Task UpdateName(UpdateNameRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + + EntityIUserDeck? deck = userDb.EntityIUserDeck.FirstOrDefault(d => + d.DeckType == (DeckType)request.DeckType && + d.UserDeckNumber == request.UserDeckNumber); + + deck?.Name = request.Name; + + return Task.FromResult(new UpdateNameResponse()); + } + + /// Replaces a deck's character lineup with new entries. + public override Task ReplaceDeck(ReplaceDeckRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + + if (request.Deck != null) + { + ApplyDeckReplacement(userDb, userId, (DeckType)request.DeckType, request.UserDeckNumber, request.Deck); + } + + return Task.FromResult(new ReplaceDeckResponse()); + } + + /// Creates a deck character record from a DeckCharacter slot proto and returns the new UUID. + private static string CreateDeckCharacter(DarkUserMemoryDatabase db, long userId, DeckCharacter? slot) + { + if (slot is null || string.IsNullOrEmpty(slot.UserCostumeUuid)) + { + return ""; + } + + string newUuid = Guid.NewGuid().ToString(); + db.EntityIUserDeckCharacter.Add(new EntityIUserDeckCharacter + { + UserId = userId, + UserDeckCharacterUuid = newUuid, + UserCostumeUuid = slot.UserCostumeUuid, + MainUserWeaponUuid = slot.MainUserWeaponUuid, + UserCompanionUuid = slot.UserCompanionUuid, + UserThoughtUuid = slot.UserThoughtUuid, + Power = 0 + }); + + if (slot.DressupCostumeId != 0) + { + db.EntityIUserDeckCharacterDressupCostume.Add(new EntityIUserDeckCharacterDressupCostume + { + UserId = userId, + UserDeckCharacterUuid = newUuid, + DressupCostumeId = slot.DressupCostumeId + }); + } + + for (int i = 0; i < slot.UserPartsUuid.Count; i++) + { + if (string.IsNullOrEmpty(slot.UserPartsUuid[i])) { continue; } + db.EntityIUserDeckPartsGroup.Add(new EntityIUserDeckPartsGroup + { + UserId = userId, + UserDeckCharacterUuid = newUuid, + UserPartsUuid = slot.UserPartsUuid[i], + SortOrder = i + 1 + }); + } + + for (int i = 0; i < slot.SubUserWeaponUuid.Count; i++) + { + if (string.IsNullOrEmpty(slot.SubUserWeaponUuid[i])) { continue; } + db.EntityIUserDeckSubWeaponGroup.Add(new EntityIUserDeckSubWeaponGroup + { + UserId = userId, + UserDeckCharacterUuid = newUuid, + UserWeaponUuid = slot.SubUserWeaponUuid[i], + SortOrder = i + 1 + }); + } + + return newUuid; + } + + /// Stub for PvP defense deck; returns empty response. + public override Task SetPvpDefenseDeck(SetPvpDefenseDeckRequest request, ServerCallContext context) + { + return Task.FromResult(new SetPvpDefenseDeckResponse()); + } + + /// Stub for deck copy; returns empty response. + public override Task CopyDeck(CopyDeckRequest request, ServerCallContext context) + { + return Task.FromResult(new CopyDeckResponse()); + } + + /// Stub for deck removal; returns empty response. + public override Task RemoveDeck(RemoveDeckRequest request, ServerCallContext context) + { + return Task.FromResult(new RemoveDeckResponse()); + } + + /// Updates deck and character power values from the client. + public override Task RefreshDeckPower(RefreshDeckPowerRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + + if (request.DeckPower != null) + { + ApplyDeckPowerRefresh(userDb, userId, (DeckType)request.DeckType, request.UserDeckNumber, request.DeckPower); + } + + return Task.FromResult(new RefreshDeckPowerResponse()); + } + + /// Stub for triple deck name update; returns empty response. + public override Task UpdateTripleDeckName(UpdateTripleDeckNameRequest request, ServerCallContext context) + { + return Task.FromResult(new UpdateTripleDeckNameResponse()); + } + + /// Replaces up to three decks' character lineups in one operation. + public override Task ReplaceTripleDeck(ReplaceTripleDeckRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + + foreach (DeckDetail? detail in new[] { request.DeckDetail01, request.DeckDetail02, request.DeckDetail03 }) + { + if (detail?.Deck == null) + { + continue; + } + + ApplyDeckReplacement(userDb, userId, (DeckType)detail.DeckType, detail.UserDeckNumber, detail.Deck); + } + + return Task.FromResult(new ReplaceTripleDeckResponse()); + } + + /// Replaces multiple decks' character lineups in one operation. + public override Task ReplaceMultiDeck(ReplaceMultiDeckRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + + foreach (DeckDetail detail in request.DeckDetail) + { + if (detail?.Deck == null) + { + continue; + } + + ApplyDeckReplacement(userDb, userId, (DeckType)detail.DeckType, detail.UserDeckNumber, detail.Deck); + } + + return Task.FromResult(new ReplaceMultiDeckResponse()); + } + + /// Updates power values for multiple decks in one operation. + public override Task RefreshMultiDeckPower(RefreshMultiDeckPowerRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + + foreach (DeckPowerInfo info in request.DeckPowerInfo) + { + if (info.DeckPower == null) + { + continue; + } + + ApplyDeckPowerRefresh(userDb, userId, (DeckType)info.DeckType, info.UserDeckNumber, info.DeckPower); + } + + return Task.FromResult(new RefreshMultiDeckPowerResponse()); + } + + /// Removes old deck characters and creates new ones from the provided deck proto. + private static void ApplyDeckReplacement(DarkUserMemoryDatabase userDb, long userId, DeckType deckType, int deckNumber, Deck deck) + { + EntityIUserDeck? existing = userDb.EntityIUserDeck + .FirstOrDefault(d => d.DeckType == deckType && d.UserDeckNumber == deckNumber); + + if (existing != null) + { + HashSet oldUuids = []; + if (!string.IsNullOrEmpty(existing.UserDeckCharacterUuid01)) { oldUuids.Add(existing.UserDeckCharacterUuid01); } + if (!string.IsNullOrEmpty(existing.UserDeckCharacterUuid02)) { oldUuids.Add(existing.UserDeckCharacterUuid02); } + if (!string.IsNullOrEmpty(existing.UserDeckCharacterUuid03)) { oldUuids.Add(existing.UserDeckCharacterUuid03); } + userDb.EntityIUserDeckCharacter.RemoveAll(dc => oldUuids.Contains(dc.UserDeckCharacterUuid)); + userDb.EntityIUserDeckCharacterDressupCostume.RemoveAll(dc => oldUuids.Contains(dc.UserDeckCharacterUuid)); + userDb.EntityIUserDeckPartsGroup.RemoveAll(pg => oldUuids.Contains(pg.UserDeckCharacterUuid)); + userDb.EntityIUserDeckSubWeaponGroup.RemoveAll(swg => oldUuids.Contains(swg.UserDeckCharacterUuid)); + } + + string uuid01 = CreateDeckCharacter(userDb, userId, deck.Character01); + string uuid02 = CreateDeckCharacter(userDb, userId, deck.Character02); + string uuid03 = CreateDeckCharacter(userDb, userId, deck.Character03); + + if (existing == null) + { + existing = new EntityIUserDeck + { + UserId = userId, + DeckType = deckType, + UserDeckNumber = deckNumber, + Name = $"Loadout {deckNumber}", + Power = 0 + }; + userDb.EntityIUserDeck.Add(existing); + } + + existing.UserDeckCharacterUuid01 = uuid01; + existing.UserDeckCharacterUuid02 = uuid02; + existing.UserDeckCharacterUuid03 = uuid03; + } + + /// Updates deck and character power values and tracks max deck power per type. + private static void ApplyDeckPowerRefresh(DarkUserMemoryDatabase userDb, long userId, DeckType deckType, int deckNumber, DeckPower deckPower) + { + EntityIUserDeck? deck = userDb.EntityIUserDeck.FirstOrDefault(d => + d.DeckType == deckType && d.UserDeckNumber == deckNumber); + + if (deck != null) + { + deck.Power = deckPower.Power; + } + + DeckCharacterPower?[] charPowers = + [ + deckPower.DeckCharacterPower01, + deckPower.DeckCharacterPower02, + deckPower.DeckCharacterPower03, + ]; + + foreach (DeckCharacterPower? cp in charPowers) + { + if (cp == null || string.IsNullOrEmpty(cp.UserDeckCharacterUuid)) + { + continue; + } + + EntityIUserDeckCharacter? dc = userDb.EntityIUserDeckCharacter.FirstOrDefault(c => + c.UserDeckCharacterUuid == cp.UserDeckCharacterUuid); + + if (dc != null) + { + dc.Power = cp.Power; + } + } + + EntityIUserDeckTypeNote? note = userDb.EntityIUserDeckTypeNote.FirstOrDefault(n => + n.DeckType == deckType); + + if (note == null) + { + note = new EntityIUserDeckTypeNote { UserId = userId, DeckType = deckType }; + userDb.EntityIUserDeckTypeNote.Add(note); + } + + if (deckPower.Power > note.MaxDeckPower) + { + note.MaxDeckPower = deckPower.Power; + } + } +} diff --git a/src/Services/DokanService.cs b/src/Services/DokanService.cs new file mode 100644 index 0000000..b203df3 --- /dev/null +++ b/src/Services/DokanService.cs @@ -0,0 +1,43 @@ +using Grpc.Core; +using MariesWonderland.Data; +using MariesWonderland.Extensions; +using MariesWonderland.Models.Entities; +using MariesWonderland.Proto.Dokan; + +namespace MariesWonderland.Services; + +public class DokanService(UserDataStore store) : MariesWonderland.Proto.Dokan.DokanService.DokanServiceBase +{ + private readonly UserDataStore _store = store; + + /// Marks one or more dokan story chapters as seen by the player, recording the display timestamp. + public override Task RegisterDokanConfirmed(RegisterDokanConfirmedRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + + long nowMs = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(); + + foreach (int dokanId in request.DokanId) + { + EntityIUserDokan? existing = userDb.EntityIUserDokan + .FirstOrDefault(d => d.DokanId == dokanId); + + if (existing == null) + { + userDb.EntityIUserDokan.Add(new EntityIUserDokan + { + UserId = userId, + DokanId = dokanId, + DisplayDatetime = nowMs + }); + } + else + { + existing.DisplayDatetime = nowMs; + } + } + + return Task.FromResult(new RegisterDokanConfirmedResponse()); + } +} diff --git a/src/Services/ExploreService.cs b/src/Services/ExploreService.cs new file mode 100644 index 0000000..4dcfc8a --- /dev/null +++ b/src/Services/ExploreService.cs @@ -0,0 +1,204 @@ +using Grpc.Core; +using MariesWonderland.Data; +using MariesWonderland.Extensions; +using MariesWonderland.Models.Entities; +using MariesWonderland.Proto.Explore; + +namespace MariesWonderland.Services; + +public class ExploreService(UserDataStore store, DarkMasterMemoryDatabase masterDb) + : MariesWonderland.Proto.Explore.ExploreService.ExploreServiceBase +{ + private const int StaminaRecovery = 1000; + private const int RewardMaterialId = 100001; + private const int RewardBaseCount = 1; + + private readonly UserDataStore _store = store; + private readonly DarkMasterMemoryDatabase _masterDb = masterDb; + + /// Begins an explore expedition: deducts the consumable ticket and records the active expedition. + public override Task StartExplore(StartExploreRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + long nowMs = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(); + + EntityMExplore? explore = _masterDb.EntityMExplore + .FirstOrDefault(e => e.ExploreId == request.ExploreId); + + if (explore is null) + { + return Task.FromResult(new StartExploreResponse()); + } + + // Deduct consumable ticket if required + if (request.UseConsumableItemId > 0 && explore.ConsumeItemCount > 0) + { + EntityIUserConsumableItem? item = userDb.EntityIUserConsumableItem + .FirstOrDefault(i => i.ConsumableItemId == request.UseConsumableItemId); + + if (item is not null) + { + item.Count -= explore.ConsumeItemCount; + } + } + + // Record or update the active expedition state + EntityIUserExplore? userExplore = userDb.EntityIUserExplore + .FirstOrDefault(e => e.UserId == userId); + + if (userExplore is null) + { + userDb.EntityIUserExplore.Add(new EntityIUserExplore + { + UserId = userId, + PlayingExploreId = request.ExploreId, + IsUseExploreTicket = false, + LatestPlayDatetime = nowMs + }); + } + else + { + userExplore.PlayingExploreId = request.ExploreId; + userExplore.IsUseExploreTicket = false; + userExplore.LatestPlayDatetime = nowMs; + } + + return Task.FromResult(new StartExploreResponse()); + } + + /// Completes an explore expedition: updates the high score, clears the active state, recovers stamina, and grants material rewards. + public override Task FinishExplore(FinishExploreRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + long nowMs = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(); + + EntityMExplore? explore = _masterDb.EntityMExplore + .FirstOrDefault(e => e.ExploreId == request.ExploreId); + + if (explore is null) + { + return Task.FromResult(new FinishExploreResponse()); + } + + int rewardCount = RewardBaseCount * explore.RewardLotteryCount; + + // Update or create score + EntityIUserExploreScore? score = userDb.EntityIUserExploreScore + .FirstOrDefault(s => s.ExploreId == request.ExploreId); + + if (score is null) + { + userDb.EntityIUserExploreScore.Add(new EntityIUserExploreScore + { + UserId = userId, + ExploreId = request.ExploreId, + MaxScore = request.Score, + MaxScoreUpdateDatetime = nowMs + }); + } + else if (request.Score > score.MaxScore) + { + score.MaxScore = request.Score; + score.MaxScoreUpdateDatetime = nowMs; + } + + // Clear playing state + EntityIUserExplore? userExplore = userDb.EntityIUserExplore + .FirstOrDefault(e => e.UserId == userId); + + if (userExplore is not null) + { + userExplore.PlayingExploreId = 0; + userExplore.IsUseExploreTicket = false; + } + + // Recover stamina + EntityIUserStatus? status = userDb.EntityIUserStatus + .FirstOrDefault(s => s.UserId == userId); + + if (status is not null) + { + status.StaminaMilliValue += StaminaRecovery; + status.StaminaUpdateDatetime = nowMs; + } + + // Grant material reward + EntityIUserMaterial? material = userDb.EntityIUserMaterial + .FirstOrDefault(m => m.MaterialId == RewardMaterialId); + + if (material is not null) + { + material.Count += rewardCount; + } + else + { + userDb.EntityIUserMaterial.Add(new EntityIUserMaterial + { + UserId = userId, + MaterialId = RewardMaterialId, + Count = rewardCount, + FirstAcquisitionDatetime = nowMs + }); + } + + // Determine grade icon + int assetGradeIconId = GradeForScore(request.ExploreId, request.Score); + + FinishExploreResponse response = new() + { + AcquireStaminaCount = StaminaRecovery, + AssetGradeIconId = assetGradeIconId + }; + + response.ExploreReward.Add(new ExploreReward + { + PossessionType = (int)Models.Type.PossessionType.MATERIAL, + PossessionId = RewardMaterialId, + Count = rewardCount + }); + + return Task.FromResult(response); + } + + /// Cancels an in-progress explore expedition without granting rewards. + public override Task RetireExplore(RetireExploreRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + + EntityIUserExplore? userExplore = userDb.EntityIUserExplore + .FirstOrDefault(e => e.UserId == userId); + + if (userExplore is not null) + { + userExplore.PlayingExploreId = 0; + userExplore.IsUseExploreTicket = false; + } + + return Task.FromResult(new RetireExploreResponse()); + } + + /// Resolves the grade icon for a given explore score by checking thresholds in descending order. + private int GradeForScore(int exploreId, int score) + { + // Grade scores sorted descending by NecessaryScore; first match where score >= threshold wins + List gradeScores = [.. _masterDb.EntityMExploreGradeScore + .Where(gs => gs.ExploreId == exploreId) + .OrderByDescending(gs => gs.NecessaryScore)]; + + foreach (EntityMExploreGradeScore gs in gradeScores) + { + if (score >= gs.NecessaryScore) + { + EntityMExploreGradeAsset? asset = _masterDb.EntityMExploreGradeAsset + .FirstOrDefault(a => a.ExploreGradeId == gs.ExploreGradeId); + + return asset?.AssetGradeIconId ?? 0; + } + } + + return 0; + } +} diff --git a/src/Services/FriendService.cs b/src/Services/FriendService.cs new file mode 100644 index 0000000..0e197de --- /dev/null +++ b/src/Services/FriendService.cs @@ -0,0 +1,80 @@ +using Google.Protobuf.WellKnownTypes; +using Grpc.Core; +using MariesWonderland.Proto.Friend; + +namespace MariesWonderland.Services; + +public class FriendService : MariesWonderland.Proto.Friend.FriendService.FriendServiceBase +{ + /// Returns an empty response. Friend lookup not yet implemented. + public override Task GetUser(GetUserRequest request, ServerCallContext context) + { + return Task.FromResult(new GetUserResponse()); + } + + /// Returns an empty response. Friend recommendations not yet implemented. + public override Task SearchRecommendedUsers(Empty request, ServerCallContext context) + { + return Task.FromResult(new SearchRecommendedUsersResponse()); + } + + /// Returns an empty response. Friend list not yet implemented. + public override Task GetFriendList(GetFriendListRequest request, ServerCallContext context) + { + return Task.FromResult(new GetFriendListResponse()); + } + + /// Returns an empty response. Friend requests not yet implemented. + public override Task GetFriendRequestList(Empty request, ServerCallContext context) + { + return Task.FromResult(new GetFriendRequestListResponse()); + } + + /// Returns an empty response. Sending friend requests not yet implemented. + public override Task SendFriendRequest(SendFriendRequestRequest request, ServerCallContext context) + { + return Task.FromResult(new SendFriendRequestResponse()); + } + + /// Returns an empty response. Accepting friend requests not yet implemented. + public override Task AcceptFriendRequest(AcceptFriendRequestRequest request, ServerCallContext context) + { + return Task.FromResult(new AcceptFriendRequestResponse()); + } + + /// Returns an empty response. Declining friend requests not yet implemented. + public override Task DeclineFriendRequest(DeclineFriendRequestRequest request, ServerCallContext context) + { + return Task.FromResult(new DeclineFriendRequestResponse()); + } + + /// Returns an empty response. Friend removal not yet implemented. + public override Task DeleteFriend(DeleteFriendRequest request, ServerCallContext context) + { + return Task.FromResult(new DeleteFriendResponse()); + } + + /// Returns an empty response. Cheering friends not yet implemented. + public override Task CheerFriend(CheerFriendRequest request, ServerCallContext context) + { + return Task.FromResult(new CheerFriendResponse()); + } + + /// Returns an empty response. Bulk cheering not yet implemented. + public override Task BulkCheerFriend(Empty request, ServerCallContext context) + { + return Task.FromResult(new BulkCheerFriendResponse()); + } + + /// Returns an empty response. Receiving cheers not yet implemented. + public override Task ReceiveCheer(ReceiveCheerRequest request, ServerCallContext context) + { + return Task.FromResult(new ReceiveCheerResponse()); + } + + /// Returns an empty response. Bulk receiving cheers not yet implemented. + public override Task BulkReceiveCheer(Empty request, ServerCallContext context) + { + return Task.FromResult(new BulkReceiveCheerResponse()); + } +} diff --git a/src/Services/GachaService.cs b/src/Services/GachaService.cs new file mode 100644 index 0000000..432247d --- /dev/null +++ b/src/Services/GachaService.cs @@ -0,0 +1,1332 @@ +using Google.Protobuf; +using Google.Protobuf.WellKnownTypes; +using Grpc.Core; +using MariesWonderland.Data; +using MariesWonderland.Extensions; +using MariesWonderland.Helpers; +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; +using MariesWonderland.Proto.Gacha; + +namespace MariesWonderland.Services; + +public class GachaService(DarkMasterMemoryDatabase masterDb, UserDataStore store, GameConfig gameConfig) + : MariesWonderland.Proto.Gacha.GachaService.GachaServiceBase +{ + private readonly DarkMasterMemoryDatabase _masterDb = masterDb; + private readonly UserDataStore _store = store; + private readonly GameConfig _gameConfig = gameConfig; + + private const int PhaseIdMultiplier = 10; + private const int StepUpGroupDivisor = 1000; + private const int ChapterGachaIdBase = 200000; + private const int PremiumSinglePullPrice = 300; + private const int PremiumMultiPullPrice = 3000; + private const int PremiumMultiPullCount = 10; + private const int StepUpStep1Cost = 2000; + private const int StepUpStep3Cost = 3000; + private const int StepUpStep5Cost = 5000; + private const int StepUpFreeCost = 0; + private const int ConsumableIdPremiumTicket = 1; + private const int ConsumableIdChapterTicket = 2; + private const int MedalCountCap = 9999; + private const int DupGradeMin = 2; + private const int DupGradeRange = 4; + + /// + /// Returns the filtered and sorted gacha banner catalog, including user gacha state. + /// + public override Task GetGachaList(GetGachaListRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + + List catalog = BuildCatalog(); + catalog.Sort((a, b) => a.SortOrder != b.SortOrder + ? a.SortOrder.CompareTo(b.SortOrder) + : a.GachaId.CompareTo(b.GachaId)); + + // Build medal conversion data from master data + ConvertedGachaMedal convertedMedal = new() + { + ObtainPossession = new ConsumableItemPossession() + }; + + long nowMs = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(); + foreach (GachaEntry entry in catalog) + { + if (entry.Medal == null || entry.EndDatetime == 0) + continue; + if (nowMs < entry.EndDatetime) + continue; + + EntitySGachaBannerState? bs = FindBannerState(userDb, entry.GachaId); + if (bs == null || bs.MedalCount <= 0) + continue; + + int conversionRate = entry.Medal.ConversionRate > 0 ? entry.Medal.ConversionRate : 1; + int bookmarkCount = bs.MedalCount * conversionRate; + + PossessionHelper.Apply(userDb, userId, PossessionType.CONSUMABLE_ITEM, entry.Medal.ConsumableItemId, bookmarkCount, _masterDb); + + convertedMedal.ConvertedMedalPossession.Add(new ConsumableItemPossession + { + ConsumableItemId = entry.Medal.ConsumableItemId, + Count = bookmarkCount + }); + + bs.MedalCount = 0; + } + + GetGachaListResponse response = new() + { + ConvertedGachaMedal = convertedMedal + }; + + foreach (GachaEntry entry in catalog) + { + if (request.GachaLabelType.Count > 0 && !request.GachaLabelType.Contains((int)entry.LabelType)) + continue; + + // Skip portal cage and recycle label types + if (entry.LabelType is GachaLabelType.PORTAL_CAGE or GachaLabelType.RECYCLE) + continue; + + EntitySGachaBannerState? bs = FindBannerState(userDb, entry.GachaId); + response.Gacha.Add(ToProtoGacha(entry, bs)); + } + + return Task.FromResult(response); + } + + /// + /// Returns gacha details for the requested gacha IDs. + /// + public override Task GetGacha(GetGachaRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + + List catalog = BuildCatalog(); + GetGachaResponse response = new(); + + foreach (GachaEntry entry in catalog) + { + if (request.GachaId.Contains(entry.GachaId)) + { + EntitySGachaBannerState? bs = FindBannerState(userDb, entry.GachaId); + response.Gacha[entry.GachaId] = ToProtoGacha(entry, bs); + } + } + + return Task.FromResult(response); + } + + /// + /// Executes a gacha draw: deducts currency, rolls items from banner-specific pools, grants possessions, and returns results. + /// + public override Task Draw(DrawRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + long nowMs = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(); + + List catalog = BuildCatalog(); + GachaEntry? entry = null; + foreach (GachaEntry e in catalog) + { + if (e.GachaId == request.GachaId) + { + entry = e; + break; + } + } + + if (entry == null) + { + return Task.FromResult(new DrawResponse()); + } + + int execCount = request.ExecCount > 0 ? request.ExecCount : 1; + + // Find the price phase from the catalog entry's phases + PricePhaseEntry phase = FindPhase(entry, request.GachaPricePhaseId); + + int totalCost = phase.Price * execCount; + int drawCount = phase.DrawCount * execCount; + + // Deduct currency based on price type + if (totalCost > 0) + { + DeductPrice(userDb, phase.PriceType, phase.PriceId, totalCost); + } + + // Find or create banner state + EntitySGachaBannerState bannerState = GetOrCreateBannerState(userDb, userId, entry.GachaId); + + // Draw items based on label type + List drawnItems; + bool isMaterialDraw = entry.LabelType is GachaLabelType.CHAPTER or GachaLabelType.RECYCLE or GachaLabelType.PORTAL_CAGE; + + if (isMaterialDraw) + { + drawnItems = DrawMaterials(drawCount); + } + else + { + drawnItems = DrawPremium(entry, phase, drawCount); + } + + // Step-up progression + if (entry.ModeType == GachaModeType.STEPUP) + { + bannerState.StepNumber++; + if (bannerState.StepNumber > entry.MaxStepNumber) + { + bannerState.StepNumber = 1; + bannerState.LoopCount++; + } + } + + // Medal tracking + int medalBonus = 0; + if (entry.Medal != null && entry.Medal.GachaMedalId != 0) + { + medalBonus = drawCount; + bannerState.MedalCount += medalBonus; + if (bannerState.MedalCount > MedalCountCap) + bannerState.MedalCount = MedalCountCap; + } + + bannerState.DrawCount += drawCount; + + // Build set of owned costumes/weapons for duplicate detection + HashSet ownedCostumeIds = []; + foreach (EntityIUserCostume c in userDb.EntityIUserCostume) + ownedCostumeIds.Add(c.CostumeId); + + HashSet ownedWeaponIds = []; + foreach (EntityIUserWeapon w in userDb.EntityIUserWeapon) + ownedWeaponIds.Add(w.WeaponId); + + // Build costume->weapon pairing map + Dictionary costumeWeaponMap = BuildCostumeWeaponMap(); + + // Grant drawn items and build response + List gachaResults = new(drawCount); + for (int i = 0; i < drawnItems.Count; i++) + { + DrawnItem item = drawnItems[i]; + + if (isMaterialDraw) + { + // Material draws: grant material and build simple result + PossessionHelper.Apply(userDb, userId, (PossessionType)item.PossessionType, item.PossessionId, 1, _masterDb); + bool isNew = !IsOwnedByType(item.PossessionType, item.PossessionId, ownedCostumeIds, ownedWeaponIds, userDb); + + gachaResults.Add(new DrawGachaOddsItem + { + GachaItem = new GachaItem + { + PossessionType = item.PossessionType, + PossessionId = item.PossessionId, + Count = 1, + IsNew = isNew + }, + GachaItemBonus = new GachaItem() + }); + } + else if (item.PossessionType == (int)PossessionType.COSTUME) + { + bool isNew = !ownedCostumeIds.Contains(item.PossessionId); + + if (!isNew) + { + // Costume duplicate + int dupGrade = Random.Shared.Next(DupGradeRange) + DupGradeMin; + gachaResults.Add(new DrawGachaOddsItem + { + GachaItem = new GachaItem + { + PossessionType = item.PossessionType, + PossessionId = item.PossessionId, + Count = 1, + IsNew = false + }, + GachaItemBonus = new GachaItem(), + DuplicationBonusGrade = dupGrade + }); + } + else + { + PossessionHelper.GrantCostume(userDb, userId, item.PossessionId, _masterDb); + ownedCostumeIds.Add(item.PossessionId); + + // Bonus weapon via costume->weapon pairing map + GachaItem bonusGachaItem = new(); + if (costumeWeaponMap.TryGetValue(item.PossessionId, out int pairedWeaponId) && pairedWeaponId > 0) + { + WeaponHelper.GrantWeapon(userDb, userId, pairedWeaponId, _masterDb); + bonusGachaItem = new GachaItem + { + PossessionType = (int)PossessionType.WEAPON, + PossessionId = pairedWeaponId, + Count = 1, + IsNew = !ownedWeaponIds.Contains(pairedWeaponId) + }; + ownedWeaponIds.Add(pairedWeaponId); + } + + gachaResults.Add(new DrawGachaOddsItem + { + GachaItem = new GachaItem + { + PossessionType = item.PossessionType, + PossessionId = item.PossessionId, + Count = 1, + IsNew = true + }, + GachaItemBonus = bonusGachaItem + }); + } + } + else + { + // Weapon + bool isNew = !ownedWeaponIds.Contains(item.PossessionId); + WeaponHelper.GrantWeapon(userDb, userId, item.PossessionId, _masterDb); + ownedWeaponIds.Add(item.PossessionId); + + gachaResults.Add(new DrawGachaOddsItem + { + GachaItem = new GachaItem + { + PossessionType = item.PossessionType, + PossessionId = item.PossessionId, + Count = 1, + IsNew = isNew + }, + GachaItemBonus = new GachaItem() + }); + } + + // Medal bonus per draw + if (medalBonus > 0 && entry.Medal != null) + { + gachaResults[^1].MedalBonus = new GachaBonus + { + PossessionType = (int)PossessionType.CONSUMABLE_ITEM, + PossessionId = entry.Medal.ConsumableItemId, + Count = 0 + }; + } + } + + // Grant medal consumable items (1 per draw) + if (entry.Medal != null && medalBonus > 0) + { + PossessionHelper.Apply(userDb, userId, PossessionType.CONSUMABLE_ITEM, entry.Medal.ConsumableItemId, medalBonus, _masterDb); + } + + DrawResponse response = new() + { + NextGacha = ToProtoGacha(entry, bannerState) + }; + response.GachaResult.AddRange(gachaResults); + + return Task.FromResult(response); + } + + /// + /// Resets a box gacha banner: clears drew counts and increments the box number. + /// + public override Task ResetBoxGacha(ResetBoxGachaRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + + List catalog = BuildCatalog(); + GachaEntry? entry = null; + foreach (GachaEntry e in catalog) + { + if (e.GachaId == request.GachaId) + { + entry = e; + break; + } + } + + if (entry == null) + { + return Task.FromResult(new ResetBoxGachaResponse()); + } + + EntitySGachaBannerState bannerState = GetOrCreateBannerState(userDb, userId, request.GachaId); + bannerState.BoxDrewCounts = []; + bannerState.BoxNumber++; + + return Task.FromResult(new ResetBoxGachaResponse + { + Gacha = ToProtoGacha(entry, bannerState) + }); + } + + /// + /// Returns the current daily reward gacha availability and draw count. + /// + public override Task GetRewardGacha(Empty request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + + int maxCount = _gameConfig.RewardGachaDailyMaxCount > 0 ? _gameConfig.RewardGachaDailyMaxCount : 5; + long todayStart = StartOfDayMillis(); + + EntitySGachaRewardState? rewardState = null; + foreach (EntitySGachaRewardState rs in userDb.EntitySGachaRewardState) + { + if (rs.UserId == userId) + { + rewardState = rs; + break; + } + } + + int drawCount = rewardState?.TodaysCurrentDrawCount ?? 0; + if (rewardState == null || rewardState.LastRewardDrawDate < todayStart) + { + drawCount = 0; + } + + return Task.FromResult(new GetRewardGachaResponse + { + Available = drawCount < maxCount, + TodaysCurrentDrawCount = drawCount, + DailyMaxCount = maxCount + }); + } + + /// + /// Executes a free daily reward draw: grants a random material and updates daily draw state. + /// + public override Task RewardDraw(RewardDrawRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + long nowMs = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(); + long todayStart = StartOfDayMillis(); + + int maxCount = _gameConfig.RewardGachaDailyMaxCount > 0 ? _gameConfig.RewardGachaDailyMaxCount : 5; + + EntitySGachaRewardState? rewardState = null; + foreach (EntitySGachaRewardState rs in userDb.EntitySGachaRewardState) + { + if (rs.UserId == userId) + { + rewardState = rs; + break; + } + } + + if (rewardState == null) + { + rewardState = new EntitySGachaRewardState + { + UserId = userId + }; + userDb.EntitySGachaRewardState.Add(rewardState); + } + + int currentCount = rewardState.TodaysCurrentDrawCount; + if (rewardState.LastRewardDrawDate < todayStart) + { + currentCount = 0; + } + + int remaining = maxCount - currentCount; + if (remaining <= 0) + { + return Task.FromResult(new RewardDrawResponse()); + } + + int drawCount = Math.Min(1, remaining); + + // Draw random materials + List materials = [.. _masterDb.EntityMMaterial]; + List<(int PossessionType, int PossessionId)> drawnItems = []; + + for (int i = 0; i < drawCount && materials.Count > 0; i++) + { + EntityMMaterial mat = materials[Random.Shared.Next(materials.Count)]; + drawnItems.Add(((int)PossessionType.MATERIAL, mat.MaterialId)); + PossessionHelper.Apply(userDb, userId, PossessionType.MATERIAL, mat.MaterialId, 1, _masterDb); + } + + int newCount = currentCount + drawCount; + rewardState.TodaysCurrentDrawCount = newCount; + rewardState.DailyMaxCount = maxCount; + rewardState.LastRewardDrawDate = nowMs; + rewardState.RewardAvailable = newCount < maxCount; + + // Build ownership maps + HashSet ownedCostumeIds = []; + foreach (EntityIUserCostume c in userDb.EntityIUserCostume) + ownedCostumeIds.Add(c.CostumeId); + + HashSet ownedWeaponIds = []; + foreach (EntityIUserWeapon w in userDb.EntityIUserWeapon) + ownedWeaponIds.Add(w.WeaponId); + + RewardDrawResponse response = new(); + foreach ((int possType, int possId) in drawnItems) + { + bool isOwned = IsOwnedByType(possType, possId, ownedCostumeIds, ownedWeaponIds, userDb); + response.RewardGachaResult.Add(new RewardGachaItem + { + PossessionType = possType, + PossessionId = possId, + Count = 1, + IsNew = !isOwned + }); + } + + return Task.FromResult(response); + } + + #region Catalog Building + + /// + /// Builds the gacha catalog from MomBanner + GachaMedal master data, grouping step-up banners + /// and including chapter banners (common_ prefix) that don't require medal entries. + /// + private List BuildCatalog() + { + long startDt = DateTimeOffset.UtcNow.AddDays(-3).ToUnixTimeMilliseconds(); + long endDt = DateTimeOffset.UtcNow.AddDays(3).ToUnixTimeMilliseconds(); + + Dictionary medalByGachaId = []; + foreach (EntityMGachaMedal medal in _masterDb.EntityMGachaMedal) + { + medalByGachaId[medal.ShopTransitionGachaId] = medal; + } + + Dictionary stepUpGroups = []; + List entries = []; + foreach (EntityMMomBanner banner in _masterDb.EntityMMomBanner) + { + if (banner.DestinationDomainType != DomainType.GACHA) + continue; + + int gachaId = banner.DestinationDomainId; + + // Step-up banners: group by truncated ID + if (banner.BannerAssetName.StartsWith("step_up_", StringComparison.Ordinal)) + { + if (!medalByGachaId.TryGetValue(gachaId, out EntityMGachaMedal? stepMedal)) + continue; + + int groupId = gachaId / StepUpGroupDivisor; + if (!stepUpGroups.ContainsKey(groupId)) + { + stepUpGroups[groupId] = (new GachaEntry + { + GachaId = groupId, + LabelType = GachaLabelType.PREMIUM, + ModeType = GachaModeType.STEPUP, + StartDatetime = startDt, + EndDatetime = endDt, + Medal = stepMedal, + BannerAssetName = banner.BannerAssetName, + SortOrder = banner.SortOrderDesc, + DecorationType = GachaDecorationType.FESTIVAL + }, 1); + } + else + { + var existing = stepUpGroups[groupId]; + stepUpGroups[groupId] = (existing.Entry, existing.StepCount + 1); + } + continue; + } + + bool isChapter = banner.BannerAssetName.StartsWith("common_", StringComparison.Ordinal); + bool isLimited = banner.BannerAssetName.StartsWith("limited_", StringComparison.Ordinal); + + medalByGachaId.TryGetValue(gachaId, out EntityMGachaMedal? medal); + + // Chapter banners don't require medals; non-chapter banners do + if (medal == null && !isChapter) + continue; + + GachaLabelType labelType = GachaLabelType.PREMIUM; + GachaModeType modeType = GachaModeType.BASIC; + GachaDecorationType decoration = GachaDecorationType.NORMAL; + + if (isLimited) + decoration = GachaDecorationType.FESTIVAL; + + if (isChapter) + { + labelType = GachaLabelType.CHAPTER; + modeType = GachaModeType.BOX; + } + + int relMainQuest = isChapter ? gachaId - ChapterGachaIdBase : 0; + int descriptionTextId = isChapter ? gachaId : 0; + + entries.Add(new GachaEntry + { + GachaId = gachaId, + LabelType = labelType, + ModeType = modeType, + StartDatetime = startDt, + EndDatetime = endDt, + Medal = medal, + BannerAssetName = banner.BannerAssetName, + SortOrder = banner.SortOrderDesc, + DecorationType = decoration, + RelatedMainQuestChapterId = relMainQuest, + DescriptionTextId = descriptionTextId, + PricePhases = isChapter ? BuildChapterPricePhases(gachaId) : BuildPremiumBasicPricePhases(gachaId) + }); + } + + // Build step-up entries with proper price phases + foreach (var (groupId, (entry, stepCount)) in stepUpGroups) + { + List phases = BuildStepUpPricePhases(groupId, stepCount); + int maxStep = 0; + foreach (PricePhaseEntry p in phases) + { + if (p.StepNumber > maxStep) + maxStep = p.StepNumber; + } + + entries.Add(entry with { PricePhases = phases, MaxStepNumber = maxStep }); + } + + return entries; + } + + private static List BuildPremiumBasicPricePhases(int gachaId) + { + return + [ + new PricePhaseEntry + { + PhaseId = gachaId * PhaseIdMultiplier + 1, + PriceType = (int)PriceType.GEM, + Price = PremiumSinglePullPrice, + RegularPrice = PremiumSinglePullPrice, + DrawCount = 1 + }, + new PricePhaseEntry + { + PhaseId = gachaId * PhaseIdMultiplier + 2, + PriceType = (int)PriceType.GEM, + Price = PremiumMultiPullPrice, + RegularPrice = PremiumMultiPullPrice, + DrawCount = PremiumMultiPullCount, + FixedRarityMin = (int)RarityType.S_RARE, + FixedCount = 1 + }, + new PricePhaseEntry + { + PhaseId = gachaId * PhaseIdMultiplier + 3, + PriceType = (int)PriceType.CONSUMABLE_ITEM, + PriceId = ConsumableIdPremiumTicket, + Price = 1, + RegularPrice = 1, + DrawCount = 1 + } + ]; + } + + private static List BuildStepUpPricePhases(int gachaId, int totalSteps) + { + int[] stepCosts = [StepUpStep1Cost, StepUpFreeCost, StepUpStep3Cost, StepUpFreeCost, StepUpStep5Cost]; + int count = Math.Min(totalSteps, stepCosts.Length); + + List phases = new(count); + for (int i = 0; i < count; i++) + { + int step = i + 1; + int cost = stepCosts[i]; + int priceType = cost == 0 ? (int)PriceType.GEM : (int)PriceType.PAID_GEM; + + int fixedRarityMin = 0; + int fixedCount = 0; + if (step == count) + { + fixedRarityMin = (int)RarityType.SS_RARE; + fixedCount = 1; + } + + phases.Add(new PricePhaseEntry + { + PhaseId = gachaId * PhaseIdMultiplier + step, + PriceType = priceType, + Price = cost, + RegularPrice = PremiumMultiPullPrice, + DrawCount = PremiumMultiPullCount, + FixedRarityMin = fixedRarityMin, + FixedCount = fixedCount, + LimitExecCount = 1, + StepNumber = step + }); + } + return phases; + } + + private static List BuildChapterPricePhases(int gachaId) + { + return + [ + new PricePhaseEntry + { + PhaseId = gachaId * PhaseIdMultiplier + 1, + PriceType = (int)PriceType.CONSUMABLE_ITEM, + PriceId = ConsumableIdChapterTicket, + Price = 1, + RegularPrice = 1, + DrawCount = 1 + }, + new PricePhaseEntry + { + PhaseId = gachaId * PhaseIdMultiplier + 2, + PriceType = (int)PriceType.CONSUMABLE_ITEM, + PriceId = ConsumableIdChapterTicket, + Price = 10, + RegularPrice = 10, + DrawCount = PremiumMultiPullCount + } + ]; + } + + #endregion + + #region Proto Conversion + + /// + /// Converts a GachaEntry to the protobuf Gacha message with proper price phases, mode, + /// and user banner state. + /// + private static Gacha ToProtoGacha(GachaEntry entry, EntitySGachaBannerState? bannerState = null) + { + Gacha gacha = new() + { + GachaId = entry.GachaId, + GachaLabelType = (int)entry.LabelType, + GachaModeType = (int)entry.ModeType, + GachaAutoResetType = (int)GachaAutoResetType.NONE, + GachaAutoResetPeriod = 0, + NextAutoResetDatetime = new Timestamp { Seconds = 0 }, + IsUserGachaUnlock = true, + StartDatetime = Timestamp.FromDateTimeOffset(DateTimeOffset.FromUnixTimeMilliseconds(entry.StartDatetime)), + EndDatetime = Timestamp.FromDateTimeOffset(DateTimeOffset.FromUnixTimeMilliseconds(entry.EndDatetime)), + RelatedMainQuestChapterId = entry.RelatedMainQuestChapterId, + RelatedEventQuestChapterId = 0, + PromotionMovieAssetId = 0, + GachaMedalId = entry.Medal?.GachaMedalId ?? 0, + GachaDecorationType = (int)entry.DecorationType, + SortOrder = entry.SortOrder, + IsInactive = false, + InformationId = 0 + }; + + gacha.GachaUnlockCondition.Add(new GachaUnlockCondition + { + GachaUnlockConditionType = (int)GachaUnlockConditionType.NONE, + ConditionValue = 0 + }); + + // Build price phases from catalog entry + foreach (PricePhaseEntry p in entry.PricePhases) + { + bool isEnabled = true; + if (entry.ModeType == GachaModeType.STEPUP && bannerState != null) + { + int currentStep = bannerState.StepNumber > 0 ? bannerState.StepNumber : 1; + isEnabled = p.StepNumber == currentStep; + } + + int limitExec = p.LimitExecCount > 0 ? p.LimitExecCount : 999; + + gacha.GachaPricePhase.Add(new GachaPricePhase + { + GachaPricePhaseId = p.PhaseId, + IsEnabled = isEnabled, + EndDatetime = Timestamp.FromDateTimeOffset(DateTimeOffset.FromUnixTimeMilliseconds(entry.EndDatetime)), + PriceType = p.PriceType, + PriceId = p.PriceId, + Price = p.Price, + RegularPrice = p.RegularPrice, + DrawCount = p.DrawCount, + LimitExecCount = limitExec, + EachMaxExecCount = p.DrawCount, + GachaOddsFixedRarity = new GachaOddsFixedRarity + { + FixedRarityTypeLowerLimit = p.FixedRarityMin, + FixedCount = p.FixedCount + }, + GachaBadgeType = 1 + }); + } + + int boxNumber = bannerState?.BoxNumber > 0 ? bannerState.BoxNumber : 1; + int stepNumber = bannerState?.StepNumber > 0 ? bannerState.StepNumber : 1; + int loopCount = bannerState?.LoopCount ?? 0; + + gacha.GachaMode = entry.ModeType switch + { + GachaModeType.BOX => new GachaModeBoxComposition + { + GachaBoxGroupId = entry.GachaId, + BoxNumber = boxNumber, + CurrentBoxNumber = boxNumber, + GachaAssetName = entry.BannerAssetName, + GachaPricePhaseId = entry.PricePhases.Count > 0 ? entry.PricePhases[0].PhaseId : 0 + }.ToByteString(), + GachaModeType.STEPUP => new GachaModeStepupComposition + { + GachaStepGroupId = entry.GachaId, + StepNumber = 1, + CurrentStepNumber = stepNumber, + GachaAssetName = entry.BannerAssetName, + CurrentLoopCount = loopCount + }.ToByteString(), + _ => new GachaModeBasic + { + GachaAssetName = entry.BannerAssetName + }.ToByteString() + }; + + return gacha; + } + + #endregion + + #region Draw Logic + + /// + /// Draws from premium banner pools, using banner-specific pools when available. + /// + private List DrawPremium(GachaEntry entry, PricePhaseEntry phase, int count) + { + // Build banner-specific pools from catalog-filtered master data + var (costumesByRarity, weaponsByRarity) = BuildBannerPools(); + + // Rate tiers (out of 10000) + (int Weight, int PossessionType, RarityType Rarity)[] rateTiers = + [ + (200, (int)PossessionType.COSTUME, RarityType.SS_RARE), + (300, (int)PossessionType.WEAPON, RarityType.SS_RARE), + (500, (int)PossessionType.COSTUME, RarityType.S_RARE), + (1000, (int)PossessionType.WEAPON, RarityType.S_RARE), + (8000, (int)PossessionType.WEAPON, RarityType.RARE), + ]; + + int totalWeight = 0; + foreach (var tier in rateTiers) + totalWeight += tier.Weight; + + List result = new(count); + for (int i = 0; i < count; i++) + { + bool isGuaranteeSlot = phase.FixedCount > 0 && i >= count - phase.FixedCount; + DrawnItem item = RollOne(rateTiers, totalWeight, costumesByRarity, weaponsByRarity); + + if (isGuaranteeSlot && (int)item.Rarity < phase.FixedRarityMin) + { + item = RollAtMinRarity(rateTiers, (RarityType)phase.FixedRarityMin, costumesByRarity, weaponsByRarity); + } + + result.Add(item); + } + return result; + } + + /// + /// Draws random materials. + /// + private List DrawMaterials(int count) + { + List materials = _masterDb.EntityMMaterial; + if (materials.Count == 0) + return []; + + List result = new(count); + for (int i = 0; i < count; i++) + { + EntityMMaterial mat = materials[Random.Shared.Next(materials.Count)]; + result.Add(new DrawnItem((int)PossessionType.MATERIAL, mat.MaterialId, mat.RarityType)); + } + return result; + } + + /// + /// Builds costume and weapon pools from catalog-filtered master data. + /// Only catalog items, exclude evolved/restricted weapons, only costumes SR+ and weapons R+. + /// + private (Dictionary> Costumes, Dictionary> Weapons) BuildBannerPools() + { + // Build catalog sets + HashSet catalogCostumes = []; + foreach (EntityMCatalogCostume cc in _masterDb.EntityMCatalogCostume) + catalogCostumes.Add(cc.CostumeId); + + HashSet catalogWeapons = []; + foreach (EntityMCatalogWeapon cw in _masterDb.EntityMCatalogWeapon) + catalogWeapons.Add(cw.WeaponId); + + // Build evolved weapon exclusion set + HashSet evolvedWeapons = BuildEvolvedWeaponSet(); + + Dictionary> costumesByRarity = []; + foreach (EntityMCostume c in _masterDb.EntityMCostume) + { + if (!catalogCostumes.Contains(c.CostumeId)) + continue; + if (c.RarityType < RarityType.S_RARE) + continue; + + if (!costumesByRarity.TryGetValue(c.RarityType, out List? list)) + { + list = []; + costumesByRarity[c.RarityType] = list; + } + list.Add(new PoolItem((int)PossessionType.COSTUME, c.CostumeId, c.RarityType, c.CharacterId)); + } + + Dictionary> weaponsByRarity = []; + foreach (EntityMWeapon w in _masterDb.EntityMWeapon) + { + if (!catalogWeapons.Contains(w.WeaponId)) + continue; + if (evolvedWeapons.Contains(w.WeaponId)) + continue; + if (w.IsRestrictDiscard) + continue; + + if (!weaponsByRarity.TryGetValue(w.RarityType, out List? list)) + { + list = []; + weaponsByRarity[w.RarityType] = list; + } + list.Add(new PoolItem((int)PossessionType.WEAPON, w.WeaponId, w.RarityType)); + } + + // Fallback: if catalog-filtered pools are empty, use all master data (backwards compat) + if (costumesByRarity.Count == 0 && weaponsByRarity.Count == 0) + { + foreach (EntityMCostume c in _masterDb.EntityMCostume) + { + if (c.RarityType < RarityType.S_RARE) continue; + if (!costumesByRarity.TryGetValue(c.RarityType, out List? list)) + { + list = []; + costumesByRarity[c.RarityType] = list; + } + list.Add(new PoolItem((int)PossessionType.COSTUME, c.CostumeId, c.RarityType, c.CharacterId)); + } + foreach (EntityMWeapon w in _masterDb.EntityMWeapon) + { + if (!weaponsByRarity.TryGetValue(w.RarityType, out List? list)) + { + list = []; + weaponsByRarity[w.RarityType] = list; + } + list.Add(new PoolItem((int)PossessionType.WEAPON, w.WeaponId, w.RarityType)); + } + } + + return (costumesByRarity, weaponsByRarity); + } + + /// + /// Builds the set of evolved weapon IDs to exclude from the gacha pool. + /// + private HashSet BuildEvolvedWeaponSet() + { + Dictionary> grouped = []; + foreach (EntityMWeaponEvolutionGroup row in _masterDb.EntityMWeaponEvolutionGroup) + { + if (!grouped.TryGetValue(row.WeaponEvolutionGroupId, out List? list)) + { + list = []; + grouped[row.WeaponEvolutionGroupId] = list; + } + list.Add(row); + } + + HashSet evolved = []; + foreach (List chain in grouped.Values) + { + chain.Sort((a, b) => a.EvolutionOrder.CompareTo(b.EvolutionOrder)); + for (int i = 1; i < chain.Count; i++) + evolved.Add(chain[i].WeaponId); + } + return evolved; + } + + /// + /// Builds costume->weapon pairing map using catalog term matching. + /// + private Dictionary BuildCostumeWeaponMap() + { + Dictionary costumeTermId = []; + HashSet catalogCostumeSet = []; + foreach (EntityMCatalogCostume cc in _masterDb.EntityMCatalogCostume) + { + catalogCostumeSet.Add(cc.CostumeId); + costumeTermId[cc.CostumeId] = cc.CatalogTermId; + } + + HashSet catalogWeaponSet = []; + foreach (EntityMCatalogWeapon cw in _masterDb.EntityMCatalogWeapon) + catalogWeaponSet.Add(cw.WeaponId); + + HashSet evolvedWeapons = BuildEvolvedWeaponSet(); + + Dictionary costumeWeaponType = []; + Dictionary costumeRarity = []; + foreach (EntityMCostume c in _masterDb.EntityMCostume) + { + if (!catalogCostumeSet.Contains(c.CostumeId) || c.RarityType < RarityType.S_RARE) + continue; + costumeWeaponType[c.CostumeId] = c.SkillfulWeaponType; + costumeRarity[c.CostumeId] = c.RarityType; + } + + Dictionary weaponTypeById = []; + Dictionary weaponRarityById = []; + HashSet restrictedWeapons = []; + foreach (EntityMWeapon w in _masterDb.EntityMWeapon) + { + weaponTypeById[w.WeaponId] = w.WeaponType; + weaponRarityById[w.WeaponId] = w.RarityType; + if (w.IsRestrictDiscard) + restrictedWeapons.Add(w.WeaponId); + } + + // Group weapons by (termId, weaponType, rarity) + Dictionary<(int TermId, WeaponType WType, RarityType Rarity), List> weaponsByKey = []; + foreach (EntityMCatalogWeapon cw in _masterDb.EntityMCatalogWeapon) + { + if (evolvedWeapons.Contains(cw.WeaponId) || restrictedWeapons.Contains(cw.WeaponId)) + continue; + if (!weaponTypeById.TryGetValue(cw.WeaponId, out WeaponType wt) || wt == 0) + continue; + if (!weaponRarityById.TryGetValue(cw.WeaponId, out RarityType r) || r < RarityType.S_RARE) + continue; + + var key = (cw.CatalogTermId, wt, r); + if (!weaponsByKey.TryGetValue(key, out List? list)) + { + list = []; + weaponsByKey[key] = list; + } + list.Add(cw.WeaponId); + } + + foreach (List ids in weaponsByKey.Values) + ids.Sort(); + + Dictionary result = []; + foreach (int costumeId in costumeWeaponType.Keys) + { + if (!costumeTermId.TryGetValue(costumeId, out int tid)) + continue; + if (!costumeWeaponType.TryGetValue(costumeId, out WeaponType cwt)) + continue; + if (!costumeRarity.TryGetValue(costumeId, out RarityType cr)) + continue; + + var key = (tid, cwt, cr); + if (!weaponsByKey.TryGetValue(key, out List? candidates) || candidates.Count == 0) + continue; + + if (candidates.Count == 1) + { + result[costumeId] = candidates[0]; + continue; + } + + // Try id-pattern match first + int idPattern = costumeId * 10 + 1; + bool found = false; + foreach (int wid in candidates) + { + if (wid == idPattern) + { + result[costumeId] = wid; + found = true; + break; + } + } + if (!found) + result[costumeId] = candidates[0]; + } + + return result; + } + + #endregion + + #region Rolling + + private static DrawnItem RollOne( + (int Weight, int PossessionType, RarityType Rarity)[] rateTiers, + int totalWeight, + Dictionary> costumesByRarity, + Dictionary> weaponsByRarity) + { + int roll = Random.Shared.Next(totalWeight); + int cumulative = 0; + int tierPossessionType = (int)PossessionType.WEAPON; + RarityType tierRarity = RarityType.RARE; + + foreach (var tier in rateTiers) + { + cumulative += tier.Weight; + if (roll < cumulative) + { + tierPossessionType = tier.PossessionType; + tierRarity = tier.Rarity; + break; + } + } + + return PickFromPool(tierPossessionType, tierRarity, costumesByRarity, weaponsByRarity); + } + + private static DrawnItem RollAtMinRarity( + (int Weight, int PossessionType, RarityType Rarity)[] rateTiers, + RarityType minRarity, + Dictionary> costumesByRarity, + Dictionary> weaponsByRarity) + { + int filteredTotal = 0; + List<(int Weight, int PossessionType, RarityType Rarity)> filtered = []; + foreach (var tier in rateTiers) + { + if (tier.Rarity >= minRarity) + { + filtered.Add(tier); + filteredTotal += tier.Weight; + } + } + + if (filteredTotal == 0) + { + return PickFromPool((int)PossessionType.WEAPON, minRarity, costumesByRarity, weaponsByRarity); + } + + int roll = Random.Shared.Next(filteredTotal); + int cumulative = 0; + int tierPossessionType = (int)PossessionType.WEAPON; + RarityType tierRarity = minRarity; + + foreach (var tier in filtered) + { + cumulative += tier.Weight; + if (roll < cumulative) + { + tierPossessionType = tier.PossessionType; + tierRarity = tier.Rarity; + break; + } + } + + return PickFromPool(tierPossessionType, tierRarity, costumesByRarity, weaponsByRarity); + } + + private static DrawnItem PickFromPool( + int possessionType, + RarityType rarity, + Dictionary> costumesByRarity, + Dictionary> weaponsByRarity) + { + if (possessionType == (int)PossessionType.COSTUME) + { + List? pool = costumesByRarity.GetValueOrDefault(rarity); + if (pool == null || pool.Count == 0) + pool = costumesByRarity.GetValueOrDefault(RarityType.SS_RARE); + if (pool == null || pool.Count == 0) + return PickFromPool((int)PossessionType.WEAPON, rarity, costumesByRarity, weaponsByRarity); + + PoolItem pick = pool[Random.Shared.Next(pool.Count)]; + return new DrawnItem(pick.PossessionType, pick.PossessionId, pick.Rarity, pick.CharacterId); + } + + // Weapon + List? weaponPool = weaponsByRarity.GetValueOrDefault(rarity); + if (weaponPool == null || weaponPool.Count == 0) + weaponPool = weaponsByRarity.GetValueOrDefault(RarityType.RARE); + if (weaponPool == null || weaponPool.Count == 0) + return new DrawnItem((int)PossessionType.WEAPON, 0, rarity); + + PoolItem weaponPick = weaponPool[Random.Shared.Next(weaponPool.Count)]; + return new DrawnItem(weaponPick.PossessionType, weaponPick.PossessionId, weaponPick.Rarity); + } + + #endregion + + #region Helpers + + /// + /// Finds the matching price phase or falls back to the first available. + /// + private static PricePhaseEntry FindPhase(GachaEntry entry, int phaseId) + { + foreach (PricePhaseEntry p in entry.PricePhases) + { + if (p.PhaseId == phaseId) + return p; + } + if (entry.PricePhases.Count > 0) + return entry.PricePhases[0]; + + return new PricePhaseEntry + { + PriceType = (int)PriceType.GEM, + Price = PremiumMultiPullPrice, + DrawCount = PremiumMultiPullCount + }; + } + + /// + /// Deducts currency based on price type. + /// + private static void DeductPrice(DarkUserMemoryDatabase userDb, int priceType, int priceId, int amount) + { + switch ((PriceType)priceType) + { + case PriceType.CONSUMABLE_ITEM: + { + EntityIUserConsumableItem? item = userDb.EntityIUserConsumableItem.FirstOrDefault(c => c.ConsumableItemId == priceId); + if (item != null) + item.Count = Math.Max(0, item.Count - amount); + break; + } + case PriceType.GEM: + { + EntityIUserGem? gem = userDb.EntityIUserGem.FirstOrDefault(); + if (gem == null) break; + if (gem.FreeGem >= amount) + { + gem.FreeGem -= amount; + } + else + { + int remaining = amount - gem.FreeGem; + gem.FreeGem = 0; + gem.PaidGem -= remaining; + } + break; + } + case PriceType.PAID_GEM: + { + EntityIUserGem? gem = userDb.EntityIUserGem.FirstOrDefault(); + if (gem != null) + gem.PaidGem -= amount; + break; + } + case PriceType.PLATFORM_PAYMENT: + // Real-money purchase — treat as free on private server + break; + } + } + + private static EntitySGachaBannerState? FindBannerState(DarkUserMemoryDatabase userDb, int gachaId) + { + foreach (EntitySGachaBannerState bs in userDb.EntitySGachaBannerState) + { + if (bs.GachaId == gachaId) + return bs; + } + return null; + } + + private static EntitySGachaBannerState GetOrCreateBannerState(DarkUserMemoryDatabase userDb, long userId, int gachaId) + { + EntitySGachaBannerState? bs = FindBannerState(userDb, gachaId); + if (bs != null) return bs; + + bs = new EntitySGachaBannerState + { + UserId = userId, + GachaId = gachaId, + BoxNumber = 1, + StepNumber = 1 + }; + userDb.EntitySGachaBannerState.Add(bs); + return bs; + } + + private static long StartOfDayMillis() + { + DateTimeOffset now = DateTimeOffset.UtcNow; + DateTimeOffset startOfDay = new(now.Year, now.Month, now.Day, 0, 0, 0, TimeSpan.Zero); + return startOfDay.ToUnixTimeMilliseconds(); + } + + private static bool IsOwnedByType( + int possessionType, + int possessionId, + HashSet ownedCostumes, + HashSet ownedWeapons, + DarkUserMemoryDatabase userDb) + { + return possessionType switch + { + (int)PossessionType.COSTUME => ownedCostumes.Contains(possessionId), + (int)PossessionType.WEAPON => ownedWeapons.Contains(possessionId), + (int)PossessionType.MATERIAL => userDb.EntityIUserMaterial.Any(m => m.MaterialId == possessionId && m.Count > 0), + (int)PossessionType.WEAPON_ENHANCED => userDb.EntityIUserConsumableItem.Any(c => c.ConsumableItemId == possessionId && c.Count > 0), + _ => false + }; + } + + #endregion + + #region Types + + private sealed record GachaEntry + { + public int GachaId { get; init; } + public GachaLabelType LabelType { get; init; } + public GachaModeType ModeType { get; init; } + public long StartDatetime { get; init; } + public long EndDatetime { get; init; } + public EntityMGachaMedal? Medal { get; init; } + public string BannerAssetName { get; init; } = string.Empty; + public int SortOrder { get; init; } + public GachaDecorationType DecorationType { get; init; } = GachaDecorationType.NORMAL; + public int RelatedMainQuestChapterId { get; init; } + public int DescriptionTextId { get; init; } + public List PricePhases { get; init; } = []; + public int MaxStepNumber { get; init; } + } + + private sealed class PricePhaseEntry + { + public int PhaseId { get; init; } + public int PriceType { get; init; } + public int PriceId { get; init; } + public int Price { get; init; } + public int RegularPrice { get; init; } + public int DrawCount { get; init; } + public int FixedRarityMin { get; init; } + public int FixedCount { get; init; } + public int LimitExecCount { get; init; } + public int StepNumber { get; init; } + } + + private readonly record struct PoolItem(int PossessionType, int PossessionId, RarityType Rarity, int CharacterId = 0); + + private readonly record struct DrawnItem(int PossessionType, int PossessionId, RarityType Rarity, int CharacterId = 0); + + #endregion +} + diff --git a/src/Services/GameplayService.cs b/src/Services/GameplayService.cs new file mode 100644 index 0000000..5701163 --- /dev/null +++ b/src/Services/GameplayService.cs @@ -0,0 +1,16 @@ +using Grpc.Core; +using MariesWonderland.Proto.GamePlay; + +namespace MariesWonderland.Services; + +public class GameplayService : MariesWonderland.Proto.GamePlay.GameplayService.GameplayServiceBase +{ + /// Performs pre-battle validation. Returns no popups and an empty gacha badge list. + public override Task CheckBeforeGamePlay(CheckBeforeGamePlayRequest request, ServerCallContext context) + { + return Task.FromResult(new CheckBeforeGamePlayResponse + { + IsExistUnreadPop = false + }); + } +} diff --git a/src/Services/GiftService.cs b/src/Services/GiftService.cs new file mode 100644 index 0000000..1ae9974 --- /dev/null +++ b/src/Services/GiftService.cs @@ -0,0 +1,140 @@ +using Google.Protobuf; +using Google.Protobuf.WellKnownTypes; +using Grpc.Core; +using MariesWonderland.Data; +using MariesWonderland.Extensions; +using MariesWonderland.Models.Entities; +using MariesWonderland.Proto.Gift; + +namespace MariesWonderland.Services; + +public class GiftService(UserDataStore store) : MariesWonderland.Proto.Gift.GiftService.GiftServiceBase +{ + private readonly UserDataStore _store = store; + + /// Claims inbox gifts by UUID, marking them as received with the current timestamp. + public override Task ReceiveGift(ReceiveGiftRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + + List received = []; + + foreach (EntitySUserGift gift in userDb.EntitySUserGift) + { + if (gift.UserId == userId + && gift.ReceivedDatetime == 0 + && request.UserGiftUuid.Contains(gift.UserGiftUuid)) + { + gift.ReceivedDatetime = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(); + received.Add(gift.UserGiftUuid); + } + } + + ReceiveGiftResponse response = new(); + response.ReceivedGiftUuid.AddRange(received); + return Task.FromResult(response); + } + + /// Returns a paginated list of unclaimed gifts, sorted by expiration date. + public override Task GetGiftList(GetGiftListRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + + List unreceived = [.. userDb.EntitySUserGift + .Where(g => g.ReceivedDatetime == 0)]; + + if (request.IsAscendingSort) + { + unreceived.Sort((a, b) => a.ExpirationDatetime.CompareTo(b.ExpirationDatetime)); + } + else + { + unreceived.Sort((a, b) => b.ExpirationDatetime.CompareTo(a.ExpirationDatetime)); + } + + IEnumerable page = unreceived; + if (request.GetCount > 0) + { + page = page.Take(request.GetCount); + } + + GetGiftListResponse response = new() + { + TotalPageCount = PageCount(unreceived.Count, request.GetCount), + NextCursor = 0, + PreviousCursor = 0 + }; + + foreach (EntitySUserGift gift in page) + { + NotReceivedGift item = new() + { + GiftCommon = ToProtoGiftCommon(gift), + UserGiftUuid = gift.UserGiftUuid + }; + if (gift.ExpirationDatetime > 0) + { + item.ExpirationDatetime = Timestamp.FromDateTimeOffset( + DateTimeOffset.FromUnixTimeMilliseconds(gift.ExpirationDatetime)); + } + response.Gift.Add(item); + } + + return Task.FromResult(response); + } + + /// Returns the history of previously claimed gifts. + public override Task GetGiftReceiveHistoryList(Empty request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + + GetGiftReceiveHistoryListResponse response = new(); + + foreach (EntitySUserGift gift in userDb.EntitySUserGift.Where(g => g.ReceivedDatetime != 0)) + { + response.Gift.Add(new ReceivedGift + { + GiftCommon = ToProtoGiftCommon(gift), + ReceivedDatetime = Timestamp.FromDateTimeOffset( + DateTimeOffset.FromUnixTimeMilliseconds(gift.ReceivedDatetime)) + }); + } + + return Task.FromResult(response); + } + + /// Converts a server-side gift entity to the proto GiftCommon message. + private static GiftCommon ToProtoGiftCommon(EntitySUserGift gift) + { + GiftCommon common = new() + { + PossessionType = gift.PossessionType, + PossessionId = gift.PossessionId, + Count = gift.Count, + DescriptionGiftTextId = gift.DescriptionGiftTextId, + EquipmentData = gift.EquipmentData.Length > 0 + ? ByteString.CopyFrom(gift.EquipmentData) + : ByteString.Empty + }; + if (gift.GrantDatetime > 0) + { + common.GrantDatetime = Timestamp.FromDateTimeOffset( + DateTimeOffset.FromUnixTimeMilliseconds(gift.GrantDatetime)); + } + return common; + } + + /// Calculates the total number of pages given item count and page size. + private static int PageCount(int total, int pageSize) + { + if (total == 0) return 0; + if (pageSize <= 0) return 1; + int pages = total / pageSize; + if (total % pageSize != 0) pages++; + return pages; + } +} + diff --git a/src/Services/GimmickService.cs b/src/Services/GimmickService.cs new file mode 100644 index 0000000..d1f4693 --- /dev/null +++ b/src/Services/GimmickService.cs @@ -0,0 +1,198 @@ +using Google.Protobuf.WellKnownTypes; +using Grpc.Core; +using MariesWonderland.Data; +using MariesWonderland.Extensions; +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; +using MariesWonderland.Proto.Gimmick; + +namespace MariesWonderland.Services; + +public class GimmickService(UserDataStore store, DarkMasterMemoryDatabase masterDb) + : MariesWonderland.Proto.Gimmick.GimmickService.GimmickServiceBase +{ + private readonly UserDataStore _store = store; + private readonly DarkMasterMemoryDatabase _masterDb = masterDb; + + /// Records that the user has advanced to a gimmick sequence, preventing duplicate entries. + public override Task UpdateSequence(UpdateSequenceRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + + if (!userDb.EntityIUserGimmickSequence.Any(s => + s.GimmickSequenceScheduleId == request.GimmickSequenceScheduleId && + s.GimmickSequenceId == request.GimmickSequenceId)) + { + userDb.EntityIUserGimmickSequence.Add(new EntityIUserGimmickSequence + { + UserId = userId, + GimmickSequenceScheduleId = request.GimmickSequenceScheduleId, + GimmickSequenceId = request.GimmickSequenceId, + }); + } + + return Task.FromResult(new UpdateSequenceResponse()); + } + + /// Updates progress on a field gimmick and its ornament interaction state. + public override Task UpdateGimmickProgress(UpdateGimmickProgressRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + long nowMs = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(); + + EntityIUserGimmick? gimmick = userDb.EntityIUserGimmick.FirstOrDefault(g => + g.GimmickSequenceScheduleId == request.GimmickSequenceScheduleId && + g.GimmickSequenceId == request.GimmickSequenceId && + g.GimmickId == request.GimmickId); + + if (gimmick is null) + { + gimmick = new EntityIUserGimmick + { + UserId = userId, + GimmickSequenceScheduleId = request.GimmickSequenceScheduleId, + GimmickSequenceId = request.GimmickSequenceId, + GimmickId = request.GimmickId, + }; + userDb.EntityIUserGimmick.Add(gimmick); + } + gimmick.StartDatetime = nowMs; + + EntityIUserGimmickOrnamentProgress? ornament = userDb.EntityIUserGimmickOrnamentProgress.FirstOrDefault(o => + o.GimmickSequenceScheduleId == request.GimmickSequenceScheduleId && + o.GimmickSequenceId == request.GimmickSequenceId && + o.GimmickId == request.GimmickId && + o.GimmickOrnamentIndex == request.GimmickOrnamentIndex); + + if (ornament is null) + { + ornament = new EntityIUserGimmickOrnamentProgress + { + UserId = userId, + GimmickSequenceScheduleId = request.GimmickSequenceScheduleId, + GimmickSequenceId = request.GimmickSequenceId, + GimmickId = request.GimmickId, + GimmickOrnamentIndex = request.GimmickOrnamentIndex, + }; + userDb.EntityIUserGimmickOrnamentProgress.Add(ornament); + } + ornament.ProgressValueBit = request.ProgressValueBit; + ornament.BaseDatetime = nowMs; + + return Task.FromResult(new UpdateGimmickProgressResponse { IsSequenceCleared = false }); + } + + /// Initializes gimmick sequence schedules whose time windows are active and quest prerequisites are met. + public override Task InitSequenceSchedule(Empty request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + long nowMs = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(); + + Dictionary conditionToQuestId = BuildConditionQuestMap(); + + // Collect all cleared quest IDs for prerequisite checks + HashSet clearedQuests = []; + foreach (EntityIUserQuest quest in userDb.EntityIUserQuest) + { + if (quest.QuestStateType == (int)QuestStateType.CLEARED) + { + clearedQuests.Add(quest.QuestId); + } + } + + // Activate each schedule whose time window includes now and whose quest prerequisite is met + foreach (EntityMGimmickSequenceSchedule schedule in _masterDb.EntityMGimmickSequenceSchedule) + { + if (nowMs < schedule.StartDatetime || nowMs > schedule.EndDatetime) + { + continue; + } + + if (schedule.ReleaseEvaluateConditionId != 0) + { + if (conditionToQuestId.TryGetValue(schedule.ReleaseEvaluateConditionId, out long requiredQuestId) + && !clearedQuests.Contains((int)requiredQuestId)) + { + continue; + } + } + + bool exists = userDb.EntityIUserGimmickSequence.Any(s => + s.GimmickSequenceScheduleId == schedule.GimmickSequenceScheduleId && + s.GimmickSequenceId == schedule.FirstGimmickSequenceId); + + if (!exists) + { + userDb.EntityIUserGimmickSequence.Add(new EntityIUserGimmickSequence + { + UserId = userId, + GimmickSequenceScheduleId = schedule.GimmickSequenceScheduleId, + GimmickSequenceId = schedule.FirstGimmickSequenceId, + }); + } + } + + return Task.FromResult(new InitSequenceScheduleResponse()); + } + + /// Marks one or more gimmicks as unlocked so the player can interact with them in the field. + public override Task Unlock(UnlockRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + + foreach (GimmickKey key in request.GimmickKey) + { + EntityIUserGimmickUnlock? unlock = userDb.EntityIUserGimmickUnlock.FirstOrDefault(u => + u.GimmickSequenceScheduleId == key.GimmickSequenceScheduleId && + u.GimmickSequenceId == key.GimmickSequenceId && + u.GimmickId == key.GimmickId); + + if (unlock is null) + { + unlock = new EntityIUserGimmickUnlock + { + UserId = userId, + GimmickSequenceScheduleId = key.GimmickSequenceScheduleId, + GimmickSequenceId = key.GimmickSequenceId, + GimmickId = key.GimmickId, + }; + userDb.EntityIUserGimmickUnlock.Add(unlock); + } + unlock.IsUnlocked = true; + } + + return Task.FromResult(new UnlockResponse()); + } + + /// Builds a mapping from EvaluateConditionId to required quest ID for QUEST_CLEAR conditions. + private Dictionary BuildConditionQuestMap() { + Dictionary<(int GroupId, int GroupIndex), long> vgByKey = []; + foreach (EntityMEvaluateConditionValueGroup vg in _masterDb.EntityMEvaluateConditionValueGroup) + { + vgByKey[(vg.EvaluateConditionValueGroupId, vg.GroupIndex)] = vg.Value; + } + + Dictionary conditionToQuestId = []; + foreach (EntityMEvaluateCondition cond in _masterDb.EntityMEvaluateCondition) + { + if (cond.EvaluateConditionFunctionType != EvaluateConditionFunctionType.QUEST_CLEAR) + { + continue; + } + if (cond.EvaluateConditionEvaluateType != EvaluateConditionEvaluateType.ID_CONTAIN) + { + continue; + } + if (vgByKey.TryGetValue((cond.EvaluateConditionValueGroupId, 1), out long questId)) + { + conditionToQuestId[cond.EvaluateConditionId] = questId; + } + } + + return conditionToQuestId; + } +} diff --git a/src/Services/IndividualPopService.cs b/src/Services/IndividualPopService.cs new file mode 100644 index 0000000..34f052b --- /dev/null +++ b/src/Services/IndividualPopService.cs @@ -0,0 +1,14 @@ +using Google.Protobuf.WellKnownTypes; +using Grpc.Core; +using MariesWonderland.Proto.IndividualPop; + +namespace MariesWonderland.Services; + +public class IndividualPopService : MariesWonderland.Proto.IndividualPop.IndividualpopService.IndividualpopServiceBase +{ + /// Returns an empty response. Individual pop-up notifications not yet implemented. + public override Task GetUnreadPop(Empty request, ServerCallContext context) + { + return Task.FromResult(new GetUnreadPopResponse()); + } +} diff --git a/src/Services/LabyrinthService.cs b/src/Services/LabyrinthService.cs new file mode 100644 index 0000000..74905cb --- /dev/null +++ b/src/Services/LabyrinthService.cs @@ -0,0 +1,25 @@ +using Grpc.Core; +using MariesWonderland.Proto.Labyrinth; + +namespace MariesWonderland.Services; + +public class LabyrinthService : MariesWonderland.Proto.Labyrinth.LabyrinthService.LabyrinthServiceBase +{ + /// Returns an empty response. Labyrinth season data not yet implemented. + public override Task UpdateSeasonData(UpdateSeasonDataRequest request, ServerCallContext context) + { + return Task.FromResult(new UpdateSeasonDataResponse()); + } + + /// Returns an empty response. Labyrinth stage clear rewards not yet implemented. + public override Task ReceiveStageClearReward(ReceiveStageClearRewardRequest request, ServerCallContext context) + { + return Task.FromResult(new ReceiveStageClearRewardResponse()); + } + + /// Returns an empty response. Labyrinth accumulation rewards not yet implemented. + public override Task ReceiveStageAccumulationReward(ReceiveStageAccumulationRewardRequest request, ServerCallContext context) + { + return Task.FromResult(new ReceiveStageAccumulationRewardResponse()); + } +} diff --git a/src/Services/LoginBonusService.cs b/src/Services/LoginBonusService.cs new file mode 100644 index 0000000..be1a14c --- /dev/null +++ b/src/Services/LoginBonusService.cs @@ -0,0 +1,72 @@ +using Google.Protobuf.WellKnownTypes; +using Grpc.Core; +using MariesWonderland.Data; +using MariesWonderland.Extensions; +using MariesWonderland.Models.Entities; +using MariesWonderland.Proto.LoginBonus; + +namespace MariesWonderland.Services; + +public class LoginBonusService(UserDataStore store, DarkMasterMemoryDatabase masterDb) + : MariesWonderland.Proto.LoginBonus.LoginbonusService.LoginbonusServiceBase +{ + private readonly UserDataStore _store = store; + private readonly DarkMasterMemoryDatabase _masterDb = masterDb; + + /// Claims the daily login stamp reward and delivers it to the player's gift inbox. + public override Task ReceiveStamp(Empty request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + + // Get or create login bonus tracker, defaulting to page 1 / stamp 0 + EntityIUserLoginBonus loginBonus = userDb.EntityIUserLoginBonus.FirstOrDefault(lb => lb.UserId == userId) + ?? AddEntity(userDb.EntityIUserLoginBonus, new EntityIUserLoginBonus + { + UserId = userId, + LoginBonusId = 1, + CurrentPageNumber = 1, + CurrentStampNumber = 0 + }); + + int nextStamp = loginBonus.CurrentStampNumber + 1; + + // Look up the reward for the next stamp from master data + EntityMLoginBonusStamp? stamp = _masterDb.EntityMLoginBonusStamp.FirstOrDefault(s => + s.LoginBonusId == loginBonus.LoginBonusId + && s.LowerPageNumber == loginBonus.CurrentPageNumber + && s.StampNumber == nextStamp); + + long nowMs = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(); + long expiryMs = nowMs + 30L * 24 * 60 * 60 * 1000; + + // Deliver the stamp reward as a gift with 30-day expiry + if (stamp is not null) + { + userDb.EntitySUserGift.Add(new EntitySUserGift + { + UserId = userId, + UserGiftUuid = $"login-bonus-{userId}-{nextStamp}", + PossessionType = (int)stamp.RewardPossessionType, + PossessionId = stamp.RewardPossessionId, + Count = stamp.RewardCount, + GrantDatetime = nowMs, + ExpirationDatetime = expiryMs, + ReceivedDatetime = 0 + }); + } + + loginBonus.CurrentStampNumber = nextStamp; + loginBonus.LatestRewardReceiveDatetime = nowMs; + + return Task.FromResult(new ReceiveStampResponse()); + } + + /// Adds an entity to a list and returns it, enabling inline initialization with null-coalescing. + private static T AddEntity(List list, T entity) + { + list.Add(entity); + return entity; + } +} + diff --git a/src/Services/MaterialService.cs b/src/Services/MaterialService.cs new file mode 100644 index 0000000..b550c1a --- /dev/null +++ b/src/Services/MaterialService.cs @@ -0,0 +1,99 @@ +using Grpc.Core; +using MariesWonderland.Data; +using MariesWonderland.Extensions; +using MariesWonderland.Models.Entities; +using MariesWonderland.Proto.Material; + +namespace MariesWonderland.Services; + +public class MaterialService(DarkMasterMemoryDatabase masterDb, UserDataStore store, GameConfig gameConfig) + : MariesWonderland.Proto.Material.MaterialService.MaterialServiceBase +{ + private readonly DarkMasterMemoryDatabase _masterDb = masterDb; + private readonly UserDataStore _store = store; + private readonly GameConfig _gameConfig = gameConfig; + + /// Sells materials for gold, removing depleted material entries from inventory. + public override Task Sell(SellRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + + int totalGold = 0; + + foreach (SellPossession item in request.MaterialPossession) + { + // Look up the material's sell price from master data + EntityMMaterial? mat = null; + foreach (EntityMMaterial m in _masterDb.EntityMMaterial) + { + if (m.MaterialId == item.MaterialId) + { + mat = m; + break; + } + } + + if (mat == null) + { + continue; + } + + EntityIUserMaterial? userMat = null; + foreach (EntityIUserMaterial um in userDb.EntityIUserMaterial) + { + if (um.MaterialId == item.MaterialId) + { + userMat = um; + break; + } + } + + if (userMat == null || userMat.Count < item.Count) + { + continue; + } + + userMat.Count -= item.Count; + + // If count reaches zero, remove the entry + if (userMat.Count <= 0) + { + userDb.EntityIUserMaterial.Remove(userMat); + } + + totalGold += mat.SellPrice * item.Count; + } + + // Credit the total gold earned to the user's consumable inventory + if (totalGold > 0) + { + EntityIUserConsumableItem? gold = null; + foreach (EntityIUserConsumableItem ci in userDb.EntityIUserConsumableItem) + { + if (ci.ConsumableItemId == _gameConfig.ConsumableItemIdForGold) + { + gold = ci; + break; + } + } + + if (gold != null) + { + gold.Count += totalGold; + } + else + { + userDb.EntityIUserConsumableItem.Add(new EntityIUserConsumableItem + { + UserId = userId, + ConsumableItemId = _gameConfig.ConsumableItemIdForGold, + Count = totalGold, + FirstAcquisitionDatetime = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds() + }); + } + } + + return Task.FromResult(new SellResponse()); + } +} diff --git a/src/Services/MissionService.cs b/src/Services/MissionService.cs new file mode 100644 index 0000000..8d49243 --- /dev/null +++ b/src/Services/MissionService.cs @@ -0,0 +1,39 @@ +using Grpc.Core; +using MariesWonderland.Data; +using MariesWonderland.Extensions; +using MariesWonderland.Proto.Mission; + +namespace MariesWonderland.Services; + +public class MissionService(UserDataStore store) + : MariesWonderland.Proto.Mission.MissionService.MissionServiceBase +{ + private readonly UserDataStore _store = store; + + /// Returns an empty response. Mission progress tracking not yet implemented. + public override Task UpdateMissionProgress(UpdateMissionProgressRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + _ = _store.GetOrCreate(userId); + + return Task.FromResult(new UpdateMissionProgressResponse()); + } + + /// Returns an empty response. Mission reward claiming not yet implemented. + public override Task ReceiveMissionRewardsById(ReceiveMissionRewardsByIdRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + _ = _store.GetOrCreate(userId); + + return Task.FromResult(new ReceiveMissionRewardsResponse()); + } + + /// Returns an empty response. Mission pass rewards not yet implemented. + public override Task ReceiveMissionPassRewards(ReceiveMissionPassRewardsRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + _ = _store.GetOrCreate(userId); + + return Task.FromResult(new ReceiveMissionPassRewardsResponse()); + } +} diff --git a/src/Services/MovieService.cs b/src/Services/MovieService.cs new file mode 100644 index 0000000..33eccb2 --- /dev/null +++ b/src/Services/MovieService.cs @@ -0,0 +1,35 @@ +using Grpc.Core; +using MariesWonderland.Data; +using MariesWonderland.Extensions; +using MariesWonderland.Models.Entities; +using MariesWonderland.Proto.Movie; + +namespace MariesWonderland.Services; + +public class MovieService(UserDataStore store) : MariesWonderland.Proto.Movie.MovieService.MovieServiceBase +{ + private readonly UserDataStore _store = store; + + /// Records one or more cutscenes as viewed, so the client can track which have been watched. + public override Task SaveViewedMovie(SaveViewedMovieRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + long nowMs = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(); + + foreach (int movieId in request.MovieId) + { + EntityIUserMovie? existing = userDb.EntityIUserMovie.FirstOrDefault(m => m.MovieId == movieId); + if (existing != null) + { + existing.LatestViewedDatetime = nowMs; + } + else + { + userDb.EntityIUserMovie.Add(new EntityIUserMovie { UserId = userId, MovieId = movieId, LatestViewedDatetime = nowMs }); + } + } + + return Task.FromResult(new SaveViewedMovieResponse()); + } +} diff --git a/src/Services/NaviCutInService.cs b/src/Services/NaviCutInService.cs new file mode 100644 index 0000000..d9f1c69 --- /dev/null +++ b/src/Services/NaviCutInService.cs @@ -0,0 +1,40 @@ +using Grpc.Core; +using MariesWonderland.Data; +using MariesWonderland.Extensions; +using MariesWonderland.Models.Entities; +using MariesWonderland.Proto.NaviCutIn; + +namespace MariesWonderland.Services; + +public class NaviCutInService(UserDataStore store) + : MariesWonderland.Proto.NaviCutIn.NavicutinService.NavicutinServiceBase +{ + private readonly UserDataStore _store = store; + + /// Records that a navi cut-in animation has been played, so the client won't show it again. + public override Task RegisterPlayed(RegisterPlayedRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + long nowMs = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(); + + EntityIUserNaviCutIn? record = userDb.EntityIUserNaviCutIn + .FirstOrDefault(n => n.NaviCutInId == request.NaviCutId); + + if (record is null) + { + userDb.EntityIUserNaviCutIn.Add(new EntityIUserNaviCutIn + { + UserId = userId, + NaviCutInId = request.NaviCutId, + PlayDatetime = nowMs + }); + } + else + { + record.PlayDatetime = nowMs; + } + + return Task.FromResult(new RegisterPlayedResponse()); + } +} diff --git a/src/Services/NotificationService.cs b/src/Services/NotificationService.cs new file mode 100644 index 0000000..9af013b --- /dev/null +++ b/src/Services/NotificationService.cs @@ -0,0 +1,28 @@ +using Google.Protobuf.WellKnownTypes; +using Grpc.Core; +using MariesWonderland.Data; +using MariesWonderland.Extensions; +using MariesWonderland.Proto.Notification; + +namespace MariesWonderland.Services; + +public class NotificationService(UserDataStore store) : MariesWonderland.Proto.Notification.NotificationService.NotificationServiceBase +{ + private readonly UserDataStore _store = store; + + /// Returns notification badge counts for the header bar (unclaimed gifts, friend requests, unread info). + public override Task GetHeaderNotification(Empty request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + + int giftNotReceiveCount = userDb.EntitySUserGift.Count(g => g.ReceivedDatetime == 0); + + return Task.FromResult(new GetHeaderNotificationResponse + { + GiftNotReceiveCount = giftNotReceiveCount, + FriendRequestReceiveCount = 0, + IsExistUnreadInformation = false + }); + } +} diff --git a/src/Services/OmikujiService.cs b/src/Services/OmikujiService.cs new file mode 100644 index 0000000..0e97be2 --- /dev/null +++ b/src/Services/OmikujiService.cs @@ -0,0 +1,37 @@ +using Grpc.Core; +using MariesWonderland.Data; +using MariesWonderland.Extensions; +using MariesWonderland.Models.Entities; +using MariesWonderland.Proto.Omikuji; + +namespace MariesWonderland.Services; + +public class OmikujiService(UserDataStore store, DarkMasterMemoryDatabase masterDb) : MariesWonderland.Proto.Omikuji.OmikujiService.OmikujiServiceBase +{ + private readonly UserDataStore _store = store; + private readonly DarkMasterMemoryDatabase _masterDb = masterDb; + + /// Draws a fortune (omikuji), records the draw timestamp, and returns the result asset ID. + public override Task OmikujiDraw(OmikujiDrawRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + long nowMs = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(); + + int omikujiId = request.OmikujiId; + + EntityIUserOmikuji? existing = userDb.EntityIUserOmikuji.FirstOrDefault(o => o.OmikujiId == omikujiId); + if (existing != null) + { + existing.LatestDrawDatetime = nowMs; + } + else + { + userDb.EntityIUserOmikuji.Add(new EntityIUserOmikuji { UserId = userId, OmikujiId = omikujiId, LatestDrawDatetime = nowMs }); + } + + EntityMOmikuji? masterOmikuji = _masterDb.EntityMOmikuji.FirstOrDefault(o => o.OmikujiId == omikujiId); + OmikujiDrawResponse response = new() { OmikujiResultAssetId = masterOmikuji?.OmikujiAssetId ?? 0 }; + return Task.FromResult(response); + } +} diff --git a/src/Services/PartsService.cs b/src/Services/PartsService.cs new file mode 100644 index 0000000..a8c880f --- /dev/null +++ b/src/Services/PartsService.cs @@ -0,0 +1,571 @@ +using Grpc.Core; +using MariesWonderland.Data; +using MariesWonderland.Extensions; +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; +using MariesWonderland.Proto.Parts; + +namespace MariesWonderland.Services; + +public class PartsService(DarkMasterMemoryDatabase masterDb, UserDataStore store, GameConfig gameConfig) + : MariesWonderland.Proto.Parts.PartsService.PartsServiceBase +{ + private const int PartsMaxLevel = 15; + + private readonly DarkMasterMemoryDatabase _masterDb = masterDb; + private readonly UserDataStore _store = store; + private readonly GameConfig _gameConfig = gameConfig; + + /// + /// Sells one or more parts from the player's inventory, awarding gold based on each part's rarity and level. + /// Protected parts are silently skipped. + /// + public override Task Sell(SellRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + + int totalGold = 0; + + foreach (string uuid in request.UserPartsUuid) + { + EntityIUserParts? part = null; + foreach (EntityIUserParts p in userDb.EntityIUserParts) + { + if (p.UserPartsUuid == uuid) + { + part = p; + break; + } + } + + // Skip unknown or protected parts + if (part == null || part.IsProtected) + { + continue; + } + + EntityMParts? partDef = null; + foreach (EntityMParts pd in _masterDb.EntityMParts) + { + if (pd.PartsId == part.PartsId) + { + partDef = pd; + break; + } + } + + if (partDef == null) + { + continue; + } + + // Look up sell price based on rarity + EntityMPartsRarity? rarityRow = null; + foreach (EntityMPartsRarity r in _masterDb.EntityMPartsRarity) + { + if (r.RarityType == partDef.RarityType) + { + rarityRow = r; + break; + } + } + + if (rarityRow != null) + { + int gold = EvaluateNumericalFunction(rarityRow.SellPriceNumericalFunctionId, part.Level); + totalGold += gold; + } + + userDb.EntityIUserParts.Remove(part); + } + + // Award total gold earned from the sale + if (totalGold > 0) + { + AddGold(userDb, userId, totalGold); + } + + return Task.FromResult(new SellResponse()); + } + + /// + /// Marks the specified parts as protected, preventing them from being accidentally sold. + /// + public override Task Protect(ProtectRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + + foreach (string uuid in request.UserPartsUuid) + { + foreach (EntityIUserParts p in userDb.EntityIUserParts) + { + if (p.UserPartsUuid == uuid) + { + p.IsProtected = true; + break; + } + } + } + + return Task.FromResult(new ProtectResponse()); + } + + /// + /// Removes the protection flag from the specified parts, allowing them to be sold. + /// + public override Task Unprotect(UnprotectRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + + foreach (string uuid in request.UserPartsUuid) + { + foreach (EntityIUserParts p in userDb.EntityIUserParts) + { + if (p.UserPartsUuid == uuid) + { + p.IsProtected = false; + break; + } + } + } + + return Task.FromResult(new UnprotectResponse()); + } + + /// + /// Attempts to enhance a part by one level, deducting gold and performing a probability-based success roll. + /// Returns whether the level-up succeeded. Enhancement fails immediately if the part is at max level or gold is insufficient. + /// + public override Task Enhance(EnhanceRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + + EntityIUserParts? part = null; + foreach (EntityIUserParts p in userDb.EntityIUserParts) + { + if (p.UserPartsUuid == request.UserPartsUuid) + { + part = p; + break; + } + } + + // Reject if part not found or already at max level + if (part == null || part.Level >= PartsMaxLevel) + { + return Task.FromResult(new EnhanceResponse { IsSuccess = false }); + } + + EntityMParts? partDef = null; + foreach (EntityMParts pd in _masterDb.EntityMParts) + { + if (pd.PartsId == part.PartsId) + { + partDef = pd; + break; + } + } + + if (partDef == null) + { + return Task.FromResult(new EnhanceResponse { IsSuccess = false }); + } + + EntityMPartsRarity? rarityRow = null; + foreach (EntityMPartsRarity r in _masterDb.EntityMPartsRarity) + { + if (r.RarityType == partDef.RarityType) + { + rarityRow = r; + break; + } + } + + if (rarityRow == null) + { + return Task.FromResult(new EnhanceResponse { IsSuccess = false }); + } + + // Look up gold cost from price group + int goldCost = LookupPartsLevelUpPrice(rarityRow.PartsLevelUpPriceGroupId, part.Level); + + EntityIUserConsumableItem? gold = FindConsumableItem(userDb, _gameConfig.ConsumableItemIdForGold); + if (gold == null || gold.Count < goldCost) + { + return Task.FromResult(new EnhanceResponse { IsSuccess = false }); + } + + // Deduct gold before rolling — cost applies even on failure + gold.Count -= goldCost; + + // Look up success rate + int successRate = LookupPartsLevelUpRate(rarityRow.PartsLevelUpRateGroupId, part.Level); + + // Roll for enhancement success (permil) + bool isSuccess = Random.Shared.Next(1000) < successRate; + if (isSuccess) + { + part.Level++; + } + + return Task.FromResult(new EnhanceResponse { IsSuccess = isSuccess }); + } + + /// + /// Sets the display name of a parts preset if it exists. + /// + public override Task UpdatePresetName(UpdatePresetNameRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + + EntityIUserPartsPreset? preset = null; + foreach (EntityIUserPartsPreset p in userDb.EntityIUserPartsPreset) + { + if (p.UserPartsPresetNumber == request.UserPartsPresetNumber) + { + preset = p; + break; + } + } + + if (preset != null) + { + preset.Name = request.Name; + } + + return Task.FromResult(new UpdatePresetNameResponse()); + } + + /// + /// Assigns a tag number to a parts preset if it exists. + /// + public override Task UpdatePresetTagNumber(UpdatePresetTagNumberRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + + EntityIUserPartsPreset? preset = null; + foreach (EntityIUserPartsPreset p in userDb.EntityIUserPartsPreset) + { + if (p.UserPartsPresetNumber == request.UserPartsPresetNumber) + { + preset = p; + break; + } + } + + if (preset != null) + { + preset.UserPartsPresetTagNumber = request.UserPartsPresetTagNumber; + } + + return Task.FromResult(new UpdatePresetTagNumberResponse()); + } + + /// + /// Sets the display name of a preset tag if it exists. + /// + public override Task UpdatePresetTagName(UpdatePresetTagNameRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + + EntityIUserPartsPresetTag? tag = null; + foreach (EntityIUserPartsPresetTag t in userDb.EntityIUserPartsPresetTag) + { + if (t.UserPartsPresetTagNumber == request.UserPartsPresetTagNumber) + { + tag = t; + break; + } + } + + if (tag != null) + { + tag.Name = request.Name; + } + + return Task.FromResult(new UpdatePresetTagNameResponse()); + } + + /// + /// Overwrites the three parts slots of a preset with the specified part UUIDs, creating the preset if needed. + /// + public override Task ReplacePreset(ReplacePresetRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + + EntityIUserPartsPreset? preset = null; + foreach (EntityIUserPartsPreset p in userDb.EntityIUserPartsPreset) + { + if (p.UserPartsPresetNumber == request.UserPartsPresetNumber) + { + preset = p; + break; + } + } + + if (preset != null) + { + preset.UserPartsUuid01 = request.UserPartsUuid01; + preset.UserPartsUuid02 = request.UserPartsUuid02; + preset.UserPartsUuid03 = request.UserPartsUuid03; + } + else + { + userDb.EntityIUserPartsPreset.Add(new EntityIUserPartsPreset + { + UserId = userId, + UserPartsPresetNumber = request.UserPartsPresetNumber, + UserPartsUuid01 = request.UserPartsUuid01, + UserPartsUuid02 = request.UserPartsUuid02, + UserPartsUuid03 = request.UserPartsUuid03, + Name = string.Empty + }); + } + + return Task.FromResult(new ReplacePresetResponse()); + } + + /// + /// Copies the three parts slots from one preset to another, creating the destination preset if it does not yet exist. + /// The source preset must exist; if it doesn't, no changes are made. + /// + public override Task CopyPreset(CopyPresetRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + + // Find both source and destination presets in a single pass + EntityIUserPartsPreset? from = null; + EntityIUserPartsPreset? to = null; + foreach (EntityIUserPartsPreset p in userDb.EntityIUserPartsPreset) + { + if (p.UserPartsPresetNumber == request.FromUserPartsPresetNumber) + { + from = p; + } + if (p.UserPartsPresetNumber == request.ToUserPartsPresetNumber) + { + to = p; + } + } + + if (from != null) + { + if (to != null) + { + to.UserPartsUuid01 = from.UserPartsUuid01; + to.UserPartsUuid02 = from.UserPartsUuid02; + to.UserPartsUuid03 = from.UserPartsUuid03; + } + else + { + userDb.EntityIUserPartsPreset.Add(new EntityIUserPartsPreset + { + UserId = userId, + UserPartsPresetNumber = request.ToUserPartsPresetNumber, + UserPartsUuid01 = from.UserPartsUuid01, + UserPartsUuid02 = from.UserPartsUuid02, + UserPartsUuid03 = from.UserPartsUuid03, + Name = string.Empty + }); + } + } + + return Task.FromResult(new CopyPresetResponse()); + } + + /// + /// Clears all three parts slots in a preset, emptying the loadout without deleting the preset record. + /// + public override Task RemovePreset(RemovePresetRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + + EntityIUserPartsPreset? preset = null; + foreach (EntityIUserPartsPreset p in userDb.EntityIUserPartsPreset) + { + if (p.UserPartsPresetNumber == request.UserPartsPresetNumber) + { + preset = p; + break; + } + } + + if (preset != null) + { + preset.UserPartsUuid01 = string.Empty; + preset.UserPartsUuid02 = string.Empty; + preset.UserPartsUuid03 = string.Empty; + } + + return Task.FromResult(new RemovePresetResponse()); + } + + /// + /// Returns the gold cost to enhance a part at the given level, using the rarity's price group. + /// Selects the row with the highest LevelLowerLimit that does not exceed the current level. + /// + private int LookupPartsLevelUpPrice(int priceGroupId, int level) + { + int price = 0; + foreach (EntityMPartsLevelUpPriceGroup row in _masterDb.EntityMPartsLevelUpPriceGroup) + { + if (row.PartsLevelUpPriceGroupId == priceGroupId && row.LevelLowerLimit <= level) + { + if (row.LevelLowerLimit >= (price > 0 ? price : 0)) + { + price = row.Gold; + } + } + } + return price; + } + + /// + /// Returns the enhancement success rate (permil) for a part at the given level, using the rarity's rate group. + /// Defaults to 1000 (100%) when no matching row is found. + /// + private int LookupPartsLevelUpRate(int rateGroupId, int level) + { + int rate = 1000; // Default 100% success + int bestLowerLimit = -1; + foreach (EntityMPartsLevelUpRateGroup row in _masterDb.EntityMPartsLevelUpRateGroup) + { + if (row.PartsLevelUpRateGroupId == rateGroupId && row.LevelLowerLimit <= level && row.LevelLowerLimit > bestLowerLimit) + { + bestLowerLimit = row.LevelLowerLimit; + rate = row.SuccessRatePermil; + } + } + return rate; + } + + /// + /// Credits gold to the user's consumable inventory, creating the inventory entry if one does not yet exist. + /// + private void AddGold(DarkUserMemoryDatabase userDb, long userId, int amount) + { + EntityIUserConsumableItem? gold = null; + foreach (EntityIUserConsumableItem ci in userDb.EntityIUserConsumableItem) + { + if (ci.ConsumableItemId == _gameConfig.ConsumableItemIdForGold) + { + gold = ci; + break; + } + } + + if (gold != null) + { + gold.Count += amount; + } + else + { + userDb.EntityIUserConsumableItem.Add(new EntityIUserConsumableItem + { + UserId = userId, + ConsumableItemId = _gameConfig.ConsumableItemIdForGold, + Count = amount, + FirstAcquisitionDatetime = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds() + }); + } + } + + /// + /// Returns the user's consumable item record for the given item ID, or if not found. + /// + private static EntityIUserConsumableItem? FindConsumableItem(DarkUserMemoryDatabase userDb, int itemId) + { + foreach (EntityIUserConsumableItem ci in userDb.EntityIUserConsumableItem) + { + if (ci.ConsumableItemId == itemId) + { + return ci; + } + } + return null; + } + + /// + /// Evaluates a master data numerical function against an input value (e.g., computes sell price for a given part level). + /// Returns 0 if the function definition is not found or the formula type is unrecognised. + /// + private int EvaluateNumericalFunction(int functionId, int value) + { + EntityMNumericalFunction? func = null; + foreach (EntityMNumericalFunction f in _masterDb.EntityMNumericalFunction) + { + if (f.NumericalFunctionId == functionId) + { + func = f; + break; + } + } + + if (func == null) + { + return 0; + } + + // Collect and sort parameters by index + List<(int Index, int Value)> paramEntries = []; + foreach (EntityMNumericalFunctionParameterGroup pg in _masterDb.EntityMNumericalFunctionParameterGroup) + { + if (pg.NumericalFunctionParameterGroupId == func.NumericalFunctionParameterGroupId) + { + paramEntries.Add((pg.ParameterIndex, pg.ParameterValue)); + } + } + paramEntries.Sort((a, b) => a.Index.CompareTo(b.Index)); + + int[] p = new int[paramEntries.Count]; + for (int i = 0; i < paramEntries.Count; i++) + { + p[i] = paramEntries[i].Value; + } + + // Dispatch to the appropriate formula type + return func.NumericalFunctionType switch + { + NumericalFunctionType.LINEAR when p.Length >= 2 => p[1] + p[0] * value, + NumericalFunctionType.MONOMIAL when p.Length >= 2 => EvaluateMonomial(p, value), + NumericalFunctionType.LINEAR_PERMIL when p.Length >= 2 => p[0] * value / 1000 + p[1], + NumericalFunctionType.POLYNOMIAL_THIRD when p.Length >= 4 => p[3] + (p[2] + (p[1] + p[0] * value) * value) * value, + NumericalFunctionType.POLYNOMIAL_THIRD_PERMIL when p.Length >= 4 => + p[0] * value * value * value / 1000 + + p[1] * value * value / 1000 + + p[2] * value / 1000 + + p[3], + _ => 0 + }; + } + + /// + /// Computes p[0] * (value - 1)^p[1] using iterative multiplication. + /// + private static int EvaluateMonomial(int[] p, int value) + { + int v = value - 1; + int result = v; + int counter = p[1]; + if (counter > 1) + { + counter--; + while (counter > 0) + { + counter--; + result *= v; + } + } + return result * p[0]; + } +} diff --git a/src/Services/PortalCageService.cs b/src/Services/PortalCageService.cs new file mode 100644 index 0000000..4b6344b --- /dev/null +++ b/src/Services/PortalCageService.cs @@ -0,0 +1,43 @@ +using Google.Protobuf.WellKnownTypes; +using Grpc.Core; +using MariesWonderland.Data; +using MariesWonderland.Extensions; +using MariesWonderland.Models.Entities; +using MariesWonderland.Proto.PortalCage; + +namespace MariesWonderland.Services; + +public class PortalCageService(UserDataStore store) + : MariesWonderland.Proto.PortalCage.PortalcageService.PortalcageServiceBase +{ + private readonly UserDataStore _store = store; + + /// Marks the portal cage scene as in-progress for the current user. + public override Task UpdatePortalCageSceneProgress(UpdatePortalCageSceneProgressRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + + EntityIUserPortalCageStatus? status = userDb.EntityIUserPortalCageStatus + .FirstOrDefault(s => s.UserId == userId); + + if (status is null) + { + status = new EntityIUserPortalCageStatus { UserId = userId }; + userDb.EntityIUserPortalCageStatus.Add(status); + } + + status.IsCurrentProgress = true; + + return Task.FromResult(new UpdatePortalCageSceneProgressResponse()); + } + + /// Returns an empty response. Portal cage drop items not yet implemented. + public override Task GetDropItem(Empty request, ServerCallContext context) + { + long userId = context.GetUserId(); + _ = _store.GetOrCreate(userId); + + return Task.FromResult(new GetDropItemResponse()); + } +} diff --git a/src/Services/PvpService.cs b/src/Services/PvpService.cs new file mode 100644 index 0000000..5cefb15 --- /dev/null +++ b/src/Services/PvpService.cs @@ -0,0 +1,62 @@ +using Google.Protobuf.WellKnownTypes; +using Grpc.Core; +using MariesWonderland.Proto.Pvp; + +namespace MariesWonderland.Services; + +public class PvpService : MariesWonderland.Proto.Pvp.PvpService.PvpServiceBase +{ + /// Returns an empty response. PvP top screen not yet implemented. + public override Task GetTopData(Empty request, ServerCallContext context) + { + return Task.FromResult(new GetTopDataResponse()); + } + + /// Returns an empty response. PvP matchmaking not yet implemented. + public override Task GetMatchingList(Empty request, ServerCallContext context) + { + return Task.FromResult(new GetMatchingListResponse()); + } + + /// Returns an empty response. PvP matchmaking not yet implemented. + public override Task UpdateMatchingList(Empty request, ServerCallContext context) + { + return Task.FromResult(new UpdateMatchingListResponse()); + } + + /// Returns an empty response. PvP battles not yet implemented. + public override Task StartBattle(StartBattleRequest request, ServerCallContext context) + { + return Task.FromResult(new StartBattleResponse()); + } + + /// Returns an empty response. PvP battles not yet implemented. + public override Task FinishBattle(FinishBattleRequest request, ServerCallContext context) + { + return Task.FromResult(new FinishBattleResponse()); + } + + /// Returns an empty response. PvP rankings not yet implemented. + public override Task GetRanking(GetRankingRequest request, ServerCallContext context) + { + return Task.FromResult(new GetRankingResponse()); + } + + /// Returns an empty response. PvP season results not yet implemented. + public override Task GetSeasonResult(Empty request, ServerCallContext context) + { + return Task.FromResult(new GetSeasonResultResponse()); + } + + /// Returns an empty response. PvP attack logs not yet implemented. + public override Task GetAttackLogList(Empty request, ServerCallContext context) + { + return Task.FromResult(new GetAttackLogListResponse()); + } + + /// Returns an empty response. PvP defense logs not yet implemented. + public override Task GetDefenseLogList(Empty request, ServerCallContext context) + { + return Task.FromResult(new GetDefenseLogListResponse()); + } +} diff --git a/src/Services/QuestService.cs b/src/Services/QuestService.cs new file mode 100644 index 0000000..95d87bc --- /dev/null +++ b/src/Services/QuestService.cs @@ -0,0 +1,1596 @@ +using Google.Protobuf.WellKnownTypes; +using Grpc.Core; +using MariesWonderland.Data; +using MariesWonderland.Extensions; +using MariesWonderland.Helpers; +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; +using MariesWonderland.Proto.Quest; + +namespace MariesWonderland.Services; + +public class QuestService(UserDataStore store, DarkMasterMemoryDatabase masterDb) : MariesWonderland.Proto.Quest.QuestService.QuestServiceBase +{ + private readonly UserDataStore _store = store; + private readonly DarkMasterMemoryDatabase _masterDb = masterDb; + + /// Advances the main story flow to the specified quest scene and updates route/progress tracking. + public override Task UpdateMainFlowSceneProgress(UpdateMainFlowSceneProgressRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + + int questSceneId = request.QuestSceneId; + long nowMs = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(); + + // Resolve quest ID from the scene, then walk the master data chain to find the route: + // QuestScene -> MainQuestSequence (by QuestId) -> MainQuestSequenceGroup (by MainQuestSequenceId) + // -> MainQuestChapter (by MainQuestSequenceGroupId) -> MainQuestRouteId + EntityMQuestScene? scene = _masterDb.EntityMQuestScene.FirstOrDefault(s => s.QuestSceneId == questSceneId); + int routeId = 0; + if (scene != null) + { + EntityMMainQuestSequence? sequence = _masterDb.EntityMMainQuestSequence.FirstOrDefault(s => s.QuestId == scene.QuestId); + if (sequence != null) + { + EntityMMainQuestSequenceGroup? sequenceGroup = _masterDb.EntityMMainQuestSequenceGroup.FirstOrDefault(g => g.MainQuestSequenceId == sequence.MainQuestSequenceId); + if (sequenceGroup != null) + { + EntityMMainQuestChapter? chapter = _masterDb.EntityMMainQuestChapter.FirstOrDefault(c => c.MainQuestSequenceGroupId == sequenceGroup.MainQuestSequenceGroupId); + routeId = chapter?.MainQuestRouteId ?? 0; + } + } + } + + // Update flow status to indicate the player is in the main story flow + EntityIUserMainQuestFlowStatus flowStatus = userDb.EntityIUserMainQuestFlowStatus.GetOrCreate(userId); + flowStatus.CurrentQuestFlowType = QuestFlowType.MAIN_FLOW; + + // Advance the main flow scene position and track the furthest scene reached + EntityIUserMainQuestMainFlowStatus mainFlowStatus = userDb.EntityIUserMainQuestMainFlowStatus.GetOrCreate(userId); + mainFlowStatus.CurrentQuestSceneId = questSceneId; + if (IsSceneAhead(questSceneId, mainFlowStatus.HeadQuestSceneId)) + mainFlowStatus.HeadQuestSceneId = questSceneId; + if (routeId != 0) mainFlowStatus.CurrentMainQuestRouteId = routeId; + if (scene != null) + mainFlowStatus.IsReachedLastQuestScene = questSceneId == GetChapterLastSceneId(scene.QuestId); + + // Clear side story active progress if the user was in a side story + EntityIUserSideStoryQuestSceneProgressStatus sideStoryProgress = userDb.EntityIUserSideStoryQuestSceneProgressStatus.GetOrCreate(userId); + if (sideStoryProgress.CurrentSideStoryQuestId != 0) + { + sideStoryProgress.CurrentSideStoryQuestId = 0; + sideStoryProgress.CurrentSideStoryQuestSceneId = 0; + } + + EntityIUserPortalCageStatus portalCageStatus = userDb.EntityIUserPortalCageStatus.GetOrCreate(userId); + portalCageStatus.IsCurrentProgress = false; + + ApplySceneGrants(userDb, questSceneId, userId); + + return Task.FromResult(new UpdateMainFlowSceneProgressResponse()); + } + + /// Advances the replay flow to the specified quest scene. + public override Task UpdateReplayFlowSceneProgress(UpdateReplayFlowSceneProgressRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + + int questSceneId = request.QuestSceneId; + + EntityIUserMainQuestReplayFlowStatus replayFlowStatus = userDb.EntityIUserMainQuestReplayFlowStatus.GetOrCreate(userId); + replayFlowStatus.CurrentQuestSceneId = questSceneId; + if (IsSceneAhead(questSceneId, replayFlowStatus.CurrentHeadQuestSceneId)) + replayFlowStatus.CurrentHeadQuestSceneId = questSceneId; + + return Task.FromResult(new UpdateReplayFlowSceneProgressResponse()); + } + + /// Advances sub-flow (playable quest) scene progress or main-flow (cutscene) position. + public override Task UpdateMainQuestSceneProgress(UpdateMainQuestSceneProgressRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + + int questSceneId = request.QuestSceneId; + + EntityMQuestScene? scene = _masterDb.EntityMQuestScene.FirstOrDefault(s => s.QuestSceneId == questSceneId); + EntityMQuest? quest = scene != null ? _masterDb.EntityMQuest.FirstOrDefault(q => q.QuestId == scene.QuestId) : null; + + EntityIUserMainQuestMainFlowStatus mainFlowStatus = userDb.EntityIUserMainQuestMainFlowStatus.GetOrCreate(userId); + + bool isPlayable = quest != null && !quest.IsRunInTheBackground && quest.IsCountedAsQuest; + if (isPlayable) + { + long nowMs = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(); + + // On half-result scenes, auto-clear all quest missions before the battle phase ends + if (scene!.QuestResultType == QuestResultType.HALF_RESULT && quest!.QuestMissionGroupId != 0) + { + foreach (EntityMQuestMissionGroup missionGroupRow in _masterDb.EntityMQuestMissionGroup + .Where(m => m.QuestMissionGroupId == quest.QuestMissionGroupId)) + { + EntityIUserQuestMission userMission = userDb.EntityIUserQuestMission.GetOrCreate( + m => m.QuestId == scene.QuestId && m.QuestMissionId == missionGroupRow.QuestMissionId, + () => new EntityIUserQuestMission { UserId = userId, QuestId = scene.QuestId, QuestMissionId = missionGroupRow.QuestMissionId }); + userMission.IsClear = true; + userMission.ProgressValue = 1; + userMission.LatestClearDatetime = nowMs; + } + } + + EntityIUserMainQuestFlowStatus flowStatus = userDb.EntityIUserMainQuestFlowStatus.GetOrCreate(userId); + flowStatus.CurrentQuestFlowType = QuestFlowType.SUB_FLOW; + + EntityIUserMainQuestProgressStatus progressStatus = userDb.EntityIUserMainQuestProgressStatus.GetOrCreate(userId); + progressStatus.CurrentQuestSceneId = questSceneId; + if (IsSceneAhead(questSceneId, progressStatus.HeadQuestSceneId)) + progressStatus.HeadQuestSceneId = questSceneId; + progressStatus.CurrentQuestFlowType = QuestFlowType.SUB_FLOW; + } + else if (scene != null) + { + // Non-playable quests (background, cutscene, etc.) update the main flow scene position + mainFlowStatus.CurrentQuestSceneId = questSceneId; + if (IsSceneAhead(questSceneId, mainFlowStatus.HeadQuestSceneId)) + mainFlowStatus.HeadQuestSceneId = questSceneId; + mainFlowStatus.IsReachedLastQuestScene = questSceneId == GetChapterLastSceneId(scene.QuestId); + } + + UpdateMainQuestSceneProgressResponse response = new(); + return Task.FromResult(response); + } + + /// Advances extra quest scene progress and applies scene-based grants. + public override Task UpdateExtraQuestSceneProgress(UpdateExtraQuestSceneProgressRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + + int questSceneId = request.QuestSceneId; + long nowMs = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(); + + EntityIUserExtraQuestProgressStatus progressStatus = userDb.EntityIUserExtraQuestProgressStatus.GetOrCreate(userId); + progressStatus.CurrentQuestSceneId = questSceneId; + if (IsSceneAhead(questSceneId, progressStatus.HeadQuestSceneId)) + progressStatus.HeadQuestSceneId = questSceneId; + + ApplySceneGrants(userDb, questSceneId, userId); + + EntityMQuestScene? scene = _masterDb.EntityMQuestScene.FirstOrDefault(s => s.QuestSceneId == questSceneId); + if (scene != null && scene.QuestResultType == QuestResultType.HALF_RESULT) + { + ClearQuestMissions(userDb, scene.QuestId, userId, nowMs); + } + + return Task.FromResult(new UpdateExtraQuestSceneProgressResponse()); + } + + /// Advances event quest scene progress. + public override Task UpdateEventQuestSceneProgress(UpdateEventQuestSceneProgressRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + + int questSceneId = request.QuestSceneId; + long nowMs = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(); + + EntityIUserEventQuestProgressStatus progressStatus = userDb.EntityIUserEventQuestProgressStatus.GetOrCreate(userId); + progressStatus.CurrentQuestSceneId = questSceneId; + if (IsSceneAhead(questSceneId, progressStatus.HeadQuestSceneId)) + progressStatus.HeadQuestSceneId = questSceneId; + + ApplySceneGrants(userDb, questSceneId, userId); + + EntityMQuestScene? scene = _masterDb.EntityMQuestScene.FirstOrDefault(s => s.QuestSceneId == questSceneId); + if (scene != null && scene.QuestResultType == QuestResultType.HALF_RESULT) + { + ClearQuestMissions(userDb, scene.QuestId, userId, nowMs); + } + + return Task.FromResult(new UpdateEventQuestSceneProgressResponse()); + } + + /// Initializes a main quest: creates quest/mission records, sets flow statuses, and returns battle drop rewards. + public override Task StartMainQuest(StartMainQuestRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + + long nowMs = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(); + int questId = request.QuestId; + + EntityMQuest? quest = _masterDb.EntityMQuest.FirstOrDefault(q => q.QuestId == questId); + + // Ensure user quest and mission rows exist before any state transitions. + EntityIUserQuest userQuest = userDb.EntityIUserQuest.GetOrCreate( + q => q.QuestId == questId, + () => new EntityIUserQuest { UserId = userId, QuestId = questId }); + + if (quest != null && quest.QuestMissionGroupId != 0) + { + List missionIds = [.. _masterDb.EntityMQuestMissionGroup + .Where(g => g.QuestMissionGroupId == quest.QuestMissionGroupId) + .Select(g => g.QuestMissionId)]; + + foreach (int missionId in missionIds) + { + if (!userDb.EntityIUserQuestMission.Any(m => m.QuestId == questId && m.QuestMissionId == missionId)) + userDb.EntityIUserQuestMission.Add(new EntityIUserQuestMission { UserId = userId, QuestId = questId, QuestMissionId = missionId }); + } + } + + // Already-cleared quests: handle replay flow or early-return. + if (userQuest.QuestStateType == (int)QuestStateType.CLEARED) + { + if (request.IsReplayFlow) + { + EntityIUserMainQuestFlowStatus replayFlow = userDb.EntityIUserMainQuestFlowStatus.GetOrCreate(userId); + replayFlow.CurrentQuestFlowType = QuestFlowType.REPLAY_FLOW; + + EntityIUserMainQuestReplayFlowStatus replayFlowStatus = userDb.EntityIUserMainQuestReplayFlowStatus.GetOrCreate(userId); + replayFlowStatus.CurrentQuestSceneId = 0; + replayFlowStatus.CurrentHeadQuestSceneId = 0; + + userQuest.QuestStateType = (int)QuestStateType.ACTIVE; + userQuest.LatestStartDatetime = nowMs; + userQuest.IsBattleOnly = request.IsBattleOnly; + + EntitySQuestSession replaySession = userDb.EntitySQuestSession.GetOrCreate( + s => s.QuestId == questId, + () => new EntitySQuestSession { UserId = userId, QuestId = questId }); + replaySession.UserDeckNumber = request.UserDeckNumber; + } + + StartMainQuestResponse earlyResponse = new(); + earlyResponse.BattleDropReward.AddRange(BuildBattleDropRewards(questId)); + return Task.FromResult(earlyResponse); + } + + userQuest.IsBattleOnly = request.IsBattleOnly; + + EntitySQuestSession startSession = userDb.EntitySQuestSession.GetOrCreate( + s => s.QuestId == questId, + () => new EntitySQuestSession { UserId = userId, QuestId = questId }); + startSession.UserDeckNumber = request.UserDeckNumber; + + bool isPlayable = quest != null && !quest.IsRunInTheBackground && quest.IsCountedAsQuest; + if (isPlayable) + { + EntityIUserMainQuestFlowStatus flowStatus = userDb.EntityIUserMainQuestFlowStatus.GetOrCreate(userId); + flowStatus.CurrentQuestFlowType = QuestFlowType.MAIN_FLOW; + + userQuest.QuestStateType = (int)QuestStateType.ACTIVE; + userQuest.LatestStartDatetime = nowMs; + + // Ensure ProgressStatus singleton exists so it always appears in the DiffInterceptor delta. + EntityIUserMainQuestProgressStatus progressStatus = userDb.EntityIUserMainQuestProgressStatus.GetOrCreate(userId); + + // For battle-only quests the client skips UpdateMainQuestSceneProgress, so ProgressStatus + // would never have the battle scene set. Explicitly set it here. + if (request.IsBattleOnly) + { + EntityMQuestScene? battleScene = _masterDb.EntityMQuestScene.FirstOrDefault(s => s.QuestId == questId && s.IsBattleOnlyTarget); + if (battleScene != null) + { + progressStatus.CurrentQuestSceneId = battleScene.QuestSceneId; + progressStatus.HeadQuestSceneId = Math.Max(progressStatus.HeadQuestSceneId, battleScene.QuestSceneId); + progressStatus.CurrentQuestFlowType = QuestFlowType.SUB_FLOW; + } + } + + // Ensure ReplayFlowStatus singleton exists so it is always included in the delta. + EntityIUserMainQuestReplayFlowStatus replayFlowStatus = userDb.EntityIUserMainQuestReplayFlowStatus.GetOrCreate(userId); + + // Ensure MainFlowStatus singleton exists and always appears in the delta, even when unchanged. + EntityIUserMainQuestMainFlowStatus mainFlowStatus = userDb.EntityIUserMainQuestMainFlowStatus.GetOrCreate(userId); + + // Ensure SeasonRoute singleton exists (season 1 is the default for all new users). + if (!userDb.EntityIUserMainQuestSeasonRoute.Any(r => r.UserId == userId)) + userDb.EntityIUserMainQuestSeasonRoute.AddNew(new EntityIUserMainQuestSeasonRoute { UserId = userId, MainQuestSeasonId = 1, MainQuestRouteId = 1 }); + } + else + { + // Background quests (cutscenes, non-combat) — auto-clear immediately. + userQuest.QuestStateType = (int)QuestStateType.CLEARED; + userQuest.ClearCount++; + userQuest.DailyClearCount++; + userQuest.LastClearDatetime = nowMs; + + // Set scene IDs from the first scene of this quest + EntityMQuestScene? firstScene = _masterDb.EntityMQuestScene + .Where(s => s.QuestId == questId) + .OrderBy(s => s.SortOrder) + .FirstOrDefault(); + if (firstScene != null) + { + EntityIUserMainQuestMainFlowStatus mainFlowStatus = userDb.EntityIUserMainQuestMainFlowStatus.GetOrCreate(userId); + mainFlowStatus.CurrentQuestSceneId = firstScene.QuestSceneId; + if (IsSceneAhead(firstScene.QuestSceneId, mainFlowStatus.HeadQuestSceneId)) + mainFlowStatus.HeadQuestSceneId = firstScene.QuestSceneId; + + EntityIUserMainQuestFlowStatus flowStatus = userDb.EntityIUserMainQuestFlowStatus.GetOrCreate(userId); + flowStatus.CurrentQuestFlowType = QuestFlowType.MAIN_FLOW; + + mainFlowStatus.IsReachedLastQuestScene = firstScene.QuestSceneId == GetChapterLastSceneId(questId); + } + } + + StartMainQuestResponse response = new(); + response.BattleDropReward.AddRange(BuildBattleDropRewards(questId)); + return Task.FromResult(response); + } + + /// Restarts a main quest: resets flow to MAIN_FLOW, clears mission progress, and returns battle drop rewards. + public override Task RestartMainQuest(RestartMainQuestRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + + long nowMs = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(); + int questId = request.QuestId; + + EntityIUserQuest userQuest = userDb.EntityIUserQuest.GetOrCreate( + q => q.QuestId == questId, + () => new EntityIUserQuest { UserId = userId, QuestId = questId }); + + userQuest.QuestStateType = (int)QuestStateType.ACTIVE; + userQuest.IsBattleOnly = false; + userQuest.LatestStartDatetime = nowMs; + + EntitySQuestSession restartSession = userDb.EntitySQuestSession.GetOrCreate( + s => s.QuestId == questId, + () => new EntitySQuestSession { UserId = userId, QuestId = questId }); + + // Reset flow to MAIN_FLOW on retry so the client re-enters the quest from the beginning. + EntityIUserMainQuestFlowStatus flowStatus = userDb.EntityIUserMainQuestFlowStatus.GetOrCreate(userId); + flowStatus.CurrentQuestFlowType = QuestFlowType.MAIN_FLOW; + + // Reset all mission progress for this quest so they can be re-evaluated during battle. + foreach (EntityIUserQuestMission mission in userDb.EntityIUserQuestMission.Where(m => m.QuestId == questId)) + { + mission.IsClear = false; + mission.ProgressValue = 0; + mission.LatestClearDatetime = 0; + } + + RestartMainQuestResponse response = new(); + response.BattleDropReward.AddRange(BuildBattleDropRewards(questId)); + response.DeckNumber = restartSession.UserDeckNumber; + return Task.FromResult(response); + } + + /// Completes a main quest: evaluates rewards, applies EXP/gold/possessions, updates quest state, and returns results. + public override Task FinishMainQuest(FinishMainQuestRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + if (!_store.TryGet(userId, out DarkUserMemoryDatabase userDb)) return Task.FromResult(new FinishMainQuestResponse()); + + long nowMs = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(); + int questId = request.QuestId; + bool isRetired = request.IsRetired; + + EntityMQuest? quest = _masterDb.EntityMQuest.FirstOrDefault(q => q.QuestId == questId); + if (quest == null) return Task.FromResult(new FinishMainQuestResponse()); + + EntityIUserQuest userQuest = userDb.EntityIUserQuest.GetOrCreate( + q => q.QuestId == questId, + () => new EntityIUserQuest { UserId = userId, QuestId = questId }); + + // === PHASE A: Evaluate outcome === + List firstClearRewards = []; + List replayFlowFirstClearRewards = []; + List missionClearRewards = []; + List bigWinRewards = []; + bool isBigWin = false; + + bool isFirstClear = userQuest.ClearCount == 0; + + List firstClearRewardRows = []; + if (isFirstClear && quest.QuestFirstClearRewardGroupId != 0) + { + int rewardGroupId = quest.QuestFirstClearRewardGroupId; + EntityMQuestFirstClearRewardSwitch? switchRow = _masterDb.EntityMQuestFirstClearRewardSwitch + .FirstOrDefault(s => s.QuestId == questId); + if (switchRow != null) + { + EntityIUserQuest? prereqQuest = userDb.EntityIUserQuest + .FirstOrDefault(q => q.QuestId == switchRow.SwitchConditionClearQuestId); + if (prereqQuest != null && prereqQuest.QuestStateType == (int)QuestStateType.CLEARED) + { + rewardGroupId = switchRow.QuestFirstClearRewardGroupId; + } + } + + firstClearRewardRows = [.. _masterDb.EntityMQuestFirstClearRewardGroup + .Where(r => r.QuestFirstClearRewardGroupId == rewardGroupId)]; + firstClearRewards.AddRange(firstClearRewardRows.Select(r => new QuestReward + { + PossessionType = (int)r.PossessionType, + PossessionId = r.PossessionId, + Count = r.Count + })); + } + + // Build replay flow first-clear rewards if in replay flow + EntityIUserMainQuestFlowStatus? currentFlowStatus = userDb.EntityIUserMainQuestFlowStatus.FirstOrDefault(s => s.UserId == userId); + bool wasReplayFlow = currentFlowStatus?.CurrentQuestFlowType == QuestFlowType.REPLAY_FLOW; + if (wasReplayFlow && quest.QuestReplayFlowRewardGroupId > 0) + { + foreach (EntityMQuestReplayFlowRewardGroup reward in _masterDb.EntityMQuestReplayFlowRewardGroup + .Where(r => r.QuestReplayFlowRewardGroupId == quest.QuestReplayFlowRewardGroupId)) + { + replayFlowFirstClearRewards.Add(new QuestReward + { + PossessionType = (int)reward.PossessionType, + PossessionId = reward.PossessionId, + Count = reward.Count + }); + } + } + + List missionGroupRows = quest.QuestMissionGroupId != 0 + ? [.. _masterDb.EntityMQuestMissionGroup.Where(m => m.QuestMissionGroupId == quest.QuestMissionGroupId)] + : []; + + int regularMissionCount = 0; + int pendingClearCount = 0; + int bigWinMissionId = 0; + + foreach (EntityMQuestMissionGroup missionGroupRow in missionGroupRows) + { + EntityMQuestMission? mission = _masterDb.EntityMQuestMission + .FirstOrDefault(m => m.QuestMissionId == missionGroupRow.QuestMissionId); + if (mission == null) continue; + + if (mission.QuestMissionConditionType == QuestMissionConditionType.COMPLETE) + { + bigWinMissionId = mission.QuestMissionId; + continue; + } + + regularMissionCount++; + + EntityIUserQuestMission? userMission = userDb.EntityIUserQuestMission + .FirstOrDefault(m => m.QuestId == questId && m.QuestMissionId == mission.QuestMissionId); + if (userMission == null || !userMission.IsClear) + { + pendingClearCount++; + EntityMQuestMissionReward? missionReward = _masterDb.EntityMQuestMissionReward + .FirstOrDefault(r => r.QuestMissionRewardId == mission.QuestMissionRewardId); + if (missionReward != null) + { + missionClearRewards.Add(new QuestReward + { + PossessionType = (int)missionReward.PossessionType, + PossessionId = missionReward.PossessionId, + Count = missionReward.Count + }); + } + } + } + + bool allRegularWillClear = regularMissionCount > 0 && (regularMissionCount - pendingClearCount + pendingClearCount) == regularMissionCount; + if (allRegularWillClear && bigWinMissionId != 0) + { + EntityIUserQuestMission? bigWinUserMission = userDb.EntityIUserQuestMission + .FirstOrDefault(m => m.QuestId == questId && m.QuestMissionId == bigWinMissionId); + if (bigWinUserMission == null || !bigWinUserMission.IsClear) + { + isBigWin = true; + EntityMQuestMission? bigWinMission = _masterDb.EntityMQuestMission + .FirstOrDefault(m => m.QuestMissionId == bigWinMissionId); + if (bigWinMission != null) + { + EntityMQuestMissionReward? bigWinReward = _masterDb.EntityMQuestMissionReward + .FirstOrDefault(r => r.QuestMissionRewardId == bigWinMission.QuestMissionRewardId); + if (bigWinReward != null) + { + bigWinRewards.Add(new QuestReward + { + PossessionType = (int)bigWinReward.PossessionType, + PossessionId = bigWinReward.PossessionId, + Count = bigWinReward.Count + }); + } + } + } + } + + List dropRewards = BuildDropRewards(quest); + + // === PHASE B: Apply rewards and update quest state (only on victory) === + if (!isRetired) + { + if (isFirstClear) + { + ApplyExpRewards(userDb, quest, userId, questId); + ApplyGoldReward(userDb, quest, userId, nowMs); + ApplyFirstClearPossessions(userDb, firstClearRewardRows, userId, _masterDb); + ApplyWeaponStoryUnlocks(userDb, questId, userId); + } + + ApplyDropRewardPossessions(userDb, dropRewards, userId, _masterDb); + ApplyDropRewardPossessions(userDb, replayFlowFirstClearRewards, userId, _masterDb); + + userQuest.QuestStateType = (int)QuestStateType.CLEARED; + userQuest.ClearCount++; + userQuest.DailyClearCount++; + userQuest.LastClearDatetime = nowMs; + } + + // === PHASE C: Reset flow and progress (always, even on retire) === + EntityIUserMainQuestProgressStatus? progressStatus = userDb.EntityIUserMainQuestProgressStatus.FirstOrDefault(s => s.UserId == userId); + if (progressStatus != null) + { + progressStatus.CurrentQuestSceneId = 0; + progressStatus.HeadQuestSceneId = 0; + progressStatus.CurrentQuestFlowType = QuestFlowType.UNKNOWN; + } + + if (currentFlowStatus != null) + { + currentFlowStatus.CurrentQuestFlowType = QuestFlowType.UNKNOWN; + } + + // Restore main flow state after replay + if (wasReplayFlow) + { + EntityIUserMainQuestReplayFlowStatus? replayFlowStatus = userDb.EntityIUserMainQuestReplayFlowStatus.FirstOrDefault(s => s.UserId == userId); + if (replayFlowStatus != null) + { + replayFlowStatus.CurrentQuestSceneId = 0; + replayFlowStatus.CurrentHeadQuestSceneId = 0; + } + } + + // Mark all missions as cleared (always) + ClearQuestMissions(userDb, questId, userId, nowMs); + + // Build response with all reward categories and clean up the server-side quest session + FinishMainQuestResponse response = new() { IsBigWin = isBigWin }; + response.DropReward.AddRange(dropRewards); + response.FirstClearReward.AddRange(firstClearRewards); + response.MissionClearReward.AddRange(missionClearRewards); + response.MissionClearCompleteReward.AddRange(bigWinRewards); + response.ReplayFlowFirstClearReward.AddRange(replayFlowFirstClearRewards); + if (isBigWin) + { + response.BigWinClearedQuestMissionIdList.Add(bigWinMissionId); + } + + userDb.EntitySQuestSession.RemoveAll(s => s.QuestId == questId); + + return Task.FromResult(response); + } + + /// Applies user, character, and costume EXP from quest completion. Rental quests skip character/costume EXP. + private void ApplyExpRewards(DarkUserMemoryDatabase userDb, EntityMQuest quest, long userId, int questId) + { + // User EXP is always applied regardless of deck. + EntityIUserStatus? status = userDb.EntityIUserStatus.FirstOrDefault(); + if (status != null) + { + status.Exp += quest.UserExp; + status.Level = CalculateLevel(1, status.Exp); + } + + // Rental quests use borrowed characters; EXP is not awarded to the player's own roster. + if (IsRentalQuest(questId)) + return; + + // Character/costume EXP only applies to units in the selected deck. + EntitySQuestSession? session = userDb.EntitySQuestSession.FirstOrDefault(s => s.QuestId == questId); + if (session == null || session.UserDeckNumber == 0) + { + return; + } + + EntityIUserDeck? deck = userDb.EntityIUserDeck.FirstOrDefault(d => d.DeckType == DeckType.QUEST && d.UserDeckNumber == session.UserDeckNumber); + if (deck == null) + { + return; + } + + // Collect costume UUIDs from the 3 character slots in this deck. + List deckCharUuids = [deck.UserDeckCharacterUuid01, deck.UserDeckCharacterUuid02, deck.UserDeckCharacterUuid03]; + HashSet costumeUuids = []; + foreach (string deckCharUuid in deckCharUuids) + { + if (string.IsNullOrEmpty(deckCharUuid)) { continue; } + EntityIUserDeckCharacter? deckChar = userDb.EntityIUserDeckCharacter.FirstOrDefault(c => c.UserDeckCharacterUuid == deckCharUuid); + if (deckChar == null || string.IsNullOrEmpty(deckChar.UserCostumeUuid)) { continue; } + costumeUuids.Add(deckChar.UserCostumeUuid); + } + + // Collect character IDs via master costume data. + HashSet characterIds = []; + foreach (string costumeUuid in costumeUuids) + { + EntityIUserCostume? userCostume = userDb.EntityIUserCostume.FirstOrDefault(c => c.UserCostumeUuid == costumeUuid); + if (userCostume == null) { continue; } + EntityMCostume? masterCostume = _masterDb.EntityMCostume.FirstOrDefault(c => c.CostumeId == userCostume.CostumeId); + if (masterCostume != null) + { + characterIds.Add(masterCostume.CharacterId); + } + } + + // Apply CharacterExp only to characters in the selected deck. + foreach (EntityIUserCharacter character in userDb.EntityIUserCharacter.Where(c => characterIds.Contains(c.CharacterId))) + { + character.Exp += quest.CharacterExp; + character.Level = CalculateLevel(31, character.Exp); + } + + // Apply CostumeExp only to costumes in the selected deck. + foreach (EntityIUserCostume costume in userDb.EntityIUserCostume.Where(c => costumeUuids.Contains(c.UserCostumeUuid))) + { + EntityMCostume? masterCostume = _masterDb.EntityMCostume.FirstOrDefault(c => c.CostumeId == costume.CostumeId); + if (masterCostume == null) { continue; } + EntityMCostumeRarity? rarity = _masterDb.EntityMCostumeRarity.FirstOrDefault(r => r.RarityType == masterCostume.RarityType); + if (rarity == null) { continue; } + costume.Exp += quest.CostumeExp; + costume.Level = CalculateLevel(rarity.RequiredExpForLevelUpNumericalParameterMapId, costume.Exp); + } + } + + /// Determines the level for the given EXP using the numerical parameter map thresholds. + private int CalculateLevel(int mapId, int currentExp) + { + List rows = [.. _masterDb.EntityMNumericalParameterMap + .Where(r => r.NumericalParameterMapId == mapId) + .OrderBy(r => r.ParameterKey)]; + int level = 1; + foreach (EntityMNumericalParameterMap row in rows) + { + if (currentExp >= row.ParameterValue) + level = row.ParameterKey; + else + break; + } + return level; + } + + /// + /// A quest is rental when any of its scenes uses a battle group that has a + /// rental deck entry. Rental quests skip character/costume EXP. + /// + private bool IsRentalQuest(int questId) + { + IEnumerable sceneIds = _masterDb.EntityMQuestScene + .Where(s => s.QuestId == questId) + .Select(s => s.QuestSceneId); + + foreach (int sceneId in sceneIds) + { + EntityMQuestSceneBattle? battle = _masterDb.EntityMQuestSceneBattle + .FirstOrDefault(b => b.QuestSceneId == sceneId); + if (battle != null && _masterDb.EntityMBattleRentalDeck.Any(r => r.BattleGroupId == battle.BattleGroupId)) + return true; + } + + return false; + } + + /// Clears all quest missions for a given quest, creating any missing records. + private void ClearQuestMissions(DarkUserMemoryDatabase userDb, int questId, long userId, long nowMs) + { + EntityMQuest? quest = _masterDb.EntityMQuest.FirstOrDefault(q => q.QuestId == questId); + if (quest == null || quest.QuestMissionGroupId == 0) return; + + foreach (EntityMQuestMissionGroup missionGroupRow in _masterDb.EntityMQuestMissionGroup + .Where(g => g.QuestMissionGroupId == quest.QuestMissionGroupId)) + { + EntityIUserQuestMission userMission = userDb.EntityIUserQuestMission.GetOrCreate( + m => m.QuestId == questId && m.QuestMissionId == missionGroupRow.QuestMissionId, + () => new EntityIUserQuestMission { UserId = userId, QuestId = questId, QuestMissionId = missionGroupRow.QuestMissionId }); + userMission.IsClear = true; + userMission.ProgressValue = 1; + userMission.LatestClearDatetime = nowMs; + } + } + + /// Grants gold (consumable item ID 1) from quest completion. + private static void ApplyGoldReward(DarkUserMemoryDatabase userDb, EntityMQuest quest, long userId, long nowMs) + { + if (quest.Gold <= 0) return; + EntityIUserConsumableItem? gold = userDb.EntityIUserConsumableItem.FirstOrDefault(c => c.ConsumableItemId == 1); + if (gold == null) + { + gold = new EntityIUserConsumableItem { UserId = userId, ConsumableItemId = 1, Count = 0, FirstAcquisitionDatetime = nowMs }; + userDb.EntityIUserConsumableItem.Add(gold); + } + gold.Count += quest.Gold; + } + + /// Grants first-clear reward possessions to the user. + private static void ApplyFirstClearPossessions(DarkUserMemoryDatabase userDb, List rewardRows, long userId, DarkMasterMemoryDatabase masterDb) + { + foreach (EntityMQuestFirstClearRewardGroup row in rewardRows) + PossessionHelper.Apply(userDb, userId, row.PossessionType, row.PossessionId, row.Count, masterDb); + } + + /// Grants scene-based possessions from master data for the given quest scene. + private void ApplySceneGrants(DarkUserMemoryDatabase userDb, int questSceneId, long userId) + { + List grants = [.. _masterDb.EntityMUserQuestSceneGrantPossession + .Where(g => g.QuestSceneId == questSceneId && !g.IsDebug)]; + + foreach (EntityMUserQuestSceneGrantPossession grant in grants) + PossessionHelper.Apply(userDb, userId, grant.PossessionType, grant.PossessionId, grant.Count, _masterDb); + } + + /// Grants all drop reward possessions from a reward list. + private static void ApplyDropRewardPossessions(DarkUserMemoryDatabase userDb, List rewards, long userId, DarkMasterMemoryDatabase masterDb) + { + foreach (QuestReward reward in rewards) + PossessionHelper.Apply(userDb, userId, (PossessionType)reward.PossessionType, reward.PossessionId, reward.Count, masterDb); + } + + /// Unlocks weapon stories triggered by QUEST_CLEAR. ACQUISITION unlocks are handled by WeaponHelper.GrantWeapon. + private void ApplyWeaponStoryUnlocks(DarkUserMemoryDatabase userDb, int questId, long userId) + { + IEnumerable questClearCondRows = _masterDb.EntityMWeaponStoryReleaseConditionGroup + .Where(c => c.WeaponStoryReleaseConditionType == WeaponStoryReleaseConditionType.QUEST_CLEAR + && c.ConditionValue == questId); + foreach (EntityMWeaponStoryReleaseConditionGroup condRow in questClearCondRows) + { + EntityMWeapon? masterWeapon = _masterDb.EntityMWeapon + .FirstOrDefault(w => w.WeaponStoryReleaseConditionGroupId == condRow.WeaponStoryReleaseConditionGroupId); + if (masterWeapon != null) + WeaponHelper.GrantWeaponStory(userDb, masterWeapon.WeaponId, condRow.StoryIndex, userId); + } + } + + /// Initializes an extra quest: creates quest/mission records and returns battle drop rewards. + public override Task StartExtraQuest(StartExtraQuestRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + + long nowMs = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(); + int questId = request.QuestId; + + EntityMQuest? quest = _masterDb.EntityMQuest.FirstOrDefault(q => q.QuestId == questId); + + // Ensure user quest and mission rows exist + EntityIUserQuest userQuest = userDb.EntityIUserQuest.GetOrCreate( + q => q.QuestId == questId, + () => new EntityIUserQuest { UserId = userId, QuestId = questId }); + + if (quest != null && quest.QuestMissionGroupId != 0) + { + List missionIds = [.. _masterDb.EntityMQuestMissionGroup + .Where(g => g.QuestMissionGroupId == quest.QuestMissionGroupId) + .Select(g => g.QuestMissionId)]; + + foreach (int missionId in missionIds) + { + if (!userDb.EntityIUserQuestMission.Any(m => m.QuestId == questId && m.QuestMissionId == missionId)) + userDb.EntityIUserQuestMission.Add(new EntityIUserQuestMission { UserId = userId, QuestId = questId, QuestMissionId = missionId }); + } + } + + EntitySQuestSession session = userDb.EntitySQuestSession.GetOrCreate( + s => s.QuestId == questId, + () => new EntitySQuestSession { UserId = userId, QuestId = questId }); + session.UserDeckNumber = request.UserDeckNumber; + + userQuest.QuestStateType = (int)QuestStateType.ACTIVE; + userQuest.LatestStartDatetime = nowMs; + + EntityIUserExtraQuestProgressStatus progressStatus = userDb.EntityIUserExtraQuestProgressStatus.GetOrCreate(userId); + progressStatus.CurrentQuestId = questId; + + // Set initial scene IDs from the first scene of this quest + EntityMQuestScene? firstScene = _masterDb.EntityMQuestScene + .Where(s => s.QuestId == questId) + .OrderBy(s => s.SortOrder) + .FirstOrDefault(); + if (firstScene != null) + { + progressStatus.CurrentQuestSceneId = firstScene.QuestSceneId; + progressStatus.HeadQuestSceneId = firstScene.QuestSceneId; + } + + StartExtraQuestResponse response = new(); + response.BattleDropReward.AddRange(BuildBattleDropRewards(questId)); + return Task.FromResult(response); + } + + /// Restarts an extra quest: resets mission progress and returns battle drop rewards. + public override Task RestartExtraQuest(RestartExtraQuestRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + + long nowMs = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(); + int questId = request.QuestId; + + // Reset quest state to ACTIVE + EntityIUserQuest userQuest = userDb.EntityIUserQuest.GetOrCreate( + q => q.QuestId == questId, + () => new EntityIUserQuest { UserId = userId, QuestId = questId }); + + userQuest.QuestStateType = (int)QuestStateType.ACTIVE; + userQuest.IsBattleOnly = false; + userQuest.LatestStartDatetime = nowMs; + + EntitySQuestSession session = userDb.EntitySQuestSession.GetOrCreate( + s => s.QuestId == questId, + () => new EntitySQuestSession { UserId = userId, QuestId = questId }); + + // Reset all mission progress for this quest so they can be re-evaluated during battle + foreach (EntityIUserQuestMission mission in userDb.EntityIUserQuestMission.Where(m => m.QuestId == questId)) + { + mission.IsClear = false; + mission.ProgressValue = 0; + mission.LatestClearDatetime = 0; + } + + EntityIUserExtraQuestProgressStatus progressStatus = userDb.EntityIUserExtraQuestProgressStatus.GetOrCreate(userId); + progressStatus.CurrentQuestId = questId; + + RestartExtraQuestResponse response = new(); + response.BattleDropReward.AddRange(BuildBattleDropRewards(questId)); + response.DeckNumber = session.UserDeckNumber; + return Task.FromResult(response); + } + + /// Completes an extra quest: evaluates rewards, applies possessions, updates quest state, and returns results. + public override Task FinishExtraQuest(FinishExtraQuestRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + if (!_store.TryGet(userId, out DarkUserMemoryDatabase userDb)) return Task.FromResult(new FinishExtraQuestResponse()); + + long nowMs = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(); + int questId = request.QuestId; + bool isRetired = request.IsRetired; + + EntityMQuest? quest = _masterDb.EntityMQuest.FirstOrDefault(q => q.QuestId == questId); + if (quest == null) return Task.FromResult(new FinishExtraQuestResponse()); + + EntityIUserQuest userQuest = userDb.EntityIUserQuest.GetOrCreate( + q => q.QuestId == questId, + () => new EntityIUserQuest { UserId = userId, QuestId = questId }); + + List firstClearRewards = []; + List missionClearRewards = []; + List bigWinRewards = []; + bool isBigWin = false; + + bool isFirstClear = userQuest.ClearCount == 0; + + List firstClearRewardRows = []; + if (isFirstClear && quest.QuestFirstClearRewardGroupId != 0) + { + int rewardGroupId = quest.QuestFirstClearRewardGroupId; + EntityMQuestFirstClearRewardSwitch? switchRow = _masterDb.EntityMQuestFirstClearRewardSwitch + .FirstOrDefault(s => s.QuestId == questId); + if (switchRow != null) + { + EntityIUserQuest? prereqQuest = userDb.EntityIUserQuest + .FirstOrDefault(q => q.QuestId == switchRow.SwitchConditionClearQuestId); + if (prereqQuest != null && prereqQuest.QuestStateType == (int)QuestStateType.CLEARED) + rewardGroupId = switchRow.QuestFirstClearRewardGroupId; + } + + firstClearRewardRows = [.. _masterDb.EntityMQuestFirstClearRewardGroup + .Where(r => r.QuestFirstClearRewardGroupId == rewardGroupId)]; + firstClearRewards.AddRange(firstClearRewardRows.Select(r => new QuestReward + { + PossessionType = (int)r.PossessionType, + PossessionId = r.PossessionId, + Count = r.Count + })); + } + + List missionGroupRows = quest.QuestMissionGroupId != 0 + ? [.. _masterDb.EntityMQuestMissionGroup.Where(m => m.QuestMissionGroupId == quest.QuestMissionGroupId)] + : []; + + int regularMissionCount = 0; + int pendingClearCount = 0; + int bigWinMissionId = 0; + + foreach (EntityMQuestMissionGroup missionGroupRow in missionGroupRows) + { + EntityMQuestMission? mission = _masterDb.EntityMQuestMission + .FirstOrDefault(m => m.QuestMissionId == missionGroupRow.QuestMissionId); + if (mission == null) continue; + + if (mission.QuestMissionConditionType == QuestMissionConditionType.COMPLETE) + { + bigWinMissionId = mission.QuestMissionId; + continue; + } + + regularMissionCount++; + + EntityIUserQuestMission? userMission = userDb.EntityIUserQuestMission + .FirstOrDefault(m => m.QuestId == questId && m.QuestMissionId == mission.QuestMissionId); + if (userMission == null || !userMission.IsClear) + { + pendingClearCount++; + EntityMQuestMissionReward? missionReward = _masterDb.EntityMQuestMissionReward + .FirstOrDefault(r => r.QuestMissionRewardId == mission.QuestMissionRewardId); + if (missionReward != null) + { + missionClearRewards.Add(new QuestReward + { + PossessionType = (int)missionReward.PossessionType, + PossessionId = missionReward.PossessionId, + Count = missionReward.Count + }); + } + } + } + + bool allRegularWillClear = regularMissionCount > 0 && (regularMissionCount - pendingClearCount + pendingClearCount) == regularMissionCount; + if (allRegularWillClear && bigWinMissionId != 0) + { + EntityIUserQuestMission? bigWinUserMission = userDb.EntityIUserQuestMission + .FirstOrDefault(m => m.QuestId == questId && m.QuestMissionId == bigWinMissionId); + if (bigWinUserMission == null || !bigWinUserMission.IsClear) + { + isBigWin = true; + EntityMQuestMission? bigWinMission = _masterDb.EntityMQuestMission + .FirstOrDefault(m => m.QuestMissionId == bigWinMissionId); + if (bigWinMission != null) + { + EntityMQuestMissionReward? bigWinReward = _masterDb.EntityMQuestMissionReward + .FirstOrDefault(r => r.QuestMissionRewardId == bigWinMission.QuestMissionRewardId); + if (bigWinReward != null) + { + bigWinRewards.Add(new QuestReward + { + PossessionType = (int)bigWinReward.PossessionType, + PossessionId = bigWinReward.PossessionId, + Count = bigWinReward.Count + }); + } + } + } + } + + List dropRewardsExtra = BuildDropRewards(quest); + + // Apply rewards and update quest state only on victory (not retired) + if (!isRetired) + { + if (isFirstClear) + { + ApplyExpRewards(userDb, quest, userId, questId); + ApplyGoldReward(userDb, quest, userId, nowMs); + ApplyFirstClearPossessions(userDb, firstClearRewardRows, userId, _masterDb); + ApplyWeaponStoryUnlocks(userDb, questId, userId); + } + + ApplyDropRewardPossessions(userDb, dropRewardsExtra, userId, _masterDb); + + userQuest.QuestStateType = (int)QuestStateType.CLEARED; + userQuest.ClearCount++; + userQuest.DailyClearCount++; + userQuest.LastClearDatetime = nowMs; + } + + // Reset extra quest progress (always) + EntityIUserExtraQuestProgressStatus? extraProgress = userDb.EntityIUserExtraQuestProgressStatus + .FirstOrDefault(s => s.UserId == userId); + if (extraProgress != null) + { + extraProgress.CurrentQuestId = 0; + extraProgress.CurrentQuestSceneId = 0; + extraProgress.HeadQuestSceneId = 0; + } + + // Mark all missions as cleared (always) + ClearQuestMissions(userDb, questId, userId, nowMs); + + FinishExtraQuestResponse response = new() { IsBigWin = isBigWin }; + response.DropReward.AddRange(dropRewardsExtra); + response.FirstClearReward.AddRange(firstClearRewards); + response.MissionClearReward.AddRange(missionClearRewards); + response.MissionClearCompleteReward.AddRange(bigWinRewards); + if (isBigWin) + { + response.BigWinClearedQuestMissionIdList.Add(bigWinMissionId); + } + + userDb.EntitySQuestSession.RemoveAll(s => s.QuestId == questId); + + return Task.FromResult(response); + } + + /// Initializes an event quest: creates quest/mission records and returns battle drop rewards. + public override Task StartEventQuest(StartEventQuestRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + + long nowMs = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(); + int questId = request.QuestId; + int chapterId = request.EventQuestChapterId; + + EntityMQuest? quest = _masterDb.EntityMQuest.FirstOrDefault(q => q.QuestId == questId); + + EntityIUserQuest userQuest = userDb.EntityIUserQuest.GetOrCreate( + q => q.QuestId == questId, + () => new EntityIUserQuest { UserId = userId, QuestId = questId }); + + if (quest != null && quest.QuestMissionGroupId != 0) + { + List missionIds = [.. _masterDb.EntityMQuestMissionGroup + .Where(g => g.QuestMissionGroupId == quest.QuestMissionGroupId) + .Select(g => g.QuestMissionId)]; + + foreach (int missionId in missionIds) + { + if (!userDb.EntityIUserQuestMission.Any(m => m.QuestId == questId && m.QuestMissionId == missionId)) + userDb.EntityIUserQuestMission.Add(new EntityIUserQuestMission { UserId = userId, QuestId = questId, QuestMissionId = missionId }); + } + } + + userQuest.IsBattleOnly = request.IsBattleOnly; + + EntitySQuestSession eventSession = userDb.EntitySQuestSession.GetOrCreate( + s => s.QuestId == questId, + () => new EntitySQuestSession { UserId = userId, QuestId = questId }); + eventSession.UserDeckNumber = request.UserDeckNumber; + + userQuest.QuestStateType = (int)QuestStateType.ACTIVE; + userQuest.LatestStartDatetime = nowMs; + + EntityIUserEventQuestProgressStatus progressStatus = userDb.EntityIUserEventQuestProgressStatus.GetOrCreate(userId); + progressStatus.CurrentEventQuestChapterId = chapterId; + progressStatus.CurrentQuestId = questId; + + // Set initial scene IDs from the first scene of this quest + EntityMQuestScene? firstScene = _masterDb.EntityMQuestScene + .Where(s => s.QuestId == questId) + .OrderBy(s => s.SortOrder) + .FirstOrDefault(); + if (firstScene != null) + { + progressStatus.CurrentQuestSceneId = firstScene.QuestSceneId; + progressStatus.HeadQuestSceneId = firstScene.QuestSceneId; + } + + StartEventQuestResponse response = new(); + response.BattleDropReward.AddRange(BuildBattleDropRewards(questId)); + return Task.FromResult(response); + } + + /// Restarts an event quest: resets mission progress. + public override Task RestartEventQuest(RestartEventQuestRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + + long nowMs = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(); + int questId = request.QuestId; + + EntityIUserQuest userQuest = userDb.EntityIUserQuest.GetOrCreate( + q => q.QuestId == questId, + () => new EntityIUserQuest { UserId = userId, QuestId = questId }); + + userQuest.QuestStateType = (int)QuestStateType.ACTIVE; + userQuest.IsBattleOnly = false; + userQuest.LatestStartDatetime = nowMs; + + // Reset all mission progress for this quest so they can be re-evaluated during battle + foreach (EntityIUserQuestMission mission in userDb.EntityIUserQuestMission.Where(m => m.QuestId == questId)) + { + mission.IsClear = false; + mission.ProgressValue = 0; + mission.LatestClearDatetime = 0; + } + + EntityIUserEventQuestProgressStatus progressStatus = userDb.EntityIUserEventQuestProgressStatus.GetOrCreate(userId); + progressStatus.CurrentEventQuestChapterId = request.EventQuestChapterId; + progressStatus.CurrentQuestId = questId; + + return Task.FromResult(new RestartEventQuestResponse()); + } + + /// Completes an event quest: evaluates rewards, applies possessions, updates quest state, and returns results. + public override Task FinishEventQuest(FinishEventQuestRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + if (!_store.TryGet(userId, out DarkUserMemoryDatabase userDb)) return Task.FromResult(new FinishEventQuestResponse()); + + long nowMs = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(); + int questId = request.QuestId; + bool isRetired = request.IsRetired; + + EntityMQuest? quest = _masterDb.EntityMQuest.FirstOrDefault(q => q.QuestId == questId); + if (quest == null) return Task.FromResult(new FinishEventQuestResponse()); + + EntityIUserQuest userQuest = userDb.EntityIUserQuest.GetOrCreate( + q => q.QuestId == questId, + () => new EntityIUserQuest { UserId = userId, QuestId = questId }); + + List firstClearRewards = []; + List missionClearRewards = []; + List bigWinRewards = []; + bool isBigWin = false; + + bool isFirstClear = userQuest.ClearCount == 0; + + List firstClearRewardRows = []; + if (isFirstClear && quest.QuestFirstClearRewardGroupId != 0) + { + int rewardGroupId = quest.QuestFirstClearRewardGroupId; + EntityMQuestFirstClearRewardSwitch? switchRow = _masterDb.EntityMQuestFirstClearRewardSwitch + .FirstOrDefault(s => s.QuestId == questId); + if (switchRow != null) + { + EntityIUserQuest? prereqQuest = userDb.EntityIUserQuest + .FirstOrDefault(q => q.QuestId == switchRow.SwitchConditionClearQuestId); + if (prereqQuest != null && prereqQuest.QuestStateType == (int)QuestStateType.CLEARED) + rewardGroupId = switchRow.QuestFirstClearRewardGroupId; + } + + firstClearRewardRows = [.. _masterDb.EntityMQuestFirstClearRewardGroup + .Where(r => r.QuestFirstClearRewardGroupId == rewardGroupId)]; + firstClearRewards.AddRange(firstClearRewardRows.Select(r => new QuestReward + { + PossessionType = (int)r.PossessionType, + PossessionId = r.PossessionId, + Count = r.Count + })); + } + + List missionGroupRows = quest.QuestMissionGroupId != 0 + ? [.. _masterDb.EntityMQuestMissionGroup.Where(m => m.QuestMissionGroupId == quest.QuestMissionGroupId)] + : []; + + int regularMissionCount = 0; + int pendingClearCount = 0; + int bigWinMissionId = 0; + + foreach (EntityMQuestMissionGroup missionGroupRow in missionGroupRows) + { + EntityMQuestMission? mission = _masterDb.EntityMQuestMission + .FirstOrDefault(m => m.QuestMissionId == missionGroupRow.QuestMissionId); + if (mission == null) continue; + + if (mission.QuestMissionConditionType == QuestMissionConditionType.COMPLETE) + { + bigWinMissionId = mission.QuestMissionId; + continue; + } + + regularMissionCount++; + + EntityIUserQuestMission? userMission = userDb.EntityIUserQuestMission + .FirstOrDefault(m => m.QuestId == questId && m.QuestMissionId == mission.QuestMissionId); + if (userMission == null || !userMission.IsClear) + { + pendingClearCount++; + EntityMQuestMissionReward? missionReward = _masterDb.EntityMQuestMissionReward + .FirstOrDefault(r => r.QuestMissionRewardId == mission.QuestMissionRewardId); + if (missionReward != null) + { + missionClearRewards.Add(new QuestReward + { + PossessionType = (int)missionReward.PossessionType, + PossessionId = missionReward.PossessionId, + Count = missionReward.Count + }); + } + } + } + + bool allRegularWillClear = regularMissionCount > 0 && (regularMissionCount - pendingClearCount + pendingClearCount) == regularMissionCount; + if (allRegularWillClear && bigWinMissionId != 0) + { + EntityIUserQuestMission? bigWinUserMission = userDb.EntityIUserQuestMission + .FirstOrDefault(m => m.QuestId == questId && m.QuestMissionId == bigWinMissionId); + if (bigWinUserMission == null || !bigWinUserMission.IsClear) + { + isBigWin = true; + EntityMQuestMission? bigWinMission = _masterDb.EntityMQuestMission + .FirstOrDefault(m => m.QuestMissionId == bigWinMissionId); + if (bigWinMission != null) + { + EntityMQuestMissionReward? bigWinReward = _masterDb.EntityMQuestMissionReward + .FirstOrDefault(r => r.QuestMissionRewardId == bigWinMission.QuestMissionRewardId); + if (bigWinReward != null) + { + bigWinRewards.Add(new QuestReward + { + PossessionType = (int)bigWinReward.PossessionType, + PossessionId = bigWinReward.PossessionId, + Count = bigWinReward.Count + }); + } + } + } + } + + List dropRewardsEvent = BuildDropRewards(quest); + + // Apply rewards and update quest state only on victory (not retired) + if (!isRetired) + { + if (isFirstClear) + { + ApplyExpRewards(userDb, quest, userId, questId); + ApplyGoldReward(userDb, quest, userId, nowMs); + ApplyFirstClearPossessions(userDb, firstClearRewardRows, userId, _masterDb); + ApplyWeaponStoryUnlocks(userDb, questId, userId); + } + + ApplyDropRewardPossessions(userDb, dropRewardsEvent, userId, _masterDb); + + userQuest.QuestStateType = (int)QuestStateType.CLEARED; + userQuest.ClearCount++; + userQuest.DailyClearCount++; + userQuest.LastClearDatetime = nowMs; + } + + // Reset event quest progress (always) + EntityIUserEventQuestProgressStatus? progressStatus = userDb.EntityIUserEventQuestProgressStatus + .FirstOrDefault(s => s.UserId == userId); + if (progressStatus != null) + { + progressStatus.CurrentQuestId = 0; + progressStatus.CurrentQuestSceneId = 0; + progressStatus.HeadQuestSceneId = 0; + } + + // Mark all missions as cleared (always) + ClearQuestMissions(userDb, questId, userId, nowMs); + + FinishEventQuestResponse response = new() { IsBigWin = isBigWin }; + response.DropReward.AddRange(dropRewardsEvent); + response.FirstClearReward.AddRange(firstClearRewards); + response.MissionClearReward.AddRange(missionClearRewards); + response.MissionClearCompleteReward.AddRange(bigWinRewards); + if (isBigWin) + { + response.BigWinClearedQuestMissionIdList.Add(bigWinMissionId); + } + + userDb.EntitySQuestSession.RemoveAll(s => s.QuestId == questId); + + return Task.FromResult(response); + } + + /// Stub for auto-orbit completion; returns empty response. + public override Task FinishAutoOrbit(Empty request, ServerCallContext context) + { + return Task.FromResult(new FinishAutoOrbitResponse()); + } + + /// Sets the active main quest route and updates season route tracking. + public override Task SetRoute(SetRouteRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + + int routeId = request.MainQuestRouteId; + + EntityMMainQuestRoute? route = _masterDb.EntityMMainQuestRoute.FirstOrDefault(r => r.MainQuestRouteId == routeId); + + EntityIUserMainQuestMainFlowStatus mainFlowStatus = userDb.EntityIUserMainQuestMainFlowStatus.GetOrCreate(userId); + mainFlowStatus.CurrentMainQuestRouteId = routeId; + + if (route != null) + { + EntityIUserMainQuestSeasonRoute seasonRoute = userDb.EntityIUserMainQuestSeasonRoute.GetOrCreate(userId); + seasonRoute.MainQuestRouteId = routeId; + seasonRoute.MainQuestSeasonId = route.MainQuestSeasonId; + } + + EntityIUserPortalCageStatus portalCageStatus = userDb.EntityIUserPortalCageStatus.GetOrCreate(userId); + portalCageStatus.IsCurrentProgress = false; + + return Task.FromResult(new SetRouteResponse()); + } + + /// Stub for scene choice selection; returns empty response. + public override Task SetQuestSceneChoice(SetQuestSceneChoiceRequest request, ServerCallContext context) + { + return Task.FromResult(new SetQuestSceneChoiceResponse()); + } + + /// Stub for tower accumulation reward; returns empty response. + public override Task ReceiveTowerAccumulationReward(ReceiveTowerAccumulationRewardRequest request, ServerCallContext context) + { + return Task.FromResult(new ReceiveTowerAccumulationRewardResponse()); + } + + /// Skips a quest using consumable items: applies EXP/gold, marks cleared, and returns drop rewards. + public override Task SkipQuest(SkipQuestRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + + long nowMs = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(); + int questId = request.QuestId; + + // Consume skip tickets + foreach (UseEffectItem item in request.UseEffectItem) + { + EntityIUserConsumableItem? consumable = userDb.EntityIUserConsumableItem.FirstOrDefault(c => c.ConsumableItemId == item.ConsumableItemId); + if (consumable != null) + { + consumable.Count = Math.Max(consumable.Count - item.Count, 0); + } + } + + EntityMQuest? quest = _masterDb.EntityMQuest.FirstOrDefault(q => q.QuestId == questId); + EntityIUserQuest userQuest = userDb.EntityIUserQuest.GetOrCreate( + q => q.QuestId == questId, + () => new EntityIUserQuest { UserId = userId, QuestId = questId }); + + // Simulate clearing the quest SkipCount times, awarding EXP/gold on each iteration + List dropRewards = []; + if (quest != null) + { + for (int i = 0; i < request.SkipCount; i++) + { + List iterDrops = BuildDropRewards(quest); + ApplyDropRewardPossessions(userDb, iterDrops, userId, _masterDb); + dropRewards.AddRange(iterDrops); + + ApplyGoldReward(userDb, quest, userId, nowMs); + ApplyExpRewards(userDb, quest, userId, questId); + } + + userQuest.ClearCount += request.SkipCount; + userQuest.DailyClearCount += request.SkipCount; + userQuest.LastClearDatetime = nowMs; + } + + SkipQuestResponse response = new(); + response.DropReward.AddRange(dropRewards); + return Task.FromResult(response); + } + + /// Stub for bulk quest skip; returns empty response. + public override Task SkipQuestBulk(SkipQuestBulkRequest request, ServerCallContext context) + { + return Task.FromResult(new SkipQuestBulkResponse()); + } + + /// Replaces the user's auto-sale settings with the provided item filter list. + public override Task SetAutoSaleSetting(SetAutoSaleSettingRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + + userDb.EntityIUserAutoSaleSettingDetail.RemoveAll(s => s.UserId == userId); + + foreach ((int itemType, string itemValue) in request.AutoSaleSettingItem) + { + userDb.EntityIUserAutoSaleSettingDetail.Add(new EntityIUserAutoSaleSettingDetail + { + UserId = userId, + PossessionAutoSaleItemType = itemType, + PossessionAutoSaleItemValue = itemValue, + }); + } + + return Task.FromResult(new SetAutoSaleSettingResponse()); + } + + /// Opens a guerrilla free quest event window for the user. + public override Task StartGuerrillaFreeOpen(Empty request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + + long nowMs = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(); + + EntityIUserEventQuestGuerrillaFreeOpen freeOpen = userDb.EntityIUserEventQuestGuerrillaFreeOpen.GetOrCreate(userId); + freeOpen.StartDatetime = nowMs; + freeOpen.OpenMinutes = 60; + freeOpen.DailyOpenedCount++; + + return Task.FromResult(new StartGuerrillaFreeOpenResponse()); + } + + /// Resets progress for a limit-content side story quest. + public override Task ResetLimitContentQuestProgress(ResetLimitContentQuestProgressRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + + int questId = request.QuestId; + + EntityIUserSideStoryQuest? sideStoryQuest = userDb.EntityIUserSideStoryQuest + .FirstOrDefault(s => s.SideStoryQuestId == questId); + if (sideStoryQuest != null) + { + sideStoryQuest.HeadSideStoryQuestSceneId = 0; + sideStoryQuest.SideStoryQuestStateType = 0; // Unknown + } + + userDb.EntityIUserQuestLimitContentStatus.RemoveAll(s => s.QuestId == questId); + + EntityIUserSideStoryQuestSceneProgressStatus? activeProgress = userDb.EntityIUserSideStoryQuestSceneProgressStatus + .FirstOrDefault(s => s.UserId == userId); + if (activeProgress != null && activeProgress.CurrentSideStoryQuestId == questId) + { + activeProgress.CurrentSideStoryQuestId = 0; + activeProgress.CurrentSideStoryQuestSceneId = 0; + } + + return Task.FromResult(new ResetLimitContentQuestProgressResponse()); + } + + /// Stub for daily quest group reward; returns empty response. + public override Task ReceiveDailyQuestGroupCompleteReward(Empty request, ServerCallContext context) + { + return Task.FromResult(new ReceiveDailyQuestGroupCompleteRewardResponse()); + } + + /// Returns true if is further along in narrative order than , comparing by SortOrder (not scene ID). + private bool IsSceneAhead(int newSceneId, int currentHeadId) + { + if (currentHeadId == 0) return true; + EntityMQuestScene? newScene = _masterDb.EntityMQuestScene.FirstOrDefault(s => s.QuestSceneId == newSceneId); + EntityMQuestScene? headScene = _masterDb.EntityMQuestScene.FirstOrDefault(s => s.QuestSceneId == currentHeadId); + if (newScene == null || headScene == null) return false; + return newScene.SortOrder > headScene.SortOrder; + } + + /// + /// Returns the last scene ID (by SortOrder) of the last quest in the same chapter group as . + /// Falls back to the last scene of itself if chapter data is unavailable. + /// + private int GetChapterLastSceneId(int questId) + { + EntityMMainQuestSequence? seq = _masterDb.EntityMMainQuestSequence.FirstOrDefault(s => s.QuestId == questId); + if (seq == null) return GetLastSceneIdForQuest(questId); + + EntityMMainQuestSequenceGroup? seqGroup = _masterDb.EntityMMainQuestSequenceGroup + .FirstOrDefault(g => g.MainQuestSequenceId == seq.MainQuestSequenceId); + if (seqGroup == null) return GetLastSceneIdForQuest(questId); + + int groupId = seqGroup.MainQuestSequenceGroupId; + + HashSet seqIdsInGroup = [.. _masterDb.EntityMMainQuestSequenceGroup + .Where(g => g.MainQuestSequenceGroupId == groupId) + .Select(g => g.MainQuestSequenceId)]; + + IOrderedEnumerable questsInChapter = _masterDb.EntityMMainQuestSequence + .Where(s => seqIdsInGroup.Contains(s.MainQuestSequenceId)) + .OrderByDescending(s => s.SortOrder); + + foreach (EntityMMainQuestSequence sequence in questsInChapter) + { + int lastScene = GetLastSceneIdForQuest(sequence.QuestId); + if (lastScene != 0) return lastScene; + } + + return GetLastSceneIdForQuest(questId); + } + + /// Returns the highest SortOrder scene ID for the given quest, or 0 if none exist. + private int GetLastSceneIdForQuest(int questId) + { + return _masterDb.EntityMQuestScene + .Where(s => s.QuestId == questId) + .OrderByDescending(s => s.SortOrder) + .FirstOrDefault()?.QuestSceneId ?? 0; + } + + /// + /// Builds the BattleDropReward list for a given quest by following the master data chain: + /// QuestScene -> QuestSceneBattle -> BattleGroup -> Battle -> BattleNpcDeck -> BattleNpcDeckCharacterDropCategory. + /// Returns an empty list if master data is missing. BattleDropEffectId is always 1. + /// + private List BuildBattleDropRewards(int questId) + { + HashSet sceneIds = [.. _masterDb.EntityMQuestScene + .Where(s => s.QuestId == questId) + .Select(s => s.QuestSceneId)]; + + if (sceneIds.Count == 0) + { + return []; + } + + Dictionary battleGroupByScene = []; + foreach (EntityMQuestSceneBattle sb in _masterDb.EntityMQuestSceneBattle) + { + if (sceneIds.Contains(sb.QuestSceneId)) + { + battleGroupByScene[sb.QuestSceneId] = sb.BattleGroupId; + } + } + + HashSet<(int SceneId, int CategoryId)> seen = []; + List drops = []; + + foreach (int sceneId in sceneIds) + { + if (!battleGroupByScene.TryGetValue(sceneId, out int groupId)) + { + continue; + } + + foreach (EntityMBattleGroup bg in _masterDb.EntityMBattleGroup.Where(bg => bg.BattleGroupId == groupId)) + { + EntityMBattle? battle = _masterDb.EntityMBattle.FirstOrDefault(b => b.BattleId == bg.BattleId); + if (battle == null) + { + continue; + } + + EntityMBattleNpcDeck? deck = _masterDb.EntityMBattleNpcDeck.FirstOrDefault(d => + d.BattleNpcId == battle.BattleNpcId && + d.DeckType == battle.DeckType && + d.BattleNpcDeckNumber == battle.BattleNpcDeckNumber); + if (deck == null) + { + continue; + } + + foreach (string uuid in (string[])[deck.BattleNpcDeckCharacterUuid01, deck.BattleNpcDeckCharacterUuid02, deck.BattleNpcDeckCharacterUuid03]) + { + if (string.IsNullOrEmpty(uuid)) + { + continue; + } + + EntityMBattleNpcDeckCharacterDropCategory? dropCat = _masterDb.EntityMBattleNpcDeckCharacterDropCategory + .FirstOrDefault(dc => dc.BattleNpcId == battle.BattleNpcId && dc.BattleNpcDeckCharacterUuid == uuid); + if (dropCat == null) + { + continue; + } + + if (seen.Add((sceneId, dropCat.BattleDropCategoryId))) + { + drops.Add(new BattleDropReward + { + QuestSceneId = sceneId, + BattleDropCategoryId = dropCat.BattleDropCategoryId, + BattleDropEffectId = 1 + }); + } + } + } + } + + return drops; + } + + /// + /// Builds the DropReward list for a given quest from EntityMQuestPickupRewardGroup + EntityMBattleDropReward. + /// Returns an empty list if the quest has no QuestPickupRewardGroupId or master data is missing. + /// + private List BuildDropRewards(EntityMQuest quest) + { + List rewards = []; + if (quest.QuestPickupRewardGroupId == 0) + { + return rewards; + } + + foreach (EntityMQuestPickupRewardGroup pg in _masterDb.EntityMQuestPickupRewardGroup + .Where(pg => pg.QuestPickupRewardGroupId == quest.QuestPickupRewardGroupId)) + { + EntityMBattleDropReward? bdr = _masterDb.EntityMBattleDropReward + .FirstOrDefault(r => r.BattleDropRewardId == pg.BattleDropRewardId); + if (bdr != null) + { + rewards.Add(new QuestReward + { + PossessionType = (int)bdr.PossessionType, + PossessionId = bdr.PossessionId, + Count = bdr.Count + }); + } + } + + return rewards; + } +} diff --git a/src/Services/RewardService.cs b/src/Services/RewardService.cs new file mode 100644 index 0000000..e2d2535 --- /dev/null +++ b/src/Services/RewardService.cs @@ -0,0 +1,203 @@ +using Google.Protobuf.WellKnownTypes; +using Grpc.Core; +using MariesWonderland.Data; +using MariesWonderland.Extensions; +using MariesWonderland.Helpers; +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; +using MariesWonderland.Proto.BigHunt; +using MariesWonderland.Proto.Reward; + +namespace MariesWonderland.Services; + +public class RewardService(UserDataStore store, DarkMasterMemoryDatabase masterDb) + : MariesWonderland.Proto.Reward.RewardService.RewardServiceBase +{ + private readonly UserDataStore _store = store; + private readonly DarkMasterMemoryDatabase _masterDb = masterDb; + + /// + /// Collects the weekly score rewards for all bosses and grants any unclaimed ones to the user. + /// + public override Task ReceiveBigHuntReward(Empty request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + long nowMs = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(); + long weeklyVersion = GetWeeklyVersion(nowMs); + + EntityIUserBigHuntWeeklyStatus? ws = userDb.EntityIUserBigHuntWeeklyStatus + .FirstOrDefault(s => s.BigHuntWeeklyVersion == weeklyVersion); + + bool isReceived = ws?.IsReceivedWeeklyReward ?? false; + + List weeklyScoreResults = []; + List weeklyRewards = []; + + foreach (EntityMBigHuntBoss boss in _masterDb.EntityMBigHuntBoss) + { + EntityIUserBigHuntWeeklyMaxScore? wms = userDb.EntityIUserBigHuntWeeklyMaxScore + .FirstOrDefault(s => s.UserId == userId + && s.BigHuntWeeklyVersion == weeklyVersion + && s.AttributeType == boss.AttributeType); + + long maxScore = wms?.MaxScore ?? 0; + int gradeIcon = ResolveGradeIconId(boss.BigHuntBossId, maxScore); + + weeklyScoreResults.Add(new WeeklyScoreResult + { + AttributeType = (int)boss.AttributeType, + BeforeMaxScore = maxScore, + CurrentMaxScore = maxScore, + BeforeAssetGradeIconId = gradeIcon, + CurrentAssetGradeIconId = gradeIcon, + AfterMaxScore = maxScore, + AfterAssetGradeIconId = gradeIcon, + }); + } + + if (!isReceived) + { + foreach (EntityMBigHuntBoss boss in _masterDb.EntityMBigHuntBoss) + { + int rewardGroupId = ResolveActiveWeeklyRewardGroupId((int)boss.AttributeType, nowMs); + if (rewardGroupId == 0) { continue; } + + EntityIUserBigHuntWeeklyMaxScore? wms = userDb.EntityIUserBigHuntWeeklyMaxScore + .FirstOrDefault(s => s.UserId == userId + && s.BigHuntWeeklyVersion == weeklyVersion + && s.AttributeType == boss.AttributeType); + + long maxScore = wms?.MaxScore ?? 0; + + List items = CollectNewRewards(rewardGroupId, 0, maxScore); + foreach (EntityMBigHuntRewardGroup item in items) + { + PossessionHelper.Apply(userDb, userId, item.PossessionType, item.PossessionId, item.Count, _masterDb); + weeklyRewards.Add(new BigHuntReward + { + PossessionType = (int)item.PossessionType, + PossessionId = item.PossessionId, + Count = item.Count, + }); + } + } + + if (ws == null) + { + ws = new EntityIUserBigHuntWeeklyStatus + { + UserId = userId, + BigHuntWeeklyVersion = weeklyVersion, + }; + userDb.EntityIUserBigHuntWeeklyStatus.Add(ws); + } + ws.IsReceivedWeeklyReward = true; + isReceived = true; + } + + ReceiveBigHuntRewardResponse response = new() + { + IsReceivedWeeklyScoreReward = isReceived, + }; + response.WeeklyScoreResult.AddRange(weeklyScoreResults); + response.WeeklyScoreReward.AddRange(weeklyRewards); + return Task.FromResult(response); + } + + /// + /// Returns an empty PvP reward response (not yet implemented). + /// + public override Task ReceivePvpReward(Empty request, ServerCallContext context) + { + return Task.FromResult(new ReceivePvpRewardResponse()); + } + + /// + /// Returns an empty labyrinth season reward response (not yet implemented). + /// + public override Task ReceiveLabyrinthSeasonReward(Empty request, ServerCallContext context) + { + return Task.FromResult(new ReceiveLabyrinthSeasonRewardResponse()); + } + + /// + /// Returns an empty mission pass remaining reward response (not yet implemented). + /// + public override Task ReceiveMissionPassRemainingReward(Empty request, ServerCallContext context) + { + return Task.FromResult(new ReceiveMissionPassRemainingRewardResponse()); + } + + /// + /// Returns the Monday 00:00 UTC timestamp in milliseconds for the week containing the given timestamp. + /// + private static long GetWeeklyVersion(long millis) + { + DateTimeOffset dt = DateTimeOffset.FromUnixTimeMilliseconds(millis).ToUniversalTime(); + int weekday = (int)dt.DayOfWeek; + if (weekday == 0) { weekday = 7; } + DateTimeOffset monday = new(dt.Year, dt.Month, dt.Day, 0, 0, 0, TimeSpan.Zero); + monday = monday.AddDays(-(weekday - 1)); + return monday.ToUnixTimeMilliseconds(); + } + + private int ResolveGradeIconId(int bossId, long score) + { + EntityMBigHuntBoss? boss = _masterDb.EntityMBigHuntBoss.FirstOrDefault(b => b.BigHuntBossId == bossId); + if (boss == null) { return 0; } + + List thresholds = [.. _masterDb.EntityMBigHuntBossGradeGroup + .Where(g => g.BigHuntBossGradeGroupId == boss.BigHuntBossGradeGroupId) + .OrderBy(g => g.NecessaryScore)]; + + int iconId = 0; + foreach (EntityMBigHuntBossGradeGroup t in thresholds) + { + if (score >= t.NecessaryScore) { iconId = t.AssetGradeIconId; } + else { break; } + } + return iconId; + } + + /// + /// Finds the active weekly reward group for a given attribute type at the specified time. + /// Uses ScheduleId=1 (the default schedule). + /// + private int ResolveActiveWeeklyRewardGroupId(int attributeType, long nowMs) + { + List entries = [.. _masterDb + .EntityMBigHuntWeeklyAttributeScoreRewardGroupSchedule + .Where(e => e.AttributeType == (AttributeType)attributeType + && e.BigHuntWeeklyAttributeScoreRewardGroupScheduleId == 1) + .OrderByDescending(e => e.StartDatetime)]; + + foreach (EntityMBigHuntWeeklyAttributeScoreRewardGroupSchedule e in entries) + { + if (nowMs >= e.StartDatetime) { return e.BigHuntScoreRewardGroupId; } + } + return entries.Count > 0 ? entries[^1].BigHuntScoreRewardGroupId : 0; + } + + /// + /// Collects reward items for thresholds between oldMax (exclusive) and newMax (inclusive). + /// + private List CollectNewRewards(int scoreRewardGroupId, long oldMax, long newMax) + { + List thresholds = [.. _masterDb.EntityMBigHuntScoreRewardGroup + .Where(t => t.BigHuntScoreRewardGroupId == scoreRewardGroupId) + .OrderBy(t => t.NecessaryScore)]; + + List items = []; + foreach (EntityMBigHuntScoreRewardGroup t in thresholds) + { + if (t.NecessaryScore > oldMax && t.NecessaryScore <= newMax) + { + items.AddRange(_masterDb.EntityMBigHuntRewardGroup + .Where(r => r.BigHuntRewardGroupId == t.BigHuntRewardGroupId)); + } + } + return items; + } + +} diff --git a/src/Services/ShopService.cs b/src/Services/ShopService.cs new file mode 100644 index 0000000..c1b2fb7 --- /dev/null +++ b/src/Services/ShopService.cs @@ -0,0 +1,272 @@ +using Google.Protobuf.WellKnownTypes; +using Grpc.Core; +using MariesWonderland.Data; +using MariesWonderland.Extensions; +using MariesWonderland.Helpers; +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; +using MariesWonderland.Proto.Shop; + +namespace MariesWonderland.Services; + +public class ShopService(UserDataStore store, DarkMasterMemoryDatabase masterDb) : MariesWonderland.Proto.Shop.ShopService.ShopServiceBase +{ + private readonly UserDataStore _store = store; + private readonly DarkMasterMemoryDatabase _masterDb = masterDb; + + /// Purchases shop items: deducts currency, grants item contents and effects, and updates purchase history. + public override Task Buy(BuyRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + long nowMs = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(); + + foreach ((int shopItemId, int qty) in request.ShopItems) + { + // Validate item exists in master data + EntityMShopItem? item = _masterDb.EntityMShopItem.FirstOrDefault(i => i.ShopItemId == shopItemId); + if (item == null) { continue; } + + // Deduct the total price; skip this item if funds are insufficient + int totalPrice = item.Price * qty; + if (!DeductPrice(userDb, item.PriceType, item.PriceId, totalPrice)) { continue; } + + // Grant all possession contents for this shop item + List contents = [.. _masterDb.EntityMShopItemContentPossession + .Where(c => c.ShopItemId == shopItemId)]; + + foreach (EntityMShopItemContentPossession content in contents) + { + GrantShopPossession(userDb, userId, content.PossessionType, content.PossessionId, content.Count * qty); + } + + // Apply side effects (e.g., stamina recovery) + ApplyContentEffects(userDb, shopItemId, qty, userId, nowMs); + + // Track purchase count + EntityIUserShopItem? shopItem = userDb.EntityIUserShopItem.FirstOrDefault(s => s.ShopItemId == shopItemId); + if (shopItem == null) + { + shopItem = new EntityIUserShopItem { UserId = userId, ShopItemId = shopItemId }; + userDb.EntityIUserShopItem.Add(shopItem); + } + shopItem.BoughtCount += qty; + shopItem.LatestBoughtCountChangedDatetime = nowMs; + } + + return Task.FromResult(new BuyResponse()); + } + + /// + /// Returns the sorted item shop pool (item IDs) from the ITEM_SHOP group's cell layout. + /// + private List GetItemShopPool() + { + EntityMShop? itemShop = _masterDb.EntityMShop.FirstOrDefault(s => s.ShopGroupType == ShopGroupType.ITEM_SHOP); + if (itemShop == null) { return []; } + + Dictionary cellIdToItemId = _masterDb.EntityMShopItemCell + .ToDictionary(c => c.ShopItemCellId, c => c.ShopItemId); + + return [.. _masterDb.EntityMShopItemCellGroup + .Where(cg => cg.ShopItemCellGroupId == itemShop.ShopItemCellGroupId) + .OrderBy(cg => cg.SortOrder) + .Select(cg => cellIdToItemId.GetValueOrDefault(cg.ShopItemCellId)) + .Where(id => id != 0)]; + } + + /// Returns an empty response. CESA age-rating spending limits not yet implemented. + public override Task GetCesaLimit(Empty request, ServerCallContext context) + { + return Task.FromResult(new GetCesaLimitResponse()); + } + + /// Refreshes the replaceable item shop lineup. Initializes slots on first call; resets purchase counts when gems are spent to refresh. + public override Task RefreshUserData(RefreshRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + long nowMs = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(); + + List itemShopPool = GetItemShopPool(); + + if (!userDb.EntityIUserShopReplaceableLineup.Any(l => l.UserId == userId) && itemShopPool.Count > 0) + { + for (int i = 0; i < itemShopPool.Count; i++) + { + int slot = i + 1; + userDb.EntityIUserShopReplaceableLineup.Add(new EntityIUserShopReplaceableLineup + { + UserId = userId, + SlotNumber = slot, + ShopItemId = itemShopPool[i], + }); + } + } + + if (request.IsGemUsed) + { + EntityIUserShopReplaceable? replaceable = userDb.EntityIUserShopReplaceable.FirstOrDefault(r => r.UserId == userId); + if (replaceable == null) + { + replaceable = new EntityIUserShopReplaceable { UserId = userId }; + userDb.EntityIUserShopReplaceable.Add(replaceable); + } + replaceable.LineupUpdateCount++; + replaceable.LatestLineupUpdateDatetime = nowMs; + + foreach (int itemId in itemShopPool) + { + EntityIUserShopItem? si = userDb.EntityIUserShopItem.FirstOrDefault(s => s.ShopItemId == itemId); + if (si != null) + { + si.BoughtCount = 0; + } + } + } + + return Task.FromResult(new RefreshResponse()); + } + + /// Creates a purchase transaction for real-money IAP: deducts currency, grants contents and effects, and returns a transaction ID. + public override Task CreatePurchaseTransaction(CreatePurchaseTransactionRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + long nowMs = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(); + + EntityMShopItem? item = _masterDb.EntityMShopItem.FirstOrDefault(i => i.ShopItemId == request.ShopItemId); + if (item != null) + { + DeductPrice(userDb, item.PriceType, item.PriceId, item.Price); + + List contents = [.. _masterDb.EntityMShopItemContentPossession + .Where(c => c.ShopItemId == request.ShopItemId)]; + + foreach (EntityMShopItemContentPossession content in contents) + { + GrantShopPossession(userDb, userId, content.PossessionType, content.PossessionId, content.Count); + } + + ApplyContentEffects(userDb, request.ShopItemId, 1, userId, nowMs); + + EntityIUserShopItem? shopItem = userDb.EntityIUserShopItem.FirstOrDefault(s => s.ShopItemId == request.ShopItemId); + if (shopItem == null) + { + shopItem = new EntityIUserShopItem { UserId = userId, ShopItemId = request.ShopItemId }; + userDb.EntityIUserShopItem.Add(shopItem); + } + shopItem.BoughtCount++; + + if (item.ShopItemLimitedStockId > 0) + { + EntityMShopItemLimitedStock? stock = _masterDb.EntityMShopItemLimitedStock + .FirstOrDefault(s => s.ShopItemLimitedStockId == item.ShopItemLimitedStockId); + if (stock != null && shopItem.BoughtCount >= stock.MaxCount) + { + shopItem.BoughtCount = 0; + } + } + + shopItem.LatestBoughtCountChangedDatetime = nowMs; + } + + string txId = $"tx_{userId}_{request.ShopItemId}_{nowMs}"; + + return Task.FromResult(new CreatePurchaseTransactionResponse + { + PurchaseTransactionId = txId, + }); + } + + /// Returns an empty response. Google Play Store IAP verification not yet implemented. + public override Task PurchaseGooglePlayStoreProduct(PurchaseGooglePlayStoreProductRequest request, ServerCallContext context) + { + return Task.FromResult(new PurchaseGooglePlayStoreProductResponse()); + } + + /// + /// Deducts the given price from the user's balance. Returns false if insufficient funds. + /// GEM deducts free gems first, then paid gems. PAID_GEM deducts paid gems only. + /// CONSUMABLE_ITEM deducts from the consumable with PriceId. + /// + private static bool DeductPrice(DarkUserMemoryDatabase userDb, PriceType priceType, int priceId, int amount) + { + switch (priceType) + { + case PriceType.GEM: + { + EntityIUserGem? gem = userDb.EntityIUserGem.FirstOrDefault(); + if (gem == null || gem.FreeGem + gem.PaidGem < amount) { return false; } + int fromFree = Math.Min(gem.FreeGem, amount); + gem.FreeGem -= fromFree; + gem.PaidGem -= amount - fromFree; + return true; + } + case PriceType.PAID_GEM: + { + EntityIUserGem? gem = userDb.EntityIUserGem.FirstOrDefault(); + if (gem == null || gem.PaidGem < amount) { return false; } + gem.PaidGem -= amount; + return true; + } + case PriceType.CONSUMABLE_ITEM: + { + EntityIUserConsumableItem? item = userDb.EntityIUserConsumableItem.FirstOrDefault(c => c.ConsumableItemId == priceId); + if (item == null || item.Count < amount) { return false; } + item.Count -= amount; + return true; + } + default: + return true; + } + } + + /// + /// Grants a shop possession to the user. For costumes already owned, grants duplication + /// exchange items instead. All other types delegate to PossessionHelper.Apply. + /// + private void GrantShopPossession(DarkUserMemoryDatabase userDb, long userId, PossessionType possessionType, int possessionId, int count) + { + if (possessionType is PossessionType.COSTUME or PossessionType.COSTUME_ENHANCED + && userDb.EntityIUserCostume.Any(c => c.CostumeId == possessionId)) + { + foreach (EntityMCostumeDuplicationExchangePossessionGroup exchange in _masterDb.EntityMCostumeDuplicationExchangePossessionGroup + .Where(e => e.CostumeId == possessionId)) + { + PossessionHelper.Apply(userDb, userId, exchange.PossessionType, exchange.PossessionId, exchange.Count * count, _masterDb); + } + return; + } + + PossessionHelper.Apply(userDb, userId, possessionType, possessionId, count, _masterDb); + } + + /// Applies side-effect content (e.g., stamina recovery) from a shop item purchase. + private void ApplyContentEffects(DarkUserMemoryDatabase userDb, int shopItemId, int qty, long userId, long nowMs) + { + List effects = [.. _masterDb.EntityMShopItemContentEffect + .Where(e => e.ShopItemId == shopItemId)]; + + EntityIUserStatus? userStatus = userDb.EntityIUserStatus.FirstOrDefault(s => s.UserId == userId); + if (userStatus == null) { return; } + + EntityMUserLevel? levelData = _masterDb.EntityMUserLevel.FirstOrDefault(l => l.UserLevel == userStatus.Level); + int maxStaminaMillis = (levelData?.MaxStamina ?? 0) * 1000; + + foreach (EntityMShopItemContentEffect effect in effects) + { + if (effect.EffectTargetType != EffectTargetType.STAMINA_RECOVERY) { continue; } + + int effectMillis = effect.EffectValueType switch + { + EffectValueType.FIXED_VALUE => effect.EffectValue, + EffectValueType.PERMIL_VALUE => maxStaminaMillis > 0 ? effect.EffectValue * maxStaminaMillis / 1000 : 0, + _ => 0 + }; + + userStatus.StaminaMilliValue = Math.Min(userStatus.StaminaMilliValue + effectMillis * qty, maxStaminaMillis); + userStatus.StaminaUpdateDatetime = nowMs; + } + } +} diff --git a/src/Services/SideStoryQuestService.cs b/src/Services/SideStoryQuestService.cs new file mode 100644 index 0000000..2733371 --- /dev/null +++ b/src/Services/SideStoryQuestService.cs @@ -0,0 +1,90 @@ +using Grpc.Core; +using MariesWonderland.Data; +using MariesWonderland.Extensions; +using MariesWonderland.Models.Entities; +using MariesWonderland.Proto.SideStoryQuest; + +namespace MariesWonderland.Services; + +public class SideStoryQuestService(UserDataStore store, DarkMasterMemoryDatabase masterDb) : MariesWonderland.Proto.SideStoryQuest.SidestoryquestService.SidestoryquestServiceBase +{ + private readonly UserDataStore _store = store; + private readonly DarkMasterMemoryDatabase _masterDb = masterDb; + + /// Activates a side story quest: sets the current scene progress and creates the quest tracking record if new. + public override Task MoveSideStoryQuestProgress(MoveSideStoryQuestRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + + int questId = request.SideStoryQuestId; + long nowMs = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(); + + int firstSceneId = _masterDb.EntityMSideStoryQuestScene + .Where(s => s.SideStoryQuestId == questId) + .OrderBy(s => s.SortOrder) + .Select(s => s.SideStoryQuestSceneId) + .FirstOrDefault(); + + EntityIUserSideStoryQuest? existing = userDb.EntityIUserSideStoryQuest + .FirstOrDefault(s => s.SideStoryQuestId == questId); + + int sceneId = (existing != null && existing.HeadSideStoryQuestSceneId > 0) + ? existing.HeadSideStoryQuestSceneId + : firstSceneId; + + EntityIUserSideStoryQuestSceneProgressStatus activeProgress = userDb.EntityIUserSideStoryQuestSceneProgressStatus + .FirstOrDefault(s => s.UserId == userId) + ?? AddEntity(userDb.EntityIUserSideStoryQuestSceneProgressStatus, new EntityIUserSideStoryQuestSceneProgressStatus { UserId = userId }); + activeProgress.CurrentSideStoryQuestId = questId; + activeProgress.CurrentSideStoryQuestSceneId = sceneId; + + if (existing == null) + { + userDb.EntityIUserSideStoryQuest.Add(new EntityIUserSideStoryQuest + { + UserId = userId, + SideStoryQuestId = questId, + HeadSideStoryQuestSceneId = firstSceneId, + SideStoryQuestStateType = 1, // Active + }); + } + + return Task.FromResult(new MoveSideStoryQuestResponse()); + } + + /// Advances the player's current scene within a side story quest, updating the high-water mark. + public override Task UpdateSideStoryQuestSceneProgress(UpdateSideStoryQuestSceneProgressRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + + int questId = request.SideStoryQuestId; + int sceneId = request.SideStoryQuestSceneId; + long nowMs = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(); + + EntityIUserSideStoryQuestSceneProgressStatus activeProgress = userDb.EntityIUserSideStoryQuestSceneProgressStatus + .FirstOrDefault(s => s.UserId == userId) + ?? AddEntity(userDb.EntityIUserSideStoryQuestSceneProgressStatus, new EntityIUserSideStoryQuestSceneProgressStatus { UserId = userId }); + activeProgress.CurrentSideStoryQuestSceneId = sceneId; + + EntityIUserSideStoryQuest? progress = userDb.EntityIUserSideStoryQuest + .FirstOrDefault(s => s.SideStoryQuestId == questId); + if (progress != null) + { + if (sceneId > progress.HeadSideStoryQuestSceneId) + { + progress.HeadSideStoryQuestSceneId = sceneId; + } + } + + return Task.FromResult(new UpdateSideStoryQuestSceneProgressResponse()); + } + + /// Adds an entity to a list and returns it, enabling inline initialization with null-coalescing. + private static T AddEntity(List list, T entity) + { + list.Add(entity); + return entity; + } +} diff --git a/src/Services/TutorialService.cs b/src/Services/TutorialService.cs new file mode 100644 index 0000000..c305d4b --- /dev/null +++ b/src/Services/TutorialService.cs @@ -0,0 +1,280 @@ +using Grpc.Core; +using MariesWonderland.Data; +using MariesWonderland.Extensions; +using MariesWonderland.Helpers; +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; +using MariesWonderland.Proto.Deck; +using MariesWonderland.Proto.Tutorial; + +namespace MariesWonderland.Services; + +public class TutorialService(UserDataStore store, DarkMasterMemoryDatabase masterDb) : MariesWonderland.Proto.Tutorial.TutorialService.TutorialServiceBase +{ + /// Advances tutorial progress, triggers starter deck creation on menu tutorials, and returns tutorial rewards. + public override Task SetTutorialProgress(SetTutorialProgressRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = store.GetOrCreate(userId); + long nowMs = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(); + + UpsertTutorialProgress(userDb, userId, (TutorialType)request.TutorialType, request.ProgressPhase, request.ChoiceId); + + if (request.TutorialType == (int)TutorialType.MENU_FIRST || + request.TutorialType == (int)TutorialType.MENU_SECOND) + { + CreateStarterDeck(userDb, userId); + } + + List rewards = ApplyTutorialRewards(userDb, userId, (TutorialType)request.TutorialType); + + SetTutorialProgressResponse response = new(); + response.TutorialChoiceReward.AddRange(rewards); + return Task.FromResult(response); + } + + /// Advances tutorial progress and replaces the user's deck in one operation. + public override Task SetTutorialProgressAndReplaceDeck(SetTutorialProgressAndReplaceDeckRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = store.GetOrCreate(userId); + + UpsertTutorialProgress(userDb, userId, (TutorialType)request.TutorialType, request.ProgressPhase, choiceId: 0); + UpsertDeck(userDb, userId, request); + + return Task.FromResult(new SetTutorialProgressAndReplaceDeckResponse()); + } + + /// Creates or updates a tutorial progress record, advancing to the specified phase. + private static void UpsertTutorialProgress(DarkUserMemoryDatabase db, long userId, TutorialType type, int phase, int choiceId) + { + EntityIUserTutorialProgress? existing = db.EntityIUserTutorialProgress + .FirstOrDefault(t => t.TutorialType == type); + + if (existing is null) + { + db.EntityIUserTutorialProgress.Add(new EntityIUserTutorialProgress + { + UserId = userId, + TutorialType = type, + ProgressPhase = phase, + ChoiceId = choiceId + }); + } + else + { + if (phase >= existing.ProgressPhase) + { + existing.ProgressPhase = phase; + existing.ChoiceId = choiceId; + } + } + } + + /// + /// Creates a minimal starter deck (DeckType=QUEST, DeckNumber=1) using the player's first + /// owned costume/weapon/companion. Only runs when no deck 1 character slot exists yet. + /// Idempotent: safe to call multiple times. + /// + private static void CreateStarterDeck(DarkUserMemoryDatabase db, long userId) + { + if (db.EntityIUserCostume.Count == 0) + { + return; + } + + EntityIUserDeck? existingDeck = db.EntityIUserDeck + .FirstOrDefault(d => d.DeckType == DeckType.QUEST && d.UserDeckNumber == 1); + + if (existingDeck is not null && !string.IsNullOrEmpty(existingDeck.UserDeckCharacterUuid01)) + { + return; + } + + // Hardcoded to Rion & Everlasting Cardia + string costumeUuid = db.EntityIUserCostume + .Where(c => c.CostumeId == Constants.StartingDeckCostumeId) + .Select(c => c.UserCostumeUuid) + .Single(); + + string weaponUuid = db.EntityIUserWeapon + .Where(w => w.WeaponId == Constants.StartingDeckWeaponId) + .Select(w => w.UserWeaponUuid) + .Single(); + + string dcUuid = Guid.NewGuid().ToString(); + + db.EntityIUserDeckCharacter.Add(new EntityIUserDeckCharacter + { + UserId = userId, + UserDeckCharacterUuid = dcUuid, + UserCostumeUuid = costumeUuid, + MainUserWeaponUuid = weaponUuid, + Power = 0 + }); + + if (existingDeck is null) + { + db.EntityIUserDeck.Add(new EntityIUserDeck + { + UserId = userId, + DeckType = DeckType.QUEST, + UserDeckNumber = 1, + UserDeckCharacterUuid01 = dcUuid, + Name = "Loadout 1", + Power = 0 + }); + } + else + { + existingDeck.UserDeckCharacterUuid01 = dcUuid; + } + + bool hasDeckTypeNote = db.EntityIUserDeckTypeNote + .Any(n => n.DeckType == DeckType.QUEST); + + if (!hasDeckTypeNote) + { + db.EntityIUserDeckTypeNote.Add(new EntityIUserDeckTypeNote + { + UserId = userId, + DeckType = DeckType.QUEST, + MaxDeckPower = 0 + }); + } + } + + /// + /// Full replace of the deck's character lineup from a SetTutorialProgressAndReplaceDeck request. + /// Removes existing EntityIUserDeckCharacter records for the deck, creates fresh ones with new + /// UUIDs, and updates EntityIUserDeck to reference the newly generated character UUIDs. + /// + private static void UpsertDeck(DarkUserMemoryDatabase db, long userId, SetTutorialProgressAndReplaceDeckRequest request) + { + DeckType deckType = (DeckType)request.DeckType; + + EntityIUserDeck? existing = db.EntityIUserDeck + .FirstOrDefault(d => d.DeckType == deckType && d.UserDeckNumber == request.UserDeckNumber); + + if (existing is not null) + { + HashSet oldUuids = []; + if (!string.IsNullOrEmpty(existing.UserDeckCharacterUuid01)) { oldUuids.Add(existing.UserDeckCharacterUuid01); } + if (!string.IsNullOrEmpty(existing.UserDeckCharacterUuid02)) { oldUuids.Add(existing.UserDeckCharacterUuid02); } + if (!string.IsNullOrEmpty(existing.UserDeckCharacterUuid03)) { oldUuids.Add(existing.UserDeckCharacterUuid03); } + db.EntityIUserDeckCharacter.RemoveAll(dc => oldUuids.Contains(dc.UserDeckCharacterUuid)); + db.EntityIUserDeckCharacterDressupCostume.RemoveAll(dc => oldUuids.Contains(dc.UserDeckCharacterUuid)); + db.EntityIUserDeckPartsGroup.RemoveAll(pg => oldUuids.Contains(pg.UserDeckCharacterUuid)); + db.EntityIUserDeckSubWeaponGroup.RemoveAll(swg => oldUuids.Contains(swg.UserDeckCharacterUuid)); + } + + string uuid01 = CreateDeckCharacter(db, userId, request.Deck?.Character01); + string uuid02 = CreateDeckCharacter(db, userId, request.Deck?.Character02); + string uuid03 = CreateDeckCharacter(db, userId, request.Deck?.Character03); + + if (existing is null) + { + db.EntityIUserDeck.Add(new EntityIUserDeck + { + UserId = userId, + DeckType = deckType, + UserDeckNumber = request.UserDeckNumber, + UserDeckCharacterUuid01 = uuid01, + UserDeckCharacterUuid02 = uuid02, + UserDeckCharacterUuid03 = uuid03, + Name = $"Loadout {request.UserDeckNumber}", + Power = 0 + }); + } + else + { + existing.UserDeckCharacterUuid01 = uuid01; + existing.UserDeckCharacterUuid02 = uuid02; + existing.UserDeckCharacterUuid03 = uuid03; + } + } + + /// Creates a deck character record from a DeckCharacter slot proto and returns the new UUID. + private static string CreateDeckCharacter(DarkUserMemoryDatabase db, long userId, DeckCharacter? slot) + { + if (slot is null || string.IsNullOrEmpty(slot.UserCostumeUuid)) + { + return ""; + } + + string newUuid = Guid.NewGuid().ToString(); + db.EntityIUserDeckCharacter.Add(new EntityIUserDeckCharacter + { + UserId = userId, + UserDeckCharacterUuid = newUuid, + UserCostumeUuid = slot.UserCostumeUuid, + MainUserWeaponUuid = slot.MainUserWeaponUuid, + UserCompanionUuid = slot.UserCompanionUuid, + UserThoughtUuid = slot.UserThoughtUuid, + Power = 0 + }); + + if (slot.DressupCostumeId != 0) + { + db.EntityIUserDeckCharacterDressupCostume.Add(new EntityIUserDeckCharacterDressupCostume + { + UserId = userId, + UserDeckCharacterUuid = newUuid, + DressupCostumeId = slot.DressupCostumeId + }); + } + + for (int i = 0; i < slot.UserPartsUuid.Count; i++) + { + if (string.IsNullOrEmpty(slot.UserPartsUuid[i])) { continue; } + db.EntityIUserDeckPartsGroup.Add(new EntityIUserDeckPartsGroup + { + UserId = userId, + UserDeckCharacterUuid = newUuid, + UserPartsUuid = slot.UserPartsUuid[i], + SortOrder = i + 1 + }); + } + + for (int i = 0; i < slot.SubUserWeaponUuid.Count; i++) + { + if (string.IsNullOrEmpty(slot.SubUserWeaponUuid[i])) { continue; } + db.EntityIUserDeckSubWeaponGroup.Add(new EntityIUserDeckSubWeaponGroup + { + UserId = userId, + UserDeckCharacterUuid = newUuid, + UserWeaponUuid = slot.SubUserWeaponUuid[i], + SortOrder = i + 1 + }); + } + + return newUuid; + } + + /// + /// Grants tutorial rewards from master data keyed by tutorial type and returns the reward list + /// for the response. Each tutorial type may grant companions, gems, items, or other possessions. + /// + private List ApplyTutorialRewards(DarkUserMemoryDatabase db, long userId, TutorialType tutorialType) + { + List rewardRows = [.. masterDb.EntityMTutorialConsumePossessionGroup + .Where(r => r.TutorialType == tutorialType)]; + + List result = []; + + foreach (EntityMTutorialConsumePossessionGroup row in rewardRows) + { + PossessionHelper.Apply(db, userId, row.PossessionType, row.PossessionId, row.Count, masterDb); + + result.Add(new TutorialChoiceReward + { + PossessionType = (int)row.PossessionType, + PossessionId = row.PossessionId, + Count = row.Count + }); + } + + return result; + } +} + diff --git a/src/Services/UserService.cs b/src/Services/UserService.cs new file mode 100644 index 0000000..d45afb0 --- /dev/null +++ b/src/Services/UserService.cs @@ -0,0 +1,364 @@ +using Google.Protobuf.WellKnownTypes; +using Grpc.Core; +using MariesWonderland.Data; +using MariesWonderland.Extensions; +using MariesWonderland.Helpers; +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; +using MariesWonderland.Proto.User; + +namespace MariesWonderland.Services; + +public class UserService(UserDataStore store, UserDataSeeder seeder) : MariesWonderland.Proto.User.UserService.UserServiceBase +{ + private readonly UserDataStore _store = store; + private readonly UserDataSeeder _seeder = seeder; + + /// Returns Android-specific arguments (API key and nonce) for client initialization. + public override Task GetAndroidArgs(GetAndroidArgsRequest request, ServerCallContext context) + { + return Task.FromResult(new GetAndroidArgsResponse + { + ApiKey = "1234567890", + Nonce = "Mama" + }); + } + + /// Authenticates a user by UUID, creates/updates device records, and returns a session key. + public override Task Auth(AuthUserRequest request, ServerCallContext context) + { + var (userId, isNew) = _store.RegisterOrGetUser(request.Uuid); + var userDb = _store.GetOrCreate(userId); + + var nowMs = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(); + var deviceRecord = userDb.EntitySUserDevice.FirstOrDefault(d => d.UserId == userId); + if (deviceRecord == null) + { + deviceRecord = new EntitySUserDevice { UserId = userId }; + userDb.EntitySUserDevice.Add(deviceRecord); + } + deviceRecord.Uuid = request.Uuid; + deviceRecord.AdvertisingId = request.AdvertisingId; + deviceRecord.IsTrackingEnabled = request.IsTrackingEnabled; + deviceRecord.IdentifierForVendor = request.DeviceInherent?.IdentifierForVendor ?? ""; + deviceRecord.DeviceToken = request.DeviceInherent?.DeviceToken ?? ""; + deviceRecord.MacAddress = request.DeviceInherent?.MacAddress ?? ""; + deviceRecord.RegistrationId = request.DeviceInherent?.RegistrationId ?? ""; + deviceRecord.LastAuthAt = nowMs; + if (isNew) deviceRecord.RegisteredAt = nowMs; + + var session = _store.CreateSession(userId, TimeSpan.FromHours(24)); + + var response = new AuthUserResponse + { + SessionKey = session.SessionKey, + ExpireDatetime = Timestamp.FromDateTime(session.ExpiresAt), + Signature = request.Signature, + UserId = userId + }; + + return Task.FromResult(response); + } + + /// Stub for transfer setting check; returns empty response. + public override Task CheckTransferSetting(Empty request, ServerCallContext context) + { + return Task.FromResult(new CheckTransferSettingResponse()); + } + + /// Initializes the game session: sets game start time and ensures gem balance exists. + public override Task GameStart(Empty request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + + EntityIUser user = userDb.EntityIUser.GetOrCreate(userId); + user.GameStartDatetime = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(); + + // Initialize gem balance with 0/0 if not exists + if (!userDb.EntityIUserGem.Any(g => g.UserId == userId)) + { + userDb.EntityIUserGem.Add(new EntityIUserGem { UserId = userId, PaidGem = 0, FreeGem = 0 }); + } + + // TODO: Investigate if these singleton tables need to be pre-initialized at registration. + // Uncomment to enable initialization: + // userDb.EntityIUserBigHuntProgressStatus.AddNew(new EntityIUserBigHuntProgressStatus { UserId = userId }); + // userDb.EntityIUserEventQuestGuerrillaFreeOpen.AddNew(new EntityIUserEventQuestGuerrillaFreeOpen { UserId = userId }); + // userDb.EntityIUserEventQuestProgressStatus.AddNew(new EntityIUserEventQuestProgressStatus { UserId = userId }); + // userDb.EntityIUserExplore.AddNew(new EntityIUserExplore { UserId = userId }); + // userDb.EntityIUserExtraQuestProgressStatus.AddNew(new EntityIUserExtraQuestProgressStatus { UserId = userId }); + // userDb.EntityIUserMainQuestFlowStatus.AddNew(new EntityIUserMainQuestFlowStatus { UserId = userId }); + // userDb.EntityIUserMainQuestMainFlowStatus.AddNew(new EntityIUserMainQuestMainFlowStatus { UserId = userId }); + // userDb.EntityIUserMainQuestProgressStatus.AddNew(new EntityIUserMainQuestProgressStatus { UserId = userId }); + // userDb.EntityIUserMainQuestReplayFlowStatus.AddNew(new EntityIUserMainQuestReplayFlowStatus { UserId = userId }); + // userDb.EntityIUserMainQuestSeasonRoute.AddNew(new EntityIUserMainQuestSeasonRoute { UserId = userId }); + // userDb.EntityIUserPortalCageStatus.AddNew(new EntityIUserPortalCageStatus { UserId = userId }); + // userDb.EntityIUserShopReplaceable.AddNew(new EntityIUserShopReplaceable { UserId = userId }); + // userDb.EntityIUserSideStoryQuestSceneProgressStatus.AddNew(new EntityIUserSideStoryQuestSceneProgressStatus { UserId = userId }); + + // TODO: Initialize first mission record (missionId=1, IN_PROGRESS) at registration. + // userDb.EntityIUserMission.AddNew(new EntityIUserMission + // { + // UserId = userId, + // MissionId = 1, + // MissionProgressStatusType = MissionProgressStatusType.IN_PROGRESS + // }); + + return Task.FromResult(new GameStartResponse()); + } + + /// Returns the user's backup token for account recovery. + public override Task GetBackupToken(GetBackupTokenRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + + EntitySUser? sUser = userDb.EntitySUser.FirstOrDefault(u => u.UserId == userId); + string token = sUser?.BackupToken ?? ""; + + if (string.IsNullOrEmpty(token)) + { + token = "mock-backup-token"; + } + + return Task.FromResult(new GetBackupTokenResponse + { + BackupToken = token + }); + } + + /// Returns the user's birth year and month. + public override Task GetBirthYearMonth(Empty request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + + EntityIUser? user = userDb.EntityIUser.FirstOrDefault(u => u.UserId == userId); + + return Task.FromResult(new GetBirthYearMonthResponse + { + BirthYear = user?.BirthYear ?? 2000, + BirthMonth = user?.BirthMonth ?? 1 + }); + } + + /// Returns the user's charge money amount for the current month. + public override Task GetChargeMoney(Empty request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + + EntitySUser? sUser = userDb.EntitySUser.FirstOrDefault(u => u.UserId == userId); + + return Task.FromResult(new GetChargeMoneyResponse + { + ChargeMoneyThisMonth = sUser?.ChargeMoneyThisMonth ?? 0 + }); + } + + /// Stub for game play note retrieval; returns empty response. + public override Task GetUserGamePlayNote(GetUserGamePlayNoteRequest request, ServerCallContext context) + { + return Task.FromResult(new GetUserGamePlayNoteResponse()); + } + + /// Returns a player's profile including name, level, favorite costume, and lead deck character. + public override Task GetUserProfile(GetUserProfileRequest request, ServerCallContext context) + { + long userId = request.PlayerId != 0 ? request.PlayerId : context.GetUserId(); + + if (!_store.TryGet(userId, out DarkUserMemoryDatabase userDb)) + { + return Task.FromResult(new GetUserProfileResponse + { + LatestUsedDeck = new ProfileDeck { Power = 100 }, + PvpInfo = new ProfilePvpInfo(), + GamePlayHistory = new GamePlayHistory + { + HistoryItem = { }, + HistoryCategoryGraphItem = { } + } + }); + } + + EntityIUserProfile? profile = userDb.EntityIUserProfile.FirstOrDefault(p => p.UserId == userId); + EntityIUserStatus? status = userDb.EntityIUserStatus.FirstOrDefault(s => s.UserId == userId); + + List deckCharacters = []; + + EntityIUserDeck? deck = userDb.EntityIUserDeck.FirstOrDefault(d => + d.DeckType == DeckType.QUEST && d.UserDeckNumber == 1); + + if (deck != null && !string.IsNullOrEmpty(deck.UserDeckCharacterUuid01)) + { + EntityIUserDeckCharacter? dc = userDb.EntityIUserDeckCharacter + .FirstOrDefault(c => c.UserDeckCharacterUuid == deck.UserDeckCharacterUuid01); + + if (dc != null) + { + int costumeId = userDb.EntityIUserCostume + .FirstOrDefault(c => c.UserCostumeUuid == dc.UserCostumeUuid)?.CostumeId ?? 0; + + EntityIUserWeapon? weapon = userDb.EntityIUserWeapon + .FirstOrDefault(w => w.UserWeaponUuid == dc.MainUserWeaponUuid); + + deckCharacters.Add(new ProfileDeckCharacter + { + CostumeId = costumeId, + MainWeaponId = weapon?.WeaponId ?? 0, + MainWeaponLevel = weapon?.Level ?? 0 + }); + } + } + + return Task.FromResult(new GetUserProfileResponse + { + Level = status?.Level ?? 0, + Name = profile?.Name ?? "", + FavoriteCostumeId = profile?.FavoriteCostumeId ?? 0, + Message = profile?.Message ?? "", + IsFriend = false, + LatestUsedDeck = new ProfileDeck + { + Power = 100, + DeckCharacter = { deckCharacters } + }, + PvpInfo = new ProfilePvpInfo(), + GamePlayHistory = new GamePlayHistory + { + HistoryItem = { }, + HistoryCategoryGraphItem = { } + } + }); + } + + /// Registers a new device UUID and assigns a permanent user ID. + public override Task RegisterUser(RegisterUserRequest request, ServerCallContext context) + { + // RegisterUser is the very first API called on a fresh install. It registers the device UUID + // and assigns a permanent userId (random 19-digit number). Subsequent launches call Auth instead. + var (userId, _) = _store.RegisterOrGetUser(request.Uuid); + + RegisterUserResponse response = new() + { + UserId = userId, + Signature = $"sig_{userId}_{DateTimeOffset.UtcNow.ToUnixTimeSeconds()}" + }; + + return Task.FromResult(response); + } + + /// Stub for Apple account linking; returns empty response. + public override Task SetAppleAccount(SetAppleAccountRequest request, ServerCallContext context) + { + return Task.FromResult(new SetAppleAccountResponse()); + } + + /// Updates the user's birth year and month. + public override Task SetBirthYearMonth(SetBirthYearMonthRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + + EntityIUser user = userDb.EntityIUser.GetOrCreate(userId); + + user.BirthYear = request.BirthYear; + user.BirthMonth = request.BirthMonth; + + return Task.FromResult(new SetBirthYearMonthResponse()); + } + + /// Stub for Facebook account linking; returns empty response. + public override Task SetFacebookAccount(SetFacebookAccountRequest request, ServerCallContext context) + { + return Task.FromResult(new SetFacebookAccountResponse()); + } + + /// Updates the user's favorite costume displayed on their profile. + public override Task SetUserFavoriteCostumeId(SetUserFavoriteCostumeIdRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + + EntityIUserProfile profile = userDb.EntityIUserProfile.GetOrCreate(userId); + + profile.FavoriteCostumeId = request.FavoriteCostumeId; + profile.FavoriteCostumeIdUpdateDatetime = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(); + + return Task.FromResult(new SetUserFavoriteCostumeIdResponse()); + } + + /// Updates the user's profile message. + public override Task SetUserMessage(SetUserMessageRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + + EntityIUserProfile profile = userDb.EntityIUserProfile.GetOrCreate(userId); + + profile.Message = request.Message; + profile.MessageUpdateDatetime = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(); + + return Task.FromResult(new SetUserMessageResponse()); + } + + /// Updates the user's display name. + public override Task SetUserName(SetUserNameRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + + EntityIUserProfile profile = userDb.EntityIUserProfile.GetOrCreate(userId); + + profile.Name = request.Name; + profile.NameUpdateDatetime = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(); + + return Task.FromResult(new SetUserNameResponse()); + } + + /// Updates the user's notification preferences. + public override Task SetUserSetting(SetUserSettingRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + + EntityIUserSetting setting = userDb.EntityIUserSetting.GetOrCreate(userId); + + setting.IsNotifyPurchaseAlert = request.IsNotifyPurchaseAlert; + + return Task.FromResult(new SetUserSettingResponse()); + } + + /// Transfers account data from seed files, creating a new user with pre-seeded database. + public override Task TransferUser(TransferUserRequest request, ServerCallContext context) + { + DarkUserMemoryDatabase seededDb = _seeder.LoadFromFiles(); + long userId = _store.SeedUserFromDatabase(request.Uuid, seededDb); + + TransferUserResponse response = new() + { + UserId = userId, + Signature = $"sig_{userId}_{DateTimeOffset.UtcNow.ToUnixTimeSeconds()}" + }; + return Task.FromResult(response); + } + + /// Stub for Apple-based account transfer; returns empty response. + public override Task TransferUserByApple(TransferUserByAppleRequest request, ServerCallContext context) + { + return Task.FromResult(new TransferUserByAppleResponse()); + } + + /// Stub for Facebook-based account transfer; returns empty response. + public override Task TransferUserByFacebook(TransferUserByFacebookRequest request, ServerCallContext context) + { + return Task.FromResult(new TransferUserByFacebookResponse()); + } + + /// Stub for unlinking Facebook account; returns empty response. + public override Task UnsetFacebookAccount(Empty request, ServerCallContext context) + { + return Task.FromResult(new UnsetFacebookAccountResponse()); + } +} diff --git a/src/Services/WeaponService.cs b/src/Services/WeaponService.cs new file mode 100644 index 0000000..36fb130 --- /dev/null +++ b/src/Services/WeaponService.cs @@ -0,0 +1,1193 @@ +using Grpc.Core; +using MariesWonderland.Data; +using MariesWonderland.Extensions; +using MariesWonderland.Models.Entities; +using MariesWonderland.Models.Type; +using MariesWonderland.Proto.Weapon; + +namespace MariesWonderland.Services; + +public class WeaponService(DarkMasterMemoryDatabase masterDb, UserDataStore store, GameConfig gameConfig) + : MariesWonderland.Proto.Weapon.WeaponService.WeaponServiceBase +{ + private readonly DarkMasterMemoryDatabase _masterDb = masterDb; + private readonly UserDataStore _store = store; + private readonly GameConfig _gameConfig = gameConfig; + + /// + /// Sells one or more weapons from the player's inventory, granting gold based on weapon level and any exchange medals. + /// + /// + /// Sells weapons: grants gold based on level, awards exchange items, and removes weapon records. + /// + public override Task Sell(SellRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + + int totalGold = 0; + + foreach (string uuid in request.UserWeaponUuid) + { + EntityIUserWeapon? weapon = FindWeapon(userDb, uuid); + if (weapon == null) + { + continue; + } + + EntityMWeapon? wm = FindWeaponMaster(weapon.WeaponId); + if (wm == null) + { + continue; + } + + // Calculate sell price based on weapon level + EntityMWeaponSpecificEnhance? enhance = FindEnhance(wm.WeaponSpecificEnhanceId); + if (enhance != null) + { + totalGold += EvaluateNumericalFunction(enhance.SellPriceNumericalFunctionId, weapon.Level); + } + + // Grant exchange medals associated with this weapon + foreach (EntityMWeaponConsumeExchangeConsumableItemGroup exchange in _masterDb.EntityMWeaponConsumeExchangeConsumableItemGroup) + { + if (exchange.WeaponId == weapon.WeaponId) + { + AddConsumableItem(userDb, userId, exchange.ConsumableItemId, exchange.Count); + } + } + + // Remove the weapon and all associated skill/ability/awaken records + userDb.EntityIUserWeapon.Remove(weapon); + userDb.EntityIUserWeaponSkill.RemoveAll(s => s.UserWeaponUuid == uuid); + userDb.EntityIUserWeaponAbility.RemoveAll(a => a.UserWeaponUuid == uuid); + userDb.EntityIUserWeaponAwaken.RemoveAll(a => a.UserWeaponUuid == uuid); + } + + if (totalGold > 0) + { + AddConsumableItem(userDb, userId, _gameConfig.ConsumableItemIdForGold, totalGold); + } + + return Task.FromResult(new SellResponse()); + } + + /// + /// Marks one or more weapons as protected, preventing them from being accidentally sold or used as fodder. + /// + /// + /// Marks weapons as protected to prevent accidental sale or consumption. + /// + public override Task Protect(ProtectRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + + foreach (string uuid in request.UserWeaponUuid) + { + EntityIUserWeapon? weapon = FindWeapon(userDb, uuid); + if (weapon != null) + { + weapon.IsProtected = true; + } + } + + return Task.FromResult(new ProtectResponse()); + } + + /// + /// Removes the protection flag from one or more weapons, allowing them to be sold or used as fodder again. + /// + /// + /// Removes protection from weapons, allowing sale or consumption. + /// + public override Task Unprotect(UnprotectRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + + foreach (string uuid in request.UserWeaponUuid) + { + EntityIUserWeapon? weapon = FindWeapon(userDb, uuid); + if (weapon != null) + { + weapon.IsProtected = false; + } + } + + return Task.FromResult(new UnprotectResponse()); + } + + /// + /// Enhances a weapon using enhancement materials to gain EXP. Materials matching the weapon's type grant a 1.5x EXP bonus. + /// + public override Task EnhanceByMaterial(EnhanceByMaterialRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + + EntityIUserWeapon? weapon = FindWeapon(userDb, request.UserWeaponUuid); + if (weapon == null) + { + return Task.FromResult(new EnhanceByMaterialResponse { IsGreatSuccess = false }); + } + + EntityMWeapon? wm = FindWeaponMaster(weapon.WeaponId); + if (wm == null) + { + return Task.FromResult(new EnhanceByMaterialResponse { IsGreatSuccess = false }); + } + + // Consume materials and calculate total EXP gained + int totalExp = 0; + int totalMaterialCount = 0; + + foreach (KeyValuePair entry in request.Materials) + { + int materialId = entry.Key; + int count = entry.Value; + + EntityMMaterial? mat = FindMaterial(materialId); + if (mat == null) + { + continue; + } + + EntityIUserMaterial? userMat = FindUserMaterial(userDb, materialId); + if (userMat == null || userMat.Count < count) + { + continue; + } + + userMat.Count -= count; + totalMaterialCount += count; + + // Apply 1.5x EXP bonus when material weapon type matches the target weapon + int expPerUnit = mat.EffectValue; + if (mat.WeaponType != WeaponType.UNKNOWN && mat.WeaponType == wm.WeaponType) + { + expPerUnit = expPerUnit * _gameConfig.MaterialSameWeaponExpCoefficientPermil / 1000; + } + totalExp += expPerUnit * count; + } + + // Deduct gold cost scaled by number of materials used + if (totalMaterialCount > 0) + { + EntityMWeaponSpecificEnhance? enhance = FindEnhance(wm.WeaponSpecificEnhanceId); + if (enhance != null) + { + int goldCost = EvaluateNumericalFunction(enhance.EnhancementCostByMaterialNumericalFunctionId, totalMaterialCount); + SubtractGold(userDb, goldCost); + } + } + + // Apply EXP, recalculate level, and check for new story page unlocks + weapon.Exp += totalExp; + ApplyLevelFromExp(weapon, wm); + + CheckWeaponStoryUnlocks(userDb, userId, weapon.WeaponId, weapon.Level); + + return Task.FromResult(new EnhanceByMaterialResponse { IsGreatSuccess = false }); + } + + /// + /// Enhances a weapon by consuming other weapons as EXP fodder. Same-type fodder grants a 1.5x EXP bonus. + /// + public override Task EnhanceByWeapon(EnhanceByWeaponRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + + EntityIUserWeapon? weapon = FindWeapon(userDb, request.UserWeaponUuid); + if (weapon == null) + { + return Task.FromResult(new EnhanceByWeaponResponse { IsGreatSuccess = false }); + } + + EntityMWeapon? wm = FindWeaponMaster(weapon.WeaponId); + if (wm == null) + { + return Task.FromResult(new EnhanceByWeaponResponse { IsGreatSuccess = false }); + } + + int totalExp = 0; + int consumedCount = 0; + + foreach (string matUuid in request.MaterialUserWeaponUuids) + { + EntityIUserWeapon? matWeapon = FindWeapon(userDb, matUuid); + if (matWeapon == null) + { + continue; + } + + // Calculate EXP from the fodder weapon, with same-type bonus + EntityMWeapon? matMaster = FindWeaponMaster(matWeapon.WeaponId); + if (matMaster == null) + { + continue; + } + + EntityMWeaponSpecificEnhance? matEnhance = FindEnhance(matMaster.WeaponSpecificEnhanceId); + int baseExp = matEnhance?.BaseEnhancementObtainedExp ?? 0; + if (matMaster.WeaponType != WeaponType.UNKNOWN && matMaster.WeaponType == wm.WeaponType) + { + baseExp = baseExp * _gameConfig.MaterialSameWeaponExpCoefficientPermil / 1000; + } + totalExp += baseExp; + + // Grant exchange medals before destroying the fodder weapon + foreach (EntityMWeaponConsumeExchangeConsumableItemGroup exchange in _masterDb.EntityMWeaponConsumeExchangeConsumableItemGroup) + { + if (exchange.WeaponId == matWeapon.WeaponId) + { + AddConsumableItem(userDb, userId, exchange.ConsumableItemId, exchange.Count); + } + } + + // Remove the consumed fodder weapon and all its associated records + userDb.EntityIUserWeapon.Remove(matWeapon); + userDb.EntityIUserWeaponSkill.RemoveAll(s => s.UserWeaponUuid == matUuid); + userDb.EntityIUserWeaponAbility.RemoveAll(a => a.UserWeaponUuid == matUuid); + userDb.EntityIUserWeaponAwaken.RemoveAll(a => a.UserWeaponUuid == matUuid); + consumedCount++; + } + + // Deduct gold cost scaled by number of weapons consumed + if (consumedCount > 0) + { + EntityMWeaponSpecificEnhance? enhance = FindEnhance(wm.WeaponSpecificEnhanceId); + if (enhance != null) + { + int goldCost = EvaluateNumericalFunction(enhance.EnhancementCostByWeaponNumericalFunctionId, consumedCount); + SubtractGold(userDb, goldCost); + } + } + + // Apply EXP, recalculate level, and check for new story page unlocks + weapon.Exp += totalExp; + ApplyLevelFromExp(weapon, wm); + + CheckWeaponStoryUnlocks(userDb, userId, weapon.WeaponId, weapon.Level); + + return Task.FromResult(new EnhanceByWeaponResponse { IsGreatSuccess = false }); + } + + /// + /// Levels up a weapon's skill by spending materials and gold. Max skill level depends on the weapon's limit break count. + /// + public override Task EnhanceSkill(EnhanceSkillRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + + EntityIUserWeapon? weapon = FindWeapon(userDb, request.UserWeaponUuid); + if (weapon == null) + { + return Task.FromResult(new EnhanceSkillResponse()); + } + + EntityMWeapon? wm = FindWeaponMaster(weapon.WeaponId); + if (wm == null) + { + return Task.FromResult(new EnhanceSkillResponse()); + } + + // Look up which skill slot corresponds to the requested skill ID + EntityMWeaponSkillGroup? skillGroup = null; + foreach (EntityMWeaponSkillGroup sg in _masterDb.EntityMWeaponSkillGroup) + { + if (sg.WeaponSkillGroupId == wm.WeaponSkillGroupId && sg.SkillId == request.SkillId) + { + skillGroup = sg; + break; + } + } + + if (skillGroup == null) + { + return Task.FromResult(new EnhanceSkillResponse()); + } + + // Find the user's current skill level for this slot + EntityIUserWeaponSkill? userSkill = null; + foreach (EntityIUserWeaponSkill s in userDb.EntityIUserWeaponSkill) + { + if (s.UserWeaponUuid == request.UserWeaponUuid && s.SlotNumber == skillGroup.SlotNumber) + { + userSkill = s; + break; + } + } + + if (userSkill == null) + { + return Task.FromResult(new EnhanceSkillResponse()); + } + + // Cap the requested level increase at the skill's max level (based on limit break count) + EntityMWeaponSpecificEnhance? enhance = FindEnhance(wm.WeaponSpecificEnhanceId); + if (enhance == null) + { + return Task.FromResult(new EnhanceSkillResponse()); + } + + int maxLevel = EvaluateNumericalFunction(enhance.MaxSkillLevelNumericalFunctionId, weapon.LimitBreakCount); + int addCount = request.AddLevelCount; + if (userSkill.Level + addCount > maxLevel) + { + addCount = maxLevel - userSkill.Level; + } + if (addCount <= 0) + { + return Task.FromResult(new EnhanceSkillResponse()); + } + + // Deduct materials and gold for each level gained + for (int lvl = userSkill.Level; lvl < userSkill.Level + addCount; lvl++) + { + foreach (EntityMWeaponSkillEnhancementMaterial mat in _masterDb.EntityMWeaponSkillEnhancementMaterial) + { + if (mat.WeaponSkillEnhancementMaterialId == skillGroup.WeaponSkillEnhancementMaterialId && mat.SkillLevel == lvl) + { + EntityIUserMaterial? userMat = FindUserMaterial(userDb, mat.MaterialId); + if (userMat != null) + { + int cost = Math.Min(mat.Count, userMat.Count); + userMat.Count -= cost; + } + } + } + + int goldCost = EvaluateNumericalFunction(enhance.SkillEnhancementCostNumericalFunctionId, lvl + 1); + SubtractGold(userDb, goldCost); + } + + userSkill.Level += addCount; + + return Task.FromResult(new EnhanceSkillResponse()); + } + + /// + /// Levels up a weapon's passive ability by spending materials and gold. Max ability level depends on the weapon's limit break count. + /// + public override Task EnhanceAbility(EnhanceAbilityRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + + EntityIUserWeapon? weapon = FindWeapon(userDb, request.UserWeaponUuid); + if (weapon == null) + { + return Task.FromResult(new EnhanceAbilityResponse()); + } + + EntityMWeapon? wm = FindWeaponMaster(weapon.WeaponId); + if (wm == null) + { + return Task.FromResult(new EnhanceAbilityResponse()); + } + + // Look up which ability slot corresponds to the requested ability ID + EntityMWeaponAbilityGroup? abilityGroup = null; + foreach (EntityMWeaponAbilityGroup ag in _masterDb.EntityMWeaponAbilityGroup) + { + if (ag.WeaponAbilityGroupId == wm.WeaponAbilityGroupId && ag.AbilityId == request.AbilityId) + { + abilityGroup = ag; + break; + } + } + + if (abilityGroup == null) + { + return Task.FromResult(new EnhanceAbilityResponse()); + } + + // Find the user's current ability level for this slot + EntityIUserWeaponAbility? userAbility = null; + foreach (EntityIUserWeaponAbility a in userDb.EntityIUserWeaponAbility) + { + if (a.UserWeaponUuid == request.UserWeaponUuid && a.SlotNumber == abilityGroup.SlotNumber) + { + userAbility = a; + break; + } + } + + if (userAbility == null) + { + return Task.FromResult(new EnhanceAbilityResponse()); + } + + // Cap the requested level increase at the ability's max level (based on limit break count) + EntityMWeaponSpecificEnhance? enhance = FindEnhance(wm.WeaponSpecificEnhanceId); + if (enhance == null) + { + return Task.FromResult(new EnhanceAbilityResponse()); + } + + int maxLevel = EvaluateNumericalFunction(enhance.MaxAbilityLevelNumericalFunctionId, weapon.LimitBreakCount); + int addCount = request.AddLevelCount; + if (userAbility.Level + addCount > maxLevel) + { + addCount = maxLevel - userAbility.Level; + } + if (addCount <= 0) + { + return Task.FromResult(new EnhanceAbilityResponse()); + } + + // Deduct materials and gold for each level gained + for (int lvl = userAbility.Level; lvl < userAbility.Level + addCount; lvl++) + { + foreach (EntityMWeaponAbilityEnhancementMaterial mat in _masterDb.EntityMWeaponAbilityEnhancementMaterial) + { + if (mat.WeaponAbilityEnhancementMaterialId == abilityGroup.WeaponAbilityEnhancementMaterialId && mat.AbilityLevel == lvl) + { + EntityIUserMaterial? userMat = FindUserMaterial(userDb, mat.MaterialId); + if (userMat != null) + { + int cost = Math.Min(mat.Count, userMat.Count); + userMat.Count -= cost; + } + } + } + + int goldCost = EvaluateNumericalFunction(enhance.AbilityEnhancementCostNumericalFunctionId, lvl + 1); + SubtractGold(userDb, goldCost); + } + + userAbility.Level += addCount; + + return Task.FromResult(new EnhanceAbilityResponse()); + } + + /// + /// Limit-breaks a weapon using materials: deducts materials and gold, increments break count. + /// + /// + /// Limit breaks a weapon using materials, raising its max level cap. Capped at 4 total limit breaks. + /// + public override Task LimitBreakByMaterial(LimitBreakByMaterialRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + + EntityIUserWeapon? weapon = FindWeapon(userDb, request.UserWeaponUuid); + if (weapon == null || weapon.LimitBreakCount >= _gameConfig.WeaponLimitBreakAvailableCount) + { + return Task.FromResult(new LimitBreakByMaterialResponse()); + } + + EntityMWeapon? wm = FindWeaponMaster(weapon.WeaponId); + if (wm == null) + { + return Task.FromResult(new LimitBreakByMaterialResponse()); + } + + // Consume materials up to the remaining limit break slots + int remaining = _gameConfig.WeaponLimitBreakAvailableCount - weapon.LimitBreakCount; + int totalMaterialCount = 0; + + foreach (KeyValuePair entry in request.Materials) + { + if (totalMaterialCount >= remaining) + { + break; + } + + int materialId = entry.Key; + int count = entry.Value; + if (count > remaining - totalMaterialCount) + { + count = remaining - totalMaterialCount; + } + + EntityIUserMaterial? userMat = FindUserMaterial(userDb, materialId); + if (userMat == null) + { + continue; + } + + if (userMat.Count < count) + { + count = userMat.Count; + } + userMat.Count -= count; + totalMaterialCount += count; + } + + // Deduct gold cost for the limit break + if (totalMaterialCount > 0) + { + EntityMWeaponSpecificEnhance? enhance = FindEnhance(wm.WeaponSpecificEnhanceId); + if (enhance != null) + { + int goldCost = EvaluateNumericalFunction(enhance.LimitBreakCostByMaterialNumericalFunctionId, totalMaterialCount); + SubtractGold(userDb, goldCost); + } + } + + weapon.LimitBreakCount += totalMaterialCount; + + // Track the highest limit break count in the weapon note + UpdateWeaponNote(userDb, userId, weapon); + + return Task.FromResult(new LimitBreakByMaterialResponse()); + } + + /// + /// Limit-breaks a weapon by consuming duplicate weapons: awards exchange items, deducts gold. + /// + /// + /// Limit breaks a weapon by consuming duplicate weapons, raising its max level cap. Capped at 4 total limit breaks. + /// + public override Task LimitBreakByWeapon(LimitBreakByWeaponRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + + EntityIUserWeapon? weapon = FindWeapon(userDb, request.UserWeaponUuid); + if (weapon == null || weapon.LimitBreakCount >= _gameConfig.WeaponLimitBreakAvailableCount) + { + return Task.FromResult(new LimitBreakByWeaponResponse()); + } + + EntityMWeapon? wm = FindWeaponMaster(weapon.WeaponId); + if (wm == null) + { + return Task.FromResult(new LimitBreakByWeaponResponse()); + } + + // Consume duplicate weapons up to the remaining limit break slots + int remaining = _gameConfig.WeaponLimitBreakAvailableCount - weapon.LimitBreakCount; + int consumedCount = 0; + + foreach (string matUuid in request.MaterialUserWeaponUuids) + { + if (consumedCount >= remaining) + { + break; + } + + EntityIUserWeapon? matWeapon = FindWeapon(userDb, matUuid); + if (matWeapon == null) + { + continue; + } + + // Grant exchange medals before destroying the consumed weapon + foreach (EntityMWeaponConsumeExchangeConsumableItemGroup exchange in _masterDb.EntityMWeaponConsumeExchangeConsumableItemGroup) + { + if (exchange.WeaponId == matWeapon.WeaponId) + { + AddConsumableItem(userDb, userId, exchange.ConsumableItemId, exchange.Count); + } + } + + // Remove the consumed weapon and all its associated records + userDb.EntityIUserWeapon.Remove(matWeapon); + userDb.EntityIUserWeaponSkill.RemoveAll(s => s.UserWeaponUuid == matUuid); + userDb.EntityIUserWeaponAbility.RemoveAll(a => a.UserWeaponUuid == matUuid); + userDb.EntityIUserWeaponAwaken.RemoveAll(a => a.UserWeaponUuid == matUuid); + consumedCount++; + } + + // Deduct gold cost for the limit break + if (consumedCount > 0) + { + EntityMWeaponSpecificEnhance? enhance = FindEnhance(wm.WeaponSpecificEnhanceId); + if (enhance != null) + { + int goldCost = EvaluateNumericalFunction(enhance.LimitBreakCostByWeaponNumericalFunctionId, consumedCount); + SubtractGold(userDb, goldCost); + } + } + + weapon.LimitBreakCount += consumedCount; + + // Track the highest limit break count in the weapon note + UpdateWeaponNote(userDb, userId, weapon); + + return Task.FromResult(new LimitBreakByWeaponResponse()); + } + + /// + /// Evolves a weapon to its next form: deducts materials and gold, updates weapon ID and ability slots. + /// + /// + /// Evolves a weapon to its next form, consuming evolution materials and gold. Resets ability slots to the evolved weapon's layout. + /// + public override Task Evolve(EvolveRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + + EntityIUserWeapon? weapon = FindWeapon(userDb, request.UserWeaponUuid); + if (weapon == null) + { + return Task.FromResult(new EvolveResponse()); + } + + EntityMWeapon? wm = FindWeaponMaster(weapon.WeaponId); + if (wm == null) + { + return Task.FromResult(new EvolveResponse()); + } + + // Find the next weapon in the evolution chain + int evolvedId = 0; + foreach (EntityMWeaponEvolutionGroup evo in _masterDb.EntityMWeaponEvolutionGroup) + { + if (evo.WeaponId == weapon.WeaponId) + { + int currentOrder = evo.EvolutionOrder; + foreach (EntityMWeaponEvolutionGroup next in _masterDb.EntityMWeaponEvolutionGroup) + { + if (next.WeaponEvolutionGroupId == evo.WeaponEvolutionGroupId && next.EvolutionOrder == currentOrder + 1) + { + evolvedId = next.WeaponId; + break; + } + } + break; + } + } + + if (evolvedId == 0) + { + return Task.FromResult(new EvolveResponse()); + } + + // Consume evolution materials + int totalMaterialCount = 0; + foreach (EntityMWeaponEvolutionMaterialGroup mat in _masterDb.EntityMWeaponEvolutionMaterialGroup) + { + if (mat.WeaponEvolutionMaterialGroupId == wm.WeaponEvolutionMaterialGroupId) + { + EntityIUserMaterial? userMat = FindUserMaterial(userDb, mat.MaterialId); + if (userMat != null) + { + int cost = Math.Min(mat.Count, userMat.Count); + userMat.Count -= cost; + totalMaterialCount += cost; + } + } + } + + // Deduct gold cost for the evolution + if (totalMaterialCount > 0) + { + EntityMWeaponSpecificEnhance? enhance = FindEnhance(wm.WeaponSpecificEnhanceId); + if (enhance != null) + { + int goldCost = EvaluateNumericalFunction(enhance.EvolutionCostNumericalFunctionId, totalMaterialCount); + SubtractGold(userDb, goldCost); + } + } + + // Transform the weapon into its evolved form + weapon.WeaponId = evolvedId; + + // Replace ability slots with the evolved weapon's ability layout + EntityMWeapon? evolvedMaster = FindWeaponMaster(evolvedId); + if (evolvedMaster != null) + { + userDb.EntityIUserWeaponAbility.RemoveAll(a => a.UserWeaponUuid == request.UserWeaponUuid); + foreach (EntityMWeaponAbilityGroup ag in _masterDb.EntityMWeaponAbilityGroup) + { + if (ag.WeaponAbilityGroupId == evolvedMaster.WeaponAbilityGroupId) + { + userDb.EntityIUserWeaponAbility.Add(new EntityIUserWeaponAbility + { + UserId = userId, + UserWeaponUuid = request.UserWeaponUuid, + SlotNumber = ag.SlotNumber, + Level = 1 + }); + } + } + } + + // Check if the evolution unlocks new weapon story pages + CheckWeaponStoryUnlocks(userDb, userId, evolvedId, weapon.Level); + + return Task.FromResult(new EvolveResponse()); + } + + /// + /// Awakens a weapon: deducts materials and gold, records awaken state. + /// + /// + /// Awakens a weapon, unlocking its awakening bonus. Consumes awakening materials and gold. Can only be done once per weapon. + /// + public override Task Awaken(AwakenRequest request, ServerCallContext context) + { + long userId = context.GetUserId(); + DarkUserMemoryDatabase userDb = _store.GetOrCreate(userId); + + EntityIUserWeapon? weapon = FindWeapon(userDb, request.UserWeaponUuid); + if (weapon == null) + { + return Task.FromResult(new AwakenResponse()); + } + + // Weapon can only be awakened once + foreach (EntityIUserWeaponAwaken aw in userDb.EntityIUserWeaponAwaken) + { + if (aw.UserWeaponUuid == request.UserWeaponUuid) + { + return Task.FromResult(new AwakenResponse()); + } + } + + // Look up awakening requirements from master data + EntityMWeaponAwaken? awakenMaster = null; + foreach (EntityMWeaponAwaken wa in _masterDb.EntityMWeaponAwaken) + { + if (wa.WeaponId == weapon.WeaponId) + { + awakenMaster = wa; + break; + } + } + + if (awakenMaster == null) + { + return Task.FromResult(new AwakenResponse()); + } + + // Consume awakening materials + foreach (EntityMWeaponAwakenMaterialGroup mat in _masterDb.EntityMWeaponAwakenMaterialGroup) + { + if (mat.WeaponAwakenMaterialGroupId == awakenMaster.WeaponAwakenMaterialGroupId) + { + EntityIUserMaterial? userMat = FindUserMaterial(userDb, mat.MaterialId); + if (userMat != null) + { + int cost = Math.Min(mat.Count, userMat.Count); + userMat.Count -= cost; + } + } + } + + SubtractGold(userDb, awakenMaster.ConsumeGold); + + // Record the awakening + userDb.EntityIUserWeaponAwaken.Add(new EntityIUserWeaponAwaken + { + UserId = userId, + UserWeaponUuid = request.UserWeaponUuid + }); + + return Task.FromResult(new AwakenResponse()); + } + + #region Helper Methods + + /// + /// Finds a user weapon by UUID. + /// + /// + /// Looks up a user's weapon by its unique identifier. + /// + private static EntityIUserWeapon? FindWeapon(DarkUserMemoryDatabase userDb, string uuid) + { + foreach (EntityIUserWeapon w in userDb.EntityIUserWeapon) + { + if (w.UserWeaponUuid == uuid) + { + return w; + } + } + return null; + } + + /// + /// Finds a weapon's master data definition by weapon ID. + /// + /// + /// Looks up weapon master data (read-only definition) by weapon ID. + /// + private EntityMWeapon? FindWeaponMaster(int weaponId) + { + foreach (EntityMWeapon w in _masterDb.EntityMWeapon) + { + if (w.WeaponId == weaponId) + { + return w; + } + } + return null; + } + + /// + /// Finds weapon-specific enhancement parameters by enhance ID. + /// + /// + /// Looks up the weapon-specific enhancement parameters (cost formulas, max levels, etc.) by enhance ID. + /// + private EntityMWeaponSpecificEnhance? FindEnhance(int enhanceId) + { + foreach (EntityMWeaponSpecificEnhance e in _masterDb.EntityMWeaponSpecificEnhance) + { + if (e.WeaponSpecificEnhanceId == enhanceId) + { + return e; + } + } + return null; + } + + /// + /// Finds a material's master data definition by material ID. + /// + /// + /// Looks up material master data (read-only definition) by material ID. + /// + private EntityMMaterial? FindMaterial(int materialId) + { + foreach (EntityMMaterial m in _masterDb.EntityMMaterial) + { + if (m.MaterialId == materialId) + { + return m; + } + } + return null; + } + + /// + /// Finds a user's material record by material ID. + /// + /// + /// Looks up a user's material inventory entry by material ID. + /// + private static EntityIUserMaterial? FindUserMaterial(DarkUserMemoryDatabase userDb, int materialId) + { + foreach (EntityIUserMaterial m in userDb.EntityIUserMaterial) + { + if (m.MaterialId == materialId) + { + return m; + } + } + return null; + } + + /// + /// Adds a consumable item to the user, creating the record if needed. + /// + /// + /// Grants a consumable item to the user, creating the inventory entry if it doesn't exist yet. + /// + private static void AddConsumableItem(DarkUserMemoryDatabase userDb, long userId, int itemId, int count) + { + foreach (EntityIUserConsumableItem ci in userDb.EntityIUserConsumableItem) + { + if (ci.ConsumableItemId == itemId) + { + ci.Count += count; + return; + } + } + + userDb.EntityIUserConsumableItem.Add(new EntityIUserConsumableItem + { + UserId = userId, + ConsumableItemId = itemId, + Count = count, + FirstAcquisitionDatetime = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds() + }); + } + + /// + /// Deducts gold (consumable item ID 1) from the user's inventory. + /// + /// + /// Deducts gold (consumable item ID 1) from the user's inventory. + /// + private void SubtractGold(DarkUserMemoryDatabase userDb, int amount) + { + if (amount <= 0) + { + return; + } + + foreach (EntityIUserConsumableItem ci in userDb.EntityIUserConsumableItem) + { + if (ci.ConsumableItemId == _gameConfig.ConsumableItemIdForGold) + { + ci.Count -= amount; + return; + } + } + } + + /// + /// Recalculates weapon level from current EXP using parameter map thresholds. + /// + /// + /// Recalculates the weapon's level from its accumulated EXP using master data EXP thresholds. Caps EXP at the max threshold. + /// + private void ApplyLevelFromExp(EntityIUserWeapon weapon, EntityMWeapon wm) + { + EntityMWeaponSpecificEnhance? enhance = FindEnhance(wm.WeaponSpecificEnhanceId); + if (enhance == null) + { + return; + } + + // Build EXP-to-level threshold table from master data parameter map + int paramMapId = enhance.RequiredExpForLevelUpNumericalParameterMapId; + int maxKey = 0; + foreach (EntityMNumericalParameterMap row in _masterDb.EntityMNumericalParameterMap) + { + if (row.NumericalParameterMapId == paramMapId && row.ParameterKey > maxKey) + { + maxKey = row.ParameterKey; + } + } + + int[] thresholds = new int[maxKey + 1]; + foreach (EntityMNumericalParameterMap row in _masterDb.EntityMNumericalParameterMap) + { + if (row.NumericalParameterMapId == paramMapId && row.ParameterKey < thresholds.Length) + { + thresholds[row.ParameterKey] = row.ParameterValue; + } + } + + // Find the highest level whose cumulative EXP threshold is met + int level = 1; + for (int lvl = 1; lvl < thresholds.Length; lvl++) + { + if (weapon.Exp >= thresholds[lvl]) + { + level = lvl; + } + else + { + break; + } + } + + // Cap EXP at the highest threshold when at max level + if (level > 0 && level < thresholds.Length - 1) + { + } + else if (level >= thresholds.Length - 1 && thresholds.Length > 1) + { + weapon.Exp = thresholds[^1]; + } + + weapon.Level = level; + } + + /// + /// Updates the weapon note's max limit break count if the weapon exceeds it. + /// + /// + /// Updates the weapon note to track the highest limit break count ever achieved for this weapon. + /// + private static void UpdateWeaponNote(DarkUserMemoryDatabase userDb, long userId, EntityIUserWeapon weapon) + { + EntityIUserWeaponNote? note = null; + foreach (EntityIUserWeaponNote n in userDb.EntityIUserWeaponNote) + { + if (n.WeaponId == weapon.WeaponId) + { + note = n; + break; + } + } + + if (note != null && note.MaxLimitBreakCount < weapon.LimitBreakCount) + { + note.MaxLimitBreakCount = weapon.LimitBreakCount; + } + } + + /// + /// Evaluates weapon story release conditions and unlocks eligible stories. + /// + /// + /// Evaluates weapon story release conditions and unlocks story pages when conditions are met (level reached, evolution, acquisition, etc.). + /// + private void CheckWeaponStoryUnlocks(DarkUserMemoryDatabase userDb, long userId, int weaponId, int level) + { + EntityMWeapon? wm = FindWeaponMaster(weaponId); + if (wm == null || wm.WeaponStoryReleaseConditionGroupId == 0) + { + return; + } + + // Determine the weapon's position in its evolution chain + bool hasEvo = false; + int evoOrder = 0; + foreach (EntityMWeaponEvolutionGroup evo in _masterDb.EntityMWeaponEvolutionGroup) + { + if (evo.WeaponId == weaponId) + { + hasEvo = true; + evoOrder = evo.EvolutionOrder; + break; + } + } + + // Evaluate each story release condition for this weapon + foreach (EntityMWeaponStoryReleaseConditionGroup cond in _masterDb.EntityMWeaponStoryReleaseConditionGroup) + { + if (cond.WeaponStoryReleaseConditionGroupId != wm.WeaponStoryReleaseConditionGroupId) + { + continue; + } + + bool shouldUnlock = cond.WeaponStoryReleaseConditionType switch + { + WeaponStoryReleaseConditionType.ACQUISITION => true, + WeaponStoryReleaseConditionType.REACH_SPECIFIED_LEVEL => level >= cond.ConditionValue, + WeaponStoryReleaseConditionType.REACH_INITIAL_MAX_LEVEL => CheckInitialMaxLevel(wm, level), + WeaponStoryReleaseConditionType.REACH_ONCE_EVOLVED_MAX_LEVEL => hasEvo && evoOrder >= 1 && CheckInitialMaxLevel(wm, level), + WeaponStoryReleaseConditionType.REACH_SPECIFIED_EVOLUTION_COUNT => hasEvo && evoOrder >= cond.ConditionValue, + _ => false + }; + + if (shouldUnlock) + { + GrantWeaponStoryUnlock(userDb, userId, weaponId, cond.StoryIndex); + } + } + } + + /// + /// Checks whether the weapon has reached its initial (pre-evolution) max level. + /// + /// + /// Checks whether the weapon has reached its initial (pre-limit-break) max level. + /// + private bool CheckInitialMaxLevel(EntityMWeapon wm, int level) + { + EntityMWeaponSpecificEnhance? enhance = FindEnhance(wm.WeaponSpecificEnhanceId); + if (enhance == null) + { + return false; + } + + int maxLevel = EvaluateNumericalFunction(enhance.MaxLevelNumericalFunctionId, 0); + return level >= maxLevel; + } + + /// + /// Creates or updates a weapon story unlock record. + /// + /// + /// Unlocks a weapon story page, creating the story record if new or advancing the max released story index. + /// + private static void GrantWeaponStoryUnlock(DarkUserMemoryDatabase userDb, long userId, int weaponId, int storyIndex) + { + EntityIUserWeaponStory? existing = null; + foreach (EntityIUserWeaponStory ws in userDb.EntityIUserWeaponStory) + { + if (ws.WeaponId == weaponId) + { + existing = ws; + break; + } + } + + if (existing != null) + { + if (existing.ReleasedMaxStoryIndex < storyIndex) + { + existing.ReleasedMaxStoryIndex = storyIndex; + } + } + else + { + userDb.EntityIUserWeaponStory.Add(new EntityIUserWeaponStory + { + UserId = userId, + WeaponId = weaponId, + ReleasedMaxStoryIndex = storyIndex + }); + } + } + + /// + /// Evaluates a numerical function (linear, monomial, polynomial) from master data parameters. + /// + /// + /// Evaluates a master data numerical function (LINEAR, MONOMIAL, POLYNOMIAL, etc.) used for cost and threshold calculations. + /// + private int EvaluateNumericalFunction(int functionId, int value) { + EntityMNumericalFunction? func = null; + foreach (EntityMNumericalFunction f in _masterDb.EntityMNumericalFunction) + { + if (f.NumericalFunctionId == functionId) + { + func = f; + break; + } + } + + if (func == null) + { + return 0; + } + + List<(int Index, int Value)> paramEntries = []; + foreach (EntityMNumericalFunctionParameterGroup pg in _masterDb.EntityMNumericalFunctionParameterGroup) + { + if (pg.NumericalFunctionParameterGroupId == func.NumericalFunctionParameterGroupId) + { + paramEntries.Add((pg.ParameterIndex, pg.ParameterValue)); + } + } + paramEntries.Sort((a, b) => a.Index.CompareTo(b.Index)); + + int[] p = new int[paramEntries.Count]; + for (int i = 0; i < paramEntries.Count; i++) + { + p[i] = paramEntries[i].Value; + } + + return func.NumericalFunctionType switch + { + NumericalFunctionType.LINEAR when p.Length >= 2 => p[1] + p[0] * value, + NumericalFunctionType.MONOMIAL when p.Length >= 2 => EvaluateMonomial(p, value), + NumericalFunctionType.LINEAR_PERMIL when p.Length >= 2 => p[0] * value / 1000 + p[1], + NumericalFunctionType.POLYNOMIAL_THIRD when p.Length >= 4 => p[3] + (p[2] + (p[1] + p[0] * value) * value) * value, + NumericalFunctionType.POLYNOMIAL_THIRD_PERMIL when p.Length >= 4 => + p[0] * value * value * value / 1000 + + p[1] * value * value / 1000 + + p[2] * value / 1000 + + p[3], + _ => 0 + }; + } + + /// + /// Computes a monomial function: coefficient * (value - 1) ^ exponent. + /// + private static int EvaluateMonomial(int[] p, int value) + { + int v = value - 1; + int result = v; + int counter = p[1]; + if (counter > 1) + { + counter--; + while (counter > 0) + { + counter--; + result *= v; + } + } + return result * p[0]; + } + + #endregion +} diff --git a/src/appsettings.Development.json b/src/appsettings.Development.json new file mode 100644 index 0000000..ba3ffad --- /dev/null +++ b/src/appsettings.Development.json @@ -0,0 +1,21 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning", + "MariesWonderland": "Debug" + } + }, + "Server": { + "Paths": { + "AssetDatabase": "path\\to\\revisions", + "MasterDatabase": "path\\to\\master\\bin", + "ResourcesBaseUrl": "http://192.168.1.1/aaaaaaaaaaaaaaaaaaaaaaaa" + }, + "Data": { + "LatestMasterDataVersion": "1234567890", + "UserDataPath": "Data/UserData", + "UserDatabase": "userdata.json" + } + } +} diff --git a/src/appsettings.json b/src/appsettings.json new file mode 100644 index 0000000..14cfd0d --- /dev/null +++ b/src/appsettings.json @@ -0,0 +1,28 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning", + "Microsoft.AspNetCore.Hosting": "Information", + "Microsoft.AspNetCore.Routing.EndpointMiddleware": "Information" + } + }, + "AllowedHosts": "*", + "Kestrel": { + "EndpointDefaults": { + "Protocols": "Http2" + } + }, + "Server": { + "Paths": { + "AssetDatabase": "", + "MasterDatabase": "", + "ResourcesBaseUrl": "" + }, + "Data": { + "LatestMasterDataVersion": "", + "UserDataPath": "", + "UserDatabase": "userdata.json" + } + } +} diff --git a/src/proto/banner.proto b/src/proto/banner.proto new file mode 100644 index 0000000..0728009 --- /dev/null +++ b/src/proto/banner.proto @@ -0,0 +1,29 @@ +syntax = "proto3"; + +option csharp_namespace = "MariesWonderland.Proto.Banner"; + +import "proto/mission.proto"; +import "proto/data.proto"; + +package apb.api.banner; + +service BannerService { + rpc GetMamaBanner (GetMamaBannerRequest) returns (GetMamaBannerResponse); +} + +message GetMamaBannerRequest { + apb.api.mission.CageMeasurableValues cageMeasurableValues = 50; +} + +message GetMamaBannerResponse { + repeated GachaBanner termLimitedGacha = 2; + GachaBanner latestChapterGacha = 3; + bool isExistUnreadPop = 4; + map diffUserData = 99; +} + +message GachaBanner { + int32 gachaLabelType = 1; + string gachaAssetName = 2; + int32 gachaId = 3; +} \ No newline at end of file diff --git a/src/proto/battle.proto b/src/proto/battle.proto new file mode 100644 index 0000000..5f35b40 --- /dev/null +++ b/src/proto/battle.proto @@ -0,0 +1,138 @@ +syntax = "proto3"; + +option csharp_namespace = "MariesWonderland.Proto.Battle"; + +import "proto/data.proto"; + +package apb.api.battle; + +service BattleService { + rpc StartWave (StartWaveRequest) returns (StartWaveResponse); + rpc FinishWave (FinishWaveRequest) returns (FinishWaveResponse); +} + +message BattleReportRandomDisplay { + int32 randomDisplayValueType = 1; + int64 randomDisplayValue = 2; +} + +message CostumeBattleInfo { + int32 deckCharacterNumber = 1; + int64 totalDamage = 2; + bool isAlive = 4; + int32 hitCount = 5; + int64 maxHp = 6; + int64 remainingHp = 7; + int32 userDeckNumber = 30; + BattleReportRandomDisplay battleReportRandomDisplay = 50; +} + +message StartWaveRequest { + repeated UserPartyInitialInfo userPartyInitialInfoList = 1; + repeated NpcPartyInitialInfo npcPartyInitialInfoList = 2; +} + +message UserPartyInitialInfo { + int64 userId = 1; + int32 deckType = 2; + int64 userDeckNumber = 3; + int64 totalHp = 4; + string vt = 200; +} + +message NpcPartyInitialInfo { + int64 npcId = 1; + int32 deckType = 2; + int32 battleNpcDeckNumber = 3; + int64 totalHp = 4; +} + +message StartWaveResponse { + map diffUserData = 99; +} + +message FinishWaveRequest { + bytes battleBinary = 1; + BattleDetail battleDetail = 2; + repeated UserPartyResultInfo userPartyResultInfoList = 3; + repeated NpcPartyResultInfo npcPartyResultInfoList = 4; + int64 elapsedFrameCount = 5; + string vt = 200; +} + +message BattleDetail { + int32 characterDeathCount = 1; + int32 maxDamage = 2; + int32 playerCostumeActiveSkillUsedCount = 3; + int32 playerWeaponActiveSkillUsedCount = 4; + int32 playerCompanionSkillUsedCount = 5; + int32 criticalCount = 6; + int32 comboCount = 7; + int32 comboMaxDamage = 8; + repeated CostumeBattleInfo costumeBattleInfo = 9; + int64 totalRecoverPoint = 10; +} + +message UserPartyResultInfo { + int64 userId = 1; + int32 deckType = 2; + int32 userDeckNumber = 3; + repeated AddUserDamageInfo addDamageInfoList = 4; + repeated UserRecoverInfo userRecoverInfo = 5; + repeated SkillUseInfo skillUseInfo = 6; + int32 characterDeathCount = 7; + int32 characterReviveCount = 8; + int32 characterHpDepletedCount = 9; +} + +message AddUserDamageInfo { + int64 userId = 1; + int32 deckType = 2; + int32 deckNumber = 3; + int64 totalDamage = 4; + int64 totalUnclampedDamage = 5; +} + +message UserRecoverInfo { + int64 userId = 1; + int32 deckType = 2; + int32 deckNumber = 3; + int64 totalRecoverPoint = 4; +} + +message SkillUseInfo { + string deckCharacterUuid = 1; + int32 skillDetailId = 2; + int32 useCount = 3; +} + +message NpcPartyResultInfo { + int64 npcId = 1; + int32 deckType = 2; + int32 battleNpcDeckNumber = 3; + repeated AddNpcDamageInfo addDamageInfoList = 4; + repeated NpcRecoverInfo npcRecoverInfo = 5; + repeated SkillUseInfo skillUseInfo = 6; + int32 characterDeathCount = 7; + int32 characterReviveCount = 8; + int32 characterHpDepletedCount = 9; +} + +message AddNpcDamageInfo { + int64 npcId = 1; + int32 deckType = 2; + int32 deckNumber = 3; + int64 totalDamage = 4; + int64 totalUnclampedDamage = 5; +} + +message NpcRecoverInfo { + int64 npcId = 1; + int32 deckType = 2; + int32 deckNumber = 3; + int64 totalRecoverPoint = 4; +} + +message FinishWaveResponse { + map diffUserData = 99; +} \ No newline at end of file diff --git a/src/proto/bighunt.proto b/src/proto/bighunt.proto new file mode 100644 index 0000000..1533b55 --- /dev/null +++ b/src/proto/bighunt.proto @@ -0,0 +1,142 @@ +syntax = "proto3"; + +option csharp_namespace = "MariesWonderland.Proto.BigHunt"; + +import "google/protobuf/empty.proto"; +import "proto/data.proto"; +import "proto/battle.proto"; + +package apb.api.bighunt; + +service BighuntService { + rpc StartBigHuntQuest (StartBigHuntQuestRequest) returns (StartBigHuntQuestResponse); + rpc UpdateBigHuntQuestSceneProgress (UpdateBigHuntQuestSceneProgressRequest) returns (UpdateBigHuntQuestSceneProgressResponse); + rpc FinishBigHuntQuest (FinishBigHuntQuestRequest) returns (FinishBigHuntQuestResponse); + rpc RestartBigHuntQuest (RestartBigHuntQuestRequest) returns (RestartBigHuntQuestResponse); + rpc SkipBigHuntQuest (SkipBigHuntQuestRequest) returns (SkipBigHuntQuestResponse); + rpc SaveBigHuntBattleInfo (SaveBigHuntBattleInfoRequest) returns (SaveBigHuntBattleInfoResponse); + rpc GetBigHuntTopData (google.protobuf.Empty) returns (GetBigHuntTopDataResponse); +} + +message WeeklyScoreResult { + int32 attributeType = 1; + int64 beforeMaxScore = 2; + int64 currentMaxScore = 3; + int32 beforeAssetGradeIconId = 4; + int32 currentAssetGradeIconId = 5; + int64 afterMaxScore = 6; + int32 afterAssetGradeIconId = 7; +} + +message BigHuntReward { + int32 possessionType = 1; + int32 possessionId = 2; + int32 count = 3; +} + +message StartBigHuntQuestRequest { + int32 bigHuntBossQuestId = 1; + int32 bigHuntQuestId = 2; + int32 userDeckNumber = 3; + bool isDryRun = 4; +} + +message StartBigHuntQuestResponse { + map diffUserData = 99; +} + +message UpdateBigHuntQuestSceneProgressRequest { + int32 questSceneId = 1; +} + +message UpdateBigHuntQuestSceneProgressResponse { + map diffUserData = 99; +} + +message FinishBigHuntQuestRequest { + int32 bigHuntBossQuestId = 1; + int32 bigHuntQuestId = 2; + bool isRetired = 3; + string vt = 200; +} + +message FinishBigHuntQuestResponse { + BigHuntScoreInfo scoreInfo = 1; + repeated BigHuntReward scoreReward = 2; + BigHuntBattleReport battleReport = 3; + map diffUserData = 99; +} + +message BigHuntScoreInfo { + int64 userScore = 1; + bool isHighScore = 2; + int64 totalDamage = 3; + int64 baseScore = 4; + int32 difficultyBonusPermil = 5; + int32 aliveBonusPermil = 6; + int32 maxComboBonusPermil = 7; + int32 assetGradeIconId = 8; +} + +message BigHuntBattleReport { + repeated BigHuntBattleReportWave battleReportWave = 1; +} + +message BigHuntBattleReportWave { + repeated BigHuntBattleReportCostume battleReportCostume = 1; +} + +message BigHuntBattleReportCostume { + int32 costumeId = 1; + int64 totalDamage = 2; + int32 hitCount = 3; + apb.api.battle.BattleReportRandomDisplay battleReportRandomDisplay = 4; +} + +message RestartBigHuntQuestRequest { + int32 bigHuntBossQuestId = 1; + int32 bigHuntQuestId = 2; +} + +message RestartBigHuntQuestResponse { + bytes battleBinary = 1; + int32 deckNumber = 2; + map diffUserData = 99; +} + +message SkipBigHuntQuestRequest { + int32 bigHuntBossQuestId = 1; + int32 skipCount = 2; +} + +message SkipBigHuntQuestResponse { + repeated BigHuntReward scoreReward = 1; + map diffUserData = 99; +} + +message SaveBigHuntBattleInfoRequest { + bytes battleBinary = 1; + BigHuntBattleDetail bigHuntBattleDetail = 2; + int64 elapsedFrameCount = 3; + string vt = 200; +} + +message BigHuntBattleDetail { + int32 deckType = 1; + int32 userTripleDeckNumber = 2; + int32 bossKnockDownCount = 3; + int32 maxComboCount = 4; + repeated apb.api.battle.CostumeBattleInfo costumeBattleInfo = 9; +} + +message SaveBigHuntBattleInfoResponse { + map diffUserData = 99; +} + +message GetBigHuntTopDataResponse { + repeated WeeklyScoreResult weeklyScoreResult = 1; + repeated BigHuntReward weeklyScoreReward = 2; + bool isReceivedWeeklyScoreReward = 3; + repeated BigHuntReward lastWeekWeeklyScoreReward = 4; + map diffUserData = 99; +} \ No newline at end of file diff --git a/src/proto/cageornament.proto b/src/proto/cageornament.proto new file mode 100644 index 0000000..a58bcf2 --- /dev/null +++ b/src/proto/cageornament.proto @@ -0,0 +1,35 @@ +syntax = "proto3"; + +option csharp_namespace = "MariesWonderland.Proto.CageOrnament"; + +import "proto/data.proto"; + +package apb.api.cageornament; + +service CageornamentService { + rpc ReceiveReward (ReceiveRewardRequest) returns (ReceiveRewardResponse); + rpc RecordAccess (RecordAccessRequest) returns (RecordAccessResponse); +} + +message ReceiveRewardRequest { + int32 cageOrnamentId = 1; +} + +message ReceiveRewardResponse { + repeated CageOrnamentReward cageOrnamentReward = 1; + map diffUserData = 99; +} + +message CageOrnamentReward { + int32 possessionType = 1; + int32 possessionId = 2; + int32 count = 3; +} + +message RecordAccessRequest { + int32 cageOrnamentId = 1; +} + +message RecordAccessResponse { + map diffUserData = 99; +} \ No newline at end of file diff --git a/src/proto/character.proto b/src/proto/character.proto new file mode 100644 index 0000000..33b529b --- /dev/null +++ b/src/proto/character.proto @@ -0,0 +1,20 @@ +syntax = "proto3"; + +option csharp_namespace = "MariesWonderland.Proto.Character"; + +import "proto/data.proto"; + +package apb.api.character; + +service CharacterService { + rpc Rebirth (RebirthRequest) returns (RebirthResponse); +} + +message RebirthRequest { + int32 characterId = 1; + int32 rebirthCount = 2; +} + +message RebirthResponse { + map diffUserData = 99; +} \ No newline at end of file diff --git a/src/proto/characterboard.proto b/src/proto/characterboard.proto new file mode 100644 index 0000000..91ce024 --- /dev/null +++ b/src/proto/characterboard.proto @@ -0,0 +1,19 @@ +syntax = "proto3"; + +option csharp_namespace = "MariesWonderland.Proto.CharacterBoard"; + +import "proto/data.proto"; + +package apb.api.characterboard; + +service CharacterboardService { + rpc ReleasePanel (ReleasePanelRequest) returns (ReleasePanelResponse); +} + +message ReleasePanelRequest { + repeated int32 characterBoardPanelId = 1; +} + +message ReleasePanelResponse { + map diffUserData = 99; +} \ No newline at end of file diff --git a/src/proto/characterviewer.proto b/src/proto/characterviewer.proto new file mode 100644 index 0000000..f1b2694 --- /dev/null +++ b/src/proto/characterviewer.proto @@ -0,0 +1,17 @@ +syntax = "proto3"; + +option csharp_namespace = "MariesWonderland.Proto.CharacterViewer"; + +import "google/protobuf/empty.proto"; +import "proto/data.proto"; + +package apb.api.characterviewer; + +service CharacterviewerService { + rpc CharacterViewerTop (google.protobuf.Empty) returns (CharacterViewerTopResponse); +} + +message CharacterViewerTopResponse { + repeated int32 releaseCharacterViewerFieldId = 1; + map diffUserData = 99; +} \ No newline at end of file diff --git a/src/proto/companion.proto b/src/proto/companion.proto new file mode 100644 index 0000000..5449418 --- /dev/null +++ b/src/proto/companion.proto @@ -0,0 +1,20 @@ +syntax = "proto3"; + +option csharp_namespace = "MariesWonderland.Proto.Companion"; + +import "proto/data.proto"; + +package apb.api.companion; + +service CompanionService { + rpc Enhance (EnhanceRequest) returns (EnhanceResponse); +} + +message EnhanceRequest { + string userCompanionUuid = 1; + int32 addLevelCount = 2; +} + +message EnhanceResponse { + map diffUserData = 99; +} \ No newline at end of file diff --git a/src/proto/config.proto b/src/proto/config.proto new file mode 100644 index 0000000..11d6416 --- /dev/null +++ b/src/proto/config.proto @@ -0,0 +1,41 @@ +syntax = "proto3"; + +option csharp_namespace = "MariesWonderland.Proto.Config"; + +import "google/protobuf/empty.proto"; +import "proto/data.proto"; + +package apb.api.config; + +service ConfigService { + rpc GetReviewServerConfig (google.protobuf.Empty) returns (GetReviewServerConfigResponse); +} + +message GetReviewServerConfigResponse { + ApiConfig api = 1; + OctoConfig octo = 2; + WebViewConfig webView = 3; + MasterDataConfig masterData = 4; + map diffUserData = 99; +} + +message ApiConfig { + string hostname = 1; + int32 port = 2; +} + +message OctoConfig { + int32 version = 1; + int32 appId = 2; + string clientSecretKey = 3; + string aesKey = 4; + string url = 5; +} + +message WebViewConfig { + string baseUrl = 1; +} + +message MasterDataConfig { + string urlFormat = 1; +} \ No newline at end of file diff --git a/src/proto/consumableitem.proto b/src/proto/consumableitem.proto new file mode 100644 index 0000000..5ec655b --- /dev/null +++ b/src/proto/consumableitem.proto @@ -0,0 +1,34 @@ +syntax = "proto3"; + +option csharp_namespace = "MariesWonderland.Proto.ConsumableItem"; + +import "proto/data.proto"; + +package apb.api.consumableitem; + +service ConsumableitemService { + rpc UseEffectItem (UseEffectItemRequest) returns (UseEffectItemResponse); + rpc Sell (SellRequest) returns (SellResponse); +} + +message UseEffectItemRequest { + int32 consumableItemId = 1; + int32 count = 2; +} + +message UseEffectItemResponse { + map diffUserData = 99; +} + +message SellRequest { + repeated SellPossession consumableItemPossession = 1; +} + +message SellPossession { + int32 consumableItemId = 1; + int32 count = 2; +} + +message SellResponse { + map diffUserData = 99; +} \ No newline at end of file diff --git a/src/proto/contentsstory.proto b/src/proto/contentsstory.proto new file mode 100644 index 0000000..010e2e3 --- /dev/null +++ b/src/proto/contentsstory.proto @@ -0,0 +1,19 @@ +syntax = "proto3"; + +option csharp_namespace = "MariesWonderland.Proto.ContentsStory"; + +import "proto/data.proto"; + +package apb.api.contentsstory; + +service ContentsstoryService { + rpc RegisterPlayed (RegisterPlayedRequest) returns (RegisterPlayedResponse); +} + +message RegisterPlayedRequest { + int32 contentsStoryId = 1; +} + +message RegisterPlayedResponse { + map diffUserData = 99; +} \ No newline at end of file diff --git a/src/proto/costume.proto b/src/proto/costume.proto new file mode 100644 index 0000000..65986c3 --- /dev/null +++ b/src/proto/costume.proto @@ -0,0 +1,92 @@ +syntax = "proto3"; + +option csharp_namespace = "MariesWonderland.Proto.Costume"; + +import "proto/data.proto"; + +package apb.api.costume; + +service CostumeService { + rpc Enhance (EnhanceRequest) returns (EnhanceResponse); + rpc LimitBreak (LimitBreakRequest) returns (LimitBreakResponse); + rpc Awaken (AwakenRequest) returns (AwakenResponse); + rpc EnhanceActiveSkill (EnhanceActiveSkillRequest) returns (EnhanceActiveSkillResponse); + rpc RegisterLevelBonusConfirmed (RegisterLevelBonusConfirmedRequest) returns (RegisterLevelBonusConfirmedResponse); + rpc UnlockLotteryEffectSlot (UnlockLotteryEffectSlotRequest) returns (UnlockLotteryEffectSlotResponse); + rpc DrawLotteryEffect (DrawLotteryEffectRequest) returns (DrawLotteryEffectResponse); + rpc ConfirmLotteryEffect (ConfirmLotteryEffectRequest) returns (ConfirmLotteryEffectResponse); +} + +message EnhanceRequest { + string userCostumeUuid = 1; + map materials = 2; +} + +message EnhanceResponse { + bool isGreatSuccess = 1; + map surplusEnhanceMaterial = 2; + map diffUserData = 99; +} + +message LimitBreakRequest { + string userCostumeUuid = 1; + map materials = 2; +} + +message LimitBreakResponse { + map diffUserData = 99; +} + +message AwakenRequest { + string userCostumeUuid = 1; + map materials = 2; +} + +message AwakenResponse { + map diffUserData = 99; +} + +message EnhanceActiveSkillRequest { + string userCostumeUuid = 1; + int32 addLevelCount = 2; +} + +message EnhanceActiveSkillResponse { + map diffUserData = 99; +} + +message RegisterLevelBonusConfirmedRequest { + int32 costumeId = 1; + int32 level = 2; +} + +message RegisterLevelBonusConfirmedResponse { + map diffUserData = 99; +} + +message UnlockLotteryEffectSlotRequest { + string userCostumeUuid = 1; + int32 slotNumber = 2; +} + +message UnlockLotteryEffectSlotResponse { + map diffUserData = 99; +} + +message DrawLotteryEffectRequest { + string userCostumeUuid = 1; + int32 slotNumber = 2; +} + +message DrawLotteryEffectResponse { + map diffUserData = 99; +} + +message ConfirmLotteryEffectRequest { + string userCostumeUuid = 1; + bool isAccept = 2; +} + +message ConfirmLotteryEffectResponse { + map diffUserData = 99; +} \ No newline at end of file diff --git a/src/proto/data.proto b/src/proto/data.proto new file mode 100644 index 0000000..2ebde66 --- /dev/null +++ b/src/proto/data.proto @@ -0,0 +1,38 @@ +syntax = "proto3"; + +option csharp_namespace = "MariesWonderland.Proto.Data"; + +import "google/protobuf/empty.proto"; + +package apb.api.data; + +service DataService { + rpc GetLatestMasterDataVersion (google.protobuf.Empty) returns (MasterDataGetLatestVersionResponse); + rpc GetUserDataNameV2 (google.protobuf.Empty) returns (UserDataGetNameResponseV2); + rpc GetUserData (UserDataGetRequest) returns (UserDataGetResponse); +} + +message DiffData { + string updateRecordsJson = 1; + string deleteKeysJson = 2; +} + +message MasterDataGetLatestVersionResponse { + string latestMasterDataVersion = 1; +} + +message UserDataGetNameResponseV2 { + repeated TableNameList tableNameList = 1; +} + +message TableNameList { + repeated string tableName = 1; +} + +message UserDataGetRequest { + repeated string tableName = 1; +} + +message UserDataGetResponse { + map userDataJson = 1; +} \ No newline at end of file diff --git a/src/proto/deck.proto b/src/proto/deck.proto new file mode 100644 index 0000000..f893a87 --- /dev/null +++ b/src/proto/deck.proto @@ -0,0 +1,158 @@ +syntax = "proto3"; + +option csharp_namespace = "MariesWonderland.Proto.Deck"; + +import "proto/data.proto"; + +package apb.api.deck; + +service DeckService { + rpc UpdateName (UpdateNameRequest) returns (UpdateNameResponse); + rpc ReplaceDeck (ReplaceDeckRequest) returns (ReplaceDeckResponse); + rpc SetPvpDefenseDeck (SetPvpDefenseDeckRequest) returns (SetPvpDefenseDeckResponse); + rpc CopyDeck (CopyDeckRequest) returns (CopyDeckResponse); + rpc RemoveDeck (RemoveDeckRequest) returns (RemoveDeckResponse); + rpc RefreshDeckPower (RefreshDeckPowerRequest) returns (RefreshDeckPowerResponse); + rpc UpdateTripleDeckName (UpdateTripleDeckNameRequest) returns (UpdateTripleDeckNameResponse); + rpc ReplaceTripleDeck (ReplaceTripleDeckRequest) returns (ReplaceTripleDeckResponse); + rpc ReplaceMultiDeck (ReplaceMultiDeckRequest) returns (ReplaceMultiDeckResponse); + rpc RefreshMultiDeckPower (RefreshMultiDeckPowerRequest) returns (RefreshMultiDeckPowerResponse); +} + +message Deck { + DeckCharacter character01 = 1; + DeckCharacter character02 = 2; + DeckCharacter character03 = 3; +} + +message DeckCharacter { + string userCostumeUuid = 1; + string mainUserWeaponUuid = 2; + repeated string subUserWeaponUuid = 3; + string userCompanionUuid = 4; + repeated string userPartsUuid = 5; + int32 dressupCostumeId = 6; + string userThoughtUuid = 7; +} + +message UpdateNameRequest { + int32 deckType = 1; + int32 userDeckNumber = 2; + string name = 3; +} + +message UpdateNameResponse { + map diffUserData = 99; +} + +message ReplaceDeckRequest { + int32 deckType = 1; + int32 userDeckNumber = 2; + Deck deck = 3; +} + +message ReplaceDeckResponse { + map diffUserData = 99; +} + +message SetPvpDefenseDeckRequest { + int32 userDeckNumber = 1; + DeckPower deckPower = 2; +} + +message DeckPower { + int32 power = 1; + DeckCharacterPower deckCharacterPower01 = 2; + DeckCharacterPower deckCharacterPower02 = 3; + DeckCharacterPower deckCharacterPower03 = 4; +} + +message DeckCharacterPower { + string userDeckCharacterUuid = 1; + int32 power = 2; +} + +message SetPvpDefenseDeckResponse { + map diffUserData = 99; +} + +message CopyDeckRequest { + int32 fromDeckType = 1; + int32 fromUserDeckNumber = 2; + int32 toDeckType = 3; + int32 toUserDeckNumber = 4; +} + +message CopyDeckResponse { + int32 resultType = 1; + map diffUserData = 99; +} + +message RemoveDeckRequest { + int32 deckType = 1; + int32 userDeckNumber = 2; +} + +message RemoveDeckResponse { + map diffUserData = 99; +} + +message RefreshDeckPowerRequest { + int32 deckType = 1; + int32 userDeckNumber = 2; + DeckPower deckPower = 3; +} + +message RefreshDeckPowerResponse { + map diffUserData = 99; +} + +message UpdateTripleDeckNameRequest { + int32 deckType = 1; + int32 userDeckNumber = 2; + string name = 3; +} + +message UpdateTripleDeckNameResponse { + map diffUserData = 99; +} + +message ReplaceTripleDeckRequest { + int32 deckType = 1; + int32 userDeckNumber = 2; + DeckDetail deckDetail01 = 3; + DeckDetail deckDetail02 = 4; + DeckDetail deckDetail03 = 5; +} + +message DeckDetail { + int32 deckType = 1; + int32 userDeckNumber = 2; + Deck deck = 3; +} + +message ReplaceTripleDeckResponse { + map diffUserData = 99; +} + +message ReplaceMultiDeckRequest { + repeated DeckDetail deckDetail = 1; +} + +message ReplaceMultiDeckResponse { + map diffUserData = 99; +} + +message RefreshMultiDeckPowerRequest { + repeated DeckPowerInfo deckPowerInfo = 1; +} + +message DeckPowerInfo { + int32 deckType = 1; + int32 userDeckNumber = 2; + DeckPower deckPower = 3; +} + +message RefreshMultiDeckPowerResponse { + map diffUserData = 99; +} \ No newline at end of file diff --git a/src/proto/dokan.proto b/src/proto/dokan.proto new file mode 100644 index 0000000..e4bf3f6 --- /dev/null +++ b/src/proto/dokan.proto @@ -0,0 +1,19 @@ +syntax = "proto3"; + +option csharp_namespace = "MariesWonderland.Proto.Dokan"; + +import "proto/data.proto"; + +package apb.api.dokan; + +service DokanService { + rpc RegisterDokanConfirmed (RegisterDokanConfirmedRequest) returns (RegisterDokanConfirmedResponse); +} + +message RegisterDokanConfirmedRequest { + repeated int32 dokanId = 1; +} + +message RegisterDokanConfirmedResponse { + map diffUserData = 99; +} \ No newline at end of file diff --git a/src/proto/explore.proto b/src/proto/explore.proto new file mode 100644 index 0000000..b2706da --- /dev/null +++ b/src/proto/explore.proto @@ -0,0 +1,49 @@ +syntax = "proto3"; + +option csharp_namespace = "MariesWonderland.Proto.Explore"; + +import "proto/data.proto"; + +package apb.api.explore; + +service ExploreService { + rpc StartExplore (StartExploreRequest) returns (StartExploreResponse); + rpc FinishExplore (FinishExploreRequest) returns (FinishExploreResponse); + rpc RetireExplore (RetireExploreRequest) returns (RetireExploreResponse); +} + +message StartExploreRequest { + int32 exploreId = 1; + int32 useConsumableItemId = 2; +} + +message StartExploreResponse { + map diffUserData = 99; +} + +message FinishExploreRequest { + int32 exploreId = 1; + int32 score = 2; + string vt = 200; +} + +message FinishExploreResponse { + int32 acquireStaminaCount = 1; + repeated ExploreReward exploreReward = 2; + int32 assetGradeIconId = 3; + map diffUserData = 99; +} + +message ExploreReward { + int32 possessionType = 1; + int32 possessionId = 2; + int32 count = 3; +} + +message RetireExploreRequest { + int32 exploreId = 1; +} + +message RetireExploreResponse { + map diffUserData = 99; +} \ No newline at end of file diff --git a/src/proto/friend.proto b/src/proto/friend.proto new file mode 100644 index 0000000..91f6d21 --- /dev/null +++ b/src/proto/friend.proto @@ -0,0 +1,135 @@ +syntax = "proto3"; + +option csharp_namespace = "MariesWonderland.Proto.Friend"; + +import "google/protobuf/empty.proto"; +import "proto/data.proto"; +import "google/protobuf/timestamp.proto"; +import "proto/mission.proto"; + +package apb.api.friend; + +service FriendService { + rpc GetUser (GetUserRequest) returns (GetUserResponse); + rpc SearchRecommendedUsers (google.protobuf.Empty) returns (SearchRecommendedUsersResponse); + rpc GetFriendList (GetFriendListRequest) returns (GetFriendListResponse); + rpc GetFriendRequestList (google.protobuf.Empty) returns (GetFriendRequestListResponse); + rpc SendFriendRequest (SendFriendRequestRequest) returns (SendFriendRequestResponse); + rpc AcceptFriendRequest (AcceptFriendRequestRequest) returns (AcceptFriendRequestResponse); + rpc DeclineFriendRequest (DeclineFriendRequestRequest) returns (DeclineFriendRequestResponse); + rpc DeleteFriend (DeleteFriendRequest) returns (DeleteFriendResponse); + rpc CheerFriend (CheerFriendRequest) returns (CheerFriendResponse); + rpc BulkCheerFriend (google.protobuf.Empty) returns (BulkCheerFriendResponse); + rpc ReceiveCheer (ReceiveCheerRequest) returns (ReceiveCheerResponse); + rpc BulkReceiveCheer (google.protobuf.Empty) returns (BulkReceiveCheerResponse); +} + +message GetUserRequest { + int64 playerId = 1; +} + +message GetUserResponse { + User user = 1; + map diffUserData = 99; +} + +message User { + int64 playerId = 1; + string userName = 2; + google.protobuf.Timestamp lastLoginDatetime = 3; + int32 maxDeckPower = 4; + int32 favoriteCostumeId = 5; + int32 level = 6; +} + +message SearchRecommendedUsersResponse { + repeated User users = 1; + map diffUserData = 99; +} + +message GetFriendListRequest { + apb.api.mission.CageMeasurableValues cageMeasurableValues = 50; +} + +message GetFriendListResponse { + repeated FriendUser friendUser = 1; + int32 sendCheerCount = 2; + int32 receivedCheerCount = 3; + map diffUserData = 99; +} + +message FriendUser { + int64 playerId = 1; + string userName = 2; + google.protobuf.Timestamp lastLoginDatetime = 3; + int32 maxDeckPower = 4; + int32 favoriteCostumeId = 5; + int32 level = 6; + bool cheerReceived = 7; + bool cheerSent = 8; + bool staminaReceived = 9; +} + +message GetFriendRequestListResponse { + repeated User user = 1; + map diffUserData = 99; +} + +message SendFriendRequestRequest { + int64 playerId = 1; +} + +message SendFriendRequestResponse { + map diffUserData = 99; +} + +message AcceptFriendRequestRequest { + int64 playerId = 1; +} + +message AcceptFriendRequestResponse { + map diffUserData = 99; +} + +message DeclineFriendRequestRequest { + int64 playerIdOld = 1; + repeated int64 playerId = 2; +} + +message DeclineFriendRequestResponse { + map diffUserData = 99; +} + +message DeleteFriendRequest { + int64 playerId = 1; +} + +message DeleteFriendResponse { + map diffUserData = 99; +} + +message CheerFriendRequest { + int64 playerId = 1; +} + +message CheerFriendResponse { + map diffUserData = 99; +} + +message BulkCheerFriendResponse { + repeated int64 playerId = 1; + map diffUserData = 99; +} + +message ReceiveCheerRequest { + int64 playerId = 1; +} + +message ReceiveCheerResponse { + map diffUserData = 99; +} + +message BulkReceiveCheerResponse { + repeated int64 playerId = 1; + map diffUserData = 99; +} \ No newline at end of file diff --git a/src/proto/gacha.proto b/src/proto/gacha.proto new file mode 100644 index 0000000..5ede56d --- /dev/null +++ b/src/proto/gacha.proto @@ -0,0 +1,195 @@ +syntax = "proto3"; + +option csharp_namespace = "MariesWonderland.Proto.Gacha"; + +import "google/protobuf/empty.proto"; +import "google/protobuf/timestamp.proto"; +import "proto/data.proto"; + +package apb.api.gacha; + +service GachaService { + rpc GetGachaList (GetGachaListRequest) returns (GetGachaListResponse); + rpc GetGacha (GetGachaRequest) returns (GetGachaResponse); + rpc Draw (DrawRequest) returns (DrawResponse); + rpc ResetBoxGacha (ResetBoxGachaRequest) returns (ResetBoxGachaResponse); + rpc GetRewardGacha (google.protobuf.Empty) returns (GetRewardGachaResponse); + rpc RewardDraw (RewardDrawRequest) returns (RewardDrawResponse); +} + +message MenuGachaBadgeInfo { + google.protobuf.Timestamp displayStartDatetime = 1; + google.protobuf.Timestamp displayEndDatetime = 2; +} + +message GetGachaListRequest { + repeated int32 gachaLabelType = 1; +} + +message GetGachaListResponse { + repeated Gacha gacha = 1; + ConvertedGachaMedal convertedGachaMedal = 2; + map diffUserData = 99; +} + +message Gacha { + int32 gachaId = 1; + int32 gachaLabelType = 2; + int32 gachaModeType = 4; + int32 gachaAutoResetType = 5; + int32 gachaAutoResetPeriod = 6; + google.protobuf.Timestamp nextAutoResetDatetime = 7; + repeated GachaUnlockCondition gachaUnlockCondition = 8; + bool isUserGachaUnlock = 9; + google.protobuf.Timestamp startDatetime = 10; + google.protobuf.Timestamp endDatetime = 13; + repeated GachaPricePhase gachaPricePhase = 14; + int32 relatedMainQuestChapterId = 16; + int32 relatedEventQuestChapterId = 17; + int32 promotionMovieAssetId = 18; + int32 gachaMedalId = 19; + int32 gachaDecorationType = 20; + int32 sortOrder = 21; + bool isInactive = 22; + int32 informationId = 23; + bytes gachaMode = 24; +} + +message GachaUnlockCondition { + int32 gachaUnlockConditionType = 1; + int32 conditionValue = 2; +} + +message GachaPricePhase { + int32 gachaPricePhaseId = 1; + bool isEnabled = 2; + google.protobuf.Timestamp endDatetime = 3; + int32 limitExecCount = 4; + int32 userExecCount = 5; + int32 gachaBadgeType = 6; + int32 priceType = 7; + int32 priceId = 8; + int32 price = 9; + int32 regularPrice = 10; + int32 drawCount = 11; + int32 eachMaxExecCount = 12; + repeated GachaBonus gachaBonus = 13; + GachaOddsFixedRarity gachaOddsFixedRarity = 14; +} + +message GachaBonus { + int32 possessionType = 1; + int32 possessionId = 2; + int32 count = 3; +} + +message GachaOddsFixedRarity { + int32 fixedRarityTypeLowerLimit = 1; + int32 fixedCount = 2; +} + +message ConvertedGachaMedal { + repeated ConsumableItemPossession convertedMedalPossession = 1; + ConsumableItemPossession obtainPossession = 2; +} + +message ConsumableItemPossession { + int32 consumableItemId = 1; + int32 count = 2; +} + +message GetGachaRequest { + repeated int32 gachaId = 1; +} + +message GetGachaResponse { + map gacha = 1; + map diffUserData = 99; +} + +message DrawRequest { + int32 gachaId = 1; + int32 gachaPricePhaseId = 2; + int32 execCount = 3; + string consumeUserWeaponUuid = 4; +} + +message DrawResponse { + Gacha nextGacha = 1; + repeated DrawGachaOddsItem gachaResult = 2; + repeated GachaBonus gachaBonus = 3; + repeated MenuGachaBadgeInfo menuGachaBadgeInfo = 4; + map diffUserData = 99; +} + +message DrawGachaOddsItem { + GachaItem gachaItem = 1; + GachaItem gachaItemBonus = 2; + int32 duplicationBonusGrade = 3; + repeated GachaBonus duplicationBonus = 4; + GachaBonus medalBonus = 5; + bool isTarget = 6; +} + +message GachaItem { + int32 possessionType = 1; + int32 possessionId = 2; + int32 count = 3; + int32 promotionOrder = 4; + bool isNew = 5; +} + +message ResetBoxGachaRequest { + int32 gachaId = 1; +} + +message ResetBoxGachaResponse { + Gacha gacha = 1; + map diffUserData = 99; +} + +message GetRewardGachaResponse { + bool available = 1; + int32 todaysCurrentDrawCount = 2; + int32 dailyMaxCount = 3; + map diffUserData = 99; +} + +message RewardDrawRequest { + string placementName = 1; + string rewardName = 2; + string rewardAmount = 3; +} + +message RewardDrawResponse { + repeated RewardGachaItem rewardGachaResult = 1; + map diffUserData = 99; +} + +message RewardGachaItem { + int32 possessionType = 1; + int32 possessionId = 2; + int32 count = 3; + bool isNew = 4; +} + +message GachaModeBasic { + string gachaAssetName = 1; +} + +message GachaModeStepupComposition { + int32 gachaStepGroupId = 1; + int32 stepNumber = 2; + int32 currentStepNumber = 3; + string naviCharacterCommentAssetName = 4; + string gachaAssetName = 5; + int32 currentLoopCount = 6; +} + +message GachaModeBoxComposition { + int32 gachaBoxGroupId = 1; + int32 boxNumber = 2; + int32 currentBoxNumber = 3; + string gachaAssetName = 4; + int32 gachaPricePhaseId = 5; +} \ No newline at end of file diff --git a/src/proto/gameplay.proto b/src/proto/gameplay.proto new file mode 100644 index 0000000..383834f --- /dev/null +++ b/src/proto/gameplay.proto @@ -0,0 +1,24 @@ +syntax = "proto3"; + +option csharp_namespace = "MariesWonderland.Proto.GamePlay"; + +import "proto/gacha.proto"; +import "proto/data.proto"; + +package apb.api.gameplay; + +service GameplayService { + rpc CheckBeforeGamePlay (CheckBeforeGamePlayRequest) returns (CheckBeforeGamePlayResponse); +} + +message CheckBeforeGamePlayRequest { + string tr = 1; + int32 voiceClientSystemLanguageTypeId = 2; + int32 textClientSystemLanguageTypeId = 3; +} + +message CheckBeforeGamePlayResponse { + bool isExistUnreadPop = 1; + repeated apb.api.gacha.MenuGachaBadgeInfo menuGachaBadgeInfo = 2; + map diffUserData = 99; +} \ No newline at end of file diff --git a/src/proto/gift.proto b/src/proto/gift.proto new file mode 100644 index 0000000..df740ef --- /dev/null +++ b/src/proto/gift.proto @@ -0,0 +1,68 @@ +syntax = "proto3"; + +option csharp_namespace = "MariesWonderland.Proto.Gift"; + +import "google/protobuf/empty.proto"; +import "proto/data.proto"; +import "google/protobuf/timestamp.proto"; + +package apb.api.gift; + +service GiftService { + rpc ReceiveGift (ReceiveGiftRequest) returns (ReceiveGiftResponse); + rpc GetGiftList (GetGiftListRequest) returns (GetGiftListResponse); + rpc GetGiftReceiveHistoryList (google.protobuf.Empty) returns (GetGiftReceiveHistoryListResponse); +} + +message ReceiveGiftRequest { + repeated string userGiftUuid = 1; +} + +message ReceiveGiftResponse { + repeated string receivedGiftUuid = 1; + repeated string expiredGiftUuid = 2; + repeated string overflowGiftUuid = 3; + map diffUserData = 99; +} + +message GetGiftListRequest { + repeated int32 rewardKindType = 1; + int32 expirationType = 2; + bool isAscendingSort = 3; + int64 nextCursor = 4; + int64 previousCursor = 5; + int32 getCount = 6; +} + +message GetGiftListResponse { + repeated NotReceivedGift gift = 1; + int32 totalPageCount = 2; + int64 nextCursor = 3; + int64 previousCursor = 4; + map diffUserData = 99; +} + +message NotReceivedGift { + GiftCommon giftCommon = 1; + google.protobuf.Timestamp expirationDatetime = 2; + string userGiftUuid = 3; +} + +message GiftCommon { + int32 possessionType = 1; + int32 possessionId = 2; + int32 count = 3; + google.protobuf.Timestamp grantDatetime = 4; + int32 descriptionGiftTextId = 5; + bytes equipmentData = 6; +} + +message GetGiftReceiveHistoryListResponse { + repeated ReceivedGift gift = 1; + map diffUserData = 99; +} + +message ReceivedGift { + GiftCommon giftCommon = 1; + google.protobuf.Timestamp receivedDatetime = 2; +} \ No newline at end of file diff --git a/src/proto/gimmick.proto b/src/proto/gimmick.proto new file mode 100644 index 0000000..4424db2 --- /dev/null +++ b/src/proto/gimmick.proto @@ -0,0 +1,64 @@ +syntax = "proto3"; + +option csharp_namespace = "MariesWonderland.Proto.Gimmick"; + +import "google/protobuf/empty.proto"; +import "proto/data.proto"; + +package apb.api.gimmick; + +service GimmickService { + rpc UpdateSequence (UpdateSequenceRequest) returns (UpdateSequenceResponse); + rpc UpdateGimmickProgress (UpdateGimmickProgressRequest) returns (UpdateGimmickProgressResponse); + rpc InitSequenceSchedule (google.protobuf.Empty) returns (InitSequenceScheduleResponse); + rpc Unlock (UnlockRequest) returns (UnlockResponse); +} + +message UpdateSequenceRequest { + int32 gimmickSequenceScheduleId = 1; + int32 gimmickSequenceId = 2; +} + +message UpdateSequenceResponse { + map diffUserData = 99; +} + +message UpdateGimmickProgressRequest { + int32 gimmickSequenceScheduleId = 1; + int32 gimmickSequenceId = 2; + int32 gimmickId = 3; + int32 gimmickOrnamentIndex = 4; + int32 progressValueBit = 5; + int32 flowType = 6; +} + +message UpdateGimmickProgressResponse { + repeated GimmickReward gimmickOrnamentReward = 1; + bool isSequenceCleared = 2; + repeated GimmickReward gimmickSequenceClearReward = 3; + map diffUserData = 99; +} + +message GimmickReward { + int32 possessionType = 1; + int32 possessionId = 2; + int32 count = 3; +} + +message InitSequenceScheduleResponse { + map diffUserData = 99; +} + +message UnlockRequest { + repeated GimmickKey gimmickKey = 1; +} + +message GimmickKey { + int32 gimmickSequenceScheduleId = 1; + int32 gimmickSequenceId = 2; + int32 gimmickId = 3; +} + +message UnlockResponse { + map diffUserData = 99; +} \ No newline at end of file diff --git a/src/proto/individualpop.proto b/src/proto/individualpop.proto new file mode 100644 index 0000000..5c9c5b1 --- /dev/null +++ b/src/proto/individualpop.proto @@ -0,0 +1,17 @@ +syntax = "proto3"; + +option csharp_namespace = "MariesWonderland.Proto.IndividualPop"; + +import "google/protobuf/empty.proto"; +import "proto/data.proto"; + +package apb.api.individualpop; + +service IndividualpopService { + rpc GetUnreadPop (google.protobuf.Empty) returns (GetUnreadPopResponse); +} + +message GetUnreadPopResponse { + repeated string unreadPop = 1; + map diffUserData = 99; +} \ No newline at end of file diff --git a/src/proto/labyrinth.proto b/src/proto/labyrinth.proto new file mode 100644 index 0000000..2d51223 --- /dev/null +++ b/src/proto/labyrinth.proto @@ -0,0 +1,54 @@ +syntax = "proto3"; + +option csharp_namespace = "MariesWonderland.Proto.Labyrinth"; + +import "proto/data.proto"; + +package apb.api.labyrinth; + +service LabyrinthService { + rpc UpdateSeasonData (UpdateSeasonDataRequest) returns (UpdateSeasonDataResponse); + rpc ReceiveStageClearReward (ReceiveStageClearRewardRequest) returns (ReceiveStageClearRewardResponse); + rpc ReceiveStageAccumulationReward (ReceiveStageAccumulationRewardRequest) returns (ReceiveStageAccumulationRewardResponse); +} + +message LabyrinthSeasonResult { + int32 eventQuestChapterId = 1; + int32 headQuestId = 2; + repeated LabyrinthReward seasonReward = 3; + int32 headStageOrder = 4; +} + +message LabyrinthReward { + int32 possessionType = 1; + int32 possessionId = 2; + int32 count = 3; +} + +message UpdateSeasonDataRequest { + int32 eventQuestChapterId = 1; +} + +message UpdateSeasonDataResponse { + repeated LabyrinthSeasonResult seasonResult = 1; + map diffUserData = 99; +} + +message ReceiveStageClearRewardRequest { + int32 eventQuestChapterId = 1; + int32 stageOrder = 2; +} + +message ReceiveStageClearRewardResponse { + map diffUserData = 99; +} + +message ReceiveStageAccumulationRewardRequest { + int32 eventQuestChapterId = 1; + int32 stageOrder = 2; + int32 questMissionClearCount = 3; +} + +message ReceiveStageAccumulationRewardResponse { + map diffUserData = 99; +} \ No newline at end of file diff --git a/src/proto/loginbonus.proto b/src/proto/loginbonus.proto new file mode 100644 index 0000000..c5be24c --- /dev/null +++ b/src/proto/loginbonus.proto @@ -0,0 +1,16 @@ +syntax = "proto3"; + +option csharp_namespace = "MariesWonderland.Proto.LoginBonus"; + +import "google/protobuf/empty.proto"; +import "proto/data.proto"; + +package apb.api.loginbonus; + +service LoginbonusService { + rpc ReceiveStamp (google.protobuf.Empty) returns (ReceiveStampResponse); +} + +message ReceiveStampResponse { + map diffUserData = 99; +} \ No newline at end of file diff --git a/src/proto/material.proto b/src/proto/material.proto new file mode 100644 index 0000000..e6eb4dc --- /dev/null +++ b/src/proto/material.proto @@ -0,0 +1,24 @@ +syntax = "proto3"; + +option csharp_namespace = "MariesWonderland.Proto.Material"; + +import "proto/data.proto"; + +package apb.api.material; + +service MaterialService { + rpc Sell (SellRequest) returns (SellResponse); +} + +message SellRequest { + repeated SellPossession materialPossession = 1; +} + +message SellPossession { + int32 materialId = 1; + int32 count = 2; +} + +message SellResponse { + map diffUserData = 99; +} \ No newline at end of file diff --git a/src/proto/mission.proto b/src/proto/mission.proto new file mode 100644 index 0000000..8054aef --- /dev/null +++ b/src/proto/mission.proto @@ -0,0 +1,70 @@ +syntax = "proto3"; + +option csharp_namespace = "MariesWonderland.Proto.Mission"; + +import "proto/data.proto"; + +package apb.api.mission; + +service MissionService { + rpc ReceiveMissionRewardsById (ReceiveMissionRewardsByIdRequest) returns (ReceiveMissionRewardsResponse); + rpc UpdateMissionProgress (UpdateMissionProgressRequest) returns (UpdateMissionProgressResponse); + rpc ReceiveMissionPassRewards (ReceiveMissionPassRewardsRequest) returns (ReceiveMissionPassRewardsResponse); +} + +message CageMeasurableValues { + int32 runningDistanceMeters = 1; + int32 mamaTappedCount = 2; +} + +message ReceiveMissionRewardsByIdRequest { + repeated int32 missionId = 1; +} + +message ReceiveMissionRewardsResponse { + repeated MissionReward receivedPossession = 1; + repeated MissionReward expiredPossession = 2; + repeated MissionReward overflowPossession = 3; + map diffUserData = 99; +} + +message MissionReward { + int32 possessionType = 1; + int32 possessionId = 2; + int32 count = 3; +} + +message UpdateMissionProgressRequest { + CageMeasurableValues cageMeasurableValues = 50; + PictureBookMeasurableValues pictureBookMeasurableValues = 51; +} + +message PictureBookMeasurableValues { + int32 defeatWizardCount = 1; + RhythmInteractionMeasurableValues rhythmInteractionMeasurableValues = 2; +} + +message RhythmInteractionMeasurableValues { + int32 liveTypeId = 1; + int32 tapCount = 2; +} + +message UpdateMissionProgressResponse { + map diffUserData = 99; +} + +message ReceiveMissionPassRewardsRequest { + int32 missionPassId = 1; +} + +message ReceiveMissionPassRewardsResponse { + repeated MissionPassReward receivedPossession = 1; + repeated MissionPassReward overflowPossession = 2; + map diffUserData = 99; +} + +message MissionPassReward { + int32 possessionType = 1; + int32 possessionId = 2; + int32 count = 3; +} \ No newline at end of file diff --git a/src/proto/movie.proto b/src/proto/movie.proto new file mode 100644 index 0000000..0b0ba83 --- /dev/null +++ b/src/proto/movie.proto @@ -0,0 +1,19 @@ +syntax = "proto3"; + +option csharp_namespace = "MariesWonderland.Proto.Movie"; + +import "proto/data.proto"; + +package apb.api.movie; + +service MovieService { + rpc SaveViewedMovie (SaveViewedMovieRequest) returns (SaveViewedMovieResponse); +} + +message SaveViewedMovieRequest { + repeated int32 movieId = 1; +} + +message SaveViewedMovieResponse { + map diffUserData = 99; +} \ No newline at end of file diff --git a/src/proto/navicutin.proto b/src/proto/navicutin.proto new file mode 100644 index 0000000..1793d70 --- /dev/null +++ b/src/proto/navicutin.proto @@ -0,0 +1,19 @@ +syntax = "proto3"; + +option csharp_namespace = "MariesWonderland.Proto.NaviCutIn"; + +import "proto/data.proto"; + +package apb.api.navicutin; + +service NavicutinService { + rpc RegisterPlayed (RegisterPlayedRequest) returns (RegisterPlayedResponse); +} + +message RegisterPlayedRequest { + int32 naviCutId = 1; +} + +message RegisterPlayedResponse { + map diffUserData = 99; +} \ No newline at end of file diff --git a/src/proto/notification.proto b/src/proto/notification.proto new file mode 100644 index 0000000..1b89af5 --- /dev/null +++ b/src/proto/notification.proto @@ -0,0 +1,19 @@ +syntax = "proto3"; + +option csharp_namespace = "MariesWonderland.Proto.Notification"; + +import "google/protobuf/empty.proto"; +import "proto/data.proto"; + +package apb.api.notification; + +service NotificationService { + rpc GetHeaderNotification (google.protobuf.Empty) returns (GetHeaderNotificationResponse); +} + +message GetHeaderNotificationResponse { + int32 giftNotReceiveCount = 1; + int32 friendRequestReceiveCount = 2; + bool isExistUnreadInformation = 3; + map diffUserData = 99; +} \ No newline at end of file diff --git a/src/proto/omikuji.proto b/src/proto/omikuji.proto new file mode 100644 index 0000000..7e704fa --- /dev/null +++ b/src/proto/omikuji.proto @@ -0,0 +1,27 @@ +syntax = "proto3"; + +option csharp_namespace = "MariesWonderland.Proto.Omikuji"; + +import "proto/data.proto"; + +package apb.api.omikuji; + +service OmikujiService { + rpc OmikujiDraw (OmikujiDrawRequest) returns (OmikujiDrawResponse); +} + +message OmikujiDrawRequest { + int32 omikujiId = 1; +} + +message OmikujiDrawResponse { + int32 omikujiResultAssetId = 1; + repeated OmikujiItem omikujiItem = 2; + map diffUserData = 99; +} + +message OmikujiItem { + int32 possessionType = 1; + int32 possessionId = 2; + int32 count = 3; +} \ No newline at end of file diff --git a/src/proto/parts.proto b/src/proto/parts.proto new file mode 100644 index 0000000..2f21bf8 --- /dev/null +++ b/src/proto/parts.proto @@ -0,0 +1,108 @@ +syntax = "proto3"; + +option csharp_namespace = "MariesWonderland.Proto.Parts"; + +import "proto/data.proto"; + +package apb.api.parts; + +service PartsService { + rpc Sell (SellRequest) returns (SellResponse); + rpc Protect (ProtectRequest) returns (ProtectResponse); + rpc Unprotect (UnprotectRequest) returns (UnprotectResponse); + rpc Enhance (EnhanceRequest) returns (EnhanceResponse); + rpc UpdatePresetName (UpdatePresetNameRequest) returns (UpdatePresetNameResponse); + rpc UpdatePresetTagNumber (UpdatePresetTagNumberRequest) returns (UpdatePresetTagNumberResponse); + rpc UpdatePresetTagName (UpdatePresetTagNameRequest) returns (UpdatePresetTagNameResponse); + rpc ReplacePreset (ReplacePresetRequest) returns (ReplacePresetResponse); + rpc CopyPreset (CopyPresetRequest) returns (CopyPresetResponse); + rpc RemovePreset (RemovePresetRequest) returns (RemovePresetResponse); +} + +message SellRequest { + repeated string userPartsUuid = 1; +} + +message SellResponse { + map diffUserData = 99; +} + +message ProtectRequest { + repeated string userPartsUuid = 1; +} + +message ProtectResponse { + map diffUserData = 99; +} + +message UnprotectRequest { + repeated string userPartsUuid = 1; +} + +message UnprotectResponse { + map diffUserData = 99; +} + +message EnhanceRequest { + string userPartsUuid = 1; +} + +message EnhanceResponse { + bool isSuccess = 1; + map diffUserData = 99; +} + +message UpdatePresetNameRequest { + int32 userPartsPresetNumber = 1; + string name = 2; +} + +message UpdatePresetNameResponse { + map diffUserData = 99; +} + +message UpdatePresetTagNumberRequest { + int32 userPartsPresetNumber = 1; + int32 userPartsPresetTagNumber = 2; +} + +message UpdatePresetTagNumberResponse { + map diffUserData = 99; +} + +message UpdatePresetTagNameRequest { + int32 userPartsPresetTagNumber = 1; + string name = 2; +} + +message UpdatePresetTagNameResponse { + map diffUserData = 99; +} + +message ReplacePresetRequest { + int32 userPartsPresetNumber = 1; + string userPartsUuid01 = 2; + string userPartsUuid02 = 3; + string userPartsUuid03 = 4; +} + +message ReplacePresetResponse { + map diffUserData = 99; +} + +message CopyPresetRequest { + int32 fromUserPartsPresetNumber = 1; + int32 toUserPartsPresetNumber = 2; +} + +message CopyPresetResponse { + map diffUserData = 99; +} + +message RemovePresetRequest { + int32 userPartsPresetNumber = 1; +} + +message RemovePresetResponse { + map diffUserData = 99; +} \ No newline at end of file diff --git a/src/proto/portalcage.proto b/src/proto/portalcage.proto new file mode 100644 index 0000000..c263ef5 --- /dev/null +++ b/src/proto/portalcage.proto @@ -0,0 +1,32 @@ +syntax = "proto3"; + +option csharp_namespace = "MariesWonderland.Proto.PortalCage"; + +import "google/protobuf/empty.proto"; +import "proto/data.proto"; + +package apb.api.portalcage; + +service PortalcageService { + rpc UpdatePortalCageSceneProgress (UpdatePortalCageSceneProgressRequest) returns (UpdatePortalCageSceneProgressResponse); + rpc GetDropItem (google.protobuf.Empty) returns (GetDropItemResponse); +} + +message UpdatePortalCageSceneProgressRequest { + int32 portalCageSceneId = 1; +} + +message UpdatePortalCageSceneProgressResponse { + map diffUserData = 99; +} + +message GetDropItemResponse { + repeated PortalCageDropItem portalCageDropItem = 1; + map diffUserData = 99; +} + +message PortalCageDropItem { + int32 possessionType = 1; + int32 possessionId = 2; + int32 count = 3; +} \ No newline at end of file diff --git a/src/proto/pvp.proto b/src/proto/pvp.proto new file mode 100644 index 0000000..43bbda6 --- /dev/null +++ b/src/proto/pvp.proto @@ -0,0 +1,279 @@ +syntax = "proto3"; + +option csharp_namespace = "MariesWonderland.Proto.Pvp"; + +import "google/protobuf/empty.proto"; +import "proto/data.proto"; +import "google/protobuf/timestamp.proto"; + +package apb.api.pvp; + +service PvpService { + rpc GetTopData (google.protobuf.Empty) returns (GetTopDataResponse); + rpc GetMatchingList (google.protobuf.Empty) returns (GetMatchingListResponse); + rpc UpdateMatchingList (google.protobuf.Empty) returns (UpdateMatchingListResponse); + rpc StartBattle (StartBattleRequest) returns (StartBattleResponse); + rpc FinishBattle (FinishBattleRequest) returns (FinishBattleResponse); + rpc GetRanking (GetRankingRequest) returns (GetRankingResponse); + rpc GetSeasonResult (google.protobuf.Empty) returns (GetSeasonResultResponse); + rpc GetAttackLogList (google.protobuf.Empty) returns (GetAttackLogListResponse); + rpc GetDefenseLogList (google.protobuf.Empty) returns (GetDefenseLogListResponse); +} + +message WeeklyGradeResult { + int32 targetSeasonId = 1; + int32 pvpPoint = 2; + int32 pvpGradeWeeklyRewardGroupId = 3; +} + +message SeasonRankResult { + int32 targetSeasonId = 1; + int32 rank = 2; + int32 pvpSeasonRankRewardGroupId = 3; +} + +message WeeklyRankResult { + int32 targetSeasonId = 1; + int32 rank = 2; + int32 pvpWeeklyRankRewardGroupId = 3; +} + +message GetTopDataResponse { + int32 currentSeasonId = 1; + int32 pvpPoint = 2; + int32 rank = 3; + WeeklyGradeResult weeklyGradeResult = 4; + SeasonRankResult seasonRankResult = 5; + WeeklyRankResult weeklyRankResult = 6; + map diffUserData = 99; +} + +message GetMatchingListResponse { + repeated MatchingOpponent matching = 1; + map diffUserData = 99; +} + +message MatchingOpponent { + int64 playerId = 1; + string name = 2; + int32 pvpPoint = 3; + int32 rank = 4; + int32 deckPower = 5; + repeated int32 deckMainWeaponAttributeType = 6; + int32 mostPowerfulCostumeId = 7; +} + +message UpdateMatchingListResponse { + repeated MatchingOpponent matching = 1; + map diffUserData = 99; +} + +message StartBattleRequest { + int64 opponentPlayerId = 1; + int32 useDeckNumber = 2; +} + +message StartBattleResponse { + repeated DeckCharacter opponentDeckCharacter = 1; + map diffUserData = 99; +} + +message DeckCharacter { + CostumeInfo costume = 1; + CompanionInfo companion = 2; + WeaponInfo mainWeapon = 3; + repeated WeaponInfo subWeapon = 4; + repeated PartsInfo parts = 5; + repeated CharacterBoardAbilityInfo characterBoardAbilities = 6; + repeated CharacterBoardStatusUpInfo characterBoardStatusUps = 7; + repeated CostumeLevelBonusStatusUpInfo costumeLevelBonusStatusUps = 8; + repeated AwakenAbilityInfo awakenAbilities = 9; + repeated AwakenStatusUpInfo awakenStatusUps = 10; + ThoughtInfo thought = 11; + repeated StainedGlassStatusUpInfo stainedGlassStatusUps = 12; + repeated CostumeLotteryEffectAbilityInfo costumeLotteryEffectAbilities = 13; + repeated CostumeLotteryEffectStatusUpInfo costumeLotteryEffectStatusUps = 14; +} + +message CostumeInfo { + int32 costumeId = 1; + int32 limitBreakCount = 2; + int32 level = 3; + int32 activeSkillLevel = 4; + int32 characterLevel = 5; + int32 costumeLotteryEffectUnlockedSlotCount = 6; +} + +message CompanionInfo { + int32 companionId = 1; + int32 level = 2; +} + +message WeaponInfo { + int32 weaponId = 1; + int32 limitBreakCount = 2; + int32 level = 3; + repeated WeaponAbilityInfo weaponAbility = 4; + repeated WeaponSkillInfo weaponSkill = 5; + AwakenAbilityInfo weaponAwakenAbility = 6; + repeated AwakenStatusUpInfo weaponAwakenStatusUps = 7; +} + +message WeaponAbilityInfo { + int32 abilityId = 1; + int32 level = 2; +} + +message WeaponSkillInfo { + int32 skillId = 1; + int32 level = 2; +} + +message AwakenAbilityInfo { + int32 abilityId = 1; + int32 level = 2; +} + +message AwakenStatusUpInfo { + int32 statusCalculationType = 1; + int32 hp = 2; + int32 attack = 3; + int32 vitality = 4; + int32 agility = 5; + int32 criticalRatio = 6; + int32 criticalAttack = 7; +} + +message PartsInfo { + int32 partsId = 1; + int32 level = 2; + int32 partsMainStatusId = 3; + repeated PartsSubStatusInfo subPartsStatus = 4; +} + +message PartsSubStatusInfo { + int32 level = 1; + int32 statusKindType = 2; + int32 statusCalculationType = 3; + int32 statusChangeValue = 4; +} + +message CharacterBoardAbilityInfo { + int32 abilityId = 1; + int32 level = 2; +} + +message CharacterBoardStatusUpInfo { + int32 statusCalculationType = 1; + int32 hp = 2; + int32 attack = 3; + int32 vitality = 4; + int32 agility = 5; + int32 criticalRatio = 6; + int32 criticalAttack = 7; +} + +message CostumeLevelBonusStatusUpInfo { + int32 statusCalculationType = 1; + int32 hp = 2; + int32 attack = 3; + int32 vitality = 4; + int32 agility = 5; + int32 criticalRatio = 6; + int32 criticalAttack = 7; +} + +message ThoughtInfo { + int32 thoughtId = 1; +} + +message StainedGlassStatusUpInfo { + int32 statusCalculationType = 1; + int32 hp = 2; + int32 attack = 3; + int32 vitality = 4; + int32 agility = 5; + int32 criticalRatio = 6; + int32 criticalAttack = 7; +} + +message CostumeLotteryEffectAbilityInfo { + int32 abilityId = 1; + int32 level = 2; +} + +message CostumeLotteryEffectStatusUpInfo { + int32 statusCalculationType = 1; + int32 hp = 2; + int32 attack = 3; + int32 vitality = 4; + int32 agility = 5; + int32 criticalRatio = 6; + int32 criticalAttack = 7; +} + +message FinishBattleRequest { + int64 opponentPlayerId = 1; + bool isVictory = 2; +} + +message FinishBattleResponse { + int32 beforePvpPoint = 1; + int32 beforeRank = 2; + int32 afterPvpPoint = 3; + int32 afterRank = 4; + int32 pvpGradeOneMatchRewardId = 5; + int32 pvpGradeGroupId = 6; + map diffUserData = 99; +} + +message GetRankingRequest { + int32 rankFrom = 1; +} + +message GetRankingResponse { + repeated RankingUser rankingUser = 1; + int32 userCount = 2; + int32 rankingPosition = 3; + map diffUserData = 99; +} + +message RankingUser { + int32 rank = 1; + int64 playerId = 2; + string name = 3; + int32 pvpPoint = 4; + int32 deckPower = 5; + int32 favoriteCostumeId = 6; +} + +message GetSeasonResultResponse { + int32 attackWinCount = 1; + int32 attackLoseCount = 2; + int32 attackPvpPoint = 3; + int32 defenseWinRatePermil = 4; + int32 defensePvpPoint = 5; + map diffUserData = 99; +} + +message GetAttackLogListResponse { + repeated BattleLog attackLog = 1; + map diffUserData = 99; +} + +message BattleLog { + int64 playerId = 1; + string name = 2; + int32 pvpPoint = 3; + int32 deckPower = 4; + repeated int32 deckCostumeId = 5; + bool isVictory = 6; + google.protobuf.Timestamp battleDatetime = 7; + int32 fluctuatedPvpPoint = 8; + int32 rank = 9; +} + +message GetDefenseLogListResponse { + repeated BattleLog defenseLog = 1; + map diffUserData = 99; +} \ No newline at end of file diff --git a/src/proto/quest.proto b/src/proto/quest.proto new file mode 100644 index 0000000..4527a6c --- /dev/null +++ b/src/proto/quest.proto @@ -0,0 +1,333 @@ +syntax = "proto3"; + +option csharp_namespace = "MariesWonderland.Proto.Quest"; + +import "google/protobuf/empty.proto"; +import "proto/data.proto"; +import "proto/mission.proto"; + +package apb.api.quest; + +service QuestService { + rpc UpdateMainFlowSceneProgress (UpdateMainFlowSceneProgressRequest) returns (UpdateMainFlowSceneProgressResponse); + rpc UpdateReplayFlowSceneProgress (UpdateReplayFlowSceneProgressRequest) returns (UpdateReplayFlowSceneProgressResponse); + rpc UpdateMainQuestSceneProgress (UpdateMainQuestSceneProgressRequest) returns (UpdateMainQuestSceneProgressResponse); + rpc UpdateExtraQuestSceneProgress (UpdateExtraQuestSceneProgressRequest) returns (UpdateExtraQuestSceneProgressResponse); + rpc UpdateEventQuestSceneProgress (UpdateEventQuestSceneProgressRequest) returns (UpdateEventQuestSceneProgressResponse); + rpc StartMainQuest (StartMainQuestRequest) returns (StartMainQuestResponse); + rpc RestartMainQuest (RestartMainQuestRequest) returns (RestartMainQuestResponse); + rpc FinishMainQuest (FinishMainQuestRequest) returns (FinishMainQuestResponse); + rpc StartExtraQuest (StartExtraQuestRequest) returns (StartExtraQuestResponse); + rpc RestartExtraQuest (RestartExtraQuestRequest) returns (RestartExtraQuestResponse); + rpc FinishExtraQuest (FinishExtraQuestRequest) returns (FinishExtraQuestResponse); + rpc StartEventQuest (StartEventQuestRequest) returns (StartEventQuestResponse); + rpc RestartEventQuest (RestartEventQuestRequest) returns (RestartEventQuestResponse); + rpc FinishEventQuest (FinishEventQuestRequest) returns (FinishEventQuestResponse); + rpc FinishAutoOrbit (google.protobuf.Empty) returns (FinishAutoOrbitResponse); + rpc SetRoute (SetRouteRequest) returns (SetRouteResponse); + rpc SetQuestSceneChoice (SetQuestSceneChoiceRequest) returns (SetQuestSceneChoiceResponse); + rpc ReceiveTowerAccumulationReward (ReceiveTowerAccumulationRewardRequest) returns (ReceiveTowerAccumulationRewardResponse); + rpc SkipQuest (SkipQuestRequest) returns (SkipQuestResponse); + rpc SkipQuestBulk (SkipQuestBulkRequest) returns (SkipQuestBulkResponse); + rpc SetAutoSaleSetting (SetAutoSaleSettingRequest) returns (SetAutoSaleSettingResponse); + rpc StartGuerrillaFreeOpen (google.protobuf.Empty) returns (StartGuerrillaFreeOpenResponse); + rpc ResetLimitContentQuestProgress (ResetLimitContentQuestProgressRequest) returns (ResetLimitContentQuestProgressResponse); + rpc ReceiveDailyQuestGroupCompleteReward (google.protobuf.Empty) returns (ReceiveDailyQuestGroupCompleteRewardResponse); +} + +message UpdateMainFlowSceneProgressRequest { + int32 questSceneId = 1; +} + +message UpdateMainFlowSceneProgressResponse { + map diffUserData = 99; +} + +message UpdateReplayFlowSceneProgressRequest { + int32 questSceneId = 1; +} + +message UpdateReplayFlowSceneProgressResponse { + map diffUserData = 99; +} + +message UpdateMainQuestSceneProgressRequest { + int32 questSceneId = 1; +} + +message UpdateMainQuestSceneProgressResponse { + map diffUserData = 99; +} + +message UpdateExtraQuestSceneProgressRequest { + int32 questSceneId = 1; +} + +message UpdateExtraQuestSceneProgressResponse { + map diffUserData = 99; +} + +message UpdateEventQuestSceneProgressRequest { + int32 questSceneId = 1; +} + +message UpdateEventQuestSceneProgressResponse { + map diffUserData = 99; +} + +message StartMainQuestRequest { + int32 questId = 1; + bool isMainFlow = 2; + int32 userDeckNumber = 3; + bool isBattleOnly = 4; + int32 maxAutoOrbitCount = 5; + bool isReplayFlow = 6; + apb.api.mission.CageMeasurableValues cageMeasurableValues = 50; +} + +message StartMainQuestResponse { + repeated BattleDropReward battleDropReward = 1; + map diffUserData = 99; +} + +message BattleDropReward { + int32 questSceneId = 1; + int32 battleDropCategoryId = 2; + int32 battleDropEffectId = 3; +} + +message RestartMainQuestRequest { + int32 questId = 1; + bool isMainFlow = 2; +} + +message RestartMainQuestResponse { + repeated BattleDropReward battleDropReward = 1; + bytes battleBinary = 2; + int32 deckNumber = 3; + map diffUserData = 99; +} + +message FinishMainQuestRequest { + int32 questId = 1; + bool isRetired = 2; + bool isMainFlow = 3; + bool isAnnihilated = 4; + bool isAutoOrbit = 5; + int32 storySkipType = 6; + bool isReplayFlow = 7; + string vt = 200; +} + +message FinishMainQuestResponse { + repeated QuestReward dropReward = 1; + repeated QuestReward firstClearReward = 2; + repeated QuestReward missionClearReward = 3; + repeated QuestReward missionClearCompleteReward = 4; + repeated QuestReward autoOrbitResult = 5; + bool isBigWin = 6; + repeated int32 bigWinClearedQuestMissionIdList = 7; + repeated QuestReward replayFlowFirstClearReward = 8; + repeated QuestReward userStatusCampaignReward = 9; + QuestAutoOrbitResult autoOrbitReward = 10; + map diffUserData = 99; +} + +message QuestReward { + int32 possessionType = 1; + int32 possessionId = 2; + int32 count = 3; + int32 rewardEffectId = 4; + bool isAutoSale = 5; + bytes equipmentData = 6; +} + +message QuestAutoOrbitResult { + repeated QuestReward dropReward = 1; + repeated QuestReward userStatusCampaignReward = 2; +} + +message StartExtraQuestRequest { + int32 questId = 1; + int32 userDeckNumber = 2; +} + +message StartExtraQuestResponse { + repeated BattleDropReward battleDropReward = 1; + map diffUserData = 99; +} + +message RestartExtraQuestRequest { + int32 questId = 1; +} + +message RestartExtraQuestResponse { + repeated BattleDropReward battleDropReward = 1; + bytes battleBinary = 2; + int32 deckNumber = 3; + map diffUserData = 99; +} + +message FinishExtraQuestRequest { + int32 questId = 1; + bool isRetired = 2; + bool isAnnihilated = 3; + int32 storySkipType = 4; + string vt = 200; +} + +message FinishExtraQuestResponse { + repeated QuestReward dropReward = 1; + repeated QuestReward firstClearReward = 2; + repeated QuestReward missionClearReward = 3; + repeated QuestReward missionClearCompleteReward = 4; + bool isBigWin = 5; + repeated int32 bigWinClearedQuestMissionIdList = 6; + repeated QuestReward userStatusCampaignReward = 7; + map diffUserData = 99; +} + +message StartEventQuestRequest { + int32 eventQuestChapterId = 1; + int32 questId = 2; + int32 userDeckNumber = 3; + bool isBattleOnly = 4; + int32 maxAutoOrbitCount = 5; +} + +message StartEventQuestResponse { + repeated BattleDropReward battleDropReward = 1; + map diffUserData = 99; +} + +message RestartEventQuestRequest { + int32 eventQuestChapterId = 1; + int32 questId = 2; +} + +message RestartEventQuestResponse { + repeated BattleDropReward battleDropReward = 1; + bytes battleBinary = 2; + int32 deckNumber = 3; + map diffUserData = 99; +} + +message FinishEventQuestRequest { + int32 eventQuestChapterId = 1; + int32 questId = 2; + bool isRetired = 3; + bool isAnnihilated = 4; + bool isAutoOrbit = 5; + int32 storySkipType = 6; + string vt = 200; +} + +message FinishEventQuestResponse { + repeated QuestReward dropReward = 1; + repeated QuestReward firstClearReward = 2; + repeated QuestReward missionClearReward = 3; + repeated QuestReward missionClearCompleteReward = 4; + repeated QuestReward autoOrbitResult = 5; + bool isBigWin = 6; + repeated int32 bigWinClearedQuestMissionIdList = 7; + repeated QuestReward userStatusCampaignReward = 8; + QuestAutoOrbitResult autoOrbitReward = 9; + map diffUserData = 99; +} + +message FinishAutoOrbitResponse { + repeated QuestReward autoOrbitResult = 1; + QuestAutoOrbitResult autoOrbitReward = 2; + map diffUserData = 99; +} + +message SetRouteRequest { + int32 mainQuestRouteId = 1; +} + +message SetRouteResponse { + map diffUserData = 99; +} + +message SetQuestSceneChoiceRequest { + int32 questSceneId = 1; + int32 choiceNumber = 2; + int32 questFlowType = 3; +} + +message SetQuestSceneChoiceResponse { + map diffUserData = 99; +} + +message ReceiveTowerAccumulationRewardRequest { + int32 eventQuestChapterId = 1; + int32 targetMissionClearCount = 2; +} + +message ReceiveTowerAccumulationRewardResponse { + map diffUserData = 99; +} + +message SkipQuestRequest { + int32 questId = 1; + int32 questType = 2; + int32 userDeckNumber = 3; + int32 skipCount = 4; + repeated UseEffectItem useEffectItem = 5; + int32 questChapterId = 6; +} + +message UseEffectItem { + int32 consumableItemId = 1; + int32 count = 2; +} + +message SkipQuestResponse { + repeated QuestReward dropReward = 1; + repeated QuestReward userStatusCampaignReward = 2; + map diffUserData = 99; +} + +message SkipQuestBulkRequest { + repeated SkipQuestInfo skipQuestInfo = 1; + int32 userDeckNumber = 2; + repeated UseEffectItem useEffectItem = 3; +} + +message SkipQuestInfo { + int32 questId = 1; + int32 questType = 2; + int32 questChapterId = 3; + int32 skipCount = 4; +} + +message SkipQuestBulkResponse { + repeated QuestReward dropReward = 1; + repeated QuestReward userStatusCampaignReward = 2; + map diffUserData = 99; +} + +message SetAutoSaleSettingRequest { + map autoSaleSettingItem = 1; +} + +message SetAutoSaleSettingResponse { + map diffUserData = 99; +} + +message StartGuerrillaFreeOpenResponse { + map diffUserData = 99; +} + +message ResetLimitContentQuestProgressRequest { + int32 eventQuestChapterId = 1; + int32 questId = 2; +} + +message ResetLimitContentQuestProgressResponse { + map diffUserData = 99; +} + +message ReceiveDailyQuestGroupCompleteRewardResponse { + map diffUserData = 99; +} \ No newline at end of file diff --git a/src/proto/reward.proto b/src/proto/reward.proto new file mode 100644 index 0000000..762db9d --- /dev/null +++ b/src/proto/reward.proto @@ -0,0 +1,43 @@ +syntax = "proto3"; + +option csharp_namespace = "MariesWonderland.Proto.Reward"; + +import "google/protobuf/empty.proto"; +import "proto/pvp.proto"; +import "proto/data.proto"; +import "proto/bighunt.proto"; +import "proto/labyrinth.proto"; + +package apb.api.reward; + +service RewardService { + rpc ReceivePvpReward (google.protobuf.Empty) returns (ReceivePvpRewardResponse); + rpc ReceiveBigHuntReward (google.protobuf.Empty) returns (ReceiveBigHuntRewardResponse); + rpc ReceiveLabyrinthSeasonReward (google.protobuf.Empty) returns (ReceiveLabyrinthSeasonRewardResponse); + rpc ReceiveMissionPassRemainingReward (google.protobuf.Empty) returns (ReceiveMissionPassRemainingRewardResponse); +} + +message ReceivePvpRewardResponse { + apb.api.pvp.WeeklyGradeResult weeklyGradeResult = 1; + apb.api.pvp.SeasonRankResult seasonRankResult = 2; + apb.api.pvp.WeeklyRankResult weeklyRankResult = 3; + map diffUserData = 99; +} + +message ReceiveBigHuntRewardResponse { + repeated apb.api.bighunt.WeeklyScoreResult weeklyScoreResult = 1; + repeated apb.api.bighunt.BigHuntReward weeklyScoreReward = 2; + bool isReceivedWeeklyScoreReward = 3; + repeated apb.api.bighunt.BigHuntReward lastWeekWeeklyScoreReward = 4; + map diffUserData = 99; +} + +message ReceiveLabyrinthSeasonRewardResponse { + repeated apb.api.labyrinth.LabyrinthSeasonResult seasonResult = 1; + map diffUserData = 99; +} + +message ReceiveMissionPassRemainingRewardResponse { + int32 rewardReceivedMissionPassId = 1; + map diffUserData = 99; +} \ No newline at end of file diff --git a/src/proto/shop.proto b/src/proto/shop.proto new file mode 100644 index 0000000..f6e92af --- /dev/null +++ b/src/proto/shop.proto @@ -0,0 +1,73 @@ +syntax = "proto3"; + +option csharp_namespace = "MariesWonderland.Proto.Shop"; + +import "google/protobuf/empty.proto"; +import "proto/data.proto"; + +package apb.api.shop; + +service ShopService { + rpc Buy (BuyRequest) returns (BuyResponse); + rpc RefreshUserData (RefreshRequest) returns (RefreshResponse); + rpc GetCesaLimit (google.protobuf.Empty) returns (GetCesaLimitResponse); + rpc CreatePurchaseTransaction (CreatePurchaseTransactionRequest) returns (CreatePurchaseTransactionResponse); + rpc PurchaseGooglePlayStoreProduct (PurchaseGooglePlayStoreProductRequest) returns (PurchaseGooglePlayStoreProductResponse); +} + +message BuyRequest { + int32 shopId = 1; + map shopItems = 2; +} + +message BuyResponse { + repeated Possession overflowPossession = 1; + map diffUserData = 99; +} + +message Possession { + int32 possessionType = 1; + int32 possessionId = 2; + int32 count = 3; +} + +message RefreshRequest { + bool isGemUsed = 1; +} + +message RefreshResponse { + map diffUserData = 99; +} + +message GetCesaLimitResponse { + repeated CesaLimit cesaLimit = 1; + map diffUserData = 99; +} + +message CesaLimit { + int32 age = 1; + int32 limit = 2; +} + +message CreatePurchaseTransactionRequest { + int32 shopId = 1; + int32 shopItemId = 2; + string productId = 3; + string amazonUserId = 4; +} + +message CreatePurchaseTransactionResponse { + string purchaseTransactionId = 1; + map diffUserData = 99; +} + +message PurchaseGooglePlayStoreProductRequest { + string purchaseTransactionId = 1; + string purchaseData = 2; + string dataSignature = 3; +} + +message PurchaseGooglePlayStoreProductResponse { + repeated Possession overflowPossession = 1; + map diffUserData = 99; +} \ No newline at end of file diff --git a/src/proto/sidestoryquest.proto b/src/proto/sidestoryquest.proto new file mode 100644 index 0000000..bcbf0a3 --- /dev/null +++ b/src/proto/sidestoryquest.proto @@ -0,0 +1,29 @@ +syntax = "proto3"; + +option csharp_namespace = "MariesWonderland.Proto.SideStoryQuest"; + +import "proto/data.proto"; + +package apb.api.sidestoryquest; + +service SidestoryquestService { + rpc MoveSideStoryQuestProgress (MoveSideStoryQuestRequest) returns (MoveSideStoryQuestResponse); + rpc UpdateSideStoryQuestSceneProgress (UpdateSideStoryQuestSceneProgressRequest) returns (UpdateSideStoryQuestSceneProgressResponse); +} + +message MoveSideStoryQuestRequest { + int32 sideStoryQuestId = 1; +} + +message MoveSideStoryQuestResponse { + map diffUserData = 99; +} + +message UpdateSideStoryQuestSceneProgressRequest { + int32 sideStoryQuestId = 1; + int32 sideStoryQuestSceneId = 2; +} + +message UpdateSideStoryQuestSceneProgressResponse { + map diffUserData = 99; +} \ No newline at end of file diff --git a/src/proto/tutorial.proto b/src/proto/tutorial.proto new file mode 100644 index 0000000..940ba37 --- /dev/null +++ b/src/proto/tutorial.proto @@ -0,0 +1,42 @@ +syntax = "proto3"; + +option csharp_namespace = "MariesWonderland.Proto.Tutorial"; + +import "proto/data.proto"; +import "proto/deck.proto"; + +package apb.api.tutorial; + +service TutorialService { + rpc SetTutorialProgress (SetTutorialProgressRequest) returns (SetTutorialProgressResponse); + rpc SetTutorialProgressAndReplaceDeck (SetTutorialProgressAndReplaceDeckRequest) returns (SetTutorialProgressAndReplaceDeckResponse); +} + +message SetTutorialProgressRequest { + int32 tutorialType = 1; + int32 progressPhase = 2; + int32 choiceId = 3; +} + +message SetTutorialProgressResponse { + repeated TutorialChoiceReward tutorialChoiceReward = 1; + map diffUserData = 99; +} + +message TutorialChoiceReward { + int32 possessionType = 1; + int32 possessionId = 2; + int32 count = 3; +} + +message SetTutorialProgressAndReplaceDeckRequest { + int32 tutorialType = 1; + int32 progressPhase = 2; + int32 deckType = 3; + int32 userDeckNumber = 4; + apb.api.deck.Deck deck = 5; +} + +message SetTutorialProgressAndReplaceDeckResponse { + map diffUserData = 99; +} \ No newline at end of file diff --git a/src/proto/user.proto b/src/proto/user.proto new file mode 100644 index 0000000..5020f9e --- /dev/null +++ b/src/proto/user.proto @@ -0,0 +1,262 @@ +syntax = "proto3"; + +option csharp_namespace = "MariesWonderland.Proto.User"; + +import "google/protobuf/empty.proto"; +import "proto/data.proto"; +import "google/protobuf/timestamp.proto"; + +package apb.api.user; + +service UserService { + rpc RegisterUser (RegisterUserRequest) returns (RegisterUserResponse); + rpc TransferUser (TransferUserRequest) returns (TransferUserResponse); + rpc Auth (AuthUserRequest) returns (AuthUserResponse); + rpc GameStart (google.protobuf.Empty) returns (GameStartResponse); + rpc SetUserName (SetUserNameRequest) returns (SetUserNameResponse); + rpc SetUserMessage (SetUserMessageRequest) returns (SetUserMessageResponse); + rpc SetUserFavoriteCostumeId (SetUserFavoriteCostumeIdRequest) returns (SetUserFavoriteCostumeIdResponse); + rpc GetUserProfile (GetUserProfileRequest) returns (GetUserProfileResponse); + rpc SetBirthYearMonth (SetBirthYearMonthRequest) returns (SetBirthYearMonthResponse); + rpc GetBirthYearMonth (google.protobuf.Empty) returns (GetBirthYearMonthResponse); + rpc GetChargeMoney (google.protobuf.Empty) returns (GetChargeMoneyResponse); + rpc SetUserSetting (SetUserSettingRequest) returns (SetUserSettingResponse); + rpc GetAndroidArgs (GetAndroidArgsRequest) returns (GetAndroidArgsResponse); + rpc GetBackupToken (GetBackupTokenRequest) returns (GetBackupTokenResponse); + rpc CheckTransferSetting (google.protobuf.Empty) returns (CheckTransferSettingResponse); + rpc SetFacebookAccount (SetFacebookAccountRequest) returns (SetFacebookAccountResponse); + rpc UnsetFacebookAccount (google.protobuf.Empty) returns (UnsetFacebookAccountResponse); + rpc SetAppleAccount (SetAppleAccountRequest) returns (SetAppleAccountResponse); + rpc TransferUserByFacebook (TransferUserByFacebookRequest) returns (TransferUserByFacebookResponse); + rpc TransferUserByApple (TransferUserByAppleRequest) returns (TransferUserByAppleResponse); + rpc GetUserGamePlayNote (GetUserGamePlayNoteRequest) returns (GetUserGamePlayNoteResponse); +} + +message RegisterUserRequest { + string uuid = 1; + string terminalId = 2; + string registerSignature = 3; +} + +message RegisterUserResponse { + int64 userId = 1; + string signature = 2; + map diffUserData = 99; +} + +message TransferUserRequest { + string uuid = 1; +} + +message TransferUserResponse { + int64 userId = 1; + string signature = 2; + map diffUserData = 99; +} + +message AuthUserRequest { + string uuid = 1; + string signature = 2; + string advertisingId = 3; + bool isTrackingEnabled = 4; + UserDeviceInherent deviceInherent = 5; + string tr = 6; +} + +message UserDeviceInherent { + string identifierForVendor = 1; + string deviceToken = 2; + string macAddress = 3; + string registrationId = 4; +} + +message AuthUserResponse { + string sessionKey = 1; + google.protobuf.Timestamp expireDatetime = 2; + string signature = 3; + int64 userId = 4; + map diffUserData = 99; +} + +message GameStartResponse { + map diffUserData = 99; +} + +message SetUserNameRequest { + string name = 1; +} + +message SetUserNameResponse { + map diffUserData = 99; +} + +message SetUserMessageRequest { + string message = 1; +} + +message SetUserMessageResponse { + map diffUserData = 99; +} + +message SetUserFavoriteCostumeIdRequest { + int32 favoriteCostumeId = 1; +} + +message SetUserFavoriteCostumeIdResponse { + map diffUserData = 99; +} + +message GetUserProfileRequest { + int64 playerId = 1; +} + +message GetUserProfileResponse { + int32 level = 1; + string name = 2; + int32 favoriteCostumeId = 3; + string message = 4; + bool isFriend = 5; + ProfileDeck latestUsedDeck = 6; + ProfilePvpInfo pvpInfo = 7; + GamePlayHistory gamePlayHistory = 8; + map diffUserData = 99; +} + +message ProfileDeck { + int32 power = 1; + repeated ProfileDeckCharacter deckCharacter = 2; +} + +message ProfileDeckCharacter { + int32 costumeId = 1; + int32 mainWeaponId = 2; + int32 mainWeaponLevel = 3; +} + +message ProfilePvpInfo { + int32 currentRank = 1; + int32 currentGradeId = 2; + int32 maxSeasonRank = 3; +} + +message GamePlayHistory { + repeated PlayHistoryItem historyItem = 1; + repeated PlayHistoryCategoryGraphItem historyCategoryGraphItem = 2; +} + +message PlayHistoryItem { + int32 historyItemId = 1; + int64 count = 2; +} + +message PlayHistoryCategoryGraphItem { + int32 categoryTypeId = 1; + int32 progressPermil = 2; +} + +message SetBirthYearMonthRequest { + int32 birthYear = 1; + int32 birthMonth = 2; +} + +message SetBirthYearMonthResponse { + map diffUserData = 99; +} + +message GetBirthYearMonthResponse { + int32 birthYear = 1; + int32 birthMonth = 2; + map diffUserData = 99; +} + +message GetChargeMoneyResponse { + int64 chargeMoneyThisMonth = 1; + map diffUserData = 99; +} + +message SetUserSettingRequest { + bool isNotifyPurchaseAlert = 1; +} + +message SetUserSettingResponse { + map diffUserData = 99; +} + +message GetAndroidArgsRequest { + string uuid = 1; + string signature = 2; + UserDeviceInherent deviceInherent = 3; + string packageName = 4; +} + +message GetAndroidArgsResponse { + string nonce = 1; + string apiKey = 2; + map diffUserData = 99; +} + +message GetBackupTokenRequest { + string uuid = 1; +} + +message GetBackupTokenResponse { + string backupToken = 1; + map diffUserData = 99; +} + +message CheckTransferSettingResponse { + map diffUserData = 99; +} + +message SetFacebookAccountRequest { + string token = 1; +} + +message SetFacebookAccountResponse { + map diffUserData = 99; +} + +message UnsetFacebookAccountResponse { + map diffUserData = 99; +} + +message SetAppleAccountRequest { + string token = 1; +} + +message SetAppleAccountResponse { + map diffUserData = 99; +} + +message TransferUserByFacebookRequest { + string token = 1; + string uuid = 2; + string terminalId = 3; +} + +message TransferUserByFacebookResponse { + int64 userId = 1; + string signature = 2; + map diffUserData = 99; +} + +message TransferUserByAppleRequest { + string token = 1; + string uuid = 2; + string terminalId = 3; +} + +message TransferUserByAppleResponse { + int64 userId = 1; + string signature = 2; + map diffUserData = 99; +} + +message GetUserGamePlayNoteRequest { + int32 gamePlayHistoryTypeId = 1; +} + +message GetUserGamePlayNoteResponse { + int32 progressValue = 1; + map diffUserData = 99; +} \ No newline at end of file diff --git a/src/proto/weapon.proto b/src/proto/weapon.proto new file mode 100644 index 0000000..a0f2489 --- /dev/null +++ b/src/proto/weapon.proto @@ -0,0 +1,121 @@ +syntax = "proto3"; + +option csharp_namespace = "MariesWonderland.Proto.Weapon"; + +import "proto/data.proto"; + +package apb.api.weapon; + +service WeaponService { + rpc Sell (SellRequest) returns (SellResponse); + rpc Protect (ProtectRequest) returns (ProtectResponse); + rpc Unprotect (UnprotectRequest) returns (UnprotectResponse); + rpc EnhanceByWeapon (EnhanceByWeaponRequest) returns (EnhanceByWeaponResponse); + rpc EnhanceByMaterial (EnhanceByMaterialRequest) returns (EnhanceByMaterialResponse); + rpc EnhanceSkill (EnhanceSkillRequest) returns (EnhanceSkillResponse); + rpc EnhanceAbility (EnhanceAbilityRequest) returns (EnhanceAbilityResponse); + rpc LimitBreakByWeapon (LimitBreakByWeaponRequest) returns (LimitBreakByWeaponResponse); + rpc LimitBreakByMaterial (LimitBreakByMaterialRequest) returns (LimitBreakByMaterialResponse); + rpc Evolve (EvolveRequest) returns (EvolveResponse); + rpc Awaken (AwakenRequest) returns (AwakenResponse); +} + +message SellRequest { + repeated string userWeaponUuid = 1; +} + +message SellResponse { + map diffUserData = 99; +} + +message ProtectRequest { + repeated string userWeaponUuid = 1; +} + +message ProtectResponse { + map diffUserData = 99; +} + +message UnprotectRequest { + repeated string userWeaponUuid = 1; +} + +message UnprotectResponse { + map diffUserData = 99; +} + +message EnhanceByWeaponRequest { + string userWeaponUuid = 1; + repeated string materialUserWeaponUuids = 2; +} + +message EnhanceByWeaponResponse { + bool isGreatSuccess = 1; + repeated string surplusEnhanceWeapon = 2; + map diffUserData = 99; +} + +message EnhanceByMaterialRequest { + string userWeaponUuid = 1; + map materials = 2; +} + +message EnhanceByMaterialResponse { + bool isGreatSuccess = 1; + map surplusEnhanceMaterial = 2; + map diffUserData = 99; +} + +message EnhanceSkillRequest { + string userWeaponUuid = 1; + int32 skillId = 2; + int32 addLevelCount = 3; +} + +message EnhanceSkillResponse { + map diffUserData = 99; +} + +message EnhanceAbilityRequest { + string userWeaponUuid = 1; + int32 abilityId = 2; + int32 addLevelCount = 3; +} + +message EnhanceAbilityResponse { + map diffUserData = 99; +} + +message LimitBreakByWeaponRequest { + string userWeaponUuid = 1; + repeated string materialUserWeaponUuids = 2; +} + +message LimitBreakByWeaponResponse { + map diffUserData = 99; +} + +message LimitBreakByMaterialRequest { + string userWeaponUuid = 1; + map materials = 2; +} + +message LimitBreakByMaterialResponse { + map diffUserData = 99; +} + +message EvolveRequest { + string userWeaponUuid = 1; +} + +message EvolveResponse { + map diffUserData = 99; +} + +message AwakenRequest { + string userWeaponUuid = 1; +} + +message AwakenResponse { + map diffUserData = 99; +} \ No newline at end of file diff --git a/tests/Infrastructure/FakeServerCallContext.cs b/tests/Infrastructure/FakeServerCallContext.cs new file mode 100644 index 0000000..b1b4871 --- /dev/null +++ b/tests/Infrastructure/FakeServerCallContext.cs @@ -0,0 +1,41 @@ +using Grpc.Core; + +namespace MariesWonderland.Tests.Infrastructure; + +/// +/// Minimal stub that pre-populates the +/// x-apb-user-id request header so service methods can call +/// context.GetUserId() without a real gRPC channel. +/// +public sealed class FakeServerCallContext : ServerCallContext +{ + private readonly Metadata _requestHeaders; + private readonly Metadata _responseTrailers = []; + private readonly CancellationToken _cancellationToken; + + private FakeServerCallContext(long userId, CancellationToken cancellationToken = default) + { + _requestHeaders = [new Metadata.Entry("x-apb-user-id", userId.ToString())]; + _cancellationToken = cancellationToken; + } + + public static FakeServerCallContext For(long userId, CancellationToken cancellationToken = default) + => new(userId, cancellationToken); + + protected override string MethodCore => string.Empty; + protected override string HostCore => string.Empty; + protected override string PeerCore => string.Empty; + protected override DateTime DeadlineCore => DateTime.MaxValue; + protected override Metadata RequestHeadersCore => _requestHeaders; + protected override CancellationToken CancellationTokenCore => _cancellationToken; + protected override Metadata ResponseTrailersCore => _responseTrailers; + protected override Status StatusCore { get; set; } + protected override WriteOptions? WriteOptionsCore { get; set; } + protected override AuthContext AuthContextCore => new(string.Empty, []); + + protected override ContextPropagationToken CreatePropagationTokenCore(ContextPropagationOptions? options) => + throw new NotImplementedException(); + + protected override Task WriteResponseHeadersAsyncCore(Metadata responseHeaders) => + throw new NotImplementedException(); +} diff --git a/tests/Infrastructure/MasterDatabaseFixture.cs b/tests/Infrastructure/MasterDatabaseFixture.cs new file mode 100644 index 0000000..22268cb --- /dev/null +++ b/tests/Infrastructure/MasterDatabaseFixture.cs @@ -0,0 +1,32 @@ +using MariesWonderland.Configuration; +using MariesWonderland.Data; +using Microsoft.Extensions.Configuration; + +namespace MariesWonderland.Tests.Infrastructure; + +/// +/// Shared fixture that loads the master database and game config once per test collection. +/// Use as IClassFixture<MasterDatabaseFixture> on test classes that need master data. +/// +public sealed class MasterDatabaseFixture : IDisposable +{ + public DarkMasterMemoryDatabase MasterDb { get; } + public GameConfig GameConfig { get; } + + public MasterDatabaseFixture() + { + var config = new ConfigurationBuilder() + .SetBasePath(Path.Combine(AppContext.BaseDirectory, "..", "..", "..", "..", "src")) + .AddJsonFile("appsettings.json", optional: false) + .AddJsonFile("appsettings.Development.json", optional: true) + .Build(); + + var options = config.GetSection(ServerOptions.SectionName).Get()!; + var binPath = Path.Combine(options.Paths.MasterDatabase, $"{options.Data.LatestMasterDataVersion}.bin.e"); + + MasterDb = BinaryMasterDataLoader.Load(binPath); + GameConfig = GameConfig.From(MasterDb.EntityMConfig); + } + + public void Dispose() { } +} diff --git a/tests/Infrastructure/ServiceTestBase.cs b/tests/Infrastructure/ServiceTestBase.cs new file mode 100644 index 0000000..ed93cd1 --- /dev/null +++ b/tests/Infrastructure/ServiceTestBase.cs @@ -0,0 +1,37 @@ +using MariesWonderland.Data; + +namespace MariesWonderland.Tests.Infrastructure; + +/// +/// Base class for service-level tests. Concrete test classes should implement +/// IClassFixture<MasterDatabaseFixture> and pass the fixture here. +/// +public abstract class ServiceTestBase +{ + protected DarkMasterMemoryDatabase MasterDb { get; } + protected GameConfig GameConfig { get; } + + protected ServiceTestBase(MasterDatabaseFixture fixture) + { + MasterDb = fixture.MasterDb; + GameConfig = fixture.GameConfig; + } + + /// Creates a fresh empty user database. + protected static DarkUserMemoryDatabase CreateUserDb() => new(); + + /// + /// Creates a pre-loaded with the given user database + /// so that store.GetOrCreate(userId) returns . + /// + protected static UserDataStore CreateStore(long userId, DarkUserMemoryDatabase userDb, DarkMasterMemoryDatabase masterDb) + { + var store = new UserDataStore(masterDb); + store.Set(userId, userDb); + return store; + } + + /// Shorthand for . + protected static FakeServerCallContext ContextFor(long userId = 1) + => FakeServerCallContext.For(userId); +} diff --git a/tests/Interceptors/AutoSaveInterceptorTests.cs b/tests/Interceptors/AutoSaveInterceptorTests.cs new file mode 100644 index 0000000..ce96be4 --- /dev/null +++ b/tests/Interceptors/AutoSaveInterceptorTests.cs @@ -0,0 +1,57 @@ +using MariesWonderland.Data; +using MariesWonderland.Interceptors; +using MariesWonderland.Proto.User; +using MariesWonderland.Tests.Infrastructure; +using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Logging.Abstractions; + +namespace MariesWonderland.Tests.Interceptors; + +public class AutoSaveInterceptorTests : InterceptorTestBase +{ + private static readonly ILogger Logger = NullLogger.Instance; + + private static AutoSaveInterceptor CreateInterceptor(UserDataStore store) => + new(store, Logger); + + /// + /// Verifies that the interceptor returns the continuation's response unchanged. + /// + [Fact] + public async Task ContinuationResultIsReturned() + { + var store = CreateEmptyStore(); + var interceptor = CreateInterceptor(store); + var context = FakeServerCallContext.For(userId: 1); + var expected = new SetUserNameResponse(); + + var result = await CallInterceptor( + interceptor, + new SetUserNameRequest(), + context, + () => expected); + + Assert.Same(expected, result); + } + + /// + /// Verifies that when the userId is valid but the user is not in the store, + /// the interceptor still returns the response without crashing. + /// + [Fact] + public async Task UnknownUser_ContinuationStillCalled() + { + var store = CreateEmptyStore(); + var interceptor = CreateInterceptor(store); + var context = FakeServerCallContext.For(userId: 999); + var expected = new SetUserNameResponse(); + + var result = await CallInterceptor( + interceptor, + new SetUserNameRequest(), + context, + () => expected); + + Assert.Same(expected, result); + } +} diff --git a/tests/Interceptors/CommonHeaderInterceptorTests.cs b/tests/Interceptors/CommonHeaderInterceptorTests.cs new file mode 100644 index 0000000..ee848cd --- /dev/null +++ b/tests/Interceptors/CommonHeaderInterceptorTests.cs @@ -0,0 +1,70 @@ +using MariesWonderland.Interceptors; +using MariesWonderland.Proto.User; +using MariesWonderland.Tests.Infrastructure; + +namespace MariesWonderland.Tests.Interceptors; + +public class CommonHeaderInterceptorTests : InterceptorTestBase +{ + private static readonly CommonHeaderInterceptor Interceptor = new(); + + /// + /// Verifies that after handling a unary call the interceptor adds the + /// x-apb-response-datetime trailer to the response metadata. + /// + [Fact] + public async Task AddsResponseDatetimeTrailer() + { + var context = FakeServerCallContext.For(userId: 1); + + await CallInterceptor(Interceptor, + new SetUserNameRequest(), + context, + () => new SetUserNameResponse()); + + var trailer = context.ResponseTrailers + .FirstOrDefault(m => m.Key == "x-apb-response-datetime"); + Assert.NotNull(trailer); + } + + /// + /// Verifies that the x-apb-response-datetime trailer value is a valid + /// Unix timestamp in milliseconds and is within 5 seconds of the current time. + /// + [Fact] + public async Task ResponseDatetimeIsValidRecentUnixTimestamp() + { + var context = FakeServerCallContext.For(userId: 1); + var before = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(); + + await CallInterceptor(Interceptor, + new SetUserNameRequest(), + context, + () => new SetUserNameResponse()); + + var after = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(); + + var trailer = context.ResponseTrailers + .First(m => m.Key == "x-apb-response-datetime"); + var timestamp = long.Parse(trailer.Value); + + Assert.InRange(timestamp, before, after + 5000); + } + + /// + /// Verifies that the interceptor returns the continuation's response unchanged. + /// + [Fact] + public async Task ResponseIsReturnedUnchanged() + { + var context = FakeServerCallContext.For(userId: 1); + var expected = new SetUserNameResponse(); + + var result = await CallInterceptor(Interceptor, + new SetUserNameRequest(), + context, + () => expected); + + Assert.Same(expected, result); + } +} diff --git a/tests/Interceptors/DiffInterceptorTests.cs b/tests/Interceptors/DiffInterceptorTests.cs new file mode 100644 index 0000000..df9c0d5 --- /dev/null +++ b/tests/Interceptors/DiffInterceptorTests.cs @@ -0,0 +1,194 @@ +using Grpc.Core; +using MariesWonderland.Data; +using MariesWonderland.Interceptors; +using MariesWonderland.Models.Entities; +using MariesWonderland.Proto.User; +using MariesWonderland.Tests.Infrastructure; +using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Logging.Abstractions; + +namespace MariesWonderland.Tests.Interceptors; + +public class DiffInterceptorTests : InterceptorTestBase +{ + private static readonly ILogger Logger = NullLogger.Instance; + + private static DiffInterceptor CreateInterceptor(UserDataStore store) => + new(store, Logger); + + private record NoopResponse; + + /// + /// Verifies that when the response type has no DiffUserData property, + /// the interceptor passes through without modification and returns the + /// continuation's result unchanged. + /// + [Fact] + public async Task ResponseWithoutDiffProperty_PassesThroughWithoutModification() + { + var store = CreateEmptyStore(); + var interceptor = CreateInterceptor(store); + var context = FakeServerCallContext.For(userId: 1); + var expected = new NoopResponse(); + + var result = await CallInterceptor( + interceptor, + new object(), + context, + () => expected); + + Assert.Same(expected, result); + } + + /// + /// Verifies that when the user's database is not modified during the call, + /// the DiffUserData map on the response remains empty and no + /// x-apb-update-user-data-names trailer is added. + /// + [Fact] + public async Task KnownUser_DbUnchanged_DiffIsEmpty_NoTrailer() + { + var userDb = new DarkUserMemoryDatabase(); + var store = CreateStoreWithUser(1, userDb); + var interceptor = CreateInterceptor(store); + var context = FakeServerCallContext.For(userId: 1); + + var response = await CallInterceptor( + interceptor, + new SetUserNameRequest(), + context, + () => new SetUserNameResponse()); + + Assert.Empty(response.DiffUserData); + + var trailer = context.ResponseTrailers + .FirstOrDefault(m => m.Key == "x-apb-update-user-data-names"); + Assert.Null(trailer); + } + + /// + /// Verifies that when the continuation modifies the user's database + /// (adds a weapon record), the DiffUserData map on the response + /// contains the corresponding "IUserWeapon" key. + /// + [Fact] + public async Task KnownUser_DbModified_DiffPopulated() + { + var userDb = new DarkUserMemoryDatabase(); + var store = CreateStoreWithUser(1, userDb); + var interceptor = CreateInterceptor(store); + var context = FakeServerCallContext.For(userId: 1); + + var response = await CallInterceptor( + interceptor, + new SetUserNameRequest(), + context, + () => + { + userDb.EntityIUserWeapon.Add(new EntityIUserWeapon + { + UserId = 1, + UserWeaponUuid = "test-uuid", + WeaponId = 100, + Level = 1 + }); + return new SetUserNameResponse(); + }); + + Assert.Contains("IUserWeapon", response.DiffUserData.Keys); + } + + /// + /// Verifies that when the continuation modifies two different tables, + /// the x-apb-update-user-data-names trailer contains both table names + /// comma-separated and sorted alphabetically. + /// + [Fact] + public async Task KnownUser_DbModified_TrailerContainsSortedTableNames() + { + var userDb = new DarkUserMemoryDatabase(); + var store = CreateStoreWithUser(1, userDb); + var interceptor = CreateInterceptor(store); + var context = FakeServerCallContext.For(userId: 1); + + var response = await CallInterceptor( + interceptor, + new SetUserNameRequest(), + context, + () => + { + userDb.EntityIUserWeapon.Add(new EntityIUserWeapon + { + UserId = 1, + UserWeaponUuid = "test-uuid", + WeaponId = 100, + Level = 1 + }); + userDb.EntityIUserStatus.Add(new EntityIUserStatus + { + UserId = 1, + Level = 1, + Exp = 0, + StaminaMilliValue = 60000, + StaminaUpdateDatetime = 0 + }); + return new SetUserNameResponse(); + }); + + var trailer = context.ResponseTrailers + .FirstOrDefault(m => m.Key == "x-apb-update-user-data-names"); + Assert.NotNull(trailer); + + // "IUserStatus" comes before "IUserWeapon" alphabetically + Assert.Equal("IUserStatus,IUserWeapon", trailer.Value); + } + + /// + /// Verifies the RegisterUser path: when userId is 0 in the request headers, + /// the interceptor runs the continuation first, extracts the newly assigned + /// UserId from the response, and diffs the full state against an empty baseline. + /// + [Fact] + public async Task RegisterUser_FullStateDiffed() + { + var userDb = new DarkUserMemoryDatabase(); + userDb.EntityIUser.Add(new EntityIUser + { + UserId = 42, + PlayerId = 1, + RegisterDatetime = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds() + }); + + var store = CreateStoreWithUser(42, userDb); + var interceptor = CreateInterceptor(store); + var context = FakeServerCallContext.For(userId: 0); + + var response = await CallInterceptor( + interceptor, + new SetUserNameRequest(), + context, + () => new AuthUserResponse { UserId = 42 }); + + Assert.NotEmpty(response.DiffUserData); + } + + /// + /// Verifies that when the user is not in the store, the interceptor + /// gracefully handles it: DiffUserData remains empty and no exception is thrown. + /// + [Fact] + public async Task UserNotInStore_NoSnapshotTaken_DiffIsEmpty() + { + var store = CreateEmptyStore(); + var interceptor = CreateInterceptor(store); + var context = FakeServerCallContext.For(userId: 99); + + var response = await CallInterceptor( + interceptor, + new SetUserNameRequest(), + context, + () => new SetUserNameResponse()); + + Assert.Empty(response.DiffUserData); + } +} diff --git a/tests/Interceptors/InterceptorTestBase.cs b/tests/Interceptors/InterceptorTestBase.cs new file mode 100644 index 0000000..7ed9229 --- /dev/null +++ b/tests/Interceptors/InterceptorTestBase.cs @@ -0,0 +1,49 @@ +using Grpc.Core; +using Grpc.Core.Interceptors; +using MariesWonderland.Data; +using MariesWonderland.Tests.Infrastructure; + +namespace MariesWonderland.Tests.Interceptors; + +/// +/// Base class for interceptor tests. Provides shared helpers for invoking +/// an interceptor's unary handler directly and constructing empty user stores. +/// +public abstract class InterceptorTestBase +{ + /// + /// Invokes an interceptor's UnaryServerHandler directly, bypassing the gRPC pipeline. + /// The continuation simply calls and returns its result. + /// + protected static Task CallInterceptor( + Interceptor interceptor, + TRequest request, + ServerCallContext context, + Func continuationBody) + where TRequest : class + where TResponse : class + { + return interceptor.UnaryServerHandler( + request, + context, + (req, ctx) => Task.FromResult(continuationBody())); + } + + /// Creates a with no users registered. + protected static UserDataStore CreateEmptyStore() => + new(new DarkMasterMemoryDatabase()); + + /// + /// Creates a pre-loaded with the given user database. + /// + protected static UserDataStore CreateStoreWithUser(long userId, DarkUserMemoryDatabase userDb) + { + var store = new UserDataStore(new DarkMasterMemoryDatabase()); + store.Set(userId, userDb); + return store; + } + + /// Shorthand for . + protected static FakeServerCallContext ContextFor(long userId) => + FakeServerCallContext.For(userId); +} diff --git a/tests/MariesWonderland.Tests.csproj b/tests/MariesWonderland.Tests.csproj new file mode 100644 index 0000000..875eee5 --- /dev/null +++ b/tests/MariesWonderland.Tests.csproj @@ -0,0 +1,35 @@ + + + + net10.0 + enable + enable + false + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + + + \ No newline at end of file