少年修仙传客户端代码仓库
client_Wu Xijin
2019-05-27 7798bd3463a8e272a8f32435faa46e82fd045213
Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts

# Conflicts:
# System/Dungeon/DungeonFightWin.cs
17个文件已修改
2个文件已添加
600 ■■■■ 已修改文件
Fight/Stage/Dungeon/ClientDungeonStageUtility.cs 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/Stage/Dungeon/ClientGuardDungeon.cs 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/Stage/Dungeon/ClientGuardDungeon.cs.meta 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/Stage/Dungeon/GuardDungeonStage.cs 380 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Activity/ActivityNotifyBehaviour.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/CrossServerOneVsOne/CrossServerOneVsOneModel.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/DailyQuest/DailyQuestModel.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Dungeon/DungeonFightWin.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Dungeon/DungeonModel.cs 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Dungeon/DungeonVictoryWin.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/GMCommand/GMInputWin.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/HazyRegion/HazyRegionModel.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/ItemDrop/DropItem.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/MainInterfacePanel/DialogueDuidanceWin.cs 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/MainInterfacePanel/TaskBoxBGMWin.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/MainInterfacePanel/TaskModel.cs 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Store/StoreWin.cs 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Treasure/ClientTreasureDungeonStage.cs 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Treasure/NormalDialogueWin.cs 65 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/Stage/Dungeon/ClientDungeonStageUtility.cs
@@ -11,12 +11,15 @@
    public static ushort clientMapId { get; private set; }
    public static Dungeon dungeonInfo { get; set; }
    static int clientErrorSymbolMapId = 0;
    static Action<Dungeon, bool> clientCustomDungeonResult;
    public static void Init()
    {
        DTC0102_tagCDBPlayer.switchAccountEvent += Reset;
        DTC0403_tagPlayerLoginLoadOK.playerLoginOkEvent += OnPlayerLoginOk;
        StageLoad.Instance.onStageLoadFinish += OnStageLoadFinish;
    }
    public static void SetClientDungeon(bool value, ushort mapId)
@@ -135,6 +138,7 @@
            case PersonalBossModel.PERSONALBOSS_MAPID:
            case HazyRegionModel.PRECIOUS_CLIENTDATAMAP:
            case TreasureModel.CLIENTDATAMAP:
            case ClientGuardDungeon.DATAMAPID:
                return mapId;
            default:
                return mapId;
@@ -145,10 +149,37 @@
    {
        if (isClientDungeon)
        {
            RequestStartClientDungeon(dungeonInfo.mapId, dungeonInfo.lineId, null);
            RequestStartClientDungeon(dungeonInfo.mapId, dungeonInfo.lineId, (dungeonInfo, isOk) =>
            {
                if (!isOk)
                {
                    if (StageLoad.Instance.isLoading)
                    {
                        clientErrorSymbolMapId = dungeonInfo.mapId;
                        return;
                    }
                    if (isClientDungeon)
                    {
                        ExitNormalClientDungeon();
                    }
                }
            });
        }
    }
    private static void OnStageLoadFinish()
    {
        if (clientErrorSymbolMapId != 0)
        {
            if (isClientDungeon && dungeonInfo.mapId == clientErrorSymbolMapId)
            {
                ExitNormalClientDungeon();
            }
        }
        clientErrorSymbolMapId = 0;
    }
    private static void Reset()
    {
        isClientDungeon = false;
Fight/Stage/Dungeon/ClientGuardDungeon.cs
New file
@@ -0,0 +1,19 @@
using Snxxz.UI;
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public static class ClientGuardDungeon
{
    public const int DATAMAPID = 31250;
    public static void RequestEnter()
    {
        ClientDungeonStageUtility.GotoNormalClientDungeon(DATAMAPID, DATAMAPID, 0);
    }
    public static void RequestExit()
    {
        ClientDungeonStageUtility.ExitNormalClientDungeon();
    }
}
Fight/Stage/Dungeon/ClientGuardDungeon.cs.meta
New file
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: f26e51155854ab84c96a2b85411ae434
timeCreated: 1557566381
licenseType: Pro
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
Fight/Stage/Dungeon/GuardDungeonStage.cs
@@ -2,16 +2,43 @@
using System.Collections.Generic;
using UnityEngine;
using Snxxz.UI;
using System;
public class GuardDungeonStage : DungeonStage
{
    DungeonModel m_Model { get { return ModelCenter.Instance.GetModel<DungeonModel>(); } }
    int stepBuf = -1;
    readonly Vector3 s_PlayerPosition = new Vector3(16.8f, 1.441f, 9.09f);
    readonly List<Vector3> s_MonsterPositions = new List<Vector3>()
    {
        new Vector3(10f, 1.441f, 10),
        new Vector3(10f, 1.441f, 10),
        new Vector3(13.5f,1.441f,11.5f),
        new Vector3(13.5f,1.441f,11.5f),
        new Vector3(13f,1.441f,12.5f),
        new Vector3(12.5f,1.441f,13f),
        new Vector3(11f,1.441f,13.5f),
        new Vector3(11f,1.441f,13f),
        new Vector3(10.5f,1.441f,8.5f),
        new Vector3(10.5f,1.441f,8.5f),
        new Vector3(12f,1.441f,8.5f),
        new Vector3(12f,1.441f,9f),
    };
    int guardNPCID = 32504001;
    int bossNPCID = 32503001;
    int monsterNPCID = 32501001;
    readonly Vector3 s_BossPosition = new Vector3(9f, 1.441f, 12f);
    readonly Vector3 s_CagePosition = new Vector3(11f, 1.441f, 11f);
    readonly Vector3 s_GuardPosition = new Vector3(11f, 1.441f, 11f);
    readonly int s_GuardNpcId = 32504001;
    readonly int s_BossNpcId = 32503001;
    readonly int s_MonsterNpcId = 32501001;
    static int[] stepTimes = null;
    List<GA_NpcClientFightNorm> clientMonsters = new List<GA_NpcClientFightNorm>();
    GA_NpcClientFightBoss clientBoss;
    GA_NpcClientFightNorm clientCage;
    GA_NpcClientFunc clientGuard;
    Clock dungeonEndClock;
    BossShowStep bossShowStep;
    KillMonsterStep killMonsterStep;
@@ -72,9 +99,52 @@
    int guardDialogueIndex = 0;
    float guardDialogueAbleTime = 0f;
    int enemyDeadCount = 0;
    int dialogueNpcId = 0;
    int[] speakTypes = null;
    string[] dialogues = null;
    List<Item> items = null;
    int autoDialogueSecond = 10;
    bool initialized = false;
    DungeonModel model { get { return ModelCenter.Instance.GetModel<DungeonModel>(); } }
    public override void Initialize()
    {
        base.Initialize();
        if (!initialized)
        {
            var funcConfig = FuncConfigConfig.Get("ClientGuardDungeon");
            dialogueNpcId = int.Parse(funcConfig.Numerical1);
            speakTypes = ConfigParse.GetMultipleStr<int>(funcConfig.Numerical2);
            dialogues = ConfigParse.GetMultipleStr(funcConfig.Numerical3);
            var itemDict = ConfigParse.GetDic<int, int>(funcConfig.Numerical4);
            if (itemDict != null)
            {
                items = new List<Item>();
                foreach (var itemId in itemDict.Keys)
                {
                    items.Add(new Item()
                    {
                        id = itemId,
                        count = itemDict[itemId],
                    });
                }
            }
            funcConfig = FuncConfigConfig.Get("TaskContinue");
            autoDialogueSecond = int.Parse(funcConfig.Numerical2);
            var dungeonId = model.GetDungeonId(ClientGuardDungeon.DATAMAPID, 0);
            var dungeonConfig = DungeonConfig.Get(dungeonId);
            stepTimes = LitJson.JsonMapper.ToObject<int[]>(dungeonConfig.StepTime);
            initialized = true;
        }
        bossShowStep = new BossShowStep(this);
        killMonsterStep = new KillMonsterStep(this);
@@ -83,18 +153,32 @@
        dungeonOverStep = new DungeonOver(this);
        step = Step.None;
        stepBuf = -1;
        PlayerDatas.Instance.hero.aiHandler.PriorityNpcID = monsterNPCID;
        PlayerDatas.Instance.hero.aiHandler.PriorityNpcID = s_MonsterNpcId;
        m_Model.updateMissionEvent += OnDungeonMissionUpdate;
        BossShowModel.Instance.bossShowPreparedEvent += OnBossShowBegin;
        BossShowModel.Instance.bossShowCompletedEvent += BossShowCompletedEvent;
        NPCInteractProcessor.s_NpcInteractEvent += OnNpcTalkEvent;
        model.onDungeonResultEvent += OnDungeonResultEvent;
        NormalDialogueWin.onDialogueComplete += OnDialogueComplete;
    }
    public override void UnInitialize()
    {
        m_Model.updateMissionEvent -= OnDungeonMissionUpdate;
        UnloadNpcs();
        if (dungeonEndClock != null)
        {
            Clock.Stop(dungeonEndClock);
            dungeonEndClock = null;
        }
        BossShowModel.Instance.bossShowPreparedEvent -= OnBossShowBegin;
        BossShowModel.Instance.bossShowCompletedEvent -= BossShowCompletedEvent;
        NPCInteractProcessor.s_NpcInteractEvent -= OnNpcTalkEvent;
        NormalDialogueWin.onDialogueComplete -= OnDialogueComplete;
        model.onDungeonResultEvent -= OnDungeonResultEvent;
        base.UnInitialize();
    }
@@ -102,11 +186,97 @@
    protected override void OnStageLoadFinish()
    {
        base.OnStageLoadFinish();
        InitializeHero();
        InitializeNpcs();
    }
    void InitializeHero()
    {
        var hero = PlayerDatas.Instance.hero;
        if (hero != null)
        {
            hero.Pos = s_PlayerPosition;
        }
    }
    void InitializeNpcs()
    {
        UnloadNpcs();
        foreach (var position in s_MonsterPositions)
        {
            var npc = GAMgr.Instance.ReqClntFightNpc<GA_NpcClientFightNorm>((uint)s_MonsterNpcId, E_ActorGroup.Enemy);
            npc.Pos = position;
            npc.LockTargetSID = PlayerDatas.Instance.PlayerId;
            clientMonsters.Add(npc);
        }
        clientBoss = GAMgr.Instance.ReqClntFightNpc<GA_NpcClientFightBoss>((uint)s_BossNpcId, E_ActorGroup.Enemy);
        clientBoss.Pos = s_BossPosition;
        clientBoss.LockTargetSID = PlayerDatas.Instance.PlayerId;
        clientBoss.Rotation = Quaternion.Euler(0, 116.5f, 0);
        clientCage = GAMgr.Instance.ReqClntFightNpc<GA_NpcClientFightNorm>((uint)GeneralDefine.guardDungeonCageNPCID, E_ActorGroup.Enemy);
        clientCage.Pos = s_CagePosition;
        clientCage.Rotation = Quaternion.Euler(0, 116.5f, 0);
        clientCage.LockHp(1);
        clientGuard = GAMgr.Instance.ReqClntNoFightNpc<GA_NpcClientFunc>((uint)s_GuardNpcId, E_ActorGroup.FuncNpc);
        clientGuard.Pos = s_GuardPosition;
        clientGuard.Rotation = Quaternion.Euler(0, 0, 0);
        enemyDeadCount = 0;
    }
    void UnloadNpcs()
    {
        for (int i = 0; i < clientMonsters.Count; i++)
        {
            var npc = clientMonsters[i];
            if (npc != null)
            {
                GAMgr.Instance.ServerDie(npc.ServerInstID);
                GAMgr.Instance.Release(npc);
            }
        }
        clientMonsters.Clear();
        if (clientBoss != null)
        {
            GAMgr.Instance.ServerDie(clientBoss.ServerInstID);
            GAMgr.Instance.Release(clientBoss);
            clientBoss = null;
        }
        if (clientCage != null)
        {
            GAMgr.Instance.ServerDie(clientCage.ServerInstID);
            GAMgr.Instance.Release(clientCage);
            clientCage = null;
        }
        if (clientGuard != null)
        {
            GAMgr.Instance.ServerDie(clientGuard.ServerInstID);
            GAMgr.Instance.Release(clientGuard);
            clientGuard = null;
        }
    }
    protected override void OnUpdate()
    {
        base.OnUpdate();
        if (step == Step.KillMonster)
        {
            UpdateNpcDeadCount();
        }
        if (step == Step.DestroyCage)
        {
            UpdateCageState();
        }
        switch (step)
        {
@@ -128,24 +298,145 @@
        }
    }
    private void OnDungeonMissionUpdate()
    private void UpdateNpcDeadCount()
    {
        var mission = m_Model.mission;
        var requreUpdate = false;
        if (mission.step != 0)
        var deadCount = 0;
        for (int i = 0; i < clientMonsters.Count; i++)
        {
            if (stepBuf != mission.step)
            if (clientMonsters[i].ActorInfo.serverDie)
            {
                step = (Step)mission.step;
                stepBuf = mission.step;
                deadCount++;
            }
        }
        if (clientBoss != null && clientBoss.ActorInfo.serverDie)
        {
            deadCount += 1;
        }
        if (deadCount != enemyDeadCount)
        {
            enemyDeadCount = deadCount;
            requreUpdate = true;
        }
        if (requreUpdate)
        {
            UpdateDungeonMission();
        }
        if (enemyDeadCount == clientMonsters.Count + 1)
        {
            step = Step.DestroyCage;
            UpdateDungeonMission();
        }
    }
    private void UpdateCageState()
    {
        if (clientCage.ActorInfo.serverDie)
        {
            step = Step.GuardDialogue;
            UpdateDungeonMission();
        }
    }
    void UpdateDungeonMission()
    {
        var missionData = new DungeonMissionData()
        {
            lineID = 0,
            step = (int)step,
            npcTotal = enemyDeadCount,
            npc = new DungeonNPCInfo[1]
            {
                new DungeonNPCInfo()
                {
                    NPCID=GeneralDefine.guardDungeonCageNPCID,
                    killCnt= (int)step > (int)Step.DestroyCage ? 1 : 0,
                },
            },
            talkOver = (int)step > (int)Step.GuardDialogue ? 1 : 0,
        };
        model.UpdateFakeDungeonMission(ClientGuardDungeon.DATAMAPID, missionData);
    }
    private void OnBossShowBegin()
    {
        step = Step.BossShow;
    }
    private void BossShowCompletedEvent()
    {
        var seconds = stepTimes[1];
        model.UpdateCoolDown(DungeonCoolDownType.FightStart, (uint)seconds * 1000);
        dungeonEndClock = Clock.AlarmAfter(seconds, OnDungeonEnd);
        step = Step.KillMonster;
        UpdateDungeonMission();
    }
    private void OnNpcTalkEvent(E_NpcType arg1, int npcId, uint arg3)
    {
        if (npcId == s_GuardNpcId && step == Step.GuardDialogue)
        {
            if (!WindowCenter.Instance.IsOpen<NormalDialogueWin>())
            {
                WindowCenter.Instance.Close<MainInterfaceWin>();
                NormalDialogueWin.customDialogueInfo = new CustomDialogueInfo()
                {
                    dialogues = dialogues,
                    speakTypes = speakTypes,
                    npcId = dialogueNpcId,
                    autoSeconds = autoDialogueSecond,
                    items = new List<Item>(items),
                };
                WindowCenter.Instance.Open<NormalDialogueWin>();
            }
        }
    }
    private void OnDialogueComplete()
    {
        var pak = new CB101_tagCMClientEndFB();
        pak.MapID = ClientGuardDungeon.DATAMAPID;
        pak.LineID = 0;
        GameNetSystem.Instance.SendInfo(pak);
    }
    private void OnDungeonResultEvent()
    {
        if (dungeonEndClock != null)
        {
            Clock.Stop(dungeonEndClock);
            dungeonEndClock = null;
        }
        var seconds = stepTimes[2];
        model.UpdateCoolDown(DungeonCoolDownType.LeaveMap, (uint)seconds * 1000);
        step = Step.Over;
        UpdateDungeonMission();
    }
    private void OnDungeonEnd()
    {
        ClientGuardDungeon.RequestExit();
    }
#if UNITY_EDITOR
    private void OnGUI()
    {
        if (GUILayout.Button("Exit"))
        {
            ClientGuardDungeon.RequestExit();
        }
    }
#endif
    class BossShowStep
    {
@@ -169,7 +460,7 @@
            for (int i = 0; i < showActors.Count; i++)
            {
                var showActor = showActors[i];
                if (showActor.npcId == dungeonStage.guardNPCID)
                if (showActor.npcId == dungeonStage.s_GuardNpcId)
                {
                    showActor.m_Model.transform.localScale = Vector3.one * 3;
                }
@@ -178,7 +469,7 @@
            for (int i = 0; i < showActors.Count; i++)
            {
                var showActor = showActors[i];
                if (dungeonStage.monsterNPCID == showActor.npcId)
                if (dungeonStage.s_MonsterNpcId == showActor.npcId)
                {
                    var mountPoint = showActor.m_Model.transform.GetChildTransformDeeply("A_Name");
@@ -198,7 +489,7 @@
                            break;
                    }
                }
                else if (dungeonStage.bossNPCID == showActor.npcId)
                else if (dungeonStage.s_BossNpcId == showActor.npcId)
                {
                    var mountPoint = showActor.m_Model.transform.GetChildTransformDeeply("A_Stun");
                    StoryDialogueBubble.StoryShow(Language.Get("BossShowTalk1"), mountPoint, BossShowModel.Instance.showCamera);
@@ -219,14 +510,14 @@
                {
                    var showActor = showActors[i];
                    if (dungeonStage.monsterNPCID == showActor.npcId)
                    if (dungeonStage.s_MonsterNpcId == showActor.npcId)
                    {
                        var mountPoint = showActor.m_Model.transform.GetChildTransformDeeply("A_Name");
                        HeadUpStorySign.Display(mountPoint, BossShowModel.Instance.showCamera);
                        showActor.m_Model.transform.LookAt(BossShowModel.Instance.showCamera.transform);
                        showActor.m_Model.transform.localEulerAngles = showActor.m_Model.transform.localEulerAngles.SetX(0f);
                    }
                    else if (dungeonStage.bossNPCID == showActor.npcId)
                    else if (dungeonStage.s_BossNpcId == showActor.npcId)
                    {
                        var mountPoint = showActor.m_Model.transform.GetChildTransformDeeply("A_Stun");
                        HeadUpStorySign.Display(mountPoint, BossShowModel.Instance.showCamera);
@@ -241,7 +532,7 @@
                    var showActor = showActors[i];
                    if (showActor.m_Model != null)
                    {
                        if (dungeonStage.monsterNPCID == showActor.npcId)
                        if (dungeonStage.s_MonsterNpcId == showActor.npcId)
                        {
                            var cameraPosition = BossShowModel.Instance.showCamera.transform.position;
                            var monsterPosition = showActor.m_Model.transform.position;
@@ -260,7 +551,7 @@
                for (int i = 0; i < showActors.Count; i++)
                {
                    var showActor = showActors[i];
                    if (dungeonStage.guardNPCID == showActor.npcId)
                    if (dungeonStage.s_GuardNpcId == showActor.npcId)
                    {
                        dungeonStage.guardDialogueAbleTime = Time.time + GeneralDefine.guardBubbleInterval;
                        var mountPoint = showActor.m_Model.transform.GetChildTransformDeeply("A_Name");
@@ -300,6 +591,13 @@
            guardScaled = false;
            guardAdjustPosition = false;
            cageInvincibleEffect = null;
            foreach (var monster in dungeonStage.clientMonsters)
            {
                monster.LockTargetSID = PlayerDatas.Instance.PlayerId;
            }
            dungeonStage.clientBoss.LockTargetSID = PlayerDatas.Instance.PlayerId;
        }
        public void OnUpdate()
@@ -314,7 +612,7 @@
            {
                for (int i = 0; i < actors.Count; i++)
                {
                    var actor = actors[i] as GActorNpcFight;
                    var actor = actors[i] as GA_NpcClientFightNorm;
                    if (actor != null
                     && actor.NpcConfig.NPCID == GeneralDefine.guardDungeonCageNPCID)
                    {
@@ -331,8 +629,8 @@
                {
                    for (int i = 0; i < functionNpcs.Count; i++)
                    {
                        var actor = functionNpcs[i] as GA_NpcFunc;
                        if (actor.NpcConfig.NPCID == dungeonStage.guardNPCID)
                        var actor = functionNpcs[i] as GA_NpcClientFunc;
                        if (actor.NpcConfig.NPCID == dungeonStage.s_GuardNpcId)
                        {
                            var yoffset = actor.Pos.y;
                            actor.Pos = cageInvincibleEffect.transform.position.SetY(yoffset);
@@ -348,8 +646,8 @@
                {
                    for (int i = 0; i < functionNpcs.Count; i++)
                    {
                        var actor = functionNpcs[i] as GA_NpcFunc;
                        if (actor.NpcConfig.NPCID == dungeonStage.guardNPCID)
                        var actor = functionNpcs[i] as GA_NpcClientFunc;
                        if (actor.NpcConfig.NPCID == dungeonStage.s_GuardNpcId)
                        {
                            actor.Root.localScale = Vector3.one * 3;
                            var npcInteractor = actor.Root.GetComponent<NPCInteractProcessor>();
@@ -366,8 +664,8 @@
            for (int i = 0; i < actors.Count; i++)
            {
                var actor = actors[i] as GActorNpcFight;
                if (actor.NpcConfig.NPCID == dungeonStage.monsterNPCID && !actor.ActorInfo.serverDie)
                var actor = actors[i] as GA_NpcClientFightNorm;
                if (actor.NpcConfig.NPCID == dungeonStage.s_MonsterNpcId && !actor.ActorInfo.serverDie)
                {
                    if (PlayerDatas.Instance.hero.aiHandler.IsAuto())
                    {
@@ -376,7 +674,7 @@
                    }
                    break;
                }
                else if (actor.NpcConfig.NPCID == dungeonStage.bossNPCID && !actor.ActorInfo.serverDie)
                else if (actor.NpcConfig.NPCID == dungeonStage.s_BossNpcId && !actor.ActorInfo.serverDie)
                {
                    if (PlayerDatas.Instance.hero.aiHandler.IsAuto())
                    {
@@ -394,8 +692,8 @@
                {
                    for (int i = 0; i < functionNpcs.Count; i++)
                    {
                        var showActor = functionNpcs[i] as GA_NpcFunc;
                        if (dungeonStage.guardNPCID == showActor.NpcConfig.NPCID)
                        var showActor = functionNpcs[i] as GA_NpcClientFunc;
                        if (dungeonStage.s_GuardNpcId == showActor.NpcConfig.NPCID)
                        {
                            dungeonStage.guardDialogueAbleTime = Time.time + GeneralDefine.guardBubbleInterval;
                            var mountPoint = showActor.MP_Name;
@@ -433,7 +731,7 @@
        public void OnEnter()
        {
            dungeonStage.clientCage.LockHp(0);
        }
        public void OnUpdate()
@@ -447,8 +745,8 @@
                {
                    for (int i = 0; i < functionNpcs.Count; i++)
                    {
                        var showActor = functionNpcs[i] as GA_NpcFunc;
                        if (dungeonStage.guardNPCID == showActor.NpcConfig.NPCID)
                        var showActor = functionNpcs[i] as GA_NpcClientFunc;
                        if (dungeonStage.s_GuardNpcId == showActor.NpcConfig.NPCID)
                        {
                            dungeonStage.guardDialogueAbleTime = Time.time + GeneralDefine.guardBubbleInterval;
                            var mountPoint = showActor.MP_Name;
@@ -490,8 +788,8 @@
            {
                for (int i = 0; i < functionNpcs.Count; i++)
                {
                    var actor = functionNpcs[i] as GA_NpcFunc;
                    if (actor.NpcConfig.NPCID == dungeonStage.guardNPCID)
                    var actor = functionNpcs[i] as GA_NpcClientFunc;
                    if (actor.NpcConfig.NPCID == dungeonStage.s_GuardNpcId)
                    {
                        var npcInteractor = actor.Root.GetComponent<NPCInteractProcessor>();
                        if (npcInteractor != null)
@@ -520,7 +818,7 @@
        float timer = 0f;
        float transformDuration = 2f;
        GA_NpcFunc m_GuardNpc;
        GA_NpcClientFunc m_GuardNpc;
        Animator m_GuardAnimator;
        bool m_OnGuardDancing = false;
        bool m_GuardDanceComplete = false;
@@ -551,8 +849,8 @@
            {
                for (int i = 0; i < functionNpcs.Count; i++)
                {
                    var actor = functionNpcs[i] as GA_NpcFunc;
                    if (actor.NpcConfig.NPCID == dungeonStage.guardNPCID)
                    var actor = functionNpcs[i] as GA_NpcClientFunc;
                    if (actor.NpcConfig.NPCID == dungeonStage.s_GuardNpcId)
                    {
                        guard = actor.Root;
                        m_GuardNpc = actor;
System/Activity/ActivityNotifyBehaviour.cs
@@ -147,13 +147,13 @@
                        WindowCenter.Instance.Open<LootPreciousFrameWin>(false, 1);
                        break;
                    case DailyQuestType.CrossServerPk:
                        WindowCenter.Instance.Open<CrossServerWin>(false, 1);
                        WindowCenter.Instance.Open<CrossServerWin>(false, 0);
                        break;
                    case DailyQuestType.AllianceBoss:
                        WindowCenter.Instance.Open<LootPreciousFrameWin>(false, 3);
                        break;
                    case DailyQuestType.HazyRegion:
                        WindowCenter.Instance.Open<CrossServerWin>(false, 0);
                        WindowCenter.Instance.Open<HazyRegionFrameWin>();
                        break;
                    case DailyQuestType.RidingPetActivity:
                        WindowCenter.Instance.Open<LootPreciousFrameWin>(false, 1);
System/CrossServerOneVsOne/CrossServerOneVsOneModel.cs
@@ -140,7 +140,7 @@
                var pkSeason = CrossServerOneVsOnePKSeason.Instance;
                if (pkSeason.IsEnterCrossServer())
                {
                    WindowCenter.Instance.Open<CrossServerWin>(false, 1);
                    WindowCenter.Instance.Open<CrossServerWin>(false, 0);
                }
            }
            recordDataMapId = dataMapId;
System/DailyQuest/DailyQuestModel.cs
@@ -1165,7 +1165,7 @@
                    break;
                case DailyQuestType.CrossServerPk:
                    WindowCenter.Instance.Close<DailyQuestWin>();
                    WindowCenter.Instance.Open<CrossServerWin>(false, 1);
                    WindowCenter.Instance.Open<CrossServerWin>(false, 0);
                    break;
                case DailyQuestType.AllianceBoss:
                    GotoAllianceBoss(_id, 0);
@@ -1176,7 +1176,7 @@
                    break;
                case DailyQuestType.HazyRegion:
                    WindowCenter.Instance.Close<DailyQuestWin>();
                    WindowCenter.Instance.Open<CrossServerWin>(false, 0);
                    WindowCenter.Instance.Open<HazyRegionFrameWin>();
                    break;
                case DailyQuestType.SkyTower:
                    GotoSkyTower();
System/Dungeon/DungeonFightWin.cs
@@ -287,6 +287,7 @@
                            case TreasureModel.CLIENTDATAMAP:
                            case HazyRegionModel.PRECIOUS_CLIENTDATAMAP:
                            case PersonalBossModel.PERSONALBOSS_MAPID:
                            case ClientGuardDungeon.DATAMAPID:
                                ClientDungeonStageUtility.ExitNormalClientDungeon();
                                break;
                            case DemonJarModel.DATA_MAPID:
@@ -383,6 +384,7 @@
                    case PersonalBossModel.PERSONALBOSS_MAPID:
                    case HazyDemonKingModel.CLIENTDATAMAP:
                    case DemonJarModel.SINGLEMAPID:
                    case ClientGuardDungeon.DATAMAPID:
                        ClientDungeonStageUtility.ExitNormalClientDungeon();
                        break;
                }
System/Dungeon/DungeonModel.cs
@@ -967,6 +967,16 @@
                        WindowCenter.Instance.Open<DungeonMissionDetailsWin>();
                    }
                    break;
                case ClientGuardDungeon.DATAMAPID:
                    if (!WindowCenter.Instance.IsOpen<DungeonMissionHintWin>())
                    {
                        WindowCenter.Instance.Open<DungeonMissionHintWin>();
                    }
                    if (!WindowCenter.Instance.IsOpen<DungeonMissionDetailsWin>())
                    {
                        WindowCenter.Instance.Open<DungeonMissionDetailsWin>();
                    }
                    break;
            }
            if (updateMissionEvent != null)
System/Dungeon/DungeonVictoryWin.cs
@@ -160,6 +160,7 @@
                    case HazyGrassModel.FAIRY_CLIENTDATAMAP:
                    case HazyRegionModel.PRECIOUS_CLIENTDATAMAP:
                    case PersonalBossModel.PERSONALBOSS_MAPID:
                    case ClientGuardDungeon.DATAMAPID:
                        ClientDungeonStageUtility.ExitNormalClientDungeon();
                        return;
                }
System/GMCommand/GMInputWin.cs
@@ -155,6 +155,12 @@
                WindowCenter.Instance.Open<TreasureFindHostWin>();
                return;
            }
            if (_inputCmd.text.Equals("EnterFB 31250"))
            {
                cmdModel.OnSendGMQuest("SetFBStar 31250");
                ClientGuardDungeon.RequestEnter();
                return;
            }
            cmdModel.OnSendGMQuest(_inputCmd.text.Trim());
            cmdModel.SetRecordCmdlist(_inputCmd.text);
System/HazyRegion/HazyRegionModel.cs
@@ -124,7 +124,13 @@
            if (AdventureStage.Instance.IsInAdventureStage)
            {
                ClientDungeonStageUtility.RequestStartClientDungeon(0, 0, null);
                ClientDungeonStageUtility.RequestStartClientDungeon(0, 0, (dungeonInfo, isOk) =>
                {
                    if (!isOk)
                    {
                        AdventureStage.Instance.Exit();
                    }
                });
            }
            UpdateRedpoint();
System/ItemDrop/DropItem.cs
@@ -152,6 +152,8 @@
                    break;
            }
            ClientDropItemUtility.Instance.RemoveDropItem(this);
            DropItemPool.ReycleDropItem(this);
            RecyleEffect();
        }
System/MainInterfacePanel/DialogueDuidanceWin.cs
@@ -307,12 +307,7 @@
            {
                case TaskType.OK:
                case TaskType.FB:
                    model.RequestGetTaskAward("OK");
                    break;
                case TaskType.Double:
                    model.RequestGetTaskAward("Double");
                    break;
                default:
                    model.RequestGetTaskAward("OK", taskId);
                    break;
            }
        }
System/MainInterfacePanel/TaskBoxBGMWin.cs
@@ -140,7 +140,7 @@
                {
                    if (!ModelCenter.Instance.GetModel<TeamModel>().teamPrepare.isPreparing)
                    {
                        taskmodel.RequestGetTaskAward("OK");
                        taskmodel.RequestGetTaskAward("OK", _TaskId);
                        WindowCenter.Instance.Close<TaskBoxBGMWin>();
                        WindowCenter.Instance.Open<MainInterfaceWin>();
                    }
@@ -161,7 +161,7 @@
                Closee();
                return;
            }
            taskmodel.RequestGetTaskAward("OK");
            taskmodel.RequestGetTaskAward("OK", _TaskId);
            mainModel.IsSelfMotionTask = false;
            SelectionManager.Release(SelectionManager.E_Type.Green);
            StartCoroutine("LateRelease");
@@ -410,7 +410,7 @@
                Closee();
                return;
            }
            taskmodel.RequestGetTaskAward("OK");
            taskmodel.RequestGetTaskAward("OK", _TaskId);
            mainModel.IsSelfMotionTask = true;
            SelectionManager.Release(SelectionManager.E_Type.Green);
            StartCoroutine("LateRelease");
System/MainInterfacePanel/TaskModel.cs
@@ -141,6 +141,8 @@
    private int Times = 0;
    private int NeedWaitTime = 4;
    public int clientGuardDugeonTask { get; private set; }
    private float mainTaskAutoWaitTime = 0f;
    public readonly TaskWait taskWait = new TaskWait();
@@ -163,6 +165,9 @@
        mainTaskAutoWaitTime = int.Parse(Task_Auto.Numerical3) / 1000f;
        FairyAuTaskCount_Day = int.Parse(FuncConfigConfig.Get("RunTaskCnt").Numerical1.Split('|')[1].Split('_')[1]);
        FairyAuTaskCount_Round = int.Parse(FuncConfigConfig.Get("RunTaskCnt").Numerical2.Split('|')[1].Split('_')[1]);
        var cliengGuardConfig = FuncConfigConfig.Get("ClientGuardDungeon");
        clientGuardDugeonTask = int.Parse(cliengGuardConfig.Numerical5);
    }
    public override void UnInit()
@@ -426,7 +431,7 @@
        {
            if (!ModelCenter.Instance.GetModel<TeamModel>().teamPrepare.isPreparing)
            {
                RequestGetTaskAward("OK");
                RequestGetTaskAward("OK", _TaskNow);
            }
        }
    }
@@ -905,8 +910,13 @@
    }
    public void RequestGetTaskAward(string _answer)
    public void RequestGetTaskAward(string _answer, int taskId = 0)
    {
        if (taskId == clientGuardDugeonTask)
        {
            ClientGuardDungeon.RequestEnter();
            return;
        }
        var sendInfo = new C0802_tagCNPCAnswer();
        sendInfo.Answer = _answer;
@@ -1379,6 +1389,11 @@
            yield break;
        }
        if (BossShowModel.Instance.BossShowing)
        {
            yield break;
        }
        if (BountyDic.ContainsKey(_taskID) || FairyAuDic.ContainsKey(_taskID))
        {
            yield return WaitingForSecondConst.WaitMS800;//缓冲一秒再进行
System/Store/StoreWin.cs
@@ -186,7 +186,7 @@
        {
            if (model.storeFuncType == StoreFunc.MysteryStore)
            {
                m_RefreshContainer.gameObject.SetActive(true);
                //m_RefreshContainer.gameObject.SetActive(true);
                m_RefreshCommodities.gameObject.SetActive(true);
                m_RefreshTimeText.text = model.GetMysteryStoreRefreshTime();
            }
@@ -199,18 +199,18 @@
                if (commodities == null || commodities.Count == 0)
                {
                    m_RefreshContainer.gameObject.SetActive(false);
                    //m_RefreshContainer.gameObject.SetActive(false);
                    return;
                }
                var refreshType = commodities[0].storeConfig.RefreshType;
                if (refreshType == 0)
                {
                    m_RefreshContainer.gameObject.SetActive(false);
                    //m_RefreshContainer.gameObject.SetActive(false);
                }
                else
                {
                    m_RefreshContainer.gameObject.SetActive(true);
                    //m_RefreshContainer.gameObject.SetActive(true);
                    m_RefreshCommodities.gameObject.SetActive(false);
                    m_RefreshTimeText.text = model.GetStoreRefreshTimeByType(refreshType);
                }
@@ -244,6 +244,7 @@
            }
            var shopType = commodities[0].storeConfig.ShopType;
            this.m_RefreshContainer.gameObject.SetActive(shopType == 1 || shopType == 18);
            if (model.showCoinsUIDict != null && model.showCoinsUIDict.ContainsKey(shopType))
            {
                if (model.showCoinsUIDict[shopType] == 1)
System/Treasure/ClientTreasureDungeonStage.cs
@@ -101,10 +101,13 @@
    private void OnNpcTalkEvent(E_NpcType arg1, int arg2, uint arg3)
    {
        WindowCenter.Instance.Close<MainInterfaceWin>();
        NormalDialogueWin.dialogues = dialogues;
        NormalDialogueWin.speakTypes = speakTypes;
        NormalDialogueWin.npcId = dialogueNpcId;
        NormalDialogueWin.autoSeconds = autoDialogueSecond;
        NormalDialogueWin.customDialogueInfo = new CustomDialogueInfo()
        {
            dialogues = dialogues,
            speakTypes = speakTypes,
            npcId = dialogueNpcId,
            autoSeconds = autoDialogueSecond,
        };
        WindowCenter.Instance.Open<NormalDialogueWin>();
    }
System/Treasure/NormalDialogueWin.cs
@@ -21,20 +21,22 @@
        [SerializeField] RawImage m_RawNpc;
        [SerializeField] Text m_NpcName;
        [SerializeField] Text m_NpcDialogue;
        [SerializeField] Transform m_NpcRewardContainer;
        [SerializeField] Transform m_ContainerPlayer;
        [SerializeField] RawImage m_RawPlayer;
        [SerializeField] Text m_PlayerName;
        [SerializeField] Text m_PlayerDialogue;
        [SerializeField] Transform m_PlayerRewardContainer;
        [SerializeField] Transform m_ContainerReward;
        [SerializeField] ItemCell[] m_Items;
        [SerializeField] Text m_Time;
        int dialogueIndex = 0;
        public static int npcId = 0;
        public static int[] speakTypes = null;
        public static string[] dialogues = null;
        public static int autoSeconds = 0;
        public static CustomDialogueInfo customDialogueInfo;
        float timer = 0f;
        float displayTimer = 0f;
@@ -82,7 +84,7 @@
        protected override void LateUpdate()
        {
            timer += Time.deltaTime;
            if (timer >= autoSeconds)
            if (timer >= customDialogueInfo.autoSeconds)
            {
                OnClickEmpty();
            }
@@ -120,15 +122,44 @@
            timer = 0f;
            DisplayTime();
            if (speakTypes == null || dialogues == null)
            if (customDialogueInfo.speakTypes == null || customDialogueInfo.dialogues == null)
            {
                return;
            }
            var speakType = speakTypes[dialogueIndex];
            var speakType = customDialogueInfo.speakTypes[dialogueIndex];
            m_ContainerNpc.gameObject.SetActive(speakType == 0);
            m_ContainerPlayer.gameObject.SetActive(speakType == 1);
            var displayReward = dialogueIndex == customDialogueInfo.dialogues.Length - 1 && customDialogueInfo.items != null;
            m_ContainerReward.gameObject.SetActive(displayReward);
            if (displayReward)
            {
                m_ContainerReward.SetParent(speakType == 1 ? m_PlayerRewardContainer : m_NpcRewardContainer);
                for (int i = 0; i < m_Items.Length; i++)
                {
                    if (i < customDialogueInfo.items.Count)
                    {
                        m_Items[i].gameObject.SetActive(true);
                        var itemId = customDialogueInfo.items[i].id;
                        ulong count = (ulong)customDialogueInfo.items[i].count;
                        var itemData = new ItemCellModel(itemId, true, count);
                        m_Items[i].Init(itemData);
                        m_Items[i].button.SetListener(() =>
                        {
                            ItemTipUtility.Show(itemId);
                        });
                    }
                    else
                    {
                        m_Items[i].gameObject.SetActive(false);
                    }
                }
            }
            switch (speakType)
            {
@@ -136,15 +167,15 @@
                    var job = PlayerDatas.Instance.baseData.Job;
                    UI3DModelExhibition.Instance.ShowPlayer(m_RawPlayer, job, true);
                    m_PlayerName.text = PlayerDatas.Instance.baseData.PlayerName;
                    m_PlayerDialogue.text = Language.Get(dialogues[dialogueIndex]);
                    m_PlayerDialogue.text = Language.Get(customDialogueInfo.dialogues[dialogueIndex]);
                    break;
                case 0:
                    var npcConfig = NPCConfig.Get(npcId);
                    var npcConfig = NPCConfig.Get(customDialogueInfo.npcId);
                    m_NpcName.text = npcConfig.charName;
                    m_NpcDialogue.text = Language.Get(dialogues[dialogueIndex]);
                    m_NpcDialogue.text = Language.Get(customDialogueInfo.dialogues[dialogueIndex]);
                    var data = new UI3DNPCExhibitionData()
                    {
                        npcId = npcId,
                        npcId = customDialogueInfo.npcId,
                        isDialogue = true,
                    };
                    UI3DModelExhibition.Instance.ShowNPC(m_RawNpc, data);
@@ -163,13 +194,13 @@
        private void DisplayTime()
        {
            var seconds = (int)(autoSeconds - timer);
            var seconds = (int)(customDialogueInfo.autoSeconds - timer);
            m_Time.text = Language.Get("TaskContinueCount", seconds);
        }
        private void OnClickEmpty()
        {
            if (dialogues != null && dialogueIndex < dialogues.Length - 1)
            if (customDialogueInfo.dialogues != null && dialogueIndex < customDialogueInfo.dialogues.Length - 1)
            {
                dialogueIndex += 1;
                DisplayDialogue();
@@ -186,6 +217,14 @@
    }
    public struct CustomDialogueInfo
    {
        public int npcId;
        public int[] speakTypes;
        public string[] dialogues;
        public int autoSeconds;
        public List<Item> items;
    }
}