少年修仙传客户端代码仓库
client_Zxw
2018-12-06 d10eb06e8d935a453ad85dc359eab2d8401b2ba9
Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
29个文件已修改
6个文件已添加
1438 ■■■■ 已修改文件
Core/GameEngine/Model/Config/TreasureUpConfig.cs 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/Model/Config/TreasureUpConfig.cs.meta 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/DTCFile/ServerPack/H04_Scene/DTC0405_tagPlayerDisappear.cs 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/DTCFile/ServerPack/H04_Scene/DTC0434_tagAreaPlayerAppearEx.cs 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/ServerPack/HB2_ActionMap/HB208_tagMCAddXianyuanCoinMsg.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/ResModule/GameObjectPoolManager.cs 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/ResModule/InstanceResourcesLoader.cs 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/GameActor/BattleEffectPlayRule.cs 131 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/GameActor/GAMgr.cs 68 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/GameActor/GA_Pet.cs 21 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/GameActor/GA_Player.cs 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/GameActor/GActorNpcFight.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/GameActor/GActorPlayerBase.cs 89 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Lua/Gen/BattleEffectPlayRuleWrap.cs 140 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Lua/Gen/BattleEffectPlayRuleWrap.cs.meta 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Dungeon/DungeonAssistModel.cs 195 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Dungeon/DungeonData.cs 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Dungeon/DungeonModel.cs 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Dungeon/TrialDungeonEntranceWin.cs 99 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Dungeon/TrialDungeonModel.cs 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Dungeon/TrialSweepAssistPlayerBehaviour.cs 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Dungeon/TrialSweepAssistPlayerBehaviour.cs.meta 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Dungeon/TrialSweepResultWin.cs 341 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Dungeon/TrialSweepResultWin.cs.meta 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/FairyAu/FairyLeagueModel.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/GeneralConfig/GeneralDefine.cs 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/KnapSack/Logic/EquipTip.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/KnapSack/Logic/ItemTipsModel.cs 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/KnapSack/Logic/UnionWarehouseEquipTip.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Rank/RankPanel.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Rune/RuneModel.cs 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Treasure/TreasureData.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Treasure/TreasureModel.cs 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI/Core/DebugCanvasAddition.cs 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI/Core/DebugCanvasAddition.cs.meta 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/Model/Config/TreasureUpConfig.cs
@@ -1,6 +1,6 @@
//--------------------------------------------------------
//    [Author]:            第二世界
//    [  Date ]:           Tuesday, September 18, 2018
//    [  Date ]:           Wednesday, December 05, 2018
//--------------------------------------------------------
using UnityEngine;
@@ -21,6 +21,7 @@
        public int ActiveMWID { get ; private set ; }
        public string ItemAward { get ; private set; } 
        public int SoulID { get ; private set ; }
        public int PowerEx { get ; private set ; }
        public string DescriptionMainWin { get ; private set; } 
        public override string getKey()
