DragonNest/GameCommon/DnCoolTimeBlow.cpp

97 lines
2.3 KiB
C++
Raw Normal View History

2024-12-19 09:48:26 +08:00
#include "StdAfx.h"
#include "DnCoolTimeBlow.h"
#ifdef _DEBUG
#define new new(_NORMAL_BLOCK,__FILE__,__LINE__)
#endif
CDnCoolTimeBlow::CDnCoolTimeBlow( DnActorHandle hActor, const char* szValue ) : CDnBlow( hActor )
{
m_StateBlow.emBlowIndex = STATE_BLOW::BLOW_096;
// <20><> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>..
SetValue( szValue );
m_fValue = (float)atof(szValue);
}
CDnCoolTimeBlow::~CDnCoolTimeBlow(void)
{
}
void CDnCoolTimeBlow::OnBegin( LOCAL_TIME LocalTime, float fDelta )
{
//m_hActor->AddCoolTimeAdjustValue( m_fValue );
OutputDebug( "CDnCoolTimeBlow::OnBegin\n" );
}
void CDnCoolTimeBlow::Process( LOCAL_TIME LocalTime, float fDelta )
{
CDnBlow::Process( LocalTime, fDelta );
}
void CDnCoolTimeBlow::OnEnd( LOCAL_TIME LocalTime, float fDelta )
{
//m_hActor->AddCoolTimeAdjustValue( -m_fValue );
OutputDebug( "CDnCoolTimeBlow::OnEnd\n" );
}
#if defined(PRE_ADD_PREFIX_SYSTE_RENEW)
void CDnCoolTimeBlow::AddStateEffectValue(const char* szOrigValue, const char* szAddValue, std::string& szNewValue)
{
char szBuff[128] = {0, };
//<2F>ʿ<EFBFBD><CABF><EFBFBD> <20><> <20><><EFBFBD><EFBFBD>
float fValue[2];
//////////////////////////////////////////////////////////////////////////
//ù<><C3B9>° <20><>
fValue[0] = (float)atof( szOrigValue );
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
//<2F>ι<EFBFBD>°
fValue[1] = (float)atof( szAddValue );
//////////////////////////////////////////////////////////////////////////
//<2F><> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>Ѵ<EFBFBD>.
float fResultValue = fValue[0] + fValue[1];
sprintf_s(szBuff, "%f", fResultValue);
szNewValue = szBuff;
}
void CDnCoolTimeBlow::RemoveStateEffectValue(const char* szOrigValue, const char* szAddValue, std::string& szNewValue)
{
char szBuff[128] = {0, };
//<2F>ʿ<EFBFBD><CABF><EFBFBD> <20><> <20><><EFBFBD><EFBFBD>
float fValue[2];
//////////////////////////////////////////////////////////////////////////
//ù<><C3B9>° <20><>
fValue[0] = (float)atof( szOrigValue );
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
//<2F>ι<EFBFBD>°
fValue[1] = (float)atof( szAddValue );
//////////////////////////////////////////////////////////////////////////
//<2F><> <20><><EFBFBD><EFBFBD>
float fResultValue = fValue[0] - fValue[1];
sprintf_s(szBuff, "%f", fResultValue);
szNewValue = szBuff;
}
#endif // PRE_ADD_PREFIX_SYSTE_RENEW