From 7fdcf29617dad7d6ebc29489ae55fd815ec72e83 Mon Sep 17 00:00:00 2001
From: client_Hale <339726288@qq.com>
Date: 星期四, 10 一月 2019 15:43:04 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
---
System/Skill/SkillBehaviour.cs | 31 +++++++++++++++++++++++++++++++
1 files changed, 31 insertions(+), 0 deletions(-)
diff --git a/System/Skill/SkillBehaviour.cs b/System/Skill/SkillBehaviour.cs
index 9cc0daa..df3aacf 100644
--- a/System/Skill/SkillBehaviour.cs
+++ b/System/Skill/SkillBehaviour.cs
@@ -1,6 +1,7 @@
锘縰sing System;
using System.Collections;
using System.Collections.Generic;
+using System.Text;
using TableConfig;
using UnityEngine;
using UnityEngine.UI;
@@ -47,6 +48,35 @@
if (m_SkillDescription != null)
{
m_SkillDescription.text = string.Empty;
+ if (ActivateShow.activateType == ActivateShow.ActivateFunc.GodWeaponEffect)
+ {
+ DisplayGodWeaponEffectProperty(config);
+ }
+ }
+ }
+
+ void DisplayGodWeaponEffectProperty(GodWeaponEffectConfig config)
+ {
+ var _model = ModelCenter.Instance.GetModel<MagicianModel>();
+ Dictionary<int, int> dict;
+ if (_model.TryGetEffectProperty(config.type, config.level, out dict))
+ {
+ var sb = new StringBuilder();
+ foreach (var property in dict.Keys)
+ {
+ var propertyConfig = Config.Instance.Get<PlayerPropertyConfig>(property);
+ if (propertyConfig != null)
+ {
+ sb.Append(propertyConfig.Name);
+ sb.Append(StringUtility.Contact("+", UIHelper.ReplaceLargeNum(
+ UIHelper.ReplacePercentage(dict[property], propertyConfig.ISPercentage,
+ UIHelper.GetPropertyDecimalCount(property))),
+ propertyConfig.ISPercentage == 1 ? "%" : string.Empty));
+ sb.Append("\n");
+ }
+ }
+ m_SkillDescription.text = sb.ToString();
+ m_SkillDescription.color = UIHelper.GetUIColor(TextColType.DarkGreen);
}
}
@@ -61,6 +91,7 @@
m_SkillIcon.SetSprite(config.IconName);
m_SkillName.text = config.SkillName;
m_SkillDescription.text = config.Description;
+ m_SkillDescription.color = UIHelper.GetUIColor(TextColType.LightYellow);
}
}
--
Gitblit v1.8.0