90 lines
2.4 KiB
C++
90 lines
2.4 KiB
C++
|
|
#include "StdAfx.h"
|
|||
|
|
#include "DnSummonMonsterChangeSkillLevelBlow.h"
|
|||
|
|
|
|||
|
|
#if !defined( USE_BOOST_MEMPOOL )
|
|||
|
|
#ifdef _DEBUG
|
|||
|
|
#define new new(_NORMAL_BLOCK,__FILE__,__LINE__)
|
|||
|
|
#endif
|
|||
|
|
#endif // #if !defined( USE_BOOST_MEMPOOL )
|
|||
|
|
|
|||
|
|
|
|||
|
|
CDnSummonMonsterChangeSkillLevelBlow::CDnSummonMonsterChangeSkillLevelBlow( DnActorHandle hActor, const char* szValue ) : CDnBlow( hActor )
|
|||
|
|
{
|
|||
|
|
m_StateBlow.emBlowIndex = STATE_BLOW::BLOW_167;
|
|||
|
|
SetValue( szValue );
|
|||
|
|
|
|||
|
|
m_fValue = (float)atof(szValue);
|
|||
|
|
|
|||
|
|
m_fRate = m_fValue;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
CDnSummonMonsterChangeSkillLevelBlow::~CDnSummonMonsterChangeSkillLevelBlow(void)
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnSummonMonsterChangeSkillLevelBlow::OnBegin( LOCAL_TIME LocalTime, float fDelta )
|
|||
|
|
{
|
|||
|
|
__super::OnBegin(LocalTime, fDelta);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
void CDnSummonMonsterChangeSkillLevelBlow::OnEnd( LOCAL_TIME LocalTime, float fDelta )
|
|||
|
|
{
|
|||
|
|
__super::OnEnd(LocalTime, fDelta);
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
#if defined(PRE_ADD_PREFIX_SYSTE_RENEW)
|
|||
|
|
void CDnSummonMonsterChangeSkillLevelBlow::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 = max(fValue[0], fValue[1]);
|
|||
|
|
|
|||
|
|
sprintf_s(szBuff, "%f", fResultValue);
|
|||
|
|
|
|||
|
|
szNewValue = szBuff;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnSummonMonsterChangeSkillLevelBlow::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> <20><><EFBFBD>Ѵ<EFBFBD>.
|
|||
|
|
float fResultValue = min(fValue[0], fValue[1]);
|
|||
|
|
|
|||
|
|
sprintf_s(szBuff, "%f", fResultValue);
|
|||
|
|
|
|||
|
|
szNewValue = szBuff;
|
|||
|
|
}
|
|||
|
|
#endif // PRE_ADD_PREFIX_SYSTE_RENEW
|