@@ -56,7 +57,9 @@
            
                SoulID=IsNumeric(rawContents[9]) ? int.Parse(rawContents[9]):0; 
            
                DescriptionMainWin = rawContents[10].Trim();
                PowerEx=IsNumeric(rawContents[10]) ? int.Parse(rawContents[10]):0;
                DescriptionMainWin = rawContents[11].Trim();
            }
            catch (Exception ex)
            {
Core/GameEngine/Model/Config/TreasureUpConfig.cs.meta
@@ -1,6 +1,6 @@
fileFormatVersion: 2
guid: 882666fd713678849aebb360643bfe19
timeCreated: 1537237919
timeCreated: 1544000085
licenseType: Pro
MonoImporter:
  serializedVersion: 2
Core/NetworkPackage/DTCFile/ServerPack/H04_Scene/DTC0405_tagPlayerDisappear.cs
@@ -24,10 +24,7 @@
        for (int i = 0; i < vNetData.Players.Length; ++i)
        {
            if (BattleEffectPlayRule.Instance.sortPlayerList.Contains(vNetData.Players[i]))
            {
                BattleEffectPlayRule.Instance.sortPlayerList.Remove(vNetData.Players[i]);
            }
            BattleEffectPlayRule.Instance.RemovePlayer(vNetData.Players[i]);
            _actor = GAMgr.Instance.GetBySID(vNetData.Players[i]);
Core/NetworkPackage/DTCFile/ServerPack/H04_Scene/DTC0434_tagAreaPlayerAppearEx.cs
@@ -25,10 +25,7 @@
            // 异常
        }
        if (!BattleEffectPlayRule.Instance.sortPlayerList.Contains(vNetData.PlayerID))
        {
            BattleEffectPlayRule.Instance.sortPlayerList.Add(vNetData.PlayerID);
        }
        BattleEffectPlayRule.Instance.AddPlayer(vNetData.PlayerID);
        // 离线玩家
        if (vNetData.State == 1)
Core/NetworkPackage/ServerPack/HB2_ActionMap/HB208_tagMCAddXianyuanCoinMsg.cs
@@ -13,6 +13,7 @@
    public uint CallPlayerID;    // 助战的玩家ID,有值时代表真实助战,没有值时为自己打的
    public byte NameLen;
    public string CallPlayerName;    // 助战的玩家名,size = NameLen
    public byte IsSweep;    // 是否扫荡
    public HB208_tagMCAddXianyuanCoinMsg () {
        _cmd = (ushort)0xB208;
@@ -28,6 +29,7 @@
        TransBytes (out CallPlayerID, vBytes, NetDataType.DWORD);
        TransBytes (out NameLen, vBytes, NetDataType.BYTE);
        TransBytes (out CallPlayerName, vBytes, NetDataType.Chars, NameLen);
        TransBytes (out IsSweep, vBytes, NetDataType.BYTE);
    }
}
Core/ResModule/GameObjectPoolManager.cs
@@ -146,6 +146,37 @@
        return RequestPool(prefab).Request();
    }
    public GameObject RequestEmptyJY()
    {
        var _prefab = InstanceResourcesLoader.LoadEmptyJY();
        if (!_prefab)
        {
            return null;
        }
        var _pool = RequestPool(_prefab);
        _pool.assetName = InstanceResourcesLoader.emptyJyName;
        _pool.assetBundleName = "mob/prefab_race_jy";
        return _pool.Request();
    }
    public void ReleaseEmptyJY(GameObject go)
    {
        var _prefab = InstanceResourcesLoader.LoadEmptyJY();
        if (!_prefab)
        {
            return;
        }
        GameObjectPool _pool = RequestPool(_prefab);
        if (_pool != null)
        {
            _pool.Release(go);
        }
    }
    public GameObject RequestDefaultPet()
    {
        GameObject _prefab = InstanceResourcesLoader.LoadMob(GeneralDefine.ModeDefaultConfig[2][0],
Core/ResModule/InstanceResourcesLoader.cs
@@ -13,6 +13,35 @@
    public static readonly string secondarySuffix = "Prefab_Secondary_";
    public static readonly string handSuffix = "Prefab_Hand_";
    public static readonly string wingSuffix = "Prefab_Wing_";
    public static readonly string emptyJyName = "Prefab_Race_JY";
    public static GameObject LoadEmptyJY()
    {
        GameObject _prefab = null;
        if (AssetSource.mobFromEditor)
        {
#if UNITY_EDITOR
            string _resourcePath = StringUtility.Contact(ResourcesPath.ResourcesOutAssetPath,
                                                        "Mob/",
                                                        emptyJyName,
                                                        ".prefab");
            _prefab = AssetDatabase.LoadAssetAtPath<GameObject>(_resourcePath);
#endif
        }
        else
        {
            _prefab = AssetBundleUtility.Instance.Sync_LoadAsset("mob/prefab_race_jy", emptyJyName) as GameObject;
        }
        if (_prefab == null)
        {
            DebugEx.LogErrorFormat("InstanceResourcesLoader.LoadModel() => 加载不到资源: {0}/{1} ", "mob/prefab_race_jy", emptyJyName);
        }
        return _prefab;
    }
    public static GameObject LoadNpc(int id)
    {
Fight/GameActor/BattleEffectPlayRule.cs
@@ -3,9 +3,27 @@
[XLua.LuaCallCSharp]
public class BattleEffectPlayRule : Singleton<BattleEffectPlayRule>
{
    public List<uint> sortPlayerList = new List<uint>();
    public readonly List<uint> sortPlayerList = new List<uint>();
    public void AddPlayer(uint id)
    {
        if (sortPlayerList.Contains(id))
        {
            return;
        }
        sortPlayerList.Add(id);
        SortList();
    }
    public void RemovePlayer(uint id)
    {
        if (sortPlayerList.Contains(id))
        {
            sortPlayerList.Remove(id);
        }
        SortList();
    }
    private int limit
    {
@@ -13,54 +31,101 @@
        {
            if (SystemSetting.Instance.GetCurrentQualityLevel() == GameQuality.High)
            {
                return GeneralDefine.highQualityCount;
                return GeneralDefine.highQualityEffectCount;
            }
            else if (SystemSetting.Instance.GetCurrentQualityLevel() == GameQuality.Medium)
            {
                return GeneralDefine.medQualityCount;
                return GeneralDefine.medQualityEffectCount;
            }
            else
            {
                return GeneralDefine.lowQualityCount;
                return GeneralDefine.lowQualityEffectCount;
            }
        }
    }
    public int petLimit
    {
        get
        {
            if (SystemSetting.Instance.GetCurrentQualityLevel() == GameQuality.High)
            {
                return GeneralDefine.highQualityPetCount;
            }
            else if (SystemSetting.Instance.GetCurrentQualityLevel() == GameQuality.Medium)
            {
                return GeneralDefine.medQualityPetCount;
            }
            else
            {
                return GeneralDefine.lowQualityPetCount;
            }
        }
    }
    public int guardLimit
    {
        get
        {
            if (SystemSetting.Instance.GetCurrentQualityLevel() == GameQuality.High)
            {
                return GeneralDefine.highQualityGuardCount;
            }
            else if (SystemSetting.Instance.GetCurrentQualityLevel() == GameQuality.Medium)
            {
                return GeneralDefine.medQualityGuardCount;
            }
            else
            {
                return GeneralDefine.lowQualityGuardCount;
            }
        }
    }
    public float timeEscape;
    private void SortList()
    {
        GA_Hero _hero = PlayerDatas.Instance.hero;
        if (_hero == null)
        {
            return;
        }
        sortPlayerList.Sort((id1, id2) =>
                    {
                        GActor _actor1 = GAMgr.Instance.GetBySID(id1);
                        GActor _actor2 = GAMgr.Instance.GetBySID(id2);
                        float _dis1 = 0f;
                        float _dis2 = 0f;
                        if (_actor1 != null)
                        {
                            _dis1 = MathUtility.DistanceSqrtXZ(_hero.Pos, _actor1.Pos);
                        }
                        if (_actor2 != null)
                        {
                            _dis2 = MathUtility.DistanceSqrtXZ(_hero.Pos, _actor2.Pos);
                        }
                        return _dis2 > _dis1 ? -1 : 1;
                    });
    }
    public void Update()
    {
        if (Time.realtimeSinceStartup - timeEscape > .5f)
        {
            GA_Hero _hero = PlayerDatas.Instance.hero;
            if (_hero == null)
            {
                return;
            }
            sortPlayerList.Sort((id1, id2) =>
            {
                GActor _actor1 = GAMgr.Instance.GetBySID(id1);
                GActor _actor2 = GAMgr.Instance.GetBySID(id2);
                float _dis1 = 0f;
                float _dis2 = 0f;
                if (_actor1 != null)
                {
                    _dis1 = MathUtility.DistanceSqrtXZ(_hero.Pos, _actor1.Pos);
                }
                if (_actor2 != null)
                {
                    _dis2 = MathUtility.DistanceSqrtXZ(_hero.Pos, _actor2.Pos);
                }
                return _dis2 > _dis1 ? -1 : 1;
            });
            SortList();
            timeEscape = Time.realtimeSinceStartup;
        }
    }
    public int GetIndex(uint sid)
    {
        return sortPlayerList.IndexOf(sid);
    }
    public bool CanPlay(uint sid)
@@ -71,7 +136,7 @@
            return false;
        }
        if(_hero.ServerInstID == sid)
        if (_hero.ServerInstID == sid)
        {
            return true;
        }
Fight/GameActor/GAMgr.cs
@@ -96,6 +96,74 @@
            SystemSetting.Instance.playerSyncCountChangeEvent += OnPlayerSyncCountChange;
            SystemSetting.Instance.OnSettingChanged += OnSettingChanged;
            SystemSetting.Instance.qualityLevelChangeEvent += OnQualityLevelChange;
        }
    }
    private void OnQualityLevelChange()
    {
        List<GActor> _list = GetTypeList(E_ActorClassType.Pet);
        if (_list == null || _list.Count == 0)
        {
            return;
        }
        //Debug.LogFormat("共有: {0} 只宠物", _petList.Count);
        GA_Player _player = null;
        foreach (var _pet in _list)
        {
            var _parentID = _pet.ActorInfo.ownerSID;
            if (_parentID == PlayerDatas.Instance.PlayerId)
            {
                continue;
            }
            _player = GetBySID(_parentID) as GA_Player;
            if (_player == null || !_player.ShowOrHide)
            {
                _pet.ShowOrHideModel(false);
                //Debug.LogFormat("宠物: {0} 的拥有者: {1} 不可见, 这里隐藏.", _pet.ServerInstID, _parentID);
                continue;
            }
            var _index = BattleEffectPlayRule.Instance.GetIndex(_parentID);
            if (_index != -1 && _index < BattleEffectPlayRule.Instance.petLimit)
            {
                _pet.ShowOrHideModel(true);
                //Debug.LogFormat("宠物: {0} 的拥有者: {1} 在列表中且位于: {2}, 小于限制数量: {3}", _pet.ServerInstID, _parentID, _index, BattleEffectPlayRule.Instance.petLimit);
            }
            else
            {
                _pet.ShowOrHideModel(false);
                //Debug.LogFormat("宠物: {0} 的拥有者: {1} 在列表中且位于: {2}, 大于限制数量: {3}", _pet.ServerInstID, _parentID, _index, BattleEffectPlayRule.Instance.petLimit);
            }
        }
        _list = GetTypeList(E_ActorClassType.Player);
        //Debug.LogFormat("共有: {0} 只守护", _list.Count);
        foreach (var _chkPlayer in _list)
        {
            _player = _chkPlayer as GA_Player;
            if (_chkPlayer == null || !_chkPlayer.ShowOrHide)
            {
                _player.SwitchGuard(0);
                //Debug.LogFormat("_list: {0} 的拥有者: {1} 不可见, 这里隐藏.", _chkPlayer.ServerInstID, _player.ServerInstID);
                continue;
            }
            var _index = BattleEffectPlayRule.Instance.GetIndex(_player.ServerInstID);
            if (_index != -1 && _index < BattleEffectPlayRule.Instance.petLimit)
            {
                _player.SwitchGuard((uint)_player.serverGuardId);
                //Debug.LogFormat("_list: {0} 的拥有者: {1} 在列表中且位于: {2}, 小于限制数量: {3}", _chkPlayer.ServerInstID, _player.ServerInstID, _index, BattleEffectPlayRule.Instance.petLimit);
            }
            else
            {
                _player.SwitchGuard(0);
                //Debug.LogFormat("_list: {0} 的拥有者: {1} 在列表中且位于: {2}, 大于限制数量: {3}", _chkPlayer.ServerInstID, _player.ServerInstID, _index, BattleEffectPlayRule.Instance.petLimit);
            }
        }
    }
Fight/GameActor/GA_Pet.cs
@@ -39,13 +39,28 @@
        if (_parentSID != PlayerDatas.Instance.PlayerId)
        {
            GA_Player _player = GAMgr.Instance.GetBySID(_parentSID) as GA_Player;
            if (_player != null)
            bool _showOrHide = true;
            int _index = -999;
            if (_player == null)
            {
                if (!_player.ShowOrHide)
                _showOrHide = false;
            }
            else
            {
                _showOrHide = _player.ShowOrHide;
                if (_showOrHide)
                {
                    ShowOrHideModel(false);
                    _index = BattleEffectPlayRule.Instance.GetIndex(_parentSID);
                    _showOrHide = _index != -1 && _index < BattleEffectPlayRule.Instance.petLimit;
                }
            }
            if (!_showOrHide)
            {
                ShowOrHideModel(_showOrHide);
            }
        }
    }
Fight/GameActor/GA_Player.cs
@@ -110,7 +110,11 @@
            }
            else if (_equipInfo.Place == (int)RoleEquipType.retSpiritAnimal)
            {
                SwitchGuard(_equipInfo.ItemID);
                var _index = BattleEffectPlayRule.Instance.GetIndex(ServerInstID);
                if (_index != -1 && _index < BattleEffectPlayRule.Instance.petLimit)
                {
                    SwitchGuard(_equipInfo.ItemID);
                }
                serverGuardId = (int)_equipInfo.ItemID;
            }
            else if (_equipInfo.Place == (int)RoleEquipType.mount)
