コード例 #1
0
    private void UpdateServerProperty()
    {
        uint bindMask = BindMask;

        m_bCanAuction         = ItemDefine.isBindMaskEnable(GameCmd.enumItemBindType.BindItemType_Shop, bindMask);
        m_bCanSell2NPC        = ItemDefine.isBindMaskEnable(GameCmd.enumItemBindType.BindItemType_Sell, bindMask);
        m_bCanStore2WareHouse = ItemDefine.isBindMaskEnable(GameCmd.enumItemBindType.BindItemType_Store, bindMask);
        m_bIsBind             = bindMask != 0 && ItemDefine.IsBind(bindMask);

        m_QulityType = ItemDefine.ItemQualityType.White;
        int quality = 0;

        if (IsEquip)
        {
            quality = AdditionAttrCount;
        }
        else
        {
            quality = (int)BaseData.quality;
        }
        if (quality > (int)ItemDefine.ItemQualityType.White &&
            quality < (int)ItemDefine.ItemQualityType.Max)
        {
            m_QulityType = (ItemDefine.ItemQualityType)quality;
        }

        m_strBorderIcon = ItemDefine.GetItemBorderIcon(QualityType);

        m_strName = GetNameNGUIColor() + LocalName;
        if (IsForgingEquip)
        {
            uint refineLevel = GetItemAttribute(GameCmd.eItemAttribute.Item_Attribute_RefineLevel);
            if (refineLevel > 0)
            {
                m_strName = m_strName + "+" + refineLevel;
            }
        }

        m_strNameForTips = GetNameNGUIColor(true) + LocalName;
        if (IsForgingEquip)
        {
            uint refineLevel = GetItemAttribute(GameCmd.eItemAttribute.Item_Attribute_RefineLevel);
            if (refineLevel > 0)
            {
                m_strNameForTips = m_strNameForTips + "+" + refineLevel;
            }
        }

        m_TipsTipIcon = ItemDefine.GetItemTipsTopIcon(QualityType);
        UpdateLocation();
    }