Example #1
0
        //-------------------------------------------------------------------------
        public Dictionary <int, TbDataItemType> getChildItemData()
        {
            Dictionary <int, TbDataItemType> map_child = new Dictionary <int, TbDataItemType>();

            foreach (var i in EbDataMgr.Instance.getMapData <TbDataItemType>())
            {
                TbDataItemType item_type = (TbDataItemType)i.Value;
                if (item_type.ParentId == Id)
                {
                    map_child.Add(item_type.Id, item_type);
                }
            }

            return(map_child);
        }
Example #2
0
        //-------------------------------------------------------------------------
        public EquipSlot getEquipSlot(Item item)
        {
            EquipSlot      equip_slot = EquipSlot.Weapon;
            TbDataItemType item_type  = EbDataMgr.Instance.getData <TbDataItemType>(item.TbDataItem.ItemTypeId);

            if (item_type.ParentId == mWeaponsItemTypeId)
            {
                equip_slot = (EquipSlot)item_type.ParentId;
            }
            else
            {
                equip_slot = (EquipSlot)item.TbDataItem.ItemTypeId;
            }

            return(equip_slot);
        }
Example #3
0
        //-------------------------------------------------------------------------
        public Dictionary <int, TbDataItemType> getTradeItemType()
        {
            Dictionary <int, TbDataItemType> map_trade_item_type = new Dictionary <int, TbDataItemType>();

            if (TradeItemTypeIds != null)
            {
                foreach (var i in TradeItemTypeIds)
                {
                    int            id        = int.Parse(i);
                    TbDataItemType item_type = EbDataMgr.Instance.getData <TbDataItemType>(id);
                    map_trade_item_type.Add(id, item_type);
                }
            }

            return(map_trade_item_type);
        }