@@ -185,9 +189,9 @@
    public override void ChangeEquip(EquipInfo equipInfo)
    {
        // 传入ID为0代表脱下了装备
        if(equipInfo.itemID == 0 && equipInfo.place != 0)
        if (equipInfo.itemID == 0 && equipInfo.place != 0)
        {
            if(m_EquipDict.ContainsKey(equipInfo.place))
            if (m_EquipDict.ContainsKey(equipInfo.place))
            {
                m_EquipDict.Remove(equipInfo.place);
            }
Fight/GameActor/GActorNpcFight.cs
@@ -566,7 +566,7 @@
        m_Model.transform.localScale = Vector3.one;
        GA_Hero _hero = PlayerDatas.Instance.hero;
        if(_hero.SelectTarget == this)
        if (_hero.SelectTarget == this)
        {
            RequestName();
            RequestLifeBar();
@@ -617,17 +617,17 @@
        }
        else
        {
            if (MP_Name != m_Model.transform)
            if (MP_Name && MP_Name != m_Model.transform)
            {
                MP_Name.SetParent(Root);
            }
            if (MP_Hit != m_Model.transform)
            if (MP_Hit && MP_Hit != m_Model.transform)
            {
                MP_Hit.SetParent(Root);
            }
            if (MP_Stun != m_Model.transform)
            if (MP_Stun && MP_Stun != m_Model.transform)
            {
                MP_Stun.SetParent(Root);
            }
Fight/GameActor/GActorPlayerBase.cs
@@ -7,6 +7,7 @@
public abstract class GActorPlayerBase : GActorFight
{
    private GameObject m_EmptyJY;
    public static UnityAction<bool> onShowEffect;
    private bool m_LoadDefaultHorse;
    public struct EquipInfo
@@ -1096,6 +1097,7 @@
            if (ShowOrHide)
            {
                m_Guard = GAMgr.Instance.RequestNpcNoFight<GA_Guard>(ServerInstID * 100 + 1, (uint)config.npcId, Group, null);
                m_Guard.ActorInfo.ownerSID = ServerInstID;
                m_Guard.itemID = (int)guardID;
                m_Guard.InitBase();
                m_Guard.IsStateActive = true;
@@ -2011,6 +2013,21 @@
    }
    public sealed override void ReleaseShadow()
    {
        if (m_ShadowCaster != null)
        {
            m_ShadowCaster.Stop();
            m_ShadowCaster = null;
        }
        if (m_Shadow)
        {
            SFXPlayUtility.Instance.Release(m_Shadow);
            m_Shadow = null;
        }
    }
    public sealed override void RequestLifeBar()
    {
        // 此类型, 不做处理
@@ -2032,21 +2049,6 @@
            m_HeadUpName.target = null;
            HeadUpName.Recycle(m_HeadUpName);
            m_HeadUpName = null;
        }
    }
    public sealed override void ReleaseShadow()
    {
        if (m_ShadowCaster != null)
        {
            m_ShadowCaster.Stop();
            m_ShadowCaster = null;
        }
        if (m_Shadow)
        {
            SFXPlayUtility.Instance.Release(m_Shadow);
            m_Shadow = null;
        }
    }
@@ -2133,27 +2135,58 @@
            ReleaseShadow();
        }
        GA_Pet _pet = GAMgr.Instance.GetBySID(ServerInstID * 10 + 1) as GA_Pet;
        if (_pet != null)
        GA_Player _player = this as GA_Player;
        if (_player != null)
        {
            _pet.ShowOrHideModel(showOrHide);
        }
        ShowOrHide = showOrHide;
        if (this is GA_Player)
        {
            var _player = this as GA_Player;
            if (ShowOrHide)
            if (m_EmptyJY)
            {
                if (_player.serverGuardId != 0)
                GameObjectPoolManager.Instance.ReleaseEmptyJY(m_EmptyJY);
                m_EmptyJY = null;
            }
            if (!showOrHide)
            {
                m_EmptyJY = GameObjectPoolManager.Instance.RequestEmptyJY();
                m_EmptyJY.transform.SetParent(Root);
                m_EmptyJY.transform.localPosition = Vector3.zero;
                m_EmptyJY.transform.localScale = Vector3.one;
                m_EmptyJY.AddMissingComponent<FacingMainCamera>();
                m_Shadow = SFXPlayUtility.Instance.PlayBattleEffect(999999, m_Root);
                m_Shadow.duration = 0;
                m_Shadow.transform.localScale = new Vector3(1 / Root.transform.localScale.x, 1, 1 / Root.transform.localScale.z);
            }
            GA_Pet _pet = GAMgr.Instance.GetBySID(ServerInstID * 10 + 1) as GA_Pet;
            var _index = BattleEffectPlayRule.Instance.GetIndex(ServerInstID);
            if (_index != -1 && _index < BattleEffectPlayRule.Instance.petLimit)
            {
                if (_pet != null)
                {
                    _pet.ShowOrHideModel(true);
                }
                if (m_Guard == null)
                {
                    SwitchGuard((uint)_player.serverGuardId);
                }
            }
            else
            {
                if (_pet != null)
                {
                    _pet.ShowOrHideModel(false);
                }
                if (m_Guard != null)
                {
                    SwitchGuard(0);
                }
            }
        }
        ShowOrHide = showOrHide;
    }
    /// <summary>
Lua/Gen/BattleEffectPlayRuleWrap.cs
@@ -21,17 +21,21 @@
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            System.Type type = typeof(BattleEffectPlayRule);
            Utils.BeginObjectRegister(type, L, translator, 0, 2, 2, 2);
            Utils.BeginObjectRegister(type, L, translator, 0, 5, 4, 1);
            
            Utils.RegisterFunc(L, Utils.METHOD_IDX, "AddPlayer", _m_AddPlayer);
            Utils.RegisterFunc(L, Utils.METHOD_IDX, "RemovePlayer", _m_RemovePlayer);
            Utils.RegisterFunc(L, Utils.METHOD_IDX, "Update", _m_Update);
            Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetIndex", _m_GetIndex);
            Utils.RegisterFunc(L, Utils.METHOD_IDX, "CanPlay", _m_CanPlay);
            
            
            Utils.RegisterFunc(L, Utils.GETTER_IDX, "sortPlayerList", _g_get_sortPlayerList);
            Utils.RegisterFunc(L, Utils.GETTER_IDX, "petLimit", _g_get_petLimit);
            Utils.RegisterFunc(L, Utils.GETTER_IDX, "guardLimit", _g_get_guardLimit);
            Utils.RegisterFunc(L, Utils.GETTER_IDX, "sortPlayerList", _g_get_sortPlayerList);
            Utils.RegisterFunc(L, Utils.GETTER_IDX, "timeEscape", _g_get_timeEscape);
            
            Utils.RegisterFunc(L, Utils.SETTER_IDX, "sortPlayerList", _s_set_sortPlayerList);
            Utils.RegisterFunc(L, Utils.SETTER_IDX, "timeEscape", _s_set_timeEscape);
            Utils.RegisterFunc(L, Utils.SETTER_IDX, "timeEscape", _s_set_timeEscape);
            
            
            Utils.EndObjectRegister(type, L, translator, null, null,
@@ -78,6 +82,62 @@
        
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_AddPlayer(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
                BattleEffectPlayRule gen_to_be_invoked = (BattleEffectPlayRule)translator.FastGetCSObj(L, 1);
                {
                    uint _id = LuaAPI.xlua_touint(L, 2);
                    gen_to_be_invoked.AddPlayer( _id );
                    return 0;
                }
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
            }
        }
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_RemovePlayer(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
                BattleEffectPlayRule gen_to_be_invoked = (BattleEffectPlayRule)translator.FastGetCSObj(L, 1);
                {
                    uint _id = LuaAPI.xlua_touint(L, 2);
                    gen_to_be_invoked.RemovePlayer( _id );
                    return 0;
                }
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
            }
        }
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_Update(RealStatePtr L)
        {
            try {
@@ -96,6 +156,35 @@
                    
                    
                    return 0;
                }
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
            }
        }
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_GetIndex(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
                BattleEffectPlayRule gen_to_be_invoked = (BattleEffectPlayRule)translator.FastGetCSObj(L, 1);
                {
                    uint _sid = LuaAPI.xlua_touint(L, 2);
                        int gen_ret = gen_to_be_invoked.GetIndex( _sid );
                        LuaAPI.xlua_pushinteger(L, gen_ret);
                    return 1;
                }
                
            } catch(System.Exception gen_e) {
@@ -137,6 +226,34 @@
        
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_petLimit(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
                BattleEffectPlayRule gen_to_be_invoked = (BattleEffectPlayRule)translator.FastGetCSObj(L, 1);
                LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.petLimit);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
            }
            return 1;
        }
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_guardLimit(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
                BattleEffectPlayRule gen_to_be_invoked = (BattleEffectPlayRule)translator.FastGetCSObj(L, 1);
                LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.guardLimit);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
            }
            return 1;
        }
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_sortPlayerList(RealStatePtr L)
        {
            try {
@@ -165,21 +282,6 @@
        }
        
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _s_set_sortPlayerList(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
                BattleEffectPlayRule gen_to_be_invoked = (BattleEffectPlayRule)translator.FastGetCSObj(L, 1);
                gen_to_be_invoked.sortPlayerList = (System.Collections.Generic.List<uint>)translator.GetObject(L, 2, typeof(System.Collections.Generic.List<uint>));
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
            }
            return 0;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _s_set_timeEscape(RealStatePtr L)
Lua/Gen/BattleEffectPlayRuleWrap.cs.meta
@@ -1,6 +1,6 @@
fileFormatVersion: 2
guid: 9af4f8cb7bea139439969d8767ea1d39
timeCreated: 1543808664
timeCreated: 1543992918
licenseType: Pro
MonoImporter:
  serializedVersion: 2
System/Dungeon/DungeonAssistModel.cs
@@ -594,6 +594,7 @@
                assistResult.addXianyuanCoins = recordInfo.XianyuanCoinAdd;
                assistResult.relatedToPlayer = (RelatedToPlayer)recordInfo.Relation;
                assistResult.vipLv = recordInfo.VIPLV;
                assistResult.isSweep = false;
                assistResult.createTime = recordInfo.HelpTime;
                assistResult.noGetReason = 2;
                assistResult.SetNotifyResult();
@@ -613,6 +614,7 @@
            assistResult.relatedToPlayer = (RelatedToPlayer)msg.Relation;
            assistResult.addCoins = msg.RelationCoinAdd;
            assistResult.vipLv = PlayerDatas.Instance.baseData.VIPLv;
            assistResult.isSweep = msg.IsSweep == 1;
            assistResult.createTime = TimeUtility.ServerNow.ToString("yyyy-MM-dd HH:mm:ss");
            assistResult.noGetReason = msg.Reason;
            assistResult.SetNotifyResult();
@@ -692,6 +694,7 @@
            public int addXianyuanCoinsTheory; // 理论增加的仙缘币
            public RelatedToPlayer relatedToPlayer;
            public int vipLv;
            public bool isSweep;
            public string createTime;
            public ResultType resultType;
            public string info;
@@ -835,6 +838,39 @@
                    case ResultType.TeamAssistGetExtraScore:
                        info = Language.Get("DungeonAssist109", callPlayerName, callPlayerId, fbName, addXianyuanCoins,sumAddStr);
                        break;
                    case ResultType.SweepingGetScore:
                        isSelf = true;
                        info = Language.Get("DungeonAssist148", fbName, addXianyuanCoins);
                        break;
                    case ResultType.SweepingGetPartScore:
                        isSelf = true;
                        info = Language.Get("DungeonAssist151", fbName, addXianyuanCoins);
                        break;
                    case ResultType.SweepingNoGetScoreReason2:
                        isSelf = true;
                        info = Language.Get("DungeonAssist149", fbName);
                        break;
                    case ResultType.SweepingNoGetScoreReason1:
                        isSelf = true;
                        info = Language.Get("DungeonAssist152", fbName);
                        break;
                    case ResultType.SweepingGetExtraScore:
                        isSelf = true;
                        string sweepGetExtra = string.Empty;
                        if (addCoins > 0)
                        {
                            sweepGetExtra = Language.Get("DungeonAssist115", addCoins);
                            if (!string.IsNullOrEmpty(sumAddStr))
                            {
                                sweepGetExtra = StringUtility.Contact(sweepGetExtra, ",", sumAddStr);
                            }
                        }
                        else
                        {
                            sweepGetExtra = sumAddStr;
                        }
                        info = Language.Get("DungeonAssist150", fbName, addXianyuanCoins, sweepGetExtra);
                        break;
                }
                assistModel.SetHelpInfoLocalSave(createTime,info,isNew,isSelf);
