Ejemplo n.º 1
0
BOOL CObjectCommand_StopAction::Init(INT nLogicCount, UINT uEndTime)
{
	SetLogicCount(nLogicCount);
	m_uEndTime			= uEndTime;
	SetCommandID(OBJECT_COMMAND_STOP_ACTION);
	return TRUE;
}
Ejemplo n.º 2
0
BOOL CObjectCommand_StopMove::Init(INT nLogicCount, INT nEndNodeIndex, const WORLD_POS *pPos)
{
	SetLogicCount(nLogicCount);
	m_nEndNodeIndex		= nEndNodeIndex;
	m_posEndPos			= *pPos;
	SetCommandID(OBJECT_COMMAND_STOP_MOVE);
	return TRUE;
}
Ejemplo n.º 3
0
BOOL CObjectCommand_Action::Init(UINT uStartTime, INT nLogicCount, INT nActionID)
{
	SetStartTime(uStartTime);
	SetLogicCount(nLogicCount);
	m_nActionID		= INVALID_ID;

	SetCommandID(OBJECT_COMMAND_ACTION);
	return TRUE;
}
Ejemplo n.º 4
0
BOOL CObjectCommand_Ability::Init(UINT uStartTime, INT nLogicCount, INT nAbilityID, INT nPrescriptionID, ObjID_t nTargetObjID)
{
	SetStartTime(uStartTime);
	SetLogicCount(nLogicCount);
	m_nAbilityID		= nAbilityID;
	m_nPrescriptionID	= nPrescriptionID;
	m_nTargetObjID		= nTargetObjID;
	m_uEndTime			= UINT_MAX;
	SetCommandID(OBJECT_COMMAND_ABILITY);
	return TRUE;
}
Ejemplo n.º 5
0
BOOL CObjectCommand_MagicSend::Init(UINT uStartTime,
									INT nLogicCount,
									INT nMagicID,
									ObjID_t nTargetID,
									const WORLD_POS *pTargetPos,
									FLOAT fTargetDir)
{
	SetStartTime(uStartTime);
	SetLogicCount(nLogicCount);
	m_nMagicID			= nMagicID;
	m_nTargetObjID		= nTargetID;
	m_posTarget			= *pTargetPos;
	m_fTargetDir		= fTargetDir;
	SetCommandID(OBJECT_COMMAND_MAGIC_SEND);
	return TRUE;
}
Ejemplo n.º 6
0
BOOL CObjectCommand_MagicChannel::Init(UINT uStartTime,
									  INT nLogicCount,
									  INT nMagicID,
									  ObjID_t nTargetID,
									  const WORLD_POS *pTargetPos,
									  FLOAT fTargetDir,
									  UINT uTotalTime)
{
	SetStartTime(uStartTime);
	SetLogicCount(nLogicCount);
	m_nMagicID			= nMagicID;
	m_nTargetObjID		= nTargetID;
	m_posTarget			= *pTargetPos;
	m_fTargetDir		= fTargetDir;
	m_uTotalTime		= uTotalTime;
	m_uEndTime			= 0;
	SetCommandID(OBJECT_COMMAND_MAGIC_CHANNEL);
	return TRUE;
}
Ejemplo n.º 7
0
BOOL CObjectCommand_Move::Init(UINT uStartTime, INT nLogicCount, INT nNodeCount, const WORLD_POS *paposNode)
{
	Assert(m_paposNode == NULL);
	SetStartTime(uStartTime);
	SetLogicCount(nLogicCount);
	m_nNodeCount	= nNodeCount;
	if(m_nNodeCount > 0)
	{
		m_paposNode	= new WORLD_POS[m_nNodeCount];
		memcpy(m_paposNode, paposNode, m_nNodeCount * sizeof(WORLD_POS));
	}
	else
	{
		m_paposNode	= NULL;
	}

	SetCommandID(OBJECT_COMMAND_MOVE);
	return TRUE;
}
Ejemplo n.º 8
0
BOOL CObjectCommand_MagicSend::Init(UINT uStartTime, 
									INT nLogicCount, 
									INT nMagicID, 
									INT nTargetNum, 
									const ObjID_t* pTargetIDList, 
									const WORLD_POS *pTargetPos, 
									FLOAT fTargetDir)
{
	SetStartTime(uStartTime);
	SetLogicCount(nLogicCount);
	SetCommandID(OBJECT_COMMAND_MAGIC_SEND);

	m_nMagicID			= nMagicID;
	m_nTargetNum		= nTargetNum;
	m_posTarget			= *pTargetPos;
	m_fTargetDir		= fTargetDir;

	if (m_nTargetNum > 0 && m_nTargetNum < MAGICSEND_MAX_TARGET_NUM)
	{
		memcpy(m_nTargetObjID, pTargetIDList, sizeof(UINT)*m_nTargetNum);
	}
	
	return TRUE;
}