From e102e4a814c25aa42017ac962d88bfbfc8d279de Mon Sep 17 00:00:00 2001
From: client_Hale <339726288@qq.com>
Date: 星期三, 09 一月 2019 15:29:05 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
---
Core/GameEngine/Model/ConfigManager.cs | 2
System/FashionDress/FashionSumAttrWin.cs.meta | 12
System/Chat/ChatPlayerOtherCell.cs | 2
System/AssetVersion/DownLoadWin.cs | 5
System/Role/RolePanel.cs | 9
System/FashionDress/FashionDressModel.cs.meta | 12
System/FairyAu/KingTempleWin.cs | 24
System/FashionDress/FashionDressModel.cs | 577 +++++++++++
System/FashionDress/FashionDressTypeBehaviour.cs.meta | 12
Core/NetworkPackage/ClientPack/ClientToMapServer/CA5_Function/CA50B_tagCMCoatUp.cs | 18
System/Chat/ChatPlayerMineCell.cs | 2
System/Rune/RuneMosaicWin.cs | 18
Core/GameEngine/DataToCtl/PackageRegedit.cs | 1
System/FashionDress/FashionDetailsWin.cs.meta | 12
System/FashionDress/FashionDecomposeLineBeh.cs.meta | 12
Core/NetworkPackage/ServerPack/HB1_Role/HB102_tagMCClothesCoatSkinState.cs | 33
System/FairyAu/FairyFeastTransmitShow.cs | 20
System/FashionDress/FashionAttrBeh.cs.meta | 12
System/GatheringSoul/GatheringSoulModel.cs | 12
System/FashionDress/FashionAttrBeh.cs | 85 +
System/Chat/ChatMineVoiceCell.cs | 2
System/Chat/ChatTip.cs | 10
System/FairyAu/FairyFeastModel.cs | 2
Core/GameEngine/Model/Config/FashionDressCabinetConfig.cs.meta | 12
System/FashionDress/FashiongDecomposeWin.cs.meta | 12
Core/NetworkPackage/ServerPack/HB1_Role/HB102_tagMCClothesCoatSkinState.cs.meta | 12
System/Login/ServerBehaviour.cs | 27
Core/NetworkPackage/DTCFile/ServerPack/HB1_Role/DTCB102_tagMCClothesCoatSkinState.cs.meta | 12
System/Dungeon/DungeonRealmVictoryWin.cs | 2
System/Role/GodWeaponPreviewWin.cs | 15
System/Realm/RealmBossShow.cs | 13
Core/NetworkPackage/ClientPack/ClientToMapServer/CA5_Function/CA520_tagCMCoatDecompose.cs.meta | 12
Core/GameEngine/Model/Config/GodWeaponEffectConfig.cs | 27
Utility/EnumHelper.cs | 3
UI/Common/UI3DHeroSkillShow.cs | 15
System/Chat/ChatCenter.cs | 4
System/FashionDress/FashionDressCell.cs.meta | 12
System/Compose/New/ComposeEquipWin.cs | 9
Utility/StageLoadTimeOutCatcher.cs | 67 +
Core/NetworkPackage/DTCFile/ServerPack/H01_System/DTC0109_tagServerPrepareOK.cs | 9
System/FashionDress/FashionDressQualityBehaviour.cs | 97 +
Core/GameEngine/Model/Config/FashionDressConfig.cs | 75 +
System/Chat/LocalChatHistory.cs | 16
Core/NetworkPackage/DTCFile/ServerPack/HB1_Role/DTCB102_tagMCClothesCoatSkinState.cs | 24
Core/NetworkPackage/DTCFile/ServerPack/HA1_Sys/DTCA127_tagMCStartChangeMap.cs | 3
System/FashionDress/FashionDressWin.cs.meta | 12
Core/NetworkPackage/ClientPack/ClientToMapServer/CA5_Function/CA50B_tagCMCoatUp.cs.meta | 12
Fight/Stage/StageManager.cs | 3
System/FashionDress/FashionDecomposeLineBeh.cs | 68 +
System/FashionDress/FashiongDecomposeWin.cs | 120 ++
Utility/UIHelper.cs | 2
Core/NetworkPackage/ClientPack/ClientToMapServer/CA5_Function/CA520_tagCMCoatDecompose.cs | 22
System/FashionDress/FashionDressTypeBehaviour.cs | 82 +
System/Chat/ChatOtherVoiceCell.cs | 2
System/FashionDress/FashionSumAttrWin.cs | 224 ++++
System/KnapSack/Logic/ItemTipsModel.cs | 4
Core/NetworkPackage/DTCFile/ServerPack/HA1_Sys/DTCA126_tagMCPrepareChangeMap.cs | 3
System/Login/CrossServerLogin.cs | 21
Core/GameEngine/Model/Config/GodWeaponEffectConfig.cs.meta | 2
Core/NetworkPackage/DTCFile/ServerPack/H01_System/DTC0102_tagCDBPlayer.cs | 5
Core/GameEngine/Model/Config/FashionDressConfig.cs.meta | 12
System/FashionDress.meta | 4
System/FashionDress/FashionDecomposeModel.cs | 135 ++
System/FashionDress/FashionDetailsWin.cs | 159 +++
System/RoleParticulars/RoleParticularsWin.cs | 24
UI/Core/ImageEx.cs | 6
Core/Editor/AssetBundleBrowser/AssetBundleBuildTab.cs | 21
System/FashionDress/FashionDressCell.cs | 158 +++
System/FashionDress/FashionDressWin.cs | 394 +++++++
System/FashionDress/FashionDressQualityBehaviour.cs.meta | 12
UI/Common/UI3DModelExhibition.cs | 111 +
System/WindowBase/ModelCenter.cs | 1
Core/GameEngine/Model/Config/FashionDressCabinetConfig.cs | 44
System/FashionDress/FashionDecomposeModel.cs.meta | 12
System/Rune/RuneModel.cs | 3
75 files changed, 2,906 insertions(+), 144 deletions(-)
diff --git a/Core/Editor/AssetBundleBrowser/AssetBundleBuildTab.cs b/Core/Editor/AssetBundleBrowser/AssetBundleBuildTab.cs
index b0cd43b..286eb17 100644
--- a/Core/Editor/AssetBundleBrowser/AssetBundleBuildTab.cs
+++ b/Core/Editor/AssetBundleBrowser/AssetBundleBuildTab.cs
@@ -100,6 +100,8 @@
};
int[] m_CompressionValues = { 0, 1, 2 };
+ int rechargeSkin = 1;
+ string createRoleLevel = "001";
public AssetBundleBuildTab()
{
@@ -414,6 +416,7 @@
EditorGUILayout.Space();
#endif
GUILayout.BeginHorizontal();
+
ClientPackage.AssetPrior = EditorGUILayout.IntField("AssetPrior", ClientPackage.AssetPrior, GUILayout.Height(50), GUILayout.Width(250));
publishers = EditorGUILayout.TextField("Publishers", publishers, GUILayout.Height(50));
GUILayout.EndHorizontal();
@@ -455,6 +458,24 @@
EditorApplication.delayCall += ExecuteSwitchVersionConfig;
}
+ GUILayout.Space(20);
+ GUILayout.BeginHorizontal();
+ rechargeSkin = EditorGUILayout.IntField("Recharge Skin", rechargeSkin, GUILayout.Width(250));
+ if (GUILayout.Button("Switch"))
+ {
+ UpdateSpriteSetting.SetRechargeSkin(rechargeSkin);
+ AssetDatabase.Refresh();
+ UpdateSpritePackingSetting.UpdateAllSpritePackingSetting();
+ }
+
+ createRoleLevel = EditorGUILayout.TextField("CreateRole Level", createRoleLevel, GUILayout.Width(250));
+ if (GUILayout.Button("Switch"))
+ {
+ UpdateLevelSetting.SetCreateRoleLevel(createRoleLevel);
+ AssetDatabase.Refresh();
+ }
+ GUILayout.EndHorizontal();
+
GUILayout.EndVertical();
EditorGUILayout.EndScrollView();
}
diff --git a/Core/GameEngine/DataToCtl/PackageRegedit.cs b/Core/GameEngine/DataToCtl/PackageRegedit.cs
index cb537ce..22045b5 100644
--- a/Core/GameEngine/DataToCtl/PackageRegedit.cs
+++ b/Core/GameEngine/DataToCtl/PackageRegedit.cs
@@ -31,6 +31,7 @@
public static void Init()
{
// 鐧昏鐩稿簲鐨勬暟鎹綋鍙婂搴旂殑鏁版嵁杞�昏緫绫�
+ Register(typeof(HB102_tagMCClothesCoatSkinState), typeof(DTCB102_tagMCClothesCoatSkinState));
Register(typeof(HC103_tagMCCrossRealmPKPlayerHisSeasonInfo), typeof(DTCC103_tagMCCrossRealmPKPlayerHisSeasonInfo));
Register(typeof(HA31E_tagMCGatherSoulHoleInfo), typeof(DTCA31E_tagMCGatherSoulHoleInfo));
Register(typeof(HAA1D_tagMCActTotalRechargeInfo), typeof(DTCAA1D_tagMCActTotalRechargeInfo));
diff --git a/Core/GameEngine/Model/Config/FashionDressCabinetConfig.cs b/Core/GameEngine/Model/Config/FashionDressCabinetConfig.cs
new file mode 100644
index 0000000..4dc1aa6
--- /dev/null
+++ b/Core/GameEngine/Model/Config/FashionDressCabinetConfig.cs
@@ -0,0 +1,44 @@
+锘�//--------------------------------------------------------
+// [Author]: 绗簩涓栫晫
+// [ Date ]: Tuesday, January 08, 2019
+//--------------------------------------------------------
+
+using UnityEngine;
+using System;
+
+namespace TableConfig {
+
+
+ public partial class FashionDressCabinetConfig : ConfigBase {
+
+ public int LV { get ; private set ; }
+ public int NeedExp { get ; private set ; }
+ public string Attr { get ; private set; }
+
+ public override string getKey()
+ {
+ return LV.ToString();
+ }
+
+ public override void Parse() {
+ try
+ {
+ LV=IsNumeric(rawContents[0]) ? int.Parse(rawContents[0]):0;
+
+ NeedExp=IsNumeric(rawContents[1]) ? int.Parse(rawContents[1]):0;
+
+ Attr = rawContents[2].Trim();
+ }
+ catch (Exception ex)
+ {
+ DebugEx.Log(ex);
+ }
+ }
+
+ }
+
+}
+
+
+
+
diff --git a/Core/GameEngine/Model/Config/FashionDressCabinetConfig.cs.meta b/Core/GameEngine/Model/Config/FashionDressCabinetConfig.cs.meta
new file mode 100644
index 0000000..5b575da
--- /dev/null
+++ b/Core/GameEngine/Model/Config/FashionDressCabinetConfig.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 28e71cfd492229640aecaf39e2a40093
+timeCreated: 1546913213
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Core/GameEngine/Model/Config/FashionDressConfig.cs b/Core/GameEngine/Model/Config/FashionDressConfig.cs
new file mode 100644
index 0000000..87767af
--- /dev/null
+++ b/Core/GameEngine/Model/Config/FashionDressConfig.cs
@@ -0,0 +1,75 @@
+锘�//--------------------------------------------------------
+// [Author]: 绗簩涓栫晫
+// [ Date ]: Tuesday, January 08, 2019
+//--------------------------------------------------------
+
+using UnityEngine;
+using System;
+
+namespace TableConfig {
+
+
+ public partial class FashionDressConfig : ConfigBase {
+
+ public int CoatID { get ; private set ; }
+ public string name { get ; private set; }
+ public int type { get ; private set ; }
+ public int quality { get ; private set ; }
+ public string getWay { get ; private set; }
+ public int[] EquipItemID;
+ public int UnlockItemID { get ; private set ; }
+ public int MaxLV { get ; private set ; }
+ public int[] CostItemCnt;
+ public string StarAttr { get ; private set; }
+
+ public override string getKey()
+ {
+ return CoatID.ToString();
+ }
+
+ public override void Parse() {
+ try
+ {
+ CoatID=IsNumeric(rawContents[0]) ? int.Parse(rawContents[0]):0;
+
+ name = rawContents[1].Trim();
+
+ type=IsNumeric(rawContents[2]) ? int.Parse(rawContents[2]):0;
+
+ quality=IsNumeric(rawContents[3]) ? int.Parse(rawContents[3]):0;
+
+ getWay = rawContents[4].Trim();
+
+ string[] EquipItemIDStringArray = rawContents[5].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
+ EquipItemID = new int[EquipItemIDStringArray.Length];
+ for (int i=0;i<EquipItemIDStringArray.Length;i++)
+ {
+ int.TryParse(EquipItemIDStringArray[i],out EquipItemID[i]);
+ }
+
+ UnlockItemID=IsNumeric(rawContents[6]) ? int.Parse(rawContents[6]):0;
+
+ MaxLV=IsNumeric(rawContents[7]) ? int.Parse(rawContents[7]):0;
+
+ string[] CostItemCntStringArray = rawContents[8].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
+ CostItemCnt = new int[CostItemCntStringArray.Length];
+ for (int i=0;i<CostItemCntStringArray.Length;i++)
+ {
+ int.TryParse(CostItemCntStringArray[i],out CostItemCnt[i]);
+ }
+
+ StarAttr = rawContents[9].Trim();
+ }
+ catch (Exception ex)
+ {
+ DebugEx.Log(ex);
+ }
+ }
+
+ }
+
+}
+
+
+
+
diff --git a/Core/GameEngine/Model/Config/FashionDressConfig.cs.meta b/Core/GameEngine/Model/Config/FashionDressConfig.cs.meta
new file mode 100644
index 0000000..0a5ebd9
--- /dev/null
+++ b/Core/GameEngine/Model/Config/FashionDressConfig.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 5ac2a701b6eaba844b1082c87758125e
+timeCreated: 1546945768
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Core/GameEngine/Model/Config/GodWeaponEffectConfig.cs b/Core/GameEngine/Model/Config/GodWeaponEffectConfig.cs
index 76fcfdf..6ec9ccb 100644
--- a/Core/GameEngine/Model/Config/GodWeaponEffectConfig.cs
+++ b/Core/GameEngine/Model/Config/GodWeaponEffectConfig.cs
@@ -19,9 +19,9 @@
public string attr { get ; private set; }
public string icon { get ; private set; }
public string skillName { get ; private set; }
- public Vector3 effectPosition { get ; private set; }
- public Vector3 effectAngles { get ; private set; }
- public Vector3 effectScale { get ; private set; }
+ public Vector3[] effectPosition;
+ public Vector3[] effectAngles;
+ public Vector3[] effectScale;
public override string getKey()
{
@@ -47,11 +47,26 @@
skillName = rawContents[7].Trim();
- effectPosition=rawContents[8].Vector3Parse();
+ string[] effectPositionStringArray = rawContents[8].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
+ effectPosition = new Vector3[effectPositionStringArray.Length];
+ for (int i=0;i<effectPositionStringArray.Length;i++)
+ {
+ effectPosition[i]=effectPositionStringArray[i].Vector3Parse();
+ }
- effectAngles=rawContents[9].Vector3Parse();
+ string[] effectAnglesStringArray = rawContents[9].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
+ effectAngles = new Vector3[effectAnglesStringArray.Length];
+ for (int i=0;i<effectAnglesStringArray.Length;i++)
+ {
+ effectAngles[i]=effectAnglesStringArray[i].Vector3Parse();
+ }
- effectScale=rawContents[10].Vector3Parse();
+ string[] effectScaleStringArray = rawContents[10].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
+ effectScale = new Vector3[effectScaleStringArray.Length];
+ for (int i=0;i<effectScaleStringArray.Length;i++)
+ {
+ effectScale[i]=effectScaleStringArray[i].Vector3Parse();
+ }
}
catch (Exception ex)
{
diff --git a/Core/GameEngine/Model/Config/GodWeaponEffectConfig.cs.meta b/Core/GameEngine/Model/Config/GodWeaponEffectConfig.cs.meta
index 6cf1376..6292b95 100644
--- a/Core/GameEngine/Model/Config/GodWeaponEffectConfig.cs.meta
+++ b/Core/GameEngine/Model/Config/GodWeaponEffectConfig.cs.meta
@@ -1,6 +1,6 @@
fileFormatVersion: 2
guid: c7a22e75f9a0eed49aed26e8171f8172
-timeCreated: 1546827021
+timeCreated: 1546866443
licenseType: Pro
MonoImporter:
serializedVersion: 2
diff --git a/Core/GameEngine/Model/ConfigManager.cs b/Core/GameEngine/Model/ConfigManager.cs
index 484b78b..7747878 100644
--- a/Core/GameEngine/Model/ConfigManager.cs
+++ b/Core/GameEngine/Model/ConfigManager.cs
@@ -219,6 +219,8 @@
AddAsyncTask<GatherSoulComposeConfig>();
AddAsyncTask<KingTreasureConfig>();
AddAsyncTask<KingTreasureItemConfig>();
+ AddAsyncTask<FashionDressConfig>();
+ AddAsyncTask<FashionDressCabinetConfig>();
while (!AllCompleted())
{
diff --git a/Core/NetworkPackage/ClientPack/ClientToMapServer/CA5_Function/CA50B_tagCMCoatUp.cs b/Core/NetworkPackage/ClientPack/ClientToMapServer/CA5_Function/CA50B_tagCMCoatUp.cs
new file mode 100644
index 0000000..edda48a
--- /dev/null
+++ b/Core/NetworkPackage/ClientPack/ClientToMapServer/CA5_Function/CA50B_tagCMCoatUp.cs
@@ -0,0 +1,18 @@
+using UnityEngine;
+using System.Collections;
+
+// A5 0B 玩家时装升级 #tagCMCoatUp
+
+public class CA50B_tagCMCoatUp : GameNetPackBasic {
+ public uint CoatIndex; // 时装索引
+
+ public CA50B_tagCMCoatUp () {
+ combineCmd = (ushort)0x03FE;
+ _cmd = (ushort)0xA50B;
+ }
+
+ public override void WriteToBytes () {
+ WriteBytes (CoatIndex, NetDataType.DWORD);
+ }
+
+}
diff --git a/Core/NetworkPackage/ClientPack/ClientToMapServer/CA5_Function/CA50B_tagCMCoatUp.cs.meta b/Core/NetworkPackage/ClientPack/ClientToMapServer/CA5_Function/CA50B_tagCMCoatUp.cs.meta
new file mode 100644
index 0000000..ce94525
--- /dev/null
+++ b/Core/NetworkPackage/ClientPack/ClientToMapServer/CA5_Function/CA50B_tagCMCoatUp.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 17ad6502064d0014b9ca6f5ba5e95a2c
+timeCreated: 1546938032
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Core/NetworkPackage/ClientPack/ClientToMapServer/CA5_Function/CA520_tagCMCoatDecompose.cs b/Core/NetworkPackage/ClientPack/ClientToMapServer/CA5_Function/CA520_tagCMCoatDecompose.cs
new file mode 100644
index 0000000..c28d8f3
--- /dev/null
+++ b/Core/NetworkPackage/ClientPack/ClientToMapServer/CA5_Function/CA520_tagCMCoatDecompose.cs
@@ -0,0 +1,22 @@
+using UnityEngine;
+using System.Collections;
+
+// A5 20 时装分解 #tagCMCoatDecompose
+
+public class CA520_tagCMCoatDecompose : GameNetPackBasic {
+ public byte Count; //材料所在背包索引的数量
+ public ushort[] IndexList; //材料所在背包索引列表
+ public uint[] ItemIDList; //材料所在背包物品ID列表
+
+ public CA520_tagCMCoatDecompose () {
+ combineCmd = (ushort)0x03FE;
+ _cmd = (ushort)0xA520;
+ }
+
+ public override void WriteToBytes () {
+ WriteBytes (Count, NetDataType.BYTE);
+ WriteBytes (IndexList, NetDataType.WORD, Count);
+ WriteBytes (ItemIDList, NetDataType.DWORD, Count);
+ }
+
+}
diff --git a/Core/NetworkPackage/ClientPack/ClientToMapServer/CA5_Function/CA520_tagCMCoatDecompose.cs.meta b/Core/NetworkPackage/ClientPack/ClientToMapServer/CA5_Function/CA520_tagCMCoatDecompose.cs.meta
new file mode 100644
index 0000000..9e315fa
--- /dev/null
+++ b/Core/NetworkPackage/ClientPack/ClientToMapServer/CA5_Function/CA520_tagCMCoatDecompose.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: e9f99f58f066c144b8d82dd0e54660c5
+timeCreated: 1546936247
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Core/NetworkPackage/DTCFile/ServerPack/H01_System/DTC0102_tagCDBPlayer.cs b/Core/NetworkPackage/DTCFile/ServerPack/H01_System/DTC0102_tagCDBPlayer.cs
index 7a5db31..ef85009 100644
--- a/Core/NetworkPackage/DTCFile/ServerPack/H01_System/DTC0102_tagCDBPlayer.cs
+++ b/Core/NetworkPackage/DTCFile/ServerPack/H01_System/DTC0102_tagCDBPlayer.cs
@@ -20,8 +20,7 @@
base.Done(vNetPack);
H0102_tagCDBPlayer vNetData = vNetPack as H0102_tagCDBPlayer;
- StageLoadTimeOutCatcher.got0102Time = DateTime.Now;
- StageLoadTimeOutCatcher.ReportChangeMapRecord(vNetPack.socketType, "0102", DateTime.Now);
+
DEBUG_0102 = true;
DTC0403_tagPlayerLoginLoadOK.finishedLogin = false;
@@ -242,6 +241,8 @@
StatusMgr.Instance.ReleaseActor(PlayerDatas.Instance.PlayerId);
GAMgr.Instance.UnInit();
DEBUG_STEP = 9;
+
+ StageLoadTimeOutCatcher.RecordProtocol(vNetPack.socketType, "0102", DateTime.Now);
}
}
diff --git a/Core/NetworkPackage/DTCFile/ServerPack/H01_System/DTC0109_tagServerPrepareOK.cs b/Core/NetworkPackage/DTCFile/ServerPack/H01_System/DTC0109_tagServerPrepareOK.cs
index 8c30522..809ab83 100644
--- a/Core/NetworkPackage/DTCFile/ServerPack/H01_System/DTC0109_tagServerPrepareOK.cs
+++ b/Core/NetworkPackage/DTCFile/ServerPack/H01_System/DTC0109_tagServerPrepareOK.cs
@@ -24,8 +24,7 @@
return;
}
- StageLoadTimeOutCatcher.got0109Time = DateTime.Now;
- StageLoadTimeOutCatcher.ReportChangeMapRecord(vNetData.socketType, "0109", DateTime.Now);
+ StageLoadTimeOutCatcher.RecordProtocol(vNetData.socketType, "0109", DateTime.Now);
//修改技能快捷设置发包顺序
PlayerDatas.Instance.skill.CheckQuickSet();
@@ -43,8 +42,7 @@
GameNetSystem.Instance.SendInfo(mapOk);
DTCA127_tagMCStartChangeMap.isChangeLine = false;
- StageLoadTimeOutCatcher.send0107Time = DateTime.Now;
- StageLoadTimeOutCatcher.ReportChangeMapRecord(GameNetSystem.SocketType.Main, "0107", DateTime.Now);
+ StageLoadTimeOutCatcher.RecordProtocol(GameNetSystem.SocketType.Main, "0107", DateTime.Now);
}
break;
case GameNetSystem.SocketType.CrossSever:
@@ -55,8 +53,7 @@
mapOk.Type = 0;
GameNetSystem.Instance.SendToCrossServer(mapOk);
- StageLoadTimeOutCatcher.send0107Time = DateTime.Now;
- StageLoadTimeOutCatcher.ReportChangeMapRecord(GameNetSystem.SocketType.CrossSever, "0107", DateTime.Now);
+ StageLoadTimeOutCatcher.RecordProtocol(GameNetSystem.SocketType.CrossSever, "0107", DateTime.Now);
}
break;
default:
diff --git a/Core/NetworkPackage/DTCFile/ServerPack/HA1_Sys/DTCA126_tagMCPrepareChangeMap.cs b/Core/NetworkPackage/DTCFile/ServerPack/HA1_Sys/DTCA126_tagMCPrepareChangeMap.cs
index f94abdf..5cb2ca7 100644
--- a/Core/NetworkPackage/DTCFile/ServerPack/HA1_Sys/DTCA126_tagMCPrepareChangeMap.cs
+++ b/Core/NetworkPackage/DTCFile/ServerPack/HA1_Sys/DTCA126_tagMCPrepareChangeMap.cs
@@ -21,8 +21,7 @@
return;
}
- StageLoadTimeOutCatcher.gotA126Time = DateTime.Now;
- StageLoadTimeOutCatcher.ReportChangeMapRecord(package.socketType, "A126", DateTime.Now);
+ StageLoadTimeOutCatcher.RecordProtocol(package.socketType, "A126", DateTime.Now);
#if UNITY_EDITOR
string _content = string.Format("DTCA126_tagMCPrepareChangeMap => 鍑嗗鍒囨崲鍦板浘");
diff --git a/Core/NetworkPackage/DTCFile/ServerPack/HA1_Sys/DTCA127_tagMCStartChangeMap.cs b/Core/NetworkPackage/DTCFile/ServerPack/HA1_Sys/DTCA127_tagMCStartChangeMap.cs
index d1874b5..7e0f0b6 100644
--- a/Core/NetworkPackage/DTCFile/ServerPack/HA1_Sys/DTCA127_tagMCStartChangeMap.cs
+++ b/Core/NetworkPackage/DTCFile/ServerPack/HA1_Sys/DTCA127_tagMCStartChangeMap.cs
@@ -49,8 +49,7 @@
DEBUG_A127 = true;
var package = vNetPack as HA127_tagMCStartChangeMap;
- StageLoadTimeOutCatcher.gotA127Time = DateTime.Now;
- StageLoadTimeOutCatcher.ReportChangeMapRecord(package.socketType, "A127", DateTime.Now);
+ StageLoadTimeOutCatcher.RecordProtocol(package.socketType, "A127", DateTime.Now);
DEBUG_STEP = 0;
diff --git a/Core/NetworkPackage/DTCFile/ServerPack/HB1_Role/DTCB102_tagMCClothesCoatSkinState.cs b/Core/NetworkPackage/DTCFile/ServerPack/HB1_Role/DTCB102_tagMCClothesCoatSkinState.cs
new file mode 100644
index 0000000..b17146d
--- /dev/null
+++ b/Core/NetworkPackage/DTCFile/ServerPack/HB1_Role/DTCB102_tagMCClothesCoatSkinState.cs
@@ -0,0 +1,24 @@
+锘�//--------------------------------------------------------
+// [Author]: 绗簩涓栫晫
+// [ Date ]: Tuesday, January 08, 2019
+//--------------------------------------------------------
+
+using Snxxz.UI;
+using System;
+using System.Collections;
+using System.Collections.Generic;
+
+public class DTCB102_tagMCClothesCoatSkinState : DtcBasic {
+
+ public override void Done(GameNetPackBasic vNetPack)
+ {
+ base.Done(vNetPack);
+ var package = vNetPack as HB102_tagMCClothesCoatSkinState;
+ ModelCenter.Instance.GetModel<FashionDressModel>().ReceivePackage(package);
+ }
+
+}
+
+
+
+
diff --git a/Core/NetworkPackage/DTCFile/ServerPack/HB1_Role/DTCB102_tagMCClothesCoatSkinState.cs.meta b/Core/NetworkPackage/DTCFile/ServerPack/HB1_Role/DTCB102_tagMCClothesCoatSkinState.cs.meta
new file mode 100644
index 0000000..19ae3d2
--- /dev/null
+++ b/Core/NetworkPackage/DTCFile/ServerPack/HB1_Role/DTCB102_tagMCClothesCoatSkinState.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 492fb693405473b41acea24913462db6
+timeCreated: 1546938241
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Core/NetworkPackage/ServerPack/HB1_Role/HB102_tagMCClothesCoatSkinState.cs b/Core/NetworkPackage/ServerPack/HB1_Role/HB102_tagMCClothesCoatSkinState.cs
new file mode 100644
index 0000000..17eac06
--- /dev/null
+++ b/Core/NetworkPackage/ServerPack/HB1_Role/HB102_tagMCClothesCoatSkinState.cs
@@ -0,0 +1,33 @@
+using UnityEngine;
+using System.Collections;
+
+// B1 02 玩家时装皮肤激活状态 #tagMCClothesCoatSkinState
+
+public class HB102_tagMCClothesCoatSkinState : GameNetPackBasic {
+ public uint CoatChestLV; //时装柜等级
+ public uint CoatChestExp; //时装柜经验
+ public ushort CoatNum; //时装个数
+ public tagMCClothesCoatLVInfo[] CoatInfoList; // 时装数据列表
+
+ public HB102_tagMCClothesCoatSkinState () {
+ _cmd = (ushort)0xB102;
+ }
+
+ public override void ReadFromBytes (byte[] vBytes) {
+ TransBytes (out CoatChestLV, vBytes, NetDataType.DWORD);
+ TransBytes (out CoatChestExp, vBytes, NetDataType.DWORD);
+ TransBytes (out CoatNum, vBytes, NetDataType.WORD);
+ CoatInfoList = new tagMCClothesCoatLVInfo[CoatNum];
+ for (int i = 0; i < CoatNum; i ++) {
+ CoatInfoList[i] = new tagMCClothesCoatLVInfo();
+ TransBytes (out CoatInfoList[i].CoatIndex, vBytes, NetDataType.DWORD);
+ TransBytes (out CoatInfoList[i].CoatLV, vBytes, NetDataType.BYTE);
+ }
+ }
+
+ public struct tagMCClothesCoatLVInfo {
+ public uint CoatIndex; //时装索引
+ public byte CoatLV; //时装等级
+ }
+
+}
diff --git a/Core/NetworkPackage/ServerPack/HB1_Role/HB102_tagMCClothesCoatSkinState.cs.meta b/Core/NetworkPackage/ServerPack/HB1_Role/HB102_tagMCClothesCoatSkinState.cs.meta
new file mode 100644
index 0000000..0ca932a
--- /dev/null
+++ b/Core/NetworkPackage/ServerPack/HB1_Role/HB102_tagMCClothesCoatSkinState.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 311be06de3a564b48951786c28d5bb27
+timeCreated: 1546938210
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Fight/Stage/StageManager.cs b/Fight/Stage/StageManager.cs
index b4ba073..6bc13f0 100644
--- a/Fight/Stage/StageManager.cs
+++ b/Fight/Stage/StageManager.cs
@@ -348,8 +348,7 @@
{
if (!isClientChangeMap)
{
- StageLoadTimeOutCatcher.send0107Time = DateTime.Now;
- StageLoadTimeOutCatcher.ReportChangeMapRecord(this.socketType, "0107", DateTime.Now);
+ StageLoadTimeOutCatcher.RecordProtocol(this.socketType, "0107", DateTime.Now);
var mapOk = new C0107_tagCInitMapOK();
mapOk.MapID = PlayerDatas.Instance.baseData.MapID;
diff --git a/System/AssetVersion/DownLoadWin.cs b/System/AssetVersion/DownLoadWin.cs
index b8fc83b..2dca777 100644
--- a/System/AssetVersion/DownLoadWin.cs
+++ b/System/AssetVersion/DownLoadWin.cs
@@ -39,6 +39,11 @@
protected override void OnPreOpen()
{
timer = 1f;
+ if (Application.internetReachability == NetworkReachability.ReachableViaLocalAreaNetwork)
+ {
+ DownLoadAndDiscompressTask.Instance.StartDownLoad();
+ }
+
OnDownLoadStepChange(DownLoadAndDiscompressTask.Instance.step);
}
diff --git a/System/Chat/ChatCenter.cs b/System/Chat/ChatCenter.cs
index 2107389..6a12ace 100644
--- a/System/Chat/ChatCenter.cs
+++ b/System/Chat/ChatCenter.cs
@@ -79,6 +79,10 @@
if (config != null)
{
LocalChatHistory.localSaveCount = int.Parse(config.Numerical1);
+ if (!string.IsNullOrEmpty(config.Numerical2))
+ {
+ LocalChatHistory.localChatKeepHour = int.Parse(config.Numerical2);
+ }
}
}
diff --git a/System/Chat/ChatMineVoiceCell.cs b/System/Chat/ChatMineVoiceCell.cs
index 3665dcb..4128846 100644
--- a/System/Chat/ChatMineVoiceCell.cs
+++ b/System/Chat/ChatMineVoiceCell.cs
@@ -40,7 +40,7 @@
m_ChatTime.text = _data.createTime.ToString("yyyy-MM-dd HH:mm");
if (_data.vipLv > 0)
{
- m_VipLevel.text = string.Format("V{0}", _data.vipLv);
+ m_VipLevel.text = "Vip";//string.Format("V{0}", _data.vipLv);
}
else
{
diff --git a/System/Chat/ChatOtherVoiceCell.cs b/System/Chat/ChatOtherVoiceCell.cs
index 1ed2778..69c18d2 100644
--- a/System/Chat/ChatOtherVoiceCell.cs
+++ b/System/Chat/ChatOtherVoiceCell.cs
@@ -45,7 +45,7 @@
m_ChatTime.text = _data.createTime.ToString("yyyy-MM-dd HH:mm");
if (_data.vipLv > 0)
{
- m_VipLevel.text = string.Format("V{0}", _data.vipLv);
+ m_VipLevel.text = "Vip";//string.Format("V{0}", _data.vipLv);
}
else
{
diff --git a/System/Chat/ChatPlayerMineCell.cs b/System/Chat/ChatPlayerMineCell.cs
index 76db5c6..e1e5bf8 100644
--- a/System/Chat/ChatPlayerMineCell.cs
+++ b/System/Chat/ChatPlayerMineCell.cs
@@ -45,7 +45,7 @@
m_ChatTime.text = data.createTime.ToString("yyyy-MM-dd HH:mm");
if (chatUserData.vipLv > 0)
{
- m_VipLv.text = string.Format("V{0}", chatUserData.vipLv);
+ m_VipLv.text = "Vip";//string.Format("V{0}", chatUserData.vipLv);
}
else
{
diff --git a/System/Chat/ChatPlayerOtherCell.cs b/System/Chat/ChatPlayerOtherCell.cs
index e74ff91..aa929c1 100644
--- a/System/Chat/ChatPlayerOtherCell.cs
+++ b/System/Chat/ChatPlayerOtherCell.cs
@@ -43,7 +43,7 @@
m_ChatTime.text = data.createTime.ToString("yyyy-MM-dd HH:mm");
if (chatUserData.vipLv > 0)
{
- m_VipLv.text = string.Format("V{0}", chatUserData.vipLv);
+ m_VipLv.text = "Vip";//string.Format("V{0}", chatUserData.vipLv);
}
else
{
diff --git a/System/Chat/ChatTip.cs b/System/Chat/ChatTip.cs
index 096e3a1..5d6e1fb 100644
--- a/System/Chat/ChatTip.cs
+++ b/System/Chat/ChatTip.cs
@@ -273,7 +273,7 @@
chatName = chatUserData.name;
if (chatUserData.vipLv > 0)
{
- vipLv = StringUtility.Contact("V", chatUserData.vipLv);
+ vipLv = "Vip";//StringUtility.Contact("V", chatUserData.vipLv);
}
break;
}
@@ -283,7 +283,7 @@
chatName = chatUserData.name;
if (chatUserData.vipLv > 0)
{
- vipLv = StringUtility.Contact("V", chatUserData.vipLv);
+ vipLv = "Vip";// StringUtility.Contact("V", chatUserData.vipLv);
}
break;
}
@@ -293,7 +293,7 @@
chatName = chatUserData.name;
if (chatUserData.vipLv > 0)
{
- vipLv = StringUtility.Contact("V", chatUserData.vipLv);
+ vipLv = "Vip";// StringUtility.Contact("V", chatUserData.vipLv);
}
break;
}
@@ -303,7 +303,7 @@
chatName = chatUserData.name;
if (chatUserData.vipLv > 0)
{
- vipLv = StringUtility.Contact("V", chatUserData.vipLv);
+ vipLv = "Vip";// StringUtility.Contact("V", chatUserData.vipLv);
}
break;
}
@@ -313,7 +313,7 @@
chatName = chatUserData.name;
if (chatUserData.vipLv > 0)
{
- vipLv = StringUtility.Contact("V", chatUserData.vipLv);
+ vipLv = "Vip";// StringUtility.Contact("V", chatUserData.vipLv);
}
break;
}
diff --git a/System/Chat/LocalChatHistory.cs b/System/Chat/LocalChatHistory.cs
index b29ee46..2f1b75d 100644
--- a/System/Chat/LocalChatHistory.cs
+++ b/System/Chat/LocalChatHistory.cs
@@ -15,6 +15,7 @@
const string fileName = "ChatHistory";
public static int localSaveCount = 50;
+ public static int localChatKeepHour = 48;
static StringBuilder sb = new StringBuilder();
@@ -202,6 +203,11 @@
case ChatInfoType.Fairy:
{
LocalChat localChat = LitJson.JsonMapper.ToObject<LocalChat>(line);
+ var ts = DateTime.Now - localChat.time;
+ if (ts.TotalHours >= localChatKeepHour)
+ {
+ continue;
+ }
if (type == ChatInfoType.World)
{
chat = new ChatWorldData(localChat.content, localChat.player, localChat.name, localChat.extra);
@@ -224,6 +230,11 @@
case ChatInfoType.Trumpet:
{
LocalTrumpetChat localChat = LitJson.JsonMapper.ToObject<LocalTrumpetChat>(line);
+ var ts = DateTime.Now - localChat.time;
+ if (ts.TotalHours >= localChatKeepHour)
+ {
+ continue;
+ }
chat = new ChatTrumpetData(localChat.content, localChat.player, localChat.name,
localChat.extra, localChat.speakType, localChat.accId);
chat.createTime = localChat.time;
@@ -232,6 +243,11 @@
case ChatInfoType.Friend:
{
LocalFriendChat localChat = LitJson.JsonMapper.ToObject<LocalFriendChat>(line);
+ var ts = DateTime.Now - localChat.time;
+ if (ts.TotalHours >= localChatKeepHour)
+ {
+ continue;
+ }
chat = new ChatFriendData(localChat.content, localChat.player, localChat.name,
localChat.extra, localChat.toName, localChat.talkType, (uint)localChat.toPlayer);
chat.createTime = localChat.time;
diff --git a/System/Compose/New/ComposeEquipWin.cs b/System/Compose/New/ComposeEquipWin.cs
index ae6aa15..6456d21 100644
--- a/System/Compose/New/ComposeEquipWin.cs
+++ b/System/Compose/New/ComposeEquipWin.cs
@@ -708,7 +708,14 @@
switch((RoleEquipType)itemConfig.EquipPlace)
{
case RoleEquipType.retSpiritAnimal:
- WindowCenter.Instance.Open<GuardComposeConfirmWin>();
+ if (!composeWinModel.IsEnoughUnfixedMat(compoundModel))
+ {
+ MessageWin.Inst.ShowFixedTip(Language.Get("Compose101"));
+ }
+ else
+ {
+ WindowCenter.Instance.Open<GuardComposeConfirmWin>();
+ }
break;
default:
SetFixedItemIndexDic();
diff --git a/System/Dungeon/DungeonRealmVictoryWin.cs b/System/Dungeon/DungeonRealmVictoryWin.cs
index 4c46522..68e349c 100644
--- a/System/Dungeon/DungeonRealmVictoryWin.cs
+++ b/System/Dungeon/DungeonRealmVictoryWin.cs
@@ -69,7 +69,7 @@
if (nextCfg != null)
{
m_RealmProperties[1].gameObject.SetActive(true);
- m_RealmProperties[1].Display(_realmLv + 1);
+ m_RealmProperties[1].Display(_realmLv + 1, false);
m_NextRealmIcon.gameObject.SetActive(true);
m_NextRealmIcon.SetSprite(nextCfg.Img);
m_NextRealmIcon.SetNativeSize();
diff --git a/System/FairyAu/FairyFeastModel.cs b/System/FairyAu/FairyFeastModel.cs
index 8c1c716..5f88beb 100644
--- a/System/FairyAu/FairyFeastModel.cs
+++ b/System/FairyAu/FairyFeastModel.cs
@@ -168,7 +168,7 @@
}
if (!fairyFeastPlayers.Contains(fairyMember.PlayerID))
{
- SysNotifyMgr.Instance.ShowTip("FairyFeastPlayerFarfrom");
+ SysNotifyMgr.Instance.ShowTip("PartySitFail");
return;
}
transmitPlayer = fairyMember.PlayerID;
diff --git a/System/FairyAu/FairyFeastTransmitShow.cs b/System/FairyAu/FairyFeastTransmitShow.cs
index 3d9cb24..93e54d1 100644
--- a/System/FairyAu/FairyFeastTransmitShow.cs
+++ b/System/FairyAu/FairyFeastTransmitShow.cs
@@ -210,6 +210,12 @@
var secondary = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retWeapon2);
var secondaryId = secondary == null ? 0 : (int)secondary.itemInfo.ItemID;
+ var fashionClothes = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retFashionClothes);
+ var fashionClothesId = fashionClothes == null ? 0 : (int)fashionClothes.itemInfo.ItemID;
+
+ var fashionSecondary = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retFashionWeapon2);
+ var fashionSecondaryId = fashionSecondary == null ? 0 : (int)fashionSecondary.itemInfo.ItemID;
+
var magicianModel = ModelCenter.Instance.GetModel<MagicianModel>();
var godWeapon1 = magicianModel.GetGodWeaponInfo(1);
var godWeapon2 = magicianModel.GetGodWeaponInfo(2);
@@ -218,11 +224,11 @@
var data = new UI3DPlayerExhibitionData
{
job = PlayerDatas.Instance.baseData.Job,
- clothesId = clothesId,
+ clothesId = fashionClothesId > 0 ? fashionClothesId : clothesId,
suitLevel = 0,
weaponId = 0,
wingsId = wingsId,
- secondaryId = secondaryId,
+ secondaryId = fashionSecondaryId > 0 ? fashionSecondaryId : secondaryId,
isDialogue = false,
godWeapons = null
};
@@ -244,6 +250,11 @@
{
clothesId = itemData.ItemID;
}
+ itemData = roleParticularModel.GetItemData(RoleEquipType.retFashionClothes);
+ if (itemData != null)
+ {
+ clothesId = itemData.ItemID;
+ }
wingsId = 0;
itemData = roleParticularModel.GetItemData(RoleEquipType.retWing);
if (itemData != null)
@@ -256,6 +267,11 @@
{
secondaryId = itemData.ItemID;
}
+ itemData = roleParticularModel.GetItemData(RoleEquipType.retFashionWeapon2);
+ if (itemData != null)
+ {
+ secondaryId = itemData.ItemID;
+ }
data = new UI3DPlayerExhibitionData
{
diff --git a/System/FairyAu/KingTempleWin.cs b/System/FairyAu/KingTempleWin.cs
index 5b685b2..f7387a2 100644
--- a/System/FairyAu/KingTempleWin.cs
+++ b/System/FairyAu/KingTempleWin.cs
@@ -181,6 +181,24 @@
itemData = _leaderData.roleEquipDataDic[RoleEquipType.retWeapon2];
weapon2 = itemData.ItemID;
}
+ int fashionClothes = 0;
+ if (_leaderData.roleEquipDataDic.ContainsKey(RoleEquipType.retFashionClothes))
+ {
+ itemData = _leaderData.roleEquipDataDic[RoleEquipType.retFashionClothes];
+ fashionClothes = itemData.ItemID;
+ }
+ int fashionWeapon = 0;
+ if (_leaderData.roleEquipDataDic.ContainsKey(RoleEquipType.retFashionWeapon))
+ {
+ itemData = _leaderData.roleEquipDataDic[RoleEquipType.retFashionWeapon];
+ fashionWeapon = itemData.ItemID;
+ }
+ int fashionWeapon2 = 0;
+ if (_leaderData.roleEquipDataDic.ContainsKey(RoleEquipType.retFashionWeapon2))
+ {
+ itemData = _leaderData.roleEquipDataDic[RoleEquipType.retFashionWeapon2];
+ fashionWeapon2 = itemData.ItemID;
+ }
var godWeapons = new Dictionary<int, int>();
var magicianModel = ModelCenter.Instance.GetModel<MagicianModel>();
@@ -197,11 +215,11 @@
var data = new UI3DPlayerExhibitionData
{
job = _leaderData.rolePropData.Job,
- clothesId = clothes,
+ clothesId = fashionClothes > 0 ? fashionClothes : clothes,
suitLevel = _suitEffect,
- weaponId = weapon,
+ weaponId = fashionWeapon > 0 ? fashionWeapon : weapon,
wingsId = wing,
- secondaryId = weapon2,
+ secondaryId = fashionWeapon2 > 0 ? fashionWeapon2 : weapon2,
godWeapons = godWeapons,
isDialogue = false,
};
diff --git a/Lua/Gen/Resources.meta b/System/FashionDress.meta
similarity index 66%
rename from Lua/Gen/Resources.meta
rename to System/FashionDress.meta
index 5b26f40..09420ef 100644
--- a/Lua/Gen/Resources.meta
+++ b/System/FashionDress.meta
@@ -1,7 +1,7 @@
fileFormatVersion: 2
-guid: a545fb3dcf719304fa74180c10219375
+guid: 87ce498b66c90b94ca39c71f74f9b161
folderAsset: yes
-timeCreated: 1542357825
+timeCreated: 1546830607
licenseType: Pro
DefaultImporter:
userData:
diff --git a/System/FashionDress/FashionAttrBeh.cs b/System/FashionDress/FashionAttrBeh.cs
new file mode 100644
index 0000000..0d45d47
--- /dev/null
+++ b/System/FashionDress/FashionAttrBeh.cs
@@ -0,0 +1,85 @@
+锘縰sing System.Collections.Generic;
+using UnityEngine;
+using UnityEngine.UI;
+using TableConfig;
+using System.Linq;
+
+namespace Snxxz.UI
+{
+ [XLua.Hotfix]
+ public class FashionAttrBeh : MonoBehaviour
+ {
+ [SerializeField] Text titleText;
+ [SerializeField] Text starDesText;
+ [SerializeField] List<Text> attrlist = new List<Text>();
+
+ ItemTipsModel tipsModel { get { return ModelCenter.Instance.GetModel<ItemTipsModel>(); } }
+ FashionDressModel fashionModel { get { return ModelCenter.Instance.GetModel<FashionDressModel>(); } }
+
+ public void SetDisplay(int star,int curStar)
+ {
+ int curFashionId = fashionModel.viewFashionDressId;
+ FashionDress fashionDress = null;
+ fashionModel.TryGetFashionDress(curFashionId,out fashionDress);
+ int minStar = 1;
+ int maxStar = fashionDress.maxLevel;
+
+ if(star == curStar
+ && curStar < maxStar)
+ {
+ titleText.text = Language.Get("FashionDress101",maxStar);
+ }
+ else if(star == curStar
+ && curStar >= maxStar)
+ {
+ titleText.text = Language.Get("FashionDress105");
+ }
+ else
+ {
+ titleText.text = Language.Get("FashionDress102",star);
+ }
+
+ if (star == curStar)
+ {
+ starDesText.text = Language.Get("FashionDress103",star);
+ }
+ else
+ {
+ starDesText.text = Language.Get("FashionDress104",star);
+ }
+
+ Dictionary<int, int> attrDict = null;
+ fashionModel.TryGetFashionDressProperty(curFashionId,star,out attrDict);
+ if(attrDict != null)
+ {
+ List<int> attrIds = attrDict.Keys.ToList();
+ for (int i = 0; i < attrlist.Count; i++)
+ {
+ var attrText = attrlist[i];
+ if (i < attrIds.Count)
+ {
+ attrText.gameObject.SetActive(true);
+ int attrId = attrIds[i];
+ int attrValue = attrDict[attrId];
+ var attrConfig = Config.Instance.Get<PlayerPropertyConfig>(attrId);
+ string attrSB = string.Empty;
+ if (attrConfig.Name.Contains("%s"))
+ {
+ attrSB = attrConfig.Name.Replace("%s", tipsModel.GetProValueTypeStr(attrConfig, attrValue));
+ }
+ else
+ {
+ attrSB = StringUtility.Contact(attrConfig.Name, "+", tipsModel.GetProValueTypeStr(attrConfig, attrValue));
+ }
+ attrText.text = attrSB;
+ }
+ else
+ {
+ attrText.gameObject.SetActive(false);
+ }
+ }
+ }
+ }
+
+ }
+}
diff --git a/System/FashionDress/FashionAttrBeh.cs.meta b/System/FashionDress/FashionAttrBeh.cs.meta
new file mode 100644
index 0000000..09ad750
--- /dev/null
+++ b/System/FashionDress/FashionAttrBeh.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: b55bd88d7eff9ea4a813eb57ec06698d
+timeCreated: 1546831641
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/System/FashionDress/FashionDecomposeLineBeh.cs b/System/FashionDress/FashionDecomposeLineBeh.cs
new file mode 100644
index 0000000..deef882
--- /dev/null
+++ b/System/FashionDress/FashionDecomposeLineBeh.cs
@@ -0,0 +1,68 @@
+锘縰sing System;
+using UnityEngine;
+using UnityEngine.UI;
+using EnhancedUI.EnhancedScroller;
+using System.Collections.Generic;
+
+namespace Snxxz.UI
+{
+ [XLua.Hotfix]
+ public class FashionDecomposeLineBeh : ScrollerUI
+ {
+ [SerializeField] List<DecomposeItemBeh> itemBehs = new List<DecomposeItemBeh>();
+
+ public override void Refresh(CellView cell)
+ {
+ var decomposeModel = FashionDecomposeModel.Instance;
+ var decomposeGuids = decomposeModel.decomposeItemGuids;
+ int length = itemBehs.Count;
+ for(int i = 0; i < length; i++)
+ {
+ var itemBeh = itemBehs[i];
+ int index = cell.index*length + i;
+ if(decomposeGuids != null
+ && index < decomposeGuids.Count)
+ {
+ var guid = decomposeGuids[index];
+ FashionDecomposeModel.DecomposeItem decomposeItem = null;
+ decomposeModel.TryGetDecomposeItem(guid,out decomposeItem);
+ itemBeh.SetDisplay(decomposeItem.itemModel,decomposeItem.isSelect);
+ }
+ else
+ {
+ itemBeh.SetDisplay(null);
+ }
+
+ }
+ }
+
+ [Serializable]
+ public class DecomposeItemBeh
+ {
+ [SerializeField] CommonItemBaisc itemBaisc;
+ [SerializeField] GameObject selectObj;
+
+ public void SetDisplay(ItemModel itemModel,bool _isSelect = false)
+ {
+ if (itemModel == null)
+ {
+ itemBaisc.gameObject.SetActive(false);
+ selectObj.SetActive(false);
+ }
+ else
+ {
+ itemBaisc.gameObject.SetActive(true);
+ selectObj.SetActive(_isSelect);
+ var decomposeModel = FashionDecomposeModel.Instance;
+ itemBaisc.Init(itemModel);
+ itemBaisc.cellBtn.RemoveAllListeners();
+ itemBaisc.cellBtn.AddListener(()=>
+ {
+ decomposeModel.UpdateDecomposeItem(itemModel.itemInfo.ItemGUID, !selectObj.activeInHierarchy);
+ selectObj.SetActive(!selectObj.activeInHierarchy);
+ });
+ }
+ }
+ }
+ }
+}
diff --git a/System/FashionDress/FashionDecomposeLineBeh.cs.meta b/System/FashionDress/FashionDecomposeLineBeh.cs.meta
new file mode 100644
index 0000000..9b61a95
--- /dev/null
+++ b/System/FashionDress/FashionDecomposeLineBeh.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 2bb54ddc8495e9540847635bd28036b3
+timeCreated: 1546930677
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/System/FashionDress/FashionDecomposeModel.cs b/System/FashionDress/FashionDecomposeModel.cs
new file mode 100644
index 0000000..89c283e
--- /dev/null
+++ b/System/FashionDress/FashionDecomposeModel.cs
@@ -0,0 +1,135 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace Snxxz.UI
+{
+ [XLua.LuaCallCSharp]
+ [XLua.Hotfix]
+ public class FashionDecomposeModel : Singleton<FashionDecomposeModel>
+ {
+ FashionDressModel model
+ {
+ get { return ModelCenter.Instance.GetModel<FashionDressModel>(); }
+ }
+ PlayerPackModel playerPack { get { return ModelCenter.Instance.GetModel<PlayerPackModel>(); } }
+ public Dictionary<string, DecomposeItem> decomposeItemDict = new Dictionary<string, DecomposeItem>();
+ public List<string> decomposeItemGuids { get; private set; }
+ public event Action UpdateDecomposeExpEvent;
+ List<int> fashionMatIds = new List<int>();
+
+ public void GetDecomposeItem()
+ {
+ decomposeItemGuids = null;
+ decomposeItemDict.Clear();
+ SinglePackModel singlePack = playerPack.GetSinglePackModel(PackType.rptItem);
+ if (singlePack == null) return;
+
+ fashionMatIds.Clear();
+ model.TryGetSatisfyResolves(ref fashionMatIds);
+ foreach(var matId in fashionMatIds)
+ {
+ List<ItemModel> itemModels = null;
+ singlePack.GetItemCountByID(matId, out itemModels);
+ if (itemModels != null)
+ {
+ foreach (var model in itemModels)
+ {
+ var decomposeItem = new DecomposeItem();
+ decomposeItem.SetModel(model);
+ decomposeItemDict.Add(decomposeItem.guid, decomposeItem);
+ }
+ }
+ }
+ decomposeItemGuids = decomposeItemDict.Keys.ToList();
+ }
+
+ public void UpdateDecomposeItem(string guid, bool _isSelect)
+ {
+ DecomposeItem decomposeItem = null;
+ bool isItem = TryGetDecomposeItem(guid, out decomposeItem);
+ if (isItem)
+ {
+ decomposeItem.SetIsSelect(_isSelect);
+ if(UpdateDecomposeExpEvent != null)
+ {
+ UpdateDecomposeExpEvent();
+ }
+ }
+ }
+
+ public bool TryGetDecomposeItem(string guid,out DecomposeItem decomposeItem)
+ {
+ return decomposeItemDict.TryGetValue(guid,out decomposeItem);
+ }
+
+ public int GetSumDecomposeExp()
+ {
+ int sumExp = 0;
+ foreach(var guid in decomposeItemDict.Keys)
+ {
+ var decomposeItem = decomposeItemDict[guid];
+ if(decomposeItem.isSelect)
+ {
+ sumExp += decomposeItem.decomposeExp;
+ }
+ }
+ return sumExp;
+ }
+
+ public void GetSelectItemlist(out List<ushort> indexs,out List<uint> ids)
+ {
+ indexs = new List<ushort>();
+ ids = new List<uint>();
+ foreach(var item in decomposeItemDict.Values)
+ {
+ if(item.isSelect)
+ {
+ indexs.Add((ushort)item.itemModel.itemInfo.ItemPlace);
+ ids.Add((uint)item.itemModel.itemId);
+ }
+ }
+ }
+
+ public void SendDecomposeFashion()
+ {
+ List<ushort> indexs = null;
+ List<uint> ids = null;
+ GetSelectItemlist(out indexs,out ids);
+ CA520_tagCMCoatDecompose coatDecompose = new CA520_tagCMCoatDecompose();
+ coatDecompose.Count = (byte)indexs.Count;
+ coatDecompose.IndexList = indexs.ToArray();
+ coatDecompose.ItemIDList = ids.ToArray();
+ GameNetSystem.Instance.SendInfo(coatDecompose);
+ }
+
+ public class DecomposeItem
+ {
+ public string guid { get; private set; }
+ public bool isSelect { get; private set; }
+ public ItemModel itemModel { get; private set; }
+ public int decomposeExp { get; private set; }
+
+ public void SetModel(ItemModel _model)
+ {
+ guid = _model.itemInfo.ItemGUID;
+ isSelect = true;
+ itemModel = _model;
+ if(itemModel.chinItemModel.Effect1 == 243)
+ {
+ decomposeExp = itemModel.chinItemModel.EffectValueB1 * itemModel.itemInfo.ItemCount;
+ }
+ else
+ {
+ decomposeExp = 0;
+ }
+ }
+
+ public void SetIsSelect(bool _isSelect)
+ {
+ isSelect = _isSelect;
+ }
+ }
+ }
+}
diff --git a/System/FashionDress/FashionDecomposeModel.cs.meta b/System/FashionDress/FashionDecomposeModel.cs.meta
new file mode 100644
index 0000000..c5736a4
--- /dev/null
+++ b/System/FashionDress/FashionDecomposeModel.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: d6722779fa42a274687159f4e8cf8270
+timeCreated: 1546932457
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/System/FashionDress/FashionDetailsWin.cs b/System/FashionDress/FashionDetailsWin.cs
new file mode 100644
index 0000000..3f7e37b
--- /dev/null
+++ b/System/FashionDress/FashionDetailsWin.cs
@@ -0,0 +1,159 @@
+锘縰sing System.Collections.Generic;
+using UnityEngine;
+using UnityEngine.UI;
+using TableConfig;
+using System.Collections;
+
+namespace Snxxz.UI
+{
+ [XLua.Hotfix]
+ public class FashionDetailsWin : Window
+ {
+ [SerializeField] GameObject container;
+ [SerializeField] CanvasGroup alpha;
+ [Header("椤堕儴UI")]
+ [SerializeField] Text nameText;
+ [SerializeField] Text fashionPartText;
+ [SerializeField] Text jobText;
+ [SerializeField] CommonItemBaisc itemBaisc;
+ [Header("涓棿UI")]
+ [SerializeField] GameObject midPartObj;
+ [SerializeField] FashionAttrBeh currentFashionAttr;
+ [SerializeField] FashionAttrBeh nextFashionAttr;
+ [Header("搴曢儴UI")]
+ [SerializeField] GameObject bottomPartObj;
+ [SerializeField] Text resourceText;
+
+ FashionDress fashionDress = null;
+ ItemConfig itemConfig = null;
+ FashionDressModel fashionModel { get { return ModelCenter.Instance.GetModel<FashionDressModel>(); } }
+
+ #region Built-in
+ protected override void BindController()
+ {
+
+ }
+ protected override void AddListeners()
+ {
+
+ }
+ protected override void OnPreOpen()
+ {
+ SetDisplay();
+ }
+ protected override void OnActived()
+ {
+ base.OnActived();
+ StartCoroutine(DelayShow());
+ }
+ protected override void OnAfterOpen()
+ {
+
+ }
+
+ protected override void OnPreClose()
+ {
+
+ }
+
+ protected override void OnAfterClose()
+ {
+
+ }
+ #endregion
+
+ private void SetDisplay()
+ {
+
+ fashionModel.TryGetFashionDress(fashionModel.viewFashionDressId,out fashionDress);
+ if (fashionDress == null) return;
+
+ container.SetActive(false);
+ int itemId = fashionDress.GetEquipItemId();
+ DebugEx.Log("鐗╁搧ID:" + itemId);
+ alpha.alpha = 0;
+ itemConfig = Config.Instance.Get<ItemConfig>(itemId);
+ SetTopUI();
+ SetMidUI();
+ SetBotttomUI();
+ }
+
+ private void SetTopUI()
+ {
+ if (itemConfig == null) return;
+
+ if (itemConfig.JobLimit != 0)
+ {
+ JobNameConfig jobNameConfig = Config.Instance.Get<JobNameConfig>(itemConfig.JobLimit);
+ jobText.text = jobNameConfig.name;
+ }
+ nameText.text = itemConfig.ItemName;
+ nameText.color = UIHelper.GetUIColor(itemConfig.ItemColor);
+ fashionPartText.text = itemConfig.ItemTypeName;
+ ItemCellModel cellModel = new ItemCellModel(itemConfig.ID);
+ itemBaisc.Init(cellModel);
+ }
+
+ private void SetMidUI()
+ {
+ //midPartObj.SetActive(true);
+ if (fashionDress == null) return;
+ int minStar = 1;
+ int curSatr = fashionModel.GetFashionDressLevel(fashionDress.id);
+ if(curSatr < minStar)
+ {
+ currentFashionAttr.gameObject.SetActive(false);
+ nextFashionAttr.gameObject.SetActive(true);
+ nextFashionAttr.SetDisplay(minStar,curSatr);
+ }
+ else if(curSatr >= fashionDress.maxLevel)
+ {
+ currentFashionAttr.gameObject.SetActive(true);
+ nextFashionAttr.gameObject.SetActive(false);
+ currentFashionAttr.SetDisplay(fashionDress.maxLevel,curSatr);
+ }
+ else
+ {
+ currentFashionAttr.gameObject.SetActive(true);
+ nextFashionAttr.gameObject.SetActive(true);
+ currentFashionAttr.SetDisplay(curSatr,curSatr);
+ nextFashionAttr.SetDisplay(curSatr+1,curSatr);
+ }
+ }
+
+ private void SetBotttomUI()
+ {
+ if (itemConfig == null) return;
+
+ //bottomPartObj.SetActive(true);
+ resourceText.text = itemConfig.Description;
+ }
+
+ IEnumerator DelayShow()
+ {
+ yield return null;
+ container.SetActive(true);
+ StartCoroutine(DelayAlpha());
+ }
+
+ IEnumerator DelayShowMid()
+ {
+ yield return null;
+ midPartObj.SetActive(true);
+ StartCoroutine(DelayShowBottom());
+ }
+
+ IEnumerator DelayShowBottom()
+ {
+ yield return null;
+ bottomPartObj.SetActive(true);
+ StartCoroutine(DelayAlpha());
+ }
+
+ IEnumerator DelayAlpha()
+ {
+ yield return null;
+ alpha.alpha = 1;
+ }
+ }
+}
diff --git a/System/FashionDress/FashionDetailsWin.cs.meta b/System/FashionDress/FashionDetailsWin.cs.meta
new file mode 100644
index 0000000..75b49e7
--- /dev/null
+++ b/System/FashionDress/FashionDetailsWin.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 91c26b09f6d89e44d8d82d3dcce87396
+timeCreated: 1546830741
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/System/FashionDress/FashionDressCell.cs b/System/FashionDress/FashionDressCell.cs
new file mode 100644
index 0000000..9ca81db
--- /dev/null
+++ b/System/FashionDress/FashionDressCell.cs
@@ -0,0 +1,158 @@
+锘縰sing System;
+using System.Collections;
+using System.Collections.Generic;
+using TableConfig;
+using UnityEngine;
+using UnityEngine.UI;
+
+namespace Snxxz.UI
+{
+ public class FashionDressCell : CellView
+ {
+ [SerializeField] ItemBehaviour m_Item;
+ [SerializeField] Text m_ItemName;
+ [SerializeField] Text m_ItemCount;
+ [SerializeField] Text m_GetPath;
+ [SerializeField] RectTransform m_ContainerStars;
+ [SerializeField] Transform[] m_Stars;
+ [SerializeField] Transform[] m_StarEquips;
+ [SerializeField] Button m_LevelUp;
+ [SerializeField] Transform m_ContainerDarkMask;
+ [SerializeField] Transform m_Lock;
+ [SerializeField] Button m_Unlock;
+ [SerializeField] Transform m_ContainerSelect;
+ [SerializeField] Transform m_Equiped;
+ [SerializeField] Transform m_Preview;
+ [SerializeField] Transform m_UnlockRedpoint;
+ [SerializeField] Transform m_LevelUpRedpoint;
+ [SerializeField] Button m_Select;
+
+ int fashionDressId = 0;
+
+ FashionDressModel model
+ {
+ get { return ModelCenter.Instance.GetModel<FashionDressModel>(); }
+ }
+
+ PlayerPackModel packModel
+ {
+ get { return ModelCenter.Instance.GetModel<PlayerPackModel>(); }
+ }
+
+ public void Display(int id)
+ {
+ fashionDressId = id;
+
+ FashionDress fashionDress;
+ m_LevelUp.RemoveAllListeners();
+ m_Unlock.RemoveAllListeners();
+ m_Select.RemoveAllListeners();
+
+ var fashionDressLevel = model.GetFashionDressLevel(fashionDressId);
+
+ var active = fashionDressLevel > 0;
+
+ m_ContainerDarkMask.gameObject.SetActive(!active);
+ m_ContainerStars.gameObject.SetActive(active);
+ m_GetPath.gameObject.SetActive(!active);
+
+ m_UnlockRedpoint.gameObject.SetActive(model.levelUpRedpoint.state == RedPointState.Simple
+ && model.fashionDressRedpointId == fashionDressId);
+ m_LevelUpRedpoint.gameObject.SetActive(model.levelUpRedpoint.state == RedPointState.Simple
+ && model.fashionDressRedpointId == fashionDressId);
+
+ if (model.TryGetFashionDress(fashionDressId, out fashionDress))
+ {
+ var equipItemId = fashionDress.GetEquipItemId();
+ var virtualEquipFashionId = model.GetVirtualEquipFashionDress(fashionDress.fashionDressType);
+ var selectFashionDress = model.GetSelectFashionDress(fashionDress.fashionDressType);
+
+ bool isEquiped = virtualEquipFashionId == fashionDressId;
+ m_Equiped.gameObject.SetActive(isEquiped);
+
+ bool isSelect = selectFashionDress == fashionDressId;
+ m_Preview.gameObject.SetActive(!isEquiped && isSelect);
+
+ m_ContainerSelect.gameObject.SetActive(isSelect);
+
+ m_LevelUp.gameObject.SetActive(active && fashionDressLevel < fashionDress.maxLevel);
+
+ bool isMax = fashionDressLevel >= fashionDress.maxLevel;
+ var count = packModel.GetItemCountByID(PackType.rptItem, fashionDress.requireLevelUpItem);
+ m_Item.SetItem(equipItemId, 0);
+ var levelUpRequireCount = fashionDress.GetLevelUpRequireCount(fashionDressLevel);
+ var requireCountDisplay = UIHelper.AppendStringColor(count >= levelUpRequireCount ?
+ TextColType.DarkGreen : TextColType.Red, count.ToString());
+ m_ItemCount.text = isMax ? string.Empty : StringUtility.Contact(requireCountDisplay, "/", levelUpRequireCount);
+
+ var config = Config.Instance.Get<FashionDressConfig>(fashionDressId);
+ m_ItemName.text = config.name;
+ m_GetPath.text = config.getWay;
+ if (fashionDressLevel > 0)
+ {
+ for (int i = 0; i < m_Stars.Length; i++)
+ {
+ m_Stars[i].gameObject.SetActive(i < fashionDress.maxLevel);
+ }
+ for (int i = 0; i < m_StarEquips.Length; i++)
+ {
+ m_StarEquips[i].gameObject.SetActive(i < fashionDressLevel);
+ }
+ }
+
+ m_Lock.gameObject.SetActive(count < levelUpRequireCount);
+ m_Unlock.gameObject.SetActive(count >= levelUpRequireCount);
+
+ m_LevelUp.AddListener(LevelUp);
+ m_Unlock.AddListener(LevelUp);
+ m_Select.AddListener(Select);
+ }
+ }
+
+ private void Select()
+ {
+ FashionDress fashionDress;
+ if (model.TryGetFashionDress(fashionDressId, out fashionDress))
+ {
+ var selectFashionDress = model.GetSelectFashionDress(fashionDress.fashionDressType);
+ var virtualEquipFashionDress = model.GetVirtualEquipFashionDress(fashionDress.fashionDressType);
+ if (selectFashionDress != fashionDressId)
+ {
+ if (model.IsFashionDressUnlock(fashionDressId))
+ {
+ model.SetVirtualEquipFashionDress(fashionDress.fashionDressType, fashionDressId);
+ model.SetSelectFashionDress(fashionDress.fashionDressType, fashionDressId);
+ }
+ else
+ {
+ model.SetSelectFashionDress(fashionDress.fashionDressType, fashionDressId);
+ }
+ }
+ else
+ {
+ if (virtualEquipFashionDress == fashionDressId)
+ {
+ model.SetVirtualEquipFashionDress(fashionDress.fashionDressType, 0);
+ model.SetSelectFashionDress(fashionDress.fashionDressType, 0);
+ }
+ else
+ {
+ model.SetSelectFashionDress(fashionDress.fashionDressType, virtualEquipFashionDress);
+ }
+ }
+ }
+ }
+
+ private void LevelUp()
+ {
+ var error = 0;
+ if (!model.TryLevelUp(fashionDressId, out error))
+ {
+ model.DisplayLevelUpError(error);
+ return;
+ }
+ model.SendLevelUp(fashionDressId);
+ }
+ }
+}
+
diff --git a/System/FashionDress/FashionDressCell.cs.meta b/System/FashionDress/FashionDressCell.cs.meta
new file mode 100644
index 0000000..8b3ee39
--- /dev/null
+++ b/System/FashionDress/FashionDressCell.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 6f69d8fa7c986cd4babb27d708adba91
+timeCreated: 1546918315
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/System/FashionDress/FashionDressModel.cs b/System/FashionDress/FashionDressModel.cs
new file mode 100644
index 0000000..fa169d8
--- /dev/null
+++ b/System/FashionDress/FashionDressModel.cs
@@ -0,0 +1,577 @@
+锘縰sing System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Linq;
+using TableConfig;
+using UnityEngine;
+namespace Snxxz.UI
+{
+ public class FashionDressModel : Model, IBeforePlayerDataInitialize, IPlayerLoginOk
+ {
+ Dictionary<int, FashionDress> fashionDressDict = new Dictionary<int, FashionDress>();
+ Dictionary<int, int> fashionDressLevelDict = new Dictionary<int, int>();
+ Dictionary<int, Dictionary<int, int>> cabinetPropertyDict = new Dictionary<int, Dictionary<int, int>>();
+ Dictionary<int, List<int>> fashionDressTypeDict = new Dictionary<int, List<int>>();
+ Dictionary<int, Dictionary<int, List<int>>> fashionDressQualityDict = new Dictionary<int, Dictionary<int, List<int>>>();
+
+ const int FASHIONDRESS_REDPOINT_BASE = 10105;
+ const int FASHIONDRESS_FUNC_ID = 160;
+
+ public readonly Redpoint redpoint = new Redpoint(101, FASHIONDRESS_REDPOINT_BASE);
+ public readonly Redpoint levelUpRedpoint = new Redpoint(FASHIONDRESS_REDPOINT_BASE, 1010501);
+
+ public int cabinetLevel { get; private set; }
+ public int cabinetExp { get; private set; }
+ public int cabinetMaxLevel { get; private set; }
+ public bool serverInited { get; private set; }
+ public int fashoinDressCount
+ {
+ get
+ {
+ return fashionDressDict.Count;
+ }
+ }
+
+ public Dictionary<int, int> fashionDressSelectDict { get; private set; }
+ public Dictionary<int, int> fashionDressEquipDict { get; private set; }
+ public List<int> fashionDressLevelUpItems { get; private set; }
+ public List<int> fashionDressTypes { get; private set; }
+ public Dictionary<int, int> fashionTypeMapPlaceDict { get; private set; }
+
+ int m_SelectType = 1;
+ public int selectType
+ {
+ get { return m_SelectType; }
+ set
+ {
+ if (m_SelectType != value)
+ {
+ m_SelectType = value;
+ if (selectTypeRefresh != null)
+ {
+ selectTypeRefresh();
+ }
+ }
+ }
+ }
+
+ int m_SelectQuality = 0;
+ public int selectQuality
+ {
+ get { return m_SelectQuality; }
+ set
+ {
+ if (m_SelectQuality != value)
+ {
+ m_SelectQuality = value;
+ if (selectQualityRefresh != null)
+ {
+ selectQualityRefresh();
+ }
+ }
+ }
+ }
+
+ public event Action selectTypeRefresh;
+ public event Action selectQualityRefresh;
+ public event Action cabinetRefresh;
+ public event Action<int> fashionDressRefresh;
+ public event Action<int> previewRefresh;
+ public event Action<int> virtualEquipRefresh;
+
+ PlayerPackModel packModel
+ {
+ get { return ModelCenter.Instance.GetModel<PlayerPackModel>(); }
+ }
+
+ public override void Init()
+ {
+ ParseConfig();
+ fashionDressSelectDict = new Dictionary<int, int>();
+ fashionDressEquipDict = new Dictionary<int, int>();
+ FuncOpen.Instance.OnFuncStateChangeEvent += OnFuncStateChangeEvent;
+ packModel.RefreshItemCountAct += RefreshItemCountAct;
+ }
+
+ public void OnBeforePlayerDataInitialize()
+ {
+ fashionDressLevelDict.Clear();
+ cabinetLevel = 0;
+ cabinetExp = 0;
+ serverInited = false;
+ }
+
+ public void OnPlayerLoginOk()
+ {
+ UpdateRedpoint();
+ serverInited = true;
+ }
+
+ public override void UnInit()
+ {
+ }
+
+ private void OnFuncStateChangeEvent(int id)
+ {
+ if (id == FASHIONDRESS_FUNC_ID)
+ {
+ UpdateRedpoint();
+ }
+ }
+
+ private void RefreshItemCountAct(PackType packType, int arg2, int itemId)
+ {
+ if (packType == PackType.rptItem)
+ {
+ if (fashionDressLevelUpItems.Contains(itemId))
+ {
+ UpdateRedpoint();
+ }
+ }
+ }
+
+ void ParseConfig()
+ {
+ {
+ var configs = Config.Instance.GetAllValues<FashionDressConfig>();
+ fashionDressLevelUpItems = new List<int>();
+ foreach (var config in configs)
+ {
+ fashionDressDict[config.CoatID] = new FashionDress(config);
+ {
+ List<int> list;
+ if (!fashionDressTypeDict.TryGetValue(config.type, out list))
+ {
+ list = new List<int>();
+ fashionDressTypeDict.Add(config.type, list);
+ }
+ list.Add(config.CoatID);
+ }
+ if (!fashionDressLevelUpItems.Contains(config.UnlockItemID))
+ {
+ fashionDressLevelUpItems.Add(config.UnlockItemID);
+ }
+
+ {
+ Dictionary<int, List<int>> dict;
+ if (!fashionDressQualityDict.TryGetValue(config.type, out dict))
+ {
+ dict = new Dictionary<int, List<int>>();
+ fashionDressQualityDict.Add(config.type, dict);
+ }
+ List<int> list;
+ if (!dict.TryGetValue(config.quality, out list))
+ {
+ list = new List<int>();
+ dict.Add(config.quality, list);
+ }
+ list.Add(config.CoatID);
+ }
+ }
+ }
+
+ {
+ var configs = Config.Instance.GetAllValues<FashionDressCabinetConfig>();
+ foreach (var config in configs)
+ {
+ cabinetPropertyDict.Add(config.LV, ConfigParse.GetDic<int, int>(config.Attr));
+ if (config.LV > cabinetMaxLevel)
+ {
+ cabinetMaxLevel = config.LV;
+ }
+ }
+ }
+
+ {
+ var config = Config.Instance.Get<FuncConfigConfig>("FashionDressType");
+ if (config != null)
+ {
+ fashionTypeMapPlaceDict = ConfigParse.GetDic<int, int>(config.Numerical1);
+ }
+ fashionDressTypes = fashionTypeMapPlaceDict.Keys.ToList();
+ }
+
+ }
+
+ public int GetFashionDressLevel(int id)
+ {
+ if (fashionDressLevelDict.ContainsKey(id))
+ {
+ return fashionDressLevelDict[id];
+ }
+ return 0;
+ }
+
+ public int GetFashionDressEquipId(int type)
+ {
+ if (fashionTypeMapPlaceDict.ContainsKey(type)
+ && fashionDressTypeDict.ContainsKey(type))
+ {
+ var equipPlace = fashionTypeMapPlaceDict[type];
+ var itemModel = packModel.GetItemModelByIndex(PackType.rptEquip, (int)equipPlace);
+ var list = fashionDressTypeDict[type];
+ if (itemModel != null)
+ {
+ var index = list.FindIndex((id) =>
+ {
+ FashionDress fashionDress;
+ if (TryGetFashionDress(id, out fashionDress))
+ {
+ return fashionDress.GetEquipItemId() == itemModel.itemId;
+ }
+ return false;
+ });
+ if (index != -1)
+ {
+ return list[index];
+ }
+ }
+ }
+ return 0;
+ }
+
+ public int GetSelectFashionDress(int type)
+ {
+ if (fashionDressSelectDict.ContainsKey(type))
+ {
+ return fashionDressSelectDict[type];
+ }
+ return 0;
+ }
+
+ public int GetVirtualEquipFashionDress(int type)
+ {
+ if (fashionDressEquipDict.ContainsKey(type))
+ {
+ return fashionDressEquipDict[type];
+ }
+ return 0;
+ }
+
+ public bool IsFashionDressUnlock(int id)
+ {
+ var level = GetFashionDressLevel(id);
+ return level > 0;
+ }
+
+ public bool TryGetFashionDress(int id, out FashionDress fashionDress)
+ {
+ return fashionDressDict.TryGetValue(id, out fashionDress);
+ }
+
+ public bool TryGetFashionDresses(int type, int quality, out List<int> list)
+ {
+ list = null;
+ if (fashionDressQualityDict.ContainsKey(type))
+ {
+ return fashionDressQualityDict[type].TryGetValue(quality, out list);
+ }
+ return false;
+ }
+
+ public bool TryGetFashionDresses(int type, out List<int> list)
+ {
+ return fashionDressTypeDict.TryGetValue(type, out list);
+ }
+
+ public bool TryGetFashionDressProperty(int id, int level, out Dictionary<int, int> dict)
+ {
+ dict = null;
+ if (fashionDressDict.ContainsKey(id))
+ {
+ return fashionDressDict[id].TryGetProperty(level, out dict);
+ }
+ return false;
+ }
+
+ public bool TryGetCabinetProperty(int level, out Dictionary<int, int> dict)
+ {
+ return cabinetPropertyDict.TryGetValue(level, out dict);
+ }
+
+ public bool TryGetSatisfyResolves(ref List<int> list)
+ {
+ if (list == null)
+ {
+ list = new List<int>();
+ }
+ list.Clear();
+ foreach (var fashionDress in fashionDressDict.Values)
+ {
+ var level = GetFashionDressLevel(fashionDress.id);
+ if (level < fashionDress.maxLevel)
+ {
+ continue;
+ }
+ var count = packModel.GetItemCountByID(PackType.rptItem, fashionDress.requireLevelUpItem);
+ if (count > 0 && !list.Contains(fashionDress.requireLevelUpItem))
+ {
+ list.Add(fashionDress.requireLevelUpItem);
+ }
+ }
+ return list != null && list.Count > 0;
+ }
+
+ public bool TryGetActiveFashionDress(out List<int> list)
+ {
+ list = new List<int>();
+ foreach (var fashionDress in fashionDressDict.Values)
+ {
+ var level = GetFashionDressLevel(fashionDress.id);
+ if (level > 0)
+ {
+ list.Add(fashionDress.id);
+ }
+ }
+ return list.Count > 0;
+ }
+
+
+ public bool TryLevelUp(int id, out int error)
+ {
+ error = 0;
+ FashionDress fashionDress;
+ if (TryGetFashionDress(id, out fashionDress))
+ {
+ var level = GetFashionDressLevel(id);
+ if (level >= fashionDress.maxLevel)
+ {
+ return false;
+ }
+ var count = packModel.GetItemCountByID(PackType.rptItem, fashionDress.requireLevelUpItem);
+ var levelUpRequireCount = fashionDress.GetLevelUpRequireCount(level);
+ if (count < levelUpRequireCount)
+ {
+ error = 1;
+ return false;
+ }
+ }
+ return true;
+ }
+
+ public void DisplayLevelUpError(int error)
+ {
+ switch (error)
+ {
+ case 1:
+ SysNotifyMgr.Instance.ShowTip("FashionDressLevelUpError_1");
+ break;
+ }
+ }
+
+ public void SetSelectFashionDress(int type, int id)
+ {
+ fashionDressSelectDict[type] = id;
+ if (previewRefresh != null)
+ {
+ previewRefresh(type);
+ }
+ }
+
+ public void SetVirtualEquipFashionDress(int type, int id)
+ {
+ fashionDressEquipDict[type] = id;
+ if (virtualEquipRefresh != null)
+ {
+ virtualEquipRefresh(type);
+ }
+ }
+
+ public void ReceivePackage(HB102_tagMCClothesCoatSkinState package)
+ {
+ cabinetLevel = (int)package.CoatChestLV;
+ cabinetExp = (int)package.CoatChestExp;
+ if (cabinetRefresh != null)
+ {
+ cabinetRefresh();
+ }
+ for (int i = 0; i < package.CoatNum; i++)
+ {
+ var id = (int)package.CoatInfoList[i].CoatIndex;
+ var level = (int)package.CoatInfoList[i].CoatLV;
+ fashionDressLevelDict[id] = level;
+ if (fashionDressRefresh != null)
+ {
+ fashionDressRefresh(id);
+ }
+ if (level == 1)
+ {
+ HandleFashionDressUnlock(id);
+ }
+ }
+ UpdateRedpoint();
+ }
+
+ public void HandleFashionDressUnlock(int id)
+ {
+ if (serverInited)
+ {
+ if (WindowCenter.Instance.IsOpen<FashionDressWin>())
+ {
+ FashionDress fashionDress;
+ if (TryGetFashionDress(id, out fashionDress))
+ {
+ if (selectType == fashionDress.fashionDressType)
+ {
+ var virtualEquipId = GetVirtualEquipFashionDress(selectType);
+ if (virtualEquipId != 0)
+ {
+ SetSelectFashionDress(selectType, virtualEquipId);
+ }
+ else
+ {
+ SetVirtualEquipFashionDress(selectType, id);
+ SetSelectFashionDress(selectType, id);
+ }
+ }
+ }
+ }
+ }
+ }
+
+ public void SendLevelUp(int id)
+ {
+ CA50B_tagCMCoatUp pak = new CA50B_tagCMCoatUp();
+ pak.CoatIndex = (uint)id;
+ GameNetSystem.Instance.SendInfo(pak);
+ }
+
+ public void TryEquip()
+ {
+ foreach (var type in fashionDressEquipDict.Keys)
+ {
+ var equipId = GetFashionDressEquipId(type);
+ var virtualEquipId = fashionDressEquipDict[type];
+ var index = fashionTypeMapPlaceDict[type];
+ if (virtualEquipId != 0)
+ {
+ if (IsFashionDressUnlock(virtualEquipId)
+ && virtualEquipId != equipId)
+ {
+ SendEquipPackage((int)PackType.rptInterimPack, virtualEquipId, (int)PackType.rptEquip, index);
+ }
+ }
+ else
+ {
+ if (equipId != 0)
+ {
+ SendEquipPackage((int)PackType.rptEquip, index, (int)PackType.rptInterimPack, 0);
+ }
+ }
+ }
+ }
+
+ void SendEquipPackage(int srcpackType, int scrIndex, int destpackType, int destIndex)
+ {
+ C073D_tagCPackItemExchange pak = new C073D_tagCPackItemExchange();
+ pak.SrcBackpack = (byte)srcpackType;
+ pak.SrcIndex = (ushort)scrIndex;
+ pak.DesBackPack = (byte)destpackType;
+ pak.DestIndex = (ushort)destIndex;
+ GameNetSystem.Instance.SendInfo(pak);
+ }
+
+ #region 鏃惰璇︽儏
+ public int viewFashionDressId { get; private set; }
+ public void ViewFashionDressDetails(int id)
+ {
+ viewFashionDressId = id;
+ WindowCenter.Instance.Open<FashionDetailsWin>();
+ }
+ #endregion
+
+ #region 绾㈢偣
+ public int fashionDressRedpointId { get; private set; }
+ void UpdateRedpoint()
+ {
+ levelUpRedpoint.state = RedPointState.None;
+ if (!FuncOpen.Instance.IsFuncOpen(FASHIONDRESS_FUNC_ID))
+ {
+ return;
+ }
+ foreach (var fashionDress in fashionDressDict.Values)
+ {
+ var level = GetFashionDressLevel(fashionDress.id);
+ if (level >= fashionDress.maxLevel)
+ {
+ continue;
+ }
+ var levelUpRequireCount = fashionDress.GetLevelUpRequireCount(level);
+ var count = packModel.GetItemCountByID(PackType.rptItem, fashionDress.requireLevelUpItem);
+ if (count >= levelUpRequireCount)
+ {
+ fashionDressRedpointId = fashionDress.id;
+ levelUpRedpoint.state = RedPointState.Simple;
+ return;
+ }
+ }
+ }
+ #endregion
+ }
+
+ public class FashionDress
+ {
+ public int id { get; private set; }
+ public int requireLevelUpItem { get; private set; }
+ public int maxLevel { get; private set; }
+ public int equipPlace { get; private set; }
+ public int fashionDressType { get; private set; }
+
+ List<int> equipItems = new List<int>();
+ List<int> requireLevelUpCounts = new List<int>();
+ Dictionary<int, Dictionary<int, int>> propertys = new Dictionary<int, Dictionary<int, int>>();
+ public FashionDress(FashionDressConfig config)
+ {
+ id = config.CoatID;
+ requireLevelUpItem = config.UnlockItemID;
+ maxLevel = config.MaxLV;
+ fashionDressType = config.type;
+ requireLevelUpCounts.AddRange(config.CostItemCnt);
+ var json = LitJson.JsonMapper.ToObject(config.StarAttr);
+ foreach (var starKey in json.Keys)
+ {
+ var star = int.Parse(starKey);
+ Dictionary<int, int> dict = new Dictionary<int, int>();
+ propertys.Add(star, dict);
+ foreach (var propertyKey in json[starKey].Keys)
+ {
+ var property = int.Parse(propertyKey);
+ dict.Add(property, int.Parse(json[starKey][propertyKey].ToString()));
+ }
+ }
+ equipItems.AddRange(config.EquipItemID);
+ var equipItemConfig = Config.Instance.Get<ItemConfig>(equipItems[0]);
+ equipPlace = equipItemConfig.EquipPlace;
+ }
+
+ public int GetEquipItemId(int job = 0)
+ {
+ if (job == 0)
+ {
+ job = PlayerDatas.Instance.baseData.Job;
+ }
+ var index = job - 1;
+ if (index < equipItems.Count)
+ {
+ return equipItems[index];
+ }
+ return 0;
+ }
+
+ public bool TryGetProperty(int level, out Dictionary<int, int> dict)
+ {
+ return propertys.TryGetValue(level, out dict);
+ }
+
+ public int GetLevelUpRequireCount(int level)
+ {
+ var index = level;
+ if (index < requireLevelUpCounts.Count)
+ {
+ return requireLevelUpCounts[index];
+ }
+ return 0;
+ }
+ }
+}
+
diff --git a/System/FashionDress/FashionDressModel.cs.meta b/System/FashionDress/FashionDressModel.cs.meta
new file mode 100644
index 0000000..d42e432
--- /dev/null
+++ b/System/FashionDress/FashionDressModel.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 0a0e33f1957b1724ba147992931bd7f9
+timeCreated: 1546852997
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/System/FashionDress/FashionDressQualityBehaviour.cs b/System/FashionDress/FashionDressQualityBehaviour.cs
new file mode 100644
index 0000000..2260df2
--- /dev/null
+++ b/System/FashionDress/FashionDressQualityBehaviour.cs
@@ -0,0 +1,97 @@
+锘縰sing System;
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+using UnityEngine.UI;
+
+namespace Snxxz.UI
+{
+ [XLua.Hotfix]
+ public class FashionDressQualityBehaviour : MonoBehaviour
+ {
+ [SerializeField] int m_Quality = 0;
+ [SerializeField] Transform m_ContainerSelect;
+ [SerializeField] Transform m_ContainerNormal;
+ [SerializeField] Transform m_Redpoint;
+ [SerializeField] Shadow m_QualityShadow;
+ [SerializeField] Button m_Select;
+
+ FashionDressModel model
+ {
+ get { return ModelCenter.Instance.GetModel<FashionDressModel>(); }
+ }
+
+ private void Awake()
+ {
+ m_Select.AddListener(OnSelect);
+ }
+
+ public void Display()
+ {
+ model.selectQualityRefresh += SelectQualityRefresh;
+ model.selectTypeRefresh += SelectTypeRefresh;
+ RedpointCenter.Instance.redpointValueChangeEvent += RedpointValueChangeEvent;
+ DisplaySelect();
+ DisplayRedpoint();
+ }
+
+ void DisplaySelect()
+ {
+ bool selected = model.selectQuality == m_Quality;
+ m_ContainerSelect.gameObject.SetActive(selected);
+ m_ContainerNormal.gameObject.SetActive(!selected);
+ m_QualityShadow.enabled = selected;
+ }
+
+ void DisplayRedpoint()
+ {
+ var requireRedpoint = false;
+ List<int> list;
+ if (model.levelUpRedpoint.state == RedPointState.Simple
+ && model.TryGetFashionDresses(model.selectType, m_Quality, out list)
+ && list.Contains(model.fashionDressRedpointId))
+ {
+ requireRedpoint = true;
+ }
+ m_Redpoint.gameObject.SetActive(requireRedpoint);
+ }
+
+ public void Dispose()
+ {
+ model.selectQualityRefresh -= SelectQualityRefresh;
+ model.selectTypeRefresh -= SelectTypeRefresh;
+ RedpointCenter.Instance.redpointValueChangeEvent -= RedpointValueChangeEvent;
+ }
+
+ private void RedpointValueChangeEvent(int id)
+ {
+ if (model.levelUpRedpoint.id == id)
+ {
+ DisplayRedpoint();
+ }
+ }
+
+ private void SelectQualityRefresh()
+ {
+ DisplaySelect();
+ }
+
+ private void SelectTypeRefresh()
+ {
+ DisplayRedpoint();
+ }
+
+ private void OnSelect()
+ {
+ List<int> list;
+ if (!model.TryGetFashionDresses(model.selectType, m_Quality, out list)
+ || list.Count == 0)
+ {
+ SysNotifyMgr.Instance.ShowTip("NoneOfSelectQualityFashionDress");
+ return;
+ }
+ model.selectQuality = m_Quality;
+ }
+ }
+}
+
diff --git a/System/FashionDress/FashionDressQualityBehaviour.cs.meta b/System/FashionDress/FashionDressQualityBehaviour.cs.meta
new file mode 100644
index 0000000..24576b3
--- /dev/null
+++ b/System/FashionDress/FashionDressQualityBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: a006ff57d928a7248b12f7688c91811e
+timeCreated: 1546914298
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/System/FashionDress/FashionDressTypeBehaviour.cs b/System/FashionDress/FashionDressTypeBehaviour.cs
new file mode 100644
index 0000000..869cf79
--- /dev/null
+++ b/System/FashionDress/FashionDressTypeBehaviour.cs
@@ -0,0 +1,82 @@
+锘縰sing System;
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+using UnityEngine.UI;
+
+namespace Snxxz.UI
+{
+ [XLua.Hotfix]
+ public class FashionDressTypeBehaviour : MonoBehaviour
+ {
+ [SerializeField] int m_FashionDressType;
+ [SerializeField] Button m_Select;
+ [SerializeField] RectTransform m_ContainerSelect;
+ [SerializeField] RectTransform m_ContainerNormal;
+ [SerializeField] Transform m_SelectRedpoint;
+ [SerializeField] Transform m_NormalRedpoint;
+
+ FashionDressModel model
+ {
+ get { return ModelCenter.Instance.GetModel<FashionDressModel>(); }
+ }
+
+ private void Awake()
+ {
+ m_Select.onClick.AddListener(OnSelect);
+ }
+
+ public void Display()
+ {
+ model.selectTypeRefresh += SelectEquipPlaceRefresh;
+ RedpointCenter.Instance.redpointValueChangeEvent += RedpointValueChangeEvent;
+ DisplaySelect();
+ DisplayRedpoint();
+ }
+
+ void DisplaySelect()
+ {
+ m_ContainerSelect.gameObject.SetActive(m_FashionDressType == model.selectType);
+ m_ContainerNormal.gameObject.SetActive(m_FashionDressType != model.selectType);
+ }
+
+ void DisplayRedpoint()
+ {
+ var requireRedpoint = false;
+ List<int> list;
+ if (model.levelUpRedpoint.state == RedPointState.Simple
+ && model.TryGetFashionDresses(m_FashionDressType, out list)
+ && list.Contains(model.fashionDressRedpointId))
+ {
+ requireRedpoint = true;
+ }
+ m_SelectRedpoint.gameObject.SetActive(requireRedpoint);
+ m_NormalRedpoint.gameObject.SetActive(requireRedpoint);
+ }
+
+ public void Dispose()
+ {
+ model.selectTypeRefresh -= SelectEquipPlaceRefresh;
+ RedpointCenter.Instance.redpointValueChangeEvent -= RedpointValueChangeEvent;
+ }
+
+ private void RedpointValueChangeEvent(int id)
+ {
+ if (model.levelUpRedpoint.id == id)
+ {
+ DisplayRedpoint();
+ }
+ }
+
+ private void SelectEquipPlaceRefresh()
+ {
+ DisplaySelect();
+ }
+
+ private void OnSelect()
+ {
+ model.selectType = m_FashionDressType;
+ }
+ }
+}
+
diff --git a/System/FashionDress/FashionDressTypeBehaviour.cs.meta b/System/FashionDress/FashionDressTypeBehaviour.cs.meta
new file mode 100644
index 0000000..187eb5d
--- /dev/null
+++ b/System/FashionDress/FashionDressTypeBehaviour.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: ac86cee78491407418892b9b745e2b1c
+timeCreated: 1546862460
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/System/FashionDress/FashionDressWin.cs b/System/FashionDress/FashionDressWin.cs
new file mode 100644
index 0000000..4fc1e7d
--- /dev/null
+++ b/System/FashionDress/FashionDressWin.cs
@@ -0,0 +1,394 @@
+锘�//--------------------------------------------------------
+// [Author]: 绗簩涓栫晫
+// [ Date ]: Monday, January 07, 2019
+//--------------------------------------------------------
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using TableConfig;
+using UnityEngine;
+using UnityEngine.UI;
+
+namespace Snxxz.UI
+{
+ [XLua.Hotfix]
+ public class FashionDressWin : Window
+ {
+ [SerializeField] FashionDressTypeBehaviour[] m_FashionDressTypes;
+ [SerializeField] Button m_ViewProperty;
+ [SerializeField] Button m_Resolve;
+ [SerializeField] IntensifySmoothSlider m_SmoothSlider;
+ [SerializeField] Text m_CabinetExp;
+ [SerializeField] Text m_CabinetLevel;
+
+ [SerializeField] RawImage m_RawModel;
+
+ [SerializeField] FashionDressQualityBehaviour[] m_FashionDressQualitys;
+ [SerializeField] ScrollerController m_ScrollerControl;
+ [SerializeField] RectTransform m_ContainerViewDetail;
+ [SerializeField] Button m_ViewDetail;
+
+
+ FashionDressModel model
+ {
+ get { return ModelCenter.Instance.GetModel<FashionDressModel>(); }
+ }
+
+ PlayerPackModel packModel
+ {
+ get { return ModelCenter.Instance.GetModel<PlayerPackModel>(); }
+ }
+
+ MagicianModel godWeaponModel
+ {
+ get { return ModelCenter.Instance.GetModel<MagicianModel>(); }
+ }
+
+ List<int> resolveList = new List<int>();
+ #region Built-in
+ protected override void BindController()
+ {
+ }
+
+ protected override void AddListeners()
+ {
+ m_ViewProperty.AddListener(ViewProperty);
+ m_Resolve.AddListener(Resolve);
+ m_ViewDetail.AddListener(ViewDetail);
+ m_ScrollerControl.OnRefreshCell += OnRefreshCell;
+ }
+
+ protected override void OnPreOpen()
+ {
+ SetDefaultSelect();
+
+ model.cabinetRefresh += FashionDressCabinetRefresh;
+ model.selectTypeRefresh += SelectTypeRefresh;
+ model.selectQualityRefresh += SelectQualityRefresh;
+ model.previewRefresh += PreviewRefresh;
+ //model.virtualEquipRefresh += VirtualEquipRefresh;
+ model.fashionDressRefresh += FashionDressRefresh;
+ packModel.RefreshItemCountAct += RefreshItemCountAct;
+
+ for (int i = 0; i < m_FashionDressTypes.Length; i++)
+ {
+ m_FashionDressTypes[i].Display();
+ }
+ for (int i = 0; i < m_FashionDressQualitys.Length; i++)
+ {
+ m_FashionDressQualitys[i].Display();
+ }
+ Display();
+ }
+
+ protected override void OnAfterOpen()
+ {
+ }
+
+ protected override void OnPreClose()
+ {
+ model.cabinetRefresh -= FashionDressCabinetRefresh;
+ model.selectTypeRefresh -= SelectTypeRefresh;
+ model.selectQualityRefresh -= SelectQualityRefresh;
+ model.previewRefresh -= PreviewRefresh;
+ packModel.RefreshItemCountAct -= RefreshItemCountAct;
+ model.fashionDressRefresh -= FashionDressRefresh;
+ //model.virtualEquipRefresh -= VirtualEquipRefresh;
+
+ for (int i = 0; i < m_FashionDressTypes.Length; i++)
+ {
+ m_FashionDressTypes[i].Dispose();
+ }
+ for (int i = 0; i < m_FashionDressQualitys.Length; i++)
+ {
+ m_FashionDressQualitys[i].Dispose();
+ }
+
+ model.TryEquip();
+ }
+
+ protected override void OnAfterClose()
+ {
+ }
+ #endregion
+
+ void SetDefaultSelect()
+ {
+ model.selectType = model.fashionDressTypes[0];
+ model.selectQuality = 0;
+
+ foreach (var fashionDressType in model.fashionDressTypes)
+ {
+ var equipId = model.GetFashionDressEquipId(fashionDressType);
+ model.SetVirtualEquipFashionDress(fashionDressType, equipId);
+ model.SetSelectFashionDress(fashionDressType, equipId);
+ }
+
+ for (int i = 0; i <= 2; i++)
+ {
+ List<int> list;
+ if (model.TryGetFashionDresses(model.selectType, i, out list)
+ && list.Count > 0)
+ {
+ model.selectQuality = i;
+ break;
+ }
+ }
+ }
+
+ void Display()
+ {
+ DisplayCabinet();
+ DisplayFashionDress();
+ DisplayModel();
+ DisplayViewDetail();
+ }
+
+ void DisplayCabinet(bool requireAnimation = false)
+ {
+ m_SmoothSlider.stage = model.cabinetLevel;
+ if (!requireAnimation)
+ {
+ m_SmoothSlider.delay = 0;
+ m_SmoothSlider.ResetStage();
+ }
+ else
+ {
+ m_SmoothSlider.delay = 0.2f;
+ }
+ bool isMax = model.cabinetLevel >= model.cabinetMaxLevel;
+ var progress = 0f;
+ if (isMax)
+ {
+ progress = 1;
+ m_CabinetExp.text = model.cabinetExp.ToString();
+ }
+ else
+ {
+ var config = Config.Instance.Get<FashionDressCabinetConfig>(model.cabinetLevel + 1);
+ progress = Mathf.Clamp01((float)model.cabinetExp / config.NeedExp);
+ m_CabinetExp.text = StringUtility.Contact(model.cabinetExp, "/", config.NeedExp);
+ }
+ m_SmoothSlider.value = progress;
+ m_CabinetLevel.text = Language.Get("CabinetLevel", model.cabinetLevel);
+ }
+
+ void DisplayFashionDress()
+ {
+ List<int> list;
+ m_ScrollerControl.Refresh();
+ if (model.TryGetFashionDresses(model.selectType, model.selectQuality, out list))
+ {
+ for (int i = 0; i < list.Count; i++)
+ {
+ m_ScrollerControl.AddCell(ScrollerDataType.Header, list[i]);
+ }
+ }
+ m_ScrollerControl.Restart();
+ }
+
+ void DisplayViewDetail()
+ {
+ var selectFashionDress = model.GetSelectFashionDress(model.selectType);
+ m_ContainerViewDetail.gameObject.SetActive(selectFashionDress != 0);
+ }
+
+ private void FashionDressCabinetRefresh()
+ {
+ DisplayCabinet(true);
+ }
+
+ private void SelectTypeRefresh()
+ {
+ for (int i = 0; i <= 2; i++)
+ {
+ List<int> list;
+ if (model.TryGetFashionDresses(model.selectType, i, out list)
+ && list.Count > 0)
+ {
+ model.selectQuality = i;
+ break;
+ }
+ }
+ DisplayFashionDress();
+ }
+
+ private void SelectQualityRefresh()
+ {
+ DisplayFashionDress();
+ }
+
+ private void PreviewRefresh(int type)
+ {
+ if (model.selectType == type)
+ {
+ m_ScrollerControl.m_Scorller.RefreshActiveCellViews();
+ }
+ DisplayModel();
+ DisplayViewDetail();
+ }
+
+ //private void VirtualEquipRefresh(int type)
+ //{
+ // if (model.selectType == type)
+ // {
+ // m_ScrollerControl.m_Scorller.RefreshActiveCellViews();
+ // }
+ // DisplayModel();
+ // DisplayViewDetail();
+ //}
+
+ private void FashionDressRefresh(int id)
+ {
+ m_ScrollerControl.RefreshSingleCellView(id);
+ }
+
+ private void OnRefreshCell(ScrollerDataType type, CellView cell)
+ {
+ var fashionDressCell = cell as FashionDressCell;
+ fashionDressCell.Display(cell.index);
+ }
+
+ private void RefreshItemCountAct(PackType packType, int index, int itemId)
+ {
+ if (packType == PackType.rptItem
+ && model.fashionDressLevelUpItems.Contains(itemId))
+ {
+ m_ScrollerControl.m_Scorller.RefreshActiveCellViews();
+ }
+ if (packType == PackType.rptEquip)
+ {
+ if (index == (int)RoleEquipType.retFashionClothes
+ || index == (int)RoleEquipType.retFashionWeapon
+ || index == (int)RoleEquipType.retFashionWeapon2)
+ {
+ m_ScrollerControl.m_Scorller.RefreshActiveCellViews();
+
+ foreach (var fashionDressType in model.fashionDressTypes)
+ {
+ var equipId = model.GetFashionDressEquipId(fashionDressType);
+ model.SetVirtualEquipFashionDress(fashionDressType, equipId);
+ model.SetSelectFashionDress(fashionDressType, equipId);
+ }
+ }
+ }
+ }
+
+ public void DisplayModel()
+ {
+ m_RawModel.gameObject.SetActive(true);
+
+ var job = PlayerDatas.Instance.baseData.Job;
+
+ var playerPack = ModelCenter.Instance.GetModel<PlayerPackModel>();
+
+ var clothes = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retClothes);
+ var clothesId = clothes == null ? 0 : (int)clothes.itemInfo.ItemID;
+
+ var weapon = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retWeapon);
+ var weaponId = weapon == null ? 0 : (int)weapon.itemInfo.ItemID;
+
+ var wings = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retWing);
+ var wingsId = wings == null ? 0 : (int)wings.itemInfo.ItemID;
+
+ var secondary = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retWeapon2);
+ var secondaryId = secondary == null ? 0 : (int)secondary.itemInfo.ItemID;
+
+ foreach (var type in model.fashionDressTypes)
+ {
+ var selectFashionId = model.GetSelectFashionDress(type);
+ if (selectFashionId == 0)
+ {
+ continue;
+ }
+ FashionDress fashionDress;
+ if (model.TryGetFashionDress(selectFashionId, out fashionDress))
+ {
+ var index = model.fashionTypeMapPlaceDict[type];
+ switch ((RoleEquipType)index)
+ {
+ case RoleEquipType.retFashionWeapon:
+ weaponId = fashionDress.GetEquipItemId();
+ break;
+ case RoleEquipType.retFashionClothes:
+ clothesId = fashionDress.GetEquipItemId();
+ break;
+ case RoleEquipType.retFashionWeapon2:
+ secondaryId = fashionDress.GetEquipItemId();
+ break;
+ }
+ }
+ }
+
+ int _suitLevel = 0;
+
+ if (clothes != null)
+ {
+ if (clothes.itemInfo.IsSuite == 1)
+ {
+ if (clothes.GetUseDataModel(30) != null && clothes.GetUseDataModel(30)[0] != 0)
+ {
+ _suitLevel = clothes.GetUseDataModel(30)[0];
+ }
+ }
+ }
+
+ Dictionary<int, int> dict = new Dictionary<int, int>();
+ for (int i = 0; i < godWeaponModel.godWeaponTypes.Count; i++)
+ {
+ var type = godWeaponModel.godWeaponTypes[i];
+ var godWeaponInfo = godWeaponModel.GetGodWeaponInfo(type);
+ var equipedLevel = godWeaponInfo != null ? godWeaponInfo.level : 0;
+ dict[type] = equipedLevel;
+ }
+
+ UI3DPlayerExhibitionData data = new UI3DPlayerExhibitionData()
+ {
+ job = job,
+ clothesId = clothesId,
+ suitLevel = _suitLevel,
+ weaponId = weaponId,
+ wingsId = wingsId,
+ secondaryId = secondaryId,
+ isDialogue = false,
+ godWeapons = dict
+ };
+ UI3DModelExhibition.Instance.ShowOtherPlayer(m_RawModel, data);
+ }
+
+ private void Resolve()
+ {
+ if (!model.TryGetSatisfyResolves(ref resolveList))
+ {
+ SysNotifyMgr.Instance.ShowTip("FashionDressResolveOpenError");
+ return;
+ }
+ WindowCenter.Instance.Open<FashiongDecomposeWin>();
+ }
+
+ private void ViewProperty()
+ {
+ WindowCenter.Instance.Open<FashionSumAttrWin>();
+ }
+
+ private void ViewDetail()
+ {
+ var virtualEquipId = model.GetVirtualEquipFashionDress(model.selectType);
+ var previewId = model.GetSelectFashionDress(model.selectType);
+ if (previewId != 0)
+ {
+ model.ViewFashionDressDetails(previewId);
+ }
+ else if (virtualEquipId != 0)
+ {
+ model.ViewFashionDressDetails(virtualEquipId);
+ }
+ }
+ }
+
+}
+
+
+
+
diff --git a/System/FashionDress/FashionDressWin.cs.meta b/System/FashionDress/FashionDressWin.cs.meta
new file mode 100644
index 0000000..aeb6480
--- /dev/null
+++ b/System/FashionDress/FashionDressWin.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: aa3feb2eec13a714da4c9c6522acc0a3
+timeCreated: 1546859809
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/System/FashionDress/FashionSumAttrWin.cs b/System/FashionDress/FashionSumAttrWin.cs
new file mode 100644
index 0000000..f629426
--- /dev/null
+++ b/System/FashionDress/FashionSumAttrWin.cs
@@ -0,0 +1,224 @@
+锘縰sing System.Collections.Generic;
+using UnityEngine;
+using UnityEngine.UI;
+using TableConfig;
+using System.Linq;
+using System.Collections;
+
+namespace Snxxz.UI
+{
+ [XLua.Hotfix]
+ public class FashionSumAttrWin : Window
+ {
+ [SerializeField] GameObject container;
+ [SerializeField] CanvasGroup alpha;
+ [Header("鏃惰鎬诲姞鎴�")]
+ [SerializeField] Text activateNumText;
+ [SerializeField] GameObject noneActivate;
+ [SerializeField] List<Text> activateAttrs = new List<Text>();
+ [SerializeField] List<GameObject> activateAttrObjs = new List<GameObject>();
+ [Header("琛f煖绛夌骇鍔犳垚")]
+ [SerializeField] Text wardrobeLvText;
+ [SerializeField] GameObject noneLvAdd;
+ [SerializeField] List<Text> lvAddAttrs = new List<Text>();
+ [SerializeField] List<GameObject> lvAddAttrObjs = new List<GameObject>();
+
+ FashionDressModel fashionModel { get { return ModelCenter.Instance.GetModel<FashionDressModel>(); } }
+ ItemTipsModel tipsModel { get { return ModelCenter.Instance.GetModel<ItemTipsModel>(); } }
+ #region Built-in
+ protected override void BindController()
+ {
+
+ }
+ protected override void AddListeners()
+ {
+
+ }
+ protected override void OnPreOpen()
+ {
+ SetDisplay();
+ }
+ protected override void OnActived()
+ {
+ base.OnActived();
+ StartCoroutine(DelayShow());
+ }
+ protected override void OnAfterOpen()
+ {
+
+ }
+
+ protected override void OnPreClose()
+ {
+
+ }
+ protected override void OnAfterClose()
+ {
+
+ }
+ #endregion
+
+ private void SetDisplay()
+ {
+ alpha.alpha = 0;
+ container.SetActive(false);
+ SetActivateFashionAdd();
+ SetWardrobeLvAdd();
+ }
+
+ private void SetActivateFashionAdd()
+ {
+ List<int> activateIds = null;
+ bool isActivate = fashionModel.TryGetActiveFashionDress(out activateIds);
+ int sumNum = fashionModel.fashoinDressCount;
+ int activateNum = activateIds.Count;
+ string actvivateNumSB = string.Empty;
+ if(activateNum > 0)
+ {
+ actvivateNumSB = UIHelper.AppendStringColor(TextColType.Green,activateNum.ToString());
+ }
+ else
+ {
+ actvivateNumSB = UIHelper.AppendStringColor(TextColType.Red, activateNum.ToString());
+ }
+ activateNumText.text = StringUtility.Contact(actvivateNumSB, "/",sumNum);
+ Dictionary<int, int> attrDict = GetActivateAttr();
+ if(attrDict != null && attrDict.Count > 0)
+ {
+ noneActivate.SetActive(false);
+ List<int> attrIds = attrDict.Keys.ToList();
+ for(int i = 0; i < activateAttrObjs.Count; i++)
+ {
+ var attrObj = activateAttrObjs[i];
+ attrObj.SetActive(i < attrIds.Count);
+ if(i < attrIds.Count)
+ {
+ var attrText = activateAttrs[i];
+ int attrId = attrIds[i];
+ int attrValue = attrDict[attrId];
+ var attrConfig = Config.Instance.Get<PlayerPropertyConfig>(attrId);
+ string attrSB = string.Empty;
+ string attrValueSB = UIHelper.AppendStringColor(TextColType.Green, tipsModel.GetProValueTypeStr(attrConfig, attrValue));
+ if (attrConfig.Name.Contains("%s"))
+ {
+ attrSB = attrConfig.Name.Replace("%s",attrValueSB);
+ }
+ else
+ {
+ attrSB = StringUtility.Contact(attrConfig.Name, "+",attrValueSB);
+ }
+ attrText.text = attrSB;
+ }
+ }
+ }
+ else
+ {
+ noneActivate.SetActive(true);
+ for (int i = 0; i < activateAttrObjs.Count; i++)
+ {
+ var attrObj = activateAttrObjs[i];
+ attrObj.SetActive(false);
+ }
+ }
+ }
+
+ private Dictionary<int,int> GetActivateAttr()
+ {
+ var sumAttrDict = new Dictionary<int, int>();
+ List<int> fashionIds = null;
+ bool isActivate = fashionModel.TryGetActiveFashionDress(out fashionIds);
+ if(isActivate)
+ {
+ foreach(var id in fashionIds)
+ {
+ int fashionLevel = fashionModel.GetFashionDressLevel(id);
+ Dictionary<int, int> attrDict = null;
+ bool isAttr = fashionModel.TryGetFashionDressProperty(id,fashionLevel,out attrDict);
+ if(isAttr)
+ {
+ foreach(var attrId in attrDict.Keys)
+ {
+ var attrValue = attrDict[attrId];
+ if(!sumAttrDict.ContainsKey(attrId))
+ {
+ sumAttrDict.Add(attrId,attrValue);
+ }
+ else
+ {
+ sumAttrDict[attrId] = attrValue;
+ }
+ }
+ }
+ }
+ }
+ return sumAttrDict;
+ }
+
+ private void SetWardrobeLvAdd()
+ {
+ int wardrobeLevel = fashionModel.cabinetLevel;
+ string wardrobeLevelSB = string.Empty;
+ if (wardrobeLevel > 0)
+ {
+ wardrobeLevelSB = UIHelper.AppendStringColor(TextColType.Green, wardrobeLevel.ToString());
+ }
+ else
+ {
+ wardrobeLevelSB = UIHelper.AppendStringColor(TextColType.Red, wardrobeLevel.ToString());
+ }
+ wardrobeLvText.text = Language.Get("FashionDress106",wardrobeLevelSB);
+ Dictionary<int, int> attrDict = null;
+ fashionModel.TryGetCabinetProperty(fashionModel.cabinetLevel, out attrDict);
+ if (attrDict != null && attrDict.Count > 0)
+ {
+ noneLvAdd.SetActive(false);
+ List<int> attrIds = attrDict.Keys.ToList();
+ for (int i = 0; i < lvAddAttrObjs.Count; i++)
+ {
+ var attrObj = lvAddAttrObjs[i];
+ attrObj.SetActive(i < attrIds.Count);
+ if (i < attrIds.Count)
+ {
+ var attrText = lvAddAttrs[i];
+ int attrId = attrIds[i];
+ int attrValue = attrDict[attrId];
+ var attrConfig = Config.Instance.Get<PlayerPropertyConfig>(attrId);
+ string attrSB = string.Empty;
+ string attrValueSB = UIHelper.AppendStringColor(TextColType.Green, tipsModel.GetProValueTypeStr(attrConfig, attrValue));
+ if (attrConfig.Name.Contains("%s"))
+ {
+ attrSB = attrConfig.Name.Replace("%s", attrValueSB);
+ }
+ else
+ {
+ attrSB = StringUtility.Contact(attrConfig.Name, "+", attrValueSB);
+ }
+ attrText.text = attrSB;
+ }
+ }
+ }
+ else
+ {
+ noneLvAdd.SetActive(true);
+ for (int i = 0; i < lvAddAttrObjs.Count; i++)
+ {
+ var attrObj = lvAddAttrObjs[i];
+ attrObj.SetActive(false);
+ }
+ }
+ }
+
+ IEnumerator DelayShow()
+ {
+ yield return null;
+ container.SetActive(true);
+ StartCoroutine(DelayAlpha());
+ }
+
+ IEnumerator DelayAlpha()
+ {
+ yield return null;
+ alpha.alpha = 1;
+ }
+ }
+}
diff --git a/System/FashionDress/FashionSumAttrWin.cs.meta b/System/FashionDress/FashionSumAttrWin.cs.meta
new file mode 100644
index 0000000..18e2ff6
--- /dev/null
+++ b/System/FashionDress/FashionSumAttrWin.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: c8afd26123775ac4b912680f965deea6
+timeCreated: 1546915247
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/System/FashionDress/FashiongDecomposeWin.cs b/System/FashionDress/FashiongDecomposeWin.cs
new file mode 100644
index 0000000..e791884
--- /dev/null
+++ b/System/FashionDress/FashiongDecomposeWin.cs
@@ -0,0 +1,120 @@
+锘縰sing System;
+using UnityEngine;
+using UnityEngine.UI;
+using TableConfig;
+
+namespace Snxxz.UI
+{
+ [XLua.Hotfix]
+ public class FashiongDecomposeWin : Window
+ {
+ [SerializeField] Button closeBtn;
+ [SerializeField] Button decomposeBtn;
+ [SerializeField] Text wardrobeLvText;
+ [SerializeField] Text upgradeExpText;
+ [SerializeField] Text getExpText;
+ [SerializeField] ScrollerController lineCtrl;
+ [SerializeField, Header("鍒涘缓鏍煎瓙鏁�")] int initGrid = 100;
+
+ FashionDressModel model{ get { return ModelCenter.Instance.GetModel<FashionDressModel>(); }}
+ #region Built-in
+ protected override void BindController()
+ {
+
+ }
+ protected override void AddListeners()
+ {
+ closeBtn.AddListener(CloseClick);
+ decomposeBtn.AddListener(ClickDecompose);
+ }
+
+ protected override void OnPreOpen()
+ {
+ model.cabinetRefresh += UpdateCabinetInfo;
+ FashionDecomposeModel.Instance.UpdateDecomposeExpEvent += UpdateGetExp;
+ SetDisplay();
+ }
+ protected override void OnAfterOpen()
+ {
+
+ }
+
+ protected override void OnPreClose()
+ {
+ model.cabinetRefresh -= UpdateCabinetInfo;
+ FashionDecomposeModel.Instance.UpdateDecomposeExpEvent -= UpdateGetExp;
+ }
+ protected override void OnAfterClose()
+ {
+
+ }
+ #endregion
+
+ private void SetDisplay()
+ {
+ FashionDecomposeModel.Instance.GetDecomposeItem();
+ CreateLineCell();
+ UpdateGetExp();
+ UpdateCabinetLv();
+ }
+
+ private void UpdateCabinetInfo()
+ {
+ FashionDecomposeModel.Instance.GetDecomposeItem();
+ UpdateCabinetLv();
+ lineCtrl.m_Scorller.RefreshActiveCellViews();
+ }
+
+ private void CreateLineCell()
+ {
+ int line = initGrid / 5;
+ lineCtrl.Refresh();
+ for (int i = 0; i < line; i++)
+ {
+ lineCtrl.AddCell(ScrollerDataType.Header, i);
+ }
+ lineCtrl.Restart();
+ }
+
+ private void UpdateCabinetLv()
+ {
+ int wardrobeLv = model.cabinetLevel;
+ wardrobeLvText.text = Language.Get("FashionDress106",wardrobeLv);
+ int curWardrobeExp = model.cabinetExp;
+ bool isCabinetMax = wardrobeLv >= model.cabinetMaxLevel ? true : false;
+ int upgradeLv = isCabinetMax ? model.cabinetMaxLevel : wardrobeLv + 1;
+ var cabinetConfig = Config.Instance.Get<FashionDressCabinetConfig>(upgradeLv);
+ upgradeExpText.gameObject.SetActive(cabinetConfig != null);
+ if (cabinetConfig != null)
+ {
+ int upgradeWardrobeExp = cabinetConfig.NeedExp;
+ if (isCabinetMax)
+ {
+ upgradeExpText.text = StringUtility.Contact("(", Language.Get("FashionDress105"),")");
+ }
+ else
+ {
+ upgradeExpText.text = StringUtility.Contact("(", curWardrobeExp, "/", upgradeWardrobeExp, ")");
+ }
+ }
+ }
+
+ private void UpdateGetExp()
+ {
+ int getDecomposeExp = FashionDecomposeModel.Instance.GetSumDecomposeExp();
+ getExpText.text = getDecomposeExp.ToString();
+ }
+
+ private void ClickDecompose()
+ {
+ int getDecomposeExp = FashionDecomposeModel.Instance.GetSumDecomposeExp();
+ if(getDecomposeExp <= 0)
+ {
+ SysNotifyMgr.Instance.ShowTip("FashionDecomposeRemind");
+ return;
+ }
+ FashionDecomposeModel.Instance.SendDecomposeFashion();
+ CloseImmediately();
+ }
+ }
+}
diff --git a/System/FashionDress/FashiongDecomposeWin.cs.meta b/System/FashionDress/FashiongDecomposeWin.cs.meta
new file mode 100644
index 0000000..54a8b2f
--- /dev/null
+++ b/System/FashionDress/FashiongDecomposeWin.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: dcedad5cc63fa9a449a785ffa93d903c
+timeCreated: 1546928860
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/System/GatheringSoul/GatheringSoulModel.cs b/System/GatheringSoul/GatheringSoulModel.cs
index 511d0de..e829fbb 100644
--- a/System/GatheringSoul/GatheringSoulModel.cs
+++ b/System/GatheringSoul/GatheringSoulModel.cs
@@ -85,15 +85,15 @@
public const int RARA_GATHERSOUL_QUALITY = 3;
- const int GATHERSOUL_REDPOINT_BASE = 10102;
- const int GATHERSOUL_REDPOINT_DEEP = 1010200;
+ const int GATHERSOUL_REDPOINT_BASE = 10104;
+ const int GATHERSOUL_REDPOINT_DEEP = 1010400;
static int redpointIndex = 5;
public readonly Redpoint redpoint = new Redpoint(101, GATHERSOUL_REDPOINT_BASE);
- public readonly Redpoint equipRedpoint = new Redpoint(GATHERSOUL_REDPOINT_BASE, 1010201);
- public readonly Redpoint replaceRedpoint = new Redpoint(GATHERSOUL_REDPOINT_BASE, 1010202);
- public readonly Redpoint resolveRedpoint = new Redpoint(GATHERSOUL_REDPOINT_BASE, 1010203);
- public readonly Redpoint levelUpRedpoint = new Redpoint(GATHERSOUL_REDPOINT_BASE, 1010204);
+ public readonly Redpoint equipRedpoint = new Redpoint(GATHERSOUL_REDPOINT_BASE, 1010401);
+ public readonly Redpoint replaceRedpoint = new Redpoint(GATHERSOUL_REDPOINT_BASE, 1010402);
+ public readonly Redpoint resolveRedpoint = new Redpoint(GATHERSOUL_REDPOINT_BASE, 1010403);
+ public readonly Redpoint levelUpRedpoint = new Redpoint(GATHERSOUL_REDPOINT_BASE, 1010404);
static readonly IComparer<int> soulPackSort = new GatherSoulPackSort();
static readonly IEqualityComparer<int> holeItemTypeDistinct = new HoleItemTypeDistinct();
diff --git a/System/KnapSack/Logic/ItemTipsModel.cs b/System/KnapSack/Logic/ItemTipsModel.cs
index 9d41869..ffc4049 100644
--- a/System/KnapSack/Logic/ItemTipsModel.cs
+++ b/System/KnapSack/Logic/ItemTipsModel.cs
@@ -2866,10 +2866,10 @@
var serverSurplusTimes = GetUseDataModel((int)ItemUseDataKey.Def_IudetTotalTime);
if(remainTime > 0)
{
- if (getTimes != null && serverSurplusTimes != null)
+ if (getTimes != null)
{
int getTime = getTimes[0];
- int serverSurplusTime = serverSurplusTimes[0];
+ int serverSurplusTime = serverSurplusTimes != null ? serverSurplusTimes[0] : 0;
if (getTime > 0)
{
double time = modelInterface.GetTimeOffest(TimeUtility.GetTime((uint)getTime));
diff --git a/System/Login/CrossServerLogin.cs b/System/Login/CrossServerLogin.cs
index 92e80f8..9baac77 100644
--- a/System/Login/CrossServerLogin.cs
+++ b/System/Login/CrossServerLogin.cs
@@ -167,11 +167,11 @@
try
{
StopLoginOverTimeProcess();
- loginOverTimeClock = Clock.Create(DateTime.Now + new TimeSpan(10* TimeSpan.TicksPerSecond), () =>
- {
- busy = false;
- ReAccountLogin();
- });
+ loginOverTimeClock = Clock.Create(DateTime.Now + new TimeSpan(10 * TimeSpan.TicksPerSecond), () =>
+ {
+ busy = false;
+ ReAccountLogin();
+ });
GameNetSystem.Instance.BeginConnectCrossServer(ipBuf, gamePortBuf, OnGameServerConnected);
NetLinkWin.Show();
}
@@ -245,13 +245,20 @@
{
StopLoginOverTimeProcess();
busy = false;
- ExceptionCatcher.ReportException("鐧诲綍璺ㄦ湇鍑虹幇寮傚父", StringUtility.Contact("瑙掕壊:", PlayerDatas.Instance.baseData.PlayerName));
+ ExceptionCatcher.ReportException("鐧诲綍璺ㄦ湇鍑虹幇寮傚父",
+ StringUtility.Contact(
+ "瑙掕壊:", PlayerDatas.Instance.baseData.PlayerName, ";",
+ "鏈満缃戠粶锛�", Application.internetReachability, ";",
+ "Socket閾炬帴鐘舵��:", GameNetSystem.Instance.crossServerSocketConnected, ";",
+ "0102璁板綍:", StageLoadTimeOutCatcher.got0102Time.ToString())
+ );
+
var sendInfo = new CC003_tagCGForceQuitCrossState();
GameNetSystem.Instance.SendInfo(sendInfo);
GameNetSystem.Instance.crossServerConnected_Loigc = false;
Clock.Create(DateTime.Now + new TimeSpan(2 * TimeSpan.TicksPerSecond), () =>
{
- loginModel.ReAccountLogin();
+ GameNetSystem.Instance.Reconnect();
});
}
diff --git a/System/Login/ServerBehaviour.cs b/System/Login/ServerBehaviour.cs
index 95d13ca..cde35ec 100644
--- a/System/Login/ServerBehaviour.cs
+++ b/System/Login/ServerBehaviour.cs
@@ -42,12 +42,6 @@
break;
}
m_ServerName.text = _serverData.name;
- m_OpenTime.gameObject.SetActive(m_ServerData.start_date > DateTime.Now);
-
- if (m_ServerData.start_date > DateTime.Now)
- {
- m_OpenTime.text = Language.Get("ServerOnTime", m_ServerData.start_date.ToString("MM-dd HH:mm"));
- }
var job = 0;
if (!string.IsNullOrEmpty(_serverData.job))
@@ -58,22 +52,23 @@
if (job != 0)
{
m_RoleHead.gameObject.SetActive(true);
- m_RoleHead.SetSprite(GeneralDefine.GetJobHeadPortrait(job, 0));
- }
- else
- {
- m_RoleHead.gameObject.SetActive(false);
- }
-
- m_RoleName.text = _serverData.roleid;
- if (_serverData.level > 0)
- {
m_RoleName.gameObject.SetActive(true);
m_RoleLevel.gameObject.SetActive(true);
+ m_OpenTime.gameObject.SetActive(false);
+
+ m_RoleHead.SetSprite(GeneralDefine.GetJobHeadPortrait(job, 0));
+ m_RoleName.text = _serverData.roleid;
m_RoleLevel.text = Language.Get("Z1024", _serverData.level);
}
else
{
+ m_OpenTime.gameObject.SetActive(m_ServerData.start_date > DateTime.Now);
+ if (m_ServerData.start_date > DateTime.Now)
+ {
+ m_OpenTime.text = Language.Get("ServerOnTime", m_ServerData.start_date.ToString("MM-dd HH:mm"));
+ }
+
+ m_RoleHead.gameObject.SetActive(false);
m_RoleName.gameObject.SetActive(false);
m_RoleLevel.gameObject.SetActive(false);
}
diff --git a/System/Realm/RealmBossShow.cs b/System/Realm/RealmBossShow.cs
index 52ee3ac..5367500 100644
--- a/System/Realm/RealmBossShow.cs
+++ b/System/Realm/RealmBossShow.cs
@@ -125,10 +125,21 @@
var secondary = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retWeapon2);
var _secondaryId = secondary == null ? 0 : (int)secondary.itemInfo.ItemID;
+
+ var fashionClothes = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retFashionClothes);
+ var fashionClothesId = fashionClothes == null ? 0 : (int)fashionClothes.itemInfo.ItemID;
+
+ var fashionWeapon = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retFashionWeapon);
+ var fashionWeaponId = fashionWeapon == null ? 0 : (int)fashionWeapon.itemInfo.ItemID;
+
+ var fashionSecondary = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retFashionWeapon2);
+ var fashionSecondaryId = fashionSecondary == null ? 0 : (int)fashionSecondary.itemInfo.ItemID;
#endregion
showPoint = m_HeroStage;
- var _hero = ShowHero(_job, _clothesId, _weaponId, _wingsId, _secondaryId);
+ var _hero = ShowHero(_job, fashionClothesId > 0 ? fashionClothesId : _clothesId,
+ fashionWeaponId > 0 ? fashionWeaponId : _weaponId, _wingsId,
+ fashionSecondaryId > 0 ? fashionSecondaryId : _secondaryId);
if (_hero != null)
{
SitDown();
diff --git a/System/Role/GodWeaponPreviewWin.cs b/System/Role/GodWeaponPreviewWin.cs
index 841b30e..e9a678c 100644
--- a/System/Role/GodWeaponPreviewWin.cs
+++ b/System/Role/GodWeaponPreviewWin.cs
@@ -237,6 +237,15 @@
var secondary = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retWeapon2);
var secondaryId = secondary == null ? 0 : (int)secondary.itemInfo.ItemID;
+ var fashionClothes = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retFashionClothes);
+ var fashionClothesId = fashionClothes == null ? 0 : (int)fashionClothes.itemInfo.ItemID;
+
+ var fashionWeapon = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retFashionWeapon);
+ var fashionWeaponId = fashionWeapon == null ? 0 : (int)fashionWeapon.itemInfo.ItemID;
+
+ var fashionSecondary = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retFashionWeapon2);
+ var fashionSecondaryId = fashionSecondary == null ? 0 : (int)fashionSecondary.itemInfo.ItemID;
+
int _suitLevel = 0;
if (clothes != null)
@@ -269,11 +278,11 @@
UI3DPlayerExhibitionData data = new UI3DPlayerExhibitionData()
{
job = job,
- clothesId = clothesId,
+ clothesId = fashionClothesId > 0 ? fashionClothesId : clothesId,
suitLevel = _suitLevel,
- weaponId = weaponId,
+ weaponId = fashionWeaponId > 0 ? fashionWeaponId : weaponId,
wingsId = wingsId,
- secondaryId = secondaryId,
+ secondaryId = fashionSecondaryId > 0 ? fashionSecondaryId : secondaryId,
isDialogue = false,
godWeapons = dict
};
diff --git a/System/Role/RolePanel.cs b/System/Role/RolePanel.cs
index a88436b..5901b75 100644
--- a/System/Role/RolePanel.cs
+++ b/System/Role/RolePanel.cs
@@ -16,6 +16,7 @@
[SerializeField] FunctionButton functionButtonRole;
[SerializeField] FunctionButton functionButtonMagician;
[SerializeField] FunctionButton m_GatherSoul;
+ [SerializeField] FunctionButton m_FashionDress;
[SerializeField] RectTransform m_RoleInfoRt;
[SerializeField] Text m_PropertyAtk;
@@ -267,6 +268,7 @@
functionButtonMagician.onClick.AddListener(OnFuncMagician);
m_AddPoint.onClick.AddListener(OnPromoteClick);
m_GatherSoul.onClick.AddListener(GatherSoul);
+ m_FashionDress.onClick.AddListener(OpenFashionDress);
m_PlayerPropertyBtn.onClick.AddListener(OnAttrExplainClick);
m_TitleBtn.onClick.AddListener(OnDesignationClick);
m_RenameBtn.onClick.AddListener(OnRenameClick);
@@ -283,6 +285,13 @@
functionOrder = m_GatherSoul.order;
}
+ private void OpenFashionDress()
+ {
+ CloseChild();
+ WindowCenter.Instance.Open<FashionDressWin>();
+ functionOrder = m_FashionDress.order;
+ }
+
private void OnFuncMagician()
{
CloseChild();
diff --git a/System/RoleParticulars/RoleParticularsWin.cs b/System/RoleParticulars/RoleParticularsWin.cs
index ef9a046..5557bf4 100644
--- a/System/RoleParticulars/RoleParticularsWin.cs
+++ b/System/RoleParticulars/RoleParticularsWin.cs
@@ -238,6 +238,24 @@
{
weapon2 = itemData.ItemID;
}
+ int fashionClothes = 0;
+ itemData = model.GetItemData(RoleEquipType.retFashionClothes);
+ if (itemData != null)
+ {
+ fashionClothes = itemData.ItemID;
+ }
+ int fashionWeapon = 0;
+ itemData = model.GetItemData(RoleEquipType.retFashionWeapon);
+ if (itemData != null)
+ {
+ fashionWeapon = itemData.ItemID;
+ }
+ int fashionWeapon2 = 0;
+ itemData = model.GetItemData(RoleEquipType.retFashionWeapon2);
+ if (itemData != null)
+ {
+ fashionWeapon2 = itemData.ItemID;
+ }
var godWeapons = new Dictionary<int, int>();
var magicianModel = ModelCenter.Instance.GetModel<MagicianModel>();
@@ -251,11 +269,11 @@
var data = new UI3DPlayerExhibitionData
{
job = viewPlayerData.rolePropData.Job,
- clothesId = clothes,
+ clothesId = fashionClothes > 0 ? fashionClothes : clothes,
suitLevel = _suitLevel,
- weaponId = weapon,
+ weaponId = fashionWeapon > 0 ? fashionWeapon : weapon,
wingsId = wing,
- secondaryId = weapon2,
+ secondaryId = fashionWeapon2 > 0 ? fashionWeapon2 : weapon2,
godWeapons = godWeapons,
isDialogue = false,
};
diff --git a/System/Rune/RuneModel.cs b/System/Rune/RuneModel.cs
index 11c5e14..127b09f 100644
--- a/System/Rune/RuneModel.cs
+++ b/System/Rune/RuneModel.cs
@@ -181,7 +181,8 @@
{
PlayerPropertyConfig playerPro = Config.Instance.Get<PlayerPropertyConfig>(runeTypes[i]);
string _str = StringUtility.Contact(playerPro.Name, "+",
- UIHelper.ReplacePercentage(GetRuneAttrVal(id, level, runeTypes[i]), playerPro.ISPercentage),
+ UIHelper.ReplacePercentage(GetRuneAttrVal(id, level, runeTypes[i]), playerPro.ISPercentage,
+ UIHelper.GetPropertyDecimalCount(playerPro.ID)),
playerPro.ISPercentage == 1 ? "%" : string.Empty, i == runeTypes.Length - 1 ? string.Empty : "\n");
_textBuilder.Append(_str);
}
diff --git a/System/Rune/RuneMosaicWin.cs b/System/Rune/RuneMosaicWin.cs
index 988b28d..85b1de1 100644
--- a/System/Rune/RuneMosaicWin.cs
+++ b/System/Rune/RuneMosaicWin.cs
@@ -181,7 +181,7 @@
if (AchievementGoto.achievementType == AchievementGoto.RuneLevelUp)
{
int _hole = 0;
- if(model.CanLevelUpRune(out _hole))
+ if (model.CanLevelUpRune(out _hole))
{
OnRuneHoleClick(_hole);
var _effect = AchievementGuideEffectPool.Require(1);
@@ -354,11 +354,12 @@
presentRuneImg.SetSprite(_itemCfg.IconKey);
presentRuneAttrTxt.text = model.GetRuneAttrStr(data.id, data.lv);
presentRuneNameTxt.text = StringUtility.Contact(_itemCfg.ItemName, Language.Get("Z1024", data.lv));
- presentRuneNameTxt.color = UIHelper.GetUIColor(_itemCfg.ItemColor);
+ presentRuneNameTxt.color = UIHelper.GetUIColor(_itemCfg.ItemColor, true);
var _propertyCfg = Config.Instance.Get<PlayerPropertyConfig>(_runeCfg.AttrType[0]);
var _propertyValue = model.GetRuneAttrVal(data.id, data.lv, _runeCfg.AttrType[0]);
- runeLevelUpAttr1.text = StringUtility.Contact(_propertyCfg.Name, " ", "+", UIHelper.ReplacePercentage(_propertyValue, _propertyCfg.ISPercentage),
+ runeLevelUpAttr1.text = StringUtility.Contact(_propertyCfg.Name, "+", UIHelper.ReplacePercentage(_propertyValue, _propertyCfg.ISPercentage,
+ UIHelper.GetPropertyDecimalCount(_propertyCfg.ID)),
_propertyCfg.ISPercentage == 1 ? "%" : string.Empty);
bool _isRuneMaxLv = data.lv >= model.GetRuneMaxLevelByItem(data.id);
@@ -366,7 +367,8 @@
if (!_isRuneMaxLv)
{
_propertyValue = model.GetRuneAttrVal(data.id, data.lv + 1, _runeCfg.AttrType[0]);
- runeLevelUpAttrNum1.text = StringUtility.Contact("+", UIHelper.ReplacePercentage(_propertyValue, _propertyCfg.ISPercentage),
+ runeLevelUpAttrNum1.text = StringUtility.Contact("+", UIHelper.ReplacePercentage(_propertyValue, _propertyCfg.ISPercentage,
+ UIHelper.GetPropertyDecimalCount(_propertyCfg.ID)),
_propertyCfg.ISPercentage == 1 ? "%" : string.Empty);
}
@@ -374,13 +376,15 @@
{
_propertyCfg = Config.Instance.Get<PlayerPropertyConfig>(_runeCfg.AttrType[1]);
_propertyValue = model.GetRuneAttrVal(data.id, data.lv, _runeCfg.AttrType[1]);
- runeLevelUpAttr2.text = StringUtility.Contact(_propertyCfg.Name, " ", "+", UIHelper.ReplacePercentage(_propertyValue, _propertyCfg.ISPercentage),
+ runeLevelUpAttr2.text = StringUtility.Contact(_propertyCfg.Name, "+", UIHelper.ReplacePercentage(_propertyValue, _propertyCfg.ISPercentage,
+ UIHelper.GetPropertyDecimalCount(_propertyCfg.ID)),
_propertyCfg.ISPercentage == 1 ? "%" : string.Empty);
runeLevelUpAttrNum2.gameObject.SetActive(!_isRuneMaxLv);
if (!_isRuneMaxLv)
{
_propertyValue = model.GetRuneAttrVal(data.id, data.lv + 1, _runeCfg.AttrType[1]);
- runeLevelUpAttrNum2.text = StringUtility.Contact("+", UIHelper.ReplacePercentage(_propertyValue, _propertyCfg.ISPercentage),
+ runeLevelUpAttrNum2.text = StringUtility.Contact("+", UIHelper.ReplacePercentage(_propertyValue, _propertyCfg.ISPercentage,
+ UIHelper.GetPropertyDecimalCount(_propertyCfg.ID)),
_propertyCfg.ISPercentage == 1 ? "%" : string.Empty);
}
}
@@ -416,7 +420,7 @@
}
if (_tower == 0)
{
- m_RuneUnlockTip.text = Language.Get("L1060",model.doublePropRuneInlayDict.Values.Last());
+ m_RuneUnlockTip.text = Language.Get("L1060", model.doublePropRuneInlayDict.Values.Last());
}
else
{
diff --git a/System/WindowBase/ModelCenter.cs b/System/WindowBase/ModelCenter.cs
index e08b8a9..f8435e0 100644
--- a/System/WindowBase/ModelCenter.cs
+++ b/System/WindowBase/ModelCenter.cs
@@ -218,6 +218,7 @@
RegisterModel<GatherSoulComposeModel>();
RegisterModel<GatherSoulDungeonModel>();
RegisterModel<KingTreasureModel>();
+ RegisterModel<FashionDressModel>();
inited = true;
}
diff --git a/UI/Common/UI3DHeroSkillShow.cs b/UI/Common/UI3DHeroSkillShow.cs
index 1f83392..8575742 100644
--- a/UI/Common/UI3DHeroSkillShow.cs
+++ b/UI/Common/UI3DHeroSkillShow.cs
@@ -111,6 +111,15 @@
var secondary = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retWeapon2);
var _secondaryId = secondary == null ? 0 : (int)secondary.itemInfo.ItemID;
+ var fashionClothes = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retFashionClothes);
+ var fashionClothesId = fashionClothes == null ? 0 : (int)fashionClothes.itemInfo.ItemID;
+
+ var fashionWeapon = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retFashionWeapon);
+ var fashionWeaponId = fashionWeapon == null ? 0 : (int)fashionWeapon.itemInfo.ItemID;
+
+ var fashionSecondary = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retFashionWeapon2);
+ var fashionSecondaryId = fashionSecondary == null ? 0 : (int)fashionSecondary.itemInfo.ItemID;
+
int _suitLevel = 0;
if (clothes != null)
@@ -137,11 +146,11 @@
UI3DPlayerExhibitionData data = new UI3DPlayerExhibitionData()
{
job = _job,
- clothesId = _clothesId,
+ clothesId = fashionClothesId > 0 ? fashionClothesId : _clothesId,
suitLevel = _suitLevel,
- weaponId = _weaponId,
+ weaponId = fashionWeaponId > 0 ? fashionWeaponId : _weaponId,
wingsId = _wingsId,
- secondaryId = _secondaryId,
+ secondaryId = fashionSecondaryId > 0 ? fashionSecondaryId : _secondaryId,
godWeapons = dict,
isDialogue = false,
};
diff --git a/UI/Common/UI3DModelExhibition.cs b/UI/Common/UI3DModelExhibition.cs
index 002cb4e..93de580 100644
--- a/UI/Common/UI3DModelExhibition.cs
+++ b/UI/Common/UI3DModelExhibition.cs
@@ -26,8 +26,7 @@
[SerializeField] UI3DModelInteractProcessor m_InteractProcessor;
[SerializeField] ColorCorrectionCurves m_CameraColor;
- public bool interactable
- {
+ public bool interactable {
get { return m_Interactable; }
set { m_Interactable = value; }
}
@@ -36,8 +35,7 @@
int m_HorseModelId = 0;
GameObject horseModel = null;
- public GameObject NpcModelHorse
- {
+ public GameObject NpcModelHorse {
get { return horseModel; }
set { horseModel = value; }
}
@@ -46,8 +44,7 @@
GameObject npcModel = null;
SFXController m_NpcEffect;
readonly List<SFXController> m_BindEffectList = new List<SFXController>();
- public GameObject NpcModelPet
- {
+ public GameObject NpcModelPet {
get { return npcModel; }
set { npcModel = value; }
}
@@ -73,10 +70,8 @@
public static UI3DModelExhibition Instance { get; private set; }
static UI3DModelExhibition m_InstanceClone1 = null;
- public static UI3DModelExhibition InstanceClone1
- {
- get
- {
+ public static UI3DModelExhibition InstanceClone1 {
+ get {
if (m_InstanceClone1 == null)
{
CreateCloneStage();
@@ -116,6 +111,9 @@
public void ShowLoginPlayer(RawImage _rawImage, int _job)
{
+ var flashClothes = 0;
+ var flashWeapon = 0;
+ var flashSecondary = 0;
var clothesItemId = 0;
var weaponItemId = 0;
var wingsItemId = 0;
@@ -128,6 +126,15 @@
var equipInfo = equipInfos[i];
switch ((RoleEquipType)equipInfo.ItemPlace)
{
+ case RoleEquipType.retFashionClothes:
+ flashClothes = (int)equipInfo.ItemID;
+ break;
+ case RoleEquipType.retFashionWeapon:
+ flashWeapon = (int)equipInfo.ItemID;
+ break;
+ case RoleEquipType.retFashionWeapon2:
+ flashSecondary = (int)equipInfo.ItemID;
+ break;
case RoleEquipType.retWeapon:
weaponItemId = (int)equipInfo.ItemID;
break;
@@ -155,11 +162,11 @@
var data = new UI3DPlayerExhibitionData
{
job = _job,
- clothesId = clothesItemId,
+ clothesId = flashClothes > 0 ? flashClothes : clothesItemId,
suitLevel = suitLevel,
- weaponId = weaponItemId,
+ weaponId = flashWeapon > 0 ? flashWeapon : weaponItemId,
wingsId = wingsItemId,
- secondaryId = secondaryItemId,
+ secondaryId = flashSecondary > 0 ? flashSecondary : secondaryItemId,
isDialogue = false,
godWeapons = new Dictionary<int, int>() {
{ 1, (int)PlayerDatas.Instance.loginInfo.ExAttr15 },
@@ -173,27 +180,29 @@
public void ShowPlayer(RawImage _rawImage, int _job, bool _isDialogue = false)
{
- var clothes = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retClothes);
+ var clothes = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retFashionClothes);
+ clothes = clothes ?? playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retClothes);
var clothesId = clothes == null ? 0 : (int)clothes.itemInfo.ItemID;
- var weapon = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retWeapon);
+ var weapon = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retFashionWeapon);
+ weapon = weapon ?? playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retWeapon);
var weaponId = weapon == null ? 0 : (int)weapon.itemInfo.ItemID;
var wings = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retWing);
var wingsId = wings == null ? 0 : (int)wings.itemInfo.ItemID;
- var secondary = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retWeapon2);
+ var secondary = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retFashionWeapon2);
+ secondary = secondary ?? playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retWeapon2);
var secondaryId = secondary == null ? 0 : (int)secondary.itemInfo.ItemID;
- int _suitLevel = 0;
-
+ int suitLevel = 0;
if (clothes != null)
{
if (clothes.itemInfo.IsSuite == 1)
{
if (clothes.GetUseDataModel(30) != null && clothes.GetUseDataModel(30)[0] != 0)
{
- _suitLevel = clothes.GetUseDataModel(30)[0];
+ suitLevel = clothes.GetUseDataModel(30)[0];
}
}
}
@@ -207,7 +216,7 @@
{
job = _job,
clothesId = clothesId,
- suitLevel = _suitLevel,
+ suitLevel = suitLevel,
weaponId = weaponId,
wingsId = wingsId,
secondaryId = secondaryId,
@@ -223,33 +232,49 @@
ShowPlayer(_rawImage, data);
}
- public void ShowPlayer(RawImage _rawImage, int _job, RoleEquipType _exceptEquip)
+ public void ShowPlayer(RawImage rawImage, int job, RoleEquipType exceptEquip)
{
- var clothes = _exceptEquip == RoleEquipType.retClothes ?
- null : playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retClothes);
- var clothesId = clothes == null ? 0 : (int)clothes.itemInfo.ItemID;
+ var clothesId = 0;
+ var weaponId = 0;
+ var wingsId = 0;
+ var secondaryId = 0;
+ ItemModel clothes = null;
- var weapon = _exceptEquip == RoleEquipType.retWeapon ?
- null : playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retWeapon);
- var weaponId = weapon == null ? 0 : (int)weapon.itemInfo.ItemID;
+ if (exceptEquip != RoleEquipType.retClothes)
+ {
+ clothes = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retFashionClothes);
+ clothes = clothes ?? playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retClothes);
+ clothesId = clothes == null ? 0 : (int)clothes.itemInfo.ItemID;
+ }
- var wings = _exceptEquip == RoleEquipType.retWing ?
- null : playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retWing);
- var wingsId = wings == null ? 0 : (int)wings.itemInfo.ItemID;
+ if (exceptEquip != RoleEquipType.retWeapon)
+ {
+ var weapon = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retFashionWeapon);
+ weapon = weapon ?? playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retWeapon);
+ weaponId = weapon == null ? 0 : (int)weapon.itemInfo.ItemID;
+ }
- var secondary = _exceptEquip == RoleEquipType.retWeapon2 ?
- null : playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retWeapon2);
- var secondaryId = secondary == null ? 0 : (int)secondary.itemInfo.ItemID;
+ if (exceptEquip != RoleEquipType.retWing)
+ {
+ var wings = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retWing);
+ wingsId = wings == null ? 0 : (int)wings.itemInfo.ItemID;
+ }
- int _suitLevel = 0;
+ if (exceptEquip != RoleEquipType.retWeapon2)
+ {
+ var secondary = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retFashionWeapon2);
+ secondary = secondary ?? playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retWeapon2);
+ secondaryId = secondary == null ? 0 : (int)secondary.itemInfo.ItemID;
+ }
+ var suitLevel = 0;
if (clothes != null)
{
if (clothes.itemInfo.IsSuite == 1)
{
if (clothes.GetUseDataModel(30) != null && clothes.GetUseDataModel(30)[0] != 0)
{
- _suitLevel = clothes.GetUseDataModel(30)[0];
+ suitLevel = clothes.GetUseDataModel(30)[0];
}
}
}
@@ -261,9 +286,9 @@
var godWeapon4 = magicianModel.GetGodWeaponInfo(4);
var data = new UI3DPlayerExhibitionData
{
- job = _job,
+ job = job,
clothesId = clothesId,
- suitLevel = _suitLevel,
+ suitLevel = suitLevel,
weaponId = weaponId,
wingsId = wingsId,
secondaryId = secondaryId,
@@ -276,7 +301,7 @@
}
};
- ShowPlayer(_rawImage, data);
+ ShowPlayer(rawImage, data);
}
void ShowPlayer(RawImage _rawImage, UI3DPlayerExhibitionData data)
@@ -633,9 +658,13 @@
if (godWeaponEffect != null)
{
- godWeaponEffect.transform.localPosition = config.effectPosition;
- godWeaponEffect.transform.localEulerAngles = config.effectAngles;
- godWeaponEffect.transform.localScale = config.effectScale;
+ var index = Mathf.Max(0, job - 1);
+ godWeaponEffect.transform.localPosition = index < config.effectPosition.Length ?
+ config.effectPosition[index] : Vector3.zero;
+ godWeaponEffect.transform.localEulerAngles = index < config.effectAngles.Length ?
+ config.effectAngles[index] : Vector3.zero;
+ godWeaponEffect.transform.localScale = index < config.effectScale.Length ?
+ config.effectScale[index] : Vector3.one;
}
if (_rawImage != null)
diff --git a/UI/Core/ImageEx.cs b/UI/Core/ImageEx.cs
index 41ef61d..65e202c 100644
--- a/UI/Core/ImageEx.cs
+++ b/UI/Core/ImageEx.cs
@@ -43,6 +43,8 @@
}
}
+ [SerializeField] string m_IconKey = string.Empty;
+
bool inited = false;
protected override void Awake()
{
@@ -54,6 +56,10 @@
this.material = this.canvasAddition == null ? MaterialUtility.GetDefaultSpriteGrayMaterial() : this.canvasAddition.spriteGrayMaterial;
}
+ if (!string.IsNullOrEmpty(m_IconKey))
+ {
+ this.SetSprite(m_IconKey);
+ }
}
}
diff --git a/Utility/EnumHelper.cs b/Utility/EnumHelper.cs
index e70f361..6ce8665 100644
--- a/Utility/EnumHelper.cs
+++ b/Utility/EnumHelper.cs
@@ -374,6 +374,9 @@
retBaldric5, //17 浣╅グ
retBaldric6, //18 浣╅グ
mount = 19,//褰撳墠鐨勫潗楠�
+ retFashionWeapon = 20,//鏃惰姝﹀櫒
+ retFashionClothes = 21,//鏃惰琛f湇
+ retFashionWeapon2 = 22,//鏃惰鍓墜
retMax,
};
diff --git a/Utility/StageLoadTimeOutCatcher.cs b/Utility/StageLoadTimeOutCatcher.cs
index 1652b5c..1a7fed6 100644
--- a/Utility/StageLoadTimeOutCatcher.cs
+++ b/Utility/StageLoadTimeOutCatcher.cs
@@ -8,11 +8,11 @@
const int timeOut = 20;//绉�
- public static DateTime got0102Time = DateTime.MinValue;
- public static DateTime gotA126Time = DateTime.MinValue;
- public static DateTime gotA127Time = DateTime.MinValue;
- public static DateTime got0109Time = DateTime.MinValue;
- public static DateTime send0107Time = DateTime.MinValue;
+ public static ProtocolRecorder got0102Time;
+ public static ProtocolRecorder gotA126Time;
+ public static ProtocolRecorder gotA127Time;
+ public static ProtocolRecorder got0109Time;
+ public static ProtocolRecorder send0107Time;
public static StageLoadTimeOutCatcher Begin(int stageId)
{
@@ -48,24 +48,45 @@
var description = StringUtility.Contact(
"寮�濮嬫椂闂�:", startTime.ToString("HH:mm:ss"), ";",
"瓒呮椂鏃堕棿:", DateTime.Now.ToString("HH:mm:ss"),
- "0102鏃堕棿:", got0102Time.ToString("HH:mm:ss"), ";",
- "A126鏃堕棿:", gotA126Time.ToString("HH:mm:ss"), ";",
- "A127鏃堕棿:", gotA127Time.ToString("HH:mm:ss"), ";",
- "0109鏃堕棿:", got0109Time.ToString("HH:mm:ss"), ";",
- "0107鏃堕棿:", send0107Time.ToString("HH:mm:ss"));
+ "0102璁板綍:", got0102Time.ToString(), ";",
+ "A126璁板綍:", gotA126Time.ToString(), ";",
+ "A127璁板綍:", gotA127Time.ToString(), ";",
+ "0109璁板綍:", got0109Time.ToString(), ";",
+ "0107璁板綍:", send0107Time.ToString());
ExceptionCatcher.ReportException(title, description);
Stop();
}
}
- public static void ReportChangeMapRecord(GameNetSystem.SocketType socketType, string protocol, DateTime time)
+ public static void RecordProtocol(GameNetSystem.SocketType socketType, string number, DateTime time)
{
+ var recorder = new ProtocolRecorder(number, time, socketType);
+ switch (number)
+ {
+ case "0102":
+ got0102Time = recorder;
+ break;
+ case "A126":
+ gotA126Time = recorder;
+ break;
+ case "A127":
+ gotA127Time = recorder;
+ break;
+ case "0109":
+ got0109Time = recorder;
+ break;
+ case "0107":
+ send0107Time = recorder;
+ break;
+ default:
+ break;
+ }
+
try
{
- var title = StringUtility.Contact("鍦板浘鍔犺浇璁板綍-->鍗忚缂栧彿锛�", protocol);
- var description = StringUtility.Contact("鏈嶅姟鍣�:", socketType, ";",
- "鍗忚缂栧彿:", protocol, ";", "鏃堕棿:", time.ToString("HH:mm:ss"), "鐜╁:", PlayerDatas.Instance.baseData.PlayerName);
+ var title = StringUtility.Contact("鍦板浘鍔犺浇璁板綍-->灏佸寘缂栧彿锛�", number);
+ var description = StringUtility.Contact(recorder.ToString(), "鐜╁:", PlayerDatas.Instance.baseData.PlayerName);
ExceptionCatcher.ReportException(title, description);
}
@@ -73,7 +94,25 @@
{
}
+ }
+ public struct ProtocolRecorder
+ {
+ public string number;
+ public DateTime time;
+ public GameNetSystem.SocketType socketType;
+
+ public ProtocolRecorder(string number, DateTime time, GameNetSystem.SocketType socketType)
+ {
+ this.number = number;
+ this.time = time;
+ this.socketType = socketType;
+ }
+
+ public override string ToString()
+ {
+ return StringUtility.Contact("灏佸寘锛�", number, ";", "鏃堕棿锛�", time.ToString("HH:mm:ss"), ";", "鏈嶅姟鍣細", socketType);
+ }
}
}
diff --git a/Utility/UIHelper.cs b/Utility/UIHelper.cs
index 9aa861b..abfee0f 100644
--- a/Utility/UIHelper.cs
+++ b/Utility/UIHelper.cs
@@ -366,6 +366,8 @@
{
case 73:
return 2;
+ case 29:
+ return 2;
default:
return 1;
}
--
Gitblit v1.8.0