From 2bece4f6513bd4bb5f15684a2f7ff43628cd0f85 Mon Sep 17 00:00:00 2001
From: client_Hale <339726288@qq.com>
Date: 星期四, 10 一月 2019 21:20:36 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts

---
 System/CrossServerOneVsOne/RankCellCtrl.cs          |   40 +++--
 System/GatheringSoul/GatherSoulComposeSelectCell.cs |    2 
 System/KnapSack/Logic/ModelShowPerfab.cs            |   93 +++++++++++++
 UI/Common/UI3DHeroSkillShow.cs                      |   35 ++--
 System/CrossServerBoss/CrossServerBossModel.cs      |   10 
 System/FairyAu/KingTempleWin.cs                     |    9 
 UI/Common/UI3DShowHero.cs                           |  101 +++++++++++++-
 System/RoleParticulars/RoleParticularsWin.cs        |    9 
 System/RoleParticulars/RoleParticularModel.cs       |   16 ++
 System/FashionDress/FashionDressWin.cs              |   13 +
 System/KnapSack/Logic/ItemInfoWin.cs                |    5 
 UI/Common/UI3DModelExhibition.cs                    |   52 +++++--
 System/Role/GodWeaponPreviewWin.cs                  |   13 +
 System/Login/CreateRoleHeroShow.cs                  |   21 +-
 14 files changed, 331 insertions(+), 88 deletions(-)

diff --git a/System/CrossServerBoss/CrossServerBossModel.cs b/System/CrossServerBoss/CrossServerBossModel.cs
index 1937322..1413279 100644
--- a/System/CrossServerBoss/CrossServerBossModel.cs
+++ b/System/CrossServerBoss/CrossServerBossModel.cs
@@ -253,7 +253,7 @@
 
             sendInfo.NPCIDList = string.Format("[{0}]", string.Join(",", stringArray));
             sendInfo.NPCIDListLen = (byte)sendInfo.NPCIDList.Length;
-            GameNetSystem.Instance.SendInfo(sendInfo);
+            GameNetSystem.Instance.SendToCrossServer(sendInfo);
         }
 
         public void RequestBoxSurplusInfo()
@@ -263,7 +263,7 @@
             sendInfo.LineID = (ushort)PlayerDatas.Instance.baseData.dungeonLineId;
             sendInfo.NPCIDList = string.Format("[{0},{1}]", bigBoxNpcId, smallBoxNpcId);
             sendInfo.NPCIDListLen = (byte)sendInfo.NPCIDList.Length;
-            GameNetSystem.Instance.SendInfo(sendInfo);
+            GameNetSystem.Instance.SendToCrossServer(sendInfo);
         }
 
         public void RequestEliteSurplusInfo()
@@ -279,7 +279,7 @@
 
             sendInfo.NPCIDList = string.Format("[{0}]", string.Join(",", stringArray));
             sendInfo.NPCIDListLen = (byte)sendInfo.NPCIDList.Length;
-            GameNetSystem.Instance.SendInfo(sendInfo);
+            GameNetSystem.Instance.SendToCrossServer(sendInfo);
         }
 
         public void UpdateMonsterSurplusInfo(HA714_tagMCNPCCntList _npcInfoes)
