少年修仙传客户端代码仓库
client_linchunjie
2019-04-09 83a08977d232cc57b4c14efc3b8334751d769a70
3335 缥缈仙域
5个文件已修改
89 ■■■■■ 已修改文件
Fight/Stage/Dungeon/AdventureStage.cs 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/HazyRegion/HazyRegionDialogueWin.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/HazyRegion/HazyRegionIncidentBehaviour.cs 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/HazyRegion/HazyRegionModel.cs 56 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Utility/EnumHelper.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/Stage/Dungeon/AdventureStage.cs
@@ -10,6 +10,8 @@
    private Vector3 m_CacheHeroPos;
    private GA_NpcClientFunc m_Npc;
    HazyRegionModel hazyRegionModel { get { return ModelCenter.Instance.GetModel<HazyRegionModel>(); } }
    public void Enter()
    {
        IsInAdventureStage = true;
@@ -40,7 +42,7 @@
        CameraController.Instance.Apply();
        yield return null;
        WindowCenter.Instance.Close<LoadingWin>();
        m_Npc = GAMgr.Instance.ReqClntNoFightNpc<GA_NpcClientFunc>(10904012, E_ActorGroup.FuncNpc);
        m_Npc = GAMgr.Instance.ReqClntNoFightNpc<GA_NpcClientFunc>((uint)hazyRegionModel.GetAdventureNpcId(), E_ActorGroup.FuncNpc);
        m_Npc.Pos = new Vector3(189.101f, 62.47324f, 26.147f);
        NPCInteractProcessor.s_NpcInteractEvent -= OnNpcTalkEvent;
        NPCInteractProcessor.s_NpcInteractEvent += OnNpcTalkEvent;
@@ -78,7 +80,10 @@
                if (m_Npc.NpcConfig.NPCID == npcid
                 && m_Npc.ServerInstID == sid)
                {
                    Debug.Log("触发了谈话....");
                    if (!WindowCenter.Instance.IsOpen<HazyRegionDialogueWin>())
                    {
                        hazyRegionModel.StartAdventureDialogue();
                    }
                }
            }
        }
System/HazyRegion/HazyRegionDialogueWin.cs
@@ -92,7 +92,6 @@
        private void DisplayDialogue()
        {
            var config = AdventureDialogueConfig.Get(adventureDialogueId);
            var speakType = config.speakType[dialogueIndex];
@@ -102,13 +101,13 @@
            switch (speakType)
            {
                case 0:
                case 1:
                    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(config.dialogues[dialogueIndex]);
                    break;
                case 1:
                case 0:
                    var npcId = config.npcId;
                    var npcConfig = NPCConfig.Get(npcId);
                    m_NpcName.text = npcConfig.charName;
System/HazyRegion/HazyRegionIncidentBehaviour.cs
@@ -56,10 +56,10 @@
            var config = HazyRegionConfig.Get(incidentId);
            incidentType = (HazyRegionIncidentType)config.incidentType;
            //DisplayBase();
            DisplayBase();
            //DisplayItems();
            //DisplayState();
            //DisplaySelect();
            DisplayState();
            DisplaySelect();
            //DisplayBoss();
            model.selectIncidentRefresh -= SelectIncidentRefresh;
@@ -71,11 +71,11 @@
        void DisplayBase()
        {
            var config = HazyRegionConfig.Get(incidentId);
            m_DepletionPoint.text = Language.Get("IncidentDepletionPoint", config.point);
            //m_DepletionPoint.text = Language.Get("IncidentDepletionPoint", config.point);
            m_IncidentTitle.text = config.name;
            m_Icon.SetSprite(config.PortraitID);
            m_Icon.SetNativeSize();
            m_ContainerCrossServer.gameObject.SetActive(config.crossServer == 1);
            //m_Icon.SetSprite(config.PortraitID);
            //m_Icon.SetNativeSize();
            //m_ContainerCrossServer.gameObject.SetActive(config.crossServer == 1);
        }
        void DisplayItems()
@@ -127,12 +127,12 @@
        private void SelectIncidentRefresh()
        {
            //DisplaySelect();
            DisplaySelect();
        }
        private void OnHazyRegionIncidentRefresh()
        {
            //DisplayState();
            DisplayState();
        }
        private void OnSelect()
System/HazyRegion/HazyRegionModel.cs
@@ -1,6 +1,7 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using UnityEngine;
namespace Snxxz.UI
{
@@ -12,6 +13,7 @@
        public int limitPoint { get; private set; }
        public int point { get; private set; }
        public int processingIncidentId { get; private set; }
        public int adventureDialogueId { get; private set; }
        public bool playing { get; private set; }
        public bool isServerPrepare { get; private set; }
@@ -158,6 +160,11 @@
                error = 2;
                return false;
            }
            if (AdventureStage.Instance.IsInAdventureStage)
            {
                error = 2;
                return false;
            }
            return true;
        }
@@ -202,6 +209,16 @@
            return 0;
        }
        public int GetAdventureNpcId()
        {
            var dialogueConfig = AdventureDialogueConfig.Get(adventureDialogueId);
            if (dialogueConfig != null)
            {
                return dialogueConfig.npcId;
            }
            return 0;
        }
        public bool IsIncidentDungeon(int mapId)
        {
            if (mapId == 0)
@@ -230,39 +247,40 @@
        public void StartAdventureDialogue()
        {
            WindowCenter.Instance.Close<MainInterfaceWin>();
            HazyRegionDialogueWin.adventureDialogueId = adventureDialogueId;
            WindowCenter.Instance.Open<HazyRegionDialogueWin>();
        }
        void InitializeAdventure()
        {
            var config = HazyRegionConfig.Get(processingIncidentId);
            if (config != null)
            {
                var gear = 0;
                AdventureInfo adventureInfo;
                if (TryGetAdventureInfo(processingIncidentId, out adventureInfo))
                {
                    bool satisfyCondition = false;
                    switch (config.lineId)
                    {
                        case 1:
                            satisfyCondition = PlayerDatas.Instance.baseData.LV >= adventureInfo.condition;
                            gear = PlayerDatas.Instance.baseData.LV >= adventureInfo.condition ? adventureInfo.gear : 0;
                            break;
                        case 2:
                            satisfyCondition = PlayerDatas.Instance.baseData.realmLevel >= adventureInfo.condition;
                            gear = PlayerDatas.Instance.baseData.realmLevel >= adventureInfo.condition ? adventureInfo.gear : 0;
                            break;
                        case 3:
                            satisfyCondition = PlayerDatas.Instance.baseData.FightPoint >= adventureInfo.condition;
                            gear = PlayerDatas.Instance.baseData.FightPoint >= adventureInfo.condition ? adventureInfo.gear : 0;
                            break;
                        case 4:
                            satisfyCondition = PlayerDatas.Instance.extersion.luckValue >= adventureInfo.condition;
                            gear = PlayerDatas.Instance.extersion.luckValue >= adventureInfo.condition ? adventureInfo.gear : 0;
                            break;
                    }
                    var dialogueConfig = AdventureDialogueConfig.Get(config.lineId, satisfyCondition ? adventureInfo.gear : 0);
                    if (dialogueConfig == null)
                    {
                        SendSwitchAdventureState(processingIncidentId, 3);
                    }
                    else
                    {
                        WindowCenter.Instance.Close<MainInterfaceWin>();
                        HazyRegionDialogueWin.adventureDialogueId = dialogueConfig.id;
                        WindowCenter.Instance.Open<HazyRegionDialogueWin>();
                    }
                }
                var dialogueConfig = AdventureDialogueConfig.Get(config.lineId, gear);
                if (dialogueConfig != null)
                {
                    adventureDialogueId = dialogueConfig.id;
                }
            }
        }
@@ -275,6 +293,10 @@
            switch ((HazyRegionIncidentType)config.incidentType)
            {
                case HazyRegionIncidentType.Adventure:
                    InitializeAdventure();
                    WindowCenter.Instance.CloseAll(WindowCenter.CloseAllIgnoreType.BaseAndCustom);
                    AdventureStage.Instance.Enter();
                    Incident incident;
@@ -312,8 +334,10 @@
        public void SendSwitchAdventureState(int id, int state)
        {
            var pak = new CA504_tagCMPlayerGetReward();
            pak.RewardType = (byte)GotServerRewardType.Def_RewardType_FairyAdventuresAward;
            pak.DataEx = (uint)id;
            pak.DataExStr = state.ToString();
            pak.DataExStrLen = (byte)Encoding.UTF8.GetBytes(pak.DataExStr).Length;
            GameNetSystem.Instance.SendInfo(pak);
        }
Utility/EnumHelper.cs
@@ -998,6 +998,7 @@
    Def_RewardType_NewFairyCParty = 24, // 新仙界盛典全民来嗨24
    Def_RewardType_FeastWeekPartyAct = 25, //领取节日巡礼活动奖励25
    Def_RewardType_FeastWeekPartyPoint = 26, //领取节日巡礼积分奖励26
    Def_RewardType_FairyAdventuresAward = 27,//缥缈奇遇
}
public enum MapType