少年修仙传客户端代码仓库
client_Wu Xijin
2018-08-20 406e6d485ce67acb8667c5e72eb858644d8efdbf
Merge branch 'master' into DogzDungeon

# Conflicts:
# System/WindowBase/ModelCenter.cs
2 文件已重命名
54个文件已修改
2个文件已删除
8 文件已复制
8个文件已添加
4053 ■■■■ 已修改文件
Core/GameEngine/Model/Config/TreasurePrivilegeConfig.cs 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/Model/Config/TreasurePrivilegeConfig.cs.meta 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/Model/Config/TreasureUpConfig.cs 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/Model/Config/TreasureUpConfig.cs.meta 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/ClientPack/ClientToMapServer/CA5_Function/CA512_tagCMActiveMWSoul.cs 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/ClientPack/ClientToMapServer/CA5_Function/CA512_tagCMActiveMWSoul.cs.meta 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/ClientPack/ClientToMapServer/CA5_Function/CA5C0_tagCMDogzEquipItem.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/ClientPack/ClientToMapServer/CA5_Function/CA5C0_tagCMDogzEquipItem.cs.meta 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/ClientPack/ClientToMapServer/CA5_Function/CA5C0_tagCMRuneCompound.cs.meta 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/ClientPack/ClientToMapServer/CA5_Function/CA5C4_tagCMDogzBattleStateChange.cs 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/ClientPack/ClientToMapServer/CA5_Function/CA5C4_tagCMDogzBattleStateChange.cs.meta 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/ClientPack/ClientToMapServer/CA5_Function/CA5C4_tagCMDogzEquipPlus.cs 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/ClientPack/ClientToMapServer/CA5_Function/CA5C4_tagCMDogzEquipPlus.cs.meta 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA317_tagMCAllEquipAttrActiveInfo.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA353_tagMCMWPrivilegeDataInfo.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA3C0_tagMCDogzInfo.cs 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA3C1_tagMCDogzHelpbattleState.cs 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/ServerPack/HA3_Function/HA353_tagMCMWPrivilegeDataInfo.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/BlastFurnace/BlastFurnaceModel.cs 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/BlastFurnace/TreasureRefineSuccessWin.cs 66 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/BlastFurnace/TreasureRefineTips.cs 67 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Dogz/DogzActiveWin.cs 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Dogz/DogzDetailBehaviour.cs 92 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Dogz/DogzDetailsWin.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Dogz/DogzEquip.cs 73 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Dogz/DogzItemCell.cs 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Dogz/DogzItemCell.cs.meta 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Dogz/DogzModel.cs 111 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Dogz/DogzPackCell.cs 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Dogz/DogzPackWin.cs 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Dungeon/TrialDungeonModel.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/FairyAu/GiveRedBagTipsWin.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/FairyAu/PlayerRedPacketDatas.cs 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/FindPrecious/DemonJarModel.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Mount/MountPanelAssignment.cs 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Mount/PlayerMountDatas.cs 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Pet/PetAttributeMethods.cs 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Pet/PlayerPetDatas.cs 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Rune/RuneBreakWin.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Rune/RuneModel.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Skill/QuickSetting.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Tip/SkillDetails.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Tip/SkillDetailsWin.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Treasure/FairyTreasureCollectPanelPattern1.cs 257 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Treasure/FairyTreasureCollectPanelPattern4.cs 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Treasure/FairyTreasureCollectPanelPattern5.cs 111 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Treasure/TreasureAnimation.cs 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Treasure/TreasureData.cs 492 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Treasure/TreasureLevelUpWin.cs 215 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Treasure/TreasureMeridianBehaviour.cs 72 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Treasure/TreasureModel.cs 237 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Treasure/TreasureNewGotBehaviour.cs 80 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Treasure/TreasureNewGotBehaviour.cs.meta 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Treasure/TreasureNewGotWin.cs 208 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Treasure/TreasureNewStageWin.cs 52 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Treasure/TreasureSoulAchievementCell.cs 68 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Treasure/TreasureSoulAchievementCell.cs.meta 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Treasure/TreasureSoulActiveWin.cs 79 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Treasure/TreasureSoulActiveWin.cs.meta 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Treasure/TreasureSoulBehaviour.cs 91 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Treasure/TreasureSoulModel.cs 666 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Treasure/TreasureSoulModel.cs.meta 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Treasure/TreasureSoulPattern.cs 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Treasure/TreasureSoulPattern1.cs 33 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Treasure/TreasureSoulPattern2.cs 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Treasure/TreasureSoulPattern3.cs 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Treasure/TreasureSoulPattern4.cs 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Treasure/TreasureSoulWin.cs 292 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Treasure/TreasureStageTipWin.cs 45 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Treasure/TreasureUnlockCell.cs 88 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Treasure/TreasureUnlockCell.cs.meta 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/WindowBase/ModelCenter.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/WindowJump/WindowJumpMgr.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI/Common/SortTable.cs 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/Model/Config/TreasurePrivilegeConfig.cs
@@ -1,6 +1,6 @@
//--------------------------------------------------------
//    [Author]:            第二世界
//    [  Date ]:           Monday, June 25, 2018
//    [  Date ]:           Thursday, August 16, 2018
//--------------------------------------------------------
using UnityEngine;
@@ -18,6 +18,8 @@
        public int maxValue { get ; private set ; }
        public string attr { get ; private set; } 
        public string itemAward { get ; private set; } 
        public int[] successList;
        public int treasureId { get ; private set ; }
        public string Icon { get ; private set; } 
        public string Name { get ; private set; } 
        public string targetDescription { get ; private set; } 
@@ -44,11 +46,20 @@
            
                itemAward = rawContents[6].Trim();
            
                Icon = rawContents[7].Trim();
                string[] successListStringArray = rawContents[7].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
                successList = new int[successListStringArray.Length];
                for (int i=0;i<successListStringArray.Length;i++)
                {
                     int.TryParse(successListStringArray[i],out successList[i]);
                }
            
                Name = rawContents[8].Trim();
                treasureId=IsNumeric(rawContents[8]) ? int.Parse(rawContents[8]):0;
            
                targetDescription = rawContents[9].Trim();
                Icon = rawContents[9].Trim();
                Name = rawContents[10].Trim();
                targetDescription = rawContents[11].Trim();
            }
            catch (Exception ex)
            {
Core/GameEngine/Model/Config/TreasurePrivilegeConfig.cs.meta
@@ -1,6 +1,6 @@
fileFormatVersion: 2
guid: 761a8477b6259554ab927daec347dba7
timeCreated: 1529925515
timeCreated: 1534424449
licenseType: Pro
MonoImporter:
  serializedVersion: 2
Core/GameEngine/Model/Config/TreasureUpConfig.cs
@@ -1,6 +1,6 @@
//--------------------------------------------------------
//    [Author]:            第二世界
//    [  Date ]:           Thursday, June 07, 2018
//    [  Date ]:           Thursday, August 16, 2018
//--------------------------------------------------------
using UnityEngine;
@@ -18,8 +18,8 @@
        public string AddAttr { get ; private set; } 
        public int[] UnLockSkill;
        public int UnLockFuncID { get ; private set ; }
        public int Privilege { get ; private set ; }
        public int LVLimit { get ; private set ; }
        public int ActiveMWID { get ; private set ; }
        public string ItemAward { get ; private set; }
        public override string getKey()
        {
@@ -48,9 +48,9 @@
            
                UnLockFuncID=IsNumeric(rawContents[6]) ? int.Parse(rawContents[6]):0; 
            
                Privilege=IsNumeric(rawContents[7]) ? int.Parse(rawContents[7]):0;
                ActiveMWID=IsNumeric(rawContents[7]) ? int.Parse(rawContents[7]):0;
            
                LVLimit=IsNumeric(rawContents[8]) ? int.Parse(rawContents[8]):0;
                ItemAward = rawContents[8].Trim();
            }
            catch (Exception ex)
            {
Core/GameEngine/Model/Config/TreasureUpConfig.cs.meta
@@ -1,6 +1,6 @@
fileFormatVersion: 2
guid: 882666fd713678849aebb360643bfe19
timeCreated: 1528358559
timeCreated: 1534419056
licenseType: Pro
MonoImporter:
  serializedVersion: 2
Core/NetworkPackage/ClientPack/ClientToMapServer/CA5_Function/CA512_tagCMActiveMWSoul.cs
New file
@@ -0,0 +1,18 @@
using UnityEngine;
using System.Collections;
// A5 12 激活法宝之魂 #tagCMActiveMWSoul
public class CA512_tagCMActiveMWSoul : GameNetPackBasic {
    public byte ID;    //编号
    public CA512_tagCMActiveMWSoul () {
        combineCmd = (ushort)0x03FE;
        _cmd = (ushort)0xA512;
    }
    public override void WriteToBytes () {
        WriteBytes (ID, NetDataType.BYTE);
    }
}
Core/NetworkPackage/ClientPack/ClientToMapServer/CA5_Function/CA512_tagCMActiveMWSoul.cs.meta
copy from System/Treasure/FairyTreasureCollectPanelPattern1.cs.meta copy to Core/NetworkPackage/ClientPack/ClientToMapServer/CA5_Function/CA512_tagCMActiveMWSoul.cs.meta
File was copied from System/Treasure/FairyTreasureCollectPanelPattern1.cs.meta
@@ -1,6 +1,6 @@
fileFormatVersion: 2
guid: f4d29363b41f2a740834a1aabf805009
timeCreated: 1521102270
guid: 0ffb9a375c8c7ad499c781a9d61d3e95
timeCreated: 1534562087
licenseType: Pro
MonoImporter:
  serializedVersion: 2
Core/NetworkPackage/ClientPack/ClientToMapServer/CA5_Function/CA5C0_tagCMDogzEquipItem.cs
File was renamed from Core/NetworkPackage/ClientPack/ClientToMapServer/CA5_Function/CA5C0_tagCMRuneCompound.cs
@@ -3,11 +3,11 @@
// A5 C0 神兽穿戴装备 #tagCMDogzEquipItem
public class CA5C0_tagCMRuneCompound : GameNetPackBasic {
public class CA5C0_tagCMDogzEquipItem : GameNetPackBasic {
    public byte DogzID;    // 神兽ID
    public byte EquipIndex;    //神兽装备所在神兽背包索引
    public CA5C0_tagCMRuneCompound () {
    public CA5C0_tagCMDogzEquipItem () {
        combineCmd = (ushort)0x03FE;
        _cmd = (ushort)0xA5C0;
    }
Core/NetworkPackage/ClientPack/ClientToMapServer/CA5_Function/CA5C0_tagCMDogzEquipItem.cs.meta
copy from System/Treasure/FairyTreasureCollectPanelPattern1.cs.meta copy to Core/NetworkPackage/ClientPack/ClientToMapServer/CA5_Function/CA5C0_tagCMDogzEquipItem.cs.meta
File was copied from System/Treasure/FairyTreasureCollectPanelPattern1.cs.meta
@@ -1,6 +1,6 @@
fileFormatVersion: 2
guid: f4d29363b41f2a740834a1aabf805009
timeCreated: 1521102270
guid: 23a1593c938d2a54aaf891bee0cc83a6
timeCreated: 1534573006
licenseType: Pro
MonoImporter:
  serializedVersion: 2
Core/NetworkPackage/ClientPack/ClientToMapServer/CA5_Function/CA5C0_tagCMRuneCompound.cs.meta
File was deleted
Core/NetworkPackage/ClientPack/ClientToMapServer/CA5_Function/CA5C4_tagCMDogzBattleStateChange.cs
@@ -3,22 +3,43 @@
// A5 C4 神兽装备强化 #tagCMDogzEquipPlus
public class CA5C4_tagCMDogzBattleStateChange : GameNetPackBasic {
    public byte EquipIndex;    //神兽装备背包中索引
    public byte IndexCount;    //材料所在神兽物品背包索引的数量
    public  byte[] IndexList;    //材料所在神兽物品背包索引列表
    public byte IsDouble;    //是否双倍强化
    public CA5C4_tagCMDogzBattleStateChange () {
        combineCmd = (ushort)0x03FE;
        _cmd = (ushort)0xA5C4;
    }
    public override void WriteToBytes () {
        WriteBytes (EquipIndex, NetDataType.BYTE);
        WriteBytes (IndexCount, NetDataType.BYTE);
        WriteBytes (IndexList, NetDataType.BYTE, IndexCount);
        WriteBytes (IsDouble, NetDataType.BYTE);
    }
}
}
Core/NetworkPackage/ClientPack/ClientToMapServer/CA5_Function/CA5C4_tagCMDogzBattleStateChange.cs.meta
@@ -1,6 +1,6 @@
fileFormatVersion: 2
guid: 06d0a968835825d4682ef91adddf7aca
timeCreated: 1534495572
timeCreated: 1534573684
licenseType: Pro
MonoImporter:
  serializedVersion: 2
Core/NetworkPackage/ClientPack/ClientToMapServer/CA5_Function/CA5C4_tagCMDogzEquipPlus.cs
New file
@@ -0,0 +1,45 @@
using UnityEngine;
using System.Collections;
// A5 C4 神兽装备强化 #tagCMDogzEquipPlus
public class CA5C4_tagCMDogzEquipPlus : GameNetPackBasic {
    public byte EquipIndex;    //神兽装备背包中索引
    public byte IndexCount;    //材料所在神兽物品背包索引的数量
    public  byte[] IndexList;    //材料所在神兽物品背包索引列表
    public byte IsDouble;    //是否双倍强化
    public CA5C4_tagCMDogzEquipPlus () {
        combineCmd = (ushort)0x03FE;
        _cmd = (ushort)0xA5C4;
    }
    public override void WriteToBytes () {
        WriteBytes (EquipIndex, NetDataType.BYTE);
        WriteBytes (IndexCount, NetDataType.BYTE);
        WriteBytes (IndexList, NetDataType.BYTE, IndexCount);
        WriteBytes (IsDouble, NetDataType.BYTE);
    }
}
Core/NetworkPackage/ClientPack/ClientToMapServer/CA5_Function/CA5C4_tagCMDogzEquipPlus.cs.meta
File was renamed from System/Treasure/FairyTreasureCollectPanelPattern1.cs.meta
@@ -1,6 +1,6 @@
fileFormatVersion: 2
guid: f4d29363b41f2a740834a1aabf805009
timeCreated: 1521102270
guid: 492661260e65b124d9ae25fc29018a94
timeCreated: 1534573007
licenseType: Pro
MonoImporter:
  serializedVersion: 2
Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA317_tagMCAllEquipAttrActiveInfo.cs
@@ -17,7 +17,7 @@
        HA317_tagMCAllEquipAttrActiveInfo vNetData = vNetPack as HA317_tagMCAllEquipAttrActiveInfo;
        playerPack.SetPlayerEquipAttrActiveInfo(vNetData);
        ModelCenter.Instance.GetModel<TreasureModel>().UpdateTreasurePrivilege(vNetData);
        ModelCenter.Instance.GetModel<TreasureSoulModel>().UpdateTreasurePrivilege(vNetData);
    }
}
Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA353_tagMCMWPrivilegeDataInfo.cs
@@ -15,7 +15,7 @@
    {
        base.Done(vNetPack);
        var package = vNetPack as HA353_tagMCMWPrivilegeDataInfo;
        ModelCenter.Instance.GetModel<TreasureModel>().UpdateTreasurePrivilege(package);
        ModelCenter.Instance.GetModel<TreasureSoulModel>().UpdateTreasurePrivilege(package);
    }
}
Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA3C0_tagMCDogzInfo.cs
@@ -1,11 +1,21 @@
using UnityEngine;
using System.Collections;
using Snxxz.UI;
// A3 C0 神兽信息 #tagMCDogzInfo
public class DTCA3C0_tagMCDogzInfo : DtcBasic {
    DogzModel dogzModel { get { return ModelCenter.Instance.GetModel<DogzModel>(); } }
    public override void Done(GameNetPackBasic vNetPack) {
        base.Done(vNetPack);
        HA3C0_tagMCDogzInfo vNetData = vNetPack as HA3C0_tagMCDogzInfo;
        dogzModel.SetServerAddAssistDogzCnt(vNetData);
    }
}
Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA3C1_tagMCDogzHelpbattleState.cs
@@ -1,11 +1,21 @@
using UnityEngine;
using System.Collections;
using Snxxz.UI;
// A3 C1 神兽助战状态刷新 #tagMCDogzHelpbattleState
public class DTCA3C1_tagMCDogzHelpbattleState : DtcBasic {
    DogzModel dogzModel { get { return ModelCenter.Instance.GetModel<DogzModel>(); } }
    public override void Done(GameNetPackBasic vNetPack) {
        base.Done(vNetPack);
        HA3C1_tagMCDogzHelpbattleState vNetData = vNetPack as HA3C1_tagMCDogzHelpbattleState;
        dogzModel.SetServerAssistDogzState(vNetData);
    }
}
Core/NetworkPackage/ServerPack/HA3_Function/HA353_tagMCMWPrivilegeDataInfo.cs
@@ -17,6 +17,7 @@
        for (int i = 0; i < Count; i ++) {
            InfoList[i] = new tagMCMWPrivilegeData();
            TransBytes (out InfoList[i].PriID, vBytes, NetDataType.DWORD);
            TransBytes (out InfoList[i].State, vBytes, NetDataType.BYTE);
            TransBytes (out InfoList[i].CurValue, vBytes, NetDataType.DWORD);
            TransBytes (out InfoList[i].GotValue, vBytes, NetDataType.DWORD);
            TransBytes (out InfoList[i].ItemAwardState, vBytes, NetDataType.BYTE);
@@ -25,6 +26,7 @@
    public struct tagMCMWPrivilegeData {
        public uint PriID;        // 特权ID
        public byte State;        //激活状态
        public uint CurValue;        //当前总进度
        public uint GotValue;        //已领取进度
        public byte ItemAwardState;        //物品奖励是否已领取
System/BlastFurnace/BlastFurnaceModel.cs
@@ -213,28 +213,6 @@
    public Treasure treasureData { get; private set; }
    public void RefreshTreasureRefineModel(HA3BE_tagMCMagicWeaponMsg data)
    {
        DebugEx.Log("RefreshTreasureRefineModel" + data.Count);
        if (data.Count > 0)
        {
            int i = 0;
            for (i = 0; i < data.Count; i++)
            {
                if (!treasureRefineDict.ContainsKey(data.MWInfo[i].MWID))
                {
                    treasureRefineDict.Add(data.MWInfo[i].MWID, data.MWInfo[i].MWLV);
                }
                else
                {
                    treasureRefineDict[data.MWInfo[i].MWID] = data.MWInfo[i].MWLV;
                }
                Treasure treasure = null;
                sTreasureModel.TryGetTreasure((int)data.MWInfo[i].MWID, out treasure);
                treasure.level = data.MWInfo[i].MWLV;
                treasureData = treasure;
            }
            if (RefreshTreasureRefineEvent != null)
                RefreshTreasureRefineEvent();
        }
    }
    public int GetAllTreasureRefineLv()
System/BlastFurnace/TreasureRefineSuccessWin.cs
@@ -45,13 +45,13 @@
        protected override void OnPreOpen()
        {
            _treasure = FurnaceModel.treasureData;
            if(_treasure != null)
            {
                _refineModel = TreasureRefineConfig.GetTreasureRefineModel(_treasure.id, _treasure.level);
                _tagTreasureModel = ConfigManager.Instance.GetTemplate<TreasureConfig>(_treasure.id);
                InitUI();
            }
            //_treasure = FurnaceModel.treasureData;
            //if(_treasure != null)
            //{
            //    _refineModel = TreasureRefineConfig.GetTreasureRefineModel(_treasure.id, _treasure.level);
            //    _tagTreasureModel = ConfigManager.Instance.GetTemplate<TreasureConfig>(_treasure.id);
            //    InitUI();
            //}
            
        }
@@ -75,32 +75,32 @@
        public void InitUI()
        {
         
            _addFightingText.text = Language.Get("BlastFurnace108",GetAddFighting());
            if(_tagTreasureModel != null)
            {
                _refineLvText.text = Language.Get("BlastFurnace109",_tagTreasureModel.Name,_treasure.level);
            }
            if(_refineModel != null)
            {
                if(_refineModel.OpenSkill != 0)
                {
                    _openSkillText.gameObject.SetActive(true);
                    tagChinSkill = ConfigManager.Instance.GetTemplate<SkillConfig>(_refineModel.OpenSkill);
                    if(tagChinSkill != null)
                    {
                        _openSkillText.text = Language.Get("BlastFurnace110",tagChinSkill.SkillName);
                    }
                }
                else
                {
                    _openSkillText.gameObject.SetActive(false);
                }
            }
            else
            {
                _openSkillText.gameObject.SetActive(false);
            }
            Invoke("CloseWin", 2);
            //_addFightingText.text = Language.Get("BlastFurnace108",GetAddFighting());
            //if(_tagTreasureModel != null)
            //{
            //    _refineLvText.text = Language.Get("BlastFurnace109",_tagTreasureModel.Name,_treasure.level);
            //}
            //if(_refineModel != null)
            //{
            //    if(_refineModel.OpenSkill != 0)
            //    {
            //        _openSkillText.gameObject.SetActive(true);
            //        tagChinSkill = ConfigManager.Instance.GetTemplate<SkillConfig>(_refineModel.OpenSkill);
            //        if(tagChinSkill != null)
            //        {
            //            _openSkillText.text = Language.Get("BlastFurnace110",tagChinSkill.SkillName);
            //        }
            //    }
            //    else
            //    {
            //        _openSkillText.gameObject.SetActive(false);
            //    }
            //}
            //else
            //{
            //    _openSkillText.gameObject.SetActive(false);
            //}
            //Invoke("CloseWin", 2);
        }
        private int[] attrIds;
System/BlastFurnace/TreasureRefineTips.cs
@@ -213,73 +213,6 @@
        private void OnClickDandrugCell(bool isOn,CellView cell,TreasureRefineConfig nextRefineModel,Treasure treasure)
        {
            if (!isOn)
                return;
            presentIndex = cell.index;
            TreasureConfig treasureModel = ConfigManager.Instance.GetTemplate<TreasureConfig>(treasure.id);
            _treasureNameText.text = treasureModel.Name;
            TreasureRefineConfig refineModel = TreasureRefineConfig.GetTreasureRefineModel(cell.index,treasure.level);
            _treasureModel = nextRefineModel;
           FurnaceModel.SetTreasureRefineModel(refineModel);
           FurnaceModel.SetTreasureSkillDict(treasure.id,treasure.level);
           FurnaceModel.SetNextTreasureRefineModel(nextRefineModel);
            _treasureSkillDict =FurnaceModel.treasureSkillDict;
            UI3DTreasureExhibition.Instance.BeginShowTreasure(treasure.id,_treasureIcon);
            CreateEffectCell(_treasureSkillDict);
            int i = 0;
            int length = _treasureAttrlist.Count;
            for (i = 0; i < length; i++)
            {
                _treasureAttrlist[i].SetActive(false);
            }
            if (refineModel == null)
            {
                SetTreasureAttrStr(FurnaceModel.nextAttrIDs,null,FurnaceModel.nextAttrValues);
            }
            else if(FurnaceModel.TreasureIsFullLv(treasure.id,treasure.level))
            {
                SetTreasureAttrStr(FurnaceModel.attrIDs,FurnaceModel.attrValues,null);
                _refineMaterContent.SetActive(false);
                _makeDanBtn.gameObject.SetActive(false);
                _noEnoughLVText.gameObject.SetActive(true);
                _noEnoughLVText.text = Language.Get("BlastFurnace102");
            }
            else
            {
                SetTreasureAttrStr(FurnaceModel.attrIDs,FurnaceModel.attrValues,FurnaceModel.nextAttrValues);
            }
            if (FurnaceModel.StoveLV < nextRefineModel.BlastFurnaceLV)
            {
                _refineMaterContent.SetActive(true);
                _makeDanBtn.gameObject.SetActive(false);
                _noEnoughLVText.gameObject.SetActive(true);
                _noEnoughLVText.text = Language.Get("BlastFurnace103");
            }
            if(FurnaceModel.StoveLV >= nextRefineModel.BlastFurnaceLV && !FurnaceModel.TreasureIsFullLv(treasure.id, treasure.level))
            {
                _refineMaterContent.SetActive(true);
                _makeDanBtn.gameObject.SetActive(true);
                _noEnoughLVText.gameObject.SetActive(false);
            }
            ChangeSuccessRate(0);
            RefreshMaterial();
            _refineMaterialButton.RemoveAllListeners();
            _refineMaterialButton.AddListener(() =>
            {
                //ItemWinModel itemWinModel = ItemCommonCtrl.Instance.OnSingleClickItemCell(FurnaceModel.nextRefineMaterialID);
                //ItemPopModel.Instance.SetDefaultShowUIDict(itemWinModel, false);
                //itemWinModel.SetShowWin(itemWinModel);
                ItemAttrData attrData = new ItemAttrData(FurnaceModel.nextRefineMaterialID,true);
                itemTipsModel.SetItemTipsModel(attrData);
            });
            RefreshAllTreasureLv();
            _chooseFireBtn.gameObject.SetActive(true);
        }
        private void SetTreasureAttrStr(int[] attrIds, int[] attrValues,int[] nextAttrValues)
System/Dogz/DogzActiveWin.cs
@@ -34,6 +34,9 @@
                return m_Model ?? (m_Model = ModelCenter.Instance.GetModel<DogzModel>());
            }
        }
        PlayerPackModel playerPack { get { return ModelCenter.Instance.GetModel<PlayerPackModel>(); } }
        #region Built-in
        protected override void BindController()
        {
@@ -63,6 +66,9 @@
            UpdateDogzAssistCnt();
            model.UpdateSelectDogzEvent += UpdateSelectDogzEvent;
            model.UpdateAssistDogzEvent += UpdateDogzAssistCnt;
            model.RefreshDogzEquipAct += RefreshDogzEquipEvent;
        }
        protected override void OnAfterOpen()
@@ -71,6 +77,9 @@
        protected override void OnPreClose()
        {
            model.UpdateSelectDogzEvent -= UpdateSelectDogzEvent;
            model.UpdateAssistDogzEvent -= UpdateDogzAssistCnt;
            model.RefreshDogzEquipAct -= RefreshDogzEquipEvent;
        }
        protected override void OnAfterClose()
@@ -126,10 +135,28 @@
                        var _skillCfg = ConfigManager.Instance.GetTemplate<SkillConfig>(_dogzCfg.HelpBattleSkills[i]);
                        m_DogzSkills[i].Icon.SetSprite(_skillCfg.IconName);
                        m_DogzSkills[i].Lv.text = Language.Get("Z1024", _skillCfg.SkillLV);
                        m_DogzSkills[i].SkillBtn.RemoveAllListeners();
                        m_DogzSkills[i].SkillBtn.AddListener(()=>
                        {
                            int fightPower = 0;
                            if (_skillCfg.FightPower > 0)
                            {
                                fightPower = _skillCfg.FightPower;
                            }
                            SkillDetails.ShowSkillDetails(_skillCfg.SkillID, SkillDetails.SkillSourceType.DogzSkill, fightPower);
                        });
                    }
                }
            }
        }
        private void RefreshDogzEquipEvent(int dogzId)
        {
            if (dogzId != model.presentSelectDogz) return;
            UpdateDogzEquip();
        }
        private void UpdateDogzEquip()
        {
            var _dogzCfg = ConfigManager.Instance.GetTemplate<DogzConfig>(model.presentSelectDogz);
@@ -143,7 +170,7 @@
                m_DogzEquips[i].gameObject.SetActive(_equiped);
                if (_equiped)
                {
                    m_DogzEquips[i].Display(_data.itemId);
                    m_DogzEquips[i].Display(_data);
                }
            }
        }
