少年修仙传客户端代码仓库
hch
2019-12-23 642bb13201c75a73f5fe5302b72356cc4963dbe0
8347 协助系统
8个文件已添加
9个文件已修改
687 ■■■■■ 已修改文件
Core/GameEngine/Model/Config/AssistThanksGiftConfig.cs 209 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/Model/Config/AssistThanksGiftConfig.cs.meta 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/DTCFile/ServerPack/HB0_Event/DTCB004_tagGCUseAssistThanksGiftPreview.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/DTCFile/ServerPack/HB0_Event/DTCB005_tagGCGetAssistThanksGiftPreview.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/DTCFile/ServerPack/HB0_Event/DTCB006_tagGCCanGetAssistThanksGiftCount.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/Stage/Dungeon/DropItemManager.cs 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Dungeon/AssistThanksCell.cs 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Dungeon/AssistThanksCell.cs.meta 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Dungeon/AssistThanksWin.cs 126 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Dungeon/AssistThanksWin.cs.meta 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Dungeon/DungeonAssistModel.cs 69 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Dungeon/ReceiveAssistThanksWin.cs 116 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Dungeon/ReceiveAssistThanksWin.cs.meta 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/KnapSack/Logic/ItemLogicUtility.cs 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/KnapSack/Logic/ItemOperateUtility.cs 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/MainInterfacePanel/MainButtonMisc.cs 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Utility/ConfigInitiator.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/Model/Config/AssistThanksGiftConfig.cs
New file
@@ -0,0 +1,209 @@
//--------------------------------------------------------
//    [Author]:           Fish
//    [  Date ]:           Sunday, December 22, 2019
//--------------------------------------------------------
using System.Collections.Generic;
using System.IO;
using System.Threading;
using System;
using UnityEngine;
[XLua.LuaCallCSharp]
public partial class AssistThanksGiftConfig
{
    public readonly int GiftID;
    public readonly string RequestPlayerAward;
    public readonly string AssistPlayerAward;
    public readonly int AssistAwardCount;
    public AssistThanksGiftConfig()
    {
    }
    public AssistThanksGiftConfig(string input)
    {
        try
        {
            var tables = input.Split('\t');
            int.TryParse(tables[0],out GiftID);
            RequestPlayerAward = tables[1];
            AssistPlayerAward = tables[2];
            int.TryParse(tables[3],out AssistAwardCount);
        }
        catch (Exception ex)
        {
            DebugEx.Log(ex);
        }
    }
    static Dictionary<string, AssistThanksGiftConfig> configs = new Dictionary<string, AssistThanksGiftConfig>();
    public static AssistThanksGiftConfig Get(string id)
    {
        if (!inited)
        {
            Debug.Log("AssistThanksGiftConfig 还未完成初始化。");
            return null;
        }
        if (configs.ContainsKey(id))
        {
            return configs[id];
        }
        AssistThanksGiftConfig config = null;
        if (rawDatas.ContainsKey(id))
        {
            config = configs[id] = new AssistThanksGiftConfig(rawDatas[id]);
            rawDatas.Remove(id);
        }
        return config;
    }
    public static AssistThanksGiftConfig Get(int id)
    {
        return Get(id.ToString());
    }
    public static List<string> GetKeys()
    {
        var keys = new List<string>();
        keys.AddRange(configs.Keys);
        keys.AddRange(rawDatas.Keys);
        return keys;
    }
    public static List<AssistThanksGiftConfig> GetValues()
    {
        var values = new List<AssistThanksGiftConfig>();
        values.AddRange(configs.Values);
        var keys = new List<string>(rawDatas.Keys);
        foreach (var key in keys)
        {
            values.Add(Get(key));
        }
        return values;
    }
    public static bool Has(string id)
    {
        return configs.ContainsKey(id) || rawDatas.ContainsKey(id);
    }
    public static bool Has(int id)
    {
        return Has(id.ToString());
    }
    public static bool inited { get; private set; }
    protected static Dictionary<string, string> rawDatas = new Dictionary<string, string>();
    public static void Init(bool sync=false)
    {
        inited = false;
        var path = string.Empty;
        if (AssetSource.refdataFromEditor)
        {
            path = ResourcesPath.CONFIG_FODLER +"/AssistThanksGift.txt";
        }
        else
        {
            path = AssetVersionUtility.GetAssetFilePath("config/AssistThanksGift.txt");
        }
        configs.Clear();
        var tempConfig = new AssistThanksGiftConfig();
        var preParse = tempConfig is IConfigPostProcess;
        if (sync)
        {
            var lines = File.ReadAllLines(path);
            if (!preParse)
            {
                rawDatas = new Dictionary<string, string>(lines.Length - 3);
            }
            for (int i = 3; i < lines.Length; i++)
            {
                try
                {
                    var line = lines[i];
                    var index = line.IndexOf("\t");
                    if (index == -1)
                    {
                        continue;
                    }
                    var id = line.Substring(0, index);
                    if (preParse)
                    {
                        var config = new AssistThanksGiftConfig(line);
                        configs[id] = config;
                        (config as IConfigPostProcess).OnConfigParseCompleted();
                    }
                    else
                    {
                        rawDatas[id] = line;
                    }
                }
                catch (System.Exception ex)
                {
                    Debug.LogError(ex);
                }
            }
            inited = true;
        }
        else
        {
            ThreadPool.QueueUserWorkItem((object _object) =>
            {
                var lines = File.ReadAllLines(path);
                if (!preParse)
                {
                    rawDatas = new Dictionary<string, string>(lines.Length - 3);
                }
                for (int i = 3; i < lines.Length; i++)
                {
                    try
                    {
                       var line = lines[i];
                        var index = line.IndexOf("\t");
                        if (index == -1)
                        {
                            continue;
                        }
                        var id = line.Substring(0, index);
                        if (preParse)
                        {
                            var config = new AssistThanksGiftConfig(line);
                            configs[id] = config;
                            (config as IConfigPostProcess).OnConfigParseCompleted();
                        }
                        else
                        {
                            rawDatas[id] = line;
                        }
                    }
                    catch (System.Exception ex)
                    {
                        Debug.LogError(ex);
                    }
                }
                inited = true;
            });
        }
    }
}
Core/GameEngine/Model/Config/AssistThanksGiftConfig.cs.meta
New file
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 07b213bb2977bd54b896d6488a40c93e
timeCreated: 1577016998
licenseType: Pro
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
Core/NetworkPackage/DTCFile/ServerPack/HB0_Event/DTCB004_tagGCUseAssistThanksGiftPreview.cs
@@ -1,11 +1,12 @@
using UnityEngine;
using System.Collections;
using Snxxz.UI;
// B0 04 使用协助感谢礼盒预览 #tagGCUseAssistThanksGiftPreview
public class DTCB004_tagGCUseAssistThanksGiftPreview : DtcBasic {
    DungeonAssistModel assistModel { get { return ModelCenter.Instance.GetModel<DungeonAssistModel>(); } }
    public override void Done(GameNetPackBasic vNetPack) {
        base.Done(vNetPack);
        HB004_tagGCUseAssistThanksGiftPreview vNetData = vNetPack as HB004_tagGCUseAssistThanksGiftPreview;
        HB004_tagGCUseAssistThanksGiftPreview vNetData = vNetPack as HB004_tagGCUseAssistThanksGiftPreview;         assistModel.OnUseAssistThanksGiftPreview(vNetData);
    }
}
Core/NetworkPackage/DTCFile/ServerPack/HB0_Event/DTCB005_tagGCGetAssistThanksGiftPreview.cs
@@ -1,11 +1,12 @@
using UnityEngine;
using System.Collections;
using Snxxz.UI;
// B0 05 接收协助感谢礼物预览 #tagGCGetAssistThanksGiftPreview
public class DTCB005_tagGCGetAssistThanksGiftPreview : DtcBasic {
    DungeonAssistModel assistModel { get { return ModelCenter.Instance.GetModel<DungeonAssistModel>(); } }
    public override void Done(GameNetPackBasic vNetPack) {
        base.Done(vNetPack);
        HB005_tagGCGetAssistThanksGiftPreview vNetData = vNetPack as HB005_tagGCGetAssistThanksGiftPreview;
        HB005_tagGCGetAssistThanksGiftPreview vNetData = vNetPack as HB005_tagGCGetAssistThanksGiftPreview;         assistModel.OnGetAssistThanksGiftPreview(vNetData);
    }
}
Core/NetworkPackage/DTCFile/ServerPack/HB0_Event/DTCB006_tagGCCanGetAssistThanksGiftCount.cs
@@ -1,11 +1,12 @@
using UnityEngine;
using System.Collections;
using Snxxz.UI;
// B0 06 可接收协助感谢礼物个数 #tagGCCanGetAssistThanksGiftCount
public class DTCB006_tagGCCanGetAssistThanksGiftCount : DtcBasic {
    DungeonAssistModel assistModel { get { return ModelCenter.Instance.GetModel<DungeonAssistModel>(); } }
    public override void Done(GameNetPackBasic vNetPack) {
        base.Done(vNetPack);
        HB006_tagGCCanGetAssistThanksGiftCount vNetData = vNetPack as HB006_tagGCCanGetAssistThanksGiftCount;
        HB006_tagGCCanGetAssistThanksGiftCount vNetData = vNetPack as HB006_tagGCCanGetAssistThanksGiftCount;         assistModel.OnGetAssistThanksGiftCount(vNetData);
    }
}
Fight/Stage/Dungeon/DropItemManager.cs
@@ -355,7 +355,7 @@
                continue;
            }
            if (!CheckCanPickUp(m_MapItemDict[m_MapItemIdList[i]]) && !UserInputHandler.isTouched)
            if (!CheckCanPickUp(m_MapItemDict[m_MapItemIdList[i]], false) && !UserInputHandler.isTouched)
            {
                continue;
            }