@@ -882,99 +918,135 @@
            public ResultType GetResultType()
            {
                if(assistType == 1)
                if(isSweep)
                {
                   if(IsAssistOther)
                    if (IsGetAllAssistCoins)
                    {
                        if(IsGetAllAssistCoins)
                        if (IsVipAddRatio || addCoins > 0)
                        {
                            switch (relatedToPlayer)
                            {
                                case RelatedToPlayer.None:
                                    return IsVipAddRatio ? ResultType.TeamAssistGetExtraScore : ResultType.TeamAssistGetScore;
                                case RelatedToPlayer.Friend:
                                case RelatedToPlayer.Ally:
                                    return ResultType.TeamAssistGetExtraScore;
                            }
                            return ResultType.SweepingGetExtraScore;
                        }
                        else
                        {
                            if(addXianyuanCoins > 0)
                            {
                                return ResultType.TeamAssistGetPartScore;
                            }
                            else
                            {
                                switch (noGetReason)
                                {
                                    case 0:
                                    case 2:
                                        return ResultType.TeamAssistNoGetScoreReason2;
                                    case 1:
                                        return ResultType.TeamAssistNoGetScoreReason1;
                                }
                            }
                            return ResultType.SweepingGetScore;
                        }
                    }
                    else
                    {
                        if(IsGetAllAssistCoins)
                        if (addXianyuanCoins > 0)
                        {
                            if(IsVipAddRatio || addCoins > 0)
                            {
                                return ResultType.SelfGetExtraScore;
                            }
                            else
                            {
                                return ResultType.SelfGetScore;
                            }
                            return ResultType.SweepingGetPartScore;
                        }
                        else
                        {
                            if (addXianyuanCoins > 0)
                            switch (noGetReason)
                            {
                                return ResultType.SelfGetPartScore;
                            }
                            else
                            {
                                switch (noGetReason)
                                {
                                    case 0:
                                    case 2:
                                        return ResultType.SelfNoGetScoreReason2;
                                    case 1:
                                        return ResultType.SelfNoGetScoreReason1;
                                }
                                case 0:
                                case 2:
                                    return ResultType.SweepingNoGetScoreReason2;
                                case 1:
                                    return ResultType.SweepingNoGetScoreReason1;
                            }
                        }
                    }
                }
                else
                {
                    if(IsGetAllAssistCoins)
                    if (assistType == 1)
                    {
                        switch (relatedToPlayer)
                        if (IsAssistOther)
                        {
                            case RelatedToPlayer.None:
                                return IsVipAddRatio ? ResultType.AssistGetExtraScore : ResultType.AssistGetScore;
                            case RelatedToPlayer.Friend:
                            case RelatedToPlayer.Ally:
                                return ResultType.AssistGetExtraScore;
                            if (IsGetAllAssistCoins)
                            {
                                switch (relatedToPlayer)
                                {
                                    case RelatedToPlayer.None:
                                        return IsVipAddRatio ? ResultType.TeamAssistGetExtraScore : ResultType.TeamAssistGetScore;
                                    case RelatedToPlayer.Friend:
                                    case RelatedToPlayer.Ally:
                                        return ResultType.TeamAssistGetExtraScore;
                                }
                            }
                            else
                            {
                                if (addXianyuanCoins > 0)
                                {
                                    return ResultType.TeamAssistGetPartScore;
                                }
                                else
                                {
                                    switch (noGetReason)
                                    {
                                        case 0:
                                        case 2:
                                            return ResultType.TeamAssistNoGetScoreReason2;
                                        case 1:
                                            return ResultType.TeamAssistNoGetScoreReason1;
                                    }
                                }
                            }
                        }
                        else
                        {
                            if (IsGetAllAssistCoins)
                            {
                                if (IsVipAddRatio || addCoins > 0)
                                {
                                    return ResultType.SelfGetExtraScore;
                                }
                                else
                                {
                                    return ResultType.SelfGetScore;
                                }
                            }
                            else
                            {
                                if (addXianyuanCoins > 0)
                                {
                                    return ResultType.SelfGetPartScore;
                                }
                                else
                                {
                                    switch (noGetReason)
                                    {
                                        case 0:
                                        case 2:
                                            return ResultType.SelfNoGetScoreReason2;
                                        case 1:
                                            return ResultType.SelfNoGetScoreReason1;
                                    }
                                }
                            }
                        }
                    }
                    else
                    {
                        if(addXianyuanCoins > 0)
                        if (IsGetAllAssistCoins)
                        {
                            return ResultType.AssistGetPartScore;
                            switch (relatedToPlayer)
                            {
                                case RelatedToPlayer.None:
                                    return IsVipAddRatio ? ResultType.AssistGetExtraScore : ResultType.AssistGetScore;
                                case RelatedToPlayer.Friend:
                                case RelatedToPlayer.Ally:
                                    return ResultType.AssistGetExtraScore;
                            }
                        }
                        else
                        {
                            return ResultType.AssistNoGetScoreReason2;
                            if (addXianyuanCoins > 0)
                            {
                                return ResultType.AssistGetPartScore;
                            }
                            else
                            {
                                return ResultType.AssistNoGetScoreReason2;
                            }
                        }
                    }
                }
                return ResultType.None;
            }
