Beispiel #1
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);
        }
Beispiel #2
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);
        }
Beispiel #3
0
        public static CUseable CreateUseable(COM_ITEM_TYPE useableType, ulong objID, uint baseID, int bCount = 0, int addTime = 0)
        {
            CUseable useable = null;

            if (useableType == COM_ITEM_TYPE.COM_OBJTYPE_ITEMPROP)
            {
                return(new CItem(objID, baseID, bCount, addTime));
            }
            if (useableType == COM_ITEM_TYPE.COM_OBJTYPE_ITEMEQUIP)
            {
                return(new CEquip(objID, baseID, bCount, addTime));
            }
            if (useableType == COM_ITEM_TYPE.COM_OBJTYPE_HERO)
            {
                return(new CHeroItem(objID, baseID, bCount, addTime));
            }
            if (useableType == COM_ITEM_TYPE.COM_OBJTYPE_ITEMSYMBOL)
            {
                return(new CSymbolItem(objID, baseID, bCount, addTime));
            }
            if (useableType == COM_ITEM_TYPE.COM_OBJTYPE_HEROSKIN)
            {
                return(new CHeroSkin(objID, baseID, bCount, addTime));
            }
            if (useableType == COM_ITEM_TYPE.COM_OBJTYPE_HEADIMG)
            {
                useable = new CHeadImg(objID, baseID, 0);
            }
            return(useable);
        }