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

23 lines
No EOL
1.2 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 "DnPropActionCondition.h"
#include "DnWorldActProp.h"
CDnPropActionCondition::CDnPropActionCondition( DnPropHandle hEntity ) : CDnPropCondition( hEntity )
{
}
CDnPropActionCondition::~CDnPropActionCondition(void)
{
}
bool CDnPropActionCondition::IsSatisfy( void )
{
_ASSERT( dynamic_cast<CDnWorldActProp*>(m_hEntity.GetPointer()) );
if( !m_hEntity )
return false;
const char* pCurrentActionName = static_cast<CDnWorldActProp*>(m_hEntity.GetPointer())->GetCurrentAction();
return pCurrentActionName ? (m_strActionName == pCurrentActionName) : false;
}