Пример #1
0
    void _Packet(ScRoleBagInfo p)
    {
        if (p.itemInfo != null)
        {
            PItem[] items = null;
            p.itemInfo.CopyTo(ref items);

            SetLossTime(items);

            if (m_allItems.Count == 0)
            {
                m_allItems.AddRange(items);
            }
            else
            {
                for (int i = 0; i < items.Length; i++)
                {
                    if (items[i] == null)
                    {
                        continue;
                    }
                    var d = GetItemByGUID(items[i].itemId);
                    if (d == null)
                    {
                        m_allItems.Add(items[i]);
                    }
                }
            }
        }

        DispatchModuleEvent(EventCangkuInfo);
    }
Пример #2
0
    void _Packet(ScRoleBagInfo bagClothes)
    {
        PItem[] items = null;
        bagClothes.itemInfo.CopyTo(ref items);

        m_currentInBag.Clear();
        for (int i = 0, length = items.Length; i < length; i++)
        {
            if (items[i].GetPropItem().IsValidVocation(modulePlayer.proto) && items[i].GetPropItem().itemType == PropType.Rune)
            {
                var isContains = Contains(m_currentInBag, items[i]);
                if (!isContains)
                {
                    m_currentInBag.Add(items[i]);
                }
            }
        }
        ListSortAll();
    }