Exemple #1
0
        public static Command write(int questConditionId, QuestConditionStateModule state)
        {
            var cmd = new ByteArray(ID);

            cmd.Integer(questConditionId);
            cmd.AddBytes(state.write());
            return(new Command(cmd.ToByteArray(), false));
        }
        public byte[] write()
        {
            var cmd = new ByteArray(ID);

            cmd.Integer(id);
            cmd.Integer(matches.Count);
            foreach (var loc0 in matches)
            {
                cmd.Integer(loc0);
            }
            cmd.Short(type);
            cmd.Short(displayType);
            cmd.Double(targetValue);
            cmd.Boolean(mandatory);
            cmd.AddBytes(state.write());
            cmd.Integer(subConditions.Count);
            foreach (var loc1 in subConditions)
            {
                cmd.AddBytes(loc1.write());
            }
            return(cmd.Message.ToArray());
        }