public BuffCommandInfo GetSubcommand(byte commandSeq) { if (CommandSequence == commandSeq) { return(this); } return(NextCommand?.GetSubcommand(commandSeq)); }
/// <summary> /// Returns the command in this chain with CommandSequence corresponding to the input value. /// </summary> public AbilityCommandInfo GetSubcommand(byte commandSeq) { if (CommandSequence == commandSeq) { return(this); } if (NextCommand == null) { return(null); } return(NextCommand.GetSubcommand(commandSeq)); }