MosswartMassacre/MosswartMassacre/Constants.cs
erik 4845a67c1f Phase 1: Extract Constants.cs and CommandRouter.cs
- Extract magic numbers (timer intervals, message type IDs, property keys) into Constants.cs
- Replace ~600-line HandleMmCommand switch with dictionary-based CommandRouter
- All /mm commands preserved with same behavior, now registered via lambdas
- PluginCore.cs and CharacterStats.cs updated to use named constants

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 07:24:43 +00:00

30 lines
1.1 KiB
C#

namespace MosswartMassacre
{
/// <summary>
/// Centralized constants for timer intervals, message type IDs, and property keys.
/// </summary>
internal static class Constants
{
// Timer intervals (milliseconds)
internal const int StatsUpdateIntervalMs = 1000;
internal const int VitalsUpdateIntervalMs = 5000;
internal const int CommandProcessIntervalMs = 10;
internal const int QuestStreamingIntervalMs = 30000;
internal const int CharacterStatsIntervalMs = 600000; // 10 minutes
internal const int LoginDelayMs = 5000;
// Network message types
internal const int GameEventMessageType = 0xF7B0;
internal const int PrivateUpdatePropertyInt64 = 0x02CF;
// Game event IDs (sub-events within 0xF7B0)
internal const int AllegianceInfoEvent = 0x0020;
internal const int LoginCharacterEvent = 0x0013;
internal const int TitlesListEvent = 0x0029;
internal const int SetTitleEvent = 0x002b;
// Int64 property keys
internal const int AvailableLuminanceKey = 6;
internal const int MaximumLuminanceKey = 7;
}
}