@@ -1016,6 +1088,11 @@
                TeamAssistNoGetScoreReason1,
                TeamAssistNoGetScoreReason2,
                TeamAssistGetExtraScore,
                SweepingGetScore,
                SweepingGetPartScore,
                SweepingNoGetScoreReason1,
                SweepingNoGetScoreReason2,
                SweepingGetExtraScore,
            }
        }
System/Dungeon/DungeonData.cs
@@ -61,6 +61,7 @@
        public int enterLV;
        public int leaderID;
        public int wheel;
        public Dictionary<string, AssistPlayer> helpPlayer;
        public long totalExp
        {
@@ -173,6 +174,16 @@
        public string UserData;
    }
    public struct AssistPlayer
    {
        public string Name;
        public int LV;
        public int Job;
        public int Relation;
        public int RealmLV;
        public int FightPower;
    }
    public class DungeonRecord
    {
        public int id { get; private set; }                        //副本id
System/Dungeon/DungeonModel.cs
@@ -943,6 +943,14 @@
                        var runeTowerModel = ModelCenter.Instance.GetModel<RuneTowerModel>();
                        runeTowerModel.OnGetSweepResult(_msg);
                        break;
                    case TrialDungeonModel.TRIALDUNGOEN_MAPID:
                        WindowCenter.Instance.Open<TrialSweepResultWin>();
                        if (getDungeonResultEvent != null)
                        {
                            getDungeonResultEvent();
                        }
                        break;
                    default:
                        WindowCenter.Instance.Close<DungeonSweepWin>();
                        WindowCenter.Instance.Open<DungeonSweepResultWin>();
System/Dungeon/TrialDungeonEntranceWin.cs
@@ -32,6 +32,8 @@
        [SerializeField]
        Button m_AutoGroupStart;
        [SerializeField]
        Button m_Sweep;
        [SerializeField]
        Button m_CloseWin;
        [SerializeField]
@@ -76,16 +78,14 @@
            m_AutoGroupStart.AddListener(AutoGroupChallenge);
            m_CloseWin.AddListener(CloseClick);
            m_Group.AddListener(OpenGroup);
            m_Sweep.AddListener(Sweep);
        }
        protected override void OnPreOpen()
        {
            model.dungeonRecordChangeEvent += UpdateDungeonTimes;
            m_GroupStart.image.material = CheckChallenge() ? MaterialUtility.GetUIDefaultGraphicMaterial() : MaterialUtility.GetDefaultSpriteGrayMaterial();
            m_SingleStart.image.material = CheckChallenge() ? MaterialUtility.GetUIDefaultGraphicMaterial() : MaterialUtility.GetDefaultSpriteGrayMaterial();
            m_AutoGroupStart.image.material = CheckChallenge() ? MaterialUtility.GetUIDefaultGraphicMaterial() : MaterialUtility.GetDefaultSpriteGrayMaterial();
            m_Group.image.material = CheckChallenge() ? MaterialUtility.GetUIDefaultGraphicMaterial() : MaterialUtility.GetDefaultSpriteGrayMaterial();
            DisplayButtonState();
            m_ContainerGroup.gameObject.SetActive(false);
            DrawDungeonBaseInfo();
@@ -193,12 +193,33 @@
        private void UpdateDungeonTimes(int mapID)
        {
            int trialMapID = model.GetTrialMaps()[0];
            if (trialMapID != mapID) return;
            if (trialMapID != mapID)
            {
                return;
            }
            DungeonOpenTimeConfig dungeonOpenTimeModel = Config.Instance.Get<DungeonOpenTimeConfig>(trialMapID);
            var completedTimes = dailyQuestModel.GetDailyQuestCompletedTimes((int)DailyQuestType.Trial);
            var totalTimes = dailyQuestModel.GetDailyQuestTotalTimes((int)DailyQuestType.Trial);
            m_ChallengeTimes.text = Language.Get("TrialChallengeCnt", UIHelper.AppendStringColor(completedTimes >= totalTimes ?
                TextColType.Red : TextColType.LightYellow, completedTimes.ToString(), true), totalTimes);
            DisplayButtonState();
        }
        private void DisplayButtonState()
        {
            m_GroupStart.image.material = CheckChallenge() ? MaterialUtility.GetUIDefaultGraphicMaterial() : MaterialUtility.GetDefaultSpriteGrayMaterial();
            m_SingleStart.image.material = CheckChallenge() ? MaterialUtility.GetUIDefaultGraphicMaterial() : MaterialUtility.GetDefaultSpriteGrayMaterial();
            m_AutoGroupStart.image.material = CheckChallenge() ? MaterialUtility.GetUIDefaultGraphicMaterial() : MaterialUtility.GetDefaultSpriteGrayMaterial();
            m_Group.image.material = CheckChallenge() ? MaterialUtility.GetUIDefaultGraphicMaterial() : MaterialUtility.GetDefaultSpriteGrayMaterial();
            bool requireSweep = RequireDisplaySweep();
            m_Sweep.gameObject.SetActive(requireSweep);
            if (requireSweep)
            {
                var error = 0;
                m_Sweep.image.material = SatisfySweep(out error) ?
                    MaterialUtility.GetUIDefaultGraphicMaterial() : MaterialUtility.GetDefaultSpriteGrayMaterial();
            }
        }
        private void DrawRewards()
@@ -286,6 +307,74 @@
            return model.TestChallange(model.selectedTrialDungeon, out error);
        }
        bool RequireDisplaySweep()
        {
            var dungeonId = model.GetDungeonId(model.selectedTrialDungeon);
            var dungeonConfig = Config.Instance.Get<DungeonConfig>(dungeonId);
            return dungeonConfig != null && dungeonConfig.SweepLVLimit > 0;
        }
        private void Sweep()
        {
            var error = 0;
            if (SatisfySweep(out error))
            {
                model.RequestSweep(model.selectedTrialDungeon);
            }
            else
            {
                var dongeonId = model.GetDungeonId(model.selectedTrialDungeon);
                var config = Config.Instance.Get<DungeonConfig>(dongeonId);
                switch (error)
                {
                    case 1:
                        SysNotifyMgr.Instance.ShowTip("TrialDungeonSDLimit", config.SweepLVLimit,
                            Language.Get(StringUtility.Contact("Num_CHS_", config.LineID + 1)),
                            UIHelper.GetGrade(trialDungeonModel.trialSweepGradeLimit));
                        break;
                    case 2:
                        SysNotifyMgr.Instance.ShowTip("Multiple_Finish");
                        break;
                }
            }
        }
        bool SatisfySweep(out int error)
        {
            error = 0;
            var dungeonId = model.GetDungeonId(model.selectedTrialDungeon);
            var dungeonConfig = Config.Instance.Get<DungeonConfig>(dungeonId);
            if (dungeonConfig == null || dungeonConfig.SweepLVLimit == 0)
            {
                return false;
            }
            if (PlayerDatas.Instance.baseData.LV < dungeonConfig.SweepLVLimit)
            {
                error = 1;
                return false;
            }
            DungeonRecord dungeonRecord;
            if (!model.TryGetRecord(dungeonConfig.MapID, out dungeonRecord))
            {
                error = 1;
                return false;
            }
            var star = 0;
            dungeonRecord.lineGrades.TryGetValue(dungeonConfig.LineID, out star);
            if (star < trialDungeonModel.trialSweepGradeLimit)
            {
                error = 1;
                return false;
            }
            var completedTimes = dailyQuestModel.GetDailyQuestCompletedTimes((int)DailyQuestType.Trial);
            var totalTimes = dailyQuestModel.GetDailyQuestTotalTimes((int)DailyQuestType.Trial);
            if (completedTimes >= totalTimes)
            {
                error = 2;
                return false;
            }
            return true;
        }
    }
}
System/Dungeon/TrialDungeonModel.cs
@@ -23,12 +23,16 @@
        bool serverInited = false;
        public const int TRIALEXCHANGE_GUIDE = 91;
        public const int TRIALDUNGOEN_MAPID = 60010;
        int m_TrialExchangeRemindLevel = 250;
        public int trialExchangeRemindLevel
        {
            get { return m_TrialExchangeRemindLevel; }
        }
        public int trialSweepGradeLimit { get; private set; }
        public override void Init()
        {
            ParseConfig();
@@ -119,6 +123,12 @@
            {
                m_TrialExchangeRemindLevel = int.Parse(funcConfig.Numerical1);
            }
            funcConfig = Config.Instance.Get<FuncConfigConfig>("TrialSweepGradeLimit");
            if (funcConfig != null)
            {
                trialSweepGradeLimit = int.Parse(funcConfig.Numerical1);
            }
        }
        public override void UnInit()
