Example #1
0
            public override void osc(int i, int h)
            {
                VariableLengthArray <System.Int64> type = (VariableLengthArray <System.Int64>) this.type.cast <System.Int64, System.Object>();

                container.Container[] d = ((P0)owner.basePool).Data;
                long result             = 0L;

                for (; i != h; i++)
                {
                    System.Collections.ArrayList v = null == d[i].varr ? null : (System.Collections.ArrayList)d[i].varr;

                    int size = null == v ? 0 : v.Count;
                    if (0 == size)
                    {
                        result++;
                    }
                    else
                    {
                        result += V64.singleV64Offset(size);
                        foreach (long x in v)
                        {
                            result += V64.singleV64Offset(x);
                        }
                    }
                }
                offset += result;
            }
Example #2
0
            public override void addKnownField(string name, StringType @string, Annotation annotation)
            {
                switch (name)
                {
                case "age":
                    unchecked { new f4(V64.get(), this); }
                    return;

                case "name":
                    unchecked { new f5(@string, this); }
                    return;

                case "seen":
                    unchecked { new f6(BoolType.get(), this); }
                    return;

                case "someintegersinalist":
                    unchecked { new f7(new ListType <int>(I32.get()), this); }
                    return;

                case "somemap":
                    unchecked { new f8(new MapType <string, string>(@string, @string), this); }
                    return;

                case "somereference":
                    unchecked { new f9(([email protected])(((SkillState)Owner).NoSerializedDatas()), this); }
                    return;
                }
            }
Example #3
0
            public override void osc(int i, int h)
            {
                SetType <container.SomethingElse> type = (SetType <container.SomethingElse>) this.type.cast <container.SomethingElse, System.Object>();

                container.Container[] d = ((P0)owner.basePool).Data;
                long result             = 0L;

                for (; i != h; i++)
                {
                    System.Collections.Generic.HashSet <container.SomethingElse> v = null == d[i].someSet ? null : new System.Collections.Generic.HashSet <container.SomethingElse>(((System.Collections.Generic.HashSet <container.SomethingElse>)d[i].someSet).Cast <container.SomethingElse>());

                    int size = null == v ? 0 : v.Count;
                    if (0 == size)
                    {
                        result++;
                    }
                    else
                    {
                        result += V64.singleV64Offset(size);
                        foreach (container.SomethingElse x in v)
                        {
                            result += null == x?1:V64.singleV64Offset(x.SkillID);
                        }
                    }
                }
                offset += result;
            }
Example #4
0
            public override void osc(int i, int h)
            {
                SetType <System.Int64> type = (SetType <System.Int64>) this.type.cast <System.Int64, System.Object>();

                container.Container[] d = ((P0)owner.basePool).Data;
                long result             = 0L;

                for (; i != h; i++)
                {
                    System.Collections.Generic.HashSet <System.Int64> v = null == d[i].s ? null : new System.Collections.Generic.HashSet <System.Int64>(((System.Collections.Generic.HashSet <System.Int64>)d[i].s).Cast <long>());

                    int size = null == v ? 0 : v.Count;
                    if (0 == size)
                    {
                        result++;
                    }
                    else
                    {
                        result += V64.singleV64Offset(size);
                        foreach (long x in v)
                        {
                            result += V64.singleV64Offset(x);
                        }
                    }
                }
                offset += result;
            }
Example #5
0
            public override void addKnownField(string name, StringType @string, Annotation annotation)
            {
                switch (name)
                {
                case "arr":
                    unchecked { new f0(new ConstantLengthArray <long>(3, V64.get()), this); }
                    return;

                case "f":
                    unchecked { new f1(new MapType <string, System.Collections.Generic.Dictionary <long, long> >(@string, new MapType <long, long>(V64.get(), V64.get())), this); }
                    return;

                case "l":
                    unchecked { new f2(new ListType <long>(V64.get()), this); }
                    return;

                case "s":
                    unchecked { new f3(new SetType <long>(V64.get()), this); }
                    return;

                case "someset":
                    unchecked { new f4(new SetType <container.SomethingElse>(([email protected])(((SkillState)Owner).SomethingElses())), this); }
                    return;

                case "varr":
                    unchecked { new f5(new VariableLengthArray <long>(V64.get()), this); }
                    return;
                }
            }
