2024-08-26 18:41:49 -04:00
|
|
|
using Arrowgene.Ddon.GameServer.Scripting.Interfaces;
|
|
|
|
|
using Arrowgene.Ddon.Shared.Model;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
|
|
|
|
namespace Arrowgene.Ddon.GameServer.Scripting
|
|
|
|
|
{
|
2025-06-09 01:11:59 -04:00
|
|
|
public class JobOrbTreeModule : GameServerScriptModule
|
2024-08-26 18:41:49 -04:00
|
|
|
{
|
2025-06-09 01:11:59 -04:00
|
|
|
private string _ModuleRoot;
|
|
|
|
|
public override string ModuleRoot
|
|
|
|
|
{
|
|
|
|
|
get { return _ModuleRoot; }
|
|
|
|
|
}
|
|
|
|
|
|
2024-08-26 18:41:49 -04:00
|
|
|
public override string Filter => "*.csx";
|
|
|
|
|
public override bool ScanSubdirectories => true;
|
|
|
|
|
public override bool EnableHotLoad => true;
|
|
|
|
|
|
|
|
|
|
public Dictionary<JobId, List<JobOrbUpgrade>> SkillAugmentations { get; private set; }
|
|
|
|
|
|
2025-06-09 01:11:59 -04:00
|
|
|
public JobOrbTreeModule(string moduleRoot)
|
2024-08-26 18:41:49 -04:00
|
|
|
{
|
2025-06-09 01:11:59 -04:00
|
|
|
_ModuleRoot = moduleRoot;
|
2024-08-26 18:41:49 -04:00
|
|
|
SkillAugmentations = new Dictionary<JobId, List<JobOrbUpgrade>>();
|
|
|
|
|
}
|
|
|
|
|
|
2025-06-29 02:07:13 -07:00
|
|
|
public override bool EvaluateResult(string path, object result, IDictionary<string, object> variables)
|
2024-08-26 18:41:49 -04:00
|
|
|
{
|
|
|
|
|
if (result == null)
|
|
|
|
|
{
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
2025-06-29 02:07:13 -07:00
|
|
|
var skillAugmentationInformation = (ISkillAugmentation) result;
|
2024-08-26 18:41:49 -04:00
|
|
|
if (skillAugmentationInformation != null)
|
|
|
|
|
{
|
|
|
|
|
SkillAugmentations[skillAugmentationInformation.JobId] = skillAugmentationInformation.Upgrades;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|