6662 子 【开发】【2.0】战斗需要木桩 / 【前端】【2.0】战斗需要木桩
| | |
| | | // RuntimeLogUtility.AddLog_Blue(_content, _sTarget.ObjID);
|
| | | //#endif
|
| | |
|
| | | _cTarget = GAMgr.Instance.GetBySID(_sTarget.ObjID) as GActorFight;
|
| | | if (PersonalEnemy.m_SBindCDict.ContainsKey(_sTarget.ObjID))
|
| | | {
|
| | | _cTarget = GAMgr.Instance.GetBySID(PersonalEnemy.m_SBindCDict[_sTarget.ObjID]) as GActorFight;
|
| | | }
|
| | | else
|
| | | {
|
| | | _cTarget = GAMgr.Instance.GetBySID(_sTarget.ObjID) as GActorFight;
|
| | | }
|
| | |
|
| | |
|
| | | if (_cTarget == null)
|
| | | {
|
| | |
| | | _cHurtObj = new AttackHandler.HurtObjs
|
| | | {
|
| | | ObjID = _sTarget.ObjID,
|
| | | clientInstID = GAMgr.Instance.GetCIDBySID(_sTarget.ObjID),
|
| | | clientInstID = GAMgr.Instance.GetCIDBySID(_cTarget.ServerInstID),
|
| | | ObjType = _sTarget.ObjType,
|
| | | HurtHP = _sTarget.HurtHP,
|
| | | CurHP = _sTarget.CurHP,
|
| | |
| | | for (int i = 0; i < vNetData.HurtCount; ++i)
|
| | | {
|
| | | _sTarget = vNetData.HurtList[i];
|
| | | _cTarget = GAMgr.Instance.GetBySID(_sTarget.ObjID) as GActorFight;
|
| | |
|
| | | if (PersonalEnemy.m_SBindCDict.ContainsKey(_sTarget.ObjID))
|
| | | {
|
| | | _cTarget = GAMgr.Instance.GetBySID(PersonalEnemy.m_SBindCDict[_sTarget.ObjID]) as GActorFight;
|
| | | }
|
| | | else
|
| | | {
|
| | | _cTarget = GAMgr.Instance.GetBySID(_sTarget.ObjID) as GActorFight;
|
| | | }
|
| | |
|
| | | #if UNITY_EDITOR
|
| | | string _content = string.Format("1 DTC0614_tagUseSkillPos => {0} 使用技能:{1} 攻击了 {2}, 伤害为: {3}, 剩余血量: {4}, 是否可以死亡: {5}",
|
| | |
| | | _cHurtObj = new AttackHandler.HurtObjs
|
| | | {
|
| | | ObjID = _sTarget.ObjID,
|
| | | clientInstID = GAMgr.Instance.GetCIDBySID(_sTarget.ObjID),
|
| | | clientInstID = GAMgr.Instance.GetCIDBySID(_cTarget.ServerInstID),
|
| | | ObjType = _sTarget.ObjType,
|
| | | HurtHP = _sTarget.HurtHP,
|
| | | CurHP = _sTarget.CurHP,
|
| | |
| | | return 0;
|
| | | });
|
| | |
|
| | | for (int i = 0; i < _actorList.Count && skill.hitTargetList.Count + skill.hitClientBattleTargetList.Count < _hitTestLimit; ++i)
|
| | | for (int i = 0; i < _actorList.Count && skill.hitTargetList.Count + skill.hitClientBattleTargetList.Count <= _hitTestLimit; ++i)
|
| | | {
|
| | |
|
| | | #if UNITY_EDITOR
|
| | | if (RuntimeLogUtility.s_ForceOneEnemy && i > 0)
|
| | | {
|
| | |
| | | {
|
| | | return;
|
| | | }
|
| | |
|
| | | skill.hitTargetList.Add(target.ClientInstID);
|
| | | }
|
| | |
|
| | |
| | | public uint bindClientNpcSID = 0; |
| | | |
| | | private static Dictionary<uint, PersonalEnemy> m_Map = new Dictionary<uint, PersonalEnemy>(); |
| | | public static Dictionary<uint, uint> m_BindDict = new Dictionary<uint, uint>(); |
| | | public static Dictionary<uint, uint> m_CBinSdDict = new Dictionary<uint, uint>(); |
| | | public static Dictionary<uint, uint> m_SBindCDict = new Dictionary<uint, uint>(); |
| | | |
| | | private static List<PersonalEnemy> m_UnUsed = new List<PersonalEnemy>(); |
| | | |
| | | public static void UnInit() |
| | | { |
| | | m_Map.Clear(); |
| | | m_BindDict.Clear(); |
| | | m_CBinSdDict.Clear(); |
| | | m_SBindCDict.Clear(); |
| | | m_UnUsed.Clear(); |
| | | } |
| | | |
| | | public static uint GetPersionEnemySID(uint sid) |
| | | { |
| | | uint _objID = 0; |
| | | if (m_BindDict.TryGetValue(sid, out _objID)) |
| | | if (m_CBinSdDict.TryGetValue(sid, out _objID)) |
| | | { |
| | | return _objID; |
| | | } |
| | |
| | | { |
| | | m_UnUsed.Remove(_pm); |
| | | _pm.bindClientNpcSID = npc.ServerInstID; |
| | | m_BindDict[npc.ServerInstID] = _pm.data.ObjID; |
| | | m_CBinSdDict[npc.ServerInstID] = _pm.data.ObjID; |
| | | m_SBindCDict[_pm.data.ObjID] = npc.ServerInstID; |
| | | npc.ActorInfo.LV = _pm.data.LV; |
| | | npc.RequestName(); |
| | | npc.ActorInfo.ResetHp((int)_pm.data.HP, (short)_pm.data.HPEx, (int)_pm.data.MaxHP, (short)_pm.data.MaxHPEx); |