Centralize typed catalog legacy keys
This commit is contained in:
parent
3b7956f7a2
commit
af1247ce68
5 changed files with 82 additions and 20 deletions
|
|
@ -95,31 +95,61 @@ public sealed class AetheriaStateNode : IAsyncDisposable, IDisposable
|
|||
return Database.PutAsync(key, item);
|
||||
}
|
||||
|
||||
public Task<CultRecordHandle<AetheriaItemDefinition>> PutLegacyItemDefinitionAsync(AetheriaItemDefinition item)
|
||||
{
|
||||
return PutItemDefinitionAsync(AetheriaCatalogKeys.ItemDefinitionFromLegacyId(item.LegacyId), item);
|
||||
}
|
||||
|
||||
public Task<AetheriaItemDefinition?> GetItemDefinitionAsync(CultRecordKey key)
|
||||
{
|
||||
return Database.GetAsync<AetheriaItemDefinition>(key);
|
||||
}
|
||||
|
||||
public Task<AetheriaItemDefinition?> GetItemDefinitionByLegacyIdAsync(string legacyId)
|
||||
{
|
||||
return GetItemDefinitionAsync(AetheriaCatalogKeys.ItemDefinitionFromLegacyId(legacyId));
|
||||
}
|
||||
|
||||
public Task<CultRecordHandle<AetheriaCorporation>> PutCorporationAsync(CultRecordKey key, AetheriaCorporation corporation)
|
||||
{
|
||||
return Database.PutAsync(key, corporation);
|
||||
}
|
||||
|
||||
public Task<CultRecordHandle<AetheriaCorporation>> PutLegacyCorporationAsync(AetheriaCorporation corporation)
|
||||
{
|
||||
return PutCorporationAsync(AetheriaCatalogKeys.CorporationFromLegacyId(corporation.LegacyId), corporation);
|
||||
}
|
||||
|
||||
public Task<AetheriaCorporation?> GetCorporationAsync(CultRecordKey key)
|
||||
{
|
||||
return Database.GetAsync<AetheriaCorporation>(key);
|
||||
}
|
||||
|
||||
public Task<AetheriaCorporation?> GetCorporationByLegacyIdAsync(string legacyId)
|
||||
{
|
||||
return GetCorporationAsync(AetheriaCatalogKeys.CorporationFromLegacyId(legacyId));
|
||||
}
|
||||
|
||||
public Task<CultRecordHandle<AetheriaNameFile>> PutNameFileAsync(CultRecordKey key, AetheriaNameFile nameFile)
|
||||
{
|
||||
return Database.PutAsync(key, nameFile);
|
||||
}
|
||||
|
||||
public Task<CultRecordHandle<AetheriaNameFile>> PutLegacyNameFileAsync(AetheriaNameFile nameFile)
|
||||
{
|
||||
return PutNameFileAsync(AetheriaCatalogKeys.NameFileFromLegacyId(nameFile.LegacyId), nameFile);
|
||||
}
|
||||
|
||||
public Task<AetheriaNameFile?> GetNameFileAsync(CultRecordKey key)
|
||||
{
|
||||
return Database.GetAsync<AetheriaNameFile>(key);
|
||||
}
|
||||
|
||||
public Task<AetheriaNameFile?> GetNameFileByLegacyIdAsync(string legacyId)
|
||||
{
|
||||
return GetNameFileAsync(AetheriaCatalogKeys.NameFileFromLegacyId(legacyId));
|
||||
}
|
||||
|
||||
public Task<CultRecordHandle<AetheriaPlayerSettings>> PutPlayerSettingsAsync(AetheriaPlayerSettings settings)
|
||||
{
|
||||
return Database.PutAsync(new CultRecordKey("global:aetheria.player_settings.v1"), settings);
|
||||
|
|
|
|||
Loading…
Reference in a new issue