@@ -209,6 +236,8 @@
            public Image Icon { get { return m_SkillIcon; } }
            [SerializeField] Text m_SkillLv;
            public Text Lv { get { return m_SkillLv; } }
            [SerializeField] Button m_SkillBtn;
            public Button SkillBtn { get { return m_SkillBtn; } }
        }
    }
}
System/Dogz/DogzDetailBehaviour.cs
@@ -43,53 +43,53 @@
            });
        }
        public void Display(DogzEquipData data)
        public void Display(ItemModel data)
        {
            m_DogzEquip.Display(data.ItemId);
            var config = ConfigManager.Instance.GetTemplate<ItemConfig>(data.ItemId);
            if (config != null)
            {
                m_ItemNameTxt.text = config.ItemName;
                m_ItemNameTxt.color = UIHelper.GetUIColor(config.ItemColor);
            }
            m_ContainerBaseProp.gameObject.SetActive(data.basePropertyDict != null);
            if (data.basePropertyDict != null)
            {
                var index = 0;
                foreach (var _key in data.basePropertyDict.Keys)
                {
                    if (index < m_BasePropertys.Length)
                    {
                        var propertyConfig = ConfigManager.Instance.GetTemplate<PlayerPropertyConfig>(_key);
                        m_BasePropertys[index].gameObject.SetActive(true);
                        m_BasePropertys[index].Display(_key, data.basePropertyDict[_key]);
                    }
                    index++;
                }
                for (int i = index; i < m_BasePropertys.Length; i++)
                {
                    m_BasePropertys[i].gameObject.SetActive(false);
                }
            }
            m_ContainerSpecialProp.gameObject.SetActive(data.specialPropertyDict != null);
            if (data.specialPropertyDict != null)
            {
                var index = 0;
                foreach (var _key in data.specialPropertyDict.Keys)
                {
                    if (index < m_SpecialPropertys.Length)
                    {
                        var propertyConfig = ConfigManager.Instance.GetTemplate<PlayerPropertyConfig>(_key);
                        m_SpecialPropertys[index].gameObject.SetActive(true);
                        m_SpecialPropertys[index].Display(_key, data.specialPropertyDict[_key]);
                    }
                    index++;
                }
                for (int i = index; i < m_SpecialPropertys.Length; i++)
                {
                    m_SpecialPropertys[i].gameObject.SetActive(false);
                }
            }
            //m_DogzEquip.Display(data);
            //var config = ConfigManager.Instance.GetTemplate<ItemConfig>(data.itemId);
            //if (config != null)
            //{
            //    m_ItemNameTxt.text = config.ItemName;
            //    m_ItemNameTxt.color = UIHelper.GetUIColor(config.ItemColor);
            //}
            //m_ContainerBaseProp.gameObject.SetActive(data.basePropertyDict != null);
            //if (data.basePropertyDict != null)
            //{
            //    var index = 0;
            //    foreach (var _key in data.basePropertyDict.Keys)
            //    {
            //        if (index < m_BasePropertys.Length)
            //        {
            //            var propertyConfig = ConfigManager.Instance.GetTemplate<PlayerPropertyConfig>(_key);
            //            m_BasePropertys[index].gameObject.SetActive(true);
            //            m_BasePropertys[index].Display(_key, data.basePropertyDict[_key]);
            //        }
            //        index++;
            //    }
            //    for (int i = index; i < m_BasePropertys.Length; i++)
            //    {
            //        m_BasePropertys[i].gameObject.SetActive(false);
            //    }
            //}
            //m_ContainerSpecialProp.gameObject.SetActive(data.specialPropertyDict != null);
            //if (data.specialPropertyDict != null)
            //{
            //    var index = 0;
            //    foreach (var _key in data.specialPropertyDict.Keys)
            //    {
            //        if (index < m_SpecialPropertys.Length)
            //        {
            //            var propertyConfig = ConfigManager.Instance.GetTemplate<PlayerPropertyConfig>(_key);
            //            m_SpecialPropertys[index].gameObject.SetActive(true);
            //            m_SpecialPropertys[index].Display(_key, data.specialPropertyDict[_key]);
            //        }
            //        index++;
            //    }
            //    for (int i = index; i < m_SpecialPropertys.Length; i++)
            //    {
            //        m_SpecialPropertys[i].gameObject.SetActive(false);
            //    }
            //}
        }
        private void OnEnable()
System/Dogz/DogzDetailsWin.cs
@@ -49,9 +49,9 @@
        private void Display()
        {
            m_Compare.gameObject.SetActive(model.viewDetailCompare);
            m_Single.Display(model.viewDetailData);
            m_Single.gameObject.SetActive(true);
            //m_Compare.gameObject.SetActive(model.viewDetailCompare);
            //m_Single.Display(model.viewDetailData);
            //m_Single.gameObject.SetActive(true);
        }
        private void OnClose()
System/Dogz/DogzEquip.cs
@@ -9,68 +9,33 @@
{
    public class DogzEquip : MonoBehaviour
    {
        [SerializeField] Image m_EquipBG;
        [SerializeField] Image m_EquipIcon;
        [SerializeField] List<Image> m_EquipStars;
        [SerializeField] Button m_ViewDetial;
        DogzModel model { get { return ModelCenter.Instance.GetModel<DogzModel>(); } }
        public int ItemId { get; private set; }
        public DogzEquipData equipData { get; private set; }
        private void Awake()
        [SerializeField] CommonItemBaisc itemBaisc;
        [SerializeField] Text strengLvTxt;
        ItemTipsModel tipsModel { get { return ModelCenter.Instance.GetModel<ItemTipsModel>(); } }
        public void Display(ItemModel model)
        {
            if (m_ViewDetial != null)
            itemBaisc.Init(model);
            int strenLv = 0;
            if(model.GetUseDataModel((int)ItemUseDataKey.Def_IudetDogzEquipPlus) != null)
            {
                m_ViewDetial.onClick.AddListener(ViewDetail);
                strenLv = model.GetUseDataModel((int)ItemUseDataKey.Def_IudetDogzEquipPlus)[0];
            }
        }
        public void Display(int _itemId)
            if (strenLv > 0)
        {
            this.ItemId = _itemId;
            var _itemCfg = ConfigManager.Instance.GetTemplate<ItemConfig>(_itemId);
            if (_itemCfg != null)
            {
                DisplayEquipBG(_itemCfg.ItemColor);
                DisplayIcon(_itemId);
                DisplayStar(_itemCfg.StarLevel);
                strengLvTxt.gameObject.SetActive(true);
                strengLvTxt.text = StringUtility.Contact("+", strenLv);
            }
        }
        void DisplayEquipBG(int _itemColor)
            else
        {
            if (m_EquipBG != null)
            {
                m_EquipBG.SetItemBackGround(_itemColor);
                strengLvTxt.gameObject.SetActive(false);
            }
        }
        void DisplayIcon(int _itemId)
            itemBaisc.cellBtn.RemoveAllListeners();
            itemBaisc.cellBtn.AddListener(()=>
        {
            var config = ConfigManager.Instance.GetTemplate<ItemConfig>(_itemId);
            if (config != null && m_EquipIcon != null)
            {
                m_EquipIcon.SetSprite(config.IconKey);
            }
        }
        void DisplayStar(int _star)
        {
            if (m_EquipStars != null)
            {
                for (int i = 0; i < m_EquipStars.Count; i++)
                {
                    m_EquipStars[i].gameObject.SetActive(i < _star);
                }
            }
        }
        private void ViewDetail()
        {
            model.ViewDetail(ItemId);
                ItemAttrData attrData = new ItemAttrData(model.itemId,false,(ulong)model.itemInfo.ItemCount,model.itemInfo.ItemPlace,
                    model.itemInfo.IsBind,false,PackType.rptDogzEquip,model.itemInfo.ItemGUID);
                tipsModel.SetItemTipsModel(attrData);
            });
        }
    }
}
System/Dogz/DogzItemCell.cs
New file
@@ -0,0 +1,55 @@
using UnityEngine;
using UnityEngine.UI;
namespace Snxxz.UI
{
    public class DogzItemCell : MonoBehaviour
    {
        [SerializeField] CommonItemBaisc itemBaisc;
        [SerializeField] Text strengthLvTxt;
        ItemTipsModel tipsModel { get { return ModelCenter.Instance.GetModel<ItemTipsModel>(); } }
        DogzModel dogzModel { get { return ModelCenter.Instance.GetModel<DogzModel>(); } }
        public void Display(int index)
        {
            dogzModel.GetDogzItemList();
            ItemModel model = null;
            if(index < dogzModel.dogzItemList.Count)
            {
                model = dogzModel.dogzItemList[index];
            }
            if(model == null)
            {
                itemBaisc.gameObject.SetActive(false);
                strengthLvTxt.gameObject.SetActive(false);
                return;
            }
            int strenLv = 0;
            if (model.GetUseDataModel((int)ItemUseDataKey.Def_IudetDogzEquipPlus) != null)
            {
                strenLv = model.GetUseDataModel((int)ItemUseDataKey.Def_IudetDogzEquipPlus)[0];
            }
            if (strenLv > 0)
            {
                strengthLvTxt.gameObject.SetActive(true);
                strengthLvTxt.text = StringUtility.Contact("+", strenLv);
            }
            else
            {
                strengthLvTxt.gameObject.SetActive(false);
            }
            itemBaisc.gameObject.SetActive(true);
            itemBaisc.Init(model,true);
            itemBaisc.cellBtn.RemoveAllListeners();
            itemBaisc.cellBtn.AddListener(()=>
            {
                ItemAttrData attrData = new ItemAttrData(model.itemId, false, (ulong)model.itemInfo.ItemCount, model.itemInfo.ItemPlace,
                  model.itemInfo.IsBind, false, PackType.rptDogzItem, model.itemInfo.ItemGUID);
                tipsModel.SetItemTipsModel(attrData);
            });
        }
    }
}
System/Dogz/DogzItemCell.cs.meta
copy from System/Treasure/FairyTreasureCollectPanelPattern1.cs.meta copy to System/Dogz/DogzItemCell.cs.meta
File was copied from System/Treasure/FairyTreasureCollectPanelPattern1.cs.meta
@@ -1,6 +1,6 @@
fileFormatVersion: 2
guid: f4d29363b41f2a740834a1aabf805009
timeCreated: 1521102270
guid: f39c1072bca18d842bcd980b83ef13c5
timeCreated: 1534580808
licenseType: Pro
MonoImporter:
  serializedVersion: 2
System/Dogz/DogzModel.cs
@@ -18,7 +18,10 @@
        public void OnBeforePlayerDataInitialize()
        {
            addAssistCnt = 0;
            dogzAssistStateDict.Clear();
            SelectDogzItemQuality = 0;
            SelectDogzItemStart = 0;
            dogzItemList = new List<ItemModel>();
            dogzAssistStateDict = new Dictionary<int, int>();
        }
        public void OnAfterPlayerDataInitialize()
@@ -43,8 +46,10 @@
        public int DogzAssistDefaultCnt { get; private set; }  //助战神兽总数
        public int DogzAssistMaxCnt { get; private set; }//助战神兽最大数
        public int AddAssistItem { get; private set; } //增加助战神兽总数的物品Id
        public int DogzPackGridCnt { get; private set; } //神兽物品背包格子数
        public int[] AddAssistItemCnt { get; private set; } //增加助战神兽总数的物品数量
        public Dictionary<int, int> m_DogzEquipStrenLimit { get; private set;} //神兽装备强化上限 品质 强化等级
        void ParseConfig()
        {
            var _dogzCfgs = ConfigManager.Instance.GetAllValues<DogzConfig>();
@@ -64,8 +69,9 @@
            AddAssistItem = int.Parse(_funcCfg.Numerical2);
            AddAssistItemCnt = ConfigParse.GetMultipleStr<int>(_funcCfg.Numerical3);
            m_DogzEquipStrenLimit = ConfigParse.GetDic<int, int>(_funcCfg.Numerical4);
            _funcCfg = ConfigManager.Instance.GetTemplate<FuncConfigConfig>("DogzPack");
            DogzPackGridCnt = int.Parse(_funcCfg.Numerical1);
        }
        /// <summary>
        /// 获得格子可以穿戴的装备限制  神兽Id  格子索引 
        /// </summary>
@@ -153,10 +159,14 @@
        {
            addAssistCnt = info.BuyHelpbattleCount;
            DogzAssistDefaultCnt += addAssistCnt;
            if (UpdateAssistDogzEvent != null)
            {
                UpdateAssistDogzEvent();
            }
        }
        public event Action UpdateAssistDogzEvent;
        Dictionary<int, int> dogzAssistStateDict = new Dictionary<int, int>(); //神兽助战
        public Dictionary<int, int> dogzAssistStateDict { get; private set; } //神兽助战
        public void SetServerAssistDogzState(HA3C1_tagMCDogzHelpbattleState info)
        {
            if(!dogzAssistStateDict.ContainsKey(info.DogzID))
@@ -196,7 +206,7 @@
        public void SetDogzEquipInfo()
        {
            m_DogzEquipDict.Clear();
            m_DogzEquipDict = new Dictionary<int, List<ItemModel>>();
            SinglePackModel singlePack = playerPack.GetSinglePackModel(PackType.rptDogzEquip);
            if (singlePack == null) return;
@@ -219,6 +229,7 @@
            }
        }
        public Action<int> RefreshDogzEquipAct;
        private void RefreshDogzEquipInfo(PackType type, int index, int id)
        {
            if (type != PackType.rptDogzEquip) return;
@@ -247,12 +258,18 @@
                    }
                }
            }
            if(RefreshDogzEquipAct != null)
            {
                RefreshDogzEquipAct(dogzId);
            }
        }
        /// <summary>
        /// 获得神兽穿戴的装备数据
        /// </summary>
        private Dictionary<int, List<ItemModel>> m_DogzEquipDict = new Dictionary<int, List<ItemModel>>();
        public Dictionary<int, List<ItemModel>> m_DogzEquipDict { get; private set; }
        public List<ItemModel> GetDogzEquips(int _dogzId)
        {
            List<ItemModel> _list = null;
@@ -298,6 +315,90 @@
            return false;
        }
        public void SendPutOnEquip(int dogzId,int index)
        {
            CA5C0_tagCMDogzEquipItem dogzPutOn = new CA5C0_tagCMDogzEquipItem();
            dogzPutOn.DogzID = (byte)dogzId;
            dogzPutOn.EquipIndex = (byte)index;
            GameNetSystem.Instance.SendInfo(dogzPutOn);
        }
        public void SendPutOffEquip(int dogzId, int equipPlace)
        {
            CA5C1_tagCMDogzUnEquipItem dogzPutOff = new CA5C1_tagCMDogzUnEquipItem();
            dogzPutOff.DogzID = (byte)dogzId;
            dogzPutOff.EquipPlace = (byte)equipPlace;
            GameNetSystem.Instance.SendInfo(dogzPutOff);
        }
        public void SendChangeDogzAssist(int dogzId, int assistState)
        {
            CA5C2_tagCMDogzBattleStateChange stateChange = new CA5C2_tagCMDogzBattleStateChange();
            stateChange.DogzID = (byte)dogzId;
            stateChange.BatteState = (byte)assistState;
            GameNetSystem.Instance.SendInfo(stateChange);
        }
        public void SendBuyAssistCnt()
        {
            CA5C3_tagCMDogzBuyBatteCount buyCnt = new CA5C3_tagCMDogzBuyBatteCount();
            GameNetSystem.Instance.SendInfo(buyCnt);
        }
        public void SendDogzEquipStrength(int index,List<int>indexlist,int isDouble)
        {
            CA5C4_tagCMDogzEquipPlus dogzStren = new CA5C4_tagCMDogzEquipPlus();
            dogzStren.EquipIndex = (byte)index;
            dogzStren.IndexCount = (byte)indexlist.Count;
            byte[] indexByte = new byte[indexlist.Count];
            for(int i = 0; i < indexByte.Length; i++)
            {
                indexByte[i] = (byte)indexlist[i];
            }
            dogzStren.IndexList = indexByte;
            dogzStren.IsDouble = (byte)isDouble;
            GameNetSystem.Instance.SendInfo(dogzStren);
        }
        #endregion
        #region 神兽背包物品
        public int SelectDogzItemQuality { get; set; }
        public int SelectDogzItemStart { get; set; }
        public List<ItemModel> dogzItemList { get; private set; }
        public List<ItemModel> GetDogzItemList()
        {
            dogzItemList.Clear();
            SinglePackModel singlePack = playerPack.GetSinglePackModel(PackType.rptDogzItem);
            if (singlePack == null) return dogzItemList;
            Dictionary<int, ItemModel> pairs = singlePack.GetPackModelIndexDict();
           foreach(var value in pairs.Values)
            {
                if(IsReachSelectCondi(value.itemId))
                {
                    dogzItemList.Add(value);
                }
            }
            return dogzItemList;
        }
        public bool IsReachSelectCondi(int itemId)
        {
            ItemConfig itemConfig = ConfigManager.Instance.GetTemplate<ItemConfig>(itemId);
            if (itemConfig == null) return false;
            if (SelectDogzItemQuality == 0 && SelectDogzItemStart == 0) return true;
            if (SelectDogzItemQuality == 0 && itemConfig.StarLevel == SelectDogzItemStart) return true;
            if (SelectDogzItemQuality == itemConfig.ItemColor && SelectDogzItemStart == 0) return true;
            if (SelectDogzItemQuality == itemConfig.ItemColor && SelectDogzItemStart == itemConfig.StarLevel) return true;
            return false;
        }
        #endregion
        #region 装备详细信息
