| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using System.Text.RegularExpressions; |
| | | using LitJson; |
| | | using System.Text; |
| | | |
| | | //Arena主控制代码 |
| | | using System.Linq;
|
| | |
|
| | | //Arena主控制代码
|
| | | public class ArenaModel : ILModel<ArenaModel> |
| | | { |
| | | public bool bFirstStageLoadCheck = false; |
| | |
| | | public int RankType = 28; |
| | | public int SelectRewardType = 1; |
| | | //更新匹配用户信息 |
| | | public event Action<IL_HA922_tagGCArenaMatchList> UpdateMatchUserEvent; |
| | | public event Action<IL_HA926_tagGCArenaBattlePlayerInfo> UpdateBattlePlayerEvent; |
| | | public event Action<HA922_tagGCArenaMatchList> UpdateMatchUserEvent; |
| | | public event Action<HA926_tagGCArenaBattlePlayerInfo> UpdateBattlePlayerEvent; |
| | | //更新匹配用户信息 |
| | | public event Action UpdateBattleRecordListEvent; |
| | | public event Action<int> UpdatePKInfoListEvent; |
| | | |
| | | public Redpoint redpoint = new Redpoint(78129001); |
| | | //查询列表 |
| | | public List<IL_HA923_tagGCArenaBattleRecordList.tagGCArenaBattleRecord> ArenaBattleRecordList = new List<IL_HA923_tagGCArenaBattleRecordList.tagGCArenaBattleRecord>(); |
| | | public List<HA923_tagGCArenaBattleRecordList.tagGCArenaBattleRecord> ArenaBattleRecordList = new List<HA923_tagGCArenaBattleRecordList.tagGCArenaBattleRecord>(); |
| | | //个人信息 |
| | | public ArenaPlayerInfo playerInfo; |
| | | public uint WinnerID; // 胜方ID(本次战斗结束) |
| | | public bool bCheckRedPoint = false; |
| | | public int freeMaxMatchNum { get; private set; } //每次挑战免费次数 |
| | | public int freeMaxMatchNum { get; private set; } //挑战最大次数,配置 + 月卡等增加的次数 |
| | | public int buyMaxMatchNum { get; private set; } //每日可购买次数 |
| | | public int ScoreMin { get; private set; } //最低积分 |
| | | public int ScoreMax { get; private set; } //最高积分 |
| | | public int RecordMax { get; private set; } //对战记录条数(不超过50) |
| | | public int freeRefreshPlayerMax { get; private set; } //每次挑战免费刷新次数,0为不限 |
| | | public int SelectMatchPlayer { get; set; } //当前选择的用户 |
| | | public List<IL_HA922_tagGCArenaMatchList.tagGCArenaMatchInfo> m_PlayerInfo = new List<IL_HA922_tagGCArenaMatchList.tagGCArenaMatchInfo>(); |
| | | public List<HA922_tagGCArenaMatchList.tagGCArenaMatchInfo> m_PlayerInfo = new List<HA922_tagGCArenaMatchList.tagGCArenaMatchInfo>(); |
| | | //场景配置 |
| | | public uint OPPONENT_PLAYERID = 999999; |
| | | public FightResultSupplement resultSupplement; |
| | |
| | | public string opponentName { get; private set; } |
| | | public uint roundWiner = 0; //获胜者 id |
| | | public int currentRecordIndex = 0; |
| | | public ArenaPKUpInfo ArenaPKUpInfoData; |
| | | public ArenaPKUpInfo ArenaPKUpInfoData { get; set; } |
| | | public bool bILAI; |
| | | public bool bFirstShow = true; |
| | | public bool IsArenaWork = true; |
| | | DungeonModel m_DungeonModel; |
| | | public IL_HA922_tagGCArenaMatchList pkList; |
| | | public HA922_tagGCArenaMatchList pkList; |
| | | bool IsSendCloseArena = false; |
| | | |
| | | public int skipFightLV = 200; //跳过战斗等级 |
| | | public bool isSkipFightChoose {
|
| | | get { |
| | | return LocalSave.GetBool("ArenaSkipChallenge" + PlayerDatas.Instance.baseData.PlayerID); |
| | | } |
| | | set
|
| | | {
|
| | | LocalSave.SetBool("ArenaSkipChallenge" + PlayerDatas.Instance.baseData.PlayerID, value);
|
| | | } |
| | | } |
| | | Dictionary<int, int> lvToNpcDic = new Dictionary<int, int>(); |
| | | |
| | | DungeonModel dungeonModel { |
| | | get { |
| | | return m_DungeonModel ?? (m_DungeonModel = ModelCenter.Instance.GetModel<DungeonModel>()); |
| | | } |
| | | } |
| | | |
| | | ServerMirrorFightModel mirrorFightModel { get { return ModelCenter.Instance.GetModel<ServerMirrorFightModel>(); } } |
| | | |
| | | protected override void Init() |
| | | { |
| | | try
|
| | | { |
| | | DTC0403_tagPlayerLoginLoadOK.playerLoginOkEvent += OnPlayerLoginOk; |
| | | DTC0403_tagPlayerLoginLoadOK.playerLoginOkEvent += OnPlayerLoginOk; |
| | | |
| | | playerInfo = new ArenaPlayerInfo(); |
| | | RobotName = Language.Get("ArenaRobotName"); |
| | | RankType = 28; |
| | | SelectRewardType = 1; |
| | | ////// |
| | | ScoreMin = GeneralDefine.ArenaSetList[0]; |
| | | ScoreMax = GeneralDefine.ArenaSetList[1]; |
| | | playerInfo = new ArenaPlayerInfo(); |
| | | RobotName = Language.Get("ArenaRobotName"); |
| | | RankType = 28; |
| | | SelectRewardType = 1; |
| | | ////// |
| | | ScoreMin = GeneralDefine.ArenaSetList[0]; |
| | | ScoreMax = GeneralDefine.ArenaSetList[1]; |
| | | |
| | | var fun = FuncConfigConfig.Get("ArenaSet"); |
| | | freeMaxMatchNum = int.Parse(fun.Numerical3); |
| | | RecordMax = int.Parse(fun.Numerical4); |
| | | freeRefreshPlayerMax = int.Parse(fun.Numerical5); |
| | | ArenaManager.ParseAwardFuncConfig(); |
| | | ArenaManager.ParseItemJobSkill(); |
| | | var fun = FuncConfigConfig.Get("ArenaSet"); |
| | | freeMaxMatchNum = int.Parse(fun.Numerical3); //初始最大次数,月卡等会改变 |
| | | RecordMax = int.Parse(fun.Numerical4); |
| | | freeRefreshPlayerMax = int.Parse(fun.Numerical5); |
| | | ArenaManager.ParseAwardFuncConfig(); |
| | | ArenaManager.ParseItemJobSkill(); |
| | | |
| | | //r0,代表机器人参数,r1,真人 ,初始化 |
| | | List<int> r0 = new List<int>(); |
| | | List<int> r1 = new List<int>(); |
| | | for (int i = 0; i < 5; i++) |
| | | r0.Add(i); |
| | | for (int i = 0; i < 33; i++) |
| | | r1.Add(i); |
| | | ArenaManager.playInfo.Add(0, r0); |
| | | ArenaManager.playInfo.Add(1, r1); |
| | | //r0,代表机器人参数,r1,真人 ,初始化 |
| | | List<int> r0 = new List<int>(); |
| | | List<int> r1 = new List<int>(); |
| | | for (int i = 0; i < 5; i++) |
| | | r0.Add(i); |
| | | for (int i = 0; i < 33; i++) |
| | | r1.Add(i); |
| | | ArenaManager.playInfo.Add(0, r0); |
| | | ArenaManager.playInfo.Add(1, r1); |
| | | |
| | | //获取副本 游戏时间,准备时间,退出时间 |
| | | dungeonModel.currentDungeon = new Dungeon(ArenaManager.MapID, 0); |
| | | var dungeonId = dungeonModel.GetDungeonId(dungeonModel.currentDungeon); |
| | | var dungeonConfig = DungeonConfig.Get(dungeonId); |
| | | ArenaManagerModel.Instance.s_StepTimes = LitJson.JsonMapper.ToObject<int[]>(dungeonConfig.StepTime); |
| | | //获取副本 游戏时间,准备时间,退出时间 |
| | | dungeonModel.currentDungeon = new Dungeon(ArenaManager.MapID, 0); |
| | | var dungeonId = dungeonModel.GetDungeonId(dungeonModel.currentDungeon); |
| | | var dungeonConfig = DungeonConfig.Get(dungeonId); |
| | | ArenaManagerModel.Instance.s_StepTimes = LitJson.JsonMapper.ToObject<int[]>(dungeonConfig.StepTime); |
| | | |
| | | fun = FuncConfigConfig.Get("ArenaSet1"); |
| | | skipFightLV = int.Parse(fun.Numerical1); |
| | | }
|
| | | catch (System.Exception ex)
|
| | | //获取机器人等级对应的数据 |
| | | var config = FuncConfigConfig.Get("ArenaRobotLVNPC"); |
| | | JsonData json = JsonMapper.ToObject(config.Numerical1); |
| | | //{"50":80100000, "100":80100010, "9999":80100020} |
| | | var keys = json.Keys.ToList(); |
| | | for (int i = 0; i < keys.Count; i++)
|
| | | { |
| | | OperationLogCollect.Instance.BugReportSys(ex.ToString()); |
| | | Debug.LogError(ex); |
| | | var key = keys[i]; |
| | | lvToNpcDic[int.Parse(key)] = int.Parse(json[key].ToString()); |
| | | } |
| | | } |
| | | |
| | |
| | | public void CallUpdatePKInfo(int type) |
| | | { |
| | | if(UpdatePKInfoListEvent != null) |
| | | UpdatePKInfoListEvent(1); |
| | | UpdatePKInfoListEvent(1); |
| | | } |
| | | public void FirstData() |
| | | { |
| | |
| | | #endregion |
| | | #region //接收命令 |
| | | |
| | | public void ReceiveBattLePlayer(IL_HA926_tagGCArenaBattlePlayerInfo vNetData) |
| | | public void ReceiveBattLePlayer(HA926_tagGCArenaBattlePlayerInfo vNetData) |
| | | { |
| | | UpdateBattlePlayerEvent?.Invoke(vNetData); |
| | | } |
| | | //竞技场匹配玩家列表 |
| | | public void ReceiveMatchData(IL_HA922_tagGCArenaMatchList vNetData) |
| | | public void ReceiveMatchData(HA922_tagGCArenaMatchList vNetData) |
| | | { |
| | | pkList = vNetData; |
| | | if (UpdateMatchUserEvent != null) |
| | |
| | | } |
| | | |
| | | // 竞技场对战记录列表 |
| | | public void ReceiveBattleRecordList(IL_HA923_tagGCArenaBattleRecordList vNetData) |
| | | public void ReceiveBattleRecordList(HA923_tagGCArenaBattleRecordList vNetData) |
| | | { |
| | | string nameStr = ""; |
| | | string inputString = LocalSave.GetString("MatchInfoPlayerIDALL"+PlayerDatas.Instance.PlayerId); |
| | |
| | | else |
| | | { |
| | | nameStr = vNetData.BattleRecordList[i].PlayerName; |
| | | SysNotifyMgr.Instance.ShowTip("ArenaFightPlayer", nameStr.Trim().Replace("\0", "")); |
| | | } |
| | | //SysNotifyMgr.Instance.ShowTip("ArenaFightPlayer", nameStr.Trim().Replace("\0", "")); |
| | | |
| | | bCheckRedPoint = true; |
| | | UpdateRedPoint(); |
| | |
| | | public void FakeMatchOk() |
| | | { |
| | | PlayerDatas.Instance.hero.Pos = ArenaManagerModel.leftBornPoint; |
| | | CameraController.Instance.rotationX = 45; |
| | | CameraController.Instance.Apply(); |
| | | PlayerDatas.Instance.hero.EulerAngles = 90; |
| | | //强杀,再进入 |
| | | if (m_PlayerInfo.Count <= 0 || ArenaModel.Instance.SelectMatchPlayer == 5) |
| | |
| | | SelectMatchPlayer = LocalSave.GetInt("MatchInfoSelect"); |
| | | for (int i = 0; i < 6; i++) //第6个放从挑战记录里的数据 |
| | | { |
| | | IL_HA922_tagGCArenaMatchList.tagGCArenaMatchInfo playerInfo = new IL_HA922_tagGCArenaMatchList.tagGCArenaMatchInfo(); |
| | | HA922_tagGCArenaMatchList.tagGCArenaMatchInfo playerInfo = new HA922_tagGCArenaMatchList.tagGCArenaMatchInfo(); |
| | | playerInfo.PlayerID = (uint)LocalSave.GetInt("MatchInfoPlayerID"); |
| | | playerInfo.PlayerName = LocalSave.GetString("MatchInfoPlayerName"); |
| | | playerInfo.Job = (byte)LocalSave.GetInt("MatchInfoJob"); |
| | |
| | | autoEnsureTime = Time.time + 3f, |
| | | myName = PlayerDatas.Instance.baseData.PlayerName, |
| | | myJob = PlayerDatas.Instance.baseData.Job, |
| | | myFace = AvatarHelper.GetMyAvatarID(), |
| | | myFacePic = AvatarHelper.GetMyAvatarID(), |
| | | myFace = PlayerDatas.Instance.baseData.face, |
| | | myBornPoint = myPlace, |
| | | opponentName = opponentName, |
| | | opponentJob = m_PlayerInfo[SelectMatchPlayer].Job, |
| | | opponentFace = (int)m_PlayerInfo[SelectMatchPlayer].Face, |
| | | opponentFacePic = (int)m_PlayerInfo[SelectMatchPlayer].FacePic, |
| | | opponentMaxHp = (ulong)GetLevel((int)m_PlayerInfo[SelectMatchPlayer].LV, 1), |
| | | opponentLevel = (int)m_PlayerInfo[SelectMatchPlayer].LV, |
| | | opponentPlayerId = (int)m_PlayerInfo[SelectMatchPlayer].PlayerID, |
| | | opponentShield = GetLevel((int)m_PlayerInfo[SelectMatchPlayer].LV, 3), |
| | | MaxProDef = GetLevel((int)m_PlayerInfo[SelectMatchPlayer].LV, 3), |
| | | opponentFace = (int)m_PlayerInfo[SelectMatchPlayer].Face, |
| | | MaxProDef = 100, |
| | | realmLV = realm, |
| | | }; |
| | | ArenaManager.myName = PlayerDatas.Instance.baseData.PlayerName; |
| | |
| | | { |
| | | ArenaModel.Instance.IsArenaWork = false; |
| | | ArenaManager.isArenaClient = true; |
| | | ArenaManagerModel.isMirrorFight = false; |
| | | DebugEx.Log("ArenaManager.isArenaClient"); |
| | | //开始自定义场景 |
| | | var sendInfo = new CA231_tagCMClientStartCustomScene(); |
| | |
| | | IsArenaWork = false; |
| | | ArenaManager.isArenaClient = false; |
| | | ArenaManager.isArenaPK = false; |
| | | PlayerDatas.Instance.extersion.pkState = 0; |
| | | if (ArenaManagerModel.isMirrorFight)
|
| | | {
|
| | | dungeonModel.ExitCurrentDungeon();
|
| | | return;
|
| | | }
|
| | | |
| | | ArenaManagerModel.Instance.ReleasePlayer(); |
| | | ClientDungeonStageUtility.SetClientDungeon(false, 0); |
| | | PlayerDatas.Instance.extersion.pkState = 0; |
| | | ModelCenter.Instance.GetModel<DungeonModel>().ResetBufData(); |
| | | PersonalEnemy.ReleaseAll(); |
| | | PlayerDatas.Instance.baseData.MapID = PlayerDatas.Instance.baseData.mainServerMapIdRecord; |
| | |
| | | |
| | | public void BeginRecordBattle() |
| | | { |
| | | IL_HA923_tagGCArenaBattleRecordList.tagGCArenaBattleRecord record = ArenaModel.Instance.ArenaBattleRecordList[ArenaModel.Instance.currentRecordIndex];
|
| | |
|
| | | |
| | | if (ArenaModel.Instance.playerInfo.GetDayMatchCount() > 0) |
| | | { |
| | | if (isSkipFightChoose)
|
| | | {
|
| | | HA923_tagGCArenaBattleRecordList.tagGCArenaBattleRecord record = ArenaModel.Instance.ArenaBattleRecordList[ArenaModel.Instance.currentRecordIndex]; |
| | | //int tmp = 5;
|
| | | //ArenaModel.Instance.SelectMatchPlayer = tmp; //当前选择的用户 |
| | | //HA922_tagGCArenaMatchList.tagGCArenaMatchInfo tmper = new HA922_tagGCArenaMatchList.tagGCArenaMatchInfo();
|
| | | //tmper.PlayerID = record.PlayerID;
|
| | | //if (record.PlayerID < 10000)
|
| | | //{
|
| | | // tmper.PlayerName = ArenaModel.Instance.RobotName;
|
| | | //}
|
| | | //else
|
| | | //{
|
| | | // tmper.PlayerName = record.PlayerName;
|
| | | //}
|
| | |
|
| | | //tmper.Job = record.Job;
|
| | | //tmper.LV = record.LV;
|
| | | //tmper.RealmLV = record.RealmLV;
|
| | | //tmper.FightPower = record.FightPower;
|
| | | //tmper.Score = record.Score;
|
| | |
|
| | | ////保证强杀,重新进入场景,有数据
|
| | | //ArenaModel.Instance.m_PlayerInfo[tmp] = tmper;
|
| | | //ArenaModel.Instance.bFirstStageLoadCheck = true;
|
| | | //LocalSave.SetInt("MatchInfoSelect", tmp);
|
| | | //LocalSave.SetInt("MatchInfoPlayerID", (int)ArenaModel.Instance.m_PlayerInfo[tmp].PlayerID);
|
| | | //LocalSave.SetString("MatchInfoPlayerName", ArenaModel.Instance.m_PlayerInfo[tmp].PlayerName);
|
| | | //LocalSave.SetInt("MatchInfoJob", ArenaModel.Instance.m_PlayerInfo[tmp].Job);
|
| | | //LocalSave.SetInt("MatchInfoLV", (int)ArenaModel.Instance.m_PlayerInfo[tmp].LV);
|
| | | //LocalSave.SetInt("MatchInfoRealmLV", (int)ArenaModel.Instance.m_PlayerInfo[tmp].RealmLV);
|
| | | //LocalSave.SetInt("MatchInfoFightPower", (int)ArenaModel.Instance.m_PlayerInfo[tmp].FightPower);
|
| | | //LocalSave.SetInt("MatchInfoScore", (int)ArenaModel.Instance.m_PlayerInfo[tmp].Score);
|
| | | //LocalSave.SetInt("ArenaAllSeconds", TimeUtility.AllSeconds);
|
| | |
|
| | | //LocalSave.SetString("MatchInfoPlayerFightNow" + PlayerDatas.Instance.PlayerId, record.Time.ToString());
|
| | |
|
| | | //ArenaModel.Instance.StartClientArena();
|
| | | //WindowCenter.Instance.CloseIL<ArenaRecordWin>();
|
| | | int playerID = (int)record.PlayerID;
|
| | |
|
| | | if (playerID < 10000)
|
| | | {
|
| | | var tmpPlayer = record;
|
| | | uint PlayerID = tmpPlayer.PlayerID;
|
| | | //ArenaManager.isArenaClient = true;
|
| | | SendArenaBattle(PlayerID, 0);
|
| | | LocalSave.SetString("MatchInfoPlayerFightNow" + PlayerDatas.Instance.PlayerId, record.Time.ToString());
|
| | |
|
| | | if (PlayerID > 10000)
|
| | | {
|
| | | mirrorFightModel.SendMirrorFight(ArenaManager.MapID, 0, PlayerID, 3);
|
| | | }
|
| | | else
|
| | | { |
| | | Clock.AlarmAfter(0.2, () =>
|
| | | {
|
| | | ulong fightpower = 0;
|
| | | if (record.PlayerID < 10000)
|
| | | {
|
| | | fightpower = (uint)GetLevel(record.LV, 2); //fight
|
| | | }
|
| | | else
|
| | | {
|
| | |
|
| | | fightpower = record.FightPowerEx * Constants.ExpPointValue + record.FightPower;
|
| | | }
|
| | | SendArenaBattle(PlayerID, (byte)(PlayerDatas.Instance.baseData.FightPoint >= fightpower ? 1 : 2));
|
| | |
|
| | | if (PlayerDatas.Instance.baseData.FightPoint >= fightpower)
|
| | | { |
| | | string MatchInfoPlayerFightNow = LocalSave.GetString("MatchInfoPlayerFightNow" + PlayerDatas.Instance.PlayerId);
|
| | | if (MatchInfoPlayerFightNow != "")
|
| | | {
|
| | | string inputString = LocalSave.GetString("MatchInfoPlayerFight" + PlayerDatas.Instance.PlayerId);
|
| | | inputString = StringUtility.Contact(inputString, "|", MatchInfoPlayerFightNow);
|
| | | LocalSave.SetString("MatchInfoPlayerFight" + PlayerDatas.Instance.PlayerId, inputString);
|
| | | }
|
| | | }
|
| | | LocalSave.SetString("MatchInfoPlayerFightNow" + PlayerDatas.Instance.PlayerId, "");
|
| | | });
|
| | | }
|
| | | return;
|
| | | } |
| | | int tmp = 5; |
| | | ArenaModel.Instance.SelectMatchPlayer = tmp; //当前选择的用户 |
| | | IL_HA922_tagGCArenaMatchList.tagGCArenaMatchInfo tmper = new IL_HA922_tagGCArenaMatchList.tagGCArenaMatchInfo(); |
| | | tmper.PlayerID = record.PlayerID; |
| | | if (record.PlayerID < 10000) |
| | | { |
| | | tmper.PlayerName = ArenaModel.Instance.RobotName; |
| | | } |
| | | else |
| | | { |
| | | tmper.PlayerName = record.PlayerName; |
| | | } |
| | | |
| | | tmper.Job = record.Job; |
| | | tmper.LV = record.LV; |
| | | tmper.RealmLV = record.RealmLV; |
| | | tmper.FightPower = record.FightPower; |
| | | tmper.Score = record.Score; |
| | | |
| | | //保证强杀,重新进入场景,有数据 |
| | | ArenaModel.Instance.m_PlayerInfo[tmp] = tmper; |
| | | ArenaModel.Instance.bFirstStageLoadCheck = true; |
| | | LocalSave.SetInt("MatchInfoSelect", tmp); |
| | | LocalSave.SetInt("MatchInfoPlayerID", (int)ArenaModel.Instance.m_PlayerInfo[tmp].PlayerID); |
| | | LocalSave.SetString("MatchInfoPlayerName", ArenaModel.Instance.m_PlayerInfo[tmp].PlayerName); |
| | | LocalSave.SetInt("MatchInfoJob", ArenaModel.Instance.m_PlayerInfo[tmp].Job); |
| | | LocalSave.SetInt("MatchInfoLV", (int)ArenaModel.Instance.m_PlayerInfo[tmp].LV); |
| | | LocalSave.SetInt("MatchInfoRealmLV", (int)ArenaModel.Instance.m_PlayerInfo[tmp].RealmLV); |
| | | LocalSave.SetInt("MatchInfoFightPower", (int)ArenaModel.Instance.m_PlayerInfo[tmp].FightPower); |
| | | LocalSave.SetInt("MatchInfoScore", (int)ArenaModel.Instance.m_PlayerInfo[tmp].Score); |
| | | LocalSave.SetInt("ArenaAllSeconds", TimeUtility.AllSeconds); |
| | | |
| | | LocalSave.SetString("MatchInfoPlayerFightNow" + PlayerDatas.Instance.PlayerId, record.Time.ToString());
|
| | |
|
| | | if (tmper.PlayerID > 10000)
|
| | | {
|
| | | mirrorFightModel.SendMirrorFight(ArenaManager.MapID, 0, tmper.PlayerID, 0);
|
| | | int npcID = GetLVToNPCID(record.LV);
|
| | | TurnFightModel.Instance.StartTurnFight(ArenaManager.MapID, 0, 0, npcID, new uint[1] { (uint)playerID }); |
| | | }
|
| | | else
|
| | | {
|
| | | ArenaModel.Instance.StartClientArena();
|
| | | } |
| | | WindowCenter.Instance.CloseIL<ArenaRecordWin>(); |
| | | TurnFightModel.Instance.StartTurnFight(ArenaManager.MapID, 0, 1, playerID, new uint[1] { (uint)playerID });
|
| | | }
|
| | | } |
| | | else |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | //根据等级区段对用npcid |
| | | public int GetLVToNPCID(int lv)
|
| | | { |
| | | int npcID = 0; |
| | | var keys = lvToNpcDic.Keys.ToList(); |
| | | keys.Sort(); |
| | | for (int i = 0; i < keys.Count; i++) |
| | | {
|
| | | if (lv <= keys[i])
|
| | | {
|
| | | npcID = lvToNpcDic[keys[i]];
|
| | | break;
|
| | | }
|
| | | } |
| | | return npcID; |
| | | } |
| | | |
| | | |
| | | public struct FightResultSupplement |
| | | { |