411 定军阁-客户端 开出展示npc配置,隐藏敌将信息按钮,隐藏定军阁战场血条相关信息
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: YYL |
| | | // [ Date ]: Thursday, January 8, 2026 |
| | | // [ Date ]: Tuesday, January 20, 2026 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | |
| | | public int[][] AwardList; |
| | | public int[] LineupIDList; |
| | | public long FightPower; |
| | | public int NPCID; |
| | | public int[] SkillIDExList; |
| | | |
| | | public override int LoadKey(string _key) |
| | | { |
| | |
| | | } |
| | | |
| | | long.TryParse(tables[6],out FightPower); |
| | | |
| | | int.TryParse(tables[7],out NPCID); |
| | | |
| | | if (tables[8].Contains("[")) |
| | | { |
| | | SkillIDExList = JsonMapper.ToObject<int[]>(tables[8]); |
| | | } |
| | | else |
| | | { |
| | | string[] SkillIDExListStringArray = tables[8].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | SkillIDExList = new int[SkillIDExListStringArray.Length]; |
| | | for (int i=0;i<SkillIDExListStringArray.Length;i++) |
| | | { |
| | | int.TryParse(SkillIDExListStringArray[i],out SkillIDExList[i]); |
| | | } |
| | | } |
| | | } |
| | | catch (Exception exception) |
| | | { |
| | |
| | | bossHeadCell.SetTeamHero(teamHero); |
| | | txtBossName.text = teamHero.name; |
| | | NPCConfig npcConfig = NPCConfig.Get(teamHero.NPCID); |
| | | bossLifeBar.SetBaseInfo(Mathf.Max(1, npcConfig.LifeBarCount), (ulong)teamHero.curHp, (ulong)teamHero.maxHp); |
| | | //bossLifeBar.SetBaseInfo(Mathf.Max(1, npcConfig.LifeBarCount), (ulong)teamHero.curHp, (ulong)teamHero.maxHp); |
| | | bossBattleObject.buffMgr.onBuffChanged -= OnBuffChanged; |
| | | bossBattleObject.buffMgr.onBuffChanged += OnBuffChanged; |
| | | } |
| | |
| | | { |
| | | bossHeadCell.SetTeamHero(null); |
| | | txtBossName.text = string.Empty; |
| | | bossLifeBar.SetBaseInfo(2, 2, 2); |
| | | //bossLifeBar.SetBaseInfo(2, 2, 2); |
| | | Debug.LogError("找不到boss"); |
| | | } |
| | | |
| | |
| | | if (null != bossBattleObject) |
| | | { |
| | | TeamHero teamHero = bossBattleObject.teamHero; |
| | | bossLifeBar.Show((ulong)teamHero.curHp, (ulong)teamHero.maxHp); |
| | | //bossLifeBar.Show((ulong)teamHero.curHp, (ulong)teamHero.maxHp); |
| | | } |
| | | } |
| | | |
| | |
| | | // ★★★ 完全使用 StoryBossBattleWin 的逻辑 ★★★ |
| | | if (info.battleHurtParam.hurter.hurtObj != null && bossBattleObject.teamHero.ObjID == info.battleHurtParam.hurter.hurtObj.teamHero.ObjID) |
| | | { |
| | | bossLifeBar.Show((ulong)info.battleHurtParam.hurter.toHp, (ulong)bossBattleObject.teamHero.maxHp); |
| | | //bossLifeBar.Show((ulong)info.battleHurtParam.hurter.toHp, (ulong)bossBattleObject.teamHero.maxHp); |
| | | } |
| | | else if (info.battleHurtParam.caster.casterObj != null && bossBattleObject.teamHero.ObjID == info.battleHurtParam.caster.casterObj.teamHero.ObjID) |
| | | { |
| | | bossLifeBar.Show((ulong)info.battleHurtParam.caster.toHp, (ulong)bossBattleObject.teamHero.maxHp); |
| | | //bossLifeBar.Show((ulong)info.battleHurtParam.caster.toHp, (ulong)bossBattleObject.teamHero.maxHp); |
| | | } |
| | | } |
| | | |
| | |
| | | return true; |
| | | } |
| | | |
| | | public bool TryGetNPCConfig(int layerNum, int levelNum, out NPCLineupConfig npcLineupConfig, out NPCConfig npcConfig) |
| | | public bool TryGetNPCConfig(int layerNum, int levelNum, out NPCConfig npcConfig) |
| | | { |
| | | npcConfig = null; |
| | | npcLineupConfig = null; |
| | | if (!FBDJGLevelConfig.TryGetFBDJGLevelConfig(layerNum, levelNum, out var config)) |
| | | return false; |
| | | int[] lineupIDList = config.LineupIDList; |
| | | if (lineupIDList.IsNullOrEmpty()) |
| | | int npcID = config.NPCID; |
| | | if (!NPCConfig.HasKey(npcID)) |
| | | return false; |
| | | int lineupID = lineupIDList[0]; |
| | | if (!NPCLineupConfig.HasKey(lineupID)) |
| | | return false; |
| | | npcLineupConfig = NPCLineupConfig.Get(lineupID); |
| | | int bossId = npcLineupConfig.BossID; |
| | | if (!NPCConfig.HasKey(bossId)) |
| | | return false; |
| | | npcConfig = NPCConfig.Get(bossId); |
| | | npcConfig = NPCConfig.Get(npcID); |
| | | return true; |
| | | } |
| | | |
| | |
| | | int showLayerNum; |
| | | int showLevelNum; |
| | | FBDJGLevelConfig config; |
| | | NPCLineupConfig npcLineupConfig; |
| | | NPCConfig npcConfig; |
| | | private void Display() |
| | | { |
| | |
| | | return; |
| | | if (!FBDJGLevelConfig.TryGetFBDJGLevelConfig(showLayerNum, showLevelNum, out config)) |
| | | return; |
| | | if (!manager.TryGetNPCConfig(showLayerNum, showLevelNum, out npcLineupConfig, out npcConfig)) |
| | | if (!manager.TryGetNPCConfig(showLayerNum, showLevelNum, out npcConfig)) |
| | | return; |
| | | |
| | | txtCurrentLevel.text = Language.Get("WarlordPavilion22", showLayerNum, showLevelNum); |
| | | txtBossName.text = npcConfig.NPCName; |
| | | uiHeroController.Create(npcConfig.SkinID, modelSize); |
| | | DisplaySkillWordsList(npcLineupConfig); |
| | | DisplaySkillWordsList(config.SkillIDExList); |
| | | DisplayItemCell(firstAwards, config.PassAwardList); |
| | | manager.DisplayItemCell(challengeAwards, config.AwardList); |
| | | DisplayButtons(); |
| | |
| | | } |
| | | } |
| | | |
| | | public void DisplaySkillWordsList(NPCLineupConfig lineUPConfig) |
| | | public void DisplaySkillWordsList(int[] skillIDExList) |
| | | { |
| | | if (skillWords.IsNullOrEmpty()) |
| | | return; |
| | | for (int i = 0; i < skillWords.Count; i++) |
| | | { |
| | | if (i < lineUPConfig.SkillIDExList.Length) |
| | | if (i < skillIDExList.Length) |
| | | { |
| | | skillWords[i].SetActive(true); |
| | | int skillID = lineUPConfig.SkillIDExList[i]; |
| | | int skillID = skillIDExList[i]; |
| | | skillWords[i].Init(skillID, () => |
| | | { |
| | | SmallTipWin.showText = Language.Get("SmallTipFomat", SkillConfig.Get(skillID)?.SkillName, SkillConfig.Get(skillID)?.Description); |