System/Dogz/DogzPackCell.cs
@@ -7,9 +7,7 @@
{
    public class DogzPackCell : ScrollerUI
    {
        [SerializeField] List<Image> m_Compares;
        [SerializeField] List<DogzEquip> m_DogzEquips;
        [SerializeField] List<DogzItemCell> dogzItemlist;
        DogzPackModel m_Model;
        DogzPackModel model
        {
@@ -24,8 +22,7 @@
            for (int i = 0; i < 4; i++)
            {
                var _index = _line * 4 + i;
                m_DogzEquips[i].gameObject.SetActive(_index < model.dogzPackItems.Count);
                m_Compares[i].gameObject.SetActive(_index < model.dogzPackItems.Count);
                dogzItemlist[i].Display(_index);
            }
        }
    }
System/Dogz/DogzPackWin.cs
@@ -34,7 +34,7 @@
                return m_DogzModel ?? (m_DogzModel = ModelCenter.Instance.GetModel<DogzModel>());
            }
        }
        PlayerPackModel playerPack { get { return ModelCenter.Instance.GetModel<PlayerPackModel>(); } }
        DogzPackModel m_Model;
        DogzPackModel model
        {
@@ -58,6 +58,14 @@
        protected override void OnPreOpen()
        {
            dogzModel.RefreshDogzEquipAct += RefreshDogzEquipEvent;
            playerPack.RefreshItemCountAct += RefreshDogzItemEvent;
            qualitySort.onSelectSortEvent += RefreshDogzSelectEvent;
            starSort.onSelectSortEvent += RefreshDogzSelectEvent;
            dogzModel.SelectDogzItemQuality = 0;
            dogzModel.SelectDogzItemStart = 0;
            starSort.SetDefault();
            qualitySort.SetDefault();
            UpdateDogzEquip();
            UpdateDogzPack();
            starSort.gameObject.SetActive(false);
@@ -70,12 +78,22 @@
        protected override void OnPreClose()
        {
            dogzModel.RefreshDogzEquipAct -= RefreshDogzEquipEvent;
            playerPack.RefreshItemCountAct -= RefreshDogzItemEvent;
            qualitySort.onSelectSortEvent -= RefreshDogzSelectEvent;
            starSort.onSelectSortEvent -= RefreshDogzSelectEvent;
        }
        protected override void OnAfterClose()
        {
        }
        #endregion
        private void RefreshDogzEquipEvent(int dogzId)
        {
            if (dogzId != dogzModel.presentSelectDogz) return;
            UpdateDogzEquip();
        }
        private void UpdateDogzEquip()
        {
@@ -90,7 +108,7 @@
                m_DogzEquips[i].gameObject.SetActive(_equiped);
                if (_equiped)
                {
                    m_DogzEquips[i].Display(_data.itemId);
                    m_DogzEquips[i].Display(_data);
                }
                else
                {
@@ -102,12 +120,25 @@
            }
        }
        private void RefreshDogzSelectEvent(int type)
        {
            m_PackController.m_Scorller.RefreshActiveCellViews();
        }
        private void RefreshDogzItemEvent(PackType type, int index, int id)
        {
            if (type != PackType.rptDogzItem || !dogzModel.IsReachSelectCondi(id)) return;
            m_PackController.m_Scorller.RefreshActiveCellViews();
        }
        private void UpdateDogzPack()
        {
            if (m_PackController.GetNumberOfCells(m_PackController.m_Scorller) == 0)
            {
                m_PackController.Refresh();
                var _line = model.DogzPackGridCnt / 4;
                var _line = dogzModel.DogzPackGridCnt / 4;
                for (int i = 0; i < _line; i++)
                {
                    m_PackController.AddCell(ScrollerDataType.Header, i);
System/Dungeon/TrialDungeonModel.cs
@@ -351,7 +351,7 @@
            {
                for (int i = 0; i < list.Count; i++)
                {
                    if (SatisfyExchangeBetter(list[i].id))
                    if (list[i].tokenId == _itemId && SatisfyExchangeBetter(list[i].id))
                    {
                        return true;
                    }
System/FairyAu/GiveRedBagTipsWin.cs
@@ -180,6 +180,7 @@
        protected override void OnAfterClose()
        {
            RedBagTipsWin._RedBagTipsWin._RedBool = false;
            redPacket.RedEnvelopeID = redPacket.RedBagId;
        }
System/FairyAu/PlayerRedPacketDatas.cs
@@ -58,6 +58,8 @@
    private const int Redpoint_key1 = 1070202;
    public  Redpoint redPointStre1 = new Redpoint(10702, Redpoint_key1);
    public int RedEnvelopeID = 0;//发红包的ID(用于默认弹出开)
    public override void Init()
    {
        PlayerDatas.Instance.fairyData.OnRefreshFairyMine += OnRefreshFairyMine;
@@ -71,6 +73,7 @@
    public void OnBeforePlayerDataInitialize()
    {
        UseLimit = 0;
        RedEnvelopeID = 0;
        IsRedBagGetBool = false;
        RedBagId = 0;
    }
@@ -161,7 +164,11 @@
                    _DicRedBag[(int)info.RedPacketInfo[i].RedPacketID].State = (int)info.RedPacketInfo[i].State;
                    _DicRedBag[(int)info.RedPacketInfo[i].RedPacketID].Wish = (string)info.RedPacketInfo[i].Wish;
                    if (Event_RedEnvelopeToRefresh != null)
                    {
                        Event_RedEnvelopeToRefresh(_DicRedBag[(int)info.RedPacketInfo[i].RedPacketID]);
                        RedBagPoppingOpen();
                    }
                }
            }
@@ -173,6 +180,22 @@
        RedPacketRedDot();
    }
    private void RedBagPoppingOpen()
    {
        if (_DicRedBag.ContainsKey(RedEnvelopeID) && WindowCenter.Instance.CheckOpen<RedBagTipsWin>())
        {
            var redBag = _DicRedBag[RedEnvelopeID];
            if (redBag.GetWay != 5 && redBag.GetWay != 0 && redBag.PlayerID == PlayerDatas.Instance.PlayerId && redBag.State == 1)
            {
                RedBagId = RedEnvelopeID;
                WindowCenter.Instance.Open<RedOPenBGMWin>();//打开领取界面
            }
        }
    }
    public void IsRedBagGet()
    {
        IsRedBagGetBool = false;
System/FindPrecious/DemonJarModel.cs
@@ -73,6 +73,8 @@
        DungeonModel dungeonModel { get { return ModelCenter.Instance.GetModel<DungeonModel>(); } }
        TreasureModel treasureModel { get { return ModelCenter.Instance.GetModel<TreasureModel>(); } }
        TreasureSoulModel treasureSoulModel { get { return ModelCenter.Instance.GetModel<TreasureSoulModel>(); } }
        public override void Init()
        {
            doubleToKillLowerBossHint = true;
@@ -108,7 +110,7 @@
        public void OnPlayerLoginOk()
        {
            demonJarSoulBuf = treasureModel.GetPrivilegeValue(2);
            demonJarSoulBuf = treasureSoulModel.GetTreasureSoulValue(2);
            demonJarSoulIncreaseDelta = 0;
            var bossId = GetLatestUnLockBoss();
@@ -250,7 +252,7 @@
        public void UpdateDemonJarSoul()
        {
            var demonJarSoul = treasureModel.GetPrivilegeValue(2);
            var demonJarSoul = treasureSoulModel.GetTreasureSoulValue(2);
            demonJarSoulIncreaseDelta = demonJarSoul - demonJarSoulBuf;
            demonJarSoulBuf = demonJarSoul;
        }
System/Mount/MountPanelAssignment.cs
@@ -447,6 +447,22 @@
                        Skillimage[i].SetActive(true);
                    }
                    GroupSkill.GetChild(i).gameObject.SetActive(true);
                    UIEffect uie = GroupSkill.GetChild(i).GetComponent<UIEffect>();
                    if (mountModel.ListEffectSkill.Contains(MountSkills[i].SkillID))
                    {
                        if (!uie.IsPlaying)
                        {
                            uie.Play();
                        }
                    }
                    else
                    {
                        if (uie.IsPlaying)
                        {
                            uie.Stop();
                        }
                    }
                    SkillButtonPet mountSkill = GroupSkill.GetChild(i).gameObject.GetComponent<SkillButtonPet>();
                    int curMountLv = 0;
                    if (mountModel._DicHorse.ContainsKey(MountSkills[i].HorseID))
System/Mount/PlayerMountDatas.cs
@@ -51,6 +51,7 @@
    public int MountStoneItemId = 0;
    public bool IsOk = false;
    public bool IsRedPointSingleFeed = true;
    public  List<int> ListEffectSkill = new List<int>();
    PlayerPackModel _playerPack;
    PlayerPackModel playerPack
    {
@@ -67,6 +68,13 @@
        MountWin.RedPointMountDan += RedPointMountDan;
        MountSkillAndItem();
        MountNumberPreservation();
        string str = ConfigManager.Instance.GetTemplate<FuncConfigConfig>("MountSkillEffect").Numerical1;
        int[] listeffect = ConfigParse.GetMultipleStr<int>(str);
        ListEffectSkill.Clear();
        for (int i = 0; i < listeffect.Length; i++)
        {
            ListEffectSkill.Add(listeffect[i]);
        }
    }
    public override void UnInit()
System/Pet/PetAttributeMethods.cs
@@ -187,6 +187,21 @@
        {
            int skillIdIndex = cell.index;
            SkillButtonPet skillButton = cell.transform.GetComponent<SkillButtonPet>();
            UIEffect uie = cell.transform.GetComponent<UIEffect>();
            if (petmodel.ListEffectSkill.Contains(curPetSkillIds[skillIdIndex]))
            {
                if (!uie.IsPlaying)
                {
                    uie.Play();
                }
            }
            else
            {
                if (uie.IsPlaying)
                {
                    uie.Stop();
                }
            }
            if (petmodel._DicPetBack.ContainsKey(petInfoConfig.ID))
            {
                PetBackpack _PetBackpack = petmodel._DicPetBack[petInfoConfig.ID];
System/Pet/PlayerPetDatas.cs
@@ -48,6 +48,8 @@
    public bool IsOk = false;
    public bool RedPointMaxLv = true;//用来标记灵宠最大限制等级
    public List<int> ListEffectSkill = new List<int>();
    PlayerPackModel _playerPack;
    PlayerPackModel playerPack
    {
@@ -86,6 +88,13 @@
        }
        petUpgradeToolId = int.Parse(ConfigManager.Instance.GetTemplate<FuncConfigConfig>("PetUpItem").Numerical1);
        string str = ConfigManager.Instance.GetTemplate<FuncConfigConfig>("PetSkillEffect").Numerical1;
        int[] listeffect = ConfigParse.GetMultipleStr<int>(str);
        ListEffectSkill.Clear();
        for (int i = 0; i < listeffect.Length; i++)
        {
            ListEffectSkill.Add(listeffect[i]);
        }
    }
    public override void UnInit()
System/Rune/RuneBreakWin.cs
@@ -40,7 +40,7 @@
            }
        }
        TreasureModel treasureModel { get { return ModelCenter.Instance.GetModel<TreasureModel>(); } }
        TreasureSoulModel treasureSoulModel { get { return ModelCenter.Instance.GetModel<TreasureSoulModel>(); } }
        RuneComposeModel m_RuneComposeModel;
        RuneComposeModel runeComposeModel
@@ -278,7 +278,7 @@
            PlayerDatas.Instance.PlayerDataRefreshInfoEvent += PlayerDataRefreshInfoEvent;
            m_PlayerBreakEffect = false;
            UpdateRuneBreak(true);
            m_ContainerRuneSoul.gameObject.SetActive(treasureModel.IsGetTreasurePrivilege(TreasurePrivilege.RuneBreakExpAdd));
            m_ContainerRuneSoul.gameObject.SetActive(treasureSoulModel.IsGetTreasureSoul((int)TreasurePrivilege.RuneBreakExpAdd));
        }
        protected override void OnAfterOpen()
System/Rune/RuneModel.cs
@@ -230,8 +230,8 @@
        public float GetRuneSoulBreakExp(RuneData _rune)
        {
            ItemConfig _itemCfg = ConfigManager.Instance.GetTemplate<ItemConfig>(_rune.id);
            var _treasureModel = ModelCenter.Instance.GetModel<TreasureModel>();
            var _upper = (float)_treasureModel.GetPrivilegeValue((int)TreasurePrivilege.RuneBreakExpAdd) / 10000;
            var _treasureSoul = ModelCenter.Instance.GetModel<TreasureSoulModel>();
            var _upper = (float)_treasureSoul.GetTreasureSoulValue((int)TreasurePrivilege.RuneBreakExpAdd) / 10000;
            if (_itemCfg.Type == RUNE_CREAMTYPE)
            {
                return _itemCfg.EffectValueA1 * _upper;
@@ -246,8 +246,8 @@
        {
            float _exp = 0;
            ItemConfig _itemCfg = ConfigManager.Instance.GetTemplate<ItemConfig>(_rune.id);
            var _treasureModel = ModelCenter.Instance.GetModel<TreasureModel>();
            var _upper = (float)_treasureModel.GetPrivilegeValue((int)TreasurePrivilege.RuneBreakExpAdd) / 10000;
            var _treasureSoul = ModelCenter.Instance.GetModel<TreasureSoulModel>();
            var _upper = (float)_treasureSoul.GetTreasureSoulValue((int)TreasurePrivilege.RuneBreakExpAdd) / 10000;
            if (_itemCfg.Type == RUNE_CREAMTYPE)
            {
                return _itemCfg.EffectValueA1 + _itemCfg.EffectValueA1 * _upper;
System/Skill/QuickSetting.cs
@@ -14,6 +14,7 @@
        quickSettingDic.Add(QuickSettingType.Skill, new QuickSettingRange(QuickSettingType.Skill, 30, 3));
        quickSettingDic.Add(QuickSettingType.FairyLeagueGuide, new QuickSettingRange(QuickSettingType.FairyLeagueGuide, 1));
        quickSettingDic.Add(QuickSettingType.AutoUseXp, new QuickSettingRange(QuickSettingType.AutoUseXp, 1));
        quickSettingDic.Add(QuickSettingType.SpAnim, new QuickSettingRange(QuickSettingType.SpAnim, 10));
        setting = new string(UCharacter, 100);
        DTC0102_tagCDBPlayer.beforePlayerDataInitializeEvent += BeforePlayerDataInitializeEvent;
    }
@@ -107,6 +108,7 @@
        Skill,
        FairyLeagueGuide,
        AutoUseXp,
        SpAnim,
    }
    public struct QuickSettingRange
    {
System/Tip/SkillDetails.cs
@@ -64,6 +64,9 @@
                    skillSource = _infos[0];
                    infoList.Add(skillModel.Description);
                    break;
                case SkillSourceType.DogzSkill:
                    infoList.Add(skillModel.Description);
                    break;
            }
            if (!WindowCenter.Instance.CheckOpen<SkillDetailsWin>())
            {
@@ -78,6 +81,7 @@
            PetSkill = 2,
            BlastFurnace = 3,
            ViewHorsePet = 4,
            DogzSkill = 5,
        }
    }
}
System/Tip/SkillDetailsWin.cs
@@ -65,6 +65,12 @@
                        textSkillSource.text = SkillDetails.skillSource;
                    }
                    break;
                case SkillDetails.SkillSourceType.DogzSkill:
                    {
                        textSkillSource.text = SkillDetails.skillModel.SkillName;
                        textSkillName.text = Language.Get("PlayerDetail_Level", SkillDetails.skillModel.SkillLV);
                    }
                    break;
            }
System/Treasure/FairyTreasureCollectPanelPattern1.cs
File was deleted
System/Treasure/FairyTreasureCollectPanelPattern4.cs
@@ -24,6 +24,8 @@
            }
        }
        TreasureSoulModel treasureSoulModel { get { return ModelCenter.Instance.GetModel<TreasureSoulModel>(); } }
        public override void Display(int _treasureId, bool _tween = false)
        {
            base.Display(_treasureId, _tween);
@@ -80,12 +82,9 @@
        private void OnSignRefresh()
        {
            if (treasure.treasureStages[0].unlockType == TreasureStageUnlock.Privilege)
            if(treasure.id== treasureSoulModel.signAddTreasure)
            {
                var _specialData = treasure.treasureStages[0].specialData;
                if (_specialData.type == TreasurePrivilege.Sign)
                {
                    var _property = _specialData.propertyDict.First();
                var _property = treasureSoulModel.signAddProperty.First();
                    var _propertyCfg = ConfigManager.Instance.GetTemplate<PlayerPropertyConfig>(_property.Key);
                    m_SignPropertyEffect.text = Language.Get("FairyTreasure_5",
                        _property.Value, _propertyCfg.Name);
@@ -101,7 +100,6 @@
                        m_ProerptyValue.text = Language.Get("FairyTreasure_8",
                           _propertyCfg.Name, signInModel.SumSignNum * _property.Value);
                        m_SignInTip.text = Language.Get("SignInTreasureTip2");
                    }
                }
            }
        }
System/Treasure/FairyTreasureCollectPanelPattern5.cs
@@ -78,8 +78,6 @@
            DisplayFurnace();
            DisplayFunc();
            achievementModel.achievementCompletedEvent += AchievementCompletedEvent;
            model.treasureStateChangeEvent -= OnTreasureStateChange;
            model.treasureStateChangeEvent += OnTreasureStateChange;
            completedAchivement = 0;
@@ -110,23 +108,10 @@
            achievementModel.GotoCompleteAchievement(currentAchievement.id);
        }
        protected override void OnTreasureStateChange(int _id)
        {
            if (_id != treasureId)
            {
                return;
            }
            if (model.newGotTreasureId == treasureId)
            {
                model.newGotTreasureId = 0;
            }
        }
        public override void Dispose()
        {
            m_GotoGet.onClick.RemoveAllListeners();
            achievementModel.achievementCompletedEvent -= AchievementCompletedEvent;
            model.treasureStateChangeEvent -= OnTreasureStateChange;
            for (int i = 0; i < m_FurnacesAchievements.Length; i++)
            {
                m_FurnacesAchievements[i].Dispose();
@@ -144,24 +129,14 @@
        private void DisplayProgress()
        {
            Achievement _mainAchievement;
            achievementModel.TryGetAchievement(model.GetFurnacesAchievements()[0], out _mainAchievement);
            if (_mainAchievement != null && _mainAchievement.completed)
            {
                m_ContainerAchievement.gameObject.SetActive(true);
            }
            if (treasure.state == TreasureState.Collected)
            {
                m_ContainerAchievement.gameObject.SetActive(false);
            }
            m_ContainerAchievement.gameObject.SetActive(treasure.state == TreasureState.Collected && treasure.stage <= 0);
            var _processingIndex = -1;
            if (treasure.state != TreasureState.Collected
                && _mainAchievement != null && _mainAchievement.completed)
            if (treasure.state == TreasureState.Collected && treasure.stage <= 0)
            {
                var _list = model.GetFurnacesAchievements();
                for (int i = 0; i < m_FurnacesAchievements.Length; i++)
                {
                    var _beforeId = _list[i];
                    var _beforeId = i == 0 ? 0 : _list[i - 1];
                    Achievement _beforeAchievement;
                    bool _beforeComplete = true;
                    if (achievementModel.TryGetAchievement(_beforeId, out _beforeAchievement))
@@ -169,14 +144,14 @@
                        _beforeComplete = _beforeAchievement.completed;
                    }
                    Achievement achievement;
                    achievementModel.TryGetAchievement(_list[i + 1], out achievement);
                    var config = ConfigManager.Instance.GetTemplate<SuccessConfig>(_list[i + 1]);
                    achievementModel.TryGetAchievement(_list[i], out achievement);
                    var config = ConfigManager.Instance.GetTemplate<SuccessConfig>(_list[i]);
                    var _processing = !achievement.completed &&  _beforeComplete;
                    if ((_processing || Achievement.IsReach(achievement.id, achievement.progress)) && _processingIndex == -1)
                    {
                        _processingIndex = i;
                    }
                    m_FurnacesAchievements[i].Display(_list[i + 1]);
                    m_FurnacesAchievements[i].Display(_list[i]);
                }
            }
            if (_processingIndex != -1)
@@ -190,19 +165,14 @@
        private void DisplayFurnacesHole()
        {
            Achievement _mainAchievement;
            achievementModel.TryGetAchievement(model.GetFurnacesAchievements()[0], out _mainAchievement);
            if (_mainAchievement != null && _mainAchievement.completed)
            {
                m_ContainerHoles.gameObject.SetActive(true);
            }
            if (treasure.state != TreasureState.Collected)
            m_ContainerHoles.gameObject.SetActive(treasure.state == TreasureState.Collected);
            if (treasure.state == TreasureState.Collected)
            {
                var _list = model.GetFurnacesAchievements();
                for (int i = 0; i < m_FurnacesIcons.Length; i++)
                {
                    Achievement achievement;
                    achievementModel.TryGetAchievement(_list[i + 1], out achievement);
                    achievementModel.TryGetAchievement(_list[i], out achievement);
                    if (achievement != null && achievement.id == completedAchivement)
                    {
                        completedAchivement = 0;
@@ -261,10 +231,6 @@
        IEnumerator Co_Fly()
        {
            yield return WaitingForSecondConst.WaitMS300;
            if (model.newGotTreasureId == treasureId)
            {
                model.newGotTreasureId = 0;
            }
            model.treasureStepUpShow = false;
            BeginFly();
        }
@@ -291,33 +257,36 @@
        private void Display()
        {
            GetCurrentAchievement();
            Achievement _mainAchievement;
            achievementModel.TryGetAchievement(model.GetFurnacesAchievements()[0], out _mainAchievement);
            if (!_mainAchievement.completed && treasure.state != TreasureState.Collected)
            if (treasure.state != TreasureState.Collected)
            {
                int unlocktreasureId = 0;
                var list = model.GetTreasureCategory(TreasureCategory.Human);
                for (int i = 0; i < list.Count; i++)
                {
                    Treasure _treasure;
                    if(model.TryGetTreasure(list[i], out _treasure))
                    {
                        var index = _treasure.treasureStages.FindIndex((x) =>
                        {
                            return x.unlockType == TreasureStageUnlock.Treasure && x.treasure == treasure.id;
                        });
                        if (index != -1)
                        {
                            unlocktreasureId = list[i];
                            break;
                        }
                    }
                }
                var unlockTreasureConfig = ConfigManager.Instance.GetTemplate<TreasureConfig>(unlocktreasureId);
                m_AchievementGetBtn.gameObject.SetActive(false);
                m_GotoGet.gameObject.SetActive(false);
                m_ContainerLocked.gameObject.SetActive(true);
                var _successConfig = ConfigManager.Instance.GetTemplate<SuccessConfig>(_mainAchievement.id);
                if (_successConfig.Type == 3)
                {
                    var task = ConfigManager.Instance.GetTemplate<PyTaskConfig>(_successConfig.Condition[0]);
                    if (task != null)
                    {
                        var taskInfo = ConfigManager.Instance.GetTemplate<TASKINFOConfig>(task.name);
                        if (taskInfo != null)
                        {
                            m_LockedDescription.text = Language.Get("FairyTreasureLimitTask", taskInfo.show_writing);
                        }
                    }
                }
                else
                {
                    m_LockedDescription.text = Language.Get("FairyTreasureLimitAchievement", _successConfig.Describe);
                }
                m_LockedDescription.text = Language.Get("BlastFurnaceGet", unlockTreasureConfig == null ? string.Empty : unlockTreasureConfig.Name);
                m_ContainerAchievement.gameObject.SetActive(false);
            }
            else if (currentAchievement == null || treasure.state == TreasureState.Collected)
            else if (currentAchievement == null || treasure.stage >= 1)
            {
                m_AchievementGetBtn.gameObject.SetActive(false);
                m_GotoGet.gameObject.SetActive(false);
@@ -332,7 +301,7 @@
                m_GotoGet.gameObject.SetActive(!_isReach);
            }
            m_GotoStove.gameObject.SetActive(treasure.state == TreasureState.Collected);
            m_GotoStove.gameObject.SetActive(treasure.stage >= 1);
        }
        private void OnAchievementGet()
@@ -346,8 +315,12 @@
        private void DisplayFunc()
        {
            m_FuncTitle.text = treasure.state == TreasureState.Collected ? Language.Get("FairyTreasureOpenFunc") : Language.Get("FairyTreasureUnOpenFunc");
            var config = ConfigManager.Instance.GetTemplate<FuncOpenLVConfig>(treasure.unLockFunc);
            m_FuncTitle.text = treasure.state == TreasureState.Collected && treasure.stage >= 1 ? Language.Get("FairyTreasureOpenFunc") : Language.Get("FairyTreasureUnOpenFunc");
            var funcStage = treasure.treasureStages.Find((x) =>
            {
                return x.unlockType == TreasureStageUnlock.Func;
            });
            var config = ConfigManager.Instance.GetTemplate<FuncOpenLVConfig>(funcStage.func);
            if (config != null)
            {
                m_FuncIcon.SetSprite(config.Icon);
@@ -356,8 +329,8 @@
        private void DisplayFurnace()
        {
            m_ContainerFurnace.gameObject.SetActive(treasure.state == TreasureState.Collected);
            if (treasure.state == TreasureState.Collected)
            m_ContainerFurnace.gameObject.SetActive(treasure.state == TreasureState.Collected && treasure.stage >= 1);
            if (treasure.state == TreasureState.Collected && treasure.stage >= 1)
            {
                var stoveLevel = blastFurnaceModel.StoveLV;
                m_FurnaceLv.text = Language.Get("BlastFurnace101", stoveLevel);
System/Treasure/TreasureAnimation.cs
@@ -278,6 +278,12 @@
            var _effect = EffectMgr.Instance.PlayUIEffect(SPIRALSFX, 2700, m_TreasureMeridians[_index].transform.parent, false);
            _effect.transform.localPosition = _config[_index].position;
            _duration = _effect.duration;
            if (_index == _config.stagePointNum - 1 && m_ProgressPosTween.gameObject.activeInHierarchy)
            {
                m_ProgressPosTween.Play(true);
            }
            while (_timer < _duration)
            {
                _timer += Time.deltaTime;
@@ -602,7 +608,12 @@
                    OnAchievementTweenComplete();
                }
            });
            Treasure treasure;
            model.TryGetTreasure(selectTreasureId, out treasure);
            if (!treasure.IsHighestStage)
            {
            m_ProgressPosTween.Play();
            }
            if (OnStepComplete != null)
            {
                OnStepComplete(TreasureShowStep.FirstUnLock);
@@ -612,7 +623,6 @@
                yield return null;
            }
            stepComplete = true;
            Treasure treasure;
            model.TryGetTreasure(selectTreasureId, out treasure);
            if (treasure.treasureStages[0].unlockType != TreasureStageUnlock.None)
            {
@@ -709,7 +719,8 @@
            {
                yield return null;
            }
            if (_config.stagePointNum > 1)
            {
            timer = 0;
            var _effect = EffectMgr.Instance.PlayUIEffect(CONVERGESFX, 2700, m_TreasureMeridians[_skillStageIndex].transform.parent, false);
            _effect.transform.localPosition = _config[_skillStageIndex].position;
@@ -717,6 +728,7 @@
            {
                yield return null;
            }
            }
            timer = 0;
            m_ContainerLevelUp.gameObject.SetActive(false);
            m_ContianerPotential.gameObject.SetActive(true);
System/Treasure/TreasureData.cs
@@ -17,13 +17,6 @@
    {
        public int id { get; private set; }
        int m_Level;
        public int level
        {
            get { return m_Level; }
            set { m_Level = value; }
        }
        int m_Stage;
        public int stage
        {
@@ -52,7 +45,6 @@
            set { m_State = value; }
        }
        #region 旧数据
        int m_Progress = 0;
        public int progress
        {
@@ -86,11 +78,6 @@
            }
        }
        public int unLockFunc
        {
            get; private set;
        }
        public int unLockPrivilege
        {
            get; private set;
@@ -115,8 +102,6 @@
        public List<int> achievements = new List<int>();
        public Dictionary<int, AchievementGroup> achievementGroups = new Dictionary<int, AchievementGroup>();
        public Item[] needItems { get; private set; }
        public Redpoint skillLevelUpRedpoint { get; private set; }
        public Redpoint achievementRedpoint { get; private set; }
@@ -188,29 +173,6 @@
                        tempPotentials.Add(new TreasurePotential(skillId, 0));
                    }
                }
            }
            if (!string.IsNullOrEmpty(config.NeedItem))
            {
                try
                {
                    var stringSet = config.NeedItem.Split('|');
                    needItems = new Item[stringSet.Length];
                    for (int i = 0; i < needItems.Length; i++)
                    {
                        var itemStrings = stringSet[i].Split('_');
                        needItems[i] = new Item(int.Parse(itemStrings[0]), int.Parse(itemStrings[1]));
                    }
                }
                catch (Exception ex)
                {
                    Debug.Log(ex.StackTrace);
                }
            }
            else
            {
                needItems = null;
            }
        }
@@ -269,40 +231,11 @@
            return configA.ReOrder < configB.ReOrder ? -1 : 1;
        }
        #endregion
        public TreasureSpecialData specialData { get; private set; }
        public List<TreasureStage> treasureStages = new List<TreasureStage>();
        public void UpdateTreasureStage(TreasureUpConfig _cfg)
        {
            TreasureStage _stage;
            if (_cfg.UnLockFuncID != 0)
            {
                _stage = new TreasureStage(_cfg.UnLockFuncID);
                unLockFunc = _stage.func;
            }
            else if (_cfg.Privilege != 0)
            {
                _stage = new TreasureStage(_cfg.Privilege, TreasureStageUnlock.Privilege);
                specialData = _stage.specialData;
                unLockPrivilege = _stage.privilege;
            }
            else if (_cfg.UnLockSkill != null && _cfg.UnLockSkill.Length > 1)
            {
                _stage = new TreasureStage(_cfg.UnLockSkill);
            }
            else if (!_cfg.AddAttr.Equals(string.Empty))
            {
                _stage = new TreasureStage(_cfg.AddAttr);
            }
            else
            {
                _stage = new TreasureStage();
            }
            _stage.exp = _cfg.NeedExp;
            _stage.stage = _cfg.LV;
            _stage.limitLevel = _cfg.LVLimit;
            TreasureStage _stage = new TreasureStage(_cfg);
            treasureStages.Add(_stage);
        }
@@ -311,18 +244,21 @@
            stage = _lv;
            exp = _exp;
            hasClickChallenge = _hasClickChallenge;
            if ((this is HumanTreasure) && IsMaxStage())
            if ((this is HumanTreasure))
            {
                (this as HumanTreasure).humanState = HumanTreasureState.Potential;
                (this as HumanTreasure).UpdateTreasureState();
            }
        }
        public bool IsMaxStage()
        public bool IsHighestStage
        {
            get
        {
            return treasureStages.FindIndex((x) =>
            {
                return x.stage >= stage + 1;
            }) == -1;
            }
        }
        public bool IsUnlockStage(TreasureStageUnlock _type)
@@ -362,24 +298,11 @@
            {
                return m_State;
            }
            set
            private set
            {
                m_State = value;
                if (value == HumanTreasureState.CastSoul)
                {
                    if (IsMaxStage())
                    {
                        m_State = HumanTreasureState.Potential;
                    }
                }
                ModelCenter.Instance.GetModel<TreasureModel>().HumanTreasureStateChange(base.id);
            }
        }
        public HumanTreasure(int _id)
            : base(_id)
        {
        }
        public HumanTreasure(int _id, int[] _potentialIds, Redpoint _skillLevelUpRedpoint, Redpoint _achievementPoint
@@ -387,6 +310,28 @@
            : base(_id, _potentialIds, _skillLevelUpRedpoint, _achievementPoint)
        {
            castSoulRedpoint = _castSoulPoint;
        }
        public void UpdateTreasureState()
        {
            if (state == TreasureState.Locked)
            {
                humanState = HumanTreasureState.Locked;
                return;
            }
            if (state == TreasureState.Collecting)
            {
                humanState = HumanTreasureState.Challenge;
                return;
            }
            if (IsHighestStage && FuncOpen.Instance.IsFuncOpen(82))
            {
                humanState = HumanTreasureState.Potential;
            }
            else
            {
                humanState = HumanTreasureState.CastSoul;
            }
        }
        public Redpoint castSoulRedpoint { get; private set; }
@@ -600,63 +545,71 @@
        public Dictionary<int, int> propertyDict { get; private set; }
        public Dictionary<int, int> skillDict { get; private set; }
        public int func { get; private set; }
        public int privilege { get; private set; }
        public Item item { get; private set; }
        public int treasure { get; private set; }
        public int exp { get; set; }
        public TreasureSpecialData specialData { get; private set; }
        public int stateSfxId { get; private set; }
        public const int selectedSfxId = 5144;
        public string sfxGotState { get; private set; }
        public string sfxUnGotState { get; private set; }
        public int limitLevel { get; set; }
        public TreasureStage()
        public TreasureStage(TreasureUpConfig _config)
        {
            unlockType = TreasureStageUnlock.None;
        }
        public TreasureStage(int _value, TreasureStageUnlock _type = TreasureStageUnlock.Func)
            if (_config.UnLockFuncID != 0)
        {
            unlockType = _type;
            func = _type == TreasureStageUnlock.Func ? _value : 0;
            privilege = _type == TreasureStageUnlock.Privilege ? _value : 0;
            stateSfxId = 5141;
            sfxGotState = "Effect_FaBao_Icon_JiNeng_01";
            sfxUnGotState = "Effect_FaBao_Icon_JiNeng_02";
            //stateSfxId = _type == TreasureStageUnlock.Func ? 5140 : 5143;
            //sfxGotState = _type == TreasureStageUnlock.Func ? "Effect_FaBao_Icon_GongNeng_01" : "Effect_FaBao_Icon_TeQuan_02";
            //sfxUnGotState = _type == TreasureStageUnlock.Func ? "Effect_FaBao_Icon_GongNeng" : "Effect_FaBao_Icon_TeQuan";
            if (_type == TreasureStageUnlock.Privilege)
                unlockType = TreasureStageUnlock.Func;
                func = _config.UnLockFuncID;
            }
            else if (_config.UnLockSkill != null && _config.UnLockSkill.Length > 1)
            {
                SetSpecial();
                unlockType = TreasureStageUnlock.Skill;
                skillDict = new Dictionary<int, int>();
                for (int i = 0; i < _config.UnLockSkill.Length; i++)
                {
                    skillDict.Add(i + 1, _config.UnLockSkill[i]);
            }
        }
        public TreasureStage(string _property)
            else if (!string.IsNullOrEmpty(_config.AddAttr))
        {
            unlockType = TreasureStageUnlock.Property;
            propertyDict = ConfigParse.GetDic<int, int>(_property);
                propertyDict = ConfigParse.GetDic<int, int>(_config.AddAttr);
            }
            else if (_config.ActiveMWID != 0)
            {
                unlockType = TreasureStageUnlock.Treasure;
                treasure = _config.ActiveMWID;
            }
            else if (!string.IsNullOrEmpty(_config.ItemAward))
            {
                unlockType = TreasureStageUnlock.Item;
                var itemArray = LitJson.JsonMapper.ToObject<int[]>(_config.ItemAward);
                if (itemArray != null && itemArray.Length > 0)
                {
                    item = new Item()
                    {
                        id = itemArray[0],
                        count = itemArray.Length > 1 ? itemArray[1] : 1,
                        bind = itemArray.Length > 2 ? (itemArray[2] == 1) : false,
                    };
                }
            }
            exp = _config.NeedExp;
            stage = _config.LV;
            switch (unlockType)
            {
                case TreasureStageUnlock.Property:
            stateSfxId = propertyDict.ContainsKey(6) ? 5142 : 5139;
            sfxGotState = propertyDict.ContainsKey(6) ? "Effect_FaBao_Icon_ShengMing" : "Effect_FaBao_Icon_GongJi";
            sfxUnGotState = propertyDict.ContainsKey(6) ? "Effect_FaBao_Icon_ShengMing" : "Effect_FaBao_Icon_GongJi";
        }
        public TreasureStage(int[] _skills)
        {
            unlockType = TreasureStageUnlock.Skill;
                    break;
                default:
            stateSfxId = 5141;
            sfxGotState = "Effect_FaBao_Icon_JiNeng_01";
            sfxUnGotState = "Effect_FaBao_Icon_JiNeng_02";
            skillDict = new Dictionary<int, int>();
            for (int i = 0; i < _skills.Length; i++)
            {
                skillDict.Add(i + 1, _skills[i]);
                    break;
            }
        }
        public void SetSpecial()
        {
            var _priviligeCfg = ConfigManager.Instance.GetTemplate<TreasurePrivilegeConfig>(privilege);
            specialData = new TreasureSpecialData((TreasurePrivilege)_priviligeCfg.PrivilegeID);
        }
        public int GetSkill(int _job)
@@ -682,8 +635,6 @@
                        return _skillCfg.FightPower;
                    }
                    break;
                case TreasureStageUnlock.Privilege:
                    return specialData.GetFightPower();
            }
            return 0;
        }
@@ -695,297 +646,8 @@
        Property,
        Skill,
        Func,
        Privilege,
    }
    public enum TreasurePrivilege
    {
        Property = 1,
        DemonJarAtk = 2,
        StrengthenAdd = 3,
        RuneBreakExpAdd = 4,
        MountAtk = 5,
        PetHp = 6,
        Boss = 7,
        Wing = 8,
        Suit = 9,
        Wash = 10,
        Sign = 11,
    }
    public enum TreasurePrivilegeState
    {
        Doing = 0,
        Reward = 1,
        Complete = 2
    }
    public class TreasureSpecialData
    {
        public TreasurePrivilege type { get; private set; }
        public int progress { get; private set; }
        public int totalProgress { get; private set; }
        public int effectValue { get; private set; }
        public List<AwardItem> items { get; private set; }
        public Dictionary<int, int> propertyDict { get; private set; }
        public Redpoint privilegeRedpoint { get; private set; }
        private TreasurePrivilegeState m_State = TreasurePrivilegeState.Doing;
        public TreasurePrivilegeState state
        {
            get { return m_State; }
            set { m_State = value; }
        }
        public int presentFinishCount { get; set; }
        public int presentGetCount { get; set; }
        public bool itemGet { get; set; }
        public TreasureSpecialData(TreasurePrivilege _type)
        {
            type = _type;
            var config = ConfigManager.Instance.GetTemplate<TreasurePrivilegeConfig>((int)_type);
            progress = Mathf.Max(1, config.singleValue);
            totalProgress = config.maxValue;
            var _effectValue = 0;
            int.TryParse(config.EffectValue, out _effectValue);
            effectValue = _effectValue;
            if (!string.IsNullOrEmpty(config.attr))
            {
                var propertyJson = LitJson.JsonMapper.ToObject(config.attr);
                propertyDict = new Dictionary<int, int>();
                foreach (var _key in propertyJson.Keys)
                {
                    var _property = int.Parse(_key);
                    var _value = int.Parse(propertyJson[_key].ToJson());
                    propertyDict.Add(_property, _value);
                }
            }
            if (!string.IsNullOrEmpty(config.itemAward))
            {
                var itemArray = LitJson.JsonMapper.ToObject<int[][]>(config.itemAward);
                if (itemArray != null && itemArray.Length > 0)
                {
                    items = new List<AwardItem>();
                    for (int i = 0; i < itemArray.Length; i++)
                    {
                        var _array = itemArray[i];
                        items.Add(new AwardItem()
                        {
                            isBind = _array[2],
                            item = new Item()
                            {
                                id = _array[0],
                                count = _array[1],
                            },
                        });
                    }
                }
            }
            if (type == TreasurePrivilege.PetHp)
            {
                var petCount = ConfigManager.Instance.GetAllValues<PetInfoConfig>().Count;
                totalProgress = petCount;
            }
            else if (type == TreasurePrivilege.MountAtk)
            {
                var mountConfigs = ConfigManager.Instance.GetAllValues<HorseConfig>();
                var maxlv = 0;
                for (int i = 0; i < mountConfigs.Count; i++)
                {
                    maxlv += mountConfigs[i].MaxLV;
                }
                totalProgress = maxlv;
            }
            else if (type == TreasurePrivilege.StrengthenAdd)
            {
                var configs = ConfigManager.Instance.GetAllValues<ItemPlusSumAttrConfig>();
                totalProgress = configs[configs.Count - 1].countNeed;
            }
            switch (_type)
            {
                case TreasurePrivilege.DemonJarAtk:
                case TreasurePrivilege.StrengthenAdd:
                case TreasurePrivilege.MountAtk:
                case TreasurePrivilege.PetHp:
                case TreasurePrivilege.Boss:
                case TreasurePrivilege.Wash:
                    privilegeRedpoint = new Redpoint(TreasureModel.TREASURE_SOUL_ID, TreasureModel.TREASURE_SOUL_ID * 100 + (int)type);
                    break;
            }
        }
        public int GetPrivilegeValue(int _index = 0)
        {
            switch (type)
            {
                case TreasurePrivilege.RuneBreakExpAdd:
                    return effectValue;
                case TreasurePrivilege.DemonJarAtk:
                case TreasurePrivilege.Suit:
                    return effectValue;
                case TreasurePrivilege.Wing:
                case TreasurePrivilege.StrengthenAdd:
                    return effectValue;
            }
            return 0;
        }
        public void UpdateState()
        {
            switch (type)
            {
                case TreasurePrivilege.Property:
                case TreasurePrivilege.RuneBreakExpAdd:
                case TreasurePrivilege.Wing:
                case TreasurePrivilege.Suit:
                    state = TreasurePrivilegeState.Complete;
                    break;
                case TreasurePrivilege.Boss:
                case TreasurePrivilege.DemonJarAtk:
                case TreasurePrivilege.PetHp:
                case TreasurePrivilege.MountAtk:
                    privilegeRedpoint.state = RedPointState.None;
                    if (presentFinishCount >= totalProgress && (presentGetCount / progress) >= (totalProgress / progress))
                    {
                        state = TreasurePrivilegeState.Complete;
                    }
                    else if (presentGetCount > 0 && presentFinishCount / progress < presentGetCount / progress)
                    {
                        state = TreasurePrivilegeState.Reward;
                        privilegeRedpoint.state = RedPointState.Simple;
                    }
                    else
                    {
                        state = TreasurePrivilegeState.Doing;
                    }
                    break;
                case TreasurePrivilege.Wash:
                    privilegeRedpoint.state = itemGet ? RedPointState.None : RedPointState.Simple;
                    state = itemGet ? TreasurePrivilegeState.Doing : TreasurePrivilegeState.Reward;
                    break;
                case TreasurePrivilege.StrengthenAdd:
                    privilegeRedpoint.state = RedPointState.None;
                    var strengthen = ModelCenter.Instance.GetModel<PlayerStrengthengDatas>();
                    var playerpack = ModelCenter.Instance.GetModel<PlayerPackModel>();
                    presentGetCount = 0;
                    foreach (var value in strengthen._EqInfo.Values)
                    {
                        ItemModel itemModel = playerpack.GetItemModelByIndex(PackType.rptEquip, value.EquipIndex);
                        if (itemModel != null)
                        {
                            presentGetCount += value.EquipPartStarLV;
                        }
                    }
                    var configs = ConfigManager.Instance.GetAllValues<ItemPlusSumAttrConfig>();
                    bool contains = configs.FindIndex((x) =>
                    {
                        return x.countNeed > presentFinishCount && presentGetCount >= x.countNeed;
                    }) != -1;
                    if (presentFinishCount >= totalProgress && presentGetCount >= totalProgress)
                    {
                        state = TreasurePrivilegeState.Complete;
                    }
                    else if (contains)
                    {
                        state = TreasurePrivilegeState.Reward;
                        privilegeRedpoint.state = RedPointState.Simple;
                    }
                    else
                    {
                        state = TreasurePrivilegeState.Doing;
                    }
                    break;
            }
        }
        public string ProgressDisplay()
        {
            switch (type)
            {
                case TreasurePrivilege.DemonJarAtk:
                case TreasurePrivilege.PetHp:
                case TreasurePrivilege.MountAtk:
                case TreasurePrivilege.Boss:
                    if (state == TreasurePrivilegeState.Complete) { return UIHelper.GetTextColorByItemColor(TextColType.Green, totalProgress.ToString(), true); }
                    else if (state == TreasurePrivilegeState.Doing)
                    {
                        return StringUtility.Contact(UIHelper.GetTextColorByItemColor(TextColType.Red, presentGetCount.ToString(), true), "/", (presentFinishCount / progress + 1) * progress);
                    }
                    else if (state == TreasurePrivilegeState.Reward)
                    {
                        var _completeCount = (presentFinishCount / progress + 1) * progress;
                        return StringUtility.Contact(UIHelper.GetTextColorByItemColor(TextColType.Green, presentGetCount.ToString(), true), "/", _completeCount);
                    }
                    break;
                case TreasurePrivilege.StrengthenAdd:
                    var configs = ConfigManager.Instance.GetAllValues<ItemPlusSumAttrConfig>();
                    var next = configs.Count - 1;
                    for (int i = 0; i < configs.Count; i++)
                    {
                        if (configs[i].countNeed > presentFinishCount)
                        {
                            next = i;
                            break;
                        }
                    }
                    if (state == TreasurePrivilegeState.Complete) { return totalProgress.ToString(); }
                    else if (state == TreasurePrivilegeState.Doing
                        || state == TreasurePrivilegeState.Reward)
                    {
                        var colortype = presentGetCount >= configs[next].countNeed ? TextColType.Green : TextColType.Red;
                        return StringUtility.Contact(UIHelper.GetTextColorByItemColor(colortype, presentGetCount.ToString(), true), "/", configs[next].countNeed);
                    }
                    break;
            }
            return string.Empty;
        }
        public void GetReward()
        {
            switch (type)
            {
                case TreasurePrivilege.MountAtk:
                case TreasurePrivilege.DemonJarAtk:
                case TreasurePrivilege.PetHp:
                case TreasurePrivilege.Boss:
                case TreasurePrivilege.Wash:
                    var _pak = new CA504_tagCMPlayerGetReward();
                    _pak.RewardType = (int)GotServerRewardType.Def_RewardType_TreasureSoul;
                    _pak.DataEx = (uint)type;
                    _pak.DataExStrLen = 0;
                    _pak.DataExStr = string.Empty;
                    GameNetSystem.Instance.SendInfo(_pak);
                    break;
                case TreasurePrivilege.StrengthenAdd:
                    var configs = ConfigManager.Instance.GetAllValues<ItemPlusSumAttrConfig>();
                    var present = 0;
                    for (int i = 0; i < configs.Count; i++)
                    {
                        if (presentGetCount >= configs[i].countNeed)
                        {
                            present = i;
                        }
                    }
                    CA503_tagCMActiveAllEquipAttr pak = new CA503_tagCMActiveAllEquipAttr();
                    pak.Type = 0;
                    pak.Cnt = (uint)configs[present].countNeed;
                    GameNetSystem.Instance.SendInfo(pak);
                    break;
            }
        }
        public int GetFightPower()
        {
            var _fightPower = 0;
            if (propertyDict != null)
            {
                _fightPower += UIHelper.GetFightPower(propertyDict);
            }
            return _fightPower;
        }
        Item,
        Treasure,
    }
}
System/Treasure/TreasureLevelUpWin.cs
@@ -23,13 +23,8 @@
        [SerializeField] RectTransform m_ContainerUnGet;
        [SerializeField] RectTransform m_ContainerLockDetail;
        [SerializeField] PositionTween m_LockDetailPosTween;
        [SerializeField] ScrollerController m_Controller;
        [SerializeField] Button m_GetTreasureBtn;
        [SerializeField] RectTransform m_ContainerLockFunc;
        [SerializeField] RectTransform m_ContainerLockSkill;
        [SerializeField] RectTransform m_ContainerLockPrivilege;
        [SerializeField] Button m_PrivilegeLockBtn;
        [SerializeField] Button m_FuncLockBtn;
        [SerializeField] Button m_SkillLockBtn;
        [SerializeField] RectTransform m_ContainerLimit;
        [SerializeField] Text m_TreasureChallengeLimit;
        [SerializeField] Text m_TreasureStory;