Example #6
0
 public override void addKnownField(string name, StringType @string, Annotation annotation)
 {
     switch (name)
     {
     case "age":
         unchecked { new f0(V64.get(), this); }
         return;
     }
 }
Example #7
0
            public override void osc(int i, int h)
            {
                age.Age[] d      = ((P0)owner.basePool).Data;
                long      result = 0L;

                for (; i != h; i++)
                {
                    result += V64.singleV64Offset(d[i].age);
                }
                offset += result;
            }
Example #8
0
            public override void osc(int i, int h)
            {
                enums.TestEnum[] d      = ((P0)owner.basePool).Data;
                long             result = 0L;

                for (; i != h; i++)
                {
                    enums.TestEnum instance = d[i].next;
                    if (null == instance)
                    {
                        result += 1;
                        continue;
                    }
                    result += V64.singleV64Offset(instance.SkillID);
                }
                offset += result;
            }
Example #9
0
            public override void osc(int i, int h)
            {
                subtypes.A[] d      = ((P0)owner.basePool).Data;
                long         result = 0L;

                for (; i != h; i++)
                {
                    subtypes.C instance = ((subtypes.C)d[i]).c;
                    if (null == instance)
                    {
                        result += 1;
                        continue;
                    }
                    result += V64.singleV64Offset(instance.SkillID);
                }
                offset += result;
            }
Example #10
0
            public override void osc(int i, int h)
            {
                escaping.Int[] d      = ((P2)owner.basePool).Data;
                long           result = 0L;

                for (; i != h; i++)
                {
                    escaping.Int instance = d[i].Zif;
                    if (null == instance)
                    {
                        result += 1;
                        continue;
                    }
                    result += V64.singleV64Offset(instance.SkillID);
                }
                offset += result;
            }
Example #11
0
            public override void osc(int i, int h)
            {
                MapType <System.String, System.Collections.Generic.Dictionary <System.Int64, System.Int64> > type = (MapType <System.String, System.Collections.Generic.Dictionary <System.Int64, System.Int64> >) this.type.cast <System.String, System.Collections.Generic.Dictionary <System.Int64, System.Int64> >();

                de.ust.skill.common.csharp.api.FieldType keyType   = type.keyType;
                de.ust.skill.common.csharp.api.FieldType valueType = type.valueType;
                container.Container[] d = ((P0)owner.basePool).Data;
                long result             = 0L;

                for (; i != h; i++)
                {
                    System.Collections.Generic.Dictionary <System.String, System.Collections.Generic.Dictionary <System.Int64, System.Int64> > v = castMap <string, System.Collections.Generic.Dictionary <long, long>, string, System.Collections.Generic.Dictionary <long, long> >(d[i].f);
                    if (null == v || v.Count == 0)
                    {
                        result++;
                    }
                    else
                    {
                        string[] keysArray = new string[v.Keys.Count];
                        v.Keys.CopyTo(keysArray, 0);
                        ICollection keysList = new List <object>();
                        foreach (object key in keysArray)
                        {
                            ((List <object>)keysList).Add(key);
                        }

                        System.Collections.Generic.Dictionary <long, long>[] valuesArray = new System.Collections.Generic.Dictionary <long, long> [v.Values.Count];
                        v.Values.CopyTo(valuesArray, 0);
                        ICollection valuesList = new List <object>();
                        foreach (object value in valuesArray)
                        {
                            ((List <object>)valuesList).Add(value);
                        }

                        result += V64.singleV64Offset(v.Count);
                        result += (([email protected])keyType).calculateOffset(keysList);
                        result += (([email protected])valueType).calculateOffset(valuesList);
                    }
                }
                offset += result;
            }
Example #12
0
            public override void osc(int i, int h)
            {
                ConstantLengthArray <System.Int64> type = (ConstantLengthArray <System.Int64>) this.type.cast <System.Int64, System.Object>();
                int size = type.length;

                container.Container[] d = ((P0)owner.basePool).Data;
                long result             = 0L;

                for (; i != h; i++)
                {
                    System.Collections.ArrayList v = null == d[i].arr ? null : v = (System.Collections.ArrayList)d[i].arr;
                    if (v.Count != type.length)
                    {
                        throw new Exception("constant length array has wrong size");
                    }

                    foreach (long x in v)
                    {
                        result += V64.singleV64Offset(x);
                    }
                }
                offset += result;
            }