Files
systemrevivalserver/Networking/Messages/DungeonOpCodes.cs
T

122 lines
4.9 KiB
C#

namespace Server.Networking.Messages;
/// <summary>
/// OpCodes for the dungeon crawler game mode
/// </summary>
public static class DungeonOpCodes
{
// Hub (200-299)
public const int HUB_STATE = 200;
public const int STAT_ALLOCATE = 201;
// Dungeon (300-399)
public const int DUNGEON_ENTER = 300;
public const int DUNGEON_ENTER_RESULT = 301;
public const int DUNGEON_STATE = 302;
public const int DUNGEON_LEAVE = 303;
public const int DUNGEON_CLEARED = 304;
public const int DUNGEON_TILE_UPDATE = 305;
// Dungeon Browser (310-319)
public const int DUNGEON_LIST_REQUEST = 310;
public const int DUNGEON_LIST_RESPONSE = 311;
public const int DUNGEON_CREATE = 312;
public const int DUNGEON_JOIN = 313;
// Asset Management (320-329)
public const int ASSET_MANIFEST_REQUEST = 320;
public const int ASSET_MANIFEST_RESPONSE = 321;
// Input (400-449)
public const int DUNGEON_INPUT_MOVE = 400;
public const int DUNGEON_INPUT_ATTACK = 401;
public const int DUNGEON_INPUT_PICKUP = 402;
public const int DUNGEON_INPUT_CHEST = 403;
public const int DUNGEON_INPUT_PORTAL = 404;
public const int DUNGEON_INPUT_FIRE_PROJECTILE = 405;
public const int DUNGEON_INPUT_NPC_INTERACT = 406;
public const int DUNGEON_INPUT_NPC_DIALOG_SELECT = 407;
public const int DUNGEON_INPUT_NPC_SHOP_ACTION = 408;
// Escape (450-499)
public const int ESCAPE_START = 450;
public const int ESCAPE_CANCEL = 451;
public const int ESCAPE_INTERRUPTED = 452;
public const int ESCAPE_SUCCESS = 453;
public const int PORTAL_USED = 454;
// Events (500-599)
public const int EVENT_DAMAGE = 500;
public const int EVENT_DEATH = 501;
public const int EVENT_LEVELUP = 502;
public const int EVENT_LOOT = 503;
public const int LOOT_RECEIVED = 160;
public const int EVENT_PROJECTILE_SPAWNED = 504;
public const int EVENT_PROJECTILE_HIT = 505;
public const int EVENT_PROJECTILE_EXPIRED = 506;
public const int EVENT_DAMAGE_NUMBER = 507; // For floating damage text
// Inventory (250-259)
public const int INVENTORY_REQUEST = 250;
public const int INVENTORY_STATE = 251;
public const int EQUIP_ITEM = 252;
public const int UNEQUIP_ITEM = 253;
public const int USE_ITEM = 254;
public const int DROP_ITEM = 255;
public const int HOTBAR_ASSIGN = 256;
public const int STACK_ITEMS = 257; // Stack consumables from source to target slot
public const int MOVE_ITEM = 258; // Move/swap item between inventory slots
public const int AUTO_STACK_INVENTORY = 259; // Auto-stack all stackable items in inventory
// Chat (260-269)
public const int CHAT_SEND = 260;
public const int CHAT_MESSAGE = 261;
// Loot Chests (270-279)
public const int LOOT_CHEST_OPEN = 270;
public const int LOOT_CHEST_STATE = 271;
public const int LOOT_CHEST_TAKE_ITEM = 272;
public const int LOOT_CHEST_TAKE_ALL = 273;
public const int LOOT_CHEST_CLOSE = 274;
public const int LOOT_CHEST_SPAWNED = 275;
public const int LOOT_CHEST_REMOVED = 276;
// Player Death (280-289)
public const int PLAYER_DEATH_LOOT_LOST = 280; // Notifies victim what they lost
// Mob Loot (290-299)
public const int MOB_LOOT_REQUEST = 290; // Request loot from a dead mob
public const int MOB_LOOT_STATE = 291; // Mob loot contents response
public const int MOB_LOOT_TAKE_ITEM = 292; // Take specific item from mob
public const int MOB_LOOT_TAKE_ALL = 293; // Take all items from mob
// Crafting (330-349)
public const int CRAFTING_SKILLS_REQUEST = 330;
public const int CRAFTING_SKILLS_STATE = 331;
public const int CRAFTING_RECIPES_REQUEST = 332;
public const int CRAFTING_RECIPES_STATE = 333;
public const int CRAFTING_ATTEMPT = 334; // Try to craft or discover
public const int CRAFTING_RESULT = 335; // Result of craft attempt
public const int CRAFTING_SKILL_LEVELUP = 336; // Skill level increased
public const int RECIPE_DISCOVERED = 337; // New recipe learned
public const int RECIPE_SCROLL_USE = 338; // Use a recipe scroll
// Server Broadcast (600-609)
public const int SERVER_BROADCAST = 600;
// Stash (610-619)
public const int STASH_REQUEST = 610; // Request stash contents
public const int STASH_STATE = 611; // Stash contents response
public const int STASH_DEPOSIT = 612; // Move item from inventory to stash
public const int STASH_WITHDRAW = 613; // Move item from stash to inventory
public const int STASH_RESULT = 614; // Result of deposit/withdraw operation
// NPC Interaction (620-639)
public const int NPC_INTERACT_STATE = 620;
public const int NPC_DIALOG_STATE = 621;
public const int NPC_DIALOG_RESULT = 622;
public const int NPC_SHOP_STATE = 623;
public const int NPC_SHOP_RESULT = 624;
}