public AvatarData GetData(int index)
 {
     if (avatarTable == null || avatarTable.GetCount() <= index)
     {
         return(null);
     }
     return(avatarTable.Get((uint)index));
 }
    public List <TheaterModeChapterData> GetPickedData(List <uint> chapter_ids)
    {
        List <TheaterModeChapterData> list = new List <TheaterModeChapterData>(dataTable.GetCount());

        dataTable.ForEach(delegate(TheaterModeChapterData data)
        {
            if (chapter_ids.Contains(data.chapter_id))
            {
                list.Add(data);
            }
        });
        return(list);
    }
    public override bool Equals(object obj)
    {
        if (obj == null)
        {
            return(false);
        }
        UIntKeyTable <T> rhs = obj as UIntKeyTable <T>;

        if (rhs == null)
        {
            return(false);
        }
        if (GetCount() != rhs.GetCount())
        {
            return(false);
        }
        bool isEqual = true;

        ForEachKeyValue(delegate(uint key, T value1)
        {
            T val   = rhs.Get(key);
            isEqual = (isEqual && value1.Equals(val));
        });
        return(isEqual);
    }
 public FieldGimmickPointTableData GetFieldGimmickPointData(uint id)
 {
     if (!Singleton <FieldMapTable> .IsValid())
     {
         return(null);
     }
     if (fieldGimmickPointTable == null || fieldGimmickPointTable.GetCount() == 0)
     {
         return(null);
     }
     return(fieldGimmickPointTable.Get(id));
 }
示例#5
0
    public void CreateTableForEquipList()
    {
        equipList = new List <EquipItemData>(equipItemTable.GetCount());
        ForEach(delegate(EquipItemData data)
        {
            if (data.CanCollecting())
            {
                equipList.Add(data);
            }
        });
        ListCompare comparer = new ListCompare();

        equipList.Sort(comparer);
    }
    public Data[] GetData()
    {
        if (!Singleton <RegionTable> .IsValid())
        {
            return(null);
        }
        int count = table.GetCount();

        Data[] ret   = new Data[count];
        int    index = 0;

        table.ForEach(delegate(Data data)
        {
            ret[++index] = data;
        });
        return(ret);
    }
    public static DoubleUIntKeyTable <AbilityData> CreateTableBinary(byte[] bytes)
    {
        DoubleUIntKeyTable <AbilityData> doubleUIntKeyTable = new DoubleUIntKeyTable <AbilityData>();
        BinaryTableReader binaryTableReader = new BinaryTableReader(bytes);

        while (binaryTableReader.MoveNext())
        {
            uint key  = binaryTableReader.ReadUInt32(0u);
            uint key2 = 0u;
            UIntKeyTable <AbilityData> uIntKeyTable = doubleUIntKeyTable.Get(key);
            if (uIntKeyTable != null)
            {
                key2 = (uint)uIntKeyTable.GetCount();
            }
            AbilityData abilityData = new AbilityData();
            abilityData.LoadFromBinary(binaryTableReader, ref key, ref key2);
            doubleUIntKeyTable.Add(key, key2, abilityData);
        }
        return(doubleUIntKeyTable);
    }
 public bool IsCompleteSendAll()
 {
     return(resendPackets.GetCount() <= 0);
 }