예제 #1
0
 public string GetNewBgmId()
 {
     _lastNameId = Base36IncrementHelper.ToString(Base36IncrementHelper.ToInt(_lastNameId) + 1);
     if (_lastNameId == "random")
     {
         return(GetNewBgmId());
     }
     return(_lastNameId);
 }
        private string GetNewBgmId()
        {
            var paramBgmDatabase = _state.LoadResource <PrcUiBgmDatabase>(Constants.GameResources.PRC_UI_BGM_DB_PATH);
            var lastNameId       = paramBgmDatabase.DbRootEntries.Values.Where(p => p.NameId != "random" && !string.IsNullOrEmpty(p.NameId)).OrderByDescending(p => Base36IncrementHelper.ToInt(p.NameId)).FirstOrDefault()?.NameId;

            lastNameId = Base36IncrementHelper.ToString(Base36IncrementHelper.ToInt(lastNameId) + 1);
            if (lastNameId == "random")
            {
                return(GetNewBgmId());
            }
            return(lastNameId);
        }
예제 #3
0
 public ParacobService(IResourceService resourceService, ILogger <IParacobService> logger)
 {
     _logger          = logger;
     _resourceService = resourceService;
     _paramLabels     = GetParamLabels();
     _coreBgmDb       = GetCoreDbRootBgmEntries();
     _coreGameTitleDb = GetCoreDbRootGameTitleEntries();
     _lastNameId      = _coreBgmDb.Where(p => p.NameId != "random" && !string.IsNullOrEmpty(p.NameId)).OrderByDescending(p => Base36IncrementHelper.ToInt(p.NameId)).FirstOrDefault()?.NameId;
 }