| | |
| | | if (_sTarget.CurHP == 0 && !(_cTarget is GActorPlayerBase))
|
| | | {
|
| | | _cTarget.ActorInfo.ResetHp((int)_sTarget.CurHP, (short)_sTarget.CurHPEx);
|
| | | _cTarget.Die(vNetData.ObjID);
|
| | | _cTarget.Die(vNetData.ObjID, 0, _sTarget.AttackType);
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | if (_sTarget.CurHP == 0 && !(_cTarget is GActorPlayerBase))
|
| | | {
|
| | | _cTarget.ActorInfo.ResetHp((int)_sTarget.CurHP, (short)_sTarget.CurHPEx);
|
| | | _cTarget.Die(vNetData.ObjID);
|
| | | _cTarget.Die(vNetData.ObjID, 0, _sTarget.AttackType);
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | if (_sTarget.CurHP == 0)
|
| | | {
|
| | | _cTarget.ActorInfo.ResetHp((int)_sTarget.CurHP);
|
| | | _cTarget.Die(vNetData.ObjID);
|
| | | _cTarget.Die(vNetData.ObjID, 0, _sTarget.AttackType);
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | |
|
| | | if (CheckPull(attacker, target, soConfig.bodyControlId))
|
| | | {
|
| | | target.StartBeatBack(attacker.ServerInstID, soConfig.bodyControlId, MathUtility.ForwardXZ(target.Pos, attacker.Pos));
|
| | | target.StartBeatBack(attacker.ServerInstID, soConfig.bodyControlId, MathUtility.ForwardXZ(target.Pos, attacker.Pos), (HurtAttackType)attackType);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | |
|
| | | if (canDie && target.ActorInfo.RealHp == 0)
|
| | | {
|
| | | target.Die(attacker.ServerInstID, soConfig.deadFlyId);
|
| | | target.Die(attacker.ServerInstID, soConfig.deadFlyId, (byte)attackType);
|
| | | }
|
| | |
|
| | | if (target.ActorInfo.serverDie
|
| | |
| | | {
|
| | | attackType = (byte)HurtAttackType.ZhuXianAtk;
|
| | | }
|
| | | else if (_isLucky)
|
| | | else if (_isLucky
|
| | | #if UNITY_EDITOR
|
| | | || RuntimeLogUtility.s_ForceLuckHit
|
| | | #endif
|
| | | )
|
| | | {
|
| | | attackType = (byte)HurtAttackType.LuckyHit;
|
| | | }
|
| | | else if (_isCrit)
|
| | | else if (_isCrit
|
| | | #if UNITY_EDITOR
|
| | | || RuntimeLogUtility.s_ForceSupperHit
|
| | | #endif
|
| | | )
|
| | | {
|
| | | attackType = (byte)HurtAttackType.SuperHit;
|
| | | }
|
| | |
| | | {
|
| | | public uint killServerInstID;
|
| | | public Vector3 killerPos;
|
| | | public byte killHurtType;
|
| | |
|
| | | public int deadFlyId;
|
| | | private float m_EnterGroundHeight;
|
| | |
| | | {
|
| | | m_Factor = m_SoDeadFly.curve.keys[m_SoDeadFly.curve.length - 1].time;
|
| | | m_Factor = m_Factor / m_SoDeadFly.hDuration;
|
| | |
|
| | | if (GeneralDefine.AtkTypeIncreasePushDis.ContainsKey(killHurtType))
|
| | | {
|
| | | m_Factor *= GeneralDefine.AtkTypeIncreasePushDis[killHurtType];
|
| | | }
|
| | |
|
| | | m_FlyStartTime = Time.time;
|
| | | m_Step = 0;
|
| | | }
|
| | |
| | |
|
| | | if (_target.ActorInfo.serverDie)
|
| | | {
|
| | | _target.Die(owner.ServerInstID);
|
| | | _target.Die(owner.ServerInstID, 0, _hurtObj.AttackType);
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | |
|
| | | if (_target.ActorInfo.serverDie)
|
| | | {
|
| | | _target.Die(owner.ServerInstID);
|
| | | _target.Die(owner.ServerInstID, 0, m_CacheSkill.hurtClientList[i].AttackType);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | |
|
| | | if (_target.ActorInfo.serverDie)
|
| | | {
|
| | | _target.Die(owner.ServerInstID);
|
| | | _target.Die(owner.ServerInstID, 0, m_CacheSkill.hurtClntFightNpcList[i].AttackType);
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | get { return m_KillServerInstID; }
|
| | | set { m_KillServerInstID = value; }
|
| | | }
|
| | | public byte killHurtType;
|
| | | public int belongEventID;
|
| | | private Vector3 m_BornPos;
|
| | | public virtual Vector3 BornPos
|
| | |
| | |
|
| | | public abstract void RefreshLifeBar(ulong value);
|
| | |
|
| | | public void Die(uint killerServerInstID, int configID = 0)
|
| | | public void Die(uint killerServerInstID, int configID = 0, byte hurtType = (byte)HurtAttackType.Normal)
|
| | | {
|
| | | KillerServerInstID = killerServerInstID;
|
| | | DeadFlyID = configID;
|
| | | killHurtType = hurtType;
|
| | |
|
| | | Die();
|
| | | }
|
| | |
| | | private bool m_PushOrPull;
|
| | | private uint m_AttackerSID;
|
| | | private float m_LimitDistance;
|
| | | private float m_AddPer;
|
| | |
|
| | | public void StartBeatBack(uint attacker, int configID, Vector3 direction)
|
| | | public void StartBeatBack(uint attacker, int configID, Vector3 direction, HurtAttackType atkType = HurtAttackType.Normal)
|
| | | {
|
| | | SoBodyControl _config = ScriptableObjectLoader.LoadSoBodyControl(configID);
|
| | |
|
| | |
| | | m_BeatCurve = _config.curve;
|
| | | m_BeatTime = _config.duration;
|
| | |
|
| | | m_Factor = m_BeatCurve.keys[m_BeatCurve.length - 1].time;
|
| | | if (GeneralDefine.AtkTypeIncreasePushDis.ContainsKey((int)atkType))
|
| | | {
|
| | | m_AddPer = GeneralDefine.AtkTypeIncreasePushDis[(int)atkType];
|
| | | }
|
| | | else
|
| | | {
|
| | | m_AddPer = 1f;
|
| | | }
|
| | |
|
| | | m_Factor = m_BeatCurve.keys[m_BeatCurve.length - 1].time * m_AddPer;
|
| | | m_Factor = m_Factor / m_BeatTime;
|
| | |
|
| | | if (ActorType == GameObjType.gotNPC)
|
| | |
| | | {
|
| | | _dead.killServerInstID = KillerServerInstID;
|
| | | _dead.killerPos = KillerPos;
|
| | | _dead.killHurtType = killHurtType;
|
| | | }
|
| | |
|
| | | if (this is GA_NpcClientFightBoss
|
| | |
| | |
|
| | | public static int mainWinTopCloseTime { get; private set; }
|
| | | public static List<int> equipDecomposeScreen = new List<int>();
|
| | | public static Dictionary<int, float> AtkTypeIncreasePushDis = new Dictionary<int, float>();
|
| | |
|
| | | public static void Init()
|
| | | {
|
| | |
| | | mainWinTopCloseTime = GetInt("AutomaticSwitch");
|
| | |
|
| | | equipDecomposeScreen.AddRange(GetIntArray("EquipDecomposeScreen", 2));
|
| | |
|
| | | func = FuncConfigConfig.Get("AtkTypeIncreasePushDis");
|
| | | var _ks = func.Numerical1.Split('|');
|
| | | var _vs = func.Numerical2.Split('|');
|
| | | for (i = 0; i < _ks.Length; ++i)
|
| | | {
|
| | | AtkTypeIncreasePushDis[int.Parse(_ks[i])] = int.Parse(_vs[i]) * Constants.F_DELTA;
|
| | | }
|
| | | }
|
| | | catch (Exception ex)
|
| | | {
|
| | |
| | | public static bool s_SkillEffectLog = false;
|
| | | public static bool s_ShowMapLine = false;
|
| | | public static bool s_ShowZZAtkValue = false;
|
| | | public static bool s_ForceSupperHit = false;
|
| | | public static bool s_ForceLuckHit = false;
|
| | | public static bool s_forceAutoFight
|
| | | {
|
| | | get
|
| | |
| | |
|
| | | if (GUILayout.Button("测试寻路"))
|
| | | {
|
| | | Debug.Log(PathFinder.WalkAble(_start3, _end3));
|
| | | // Debug.Log(PathFinder.WalkAble(_start3, _end3));
|
| | | MapTransferUtility.Instance.MoveToNPC(10904012);
|
| | | }
|
| | |
|
| | | EditorGUILayout.LabelField("Log存储路径", RuntimeLogUtility.s_LogPath);
|
| | |
| | | RuntimeLogUtility.s_ShowZZAtkValue = EditorGUILayout.Toggle("显示助战伤害", RuntimeLogUtility.s_ShowZZAtkValue);
|
| | | RuntimeLogUtility.TEST_CLIENT_PVP = EditorGUILayout.Toggle("模拟客户端PVP状态", RuntimeLogUtility.TEST_CLIENT_PVP);
|
| | | RuntimeLogUtility.TEST_CLIENT_PVP_AI = EditorGUILayout.Toggle("模拟客户端PVP的AI状态", RuntimeLogUtility.TEST_CLIENT_PVP_AI);
|
| | |
|
| | | RuntimeLogUtility.s_ForceSupperHit = EditorGUILayout.Toggle("强制暴击", RuntimeLogUtility.s_ForceSupperHit);
|
| | | RuntimeLogUtility.s_ForceLuckHit = EditorGUILayout.Toggle("强制会心一击", RuntimeLogUtility.s_ForceLuckHit);
|
| | |
|
| | | if (GUILayout.Button("创建PVP敌方"))
|
| | | {
|
| | | // var _npc = GAMgr.Instance.ReqClntFightNpc<GA_NpcClientFightNorm>(10101003, E_ActorGroup.Enemy);
|
| | | // _npc.BornPos = _npc.Pos = PlayerDatas.Instance.hero.Pos;
|
| | | // _npc.ActorInfo.ResetHp(9999999, -1, 9999999);
|
| | |
|
| | | var _npc = GAMgr.Instance.ReqClntFightNpc<GA_NpcClientFightBoss>(10103001, E_ActorGroup.Enemy);
|
| | | var _npc = GAMgr.Instance.ReqClntFightNpc<GA_NpcClientFightNorm>(10101002, E_ActorGroup.Enemy);
|
| | | _npc.BornPos = _npc.Pos = PlayerDatas.Instance.hero.Pos;
|
| | | _npc.ActorInfo.ResetHp(5, -1, 5);
|
| | |
|
| | | // var _npc = GAMgr.Instance.ReqClntFightNpc<GA_NpcClientFightBoss>(10103001, E_ActorGroup.Enemy);
|
| | |
|
| | | // GActorPlayerBase.PlayerInfo _playerInfo = new GActorPlayerBase.PlayerInfo();
|
| | | // _playerInfo.maxHp = (uint)PlayerDatas.Instance.extersion.MaxMP;
|
| | |
| | | // };
|
| | |
|
| | | // GAMgr.Instance.ReqClntPlayer<GA_PVPClientPlayer>(_playerInfo, E_ActorGroup.Player);
|
| | | // AdventureStage.Instance.Enter();
|
| | | }
|
| | |
|
| | | if (GUILayout.Button("重置PVP敌方"))
|
| | | {
|
| | | GA_PVPClientPlayer.Reset();
|
| | | // GA_PVPClientPlayer.Reset();
|
| | | // AdventureStage.Instance.Exit();
|
| | | }
|
| | |
|
| | | _navChkPos = EditorGUILayout.Vector3Field("检测点", _navChkPos);
|