@@ -43,6 +38,7 @@
        [SerializeField] TreasureProperty m_TreasureProperty;
        [SerializeField] TreasureMeridianBehaviour[] m_TreasureMeridians;
        [Header("Progress")]
        [SerializeField] RectTransform m_ContainerPropgress;
        [SerializeField] Image m_CurrentStageIcon;
        [SerializeField] Text m_TreasureLevelProgress;
        [SerializeField] Text m_TreasureStageDesc;
@@ -110,7 +106,7 @@
        public event Action OnLineStepComplete;
        public int beforePlayerLv = 0;
        int beforePlayerLv = 0;
        #region Built-in
        protected override void BindController()
@@ -123,11 +119,9 @@
            m_BackBtn.onClick.AddListener(OnBack);
            m_GetTreasureBtn.onClick.AddListener(OnGetTreasure);
            m_LevelUpBtn.onClick.AddListener(OnLevelUp);
            m_PrivilegeLockBtn.onClick.AddListener(OnStagePrivilegeClick);
            m_FuncLockBtn.onClick.AddListener(OnStageFuncClick);
            m_SkillLockBtn.onClick.AddListener(OnStageSkillClick);
            m_LeftBtn.onClick.AddListener(OnLeftBtn);
            m_RightBtn.onClick.AddListener(OnRightBtn);
            m_Controller.OnRefreshCell += OnRefreshCell;
        }
        protected override void OnPreOpen()
@@ -163,7 +157,6 @@
            model.treasureLevelProgressUpdateEvent += TreasureLevelProgressUpdateEvent;
            model.treasureSelectedEvent += TreasureSelectedEvent;
            model.treasureStageUpEvent += TreasureStageUpEvent;
            PlayerDatas.Instance.PlayerDataRefreshInfoEvent += PlayerDataRefreshInfoEvent;
            m_TreasureAnimation.OnStepComplete += OnStepComplete;
            RedpointCenter.Instance.redpointValueChangeEvent += RedpointValueChangeEvent;
            achievementModel.achievementCompletedEvent += AchievementCompletedEvent;
@@ -209,7 +202,6 @@
            PlayerTaskDatas.CardLevelChange -= CardLevelChange;
            model.treasureSelectedEvent -= TreasureSelectedEvent;
            model.treasureStageUpEvent -= TreasureStageUpEvent;
            PlayerDatas.Instance.PlayerDataRefreshInfoEvent -= PlayerDataRefreshInfoEvent;
            m_TreasureAnimation.OnStepComplete -= OnStepComplete;
            RedpointCenter.Instance.redpointValueChangeEvent -= RedpointValueChangeEvent;
            achievementModel.achievementCompletedEvent -= AchievementCompletedEvent;
@@ -246,12 +238,18 @@
        }
        #endregion
        private void OnRefreshCell(ScrollerDataType type, CellView cell)
        {
            TreasureUnlockCell treasureUnlockCell = cell as TreasureUnlockCell;
            treasureUnlockCell.Display(model.selectedTreasure, cell.index);
        }
        private void TreasureStateChangeEvent(int _id)
        {
            Treasure _treasure;
            model.TryGetTreasure(_id, out _treasure);
            if (_id == model.selectedTreasure && _treasure != null
                && _treasure.state == TreasureState.Collecting)
                && _treasure.state == TreasureState.Collecting && model.serverInited)
            {
                UpdateStage();
                if (WindowCenter.Instance.CheckOpen<EffectToFaBaoWin>())
@@ -380,7 +378,8 @@
            {
                m_ContainerUnGet.gameObject.SetActive(false);
                if (m_Treasure.IsMaxStage() || _state == 2)
                if ((m_Treasure.IsHighestStage && FuncOpen.Instance.IsFuncOpen(82)
                    && model.GetSpAnim(m_Treasure.id)) || _state == 2)
                {
                    if (_state != 2)
                    {
@@ -391,12 +390,14 @@
                    else
                    {
                        m_TreasureProperty.SetActive(true);
                        model.SetSpAnim(m_Treasure.id);
                    }
                    m_TreasurePotential.Display(m_Treasure, _state);
                }
                else
                {
                    m_ContainerLevelUp.gameObject.SetActive(true);
                    m_ContainerPropgress.gameObject.SetActive(!m_Treasure.IsHighestStage);
                    m_ContainerPotential.gameObject.SetActive(false);
                    if (model.treasureEntranceShowId == model.selectedTreasure)
                    {
@@ -417,78 +418,51 @@
                            m_TreasureAnimation.OnStageLock(m_Treasure.GetStageIndex(m_Treasure.stage));
                        }
                        m_TreasureProperty.SetActive(m_Treasure.state == TreasureState.Collected);
                        if (_state == 1 && m_Treasure.IsHighestStage
                            && FuncOpen.Instance.IsFuncOpen(82) && !model.GetSpAnim(m_Treasure.id))
                        {
                            m_TreasureAnimation.step = TreasureAnimation.TreasureShowStep.FirstPotential;
                            UpdateStage(2);
                            return;
                        }
                    }
                    m_TreasureAnimation.step = TreasureAnimation.TreasureShowStep.UnLock;
                }
            }
        }
        private void PlayerDataRefreshInfoEvent(PlayerDataRefresh type)
        {
            if (type != PlayerDataRefresh.LV)
            {
                return;
            }
            if (m_Treasure != null && m_Treasure.state != TreasureState.Collected)
            {
                UpdateTreasureUnlockDetail();
            }
            else if (m_Treasure != null && m_Treasure.state == TreasureState.Collected)
            {
                if (m_TreasureAnimation.stepComplete && !model.treasureStepUpShow
                    && !m_AchievementScroll.showing && !m_Treasure.IsMaxStage())
                {
                    var _stage = m_Treasure.treasureStages[m_Treasure.StageCount - 1];
                    if (beforePlayerLv < _stage.limitLevel && PlayerDatas.Instance.baseData.LV >= _stage.limitLevel)
                    {
                        DisplayAchievements(true);
                        UpdateTreasureProgress();
                    }
                }
                beforePlayerLv = PlayerDatas.Instance.baseData.LV;
            }
        }
        private void OnFuncStateChangeEvent(int _id)
        {
            if (_id == 126)
            if (_id == 82 && FuncOpen.Instance.IsFuncOpen(_id) && model.serverInited)
            {
                UpdateTreasureProgress();
                UpdateTreasureUnlockDetail();
                if (m_TreasureAnimation.stepComplete && m_Treasure.IsHighestStage
                    && !model.GetSpAnim(m_Treasure.id))
                {
                    m_TreasureAnimation.step = TreasureAnimation.TreasureShowStep.FirstPotential;
                    UpdateStage(2);
                }
            }
        }
        private void UpdateTreasureUnlockDetail()
        {
            var _cfg = ConfigManager.Instance.GetTemplate<TreasureConfig>(model.selectedTreasure);
            var _funcCfg = ConfigManager.Instance.GetTemplate<FuncOpenLVConfig>(m_Treasure.unLockFunc);
            m_TreasureStory.text = _cfg.Story;
            m_ContainerLockFunc.gameObject.SetActive(_funcCfg != null);
            if (_funcCfg != null)
            m_Controller.Refresh();
            for (int i = 0; i < m_Treasure.treasureStages.Count; i++)
            {
                m_FuncLockBtn.image.SetSprite(_funcCfg.Icon);
            }
            var _skillCfg = ConfigManager.Instance.GetTemplate<SkillConfig>(m_Treasure.unLockSkill);
            m_ContainerLockSkill.gameObject.SetActive(_skillCfg != null);
            if (_skillCfg != null)
                var stage = m_Treasure.treasureStages[i];
                switch (stage.unlockType)
            {
                m_SkillLockBtn.image.SetSprite(_skillCfg.IconName);
                    case TreasureStageUnlock.Skill:
                    case TreasureStageUnlock.Func:
                    case TreasureStageUnlock.Treasure:
                        m_Controller.AddCell(ScrollerDataType.Header, stage.stage);
                        break;
            }
            var _privilegeCfg = ConfigManager.Instance.GetTemplate<TreasurePrivilegeConfig>(m_Treasure.unLockPrivilege);
            m_ContainerLockPrivilege.gameObject.SetActive(_privilegeCfg != null);
            if (_privilegeCfg != null)
            {
                var privilegeStage = m_Treasure.treasureStages[m_Treasure.StageCount - 1];
                if (FuncOpen.Instance.IsFuncOpen(126))
                {
                    m_PrivilegeLockBtn.image.SetSprite(_privilegeCfg.Icon);
                }
                else
                {
                    m_PrivilegeLockBtn.image.SetSprite("UnKnowIcon");
                }
                m_PrivilegeLockBtn.image.SetNativeSize();
            }
            m_Controller.Restart();
            Achievement achievement = null;
            int _achievementId = 0;
@@ -520,59 +494,6 @@
                        m_TreasureChallengeLimit.text = Language.Get("TreasureGetRequire", _taskConfig.lv);
                        break;
                }
            }
        }
        private void OnStageSkillClick()
        {
            if (model.treasureStepUpShow)
            {
                return;
            }
            var _stage = m_Treasure.treasureStages.Find((x) =>
            {
                return x.unlockType == TreasureStageUnlock.Skill;
            });
            if (_stage != null)
            {
                OpenTreasureStageTip(_stage.stage,m_SkillLockBtn.transform as RectTransform);
            }
        }
        private void OnStageFuncClick()
        {
            if (model.treasureStepUpShow)
            {
                return;
            }
            var _stage = m_Treasure.treasureStages.Find((x) =>
            {
                return x.unlockType == TreasureStageUnlock.Func;
            });
            if (_stage != null)
            {
                OpenTreasureStageTip(_stage.stage,m_FuncLockBtn.transform as RectTransform);
            }
        }
        private void OnStagePrivilegeClick()
        {
            if (model.treasureStepUpShow)
            {
                return;
            }
            if (!FuncOpen.Instance.IsFuncOpen(126))
            {
                FuncOpen.Instance.ProcessorFuncErrorTip(126);
                return;
            }
            var _stage = m_Treasure.treasureStages.Find((x) =>
            {
                return x.unlockType == TreasureStageUnlock.Privilege;
            });
            if (_stage != null)
            {
                OpenTreasureStageTip(_stage.stage, m_PrivilegeLockBtn.transform as RectTransform);
            }
        }
@@ -792,7 +713,7 @@
        {
            var config = ConfigManager.Instance.GetTemplate<TreasureConfig>(model.selectedTreasure);
            if (!m_Init || config == null || (TreasureCategory)config.Category != TreasureCategory.Human
                || m_Treasure.state != TreasureState.Collected || m_Treasure.IsMaxStage())
                || m_Treasure.state != TreasureState.Collected || m_Treasure.IsHighestStage)
            {
                return;
            }
@@ -870,7 +791,15 @@
                        model.SetTreasureStageShow(m_Treasure.id, -1);
                        m_TreasureAnimation.OnStageLock(m_Treasure.GetStageIndex(m_Treasure.stage));
                    }
                    if (!m_Treasure.IsHighestStage)
                    {
                    CheckGuide65();
                    }
                    else if (FuncOpen.Instance.IsFuncOpen(82) && !model.GetSpAnim(m_Treasure.id))
                    {
                        m_TreasureAnimation.step = TreasureAnimation.TreasureShowStep.FirstPotential;
                        UpdateStage(2);
                    }
                    break;
                case TreasureAnimation.TreasureShowStep.FirstUnLock:
                    UpdateLevelUpSfx(false);
