fix character animation config name

This commit is contained in:
NguyenVanDat
2025-11-19 10:42:24 +07:00
parent d2001c1d16
commit e8a76c0c58
3 changed files with 41 additions and 43 deletions
@@ -658,9 +658,9 @@ public abstract partial class CECPlayer : CECObject
{
// 𡏭絲? 泿韏瘀
szAct = EC_Utility.BuildActionName(action, weapon_type, "");
szAct = EC_Utility.BuildActionName(action, weapon_type, "");
EventBus.PublishChannel(m_PlayerInfo.cid, new PlayActionEvent(szAct));
szAct = EC_Utility.BuildActionName(action, weapon_type, "");
szAct = EC_Utility.BuildActionName(action, weapon_type, "");
queueActionEvent.SetData(szAct, SetApplyDamage, true, attackEvent);
EventBus.PublishChannelClass(m_PlayerInfo.cid, queueActionEvent);
//PlayNonSkillActionWithName(iAction, szAct, true, 200, true, ref pActFlag, COMACT_FLAG_MODE_ONCE_MULTIIGNOREGFX);gag獺ga
@@ -395,7 +395,6 @@ namespace CSNetwork
}
#endif
int iHostID = _selectedRole.roleid;
BMLogger.LogError($"### GameDataSend: CMDID {pCmdHeader}");
switch (pCmdHeader)
{
case CommandID.PLAYER_INFO_2:
+39 -40
View File
@@ -77,6 +77,7 @@ public partial class CECHostPlayer : CECPlayer
List<ushort> m_aWayPoints = new List<ushort>(); // Active way points
bool m_bIsInKingService = false; // ÊÇ·ñÕýÔÚ½øÐйúÍõ·þÎñ²Ù×÷
CECActionSwitcherBase m_pActionSwitcher;
private bool m_bMelee; // Host is in melee state
// ====== Ground cast config ======
[Header("Ground Cast")]
@@ -1094,54 +1095,52 @@ public partial class CECHostPlayer : CECPlayer
}
private void OnMsgHstStartAttack(in ECMSG Msg)
private void OnMsgHstStartAttack(in ECMSG msg)
{
// cmd_host_start_attack pCmd = (cmd_host_start_attack*)Msg.dwParam1;
// ASSERT(pCmd);
//
// // test code...
// // g_pGame->GetRTDebug()->OutputNotifyMessage(RTDCOL_WARNING, _AL("start attack !"));
//
// // Check whether target is the one that we have selected
// if (m_idSelTarget != pCmd->idTarget)
// g_pGame->RuntimeDebugInfo(RTDCOL_WARNING, _AL("Target has changed !"));
//
// // If target turn to be un-attackable, cancel action
// if (!AttackableJudge(pCmd->idTarget, true))
// {
// g_pGame->GetGameSession()->c2s_CmdCancelAction();
// g_pGame->RuntimeDebugInfo(RTDCOL_WARNING, _AL("Cannel attacking !"));
// return;
// }
//
// // Synchronize ammo amount
// CECIvtrItem* pItem = m_pEquipPack->GetItem(EQUIPIVTR_PROJECTILE);
// if (pItem)
// {
// if (!pCmd->ammo_remain)
// m_pEquipPack->SetItem(EQUIPIVTR_PROJECTILE, NULL);
// else
// pItem->SetAmount(pCmd->ammo_remain);
// }
//
// CECHPWorkMelee* pWork = (CECHPWorkMelee*)m_pWorkMan->CreateWork(CECHPWork::WORK_HACKOBJECT);
// m_pWorkMan->StartWork_p1(pWork);
//
// m_bMelee = true;
// AP_ActionEvent(AP_EVENT_STARTMELEE);
cmd_host_start_attack pCmd = GPDataTypeHelper.FromBytes<cmd_host_start_attack>((byte[])msg.dwParam1);
// ASSERT(pCmd);
// test code...
// g_pGame->GetRTDebug()->OutputNotifyMessage(RTDCOL_WARNING, _AL("start attack !"));
// Check whether target is the one that we have selected
if (m_idSelTarget != pCmd.idTarget)
{
BMLogger.Log("Target has changed !");
}
// If target turn to be un-attackable, cancel action
if (AttackableJudge(pCmd.idTarget, true)<=0)
{
UnityGameSession.c2s_CmdCancelAction();
BMLogger.Log("Cannel attacking !");
return;
}
// todo Synchronize ammo amount
// CECIvtrItem pItem = m_pEquipPack->GetItem(EQUIPIVTR_PROJECTILE);
// if (pItem)
// {
// if (!pCmd->ammo_remain)
// m_pEquipPack->SetItem(EQUIPIVTR_PROJECTILE, NULL);
// else
// pItem->SetAmount(pCmd->ammo_remain);
// }
CECHPWorkMelee pWork = (CECHPWorkMelee)m_pWorkMan.CreateWork(Host_work_ID.WORK_HACKOBJECT);
m_pWorkMan.StartWork_p1(pWork);
m_bMelee = true;
// AP_ActionEvent(AP_EVENT_STARTMELEE);
}
private void OnMsgHstStopAttack(in ECMSG Msg)
{
// using namespace S2C;
//
// m_bMelee = false;
//
// // if there is an attack event currently, we should let it fire now.
m_bMelee = false;
// if there is an attack event currently, we should let it fire now.
ClearComActFlagAllRankNodes(true);
cmd_host_stop_attack pCmd = GPDataTypeHelper.FromBytes<cmd_host_stop_attack>((byte[])Msg.dwParam1);
// ASSERT(pCmd);
/* If attack stopped for target is leave too far, trace it and continue
attacking. Stop reason defined as below: