Example #1
0
        public static CUseable CreateUseable(COM_ITEM_TYPE useableType, uint baseID, int bCount = 0)
        {
            CUseable result = null;

            if (useableType == COM_ITEM_TYPE.COM_OBJTYPE_ITEMPROP)
            {
                result = new CItem(0uL, baseID, bCount, 0);
            }
            else if (useableType == COM_ITEM_TYPE.COM_OBJTYPE_ITEMEQUIP)
            {
                result = new CEquip(0uL, baseID, bCount, 0);
            }
            else if (useableType == COM_ITEM_TYPE.COM_OBJTYPE_HERO)
            {
                result = new CHeroItem(0uL, baseID, bCount, 0);
            }
            else if (useableType == COM_ITEM_TYPE.COM_OBJTYPE_ITEMSYMBOL)
            {
                result = new CSymbolItem(0uL, baseID, bCount, 0);
            }
            else if (useableType == COM_ITEM_TYPE.COM_OBJTYPE_HEROSKIN)
            {
                result = new CHeroSkin(0uL, baseID, bCount, 0);
            }
            else if (useableType == COM_ITEM_TYPE.COM_OBJTYPE_HEADIMG)
            {
                result = new CHeadImg(0uL, baseID, 0);
            }
            return(result);
        }
Example #2
0
        public static CUseable CreateUseable(COM_ITEM_TYPE useableType, uint baseID, int bCount = 0)
        {
            CUseable result = null;

            if (useableType == 2)
            {
                result = new CItem(0uL, baseID, bCount, 0);
            }
            else if (useableType == 3)
            {
                result = new CEquip(0uL, baseID, bCount, 0);
            }
            else if (useableType == 4)
            {
                result = new CHeroItem(0uL, baseID, bCount, 0);
            }
            else if (useableType == 5)
            {
                result = new CSymbolItem(0uL, baseID, bCount, 0);
            }
            else if (useableType == 7)
            {
                result = new CHeroSkin(0uL, baseID, bCount, 0);
            }
            else if (useableType == 8)
            {
                result = new CHeadImg(0uL, baseID, 0);
            }
            return(result);
        }