using System.Collections.Generic; using Framework; using Gameplay.Net; using Framework.Condition; /// /// 是否拥有某个角色 /// public class ConditionCharacter : ICondition { public EventManager.EventName SignalName => EventManager.EventName.GetNewCharacter; public bool Check(List args) { if (args.Count < 1) throw new ConditionException($"{nameof(ConditionCharacter)}条件,参数数量错误,需要1个参数,只有{args.Count}参数"); uint id = (uint)args[0]; CharacterDataInfo character = CharacterDataInfoManager.Instance.GetCharacterInfo(id); return character != null; } public string[] GetArgLocalizations(List args) { return null; } }