@@ -389,7 +389,7 @@
    }
    private static Dictionary<int, float> m_CacheTipErrorDict = new Dictionary<int, float>();
    private static void TipOthersItem(int id)
    private static void TipOthersItem(int id, bool isNotify)
    {
        if (m_CacheTipErrorDict.ContainsKey(id))
        {
@@ -402,17 +402,19 @@
                return;
            }
        }
        SysNotifyMgr.Instance.ShowTip("OpenHazyRegionError_5");
        if (isNotify)
        {
            SysNotifyMgr.Instance.ShowTip("OpenHazyRegionError_5");
        }
    }
    private static bool CheckCanPickUp(DropObject dropObject)
    private static bool CheckCanPickUp(DropObject dropObject, bool isNotify=true)
    {
        if (dropObject.ownerType == 1)
        {
            if (dropObject.ownerID != PlayerDatas.Instance.PlayerId)
            {
                TipOthersItem(dropObject.dropID);
                TipOthersItem(dropObject.dropID, isNotify);
                return false;
            }
        }
@@ -421,7 +423,7 @@
            TeamModel _teamModel = ModelCenter.Instance.GetModel<TeamModel>();
            if (_teamModel.myTeam.teamId != dropObject.ownerID)
            {
                TipOthersItem(dropObject.dropID);
                TipOthersItem(dropObject.dropID, isNotify);
                return false;
            }
        }