@@ -399,7 +399,7 @@
 
         private void OnFunctionStateChange(int id)
         {
-            if (id == 160)
+            if (id == 162)
             {
                 UpdateRedpoint();
             }
@@ -407,7 +407,7 @@
 
         private void UpdateRedpoint()
         {
-            if (!FuncOpen.Instance.IsFuncOpen(160))
+            if (!FuncOpen.Instance.IsFuncOpen(162))
             {
                 redpoint.count = 0;
             }
diff --git a/System/CrossServerOneVsOne/RankCellCtrl.cs b/System/CrossServerOneVsOne/RankCellCtrl.cs
index 2653eb2..8f29b20 100644
--- a/System/CrossServerOneVsOne/RankCellCtrl.cs
+++ b/System/CrossServerOneVsOne/RankCellCtrl.cs
@@ -10,7 +10,8 @@
 using UnityEngine.UI;
 using System;
 
-namespace Snxxz.UI {
+namespace Snxxz.UI
+{
 
     public class RankCellCtrl : ScrollerUI
     {
@@ -19,7 +20,7 @@
         [SerializeField] Image m_RankNumBottom;
         [SerializeField] Text m_NameTxt;
         [SerializeField] Text m_JobTxt;
-       // [SerializeField] Text m_RankWhatTxt;
+        // [SerializeField] Text m_RankWhatTxt;
         [SerializeField] Text m_SegmentTxt;
         [SerializeField] Text m_IntegralTxt;
         [SerializeField] Image m_RealmImage;
@@ -55,7 +56,7 @@
             m_RealmImage.gameObject.SetActive(false);
             RankingInformationClass data = null;
             ZoneRankingStruct zoneRanking = new ZoneRankingStruct();
-            zoneRanking.ZoneID= crossServerRewardModel.ZoneID;
+            zoneRanking.ZoneID = crossServerRewardModel.ZoneID;
             zoneRanking.SeasonID = crossServerRewardModel.SeasonID;
             Dictionary<int, RankingInformationClass> rankDic = new Dictionary<int, RankingInformationClass>();
             if (crossServerRewardModel.ZoneRankingDic.ContainsKey(zoneRanking))
@@ -68,11 +69,22 @@
             }
             if (data != null)
             {
-                m_RankButton.SetListener(()=> 
+                m_RankButton.SetListener(() =>
                 {
                     //DebugEx.LogError(data.PlayerID);
                     roleParticularModel.ViewFairyCrossServerOneVsOne(data.PlayerID);
                 });
+
+                if (data.PlayerID == PlayerDatas.Instance.baseData.PlayerID)
+                {
+                    m_JobTxt.color = new Color32(16, 157, 6, 255);
+                    m_NameTxt.color = new Color32(16, 157, 6, 255);
+                }
+                else
+                {
+                    m_JobTxt.color = new Color32(64, 28, 6, 255);
+                    m_NameTxt.color = new Color32(64, 28, 6, 255); ;
+                }
                 m_NameTxt.text = data.PlayerName;
                 m_JobTxt.text = OccupationNameConfig.GetOccupationName(data.Job, 1);
                 RealmConfig presentCfg = Config.Instance.Get<RealmConfig>(data.Realm);
@@ -81,7 +93,7 @@
                     m_RealmImage.gameObject.SetActive(true);
                     m_RealmImage.SetSprite(presentCfg.Img);
                 }
-              //  m_RankWhatTxt.text = data.Power.ToString();
+                //  m_RankWhatTxt.text = data.Power.ToString();
                 Segment(data.DanLv);
                 m_IntegralTxt.text = data.PkScore.ToString();
             }
@@ -89,23 +101,23 @@
             {
                 m_NameTxt.text = Language.Get("L1046");
                 m_JobTxt.text = "-";
-              //  m_RankWhatTxt.text = "-";
-                m_SegmentTxt.text= "-";
-                m_IntegralTxt.text= "-";
+                //  m_RankWhatTxt.text = "-";
+                m_SegmentTxt.text = "-";
+                m_IntegralTxt.text = "-";
 
                 m_NameTxt.color = UIHelper.GetUIColor(TextColType.NavyBrown);
                 m_JobTxt.color = UIHelper.GetUIColor(TextColType.NavyBrown);
-               // m_RankWhatTxt.color = UIHelper.GetUIColor(TextColType.NavyBrown);
+                // m_RankWhatTxt.color = UIHelper.GetUIColor(TextColType.NavyBrown);
                 m_SegmentTxt.color = UIHelper.GetUIColor(TextColType.NavyBrown);
                 m_RankButton.RemoveAllListeners();
             }
         }
 
-        private void  Segment(int Danlv)
+        private void Segment(int Danlv)
         {
             var config = Config.Instance.Get<CrossServerArenaConfig>(Danlv);
             m_SegmentTxt.text = config.Name;
-            m_SegmentTxt.color= UIHelper.GetDanLVColor(Danlv, false);
+            m_SegmentTxt.color = UIHelper.GetDanLVColor(Danlv, false);
             //if (Danlv >= 24)
             //{
             //    m_SegmentTxt.color = new Color32(255, 3, 3, 255);
@@ -124,9 +136,9 @@
             //}
         }
 
-    }
-
-   
+    }
+
+
 }
 
 
diff --git a/System/FairyAu/KingTempleWin.cs b/System/FairyAu/KingTempleWin.cs
index f7387a2..4c53d01 100644
--- a/System/FairyAu/KingTempleWin.cs
+++ b/System/FairyAu/KingTempleWin.cs
@@ -215,11 +215,14 @@
                 var data = new UI3DPlayerExhibitionData
                 {
                     job = _leaderData.rolePropData.Job,
-                    clothesId = fashionClothes > 0 ? fashionClothes : clothes,
+                    fashionClothesId = fashionClothes,
+                    fashionWeaponId = fashionWeapon,
+                    fashionSecondaryId = fashionWeapon2,
+                    clothesId =  clothes,
                     suitLevel = _suitEffect,
-                    weaponId = fashionWeapon > 0 ? fashionWeapon : weapon,
+                    weaponId =   weapon,
                     wingsId = wing,
-                    secondaryId = fashionWeapon2 > 0 ? fashionWeapon2 : weapon2,
+                    secondaryId =  weapon2,
                     godWeapons = godWeapons,
                     isDialogue = false,
                 };
