2024-12-21 10:04:04 +08:00
|
|
|
|
#include "StdAfx.h"
|
|
|
|
|
|
#include "DnActionBase.h"
|
|
|
|
|
|
#include "DnRenderBase.h"
|
|
|
|
|
|
#include "DnWeapon.h"
|
|
|
|
|
|
#include "DnProjectile.h"
|
|
|
|
|
|
#include "DNGameServerManager.h"
|
|
|
|
|
|
#include "PerfCheck.h"
|
|
|
|
|
|
#include "DnActionSpecificInfo.h"
|
|
|
|
|
|
|
|
|
|
|
|
CDnActionBase::CDnActionBase()
|
|
|
|
|
|
{
|
|
|
|
|
|
m_pRender = NULL;
|
|
|
|
|
|
ResetActionBase();
|
|
|
|
|
|
|
|
|
|
|
|
m_CustomActionTime = 0;
|
|
|
|
|
|
m_fCustomPrevFrame = 0.f;
|
|
|
|
|
|
// <20><> <20><><EFBFBD><EFBFBD><EFBFBD>Ͱ<EFBFBD> <20><><EFBFBD><EFBFBD>Ű<EFBFBD><C5B0> <20><><EFBFBD><EFBFBD>ü<EFBFBD><C3BC> <20>ּҴ<D6BC> <20><><EFBFBD>α<CEB1><D7B7><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>DZ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ʴ´<CAB4>.
|
|
|
|
|
|
m_pProjectileCountInfo = NULL;
|
|
|
|
|
|
|
|
|
|
|
|
m_pCheckPreSignalFunc = CDnActionBase::CheckPreSignal;
|
|
|
|
|
|
m_pCheckPostSignalFunc = CDnActionBase::CheckPostSignal;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void CDnActionBase::ResetActionBase()
|
|
|
|
|
|
{
|
|
|
|
|
|
m_LocalTime = 0;
|
|
|
|
|
|
m_ActionTime = 0;
|
|
|
|
|
|
m_nActionIndex = -1;
|
|
|
|
|
|
m_nPrevActionIndex = -1;
|
|
|
|
|
|
m_fPrevFrame = 0.f;
|
|
|
|
|
|
m_fFrame = 0.f;
|
|
|
|
|
|
m_fQueueBlendFrame = m_fQueueStartFrame = 0.f;
|
|
|
|
|
|
m_nCustomActionIndex = -1;
|
|
|
|
|
|
|
|
|
|
|
|
m_nLoopCount = 0;
|
|
|
|
|
|
m_fFPS = 60.f;
|
|
|
|
|
|
m_bCustomProcessSignal = false;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
CDnActionBase::~CDnActionBase()
|
|
|
|
|
|
{
|
|
|
|
|
|
FreeAction();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool CDnActionBase::Initialize( CDnRenderBase *pRender )
|
|
|
|
|
|
{
|
|
|
|
|
|
m_pRender = pRender;
|
|
|
|
|
|
return true;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void CDnActionBase::ProcessAction( LOCAL_TIME LocalTime, float fDelta )
|
|
|
|
|
|
{
|
|
|
|
|
|
m_LocalTime = LocalTime;
|
|
|
|
|
|
if( !m_szActionQueue.empty() )
|
|
|
|
|
|
{
|
|
|
|
|
|
if( m_fQueueBlendFrame == -1 )
|
|
|
|
|
|
{
|
|
|
|
|
|
ActionElementStruct *pStruct = GetElement( m_nActionIndex );
|
|
|
|
|
|
if( pStruct ) {
|
|
|
|
|
|
m_fQueueBlendFrame = (float)pStruct->dwBlendFrame;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
SetAction( m_szActionQueue.c_str(), m_fQueueStartFrame, m_fQueueBlendFrame );
|
|
|
|
|
|
m_szActionQueue.clear();
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if( m_nActionIndex == -1 )
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
|
|
ActionElementStruct *pStruct = GetElement( m_nActionIndex );
|
|
|
|
|
|
|
|
|
|
|
|
if( 0.0f < m_fFPS )
|
|
|
|
|
|
m_fFrame = ( ( m_LocalTime - m_ActionTime ) / 1000.f ) * m_fFPS;
|
|
|
|
|
|
else
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
|
|
if( !pStruct ) return;
|
|
|
|
|
|
if( m_fFrame < 0.f ) m_fFrame = (float)pStruct->dwLength + 1.f;
|
|
|
|
|
|
|
|
|
|
|
|
if( m_fFrame > (float)pStruct->dwLength )
|
|
|
|
|
|
{
|
|
|
|
|
|
ProcessSignal( pStruct, m_fFrame, m_fPrevFrame );
|
|
|
|
|
|
|
|
|
|
|
|
if( m_pRender && m_nVecAniIndexList[m_nActionIndex] != -1 ) {
|
|
|
|
|
|
EtVector3 vDist;
|
|
|
|
|
|
m_pRender->CalcAniDistance( m_nVecAniIndexList[m_nActionIndex], (float)pStruct->dwLength, m_fPrevFrame, vDist );
|
|
|
|
|
|
m_pRender->AddAniDistance( vDist );
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if( m_nLoopCount > 0 || m_nLoopCount == -1 )
|
|
|
|
|
|
{
|
|
|
|
|
|
if( m_nLoopCount > 0 )
|
|
|
|
|
|
m_nLoopCount--;
|
|
|
|
|
|
|
|
|
|
|
|
OnLoopAction( m_fFrame, m_fPrevFrame );
|
|
|
|
|
|
|
|
|
|
|
|
float fTemp = m_fFrame - (float)pStruct->dwLength;
|
|
|
|
|
|
if( pStruct->szNextActionName == pStruct->szName ) {
|
|
|
|
|
|
fTemp += (float)pStruct->dwNextActionFrame;
|
|
|
|
|
|
if( fTemp > (float)pStruct->dwLength ) fTemp = (float)pStruct->dwLength;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
SetAction( m_szAction.c_str(), fTemp, 0.f, true );
|
|
|
|
|
|
OnNextAction( m_szAction.c_str() , pStruct->szNextActionName.c_str() );
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
OnFinishAction(m_szAction.c_str(), LocalTime);
|
|
|
|
|
|
|
|
|
|
|
|
if( pStruct->szNextActionName.empty() )
|
|
|
|
|
|
{
|
|
|
|
|
|
m_nPrevActionIndex = m_nActionIndex;
|
|
|
|
|
|
m_nActionIndex = -1;
|
|
|
|
|
|
m_fFrame = -1.f;
|
|
|
|
|
|
m_szAction.clear();
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
SetAction( pStruct->szNextActionName.c_str(), ( pStruct->dwNextActionFrame == 0 ) ? 0.f : (float)pStruct->dwNextActionFrame - 0.001f, (float)pStruct->dwBlendFrame );
|
|
|
|
|
|
if( m_fFrame > 0.f )
|
|
|
|
|
|
m_fPrevFrame -= 1.f;
|
|
|
|
|
|
OnNextAction( m_szAction.c_str() , pStruct->szNextActionName.c_str() );
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if( m_nActionIndex == -1 )
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
|
|
pStruct = GetElement( m_nActionIndex );
|
|
|
|
|
|
if( !pStruct )
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if( m_nCustomActionIndex != -1 )
|
|
|
|
|
|
{
|
|
|
|
|
|
ActionElementStruct *pCustomStruct = GetElement( m_nCustomActionIndex );
|
|
|
|
|
|
|
|
|
|
|
|
if( pCustomStruct ) {
|
|
|
|
|
|
float fFrame = ( ( m_LocalTime - m_CustomActionTime ) / 1000.f ) * m_fFPS;
|
|
|
|
|
|
if( fFrame > (float)pCustomStruct->dwLength )
|
|
|
|
|
|
{
|
|
|
|
|
|
ResetCustomAction();
|
|
|
|
|
|
ProcessSignal( pCustomStruct, fFrame, m_fCustomPrevFrame );
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
m_bCustomProcessSignal = true;
|
|
|
|
|
|
float fTemp = m_fCustomPrevFrame;
|
|
|
|
|
|
ProcessSignal( pCustomStruct, fFrame, m_fCustomPrevFrame );
|
|
|
|
|
|
m_bCustomProcessSignal = false;
|
|
|
|
|
|
|
|
|
|
|
|
if( m_fCustomPrevFrame == fTemp )
|
|
|
|
|
|
{
|
|
|
|
|
|
if( fFrame == m_fCustomPrevFrame )
|
|
|
|
|
|
m_fCustomPrevFrame = fFrame + 0.001f;
|
|
|
|
|
|
else
|
|
|
|
|
|
m_fCustomPrevFrame = fFrame;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
// CanMove <20><> True <20>̰<EFBFBD> CustomAction <20><> <20><><EFBFBD><EFBFBD><EFBFBD>Ǵ<EFBFBD> <20><><EFBFBD>쿡
|
|
|
|
|
|
// Input Signal <20><><EFBFBD><EFBFBD> <20>̵<EFBFBD><CCB5><EFBFBD> <20>ִ<EFBFBD> <20>ñ׳ε<D7B3><CEB5><EFBFBD> ó<><C3B3><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD> <20><><EFBFBD>ϱ<EFBFBD> <20><><EFBFBD><EFBFBD> <20>ϴ<EFBFBD> Ǯ<><C7AE><EFBFBD><EFBFBD><EFBFBD>´<EFBFBD>..
|
|
|
|
|
|
// <20><><EFBFBD><EFBFBD> <20>ϸ<EFBFBD> CanMove <20><> <20>߰<EFBFBD><DFB0><EFBFBD> True <20><> <20>ٲ<EFBFBD><D9B2><EFBFBD> <20><><EFBFBD>쿡 <20><> <20>Ʒ<EFBFBD> Input Signal <20><><EFBFBD><EFBFBD> <20>־<EFBFBD><D6BE><EFBFBD> <20>ʿ䰡 <20><><EFBFBD><EFBFBD>.
|
|
|
|
|
|
// <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ʾ<EFBFBD><CABE><EFBFBD> <20><><EFBFBD>쿣 Move <20>ʿ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ִ<EFBFBD> Signal<61><6C><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD> <20>ʿ<EFBFBD><CABF><EFBFBD> <20>߰<EFBFBD><DFB0><EFBFBD> <20>־<EFBFBD><D6BE>ֱ<EFBFBD> <20>ٶ<EFBFBD>
|
|
|
|
|
|
// ProcessSignal( pStruct, m_fFrame, m_fPrevFrame );
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
ProcessSignal( pStruct, m_fFrame, m_fPrevFrame );
|
|
|
|
|
|
}
|
|
|
|
|
|
if( m_fFrame == m_fPrevFrame )
|
|
|
|
|
|
m_fPrevFrame = m_fFrame + 0.001f;
|
|
|
|
|
|
else
|
|
|
|
|
|
m_fPrevFrame = m_fFrame;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void CDnActionBase::ProcessSignal( ActionElementStruct *pStruct, float fFrame, float fPrevFrame )
|
|
|
|
|
|
{
|
|
|
|
|
|
CEtActionSignal *pSignal;
|
|
|
|
|
|
for( DWORD i=0; i<pStruct->pVecSignalList.size(); i++ ) {
|
|
|
|
|
|
pSignal = pStruct->pVecSignalList[i];
|
|
|
|
|
|
|
|
|
|
|
|
if( pSignal->CheckSignal( fPrevFrame, fFrame ) == true )
|
|
|
|
|
|
{
|
|
|
|
|
|
LOCAL_TIME StartTime = m_LocalTime - (LOCAL_TIME)( 1000.f / m_fFPS * ( fFrame - pSignal->GetStartFrame() ) );
|
|
|
|
|
|
LOCAL_TIME EndTime = m_LocalTime + (LOCAL_TIME)( 1000.f / m_fFPS * ( pSignal->GetEndFrame() - fFrame ) );
|
|
|
|
|
|
|
|
|
|
|
|
OnSignal( (SignalTypeEnum)pSignal->GetSignalIndex(), pSignal->GetData(), m_LocalTime, StartTime, EndTime, pSignal->GetSignalListArrayIndex() );
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if( !m_szActionQueue.empty() ) break;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void CDnActionBase::SetAction( const char *szActionName, float fFrame, float fBlendFrame, bool bLoop )
|
|
|
|
|
|
{
|
|
|
|
|
|
if (szActionName == NULL) return;
|
|
|
|
|
|
int nIndex = GetElementIndex( szActionName );
|
|
|
|
|
|
if( nIndex == -1 ) {
|
|
|
|
|
|
#ifdef _DEBUG
|
|
|
|
|
|
OutputDebug( "Can't find Action : %s, %s\n", m_szFileName.c_str(), szActionName );
|
|
|
|
|
|
#endif
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
std::string szPrevAction = m_szAction;
|
|
|
|
|
|
|
|
|
|
|
|
m_nPrevActionIndex = m_nActionIndex;
|
|
|
|
|
|
m_nActionIndex = nIndex;
|
|
|
|
|
|
m_szAction = szActionName;
|
|
|
|
|
|
|
|
|
|
|
|
m_fFrame = m_fPrevFrame = (float)fFrame;
|
|
|
|
|
|
m_ActionTime = m_LocalTime - (LOCAL_TIME)( fFrame / m_fFPS * 1000.f );
|
|
|
|
|
|
if( m_ActionTime < 0 ) m_ActionTime = 0;
|
|
|
|
|
|
|
|
|
|
|
|
if( m_pRender && m_nVecAniIndexList[nIndex] != -1 )
|
|
|
|
|
|
{
|
|
|
|
|
|
m_pRender->ChangeAnimation( m_nVecAniIndexList[nIndex], fFrame, fBlendFrame );
|
|
|
|
|
|
if( bLoop ) m_pRender->SetPrevFrame( 0.f );
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
OnChangeAction( szPrevAction.c_str() );
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void CDnActionBase::SetActionQueue( const char *szActionName, int nLoopCount, float fBlendFrame, float fStartFrame )
|
|
|
|
|
|
{
|
|
|
|
|
|
m_szActionQueue = szActionName;
|
|
|
|
|
|
m_fQueueBlendFrame = fBlendFrame;
|
|
|
|
|
|
m_fQueueStartFrame = fStartFrame;
|
|
|
|
|
|
|
|
|
|
|
|
m_nLoopCount = nLoopCount;
|
|
|
|
|
|
OnChangeActionQueue( m_szAction.c_str() );
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const char *CDnActionBase::GetCurrentAction()
|
|
|
|
|
|
{
|
|
|
|
|
|
if( !m_szActionQueue.empty() ) return m_szActionQueue.c_str();
|
|
|
|
|
|
return m_szAction.c_str();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void CDnActionBase::SetCustomAction( const char *szActionName, float fFrame )
|
|
|
|
|
|
{
|
|
|
|
|
|
m_szCustomAction = szActionName;
|
|
|
|
|
|
m_CustomActionTime = m_LocalTime - (LOCAL_TIME)( fFrame / m_fFPS * 1000.f );
|
|
|
|
|
|
m_nCustomActionIndex = GetElementIndex( szActionName );
|
|
|
|
|
|
m_fCustomPrevFrame = fFrame - 1.f;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool CDnActionBase::IsCustomAction()
|
|
|
|
|
|
{
|
|
|
|
|
|
return ( m_nCustomActionIndex == -1 ) ? false : true;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void CDnActionBase::ResetCustomAction()
|
|
|
|
|
|
{
|
|
|
|
|
|
m_szCustomAction.clear();
|
|
|
|
|
|
m_nCustomActionIndex = -1;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#include "DNConfig.h"
|
|
|
|
|
|
extern TGameConfig g_Config;
|
|
|
|
|
|
|
|
|
|
|
|
bool CDnActionBase::LoadAction( const char *szFullPathName )
|
|
|
|
|
|
{
|
|
|
|
|
|
m_ProjectileCountInfoForInit.Clear();
|
|
|
|
|
|
m_SkillChainInfoForInit.Clear();
|
|
|
|
|
|
|
|
|
|
|
|
m_PassiveSkillInfoForInit.Clear();
|
|
|
|
|
|
|
|
|
|
|
|
m_BasicAttackInfoForInit.Clear();
|
|
|
|
|
|
|
|
|
|
|
|
bool bResult = false;
|
|
|
|
|
|
bResult = CEtActionBase::LoadAction( szFullPathName );
|
|
|
|
|
|
if( bResult ) CacheAniIndex();
|
|
|
|
|
|
|
|
|
|
|
|
if( bResult )
|
|
|
|
|
|
{
|
|
|
|
|
|
if( false == m_ProjectileCountInfoForInit.mapMaxProjectileCountInAction.empty() ||
|
|
|
|
|
|
false == m_ProjectileCountInfoForInit.mapSendActionWeapon.empty() )
|
|
|
|
|
|
{
|
|
|
|
|
|
if (g_Config.bPreLoad && g_Config.bAllLoaded)
|
|
|
|
|
|
{
|
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD>ε尡 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>⵿<EFBFBD><E2B5BF> <20>̿ܿ<CCBF> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ȵʴ<C8B5>! <20>ϴ<EFBFBD> <20>α<CEB1><D7B9><EFBFBD>
|
|
|
|
|
|
g_Log.Log(LogType::_PRELOADED_DYNAMICLOAD, L"DynamicLoad [%S]\n", szFullPathName);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
CDnActionSpecificInfo::GetInstance().AddProjectileSignalInfo( szFullPathName, m_ProjectileCountInfoForInit );
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
m_pProjectileCountInfo = CDnActionSpecificInfo::GetInstance().FindProjectileSignalInfo( szFullPathName );
|
|
|
|
|
|
|
|
|
|
|
|
if( false == m_SkillChainInfoForInit.setSkillChainAction.empty() )
|
|
|
|
|
|
{
|
|
|
|
|
|
if (g_Config.bPreLoad && g_Config.bAllLoaded)
|
|
|
|
|
|
{
|
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD>ε尡 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>⵿<EFBFBD><E2B5BF> <20>̿ܿ<CCBF> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ȵʴ<C8B5>! <20>ϴ<EFBFBD> <20>α<CEB1><D7B9><EFBFBD>
|
|
|
|
|
|
g_Log.Log(LogType::_PRELOADED_DYNAMICLOAD, L"DynamicLoad [%S]\n", szFullPathName);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
CDnActionSpecificInfo::GetInstance().AddSkillChainActionSet( szFullPathName, m_SkillChainInfoForInit );
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
m_pSetSkillChainAction = CDnActionSpecificInfo::GetInstance().FindSkillChainActionSet( szFullPathName );
|
|
|
|
|
|
|
|
|
|
|
|
if( false == m_PassiveSkillInfoForInit.mapPassiveSkillInfo.empty() )
|
|
|
|
|
|
{
|
|
|
|
|
|
if (g_Config.bPreLoad && g_Config.bAllLoaded)
|
|
|
|
|
|
{
|
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD>ε尡 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>⵿<EFBFBD><E2B5BF> <20>̿ܿ<CCBF> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ȵʴ<C8B5>! <20>ϴ<EFBFBD> <20>α<CEB1><D7B9><EFBFBD>
|
|
|
|
|
|
g_Log.Log(LogType::_PRELOADED_DYNAMICLOAD, L"DynamicLoad [%S]\n", szFullPathName);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
CDnActionSpecificInfo::GetInstance().AddPassiveSkillInfo( szFullPathName, m_PassiveSkillInfoForInit );
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
m_pPassiveSkillInfo = CDnActionSpecificInfo::GetInstance().FindPassiveSkillInfo( szFullPathName );
|
|
|
|
|
|
|
|
|
|
|
|
if( false == m_BasicAttackInfoForInit.mapBasicAttackInfo.empty() )
|
|
|
|
|
|
{
|
|
|
|
|
|
if (g_Config.bPreLoad && g_Config.bAllLoaded)
|
|
|
|
|
|
{
|
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD>ε尡 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>⵿<EFBFBD><E2B5BF> <20>̿ܿ<CCBF> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ȵʴ<C8B5>! <20>ϴ<EFBFBD> <20>α<CEB1><D7B9><EFBFBD>
|
|
|
|
|
|
g_Log.Log(LogType::_PRELOADED_DYNAMICLOAD, L"DynamicLoad [%S]\n", szFullPathName);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
CDnActionSpecificInfo::GetInstance().AddBasicAttackActionInfo( szFullPathName, m_BasicAttackInfoForInit );
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
m_pBasicAttackInfo = CDnActionSpecificInfo::GetInstance().FindBasicAttackInfo( szFullPathName );
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return bResult;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void CDnActionBase::FreeAction()
|
|
|
|
|
|
{
|
|
|
|
|
|
CEtActionBase::FreeAction();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void CDnActionBase::CacheAniIndex()
|
|
|
|
|
|
{
|
|
|
|
|
|
m_nVecAniIndexList.clear();
|
|
|
|
|
|
|
|
|
|
|
|
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> , <20><><EFBFBD><EFBFBD><EFBFBD>̳ʿ<CCB3> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ũ<><C5A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ҽ<EFBFBD> <20>ִ<EFBFBD> <20>ϴ<EFBFBD> empty() üũ<C3BC><C5A9> <20>߰<EFBFBD><DFB0>ϰ<EFBFBD> empty()
|
|
|
|
|
|
// <20><>ü<EFBFBD><C3BC> <20><><EFBFBD>ϴٰ<CFB4> ũ<><C5A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ٸ<EFBFBD> <20>ڷᱸ<DAB7><E1B1B8><EFBFBD><EFBFBD> <20>ٲ<EFBFBD><D9B2><EFBFBD><EFBFBD>ҵ<EFBFBD> <20>ͽ<EFBFBD><CDBD>ϴ<EFBFBD>.
|
|
|
|
|
|
if (m_pVecActionElementList == NULL || m_pVecActionElementList->empty() )
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
|
|
for( DWORD i=0; i<m_pVecActionElementList->size(); i++ ) {
|
|
|
|
|
|
int nIndex = -1;
|
|
|
|
|
|
if( m_pRender && (*m_pVecActionElementList)[i] && !(*m_pVecActionElementList)[i]->szLinkAniName.empty() ) {
|
|
|
|
|
|
nIndex = m_pRender->GetAniIndex( (*m_pVecActionElementList)[i]->szLinkAniName.c_str() );
|
|
|
|
|
|
}
|
|
|
|
|
|
m_nVecAniIndexList.push_back( nIndex );
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void CDnActionBase::CheckPreSignal( ActionElementStruct *pElement, int nElementIndex, CEtActionSignal *pSignal, int nSignalIndex, CEtActionBase *pActionBase )
|
|
|
|
|
|
{
|
|
|
|
|
|
/*
|
|
|
|
|
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD>.. <EFBFBD≯<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Room <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>Ѱܾ<EFBFBD> <EFBFBD>ϴ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD>찡 <EFBFBD>ִµ<EFBFBD><EFBFBD><EFBFBD>..
|
|
|
|
|
|
This<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD>־<EFBFBD><EFBFBD>ְ<EFBFBD> <EFBFBD>Ǹ<EFBFBD> <EFBFBD>ȵ˴ϴ<EFBFBD>.
|
|
|
|
|
|
<EFBFBD>ݵ<EFBFBD><EFBFBD><EFBFBD> (CMultiRoom*)g_pGameServerManager->GetRootRoom() <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ͻð<EFBFBD>
|
|
|
|
|
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƕ<EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ش<EFBFBD> <EFBFBD><EFBFBD>ü<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ø<EFBFBD> <EFBFBD>ȵǰ<EFBFBD> GetRootRoom() <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ؼ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>~
|
|
|
|
|
|
*/
|
|
|
|
|
|
switch( pSignal->GetSignalIndex() ) {
|
|
|
|
|
|
case STE_Input:
|
|
|
|
|
|
{
|
|
|
|
|
|
if( pSignal->GetStartFrame() == 0 && pSignal->GetEndFrame() == pElement->dwLength ) {
|
|
|
|
|
|
pSignal->SetStartFrame( -1 );
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// <20><>Dz <20>ñ׳ο<D7B3> <20><>ų ü<><C3BC> <20>÷<EFBFBD><C3B7>װ<EFBFBD> <20><><EFBFBD><EFBFBD> <20>ִ<EFBFBD> <20><><EFBFBD>쿡 <20><>ų ü<>εǴ<CEB5> <20><EFBFBD><D7BC><EFBFBD><EFBFBD><EFBFBD> <20≯<EFBFBD> <20>з<EFBFBD><D0B7>صξ<D8B5><CEBE>ٰ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>´<EFBFBD>.
|
|
|
|
|
|
if( pActionBase )
|
|
|
|
|
|
{
|
|
|
|
|
|
CDnActionBase* pDnActionBase = static_cast<CDnActionBase*>( pActionBase );
|
|
|
|
|
|
|
|
|
|
|
|
pDnActionBase->InsertBasicAttackInfo( nElementIndex, pSignal );
|
|
|
|
|
|
pDnActionBase->InsertSkillChainInfo( pElement, nElementIndex, pSignal );
|
|
|
|
|
|
pDnActionBase->InsertBasicShootActionCoolTime( pElement, nElementIndex, pSignal );
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
case STE_InputHasPassiveSkill:
|
|
|
|
|
|
{
|
|
|
|
|
|
InputHasPassiveSkillStruct *pStruct = (InputHasPassiveSkillStruct *)pSignal->GetData();
|
|
|
|
|
|
|
|
|
|
|
|
if( pSignal->GetStartFrame() == 0 && pSignal->GetEndFrame() == pElement->dwLength ) {
|
|
|
|
|
|
pSignal->SetStartFrame( -1 );
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if( !pStruct->szEXSkillChangeAction ) pSignal->InsertStrTable( (char*)&pStruct->szEXSkillChangeAction, std::string("") );
|
|
|
|
|
|
if( pActionBase ) {
|
|
|
|
|
|
((CDnActionBase*)pActionBase)->InsertPassiveSkillInfo( nElementIndex, pSignal );
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
break;
|
|
|
|
|
|
case STE_Projectile:
|
|
|
|
|
|
{
|
|
|
|
|
|
ProjectileStruct *pStruct = (ProjectileStruct *)pSignal->GetData();
|
|
|
|
|
|
pStruct->nProjectileIndex = -1;
|
|
|
|
|
|
|
|
|
|
|
|
if( !g_pGameServerManager ) break;
|
|
|
|
|
|
|
|
|
|
|
|
// <20><><EFBFBD><EFBFBD> <20>ε<EFBFBD><CEB5><EFBFBD><EFBFBD><EFBFBD> 0<><30> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ŭ<><C5AC><EFBFBD>̾<EFBFBD>Ʈ<EFBFBD><C6AE><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ε<EFBFBD><CEB5><EFBFBD><EFBFBD><EFBFBD> <20><>ü<EFBFBD>ؼ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ŭ<><EFBFBD> <20>Ǿ<EFBFBD><C7BE>ֱ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
// <20><><EFBFBD><EFBFBD> <20>ε<EFBFBD><CEB5><EFBFBD><EFBFBD><EFBFBD> 0 <20>̶<EFBFBD><CCB6><EFBFBD> break <20>Ǵ<EFBFBD> <20>κ<EFBFBD> <20><><EFBFBD><EFBFBD> ī<><C4AB>Ʈ<EFBFBD><C6AE> <20>Ǿ<EFBFBD><C7BE><EFBFBD> <20>Ѵ<EFBFBD>.
|
|
|
|
|
|
// <20><> <20>ǿ<D7BC><C7BF><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20>ִ<EFBFBD> <20><EFBFBD>ü<EFBFBD><C3BC> <20>ִ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>صд<D8B5>.
|
|
|
|
|
|
// Ŭ<><C5AC><EFBFBD>κ<EFBFBD><CEBA><EFBFBD> <20><EFBFBD>ü <20><>Ŷ<EFBFBD><C5B6> <20><><EFBFBD><EFBFBD> <20><EFBFBD><D7BC><EFBFBD> <20>ٲ<EFBFBD><D9B2><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ִ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ѱ<EFBFBD><D1B1><EFBFBD> <20>ʵ<EFBFBD><CAB5><EFBFBD> <20><><EFBFBD><EFBFBD>.
|
|
|
|
|
|
if( pActionBase )
|
|
|
|
|
|
((CDnActionBase*)pActionBase)->InsertProjectileCountInfo( nElementIndex, pSignal );
|
|
|
|
|
|
|
|
|
|
|
|
if( pStruct->nWeaponTableID == 0 ) break;
|
|
|
|
|
|
|
|
|
|
|
|
CDnProjectile *pProjectile = new CDnProjectile( (CMultiRoom*)g_pGameServerManager->GetRootRoom(), CDnActor::Identity(), false , false );
|
|
|
|
|
|
pProjectile->CDnWeapon::Initialize( pStruct->nWeaponTableID, -1 );
|
|
|
|
|
|
pProjectile->CDnWeapon::CreateObject();
|
|
|
|
|
|
pStruct->nProjectileIndex = pProjectile->GetMyIndex();
|
|
|
|
|
|
}
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
case STE_SendAction_Weapon:
|
|
|
|
|
|
{
|
|
|
|
|
|
if( pActionBase )
|
|
|
|
|
|
((CDnActionBase*)pActionBase)->InsertSendActionProjectileCountInfo( nElementIndex, pSignal );
|
|
|
|
|
|
}
|
|
|
|
|
|
break;
|
|
|
|
|
|
case STE_Gravity:
|
|
|
|
|
|
{
|
|
|
|
|
|
GravityStruct *pStruct = (GravityStruct *)pSignal->GetData();
|
|
|
|
|
|
if( !pStruct->vOffset ) pSignal->InsertVec3Table( (EtVector3*)&pStruct->vOffset, EtVector3( 0.f, 0.f, 0.f ) );
|
|
|
|
|
|
}
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
default:
|
|
|
|
|
|
{
|
|
|
|
|
|
if( pActionBase )
|
|
|
|
|
|
{
|
|
|
|
|
|
CDnActionBase* pDnActionBase = static_cast<CDnActionBase*>( pActionBase );
|
|
|
|
|
|
pDnActionBase->InsertStandChangeSEShootSkillCoolTime( pElement, nElementIndex, pSignal );
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
break;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void CDnActionBase::CheckPostSignal( ActionElementStruct *pElement, int nElementIndex, CEtActionSignal *pSignal, int nSignalIndex, CEtActionBase *pActionBase )
|
|
|
|
|
|
{
|
|
|
|
|
|
if( !g_pGameServerManager ) return;
|
|
|
|
|
|
if( !g_pGameServerManager->GetRootRoom() ) return;
|
|
|
|
|
|
switch( pSignal->GetSignalIndex() ) {
|
|
|
|
|
|
case STE_Projectile:
|
|
|
|
|
|
{
|
|
|
|
|
|
ProjectileStruct *pStruct = (ProjectileStruct *)pSignal->GetData();
|
|
|
|
|
|
if( pStruct->nWeaponTableID == 0 ) break;
|
|
|
|
|
|
if( pStruct->nProjectileIndex == -1 ) break;
|
|
|
|
|
|
|
|
|
|
|
|
DnWeaponHandle hWeapon = CDnWeapon::GetSmartPtr( (CMultiRoom*)g_pGameServerManager->GetRootRoom(), pStruct->nProjectileIndex );
|
|
|
|
|
|
SAFE_RELEASE_SPTR( hWeapon );
|
|
|
|
|
|
}
|
|
|
|
|
|
break;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void CDnActionBase::InsertBasicAttackInfo( int nElementIndex, CEtActionSignal *pSignal )
|
|
|
|
|
|
{
|
|
|
|
|
|
InputStruct* pInputStruct = (InputStruct*)(pSignal->GetData());
|
|
|
|
|
|
|
|
|
|
|
|
CDnActionSpecificInfo::S_BASIC_ATTACK_INPUT_SIGNAL_INFO BasicActionSignalInfo;
|
|
|
|
|
|
BasicActionSignalInfo.strChangeActionName = pInputStruct->szChangeAction;
|
|
|
|
|
|
int iStartFrame = pSignal->GetStartFrame() < 0 ? 0 : pSignal->GetStartFrame();
|
|
|
|
|
|
BasicActionSignalInfo.dwStartFrame = iStartFrame;
|
|
|
|
|
|
BasicActionSignalInfo.dwEndFrame = pSignal->GetEndFrame();
|
|
|
|
|
|
m_BasicAttackInfoForInit.mapBasicAttackInfo[ nElementIndex ].push_back( BasicActionSignalInfo );
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void CDnActionBase::InsertSkillChainInfo( ActionElementStruct *pElement, int nElementIndex, CEtActionSignal *pSignal )
|
|
|
|
|
|
{
|
|
|
|
|
|
InputStruct* pInputStruct = (InputStruct*)(pSignal->GetData());
|
|
|
|
|
|
|
|
|
|
|
|
if( TRUE == pInputStruct->bSkillChain )
|
|
|
|
|
|
{
|
|
|
|
|
|
m_SkillChainInfoForInit.setSkillChainAction.insert( nElementIndex );
|
|
|
|
|
|
m_SkillChainInfoForInit.mapCanChainToThisAction[ nElementIndex ].push_back( pInputStruct->szChangeAction );
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void CDnActionBase::InsertBasicShootActionCoolTime( ActionElementStruct *pElement, int nElementIndex, CEtActionSignal *pSignal )
|
|
|
|
|
|
{
|
|
|
|
|
|
InputStruct* pInputStruct = (InputStruct*)(pSignal->GetData());
|
|
|
|
|
|
|
|
|
|
|
|
// <20>⺻ <20><> <20><EFBFBD><D7BC>̰<EFBFBD> <20><>ȯ <20><EFBFBD><D7BC><EFBFBD> pick, jump <20><EFBFBD><D7BC><EFBFBD> <20>ƴ<EFBFBD> <20><>.
|
|
|
|
|
|
const char* pActionName = pElement->szName.c_str();
|
|
|
|
|
|
if( strstr(pActionName, "Shoot_") )
|
|
|
|
|
|
{
|
|
|
|
|
|
if( stricmp("Pick", pInputStruct->szChangeAction) != 0 &&
|
|
|
|
|
|
stricmp("Jump", pInputStruct->szChangeAction) != 0 )
|
|
|
|
|
|
{
|
|
|
|
|
|
// <20><><EFBFBD><EFBFBD> <20>ٸ<EFBFBD> <20><EFBFBD><D7BC><EFBFBD><EFBFBD><EFBFBD> <20>ٲ<EFBFBD><D9B2><EFBFBD> <20><>Dz<EFBFBD><C7B2> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ִ<EFBFBD><D6B4><EFBFBD><EFBFBD><EFBFBD> <20>׳<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
|
|
|
|
|
int iStartFrame = pSignal->GetStartFrame() < 0 ? 0 : pSignal->GetStartFrame();
|
|
|
|
|
|
m_ProjectileCountInfoForInit.mapBasicShootActionCoolTime[ nElementIndex ] = DWORD(((float)iStartFrame / m_fFPS) * 1000);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void CDnActionBase::InsertStandChangeSEShootSkillCoolTime( ActionElementStruct *pElement, int nElementIndex, CEtActionSignal *pSignal )
|
|
|
|
|
|
{
|
|
|
|
|
|
if( m_ProjectileCountInfoForInit.mapBasicShootActionCoolTime.end() == m_ProjectileCountInfoForInit.mapBasicShootActionCoolTime.find( nElementIndex ) )
|
|
|
|
|
|
{
|
|
|
|
|
|
const char* pActionName = pElement->szName.c_str();
|
|
|
|
|
|
|
|
|
|
|
|
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD>Ľ<EFBFBD><C4BD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ǵ<D7BC> <20><>Ÿ<EFBFBD><C5B8><EFBFBD><EFBFBD> <20>ʿ<EFBFBD><CABF>ϴ<EFBFBD>. <20>Է<EFBFBD><D4B7><EFBFBD> <20><EFBFBD> <20><EFBFBD><D7BC><EFBFBD> <20>ٲ<EFBFBD><D9B2>鼭 <20><EFBFBD>ü<EFBFBD><C3BC> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>..
|
|
|
|
|
|
// <20>ణ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>⼭ <20><><EFBFBD><EFBFBD>Ľ<EFBFBD><C4BD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><D7BC><EFBFBD> <20><>ü <20><><EFBFBD≯<EFBFBD> <20><>Ÿ<EFBFBD><C5B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ѵ<EFBFBD>.
|
|
|
|
|
|
// <20><><EFBFBD><EFBFBD>Ľ<EFBFBD><C4BD><EFBFBD><EFBFBD><EFBFBD> <20>ǿ<D7BC><C7BF><EFBFBD><EFBFBD><EFBFBD> <20><> input <20>ñ׳η<D7B3> <20><><EFBFBD><EFBFBD> <20>Է<EFBFBD> <20><EFBFBD> <20><> <20>ۿ<EFBFBD> <20><><EFBFBD><EFBFBD>.
|
|
|
|
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǵ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>Ľ<EFBFBD><C4BD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ó<><C3B3><EFBFBD>Ѵ<EFBFBD>.
|
|
|
|
|
|
if( strcmp(pActionName, "Skill_SiegeStance_Attack") == 0 ||
|
|
|
|
|
|
strcmp(pActionName, "Skill_Demolition_Attack1") == 0 ||
|
|
|
|
|
|
strcmp(pActionName, "Skill_Demolition_Attack2") == 0 )
|
|
|
|
|
|
{
|
|
|
|
|
|
m_ProjectileCountInfoForInit.mapBasicShootActionCoolTime[ nElementIndex ] = DWORD(((float)pElement->dwLength / m_fFPS) * 1000);
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
if( strcmp(pActionName, "Skill_FlashStance_AttackL") == 0 ||
|
|
|
|
|
|
strcmp(pActionName, "Skill_FlashStance_AttackR") == 0 )
|
|
|
|
|
|
{
|
|
|
|
|
|
// <20>÷<EFBFBD><C3B7><EFBFBD> <20><><EFBFBD>Ľ<EFBFBD><C4BD><EFBFBD> <20>÷<EFBFBD><C3B7><EFBFBD> <20><><EFBFBD>Ľ<EFBFBD> <20><><EFBFBD>ݾǿ<D7BC> input <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> <20>ñ׳<C3B1><D7B3><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD> input <20>ñ׳<C3B1> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ð<EFBFBD><C3B0><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>д<EFBFBD>.
|
|
|
|
|
|
// <20><><EFBFBD><EFBFBD> <20>ǿ<D7BC> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ӿ<EFBFBD> 2<><32><EFBFBD><EFBFBD> Input <20>ñ׳<C3B1><D7B3><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>Ŀ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><DEB6><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ִ<EFBFBD>.
|
|
|
|
|
|
// <20><EFBFBD> <20><><EFBFBD>쿣 <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>۵Ǵ<DBB5> Input <20>ñ׳<C3B1><D7B3><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>Ÿ<EFBFBD><C5B8><EFBFBD><EFBFBD> <20><><EFBFBD>Ƶд<C6B5>.
|
|
|
|
|
|
int iSmallestStartFrame = INT_MAX;
|
|
|
|
|
|
int iNumSignals = (int)pElement->pVecSignalList.size();
|
|
|
|
|
|
for( int iSignal = 0; iSignal < iNumSignals; ++iSignal )
|
|
|
|
|
|
{
|
|
|
|
|
|
CEtActionSignal* pSignal = pElement->pVecSignalList.at( iSignal );
|
|
|
|
|
|
if( STE_Input == pSignal->GetSignalIndex() )
|
|
|
|
|
|
{
|
|
|
|
|
|
InputStruct* pInputStruct = (InputStruct*)(pSignal->GetData());
|
|
|
|
|
|
if( stricmp("Pick", pInputStruct->szChangeAction) != 0 &&
|
|
|
|
|
|
stricmp("Jump", pInputStruct->szChangeAction) != 0 )
|
|
|
|
|
|
{
|
|
|
|
|
|
int iStartFrame = pSignal->GetStartFrame() < 0 ? 0 : pSignal->GetStartFrame();
|
|
|
|
|
|
if( iStartFrame < iSmallestStartFrame )
|
|
|
|
|
|
{
|
|
|
|
|
|
iSmallestStartFrame = iStartFrame;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if( INT_MAX != iSmallestStartFrame )
|
|
|
|
|
|
{
|
|
|
|
|
|
m_ProjectileCountInfoForInit.mapBasicShootActionCoolTime[ nElementIndex ] = DWORD(((float)iSmallestStartFrame / m_fFPS) * 1000);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void CDnActionBase::InsertPassiveSkillInfo( int nElementIndex, CEtActionSignal *pSignal )
|
|
|
|
|
|
{
|
|
|
|
|
|
InputHasPassiveSkillStruct* pStruct = (InputHasPassiveSkillStruct*)(pSignal->GetData());
|
|
|
|
|
|
|
|
|
|
|
|
CDnActionSpecificInfo::S_PASSIVESKILL_SIGNAL_INFO PassiveSignalInfo;
|
|
|
|
|
|
PassiveSignalInfo.iSkillID = pStruct->nSkillIndex;
|
|
|
|
|
|
PassiveSignalInfo.strChangeActionName = pStruct->szChangeAction;
|
|
|
|
|
|
PassiveSignalInfo.strEXSkillChangeActionName = pStruct->szEXSkillChangeAction;
|
|
|
|
|
|
m_PassiveSkillInfoForInit.mapPassiveSkillInfo[ nElementIndex ].push_back( PassiveSignalInfo );
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void CDnActionBase::InsertProjectileCountInfo( int nElementIndex, CEtActionSignal *pSignal )
|
|
|
|
|
|
{
|
|
|
|
|
|
ProjectileStruct *pStruct = (ProjectileStruct *)pSignal->GetData();
|
|
|
|
|
|
|
|
|
|
|
|
map<int, int>::iterator iter = m_ProjectileCountInfoForInit.mapMaxProjectileCountInAction.find( nElementIndex );
|
|
|
|
|
|
if( iter != m_ProjectileCountInfoForInit.mapMaxProjectileCountInAction.end() )
|
|
|
|
|
|
m_ProjectileCountInfoForInit.mapMaxProjectileCountInAction[ nElementIndex ]++;
|
|
|
|
|
|
else
|
|
|
|
|
|
m_ProjectileCountInfoForInit.mapMaxProjectileCountInAction.insert( make_pair(nElementIndex, 1) );
|
|
|
|
|
|
|
|
|
|
|
|
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD>̺<EFBFBD> ID<49><44> <20>Ƶд<C6B5>. <20>Ϲ<EFBFBD> <20><><EFBFBD>ݾ<DDBE> <20><>Ŷ<EFBFBD><C5B6><EFBFBD><EFBFBD> <20><>ų üũ <20><>ƾ<EFBFBD><C6BE> <20><><EFBFBD>ϰ<EFBFBD>,
|
|
|
|
|
|
// <20><EFBFBD>ü <20><><EFBFBD><EFBFBD> üũ <20><>ƾ<EFBFBD><C6BE><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ѹ߷<D1B9> <20><><EFBFBD><EFBFBD> <20><>ȣ <20>ٲ㼭 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>.... <20><> ¯<><C2AF>...
|
|
|
|
|
|
m_ProjectileCountInfoForInit.mapUsingProjectileWeaponTableIDs[ nElementIndex ].insert( pStruct->nWeaponTableID );
|
|
|
|
|
|
|
|
|
|
|
|
// <20><>ų <20><EFBFBD>ü <20>ٲ㺸<D9B2><E3BAB8><EFBFBD><EFBFBD> <20>Ͱ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD>, <20>Ҽ<EFBFBD><D2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>⺻ <20><><EFBFBD><EFBFBD> <20>ǰ<D7BC> <20><EFBFBD>ü <20><>Ŷ<EFBFBD><C5B6> <20><><EFBFBD><EFBFBD><EFBFBD>ؼ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
|
|
|
|
|
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><EFBFBD>ü <20><>Ŷ<EFBFBD><C5B6> <20><EFBFBD><DEBE><EFBFBD> <20><> <20>ñ׳<C3B1><D7B3><EFBFBD> <20><><EFBFBD>ݵ<EFBFBD> üũ<C3BC>Ѵ<EFBFBD>.
|
|
|
|
|
|
m_ProjectileCountInfoForInit.mapProjectileSignalFrameOffset[ nElementIndex ].push_back( pSignal->GetStartFrame() );
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void CDnActionBase::InsertSendActionProjectileCountInfo( int nElementIndex, CEtActionSignal *pSignal )
|
|
|
|
|
|
{
|
|
|
|
|
|
SendAction_WeaponStruct *pStruct = (SendAction_WeaponStruct *)pSignal->GetData();
|
|
|
|
|
|
|
|
|
|
|
|
if( 2 <= pStruct->nWeaponIndex )
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
|
|
CDnActionSpecificInfo::S_WEAPONACTION_INFO WeaponActionInfo;
|
|
|
|
|
|
WeaponActionInfo.iWeaponIndex = pStruct->nWeaponIndex;
|
|
|
|
|
|
WeaponActionInfo.iFrame = pSignal->GetStartFrame();
|
|
|
|
|
|
if( 0 < strlen(pStruct->szActionName) )
|
|
|
|
|
|
WeaponActionInfo.strActionName = pStruct->szActionName;
|
|
|
|
|
|
|
|
|
|
|
|
map<int, vector<CDnActionSpecificInfo::S_WEAPONACTION_INFO> >::iterator iter = m_ProjectileCountInfoForInit.mapSendActionWeapon.find( nElementIndex );
|
|
|
|
|
|
if( m_ProjectileCountInfoForInit.mapSendActionWeapon.end() == iter )
|
|
|
|
|
|
{
|
|
|
|
|
|
// <20><><EFBFBD>ʷ<EFBFBD> <20>߰ߵǾ<DFB5><C7BE><EFBFBD>.
|
|
|
|
|
|
vector<CDnActionSpecificInfo::S_WEAPONACTION_INFO> vlWeaponActionInfo;
|
|
|
|
|
|
vlWeaponActionInfo.push_back( WeaponActionInfo );
|
|
|
|
|
|
m_ProjectileCountInfoForInit.mapSendActionWeapon.insert( make_pair(nElementIndex, vlWeaponActionInfo) );
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
// <20>ι<EFBFBD>° <20><><EFBFBD>ʹ<EFBFBD> <20><><EFBFBD>ͷ<EFBFBD> <20>߰<EFBFBD>. (ex)ũ<>ν<EFBFBD> <20><><EFBFBD><EFBFBD>)
|
|
|
|
|
|
iter->second.push_back( WeaponActionInfo );
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void CDnActionBase::SetFPS( float fValue )
|
|
|
|
|
|
{
|
|
|
|
|
|
if( 0.0f < fValue )
|
|
|
|
|
|
{
|
|
|
|
|
|
m_ActionTime = m_LocalTime - (LOCAL_TIME)( m_fFrame / fValue * 1000.f );
|
|
|
|
|
|
if( IsCustomAction() ) {
|
|
|
|
|
|
float fFrame = ( ( m_LocalTime - m_CustomActionTime ) / 1000.f ) * m_fFPS;
|
|
|
|
|
|
m_CustomActionTime = m_LocalTime - (LOCAL_TIME)( fFrame / fValue * 1000.f );
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
// fValue <20><> 0.0f <20><> ȣ<><C8A3><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>.
|
|
|
|
|
|
m_ActionTime = m_LocalTime;
|
|
|
|
|
|
if( IsCustomAction() ) {
|
|
|
|
|
|
m_CustomActionTime = m_LocalTime;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
m_fFPS = fValue;
|
|
|
|
|
|
|
|
|
|
|
|
if( m_pRender )
|
|
|
|
|
|
m_pRender->SetFPS( fValue );
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
float CDnActionBase::GetFPS()
|
|
|
|
|
|
{
|
|
|
|
|
|
return m_fFPS;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool CDnActionBase::IsIgnoreSignal( int nSignalIndex )
|
|
|
|
|
|
{
|
|
|
|
|
|
switch( nSignalIndex ) {
|
|
|
|
|
|
case STE_DnNullSignal:
|
|
|
|
|
|
case STE_Sound:
|
|
|
|
|
|
case STE_Particle:
|
|
|
|
|
|
case STE_EnvironmentEffect:
|
|
|
|
|
|
case STE_ShowWeapon:
|
|
|
|
|
|
case STE_AlphaBlending:
|
|
|
|
|
|
case STE_AttachTrail:
|
|
|
|
|
|
case STE_CameraEffect_Shake:
|
|
|
|
|
|
case STE_FX:
|
|
|
|
|
|
case STE_CanRotate:
|
|
|
|
|
|
case STE_ActionObject:
|
|
|
|
|
|
case STE_ObjectVisible:
|
|
|
|
|
|
case STE_AttachSwordTrail:
|
|
|
|
|
|
case STE_ShowSwordTrail:
|
|
|
|
|
|
case STE_CameraEffect_RadialBlur:
|
|
|
|
|
|
case STE_Decal:
|
|
|
|
|
|
case STE_HeadLook:
|
|
|
|
|
|
case STE_ShaderCustomParameter:
|
|
|
|
|
|
case STE_ChangeWeaponLink:
|
|
|
|
|
|
case STE_FreezeCamera:
|
|
|
|
|
|
case STE_SocialAction:
|
|
|
|
|
|
case STE_HideExposureInfo:
|
|
|
|
|
|
case STE_PhysicsSkip:
|
|
|
|
|
|
case STE_Particle_LoopEnd:
|
|
|
|
|
|
case STE_FX_LoopEnd:
|
|
|
|
|
|
case STE_OutlineFilter:
|
|
|
|
|
|
case STE_Billboard:
|
|
|
|
|
|
case STE_EyeLightTrail:
|
|
|
|
|
|
case STE_PointLight:
|
|
|
|
|
|
case STE_OtherSelfEffect:
|
|
|
|
|
|
case STE_ImmediatelyAttach:
|
|
|
|
|
|
case STE_Dialogue:
|
|
|
|
|
|
case STE_AttachLine:
|
|
|
|
|
|
case STE_SyncChangeAction:
|
|
|
|
|
|
case STE_CannonTargeting:
|
|
|
|
|
|
case STE_SkillChecker:
|
|
|
|
|
|
case STE_CameraEffect_Swing:
|
|
|
|
|
|
return true;
|
|
|
|
|
|
}
|
|
|
|
|
|
return false;
|
|
|
|
|
|
}
|