From c54824adb88b100995a54b44089b1ddde5dff257 Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期五, 26 十二月 2025 11:38:32 +0800
Subject: [PATCH] 351 【内政】红颜系统 - 可配置游历
---
Main/System/BeautyMM/BeautyMMCell.cs | 2
Main/System/BeautyMM/BeautyMMManager.Travel.cs | 92 +++++++++
Main/Utility/EnumHelper.cs | 1
Main/System/BeautyMM/BeautyMMTravelCell.cs.meta | 11 +
Main/System/BeautyMM/BeautyMMManager.cs | 85 +++++++++
Main/System/BeautyMM/BeautyMMTravelCell.cs | 148 ++++++++++++++++
Main/System/BeautyMM/BeautyMMShowWin.cs | 4
Main/System/BeautyMM/BeautyMMTravelWin.cs | 192 +++++++++++++++++++++
8 files changed, 526 insertions(+), 9 deletions(-)
diff --git a/Main/System/BeautyMM/BeautyMMCell.cs b/Main/System/BeautyMM/BeautyMMCell.cs
index 868711d..4e1d5dd 100644
--- a/Main/System/BeautyMM/BeautyMMCell.cs
+++ b/Main/System/BeautyMM/BeautyMMCell.cs
@@ -47,7 +47,7 @@
}
//鍏堟樉绀哄ぉ璧嬪睘鎬э紝鍐嶆樉绀哄ぉ璧嬬壒鎬�
- var attrs = BeautyMMManager.Instance.GetMMTalentAttr(mmID, true);
+ var attrs = BeautyMMManager.Instance.GetMMTalentAttrForUI(mmID, true);
int talentIndex = 0;
if (attrs.IsNullOrEmpty())
{
diff --git a/Main/System/BeautyMM/BeautyMMManager.Travel.cs b/Main/System/BeautyMM/BeautyMMManager.Travel.cs
index 1a5a2fe..6fdcb20 100644
--- a/Main/System/BeautyMM/BeautyMMManager.Travel.cs
+++ b/Main/System/BeautyMM/BeautyMMManager.Travel.cs
@@ -15,10 +15,14 @@
public byte m_SceneryRow; //鏅宸︿笂瑙掓墍鍦ㄨ锛屼粠1寮�濮�
public byte m_SceneryCol; //鏅宸︿笂瑙掓墍鍦ㄥ垪锛屼粠1寮�濮�
public uint m_SceneryLVInfo; //鏅鍗囩骇淇℃伅锛�0-杩樻湭澶勭悊鏅鍗囩骇锛涗釜浣嶆暟-绗�1娆″崌绾ф垚鍔熶笌鍚︼紝1-鎴愬姛锛�2-澶辫触锛涘崄浣�-绗�2娆� ...
- public byte m_Result; //鍚庣澶勭悊锛�0-鏃狅紱1-甯歌锛�2-椹溅鐐稿脊锛�3-浼犻�侀棬锛�4-鏅锛�5-閲嶇疆寮�濮�
+ public byte m_Result; //鍚庣澶勭悊锛�0-鏃狅紱1-甯歌锛�2-椹溅鐐稿脊锛�3-浼犻�侀棬锛�4-鏅锛�5-閲嶇疆寮�濮嬶紱锛侊紒锛侀噸鐧讳細鍙樻垚0锛屽彧鍋氬嵆鏃跺垽鏂敤
Dictionary<Int2, TravelGrid> m_GridDict = new Dictionary<Int2, TravelGrid>();
- public event Action OnTravelInfoUpdate;
+ public List<Int2> openChangeGridList = new List<Int2>(); // 鍓嶅悗瀵规瘮锛屾湁鍙樺寲鐨勬牸瀛� ,鎵撳紑鍓嶉潰鍓嶉渶娓呯悊
+ public event Action<int> OnTravelInfoUpdate;
+
+ public int maxGirds = 0;
+ public Int2 clickGirdPos = new Int2();
public void UpdateTravelInfo(HB040_tagSCTravelInfo netPack)
{
@@ -30,6 +34,7 @@
m_SceneryCol = netPack.SceneryCol;
m_SceneryLVInfo = netPack.SceneryLVInfo;
m_Result = netPack.Result;
+ openChangeGridList.Clear();
for (int i = 0; i < netPack.GridCnt; i++)
{
@@ -37,17 +42,90 @@
var key = new Int2(grid.Row, grid.Col);
if (m_GridDict.ContainsKey(key))
{
+ if (m_GridDict[key].State != grid.State)
+ {
+ openChangeGridList.Add(key);
+ }
m_GridDict[key].State = grid.State;
m_GridDict[key].Multi = grid.Multi;
m_GridDict[key].EventID = grid.EventID;
}
else
{
+ if (grid.State != 0)
+ {
+ openChangeGridList.Add(key);
+ }
m_GridDict.Add(key, new TravelGrid() { State = grid.State, Multi = grid.Multi, EventID = grid.EventID });
}
}
- OnTravelInfoUpdate?.Invoke();
+ OnTravelInfoUpdate?.Invoke(m_Result);
+ UpdateTravelRedpoint();
}
+
+ //index浠�0寮�濮嬶紝杞牸瀛愬潗鏍囷紙1,1锛夊紑濮�
+ public Int2 ChangeIndexToGrid(int index)
+ {
+ int row = index / travelRowCol[1] + 1;
+ int col = index % travelRowCol[1] + 1;
+ return new Int2(row, col);
+ }
+
+ public TravelGrid GetGrid(Int2 gridPos)
+ {
+ if (m_GridDict.ContainsKey(gridPos))
+ {
+ return m_GridDict[gridPos];
+ }
+ return null;
+ }
+
+ public bool CanOpenBuild()
+ {
+ if (m_SceneryType == 0)
+ {
+ return false;
+ }
+ //鍒ゆ柇寤虹瓚鏍煎瓙鏄惁鍏ㄥ紑锛岃绠楁暟閲�
+ int cnt = 0;
+ foreach (var grid in m_GridDict)
+ {
+ if (grid.Value.State == 1 && grid.Value.EventID > 0 && grid.Value.EventID < (int)GirdEventType.Door)
+ {
+ cnt++;
+ }
+ }
+ return cnt >= m_SceneryType;
+ }
+
+ public bool HasDoor()
+ {
+ if (m_SceneryType == 0)
+ {
+ return false;
+ }
+ foreach (var grid in m_GridDict)
+ {
+ if (grid.Value.EventID == (int)GirdEventType.Door)
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+
+
+ Redpoint redpointTravel = new Redpoint(MainRedDot.Redpoint_BeautyMM, MainRedDot.Redpoint_BeautyMM * 10 + 2);
+ void UpdateTravelRedpoint()
+ {
+ if (!FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.BeautyMM))
+ {
+ return;
+ }
+ redpointTravel.state = m_Energy > 0 ? RedPointState.Simple : RedPointState.None;
+ }
+
+
}
@@ -58,4 +136,12 @@
public ushort EventID; //浜嬩欢ID
}
+//浣庝簬99鐨勪负寤虹瓚鏍煎瓙 澶т簬200鐨勪负鐗╁搧鏍煎瓙
+public enum GirdEventType
+{
+ None = 0,
+ Door = 99, // 闂�
+ Empty = 100, // 绌烘牸瀛�
+ Horse = 101, // 椹尮
+}
diff --git a/Main/System/BeautyMM/BeautyMMManager.cs b/Main/System/BeautyMM/BeautyMMManager.cs
index 57aa007..fb64125 100644
--- a/Main/System/BeautyMM/BeautyMMManager.cs
+++ b/Main/System/BeautyMM/BeautyMMManager.cs
@@ -43,6 +43,7 @@
beautyMMIDSortList.Clear();
beautyMMDataDict.Clear();
beautyMMSkinDataDict.Clear();
+ m_GridDict.Clear();
}
void ParseConfig()
@@ -62,6 +63,7 @@
baseTravelEnergy = int.Parse(config.Numerical1);
recoverTravelEnergyTime = int.Parse(config.Numerical2);
travelRowCol = ConfigParse.GetMultipleStr<int>(config.Numerical3);
+ maxGirds = travelRowCol[0] * travelRowCol[1];
}
@@ -190,7 +192,7 @@
}
// 鑾峰彇MM澶╄祴灞炴�у睘鎬�, defaultAttr 鏄惁浣跨敤榛樿灞炴��
- public Dictionary<int, int> GetMMTalentAttr(int mmID, bool defaultAttr = false)
+ public Dictionary<int, int> GetMMTalentAttrForUI(int mmID, bool defaultAttr = false)
{
var _dict = new Dictionary<int, int>();
if (beautyMMDataDict.ContainsKey(mmID))
@@ -237,6 +239,80 @@
return _dict;
}
+ // 鐪熷疄灞炴��
+ public Dictionary<int, int> GetMMTalentAttr(int mmID)
+ {
+ var _dict = new Dictionary<int, int>();
+ if (beautyMMDataDict.ContainsKey(mmID))
+ {
+ var _beauty = beautyMMDataDict[mmID];
+ if (_beauty.State == 1)
+ {
+ var config = BeautyConfig.Get(mmID);
+ if (config != null)
+ {
+ //鍒濆澶╄祴灞炴��
+ for (int i = 0; i < config.TalentAttrIDList.Length; i++)
+ {
+ _dict[config.TalentAttrIDList[i]] = config.TalentAttrValueList[i];
+ }
+
+ //鎸墄绾уソ鎰熷害鎻愬崌涓�绾уぉ璧嬫晥鏋�
+ var _lv = _beauty.LV;
+ var _addLV = _lv / needLVForTalent;
+ if (_addLV > 0)
+ {
+ for (int i = 0; i < config.TalentAttrIDList.Length; i++)
+ {
+ _dict[config.TalentAttrIDList[i]] += _addLV * config.TalentPerLVAddList[i];
+ }
+ }
+ }
+ return _dict;
+ }
+ }
+
+ return _dict;
+ }
+
+
+ public int GetMMTalentEffectForUI(int mmID, bool defaultAttr = true)
+ {
+ int _effect = 0;
+ if (beautyMMDataDict.ContainsKey(mmID))
+ {
+ var _beauty = beautyMMDataDict[mmID];
+ if (_beauty.State == 1)
+ {
+ var config = BeautyConfig.Get(mmID);
+ if (config != null)
+ {
+ //鍒濆澶╄祴鏁堟灉
+ _effect = config.EffValue;
+ //鎸墄绾уソ鎰熷害鎻愬崌涓�绾уぉ璧嬫晥鏋�
+ var _lv = _beauty.LV;
+ var _addLV = _lv / needLVForTalent;
+ if (_addLV > 0)
+ {
+ _effect += _addLV * config.EffPerLVAdd;
+ }
+ }
+ return _effect;
+ }
+ }
+
+ if (defaultAttr)
+ {
+ var config = BeautyConfig.Get(mmID);
+ if (config != null)
+ {
+ //鍒濆澶╄祴鏁堟灉
+ _effect = config.EffValue;
+ }
+ }
+ return _effect;
+ }
+
// 鑾峰彇MM澶╄祴鏁堟灉
public int GetMMTalentEffect(int mmID)
{
@@ -272,7 +348,7 @@
Redpoint redpointMMKnown = new Redpoint((MainRedDot.Redpoint_BeautyMM * 10 + 1) * 10, (MainRedDot.Redpoint_BeautyMM * 10 + 1) * 10 + 1);
Redpoint redpointMMUnKnown = new Redpoint((MainRedDot.Redpoint_BeautyMM * 10 + 1) * 10, (MainRedDot.Redpoint_BeautyMM * 10 + 1) * 10 + 2);
- Redpoint redpointTravel = new Redpoint(MainRedDot.Redpoint_BeautyMM, MainRedDot.Redpoint_BeautyMM * 10 + 2);
+
@@ -282,7 +358,10 @@
{
redpointMMKnown.state = RedPointState.None;
redpointMMUnKnown.state = RedPointState.None;
-
+ if (!FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.BeautyMM))
+ {
+ return;
+ }
var _list = BeautyConfig.GetValues();
foreach (var beauty in _list)
{
diff --git a/Main/System/BeautyMM/BeautyMMShowWin.cs b/Main/System/BeautyMM/BeautyMMShowWin.cs
index bd89f3a..809aafd 100644
--- a/Main/System/BeautyMM/BeautyMMShowWin.cs
+++ b/Main/System/BeautyMM/BeautyMMShowWin.cs
@@ -284,7 +284,7 @@
void ShowTalent()
{
//鍏堟樉绀哄ぉ璧嬪睘鎬э紝鍐嶆樉绀哄ぉ璧嬬壒鎬�
- var attrs = BeautyMMManager.Instance.GetMMTalentAttr(mmID, true);
+ var attrs = BeautyMMManager.Instance.GetMMTalentAttrForUI(mmID, true);
int talentIndex = 0;
if (attrs.IsNullOrEmpty())
{
@@ -309,7 +309,7 @@
}
- var talentValue = BeautyMMManager.Instance.GetMMTalentEffect(mmID);
+ var talentValue = BeautyMMManager.Instance.GetMMTalentEffectForUI(mmID);
for (int i = talentIndex; i < talentTexts.Length; i++)
{
if (i == talentIndex && mmConfig.EffType != 0)
diff --git a/Main/System/BeautyMM/BeautyMMTravelCell.cs b/Main/System/BeautyMM/BeautyMMTravelCell.cs
new file mode 100644
index 0000000..a1fbd30
--- /dev/null
+++ b/Main/System/BeautyMM/BeautyMMTravelCell.cs
@@ -0,0 +1,148 @@
+using System.Collections.Generic;
+using UnityEngine;
+using UnityEngine.UI;
+
+public class BeautyMMTravelCell : MonoBehaviour
+{
+ [SerializeField] Button clickGirdBtn; //鏍规嵁鐘舵�佸喅瀹�
+ [SerializeField] Image itemImage;
+ [SerializeField] Text multiText;
+ [SerializeField] Image horseImg;
+ [SerializeField] Image notOpenImg;
+ [SerializeField] Image crackImg; // 鐮寸鍥炬爣
+ [SerializeField] UIEffectPlayer openEffect;
+ [SerializeField] UIEffectPlayer boomEffect;
+ [SerializeField] UIEffectPlayer gateEffect;
+
+
+ public void Display(int index)
+ {
+ Int2 girdPos = BeautyMMManager.Instance.ChangeIndexToGrid(index);
+ var grid = BeautyMMManager.Instance.GetGrid(girdPos);
+
+ clickGirdBtn.AddListener(() =>
+ {
+ ClickGird(girdPos, grid);
+ });
+
+ if (grid == null)
+ {
+ notOpenImg.SetActive(true);
+ itemImage.SetActive(false);
+ horseImg.SetActive(false);
+ crackImg.SetActive(false);
+ gateEffect.SetActive(false);
+ return;
+ }
+
+ ////鐘舵�侊細0-鏈偣鍑伙紱1-宸插紑鍚紱2-瑁傜汗
+ if (grid.State == 0 || grid.State == 2)
+ {
+ notOpenImg.SetActive(true);
+ itemImage.SetActive(false);
+ horseImg.SetActive(false);
+ crackImg.SetActive(grid.State == 2);
+ gateEffect.SetActive(false);
+ return;
+ }
+
+ notOpenImg.SetActive(false);
+ // 99 - 浠h〃璇ユ牸鏄� 浼犻�侀棬
+ // 100 - 浠h〃璇ユ牸鏄� 绌烘牸瀛�
+ // 101 - 浠h〃璇ユ牸鏄� 椹尮
+ // 澶т簬200 瀵瑰簲琛ㄩ噷鐨� 鐗╁搧
+ if (grid.EventID == 99)
+ {
+ gateEffect.SetActive(true);
+ gateEffect.Play();
+ itemImage.SetActive(false);
+ horseImg.SetActive(false);
+ crackImg.SetActive(false);
+ }
+ else if (grid.EventID == 100)
+ {
+ itemImage.SetActive(false);
+ horseImg.SetActive(false);
+ crackImg.SetActive(false);
+ gateEffect.SetActive(false);
+ }
+ else if (grid.EventID == 101)
+ {
+ itemImage.SetActive(false);
+ horseImg.SetActive(true);
+ crackImg.SetActive(false);
+ gateEffect.SetActive(false);
+ }
+ else if (grid.EventID > 200)
+ {
+ itemImage.SetActive(true);
+ horseImg.SetActive(false);
+ crackImg.SetActive(false);
+ gateEffect.SetActive(false);
+ itemImage.SetItemSprite(TravelEventConfig.Get(grid.EventID).AwardItemID);
+ if (grid.Multi > 1)
+ {
+ multiText.text = $"x{grid.Multi}";
+ }
+ else
+ {
+ multiText.text = "";
+ }
+ }
+ else
+ {
+ itemImage.SetActive(false);
+ horseImg.SetActive(false);
+ crackImg.SetActive(false);
+ gateEffect.SetActive(false);
+ }
+
+ if (BeautyMMManager.Instance.openChangeGridList.Contains(girdPos))
+ {
+ openEffect.Play();
+ }
+
+
+ }
+
+
+ // 99 - 浠h〃璇ユ牸鏄� 浼犻�侀棬
+ // 100 - 浠h〃璇ユ牸鏄� 绌烘牸瀛�
+ // 101 - 浠h〃璇ユ牸鏄� 椹尮
+ // 澶т簬200 瀵瑰簲琛ㄩ噷鐨� 鐗╁搧
+ void ClickGird(Int2 girdPos, TravelGrid grid)
+ {
+ ////鐘舵�侊細0-鏈偣鍑伙紱1-宸插紑鍚紱2-瑁傜汗
+ if (grid.State == 0 || grid.State == 2)
+ {
+ SoundPlayer.Instance.PlayUIAudio(25);
+ }
+
+ if (grid.EventID == 100)
+ {
+ // 绌烘牸瀛�
+ return;
+ }
+ if (grid.EventID < 99 && grid.EventID > 0)
+ {
+ //鍒ゆ柇寤虹瓚鏄惁閮藉紑鍏ㄤ簡娌�
+ if (!BeautyMMManager.Instance.CanOpenBuild())
+ {
+ SysNotifyMgr.Instance.ShowTip("BeautyMM3");
+ return;
+ }
+ }
+ if (grid.EventID == 101)
+ {
+ boomEffect.Play();
+ }
+
+
+ var pack = new CB040_tagCSTravelClick();
+ pack.Row = (byte)girdPos.x;
+ pack.Col = (byte)girdPos.y;
+ GameNetSystem.Instance.SendInfo(pack);
+ BeautyMMManager.Instance.clickGirdPos = girdPos;
+
+ }
+}
diff --git a/Main/System/BeautyMM/BeautyMMTravelCell.cs.meta b/Main/System/BeautyMM/BeautyMMTravelCell.cs.meta
new file mode 100644
index 0000000..4b3790b
--- /dev/null
+++ b/Main/System/BeautyMM/BeautyMMTravelCell.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 71e82a96c3e36af4f97b52bcebc58d36
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Main/System/BeautyMM/BeautyMMTravelWin.cs b/Main/System/BeautyMM/BeautyMMTravelWin.cs
index bd83896..860de82 100644
--- a/Main/System/BeautyMM/BeautyMMTravelWin.cs
+++ b/Main/System/BeautyMM/BeautyMMTravelWin.cs
@@ -1,10 +1,202 @@
using System.Collections.Generic;
+using System.Linq;
using UnityEngine;
using UnityEngine.UI;
public class BeautyMMTravelWin : UIBase
{
+ [SerializeField] Button rateTipBtn;
+ [SerializeField] Transform rateTipRect;
+ [SerializeField] Text[] rateNameText;
+ [SerializeField] Text[] rateText;
+ [SerializeField] Text horseRateText;
+ [SerializeField] Image[] buildImgs;
+ [SerializeField] GameObject girdsGo;
+ [SerializeField] UIEffectPlayer boomRowEffect;
+ [SerializeField] UIEffectPlayer boomColEffect;
+ [SerializeField] Image processImg;
+ [SerializeField] Text processText;
+ [SerializeField] Text timeText;
+
+ List<BeautyMMTravelCell> girds;
+
+ [SerializeField] Button buildResultBtn;
+ [SerializeField] UIEffectPlayer buildResultEffect;
+ [SerializeField] Image[] whatImgs;
+ [SerializeField] Image[] rightImgs;
+ [SerializeField] Image[] wrongImgs;
+
+ float gridWidth = 0;
+ float gridHeight = 0;
+
+ protected override void InitComponent()
+ {
+ girds = girdsGo.GetComponentsInChildren<BeautyMMTravelCell>().ToList();
+ rateTipBtn.AddListener(() =>
+ {
+ rateTipRect.SetActive(true);
+ });
+ DisplyRate();
+
+ buildResultBtn.AddListener(BuildLVUP);
+ }
+
+ protected override void OnPreOpen()
+ {
+
+ BeautyMMManager.Instance.OnTravelInfoUpdate += OnTravelInfoUpdate;
+ BeautyMMManager.Instance.openChangeGridList.Clear();
+ UIManager.Instance.OnCloseWindow += OnCloseWindow;
+ rateTipRect.SetActive(false);
+
+ Display();
+ DisplayBuildResult();
+ }
+
+ protected override void OnPreClose()
+ {
+ BeautyMMManager.Instance.OnTravelInfoUpdate -= OnTravelInfoUpdate;
+ UIManager.Instance.OnCloseWindow -= OnCloseWindow;
+ }
+
+ void OnTravelInfoUpdate(int result)
+ {
+ //鍚庣澶勭悊锛�0-鏃狅紱1-甯歌锛�2-椹溅鐐稿脊锛�3-浼犻�侀棬锛�4-鏅锛�5-閲嶇疆寮�濮�
+ Display();
+ if (result == 2)
+ {
+ //BeautyMMManager.Instance.clickGirdPos
+ boomRowEffect.transform.localPosition = new Vector3(0,
+ -((BeautyMMManager.Instance.clickGirdPos.x - 1) * gridHeight + gridHeight / 2), 0);
+ boomRowEffect.Play();
+ boomColEffect.transform.localPosition = new Vector3((BeautyMMManager.Instance.clickGirdPos.y - 1) * gridWidth + gridWidth / 2, boomColEffect.transform.localPosition.y, 0);
+ boomColEffect.Play();
+ }
+ DisplayBuildResult();
+ }
+
+ void Display()
+ {
+ for (int i = 0; i < girds.Count; i++)
+ {
+ girds[i].Display(i);
+ }
+
+ var showIndex = -1;
+ if (BeautyMMManager.Instance.m_SceneryType == 1)
+ {
+ showIndex = 0;
+ }
+ else if (BeautyMMManager.Instance.m_SceneryType == 4)
+ {
+ showIndex = 1;
+ }
+ else if (BeautyMMManager.Instance.m_SceneryType == 6)
+ {
+ showIndex = 2;
+ }
+
+ var hasDoor = BeautyMMManager.Instance.HasDoor();
+ for (int i = 0; i < buildImgs.Length; i++)
+ {
+ if (i == showIndex && !hasDoor)
+ {
+ buildImgs[i].SetActive(true);
+ //鏍规嵁鐖剁粍浠剁殑瀹介珮锛屽拰鏍煎瓙鍧愭爣璁$畻璧风偣鍧愭爣
+ if (gridWidth == 0 || gridHeight == 0)
+ {
+ var parentRect = buildImgs[i].transform.parent.GetComponent<RectTransform>();
+ var parentWidth = parentRect.rect.width;
+ var parentHeight = parentRect.rect.height;
+ gridWidth = parentWidth / BeautyMMManager.Instance.travelRowCol[1];
+ gridHeight = parentHeight / BeautyMMManager.Instance.travelRowCol[0];
+ }
+ var x = (BeautyMMManager.Instance.m_SceneryCol - 1) * gridWidth + 2;
+ var y = (BeautyMMManager.Instance.m_SceneryRow - 1) * gridHeight + 2;
+ buildImgs[i].transform.localPosition = new Vector3(x, -y, 0);
+ }
+ else
+ {
+ buildImgs[i].SetActive(false);
+ }
+ }
+ }
+
+ void DisplyRate()
+ {
+ rateTipRect.SetActive(false);
+ var keys = TravelEventConfig.GetKeys();
+ var index = 0;
+ for (int i = 0; i < keys.Count; i++)
+ {
+ var config = TravelEventConfig.Get(keys[i]);
+ if (config.EventID < 200)
+ {
+ continue;
+ }
+ rateNameText[index].text = ItemConfig.Get(config.AwardItemID).ItemName + "x" + config.AwardItemCnt;
+ rateText[index].text = config.ShowRate;
+ index++;
+ }
+ horseRateText.text = TravelEventConfig.Get(101).ShowRate;
+ }
+
+ //寤虹瓚鐗规晥鍝佽川 1-1073 2-1078 3-1083
+ Dictionary<int, int> buildEffectDic = new Dictionary<int, int>()
+ {
+ {1, 1073},
+ {2, 1078},
+ {3, 1083}
+ };
+ void DisplayBuildResult()
+ {
+ if (!IsShowBuildUpgradeUI())
+ {
+ buildResultBtn.SetActive(false);
+ return;
+ }
+ buildResultBtn.SetActive(true);
+ }
+ void BuildLVUP()
+ {
+ var pack = new CB041_tagCSTravelSceneryUP();
+ GameNetSystem.Instance.SendInfo(pack);
+ }
+
+ //鏄惁鏄剧ず寤虹瓚鍗囩骇UI
+ bool IsShowBuildUpgradeUI()
+ {
+
+ //閲嶇櫥鍚� m_Result 鏄�0 ,渚濈劧瑕侀亶鍘嗗垽鏂�
+ //濡傛灉宸茬粡鏈夐棬浜�
+ if (BeautyMMManager.Instance.HasDoor())
+ {
+ return false;
+ }
+ //m_Result 鍙敤浜庡嵆鏃跺垽鏂�
+ if (BeautyMMManager.Instance.m_SceneryLVInfo == 0 && BeautyMMManager.Instance.m_Result != 4)
+ {
+ return false;
+ }
+ return true;
+ }
+
+ void OnCloseWindow(UIBase ui)
+ {
+ if (ui is CommonGetItemWin)
+ {
+ var gird = BeautyMMManager.Instance.GetGrid(BeautyMMManager.Instance.clickGirdPos);
+ if (gird != null && gird.EventID == (int)GirdEventType.Door)
+ {
+ //榛樿璇锋眰涓嬩竴灞�
+ var pack = new CB040_tagCSTravelClick();
+ pack.Row = (byte)BeautyMMManager.Instance.clickGirdPos.x;
+ pack.Col = (byte)BeautyMMManager.Instance.clickGirdPos.y;
+ GameNetSystem.Instance.SendInfo(pack);
+ }
+ }
+ }
}
diff --git a/Main/Utility/EnumHelper.cs b/Main/Utility/EnumHelper.cs
index 5747238..eab9fb4 100644
--- a/Main/Utility/EnumHelper.cs
+++ b/Main/Utility/EnumHelper.cs
@@ -823,6 +823,7 @@
Hero = 1,//姝﹀皢
Challenge = 2,//鎸戞垬
Official = 3,//鍐呮斂
+ BeautyMM = 7,//绾㈤
GoldRush = 8, //娣橀噾
Realm = 10, //澧冪晫 瀹樿亴
Guild = 11,// 鍏細
--
Gitblit v1.8.0