Merge pull request 'fix ontarget but aoe skill' (#473) from feature/gfx-action into develop
Reviewed-on: https://git.pthub.vn/Unity/perfect-world-unity/pulls/473
This commit is contained in:
@@ -15,7 +15,7 @@ MonoBehaviour:
|
|||||||
m_DefaultGroup: 712e3991f28e549e7a56ee582a977810
|
m_DefaultGroup: 712e3991f28e549e7a56ee582a977810
|
||||||
m_currentHash:
|
m_currentHash:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
Hash: 604dc303c2afde1971b4eda2116ad3c8
|
Hash: 00000000000000000000000000000000
|
||||||
m_OptimizeCatalogSize: 0
|
m_OptimizeCatalogSize: 0
|
||||||
m_BuildRemoteCatalog: 0
|
m_BuildRemoteCatalog: 0
|
||||||
m_CatalogRequestsTimeout: 0
|
m_CatalogRequestsTimeout: 0
|
||||||
|
|||||||
@@ -80,6 +80,11 @@ MonoBehaviour:
|
|||||||
m_ReadOnly: 0
|
m_ReadOnly: 0
|
||||||
m_SerializedLabels: []
|
m_SerializedLabels: []
|
||||||
FlaggedDuringContentUpdateRestriction: 0
|
FlaggedDuringContentUpdateRestriction: 0
|
||||||
|
- m_GUID: 0c0d0e0020ae4d546b62056815176bc0
|
||||||
|
m_Address: "gfx/\u7B56\u5212\u8054\u5165/\u4EBA\u7269\u6280\u80FD/\u51FB\u4E2D/\u706B\u6D77\u5200\u5C71\u51FB\u4E2D.gfx"
|
||||||
|
m_ReadOnly: 0
|
||||||
|
m_SerializedLabels: []
|
||||||
|
FlaggedDuringContentUpdateRestriction: 0
|
||||||
- m_GUID: 0de7e3933d738b54d9584f3523642248
|
- m_GUID: 0de7e3933d738b54d9584f3523642248
|
||||||
m_Address: "gfx/\u4EBA\u7269/\u6280\u80FD/\u6B66\u4FA0/\u91D1\u949F\u7F691.gfx"
|
m_Address: "gfx/\u4EBA\u7269/\u6280\u80FD/\u6B66\u4FA0/\u91D1\u949F\u7F691.gfx"
|
||||||
m_ReadOnly: 0
|
m_ReadOnly: 0
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: c90db784f47aca643935a0fc667ca7af
|
guid: 0c0d0e0020ae4d546b62056815176bc0
|
||||||
PrefabImporter:
|
PrefabImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ namespace BrewMonster
|
|||||||
/// <summary>NDJSON debug session logger (agent instrumentation).</summary>
|
/// <summary>NDJSON debug session logger (agent instrumentation).</summary>
|
||||||
public static class DebugSessionLog
|
public static class DebugSessionLog
|
||||||
{
|
{
|
||||||
const string LogPath = @"c:\Hoang\PW\debug-f32222.log";
|
const string LogPath = @"c:\Hoang\PW\debug-a9c674.log";
|
||||||
const string SessionId = "f32222";
|
const string SessionId = "a9c674";
|
||||||
|
|
||||||
public static void Write(string location, string message, string hypothesisId, object data, string runId = "pre-fix")
|
public static void Write(string location, string message, string hypothesisId, object data, string runId = "pre-fix")
|
||||||
{
|
{
|
||||||
@@ -38,11 +38,22 @@ namespace BrewMonster
|
|||||||
public bool castInTargets;
|
public bool castInTargets;
|
||||||
public bool alreadyFired;
|
public bool alreadyFired;
|
||||||
public int flyClusterCount;
|
public int flyClusterCount;
|
||||||
|
public int flyDelayMs;
|
||||||
public int eventId;
|
public int eventId;
|
||||||
public string flyGfx;
|
public string flyGfx;
|
||||||
public string prevState;
|
public string prevState;
|
||||||
public string newState;
|
public string newState;
|
||||||
public int frame;
|
public int frame;
|
||||||
|
public float spawnX;
|
||||||
|
public float spawnY;
|
||||||
|
public float spawnZ;
|
||||||
|
public float targetX;
|
||||||
|
public float targetY;
|
||||||
|
public float targetZ;
|
||||||
|
public float radius;
|
||||||
|
public float offsetMag;
|
||||||
|
public bool isCluster;
|
||||||
|
public bool isArea;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -109,6 +109,12 @@ public class CECPendingLogoutHalf : CECPendingAction
|
|||||||
bool bSuccess = false;
|
bool bSuccess = false;
|
||||||
if (IsInGame())
|
if (IsInGame())
|
||||||
{
|
{
|
||||||
|
#region agent log
|
||||||
|
#if UNITY_EDITOR || DEVELOPMENT_BUILD
|
||||||
|
DebugSessionLog.Write("CECPendingLogoutHalf.Execute", "logout_half_execute", "E",
|
||||||
|
new DebugSessionPayload { frame = Time.frameCount });
|
||||||
|
#endif
|
||||||
|
#endregion
|
||||||
// TODO: currently, we logout logic != C++, need to implement properly
|
// TODO: currently, we logout logic != C++, need to implement properly
|
||||||
GetGameSession().c2s_SendCmdLogout(PendingActionConstants._PLAYER_LOGOUT_HALF);
|
GetGameSession().c2s_SendCmdLogout(PendingActionConstants._PLAYER_LOGOUT_HALF);
|
||||||
// UnityGameSession.ReturnToSelectRole();
|
// UnityGameSession.ReturnToSelectRole();
|
||||||
|
|||||||
@@ -151,7 +151,7 @@ namespace BrewMonster
|
|||||||
#region agent log
|
#region agent log
|
||||||
#if UNITY_EDITOR || DEVELOPMENT_BUILD
|
#if UNITY_EDITOR || DEVELOPMENT_BUILD
|
||||||
DebugSessionLog.Write("A3DSkillGfxMan.AddOneSkillGfxEvent", "add_gfx_event", "C",
|
DebugSessionLog.Write("A3DSkillGfxMan.AddOneSkillGfxEvent", "add_gfx_event", "C",
|
||||||
new DebugSessionPayload { eventId = pEvent.m_debugEventId, hostId = (int)nHostID, targetId = (int)nTargetID, flyGfx = szFlyGfx ?? "" });
|
new DebugSessionPayload { eventId = pEvent.m_debugEventId, hostId = (int)nHostID, targetId = (int)nTargetID, flyGfx = szFlyGfx ?? "", flyDelayMs = (int)dwDelayTime });
|
||||||
#endif
|
#endif
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|||||||
@@ -376,6 +376,7 @@ namespace BrewMonster
|
|||||||
200, // timeToBeFired
|
200, // timeToBeFired
|
||||||
1000 // timeToDoDamage
|
1000 // timeToDoDamage
|
||||||
);
|
);
|
||||||
|
BMLogger.LogError("HoangDev: idTarget:" + idTarget);
|
||||||
m_targets.AddLast(newEvent);
|
m_targets.AddLast(newEvent);
|
||||||
#if UNITY_EDITOR
|
#if UNITY_EDITOR
|
||||||
if (m_AttackList.Count == 0)
|
if (m_AttackList.Count == 0)
|
||||||
@@ -630,12 +631,37 @@ namespace BrewMonster
|
|||||||
m_bFadeOut = stub.m_bFadeOut;
|
m_bFadeOut = stub.m_bFadeOut;
|
||||||
m_bRelScl = stub.m_bRelScl;
|
m_bRelScl = stub.m_bRelScl;
|
||||||
m_fDefTarScl = stub.m_fDefTarScl;
|
m_fDefTarScl = stub.m_fDefTarScl;
|
||||||
//m_param = stub.m_param;
|
m_param = BuildSkillParam(stub);
|
||||||
m_szFlySfxPath = stub.m_szFlySfxPath ?? string.Empty;
|
m_szFlySfxPath = stub.m_szFlySfxPath ?? string.Empty;
|
||||||
m_szHitSfxPath = stub.m_szHitSfxPath ?? string.Empty;
|
m_szHitSfxPath = stub.m_szHitSfxPath ?? string.Empty;
|
||||||
m_szHitGrndSfxPath = stub.m_szHitGrndSfxPath ?? string.Empty;
|
m_szHitGrndSfxPath = stub.m_szHitGrndSfxPath ?? string.Empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static GFX_SKILL_PARAM BuildSkillParam(BrewMonster.Scripts.Skills.SkillStub stub)
|
||||||
|
{
|
||||||
|
var param = new GFX_SKILL_PARAM
|
||||||
|
{
|
||||||
|
m_bArea = stub.m_bArea,
|
||||||
|
m_Shape = stub.m_Shape,
|
||||||
|
m_vSize = new A3DVECTOR3(stub.m_vGfxSize.x, stub.m_vGfxSize.y, stub.m_vGfxSize.z)
|
||||||
|
};
|
||||||
|
|
||||||
|
switch (stub.m_paramType)
|
||||||
|
{
|
||||||
|
case GfxSkillValType.enumGfxSkillBool:
|
||||||
|
param.value = new GFX_SKILL_PARAM.ValueUnion { bVal = stub.m_paramFloatVal != 0f };
|
||||||
|
break;
|
||||||
|
case GfxSkillValType.enumGfxSkillFloat:
|
||||||
|
param.value = new GFX_SKILL_PARAM.ValueUnion { fVal = stub.m_paramFloatVal };
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
param.value = new GFX_SKILL_PARAM.ValueUnion { nVal = (int)stub.m_paramFloatVal };
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return param;
|
||||||
|
}
|
||||||
|
|
||||||
// GFX prefab accessors / GFX预制体访问器
|
// GFX prefab accessors / GFX预制体访问器
|
||||||
public GameObject GetFlyGFX() => m_szFlyGfx;
|
public GameObject GetFlyGFX() => m_szFlyGfx;
|
||||||
public GameObject GetHitGFX() => m_szHitGfx;
|
public GameObject GetHitGFX() => m_szHitGfx;
|
||||||
@@ -706,18 +732,11 @@ namespace BrewMonster
|
|||||||
m_bFadeOut = skillStub.m_bFadeOut;
|
m_bFadeOut = skillStub.m_bFadeOut;
|
||||||
m_bRelScl = skillStub.m_bRelScl;
|
m_bRelScl = skillStub.m_bRelScl;
|
||||||
m_fDefTarScl = skillStub.m_fDefTarScl;
|
m_fDefTarScl = skillStub.m_fDefTarScl;
|
||||||
|
m_param = BuildSkillParam(skillStub);
|
||||||
|
|
||||||
m_szFlySfxPath = skillStub.m_szFlySfxPath ?? string.Empty;
|
m_szFlySfxPath = skillStub.m_szFlySfxPath ?? string.Empty;
|
||||||
m_szHitSfxPath = skillStub.m_szHitSfxPath ?? string.Empty;
|
m_szHitSfxPath = skillStub.m_szHitSfxPath ?? string.Empty;
|
||||||
m_szHitGrndSfxPath = skillStub.m_szHitGrndSfxPath ?? string.Empty;
|
m_szHitGrndSfxPath = skillStub.m_szHitGrndSfxPath ?? string.Empty;
|
||||||
|
|
||||||
// Area / 区域
|
|
||||||
/* m_param.m_bArea = skillStub.m_bArea;
|
|
||||||
m_param.m_Shape = skillStub.m_Shape;
|
|
||||||
m_param.m_vSize = skillStub.m_vSize;
|
|
||||||
|
|
||||||
// Param value / 参数值
|
|
||||||
m_param.value = skillStub.m_param.value;*/
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -817,6 +836,7 @@ namespace BrewMonster
|
|||||||
|
|
||||||
if (nCastTargetID == tar.idTarget)
|
if (nCastTargetID == tar.idTarget)
|
||||||
bCastInTargets = true;
|
bCastInTargets = true;
|
||||||
|
BMLogger.LogError("HoangDev: nCastTargetID:"+nCastTargetID);
|
||||||
AddOneTarget(nCastTargetID, nHostID, szFly, szHit, tar, i == 0, bIsGoblinSkill);
|
AddOneTarget(nCastTargetID, nHostID, szFly, szHit, tar, i == 0, bIsGoblinSkill);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -140,15 +140,14 @@ namespace BrewMonster
|
|||||||
m_bRelScl = true;
|
m_bRelScl = true;
|
||||||
m_fDefTarScl = 1.5f;
|
m_fDefTarScl = 1.5f;
|
||||||
|
|
||||||
// Area parameters (commented out) / 区域参数(已注释)
|
// Area parameters / 区域参数
|
||||||
// m_bArea = false;
|
m_bArea = false;
|
||||||
// m_Shape = (EmitShape)0;
|
m_Shape = EmitShape.enumBox;
|
||||||
// m_vSize = new Vector3(0.0f, 0.0f, 0.0f);
|
m_vGfxSize = Vector3.zero;
|
||||||
|
|
||||||
// Param (commented out) / 参数(已注释)
|
// Param radius for OnTarget cluster spread / OnTarget群集散布半径
|
||||||
// m_paramType = (GfxSkillValType)2;
|
m_paramType = GfxSkillValType.enumGfxSkillFloat;
|
||||||
// m_param = new GFX_SKILL_PARAM();
|
m_paramFloatVal = 8.0f;
|
||||||
// m_param.fVal = 8.0f;
|
|
||||||
restrict_weapons.Add(292);
|
restrict_weapons.Add(292);
|
||||||
restrict_weapons.Add(0);
|
restrict_weapons.Add(0);
|
||||||
range = new Range();
|
range = new Range();
|
||||||
|
|||||||
@@ -140,15 +140,14 @@ namespace BrewMonster
|
|||||||
m_bRelScl = true;
|
m_bRelScl = true;
|
||||||
m_fDefTarScl = 1.8f;
|
m_fDefTarScl = 1.8f;
|
||||||
|
|
||||||
// Area parameters (commented out) / 区域参数(已注释)
|
// Area parameters / 区域参数
|
||||||
// m_bArea = false;
|
m_bArea = false;
|
||||||
// m_Shape = (EmitShape)0;
|
m_Shape = EmitShape.enumBox;
|
||||||
// m_vSize = new Vector3(0.0f, 0.0f, 0.0f);
|
m_vGfxSize = Vector3.zero;
|
||||||
|
|
||||||
// Param (commented out) / 参数(已注释)
|
// Param radius for OnTarget cluster spread / OnTarget群集散布半径
|
||||||
// m_paramType = (GfxSkillValType)2;
|
m_paramType = GfxSkillValType.enumGfxSkillFloat;
|
||||||
// m_param = new GFX_SKILL_PARAM();
|
m_paramFloatVal = 8.0f;
|
||||||
// m_param.fVal = 8.0f;
|
|
||||||
restrict_weapons.Add(292);
|
restrict_weapons.Add(292);
|
||||||
restrict_weapons.Add(0);
|
restrict_weapons.Add(0);
|
||||||
range = new Range();
|
range = new Range();
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
using BrewMonster.Assets.PerfectWorld.Scripts.Skills;
|
using BrewMonster.Assets.PerfectWorld.Scripts.Skills;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
namespace BrewMonster.Scripts.Skills
|
namespace BrewMonster.Scripts.Skills
|
||||||
{
|
{
|
||||||
@@ -791,6 +792,11 @@ namespace BrewMonster.Scripts.Skills
|
|||||||
public bool m_bFadeOut = false;
|
public bool m_bFadeOut = false;
|
||||||
public bool m_bRelScl = true;
|
public bool m_bRelScl = true;
|
||||||
public float m_fDefTarScl = 1.8f;
|
public float m_fDefTarScl = 1.8f;
|
||||||
|
public bool m_bArea = false;
|
||||||
|
public EmitShape m_Shape = EmitShape.enumBox;
|
||||||
|
public Vector3 m_vGfxSize = Vector3.zero;
|
||||||
|
public GfxSkillValType m_paramType = GfxSkillValType.enumGfxSkillInt;
|
||||||
|
public float m_paramFloatVal = 0f;
|
||||||
|
|
||||||
// ������� // Combo related
|
// ������� // Combo related
|
||||||
public int combosk_preskill;
|
public int combosk_preskill;
|
||||||
|
|||||||
@@ -25,11 +25,11 @@ namespace BrewMonster
|
|||||||
public override void StartMove(Vector3 vHost, Vector3 vTarget)
|
public override void StartMove(Vector3 vHost, Vector3 vTarget)
|
||||||
{
|
{
|
||||||
m_vPos = vTarget;
|
m_vPos = vTarget;
|
||||||
/*m_vMoveDir = vTarget - vHost;
|
m_vMoveDir = vTarget - vHost;
|
||||||
m_vMoveDir.y = 0; // C++: zero out Y before normalize
|
m_vMoveDir.y = 0;
|
||||||
if (Normalize(ref m_vMoveDir) == 0)
|
if (Normalize(ref m_vMoveDir) == 0)
|
||||||
{
|
{
|
||||||
m_vMoveDir = Vector3.forward; // _unit_z
|
m_vMoveDir = Vector3.forward;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_bOneOfCluser)
|
if (m_bOneOfCluser)
|
||||||
@@ -44,8 +44,27 @@ namespace BrewMonster
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_vOffset = Vector3.zero;
|
m_vOffset = Vector3.zero;
|
||||||
}*/
|
}
|
||||||
|
|
||||||
|
#region agent log
|
||||||
|
#if UNITY_EDITOR || DEVELOPMENT_BUILD
|
||||||
|
DebugSessionLog.Write("CGfxOnTargetMove.StartMove", "on_target_start", "F",
|
||||||
|
new DebugSessionPayload
|
||||||
|
{
|
||||||
|
spawnX = m_vPos.x,
|
||||||
|
spawnY = m_vPos.y,
|
||||||
|
spawnZ = m_vPos.z,
|
||||||
|
targetX = vTarget.x,
|
||||||
|
targetY = vTarget.y,
|
||||||
|
targetZ = vTarget.z,
|
||||||
|
radius = m_fRadius,
|
||||||
|
offsetMag = m_vOffset.magnitude,
|
||||||
|
isCluster = m_bOneOfCluser,
|
||||||
|
isArea = m_bArea,
|
||||||
|
frame = Time.frameCount
|
||||||
|
});
|
||||||
|
#endif
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -54,10 +73,7 @@ namespace BrewMonster
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public override bool TickMove(uint dwDeltaTime, Vector3 vHostPos, Vector3 vTargetPos)
|
public override bool TickMove(uint dwDeltaTime, Vector3 vHostPos, Vector3 vTargetPos)
|
||||||
{
|
{
|
||||||
/* BMLogger.LogError("CGfxOnTargetMove Tick");
|
m_vPos = vTargetPos + m_vOffset;
|
||||||
Vector3 oldPos = m_vPos;
|
|
||||||
m_vPos = vTargetPos + m_vOffset;*/
|
|
||||||
|
|
||||||
return false; // C++ returns false — hit triggered by fly time timeout
|
return false; // C++ returns false — hit triggered by fly time timeout
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user