From 1168cfb5baf8ff6fa17e255a0b7fa0d7638f66c1 Mon Sep 17 00:00:00 2001
From: client_Hale <339726288@qq.com>
Date: 星期二, 09 四月 2019 17:26:30 +0800
Subject: [PATCH] 6469 【前端】击飞开出根据类型加倍配置
---
Fight/GameActor/GActor.cs | 1
System/GeneralConfig/GeneralDefine.cs | 9 ++++
Fight/Actor/State/SMB/STM_BaseAttack.cs | 6 +-
Fight/GameActor/GActorNpcFight.cs | 1
Utility/RuntimeLogUtility.cs | 21 ++++++----
Fight/Actor/Skill/AttackHandler.cs | 16 ++++++--
Core/NetworkPackage/DTCFile/ServerPack/H06_PlayerVsNPC/DTC0614_tagUseSkillPos.cs | 4 +-
Fight/Actor/State/SMB/Dead_4.cs | 7 +++
Core/NetworkPackage/DTCFile/ServerPack/HB4_Fight/DTCB401_tagMCSkillHurtList.cs | 2
Fight/GameActor/GActorFight.cs | 17 +++++++-
10 files changed, 63 insertions(+), 21 deletions(-)
diff --git a/Core/NetworkPackage/DTCFile/ServerPack/H06_PlayerVsNPC/DTC0614_tagUseSkillPos.cs b/Core/NetworkPackage/DTCFile/ServerPack/H06_PlayerVsNPC/DTC0614_tagUseSkillPos.cs
index f787b00..af2bba0 100644
--- a/Core/NetworkPackage/DTCFile/ServerPack/H06_PlayerVsNPC/DTC0614_tagUseSkillPos.cs
+++ b/Core/NetworkPackage/DTCFile/ServerPack/H06_PlayerVsNPC/DTC0614_tagUseSkillPos.cs
@@ -305,7 +305,7 @@
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
{
@@ -726,7 +726,7 @@
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
{
diff --git a/Core/NetworkPackage/DTCFile/ServerPack/HB4_Fight/DTCB401_tagMCSkillHurtList.cs b/Core/NetworkPackage/DTCFile/ServerPack/HB4_Fight/DTCB401_tagMCSkillHurtList.cs
index f774467..54035da 100644
--- a/Core/NetworkPackage/DTCFile/ServerPack/HB4_Fight/DTCB401_tagMCSkillHurtList.cs
+++ b/Core/NetworkPackage/DTCFile/ServerPack/HB4_Fight/DTCB401_tagMCSkillHurtList.cs
@@ -210,7 +210,7 @@
if (_sTarget.CurHP == 0)
{
_cTarget.ActorInfo.ResetHp((int)_sTarget.CurHP);
- _cTarget.Die(vNetData.ObjID);
+ _cTarget.Die(vNetData.ObjID, 0, _sTarget.AttackType);
}
else
{
diff --git a/Fight/Actor/Skill/AttackHandler.cs b/Fight/Actor/Skill/AttackHandler.cs
index a9c3c6d..b8b8a7a 100644
--- a/Fight/Actor/Skill/AttackHandler.cs
+++ b/Fight/Actor/Skill/AttackHandler.cs
@@ -132,7 +132,7 @@
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);
}
}
@@ -247,7 +247,7 @@
if (canDie && target.ActorInfo.RealHp == 0)
{
- target.Die(attacker.ServerInstID, soConfig.deadFlyId);
+ target.Die(attacker.ServerInstID, soConfig.deadFlyId, (byte)attackType);
}
if (target.ActorInfo.serverDie
@@ -701,11 +701,19 @@
{
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;
}
diff --git a/Fight/Actor/State/SMB/Dead_4.cs b/Fight/Actor/State/SMB/Dead_4.cs
index 94a7300..c02e8d4 100644
--- a/Fight/Actor/State/SMB/Dead_4.cs
+++ b/Fight/Actor/State/SMB/Dead_4.cs
@@ -4,6 +4,7 @@
{
public uint killServerInstID;
public Vector3 killerPos;
+ public byte killHurtType;
public int deadFlyId;
private float m_EnterGroundHeight;
@@ -68,6 +69,12 @@
{
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;
}
diff --git a/Fight/Actor/State/SMB/STM_BaseAttack.cs b/Fight/Actor/State/SMB/STM_BaseAttack.cs
index 18db332..decfeaf 100644
--- a/Fight/Actor/State/SMB/STM_BaseAttack.cs
+++ b/Fight/Actor/State/SMB/STM_BaseAttack.cs
@@ -378,7 +378,7 @@
if (_target.ActorInfo.serverDie)
{
- _target.Die(owner.ServerInstID);
+ _target.Die(owner.ServerInstID, 0, _hurtObj.AttackType);
}
else
{
@@ -404,7 +404,7 @@
if (_target.ActorInfo.serverDie)
{
- _target.Die(owner.ServerInstID);
+ _target.Die(owner.ServerInstID, 0, m_CacheSkill.hurtClientList[i].AttackType);
}
}
@@ -419,7 +419,7 @@
if (_target.ActorInfo.serverDie)
{
- _target.Die(owner.ServerInstID);
+ _target.Die(owner.ServerInstID, 0, m_CacheSkill.hurtClntFightNpcList[i].AttackType);
}
}
}
diff --git a/Fight/GameActor/GActor.cs b/Fight/GameActor/GActor.cs
index 885db7a..0421529 100644
--- a/Fight/GameActor/GActor.cs
+++ b/Fight/GameActor/GActor.cs
@@ -31,6 +31,7 @@
get { return m_KillServerInstID; }
set { m_KillServerInstID = value; }
}
+ public byte killHurtType;
public int belongEventID;
private Vector3 m_BornPos;
public virtual Vector3 BornPos
diff --git a/Fight/GameActor/GActorFight.cs b/Fight/GameActor/GActorFight.cs
index 0203964..4667e83 100644
--- a/Fight/GameActor/GActorFight.cs
+++ b/Fight/GameActor/GActorFight.cs
@@ -180,10 +180,11 @@
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();
}
@@ -200,8 +201,9 @@
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);
@@ -223,7 +225,16 @@
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)
diff --git a/Fight/GameActor/GActorNpcFight.cs b/Fight/GameActor/GActorNpcFight.cs
index 13b4a4a..53e5d9a 100644
--- a/Fight/GameActor/GActorNpcFight.cs
+++ b/Fight/GameActor/GActorNpcFight.cs
@@ -430,6 +430,7 @@
{
_dead.killServerInstID = KillerServerInstID;
_dead.killerPos = KillerPos;
+ _dead.killHurtType = killHurtType;
}
if (this is GA_NpcClientFightBoss
diff --git a/System/GeneralConfig/GeneralDefine.cs b/System/GeneralConfig/GeneralDefine.cs
index 8089fde..6625b20 100644
--- a/System/GeneralConfig/GeneralDefine.cs
+++ b/System/GeneralConfig/GeneralDefine.cs
@@ -191,6 +191,7 @@
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()
{
@@ -760,6 +761,14 @@
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)
{
diff --git a/Utility/RuntimeLogUtility.cs b/Utility/RuntimeLogUtility.cs
index 10ab506..32323e5 100644
--- a/Utility/RuntimeLogUtility.cs
+++ b/Utility/RuntimeLogUtility.cs
@@ -19,6 +19,8 @@
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
@@ -209,7 +211,8 @@
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);
@@ -235,16 +238,16 @@
RuntimeLogUtility.s_ShowZZAtkValue = EditorGUILayout.Toggle("鏄剧ず鍔╂垬浼ゅ", RuntimeLogUtility.s_ShowZZAtkValue);
RuntimeLogUtility.TEST_CLIENT_PVP = EditorGUILayout.Toggle("妯℃嫙瀹㈡埛绔疨VP鐘舵��", RuntimeLogUtility.TEST_CLIENT_PVP);
RuntimeLogUtility.TEST_CLIENT_PVP_AI = EditorGUILayout.Toggle("妯℃嫙瀹㈡埛绔疨VP鐨凙I鐘舵��", 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;
@@ -278,11 +281,13 @@
// };
// 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);
--
Gitblit v1.8.0