fix: update command cancel action.

This commit is contained in:
Tungdv
2025-10-09 11:27:12 +07:00
parent ee2f337b26
commit be959df162
6 changed files with 18 additions and 3 deletions
@@ -55,7 +55,7 @@ class CECHPWorkMelee : CECHPWork
// If target turn to be un-attackable, cancel action
if (m_pHost.AttackableJudge(m_idTarget, true) == 0)
{
//UnityGameSession.c2s_CmdCancelAction();
UnityGameSession.c2s_CmdCancelAction();
//g_pGame.GetGameSession().c2s_CmdCancelAction();
m_bFinished = true;
return true;
@@ -421,5 +421,10 @@ namespace CSNetwork.C2SCommand
};
return SerializeCommand(CommandID.NORMAL_ATTACK, cmd);
}
public static Octets CreateNakeCmd(CommandID iCmd)
{
return SerializeCommand(iCmd);
}
}
}
@@ -741,5 +741,12 @@ namespace CSNetwork
gamedatasend.Data = C2SCommandFactory.CreateNormalAttackDataCmd(byPVPMask);
SendProtocol(gamedatasend);
}
public void c2s_CmdCancelAction()
{
gamedatasend gamedatasend = new gamedatasend();
gamedatasend.Data = C2SCommandFactory.CreateNakeCmd(CSNetwork.C2SCommand.CommandID.CANCEL_ACTION);
SendProtocol(gamedatasend);
}
}
}
@@ -1,2 +0,0 @@
fileFormatVersion: 2
guid: e3cf084cf53b24fe7a6bffb17846d608
@@ -189,6 +189,11 @@ namespace BrewMonster.Network
Instance._gameSession.c2s_CmdNormalAttack(byPVPMask);
}
public static void c2s_CmdCancelAction()
{
Instance._gameSession.c2s_CmdCancelAction();
}
#region Task
public static void c2s_CmdGetAllData(bool byPack, bool byEquip, bool byTask)
{