From 5e2fc31fb56e47d6d08eababe9969343bb4e503b Mon Sep 17 00:00:00 2001
From: client_linchunjie <461730578@qq.com>
Date: 星期三, 09 一月 2019 11:27:44 +0800
Subject: [PATCH] 5729 【前端】【1.5】时装功能开发

---
 System/FairyAu/FairyFeastTransmitShow.cs     |   20 ++++++
 System/FairyAu/KingTempleWin.cs              |   24 +++++++-
 System/FashionDress/FashionDressModel.cs     |    2 
 System/RoleParticulars/RoleParticularsWin.cs |   24 +++++++-
 UI/Common/UI3DHeroSkillShow.cs               |   15 ++++-
 System/FashionDress/FashionDressWin.cs       |   26 ++++++++
 UI/Common/UI3DModelExhibition.cs             |    9 ++-
 System/Role/GodWeaponPreviewWin.cs           |   15 ++++-
 System/Realm/RealmBossShow.cs                |   13 ++++
 9 files changed, 129 insertions(+), 19 deletions(-)

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/System/FashionDress/FashionDressModel.cs b/System/FashionDress/FashionDressModel.cs
index accd5d8..ee6823b 100644
--- a/System/FashionDress/FashionDressModel.cs
+++ b/System/FashionDress/FashionDressModel.cs
@@ -11,7 +11,6 @@
         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, int> fashionTypeMapPlaceDict = new 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>>>();
 
@@ -36,6 +35,7 @@
         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
diff --git a/System/FashionDress/FashionDressWin.cs b/System/FashionDress/FashionDressWin.cs
index 3b52764..b3d484e 100644
--- a/System/FashionDress/FashionDressWin.cs
+++ b/System/FashionDress/FashionDressWin.cs
@@ -274,6 +274,32 @@
             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)
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/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/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 b5cd590..93de580 100644
--- a/UI/Common/UI3DModelExhibition.cs
+++ b/UI/Common/UI3DModelExhibition.cs
@@ -242,13 +242,15 @@
 
             if (exceptEquip != RoleEquipType.retClothes)
             {
-                clothes = playerPack.GetItemModelByIndex(PackType.rptEquip, (int)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;
             }
 
             if (exceptEquip != RoleEquipType.retWeapon)
             {
-                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);
                 weaponId = weapon == null ? 0 : (int)weapon.itemInfo.ItemID;
             }
 
@@ -260,7 +262,8 @@
 
             if (exceptEquip != RoleEquipType.retWeapon2)
             {
-                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);
                 secondaryId = secondary == null ? 0 : (int)secondary.itemInfo.ItemID;
             }
 

--
Gitblit v1.8.0