@@ -894,7 +823,7 @@
        {
            if (_win is TreasureNewStageWin)
            {
                if (m_Treasure.IsMaxStage())
                if (m_Treasure.IsHighestStage && FuncOpen.Instance.IsFuncOpen(82))
                {
                    m_TreasureAnimation.step = TreasureAnimation.TreasureShowStep.FirstPotential;
                    UpdateStage(2);
@@ -919,7 +848,7 @@
        private void RequestMeridianLine()
        {
            if (m_Treasure.IsMaxStage())
            if (m_Treasure.IsHighestStage && FuncOpen.Instance.IsFuncOpen(82))
            {
                return;
            }
@@ -981,7 +910,7 @@
            {
                case TreasureStageUnlock.Func:
                    m_ContainerTip.gameObject.SetActive(true);
                    var _funcConfig = ConfigManager.Instance.GetTemplate<FuncOpenLVConfig>(m_Treasure.unLockFunc);
                    var _funcConfig = ConfigManager.Instance.GetTemplate<FuncOpenLVConfig>(stage.func);
                    m_NewStageTip.text = StringUtility.Contact(Language.Get("TreasureGetNewFunc"),
                        UIHelper.GetTextColorByItemColor(TextColType.Green, _funcConfig.Remark));
                    break;
@@ -1016,9 +945,14 @@
                case TreasureStageUnlock.Func:
                    StartScreenShot();
                    break;
                case TreasureStageUnlock.Privilege:
                case TreasureStageUnlock.Item:
                case TreasureStageUnlock.Property:
                    WindowCenter.Instance.Open<TreasureNewStageWin>(true);
                    break;
                case TreasureStageUnlock.Treasure:
                    WindowJumpMgr.Instance.ClearJumpData();
                    WindowCenter.Instance.Open<MainInterfaceWin>();
                    CloseImmediately();
                    break;
            }
        }
@@ -1178,30 +1112,15 @@
                        m_TreasureStageDesc.text = Language.Get("TreasureLevelUpSkill", _funcCfg.Remark);
                        m_CurrentStageIcon.SetSprite(_funcCfg.Icon);
                        break;
                    case TreasureStageUnlock.Privilege:
                        var privilege = m_Treasure.treasureStages[m_Treasure.StageCount - 1];
                        var _privilegeCfg = ConfigManager.Instance.GetTemplate<TreasurePrivilegeConfig>(_nextStage.privilege);
                        if (!FuncOpen.Instance.IsFuncOpen(126))
                        {
                            m_CurrentStageIcon.SetSprite("UnKnowIcon");
                            if (!FuncOpen.Instance.IsFuncOpen(126))
                            {
                                var funcConfig = ConfigManager.Instance.GetTemplate<FuncOpenLVConfig>(126);
                                m_TreasureStageDesc.text = Language.Get("TreasurePrivilegeFuncLimit", funcConfig.LimitLV, funcConfig.Remark);
                            }
                        }
                        else
                        {
                            m_CurrentStageIcon.SetSprite(_privilegeCfg.Icon);
                            if (PlayerDatas.Instance.baseData.LV >= _nextStage.limitLevel)
                            {
                                m_TreasureStageDesc.text = _privilegeCfg.Name;
                            }
                            else
                            {
                                m_TreasureStageDesc.text = Language.Get("TreasurePrivilege_Unlock", _nextStage.limitLevel);
                            }
                        }
                    case TreasureStageUnlock.Item:
                        var _itemConfig = ConfigManager.Instance.GetTemplate<ItemConfig>(_nextStage.item.id);
                        m_CurrentStageIcon.SetSprite(_itemConfig.IconKey);
                        m_TreasureStageDesc.text = Language.Get("TreasureLevelUpItem", _itemConfig.ItemName);
                        break;
                    case TreasureStageUnlock.Treasure:
                        var _treasureConfig = ConfigManager.Instance.GetTemplate<TreasureConfig>(_nextStage.treasure);
                        m_CurrentStageIcon.SetSprite(_treasureConfig.Icon);
                        m_TreasureStageDesc.text = Language.Get("TreasureLevelUpTreasure", _treasureConfig.Name);
                        break;
                }
            }
System/Treasure/TreasureMeridianBehaviour.cs
@@ -84,21 +84,18 @@
            {
                m_TreasureLevelUpWin.OnLineStepComplete -= OnLineStepComplete;
            }
            FuncOpen.Instance.OnFuncStateChangeEvent -= OnFuncStateChangeEvent;
        }
        private void OnStageClick()
        {
            if (m_TreasureStage != null
                && m_TreasureStage.unlockType != TreasureStageUnlock.Property)
            if (m_TreasureStage != null&&  m_TreasureStage.unlockType != TreasureStageUnlock.Property)
            {
                if (m_TreasureStage.unlockType == TreasureStageUnlock.Privilege)
                if (m_TreasureStage.unlockType == TreasureStageUnlock.Item)
                {
                    if (!FuncOpen.Instance.IsFuncOpen(126))
                    {
                        FuncOpen.Instance.ProcessorFuncErrorTip(126);
                    var item = m_TreasureStage.item;
                    ItemAttrData itemAttrData = new ItemAttrData(item.id, true, (ulong)item.count, -1, item.bind ? 1 : 0);
                    ModelCenter.Instance.GetModel<ItemTipsModel>().SetItemTipsModel(itemAttrData);
                        return;
                    }
                }
                model.selectedStage = m_TreasureStage.stage;
                if (!WindowCenter.Instance.CheckOpen<TreasureStageTipWin>())
@@ -120,8 +117,6 @@
            m_TreasureLevelUpWin = _win;
            m_TreasureLevelUpWin.OnLineStepComplete -= OnLineStepComplete;
            m_TreasureLevelUpWin.OnLineStepComplete += OnLineStepComplete;
            FuncOpen.Instance.OnFuncStateChangeEvent -= OnFuncStateChangeEvent;
            FuncOpen.Instance.OnFuncStateChangeEvent += OnFuncStateChangeEvent;
            stageIndex = _stageIndex;
            if (model.TryGetTreasure(model.selectedTreasure, out m_Treasure))
            {
@@ -158,6 +153,7 @@
                                m_Icon.SetSprite(GeneralConfig.Instance.propertyIconDict[_key]);
                            }
                        }
                        m_Icon.SetNativeSize();
                        break;
                    case TreasureStageUnlock.Skill:
                        var _skillId = m_TreasureStage.GetSkill(PlayerDatas.Instance.baseData.Job);
@@ -166,6 +162,7 @@
                        m_Descs[0].color = m_Treasure.id == 104 ? UIHelper.GetUIColor(TextColType.NavyYellow) : UIHelper.s_LightYellow;
                        m_Descs[0].gameObject.SetActive(true);
                        m_Icon.SetSprite(_skillCfg.IconName);
                        m_Icon.SetNativeSize();
                        break;
                    case TreasureStageUnlock.Func:
                        var _funcCfg = ConfigManager.Instance.GetTemplate<FuncOpenLVConfig>(m_TreasureStage.func);
@@ -173,47 +170,24 @@
                        m_Descs[0].color = UIHelper.s_LightYellow;
                        m_Descs[0].gameObject.SetActive(true);
                        m_Icon.SetSprite(_funcCfg.Icon);
                        m_Icon.SetNativeSize();
                        break;
                    case TreasureStageUnlock.Privilege:
                    case TreasureStageUnlock.Item:
                        m_Descs[0].gameObject.SetActive(true);
                        m_Descs[0].color = UIHelper.s_LightYellow;
                        var _privilegeCfg = ConfigManager.Instance.GetTemplate<TreasurePrivilegeConfig>(m_TreasureStage.privilege);
                        if (FuncOpen.Instance.IsFuncOpen(126))
                        {
                            m_Icon.SetSprite(_privilegeCfg.Icon);
                            m_Descs[0].text = _privilegeCfg.Name;
                        }
                        else
                        {
                            m_Icon.SetSprite("UnKnowIcon");
                            m_Descs[0].text = string.Empty;
                        }
                        var itemConfig = ConfigManager.Instance.GetTemplate<ItemConfig>(m_TreasureStage.item.id);
                        m_Icon.SetSprite(itemConfig.IconKey);
                        m_Descs[0].text = itemConfig.ItemName;
                        m_Icon.SetNativeSize();
                        break;
                }
                m_Icon.SetNativeSize();
            }
        }
        private void OnFuncStateChangeEvent(int _id)
        {
            if (_id != 126)
            {
                return;
            }
            if (m_TreasureStage != null && m_TreasureStage.unlockType == TreasureStageUnlock.Privilege)
            {
                var _privilegeCfg = ConfigManager.Instance.GetTemplate<TreasurePrivilegeConfig>(m_TreasureStage.privilege);
                if (FuncOpen.Instance.IsFuncOpen(126))
                {
                    m_Icon.SetSprite(_privilegeCfg.Icon);
                    m_Icon.SetNativeSize();
                    m_Descs[0].text = _privilegeCfg.Name;
                }
                else
                {
                    m_Icon.SetSprite("UnKnowIcon");
                    m_Icon.SetNativeSize();
                    m_Descs[0].text = string.Empty;
                    case TreasureStageUnlock.Treasure:
                        m_Descs[0].gameObject.SetActive(true);
                        m_Descs[0].color = UIHelper.s_LightYellow;
                        var treasureConfig = ConfigManager.Instance.GetTemplate<TreasureConfig>(m_TreasureStage.treasure);
                        m_Icon.SetSprite(treasureConfig.Icon);
                        m_Descs[0].text = treasureConfig.Name;
                        m_Icon.rectTransform.sizeDelta = new Vector2(86, 86);
                        break;
                }
            }
        }
@@ -325,6 +299,10 @@
        public void RequestSfx()
        {
            if (m_Treasure == null || m_TreasureStage == null)
            {
                return;
            }
            var _stage = model.GetTreasureStageShow(m_Treasure.id);
            PlayLineSfx(m_Treasure.stage < m_TreasureStage.stage || _stage == m_TreasureStage.stage ? 4 : 2);
            RequestStateSfx();
System/Treasure/TreasureModel.cs
@@ -46,9 +46,7 @@
        public event Action vipKillNPCTreasureEvent;
        public event Action<int> treasureLevelProgressUpdateEvent;
        public event Action<int> treasureStageUpEvent;
        public event Action<int> treasurePrivilegeUpdateEvent;
        public event Action<int> humanTreasureStateChangeEvent;
        public event Action<int> treasureSelectSoulChangeEvent;
        bool m_WaitOpenDetailsWin = false;
        public bool waitOpenDetailsWin {
@@ -81,22 +79,6 @@
                }
            }
        }
        int m_SelectSoul = 0;
        public int selectSoul
        {
            get { return m_SelectSoul; }
            set
            {
                m_SelectSoul = value;
                if (treasureSelectSoulChangeEvent != null)
                {
                    treasureSelectSoulChangeEvent(value);
                }
            }
        }
        public int gotoSoul { get; set; }
        int m_SelectedStage = 0;
        public int selectedStage {
@@ -187,7 +169,6 @@
        Dictionary<int, Treasure> treasures = new Dictionary<int, Treasure>();
        Dictionary<TreasureCategory, List<int>> treasureCategory = new Dictionary<TreasureCategory, List<int>>();
        Dictionary<int, int> treasureMapDict = new Dictionary<int, int>();
        Dictionary<int, TreasureSpecialData> treasurePrivilegeDict = new Dictionary<int, TreasureSpecialData>();
        Dictionary<int, int> treasureAchievementDict = new Dictionary<int, int>();
        List<int> eightFurnacesAchievements = new List<int>();
        List<int> m_CacheGotAchievements = new List<int>();
@@ -264,7 +245,6 @@
            FuncOpen.Instance.OnFuncStateChangeEvent += OnFunctionStateChange;
            packageModel.RefreshItemCountAct += OnPackageItemChange;
            WindowCenter.Instance.windowAfterOpenEvent += OnWindowOpen;
            PlayerStrengthengDatas.RefreshEquipUpgradLvAct += RefreshEquipSTRLv;
        }
        public override void UnInit()
@@ -278,7 +258,6 @@
            FuncOpen.Instance.OnFuncStateChangeEvent -= OnFunctionStateChange;
            packageModel.RefreshItemCountAct -= OnPackageItemChange;
            WindowCenter.Instance.windowAfterOpenEvent -= OnWindowOpen;
            PlayerStrengthengDatas.RefreshEquipUpgradLvAct -= RefreshEquipSTRLv;
        }
        public void OnAfterPlayerDataInitialize()
@@ -300,10 +279,7 @@
                if ((treasure is HumanTreasure))
                {
                    var humanTreasure = treasure as HumanTreasure;
                    humanTreasure.humanState = HumanTreasureState.Locked;
                    treasure.specialData.presentFinishCount = 0;
                    treasure.specialData.presentGetCount = 0;
                    treasure.specialData.itemGet = false;
                    humanTreasure.UpdateTreasureState();
                }
            }
        }
@@ -314,7 +290,6 @@
            UpdateAchievementRedpoints();
            UpdateCastSoulRedpoints();
            UpdateSkillLevelUpRedpoints();
            UpdatePrivileges();
        }
        private bool needDisplayReguluLevelUp = false;
@@ -359,6 +334,34 @@
        {
            var _playerId = PlayerDatas.Instance.baseData.PlayerID;
            LocalSave.SetBool(StringUtility.Contact(_playerId, "_PotentialUnlockShow_", _treasureId), _value);
        }
        public bool GetSpAnim(int _treasureId)
        {
            var list = GetTreasureCategory(TreasureCategory.Human);
            var index = list.IndexOf(_treasureId);
            if (index == -1)
            {
                return false;
            }
            uint value = 0;
            uint.TryParse(QuickSetting.Instance.GetQuickSetting(QuickSetting.QuickSettingType.SpAnim, 0), out value);
            return MathUtility.GetBitValue(value, (ushort)index);
        }
        public void SetSpAnim(int _treasureId, bool anim = true)
        {
            var list = GetTreasureCategory(TreasureCategory.Human);
            var index = list.IndexOf(_treasureId);
            if (index == -1)
            {
                return;
            }
            uint value = 0;
            uint.TryParse(QuickSetting.Instance.GetQuickSetting(QuickSetting.QuickSettingType.SpAnim, 0), out value);
            int bitValue = MathUtility.SetBitValue((int)value, (ushort)index, anim);
            QuickSetting.Instance.SetQuickSetting(QuickSetting.QuickSettingType.SpAnim, bitValue);
            QuickSetting.Instance.SendPackage();
        }
        public bool TryGetUnlockShowTreasure(out int _id)
@@ -510,7 +513,7 @@
                        if (treasure is HumanTreasure)
                        {
                            var humanTreasure = treasure as HumanTreasure;
                            humanTreasure.humanState = HumanTreasureState.CastSoul;
                            humanTreasure.UpdateTreasureState();
                            UpdateCastSoulRedpoint(treasure.id);
                            if (GetTreasureUnlockShow(TreasureCategory.Human) == treasure.id)
                            {
@@ -519,7 +522,7 @@
                        }
                        if (serverInited)
                        {
                            newGotTreasureId = id == 301 ? 0 : id;
                            newGotTreasureId = id;
                            treasureEntranceShowId = id;
                            var mapConfig = ConfigManager.Instance.GetTemplate<MapConfig>(PlayerDatas.Instance.baseData.MapID);
@@ -578,7 +581,7 @@
                                    treasure.state = TreasureState.Collecting;
                                    if ((TreasureCategory)config.Category == TreasureCategory.Human)
                                    {
                                        (treasure as HumanTreasure).humanState = HumanTreasureState.Challenge;
                                        (treasure as HumanTreasure).UpdateTreasureState();
                                    }
                                    if ((TreasureCategory)config.Category == TreasureCategory.Demon)
                                    {
@@ -748,11 +751,6 @@
                    UpdateSkillLevelUpRedpoints();
                }
            }
            if (_type == PackType.rptEquip)
            {
                UpdateTreasurePrivilegeStrenthen();
            }
        }
        private void OnFunctionStateChange(int _functionId)
@@ -760,7 +758,7 @@
            if (_functionId == 82)
            {
                UpdateSkillLevelUpRedpoints();
                if (!FuncOpen.Instance.IsFuncOpen(82) || !serverInited)
                if (!FuncOpen.Instance.IsFuncOpen(82))
                {
                    return;
                }
@@ -769,8 +767,9 @@
                {
                    Treasure treasure;
                    TryGetTreasure(list[i], out treasure);
                    if (WindowCenter.Instance.CheckOpen<TreasureLevelUpWin>()
                        && selectedTreasure == list[i] && treasure.IsMaxStage())
                    var humanTreasure = treasure as HumanTreasure;
                    humanTreasure.UpdateTreasureState();
                    if (!serverInited || !treasure.IsHighestStage)
                    {
                        continue;
                    }
@@ -870,7 +869,7 @@
                    return;
                }
                var anyPointialLevelupAble = false;
                if (treasure.state == TreasureState.Collected && treasure.IsMaxStage())
                if (treasure.state == TreasureState.Collected && treasure.IsHighestStage)
                {
                    for (int i = 0; i < treasure.potentials.Count; i++)
                    {
@@ -995,7 +994,7 @@
                                    if (_pretreasure == null || _pretreasure.state == TreasureState.Collected)
                                    {
                                        treasure.state = TreasureState.Collecting;
                                        (treasure as HumanTreasure).humanState = HumanTreasureState.Challenge;
                                        (treasure as HumanTreasure).UpdateTreasureState();
                                        collectingHuman = treasure.id;
                                        if (serverInited)
                                        {
@@ -1054,7 +1053,7 @@
                return;
            }
            if((TreasureCategory)config.Category == TreasureCategory.Human && treasure.IsMaxStage())
            if((TreasureCategory)config.Category == TreasureCategory.Human && treasure.IsHighestStage)
            {
                return;
            }
@@ -1137,166 +1136,12 @@
                    }
                    UpdateCastSoulRedpoint(treasure.id);
                    UpdateAchievementRedpoint(treasure.id);
                    if (treasure.IsMaxStage())
                    {
                        UpdatePrivilege(treasure.id);
                    }
                    if (serverInited && _up && treasureStageUpEvent != null)
                    {
                        treasureStageUpEvent(treasure.id);
                    }
                }
            }
        }
        public void UpdateTreasurePrivilege(HA353_tagMCMWPrivilegeDataInfo package)
        {
            for (int i = 0; i < package.Count; i++)
            {
                var _data = package.InfoList[i];
                if ((TreasurePrivilege)_data.PriID == TreasurePrivilege.StrengthenAdd)
                {
                    continue;
                }
                if (treasurePrivilegeDict.ContainsKey((int)_data.PriID))
                {
                    var _specialData = treasurePrivilegeDict[(int)_data.PriID];
                    _specialData.presentFinishCount = (int)_data.GotValue;
                    _specialData.presentGetCount = (int)_data.CurValue;
                    _specialData.itemGet = _data.ItemAwardState == 1;
                    var _list = treasureCategory[TreasureCategory.Human];
                    var _index = _list.FindIndex((x) =>
                      {
                          var treasure = treasures[x];
                          return (int)treasure.specialData.type == _data.PriID;
                      });
                    if (_index != -1)
                    {
                        UpdatePrivilege(_list[_index]);
                    }
                }
                if (treasurePrivilegeUpdateEvent != null)
                {
                    treasurePrivilegeUpdateEvent((int)_data.PriID);
                }
            }
        }
        public void UpdateTreasurePrivilege(HA317_tagMCAllEquipAttrActiveInfo package)
        {
            for (int i = 0; i < package.ActiveInfo.Length; i++)
            {
                var _data = package.ActiveInfo[i];
                if (_data.Type == 0)
                {
                    if (treasurePrivilegeDict.ContainsKey((int)TreasurePrivilege.StrengthenAdd))
                    {
                        var _specialData = treasurePrivilegeDict[(int)TreasurePrivilege.StrengthenAdd];
                        _specialData.presentFinishCount = (int)_data.Cnt;
                        var _list = treasureCategory[TreasureCategory.Human];
                        var _index = _list.FindIndex((x) =>
                        {
                            var treasure = treasures[x];
                            return treasure.specialData.type == TreasurePrivilege.StrengthenAdd;
                        });
                        if (_index != -1)
                        {
                            UpdatePrivilege(_list[_index]);
                        }
                    }
                    if (treasurePrivilegeUpdateEvent != null)
                    {
                        treasurePrivilegeUpdateEvent((int)TreasurePrivilege.StrengthenAdd);
                    }
                }
            }
        }
        private void RefreshEquipSTRLv(int _index)
        {
            UpdateTreasurePrivilegeStrenthen();
        }
        public void UpdateTreasurePrivilegeStrenthen()
        {
            var _list = treasureCategory[TreasureCategory.Human];
            var _index = _list.FindIndex((x) =>
            {
                var treasure = treasures[x];
                return treasure.specialData.type == TreasurePrivilege.StrengthenAdd;
            });
            if (_index != -1)
            {
                UpdatePrivilege(_list[_index]);
                if (treasurePrivilegeUpdateEvent != null)
                {
                    treasurePrivilegeUpdateEvent((int)TreasurePrivilege.StrengthenAdd);
                }
            }
        }
        private void UpdatePrivileges()
        {
            var list = treasureCategory[TreasureCategory.Human];
            for (int i = 0; i < list.Count; i++)
            {
                UpdatePrivilege(list[i]);
            }
        }
        public bool IsGetTreasurePrivilege(TreasurePrivilege type)
        {
            var list = treasureCategory[TreasureCategory.Human];
            for (int i = 0; i < list.Count; i++)
            {
                Treasure treasure;
                if (TryGetTreasure(list[i], out treasure)
                    && treasure.specialData.type == type && treasure.IsMaxStage())
                {
                    return true;
                }
            }
            return false;
        }
        private void UpdatePrivilege(int _id)
        {
            if (treasures.ContainsKey(_id))
            {
                var treasure = treasures[_id];
                if (treasure.state != TreasureState.Collected || !treasure.IsMaxStage())
                {
                    if (treasure.specialData.privilegeRedpoint != null)
                    {
                        treasure.specialData.privilegeRedpoint.state = RedPointState.None;
                    }
                    return;
                }
                treasure.specialData.UpdateState();
            }
        }
        public int GetPrivilegeValue(int _privilegeId)
        {
            if (treasurePrivilegeDict.ContainsKey(_privilegeId))
            {
                var _list = GetTreasureCategory(TreasureCategory.Human);
                Treasure _treasure = null;
                var _index = _list.FindIndex((x) =>
                {
                    if (TryGetTreasure(x, out _treasure))
                    {
                        return _treasure.unLockPrivilege == _privilegeId;
                    }
                    return false;
                });
                if (_index != -1 && _treasure.IsMaxStage())
                {
                    var _specialData = treasurePrivilegeDict[_privilegeId];
                    return _specialData.GetPrivilegeValue();
                }
            }
            return 0;
        }
        public void HumanTreasureStateChange(int _id)
@@ -1396,10 +1241,6 @@
                if (TryGetTreasure(config.MWID, out treasure))
                {
                    treasure.UpdateTreasureStage(config);
                    if (treasure.specialData != null)
                    {
                        treasurePrivilegeDict.Add((int)treasure.specialData.type, treasure.specialData);
                    }
                }
            }
System/Treasure/TreasureNewGotBehaviour.cs
New file
@@ -0,0 +1,80 @@
using System.Collections;
using System.Collections.Generic;
using TableConfig;
using UnityEngine;
using UnityEngine.UI;
namespace Snxxz.UI
{
    public class TreasureNewGotBehaviour : MonoBehaviour
    {
        [SerializeField] RectTransform m_ContainerFunc;
        [SerializeField] RectTransform m_ContainerSkill;
        [SerializeField] RectTransform m_ContaienrTreasure;
        [SerializeField] Image m_FuncIcon;
        [SerializeField] Image m_SkillIcon;
        [SerializeField] Image m_TreasureIcon;
        [SerializeField] Text m_Func;
        [SerializeField] Text m_FuncName;
        [SerializeField] UIAlphaTween alphaTween;
        TreasureModel model { get { return ModelCenter.Instance.GetModel<TreasureModel>(); } }
        public void Display(int id,int stage)
        {
            Treasure treasure;
            alphaTween.SetStartState();
            m_ContainerFunc.gameObject.SetActive(false);
            m_ContainerSkill.gameObject.SetActive(false);
            m_ContaienrTreasure.gameObject.SetActive(false);
            if (model.TryGetTreasure(id, out treasure))
            {
                var treasureStage = treasure.treasureStages.Find((x) =>
                {
                    return x.stage == stage;
                });
                switch (treasureStage.unlockType)
                {
                    case TreasureStageUnlock.Skill:
                        m_ContainerSkill.gameObject.SetActive(true);
                        var job = PlayerDatas.Instance.baseData.Job;
                        var skillConfig = ConfigManager.Instance.GetTemplate<SkillConfig>(treasureStage.GetSkill(job));
                        if (skillConfig != null)
                        {
                            m_SkillIcon.SetSprite(skillConfig.IconName);
                            m_Func.text = Language.Get("TreasureUnlockNewSkill");
                            m_FuncName.text = skillConfig.SkillName;
                        }
                        break;
                    case TreasureStageUnlock.Func:
                        m_ContainerFunc.gameObject.SetActive(true);
                        var funcConfig = ConfigManager.Instance.GetTemplate<FuncOpenLVConfig>(treasureStage.func);
                        if (funcConfig != null)
                        {
                            m_FuncIcon.SetSprite(funcConfig.Icon);
                            m_Func.text = Language.Get("TreasureUnlockNewFunc");
                            m_FuncName.text = funcConfig.Remark;
                        }
                        break;
                    case TreasureStageUnlock.Treasure:
                        m_ContaienrTreasure.gameObject.SetActive(true);
                        var treasureConfig = ConfigManager.Instance.GetTemplate<TreasureConfig>(treasureStage.treasure);
                        if (treasureConfig != null)
                        {
                            m_TreasureIcon.SetSprite(treasureConfig.Icon);
                            m_Func.text = Language.Get("TreasureUnlockNewTreasure");
                            m_FuncName.text = treasureConfig.Name;
                        }
                        break;
                }
            }
        }
        public void Show()
        {
            gameObject.SetActive(true);
            alphaTween.Play();
        }
    }
}
System/Treasure/TreasureNewGotBehaviour.cs.meta
copy from System/Treasure/FairyTreasureCollectPanelPattern1.cs.meta copy to System/Treasure/TreasureNewGotBehaviour.cs.meta
File was copied from System/Treasure/FairyTreasureCollectPanelPattern1.cs.meta
@@ -1,6 +1,6 @@
fileFormatVersion: 2
guid: f4d29363b41f2a740834a1aabf805009
timeCreated: 1521102270
guid: e242f7bb709856c4f9c2e9d8d3f705cc
timeCreated: 1534498126
licenseType: Pro
MonoImporter:
  serializedVersion: 2
System/Treasure/TreasureNewGotWin.cs
@@ -39,22 +39,7 @@
        [SerializeField] RectTransform m_ContainerFuncUnLock;
        [SerializeField] Slider m_FuncUnLockSlider;
        [SerializeField] Text m_UnlockTip;
        [SerializeField] RectTransform m_ContainerFunc;
        [SerializeField] UIAlphaTween m_FadeInFunc;
        [SerializeField] Image m_FuncIcon;
        [SerializeField] Text m_FuncName;
        [SerializeField] RectTransform m_ContainerSkill;
        [SerializeField] UIAlphaTween m_FadeInSkill;
        [SerializeField] Image m_SkillIcon;
        [SerializeField] Text m_SKillName;
        [SerializeField] Text m_SkillDescription;
        [SerializeField] RectTransform m_ContainerSpecial;
        [SerializeField] UIAlphaTween m_FadeInSpecial;
        [SerializeField] Image m_SpecialIcon;
        [SerializeField] Text m_SpecialName;
        [SerializeField] Text m_SpecialDescription;
        [SerializeField] TreasureNewGotBehaviour[] m_TreasureNewGots;
        [SerializeField] RectTransform m_ContianerStory;
        [SerializeField] UIAlphaTween m_FadeInStory;
@@ -73,6 +58,8 @@
        Treasure treasure;
        TreasureStage treasureStage;
        int displayStageCount = 0;
        float stageTime = 0.5f;
        public static event Action CloseTreasureNewGotWinEvent;
        ShowStep m_ShowStep = ShowStep.None;
@@ -99,20 +86,14 @@
                        case ShowStep.ShowNameAndSliderUnlock:
                            OnEnterShowNameAndSliderUnlock();
                            break;
                        case ShowStep.ShowFunc:
                        case ShowStep.ShowUnlock:
                            OnEnterShowFuncUnlock();
                            break;
                        case ShowStep.ShowSkill:
                            OnEnterShowSkill();
                            break;
                        case ShowStep.ShowSpecialEffect:
                            OnEnterShowSpecialEffect();
                            break;
                        case ShowStep.ShowStory:
                            OnEnterShowStory();
                            break;
                        case ShowStep.ShowUnlock:
                            OnEnterShowUnlock();
                        case ShowStep.ShowComplete:
                            OnEnterShowComplete();
                            break;
                        case ShowStep.FadeOut:
                            OnEnterFadeOut();
