Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/NosCore.Data/Enumerations/I18N/LanguageKey.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// __ _ __ __ ___ __ ___ ___
// __ _ __ __ ___ __ ___ ___
// | \| |/__\ /' _/ / _//__\| _ \ __|
// | | ' | \/ |`._`.| \_| \/ | v / _|
// |_|\__|\__/ |___/ \__/\__/|_|_\___|
Expand Down Expand Up @@ -65,6 +65,7 @@ public enum LogLanguageKey
ITEMS_PARSED,
MAPS_PARSED,
PORTALS_PARSED,
TIMESPACES_PARSED,
MAPS_LOADED,
NO_MAP,
MAPMONSTERS_LOADED,
Expand Down Expand Up @@ -189,6 +190,8 @@ public enum LanguageKey
OBJECT_IN_BAZAAR,
ITEM_GIFTED,
NOT_IN_FRIENDLIST,
SPEAKER
SPEAKER,
TIMESPACE_LEVEL_NOT_ALLOWED,
TIMESPACE_NOT_AVAILABLE
}
}
9 changes: 9 additions & 0 deletions src/NosCore.Data/Resource/LocalizedResources.cs.resx
Original file line number Diff line number Diff line change
Expand Up @@ -530,4 +530,13 @@
<data name="UNHANDLED_UPGRADE_TYPE" xml:space="preserve">
<value>Neznámý typ vylepšení: {0}</value>
</data>
<data name="TIMESPACES_PARSED" xml:space="preserve">
<value>Načteno skriptovaných instancí: {0}!</value>
</data>
<data name="TIMESPACE_LEVEL_NOT_ALLOWED" xml:space="preserve">
<value>Tvá úroveň ti neumožňuje vstoupit do tohoto time-space.</value>
</data>
<data name="TIMESPACE_NOT_AVAILABLE" xml:space="preserve">
<value>Tento time-space zatím není dostupný.</value>
</data>
</root>
9 changes: 9 additions & 0 deletions src/NosCore.Data/Resource/LocalizedResources.de.resx
Original file line number Diff line number Diff line change
Expand Up @@ -553,4 +553,13 @@
<data name="UNHANDLED_UPGRADE_TYPE" xml:space="preserve">
<value>Unbekannter Aufrüstungstyp: {0}</value>
</data>
<data name="TIMESPACES_PARSED" xml:space="preserve">
<value>{0} Skript-Instanzen geladen!</value>
</data>
<data name="TIMESPACE_LEVEL_NOT_ALLOWED" xml:space="preserve">
<value>Dein Level erlaubt dir nicht, diesen Time-Space zu betreten.</value>
</data>
<data name="TIMESPACE_NOT_AVAILABLE" xml:space="preserve">
<value>Dieser Time-Space ist noch nicht verfügbar.</value>
</data>
</root>
11 changes: 10 additions & 1 deletion src/NosCore.Data/Resource/LocalizedResources.es.resx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Expand Down Expand Up @@ -457,4 +457,13 @@
<data name="UNHANDLED_UPGRADE_TYPE" xml:space="preserve">
<value>Tipo de mejora no manejado: {0}</value>
</data>
<data name="TIMESPACES_PARSED" xml:space="preserve">
<value>¡{0} instancias de script analizadas!</value>
</data>
<data name="TIMESPACE_LEVEL_NOT_ALLOWED" xml:space="preserve">
<value>Tu nivel no te permite entrar en este time-space.</value>
</data>
<data name="TIMESPACE_NOT_AVAILABLE" xml:space="preserve">
<value>Este time-space aún no está disponible.</value>
</data>
</root>
11 changes: 10 additions & 1 deletion src/NosCore.Data/Resource/LocalizedResources.fr.resx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Expand Down Expand Up @@ -528,4 +528,13 @@
<data name="UNHANDLED_UPGRADE_TYPE" xml:space="preserve">
<value>Type d'amélioration non géré: {0}</value>
</data>
<data name="TIMESPACES_PARSED" xml:space="preserve">
<value>{0} instances scriptées analysées !</value>
</data>
<data name="TIMESPACE_LEVEL_NOT_ALLOWED" xml:space="preserve">
<value>Votre niveau ne vous permet pas d'entrer dans ce time-space.</value>
</data>
<data name="TIMESPACE_NOT_AVAILABLE" xml:space="preserve">
<value>Ce time-space n'est pas encore disponible.</value>
</data>
</root>
9 changes: 9 additions & 0 deletions src/NosCore.Data/Resource/LocalizedResources.it.resx
Original file line number Diff line number Diff line change
Expand Up @@ -574,4 +574,13 @@
<data name="UNHANDLED_UPGRADE_TYPE" xml:space="preserve">
<value>Tipo di potenziamento non gestito: {0}</value>
</data>
<data name="TIMESPACES_PARSED" xml:space="preserve">
<value>{0} istanze scriptate caricate!</value>
</data>
<data name="TIMESPACE_LEVEL_NOT_ALLOWED" xml:space="preserve">
<value>Il tuo livello non ti permette di entrare in questo time-space.</value>
</data>
<data name="TIMESPACE_NOT_AVAILABLE" xml:space="preserve">
<value>Questo time-space non è ancora disponibile.</value>
</data>
</root>
9 changes: 9 additions & 0 deletions src/NosCore.Data/Resource/LocalizedResources.pl.resx
Original file line number Diff line number Diff line change
Expand Up @@ -480,4 +480,13 @@
<data name="UNHANDLED_UPGRADE_TYPE" xml:space="preserve">
<value>Nieobsługiwany typ ulepszenia: {0}</value>
</data>
<data name="TIMESPACES_PARSED" xml:space="preserve">
<value>Wczytano {0} instancji skryptowanych!</value>
</data>
<data name="TIMESPACE_LEVEL_NOT_ALLOWED" xml:space="preserve">
<value>Twój poziom nie pozwala ci wejść do tego time-space'a.</value>
</data>
<data name="TIMESPACE_NOT_AVAILABLE" xml:space="preserve">
<value>Ten time-space nie jest jeszcze dostępny.</value>
</data>
</root>
9 changes: 9 additions & 0 deletions src/NosCore.Data/Resource/LocalizedResources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -604,4 +604,13 @@
<data name="UNHANDLED_UPGRADE_TYPE" xml:space="preserve">
<value>Unhandled upgrade type: {0}</value>
</data>
<data name="TIMESPACES_PARSED" xml:space="preserve">
<value>{0} Scripted Instances Parsed!</value>
</data>
<data name="TIMESPACE_LEVEL_NOT_ALLOWED" xml:space="preserve">
<value>Your level does not allow you to enter this time-space.</value>
</data>
<data name="TIMESPACE_NOT_AVAILABLE" xml:space="preserve">
<value>This time-space is not available yet.</value>
</data>
</root>
9 changes: 9 additions & 0 deletions src/NosCore.Data/Resource/LocalizedResources.ru.resx
Original file line number Diff line number Diff line change
Expand Up @@ -555,4 +555,13 @@
<data name="UNHANDLED_UPGRADE_TYPE" xml:space="preserve">
<value>Неизвестный тип улучшения: {0}</value>
</data>
<data name="TIMESPACES_PARSED" xml:space="preserve">
<value>Загружено скриптовых инстансов: {0}!</value>
</data>
<data name="TIMESPACE_LEVEL_NOT_ALLOWED" xml:space="preserve">
<value>Ваш уровень не позволяет войти в этот тайм-спейс.</value>
</data>
<data name="TIMESPACE_NOT_AVAILABLE" xml:space="preserve">
<value>Этот тайм-спейс пока недоступен.</value>
</data>
</root>
9 changes: 9 additions & 0 deletions src/NosCore.Data/Resource/LocalizedResources.tr.resx
Original file line number Diff line number Diff line change
Expand Up @@ -546,4 +546,13 @@
<data name="UNHANDLED_UPGRADE_TYPE" xml:space="preserve">
<value>Bilinmeyen yükseltme türü: {0}</value>
</data>
<data name="TIMESPACES_PARSED" xml:space="preserve">
<value>{0} betikli örnek yüklendi!</value>
</data>
<data name="TIMESPACE_LEVEL_NOT_ALLOWED" xml:space="preserve">
<value>Seviyeniz bu time-space'e girmenize izin vermiyor.</value>
</data>
<data name="TIMESPACE_NOT_AVAILABLE" xml:space="preserve">
<value>Bu time-space henüz kullanılamıyor.</value>
</data>
</root>
11 changes: 10 additions & 1 deletion src/NosCore.Database/Entities/ScriptedInstance.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@
// |_|\__|\__/ |___/ \__/\__/|_|_\___|
//

