From 57f21b5ec74d8164ddbcca3538aecb73e2a3706f Mon Sep 17 00:00:00 2001
From: client_Wu Xijin <364452445@qq.com>
Date: 星期一, 04 三月 2019 18:04:47 +0800
Subject: [PATCH] 3555 新版装备功能开发
---
System/Equip/EquipLevelSelectBehaviour.cs | 30 +---
System/Equip/EquipSet.cs | 5
Core/GameEngine/Model/TelPartialConfig/PartialEquipPlaceMapConfig.cs.meta | 12 +
Core/NetworkPackage/ServerPack/HA3_Function/HA3B1_tagMCEquipPartStarInfo.cs.meta | 12 +
System/Equip/EquipSuitPropertyWidget.cs | 40 +++++
Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA3B1_tagMCEquipPartStarInfo.cs | 13 +
Core/NetworkPackage/ServerPack/HA3_Function/HA3B1_tagMCEquipPartStarInfo.cs | 29 ++++
System/Equip/RealmEquipWin.cs | 51 +++++++
System/EquipStar/EquipStar.cs | 45 ++++--
Core/NetworkPackage/ClientPack/ClientToMapServer/CA5_Function/CA5C5_tagCMEquipPartStarUp.cs | 27 +++
Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA3B1_tagMCEquipPartStarInfo.cs.meta | 12 +
System/Equip/EquipModel.cs | 24 +++
System/EquipStar/EquipStarModel.cs | 55 +++++++
Core/GameEngine/DataToCtl/PackageRegedit.cs | 1
Core/GameEngine/Model/TelPartialConfig/PartialEquipPlaceMapConfig.cs | 27 +++
Core/NetworkPackage/ClientPack/ClientToMapServer/CA5_Function/CA5C5_tagCMEquipPartStarUp.cs.meta | 12 +
System/EquipStar/EquipStarWin.cs | 6
17 files changed, 356 insertions(+), 45 deletions(-)
diff --git a/Core/GameEngine/DataToCtl/PackageRegedit.cs b/Core/GameEngine/DataToCtl/PackageRegedit.cs
index 070a09e..a93fc2a 100644
--- a/Core/GameEngine/DataToCtl/PackageRegedit.cs
+++ b/Core/GameEngine/DataToCtl/PackageRegedit.cs
@@ -29,6 +29,7 @@
public static void Init()
{
// 鐧昏鐩稿簲鐨勬暟鎹綋鍙婂搴旂殑鏁版嵁杞�昏緫绫�
+ Register(typeof(HA3B1_tagMCEquipPartStarInfo), typeof(DTCA3B1_tagMCEquipPartStarInfo));
Register(typeof(HA816_tagMCMysticalShopInfo), typeof(DTCA816_tagMCMysticalShopInfo));
Register(typeof(HAC11_tagGCFeastRedPacketInfo), typeof(DTCAC11_tagGCFeastRedPacketInfo));
Register(typeof(HAB25_tagMCFeastRedPackInfo), typeof(DTCAB25_tagMCFeastRedPackInfo));
diff --git a/Core/GameEngine/Model/TelPartialConfig/PartialEquipPlaceMapConfig.cs b/Core/GameEngine/Model/TelPartialConfig/PartialEquipPlaceMapConfig.cs
new file mode 100644
index 0000000..2d004c2
--- /dev/null
+++ b/Core/GameEngine/Model/TelPartialConfig/PartialEquipPlaceMapConfig.cs
@@ -0,0 +1,27 @@
+锘縰sing System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+
+public partial class EquipPlaceMapConfig : IConfigPostProcess
+{
+ static Dictionary<int, int> clientPlaceToServerPlace = new Dictionary<int, int>();
+
+ public void OnConfigParseCompleted()
+ {
+ clientPlaceToServerPlace[LV * 100 + EquipPlace] = PackIndex;
+ }
+
+ public static int GetServerPlace(int level, int equipPlace)
+ {
+ var key = level * 100 + equipPlace;
+ if (clientPlaceToServerPlace.ContainsKey(key))
+ {
+ return clientPlaceToServerPlace[key];
+ }
+ else
+ {
+ return 0;
+ }
+ }
+
+}
diff --git a/Core/GameEngine/Model/TelPartialConfig/PartialEquipPlaceMapConfig.cs.meta b/Core/GameEngine/Model/TelPartialConfig/PartialEquipPlaceMapConfig.cs.meta
new file mode 100644
index 0000000..ab191fb
--- /dev/null
+++ b/Core/GameEngine/Model/TelPartialConfig/PartialEquipPlaceMapConfig.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 5575604ea3a7ff34d97988215afd52dd
+timeCreated: 1551686215
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Core/NetworkPackage/ClientPack/ClientToMapServer/CA5_Function/CA5C5_tagCMEquipPartStarUp.cs b/Core/NetworkPackage/ClientPack/ClientToMapServer/CA5_Function/CA5C5_tagCMEquipPartStarUp.cs
new file mode 100644
index 0000000..5738de3
--- /dev/null
+++ b/Core/NetworkPackage/ClientPack/ClientToMapServer/CA5_Function/CA5C5_tagCMEquipPartStarUp.cs
@@ -0,0 +1,27 @@
+锘縰sing UnityEngine;
+using System.Collections;
+
+// A5 C5 瑁呭閮ㄤ綅鍗囨槦 #tagCMEquipPartStarUp
+
+public class CA5C5_tagCMEquipPartStarUp : GameNetPackBasic
+{
+ public ushort EquipPackIndex; // 閮ㄤ綅鏍煎瓙绱㈠紩
+ public byte CostEquipCnt; // 瑁呭涓暟
+ public ushort[] CostEquipIndex; // 瑁呭绱㈠紩
+ public uint[] CostEquipID; // 瑁呭鐗╁搧ID
+
+ public CA5C5_tagCMEquipPartStarUp()
+ {
+ combineCmd = (ushort)0x03FE;
+ _cmd = (ushort)0xA5C5;
+ }
+
+ public override void WriteToBytes()
+ {
+ WriteBytes(EquipPackIndex, NetDataType.WORD);
+ WriteBytes(CostEquipCnt, NetDataType.BYTE);
+ WriteBytes(CostEquipIndex, NetDataType.WORD, CostEquipCnt);
+ WriteBytes(CostEquipID, NetDataType.DWORD, CostEquipCnt);
+ }
+
+}
\ No newline at end of file
diff --git a/Core/NetworkPackage/ClientPack/ClientToMapServer/CA5_Function/CA5C5_tagCMEquipPartStarUp.cs.meta b/Core/NetworkPackage/ClientPack/ClientToMapServer/CA5_Function/CA5C5_tagCMEquipPartStarUp.cs.meta
new file mode 100644
index 0000000..665734f
--- /dev/null
+++ b/Core/NetworkPackage/ClientPack/ClientToMapServer/CA5_Function/CA5C5_tagCMEquipPartStarUp.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 0e0e73c681efe2a439a71954e7dab705
+timeCreated: 1551685504
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA3B1_tagMCEquipPartStarInfo.cs b/Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA3B1_tagMCEquipPartStarInfo.cs
new file mode 100644
index 0000000..258c66e
--- /dev/null
+++ b/Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA3B1_tagMCEquipPartStarInfo.cs
@@ -0,0 +1,13 @@
+using UnityEngine;
+using System.Collections;
+using Snxxz.UI;
+// A3 B1 装备部位星数信息 #tagMCEquipPartStarInfo
+
+public class DTCA3B1_tagMCEquipPartStarInfo : DtcBasic
+{
EquipStarModel model { get { return ModelCenter.Instance.GetModel<EquipStarModel>(); } }
+
+ public override void Done(GameNetPackBasic vNetPack)
+ {
base.Done(vNetPack);
+ var vNetData = vNetPack as HA3B1_tagMCEquipPartStarInfo;
model.UpdateStarLevels(vNetData);
+ }
+}
diff --git a/Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA3B1_tagMCEquipPartStarInfo.cs.meta b/Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA3B1_tagMCEquipPartStarInfo.cs.meta
new file mode 100644
index 0000000..71232fa
--- /dev/null
+++ b/Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA3B1_tagMCEquipPartStarInfo.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 718480869f00d38488b3c37ffc53c5bc
+timeCreated: 1551687370
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Core/NetworkPackage/ServerPack/HA3_Function/HA3B1_tagMCEquipPartStarInfo.cs b/Core/NetworkPackage/ServerPack/HA3_Function/HA3B1_tagMCEquipPartStarInfo.cs
new file mode 100644
index 0000000..0f7f592
--- /dev/null
+++ b/Core/NetworkPackage/ServerPack/HA3_Function/HA3B1_tagMCEquipPartStarInfo.cs
@@ -0,0 +1,29 @@
+using UnityEngine;
+using System.Collections;
+
+// A3 B1 装备部位星数信息 #tagMCEquipPartStarInfo
+
+public class HA3B1_tagMCEquipPartStarInfo : GameNetPackBasic {
+ public byte Count; // 信息个数
+ public tagMCEquipPartStar[] InfoList = null; // 信息列表
+
+ public HA3B1_tagMCEquipPartStarInfo () {
+ _cmd = (ushort)0xA3B1;
+ }
+
+ public override void ReadFromBytes (byte[] vBytes) {
+ TransBytes (out Count, vBytes, NetDataType.BYTE);
+ InfoList = new tagMCEquipPartStar[Count];
+ for (int i = 0; i < Count; i ++) {
+ InfoList[i] = new tagMCEquipPartStar();
+ TransBytes (out InfoList[i].EquipPackIndex, vBytes, NetDataType.WORD);
+ TransBytes (out InfoList[i].Star, vBytes, NetDataType.BYTE);
+ }
+ }
+
+ public struct tagMCEquipPartStar {
+ public ushort EquipPackIndex;
+ public byte Star;
+ }
+
+}
diff --git a/Core/NetworkPackage/ServerPack/HA3_Function/HA3B1_tagMCEquipPartStarInfo.cs.meta b/Core/NetworkPackage/ServerPack/HA3_Function/HA3B1_tagMCEquipPartStarInfo.cs.meta
new file mode 100644
index 0000000..e51a713
--- /dev/null
+++ b/Core/NetworkPackage/ServerPack/HA3_Function/HA3B1_tagMCEquipPartStarInfo.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 0169900e0e4c9a0428ac35731c220f82
+timeCreated: 1551687369
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/System/Equip/EquipLevelSelectBehaviour.cs b/System/Equip/EquipLevelSelectBehaviour.cs
index 735cdd6..56e96f3 100644
--- a/System/Equip/EquipLevelSelectBehaviour.cs
+++ b/System/Equip/EquipLevelSelectBehaviour.cs
@@ -9,29 +9,23 @@
namespace Snxxz.UI
{
- public class EquipLevelSelectBehaviour : ScrollItem
+ public class EquipLevelSelectBehaviour : MonoBehaviour
{
[SerializeField] RectTransform m_AppearanceSign;
[SerializeField] RedpointBehaviour m_Redpoint;
- [SerializeField] RectTransform m_SelectedSign;
[SerializeField] Button m_Select;
[SerializeField] Image m_Icon;
[SerializeField] Text m_LevelName;
[SerializeField] RectTransform m_LockContainer;
- [SerializeField] Text m_UnLockCondition;
- [SerializeField] Material m_MaterialNormal;
- [SerializeField] Material m_MaterialLocked;
- [SerializeField] FontColorSizeConfig m_FontColor;
+ [SerializeField] FontColorSizeConfig m_FontConfig;
EquipModel model { get { return ModelCenter.Instance.GetModel<EquipModel>(); } }
int level = 0;
EquipSet equipSet;
- public override void Display(object data)
+ public void Display(int level)
{
- base.Display(data);
-
- this.level = (int)data;
+ this.level = level;
this.equipSet = model.GetEquipSet(level);
this.m_Select.SetListener(() => { model.SelectSet(this.level, 0); });
@@ -39,9 +33,8 @@
UpdateDynamicInfo(true);
}
- public override void Dispose()
+ public void Dispose()
{
- base.Dispose();
}
private void LateUpdate()
@@ -56,14 +49,7 @@
m_LevelName.text = string.Empty;
var unLocked = equipSet.unLocked;
- m_UnLockCondition.gameObject.SetActive(unLocked);
- m_Icon.material = unLocked ? m_MaterialNormal : m_MaterialLocked;
- m_LevelName.color = m_FontColor.GetColorSize(unLocked ? "" : "").color;
- if (!unLocked)
- {
- m_UnLockCondition.text = string.Empty;
- }
-
+ m_LockContainer.gameObject.SetActive(!unLocked);
m_Redpoint.redpointId = this.equipSet.redpoint.id;
}
@@ -76,7 +62,9 @@
if (force || equipSet.selected.dirty)
{
- m_SelectedSign.gameObject.SetActive(equipSet.selected.Fetch());
+ var selected = equipSet.selected.Fetch();
+ m_Icon.SetSprite(equipSet.selected.Fetch() ? "Title_Clicked" : "Title_Normal");
+ m_LevelName.color = m_FontConfig.GetColorSize(selected ? "Selected" : "Normal").color;
}
}
diff --git a/System/Equip/EquipModel.cs b/System/Equip/EquipModel.cs
index 3ddbc85..ef938a2 100644
--- a/System/Equip/EquipModel.cs
+++ b/System/Equip/EquipModel.cs
@@ -131,6 +131,30 @@
return new List<int>(equipSets.Keys);
}
+ public List<int> GetViewableEquipSets()
+ {
+ var sets = new List<int>();
+ var enumerator = equipSets.GetEnumerator();
+ while (enumerator.MoveNext())
+ {
+ if (enumerator.Current.Value.unLocked)
+ {
+ sets.Add(enumerator.Current.Value.level);
+ }
+ else
+ {
+ break;
+ }
+ }
+
+ if (enumerator.Current.Value != null)
+ {
+ sets.Add(enumerator.Current.Value.level);
+ }
+
+ return sets;
+ }
+
public EquipSet GetEquipSet(int level)
{
if (!equipSets.ContainsKey(level))
diff --git a/System/Equip/EquipSet.cs b/System/Equip/EquipSet.cs
index 9c29d39..a7f86c9 100644
--- a/System/Equip/EquipSet.cs
+++ b/System/Equip/EquipSet.cs
@@ -238,6 +238,11 @@
}
}
+ public static int ClientPlaceToServerPlace(int level, int place)
+ {
+ return EquipPlaceMapConfig.GetServerPlace(level, place);
+ }
+
}
public struct EquipAppearance
diff --git a/System/Equip/EquipSuitPropertyWidget.cs b/System/Equip/EquipSuitPropertyWidget.cs
index 5d96463..776308c 100644
--- a/System/Equip/EquipSuitPropertyWidget.cs
+++ b/System/Equip/EquipSuitPropertyWidget.cs
@@ -13,6 +13,7 @@
public class EquipSuitPropertyWidget : MonoBehaviour
{
[SerializeField] Text m_SuitName;
+ [SerializeField] StarToggle[] m_StarToggles;
[SerializeField] Text[] m_SuitEquipNames;
[SerializeField] EquipSuitPropertyBar m_TwoSuit;
@@ -69,6 +70,45 @@
return string.Join("\n", lines.ToArray());
}
+ public class StarToggle
+ {
+ public int star;
+ public Text title;
+ public Toggle toggle;
+
+ public void Display()
+ {
+
+ title.gameObject.SetActive(true);
+ }
+
+ public void Hide()
+ {
+
+ }
+
+ private void OnValueChange(bool value)
+ {
+ if (value)
+ {
+ switch (star)
+ {
+ case 0:
+ break;
+ case 3:
+ break;
+ case 6:
+ break;
+ case 9:
+ break;
+ default:
+ break;
+ }
+ }
+ }
+
+ }
+
}
}
diff --git a/System/Equip/RealmEquipWin.cs b/System/Equip/RealmEquipWin.cs
index 9e3f240..b89b6d8 100644
--- a/System/Equip/RealmEquipWin.cs
+++ b/System/Equip/RealmEquipWin.cs
@@ -14,6 +14,7 @@
public class RealmEquipWin : Window
{
+ [SerializeField] RectTransform m_LevelsContainer;
[SerializeField] EquipSlots m_EquipSlots;
[SerializeField] Text m_FightPoint;
[SerializeField] RawImage m_Role;
@@ -21,6 +22,9 @@
[SerializeField] EquipSuitPropertyWidget m_SuitPropertyWidget;
[SerializeField] CandidateEquipWidget m_CandidateEquipWidget;
+
+ List<EquipLevelSelectBehaviour> levelSelectBehaviours = new List<EquipLevelSelectBehaviour>();
+ List<GameObject> emptyFillers = new List<GameObject>();
EquipModel model { get { return ModelCenter.Instance.GetModel<EquipModel>(); } }
@@ -53,9 +57,8 @@
protected override void OnActived()
{
base.OnActived();
+ DisplayLevels();
DisplayDynamicInfo(true);
-
- ShowCandidateEquips();
}
protected override void LateUpdate()
@@ -85,6 +88,7 @@
if (force || model.selectedLevel.dirty)
{
var level = model.selectedLevel.Fetch();
+
DisplayEquips(level);
DisplayAppearance(level);
DisplayFightPoint(level);
@@ -98,6 +102,49 @@
}
}
+ private void DisplayLevels()
+ {
+ var sets = model.GetViewableEquipSets();
+ var behaviourCount = sets.Count;
+ var emptyCount = behaviourCount >= 5 ? 0 : 5 - behaviourCount;
+ var behaviourGap = behaviourCount - levelSelectBehaviours.Count;
+ for (var i = 0; i < behaviourGap; i++)
+ {
+ var instance = UIUtility.CreateWidget("EquipLevelSelectBehaviour", "EquipLevelSelectBehaviour");
+ instance.transform.SetParentEx(m_LevelsContainer, Vector3.zero, Quaternion.identity, Vector3.one);
+ instance.transform.SetAsFirstSibling();
+ levelSelectBehaviours.Insert(0, instance.GetComponent<EquipLevelSelectBehaviour>());
+ }
+
+ var emptyGap = emptyCount - emptyFillers.Count;
+ for (var i = 0; i < emptyCount; i++)
+ {
+ var instance = UIUtility.CreateWidget("EquipLevelSelectEmptyBehaviour", "EquipLevelSelectEmptyBehaviour");
+ instance.transform.SetParentEx(m_LevelsContainer, Vector3.zero, Quaternion.identity, Vector3.one);
+ instance.transform.SetAsLastSibling();
+ emptyFillers.Add(instance);
+ }
+
+ for (var i = 0; i < levelSelectBehaviours.Count; i++)
+ {
+ var behaviour = levelSelectBehaviours[i];
+ if (i < behaviourCount)
+ {
+ behaviour.gameObject.SetActive(true);
+ behaviour.Display(sets[i]);
+ }
+ else
+ {
+ behaviour.gameObject.SetActive(false);
+ }
+ }
+
+ for (var i = 0; i < emptyFillers.Count; i++)
+ {
+ emptyFillers[i].SetActive(i < emptyCount);
+ }
+ }
+
private void DisplayEquips(int level)
{
for (var i = 1; i <= 12; i++)
diff --git a/System/EquipStar/EquipStar.cs b/System/EquipStar/EquipStar.cs
index 836c1ec..55e530a 100644
--- a/System/EquipStar/EquipStar.cs
+++ b/System/EquipStar/EquipStar.cs
@@ -9,7 +9,6 @@
{
public readonly int level = 0;
Dictionary<int, int> equipStars = new Dictionary<int, int>();
- Dictionary<EquipSuitType, int> suitLevels = new Dictionary<EquipSuitType, int>();
public EquipSetStar(int level)
{
@@ -25,6 +24,11 @@
}
return totalLevel;
+ }
+
+ public void UpdateEquipStarLevel(int place, int level)
+ {
+ equipStars[place] = level;
}
public int GetEquipStarLevel(int place)
@@ -43,14 +47,34 @@
return count;
}
- public void UpdateSuitLevel(EquipSuitType type, int level)
- {
- suitLevels[type] = level;
- }
-
public int GetSuitLevel(EquipSuitType type)
{
- return suitLevels[type];
+ var targetCount = 2;
+ switch (type)
+ {
+ case EquipSuitType.TwoSuit:
+ targetCount = 2;
+ break;
+ case EquipSuitType.FiveSuit:
+ targetCount = 5;
+ break;
+ case EquipSuitType.EightSuit:
+ targetCount = 8;
+ break;
+ default:
+ break;
+ }
+
+ var maxLevel = GetTotalStarLevel() / targetCount;
+ for (var i = maxLevel; i >= 0; i--)
+ {
+ if (GetEquipCountWhichStarLevelLq(i) >= targetCount)
+ {
+ return i;
+ }
+ }
+
+ return 0;
}
}
@@ -60,13 +84,6 @@
TwoSuit = 2,
FiveSuit = 5,
EightSuit = 8,
- }
-
- public struct EquipStar
- {
- public int level;
- public int place;
- public int starLevel;
}
}
diff --git a/System/EquipStar/EquipStarModel.cs b/System/EquipStar/EquipStarModel.cs
index ec97c98..9d548a0 100644
--- a/System/EquipStar/EquipStarModel.cs
+++ b/System/EquipStar/EquipStarModel.cs
@@ -29,13 +29,53 @@
}
- public void DoStarUpgrade(int level, int place)
+ public void DoStarUpgrade(int level, int place, int starLevel)
{
if (!equipStars.ContainsKey(level))
{
return;
}
+ var maxLevel = GetMaxStarLevel(level);
+ if (starLevel > maxLevel)
+ {
+ //宸茬粡鏄渶澶ф槦绾э紝鏃犳硶鍗囨槦
+ return;
+ }
+
+ var config = EquipStarConfig.Get(level, place, starLevel);
+ var specialMaterial = packModel.GetItemByGuid(materials[6].value);
+ if (config.CostItemDict.x > 0 && (specialMaterial == null || specialMaterial.config.ID != config.CostItemDict.x))
+ {
+ //璇锋斁鍏ユ纭殑鐗规畩鏉愭枡
+ return;
+ }
+
+ var materialIndexs = new List<ushort>();
+ var materialItemIds = new List<uint>();
+ foreach (var material in materials.Values)
+ {
+ if (!string.IsNullOrEmpty(material.value))
+ {
+ var item = packModel.GetItemByGuid(material.value);
+ materialIndexs.Add((ushort)item.itemPlace);
+ materialItemIds.Add((uint)item.itemId);
+ }
+ }
+
+ if (materialIndexs.Count < (config.CostEquipCnt + config.CostItemDict.x > 0 ? 1 : 0))
+ {
+ //鏉愭枡涓嶈冻
+ return;
+ }
+
+ var info = new CA5C5_tagCMEquipPartStarUp();
+ info.EquipPackIndex = (ushort)EquipSet.ClientPlaceToServerPlace(level, place);
+ info.CostEquipIndex = materialIndexs.ToArray();
+ info.CostEquipID = materialItemIds.ToArray();
+ info.CostEquipCnt = (byte)materialIndexs.Count;
+
+ GameNetSystem.Instance.SendInfo(info);
}
public void FiltrateCandidateEquips(int level)
@@ -54,14 +94,17 @@
}
}
- public void UpdateSuitLevel(int level, EquipSuitType type, int starLevel)
+ public void UpdateStarLevels(HA3B1_tagMCEquipPartStarInfo info)
{
- if (!equipStars.ContainsKey(level))
+ for (var i = 0; i < info.InfoList.Length; i++)
{
- return;
+ var clientInfo = EquipSet.ServerPlaceToClientPlace(info.InfoList[i].EquipPackIndex);
+ var level = clientInfo.x;
+ if (equipStars.ContainsKey(level))
+ {
+ equipStars[level].UpdateEquipStarLevel(clientInfo.y, info.InfoList[i].Star);
+ }
}
-
- equipStars[level].UpdateSuitLevel(type, starLevel);
}
public int GetSuitLevel(int level, EquipSuitType type)
diff --git a/System/EquipStar/EquipStarWin.cs b/System/EquipStar/EquipStarWin.cs
index a2517e2..f1c2455 100644
--- a/System/EquipStar/EquipStarWin.cs
+++ b/System/EquipStar/EquipStarWin.cs
@@ -173,11 +173,13 @@
}
}
-
private void StarUpgrade()
{
var equip = packModel.GetItemByGuid(model.selectedEquip.value);
- model.DoStarUpgrade(equip.config.LV, equip.config.EquipPlace);
+ var level = equip.config.LV;
+ var place = equip.config.EquipPlace;
+ var currentStarLevel = model.GetEquipStarLevel(level, place);
+ model.DoStarUpgrade(level, place, currentStarLevel);
}
[System.Serializable]
--
Gitblit v1.8.0