@@ -126,7 +107,6 @@
            }
        }
        float beforeSliderTime = 0;
        #region Built-in
        protected override void BindController()
        {
@@ -147,14 +127,16 @@
            m_ContainerMask.gameObject.SetActive(false);
            m_ContainerDescription.gameObject.SetActive(false);
            m_ContainerTreasureName.gameObject.SetActive(false);
            m_ContainerSkill.gameObject.SetActive(false);
            m_ContianerStory.gameObject.SetActive(false);
            m_ContainerFuncUnLock.gameObject.SetActive(false);
            m_ContainerFunc.gameObject.SetActive(false);
            m_ContainerSpecial.gameObject.SetActive(false);
            m_UnlockTip.gameObject.SetActive(false);
            m_ContainerFinishShow.gameObject.SetActive(false);
            m_ContainerFightPower.gameObject.SetActive(false);
            for (int i = 0; i < m_TreasureNewGots.Length; i++)
            {
                m_TreasureNewGots[i].gameObject.SetActive(false);
            }
            model.TryGetTreasure(model.newGotTreasureId, out treasure);
            treasureStage = treasure.treasureStages.Find((x) =>
@@ -250,54 +232,35 @@
                    }
                    break;
                case ShowStep.ShowNameAndSliderUnlock:
                    m_FuncUnLockSlider.value = timer / 2.8f;
                    m_FuncUnLockSlider.value = 0;
                    if (timer > 0.7f)
                    {
                        beforeSliderTime += 0.7f;
                        timer = 0f;
                        showStep = ShowStep.ShowFunc;
                    }
                    break;
                case ShowStep.ShowFunc:
                    m_FuncUnLockSlider.value = (timer + beforeSliderTime) / 2.8f;
                    if (timer > 0.7f)
                    {
                        beforeSliderTime += 0.7f;
                        timer = 0f;
                        showStep = ShowStep.ShowSkill;
                    }
                    break;
                case ShowStep.ShowSkill:
                    m_FuncUnLockSlider.value = (timer + beforeSliderTime) / 2.8f;
                    if (timer > 0.7f)
                    {
                        beforeSliderTime += 0.7f;
                        timer = 0f;
                        showStep = ShowStep.ShowSpecialEffect;
                    }
                    break;
                case ShowStep.ShowSpecialEffect:
                    m_FuncUnLockSlider.value = (timer + beforeSliderTime) / 2.8f;
                    if (timer > 0.7f)
                    {
                        beforeSliderTime += 0.7f;
                        timer = 0f;
                        showStep = ShowStep.ShowUnlock;
                    }
                    break;
                case ShowStep.ShowStory:
                    if (timer > 0.7f)
                    {
                        beforeSliderTime = 3f;
                        timer = 0f;
                        showStep = ShowStep.ShowUnlock;
                    }
                    break;
                case ShowStep.ShowUnlock:
                    if (timer + beforeSliderTime <= 2.8f)
                    m_FuncUnLockSlider.value = timer / (6 * stageTime);
                    if (timer > 3 * stageTime)
                    {
                        m_FuncUnLockSlider.value = (timer + beforeSliderTime) / 2.8f;
                        timer = 0f;
                        showStep = ShowStep.ShowComplete;
                    }
                    var index = (int)(timer / stageTime);
                    if (index < displayStageCount && index < m_TreasureNewGots.Length
                        && !m_TreasureNewGots[index].gameObject.activeSelf)
                    {
                        m_TreasureNewGots[index].Show();
                    }
                    break;
                case ShowStep.ShowStory:
                    if (timer > 0.7f)
                    {
                        timer = 0f;
                        showStep = ShowStep.ShowComplete;
                    }
                    break;
                case ShowStep.ShowComplete:
                    if (timer > 10f)
                    {
                        timer = 0f;
@@ -321,7 +284,6 @@
        {
            showStep = ShowStep.ShowModel;
            timer = 0f;
            beforeSliderTime = 0;
            var config = ConfigManager.Instance.GetTemplate<TreasureConfig>(treasure.id);
            m_TreasureName.text = config.Name;
@@ -342,34 +304,27 @@
            var _flyObjectPoint = m_FlyObjectPoint2;
            if (treasure.unLockSkill > 0)
            var index = 0;
            displayStageCount = 0;
            for (int i = 0; i < m_TreasureNewGots.Length; i++)
            {
                var skillConfig = ConfigManager.Instance.GetTemplate<SkillConfig>(treasure.unLockSkill);
                m_SkillIcon.SetSprite(skillConfig.IconName);
                m_SKillName.text = skillConfig.SkillName;
                m_SkillDescription.text = skillConfig.Description;
                m_ContainerSkill.gameObject.SetActive(true);
                m_FadeInSkill.SetStartState();
                TreasureStage _stage = null;
                for (int k = index; k < treasure.treasureStages.Count; k++)
                {
                    index++;
                    if (treasure.treasureStages[k].unlockType == TreasureStageUnlock.Func ||
                        treasure.treasureStages[k].unlockType == TreasureStageUnlock.Skill ||
                        treasure.treasureStages[k].unlockType == TreasureStageUnlock.Treasure)
                    {
                        _stage = treasure.treasureStages[k];
                        displayStageCount++;
                        break;
            }
            if (treasure.unLockFunc > 0)
            {
                var funcConfig = ConfigManager.Instance.GetTemplate<FuncOpenLVConfig>(treasure.unLockFunc);
                m_FuncIcon.SetSprite(funcConfig.Icon);
                m_FuncName.text = funcConfig.Remark;
                m_ContainerFunc.gameObject.SetActive(true);
                m_FadeInFunc.SetStartState();
                _flyObjectPoint = m_FlyObjectPoint3;
            }
            if (treasure.unLockPrivilege > 0)
                if (_stage != null)
            {
                var privilegeConfig = ConfigManager.Instance.GetTemplate<TreasurePrivilegeConfig>(treasure.unLockPrivilege);
                m_SpecialIcon.SetSprite(privilegeConfig.Icon);
                m_SpecialName.text = privilegeConfig.Name;
                m_SpecialDescription.text = privilegeConfig.Description;
                m_ContainerSpecial.gameObject.SetActive(true);
                m_FadeInSpecial.SetStartState();
                    m_TreasureNewGots[i].Display(treasure.id, _stage.stage);
                }
            }
            if (treasureStage != null && (TreasureCategory)config.Category != TreasureCategory.Fairy
@@ -407,15 +362,15 @@
                            m_Story.text = string.Format(config.Verse[0], killNpcConfig.MaxAtk);
                        }
                        break;
                    case 304:
                        var _specialData = treasure.specialData;
                        if (_specialData != null)
                        {
                            var _keyValue = _specialData.propertyDict.First();
                            var _propertyConfig = ConfigManager.Instance.GetTemplate<PlayerPropertyConfig>(_keyValue.Key);
                            m_Story.text = string.Format(config.Verse[0], _keyValue.Value, _propertyConfig.Name);
                        }
                        break;
                    //case 304://签到相关配置移到功能配置表
                    //    var _specialData = treasure.specialData;
                    //    if (_specialData != null)
                    //    {
                    //        var _keyValue = _specialData.propertyDict.First();
                    //        var _propertyConfig = ConfigManager.Instance.GetTemplate<PlayerPropertyConfig>(_keyValue.Key);
                    //        m_Story.text = string.Format(config.Verse[0], _keyValue.Value, _propertyConfig.Name);
                    //    }
                    //    break;
                }
                flyObject = unlockFlyObject1;
            }
@@ -423,7 +378,7 @@
        private void FinishShow()
        {
            if (showStep == ShowStep.ShowUnlock)
            if (showStep == ShowStep.ShowComplete)
            {
                timer = 0f;
                showStep = ShowStep.FadeOut;
@@ -482,28 +437,9 @@
                showStep = ShowStep.ShowStory;
                return;
            }
            if (treasure.unLockFunc > 0)
            if (displayStageCount == 0)
            {
                m_FadeInFunc.SetStartState();
                m_FadeInFunc.Play();
            }
            else
            {
                showStep = ShowStep.ShowSkill;
            }
        }
        private void OnEnterShowSkill()
        {
            if (treasure.unLockSkill > 0)
            {
                m_ContainerSkill.gameObject.SetActive(true);
                m_FadeInSkill.SetStartState();
                m_FadeInSkill.Play();
            }
            else
            {
                showStep = ShowStep.ShowSpecialEffect;
                showStep = ShowStep.ShowComplete;
            }
        }
@@ -516,22 +452,6 @@
            m_UnlockTip.gameObject.SetActive(true);
        }
        private void OnEnterShowSpecialEffect()
        {
            m_ContainerSkill.gameObject.SetActive(treasure.unLockSkill > 0);
            if (treasure.unLockPrivilege > 0)
            {
                m_ContainerSpecial.gameObject.SetActive(true);
                m_FadeInSpecial.SetStartState();
                m_FadeInSpecial.Play();
            }
            else
            {
                showStep = ShowStep.ShowUnlock;
            }
        }
        private void OnEnterShowStory()
        {
            m_ContianerStory.gameObject.SetActive(true);
@@ -539,7 +459,7 @@
            m_FadeInStory.Play();
        }
        private void OnEnterShowUnlock()
        private void OnEnterShowComplete()
        {
            m_ContainerFinishShow.gameObject.SetActive(true);
        }
@@ -566,11 +486,9 @@
            ShowModel,
            SliderName,
            ShowNameAndSliderUnlock,
            ShowFunc,
            ShowSkill,
            ShowSpecialEffect,
            ShowStory,
            ShowUnlock,
            ShowStory,
            ShowComplete,
            FadeOut,
            FlyTo,
        }
System/Treasure/TreasureNewStageWin.cs
@@ -19,13 +19,9 @@
        [SerializeField] PropertyCompareBehaviour m_Property;
        [SerializeField] Button m_PropertyConfirmBtn;
        [SerializeField] RectTransform m_ContainerPrivilege;
        [SerializeField] Text m_PrivilegeName;
        [SerializeField] Text m_Description;
        [SerializeField] RectTransform m_ContainerProgress;
        [SerializeField] Text m_Progress1;
        [SerializeField] Text m_Progress2;
        [SerializeField] Button m_PrivilegeConfirmBtn;
        [SerializeField] RectTransform m_ContainerItem;
        [SerializeField] ItemCell m_Item;
        [SerializeField] Button m_ItemConfirm;
        Treasure treasure;
@@ -45,7 +41,7 @@
        protected override void AddListeners()
        {
            m_PropertyConfirmBtn.onClick.AddListener(CloseClick);
            m_PrivilegeConfirmBtn.onClick.AddListener(CloseClick);
            m_ItemConfirm.onClick.AddListener(CloseClick);
        }
        protected override void OnPreOpen()
@@ -69,7 +65,7 @@
        private void Display()
        {
            m_ContainerProperty.gameObject.SetActive(false);
            m_ContainerPrivilege.gameObject.SetActive(false);
            m_ContainerItem.gameObject.SetActive(false);
            model.TryGetTreasure(model.selectedTreasure, out treasure);
            if (treasure == null)
            {
@@ -81,8 +77,8 @@
                case TreasureStageUnlock.Property:
                    DisplayProperty(stage);
                    break;
                case TreasureStageUnlock.Privilege:
                    DisplayPrivilege(stage);
                case TreasureStageUnlock.Item:
                    DisplayItem(stage);
                    break;
            }
        }
@@ -95,38 +91,12 @@
            m_Property.Display(_keyValue.Key, _beforeValue, UIHelper.GetPropertyMapPlayerData((AttrEnum)_keyValue.Key));
        }
        private void DisplayPrivilege(TreasureStage _stage)
        private void DisplayItem(TreasureStage _stage)
        {
            m_ContainerPrivilege.gameObject.SetActive(true);
            m_ContainerProgress.gameObject.SetActive(false);
            m_Progress1.gameObject.SetActive(false);
            m_Progress2.gameObject.SetActive(false);
            var config = ConfigManager.Instance.GetTemplate<TreasurePrivilegeConfig>(_stage.privilege);
            m_PrivilegeName.text = config.Name;
            m_Description.text = config.Description;
            switch (_stage.specialData.type)
            {
                case TreasurePrivilege.Property:
                    break;
                case TreasurePrivilege.DemonJarAtk:
                    break;
                case TreasurePrivilege.StrengthenAdd:
                    break;
                case TreasurePrivilege.Suit:
                case TreasurePrivilege.RuneBreakExpAdd:
                case TreasurePrivilege.Boss:
                    break;
                case TreasurePrivilege.MountAtk:
                    break;
                case TreasurePrivilege.PetHp:
                    break;
                case TreasurePrivilege.Wing:
                    break;
                case TreasurePrivilege.Wash:
                    break;
            m_ContainerItem.gameObject.SetActive(true);
            ItemCellModel itemCell = new ItemCellModel(_stage.item.id, true, (ulong)_stage.item.count, _stage.item.bind ? 1 : 0);
            m_Item.Init(itemCell);
            }
        }
    }
}
System/Treasure/TreasureSoulAchievementCell.cs
New file
@@ -0,0 +1,68 @@
using System;
using System.Collections;
using System.Collections.Generic;
using TableConfig;
using UnityEngine;
using UnityEngine.UI;
namespace Snxxz.UI
{
    public class TreasureSoulAchievementCell : CellView
    {
        [SerializeField] Text m_Description;
        [SerializeField] Text m_Progress;
        [SerializeField] Image m_Complete;
        AchievementModel model { get { return ModelCenter.Instance.GetModel<AchievementModel>(); } }
        int achievementId = 0;
        private void OnEnable()
        {
            model.achievementProgressUpdateEvent += AchievementProgressUpdateEvent;
            model.achievementCompletedEvent += AchievementCompletedEvent;
        }
        private void OnDisable()
        {
            model.achievementProgressUpdateEvent -= AchievementProgressUpdateEvent;
            model.achievementCompletedEvent -= AchievementCompletedEvent;
        }
        private void AchievementProgressUpdateEvent(int _id)
        {
            if (_id == achievementId)
            {
                Display(achievementId);
            }
        }
        private void AchievementCompletedEvent(int _id)
        {
            if (_id == achievementId)
            {
                Display(achievementId);
            }
        }
        public void Display(int _achievementId)
        {
            achievementId = _achievementId;
            Achievement achievement;
            var config = ConfigManager.Instance.GetTemplate<SuccessConfig>(_achievementId);
            if (config != null)
            {
                m_Description.text = UIHelper.ReplaceNewLine(config.Describe);
            }
            m_Complete.gameObject.SetActive(false);
            if (model.TryGetAchievement(_achievementId, out achievement))
            {
                var progress = achievement.completed ? config.NeedCnt : Mathf.Clamp(achievement.progress, 0, config.NeedCnt);
                m_Progress.text = StringUtility.Contact("(", UIHelper.GetTextColorByItemColor(progress >= config.NeedCnt ? TextColType.Green : TextColType.Red, progress.ToString(), true)
                    , "/", config.NeedCnt, ")");
                m_Complete.gameObject.SetActive(achievement.completed);
            }
        }
    }
}
System/Treasure/TreasureSoulAchievementCell.cs.meta
copy from System/Treasure/FairyTreasureCollectPanelPattern1.cs.meta copy to System/Treasure/TreasureSoulAchievementCell.cs.meta
File was copied from System/Treasure/FairyTreasureCollectPanelPattern1.cs.meta
@@ -1,6 +1,6 @@
fileFormatVersion: 2
guid: f4d29363b41f2a740834a1aabf805009
timeCreated: 1521102270
guid: 5563e9b8650a93448a20b3fa6e58df56
timeCreated: 1534570886
licenseType: Pro
MonoImporter:
  serializedVersion: 2
System/Treasure/TreasureSoulActiveWin.cs
New file
@@ -0,0 +1,79 @@
//--------------------------------------------------------
//    [Author]:           第二世界
//    [  Date ]:           Saturday, August 18, 2018
//--------------------------------------------------------
using System;
using System.Collections;
using System.Collections.Generic;
using TableConfig;
using UnityEngine;
using UnityEngine.UI;
namespace Snxxz.UI {
    public class TreasureSoulActiveWin : Window
    {
        [SerializeField] Image m_Icon;
        [SerializeField] Text m_SoulName;
        [SerializeField] Text m_Description;
        [SerializeField] Button m_Close;
        [SerializeField, Header("至少显示秒数")] float m_OverTime = 2f;
        DateTime openTime = DateTime.Now;
        public static int treasureSoulId = 0;
        #region Built-in
        protected override void BindController()
        {
        }
        protected override void AddListeners()
        {
            m_Close.onClick.AddListener(OnClose);
        }
        protected override void OnPreOpen()
        {
            openTime = DateTime.Now;
            Display();
        }
        protected override void OnAfterOpen()
        {
        }
        protected override void OnPreClose()
        {
        }
        protected override void OnAfterClose()
        {
        }
        #endregion
        private void OnClose()
        {
            if ((DateTime.Now - openTime).TotalSeconds >= m_OverTime)
            {
                CloseClick();
            }
        }
        private void Display()
        {
            var config = ConfigManager.Instance.GetTemplate<TreasurePrivilegeConfig>(treasureSoulId);
            if (config != null)
            {
                m_Icon.SetSprite(config.Icon);
                m_SoulName.text = config.Name;
                m_Description.text = config.Description;
            }
        }
    }
}
System/Treasure/TreasureSoulActiveWin.cs.meta
copy from System/Treasure/FairyTreasureCollectPanelPattern1.cs.meta copy to System/Treasure/TreasureSoulActiveWin.cs.meta
File was copied from System/Treasure/FairyTreasureCollectPanelPattern1.cs.meta
@@ -1,6 +1,6 @@
fileFormatVersion: 2
guid: f4d29363b41f2a740834a1aabf805009
timeCreated: 1521102270
guid: 90fed91e3c347d74f8462f300aca2835
timeCreated: 1534579030
licenseType: Pro
MonoImporter:
  serializedVersion: 2