diff --git a/System/FashionDress/FashionDressWin.cs b/System/FashionDress/FashionDressWin.cs
index 2ec4d3f..b566ec7 100644
--- a/System/FashionDress/FashionDressWin.cs
+++ b/System/FashionDress/FashionDressWin.cs
@@ -320,6 +320,10 @@
             var secondary = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retWeapon2);
             var secondaryId = secondary == null ? 0 : (int)secondary.itemInfo.ItemID;
 
+            var fashionDressClothesId = 0;
+            var fashionDressWeaponId = 0;
+            var fashionDressSecondaryId = 0;
+
             foreach (var type in model.fashionDressTypes)
             {
                 var selectFashionId = model.GetSelectFashionDress(type);
@@ -334,13 +338,13 @@
                     switch ((RoleEquipType)index)
                     {
                         case RoleEquipType.retFashionWeapon:
-                            weaponId = fashionDress.GetEquipItemId();
+                            fashionDressWeaponId = fashionDress.GetEquipItemId();
                             break;
                         case RoleEquipType.retFashionClothes:
-                            clothesId = fashionDress.GetEquipItemId();
+                            fashionDressClothesId = fashionDress.GetEquipItemId();
                             break;
                         case RoleEquipType.retFashionWeapon2:
-                            secondaryId = fashionDress.GetEquipItemId();
+                            fashionDressSecondaryId = fashionDress.GetEquipItemId();
                             break;
                     }
                 }
@@ -376,6 +380,9 @@
                 weaponId = weaponId,
                 wingsId = wingsId,
                 secondaryId = secondaryId,
+                fashionClothesId = fashionDressClothesId,
+                fashionWeaponId = fashionDressWeaponId,
+                fashionSecondaryId = fashionDressSecondaryId,
                 isDialogue = false,
                 godWeapons = dict
             };
diff --git a/System/GatheringSoul/GatherSoulComposeSelectCell.cs b/System/GatheringSoul/GatherSoulComposeSelectCell.cs
index 006fe6e..1a2907b 100644
--- a/System/GatheringSoul/GatherSoulComposeSelectCell.cs
+++ b/System/GatheringSoul/GatherSoulComposeSelectCell.cs
@@ -40,7 +40,7 @@
             this.itemId = itemId;
             var config = Config.Instance.Get<ItemConfig>(itemId);
             m_ItemName.text = config.ItemName;
-            m_ItemName.color = UIHelper.GetUIColor(config.ItemColor);
+            m_ItemName.color = UIHelper.GetUIColor(config.ItemColor, true);
 
             m_Bottom.SetSprite(model.selectItemId == itemId ? "ChildListBtn_Select" : "ChildListBtn_UnSelect");
         }
diff --git a/System/KnapSack/Logic/ItemInfoWin.cs b/System/KnapSack/Logic/ItemInfoWin.cs
index c798da5..ac32e36 100644
--- a/System/KnapSack/Logic/ItemInfoWin.cs
+++ b/System/KnapSack/Logic/ItemInfoWin.cs
@@ -180,6 +180,11 @@
                     mountSkillDict = itemTipsModel.GetMountSkillDict(itemTipsModel.curAttrData.itemConfig.EffectValueA1);
                     modelShow.SetModelShow(horseConfig.Model, ModelShowType.mount, Language.Get("TreasureEffect103"), horseConfig.ShowFightPower);
                     break;
+                case 83:
+                    bgObj.anchoredPosition3D = new Vector3(197, 0, 0);
+                    modelShow.gameObject.SetActive(true);
+                    modelShow.SetModelShow(itemTipsModel.curAttrData.itemConfig.EffectValueA1, ModelShowType.FashionDress, Language.Get("TreasureEffect103"));
+                    break;
                 default:
                     modelShow.gameObject.SetActive(false);
                     bgObj.anchoredPosition3D = Vector3.zero;
diff --git a/System/KnapSack/Logic/ModelShowPerfab.cs b/System/KnapSack/Logic/ModelShowPerfab.cs
index b0b93b9..17223f2 100644
--- a/System/KnapSack/Logic/ModelShowPerfab.cs
+++ b/System/KnapSack/Logic/ModelShowPerfab.cs
@@ -1,6 +1,7 @@
 锘縰sing UnityEngine;
 using UnityEngine.UI;
 using TableConfig;
