DragonNest/GameCommon/SecondarySkill.cpp
2024-12-20 16:56:44 +08:00

27 lines
1.5 KiB
C++
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.


#include "stdafx.h"
#include "SecondarySkill.h"
#include "SecondarySkillEventHandler.h"
#if defined( PRE_ADD_SECONDARY_SKILL )
CSecondarySkill::CSecondarySkill( int iSkillID, SecondarySkill::ExecuteType::eType ExecuteType )
:m_iSkillID(iSkillID),m_ExecuteType(ExecuteType),m_Grade(SecondarySkill::Grade::Beginning),m_iLevel(1),m_iExp(0)
{
}
void CSecondarySkill::SetExp( const int iExp, ISecondarySkillEventHandler* pEventHandler )
{
m_iExp = iExp;
if( pEventHandler )
pEventHandler->OnChangeExp( this, 0 );
}
void CSecondarySkill::AddExp( const int iExp, ISecondarySkillEventHandler* pEventHandler )
{
m_iExp += iExp;
if( pEventHandler )
pEventHandler->OnChangeExp( this, iExp );
}
#endif // #if defined( PRE_ADD_SECONDARY_SKILL )