System/Dungeon/TrialSweepAssistPlayerBehaviour.cs
New file
@@ -0,0 +1,42 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
namespace Snxxz.UI
{
    [XLua.Hotfix]
    public class TrialSweepAssistPlayerBehaviour : MonoBehaviour
    {
        [SerializeField] Image m_PlayerHead;
        [SerializeField] Image m_Sign;
        [SerializeField] Text m_PlayerName;
        [SerializeField] Text m_Social;
        DungeonAssistModel model { get { return ModelCenter.Instance.GetModel<DungeonAssistModel>(); } }
        public void Display(int job, string playerName, int relation)
        {
            m_PlayerHead.SetSprite(GeneralDefine.GetJobHeadPortrait(job, 0));
            m_PlayerName.text = playerName;
            var relationType = (DungeonAssistModel.RelatedToPlayer)relation;
            m_Sign.gameObject.SetActive(relationType != DungeonAssistModel.RelatedToPlayer.None);
            switch (relationType)
            {
                case DungeonAssistModel.RelatedToPlayer.Friend:
                    m_Sign.SetSprite("XT_FBZZ_04");
                    break;
                case DungeonAssistModel.RelatedToPlayer.Ally:
                    m_Sign.SetSprite("XT_FBZZ_05");
                    break;
            }
            var socialAddCoin = model.GetAssistReward(relation);
            m_Social.gameObject.SetActive(socialAddCoin > 0);
            if (socialAddCoin > 0)
            {
                m_Social.text = Language.Get("TrialSweepSocialAddCoin", socialAddCoin);
            }
        }
    }
}
System/Dungeon/TrialSweepAssistPlayerBehaviour.cs.meta
New file
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: f184b8b0c0837e5439d1fbe16cca28c6
timeCreated: 1543976369
licenseType: Pro
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
System/Dungeon/TrialSweepResultWin.cs
New file
@@ -0,0 +1,341 @@
//--------------------------------------------------------
//    [Author]:           第二世界
//    [  Date ]:           Tuesday, December 04, 2018
//--------------------------------------------------------
using System;
using System.Collections;
using System.Collections.Generic;
using TableConfig;
using UnityEngine;
using UnityEngine.UI;
namespace Snxxz.UI
{
    [XLua.Hotfix]
    public class TrialSweepResultWin : Window
    {
        [SerializeField] RectTransform m_ContainerReward1;
        [SerializeField] RectTransform m_ContainerReward2;
        [SerializeField] ItemBehaviour[] m_ItemBehaviours1;
        [SerializeField] ItemBehaviour[] m_ItemBehaviours2;
        [SerializeField] Text m_FairyCoin;
        [SerializeField] Text m_VipPrivilege;
        [SerializeField] TrialSweepAssistPlayerBehaviour[] m_AssistPlayers;
        [SerializeField] Button m_Close;
        [SerializeField] Button m_Func;
        [SerializeField] UIEffect m_Effect;
        DungeonModel model { get { return ModelCenter.Instance.GetModel<DungeonModel>(); } }
        DungeonAssistModel dungeonAssistModel { get { return ModelCenter.Instance.GetModel<DungeonAssistModel>(); } }
        DailyQuestModel dailyQuestModel { get { return ModelCenter.Instance.GetModel<DailyQuestModel>(); } }
        PlayerPackModel playerPack { get { return ModelCenter.Instance.GetModel<PlayerPackModel>(); } }
        #region Built-in
        protected override void BindController()
        {
        }
        protected override void AddListeners()
        {
            m_Close.onClick.AddListener(CloseClick);
            m_Func.onClick.AddListener(OnFunc);
        }
        protected override void OnPreOpen()
        {
            model.getDungeonResultEvent += GetDungeonResultEvent;
        }
        protected override void OnAfterOpen()
        {
            m_Effect.Play();
        }
        protected override void OnPreClose()
        {
            model.getDungeonResultEvent -= GetDungeonResultEvent;
        }
        protected override void OnAfterClose()
        {
        }
        #endregion
        void Display()
        {
            DisplayItems();
            DisplayExtension();
            DisplayAssistPlayers();
        }
        void DisplayItems()
        {
            var serveritems = model.dungeonResult.itemInfo;
            var items = new List<Item>();
            for (int i = 0; i < serveritems.Length; i++)
            {
                var serverItem = serveritems[i];
                items.Add(new Item(serverItem.ItemID, serverItem.Count));
            }
            items.Sort(Compare);
            m_ContainerReward1.gameObject.SetActive(items.Count > 0);
            for (int i = 0; i < m_ItemBehaviours1.Length; i++)
            {
                var behaviour = m_ItemBehaviours1[i];
                if (i < items.Count)
                {
                    behaviour.gameObject.SetActive(true);
                    var reward = items[i];
                    behaviour.SetItem(reward);
                }
                else
                {
                    behaviour.gameObject.SetActive(false);
                }
            }
            if (items.Count > m_ItemBehaviours1.Length)
            {
                m_ContainerReward2.gameObject.SetActive(true);
                var startIndex = m_ItemBehaviours1.Length;
                for (int i = 0; i < m_ItemBehaviours2.Length; i++)
                {
                    var behaviour = m_ItemBehaviours2[i];
                    if (i + startIndex < items.Count)
                    {
                        behaviour.gameObject.SetActive(true);
                        var reward = items[i + startIndex];
                        behaviour.SetItem(reward);
                    }
                    else
                    {
                        behaviour.gameObject.SetActive(false);
                    }
                }
            }
            else
            {
                m_ContainerReward2.gameObject.SetActive(false);
            }
        }
        void DisplayExtension()
        {
            var dungeonResult = model.dungeonResult;
            var coin = 0;
            if (dungeonResult.xianyuanCoin != null && dungeonResult.xianyuanCoin.Length > 0)
            {
                coin = dungeonResult.xianyuanCoin[0];
            }
            m_FairyCoin.text = Language.Get("AssistSweepGainCoin", coin);
            var vipAddRatio = string.Empty;
            if (dungeonAssistModel.TryGetCurVipAddRatio(out vipAddRatio))
            {
                m_VipPrivilege.text = StringUtility.Contact(Language.Get("AssistSweepVipPrivilege"), vipAddRatio);
            }
            else
            {
                m_VipPrivilege.text = StringUtility.Contact(Language.Get("AssistSweepVipPrivilege"),
                    Language.Get("Market_Text_33"));
            }
        }
        void DisplayAssistPlayers()
        {
            var dungeonResult = model.dungeonResult;
            var index = 0;
            if (dungeonResult.helpPlayer != null)
            {
                foreach (var key in dungeonResult.helpPlayer.Keys)
                {
                    var id = int.Parse(key);
                    var player = dungeonResult.helpPlayer[key];
                    if (index < m_AssistPlayers.Length)
                    {
                        m_AssistPlayers[index].gameObject.SetActive(true);
                        var name = player.Name;
                        if (id <= 100)
                        {
                            var npcConfig = Config.Instance.Get<NPCConfig>(dungeonAssistModel.assistRobotId);
                            name = npcConfig.charName;
                        }
                        m_AssistPlayers[index].Display(player.Job, name, player.Relation);
                    }
                    index++;
                }
            }
            for (int i = index; i < m_AssistPlayers.Length; i++)
            {
                m_AssistPlayers[index].gameObject.SetActive(false);
            }
        }
        private void OnFunc()
        {
            var error = 0;
            if (TestSweep(out error))
            {
                model.RequestSweep(model.currentDungeon);
            }
            else
            {
                switch (error)
                {
                    case 1:
                        WindowCenter.Instance.Open<DungeonBuyTimesWin>();
                        break;
                    case 2:
                        SysNotifyMgr.Instance.ShowTip("Multiple_Finish");
                        break;
                    case 3:
                        var tickets = model.GetTicketCost(model.currentDungeon.mapId, model.currentDungeon.lineId);
                        ModelCenter.Instance.GetModel<GetItemPathModel>().SetChinItemModel(tickets.id);
                        break;
                    case 4:
                        var cost = model.GetSweepCost(model.currentDungeon);
                        var itemOwn = playerPack.GetItemCountByID(PackType.rptItem, cost.id);
                        var moneyNeed = GeneralDefine.autoBuyItemPrices[0] * (cost.count - itemOwn);
                        ConfirmCancel.ShowPopConfirm(
                          Language.Get("Mail101"),
                          Language.Get("MultipleSweep_Text3", cost.count - itemOwn, moneyNeed),
                          (bool _ok) =>
                          {
                              if (_ok)
                              {
                                  var moneyOwn = PlayerDatas.Instance.baseData.Gold + PlayerDatas.Instance.baseData.GoldPaper;
                                  if (moneyNeed > moneyOwn)
                                  {
                                      WindowCenter.Instance.Open<RechargeTipWin>();
                                  }
                                  else
                                  {
                                      model.RequestSweep(model.currentDungeon);
                                  }
                              }
                          }
                          );
                        break;
                    case 5:
                        SysNotifyMgr.Instance.ShowTip("SweepFB_1");
                        break;
                }
            }
        }
        private bool TestSweep(out int error)
        {
            var dataMapId = model.GetDataMapIdByMapId(PlayerDatas.Instance.baseData.MapID);
            if (dataMapId == model.currentDungeon.mapId)
            {
                error = 5;
                return false;
            }
            var dailyQuestId = dailyQuestModel.GetDailyQuestIdByDataMapId(model.currentDungeon.mapId);
            if (dailyQuestId != 0)
            {
                var state = dailyQuestModel.GetQuestState(dailyQuestId);
                if (state == DailyQuestModel.DailyQuestState.CanBuyTimes)
                {
                    error = 1;
                    return false;
                }
                if (state == DailyQuestModel.DailyQuestState.Completed)
                {
                    error = 2;
                    return false;
                }
            }
            var tickets = model.GetTicketCost(model.currentDungeon.mapId, model.currentDungeon.lineId);
            var ticketsOwn = playerPack.GetItemCountByID(PackType.rptItem, tickets.id);
            if (ticketsOwn < tickets.count)
            {
                error = 3;
                return false;
            }
            var sweepCost = model.GetSweepCost(model.currentDungeon);
            var itemOwn = playerPack.GetItemCountByID(PackType.rptItem, sweepCost.id);
            if (itemOwn < sweepCost.count)
            {
                error = 4;
                return false;
            }
            error = 0;
            return true;
        }
        protected int Compare(Item x, Item y)
        {
            var config_x = Config.Instance.Get<ItemConfig>(x.id);
            var config_y = Config.Instance.Get<ItemConfig>(y.id);
            bool equip_x = config_x.Type >= 101 && config_x.Type <= 109;
            bool equip_y = config_y.Type >= 101 && config_y.Type <= 109;
            if (equip_x.CompareTo(equip_y) != 0)
            {
                return equip_x.CompareTo(equip_y);
            }
            if (!equip_x && !equip_y)
            {
                bool type_13_x = config_x.Type == 13;
                bool type_13_y = config_y.Type == 13;
                if (type_13_x.CompareTo(type_13_y) != 0)
                {
                    return -type_13_x.CompareTo(type_13_y);
                }
                if (config_x.ItemColor.CompareTo(config_y.ItemColor) != 0)
                {
                    return -config_x.ItemColor.CompareTo(config_y.ItemColor);
                }
                return x.id.CompareTo(y.id);
            }
            else
            {
                bool type_108109_x = config_x.Type >= 108;
                bool type_108109_y = config_y.Type >= 108;
                if (type_108109_x || type_108109_y)
                {
                    if (config_x.Type.CompareTo(config_y.Type) != 0)
                    {
                        return -config_x.Type.CompareTo(config_y.Type);
                    }
                }
                if (config_x.ItemColor.CompareTo(config_y.ItemColor) != 0)
                {
                    return -config_x.ItemColor.CompareTo(config_y.ItemColor);
                }
                if (config_x.StarLevel.CompareTo(config_y.StarLevel) != 0)
                {
                    return -config_x.StarLevel.CompareTo(config_y.StarLevel);
                }
                if (config_x.LV.CompareTo(config_y.LV) != 0)
                {
                    return -config_x.LV.CompareTo(config_y.LV);
                }
                return x.id.CompareTo(y.id);
            }
        }
        private void GetDungeonResultEvent()
        {
            Display();
            m_Effect.Play();
        }
    }
}
System/Dungeon/TrialSweepResultWin.cs.meta
New file
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 2342c4bd28533ce4e85432833f40c7fa
timeCreated: 1543929036
licenseType: Pro
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
System/FairyAu/FairyLeagueModel.cs
@@ -646,7 +646,7 @@
                    if (battleList.fairyId1 == _fairyId
                        || battleList.fairyId2 == _fairyId)
                    {
                        return true;
                        return battleList.fairyId1 != 0 && battleList.fairyId2 != 0;
                    }
                }
            }