+using System.Collections.Generic;
 
 namespace Snxxz.UI
 {
@@ -12,6 +13,11 @@
         [SerializeField] public GameObject fightImg;
 
         ModelShowType showType;
+        FashionDressModel fashionDressModel { get { return ModelCenter.Instance.GetModel<FashionDressModel>(); } }
+        MagicianModel godWeaponModel
+        {
+            get { return ModelCenter.Instance.GetModel<MagicianModel>(); }
+        }
 
         public void OnDisable()
         {
@@ -31,6 +37,7 @@
         {
             titleText.text = title;
             this.showType = showType;
+            var job = PlayerDatas.Instance.baseData.Job;
             switch (showType)
             {
                 case ModelShowType.treasure:
@@ -42,6 +49,9 @@
                 case ModelShowType.pet:
                     var config = Config.Instance.Get<NPCConfig>(id);
                     UI3DModelExhibition.Instance.ShowNPC(id, config.UIModeLOffset, config.UIModelRotation, modelImg);
+                    break;
+                case ModelShowType.FashionDress:
+                    UI3DModelExhibition.Instance.ShowOtherPlayer(modelImg,SetFashionDressData(id));
                     break;
             }
 
@@ -57,12 +67,93 @@
                 fightPowerText.text = fightValue.ToString();
             }
         }
+
+        public UI3DPlayerExhibitionData SetFashionDressData(int fashionId)
+        {
+            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;
+
+            FashionDress fashionDress = null;
+            bool isFashion = fashionDressModel.TryGetFashionDress(fashionId,out fashionDress);
+            var fashionClothesId = 0;
+            var fashionWeaponId = 0;
+            var fashionSecondaryId = 0;
+            if(isFashion)
+            {
+                int itemId = fashionDress.requireLevelUpItem;
+                var itemConfig = Config.Instance.Get<ItemConfig>(itemId);
+                switch(fashionDress.fashionDressType)
+                {
+                    case 1:
+                        fashionClothesId = fashionDress.GetEquipItemId();
+                        break;
+                    case 2:
+                        fashionWeaponId = fashionDress.GetEquipItemId();
+                        break;
+                    case 3:
+                        fashionSecondaryId = 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,
+                fashionClothesId = fashionClothesId,
+                fashionWeaponId = fashionWeaponId,
+                fashionSecondaryId = fashionSecondaryId,
+                isDialogue = false,
+                godWeapons = dict
+            };
+            return data;
+        }
     }
 
     public enum ModelShowType
     {
         treasure, //娉曞疂
         mount, //鍧愰獞
-        pet,
+        pet, //鐏靛疇
+        FashionDress, //鏃惰
     }
 }
