/*************************************************************************
* ModernUO *
* Copyright 2019-2026 - ModernUO Development Team *
* Email: hi@modernuo.com *
* File: Map.cs *
* *
* This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see . *
*************************************************************************/
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Runtime.CompilerServices;
using Server.Buffers;
using Server.Collections;
using Server.Items;
using Server.Logging;
using Server.Network;
using Server.Targeting;
namespace Server;
[Flags]
public enum MapRules
{
None = 0x0000,
Internal = 0x0001, // Internal map (used for dragging, commodity deeds, etc)
FreeMovement = 0x0002, // Anyone can move over anyone else without taking stamina loss
BeneficialRestrictions = 0x0004, // Disallow performing beneficial actions on criminals/murderers
HarmfulRestrictions = 0x0008, // Disallow performing harmful actions on innocents
TrammelRules = FreeMovement | BeneficialRestrictions | HarmfulRestrictions,
FeluccaRules = None
}
///
/// Indicates why a spawn position check failed. Used by spawners to determine
/// if optimization (caching) should be enabled.
///
[Flags]
public enum SpawnFailureReason
{
None = 0,
InvalidMap = 1 << 0, // Internal map or out of bounds
RegionBlocked = 1 << 1, // Region doesn't allow spawning
TransientBlocker = 1 << 2, // Mobile or movable item blocking
NonTransientBlocker = 1 << 3 // Static, multi, impassable land, or non-movable item
}
public sealed partial class Map : IComparable