System/Treasure/TreasureSoulBehaviour.cs
@@ -16,17 +16,19 @@
        [SerializeField] Button m_SelectBtn;
        [SerializeField] RedpointBehaviour m_Redpoint;
        int treasureId = 0;
        int treasureSoulId = 0;
        Treasure treasure;
        TreasureSpecialData special;
        TreasureModel model
        TreasureSoulModel model
        {
            get
            {
                return ModelCenter.Instance.GetModel<TreasureModel>();
                return ModelCenter.Instance.GetModel<TreasureSoulModel>();
            }
        }
        AchievementModel achievementModel { get { return ModelCenter.Instance.GetModel<AchievementModel>(); } }
        private void Awake()
        {
@@ -36,77 +38,102 @@
        private void OnEnable()
        {
            model.treasureSelectSoulChangeEvent += TreasureSelectSoulChangeEvent;
            PlayerDatas.Instance.PlayerDataRefreshInfoEvent += PlayerDataRefreshInfoEvent;
            model.treasureSoulEvent += TreasureSoulEvent;
            achievementModel.achievementCompletedEvent += AchievementCompletedEvent;
        }
        private void OnDisable()
        {
            model.treasureSelectSoulChangeEvent -= TreasureSelectSoulChangeEvent;
            PlayerDatas.Instance.PlayerDataRefreshInfoEvent -= PlayerDataRefreshInfoEvent;
            model.treasureSoulEvent -= TreasureSoulEvent;
            achievementModel.achievementCompletedEvent -= AchievementCompletedEvent;
        }
        private void AchievementCompletedEvent(int _id)
        {
            int achievementId = 0;
            if (model.TryGetRealmAchievement(treasureSoulId, out achievementId))
            {
                if (achievementId == _id)
                {
                    DisplayState();
                }
            }
        }
        public void Display(int _id)
        {
            treasureId = _id;
            treasureSoulId = _id;
            m_Redpoint.redpointId = 0;
            if (model.TryGetTreasure(_id, out treasure))
            if (model.TryGetTreasureSoul(_id, out special))
            {
                var _privilege = treasure.unLockPrivilege;
                var config = ConfigManager.Instance.GetTemplate<TreasurePrivilegeConfig>(_privilege);
                var config = ConfigManager.Instance.GetTemplate<TreasurePrivilegeConfig>(_id);
                if (config == null)
                {
                    return;
                }
                m_Redpoint.redpointId = treasure.specialData.privilegeRedpoint != null ? treasure.specialData.privilegeRedpoint.id : 0;
                m_Redpoint.redpointId = special.redpoint.id;
                m_SoulName.text = config.Name;
                m_SelectImg.SetSprite(model.selectSoul == treasureId ? "ListBtn_Select" : "ListBtn_UnSelect");
                m_SelectImg.SetSprite(model.selectSoul == treasureSoulId ? "ListBtn_Select" : "ListBtn_UnSelect");
                DisplayState();
            }
        }
        void DisplayState()
        {
            if (treasure != null)
            if (special != null)
            {
                var stage = treasure.treasureStages[treasure.StageCount - 1];
                m_Lock.gameObject.SetActive(PlayerDatas.Instance.baseData.LV < stage.limitLevel);
                if (PlayerDatas.Instance.baseData.LV < stage.limitLevel)
                if (special.active)
                {
                    m_SoulState.text = Language.Get("TreasurePrivilege_Unlock", stage.limitLevel);
                }
                else if (treasure.IsMaxStage())
                {
                    m_Lock.gameObject.SetActive(false);
                    m_SoulState.text = Language.Get("TreasureSoul_Awoke");
                }
                else
                {
                    int achievementId = 0;
                    bool unlock = true;
                    if (model.TryGetRealmAchievement(treasureSoulId, out achievementId))
                    {
                        Achievement achievement;
                        if (achievementModel.TryGetAchievement(achievementId, out achievement))
                        {
                            unlock = achievement.completed;
                        }
                    }
                    m_Lock.gameObject.SetActive(!unlock);
                    if (unlock)
                    {
                    m_SoulState.text = Language.Get("TreasureSoul_Awaking");
                }
                    else
                    {
                        var successConfig = ConfigManager.Instance.GetTemplate<SuccessConfig>(achievementId);
                        var realmConfig = ConfigManager.Instance.GetTemplate<RealmConfig>(successConfig.NeedCnt);
                        m_SoulState.text = Language.Get("TreasureSoulRealm", realmConfig.Img);
            }
        }
        private void PlayerDataRefreshInfoEvent(PlayerDataRefresh refreshType)
        {
            if (refreshType == PlayerDataRefresh.LV)
            {
                DisplayState();
            }
        }
        private void TreasureSelectSoulChangeEvent(int _id)
        {
            if (treasure != null)
            if (special != null)
            {
                m_SelectImg.SetSprite(model.selectSoul == treasureId ? "ListBtn_Select" : "ListBtn_UnSelect");
                m_SelectImg.SetSprite(model.selectSoul == treasureSoulId ? "ListBtn_Select" : "ListBtn_UnSelect");
            }
        }
        private void TreasureSoulEvent(int _id)
        {
            if (_id == treasureSoulId)
            {
                DisplayState();
            }
        }
        private void OnSelect()
        {
            if(model.TryGetTreasure(treasureId,out treasure))
            {
                model.selectSoul = treasureId;
            }
            model.selectSoul = treasureSoulId;
        }
    }
}
System/Treasure/TreasureSoulModel.cs
New file
@@ -0,0 +1,666 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using TableConfig;
using System;
namespace Snxxz.UI
{
    public class TreasureSoulModel : Model, IBeforePlayerDataInitialize, IPlayerLoginOk
    {
        Dictionary<int, TreasureSpecialData> treasureSoulDict = new Dictionary<int, TreasureSpecialData>();
        List<int> treasureSouls = new List<int>();
        Dictionary<int, List<int>> soulAchievements = new Dictionary<int, List<int>>();
        public Dictionary<int, int> signAddProperty = new Dictionary<int, int>();
        public int signAddTreasure { get; private set; }
        public event Action<int> treasureSoulEvent;
        public event Action<int> treasureSelectSoulChangeEvent;
        int m_SelectSoul = 0;
        public int selectSoul
        {
            get { return m_SelectSoul; }
            set
            {
                m_SelectSoul = value;
                if (treasureSelectSoulChangeEvent != null)
                {
                    treasureSelectSoulChangeEvent(value);
                }
            }
        }
        public int gotoSoul { get; set; }
        public bool serverInited { get; private set; }
        PlayerPackModel packModel { get { return ModelCenter.Instance.GetModel<PlayerPackModel>(); } }
        TreasureModel treasureModel { get { return ModelCenter.Instance.GetModel<TreasureModel>(); } }
        AchievementModel achievementModel { get { return ModelCenter.Instance.GetModel<AchievementModel>(); } }
        public override void Init()
        {
            packModel.RefreshItemCountAct += RefreshItemCountAct;
            PlayerStrengthengDatas.RefreshEquipUpgradLvAct += RefreshEquipSTRLv;
            achievementModel.achievementProgressUpdateEvent += AchievementUpdate;
            achievementModel.achievementCompletedEvent += AchievementUpdate;
            ParseConfig();
        }
        public void OnBeforePlayerDataInitialize()
        {
            serverInited = false;
            foreach (var special in treasureSoulDict.Values)
            {
                special.presentFinishCount = 0;
                special.presentGetCount = 0;
                special.itemGet = false;
                special.active = false;
            }
        }
        public void OnPlayerLoginOk()
        {
            serverInited = true;
            UpdateRedpoints();
        }
        public override void UnInit()
        {
            packModel.RefreshItemCountAct -= RefreshItemCountAct;
            PlayerStrengthengDatas.RefreshEquipUpgradLvAct -= RefreshEquipSTRLv;
            achievementModel.achievementProgressUpdateEvent -= AchievementUpdate;
            achievementModel.achievementCompletedEvent -= AchievementUpdate;
        }
        void ParseConfig()
        {
            var configs = ConfigManager.Instance.GetAllValues<TreasurePrivilegeConfig>();
            for (int i = 0; i < configs.Count; i++)
            {
                var treasureConfig = ConfigManager.Instance.GetTemplate<TreasureConfig>(configs[i].treasureId);
                if (treasureConfig == null || treasureConfig.Category != (int)TreasureCategory.Human)
                {
                    continue;
                }
                treasureSouls.Add(configs[i].PrivilegeID);
                treasureSoulDict.Add(configs[i].PrivilegeID, new TreasureSpecialData((TreasurePrivilege)configs[i].PrivilegeID));
                soulAchievements.Add(configs[i].PrivilegeID, new List<int>(configs[i].successList));
            }
            var funcConfig = ConfigManager.Instance.GetTemplate<FuncConfigConfig>("MWSignDayAttr");
            var jsonData = LitJson.JsonMapper.ToObject(funcConfig.Numerical1);
            signAddTreasure = int.Parse(funcConfig.Numerical2);
            foreach (var _key in jsonData.Keys)
            {
                signAddProperty.Add(int.Parse(_key), int.Parse(jsonData[_key].ToString()));
            }
        }
        public List<int> GetTreasureSouls()
        {
            return treasureSouls;
        }
        public bool TryGetRealmAchievement(int _id,out int achievementId)
        {
            achievementId = 0;
            List<int> list;
            if (soulAchievements.TryGetValue(_id, out list))
            {
                for (int i = 0; i < list.Count; i++)
                {
                    var config = ConfigManager.Instance.GetTemplate<SuccessConfig>(list[i]);
                    if (config != null && config.Type == 50)
                    {
                        achievementId = list[i];
                        return true;
                    }
                }
            }
            return false;
        }
        public bool TryGetAchievements(int _id,out List<int> list)
        {
            return soulAchievements.TryGetValue(_id, out list);
        }
        public bool IsCompleteRealmAchievement(int _id)
        {
            TreasureSpecialData special;
            if (TryGetTreasureSoul(_id, out special))
            {
                if (special.active)
                {
                    return true;
                }
                int achievementId;
                if (TryGetRealmAchievement(_id, out achievementId))
                {
                    Achievement achievement;
                    return achievementModel.TryGetAchievement(achievementId, out achievement) && achievement.completed;
                }
            }
            return true;
        }
        public bool IsCompleteAllAchievement(int _id)
        {
            if (soulAchievements.ContainsKey(_id))
            {
                var list = soulAchievements[_id];
                bool allCompleted = true;
                for (int i = 0; i < list.Count; i++)
                {
                    Achievement achievement;
                    achievementModel.TryGetAchievement(list[i], out achievement);
                    if (achievement == null || (!achievement.completed && !Achievement.IsReach(achievement.id, achievement.progress)))
                    {
                        allCompleted = false;
                    }
                }
                return allCompleted;
            }
            return false;
        }
        public bool TryGetTreasureSoul(int _id, out TreasureSpecialData special)
        {
            return treasureSoulDict.TryGetValue(_id, out special);
        }
        public void ActiveTreasureSoul(int _id)
        {
            if (IsCompleteAllAchievement(_id))
            {
                CA512_tagCMActiveMWSoul pak = new CA512_tagCMActiveMWSoul();
                pak.ID = (byte)_id;
                GameNetSystem.Instance.SendInfo(pak);
            }
        }
        public int GetTreasureSoulValue(int _soulId)
        {
            if (treasureSoulDict.ContainsKey(_soulId))
            {
                if (IsGetTreasureSoul(_soulId))
                {
                    var _specialData = treasureSoulDict[_soulId];
                    return _specialData.GetPrivilegeValue();
                }
            }
            return 0;
        }
        public bool IsGetTreasureSoul(int _soulId)
        {
            TreasureSpecialData special;
            return TryGetTreasureSoul(_soulId, out special) && special.active;
        }
        public bool IsOpenTreasureSoul(int _soulId)
        {
            TreasureSpecialData special;
            if (TryGetTreasureSoul(_soulId, out special))
            {
                Treasure treasure;
                return treasureModel.TryGetTreasure(special.treasureId, out treasure) && treasure.state == TreasureState.Collected;
            }
            return false;
        }
        private void RefreshEquipSTRLv(int obj)
        {
            UpdateTreasureSoulStrenthen();
        }
        private void RefreshItemCountAct(PackType packType, int arg2, int arg3)
        {
            if (packType == PackType.rptEquip)
            {
                UpdateTreasureSoulStrenthen();
            }
        }
        private void AchievementUpdate(int _id)
        {
            foreach (var soulId in soulAchievements.Keys)
            {
                if (soulAchievements[soulId].Contains(_id))
                {
                    UpdateAchievementRedpoint(_id);
                }
            }
        }
        public void UpdateTreasureSoulStrenthen()
        {
            UpdateRedpoint((int)TreasurePrivilege.StrengthenAdd);
            if (treasureSoulEvent != null)
            {
                treasureSoulEvent((int)TreasurePrivilege.StrengthenAdd);
            }
        }
        public void UpdateTreasurePrivilege(HA353_tagMCMWPrivilegeDataInfo package)
        {
            for (int i = 0; i < package.Count; i++)
            {
                var _data = package.InfoList[i];
                TreasureSpecialData special;
                if (!treasureSoulDict.TryGetValue((int)_data.PriID, out special))
                {
                    continue;
                }
                bool beforeActived = special.active;
                special.active = _data.State == 1;
                if (!beforeActived && special.active && serverInited && WindowCenter.Instance.CheckOpen<TreasureSoulWin>()
                    && !WindowCenter.Instance.CheckOpen<TreasureSoulActiveWin>() && !NewBieCenter.Instance.inGuiding)
                {
                    TreasureSoulActiveWin.treasureSoulId = (int)_data.PriID;
                    WindowCenter.Instance.Open<TreasureSoulActiveWin>();
                }
                if ((TreasurePrivilege)_data.PriID == TreasurePrivilege.StrengthenAdd)
                {
                    if (treasureSoulEvent != null)
                    {
                        treasureSoulEvent((int)_data.PriID);
                    }
                    continue;
                }
                special.presentFinishCount = (int)_data.GotValue;
                special.presentGetCount = (int)_data.CurValue;
                special.itemGet = _data.ItemAwardState == 1;
                UpdateRedpoint((int)_data.PriID);
                UpdateAchievementRedpoint((int)_data.PriID);
                if (treasureSoulEvent != null)
                {
                    treasureSoulEvent((int)_data.PriID);
                }
            }
        }
        public void UpdateTreasurePrivilege(HA317_tagMCAllEquipAttrActiveInfo package)
        {
            for (int i = 0; i < package.ActiveInfo.Length; i++)
            {
                var _data = package.ActiveInfo[i];
                if (_data.Type == 0)
                {
                    if (treasureSoulDict.ContainsKey((int)TreasurePrivilege.StrengthenAdd))
                    {
                        var _specialData = treasureSoulDict[(int)TreasurePrivilege.StrengthenAdd];
                        _specialData.presentFinishCount = (int)_data.Cnt;
                        UpdateRedpoint((int)TreasurePrivilege.StrengthenAdd);
                    }
                    if (treasureSoulEvent != null)
                    {
                        treasureSoulEvent((int)TreasurePrivilege.StrengthenAdd);
                    }
                }
            }
        }
        private void UpdateRedpoint(int _id)
        {
            if (treasureSoulDict.ContainsKey(_id))
            {
                var special = treasureSoulDict[_id];
                special.UpdateState();
                if (special.privilegeRedpoint != null)
                {
                    special.privilegeRedpoint.state = RedPointState.None;
                    if (!FuncOpen.Instance.IsFuncOpen(126) || !IsOpenTreasureSoul(_id)
                        || !IsGetTreasureSoul(_id))
                    {
                        return;
                    }
                    switch (special.type)
                    {
                        case TreasurePrivilege.StrengthenAdd:
                        case TreasurePrivilege.DemonJarAtk:
                        case TreasurePrivilege.MountAtk:
                        case TreasurePrivilege.PetHp:
                        case TreasurePrivilege.Sp:
                            special.privilegeRedpoint.state = special.state == TreasurePrivilegeState.Reward ?
                                RedPointState.Simple : RedPointState.None;
                            break;
                        case TreasurePrivilege.Wash:
                            special.privilegeRedpoint.state = special.itemGet ?
                               RedPointState.None : RedPointState.Simple;
                            break;
                    }
                }
            }
        }
        private void UpdateAchievementRedpoint(int _id)
        {
            if (treasureSoulDict.ContainsKey(_id) && soulAchievements.ContainsKey(_id))
            {
                var special = treasureSoulDict[_id];
                special.activeRedpoint.state = RedPointState.None;
                if (!FuncOpen.Instance.IsFuncOpen(126) || !IsOpenTreasureSoul(_id) || special.active)
                {
                    return;
                }
                var list = soulAchievements[_id];
                bool allCompleted = true;
                for (int i = 0; i < list.Count; i++)
                {
                    Achievement achievement;
                    achievementModel.TryGetAchievement(list[i], out achievement);
                    if (achievement == null || (!achievement.completed && !Achievement.IsReach(achievement.id, achievement.progress)))
                    {
                        allCompleted = false;
                    }
                }
                special.activeRedpoint.state = allCompleted ? RedPointState.Simple : RedPointState.None;
            }
        }
        private void UpdateRedpoints()
        {
            foreach (var special in treasureSoulDict.Keys)
            {
                UpdateRedpoint(special);
                UpdateAchievementRedpoint(special);
            }
        }
    }
    public class TreasureSpecialData
    {
        public TreasurePrivilege type { get; private set; }
        public int progress { get; private set; }
        public int totalProgress { get; private set; }
        public int effectValue { get; private set; }
        public List<AwardItem> items { get; private set; }
        public Dictionary<int, int> propertyDict { get; private set; }
        public Redpoint redpoint { get; private set; }
        public Redpoint privilegeRedpoint { get; private set; }
        public Redpoint activeRedpoint { get; private set; }
        public int treasureId { get; set; }
        public bool active { get; set; }
        private TreasurePrivilegeState m_State = TreasurePrivilegeState.Doing;
        public TreasurePrivilegeState state
        {
            get { return m_State; }
            set { m_State = value; }
        }
        public int presentFinishCount { get; set; }
        public int presentGetCount { get; set; }
        public bool itemGet { get; set; }
        public TreasureSpecialData(TreasurePrivilege _type)
        {
            type = _type;
            var config = ConfigManager.Instance.GetTemplate<TreasurePrivilegeConfig>((int)_type);
            progress = Mathf.Max(1, config.singleValue);
            totalProgress = config.maxValue;
            var _effectValue = 0;
            int.TryParse(config.EffectValue, out _effectValue);
            effectValue = _effectValue;
            treasureId = config.treasureId;
            if (!string.IsNullOrEmpty(config.attr))
            {
                var propertyJson = LitJson.JsonMapper.ToObject(config.attr);
                propertyDict = new Dictionary<int, int>();
                foreach (var _key in propertyJson.Keys)
                {
                    var _property = int.Parse(_key);
                    var _value = int.Parse(propertyJson[_key].ToJson());
                    propertyDict.Add(_property, _value);
                }
            }
            if (!string.IsNullOrEmpty(config.itemAward))
            {
                var itemArray = LitJson.JsonMapper.ToObject<int[][]>(config.itemAward);
                if (itemArray != null && itemArray.Length > 0)
                {
                    items = new List<AwardItem>();
                    for (int i = 0; i < itemArray.Length; i++)
                    {
                        var _array = itemArray[i];
                        items.Add(new AwardItem()
                        {
                            isBind = _array[2],
                            item = new Item()
                            {
                                id = _array[0],
                                count = _array[1],
                            },
                        });
                    }
                }
            }
            if (type == TreasurePrivilege.PetHp)
            {
                var petCount = ConfigManager.Instance.GetAllValues<PetInfoConfig>().Count;
                totalProgress = petCount;
            }
            else if (type == TreasurePrivilege.MountAtk)
            {
                var mountConfigs = ConfigManager.Instance.GetAllValues<HorseConfig>();
                var maxlv = 0;
                for (int i = 0; i < mountConfigs.Count; i++)
                {
                    maxlv += mountConfigs[i].MaxLV;
                }
                totalProgress = maxlv;
            }
            else if (type == TreasurePrivilege.StrengthenAdd)
            {
                var configs = ConfigManager.Instance.GetAllValues<ItemPlusSumAttrConfig>();
                totalProgress = configs[configs.Count - 1].countNeed;
            }
            redpoint = new Redpoint(TreasureModel.TREASURE_SOUL_ID, TreasureModel.TREASURE_SOUL_ID * 100 + (int)type);
            activeRedpoint = new Redpoint(redpoint.id, redpoint.id * 100 + 1);
            switch (_type)
            {
                case TreasurePrivilege.DemonJarAtk:
                case TreasurePrivilege.StrengthenAdd:
                case TreasurePrivilege.MountAtk:
                case TreasurePrivilege.PetHp:
                case TreasurePrivilege.Sp:
                case TreasurePrivilege.Wash:
                    privilegeRedpoint = new Redpoint(redpoint.id, redpoint.id * 100 + 2);
                    break;
            }
        }
        public int GetPrivilegeValue(int _index = 0)
        {
            switch (type)
            {
                case TreasurePrivilege.RuneBreakExpAdd:
                    return effectValue;
                case TreasurePrivilege.DemonJarAtk:
                case TreasurePrivilege.Suit:
                    return effectValue;
                case TreasurePrivilege.Wing:
                case TreasurePrivilege.StrengthenAdd:
                    return effectValue;
            }
            return 0;
        }
        public void UpdateState()
        {
            switch (type)
            {
                case TreasurePrivilege.Property:
                case TreasurePrivilege.RuneBreakExpAdd:
                case TreasurePrivilege.Wing:
                case TreasurePrivilege.Suit:
                    state = TreasurePrivilegeState.Complete;
                    break;
                case TreasurePrivilege.Sp:
                case TreasurePrivilege.DemonJarAtk:
                case TreasurePrivilege.PetHp:
                case TreasurePrivilege.MountAtk:
                    if (presentFinishCount >= totalProgress && (presentGetCount / progress) >= (totalProgress / progress))
                    {
                        state = TreasurePrivilegeState.Complete;
                    }
                    else if (presentGetCount > 0 && presentFinishCount / progress < presentGetCount / progress)
                    {
                        state = TreasurePrivilegeState.Reward;
                    }
                    else
                    {
                        state = TreasurePrivilegeState.Doing;
                    }
                    break;
                case TreasurePrivilege.Wash:
                    state = itemGet ? TreasurePrivilegeState.Doing : TreasurePrivilegeState.Reward;
                    break;
                case TreasurePrivilege.StrengthenAdd:
                    var strengthen = ModelCenter.Instance.GetModel<PlayerStrengthengDatas>();
                    var playerpack = ModelCenter.Instance.GetModel<PlayerPackModel>();
                    presentGetCount = 0;
                    foreach (var value in strengthen._EqInfo.Values)
                    {
                        ItemModel itemModel = playerpack.GetItemModelByIndex(PackType.rptEquip, value.EquipIndex);
                        if (itemModel != null)
                        {
                            presentGetCount += value.EquipPartStarLV;
                        }
                    }
                    var configs = ConfigManager.Instance.GetAllValues<ItemPlusSumAttrConfig>();
                    bool contains = configs.FindIndex((x) =>
                    {
                        return x.countNeed > presentFinishCount && presentGetCount >= x.countNeed;
                    }) != -1;
                    if (presentFinishCount >= totalProgress && presentGetCount >= totalProgress)
                    {
                        state = TreasurePrivilegeState.Complete;
                    }
                    else if (contains)
                    {
                        state = TreasurePrivilegeState.Reward;
                    }
                    else
                    {
                        state = TreasurePrivilegeState.Doing;
                    }
                    break;
            }
        }
        public string ProgressDisplay()
        {
            switch (type)
            {
                case TreasurePrivilege.DemonJarAtk:
                case TreasurePrivilege.PetHp:
                case TreasurePrivilege.MountAtk:
                case TreasurePrivilege.Sp:
                    if (state == TreasurePrivilegeState.Complete) { return UIHelper.GetTextColorByItemColor(TextColType.Green, totalProgress.ToString(), true); }
                    else if (state == TreasurePrivilegeState.Doing)
                    {
                        return StringUtility.Contact(UIHelper.GetTextColorByItemColor(TextColType.Red, presentGetCount.ToString(), true), "/", (presentFinishCount / progress + 1) * progress);
                    }
                    else if (state == TreasurePrivilegeState.Reward)
                    {
                        var _completeCount = (presentFinishCount / progress + 1) * progress;
                        return StringUtility.Contact(UIHelper.GetTextColorByItemColor(TextColType.Green, presentGetCount.ToString(), true), "/", _completeCount);
                    }
                    break;
                case TreasurePrivilege.StrengthenAdd:
                    var configs = ConfigManager.Instance.GetAllValues<ItemPlusSumAttrConfig>();
                    var next = configs.Count - 1;
                    for (int i = 0; i < configs.Count; i++)
                    {
                        if (configs[i].countNeed > presentFinishCount)
                        {
                            next = i;
                            break;
                        }
                    }
                    if (state == TreasurePrivilegeState.Complete) { return totalProgress.ToString(); }
                    else if (state == TreasurePrivilegeState.Doing
                        || state == TreasurePrivilegeState.Reward)
                    {
                        var colortype = presentGetCount >= configs[next].countNeed ? TextColType.Green : TextColType.Red;
                        return StringUtility.Contact(UIHelper.GetTextColorByItemColor(colortype, presentGetCount.ToString(), true), "/", configs[next].countNeed);
                    }
                    break;
            }
            return string.Empty;
        }
        public void GetReward()
        {
            switch (type)
            {
                case TreasurePrivilege.MountAtk:
                case TreasurePrivilege.DemonJarAtk:
                case TreasurePrivilege.PetHp:
                case TreasurePrivilege.Sp:
                case TreasurePrivilege.Wash:
                    var _pak = new CA504_tagCMPlayerGetReward();
                    _pak.RewardType = (int)GotServerRewardType.Def_RewardType_TreasureSoul;
                    _pak.DataEx = (uint)type;
                    _pak.DataExStrLen = 0;
                    _pak.DataExStr = string.Empty;
                    GameNetSystem.Instance.SendInfo(_pak);
                    break;
                case TreasurePrivilege.StrengthenAdd:
                    var configs = ConfigManager.Instance.GetAllValues<ItemPlusSumAttrConfig>();
                    var present = 0;
                    for (int i = 0; i < configs.Count; i++)
                    {
                        if (presentGetCount >= configs[i].countNeed)
                        {
                            present = i;
                        }
                    }
                    CA503_tagCMActiveAllEquipAttr pak = new CA503_tagCMActiveAllEquipAttr();
                    pak.Type = 0;
                    pak.Cnt = (uint)configs[present].countNeed;
                    GameNetSystem.Instance.SendInfo(pak);
                    break;
            }
        }
        public int GetFightPower()
        {
            var _fightPower = 0;
            if (propertyDict != null)
            {
                _fightPower += UIHelper.GetFightPower(propertyDict);
            }
            return _fightPower;
        }
    }
    public enum TreasurePrivilegeState
    {
        Doing = 0,
        Reward = 1,
        Complete = 2
    }
    public enum TreasurePrivilege
    {
        Property = 1,
        DemonJarAtk = 2,
        StrengthenAdd = 3,
        RuneBreakExpAdd = 4,
        MountAtk = 5,
        PetHp = 6,
        Sp = 7,
        Wing = 8,
        Suit = 9,
        Wash = 10,
        Sign = 11,
    }
}
System/Treasure/TreasureSoulModel.cs.meta
copy from System/Treasure/FairyTreasureCollectPanelPattern1.cs.meta copy to System/Treasure/TreasureSoulModel.cs.meta
File was copied from System/Treasure/FairyTreasureCollectPanelPattern1.cs.meta
@@ -1,6 +1,6 @@
fileFormatVersion: 2
guid: f4d29363b41f2a740834a1aabf805009
timeCreated: 1521102270
guid: 546ae13b091e8c845b2c8d0e1a458b39
timeCreated: 1534406321
licenseType: Pro
MonoImporter:
  serializedVersion: 2
System/Treasure/TreasureSoulPattern.cs
@@ -6,15 +6,15 @@
{
    public class TreasureSoulPattern : MonoBehaviour
    {
        protected TreasureModel model { get { return ModelCenter.Instance.GetModel<TreasureModel>(); } }
        protected Treasure treasure;
        protected TreasureSoulModel model { get { return ModelCenter.Instance.GetModel<TreasureSoulModel>(); } }
        protected TreasureSpecialData special;
        public virtual void Display(int _id)
        {
            model.TryGetTreasure(_id, out treasure);
            model.treasurePrivilegeUpdateEvent -= TreasurePrivilegeUpdateEvent;
            model.treasurePrivilegeUpdateEvent += TreasurePrivilegeUpdateEvent;
            model.TryGetTreasureSoul(_id, out special);
            model.treasureSoulEvent -= TreasurePrivilegeUpdateEvent;
            model.treasureSoulEvent += TreasurePrivilegeUpdateEvent;
        }
        protected virtual void TreasurePrivilegeUpdateEvent(int _id)
@@ -24,7 +24,7 @@
        public virtual void Dispose()
        {
            model.treasurePrivilegeUpdateEvent -= TreasurePrivilegeUpdateEvent;
            model.treasureSoulEvent -= TreasurePrivilegeUpdateEvent;
        }
    }
}
System/Treasure/TreasureSoulPattern1.cs
@@ -25,18 +25,17 @@
        private void OnGet()
        {
            treasure.specialData.GetReward();
            special.GetReward();
        }
        private void OnGoto()
        {
            var specialData = treasure.specialData;
            switch (specialData.type)
            switch (special.type)
            {
                case TreasurePrivilege.DemonJarAtk:
                    WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.LootPreciousFrameFunc1);
                    break;
                case TreasurePrivilege.Boss:
                case TreasurePrivilege.Sp:
                    WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.FindPreciousFrameFunc1);
                    break;
                case TreasurePrivilege.MountAtk:
@@ -46,19 +45,18 @@
                    WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.PetFunc2);
                    break;
            }
            model.gotoSoul = treasure.id;
            model.gotoSoul = (int)special.type;
        }
        public override void Display(int _id)
        {
            base.Display(_id);
            var specialData = treasure.specialData;
            switch (specialData.type)
            switch (special.type)
            {
                case TreasurePrivilege.DemonJarAtk:
                    m_ProgressTitle.text = Language.Get("TreasurePrivilege_DemonJar");
                    break;
                case TreasurePrivilege.Boss:
                case TreasurePrivilege.Sp:
                    m_ProgressTitle.text = Language.Get("TreasurePrivilege_FairyBoss");
                    break;
                case TreasurePrivilege.MountAtk:
@@ -73,25 +71,24 @@
        private void Display()
        {
            var specialData = treasure.specialData;
            m_Get.gameObject.SetActive(false);
            m_Goto.gameObject.SetActive(false);
            for (int i = 0; i < properties.Count; i++)
            {
                properties[i].gameObject.SetActive(false);
            }
            switch (specialData.type)
            switch (special.type)
            {
                case TreasurePrivilege.DemonJarAtk:
                case TreasurePrivilege.Boss:
                case TreasurePrivilege.Sp:
                case TreasurePrivilege.MountAtk:
                case TreasurePrivilege.PetHp:
                    var _index = 0;
                    m_ContainerHas.gameObject.SetActive(true);
                    m_ContainerNone.gameObject.SetActive(false);
                    foreach (var _key in specialData.propertyDict.Keys)
                    foreach (var _key in special.propertyDict.Keys)
                    {
                        var _value = specialData.propertyDict[_key] * specialData.presentFinishCount / specialData.progress;
                        var _value = special.propertyDict[_key] * special.presentFinishCount / special.progress;
                        if (_value <= 0)
                        {
                            m_ContainerHas.gameObject.SetActive(false);
@@ -102,11 +99,11 @@
                        properties[_index].DisplayUpper(_key, _value);
                        _index++;
                    }
                    m_Get.gameObject.SetActive(specialData.state == TreasurePrivilegeState.Reward);
                    m_Goto.gameObject.SetActive(specialData.state == TreasurePrivilegeState.Doing);
                    m_Progress.text = specialData.ProgressDisplay();
                    m_Get.gameObject.SetActive(special.state == TreasurePrivilegeState.Reward);
                    m_Goto.gameObject.SetActive(special.state == TreasurePrivilegeState.Doing);
                    m_Progress.text = special.ProgressDisplay();
                    //m_Progress.color = specialData.state == TreasurePrivilegeState.Doing ? UIHelper.GetUIColor(TextColType.Red, true) : UIHelper.GetUIColor(TextColType.Green, true);
                    m_Complete.gameObject.SetActive(specialData.state == TreasurePrivilegeState.Complete);
                    m_Complete.gameObject.SetActive(special.state == TreasurePrivilegeState.Complete);
                    break;
            }
        }
@@ -114,7 +111,7 @@
        protected override void TreasurePrivilegeUpdateEvent(int _id)
        {
            base.TreasurePrivilegeUpdateEvent(_id);
            if (_id == (int)treasure.specialData.type)
            if (_id == (int)special.type)
            {
                Display();
            }
System/Treasure/TreasureSoulPattern2.cs
@@ -47,13 +47,12 @@
        private void Display()
        {
            var specialData = treasure.specialData;
            var configs = ConfigManager.Instance.GetAllValues<ItemPlusSumAttrConfig>();
            var present = -1;
            var next = 0;
            for (int i = 0; i < configs.Count; i++)
            {
                if (specialData.presentFinishCount >= configs[i].countNeed)
                if (special.presentFinishCount >= configs[i].countNeed)
                {
                    present = i;
                }
@@ -87,22 +86,22 @@
                    }
                }
            }
            m_Complete.gameObject.SetActive(specialData.state == TreasurePrivilegeState.Complete);
            m_Goto.gameObject.SetActive(specialData.state == TreasurePrivilegeState.Doing);
            m_Get.gameObject.SetActive(specialData.state == TreasurePrivilegeState.Reward);
            m_Progress.text = specialData.ProgressDisplay();
            m_Complete.gameObject.SetActive(special.state == TreasurePrivilegeState.Complete);
            m_Goto.gameObject.SetActive(special.state == TreasurePrivilegeState.Doing);
            m_Get.gameObject.SetActive(special.state == TreasurePrivilegeState.Reward);
            m_Progress.text = special.ProgressDisplay();
            //m_Progress.color = specialData.state == TreasurePrivilegeState.Doing ? UIHelper.GetUIColor(TextColType.Red, true) : UIHelper.GetUIColor(TextColType.Green, true);
        }
        private void OnGoto()
        {
            WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.RebornOpenStrength);
            model.gotoSoul = treasure.id;
            model.gotoSoul = (int)special.type;
        }
        private void OnGet()
        {
            treasure.specialData.GetReward();
            special.GetReward();
        }
    }
}
System/Treasure/TreasureSoulPattern3.cs
@@ -31,7 +31,7 @@
        protected override void TreasurePrivilegeUpdateEvent(int _id)
        {
            base.TreasurePrivilegeUpdateEvent(_id);
            if (_id == (int)treasure.specialData.type)
            if (_id == (int)special.type)
            {
                Display();
            }
@@ -39,14 +39,13 @@
        private void Display()
        {
            var specialData = treasure.specialData;
            for (int i = 0; i < m_Items.Length; i++)
            {
                m_Items[i].gameObject.SetActive(specialData.items != null && i < specialData.items.Count);
                m_Items[i].gameObject.SetActive(special.items != null && i < special.items.Count);
                m_Items[i].cellBtn.RemoveAllListeners();
                if (specialData.items != null && i < specialData.items.Count)
                if (special.items != null && i < special.items.Count)
                {
                    var award = specialData.items[i];
                    var award = special.items[i];
                    ItemCellModel cellModel = new ItemCellModel(award.item.id, true, (ulong)award.item.count, award.isBind);
                    m_Items[i].Init(cellModel);
                    m_Items[i].cellBtn.AddListener(() =>
@@ -56,12 +55,12 @@
                    });
                }
            }
            m_Get.SetInteractable(m_GetText, specialData.state == TreasurePrivilegeState.Reward);
            m_Get.SetInteractable(m_GetText, special.state == TreasurePrivilegeState.Reward);
        }
        private void OnGet()
        {
            treasure.specialData.GetReward();
            special.GetReward();
        }
    }
}
System/Treasure/TreasureSoulPattern4.cs
@@ -33,7 +33,7 @@
        protected override void TreasurePrivilegeUpdateEvent(int _id)
        {
            base.TreasurePrivilegeUpdateEvent(_id);
            if (_id == treasure.id)
            if (_id == (int)special.type)
            {
                Display();
            }
@@ -41,27 +41,26 @@
        private void Display()
        {
            var specialData = treasure.specialData;
            for (int i = 0; i < properties.Count; i++)
            {
                properties[i].gameObject.SetActive(false);
            }
            switch (specialData.type)
            switch (special.type)
            {
                case TreasurePrivilege.Property:
                    m_ContainerHas.gameObject.SetActive(true);
                    m_ContainerNone.gameObject.SetActive(false);
                    var _index = 0;
                    foreach (var _key in specialData.propertyDict.Keys)
                    foreach (var _key in special.propertyDict.Keys)
                    {
                        var _value = specialData.propertyDict[_key];
                        var _value = special.propertyDict[_key];
                        properties[_index].gameObject.SetActive(true);
                        properties[_index].DisplayUpper(_key, _value);
                        _index++;
                    }
                    break;
                case TreasurePrivilege.Suit:
                    var percentSuit = (float)specialData.propertyDict[87] / 10000;
                    var percentSuit = (float)special.propertyDict[87] / 10000;
                    var dict = suitModel.GetActiveSuitAttr();
                    var _suitIndex = 0;
                    foreach (var _key in dict.Keys)
@@ -79,7 +78,7 @@
                    m_ContainerNone.gameObject.SetActive(_suitIndex == 0);
                    break;
                case TreasurePrivilege.Wing:
                    var percentWing = (float)specialData.propertyDict[86] / 10000;
                    var percentWing = (float)special.propertyDict[86] / 10000;
                    var itemModel = pack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retWing);
                    m_ContainerHas.gameObject.SetActive(itemModel != null);
                    m_ContainerNone.gameObject.SetActive(itemModel == null);
System/Treasure/TreasureSoulWin.cs
@@ -19,27 +19,31 @@
        [SerializeField] Button m_CloseBtn;
        [SerializeField] Image m_SelectSoulImg;
        [SerializeField] Text m_SelectTreasureName;
        [SerializeField] Text m_SoulName;
        [SerializeField] Text m_SoulDescription;
        [SerializeField] Image m_SoulTarget;
        [SerializeField] Button m_GotoGetBtn;
        [SerializeField] Button m_Active;
        [SerializeField] Text m_ActiveText;
        [SerializeField] Button m_GotoRealm;
        [SerializeField] List<TreasureSoulPattern> m_TreasureSouls;
        [SerializeField] RectTransform m_ContainerPreview;
        [SerializeField] Text m_PropertyTitle;
        [SerializeField] List<PropertyBehaviour> propertys;
        [SerializeField] ScrollerController m_ScollerControl;
        TreasureModel m_Model;
        TreasureModel model
        [SerializeField] RectTransform m_ContainerPreview;
        [SerializeField] Text m_PreviewTitle;
        [SerializeField] List<PropertyBehaviour> m_PreviewPropretys;
        [SerializeField] RectTransform m_ContainerCondition;
        [SerializeField] ScrollerController m_ConditonControl;
        TreasureSoulModel m_Model;
        TreasureSoulModel model
        {
            get
            {
                return m_Model ?? (m_Model = ModelCenter.Instance.GetModel<TreasureModel>());
                return m_Model ?? (m_Model = ModelCenter.Instance.GetModel<TreasureSoulModel>());
            }
        }
        PlayerSuitModel suitModel { get { return ModelCenter.Instance.GetModel<PlayerSuitModel>(); } }
@@ -53,8 +57,12 @@
            }
        }
        AchievementModel achievementModel
        {
            get { return ModelCenter.Instance.GetModel<AchievementModel>(); }
        }
        bool m_CorrectClose = true;
        int m_SelectSoul = 0;
        List<int> sortSouls = new List<int>();
