ModernUO/Projects/Server/Interfaces.cs
Kamron Batman 0d1fffd9fc
fix: Fixes spawners, adds convertpremiumspawners, exportspawners, and replaces with neruns distro (#751)
### Additions
* Adds `[exportspawners <relative json file path to distro>`
  * If no path is provided, it will be saved to the `Data\Spawns` folder with the current timestamp as the file name.
  * Supports global, facet, region, multi, and area
* Fixes client disconnect for bad spawner generation command.
* Moves spawner commands to their own folder.
* Adds GUIDs for spawners. This allows for easy replacement during import to reduce duplication.
* Allows exporting the name of the spawner.
* Fixes globbing when using [generatespawners
* Adds [convertpremiumspawners to convert Premium Spawners (from Neruns distro)

Possibly in .NET 6 serializing JSON will be more performant using JSON nodes.


### Screenshots
![Screen_Shot_2021-08-31_at_10 20 06_PM](https://user-images.githubusercontent.com/3953314/131618495-cf7e3ae5-58e5-4f86-9d3c-3cc49906d9fc.png)
![Screen_Shot_2021-08-31_at_10 21 08_PM](https://user-images.githubusercontent.com/3953314/131618502-c39cc368-2266-47a5-9b87-e5ffa108b875.png)
![Screen_Shot_2021-08-31_at_10 13 29_PM](https://user-images.githubusercontent.com/3953314/131618512-f9807f1b-76e4-4503-989d-42324798fbf5.png)
2021-09-03 21:52:44 -07:00

76 lines
1.8 KiB
C#

using System;
namespace Server
{
public interface IPoint2D
{
int X { get; }
int Y { get; }
}
public interface IPoint3D : IPoint2D
{
int Z { get; }
}
public interface ICarvable
{
void Carve(Mobile from, Item item);
}
public interface IWeapon
{
int MaxRange { get; }
void OnBeforeSwing(Mobile attacker, Mobile defender);
TimeSpan OnSwing(Mobile attacker, Mobile defender);
TimeSpan OnSwing(Mobile attacker, Mobile defender, double damageBonus);
void GetStatusDamage(Mobile from, out int min, out int max);
}
public interface IHued
{
int HuedItemID { get; }
}
public interface ISpell
{
bool IsCasting { get; }
void OnCasterHurt();
void OnCasterKilled();
void OnConnectionChanged();
bool OnCasterMoving(Direction d);
bool OnCasterEquipping(Item item);
bool OnCasterUsingObject(IEntity entity);
bool OnCastInTown(Region r);
void FinishSequence();
}
public interface IParty
{
void OnStamChanged(Mobile m);
void OnManaChanged(Mobile m);
void OnStatsQuery(Mobile beholder, Mobile beheld);
}
// TODO: Add SpawnMap and change Spawner.Map to use it
public interface ISpawner : IEntity
{
Guid Guid { get; }
bool UnlinkOnTaming { get; }
Point3D HomeLocation { get; }
int HomeRange { get; }
Region Region { get; }
bool ReturnOnDeactivate { get; }
void Remove(ISpawnable spawn);
Point3D GetSpawnPosition(ISpawnable spawned, Map map);
void Respawn();
}
public interface ISpawnable : IEntity
{
ISpawner Spawner { get; set; }
void OnBeforeSpawn(Point3D location, Map map);
void OnAfterSpawn();
}
}