@@ -429,7 +431,7 @@
        {
            if (PlayerDatas.Instance.baseData.faction != dropObject.ownerID)
            {
                TipOthersItem(dropObject.dropID);
                TipOthersItem(dropObject.dropID, isNotify);
                return false;
            }
        }
@@ -447,7 +449,7 @@
            if (!_result)
            {
                TipOthersItem(dropObject.dropID);
                TipOthersItem(dropObject.dropID, isNotify);
                return false;
            }
        }
@@ -455,7 +457,7 @@
        {
            if (dropObject.ownerID != PlayerDatas.Instance.baseData.FamilyId)
            {
                TipOthersItem(dropObject.dropID);
                TipOthersItem(dropObject.dropID, isNotify);
                return false;
            }
        }
System/Dungeon/AssistThanksCell.cs
New file
@@ -0,0 +1,52 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
namespace Snxxz.UI
{
    public class AssistThanksCell : CellView
    {
        [SerializeField] Image PlayerIcon;
        [SerializeField] Text PlayerName;
        [SerializeField] Button  AddFriend;
        [SerializeField] Text PlayerLV;
        DungeonAssistModel assistModel { get { return ModelCenter.Instance.GetModel<DungeonAssistModel>(); } }
        FriendsModel m_FriendModel
        {
            get
            {
                return ModelCenter.Instance.GetModel<FriendsModel>();
            }
        }
        public void Display(int index)
        {
            if (index >= assistModel.assistThanksGift.AssistPlayerList.Length)
            {
                return;
            }
            var playerInfo = assistModel.assistThanksGift.AssistPlayerList[index];
            PlayerIcon.SetSprite(GeneralDefine.GetJobHeadPortrait(playerInfo.Job, 0));
            PlayerName.text = playerInfo.PlayerName;
            PlayerLV.text = playerInfo.LV.ToString();
            if (m_FriendModel.GetFirendInfo(playerInfo.PlayerID, 2) == null)
            {
                AddFriend.gameObject.SetActive(true);
                AddFriend.SetListener(() =>
                {
                    CB301_tagCGAddFriend addFriend = new CB301_tagCGAddFriend();
                    addFriend.TagID = playerInfo.PlayerID;
                    addFriend.TagName = "";
                    GameNetSystem.Instance.SendInfo(addFriend);
                });
            }
            else {
                AddFriend.gameObject.SetActive(false);
            }
        }
    }
}
System/Dungeon/AssistThanksCell.cs.meta
New file
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: b36e408061d249b4ca3ee7fd008cc652
timeCreated: 1577011590
licenseType: Pro
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
System/Dungeon/AssistThanksWin.cs
New file
@@ -0,0 +1,126 @@
using System;
using UnityEngine;
using UnityEngine.UI;
namespace Snxxz.UI
{
    [XLua.Hotfix]
    public class AssistThanksWin : Window
    {
        [SerializeField] ScrollerController AssistCtrl;
        [SerializeField] Button close;
        [SerializeField] Text AssistBossText;
        [SerializeField] ItemCell MyItem;
        [SerializeField] ItemCell ThanksItem;
        [SerializeField] Button OneKeyAddFriend;
        [SerializeField] Button Thanks;
        DungeonAssistModel assistModel { get { return ModelCenter.Instance.GetModel<DungeonAssistModel>(); } }
        FriendsModel m_FriendModel
        {
            get
            {
                return ModelCenter.Instance.GetModel<FriendsModel>();
            }
        }
        #region Built-in
        protected override void BindController()
        {
        }
        protected override void OnActived()
        {
        }
        protected override void AddListeners()
        {
            close.AddListener(CloseClick);
            Thanks.SetListener(() =>
            {
                var send = new CB014_tagCGUseAssistThanksGift();
                send.IsPreview = 0;
                send.ItemID = assistModel.assistThanksGift.ItemID;
                GameNetSystem.Instance.SendInfo(send);
                WindowCenter.Instance.Close<AssistThanksWin>();
            });
            OneKeyAddFriend.SetListener(OnOneKeyAddFriend);
        }
        protected override void OnPreOpen()
        {
            AssistCtrl.OnRefreshCell += OnRefreshRoleCell;
            var curNPC = NPCConfig.Get((int)assistModel.assistThanksGift.NPCID);
            AssistBossText.text = Language.Get("AssistBossThanks",
                MapConfig.Get((int)assistModel.assistThanksGift.MapID).Name, curNPC.charName, curNPC.NPCLV);
            AssistCtrl.Refresh();
            for (int i = 0; i < assistModel.assistThanksGift.AssistPlayerCount; i++)
            {
                AssistCtrl.AddCell(ScrollerDataType.Header, i);
            }
            AssistCtrl.Restart();
            var award = AssistThanksGiftConfig.Get((int)assistModel.assistThanksGift.ItemID);
            var myAwards = ConfigParse.GetMultipleStr(award.RequestPlayerAward);
            ItemCellModel cellModel = new ItemCellModel(int.Parse(myAwards[0]), true, (ulong)int.Parse(myAwards[1]));
            MyItem.Init(cellModel);
            MyItem.button.SetListener(() =>
            {
                ItemTipUtility.Show(int.Parse(myAwards[0]));
            });
            var thanksAwards = ConfigParse.GetMultipleStr(award.AssistPlayerAward);
            ItemCellModel cellModel2 = new ItemCellModel(int.Parse(thanksAwards[0]), true, (ulong)int.Parse(thanksAwards[1]));
            ThanksItem.Init(cellModel2);
            ThanksItem.button.SetListener(() =>
            {
                ItemTipUtility.Show(int.Parse(thanksAwards[0]));
            });
        }
        protected override void OnAfterOpen()
        {
        }
        protected override void OnPreClose()
        {
            AssistCtrl.OnRefreshCell -= OnRefreshRoleCell;
            assistModel.assistThanksGift = null;
        }
        protected override void OnAfterClose()
        {
        }
        #endregion
        private void OnRefreshRoleCell(ScrollerDataType type, CellView cell)
        {
            var roleCell = cell as AssistThanksCell;
            roleCell.Display(cell.index);
        }
        private void OnOneKeyAddFriend()
        {
            foreach (var playerInfo in assistModel.assistThanksGift.AssistPlayerList)
            {
                if (m_FriendModel.GetFirendInfo(playerInfo.PlayerID, 2) == null)
                {
                    CB301_tagCGAddFriend addFriend = new CB301_tagCGAddFriend();
                    addFriend.TagID = playerInfo.PlayerID;
                    addFriend.TagName = "";
                    GameNetSystem.Instance.SendInfo(addFriend);
                }
            }
        }
    }
}
System/Dungeon/AssistThanksWin.cs.meta
New file
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 7cd30a85e3bc6c049a12e215a4173faa
timeCreated: 1577010953
licenseType: Pro
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
System/Dungeon/DungeonAssistModel.cs
@@ -29,6 +29,8 @@
        public string assistGUID = string.Empty; //只要记录guid即可 后续优化
        public int assistActiveCnt = 0;
        #endregion
        public HB004_tagGCUseAssistThanksGiftPreview assistThanksGift = new HB004_tagGCUseAssistThanksGiftPreview();
        public HB005_tagGCGetAssistThanksGiftPreview receiveAssistThanksGift = new HB005_tagGCGetAssistThanksGiftPreview();
        public override void Init()
        {
@@ -79,9 +81,9 @@
            }
        }
        public bool IsNewAssistInfo
        public int ThanksGiftCount
        {
            get { return main_AssistRedpoint.state != RedPointState.None; }
            get { return main_ThanksRedpoint.count; }
        }
