少年修仙传客户端代码仓库
client_Zxw
2018-11-23 83cedf87001a651f25b6545e0b84d1bb0dc72399
Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
4个文件已修改
273 ■■■■ 已修改文件
System/FindPrecious/FindPreciousBossRebornBehaviour.cs 131 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/FindPrecious/FindPreciousModel.cs 126 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/MainInterfacePanel/TaskAllocation.cs 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Rune/RuneModel.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/FindPrecious/FindPreciousBossRebornBehaviour.cs
@@ -62,21 +62,13 @@
                var bossId = model.currentBossNotify.bossId;
                var type = model.GetBossFindPreciousType(bossId);
                if (type == FindPreciousType.DemonJar && AutoGotoSkillDemonJarBoss(model.currentBossNotify))
                m_ContainerBossReborn.gameObject.SetActive(true);
                var config = Config.Instance.Get<NPCConfig>(bossId);
                if (config != null)
                {
                    m_ContainerBossReborn.gameObject.SetActive(false);
                    ReportConfirmBossRebornNotify();
                }
                else
                {
                    m_ContainerBossReborn.gameObject.SetActive(true);
                    var config = Config.Instance.Get<NPCConfig>(bossId);
                    if (config != null)
                    {
                        m_BossIcon.SetSprite(config.HeadPortrait);
                        m_BossName.text = config.charName;
                        m_BossLevel.text = Language.Get("FindPrecious_11", config.NPCLV);
                    }
                    m_BossIcon.SetSprite(config.HeadPortrait);
                    m_BossName.text = config.charName;
                    m_BossLevel.text = Language.Get("FindPrecious_11", config.NPCLV);
                }
            }
            else
@@ -125,117 +117,6 @@
            {
                m_ContainerBossReborn.gameObject.SetActive(false);
            }
        }
        private bool AutoGotoSkillDemonJarBoss(FindPreciousModel.BossNotify notify)
        {
            if (!demonJarModel.autoChallenge)
            {
                return false;
            }
            if (!notify.demonJarAuto)
            {
                return false;
            }
            if (DTCB105_tagMCPlayerWallow.forceOffLine)
            {
                return false;
            }
            if (NewBieCenter.Instance.inGuiding)
            {
                return false;
            }
            if (PlayerTaskDatas.IsOPenAutoResolve())
            {
                return false;
            }
            if (PlayerDatas.Instance.hero != null && PlayerDatas.Instance.hero.CurMapArea == (int)MapArea.E_Type.Boss)
            {
                return false;
            }
            if (PlayerDatas.Instance.hero != null && Time.realtimeSinceStartup - PlayerDatas.Instance.hero.calculAutoFightTime < 60f)
            {
                return false;
            }
            if (PlayerDatas.Instance.hero != null && PlayerDatas.Instance.hero.ActorInfo.serverDie)
            {
                return false;
            }
            if (PlayerDatas.Instance.hero != null && PlayerDatas.Instance.hero.IsDaZuo())
            {
                return false;
            }
            if (PlayerDatas.Instance.extersion.bossState == 1)
            {
                return false;
            }
            if (PlayerDatas.Instance.extersion.pkState == 1)
            {
                return false;
            }
            if (MapTransferUtility.Instance.NpcID != 0)
            {
                return false;
            }
            var surplusTimes = demonJarModel.GetSurplusTimes();
            var needTimes = demonJarModel.isDoubleAward ? 2 : 1;
            if (surplusTimes < needTimes)
            {
                return false;
            }
            var mapId = PlayerDatas.Instance.baseData.MapID;
            var mapConfig = Config.Instance.Get<MapConfig>(mapId);
            if (GeneralDefine.neutralMaps.Contains(mapId))
            {
                return false;
            }
            if (mapConfig.MapFBType != (int)MapType.OpenCountry)
            {
                return false;
            }
            if ((TaskAllocation.Instance.TaskTime - TimeUtility.ServerNow).TotalSeconds < 60)
            {
                return false;
            }
            var grabBossLine = 0;
            ModelCenter.Instance.GetModel<FairyGrabBossModel>().TryGetFairyGrabBossLine(out grabBossLine);
            if (grabBossLine != 0 && PlayerDatas.Instance.baseData.FBID == grabBossLine)
            {
                return false;
            }
            if (WindowCenter.Instance.ExitAnyFullScreenOrMaskWin())
            {
                return false;
            }
            if (WindowCenter.Instance.IsOpen("DemonJarWin") || WindowCenter.Instance.IsOpen("DemonJarAutoDoubleSettingWin"))
            {
                return false;
            }
            var bossId = notify.bossId;
            var config = Config.Instance.Get<DemonJarConfig>(bossId);
            dungeonModel.SingleChallenge(DemonJarModel.DEMONJAR_MAPID, config.LineID);
            demonJarModel.autoChallengeBoss = bossId;
            return true;
        }
        private void GotoKillDemonJarBoss(int _bossId)
