//
// Licensed under the MIT License. See LICENSE file in the project root for full license information.
//
namespace MUnique.OpenMU.GameLogic;
using MUnique.OpenMU.GameLogic.NPC;
///
/// An interface for a map initializer which is responsible to create new instances of s
/// and it's initialization.
///
public interface IMapInitializer
{
///
/// Creates a new game map instance of the specified game map number.
///
/// The map number.
/// The new game map instance.
GameMap? CreateGameMap(ushort mapNumber);
///
/// Creates a new game map instance with the specified definition.
///
/// The map definition.
/// The new game map instance.
GameMap CreateGameMap(GameMapDefinition mapDefinition);
///
/// Initializes the state of the previously created game map (e.g. by creating NPC instances).
///
/// The created map.
ValueTask InitializeStateAsync(GameMap createdMap);
///
/// Initializes the spawn on the map.
///
/// The spawn index.
/// The game map on which the spawn should be initialized.
/// The spawn area.
/// The event state provider.
/// The drop generator.
ValueTask InitializeSpawnAsync(int spawnIndex, GameMap gameMap, MonsterSpawnArea spawnArea, IEventStateProvider? eventStateProvider = null, IDropGenerator? dropGenerator = null);
///
/// Initializes the event NPCs of the previously created game map.
///
/// The created map.
/// The event state provider.
ValueTask InitializeNpcsOnEventStartAsync(GameMap createdMap, IEventStateProvider eventStateProvider);
///
/// Initializes the event NPCs of the previously created game map after the spawn waves started.
///
/// The created map.
/// The event state provider.
/// The number of the started spawn wave.
ValueTask InitializeNpcsOnWaveStartAsync(GameMap createdMap, IEventStateProvider eventStateProvider, byte waveNumber);
}