diff --git a/System/Login/CreateRoleHeroShow.cs b/System/Login/CreateRoleHeroShow.cs
index 43d4ea7..78dbf26 100644
--- a/System/Login/CreateRoleHeroShow.cs
+++ b/System/Login/CreateRoleHeroShow.cs
@@ -78,9 +78,9 @@
     {
         Dispose();
 
-        var flashClothes = 0;
-        var flashWeapon = 0;
-        var flashSecondary = 0;
+        var fashionClothes = 0;
+        var fashionWeapon = 0;
+        var fashionSecondary = 0;
         var clothesItemId = 0;
         var weaponItemId = 0;
         var wingsItemId = 0;
@@ -93,13 +93,13 @@
             switch ((RoleEquipType)equipInfo.ItemPlace)
             {
                 case RoleEquipType.retFashionClothes:
-                    flashClothes = (int)equipInfo.ItemID;
+                    fashionClothes = (int)equipInfo.ItemID;
                     break;
                 case RoleEquipType.retFashionWeapon:
-                    flashWeapon = (int)equipInfo.ItemID;
+                    fashionWeapon = (int)equipInfo.ItemID;
                     break;
                 case RoleEquipType.retFashionWeapon2:
-                    flashSecondary = (int)equipInfo.ItemID;
+                    fashionSecondary = (int)equipInfo.ItemID;
                     break;
                 case RoleEquipType.retWeapon:
                     weaponItemId = (int)equipInfo.ItemID;
@@ -128,11 +128,14 @@
         var data = new UI3DPlayerExhibitionData()
         {
             job = PlayerDatas.Instance.loginInfo.Job,
-            clothesId = flashClothes > 0 ? flashClothes : clothesItemId,
+            fashionClothesId = fashionClothes,
+            clothesId = clothesItemId,
             suitLevel = suitLevel,
-            weaponId = flashWeapon > 0 ? flashWeapon : weaponItemId,
+            fashionWeaponId = fashionWeapon,
+            weaponId = weaponItemId,
             wingsId = wingsItemId,
-            secondaryId = flashSecondary > 0 ? flashSecondary : secondaryItemId,
+            fashionSecondaryId = fashionSecondary,
+            secondaryId = secondaryItemId,
             godWeapons = new Dictionary<int, int>() {
                     { 1,  (int)PlayerDatas.Instance.loginInfo.ExAttr15 },
                     { 2,  (int)PlayerDatas.Instance.loginInfo.ExAttr16},
diff --git a/System/Role/GodWeaponPreviewWin.cs b/System/Role/GodWeaponPreviewWin.cs
index e9a678c..b2c1994 100644
--- a/System/Role/GodWeaponPreviewWin.cs
+++ b/System/Role/GodWeaponPreviewWin.cs
@@ -33,8 +33,7 @@
         int selectStage = 1;
         public static int selectGodWeaponType = 1;
 
-        MagicianModel model
-        {
+        MagicianModel model {
             get { return ModelCenter.Instance.GetModel<MagicianModel>(); }
         }
 
@@ -278,11 +277,15 @@
             UI3DPlayerExhibitionData data = new UI3DPlayerExhibitionData()
             {
                 job = job,
-                clothesId = fashionClothesId > 0 ? fashionClothesId : clothesId,
+
+                fashionClothesId = fashionClothesId,
+                fashionWeaponId = fashionWeaponId,
+                fashionSecondaryId = fashionSecondaryId,
+                clothesId = clothesId,
                 suitLevel = _suitLevel,
-                weaponId = fashionWeaponId > 0 ? fashionWeaponId : weaponId,
+                weaponId = weaponId,
                 wingsId = wingsId,
-                secondaryId = fashionSecondaryId > 0 ? fashionSecondaryId : secondaryId,
+                secondaryId = secondaryId,
                 isDialogue = false,
                 godWeapons = dict
             };
diff --git a/System/RoleParticulars/RoleParticularModel.cs b/System/RoleParticulars/RoleParticularModel.cs
index 4f58942..4de52d7 100644
--- a/System/RoleParticulars/RoleParticularModel.cs
+++ b/System/RoleParticulars/RoleParticularModel.cs
@@ -190,6 +190,10 @@
         {
             var fightPower = GetHorseSkillFightPower(_id, lv);
             var horseUpConfig = HorseUpConfig.GetHorseIDAndLV(_id, lv);
+            if (horseUpConfig == null)
+            {
+                return 0;
+            }
             Dictionary<int, int> dict = new Dictionary<int, int>();
             int[] propertys = horseUpConfig.AttrType;
             int[] values = horseUpConfig.AttrValue;
@@ -285,6 +289,10 @@
             for (int i = 0; i < horses.Count; i++)
             {
                 HorseUpConfig horseUpConfig = HorseUpConfig.GetHorseIDAndLV(horses[i].id, horses[i].lv);
+                if (horseUpConfig == null)
+                {
+                    continue;
+                }
                 GetHorseProperty(horses[i].id, horses[i].lv, ref propertyDict);
                 int[] propertys = horseUpConfig.AttrType;
                 int[] values = horseUpConfig.AttrValue;
@@ -463,6 +471,10 @@
                      return x.id == condition;
                  });
                 HorseUpConfig horseUpConfig = HorseUpConfig.GetHorseIDAndLV(horseInfo.id, horseInfo.lv);
+                if (horseUpConfig == null)
+                {
+                    return dict;
+                }
                 int[] propertys = horseUpConfig.AttrType;
                 int[] values = horseUpConfig.AttrValue;
                 for (int k = 0; k < propertys.Length; k++)
@@ -478,6 +490,10 @@
                 for (int i = 0; i < horses.Count; i++)
                 {
                     HorseConfig horseConfig = Config.Instance.Get<HorseConfig>(horses[i].id);
+                    if (horseConfig == null)
+                    {
+                        continue;
+                    }
                     if (horseConfig.Quality == condition)
                     {
                         HorseUpConfig horseUpConfig = HorseUpConfig.GetHorseIDAndLV(horses[i].id, horses[i].lv);
diff --git a/System/RoleParticulars/RoleParticularsWin.cs b/System/RoleParticulars/RoleParticularsWin.cs
index 5557bf4..eb27914 100644
--- a/System/RoleParticulars/RoleParticularsWin.cs
+++ b/System/RoleParticulars/RoleParticularsWin.cs
@@ -269,11 +269,14 @@
                 var data = new UI3DPlayerExhibitionData
                 {
                     job = viewPlayerData.rolePropData.Job,
-                    clothesId = fashionClothes > 0 ? fashionClothes : clothes,
+                    fashionClothesId = fashionClothes,
+                    fashionWeaponId = fashionWeapon,
+                    fashionSecondaryId = fashionWeapon2,
+                    clothesId = clothes,
                     suitLevel = _suitLevel,
-                    weaponId = fashionWeapon > 0 ? fashionWeapon : weapon,
+                    weaponId = weapon,
                     wingsId = wing,
-                    secondaryId = fashionWeapon2 > 0 ? fashionWeapon2 : weapon2,
+                    secondaryId = weapon2,
                     godWeapons = godWeapons,
                     isDialogue = false,
                 };
diff --git a/UI/Common/UI3DHeroSkillShow.cs b/UI/Common/UI3DHeroSkillShow.cs
index 8575742..9cb29e1 100644
--- a/UI/Common/UI3DHeroSkillShow.cs
+++ b/UI/Common/UI3DHeroSkillShow.cs
@@ -10,10 +10,8 @@
     public class UI3DHeroSkillShow : MonoBehaviour
     {
         static UI3DHeroSkillShow m_Instance = null;
-        public static UI3DHeroSkillShow Instance
-        {
-            get
-            {
+        public static UI3DHeroSkillShow Instance {
+            get {
                 if (m_Instance == null)
                 {
                     var gameObject = Instantiate(UILoader.LoadPrefab("UI3DHeroSkillShow"));
@@ -39,10 +37,8 @@
         PlayerPackModel playerPack { get { return ModelCenter.Instance.GetModel<PlayerPackModel>(); } }
 
         Transform m_HeroPoint;
-        public Transform hero
-        {
-            get
-            {
+        public Transform hero {
+            get {
                 return m_HeroPoint;
             }
         }
@@ -57,10 +53,8 @@
 
         public Camera showCamera { get { return m_ShowCamera; } }
 
-        public Transform MP_Name1
-        {
-            get
-            {
+        public Transform MP_Name1 {
+            get {
                 var mp_name = hero.GetChildTransformDeeply("A_Name2");
                 if (!mp_name)
                 {
@@ -70,10 +64,8 @@
             }
         }
 
-        public Transform MP_Weapon
-        {
-            get
-            {
+        public Transform MP_Weapon {
+            get {
                 var mp_weapon = hero.GetChildTransformDeeply(WEAPON_NODE);
                 if (mp_weapon != null)
                 {
@@ -146,11 +138,14 @@
             UI3DPlayerExhibitionData data = new UI3DPlayerExhibitionData()
             {
                 job = _job,
-                clothesId = fashionClothesId > 0 ? fashionClothesId : _clothesId,
+                fashionClothesId = fashionClothesId,
+                clothesId = _clothesId,
                 suitLevel = _suitLevel,
-                weaponId = fashionWeaponId > 0 ? fashionWeaponId : _weaponId,
+                fashionWeaponId = fashionWeaponId,
+                weaponId = _weaponId,
                 wingsId = _wingsId,
-                secondaryId = fashionSecondaryId > 0 ? fashionSecondaryId : _secondaryId,
+                fashionSecondaryId = fashionSecondaryId,
+                secondaryId = _secondaryId,
                 godWeapons = dict,
                 isDialogue = false,
             };
@@ -270,7 +265,7 @@
                 }
             }
 
-            
+
         }
 
         IEnumerator Co_PlaySkill()
diff --git a/UI/Common/UI3DModelExhibition.cs b/UI/Common/UI3DModelExhibition.cs
index 93de580..e7710a9 100644
--- a/UI/Common/UI3DModelExhibition.cs
+++ b/UI/Common/UI3DModelExhibition.cs
@@ -162,11 +162,14 @@
             var data = new UI3DPlayerExhibitionData
             {
                 job = _job,
-                clothesId = flashClothes > 0 ? flashClothes : clothesItemId,
+                fashionClothesId = flashClothes,
+                fashionWeaponId = flashWeapon,
+                fashionSecondaryId = flashSecondary,
+                clothesId = clothesItemId,
                 suitLevel = suitLevel,
-                weaponId = flashWeapon > 0 ? flashWeapon : weaponItemId,
+                weaponId = weaponItemId,
                 wingsId = wingsItemId,
-                secondaryId = flashSecondary > 0 ? flashSecondary : secondaryItemId,
+                secondaryId = secondaryItemId,
                 isDialogue = false,
                 godWeapons = new Dictionary<int, int>() {
                     { 1,  (int)PlayerDatas.Instance.loginInfo.ExAttr15 },
@@ -180,20 +183,23 @@
 
         public void ShowPlayer(RawImage _rawImage, int _job, bool _isDialogue = false)
         {
-            var clothes = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retFashionClothes);
-            clothes = clothes ?? playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retClothes);
+            var clothes = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retClothes);
+            var flashClothes = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retFashionClothes);
             var clothesId = clothes == null ? 0 : (int)clothes.itemInfo.ItemID;
+            var flashClothesId = flashClothes == null ? 0 : flashClothes.itemInfo.ItemID;
 
-            var weapon = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retFashionWeapon);
-            weapon = weapon ?? playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retWeapon);
+            var weapon = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retWeapon);
+            var flashWeapon = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retFashionWeapon);
             var weaponId = weapon == null ? 0 : (int)weapon.itemInfo.ItemID;
+            var flashWeaponId = flashWeapon == null ? 0 : flashWeapon.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.retFashionWeapon2);
-            secondary = secondary ?? playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retWeapon2);
+            var flahsSecondary = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retFashionWeapon2);
+            var secondary = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retWeapon2);
             var secondaryId = secondary == null ? 0 : (int)secondary.itemInfo.ItemID;
+            var flashSecondaryId = flahsSecondary == null ? 0 : flahsSecondary.itemInfo.ItemID;
 
             int suitLevel = 0;
             if (clothes != null)
@@ -215,6 +221,9 @@
             var data = new UI3DPlayerExhibitionData
             {
                 job = _job,
+                fashionClothesId = flashClothesId,
+                fashionWeaponId = flashWeaponId,
+                fashionSecondaryId = flashSecondaryId,
                 clothesId = clothesId,
                 suitLevel = suitLevel,
                 weaponId = weaponId,
@@ -238,20 +247,26 @@
             var weaponId = 0;
             var wingsId = 0;
             var secondaryId = 0;
+            var flashClothesId = 0;
+            var flashWeaponId = 0;
+            var flashSecondaryId = 0;
+
             ItemModel clothes = null;
 
             if (exceptEquip != RoleEquipType.retClothes)
             {
-                clothes = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retFashionClothes);
-                clothes = clothes ?? playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retClothes);
+                clothes = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retClothes);
+                var flashClothes = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retFashionClothes);
                 clothesId = clothes == null ? 0 : (int)clothes.itemInfo.ItemID;
+                flashClothesId = flashClothes == null ? 0 : flashClothes.itemInfo.ItemID;
             }
 
             if (exceptEquip != RoleEquipType.retWeapon)
             {
-                var weapon = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retFashionWeapon);
-                weapon = weapon ?? playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retWeapon);
+                var flashWeapon = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retFashionWeapon);
+                var weapon = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retWeapon);
                 weaponId = weapon == null ? 0 : (int)weapon.itemInfo.ItemID;
+                flashWeaponId = flashWeapon == null ? 0 : flashWeapon.itemInfo.ItemID;
             }
 
             if (exceptEquip != RoleEquipType.retWing)
@@ -262,9 +277,10 @@
 
             if (exceptEquip != RoleEquipType.retWeapon2)
             {
-                var secondary = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retFashionWeapon2);
-                secondary = secondary ?? playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retWeapon2);
+                var flashSecondary = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retFashionWeapon2);
+                var secondary = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retWeapon2);
                 secondaryId = secondary == null ? 0 : (int)secondary.itemInfo.ItemID;
+                flashSecondaryId = secondary == null ? 0 : flashSecondary.itemInfo.ItemID;
             }
 
             var suitLevel = 0;