System/FindPrecious/FindPreciousModel.cs
@@ -341,20 +341,28 @@
        {
            if (IsBossSubscribed(bossId) && !ExitBossNotify(bossId))
            {
                var notify = new BossNotify(bossId, demonJarModel.autoChallenge);
                var type = GetBossFindPreciousType(bossId);
                if (type == FindPreciousType.DemonJar && demonJarModel.GetSurplusTimes() <= 0)
                if (type == FindPreciousType.DemonJar)
                {
                    if (demonJarModel.GetSurplusTimes() > 0)
                    {
                        if (!AutoGotoSkillDemonJarBoss(notify))
                        {
                            bossNotifies.Add(notify);
                            currentBossNotify = GetNextBossNotify();
                        }
                    }
                }
                else
                {
                    bossNotifies.Add(new BossNotify(bossId, demonJarModel.autoChallenge));
                    bossNotifies.Add(notify);
                    currentBossNotify = GetNextBossNotify();
                }
            }
        }
        public void RemoveOneBossRebornNotify(int bossId )
        public void RemoveOneBossRebornNotify(int bossId)
        {
            if (ExitBossNotify(bossId))
            {
@@ -518,6 +526,116 @@
            }
        }
        private bool AutoGotoSkillDemonJarBoss(BossNotify notify)
        {
            if (!demonJarModel.autoChallenge)
            {
                return false;
            }
            if (!notify.demonJarAuto)
            {
                return false;
            }
            if (DTCB105_tagMCPlayerWallow.forceOffLine)
            {
                return false;
            }
            if (NewBieCenter.Instance.inGuiding)
            {
                return false;
            }
            if (!PlayerTaskDatas.IsOPenAutoResolve())
            {
                return false;
            }
            if (PlayerDatas.Instance.hero != null && PlayerDatas.Instance.hero.CurMapArea == (int)MapArea.E_Type.Boss)
            {
                return false;
            }
            if (PlayerDatas.Instance.hero != null && Time.realtimeSinceStartup - PlayerDatas.Instance.hero.calculAutoFightTime < 60f)
            {
                return false;
            }
            if (PlayerDatas.Instance.hero != null && PlayerDatas.Instance.hero.ActorInfo.serverDie)
            {
                return false;
            }
            if (PlayerDatas.Instance.hero != null && PlayerDatas.Instance.hero.IsDaZuo())
            {
                return false;
            }
            if (PlayerDatas.Instance.extersion.bossState == 1)
            {
                return false;
            }
            if (PlayerDatas.Instance.extersion.pkState == 1)
            {
                return false;
            }
            if (MapTransferUtility.Instance.NpcID != 0)
            {
                return false;
            }
            var surplusTimes = demonJarModel.GetSurplusTimes();
            var needTimes = demonJarModel.isDoubleAward ? 2 : 1;
            if (surplusTimes < needTimes)
            {
                return false;
            }
            var mapId = PlayerDatas.Instance.baseData.MapID;
            var mapConfig = Config.Instance.Get<MapConfig>(mapId);
            if (GeneralDefine.neutralMaps.Contains(mapId))
            {
                return false;
            }
            if (mapConfig.MapFBType != (int)MapType.OpenCountry)
            {
                return false;
            }
            if ((TimeUtility.ServerNow - TaskAllocation.Instance.TaskTime).TotalSeconds < 30)
            {
                return false;
            }
            var grabBossLine = 0;
            ModelCenter.Instance.GetModel<FairyGrabBossModel>().TryGetFairyGrabBossLine(out grabBossLine);
            if (grabBossLine != 0 && PlayerDatas.Instance.baseData.FBID == grabBossLine)
            {
                return false;
            }
            if (WindowCenter.Instance.ExitAnyFullScreenOrMaskWin())
            {
                return false;
            }
            if (WindowCenter.Instance.IsOpen("DemonJarWin") || WindowCenter.Instance.IsOpen("DemonJarAutoDoubleSettingWin"))
            {
                return false;
            }
            var bossId = notify.bossId;
            var config = Config.Instance.Get<DemonJarConfig>(bossId);
            dungeonModel.SingleChallenge(DemonJarModel.DEMONJAR_MAPID, config.LineID);
            demonJarModel.autoChallengeBoss = bossId;
            return true;
        }
        public class BossInfo
        {
System/MainInterfacePanel/TaskAllocation.cs
@@ -14,17 +14,15 @@
{
    [XLua.LuaCallCSharp]
public class TaskAllocation : Singleton<TaskAllocation>
    public class TaskAllocation : Singleton<TaskAllocation>
    {
        private static StringBuilder textBuilder = new StringBuilder();
        private const string Info_Pattern = "{([a-zA-Z0-9_]+)}";
        PlayerTaskDatas m_TaskModel;
        PlayerTaskDatas taskmodel
        {
            get
            {
        PlayerTaskDatas taskmodel {
            get {
                return m_TaskModel ?? (m_TaskModel = ModelCenter.Instance.GetModel<PlayerTaskDatas>());
            }
        }
@@ -156,7 +154,11 @@
            }
        }
        public DateTime TaskTime = DateTime.Now;
        DateTime m_TaskTime = DateTime.Now;
        public DateTime TaskTime {
            get { return m_TaskTime; }
            set { m_TaskTime = value; }
        }
    }
System/Rune/RuneModel.cs
@@ -169,7 +169,7 @@
            for (i = 0; i < runeTypes.Length; i++)
            {
                PlayerPropertyConfig playerPro = Config.Instance.Get<PlayerPropertyConfig>(runeTypes[i]);
                string _str = StringUtility.Contact(playerPro.Name, "  ", "+",
                string _str = StringUtility.Contact(playerPro.Name, "+",
                    UIHelper.ReplacePercentage(GetRuneAttrVal(id, level, runeTypes[i]), playerPro.ISPercentage),
                    playerPro.ISPercentage == 1 ? "%" : string.Empty, i == runeTypes.Length - 1 ? string.Empty : "\n");
                _textBuilder.Append(_str);