@@ -679,6 +681,33 @@
                UpdateAssisting();
        }
        // B0 05 接收协助感谢礼物预览 #tagGCGetAssistThanksGiftPreview
        public void OnGetAssistThanksGiftPreview(HB005_tagGCGetAssistThanksGiftPreview pack)
        {
            receiveAssistThanksGift = pack;
            if (!WindowCenter.Instance.IsOpen<ReceiveAssistThanksWin>())
            {
                WindowCenter.Instance.Open<ReceiveAssistThanksWin>();
            }
        }
        public void OnGetAssistThanksGiftCount(HB006_tagGCCanGetAssistThanksGiftCount pack)
        {
            main_ThanksRedpoint.count = pack.CanGetCount;
            if (pack.CanGetCount > 0)
            {
                main_ThanksRedpoint.state = RedPointState.Simple;
            }
            else
            {
                main_ThanksRedpoint.state = RedPointState.None;
            }
            if (UpdateRedpointEvent != null)
            {
                UpdateRedpointEvent();
            }
        }
        // B0 10 发起者请求协助Boss
        public void SendRequestAssistBoss(uint npcObjID)
        {
@@ -709,6 +738,24 @@
            assistGUID = string.Empty;
        }
        // B0 15 接收协助感谢礼物 #tagCGGetAssistThanksGift
        public void GetAssistThanksGift(byte isPreview)
        {
            var send = new CB015_tagCGGetAssistThanksGift();
            send.IsPreview = isPreview;
            GameNetSystem.Instance.SendInfo(send);
        }
        // B0 04 使用协助感谢礼盒预览 #tagGCUseAssistThanksGiftPreview
        public void OnUseAssistThanksGiftPreview(HB004_tagGCUseAssistThanksGiftPreview pack)
        {
            assistThanksGift = pack;
            if (!WindowCenter.Instance.IsOpen<AssistThanksWin>())
            {
                WindowCenter.Instance.Open<AssistThanksWin>();
            }
        }
        private void playerDataRefreshEvent(PlayerDataType type)
        {
            if (type == PlayerDataType.Family && PlayerDatas.Instance.baseData.FamilyId == 0)
@@ -723,6 +770,7 @@
        #region 红点
        public const int AssistCheckInRedPoint = 7800001;
        public Redpoint main_ThanksRedpoint = new Redpoint(7800002);
        public Redpoint main_AssistRedpoint = new Redpoint(51);//(7800002);
        public Redpoint checkInRedpoint { get; private set; }
        public event Action UpdateRedpointEvent;
@@ -774,10 +822,7 @@
                main_AssistRedpoint.state = RedPointState.None;
            }
            if (UpdateRedpointEvent != null)
            {
                UpdateRedpointEvent();
            }
        }
        #endregion