@@ -66,16 +74,19 @@
        protected override void AddListeners()
        {
            m_GotoGetBtn.onClick.AddListener(OnGotoGet);
            m_Active.onClick.AddListener(Active);
            m_GotoRealm.onClick.AddListener(GotoRealm);
            m_CloseBtn.onClick.AddListener(CloseClick);
            m_ScollerControl.OnRefreshCell += OnRefreshCell;
            m_ConditonControl.OnRefreshCell += OnRefreshConditionCell;
        }
        protected override void OnPreOpen()
        {
            m_CorrectClose = true;
            model.treasureSelectSoulChangeEvent += TreasureSelectSoulChangeEvent;
            PlayerDatas.Instance.PlayerDataRefreshInfoEvent += PlayerDataRefreshInfoEvent;
            model.treasureSoulEvent += TreasureSoulEvent;
            achievementModel.achievementCompletedEvent += AchievementCompletedEvent;
            m_TreasureSoulBtn.state = TitleBtnState.Click;
            Display();
            DisplaySelect();
@@ -97,6 +108,8 @@
        {
            model.treasureSelectSoulChangeEvent -= TreasureSelectSoulChangeEvent;
            PlayerDatas.Instance.PlayerDataRefreshInfoEvent -= PlayerDataRefreshInfoEvent;
            model.treasureSoulEvent -= TreasureSoulEvent;
            achievementModel.achievementCompletedEvent -= AchievementCompletedEvent;
            for (int i = 0; i < m_TreasureSouls.Count; i++)
            {
                m_TreasureSouls[i].Dispose();
@@ -106,19 +119,31 @@
        protected override void OnAfterClose()
        {
            if (m_CorrectClose)
            {
                WindowCenter.Instance.Open<MainInterfaceWin>();
            }
        }
        #endregion
        private void AchievementCompletedEvent(int _id)
        {
            List<int> list;
            if (model.TryGetAchievements(model.selectSoul, out list) && list.Contains(_id))
            {
                DisplaySelect();
            }
        }
        private void Display()
        {
            sortSouls.Clear();
            var _list = model.GetTreasureCategory(TreasureCategory.Human);
            sortSouls.AddRange(_list);
            if (m_ScollerControl.GetNumberOfCells(m_ScollerControl.m_Scorller) == 0)
            var _list = model.GetTreasureSouls();
            for (int i = 0; i < _list.Count; i++)
            {
                if (model.IsOpenTreasureSoul(_list[i]))
                {
                    sortSouls.Add(_list[i]);
                }
            }
            if (m_ScollerControl.GetNumberOfCells(m_ScollerControl.m_Scorller) != sortSouls.Count)
            {
                m_ScollerControl.Refresh();
                for (int i = 0; i < sortSouls.Count; i++)
@@ -146,38 +171,17 @@
                return _soul;
            }
            model.gotoSoul = 0;
            var _list = model.GetTreasureCategory(TreasureCategory.Human);
            var _select = _list[0];
            for (int i = 0; i < _list.Count; i++)
            var _select = sortSouls[sortSouls.Count - 1];
            for (int i = 0; i < sortSouls.Count; i++)
            {
                Treasure treasure;
                if (model.TryGetTreasure(_list[i], out treasure))
                TreasureSpecialData special;
                if (model.TryGetTreasureSoul(sortSouls[i], out special))
                {
                    if (treasure.specialData.privilegeRedpoint != null
                        && treasure.specialData.privilegeRedpoint.state == RedPointState.Simple)
                    if (special.redpoint.state == RedPointState.Simple)
                    {
                        return _list[i];
                        return sortSouls[i];
                    }
                }
            }
            for (int i = 0; i < _list.Count; i++)
            {
                Treasure treasure;
                if (model.TryGetTreasure(_list[i], out treasure))
                {
                    if (treasure.state == TreasureState.Collected)
                    {
                        if (!treasure.IsMaxStage())
                        {
                            return _list[i];
                        }
                        _select = treasure.id;
                    }
                }
            }
            if (_list.Contains(m_SelectSoul))
            {
                return m_SelectSoul;
            }
            return _select;
        }
@@ -196,48 +200,81 @@
            DisplaySelect();
        }
        private void OnGotoGet()
        private void TreasureSoulEvent(int _id)
        {
            m_CorrectClose = false;
            CloseImmediately();
            model.currentCategory = TreasureCategory.Human;
            model.selectedTreasure = model.selectSoul;
            model.openFromTreasureSoul = true;
            WindowCenter.Instance.Open<TreasureLevelUpWin>();
            if (_id == model.selectSoul)
            {
                TreasureSpecialData special;
                if (model.TryGetTreasureSoul(_id, out special))
                {
                    DisplaySelect();
                }
            }
        }
        private void Active()
        {
            model.ActiveTreasureSoul(model.selectSoul);
        }
        private void GotoRealm()
        {
            WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.RealmFunc1);
        }
        private void DisplaySelect()
        {
            Treasure treasure;
            model.TryGetTreasure(model.selectSoul, out treasure);
            if (treasure != null)
            TreasureSpecialData special;
            model.TryGetTreasureSoul(model.selectSoul, out special);
            m_ContainerCondition.gameObject.SetActive(false);
            if (special != null)
            {
                var _privilege = treasure.unLockPrivilege;
                var config = ConfigManager.Instance.GetTemplate<TreasurePrivilegeConfig>(_privilege);
                var config = ConfigManager.Instance.GetTemplate<TreasurePrivilegeConfig>((int)special.type);
                if (config != null)
                {
                    m_SoulName.text = config.Name;
                    m_SoulDescription.text = UIHelper.ReplaceNewLine(config.Description);
                    m_SoulTarget.SetSprite(config.targetDescription);
                    m_SoulTarget.SetNativeSize();
                    m_GotoGetBtn.gameObject.SetActive(!treasure.IsMaxStage());
                    DisplayPrivilege(treasure);
                    DisplayPrivilege(special);
                    m_SelectSoulImg.SetSprite(config.Icon);
                    m_SelectSoulImg.material = treasure.IsMaxStage() ? MaterialUtility.GetUIDefaultGraphicMaterial() : MaterialUtility.GetDefaultSpriteGrayMaterial();
                    m_SelectSoulImg.material = special.active ? MaterialUtility.GetUIDefaultGraphicMaterial() : MaterialUtility.GetDefaultSpriteGrayMaterial();
                    if (special.active)
                    {
                        m_Active.gameObject.SetActive(false);
                        m_GotoRealm.gameObject.SetActive(false);
                }
                var treasureConfig = ConfigManager.Instance.GetTemplate<TreasureConfig>(model.selectSoul);
                m_SelectTreasureName.text = treasureConfig.Name;
                DisplyPreview(treasure);
                    else
                    {
                        if (!model.IsCompleteRealmAchievement(model.selectSoul))
                        {
                            m_Active.gameObject.SetActive(false);
                            m_GotoRealm.gameObject.SetActive(true);
                        }
                        else
                        {
                            m_Active.gameObject.SetActive(true);
                            m_GotoRealm.gameObject.SetActive(false);
                            m_Active.SetInteractable(m_ActiveText, model.IsCompleteAllAchievement(model.selectSoul));
                            m_ContainerCondition.gameObject.SetActive(true);
                            DisplayCondition();
                        }
                    }
                    m_ContainerPreview.gameObject.SetActive(!special.active);
                    if (!special.active)
                    {
                        DisplayPreview(model.selectSoul);
                    }
                }
            }
        }
        private void DisplayPrivilege(Treasure treasure)
        private void DisplayPrivilege(TreasureSpecialData special)
        {
            int _pattern = -1;
            switch (treasure.specialData.type)
            switch (special.type)
            {
                case TreasurePrivilege.Property:
                case TreasurePrivilege.Suit:
@@ -247,7 +284,7 @@
                case TreasurePrivilege.DemonJarAtk:
                case TreasurePrivilege.MountAtk:
                case TreasurePrivilege.PetHp:
                case TreasurePrivilege.Boss:
                case TreasurePrivilege.Sp:
                    _pattern = 0;
                    break;
                case TreasurePrivilege.StrengthenAdd:
@@ -260,56 +297,53 @@
            for (int i = 0; i < m_TreasureSouls.Count; i++)
            {
                m_TreasureSouls[i].Dispose();
                m_TreasureSouls[i].gameObject.SetActive(_pattern == i && treasure.IsMaxStage());
                if (_pattern == i && treasure.IsMaxStage())
                m_TreasureSouls[i].gameObject.SetActive(_pattern == i && model.IsGetTreasureSoul(model.selectSoul));
                if (_pattern == i)
                {
                    m_TreasureSouls[i].Display(treasure.id);
                    m_TreasureSouls[i].Display((int)special.type);
                }
            }
        }
        private void DisplyPreview(Treasure treasure)
        private void DisplayPreview(int _id)
        {
            m_ContainerPreview.gameObject.SetActive(false);
            if (treasure.IsMaxStage())
            {
                return;
            }
            switch (treasure.specialData.type)
            TreasureSpecialData special;
            model.TryGetTreasureSoul(_id, out special);
            switch (special.type)
            {
                case TreasurePrivilege.Wing:
                case TreasurePrivilege.Suit:
                case TreasurePrivilege.Property:
                    m_PropertyTitle.text = Language.Get("TreasureSoulAddPropertyTitle");
                    m_PreviewTitle.text = Language.Get("TreasureSoulAddPropertyTitle");
                    break;
                case TreasurePrivilege.DemonJarAtk:
                case TreasurePrivilege.StrengthenAdd:
                case TreasurePrivilege.MountAtk:
                case TreasurePrivilege.PetHp:
                case TreasurePrivilege.Boss:
                    m_PropertyTitle.text = Language.Get("TreasureSoulGetPropertyTitle");
                case TreasurePrivilege.Sp:
                    m_PreviewTitle.text = Language.Get("TreasureSoulGetPropertyTitle");
                    break;
            }
            var specialData = treasure.specialData;
            for (int i = 0; i < propertys.Count; i++)
            for (int i = 0; i < m_PreviewPropretys.Count; i++)
            {
                propertys[i].gameObject.SetActive(false);
                m_PreviewPropretys[i].gameObject.SetActive(false);
            }
            switch (specialData.type)
            switch (special.type)
            {
                case TreasurePrivilege.Property:
                    var _index = 0;
                    m_ContainerPreview.gameObject.SetActive(true);
                    foreach (var _key in specialData.propertyDict.Keys)
                    foreach (var _key in special.propertyDict.Keys)
                    {
                        var _value = specialData.propertyDict[_key];
                        propertys[_index].gameObject.SetActive(true);
                        propertys[_index].DisplayUpper(_key, _value);
                        var _value = special.propertyDict[_key];
                        m_PreviewPropretys[_index].gameObject.SetActive(true);
                        m_PreviewPropretys[_index].DisplayUpper(_key, _value);
                        _index++;
                    }
                    break;
                case TreasurePrivilege.Suit:
                    var percentSuit = (float)specialData.propertyDict[87] / 10000;
                    var percentSuit = (float)special.propertyDict[87] / 10000;
                    var dict = suitModel.GetActiveSuitAttr();
                    var _suitIndex = 0;
                    foreach (var _key in dict.Keys)
@@ -319,14 +353,14 @@
                        {
                            continue;
                        }
                        propertys[_suitIndex].gameObject.SetActive(true);
                        propertys[_suitIndex].DisplayUpper(_key, (int)(percentSuit * dict[_key]));
                        m_PreviewPropretys[_suitIndex].gameObject.SetActive(true);
                        m_PreviewPropretys[_suitIndex].DisplayUpper(_key, (int)(percentSuit * dict[_key]));
                        _suitIndex++;
                    }
                    m_ContainerPreview.gameObject.SetActive(_suitIndex > 0);
                    break;
                case TreasurePrivilege.Wing:
                    var percentWing = (float)specialData.propertyDict[86] / 10000;
                    var percentWing = (float)special.propertyDict[86] / 10000;
                    var itemModel = pack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retWing);
                    m_ContainerPreview.gameObject.SetActive(itemModel != null);
                    if (itemModel != null)
@@ -340,26 +374,26 @@
                                value += strengthengmodel.BackpackWings(itemModel.itemId, itemModel.GetUseDataModel(42)[0])[1];
                            }
                        }
                        propertys[0].gameObject.SetActive(true);
                        propertys[0].Display(6, (int)(value * percentWing));
                        m_PreviewPropretys[0].gameObject.SetActive(true);
                        m_PreviewPropretys[0].Display(6, (int)(value * percentWing));
                    }
                    break;
                case TreasurePrivilege.DemonJarAtk:
                case TreasurePrivilege.PetHp:
                case TreasurePrivilege.MountAtk:
                case TreasurePrivilege.Boss:
                case TreasurePrivilege.Sp:
                    var index = 0;
                    m_ContainerPreview.gameObject.SetActive(true);
                    foreach (var _key in specialData.propertyDict.Keys)
                    foreach (var _key in special.propertyDict.Keys)
                    {
                        var _value = specialData.propertyDict[_key] * (specialData.presentGetCount / specialData.progress);
                        var _value = special.propertyDict[_key] * (special.presentGetCount / special.progress);
                        if (_value <= 0)
                        {
                            m_ContainerPreview.gameObject.SetActive(false);
                            break;
                        }
                        propertys[index].gameObject.SetActive(true);
                        propertys[index].DisplayUpper(_key, _value);
                        m_PreviewPropretys[index].gameObject.SetActive(true);
                        m_PreviewPropretys[index].DisplayUpper(_key, _value);
                        index++;
                    }
                    break;
@@ -388,12 +422,12 @@
                    if (present >= 0)
                    {
                        var config = configs[present];
                        for (int i = 0; i < propertys.Count; i++)
                        for (int i = 0; i < m_PreviewPropretys.Count; i++)
                        {
                            propertys[i].gameObject.SetActive(i < config.attType.Length);
                            m_PreviewPropretys[i].gameObject.SetActive(i < config.attType.Length);
                            if (i < config.attType.Length)
                            {
                                propertys[i].DisplayUpper(config.attType[i], config.attValue[i]);
                                m_PreviewPropretys[i].DisplayUpper(config.attType[i], config.attValue[i]);
                            }
                        }
                    }
@@ -401,31 +435,45 @@
            }
        }
        private void DisplayCondition()
        {
            m_ContainerCondition.gameObject.SetActive(true);
            List<int> list;
            model.TryGetAchievements(model.selectSoul, out list);
            m_ConditonControl.Refresh();
            if (list != null)
            {
                for (int i = 0; i < list.Count; i++)
                {
                    var config = ConfigManager.Instance.GetTemplate<SuccessConfig>(list[i]);
                    if (config != null && config.Type == 50)
                    {
                        continue;
                    }
                    m_ConditonControl.AddCell(ScrollerDataType.Header, list[i]);
                }
            }
            m_ConditonControl.Restart();
        }
        private void OnRefreshConditionCell(ScrollerDataType type, CellView cell)
        {
            var _cell = cell as TreasureSoulAchievementCell;
            _cell.Display(cell.index);
        }
        int Compare(int x, int y)
        {
            //Treasure treasure_x;
            //Treasure treasure_y;
            //if (model.TryGetTreasure(x, out treasure_x) && model.TryGetTreasure(y, out treasure_y))
            //{
            //    var stage_x = treasure_x.treasureStages[treasure_x.StageCount - 1];
            //    var stage_y = treasure_y.treasureStages[treasure_y.StageCount - 1];
            //    bool awaking_x = PlayerDatas.Instance.baseData.LV >= stage_x.limitLevel && !treasure_x.IsMaxStage();
            //    bool awaking_y = PlayerDatas.Instance.baseData.LV >= stage_y.limitLevel && !treasure_y.IsMaxStage();
            //    if (awaking_x != awaking_y)
            //    {
            //        return -awaking_x.CompareTo(awaking_y);
            //    }
            //    bool awoke_x = treasure_x.IsMaxStage();
            //    bool awoke_y = treasure_y.IsMaxStage();
            //    if (awoke_x != awoke_y)
            //    {
            //        return -awoke_x.CompareTo(awoke_y);
            //    }
            //}
            TreasureSpecialData special_x;
            TreasureSpecialData special_y;
            if (model.TryGetTreasureSoul(x, out special_x) && model.TryGetTreasureSoul(y, out special_y))
            {
                return special_x.treasureId.CompareTo(special_y.treasureId);
            }
            return x.CompareTo(y);
        }
        public bool ContainsProperty(ItemConfig config, int _property, out float value)
        bool ContainsProperty(ItemConfig config, int _property, out float value)
        {
            value = 0;
            if (config.Effect1 == _property && config.EffectValueA1 > 0)
System/Treasure/TreasureStageTipWin.cs
@@ -26,8 +26,6 @@
        [SerializeField] Image m_Icon;
        [SerializeField] Text m_StageName;
        [SerializeField] Text m_Description;
        [SerializeField] RectTransform m_ContainerSpecial;
        [SerializeField] List<Text> m_TreasurePrivileges;
        TreasureModel m_Model;
        TreasureModel model
@@ -98,7 +96,6 @@
            m_ContainerSkill.gameObject.SetActive(false);
            m_ContainerFuncSoul.gameObject.SetActive(false);
            m_ContainerSpecial.gameObject.SetActive(false);
            switch (m_TreasureStage.unlockType)
            {
@@ -131,44 +128,12 @@
                        m_Description.text = string.Empty;
                    }
                    break;
                case TreasureStageUnlock.Privilege:
                case TreasureStageUnlock.Treasure:
                    m_ContainerFuncSoul.gameObject.SetActive(true);
                    m_ContainerSpecial.gameObject.SetActive(true);
                    var privilegeConfig = ConfigManager.Instance.GetTemplate<TreasurePrivilegeConfig>(m_TreasureStage.privilege);
                    m_Icon.SetSprite(privilegeConfig.Icon);
                    m_StageName.text = privilegeConfig.Name;
                    m_Description.text = UIHelper.ReplaceNewLine(privilegeConfig.Description);
                    DisplayTreasureSpecial();
                    break;
            }
        }
        void DisplayTreasureSpecial()
        {
            m_TreasurePrivileges[0].gameObject.SetActive(false);
            m_TreasurePrivileges[1].gameObject.SetActive(false);
            switch (m_Treasure.specialData.type)
            {
                case TreasurePrivilege.Sign:
                case TreasurePrivilege.Property:
                    break;
                case TreasurePrivilege.DemonJarAtk:
                    break;
                case TreasurePrivilege.StrengthenAdd:
                    break;
                case TreasurePrivilege.Suit:
                case TreasurePrivilege.RuneBreakExpAdd:
                case TreasurePrivilege.Boss:
                    m_TreasurePrivileges[0].gameObject.SetActive(false);
                    m_TreasurePrivileges[1].gameObject.SetActive(false);
                    break;
                case TreasurePrivilege.MountAtk:
                    break;
                case TreasurePrivilege.PetHp:
                    break;
                case TreasurePrivilege.Wing:
                    break;
                case TreasurePrivilege.Wash:
                    var treasureConfig = ConfigManager.Instance.GetTemplate<TreasureConfig>(m_TreasureStage.treasure);
                    m_Icon.SetSprite(treasureConfig.Icon);
                    m_StageName.text = treasureConfig.Name;
                    m_Description.text = UIHelper.ReplaceNewLine(treasureConfig.Verse.Length > 0 ? treasureConfig.Verse[0] : string.Empty);
                    break;
            }
        }
System/Treasure/TreasureUnlockCell.cs
New file
@@ -0,0 +1,88 @@
using System.Collections;
using System.Collections.Generic;
using TableConfig;
using UnityEngine;
using UnityEngine.UI;
namespace Snxxz.UI
{
    public class TreasureUnlockCell : CellView
    {
        [SerializeField] Image m_Icon;
        [SerializeField] Text m_Func;
        [SerializeField] Image m_Cutline;
        [SerializeField] Button m_Button;
        TreasureModel model { get { return ModelCenter.Instance.GetModel<TreasureModel>(); } }
        public void Display(int id, int stage)
        {
            m_Button.RemoveAllListeners();
            Treasure treasure;
            if (model.TryGetTreasure(id, out treasure))
            {
                var treasureStage = treasure.treasureStages.Find((x) =>
                {
                    return x.stage == stage;
                });
                bool last = true;
                for (int i = 0; i < treasure.treasureStages.Count; i++)
                {
                    var _stage = treasure.treasureStages[i];
                    if (stage < _stage.stage &&
                        (_stage.unlockType == TreasureStageUnlock.Func || _stage.unlockType == TreasureStageUnlock.Skill
                        || _stage.unlockType == TreasureStageUnlock.Treasure))
                    {
                        last = false;
                        break;
                    }
                }
                m_Cutline.gameObject.SetActive(!last);
                if (treasureStage != null)
                {
                    switch (treasureStage.unlockType)
                    {
                        case TreasureStageUnlock.Skill:
                            var skillConfig = ConfigManager.Instance.GetTemplate<SkillConfig>(treasureStage.GetSkill(PlayerDatas.Instance.baseData.Job));
                            if (skillConfig != null)
                            {
                                m_Icon.SetSprite(skillConfig.IconName);
                                m_Func.text = Language.Get("TreasureUnlockNewSkill");
                            }
                            break;
                        case TreasureStageUnlock.Func:
                            var funcConfig = ConfigManager.Instance.GetTemplate<FuncOpenLVConfig>(treasureStage.func);
                            if (funcConfig != null)
                            {
                                m_Icon.SetSprite(funcConfig.Icon);
                                m_Func.text = Language.Get("TreasureUnlockNewFunc");
                            }
                            break;
                        case TreasureStageUnlock.Treasure:
                            var treasureConfig = ConfigManager.Instance.GetTemplate<TreasureConfig>(treasureStage.treasure);
                            if (treasureConfig != null)
                            {
                                m_Icon.SetSprite(treasureConfig.Icon);
                                m_Func.text = Language.Get("TreasureUnlockNewTreasure");
                            }
                            break;
                    }
                    m_Button.AddListener(() =>
                    {
                        if (model.treasureStepUpShow)
                        {
                            return;
                        }
                        model.selectedStage = treasureStage.stage;
                        if (!WindowCenter.Instance.CheckOpen<TreasureStageTipWin>())
                        {
                            TreasureStageTipWin.SetTargetPosition(m_Button.transform as RectTransform);
                            WindowCenter.Instance.Open<TreasureStageTipWin>();
                        }
                    });
                }
            }
        }
    }
}
System/Treasure/TreasureUnlockCell.cs.meta
copy from System/Treasure/FairyTreasureCollectPanelPattern1.cs.meta copy to System/Treasure/TreasureUnlockCell.cs.meta
File was copied from System/Treasure/FairyTreasureCollectPanelPattern1.cs.meta
@@ -1,6 +1,6 @@
fileFormatVersion: 2
guid: f4d29363b41f2a740834a1aabf805009
timeCreated: 1521102270
guid: 77f99fdc05a9d774ab1f11302d406df8
timeCreated: 1534492640
licenseType: Pro
MonoImporter:
  serializedVersion: 2
System/WindowBase/ModelCenter.cs
@@ -188,6 +188,8 @@
            RegisterModel<ActivitiesPushMgr>();
            RegisterModel<MultipleRealmPointModel>();
            RegisterModel<DogzDungeonModel>();
            RegisterModel<DogzModel>();
            RegisterModel<TreasureSoulModel>();
            inited = true;
        }
System/WindowJump/WindowJumpMgr.cs
@@ -685,7 +685,7 @@
                var soulId = 0;
                if (int.TryParse(_tagWinSearchModel.SelectActive, out soulId))
                {
                    ModelCenter.Instance.GetModel<TreasureModel>().gotoSoul = soulId;
                    ModelCenter.Instance.GetModel<TreasureSoulModel>().gotoSoul = soulId;
                }
                SetJumpLogic<TreasureSoulWin>(_tagWinSearchModel.TABID);
                break;
UI/Common/SortTable.cs
@@ -28,6 +28,7 @@
        public event Action<int> onSelectSortEvent;
        public event Action onSortCloseEvent;
        DogzModel dogzModel { get { return ModelCenter.Instance.GetModel<DogzModel>(); } }
        private void Awake()
        {
            m_Controller.OnRefreshCell += OnRefreshCell;
@@ -60,9 +61,20 @@
        private void OnSortSelect(CellView _cell)
        {
            var _index = _cell.index;
            var type = m_SortElements[_index].type;
            switch (sortType)
            {
                case SortType.EquipQuality:
                    dogzModel.SelectDogzItemQuality = type;
                    break;
                case SortType.EquipStar:
                    dogzModel.SelectDogzItemStart = type;
                    break;
            }
            if (onSelectSortEvent != null)
            {
                onSelectSortEvent(m_SortElements[_index].type);
                onSelectSortEvent(type);
            }
            if (onSortCloseEvent != null)
            {