#include "StdAfx.h" #include "DnShooterProp.h" #include "DnStateBlow.h" #include "DnTableDB.h" #include "DnProjectile.h" CDnShooterProp::CDnShooterProp( CMultiRoom* pRoom ) : CDnWorldActProp( pRoom ), CDnDamageBase( DamageObjectTypeEnum::Prop ) { } CDnShooterProp::~CDnShooterProp(void) { } bool CDnShooterProp::Initialize( CEtWorldSector *pParentSector, const char *szPropName, EtVector3 &vPos, EtVector3 &vRotate, EtVector3 &vScale ) { if( CDnWorldActProp::Initialize( pParentSector, szPropName, vPos, vRotate, vScale ) == false ) return false; if( m_hMonster ) *m_hMonster->GetMatEx() = *GetMatEx(); return true; } bool CDnShooterProp::InitializeTable( int nTableID ) { if( CDnWorldActProp::InitializeTable(nTableID) == false ) return false; bool bResult = false; if( GetData() ) { ProjectileShooterStruct* pStruct = (ProjectileShooterStruct*)GetData(); int nMonsterTableID = pStruct->nMonsterTableID; int nSkillTableID = pStruct->nSkillTableID; int nSkillLevel = pStruct->nSkillLevel; //#61146 TrapŸÀÔ ÇÁ¶øÀÇ °ø°Ý·ÂÀ» ³­À̵µ¿¡ µû¶ó ´Ù¸£°Ô ¼¼ÆÃÇÒ ¼ö ÀÖ´Â ±¸Á¶. #ifdef PER_ADD_PROP_TRAP_DIFFICULT_SET bResult = InitializeMonsterActorProp( nMonsterTableID, pStruct->MonsterWeight ); #else bResult = InitializeMonsterActorProp( nMonsterTableID ); #endif if( bResult ) { //m_hMonster->SetUniqueID( STATIC_INSTANCE(CDnActor::s_dwUniqueCount)++ ); m_SkillComponent.Initialize( nSkillTableID, nSkillLevel ); // ÀÏ´Ü ¾×¼ÇÀ» ÃëÇÏÁö ¾Êµµ·ÏÇÑ´Ù. ½´ÅÍ ÇÁ¶øÀº Ŭ¶ó¿Í ½ÃÀÛ ½Ã°£À» ¸ÂÃçÁà¾ß ÇÑ´Ù.. SetAction( "Idle", 0.0f, 0.0f ); } } return bResult; } // ÀÏ´Ü Shooter ÇÁ¶øÀ¸·Î ½ºÅ³¾²´Â ÇÁ¶ø Å×½ºÆ® ÇØº¸ÀÚ.. void CDnShooterProp::OnSignal( SignalTypeEnum Type, void *pPtr, LOCAL_TIME LocalTime, LOCAL_TIME SignalStartTime, LOCAL_TIME SignalEndTime, int nSignalIndex ) { if( m_hMonster ) { *(m_hMonster->GetMatEx()) = m_Cross; m_SkillComponent.OnSignal( m_hMonster, GetMySmartPtr(), Type, pPtr, LocalTime, SignalStartTime, SignalEndTime, nSignalIndex ); } } void CDnShooterProp::OnSyncComplete( CDNUserSession* pBreakIntoGameSession/*=NULL*/ ) { if( pBreakIntoGameSession ) CmdAction( GetCurrentAction(), pBreakIntoGameSession ); else CmdAction( m_szDefaultActionName.c_str(), pBreakIntoGameSession ); } // ½´ÅÍ ÇÁ¶øÀº ¹ß»çü°¡ Ŭ¶óÀÇ ¿¬Ãâ°ú Á¤È®ÇÏ°Ô ¸Â¾Æ¾ß Çϱ⠶§¹®¿¡ ¾×¼Ç º¯°æ¶§¸¶´Ù ¼­¹ö¿¡¼­ ÆÐŶÀ» º¸³»ÁØ´Ù. void CDnShooterProp::OnChangeAction( const char *szPrevAction ) { //// ¾îÂ÷ÇÇ ´Ù¸¥ ¾×¼ÇÀ¸·Î ¹Ù²îÁö ¾Ê´Â ÀÌ»ó idle ÀÌ ¹Ýº¹µÇ±â ¶§¹®¿¡ //// idle ¾×¼ÇÀÎ °æ¿ì¿£ idle ·Î º¯°æµÇ¾úÀ» ¶§ Çѹø¸¸ º¸³½´Ù. //// Idle ¾×¼ÇÀÌ ÂªÀº °æ¿ì °è¼Ó ÆÐŶ ³ª°¡´Â ¹®Á¦¸¦ °¨¾È, ¼öÁ¤. (#17409) //const char* pCurrentAction = GetCurrentAction(); //if( strcmp(pCurrentAction, "Idle") == 0 ) //{ // if( strcmp(szPrevAction, "Idle") != 0 ) // { // ActionSync( pCurrentAction ); // } //} //else // ActionSync( pCurrentAction ); // ¾×¼ÇÀÌ º¯°æµÇ¾úÀ» ¶§¸¸ ÆÐŶ º¸³¿. if( m_nActionIndex != m_nPrevActionIndex ) ActionSync( GetCurrentAction() ); }