using CSNetwork.Common; using UnityEngine; using UnityEngine.UI; namespace BrewMonster.UI { public class DlgWorldMap : AUIDialog { [SerializeField] private Image mapImage; // 世界 / World const int MAJOR_MAP = 1; // 仙魔 / Good Evil // Tiên Ma static bool GOOD_EVIL_MAP(int id) { return id == 121 || id == 122; } // 城战 / Guild War // Thành Chiến static bool GUILD_WAR_MAP(int id) { return id >= 230 && id <= 235; } // 蓬莱 / Penglai // Bồng Lai static bool PENGLAI_MAP(int id) { return id == 137; } static bool IS_MAP_MARKABLE(int mapID) { return MAJOR_MAP == mapID || GOOD_EVIL_MAP(mapID) || GUILD_WAR_MAP(mapID) || PENGLAI_MAP(mapID); } public override void Show(bool value) { base.Show(value); } public void BuildTravelMap(uint dwType, object pData) { // default world id int worldid = MAJOR_MAP; // select the correct map background // PAUIIMAGEPICTURE pImage = (PAUIIMAGEPICTURE)GetDlgItem("WorldMapTravel"); // prepare the necessary information SetData(dwType); // CECMapDlgsMgr *pMgr = GetGameUIMan()->GetMapDlgsMgr(); // ÖØÐ¿ªÊ¼¼ÆËã´«ËÍÏß· // pMgr->ResetTransWay(); if(dwType == (uint)DATA_TYPE.DT_NPC_TRANSMIT_SERVICE) { // worldid = pMgr->FindTransmitWorldID((NPC_TRANSMIT_SERVICE*)pData); // save the worldid // SetDataPtr((void*)worldid, "WorldID"); // pMgr->LoadMapTexture(m_pA3DDevice, pImage, CECMapDlgsMgr::MAP_TYPE_TRANSMIT); } else if(dwType == (uint)DATA_TYPE.DT_TRANSMITSCROLL_ESSENCE) { // save the slot info // SetDataPtr(pData, "ItemSlot"); // pMgr->LoadMapTexture(m_pA3DDevice, pImage, CECMapDlgsMgr::MAP_TYPE_SCROLL); } else { // invalid transmit type BMLogger.LogError($"Invalid transmit type: {dwType}"); } } } }