#include "StdAfx.h" #include "DnWorldShooterBrokenProp.h" #include "DnStateBlow.h" #include "DnTableDB.h" #include "DnProjectile.h" #include "TaskManager.h" #include "DnGameTask.h" CDnWorldShooterBrokenProp::CDnWorldShooterBrokenProp( CMultiRoom* pRoom ) : CDnWorldBrokenProp( pRoom ) { } CDnWorldShooterBrokenProp::~CDnWorldShooterBrokenProp(void) { ReleasePostCustomParam(); } bool CDnWorldShooterBrokenProp::Initialize( CEtWorldSector *pParentSector, const char *szPropName, EtVector3 &vPos, EtVector3 &vRotate, EtVector3 &vScale ) { if( CDnWorldBrokenProp::Initialize( pParentSector, szPropName, vPos, vRotate, vScale ) == false ) return false; if( m_hMonster ) *m_hMonster->GetMatEx() = *GetMatEx(); return true; } bool CDnWorldShooterBrokenProp::InitializeTable( int nTableID ) { if( CDnWorldActProp::InitializeTable(nTableID) == false ) return false; bool bResult = false; if( GetData() ) { ShooterBrokenStruct* pStruct = (ShooterBrokenStruct*)GetData(); int nDurability = pStruct->nDurability; int nItemDropGroupTableID = pStruct->nItemDropGroupTableID; 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 ? true : false ) ); #else bResult = InitializeMonsterActorProp( nMonsterTableID ); #endif if( bResult ) { m_SkillComponent.Initialize( nSkillTableID, nSkillLevel ); m_nDurability = nDurability; // ÀÏ´Ü ¾×¼ÇÀ» ÃëÇÏÁö ¾Êµµ·ÏÇÑ´Ù. ½´ÅÍ ÇÁ¶øÀº Ŭ¶ó¿Í ½ÃÀÛ ½Ã°£À» ¸ÂÃçÁà¾ß ÇÑ´Ù.. SetAction( "Idle", 0.0f, 0.0f ); if( -1 != m_nDurability ) { if( 0 == m_nDurability ) m_nDurability = 1; m_nItemDropGroupTableID = pStruct->nItemDropGroupTableID; if( m_nItemDropGroupTableID > 0 ) { CDnDropItem::CalcDropItemList( GetRoom(), Dungeon::Difficulty::Max, m_nItemDropGroupTableID, m_VecDropItemList ); if (m_VecDropItemList.empty()) { // ÇÁ¶ø·Î±× // g_pLogConnection->QueryLogStage(GetRoom()->GetRoomID(), pTask->GetMapTableID(), 0, 0, nTableID); // ½ºÅ×ÀÌÁö ·Î±× 090226 } else { for( DWORD i=0; iQueryLogStage(GetRoom()->GetRoomID(), pTask->GetMapTableID(), 0, m_VecDropItemList[i].nItemID, nTableID); // ½ºÅ×ÀÌÁö ·Î±× 090226 } } } } } } return bResult; } // ÀÏ´Ü Shooter ÇÁ¶øÀ¸·Î ½ºÅ³¾²´Â ÇÁ¶ø Å×½ºÆ® ÇØº¸ÀÚ.. void CDnWorldShooterBrokenProp::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 ); } CDnWorldBrokenProp::OnSignal( Type, pPtr, LocalTime, SignalStartTime, SignalEndTime, nSignalIndex ); // ¸¶Áö¸·À¸·Î ¸Â¾Ò´ø ¾×¼ÇÀ» ±â¾ïÇØ¼­ Normal »óÅÂÀÏ ¶§ ´Ù½Ã º¹±¸ ½ÃÄÑ ÁÜ. if( STE_Projectile == Type ) { const char* pCurrentAttackAction = GetCurrentAction(); if( strlen( pCurrentAttackAction ) ) m_strLastActionName.assign( pCurrentAttackAction ); } } void CDnWorldShooterBrokenProp::OnSyncComplete( CDNUserSession* pBreakIntoGameSession/*=NULL*/ ) { if( pBreakIntoGameSession ) CmdAction( GetCurrentAction(), pBreakIntoGameSession ); else CmdAction( m_szDefaultActionName.c_str(), pBreakIntoGameSession ); } // ½´ÅÍ ÇÁ¶øÀº ¹ß»çü°¡ Ŭ¶óÀÇ ¿¬Ãâ°ú Á¤È®ÇÏ°Ô ¸Â¾Æ¾ß Çϱ⠶§¹®¿¡ ¾×¼Ç º¯°æ¶§¸¶´Ù ¼­¹ö¿¡¼­ ÆÐŶÀ» º¸³»ÁØ´Ù. void CDnWorldShooterBrokenProp::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() ); if( strcmp( szPrevAction, "Hit" ) ) { if( !m_strLastActionName.empty() ) SetActionQueue( m_strLastActionName.c_str() ); } }