System/GeneralConfig/GeneralDefine.cs
@@ -146,9 +146,15 @@
    public static List<Item> ancientKingAwards = new List<Item>();
    public static int lowQualityCount { get; private set; }
    public static int medQualityCount { get; private set; }
    public static int highQualityCount { get; private set; }
    public static int lowQualityEffectCount { get; private set; }
    public static int medQualityEffectCount { get; private set; }
    public static int highQualityEffectCount { get; private set; }
    public static int lowQualityPetCount { get; private set; }
    public static int medQualityPetCount { get; private set; }
    public static int highQualityPetCount { get; private set; }
    public static int lowQualityGuardCount { get; private set; }
    public static int medQualityGuardCount { get; private set; }
    public static int highQualityGuardCount { get; private set; }
    public static int fairyLandBuffCondition { get; private set; }
    public static int fairyLandBuffId { get; private set; }
@@ -524,9 +530,19 @@
            }
            func = Config.Instance.Get<FuncConfigConfig>("QualityEffectConfig");
            lowQualityCount = int.Parse(func.Numerical1);
            medQualityCount = int.Parse(func.Numerical2);
            highQualityCount = int.Parse(func.Numerical3);
            lowQualityEffectCount = int.Parse(func.Numerical1);
            medQualityEffectCount = int.Parse(func.Numerical2);
            highQualityEffectCount = int.Parse(func.Numerical3);
            func = Config.Instance.Get<FuncConfigConfig>("QualityPetCountConfig");
            lowQualityPetCount = int.Parse(func.Numerical1);
            medQualityPetCount = int.Parse(func.Numerical2);
            highQualityPetCount = int.Parse(func.Numerical3);
            func = Config.Instance.Get<FuncConfigConfig>("QualityGuardCountConfig");
            lowQualityGuardCount = int.Parse(func.Numerical1);
            medQualityGuardCount = int.Parse(func.Numerical2);
            highQualityGuardCount = int.Parse(func.Numerical3);
            fairyLandBuffCondition = GetInt("XjmjAddHarm", 1);
            fairyLandBuffId = GetInt("XjmjAddHarm", 2);
System/KnapSack/Logic/EquipTip.cs
@@ -38,7 +38,8 @@
        [SerializeField]
        Text realmTitleText;
        [SerializeField] Image realmImg;
        [SerializeField] GameObject container_FightPower;
        [SerializeField] Text fightPowerText;
        #endregion
        #region MidUI
@@ -221,7 +222,8 @@
            equipScoreDes.text = Language.Get("EquipWin_EquipPointText_1");
            equipScoreValue.text = itemAttrData.score.ToString();
            container_FightPower.SetActive(itemTipsModel.IsPeerlessEquip(itemAttrData.itemId));
            fightPowerText.text = itemTipsModel.GetEquipFightPower(itemAttrData.score).ToString();
            CheckUselimit();
            if (itemAttrData.itemConfig.ExpireTime > 0)
