From f54f6c7531c426a59efa900c880ee86d90d38c9d Mon Sep 17 00:00:00 2001
From: client_Hale <339726288@qq.com>
Date: 星期四, 11 四月 2019 15:38:53 +0800
Subject: [PATCH] 382 增加战斗NPC类型

---
 Core/NetworkPackage/DTCFile/ServerPack/H04_Scene/DTC0406_tagNPCAppear.cs |    1 +
 /dev/null                                                                |   12 ------------
 Utility/EnumHelper.cs                                                    |    5 +++--
 3 files changed, 4 insertions(+), 14 deletions(-)

diff --git a/Core/NetworkPackage/DTCFile/ServerPack/H04_Scene/DTC0406_tagNPCAppear.cs b/Core/NetworkPackage/DTCFile/ServerPack/H04_Scene/DTC0406_tagNPCAppear.cs
index 112e111..2d25323 100644
--- a/Core/NetworkPackage/DTCFile/ServerPack/H04_Scene/DTC0406_tagNPCAppear.cs
+++ b/Core/NetworkPackage/DTCFile/ServerPack/H04_Scene/DTC0406_tagNPCAppear.cs
@@ -67,6 +67,7 @@
                     break;
                 case E_NpcType.Fight:
                 case E_NpcType.FMBoss:
+                case E_NpcType.MonsterTime:
 
                     if (_npcConfig.Country == 1)
                     {
diff --git a/Fight/Actor/AI/AI_BossDSX.cs b/Fight/Actor/AI/AI_BossDSX.cs
deleted file mode 100644
index 502b8d1..0000000
--- a/Fight/Actor/AI/AI_BossDSX.cs
+++ /dev/null
@@ -1,427 +0,0 @@
-锘縰sing UnityEngine;
-
-using Snxxz.UI;
-using System.Collections.Generic;
-using System;
-
-public class AI_BossDSX : SampleAI
-{
-    private float m_FirstSkill_HpPer;
-    private float m_SplitSkill_HpPer;
-    private float m_Fabao_HpPer;
-    private float m_Finished_HpPer;
-
-    private float m_TimeCount;
-
-    private static byte m_Step;
-    public static byte GetStep()
-    {
-        return m_Step;
-    }
-
-    private byte m_SubStep;
-
-    private UIEffect m_UIEffect;
-
-    private SkillContainer m_SkillContainer;
-    private SkillContainer skillContainer
-    {
-        get { return m_SkillContainer ?? (m_SkillContainer = GameObject.FindObjectOfType<SkillContainer>()); }
-    }
-
-    public AI_BossDSX(GA_NpcClientFightBoss owner, Vector3 bornPosition)
-        : base(owner, bornPosition)
-    {
-        m_Step = 0;
-        m_SubStep = 0;
-
-        m_CanCastSkill = false;
-
-        FuncConfigConfig _funcConfig = FuncConfigConfig.Get("PreFight_Skill1_HpPer");
-        m_FirstSkill_HpPer = float.Parse(_funcConfig.Numerical1) * Constants.F_DELTA;
-
-        _funcConfig = FuncConfigConfig.Get("PreFight_Skill3_HpPer");
-        m_SplitSkill_HpPer = float.Parse(_funcConfig.Numerical1) * Constants.F_DELTA;
-
-        _funcConfig = FuncConfigConfig.Get("PreFight_Fabao_HpPer");
-        m_Fabao_HpPer = float.Parse(_funcConfig.Numerical1) * Constants.F_DELTA;
-
-        _funcConfig = FuncConfigConfig.Get("PreFight_Finish_HpPer");
-        m_Finished_HpPer = float.Parse(_funcConfig.Numerical1) * Constants.F_DELTA;
-
-        m_BaseAtkSkillID = 10027;
-    }
-
-    protected override void OnUpdate()
-    {
-        if (PreFightMission.Instance.updateAI == false)
-        {
-            return;
-        }
-
-        base.OnUpdate();
-
-        if (GA_Hero.s_MapSwitching)
-        {
-            return;
-        }
-
-        switch (m_Step)
-        {
-            case 0:// 绛夊緟閲婃斁鍐查攱鎶�鑳�
-
-                if (m_Owner.ActorInfo.Hp * 1f / m_Owner.ActorInfo.MaxHp < m_FirstSkill_HpPer)
-                {
-                    m_Owner.ActorInfo.Hp = (uint)(m_Owner.ActorInfo.MaxHp * m_FirstSkill_HpPer);
-
-                    m_Owner.CastSkill(10028);
-
-                    m_TimeCount = 0;
-
-                    m_Step = 11;
-
-                    return;
-                }
-
-                break;
-            case 11:
-
-                return;
-
-            case 1:// 绛夊緟鍐查攱鎶�鑳介噴鏀剧粨鏉�
-
-                if (m_Owner.ActorInfo.Hp * 1f / m_Owner.ActorInfo.MaxHp < m_FirstSkill_HpPer)
-                {
-                    m_Owner.ActorInfo.Hp = (uint)(m_Owner.ActorInfo.MaxHp * m_FirstSkill_HpPer);
-                }
-
-                if (m_Owner.IsIdle() || m_Owner.IsHurt() || m_Owner.IsRun())
-                {
-                    m_Step = 4;
-                    PreFightMission.Instance.faBaoSkillShow = true;
-                }
-
-                return;
-
-            case 4:// 鍑嗗琛ㄦ紨鍒嗚韩
-
-                if (m_Owner.ActorInfo.Hp * 1f / m_Owner.ActorInfo.MaxHp < m_SplitSkill_HpPer)
-                {
-                    m_Owner.ActorInfo.Hp = (uint)(m_Owner.ActorInfo.MaxHp * m_SplitSkill_HpPer);
-                }
-
-                switch (m_SubStep)
-                {
-                    case 0:// 璧板埌鍑虹敓鐐�
-
-                        float _distSqrt = MathUtility.DistanceSqrtXZ(m_Owner.Pos, BornPos);
-                        if (_distSqrt > 0.5f)
-                        {
-                            m_Owner.MoveToPosition(BornPos);
-                        }
-                        else
-                        {
-                            m_SubStep = 0;
-                            m_Step = 41;
-                            m_TimeCount = 0;
-                            PlayerDatas.Instance.hero.Behaviour.StopKillUntilDieAI();
-
-                            DialogConfig _config = DialogConfig.Get(1005);
-
-                            StoryHintModel _model = ModelCenter.Instance.GetModel<StoryHintModel>();
-                            _model.icon = _config.icon;
-                            _model.name = _config.name;
-                            _model.content = _config.content;
-                            _model.duration = 3;
-                            _model.onClosed = null;
-
-                            WindowCenter.Instance.Open<StoryHintWin>();
-
-                            PreFightMission.Instance.updateAI = false;
-
-                            m_Owner.Forward = MathUtility.ForwardXZ(PlayerDatas.Instance.hero.Pos, m_Owner.Pos);
-                        }
-
-                        return;
-                }
-
-                break;
-            case 41:
-            case 42:
-            case 43:
-
-                return;
-
-            case 5:// 绛夊緟瑙﹀彂娉曞疂
-
-                if (m_Owner.ActorInfo.Hp * 1f / m_Owner.ActorInfo.MaxHp < m_Fabao_HpPer)
-                {
-                    m_Owner.ActorInfo.Hp = (uint)(m_Owner.ActorInfo.MaxHp * m_Fabao_HpPer);
-
-                    GA_Hero.s_MapSwitching = true;
-
-                    GuideDialogueModel _model = ModelCenter.Instance.GetModel<GuideDialogueModel>();
-                    _model.dialogID = 1004;
-                    _model.onClose = () =>
-                    {
-                        // 寮�鍚伄缃╁拰閬僵鎽勫儚鏈�
-                        CameraController.Instance.Mask.SetActive(true);
-                        CameraController.Instance.MaskCamera.gameObject.SetActive(true);
-                        CameraController.Instance.MaskCamera.enabled = true;
-                        PlayerDatas.Instance.hero.ReleaseShadow();
-
-                        PreFightMission.Instance.Step_FabaoEffect();
-
-                        SoundPlayer.Instance.PlayBackGroundMusicOneShot(48);
-                    };
-
-                    WindowCenter.Instance.Open<GuideDialogueWin>();
-
-                    if (PlayerDatas.Instance.hero.State == E_ActorState.AutoRun)
-                    {
-                        PlayerDatas.Instance.hero.StopPathFind();
-                    }
-
-                    PlayerDatas.Instance.hero.StopRush();
-                    PlayerDatas.Instance.hero.IdleImmediate();
-
-                    List<GActor> _actorList = GAMgr.Instance.GetGroupList(E_ActorGroup.Enemy);
-                    if (_actorList != null)
-                    {
-                        for (int i = 0; i < _actorList.Count; ++i)
-                        {
-                            if (_actorList[i].State == E_ActorState.AutoRun)
-                            {
-                                _actorList[i].StopPathFind();
-                            }
-
-                            if (!_actorList[i].IsIdle())
-                            {
-                                _actorList[i].IdleImmediate();
-                            }
-                        }
-                    }
-
-                    m_Step = 6;
-
-                    return;
-                }
-
-                break;
-
-            case 6:// 绛夊緟娉曞疂閫昏緫缁撴潫
-
-                if (m_Owner.ActorInfo.Hp * 1f / m_Owner.ActorInfo.MaxHp < m_Fabao_HpPer)
-                {
-                    m_Owner.ActorInfo.Hp = (uint)(m_Owner.ActorInfo.MaxHp * m_Fabao_HpPer);
-                }
-
-                if (WindowCenter.Instance.Get<TreasureNewGotWin>() == null
-                 || WindowCenter.Instance.Get<TreasureNewGotWin>().isActiveAndEnabled == false)
-                {
-                    m_Step = 7;
-                }
-
-                return;
-
-            case 7:// 绛夊緟浠诲姟缁撴潫
-
-                if (m_Owner.ActorInfo.Hp * 1f / m_Owner.ActorInfo.MaxHp <= m_Finished_HpPer)
-                {
-                    m_Owner.ActorInfo.Hp = (uint)(m_Owner.ActorInfo.MaxHp * m_Finished_HpPer);
-
-                    GA_Hero.s_MapSwitching = true;
-                    m_Owner.IdleImmediate();
-
-                    SelectionManager.Release(SelectionManager.E_Type.Red);
-                    SelectionManager.Request(SelectionManager.E_Type.Green, m_Owner);
-
-                    PreFightMission.Instance.Step_StartScale();
-
-                    m_Step = 8;
-                }
-
-                break;
-            case 8:// boss缂╁皬
-                return;
-        }
-
-        if (m_Owner.SkillMgr.DoingPrepareSkill)
-        {
-            return;
-        }
-
-        if (m_Owner.SkillMgr.CurCastSkill != null
-            && m_Owner.SkillMgr.CurCastSkill.SkillCompelete == false)
-        {
-            return;
-        }
-
-        if (m_Owner.NextAction == 300)
-        {
-            return;
-        }
-
-        switch (m_AIStatus)
-        {
-            case E_AIStatus.Attack:
-
-                BaseAttack();
-
-                break;
-
-            case E_AIStatus.Patrol:
-
-                Patrol();
-
-                break;
-            case E_AIStatus.MoveToTarget:
-
-                MoveToTarget();
-
-                break;
-            case E_AIStatus.MoveToBornPos:
-
-                MoveToBornPosMin();
-
-                break;
-        }
-    }
-
-    private void BossFinishedSkillShow()
-    {
-        PreFightMission.Instance.OnFinishedBossSkillShow -= BossFinishedSkillShow;
-        Skill _skill = m_Owner.SkillMgr.Get(10026);
-        _skill.cd = 0;
-        m_Owner.CastSkill(10026);
-        m_Step = 43;
-        m_TimeCount = 0;
-
-        GA_Hero.s_MapSwitching = false;
-    }
-
-    private void OnCastSkill(int id)
-    {
-        HeroBehaviour.OnUserClickSkill -= OnCastSkill;
-
-        if (id == 190)
-        {
-            Time.timeScale = 1;
-            GA_Hero.s_MapSwitching = false;
-            if (PreFightMission.Instance.m_HuaShouEffect)
-            {
-                EffectMgr.Instance.RecyleUIEffect(1050, PreFightMission.Instance.m_HuaShouEffect.gameObject);
-                PreFightMission.Instance.m_HuaShouEffect = null;
-            }
-
-            if (m_UIEffect)
-            {
-                EffectMgr.Instance.RecyleUIEffect(m_UIEffect.effect, m_UIEffect.gameObject);
-                m_UIEffect = null;
-            }
-
-            Transform _temp1 = WindowCenter.Instance.uiRoot.baseCanvas.Find("MainInterfaceWin/JoyStick");
-            _temp1.gameObject.SetActive(true);
-
-            WindowCenter.Instance.Close<NewGuideWin>();
-        }
-    }
-
-    protected override void OutOfSleepUpdate()
-    {
-        base.OutOfSleepUpdate();
-
-        if (m_Step == 11)
-        {
-            m_TimeCount += Time.deltaTime;
-            if (m_TimeCount > 0.75f)
-            {
-                PlayerDatas.Instance.hero.Behaviour.StopKillUntilDieAI();
-                skillContainer.blinkSkill.GetComponent<SkillButton>().enabled = false;
-                skillContainer.blinkSkill.transform.localScale = Vector3.one;
-
-                Transform _temp = skillContainer.blinkSkill.transform.Find("Img_BackGround");
-                m_UIEffect = EffectMgr.Instance.PlayUIEffect(1095, 4500, _temp, false);
-
-                _temp = WindowCenter.Instance.uiRoot.baseCanvas.Find("MainInterfaceWin/JoyStick");
-                _temp.gameObject.SetActive(false);
-
-
-
-                m_Step = 12;
-                m_TimeCount = 0;
-            }
-        }
-        else if (m_Step == 12)
-        {
-            m_TimeCount += Time.deltaTime;
-            if (m_TimeCount > 0.4f)
-            {
-                Time.timeScale = 0;
-                skillContainer.blinkSkill.GetComponent<SkillButton>().enabled = true;
-                GA_Hero.s_MapSwitching = true;
-                NewGuideModel _model = ModelCenter.Instance.GetModel<NewGuideModel>();
-                _model.showMask = true;
-                _model.content = "鐐瑰嚮<color=#00FF00>缈绘粴</color>鎸夐挳\r\n韬查伩<color=#00FF00>棰勮</color>鎶�鑳�";
-                _model.componentPath = "BaseCanvas/MainInterfaceWin/SkillButtonTip/Pivot/CastSkillTip/Skill_Panel/Skill_Group1/Btn_BlinkSkill/Img_BackGround";
-                _model.size = new Vector2(62, 62);
-                _model.direction = 2;
-                _model.pressedClose = false;
-                _model.clickClosed = true;
-                _model.onClose = () =>
-                {
-                    Time.timeScale = 1;
-                    GA_Hero.s_MapSwitching = false;
-                    if (PreFightMission.Instance.m_HuaShouEffect)
-                    {
-                        EffectMgr.Instance.RecyleUIEffect(1050, PreFightMission.Instance.m_HuaShouEffect.gameObject);
-                        PreFightMission.Instance.m_HuaShouEffect = null;
-                    }
-
-                    PlayerDatas.Instance.hero.CastSkill(190);
-
-                    if (m_UIEffect)
-                    {
-                        EffectMgr.Instance.RecyleUIEffect(m_UIEffect.effect, m_UIEffect.gameObject);
-                        m_UIEffect = null;
-                    }
-
-                    Transform _temp1 = WindowCenter.Instance.uiRoot.baseCanvas.Find("MainInterfaceWin/JoyStick");
-                    _temp1.gameObject.SetActive(true);
-                };
-
-                WindowCenter.Instance.Open<NewGuideWin>();
-
-                HeroBehaviour.OnUserClickSkill += OnCastSkill;
-
-                Transform _temp = skillContainer.blinkSkill.transform.Find("Img_BackGround");
-                PreFightMission.Instance.m_HuaShouEffect = EffectMgr.Instance.PlayUIEffect(1050, 4500, _temp, true);
-
-                m_Step = 1;
-            }
-        }
-        else if (m_Step == 41)
-        {
-            m_TimeCount += Time.deltaTime;
-            if (m_TimeCount > 1f)
-            {
-                PreFightMission.Instance.Step_Boss_SkillShow();
-                PreFightMission.Instance.OnFinishedBossSkillShow += BossFinishedSkillShow;
-
-                GA_Hero.s_MapSwitching = true;
-
-                m_Step = 42;
-            }
-        }
-        else if (m_Step == 43)
-        {
-            m_TimeCount += Time.deltaTime;
-            if (m_TimeCount > 1.2f)
-            {
-                PreFightMission.Instance.updateAI = true;
-                m_Step = 5;
-                PreFightMission.Instance.faBaoSkillShow = false;
-            }
-        }
-    }
-}
diff --git a/Fight/Actor/AI/AI_BossDSX.cs.meta b/Fight/Actor/AI/AI_BossDSX.cs.meta
deleted file mode 100644
index 232ab26..0000000
--- a/Fight/Actor/AI/AI_BossDSX.cs.meta
+++ /dev/null
@@ -1,12 +0,0 @@
-fileFormatVersion: 2
-guid: 265e7ff764601cf44991055e126d0d33
-timeCreated: 1514970107
-licenseType: Pro
-MonoImporter:
-  serializedVersion: 2
-  defaultReferences: []
-  executionOrder: 0
-  icon: {instanceID: 0}
-  userData: 
-  assetBundleName: 
-  assetBundleVariant: 
diff --git a/Utility/EnumHelper.cs b/Utility/EnumHelper.cs
index 02247d3..9798416 100644
--- a/Utility/EnumHelper.cs
+++ b/Utility/EnumHelper.cs
@@ -120,6 +120,7 @@
     BreakableObj = 19,//鍦烘櫙鍙鏀诲嚮鐗�     19
     FightAssist = 20,// 鍔╂垬
     SGZC_FightAssist = 21,// 涓婂彜鎴樺満鍔╂垬
+    MonsterTime = 22,// 鎸夋椂闂存帀琛�
     OpenWorldMap = 99,// 鎵撳紑涓栫晫鍦板浘
 }
 
@@ -749,8 +750,8 @@
     EveryLvAddHp = 53, //姣�1绾�+%s鐢熷懡
     AddEquipDropPrecent = 54, //澧炲姞瑁呭鎺夎惤鐜�
     AddCoinsPrecent = 55,//澧炲姞閲戝竵
-    ArmorMaxHPPer=63,//鍩虹瑁呭鐢熷懡
-    WeaponAtkPer =65,//鍩虹瑁呭鏀诲嚮
+    ArmorMaxHPPer = 63,//鍩虹瑁呭鐢熷懡
+    WeaponAtkPer = 65,//鍩虹瑁呭鏀诲嚮
     ArmorDefPer = 66, //闃插叿闃插尽鐧惧垎姣�
     MinAtk = 67, //鏈�灏忔敾鍑�
     MaxAtk = 68, //鏈�澶ф敾鍑�

--
Gitblit v1.8.0