From f3b2449efb879a7495c857b044f0ff0cedb6d21e Mon Sep 17 00:00:00 2001
From: client_Hale <339726288@qq.com>
Date: 星期一, 21 十月 2019 21:56:46 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
---
System/ItemTip/TipShenPropertyWidget.cs.meta | 12 +++
System/Vip/DayPackageItemBehaviour.cs | 17 ++++
System/KnapSack/Logic/ShenPropertyUtility.cs | 56 ++++++++------
System/Message/HrefAnalysis.cs | 4
System/KnapSack/Logic/LegendPropertyUtility.cs | 4
System/ItemTip/TipShenPropertyWidget.cs | 37 +++++++++
System/ItemTip/ItemTipUtility.cs | 23 +++++
System/KnapSack/Logic/ItemLogicUtility.cs | 21 +++++
System/ItemTip/EquipTipWin.cs | 9 ++
9 files changed, 151 insertions(+), 32 deletions(-)
diff --git a/System/ItemTip/EquipTipWin.cs b/System/ItemTip/EquipTipWin.cs
index 13b38e8..f83e9c0 100644
--- a/System/ItemTip/EquipTipWin.cs
+++ b/System/ItemTip/EquipTipWin.cs
@@ -123,6 +123,7 @@
public LayoutElementSizeClamp sizeClamp;
public TipEquipBaseInfoWidget baseInfoWidget;
public TipBasePropertyWidget basePropertyWidget;
+ public TipShenPropertyWidget shenPropertyWidget;
public TipLegendPropertyWidget legendPropertyWidget;
public TipSkillInfoWidget skillInfoWidget;
public TipSuitBriefWidget suitBriefWidget;
@@ -172,6 +173,14 @@
basePropertyWidget.Display(data.baseProperty);
}
+ //绁炶灞炴��
+ var hasShenProperty = !data.shenProperty.properties.IsNullOrEmpty();
+ shenPropertyWidget.gameObject.SetActive(hasShenProperty);
+ if (hasShenProperty)
+ {
+ shenPropertyWidget.Display(data.shenProperty);
+ }
+
var hasLegendProperty = !data.legendProperty.properties.IsNullOrEmpty();
legendPropertyWidget.gameObject.SetActive(hasLegendProperty);
if (hasLegendProperty)
diff --git a/System/ItemTip/ItemTipUtility.cs b/System/ItemTip/ItemTipUtility.cs
index 36354e7..355647d 100644
--- a/System/ItemTip/ItemTipUtility.cs
+++ b/System/ItemTip/ItemTipUtility.cs
@@ -36,6 +36,7 @@
public BaseProperty baseProperty;
public BaseProperty petMountBaseProperty;
public SpiritWeaponProperty spiritWeaponProperty;
+ public ShenProperty shenProperty;
public LegendProperty legendProperty;
public SkillInfo skillInfo;
public SuitInfo suitInfo;
@@ -511,6 +512,7 @@
gemInfo = GetGemInfo(guid),
trainProperty = GetTrainProperty(guid),
operates = operatable ? GetOperates(guid) : null,
+ shenProperty = GetShenProperty(item.itemId)
};
}
@@ -529,7 +531,8 @@
suitInfo = GetSuitInfo(itemId),
gemInfo = GetGemInfo(itemId),
starInfo = GetStarInfo(itemId),
- getWay = GetGetWay(itemId)
+ getWay = GetGetWay(itemId),
+ shenProperty = GetShenProperty(itemId)
};
}
@@ -714,6 +717,7 @@
strengthenProperty = strengthenProperty,
gemInfo = gemInfo,
trainProperty = trainProperty,
+ shenProperty = GetShenProperty(info.itemId)
};
}
@@ -733,7 +737,8 @@
suitInfo = GetSuitInfo(itemId),
gemInfo = GetGemInfo(itemId),
starInfo = GetStarInfo(itemId),
- operates = GetGoodOperates(goodId)
+ operates = GetGoodOperates(goodId),
+ shenProperty = GetShenProperty(itemId)
};
}
@@ -786,6 +791,7 @@
petMountBaseProperty = GetPetMountBaseProperty(item.itemId),
operates = operatable ? GetOperates(guid) : null,
refineMaterials = GetWingRefineMaterials(guid),
+ shenProperty = GetShenProperty(item.itemId)
};
}
@@ -801,6 +807,7 @@
legendProperty = GetLegendProperty(itemId),
petMountBaseProperty = GetPetMountBaseProperty(itemId),
getWay = GetGetWay(itemId),
+ shenProperty = GetShenProperty(itemId)
};
}
@@ -816,6 +823,7 @@
spiritWeaponProperty = GetSpiritWeaponProperty(itemId),
petMountBaseProperty = GetPetMountBaseProperty(itemId),
operates = GetGoodOperates(goodId),
+ shenProperty = GetShenProperty(itemId)
};
}
@@ -1145,7 +1153,7 @@
var config = ItemConfig.Get(itemId);
- data.properties = ShenPropertyUtility.GetEquipProperties(itemId);
+ data.properties = ShenPropertyUtility.GetEquipShenProperties(itemId);
return data;
@@ -1175,6 +1183,15 @@
{
data.trueCount = LegendPropertyUtility.GetEquipPropertyCount(itemId);
data.properties = LegendPropertyUtility.GetEquipProperties(itemId);
+ if (data.properties == null)
+ {
+ data.properties = LegendPropertyUtility.GetLegendProFromEquipShen(itemId);
+ if (data.properties != null)
+ {
+ data.trueCount = 0;
+ data.isPreview = false;
+ }
+ }
}
return data;
diff --git a/System/ItemTip/TipShenPropertyWidget.cs b/System/ItemTip/TipShenPropertyWidget.cs
new file mode 100644
index 0000000..bdfc5f3
--- /dev/null
+++ b/System/ItemTip/TipShenPropertyWidget.cs
@@ -0,0 +1,37 @@
+锘�//--------------------------------------------------------
+// [Author]: 绗簩涓栫晫
+// [ Date ]: Tuesday, March 12, 2019
+//--------------------------------------------------------
+using UnityEngine;
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine.UI;
+
+namespace Snxxz.UI
+{
+
+ public class TipShenPropertyWidget : MonoBehaviour
+ {
+ [SerializeField] Text m_PropertyBehaviours;
+
+ public void Display(ItemTipUtility.ShenProperty data)
+ {
+ var count = data.properties.Count;
+ var lines = new List<string>();
+ for (int i = 0; i < count; i++)
+ {
+ var property = data.properties[i];
+ string shenText = Language.Get("ShenEquipText" + property.z);
+ lines.Add(UIHelper.AppendColor(5, shenText + PlayerPropertyConfig.GetFullDescription(property.x, property.y)));
+ }
+
+
+ m_PropertyBehaviours.text = string.Join("\r\n", lines.ToArray());
+ }
+
+ }
+
+}
+
+
+
diff --git a/System/ItemTip/TipShenPropertyWidget.cs.meta b/System/ItemTip/TipShenPropertyWidget.cs.meta
new file mode 100644
index 0000000..cde40c3
--- /dev/null
+++ b/System/ItemTip/TipShenPropertyWidget.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 0536b99051bae5946afd08a7676d66e8
+timeCreated: 1571500535
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/System/KnapSack/Logic/ItemLogicUtility.cs b/System/KnapSack/Logic/ItemLogicUtility.cs
index d32ae71..9dbef59 100644
--- a/System/KnapSack/Logic/ItemLogicUtility.cs
+++ b/System/KnapSack/Logic/ItemLogicUtility.cs
@@ -270,11 +270,28 @@
private Dictionary<int, int> GetEquipLegendProperties(int itemId)
{
- var legendProperties = LegendPropertyUtility.GetEquipProperties(itemId);
+ var legendProperties = LegendPropertyUtility.GetLegendProFromEquipShen(itemId);
+ if (legendProperties == null)
+ legendProperties = LegendPropertyUtility.GetEquipProperties(itemId);
var properties = new Dictionary<int, int>();
if (legendProperties != null)
{
foreach (var item in legendProperties)
+ {
+ properties[item.x] = item.y;
+ }
+ }
+
+ return properties;
+ }
+
+ private Dictionary<int, int> GetEquipShenProperties(int itemId)
+ {
+ var shenProperties = ShenPropertyUtility.GetEquipShenProperties(itemId);
+ var properties = new Dictionary<int, int>();
+ if (shenProperties != null)
+ {
+ foreach (var item in shenProperties)
{
properties[item.x] = item.y;
}
@@ -307,6 +324,8 @@
return 0;
}
+ properties.AddRange(GetEquipShenProperties(itemId));
+
var minAttack = properties.ContainsKey((int)PropertyType.MinAtk) ? properties[(int)PropertyType.MinAtk] : 0;
var maxAttack = properties.ContainsKey((int)PropertyType.MaxAtk) ? properties[(int)PropertyType.MaxAtk] : 0;
var attack = properties.ContainsKey((int)PropertyType.ATK) ? properties[(int)PropertyType.ATK] : 0;
diff --git a/System/KnapSack/Logic/LegendPropertyUtility.cs b/System/KnapSack/Logic/LegendPropertyUtility.cs
index ba188c3..ba9c6aa 100644
--- a/System/KnapSack/Logic/LegendPropertyUtility.cs
+++ b/System/KnapSack/Logic/LegendPropertyUtility.cs
@@ -21,13 +21,13 @@
var legendPropertyConfig = LegendPropertyValueConfig.Get(config.Type, config.LV, config.ItemColor, config.SuiteiD != 0, config.StarLevel);
if (legendPropertyConfig == null)
{
- return GetLegendProFromEquipShen(itemId);
+ return null;
}
return new List<Int2>(legendPropertyConfig.previewValue);
}
- private static List<Int2> GetLegendProFromEquipShen(int itemId)
+ public static List<Int2> GetLegendProFromEquipShen(int itemId)
{
var shenConfig = EquipShenAttrConfig.Get(itemId);
if (shenConfig == null)
diff --git a/System/KnapSack/Logic/ShenPropertyUtility.cs b/System/KnapSack/Logic/ShenPropertyUtility.cs
index 59781aa..5bfc265 100644
--- a/System/KnapSack/Logic/ShenPropertyUtility.cs
+++ b/System/KnapSack/Logic/ShenPropertyUtility.cs
@@ -10,42 +10,50 @@
{
}
- public static List<Int3> GetEquipProperties(int itemId)
+ public static List<Int3> GetEquipShenProperties(int itemId)
{
- var config = ItemConfig.Get(itemId);
- if (config == null)
+ var shenConfig = EquipShenAttrConfig.Get(itemId);
+ if (shenConfig == null)
{
return null;
}
-
- var legendPropertyConfig = LegendPropertyValueConfig.Get(config.Type, config.LV, config.ItemColor, config.SuiteiD != 0, config.StarLevel);
- if (legendPropertyConfig == null)
+ var pro = new Int3[shenConfig.ShenAttrID.Length + shenConfig.XianAttrID.Length + shenConfig.JiAttrID.Length];
+ int count = 0;
+ for (int i = 0; i < shenConfig.ShenAttrID.Length; i++)
{
- return null;
+ pro[i].x = shenConfig.ShenAttrID[i];
+ pro[i].y = shenConfig.ShenAttrValue[i];
+ pro[i].z = 1;
+ count++;
}
- //return new List<Int2>(legendPropertyConfig.previewValue);
- return null;
+ for (int i = 0; i < shenConfig.XianAttrID.Length; i++)
+ {
+
+ pro[count].x = shenConfig.XianAttrID[i];
+ pro[count].y = shenConfig.XianAttrValue[i];
+ pro[count].z = 2;
+ count++;
+ }
+
+ for (int i = 0; i < shenConfig.JiAttrID.Length; i++)
+ {
+
+ pro[count].x = shenConfig.JiAttrID[i];
+ pro[count].y = shenConfig.JiAttrValue[i];
+ pro[count].z = 3;
+ count++;
+ }
+
+ return new List<Int3>(pro);
}
- public static int GetEquipPropertyCount(int itemId)
- {
- var config = ItemConfig.Get(itemId);
- if (config == null)
- {
- return 0;
- }
+
- var legendPropertyConfig = LegendPropertyValueConfig.Get(config.Type, config.LV, config.ItemColor, config.SuiteiD != 0, config.StarLevel);
- if (legendPropertyConfig == null)
- {
- return 0;
- }
-
- return legendPropertyConfig.propertyCount;
- }
}
+
+
diff --git a/System/Message/HrefAnalysis.cs b/System/Message/HrefAnalysis.cs
index 91d7880..3becc4f 100644
--- a/System/Message/HrefAnalysis.cs
+++ b/System/Message/HrefAnalysis.cs
@@ -307,8 +307,8 @@
}
}
- public static Regex EquipRegex = new Regex(@"\[([\u4e00-\u9fa5a-zA-Z0-9\|'_\(\)锛堬級\. :锛歖+?)\]", RegexOptions.Singleline);
- public static Regex EquipDetailRegex = new Regex("#item#([\u4e00-\u9fa5a-zA-Z0-9\\|'_\\(\\)锛堬級\\. :锛歕\,\\[\\]a-zA-Z\"\\{\\}-]+?)#item#", RegexOptions.Singleline);
+ public static Regex EquipRegex = new Regex(@"\[([\u4e00-\u9fa5a-zA-Z0-9\|'_\(\)锛堬級\*. :锛歖+?)\]", RegexOptions.Singleline);
+ public static Regex EquipDetailRegex = new Regex("#item#([\u4e00-\u9fa5a-zA-Z0-9\\|'_\\(\\)锛堬級\\*\\. :锛歕\,\\[\\]a-zA-Z\"\\{\\}-]+?)#item#", RegexOptions.Singleline);
public bool ExcuteHrefEvent(string msg, int index = 0, bool fromAutoTask = false)
{
diff --git a/System/Vip/DayPackageItemBehaviour.cs b/System/Vip/DayPackageItemBehaviour.cs
index e071ac5..9a1eb4e 100644
--- a/System/Vip/DayPackageItemBehaviour.cs
+++ b/System/Vip/DayPackageItemBehaviour.cs
@@ -15,6 +15,8 @@
[SerializeField] Image m_OpenRedpoint;
[SerializeField] Image m_CloseRedpoint;
[SerializeField] Button m_Select;
+ [SerializeField] Image m_OpenFree;
+ [SerializeField] Image m_CloseFree;
DayPackageItemClassModel model
{
@@ -53,8 +55,23 @@
if (index < model.recordIDs.Length)
{
+ if (model.GetDayGift(index).money != 0)
+ {
+ m_OpenFree.SetActive(false);
+ m_CloseFree.SetActive(false);
+ m_MoneyClose.gameObject.SetActive(true);
+ m_MoneyOpen.gameObject.SetActive(true);
+ }
+ else
+ {
+ m_MoneyClose.gameObject.SetActive(false);
+ m_MoneyOpen.gameObject.SetActive(false);
+ m_OpenFree.SetActive(true);
+ m_CloseFree.SetActive(true);
+ }
m_MoneyClose.text = model.GetDayGift(index).money.ToString();
m_MoneyOpen.text = model.GetDayGift(index).money.ToString();
+
DisplayRedpoint(index);
DisplaySelect();
}
--
Gitblit v1.8.0