@@ -292,6 +308,9 @@
                 weaponId = weaponId,
                 wingsId = wingsId,
                 secondaryId = secondaryId,
+                fashionClothesId = flashClothesId,
+                fashionWeaponId = flashWeaponId,
+                fashionSecondaryId = flashSecondaryId,
                 isDialogue = false,
                 godWeapons = new Dictionary<int, int>() {
                     { 1, godWeapon1==null?0:godWeapon1.level },
@@ -895,6 +914,9 @@
         public int weaponId;
         public int wingsId;
         public int secondaryId;
+        public int fashionClothesId;
+        public int fashionWeaponId;
+        public int fashionSecondaryId;
         public bool isDialogue;
         public Dictionary<int, int> godWeapons;
     }
diff --git a/UI/Common/UI3DShowHero.cs b/UI/Common/UI3DShowHero.cs
index d634667..842aea6 100644
--- a/UI/Common/UI3DShowHero.cs
+++ b/UI/Common/UI3DShowHero.cs
@@ -16,12 +16,15 @@
         int clothesId;
         int wingsId;
         int secondaryId;
+        int extraSecondaryId;
         int job;
 
         GameObject weaponModel;
         GameObject clothesModel;
         GameObject wingsModel;
         GameObject secondaryModel;
+        GameObject extraSecondaryModel;
+
         Animator wingsAnimator;
         Animator clothesAnimator;
         RuntimeAnimatorController cacheClothedAC;
