Пример #1
0
        public void ShowOfCrownPage()
        {
            CrownPageItemData pageData = LogicDataCenter.crownPageDataManager.curPageItemData;

            if (pageData == null)
            {
                return;
            }

            CreatureProperty Property = EntityFactory.MainHeroView.Property;

            if (Property == null)
            {
                return;
            }

            ChatSubItemText_CrownGemstoneInfo.ShareToInputField(Property.CreatureName, pageData.nFaceValue, pageData.nPowerValue,
                                                                Property.GetNumProp(ENTITY_PROPERTY.PROPERTY_ID));
        }
Пример #2
0
        /// <summary>
        /// 获取属性对应数值
        /// </summary>
        /// <param name="propName">属性名称</param>
        /// <returns></returns>
        private float getPropertyValue(string propName)
        {
            // 获得主英雄的property
            if (EntityFactory.MainHeroView == null)
            {
                return(.0f);
            }
            CreatureProperty property = EntityFactory.MainHeroView.Property;

            if (property == null)
            {
                return(.0f);
            }

            int nScaleRatio   = 100;
            int nScaleRatioEx = 10000;

            switch (propName)
            {
            case "CPA":
            case "PA":
            case "PPA":
            {
                return((float)property.GetNumProp(ENTITY_PROPERTY.PROPERTY_PA));
            }

            case "CPD":
            case "PD":
            case "PPD":
            case "PDFA1":
            {
                return((float)property.GetNumProp(ENTITY_PROPERTY.PROPERTY_PD));
            }

            case "CMA":
            case "MA":
            case "PMA":
            {
                return((float)property.GetNumProp(ENTITY_PROPERTY.PROPERTY_MA));
            }

            case "CMD":
            case "MD":
            case "PMD":
            case "MDFA1":
            {
                return((float)property.GetNumProp(ENTITY_PROPERTY.PROPERTY_MD));
            }

            case "CHP":
            case "HP":
            case "PHP":
            {
                return((float)property.GetNumProp(ENTITY_PROPERTY.PROPERTY_HP));
            }

            case "CMP":
            case "MP":
            case "PMP":
            {
                return((float)property.GetNumProp(ENTITY_PROPERTY.PROPERTY_MP));
            }

            case "CCRC":
            case "CRC":
            case "PCRC":
            {
                return((float)property.GetNumProp(ENTITY_PROPERTY.PROPERTY_CRC) / nScaleRatio);
            }

            case "CSD":
            case "SD":
            case "PSD":
            {
                return((float)property.GetNumProp(ENTITY_PROPERTY.PROPERTY_SD));
            }

            case "_PASD":            // 攻击速度(放大ZOOM_IN_MULTIPLE倍)
            {
                return((float)property.GetNumProp(ENTITY_PROPERTY.PROPERTY_PASD) / nScaleRatio);
            }

            case "CPASD":
            case "PASD":
            case "PPASD":
            {
                return((float)property.GetNumProp(ENTITY_PROPERTY.PROPERTY_AF) / nScaleRatio);
            }

            case "CHPRY":
            case "HPRY":
            case "PHPRY":
            {
                return((float)property.GetNumProp(ENTITY_PROPERTY.PROPERTY_HP_REPLY));
            }

            case "CMPRY":
            case "MPRY":
            case "PMPRY":
            {
                return((float)property.GetNumProp(ENTITY_PROPERTY.PROPERTY_MP_REPLY));
            }

            case "LEVEL":
            {
                return((float)property.GetNumProp(ENTITY_PROPERTY.PROPERTY_LEVEL));
            }

            case "COOL":
            {
                return((float)property.GetNumProp(ENTITY_PROPERTY.PROPERTY_PCT_COOL_REDUCE) / nScaleRatio);
            }

            case "MMP":
            {
                return((float)property.GetNumProp(ENTITY_PROPERTY.PROPERTY_MAX_MP));
            }

            case "MHP":
            {
                return((float)property.GetNumProp(ENTITY_PROPERTY.PROPERTY_MAX_HP));
            }

            case "BPA":
            {
                return((float)property.GetNumProp(ENTITY_PROPERTY.PROPERTY_BASE_PA) / nScaleRatio);
            }

            case "BMA":
            {
                return((float)property.GetNumProp(ENTITY_PROPERTY.PROPERTY_BASE_MA) / nScaleRatio);
            }

            case "BPD":
            {
                return((float)property.GetNumProp(ENTITY_PROPERTY.PROPERTY_BASE_PD) / nScaleRatio);
            }

            case "BMD":
            {
                return((float)property.GetNumProp(ENTITY_PROPERTY.PROPERTY_BASE_MD) / nScaleRatio);
            }

            case "BSD":
            {
                return((float)property.GetNumProp(ENTITY_PROPERTY.PROPERTY_BASE_SD) / nScaleRatio);
            }

            case "BPASD":
            {
                return((float)property.GetNumProp(ENTITY_PROPERTY.PROPERTY_BASE_AF) / nScaleRatioEx);
            }

            case "BCRC":
            {
                return(0.0f);
            }

            case "BCOOL":
            {
                return(0.0f);
            }

            case "APA":
            {
                float fBasePA    = (float)property.GetNumProp(ENTITY_PROPERTY.PROPERTY_BASE_PA) / 100.0f;           // 基础物理攻击
                float fAppendPA  = ((float)property.GetNumProp(ENTITY_PROPERTY.PROPERTY_APPEND_PA)) / 100.0f;       // 附加物理攻击
                float fAppendPPA = ((float)property.GetNumProp(ENTITY_PROPERTY.PROPERTY_APPEND_PCT_PA)) / 10000.0f; // 附加百分比物理攻击
                //Trace.Log("APA: 基础物理攻击=" + property.GetNumProp(ENTITY_PROPERTY.PROPERTY_BASE_PA).ToString()
                //    + ", 附加物理攻击="+ property.GetNumProp(ENTITY_PROPERTY.PROPERTY_APPEND_PA).ToString()
                //    + ",附加百分比物理攻击="+ property.GetNumProp(ENTITY_PROPERTY.PROPERTY_APPEND_PCT_PA).ToString());
                return(fAppendPA + (fBasePA + fAppendPA) * fAppendPPA);
            }

            case "AMA":                                                                                             // AMA = fAppendMA + (fBaseMA + fAppendMA) * fAppendPMA
            {
                float fBaseMA    = (float)property.GetNumProp(ENTITY_PROPERTY.PROPERTY_BASE_MA);                    // 基础法术攻
                float fAppendMA  = ((float)property.GetNumProp(ENTITY_PROPERTY.PROPERTY_APPEND_MA)) / 100.0f;       // 附加法术攻击
                float fAppendPMA = ((float)property.GetNumProp(ENTITY_PROPERTY.PROPERTY_APPEND_PCT_MA)) / 10000.0f; // 附加百分比法术攻
                return(fAppendMA + (fBaseMA + fAppendMA) * fAppendPMA);
            }

            case "APD":
            {
                return((float)property.GetNumProp(ENTITY_PROPERTY.PROPERTY_APPEND_PD) / nScaleRatio);
            }

            case "AMD":
            {
                return((float)property.GetNumProp(ENTITY_PROPERTY.PROPERTY_APPEND_MD) / nScaleRatio);
            }

            case "ASD":
            {
                float fCurentValue = (float)property.GetNumProp(ENTITY_PROPERTY.PROPERTY_SD);
                float fBaseSD      = (float)property.GetNumProp(ENTITY_PROPERTY.PROPERTY_BASE_SD) / nScaleRatio;
                return(fCurentValue - fBaseSD);
            }

            case "APASD":
            {
                return((float)property.GetNumProp(ENTITY_PROPERTY.PROPERTY_AF) / nScaleRatio - (float)property.GetNumProp(ENTITY_PROPERTY.PROPERTY_BASE_AF) / nScaleRatioEx);
            }

            case "ACRC":
            {
                return((float)property.GetNumProp(ENTITY_PROPERTY.PROPERTY_APPEND_CRC) / nScaleRatioEx);
            }

            case "ACOOL":
            {
                return((float)property.GetNumProp(ENTITY_PROPERTY.PROPERTY_PCT_COOL_REDUCE) / nScaleRatio);
            }

            case "PAF":
            {
                return((float)property.GetNumProp(ENTITY_PROPERTY.PROPERTY_PCT_AF));
            }

            case "PDP":
            {
                return((float)property.GetNumProp(ENTITY_PROPERTY.PROPERTY_PDP));
            }

            case "PPDP":
            {
                return((float)property.GetNumProp(ENTITY_PROPERTY.PROPERTY_APPEND_PCT_PDP) / nScaleRatio);
            }

            case "MDP":
            {
                return((float)property.GetNumProp(ENTITY_PROPERTY.PROPERTY_MDP));
            }

            case "PMDP":
            {
                return((float)property.GetNumProp(ENTITY_PROPERTY.PROPERTY_APPEND_PCT_MDP) / nScaleRatio);
            }

            case "PPDR":
            {
                return((float)property.GetNumProp(ENTITY_PROPERTY.PROPERTY_PCT_PDRAINS) / nScaleRatio);
            }

            case "PMDR":
            {
                return((float)property.GetNumProp(ENTITY_PROPERTY.PROPERTY_PCT_MDRAINS) / nScaleRatio);
            }

            default:
                return(0.0f);
            }
        }