Exemple #1
0
 public MEDIC_INFO GetMedicData()
 {
     if (m_Medic == null)
     {
         m_Medic = new MEDIC_INFO();
     }
     return(m_Medic);
 }
Exemple #2
0
    public override void SetExtraInfo(ref _ITEM pItemInfo)
    {
        if (pItemInfo == null)
        {
            return;
        }

        base.SetExtraInfo(ref pItemInfo);
        MEDIC_INFO infoMedic = pItemInfo.m_Medic;

        SetNumber(pItemInfo.GetItemCount());
        SetManufacturer(ref pItemInfo);
    }
Exemple #3
0
    public bool readFromBuff(ref NetInputBuffer buff)
    {
        m_ItemGUID.readFromBuff(ref buff);
        buff.ReadUint(ref m_ItemIndex);
        buff.ReadByte(ref m_RulerID);
        buff.ReadByte(ref m_nsBind);
        buff.Read(ref m_Param, ItemDefine.MAX_ITEM_PARAM * sizeof(int));

        if (GetCreatorVar())
        {
            buff.Read(ref m_Creator, ItemDefine.MAX_ITEM_CREATOR_NAME);
        }
        if ((ITEM_CLASS)ItemClass() == ITEM_CLASS.ICLASS_EQUIP)
        {
            if (m_Equip == null)
            {
                m_Equip = new EQUIP_INFO();
            }
            buff.ReadByte(ref m_Equip.m_CurDurPoint);
            buff.ReadByte(ref m_Equip.m_CurSoulType);
            short damage = 0;
            buff.ReadShort(ref damage);
            m_Equip.m_CurDamagePoint = (ushort)damage;
            buff.ReadByte(ref m_Equip.m_MaxDurPoint);
            buff.ReadUint(ref m_Equip.m_BasePrice);
            buff.ReadByte(ref m_Equip.m_EquipPoint);
            buff.ReadByte(ref m_Equip.m_AttrCount);
            buff.ReadShort(ref m_Equip.m_SetNum);
            buff.ReadByte(ref m_Equip.m_MaxNum);
            if (m_Equip.m_AttrCount > GAMEDEFINE.MAX_ITEM_ATTR)
            {
                m_Equip.m_AttrCount = GAMEDEFINE.MAX_ITEM_ATTR;
            }

            for (int j = 0; j < m_Equip.m_AttrCount; j++)
            {
                m_Equip.m_pAttr[j].readFromBuff(ref buff);
            }
            buff.ReadByte(ref m_Equip.m_StoneCount);
            if (m_Equip.m_StoneCount > GAMEDEFINE.MAX_ITEM_GEM)
            {
                m_Equip.m_StoneCount = GAMEDEFINE.MAX_ITEM_GEM;
            }


            //镶嵌系统修改,必须接收MAX_ITEM_GEM个 [2011-9-28] by: cfp+
            for (int j = 0; j < GAMEDEFINE.MAX_ITEM_GEM; j++)
            {
                m_Equip.m_pGemInfo[j].readFromBuff(ref buff);
            }

            buff.ReadByte(ref m_Equip.m_NeedLevel);
            buff.ReadByte(ref m_Equip.m_GemMax);
            buff.ReadByte(ref m_Equip.m_nDangCi);
            buff.ReadInt(ref m_Equip.m_nNextDangCiItemSN);
            buff.ReadByte(ref m_Equip.m_FaileTimes);
            buff.ReadByte(ref m_Equip.m_EquipEnhanceLevel);
        }
        else if ((ITEM_CLASS)ItemClass() == ITEM_CLASS.ICLASS_GEM)
        {
            if (m_Gem == null)
            {
                m_Gem = new GEM_INFO();
            }
            m_Gem.readFromBuff(ref buff);
        }
        else if ((ITEM_CLASS)ItemClass() == ITEM_CLASS.ICLASS_COMITEM)
        {
            if (m_Medic == null)
            {
                m_Medic = new MEDIC_INFO();
            }
            m_Medic.readFromBuff(ref buff);
        }
        else if ((ITEM_CLASS)ItemClass() == ITEM_CLASS.ICLASS_MATERIAL)
        {
            if (m_Medic == null)
            {
                m_Medic = new MEDIC_INFO();
            }
            m_Medic.readFromBuff(ref buff);
        }
        else if ((ITEM_CLASS)ItemClass() == ITEM_CLASS.ICLASS_TASKITEM)
        {
            if (m_Medic == null)
            {
                m_Medic = new MEDIC_INFO();
            }
            m_Medic.readFromBuff(ref buff);
        }
        else if ((ITEM_CLASS)ItemClass() == ITEM_CLASS.ICLASS_STOREMAP)
        {
            //iStream.Read((CHAR*)(GetStoreMapData()),sizeof(STORE_MAP_INFO));
        }
        else if ((ITEM_CLASS)ItemClass() == ITEM_CLASS.ICLASS_TALISMAN)
        {
            if (m_Talisman == null)
            {
                m_Talisman = new TALISMAN_INFO();
            }
            m_Talisman.readFromBuff(ref buff);
        }
        else if ((ITEM_CLASS)ItemClass() == ITEM_CLASS.ICLASS_SYMBOLITEM)
        {
            if (m_Charm == null)
            {
                m_Charm = new CHARM_INFO();
            }
            m_Charm.readFromBuff(ref buff);
        }
        return(true);
    }