@@ -1457,5 +1502,17 @@
            public uint npcID;
            public string exData;
        }
        public struct AssistThanksGift
        {
            public uint ItemID;    //礼盒ID
            public uint MapID;
            public uint LineID;
            public uint NPCID;
            public ushort ExDataLen;
            public string ExData;    //其他自定义数据
            public byte AssistPlayerCount;
        }
    }
}
System/Dungeon/ReceiveAssistThanksWin.cs
New file
@@ -0,0 +1,116 @@
using System;
using UnityEngine;
using UnityEngine.UI;
namespace Snxxz.UI
{
    [XLua.Hotfix]
    public class ReceiveAssistThanksWin : Window
    {
        [SerializeField] Button close;
        [SerializeField] Text AssistBossText;
        [SerializeField] ItemCell MyItem;
        [SerializeField] Button Thanks;
        [SerializeField] Button CloseThanks;
        [SerializeField] Image PlayerIcon;
        [SerializeField] Text PlayerName;
        [SerializeField] Button AddFriend;
        [SerializeField] Text PlayerLV;
        DungeonAssistModel assistModel { get { return ModelCenter.Instance.GetModel<DungeonAssistModel>(); } }
        FriendsModel m_FriendModel
        {
            get
            {
                return ModelCenter.Instance.GetModel<FriendsModel>();
            }
        }
        #region Built-in
        protected override void BindController()
        {
        }
        protected override void OnActived()
        {
        }
        protected override void AddListeners()
        {
            close.AddListener(CloseClick);
            Thanks.SetListener(GetGift);
            CloseThanks.SetListener(GetGift);
        }
        private void GetGift()
        {
            assistModel.GetAssistThanksGift(0);
            WindowCenter.Instance.Close<ReceiveAssistThanksWin>();
            if (assistModel.ThanksGiftCount > 1)
            {
                assistModel.GetAssistThanksGift(1);
            }
        }
        protected override void OnPreOpen()
        {
            var curNPC = NPCConfig.Get((int)assistModel.receiveAssistThanksGift.NPCID);
            AssistBossText.text = Language.Get("ReceiveAssistThanks",
                MapConfig.Get((int)assistModel.receiveAssistThanksGift.MapID).Name, curNPC.charName, curNPC.NPCLV);
            var award = AssistThanksGiftConfig.Get((int)assistModel.receiveAssistThanksGift.ItemID);
            var thanksAwards = ConfigParse.GetMultipleStr(award.AssistPlayerAward);
            ItemCellModel cellModel2 = new ItemCellModel(int.Parse(thanksAwards[0]), true, (ulong)int.Parse(thanksAwards[1]));
            MyItem.Init(cellModel2);
            MyItem.button.SetListener(() =>
            {
                ItemTipUtility.Show(int.Parse(thanksAwards[0]));
            });
            var playerInfo = assistModel.receiveAssistThanksGift;
            PlayerIcon.SetSprite(GeneralDefine.GetJobHeadPortrait(playerInfo.Job, 0));
            PlayerName.text = playerInfo.PlayerName;
            PlayerLV.text = playerInfo.LV.ToString();
            if (m_FriendModel.GetFirendInfo(playerInfo.PlayerID, 2) == null)
            {
                AddFriend.gameObject.SetActive(true);
                AddFriend.SetListener(() =>
                {
                    CB301_tagCGAddFriend addFriend = new CB301_tagCGAddFriend();
                    addFriend.TagID = playerInfo.PlayerID;
                    addFriend.TagName = "";
                    GameNetSystem.Instance.SendInfo(addFriend);
                });
            }
            else
            {
                AddFriend.gameObject.SetActive(false);
            }
        }
        protected override void OnAfterOpen()
        {
        }
        protected override void OnPreClose()
        {
            assistModel.receiveAssistThanksGift = null;
        }
        protected override void OnAfterClose()
        {
        }
        #endregion
    }
}
System/Dungeon/ReceiveAssistThanksWin.cs.meta
New file
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 30465331ebd96444f89383124cad4a5b
timeCreated: 1577071378
licenseType: Pro
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
System/KnapSack/Logic/ItemLogicUtility.cs
@@ -1584,6 +1584,15 @@
            return config.SuiteiD > 0 && config.Type >= 101 && config.Type <= 112;
        }
        public bool IsThanksItem(int itemID)
        {
            if (AssistThanksGiftConfig.Get(itemID) == null)
            {
                return false;
            }
            return true;
        }
        public int GetSpecialSpiritPropertyValue(int itemId)
        {
            var config = SpiritWeaponConfig.Get(itemId);
System/KnapSack/Logic/ItemOperateUtility.cs
@@ -463,6 +463,15 @@
                var serverIndex = EquipSet.ClientPlaceToServerPlace(new Int2(useItemModel.config.LV, useItemModel.config.EquipPlace));
                PutOnEquip(serverIndex, guid);
                return;
            }
            if (ItemLogicUtility.Instance.IsThanksItem(useItemModel.itemId))
            {
                var send = new CB014_tagCGUseAssistThanksGift();
                send.IsPreview = 1;
                send.ItemID = (uint)useItemModel.itemId;
                GameNetSystem.Instance.SendInfo(send);
                return;
            }
            switch (useItemModel.config.Type)
