Пример #1
0
        private void FillDescription(TooltipGroup p_target, Int32 p_currentIncrease, Character p_character, DummyCharacter p_dummy, Boolean p_nextOrPrevious)
        {
            GameConfig game = ConfigManager.Instance.Game;
            String     arg;

            if (p_nextOrPrevious)
            {
                arg = m_nextLevelAttributeColorHex;
            }
            else
            {
                arg = m_attributetColorHex;
            }
            Single hpperVitality;

            if (p_character != null)
            {
                hpperVitality = p_character.Class.GetHPPerVitality();
            }
            else
            {
                hpperVitality = p_dummy.GetHPPerVitality();
            }
            if (m_atrribute == EPotionTarget.MIGHT)
            {
                String str = String.Empty;
                if (game.HealthPerMight > 0f)
                {
                    str = LocaManager.GetText("ATRRIBUTE_EFFECT_MIGHT_HEALTH", game.HealthPerMight * p_currentIncrease, arg, "[-]") + "\n\n";
                }
                String text = LocaManager.GetText("ATRRIBUTE_EFFECT_MIGHT_DAMAGE", Mathf.RoundToInt(ConfigManager.Instance.Game.MainHandDamage * p_currentIncrease * 100f), arg, "[-]");
                p_target.UpdateText(str + text);
            }
            else if (m_atrribute == EPotionTarget.MAGIC)
            {
                String str2 = String.Empty;
                if (game.ManaPerMagic > 0f)
                {
                    str2 = LocaManager.GetText("ATRRIBUTE_EFFECT_MAGIC_MANA", game.ManaPerMagic * p_currentIncrease, arg, "[-]") + "\n\n";
                }
                String text2 = LocaManager.GetText("ATRRIBUTE_EFFECT_MAGIC_POWER", Mathf.RoundToInt(ConfigManager.Instance.Game.MagicDamage * p_currentIncrease * 100f), arg, "[-]");
                p_target.UpdateText(str2 + text2);
            }
            else if (m_atrribute == EPotionTarget.PERCEPTION)
            {
                String text3 = LocaManager.GetText("ATRRIBUTE_EFFECT_PERCEPTION_DAMAGE", Mathf.RoundToInt(ConfigManager.Instance.Game.RangedDamage * p_currentIncrease * 100f), arg, "[-]");
                String text4 = LocaManager.GetText("ATRRIBUTE_EFFECT_PERCEPTION_ATTACK", p_currentIncrease, arg, "[-]");
                p_target.UpdateText(text3 + "\n\n" + text4);
            }
            else if (m_atrribute == EPotionTarget.DESTINY)
            {
                String text5 = LocaManager.GetText("ATRRIBUTE_EFFECT_DESTINY_CRIT", game.MainHandCritChanceDestinyMod * p_currentIncrease, arg, "[-]");
                String text6 = LocaManager.GetText("ATRRIBUTE_EFFECT_DESTINY_EVADE", p_currentIncrease, arg, "[-]");
                p_target.UpdateText(text5 + "\n\n" + text6);
            }
            else if (m_atrribute == EPotionTarget.VITALITY)
            {
                String text7 = LocaManager.GetText("ATRRIBUTE_EFFECT_VITALITY_HEALTH", hpperVitality * p_currentIncrease, arg, "[-]");
                p_target.UpdateText(text7);
            }
            else if (m_atrribute == EPotionTarget.SPIRIT)
            {
                String text8 = LocaManager.GetText("ATRRIBUTE_EFFECT_SPIRIT_MANA", game.ManaPerSpirit * p_currentIncrease, arg, "[-]");
                p_target.UpdateText(text8);
            }
        }