Class BossDatabase
Database for managing boss data.
public class BossDatabase : Database<int, BossData, BossDataSource, BossDataLoader>, IDatabase<int, BossData>, IDatabase, IDataCrud, IManageableLifecycle<DatabaseManager>, IManageableLifecycle, IReloadable, IManageable<DatabaseManager>, IManageable, IDataCrud<int, BossData>
- Inheritance
-
BossDatabase
- Implements
- Inherited Members
- Extension Methods
Constructors
BossDatabase()
Database for managing boss data.
public BossDatabase()
Properties
Log
protected override Logger Log { get; }
Property Value
Methods
Get(PrefabGUID)
Gets a boss by its Prefab GUID.
public BossData? Get(PrefabGUID prefabGuid)
Parameters
prefabGuid
PrefabGUIDThe Prefab GUID of the boss to retrieve.
Returns
GetByEntity(Entity)
Gets a boss by its Entity.
public BossData? GetByEntity(Entity entity)
Parameters
entity
EntityThe Entity of the boss to retrieve.
Returns
GetByName(string)
Gets a boss by its name.
public BossData? GetByName(string name)
Parameters
name
stringThe name of the boss to retrieve.
Returns
GetModelAndEntityByPrefabGuid(PrefabGUID, out BossData?, out Entity, bool)
Gets the model and entity for a boss by its Prefab GUID.
public bool GetModelAndEntityByPrefabGuid(PrefabGUID prefabGuid, out BossData? bossData, out Entity bossEntity, bool noWarnLogs = false)
Parameters
prefabGuid
PrefabGUIDThe Prefab GUID of the boss.
bossData
BossDataThe BossData if found; otherwise, null.
bossEntity
EntityThe Entity representing the boss.
noWarnLogs
boolIf true, suppresses warning logs when the boss entity is not found or is not a VBlood unit.
Returns
- bool
True if the boss data and entity were successfully retrieved; otherwise, false.
Initialize(DatabaseManager, List<IPlugin>)
Initializes the lifecycle of the manager with a specific type.
public override void Initialize(DatabaseManager manager, List<IPlugin> plugins)
Parameters
manager
DatabaseManagerplugins
List<IPlugin>
RemoveByName(string)
Removes a boss by its name.
public BossData? RemoveByName(string name)
Parameters
name
stringThe name of the boss to remove.
Returns
TryGetByEntity(Entity)
Attempts to get a boss by its Entity.
public BossData? TryGetByEntity(Entity entity)
Parameters
entity
EntityThe Entity of the boss to retrieve.