System/KnapSack/Logic/ItemTipsModel.cs
@@ -55,6 +55,8 @@
        public int[] tryPutOnEquipIds { get; private set; }
        public int[] randomRuneIds { get; private set; }
        public int[] PeerlessEquipIds { get; private set; } //绝世装备列表
        PlayerPackModel _playerPack;
        PlayerPackModel playerPack
        {
@@ -89,6 +91,9 @@
            FuncConfigConfig renewalFunc = Config.Instance.Get<FuncConfigConfig>("ItemRepayButton");
            ItemRenewalIds = ConfigParse.GetMultipleStr<int>(renewalFunc.Numerical1);
            tryPutOnEquipIds = ConfigParse.GetMultipleStr<int>(renewalFunc.Numerical2);
            FuncConfigConfig EquipOutWordID = Config.Instance.Get<FuncConfigConfig>("EquipOutWordID");
            PeerlessEquipIds = ConfigParse.GetMultipleStr<int>(EquipOutWordID.Numerical1);
            FuncConfigConfig ItemTipsNum = Config.Instance.Get<FuncConfigConfig>("ItemTipsNum");
            JsonData itemParamsData = JsonMapper.ToObject(ItemTipsNum.Numerical1);
@@ -2145,6 +2150,27 @@
        }
        #endregion
        #region 绝版武器战力
        public bool IsPeerlessEquip(int itemId)
        {
            if (PeerlessEquipIds == null) return false;
            return PeerlessEquipIds.Contains(itemId);
        }
        public int GetEquipFightPower(int equipScore)
        {
            var funcConfig = Config.Instance.Get<FuncConfigConfig>("FightpowerFormula");
            Equation.Instance.Clear();
            if(funcConfig != null)
            {
                Equation.Instance.AddKeyValue("equipScoreTotal",equipScore);
                return Equation.Instance.Eval<int>(funcConfig.Numerical2);
            }
            return 0;
        }
        #endregion
    }
    public class ItemAttrData
System/KnapSack/Logic/UnionWarehouseEquipTip.cs
@@ -36,6 +36,8 @@
        [SerializeField]
        Text realmTitleText;
        [SerializeField] Image realmImg;
        [SerializeField] GameObject container_FightPower;
        [SerializeField] Text fightPowerText;
        #endregion
        #region MidUI
@@ -182,6 +184,8 @@
            itemCell.Init(cellModel);
            equipScoreDes.text = Language.Get("EquipWin_EquipPointText_1");
            equipScoreValue.text = itemAttrData.score.ToString();
            container_FightPower.SetActive(itemTipsModel.IsPeerlessEquip(itemAttrData.itemId));
            fightPowerText.text = itemTipsModel.GetEquipFightPower(itemAttrData.score).ToString();
            CheckUselimit();
            if (itemAttrData.itemConfig.ExpireTime > 0)
            {
System/Rank/RankPanel.cs
@@ -52,7 +52,7 @@
        private void OnCloseClick()
        {
            Close();
            CloseClick();
        }
        void OnRefreshRankType()
System/Rune/RuneModel.cs
@@ -60,6 +60,7 @@
        public const int RUNE_TYPE = 30;
        public const int RUNE_CREAMTYPE = 31;
        public const int RUNE_HOLE_COUNT = 9;
        public Dictionary<int, Dictionary<int, int>> runeBasePropretyDict = new Dictionary<int, Dictionary<int, int>>();
        public Dictionary<int, Dictionary<int, float>> runeAttrDic = new Dictionary<int, Dictionary<int, float>>();
        public Dictionary<int, float> runeAttrAdditionDic = new Dictionary<int, float>();
        public Dictionary<int, float> runeExpDic = new Dictionary<int, float>();
@@ -82,6 +83,7 @@
                    {
                        runeAttrDic.Add(key, ConfigParse.GetDic<int, float>(FuncConfigConfig.m_RuneAttrCfgs[key].Numerical2));
                        runeAttrAdditionDic.Add(key, float.Parse(FuncConfigConfig.m_RuneAttrCfgs[key].Numerical3));
                        runeBasePropretyDict.Add(key, ConfigParse.GetDic<int, int>(FuncConfigConfig.m_RuneAttrCfgs[key].Numerical4));
                    }
                    runeExpDic = ConfigParse.GetDic<int, float>(FuncConfigConfig.GetRuneNeedExpFormula().Numerical2);
                    runeExpAddition = float.Parse(FuncConfigConfig.GetRuneNeedExpFormula().Numerical3);
@@ -208,15 +210,24 @@
                }
                int[] runeTypes = _tagRuneModel.AttrType;
                float params2 = runeAttrDic[type][_tagChinModel.ItemColor];
                var baseValue = 0;
                if (runeBasePropretyDict.ContainsKey(type))
                {
                    var dict = runeBasePropretyDict[type];
                    if (dict.ContainsKey(_tagChinModel.ItemColor))
                    {
                        baseValue = dict[_tagChinModel.ItemColor];
                    }
                }
                if (runeTypes.Length > 1)
                {
                    float coe = runeAttrAdditionDic[type];
                    coe = coe == 0 ? 1 : coe;
                    runeValue = params1 * params2 * coe;
                    runeValue = (params1 * params2 + baseValue) * coe;
                }
                else
                {
                    runeValue = params1 * params2;
                    runeValue = params1 * params2 + baseValue;
                }
            }
            return Mathf.RoundToInt(runeValue);
System/Treasure/TreasureData.cs
@@ -561,6 +561,7 @@
        public int treasure { get; private set; }
        public int treasureSoul { get; private set; }
        public int exp { get; set; }
        public int powerEx { get; set; }
        public int stateSfxId { get; private set; }
        public const int selectedSfxId = 5144;
        public string sfxGotState { get; private set; }
@@ -616,6 +617,7 @@
            exp = _config.NeedExp;
            stage = _config.LV;
            powerEx = _config.PowerEx;
            switch (unlockType)
            {
System/Treasure/TreasureModel.cs
@@ -1629,10 +1629,32 @@
                    break;
                }
                _fightPower += _stage.GetFightPower();
                _fightPower += _stage.powerEx;
            }
            _fightPower += GetExtensionPower(_treasureId);
            return _fightPower;
        }
        public int GetExtensionPower(int _treasureId)
        {
            var treasureSoulModel = ModelCenter.Instance.GetModel<TreasureSoulModel>();
            if (_treasureId == treasureSoulModel.signAddTreasure)
            {
                var signInDays = ModelCenter.Instance.GetModel<SignInModel>().totalSignInCount;
                if (signInDays == 0)
                {
                    return 0;
                }
                Dictionary<int, int> dict = new Dictionary<int, int>();
                foreach (var key in treasureSoulModel.signAddProperty.Keys)
                {
                    dict.Add(key, treasureSoulModel.signAddProperty[key] * signInDays);
                }
                return UIHelper.GetFightPower(dict);
            }
            return 0;
        }
        Dictionary<int, int[]> m_TreasurePotentialGetSkills = new Dictionary<int, int[]>();
        private void ParsePotentialSkillConfig()
        {
UI/Core/DebugCanvasAddition.cs
New file
@@ -0,0 +1,39 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using Snxxz.UI;
[DisallowMultipleComponent]
[RequireComponent(typeof(Canvas))]
public class DebugCanvasAddition : MonoBehaviour
{
    [SerializeField]
    Canvas m_Canvas;
    public Canvas canvas {
        get {
            return this.m_Canvas ?? (this.m_Canvas = this.GetComponent<Canvas>());
        }
    }
    void Start()
    {
        var canvasScaler = this.GetComponent<CanvasScaler>();
        if (canvasScaler != null && canvasScaler.screenMatchMode == CanvasScaler.ScreenMatchMode.MatchWidthOrHeight)
        {
            var screenAspect = Screen.width / (float)Screen.height;
            var referenceAspect = canvasScaler.referenceResolution.x / (float)canvasScaler.referenceResolution.y;
            if ((screenAspect - referenceAspect) > 0.0001f)
            {
                canvasScaler.matchWidthOrHeight = 1f;
            }
            else
            {
                canvasScaler.matchWidthOrHeight = 0f;
            }
        }
    }
}
UI/Core/DebugCanvasAddition.cs.meta
New file
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 0a4efa371fcd965448800bd3b9d54a27
timeCreated: 1543993370
licenseType: Pro
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant: