Files
test/Assets/PerfectWorld/Scripts/World/EC_Instance.cs
T
2026-03-09 19:28:45 +07:00

68 lines
2.2 KiB
C#

using BrewMonster.Common;
using ModelRenderer.Scripts.Common;
using System;
using System.Collections.Generic;
using UnityEngine;
namespace BrewMonster.Scripts
{
public class CECInstance
{
int m_id = 161; // Instance ID
string m_strName; // Instance name
string m_strPath; // Path
int m_iRowNum = 3; // Number of map row
int m_iColNum = 4; // Number of map column
bool m_bLimitJump = false; // Ƿ
List<string> m_routeFiles;
public CECInstance()
{
m_id = 161;
m_iRowNum = 3;
m_iColNum = 4;
m_bLimitJump = false;
// Minimal instance stub for map a61 (worldtag/idInst = 161).
// a61 地图的最小实例桩数据(worldtag/idInst = 161)。
m_strPath = "a61";
m_routeFiles = new List<string>
{
// This matches extracted client movemap file: r1_1-c1_2-l0.(cfg/prmap/pdhmap/mlu)
// 与提取客户端 movemap 文件一致:r1_1-c1_2-l0.(cfg/prmap/pdhmap/mlu)
"r1_1-c1_2-l0",
};
}
// Get instance ID
public int GetID() { return m_id; }
// Get instance name
public string GetName() { return m_strName; }
// Get instance data path
public string GetPath() { return m_strPath; }
// Get row and column number of map
public int GetRowNum(){ return m_iRowNum; }
public int GetColNum(){ return m_iColNum; }
public bool GetLimitJump(){ return m_bLimitJump; }
public List<string> GetRouteFiles(){ return m_routeFiles; }
public bool GetPositionRelatedTexture(float x, float z, string filePath)
{
return true;
}
// Load instance information from file
public bool Load(instanceStruct data)
{
m_id = data.m_id;
m_strName = data.m_strName;
m_strPath = data.m_strPath;
m_iRowNum = data.m_iRowNum;
m_iColNum = data.m_iColNum;
m_bLimitJump = (data.m_bLimitJump != 0);
m_routeFiles.Clear();
m_routeFiles.AddRange(data.m_routeFiles);
return true;
}
}
}