System/MainInterfacePanel/MainButtonMisc.cs
@@ -28,7 +28,7 @@
        RedPacketModel redPacket { get { return ModelCenter.Instance.GetModel<RedPacketModel>(); } }
        WishingPoolModel wishModel { get { return ModelCenter.Instance.GetModel<WishingPoolModel>(); } }
        MysticalPurchaseModel purchaseModel { get { return ModelCenter.Instance.GetModel<MysticalPurchaseModel>(); } }
        //DungeonAssistModel assistModel { get { return ModelCenter.Instance.GetModel<DungeonAssistModel>(); } }
        DungeonAssistModel assistModel { get { return ModelCenter.Instance.GetModel<DungeonAssistModel>(); } }
        FriendsModel friendsModel { get { return ModelCenter.Instance.GetModel<FriendsModel>(); } }
        FairyModel fairyModel { get { return ModelCenter.Instance.GetModel<FairyModel>(); } }
        ReikiRootModel reikiRootModel { get { return ModelCenter.Instance.GetModel<ReikiRootModel>(); } }
@@ -63,7 +63,7 @@
            ClientCollectUtility.OnHideCollectIcon += OnLeaveCollectNpc;
            wishModel.UpdateWishAwardEvent += UpdateWishAwardImag;
            purchaseModel.UpdateNewMysticalEvent += UpdateMysticalPurchaseImag;
            //assistModel.UpdateRedpointEvent += UpdateDungeonAssistImag;
            assistModel.UpdateRedpointEvent += UpdateDungeonAssistImag;
            ChatTip.OnChatUpEvent += RefreshAdaptiveChat;
            fairyModel.UpdateFairyRequestEvent += UpdateFairyRequest;
        }
