Improved implementation of ApplicationContext

This commit is contained in:
Chomp
2025-01-14 12:23:44 +00:00
parent f0b534a6e0
commit b9a5835bd2
3 changed files with 31 additions and 10 deletions
+2 -2
View File
@@ -1,4 +1,4 @@
using Core.Annotations;
using Core.Annotations;
using Core.Context;
using Core.Controllers;
using Core.Models.Eft.Bot;
@@ -60,7 +60,7 @@ public class BotCallbacks
if (difficulty == "core")
return _httpResponseUtil.NoBody(_botController.GetBotCoreDifficulty());
var raidConfig = (GetRaidConfigurationRequestData)_applicationContext.GetLatestValue(ContextVariableType.RAID_CONFIGURATION)?.Value;
var raidConfig = _applicationContext.GetLatestValue(ContextVariableType.RAID_CONFIGURATION)?.GetValue<GetRaidConfigurationRequestData>();
return _httpResponseUtil.NoBody(_botController.GetBotDifficulty(type, difficulty, raidConfig));
}