@@ -34,11 +37,11 @@
             this.showPoint = showPoint;
             this.job = data.job;
 
-            var clothes = data.clothesId;
+            var clothes = data.fashionClothesId > 0 ? data.fashionClothesId : data.clothesId;
             var suitID = data.suitLevel;
-            var weaponId = data.weaponId;
+            var weaponId = data.fashionWeaponId > 0 ? data.fashionWeaponId : data.weaponId;
             var wingsId = data.wingsId;
-            var secondaryId = data.secondaryId;
+            var secondaryId = data.fashionSecondaryId > 0 ? data.fashionSecondaryId : data.secondaryId;
             var godWeapons = data.godWeapons;
 
             var jobConfig = Config.Instance.Get<JobSetupConfig>(job);
@@ -70,13 +73,16 @@
             var secondaryResId = 0;
             if (secondaryId == 0)
             {
-                if (this.job == 1)
+                if (data.fashionClothesId < 0)
                 {
-                    secondaryResId = this.clothesId + 2900;
-                }
-                else
-                {
-                    secondaryResId = jobConfig.BaseEquip[2];
+                    if (this.job == 1)
+                    {
+                        secondaryResId = this.clothesId + 2900;
+                    }
+                    else
+                    {
+                        secondaryResId = jobConfig.BaseEquip[2];
+                    }
                 }
             }
             else