using NosCore.Data.DataAttributes;
using NosCore.Data.Enumerations.I18N;
using NosCore.Data.Enumerations.Interaction;
using NosCore.Database.Entities.Base;
using System.ComponentModel.DataAnnotations;

namespace NosCore.Database.Entities
{
public class ScriptedInstance : IEntity
[StaticMetaData(LoadedMessage = LogLanguageKey.TIMESPACES_PARSED)]
public class ScriptedInstance : IStaticEntity
{
public virtual Map Map { get; set; } = null!;

Expand All @@ -29,5 +32,11 @@ public class ScriptedInstance : IEntity
public short ScriptedInstanceId { get; set; }

public ScriptedInstanceType Type { get; set; }

public byte LevelMinimum { get; set; }

public byte LevelMaximum { get; set; }

public bool IsHeroic { get; set; }
}
}
3 changes: 1 addition & 2 deletions src/NosCore.Database/Hosting/PersistenceModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ protected override void Load(ContainerBuilder builder)
// health-check scopes, etc.) can plan handler construction. The runtime IServiceProvider
// is still backed by Autofac via AutofacServiceProviderFactory, so resolution semantics
// are unchanged — this is a visibility shim, not a second source of truth.
//
// Note: we deliberately do NOT mirror the open IDao<IDto> facet here. PersistenceModule.Load
// registers each Dao<TDb,TDto,TPk> as both IDao<IDto> and IDao<TDto,TPk> in Autofac. If we
// mirror the IDao<IDto> facet too, Populate(services) reflows it into Autofac as a SECOND
Expand Down Expand Up @@ -111,7 +110,7 @@ public static IEnumerable<DaoMapping> DiscoverDaoMappings()

foreach (var dto in assemblyDto.Where(p =>
typeof(IDto).IsAssignableFrom(p) &&
(!p.Name.Contains("InstanceDto") || p.Name.Contains("Inventory")) && p.IsClass))
!typeof(IItemInstanceDto).IsAssignableFrom(p) && p.IsClass))
{
var db = assemblyDb.FirstOrDefault(tgo =>
string.Compare(dto.Name, $"{tgo.Name}Dto", StringComparison.OrdinalIgnoreCase) == 0);
Expand Down
Loading
Loading