@@ -87,7 +87,7 @@
            ClientCollectUtility.OnHideCollectIcon -= OnLeaveCollectNpc;
            wishModel.UpdateWishAwardEvent -= UpdateWishAwardImag;
            purchaseModel.UpdateNewMysticalEvent -= UpdateMysticalPurchaseImag;
            //assistModel.UpdateRedpointEvent -= UpdateDungeonAssistImag;
            assistModel.UpdateRedpointEvent -= UpdateDungeonAssistImag;
            ChatTip.OnChatUpEvent -= RefreshAdaptiveChat;
            fairyModel.UpdateFairyRequestEvent -= UpdateFairyRequest;
            m_CollectBehaviour.gameObject.SetActive(false);
@@ -242,12 +242,13 @@
        private void ClickDungeonAssist()
        {
            WindowCenter.Instance.Open<DungeonAssistWin>();
            assistModel.GetAssistThanksGift(1);
            //WindowCenter.Instance.Open<DungeonAssistWin>();
        }
        private void UpdateDungeonAssistImag()
        {
            m_DungeonAssistImg.gameObject.SetActive(false);//(assistModel.IsNewAssistInfo);
            m_DungeonAssistImg.gameObject.SetActive(assistModel.ThanksGiftCount > 0);
        }
        private void RefreshAdaptiveChat()
Utility/ConfigInitiator.cs
@@ -304,6 +304,7 @@
        normalTasks.Add(new ConfigInitTask("EquipShenAttrConfig", () => { EquipShenAttrConfig.Init(); }, () => { return EquipShenAttrConfig.inited; }));
        normalTasks.Add(new ConfigInitTask("EquipShenEvolveConfig", () => { EquipShenEvolveConfig.Init(); }, () => { return EquipShenEvolveConfig.inited; }));
        normalTasks.Add(new ConfigInitTask("ItemPlusMasterConfig", () => { ItemPlusMasterConfig.Init(); }, () => { return ItemPlusMasterConfig.inited; }));
        normalTasks.Add(new ConfigInitTask("AssistThanksGiftConfig", () => { AssistThanksGiftConfig.Init(); }, () => { return AssistThanksGiftConfig.inited; }));
    }
    static List<ConfigInitTask> doingTasks = new List<ConfigInitTask>();