| Core/NetworkPackage/DTCFile/ServerPack/H03_MainCharacter/DTC0310_tagRoleSkillChange.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| Fight/Actor/AI/HeroAI_Base.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| Fight/Actor/HeroBehaviour.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| Fight/Actor/Skill/SkillHelper.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
Core/NetworkPackage/DTCFile/ServerPack/H03_MainCharacter/DTC0310_tagRoleSkillChange.cs
@@ -69,5 +69,7 @@ InstanceResourcesLoader.PreloadSkillEffect(vNetData.NewSkillID); } SkillHelper.Instance.BindSkill(vNetData.NewSkillID); } } Fight/Actor/AI/HeroAI_Base.cs
@@ -1,5 +1,4 @@ using System.Collections.Generic; using System.Collections.Generic; using Snxxz.UI; using UnityEngine; @@ -107,7 +106,7 @@ int _chkSkillID = -1; for (int i = 0; i < skillList.Length; ++i) { _chkSkillID = skillList[i]; _chkSkillID = SkillHelper.Instance.GetSkillID(skillList[i]); if (CanCast(_chkSkillID)) { @@ -121,10 +120,22 @@ protected bool CanCastActiveUse(int skillID) { GA_Hero _hero = PlayerDatas.Instance.hero; var _skill = _hero.SkillMgr.Get(skillID); // 获取英雄真实拥有的技能 Dictionary<int, PlayerSkillData> _heroSkills = PlayerDatas.Instance.skill.GetAllSkill(); if (!_heroSkills.ContainsKey(skillID)) bool _has = false; foreach (var _skillData in _heroSkills.Values) { if (_skillData.skillCfg.SkillTypeID == _skill.skillInfo.config.SkillTypeID) { _has = true; break; } } if (!_has) { return false; } @@ -133,8 +144,6 @@ { return false; } var _skill = _hero.SkillMgr.Get(skillID); // 判断是否是被封禁的技能 if (!StatusMgr.Instance.CanAttack(_hero.ServerInstID, _skill.skillInfo.config.SkillOfSeries)) @@ -185,9 +194,9 @@ if (_target != null && lockNpcID != -1) { var _npcFight = _target as GActorNpcFight; if(_npcFight != null) if (_npcFight != null) { if(_npcFight.NpcConfig.NPCID != lockNpcID) if (_npcFight.NpcConfig.NPCID != lockNpcID) { _target = GAMgr.Instance.FindAtkTarget(searchCenter, range, 360, lockNpcID); } Fight/Actor/HeroBehaviour.cs
@@ -714,7 +714,7 @@ { // 创建发包协议 _b405 = new CB405_tagCMSuperAtk(); _b405.SkillID = (ushort)skill.id; _b405.SkillID = (ushort)SkillHelper.Instance.GetSkillID(skill.skillInfo.config.SkillTypeID); _b405.PosX = (ushort)(m_Hero.Pos.x * 2 + GA_Hero.MapOffset.x); _b405.PosY = (ushort)(m_Hero.Pos.z * 2 + GA_Hero.MapOffset.z); _b405.TagPosX = (ushort)(skill.targetPosition.x * 2 + GA_Hero.MapOffset.x); Fight/Actor/Skill/SkillHelper.cs
@@ -8,10 +8,10 @@ /// </summary> [XLua.LuaCallCSharp] public class SkillHelper : Singleton<SkillHelper> { private Dictionary<int, SkillInfo> m_SkillInfoDict; private Dictionary<int, List<SkillInfo>> m_SkillToSpSkill; private Dictionary<int, int> m_SkillTypeIDToSkillID; public void Init() { @@ -25,10 +25,35 @@ m_SkillToSpSkill = new Dictionary<int, List<SkillInfo>>(); } if (m_SkillTypeIDToSkillID == null) { m_SkillTypeIDToSkillID = new Dictionary<int, int>(); } Snxxz.UI.TreasureSkillModel _model = Snxxz.UI.ModelCenter.Instance.GetModel<Snxxz.UI.TreasureSkillModel>(); _model.potentialLevelRefresh += OnSpSkillChange; } public void BindSkill(int skillID) { SkillConfig _skill = SkillConfig.Get(skillID); if (_skill == null) { return; } m_SkillTypeIDToSkillID[_skill.SkillTypeID] = _skill.SkillID; } public int GetSkillID(int typeID) { if (m_SkillTypeIDToSkillID.ContainsKey(typeID)) { return m_SkillTypeIDToSkillID[typeID]; } return typeID; } public void OnSpSkillChange(int skillTypeID, int level) { //Debug.LogFormat("# sp技能[{0}]发生了改变: {1} #", skillTypeID, level);