Beispiel #1
0
    public static tagItem   Create(uint dwTypeID, Int16 nNum, EItemQuality eQuality, int nCmd)
    {
        if (nNum <= 0)
        {
            return(null);
        }

        tagItem pRet = null;

        if (MIsEquipment(dwTypeID))
        {
            pRet          = new tagEquip();
            pRet.dwTypeID = dwTypeID;
        }
        else
        {
            pRet          = new tagItem();
            pRet.dwTypeID = dwTypeID;
        }

        // 64 bit id
        Int64 nSerial = CreateItemSerial();

        InitItem(pRet, nSerial, nNum);

        return(pRet);
    }
Beispiel #2
0
    public CEquipment(tagEquip data)
    {
        m_equipex = new tagEquipSpec();

        m_data = data;
        CProtoManager.inst.m_mapEquip.TryGetValue(m_data.dwTypeID, out m_pEquipProto);
        if (m_pProto == null)
        {
            Common.DEBUG_MSG("tagEquipProto's proto not find " + m_data.dwTypeID);
        }

        for (int i = 0; i < 3; i++)
        {
            m_equipex.EquipBaseAtt[i].eRoleAtt = m_pEquipProto.BaseEffect[i].eRoleAtt;
            m_equipex.EquipBaseAtt[i].nValue   = m_pEquipProto.BaseEffect[i].nValue;
        }

        m_pProto = m_pEquipProto;
    }
Beispiel #3
0
    public static tagItem   Create(tagItem item, Int16 nNum)
    {
        if (nNum <= 0)
        {
            return(null);
        }

        tagItem pNewItem = null;

        if (MIsEquipment(item.dwTypeID))
        {
            pNewItem = new tagEquip();
            pNewItem = item;
        }
        else
        {
            pNewItem = new tagItem();
            pNewItem = item;
        }

        pNewItem.n64Serial = CreateItemSerial();

        return(pNewItem);
    }