@@ -84,7 +90,25 @@
                 var item = Config.Instance.Get<ItemConfig>(secondaryId);
                 secondaryResId = item == null ? jobConfig.BaseEquip[2] : item.ChangeOrd;
             }
+
             PutOnSecondary(job, secondaryResId);
+
+            var extraSecondaryId = 0;
+            if (data.job == 1 && data.fashionSecondaryId > 0 && data.fashionClothesId == 0)
+            {
+                if (data.clothesId == 0)
+                {
+                    extraSecondaryId = jobConfig.BaseEquip[0] + 2900;
+                }
+                else
+                {
+                    var item = Config.Instance.Get<ItemConfig>(data.clothesId);
+                    var defaultClothesResId = item == null ? jobConfig.BaseEquip[0] : item.ChangeOrd;
+                    extraSecondaryId = defaultClothesResId + 2900;
+                }
+            }
+
+            PutOnExtraSecondary(job, extraSecondaryId);
 
             var wingsResId = 0;
             if (wingsId != 0)
@@ -92,6 +116,7 @@
                 var item = Config.Instance.Get<ItemConfig>(wingsId);
                 wingsResId = item == null ? 0 : item.ChangeOrd;
             }
+
             PutOnWing(wingsResId);
             PutOnGodWeaponEffect(godWeapons);
 
@@ -141,6 +166,21 @@
                     pool.Release(secondaryModel);
                 }
                 secondaryModel = null;
+            }
+
+            if (extraSecondaryId != 0)
+            {
+                prefab = InstanceResourcesLoader.LoadModelRes(extraSecondaryId);
+                if (prefab)
+                {
+                    if (extraSecondaryModel)
+                    {
+                        extraSecondaryModel.SetActive(true);
+                    }
+                    pool = GameObjectPoolManager.Instance.RequestPool(prefab);
+                    pool.Release(extraSecondaryModel);
+                }
+                extraSecondaryModel = null;
             }
 
             if (wingsId != 0)
@@ -193,6 +233,7 @@
             weaponId = 0;
             wingsId = 0;
             secondaryId = 0;
+            extraSecondaryId = 0;
 
             TakeOffGodWeaponEffect();
         }
@@ -389,6 +430,48 @@
             weaponId = resoureceId;
         }
 
+        private void PutOnExtraSecondary(int job, int extraSecondaryId)
+        {
+            var oldSecondary = this.extraSecondaryId;
+            if (oldSecondary == extraSecondaryId)
+            {
+                return;
+            }
+
+            GameObject prefab = null;
+            GameObjectPoolManager.GameObjectPool pool = null;
+
+            if (oldSecondary != 0)
+            {
+                prefab = InstanceResourcesLoader.LoadModelRes(oldSecondary);
+                pool = GameObjectPoolManager.Instance.RequestPool(prefab);
+                pool.Release(extraSecondaryModel);
+                extraSecondaryModel = null;
+            }
+
+            if (extraSecondaryId != 0)
+            {
+                prefab = InstanceResourcesLoader.LoadModelRes(extraSecondaryId);
+                if (!prefab)
+                {
+                    var config = Config.Instance.Get<JobSetupConfig>(job);
+                    extraSecondaryId = config.BaseEquip[2];
+                    prefab = InstanceResourcesLoader.LoadModelRes(extraSecondaryId);
+                }
+
+                if (prefab)
+                {
+                    pool = GameObjectPoolManager.Instance.RequestPool(prefab);
+                    extraSecondaryModel = pool.Request();
+
+                    var parent = this.clothesModel.transform.GetChildTransformDeeply(GAStaticDefine.SecondaryBindBoneName[this.job - 1]);
+                    extraSecondaryModel.transform.SetParentEx(parent, Vector3.zero, Quaternion.identity, Vector3.one);
+                }
+            }
+
+            this.extraSecondaryId = extraSecondaryId;
+        }
+
         private void PutOnSecondary(int _job, int secondaryResId)
         {
             var oldSecondary = secondaryId;

--
Gitblit v1.8.0