Files
test/Assets/PerfectWorld/Scripts/NPC/CECModel.cs
T
2025-10-22 16:34:56 +07:00

46 lines
1.8 KiB
C#

public class CECModel
{
private const uint COMACT_FLAG_MODE_NONE = 0;
//protected CECModelStaticData m_pMapModel;
public void ClearComActFlag(bool bSignalCurrent) { ClearComActFlag(0, bSignalCurrent); }
public void ClearComActFlag(int nChannel, bool bSignalCurrent)
{
/* ChannelAct & ca = m_ChannelActs[nChannel];
ChannelActNode* pNode = ca.GetHighestRankNode();
if (pNode)
{
if (pNode->m_pActFlag && bSignalCurrent)
*pNode->m_pActFlag = true;
//ca.m_dwFlagMode = COMACT_FLAG_MODE_NONE;
pNode->m_pActFlag = NULL;
}*/
}
public bool QueueAction(CECNPC.INFO iNFO, string szActName, ref bool pNewActFlag, int nTransTime = 200, uint dwUserData = 0, bool bForceStopPrevAct = false, bool bCheckTailDup = false, bool bNoFx = false, bool bResetSpeed = false
/*joslian*/, bool bResetActFlag = false, uint dwNewFlagMode = COMACT_FLAG_MODE_NONE)
{
QueueAction(iNFO, 0, szActName, ref bResetActFlag, nTransTime, dwUserData, bForceStopPrevAct, bCheckTailDup, bNoFx, bResetSpeed/*joslian*/, pNewActFlag, dwNewFlagMode);
return true;
}
public bool QueueAction(CECNPC.INFO iNFO, int nChannel, string szActName, ref bool pNewActFlag, int nTransTime, uint dwUserData/* 0 */, bool bForceStopPrevAct, bool bCheckTailDup, bool bNoFx, bool bResetSpeed
/*joslian*/, bool bResetActFlag, uint dwNewFlagMode)
{
EventBus.PublishChannel(iNFO.nid, new QueueNPCActionEvent(szActName));
return true;
}
public struct QueueNPCActionEvent
{
public string AnimationName;
public QueueNPCActionEvent(string animationName)
{
AnimationName = animationName;
}
}
}
// Action channel
public enum ActionChannel
{
ACTCHA_WOUND = 1,
};