Beispiel #1
0
 public void Write(BinaryWriter bw)
 {
     bw.Write(Version);
     bw.Write(ID);
     bw.Write(Active);
     bw.Write(Run);
     bw.Write(AttackValid);
     bw.Write(Name.FromGBK(128));
     RootConditon.Save(bw);
     bw.Write(Operations.Count);
     for (int i = 0; i < Operations.Count; ++i)
     {
         bw.Write(Operations[i].OperID);
         Operations[i].Write(bw);
     }
 }
Beispiel #2
0
        public object Clone()
        {
            var data = new CTriggerData()
            {
                Version = Version, ID = ID, Active = Active, Run = Run, AttackValid = AttackValid, Name = Name, RootConditon = RootConditon.Clone() as Condition
            };

            foreach (IOperation o in Operations)
            {
                data.Operations.Add((o as ICloneable).Clone() as IOperation);
            }
            return(data);
        }