#include "Stdafx.h" #include "ManufactureSkill.h" #include "SecondarySkillRecipe.h" #if defined( PRE_ADD_SECONDARY_SKILL ) CManufactureSkill::~CManufactureSkill() { for( UINT i=0 ; iGetItemID() == iItemID ) return m_vRecipe[i]; } return NULL; } int CManufactureSkill::AddRecipe( CSecondarySkillRecipe* pRecipe ) { if( static_cast(GetMaxRecipeCount()) <= m_vRecipe.size() ) { _ASSERT( 0 ); return ERROR_SECONDARYSKILL_ADDRECIPE_MAX; } // Áߺ¹°Ë»ç if( GetRecipe( pRecipe->GetItemID() ) ) { _ASSERT(0); return ERROR_SECONDARYSKILL_ADDRECIPE_DUPLICATE; } m_vRecipe.push_back( pRecipe ); return ERROR_NONE; } bool CManufactureSkill::DeleteRecipe( CSecondarySkillRecipe* pRecipe ) { for( UINT i=0 ; i& vData ) { if( m_vRecipe.empty() ) return; vData.reserve( m_vRecipe.size() ); vData = m_vRecipe; } #endif // #if defined( PRE_ADD_SECONDARY_SKILL )