Skip to content

Bia10/Maple.Models

Repository files navigation

Maple.Models

.NET C# Build Status codecov License

MapleStory model types: immutable DTOs and catalog records, plus mutable runtime state for persistence and editors. Cross-platform, trimmable and AOT/NativeAOT compatible.

⭐ Please star this project if you like it. ⭐

Example | Example Catalogue | Public API Reference

Packages

Package NuGet Description
Maple.Models Nuget Immutable DTOs and catalog record types: templates, server snapshots, and shared value objects
Maple.Models.Runtime Nuget Mutable runtime state: character/account snapshots, inventories, item slots, quest and skill records, and AOT-safe JSON serialization

All packages are cross-platform, trimmable and AOT/NativeAOT compatible.

Example

// Create a color from a raw WZ ARGB value (e.g. from item data)
var color = ArgbColor.FromInt32(-16777216); // 0xFF000000 = opaque black
Console.WriteLine(color.ToHexString()); // #FF000000

// Build the base attribute stats contributed by an equip
var stats = new CharacterBaseStats(STR: 10, DEX: 5, INT: 0, LUK: 3);
Console.WriteLine($"STR: {stats.STR}  DEX: {stats.DEX}"); // STR: 10  DEX: 5

For more examples see Example Catalogue.

Benchmarks

Benchmarks.

Detailed Benchmarks

Comparison Benchmarks

TestBench Benchmark Results
Results will be populated here after running benchmarks locally.

Example Catalogue

The following examples are available in ReadMeTest.cs.

Example - Empty

// Create a color from a raw WZ ARGB value (e.g. from item data)
var color = ArgbColor.FromInt32(-16777216); // 0xFF000000 = opaque black
Console.WriteLine(color.ToHexString()); // #FF000000

// Build the base attribute stats contributed by an equip
var stats = new CharacterBaseStats(STR: 10, DEX: 5, INT: 0, LUK: 3);
Console.WriteLine($"STR: {stats.STR}  DEX: {stats.DEX}"); // STR: 10  DEX: 5

Public API Reference

See docs/PublicApi.md for the full generated public API surface.

About

No description, website, or topics provided.

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages