8992 lines
291 KiB
C++
8992 lines
291 KiB
C++
|
|
#include "StdAfx.h"
|
|||
|
|
#include "DnActor.h"
|
|||
|
|
#include "DnWorld.h"
|
|||
|
|
#include "DnWorldGrid.h"
|
|||
|
|
#include "MAActorRenderBase.h"
|
|||
|
|
#include "MAMovementBase.h"
|
|||
|
|
#include "DnWeapon.h"
|
|||
|
|
#include "EtActionSignal.h"
|
|||
|
|
#include "VelocityFunc.h"
|
|||
|
|
#include "DnWorldBrokenProp.h"
|
|||
|
|
#include "DnWorldSector.h"
|
|||
|
|
#include "DnProjectile.h"
|
|||
|
|
#include "DnMonsterActor.h"
|
|||
|
|
#include "TaskManager.h"
|
|||
|
|
#include "DnPlayerActor.h"
|
|||
|
|
#include "PerfCheck.h"
|
|||
|
|
#include "DnStateBlow.h"
|
|||
|
|
#include "DnBlow.h"
|
|||
|
|
#include "DnGameTask.h"
|
|||
|
|
#include "DnItemTask.h"
|
|||
|
|
#include "DNUserData.h"
|
|||
|
|
#include "DNUserSession.h"
|
|||
|
|
#include "DnWorldTrapProp.h"
|
|||
|
|
#include "DnChangeActionStrProcessor.h"
|
|||
|
|
//#include "DNUserConnection.h"
|
|||
|
|
// Siva Shaodw Test <20>ӽ<EFBFBD>
|
|||
|
|
#ifdef _SHADOW_TEST
|
|||
|
|
#include "DNProtocol.h"
|
|||
|
|
#include "GameSendPacket.h"
|
|||
|
|
bool g_bEnableShadow[MAX_SESSION_COUNT] = { 0, };
|
|||
|
|
#endif
|
|||
|
|
#include "EtComputeDist.h"
|
|||
|
|
#include "DNAggroSystem.h"
|
|||
|
|
#include "DnParryBlow.h"
|
|||
|
|
#include "DnCooltimeParryBlow.h"
|
|||
|
|
#include "DnChargerBlow.h"
|
|||
|
|
#include "DnBuffProp.h"
|
|||
|
|
#include "DnWorldBrokenBuffProp.h"
|
|||
|
|
#include "DnReverseTeamBlow.h"
|
|||
|
|
#include "DnHighLanderBlow.h"
|
|||
|
|
#include "DnCannonMonsterActor.h"
|
|||
|
|
#include "DnPlayerSpeedHackChecker.h"
|
|||
|
|
#include "DnFrostbiteBlow.h"
|
|||
|
|
|
|||
|
|
#include "DnChangeActionSetBlow.h"
|
|||
|
|
#include "DnInvincibleAtBlow.h"
|
|||
|
|
#include "DnBreakSuperArmorBlow.h"
|
|||
|
|
#include "DnBurnCriticalBlow.h"
|
|||
|
|
#include "DnDisableActionBlow.h"
|
|||
|
|
|
|||
|
|
#ifdef PRE_ADD_EXPORT_DPS_INFORMATION
|
|||
|
|
#include "DnDPSReporter.h"
|
|||
|
|
#endif
|
|||
|
|
|
|||
|
|
#include "DnManaShieldBlow.h"
|
|||
|
|
#include "DnCurseBlow.h"
|
|||
|
|
#include "DNGameDataManager.h"
|
|||
|
|
#include "DnStateBlowSignalProcessor.h"
|
|||
|
|
#include "DnInvincibleTypeBlow.h"
|
|||
|
|
#include "DnImmuneByTypeBlow.h"
|
|||
|
|
#include "DnComboDamageLimitBlow.h"
|
|||
|
|
#include "DnTransmitDamageBlow.h"
|
|||
|
|
#include "DnChangeStandActionBlow.h"
|
|||
|
|
|
|||
|
|
#if defined(PRE_ADD_TOTAL_LEVEL_SKILL)
|
|||
|
|
#include "DnTotalLevelSkillBlows.h"
|
|||
|
|
#endif // PRE_ADD_TOTAL_LEVEL_SKILL
|
|||
|
|
|
|||
|
|
#if defined(PRE_FIX_68898)
|
|||
|
|
#include "DnPartialPlayProcessor.h"
|
|||
|
|
#endif // PRE_FIX_68898
|
|||
|
|
|
|||
|
|
#include "SmartPtrDef.h"
|
|||
|
|
|
|||
|
|
#include "DnBubbleSystem.h"
|
|||
|
|
#include "DnObserverEventMessage.h"
|
|||
|
|
|
|||
|
|
|
|||
|
|
DECL_DN_SMART_PTR_STATIC( CDnActor, MAX_SESSION_COUNT, 100 )
|
|||
|
|
|
|||
|
|
STATIC_DECL_INIT( CDnActor, CEtOctree<DnActorHandle> *, s_pOctree ) = { NULL, };
|
|||
|
|
STATIC_DECL_INIT( CDnActor, DWORD, s_dwUniqueCount ) = { 0, };
|
|||
|
|
STATIC_DECL_INIT( CDnActor, CDnActor::mapActorSearch, s_dwMapActorSearch );
|
|||
|
|
|
|||
|
|
float CDnActor::s_fDieDelta = 20.f;
|
|||
|
|
|
|||
|
|
float CEtOctreeNode<DnActorHandle>::s_fMinRadius = 1000.0f;
|
|||
|
|
|
|||
|
|
#define DOWN_DELAY_RANDOM_RANGE 0.2f // 20<32><30><EFBFBD><EFBFBD> <20><><EFBFBD>ų<EFBFBD> <20>E<EFBFBD>ų<EFBFBD>~
|
|||
|
|
|
|||
|
|
#ifdef PRE_FIX_GAMESERVER_OPTIMIZE
|
|||
|
|
STATIC_DECL_INIT( CDnActor, CFrameSkip, s_MonsterProcess );
|
|||
|
|
STATIC_DECL_INIT( CDnActor, float, s_fMonsterProcessDelta );
|
|||
|
|
STATIC_DECL_INIT( CDnActor, CFrameSkip, s_NpcProcess );
|
|||
|
|
STATIC_DECL_INIT( CDnActor, float, s_fNpcProcessDelta );
|
|||
|
|
#endif
|
|||
|
|
|
|||
|
|
CDnActor::CDnActor( CMultiRoom *pRoom, int nClassID )
|
|||
|
|
: CDnUnknownRenderObject( pRoom, true )
|
|||
|
|
, m_vStaticPosition( 0.f, 0.f, 0.f )
|
|||
|
|
, m_vPrevPosition( 0.f, 0.f, 0.f )
|
|||
|
|
{
|
|||
|
|
CDnActorState::Initialize( this );
|
|||
|
|
m_nClassID = nClassID;
|
|||
|
|
m_fAddHeight = 0.f;
|
|||
|
|
|
|||
|
|
m_bShow = true;
|
|||
|
|
m_fDownDelta = 0.f;
|
|||
|
|
m_fDieDelta = 0.f;
|
|||
|
|
m_fMaxDieDelta = CDnActor::s_fDieDelta;
|
|||
|
|
m_fStiffDelta = 0.f;
|
|||
|
|
m_fLastDownRatio = 1.f;
|
|||
|
|
m_LastHitSignalTime = 0;
|
|||
|
|
m_nLastHitSignalIndex = -1;
|
|||
|
|
m_nLastDamageHitterActionIndex = 0;
|
|||
|
|
m_nTeam = 0;
|
|||
|
|
m_dwUniqueID = -1;
|
|||
|
|
|
|||
|
|
m_pAggroSystem = NULL;
|
|||
|
|
|
|||
|
|
m_bModifyPlaySpeed = false;
|
|||
|
|
m_PlaySpeedStartTime = 0;
|
|||
|
|
m_dwPlaySpeedTime = 0;
|
|||
|
|
|
|||
|
|
m_bEnableNormalSuperAmmor = false;
|
|||
|
|
m_nNormalSuperAmmorTime = 0;
|
|||
|
|
m_fBreakNormalSuperAmmorDurability = 0.f;
|
|||
|
|
|
|||
|
|
m_HitCheckType = HitCheckTypeEnum::BoundingBox;
|
|||
|
|
memset( m_bSelfDeleteWeapon, 0, sizeof( m_bSelfDeleteWeapon ) );
|
|||
|
|
|
|||
|
|
m_pStateBlow = new CDnStateBlow( GetMySmartPtr() );
|
|||
|
|
|
|||
|
|
memset( m_nSkillSuperAmmorValue, 0, sizeof(m_nSkillSuperAmmorValue) );
|
|||
|
|
memset( m_nLastUpdateSkillSuperAmmorValue, 0, sizeof(m_nLastUpdateSkillSuperAmmorValue) );
|
|||
|
|
m_nSkillSuperAmmorTime = 0;
|
|||
|
|
m_fSkillSuperAmmorDamageDecreaseProb = 0.f;
|
|||
|
|
|
|||
|
|
m_bIngnoreNormalSuperArmor = false;
|
|||
|
|
InsertOctreeNode();
|
|||
|
|
|
|||
|
|
m_bUseSignalSkillCheck = false;
|
|||
|
|
ZeroMemory( m_abSignalSkillCheck, sizeof(m_abSignalSkillCheck) );
|
|||
|
|
|
|||
|
|
m_iCantMoveReferenceCount = 0;
|
|||
|
|
m_iCantActionReferenceCount = 0;
|
|||
|
|
m_iCantUseSkillReferenceCount = 0;
|
|||
|
|
m_iCantAttackReferenceCount = 0;
|
|||
|
|
|
|||
|
|
m_iCantXZMoveSE = 0;
|
|||
|
|
|
|||
|
|
#ifdef _SHADOW_TEST
|
|||
|
|
m_bIsShadowActor = false;
|
|||
|
|
m_bEnableShadowActor = true;
|
|||
|
|
#endif
|
|||
|
|
|
|||
|
|
m_iLastDamage = 0;
|
|||
|
|
|
|||
|
|
m_bOnSignalFromChargerSE = false;
|
|||
|
|
|
|||
|
|
m_bAllowCalcCombo = true;
|
|||
|
|
m_bOctreeUpdate = true;
|
|||
|
|
|
|||
|
|
m_bToggleIngnoreHit = false;
|
|||
|
|
|
|||
|
|
m_dwGenTick = timeGetTime();
|
|||
|
|
|
|||
|
|
m_iFrameStopRefCount = 0;
|
|||
|
|
m_fPlaySpeed = 0.0f;
|
|||
|
|
m_iLastProcessPressCount = 0;
|
|||
|
|
|
|||
|
|
m_bCompleteKill_AfterProcessStateBlow = false;
|
|||
|
|
|
|||
|
|
m_pStateBlowSignalProcessor = new CDnStateBlowSignalProcessor();
|
|||
|
|
|
|||
|
|
m_bChangeWeaponLocked = false;
|
|||
|
|
m_bSkipChangeWeaponAction = false;
|
|||
|
|
m_bSkipOnAttatchDetachWeapon = false;
|
|||
|
|
|
|||
|
|
#if defined(PRE_ADD_50907)
|
|||
|
|
m_ChangeWeaponRefCount = 0;
|
|||
|
|
m_bOrigWeaponWhenChangeWeaponSelfDelete = false;
|
|||
|
|
#endif // PRE_ADD_50907
|
|||
|
|
|
|||
|
|
#if defined(PRE_ADD_50907)
|
|||
|
|
m_DisarmamentRefCount = 0;
|
|||
|
|
m_bOrigWeaponWhenDisarmamentSelfDelete = false;
|
|||
|
|
#endif // PRE_ADD_50907
|
|||
|
|
|
|||
|
|
#if defined(PRE_FIX_50482)
|
|||
|
|
m_nChangeTeamRefCount = 0;
|
|||
|
|
#endif // PRE_FIX_50482
|
|||
|
|
|
|||
|
|
#if defined(PRE_FIX_59347)
|
|||
|
|
m_bApplyPartsDamage = false;
|
|||
|
|
#endif // PRE_FIX_59347
|
|||
|
|
|
|||
|
|
#ifdef PRE_ADD_GRAVITY_PROPERTY
|
|||
|
|
m_fGravityEnd = 0.0f;
|
|||
|
|
#endif // PRE_ADD_GRAVITY_PROPERTY
|
|||
|
|
|
|||
|
|
// Rotate.
|
|||
|
|
m_dwRotateStartTime = 0;
|
|||
|
|
m_dwRotateTime = 0;
|
|||
|
|
m_bRotate = false;;
|
|||
|
|
m_bRotLeft = false; // ȸ<><C8B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
|||
|
|
m_fSpeedRot = 0.0f; // ȸ<><C8B8><EFBFBD>ӵ<EFBFBD>.
|
|||
|
|
m_fStartSpeed = 0.0f; // <20><><EFBFBD>ۼӵ<DBBC>.
|
|||
|
|
m_fEndSpeed = 0.0f; // <20><><EFBFBD><EFBFBD><EFBFBD>ӵ<EFBFBD>.
|
|||
|
|
m_vRotAxis.x = m_vRotAxis.y = m_vRotAxis.z = 0.0f; // ȸ<><C8B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǥ.
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
CDnActor::~CDnActor()
|
|||
|
|
{
|
|||
|
|
RemoveUniqueSearchMap( GetRoom(), this );
|
|||
|
|
FreeAction();
|
|||
|
|
for( int i=0; i<2; i++ ) SAFE_RELEASE_SPTR( m_hWeapon[i] );
|
|||
|
|
RemoveOctreeNode();
|
|||
|
|
SAFE_DELETE_VEC( m_VecPreActionState );
|
|||
|
|
SAFE_DELETE_VEC( m_VecPreActionCustomState );
|
|||
|
|
SAFE_DELETE(m_pStateBlow);
|
|||
|
|
SAFE_DELETE( m_pAggroSystem );
|
|||
|
|
|
|||
|
|
SAFE_DELETE(m_pStateBlowSignalProcessor);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::InsertOctreeNode()
|
|||
|
|
{
|
|||
|
|
if( STATIC_INSTANCE(s_pOctree) ) {
|
|||
|
|
SSphere Sphere;
|
|||
|
|
GetBoundingSphere( Sphere );
|
|||
|
|
m_pCurrentNode = STATIC_INSTANCE(s_pOctree)->Insert( GetMySmartPtr(), Sphere );
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::RemoveOctreeNode()
|
|||
|
|
{
|
|||
|
|
if( STATIC_INSTANCE(s_pOctree) ) {
|
|||
|
|
if( !STATIC_INSTANCE(s_pOctree)->Remove( GetMySmartPtr(), m_pCurrentNode ) ) {
|
|||
|
|
STATIC_INSTANCE(s_pOctree)->Remove( GetMySmartPtr(), NULL );
|
|||
|
|
}
|
|||
|
|
m_pCurrentNode = NULL;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::SetUniqueID( DWORD dwUniqueID )
|
|||
|
|
{
|
|||
|
|
RemoveUniqueSearchMap( GetRoom(), this );
|
|||
|
|
m_dwUniqueID = dwUniqueID;
|
|||
|
|
InsertUniqueSearchMap( GetRoom(), this );
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::InsertUniqueSearchMap( CMultiRoom *pRoom, CDnActor *pActor )
|
|||
|
|
{
|
|||
|
|
if( pActor->GetUniqueID() == -1 ) return;
|
|||
|
|
STATIC_INSTANCE_(s_dwMapActorSearch).insert( make_pair( pActor->GetUniqueID(), pActor->GetMySmartPtr() ) );
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::RemoveUniqueSearchMap( CMultiRoom *pRoom, CDnActor *pActor )
|
|||
|
|
{
|
|||
|
|
if( pActor->GetUniqueID() == -1 ) return;
|
|||
|
|
std::map<DWORD, DnActorHandle>::iterator it;
|
|||
|
|
it = STATIC_INSTANCE_(s_dwMapActorSearch).find( pActor->GetUniqueID() );
|
|||
|
|
if( it != STATIC_INSTANCE_(s_dwMapActorSearch).end() ) {
|
|||
|
|
STATIC_INSTANCE_(s_dwMapActorSearch).erase( it );
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// Static Func
|
|||
|
|
|
|||
|
|
void CDnActor::InitializeNextStage( CMultiRoom* pRoom )
|
|||
|
|
{
|
|||
|
|
CDNGameRoom* pGameRoom = static_cast<CDNGameRoom*>(pRoom);
|
|||
|
|
|
|||
|
|
for( DWORD i=0; i<STATIC_INSTANCE_(s_pVecProcessList).size(); i++ )
|
|||
|
|
{
|
|||
|
|
if( !STATIC_INSTANCE_(s_pVecProcessList)[i]->IsPlayerActor() )
|
|||
|
|
{
|
|||
|
|
//g_Log.Log( LogType::_INVALIDACTOR, "[%d] MapIdx:%d ClassID:%d LocalTime=%I64d\r\n", g_Config.nManagedID, pGameRoom->m_iMapIdx, STATIC_INSTANCE_(s_pVecProcessList)[i]->GetClassID(), pGameTask ? pGameTask->m_pFrameSync->GetMSTime() : 0 );
|
|||
|
|
STATIC_INSTANCE_(s_pVecProcessList)[i]->Release();
|
|||
|
|
i--;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
bool CDnActor::InitializeClass( CMultiRoom *pRoom )
|
|||
|
|
{
|
|||
|
|
if( !CDnWorld::IsActive(pRoom) ) return false;
|
|||
|
|
|
|||
|
|
DNVector(DnActorHandle) VecList;
|
|||
|
|
GetActorList( pRoom, VecList );
|
|||
|
|
|
|||
|
|
int iNumActor = (int)VecList.size();
|
|||
|
|
for( int i = 0; i < iNumActor; ++i )
|
|||
|
|
{
|
|||
|
|
DnActorHandle hActor = VecList.at( i );
|
|||
|
|
|
|||
|
|
CDnActor::ActorTypeEnum ActorType = hActor->GetActorType();
|
|||
|
|
if( ActorType > -1 && ActorType <= ActorTypeEnum::Reserved6 )
|
|||
|
|
hActor->OnInitializeNextStage();
|
|||
|
|
}
|
|||
|
|
float fCenter, fSize;
|
|||
|
|
CDnWorld::GetInstance(pRoom).CalcWorldSize( fCenter, fSize );
|
|||
|
|
|
|||
|
|
SAFE_DELETE( STATIC_INSTANCE_(s_pOctree) );
|
|||
|
|
STATIC_INSTANCE_(s_pOctree) = new CEtOctree<DnActorHandle>( false );
|
|||
|
|
STATIC_INSTANCE_(s_pOctree)->Initialize( EtVector3( 0.f, fCenter, 0.f ), fSize );
|
|||
|
|
STATIC_INSTANCE_(CDnActor::s_dwUniqueCount) = 0;
|
|||
|
|
|
|||
|
|
#ifdef PRE_FIX_GAMESERVER_OPTIMIZE
|
|||
|
|
STATIC_INSTANCE_(s_MonsterProcess).SetFramePerSec( 10.f );
|
|||
|
|
STATIC_INSTANCE_(s_fMonsterProcessDelta) = 0.f;
|
|||
|
|
STATIC_INSTANCE_(s_NpcProcess).SetFramePerSec( 1.f );
|
|||
|
|
STATIC_INSTANCE_(s_fNpcProcessDelta) = 0.f;
|
|||
|
|
#endif
|
|||
|
|
return true;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::ProcessClass( CMultiRoom *pRoom, LOCAL_TIME LocalTime, float fDelta )
|
|||
|
|
{
|
|||
|
|
#ifdef PRE_FIX_GAMESERVER_OPTIMIZE
|
|||
|
|
float fResultDelta[2] = { fDelta, fDelta };
|
|||
|
|
bool bProcessSkip[2] = { false, false };
|
|||
|
|
if( STATIC_INSTANCE_(s_MonsterProcess).Update( fDelta ) ) {
|
|||
|
|
STATIC_INSTANCE_(s_fMonsterProcessDelta) += fDelta;
|
|||
|
|
fResultDelta[0] = STATIC_INSTANCE_(s_fMonsterProcessDelta);
|
|||
|
|
bProcessSkip[0] = false;
|
|||
|
|
STATIC_INSTANCE_(s_fMonsterProcessDelta) = 0.f;
|
|||
|
|
}
|
|||
|
|
else {
|
|||
|
|
bProcessSkip[0] = true;
|
|||
|
|
STATIC_INSTANCE_(s_fMonsterProcessDelta) += fDelta;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if( STATIC_INSTANCE_(s_NpcProcess).Update( fDelta ) ) {
|
|||
|
|
STATIC_INSTANCE_(s_fNpcProcessDelta) += fDelta;
|
|||
|
|
fResultDelta[1] = STATIC_INSTANCE_(s_fNpcProcessDelta);
|
|||
|
|
bProcessSkip[1] = false;
|
|||
|
|
STATIC_INSTANCE_(s_fNpcProcessDelta) = 0.f;
|
|||
|
|
}
|
|||
|
|
else {
|
|||
|
|
bProcessSkip[1] = true;
|
|||
|
|
STATIC_INSTANCE_(s_fNpcProcessDelta) += fDelta;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
float fTempDelta;
|
|||
|
|
for( DWORD i=0; i<STATIC_INSTANCE_(s_pVecProcessList).size(); i++ ) {
|
|||
|
|
CDnActor *pActor = STATIC_INSTANCE_(s_pVecProcessList)[i];
|
|||
|
|
pActor->SyncClassTime( LocalTime );
|
|||
|
|
|
|||
|
|
fTempDelta = fDelta;
|
|||
|
|
|
|||
|
|
if( !pActor->IsPlayerActor() ) {
|
|||
|
|
if( pActor->IsMonsterActor() ) {
|
|||
|
|
|
|||
|
|
#ifndef PRE_FIX_MOMSTER_PROCESS_DELTA
|
|||
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD>Ϳ<EFBFBD> <20>÷<EFBFBD><C3B7>̾<EFBFBD><CCBE><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><DEB6><EFBFBD> <20>ΰ<EFBFBD><CEB0><EFBFBD> <20>κп<CEBA><D0BF><EFBFBD> Ŭ<><C5AC><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ũ<EFBFBD><C5A9> <20><EFBFBD><DEB6><EFBFBD><EFBFBD>Ե˴ϴ<CBB4>
|
|||
|
|
// Ư<><C6AF> Delta<74><61><EFBFBD><EFBFBD> <20>̿<EFBFBD><CCBF><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>̳<EFBFBD> Delta <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> <20>κп<CEBA><D0BF><EFBFBD> <20>̹<EFBFBD><CCB9>ϰ<EFBFBD> <20><>ũ<EFBFBD><C5A9> Ʋ<><C6B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ʹ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ũ <20><><EFBFBD><EFBFBD><EFBFBD>ʵ<EFBFBD><CAB5><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>.
|
|||
|
|
fTempDelta = fResultDelta[0];
|
|||
|
|
if( bProcessSkip[0] ) continue;
|
|||
|
|
#endif
|
|||
|
|
}
|
|||
|
|
if( pActor->IsNpcActor() ) {
|
|||
|
|
fTempDelta = fResultDelta[1];
|
|||
|
|
if( bProcessSkip[1] ) continue;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
/*
|
|||
|
|
if( bProcessSkip == true && !STATIC_INSTANCE_(s_pVecProcessList)[i]->IsPlayerActor() ) {
|
|||
|
|
continue;
|
|||
|
|
}
|
|||
|
|
if( !STATIC_INSTANCE_(s_pVecProcessList)[i]->IsPlayerActor() ) {
|
|||
|
|
fTempDelta = fResultDelta;
|
|||
|
|
}
|
|||
|
|
else fTempDelta = fDelta;
|
|||
|
|
*/
|
|||
|
|
|
|||
|
|
STATIC_INSTANCE_(s_pVecProcessList)[i]->Process( LocalTime, fTempDelta );
|
|||
|
|
|
|||
|
|
SSphere Sphere;
|
|||
|
|
STATIC_INSTANCE_(s_pVecProcessList)[i]->GetBoundingSphere( Sphere );
|
|||
|
|
if( STATIC_INSTANCE_(s_pVecProcessList)[i]->m_bOctreeUpdate )
|
|||
|
|
STATIC_INSTANCE_(s_pVecProcessList)[i]->m_pCurrentNode = STATIC_INSTANCE_(s_pOctree)->Update( STATIC_INSTANCE_(s_pVecProcessList)[i]->GetMySmartPtr(), Sphere, STATIC_INSTANCE_(s_pVecProcessList)[i]->m_pCurrentNode );
|
|||
|
|
|
|||
|
|
if( STATIC_INSTANCE_(s_pVecProcessList)[i]->IsDestroy() ) {
|
|||
|
|
STATIC_INSTANCE_(s_pVecProcessList)[i]->Release();
|
|||
|
|
i--;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
#else
|
|||
|
|
for( DWORD i=0; i<STATIC_INSTANCE_(s_pVecProcessList).size(); i++ ) {
|
|||
|
|
STATIC_INSTANCE_(s_pVecProcessList)[i]->SyncClassTime( LocalTime );
|
|||
|
|
STATIC_INSTANCE_(s_pVecProcessList)[i]->Process( LocalTime, fDelta );
|
|||
|
|
|
|||
|
|
SSphere Sphere;
|
|||
|
|
STATIC_INSTANCE_(s_pVecProcessList)[i]->GetBoundingSphere( Sphere );
|
|||
|
|
if( STATIC_INSTANCE_(s_pVecProcessList)[i]->m_bOctreeUpdate )
|
|||
|
|
STATIC_INSTANCE_(s_pVecProcessList)[i]->m_pCurrentNode = STATIC_INSTANCE_(s_pOctree)->Update( STATIC_INSTANCE_(s_pVecProcessList)[i]->GetMySmartPtr(), Sphere, STATIC_INSTANCE_(s_pVecProcessList)[i]->m_pCurrentNode );
|
|||
|
|
|
|||
|
|
if( STATIC_INSTANCE_(s_pVecProcessList)[i]->IsDestroy() ) {
|
|||
|
|
STATIC_INSTANCE_(s_pVecProcessList)[i]->Release();
|
|||
|
|
i--;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
#endif
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::ProcessAIClass( CMultiRoom *pRoom, LOCAL_TIME LocalTime, float fDelta )
|
|||
|
|
{
|
|||
|
|
for( DWORD i=0; i<STATIC_INSTANCE_(s_pVecProcessList).size(); i++ )
|
|||
|
|
{
|
|||
|
|
STATIC_INSTANCE_(s_pVecProcessList)[i]->ProcessAI( LocalTime, fDelta );
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::ReleaseClass( CMultiRoom *pRoom )
|
|||
|
|
{
|
|||
|
|
SAFE_DELETE( STATIC_INSTANCE_(s_pOctree) );
|
|||
|
|
SAFE_DELETE_MAP( STATIC_INSTANCE_(s_dwMapActorSearch) );
|
|||
|
|
DeleteAllObject( pRoom );
|
|||
|
|
|
|||
|
|
STATIC_INSTANCE_(s_pVecProcessList).clear();
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
int CDnActor::ScanActor( CMultiRoom *pRoom, EtVector3 &vPos, float fRadius, DNVector(DnActorHandle) &VecList, bool bInside )
|
|||
|
|
{
|
|||
|
|
SSphere Sphere;
|
|||
|
|
Sphere.Center = vPos;
|
|||
|
|
Sphere.fRadius = fRadius;
|
|||
|
|
STATIC_INSTANCE_(s_pOctree)->Pick( Sphere, VecList, bInside );
|
|||
|
|
return (int)VecList.size();
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
int CDnActor::ScanActorByActorSize( CMultiRoom *pRoom, EtVector3 &vPos, float fRadius, DNVector(DnActorHandle) &VecList, bool bInside, bool bActorSize )
|
|||
|
|
{
|
|||
|
|
SSphere Sphere;
|
|||
|
|
Sphere.Center = vPos;
|
|||
|
|
Sphere.fRadius = fRadius;
|
|||
|
|
STATIC_INSTANCE_(s_pOctree)->Pick( Sphere, VecList, bInside, bActorSize );
|
|||
|
|
return (int)VecList.size();
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::GetActorList(CMultiRoom *pRoom, DNVector(DnActorHandle) &VecList)
|
|||
|
|
{
|
|||
|
|
for( DWORD i=0; i<STATIC_INSTANCE_(s_pVecProcessList).size(); i++ )
|
|||
|
|
{
|
|||
|
|
DnActorHandle hActor = STATIC_INSTANCE_(s_pVecProcessList)[i]->GetMySmartPtr();
|
|||
|
|
VecList.push_back(hActor);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::GetOpponentActorList(CMultiRoom *pRoom, int nTeam, DNVector(DnActorHandle) &VecList, EtVector3* pPos/*=NULL*/, float fMaxRange/*=0.f*/ )
|
|||
|
|
{
|
|||
|
|
for( DWORD i=0; i<STATIC_INSTANCE_(s_pVecProcessList).size(); i++ )
|
|||
|
|
{
|
|||
|
|
DnActorHandle hActor = STATIC_INSTANCE_(s_pVecProcessList)[i]->GetMySmartPtr();
|
|||
|
|
if( hActor->GetTeam() != nTeam )
|
|||
|
|
{
|
|||
|
|
bool bPush = true;
|
|||
|
|
if( pPos && fMaxRange > 0.f )
|
|||
|
|
{
|
|||
|
|
if( EtVec3LengthSq( &(*pPos-*hActor->GetPosition()) ) > fMaxRange*fMaxRange )
|
|||
|
|
bPush = false;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if( bPush )
|
|||
|
|
VecList.push_back(hActor);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
DnActorHandle CDnActor::FindActorFromUniqueID( CMultiRoom *pRoom, DWORD dwUniqueID )
|
|||
|
|
{
|
|||
|
|
std::map<DWORD, DnActorHandle>::iterator it = STATIC_INSTANCE_(s_dwMapActorSearch).find( dwUniqueID );
|
|||
|
|
if( it != STATIC_INSTANCE_(s_dwMapActorSearch).end() ) return it->second;
|
|||
|
|
return CDnActor::Identity();
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
DnActorHandle CDnActor::FindActorFromName( CMultiRoom *pRoom, TCHAR *szName )
|
|||
|
|
{
|
|||
|
|
for( DWORD i=0; i<STATIC_INSTANCE_(s_pVecProcessList).size(); i++ ) {
|
|||
|
|
if( !wcscmp( STATIC_INSTANCE_(s_pVecProcessList)[i]->GetName(), szName ) ) return STATIC_INSTANCE_(s_pVecProcessList)[i]->GetMySmartPtr();
|
|||
|
|
}
|
|||
|
|
return CDnActor::Identity();
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::ProcessReservedRemoveBlows( void )
|
|||
|
|
{
|
|||
|
|
if( false == m_vlReservedRemoveBlows.empty() )
|
|||
|
|
{
|
|||
|
|
for( int i = 0; i < (int)m_vlReservedRemoveBlows.size(); ++i )
|
|||
|
|
{
|
|||
|
|
DnBlowHandle hBlow = m_vlReservedRemoveBlows.at( i );
|
|||
|
|
if( hBlow )
|
|||
|
|
this->CmdRemoveStateEffectFromID( hBlow->GetBlowID() );
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
m_vlReservedRemoveBlows.clear();
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::Process( LOCAL_TIME LocalTime, float fDelta )
|
|||
|
|
{
|
|||
|
|
UpdateStealMagicBuff();
|
|||
|
|
|
|||
|
|
int nState = GetState();
|
|||
|
|
m_bEnableNormalSuperAmmor = false;
|
|||
|
|
CDnActionBase::ProcessAction( LocalTime, fDelta );
|
|||
|
|
|
|||
|
|
if( 0 < GetCantMoveSEReferenceCount() )
|
|||
|
|
m_vAniDistance.x = m_vAniDistance.z = 0.0f;
|
|||
|
|
|
|||
|
|
if( !IsNpcActor() )
|
|||
|
|
{
|
|||
|
|
PROFILE_TIME_TEST( OnSkillProcess( LocalTime, fDelta ) );
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
ProcessDown( LocalTime, fDelta );
|
|||
|
|
ProcessDie( LocalTime, fDelta );
|
|||
|
|
ProcessStiff( LocalTime, fDelta );
|
|||
|
|
ProcessPlaySpeed( LocalTime, fDelta );
|
|||
|
|
|
|||
|
|
ProcessRotate( LocalTime, fDelta ); // Rotate;
|
|||
|
|
|
|||
|
|
PROFILE_TIME_TEST( ProcessState( LocalTime, fDelta ) );
|
|||
|
|
PROFILE_TIME_TEST( ProcessPress() );
|
|||
|
|
|
|||
|
|
if (m_pStateBlowSignalProcessor && !IsDie() )
|
|||
|
|
m_pStateBlowSignalProcessor->Process(LocalTime, fDelta);
|
|||
|
|
|
|||
|
|
//<2F><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF> 229<32><39><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ϵ<EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Լ<EFBFBD>..
|
|||
|
|
ApplySkillStateEffect();
|
|||
|
|
|
|||
|
|
for( int i=0; i<2; i++ )
|
|||
|
|
{
|
|||
|
|
if( m_hWeapon[i] )
|
|||
|
|
m_hWeapon[i]->Process( LocalTime, fDelta );
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
#ifdef PRE_ADD_GRAVITY_PROPERTY
|
|||
|
|
if( m_fGravityEnd > 0.0f )
|
|||
|
|
{
|
|||
|
|
m_fGravityEnd -= fDelta;
|
|||
|
|
if( m_fGravityEnd <= 0.0f )
|
|||
|
|
{
|
|||
|
|
SetVelocityY( 0.01f );
|
|||
|
|
SetResistanceY( -30.0f );
|
|||
|
|
SetAppliedYDistance( false );
|
|||
|
|
m_fGravityEnd = 0.0f;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
#endif // PRE_ADD_GRAVITY_PROPERTY
|
|||
|
|
|
|||
|
|
#ifdef _SHADOW_TEST
|
|||
|
|
if( g_bEnableShadow[GetRoom()->GetRoomID()] && m_bEnableShadowActor && GetGameRoom() ) {
|
|||
|
|
char pBuf[256];
|
|||
|
|
CPacketCompressStream Stream( pBuf, 256 );
|
|||
|
|
int nIndex = GetElementIndex( m_szAction.c_str() );
|
|||
|
|
float fFrame = GetCurFrame();
|
|||
|
|
EtVector3 vMoveX = *GetMoveVectorX();
|
|||
|
|
EtVector3 vMoveZ = *GetMoveVectorZ();
|
|||
|
|
Stream.Write( &nIndex, sizeof(int) );
|
|||
|
|
Stream.Write( &fFrame, sizeof(float) );
|
|||
|
|
Stream.Write( &m_Cross.m_vPosition, sizeof(EtVector3), CPacketCompressStream::VECTOR3_BIT );
|
|||
|
|
Stream.Write( &m_Cross.m_vXAxis, sizeof(EtVector3), CPacketCompressStream::VECTOR3_SHORT );
|
|||
|
|
Stream.Write( &m_Cross.m_vZAxis, sizeof(EtVector3), CPacketCompressStream::VECTOR3_SHORT );
|
|||
|
|
Stream.Write( &vMoveX, sizeof(EtVector3), CPacketCompressStream::VECTOR3_SHORT );
|
|||
|
|
Stream.Write( &vMoveZ, sizeof(EtVector3), CPacketCompressStream::VECTOR3_SHORT );
|
|||
|
|
|
|||
|
|
bool bMoveTarget = ( GetMoveTarget() ) ? true : false;
|
|||
|
|
bool bLookTarget = ( GetLookTarget() ) ? true : false;
|
|||
|
|
Stream.Write( &bMoveTarget, sizeof(bool) );
|
|||
|
|
if( bMoveTarget ) {
|
|||
|
|
DnActorHandle hMoveTarget = GetMoveTarget();
|
|||
|
|
Stream.Write( hMoveTarget->GetPosition(), sizeof(EtVector3) );
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
Stream.Write( &bLookTarget, sizeof(bool) );
|
|||
|
|
if( bLookTarget ) {
|
|||
|
|
DnActorHandle hLookTarget = GetLookTarget();
|
|||
|
|
Stream.Write( hLookTarget->GetPosition(), sizeof(EtVector3) );
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
for( DWORD i=0; i<GetGameRoom()->GetUserCount(); i++ ) {
|
|||
|
|
SendActorShadowMsg( GetGameRoom()->GetUserData(i), GetUniqueID(), eActor::SC_SHADOW, (BYTE*)Stream.GetBuffer(), Stream.Tell() );
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
#endif
|
|||
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Ҵ<DEBE> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ʱ<EFBFBD>ȭ. (ȭ<><C8AD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>)
|
|||
|
|
m_iLastDamage = 0;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::GetBoundingSphere( SSphere &Sphere, bool bActorSize/* = false*/ )
|
|||
|
|
{
|
|||
|
|
MAActorRenderBase *pRenderBase = static_cast<MAActorRenderBase *>(this);
|
|||
|
|
if( pRenderBase ) {
|
|||
|
|
if( pRenderBase->GetBoundingSphere( Sphere ) == false ) {
|
|||
|
|
Sphere.Center = m_Cross.m_vPosition;
|
|||
|
|
Sphere.fRadius = (float)GetUnitSize();
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
else {
|
|||
|
|
Sphere.Center = m_Cross.m_vPosition;
|
|||
|
|
Sphere.fRadius = (float)GetUnitSize();
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if (bActorSize == true)
|
|||
|
|
{
|
|||
|
|
Sphere.Center = FindAutoTargetPos();
|
|||
|
|
Sphere.fRadius = (float)GetUnitSize();
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::GetBoundingBox( SAABox &Box )
|
|||
|
|
{
|
|||
|
|
MAActorRenderBase *pRenderBase = static_cast<MAActorRenderBase *>(this);
|
|||
|
|
if( pRenderBase ) {
|
|||
|
|
pRenderBase->GetBoundingBox( Box );
|
|||
|
|
}
|
|||
|
|
else {
|
|||
|
|
Box.Min = m_Cross.m_vPosition + EtVector3( -50.f, -50.f, -50.f );
|
|||
|
|
Box.Max = m_Cross.m_vPosition + EtVector3( 50.f, 50.f, 50.f );
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
void CDnActor::AddStateEffectQueue( const CDnSkill::SkillInfo& ParentSkillInfo, const CDnSkill::StateEffectStruct& StateEffectInfo )
|
|||
|
|
{
|
|||
|
|
m_dqApplySelfStateBlowQ.push_back( S_NO_PACKET_SELF_STATEBLOW(ParentSkillInfo, StateEffectInfo) );
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::ClearSelfStateSignalBlowQueue( bool bItemSkill/* = false*/ )
|
|||
|
|
{
|
|||
|
|
deque<S_NO_PACKET_SELF_STATEBLOW>::iterator iter = m_dqApplySelfStateBlowQ.begin();
|
|||
|
|
for( iter; iter != m_dqApplySelfStateBlowQ.end(); )
|
|||
|
|
{
|
|||
|
|
if( bItemSkill == iter->ParentSkillInfo.bIsItemSkill )
|
|||
|
|
{
|
|||
|
|
iter = m_dqApplySelfStateBlowQ.erase( iter );
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
iter++;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
void CDnActor::OnSignal( SignalTypeEnum Type, void *pPtr, LOCAL_TIME LocalTime, LOCAL_TIME SignalStartTime, LOCAL_TIME SignalEndTime, int nSignalIndex )
|
|||
|
|
{
|
|||
|
|
switch( Type ) {
|
|||
|
|
case STE_Hit:
|
|||
|
|
{
|
|||
|
|
if( IsDie() ) break;
|
|||
|
|
|
|||
|
|
if (ProcessIgnoreHitSignal() == true)
|
|||
|
|
break;
|
|||
|
|
|
|||
|
|
HitStruct *pStruct = (HitStruct *)pPtr;
|
|||
|
|
|
|||
|
|
DNVector(DnActorHandle) hVecList;
|
|||
|
|
DNVector(DnActorHandle) hVecActorToApplyStateEffect;
|
|||
|
|
|
|||
|
|
int nWeaponLength = 0;
|
|||
|
|
bool bOnDamageCalled = false;
|
|||
|
|
if( pStruct->bIncludeWeaponLength && GetWeapon() ) nWeaponLength = GetWeapon()->GetWeaponLength();
|
|||
|
|
|
|||
|
|
MatrixEx CrossTemp = m_Cross;
|
|||
|
|
|
|||
|
|
if( IsPlayerActor() && ((CDnPlayerActor*)this)->IsInvalidPlayerChecker() ) break;
|
|||
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><>Ʈ <20>ñ׳<C3B1><D7B3><EFBFBD> <20>߽<EFBFBD><DFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><>ġ<EFBFBD><C4A1> <20>´<EFBFBD> <20><><EFBFBD><EFBFBD> <20>ƴϱ<C6B4> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD>¿<EFBFBD><C2BF><EFBFBD> <20><>Ȯ<EFBFBD>ϰ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>Ѵ<EFBFBD>.(#18971)
|
|||
|
|
EtVector3 vOffset = *pStruct->vOffset * GetScale()->y;
|
|||
|
|
CrossTemp.MoveLocalZAxis( vOffset.z );
|
|||
|
|
CrossTemp.MoveLocalXAxis( vOffset.x );
|
|||
|
|
CrossTemp.MoveLocalYAxis( vOffset.y );
|
|||
|
|
|
|||
|
|
// Ư<><C6AF> <20><><EFBFBD><EFBFBD> <20><>ũ<EFBFBD><C5A9> <20><><EFBFBD>¶<EFBFBD><C2B6><EFBFBD>..
|
|||
|
|
if( pStruct->szLinkBoneName && strlen(pStruct->szLinkBoneName) > 0 )
|
|||
|
|
{
|
|||
|
|
int nBoneIndex = GetBoneIndex( pStruct->szLinkBoneName );
|
|||
|
|
if( -1 != nBoneIndex )
|
|||
|
|
{
|
|||
|
|
EtMatrix matBoneWorld = GetBoneMatrix( pStruct->szLinkBoneName );
|
|||
|
|
EtMatrixMultiply( (EtMatrix*)&CrossTemp, (EtMatrix*)&CrossTemp, &matBoneWorld );
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD>ʹ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ͽ<EFBFBD><CFBF><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ѵ<EFBFBD>.
|
|||
|
|
float fDistanceMax = pStruct->fDistanceMax * GetScale()->y;
|
|||
|
|
float fDistanceMin = pStruct->fDistanceMin * GetScale()->y;
|
|||
|
|
float fHeightMax = pStruct->fHeightMax * GetScale()->y;
|
|||
|
|
|
|||
|
|
EtVector3 vPos = CrossTemp.m_vPosition;
|
|||
|
|
|
|||
|
|
float fDistance = max( fDistanceMax, fHeightMax - pStruct->fHeightMin ) + nWeaponLength;
|
|||
|
|
float fXZDistanceSQ = fDistanceMax + nWeaponLength;
|
|||
|
|
float fXZDistanceMinSQ = fDistanceMin; // Min <20><> Weapon <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ȹ<C8B9><DEBD>ϴ<EFBFBD>.
|
|||
|
|
|
|||
|
|
fXZDistanceSQ *= fXZDistanceSQ;
|
|||
|
|
fXZDistanceMinSQ *= fXZDistanceMinSQ;
|
|||
|
|
|
|||
|
|
ScanActor( GetRoom(), vPos, fDistance, hVecList );
|
|||
|
|
|
|||
|
|
//#53454 <20><><EFBFBD>ΰ<EFBFBD><CEB0><EFBFBD> <20><>ȯ<EFBFBD><C8AF><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>, <20><><EFBFBD>ΰ<EFBFBD><CEB0><EFBFBD> <20><><EFBFBD><EFBFBD>?<3F><> HitList<73><74><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><>Ų<EFBFBD><C5B2>.
|
|||
|
|
#if defined(PRE_FIX_61382)
|
|||
|
|
ExceptionHitList2(hVecList, m_Cross, GetMySmartPtr(), pStruct, hVecActorToApplyStateEffect, 0, fDistance, m_vPrevPosition);
|
|||
|
|
#else
|
|||
|
|
ExceptionHitList(hVecList, m_Cross, GetMySmartPtr(), pStruct);
|
|||
|
|
#endif // PRE_FIX_61382
|
|||
|
|
|
|||
|
|
EtVector3 vDir;
|
|||
|
|
EtVector3 vZVec = m_Cross.m_vZAxis;
|
|||
|
|
|
|||
|
|
if( pStruct->fCenterAngle != 0.f ) {
|
|||
|
|
EtMatrix matRotate;
|
|||
|
|
EtMatrixRotationY( &matRotate, EtToRadian( pStruct->fCenterAngle ) );
|
|||
|
|
EtVec3TransformNormal( &vZVec, &vZVec, &matRotate );
|
|||
|
|
|
|||
|
|
#if defined(PRE_FIX_63356)
|
|||
|
|
//#63356 <20><>Ŭ<EFBFBD><C5AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><>Ʈ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 180<38><30> ȸ<><C8B8><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD>..
|
|||
|
|
//vPos<6F><73> <20><><EFBFBD><EFBFBD> ij<><C4B3><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><E2BFA1> <20>ɼ<EFBFBD> <20><><EFBFBD><EFBFBD>ŭ <20>̵<EFBFBD><CCB5><EFBFBD> <20>ǰ<EFBFBD>, <20><>Ʈ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 180<38><30> ȸ<><C8B8><EFBFBD><EFBFBD> <20>Ǵ<EFBFBD> <20><><EFBFBD><EFBFBD> <20>̹Ƿ<CCB9>
|
|||
|
|
//<2F><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>꿡<EFBFBD><EABFA1> <20><> ȸ<><C8B8> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>Ѿ<EFBFBD> <20>Ѵ<EFBFBD>.
|
|||
|
|
CrossTemp.m_vZAxis = vZVec;
|
|||
|
|
#endif // PRE_FIX_63356
|
|||
|
|
}
|
|||
|
|
SAABox Box;
|
|||
|
|
float fDot = 0.0f;
|
|||
|
|
SHitParam HitParam;
|
|||
|
|
|
|||
|
|
bool bHit = false;
|
|||
|
|
bool bFirstHit = true;
|
|||
|
|
if( m_LastHitSignalTime > LocalTime ) bFirstHit = false;
|
|||
|
|
if( m_nLastHitSignalIndex != nSignalIndex ) {
|
|||
|
|
bFirstHit = true;
|
|||
|
|
m_nLastHitSignalIndex = nSignalIndex;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
HitParam.szActionName = pStruct->szTargetHitAction;
|
|||
|
|
HitParam.fDamage = pStruct->fDamageProb * 0.01f;
|
|||
|
|
HitParam.fDurability = pStruct->fDurabilityDamageProb * 0.01f;
|
|||
|
|
HitParam.vVelocity = *pStruct->vVelocity;
|
|||
|
|
HitParam.vResistance = *pStruct->vResistance;
|
|||
|
|
HitParam.hHitter = GetMySmartPtr();
|
|||
|
|
HitParam.hWeapon = GetActiveWeapon(0);
|
|||
|
|
HitParam.vPosition = vPos;
|
|||
|
|
HitParam.fStiffProb = pStruct->fStiffProb * 0.01f;
|
|||
|
|
HitParam.RemainTime = SignalEndTime;
|
|||
|
|
HitParam.nDamageType = pStruct->nDamageType;
|
|||
|
|
HitParam.nSkillSuperAmmorIndex = pStruct->nApplySuperAmmorIndex - 1;
|
|||
|
|
HitParam.nSkillSuperAmmorDamage = pStruct->nApplySuperAmmorDamage;
|
|||
|
|
HitParam.cAttackType = (char)pStruct->nAttackType;
|
|||
|
|
HitParam.DistanceType = (pStruct->nDistanceType == 0) ? CDnDamageBase::DistanceTypeEnum::Melee : CDnDamageBase::DistanceTypeEnum::Range;
|
|||
|
|
HitParam.HasElement = CalcHitElementType( ( pStruct->bUseSkillApplyWeaponElement == TRUE ) ? true : false );
|
|||
|
|
HitParam.bIgnoreCanHit = ( pStruct->bIgnoreCanHit == TRUE );
|
|||
|
|
HitParam.bIgnoreParring = ( pStruct->bIgnoreParring == TRUE );
|
|||
|
|
HitParam.bReleaseCatchActor = ( pStruct->bReleaseCatchedActor == TRUE );
|
|||
|
|
HitParam.nWeightValueLimit = pStruct->nWeightValueLimit;
|
|||
|
|
|
|||
|
|
|
|||
|
|
bool isFirstHitter = true;
|
|||
|
|
|
|||
|
|
HitParam.nHitLimitCount = pStruct->nHitLimitCount;
|
|||
|
|
|
|||
|
|
bool isHitLimited = false;
|
|||
|
|
HitLimitCountInfo* pHitLimitCountInfo = NULL;
|
|||
|
|
|
|||
|
|
if (HitParam.nHitLimitCount != 0)
|
|||
|
|
{
|
|||
|
|
//HitLimitCount<6E><74><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ϵǾ<CFB5> <20>ִ°<D6B4> <20>ִ<EFBFBD><D6B4><EFBFBD> Ȯ<><C8AE>..
|
|||
|
|
HIT_LIMIT_COUNT_INFO_LIST::iterator findIter = m_HitLimitCountInfoList.find(nSignalIndex);
|
|||
|
|
if (findIter != m_HitLimitCountInfoList.end())
|
|||
|
|
pHitLimitCountInfo = &findIter->second;
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
//<2F><><EFBFBD>ο<EFBFBD> <20><><EFBFBD><EFBFBD> <20>߰<EFBFBD> <20>ϰ<EFBFBD>, <20>ش<EFBFBD> <20><><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>´<EFBFBD>..
|
|||
|
|
HitLimitCountInfo newHitLimitCountInfo(HitParam.nHitLimitCount, HitParam.nHitLimitCount);
|
|||
|
|
m_HitLimitCountInfoList.insert(HIT_LIMIT_COUNT_INFO_LIST::value_type(nSignalIndex, newHitLimitCountInfo));
|
|||
|
|
|
|||
|
|
HIT_LIMIT_COUNT_INFO_LIST::iterator findIter = m_HitLimitCountInfoList.find(nSignalIndex);
|
|||
|
|
if (findIter != m_HitLimitCountInfoList.end())
|
|||
|
|
pHitLimitCountInfo = &findIter->second;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// Note: <20><><EFBFBD>⼭ Clear <20>ϸ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ȴ<EFBFBD> <20>ֵ<EFBFBD><D6B5><EFBFBD> <20><>Ʈ<EFBFBD>ñ׳<C3B1> <20><><EFBFBD><EFBFBD> <20>ð<EFBFBD><C3B0><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>·<EFBFBD> <20>Ѿ<D1BE><EEB0A1><EFBFBD><EFBFBD> <20><> <20>ֽ<EFBFBD><D6BD>ϴ<EFBFBD>.
|
|||
|
|
// <20><><EFBFBD>۾Ƹ<DBBE> <20>ִ<EFBFBD> <20>ְ<EFBFBD> <20>¾<EFBFBD><C2BE><EFBFBD> <20><> FPS<50><53> 1.8<EFBFBD><EFBFBD> <20>Ǿ<EFBFBD> EndTime <20><> <20>ڷ<EFBFBD> <20>и<EFBFBD> ä<><C3A4> ProcessPlaySpeed <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD>
|
|||
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ֵ<EFBFBD><D6B5><EFBFBD> <20><><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ű<EFBFBD><C5B0> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ȵ˴ϴ<CBB4>.
|
|||
|
|
m_hVecLastHitList.clear();
|
|||
|
|
// Actor üũ
|
|||
|
|
for( DWORD i=0; i<hVecList.size(); i++ )
|
|||
|
|
{
|
|||
|
|
if( !hVecList[i] )
|
|||
|
|
continue;
|
|||
|
|
|
|||
|
|
// Hit<69><74> <20><><EFBFBD><EFBFBD>
|
|||
|
|
//<2F>ִ<EFBFBD> Hit<69><74><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ǿ<EFBFBD> <20>ְ<EFBFBD>, Hit<69><74><EFBFBD><EFBFBD> <20>ִ<EFBFBD> Hit<69><74><EFBFBD><EFBFBD> <20>Ѿ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
|||
|
|
isHitLimited = (pHitLimitCountInfo && (pHitLimitCountInfo->nHitLimitCount != 0 && pHitLimitCountInfo->nHitCount <= 0));
|
|||
|
|
|
|||
|
|
if (isHitLimited)
|
|||
|
|
break;
|
|||
|
|
|
|||
|
|
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ش<EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD> ID <20><> <20><><EFBFBD><EFBFBD>ũ <20><><EFBFBD>̵<EFBFBD><CCB5><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ѵ<EFBFBD>.
|
|||
|
|
// <20><>ũ <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ó<EFBFBD><C3B3> <20><><EFBFBD><EFBFBD> <20><EFBFBD><D7BC><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD> <20>ν<EFBFBD><CEBD>Ͻ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ÿ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><>Ʈ <20>ñ׳<C3B1><D7B3><EFBFBD> <20>ߵ<EFBFBD><DFB5><EFBFBD>Ű<EFBFBD><C5B0> <20><><EFBFBD>ؼ<EFBFBD>.
|
|||
|
|
if( m_hChargerBlowCalledOnSignal )
|
|||
|
|
{
|
|||
|
|
if( !hVecList[i]->IsHittable( GetMySmartPtr(), LocalTime, pStruct, m_hChargerBlowCalledOnSignal->GetBlowID() ) )
|
|||
|
|
continue;
|
|||
|
|
|
|||
|
|
// <20><><EFBFBD>⼭ hitparam <20><> <20><><EFBFBD><EFBFBD>ũ id <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>Ŀ<EFBFBD> ondamage <20><><EFBFBD><EFBFBD> <20><> id <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ǿ<EFBFBD> <20><><EFBFBD><EFBFBD> ishittable ȣ<><C8A3><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϰ<EFBFBD> <20>ȴ<EFBFBD>.
|
|||
|
|
HitParam.iUniqueID = m_hChargerBlowCalledOnSignal->GetBlowID();
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
if( !hVecList[i]->IsHittable( GetMySmartPtr(), LocalTime, pStruct ) )
|
|||
|
|
continue;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
switch( hVecList[i]->GetHitCheckType() ) {
|
|||
|
|
case HitCheckTypeEnum::BoundingBox:
|
|||
|
|
{
|
|||
|
|
HitParam.vPosition = vPos;
|
|||
|
|
vDir = *hVecList[i]->GetPosition() - vPos;
|
|||
|
|
vDir.y = 0.f;
|
|||
|
|
|
|||
|
|
hVecList[i]->GetBoundingBox( Box );
|
|||
|
|
|
|||
|
|
if( SquaredDistance( vPos, Box ) > fXZDistanceSQ ) continue;
|
|||
|
|
if( SquaredDistance( vPos, Box, false ) < fXZDistanceMinSQ ) continue;
|
|||
|
|
|
|||
|
|
EtVec3Normalize( &vDir, &vDir );
|
|||
|
|
fDot = EtVec3Dot( &vZVec, &vDir );
|
|||
|
|
if( EtToDegree( acos( fDot ) ) > pStruct->fAngle ) continue;
|
|||
|
|
|
|||
|
|
if( Box.Min.y < vPos.y + pStruct->fHeightMin &&
|
|||
|
|
Box.Max.y < vPos.y + pStruct->fHeightMin ) continue;
|
|||
|
|
if( Box.Min.y > vPos.y + fHeightMax &&
|
|||
|
|
Box.Max.y > vPos.y + fHeightMax ) continue;
|
|||
|
|
|
|||
|
|
HitParam.vViewVec = -vDir;
|
|||
|
|
}
|
|||
|
|
break;
|
|||
|
|
case HitCheckTypeEnum::Collision:
|
|||
|
|
{
|
|||
|
|
SCollisionCapsule Capsule;
|
|||
|
|
SCollisionResponse CollisionResult;
|
|||
|
|
DNVector(SCollisionResponse) vCollisionResult;
|
|||
|
|
|
|||
|
|
Capsule.Segment.vOrigin = vPos;
|
|||
|
|
float fHeight = fHeightMax - pStruct->fHeightMin;
|
|||
|
|
Capsule.Segment.vOrigin.y = Capsule.Segment.vOrigin.y - ( pStruct->fHeightMin + ( fHeight / 2.f ) );
|
|||
|
|
Capsule.Segment.vDirection = EtVector3( 0.f, fHeight / 2.f, 0.f );
|
|||
|
|
Capsule.fRadius = ( fDistanceMax + nWeaponLength );
|
|||
|
|
|
|||
|
|
EtVector3 vDestPos;
|
|||
|
|
if( hVecList[i]->GetObjectHandle()->CEtCollisionEntity::FindCapsuleCollision( Capsule, CollisionResult, &vCollisionResult ) == false ) continue;
|
|||
|
|
if( CollisionResult.pCollisionPrimitive )
|
|||
|
|
{
|
|||
|
|
for( UINT k=0 ; k<vCollisionResult.size() ; ++k )
|
|||
|
|
{
|
|||
|
|
if( vCollisionResult[k].pCollisionPrimitive ) {
|
|||
|
|
vCollisionResult[k].pCollisionPrimitive->GetBoundingBox( Box );
|
|||
|
|
if( Box.Min.y < vPos.y + pStruct->fHeightMin && Box.Max.y < vPos.y + pStruct->fHeightMin ) {
|
|||
|
|
vCollisionResult.erase( vCollisionResult.begin() + k );
|
|||
|
|
k--;
|
|||
|
|
continue;
|
|||
|
|
}
|
|||
|
|
if( Box.Min.y > vPos.y + fHeightMax && Box.Max.y > vPos.y + fHeightMax ) {
|
|||
|
|
vCollisionResult.erase( vCollisionResult.begin() + k );
|
|||
|
|
k--;
|
|||
|
|
continue;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
DNVector(EtVector3) vPointList;
|
|||
|
|
vPointList.push_back( Box.GetCenter() );
|
|||
|
|
#ifdef PRE_FIX_COLMESH_RECTANGLE_HITSIGNAL
|
|||
|
|
if( vCollisionResult[k].pCollisionPrimitive->Type == CT_BOX ||
|
|||
|
|
vCollisionResult[k].pCollisionPrimitive->Type == CT_CAPSULE ) {
|
|||
|
|
#else
|
|||
|
|
if( vCollisionResult[k].pCollisionPrimitive->Type == CT_BOX ) {
|
|||
|
|
#endif // #ifdef PRE_FIX_COLMESH_RECTANGLE_HITSIGNAL
|
|||
|
|
Box.GetVertices( vPointList );
|
|||
|
|
}
|
|||
|
|
bool bCheck = false;
|
|||
|
|
for( DWORD m=0; m<vPointList.size(); m++ ) {
|
|||
|
|
#if defined(PRE_FIX_63356)
|
|||
|
|
//#63356 <20><>Ŭ<EFBFBD><C5AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><>Ʈ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 180<38><30> ȸ<><C8B8><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD>..
|
|||
|
|
//vPos<6F><73> <20><><EFBFBD><EFBFBD> ij<><C4B3><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><E2BFA1> <20>ɼ<EFBFBD> <20><><EFBFBD><EFBFBD>ŭ <20>̵<EFBFBD><CCB5><EFBFBD> <20>ǰ<EFBFBD>, <20><>Ʈ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 180<38><30> ȸ<><C8B8><EFBFBD><EFBFBD> <20>Ǵ<EFBFBD> <20><><EFBFBD><EFBFBD> <20>̹Ƿ<CCB9>
|
|||
|
|
//<2F><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>꿡<EFBFBD><EABFA1> <20><> ȸ<><C8B8> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>Ѿ<EFBFBD> <20>Ѵ<EFBFBD>.
|
|||
|
|
if( hVecList[i]->CheckCollisionHitCondition(vPos, CrossTemp, vPointList[m], pStruct->fAngle) == true ) {
|
|||
|
|
#else
|
|||
|
|
if( hVecList[i]->CheckCollisionHitCondition(vPos, m_Cross, vPointList[m], pStruct->fAngle) == true ) {
|
|||
|
|
#endif // PRE_FIX_63356
|
|||
|
|
bCheck = true;
|
|||
|
|
break;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
if( bCheck == false ) {
|
|||
|
|
vCollisionResult.erase( vCollisionResult.begin() + k );
|
|||
|
|
k--;
|
|||
|
|
continue;
|
|||
|
|
}
|
|||
|
|
HitParam.vBoneIndex.push_back( hVecList[i]->GetObjectHandle()->GetParentBoneIndex( vCollisionResult[k].pCollisionPrimitive ) );
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
if( vCollisionResult.empty() ) continue;
|
|||
|
|
|
|||
|
|
GetCenterPos( *CollisionResult.pCollisionPrimitive, vDestPos );
|
|||
|
|
HitParam.vPosition = vDestPos;
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
ASSERT( 0 );
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if( pStruct->fDistanceMin > 100.f )
|
|||
|
|
{
|
|||
|
|
vCollisionResult.clear();
|
|||
|
|
Capsule.fRadius = pStruct->fDistanceMin;
|
|||
|
|
if( hVecList[i]->GetObjectHandle()->CEtCollisionEntity::FindCapsuleCollision( Capsule, CollisionResult, &vCollisionResult ) == true ) {
|
|||
|
|
if( CollisionResult.pCollisionPrimitive )
|
|||
|
|
{
|
|||
|
|
for( UINT k=0 ; k<vCollisionResult.size() ; ++k )
|
|||
|
|
{
|
|||
|
|
if( vCollisionResult[k].pCollisionPrimitive ) {
|
|||
|
|
vCollisionResult[k].pCollisionPrimitive->GetBoundingBox( Box );
|
|||
|
|
if( Box.Min.y < vPos.y + pStruct->fHeightMin && Box.Max.y < vPos.y + pStruct->fHeightMin ) {
|
|||
|
|
vCollisionResult.erase( vCollisionResult.begin() + k );
|
|||
|
|
k--;
|
|||
|
|
continue;
|
|||
|
|
}
|
|||
|
|
if( Box.Min.y > vPos.y + fHeightMax && Box.Max.y > vPos.y + fHeightMax ) {
|
|||
|
|
vCollisionResult.erase( vCollisionResult.begin() + k );
|
|||
|
|
k--;
|
|||
|
|
continue;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
DNVector(EtVector3) vPointList;
|
|||
|
|
vPointList.push_back( Box.GetCenter() );
|
|||
|
|
#ifdef PRE_FIX_COLMESH_RECTANGLE_HITSIGNAL
|
|||
|
|
if( vCollisionResult[k].pCollisionPrimitive->Type == CT_BOX ||
|
|||
|
|
vCollisionResult[k].pCollisionPrimitive->Type == CT_CAPSULE ) {
|
|||
|
|
|
|||
|
|
#else
|
|||
|
|
if( vCollisionResult[k].pCollisionPrimitive->Type == CT_BOX ) {
|
|||
|
|
#endif // #ifdef PRE_FIX_COLMESH_RECTANGLE_HITSIGNAL
|
|||
|
|
Box.GetVertices( vPointList );
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
bool bCheck = false;
|
|||
|
|
for( DWORD m=0; m<vPointList.size(); m++ ) {
|
|||
|
|
#ifdef PRE_FIX_COLMESH_RECTANGLE_HITSIGNAL
|
|||
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>̶<EFBFBD><CCB6><EFBFBD> <20><> <20>ɸ<EFBFBD><C9B8><EFBFBD> hit <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ִ<EFBFBD> <20><><EFBFBD>̹Ƿ<CCB9> <20><><EFBFBD><EFBFBD> <20>ʴ´<CAB4>...
|
|||
|
|
#if defined(PRE_FIX_63356)
|
|||
|
|
if( hVecList[i]->CheckCollisionHitCondition(vPos, CrossTemp, vPointList[m], pStruct->fAngle) == false ) {
|
|||
|
|
#else
|
|||
|
|
if( hVecList[i]->CheckCollisionHitCondition(vPos, m_Cross, vPointList[m], pStruct->fAngle) == false ) {
|
|||
|
|
#endif // PRE_FIX_63356
|
|||
|
|
#else
|
|||
|
|
#if defined(PRE_FIX_63356)
|
|||
|
|
if( hVecList[i]->CheckCollisionHitCondition(vPos, CrossTemp, vPointList[m], pStruct->fAngle) == true ) {
|
|||
|
|
#else
|
|||
|
|
if( hVecList[i]->CheckCollisionHitCondition(vPos, m_Cross, vPointList[m], pStruct->fAngle) == true ) {
|
|||
|
|
#endif // PRE_FIX_63356
|
|||
|
|
#endif // #ifdef PRE_FIX_COLMESH_RECTANGLE_HITSIGNAL
|
|||
|
|
bCheck = true;
|
|||
|
|
break;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
#ifdef PRE_FIX_COLMESH_RECTANGLE_HITSIGNAL
|
|||
|
|
if( bCheck == true ) {
|
|||
|
|
#else
|
|||
|
|
if( bCheck == false ) {
|
|||
|
|
#endif // #ifdef PRE_FIX_COLMESH_RECTANGLE_HITSIGNAL
|
|||
|
|
vCollisionResult.erase( vCollisionResult.begin() + k );
|
|||
|
|
k--;
|
|||
|
|
continue;
|
|||
|
|
}
|
|||
|
|
int nBoneIndex = hVecList[i]->GetObjectHandle()->GetParentBoneIndex( vCollisionResult[k].pCollisionPrimitive );
|
|||
|
|
std::vector<int>::iterator it = std::find( HitParam.vBoneIndex.begin(), HitParam.vBoneIndex.end(), nBoneIndex );
|
|||
|
|
if( it != HitParam.vBoneIndex.end() ) {
|
|||
|
|
HitParam.vBoneIndex.erase( it );
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
if( HitParam.vBoneIndex.empty() ) continue;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
HitParam.vViewVec = vPos - vDestPos;
|
|||
|
|
EtVec3Normalize( &HitParam.vViewVec, &HitParam.vViewVec );
|
|||
|
|
}
|
|||
|
|
break;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
HitParam.bFirstHit = bFirstHit;
|
|||
|
|
bFirstHit = false;
|
|||
|
|
bHit = true;
|
|||
|
|
|
|||
|
|
if( !HitParam.szActionName.empty() ) {
|
|||
|
|
m_hVecLastHitList.push_back( hVecList[i] );
|
|||
|
|
|
|||
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>쿡 <20>ߺ<EFBFBD><DFBA><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>Ͱ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20>ִ<EFBFBD>.
|
|||
|
|
if( m_hVecLastHitListByRemainTime.end() == find( m_hVecLastHitListByRemainTime.begin(), m_hVecLastHitListByRemainTime.end(), hVecList[i] ) )
|
|||
|
|
{
|
|||
|
|
m_hVecLastHitListByRemainTime.push_back( hVecList[i] );
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
#if defined(PRE_ADD_PREFIX_SYSTE_RENEW)
|
|||
|
|
// HitSignal<61><6C><EFBFBD><EFBFBD> <20><>ų <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>λ<EFBFBD> <20><>ų <20>ߵ<EFBFBD>
|
|||
|
|
// <20><><EFBFBD>ξ<EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ȵ<EFBFBD>
|
|||
|
|
// #40186 <20><><EFBFBD>̻<EFBFBD>? <20>ߵ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 0<><30> <20><><EFBFBD><EFBFBD> <20>ߵ<EFBFBD> <20><><EFBFBD><EFBFBD> <20>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>.)
|
|||
|
|
if (HitParam.bFirstHit &&
|
|||
|
|
pStruct->fDamageProb != 0.0f &&
|
|||
|
|
!IsAppliedThisStateBlow(STATE_BLOW::BLOW_183) &&
|
|||
|
|
isFirstHitter)
|
|||
|
|
{
|
|||
|
|
ProcessPrefixOffenceSkill_New();
|
|||
|
|
isFirstHitter = false;
|
|||
|
|
}
|
|||
|
|
#else
|
|||
|
|
//////////////////////////////////////////////////////////////////////////
|
|||
|
|
// <20><><EFBFBD>ξ<EFBFBD> <20><><EFBFBD>ݿ<EFBFBD> <20><>ų <20>ߵ<EFBFBD> <20>غ<EFBFBD> <20>۾<EFBFBD>..
|
|||
|
|
// <20><>Ÿ<EFBFBD>϶<EFBFBD><CFB6><EFBFBD> <20><><EFBFBD>ξ<EFBFBD> <20>ý<EFBFBD><C3BD><EFBFBD> <20><><EFBFBD>ݽ<EFBFBD>ų <20>ߵ<EFBFBD>
|
|||
|
|
// <20><>Ÿ<EFBFBD>̰<EFBFBD>, Hit<69><74><EFBFBD><EFBFBD><EFBFBD>ӿ<EFBFBD> ó<><C3B3> <20><><EFBFBD><EFBFBD> <20><EFBFBD>, ù<><C3B9>° <20>´<EFBFBD> <20>༮<EFBFBD>϶<EFBFBD>
|
|||
|
|
|
|||
|
|
bool isCanUsePrefixSkill = CanUsePrefixSkill();
|
|||
|
|
|
|||
|
|
if (isCanUsePrefixSkill && HitParam.bFirstHit && isFirstHitter)
|
|||
|
|
{
|
|||
|
|
OutputDebug("CDnActor::OnSignal -> STE_Hit start %d current %d end %d\n", (int)SignalStartTime, (int)LocalTime, (int)SignalEndTime);
|
|||
|
|
|
|||
|
|
//<2F><><EFBFBD>⼭<EFBFBD><E2BCAD> <20>ڽſ<DABD><C5BF><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ϴ<EFBFBD> <20><><EFBFBD><EFBFBD> ȿ<><C8BF><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ű<EFBFBD><C5B0>,
|
|||
|
|
//<2F>´<EFBFBD> <20>༮<EFBFBD><E0BCAE><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ؾ<EFBFBD><D8BE><EFBFBD> <20><><EFBFBD><EFBFBD> ȿ<><C8BF><EFBFBD><EFBFBD> Target->OnDamage<67><65><EFBFBD><EFBFBD> ó<><C3B3> <20>ǵ<EFBFBD><C7B5><EFBFBD><EFBFBD>Ѵ<EFBFBD>.??
|
|||
|
|
ProcessPrefixOffenceSkill( 1.0f );
|
|||
|
|
|
|||
|
|
isFirstHitter = false;
|
|||
|
|
}
|
|||
|
|
#endif // PRE_ADD_PREFIX_SYSTE_RENEW
|
|||
|
|
|
|||
|
|
#ifdef PRE_ADD_MONSTER_CATCH
|
|||
|
|
if( HitParam.bReleaseCatchActor )
|
|||
|
|
{
|
|||
|
|
if( IsMonsterActor() )
|
|||
|
|
{
|
|||
|
|
static_cast<CDnMonsterActor*>(this)->ReleaseThisActor( hVecList[ i ] );
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
#endif // #ifdef PRE_ADD_MONSTER_CATCH
|
|||
|
|
|
|||
|
|
hVecList[i]->OnDamage( GetMySmartPtr(), HitParam, pStruct );
|
|||
|
|
|
|||
|
|
if( 0 != pStruct->StateEffectFilter )
|
|||
|
|
{
|
|||
|
|
OnHitSignalStateEffectFilterException( hVecList[ i ]->GetUniqueID(), pStruct->StateEffectFilter );
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
bOnDamageCalled = true;
|
|||
|
|
|
|||
|
|
//Hit<69><74> <20><><EFBFBD><EFBFBD>
|
|||
|
|
if (pHitLimitCountInfo)
|
|||
|
|
pHitLimitCountInfo->nHitCount--;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
hVecActorToApplyStateEffect.push_back( hVecList[i] );
|
|||
|
|
|
|||
|
|
#ifdef PRE_ADD_TRIGGER_BY_HIT_CONDITION
|
|||
|
|
if( pStruct->szTriggerEventParameter != NULL && IsPlayerActor() == false && hVecList[i]->IsMonsterActor() )
|
|||
|
|
{
|
|||
|
|
CDnMonsterActor* pTrigerTargetMonsterActor = static_cast<CDnMonsterActor*>( hVecList[i].GetPointer());
|
|||
|
|
if( pTrigerTargetMonsterActor )
|
|||
|
|
{
|
|||
|
|
std::string strParam = pStruct->szTriggerEventParameter;
|
|||
|
|
std::vector<std::string> tokens;
|
|||
|
|
TokenizeA(strParam, tokens, ";");
|
|||
|
|
if (tokens.size() == 2)
|
|||
|
|
{
|
|||
|
|
if( pTrigerTargetMonsterActor->GetMonsterClassID() == atoi(tokens[0].c_str()) )
|
|||
|
|
{
|
|||
|
|
CDnWorld::GetInstance(GetRoom()).InsertTriggerEventStore( "EventArea", pTrigerTargetMonsterActor->GetBirthAreaHandle() );
|
|||
|
|
CDnWorld::GetInstance(GetRoom()).InsertTriggerEventStore( "ActorHandle", pTrigerTargetMonsterActor->GetUniqueID() );
|
|||
|
|
CDnWorld::GetInstance(GetRoom()).InsertTriggerEventStore( "EventID", atoi(tokens[1].c_str()) );
|
|||
|
|
CDnWorld::GetInstance(GetRoom()).OnTriggerEventCallback( "CDnActor::TriggerEvent", CDnActionBase::m_LocalTime, 0.f );
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
#endif
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
bool bIsFarm = false;
|
|||
|
|
CDnGameTask *pGameTask = (CDnGameTask *)CTaskManager::GetInstance(GetRoom()).GetTask( "GameTask" );
|
|||
|
|
if( pGameTask && pGameTask->GetGameTaskType() == GameTaskType::Farm )
|
|||
|
|
bIsFarm = true;
|
|||
|
|
|
|||
|
|
if( false == bIsFarm && IsProcessSkill() )
|
|||
|
|
{
|
|||
|
|
int iNumActorApplyStateEffect = (int)hVecActorToApplyStateEffect.size();
|
|||
|
|
m_hProcessSkill->CheckTargetCount( iNumActorApplyStateEffect );
|
|||
|
|
for( int i = 0; i < iNumActorApplyStateEffect; ++i )
|
|||
|
|
{
|
|||
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>϶<EFBFBD><CFB6><EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
|||
|
|
if (hVecActorToApplyStateEffect[ i ]->IsAppliedThisStateBlow(STATE_BLOW::BLOW_149))
|
|||
|
|
continue;
|
|||
|
|
|
|||
|
|
// <20><>ų <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Ʊ<EFBFBD><C6B1>ΰ<EFBFBD> Ÿ<><C5B8><EFBFBD>ΰ<EFBFBD><CEB0><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ѵ<EFBFBD>.
|
|||
|
|
switch( m_hProcessSkill->GetTargetType() )
|
|||
|
|
{
|
|||
|
|
case CDnSkill::Enemy:
|
|||
|
|
case CDnSkill::Self:
|
|||
|
|
if( GetTeam() == hVecActorToApplyStateEffect[ i ]->GetTeam() )
|
|||
|
|
continue;
|
|||
|
|
break;
|
|||
|
|
|
|||
|
|
case CDnSkill::Friend:
|
|||
|
|
case CDnSkill::Party:
|
|||
|
|
if( GetTeam() != hVecActorToApplyStateEffect[ i ]->GetTeam() )
|
|||
|
|
continue;
|
|||
|
|
break;
|
|||
|
|
|
|||
|
|
// <20><>ų <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Ʊ<EFBFBD>/<2F><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF> <20><><EFBFBD><EFBFBD> <20>ʿ<EFBFBD><CABF><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>θ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ؾ<EFBFBD> <20>Ѵ<EFBFBD>.
|
|||
|
|
case CDnSkill::All:
|
|||
|
|
break;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD>̻<EFBFBD> Add <20>ÿ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ε<EFBFBD><CEB5><EFBFBD> ó<><C3B3> <20>ʿ<EFBFBD>.
|
|||
|
|
// <20>ش<EFBFBD> Actor<6F><72> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF> <20><><EFBFBD><EFBFBD> <20>ε<EFBFBD><CEB5><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ͽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>쿡 <20><><EFBFBD><EFBFBD><EFBFBD>̻<EFBFBD> <20>߰<EFBFBD> <20><>Ŵ.
|
|||
|
|
map<int, bool> mapDuplicateResult;
|
|||
|
|
CDnSkill::CanApply eResult = CDnSkill::CanApplySkillStateEffect( hVecActorToApplyStateEffect[i], m_hProcessSkill, mapDuplicateResult, true );
|
|||
|
|
if( CDnSkill::CanApply::Fail != eResult )
|
|||
|
|
{
|
|||
|
|
for( DWORD k = 0; k < m_hProcessSkill->GetStateEffectCount(); k++ )
|
|||
|
|
{
|
|||
|
|
CDnSkill::StateEffectStruct *pLocalStruct = m_hProcessSkill->GetStateEffectFromIndex(k);
|
|||
|
|
|
|||
|
|
if (pStruct->szSkipStateBlows && CDnSkill::IsSkipStateBlow(pStruct->szSkipStateBlows, (STATE_BLOW::emBLOW_INDEX)pLocalStruct->nID))
|
|||
|
|
continue;
|
|||
|
|
|
|||
|
|
// <20>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>ִ<EFBFBD> <20><>ų<EFBFBD><C5B3> <20><><EFBFBD>쿣 Self <20><><EFBFBD><EFBFBD> Target <20><> <20><> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ǿ<EFBFBD><C7BE>ֵ<EFBFBD>.
|
|||
|
|
// Self <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD> <20>ڽſ<DABD><C5BF><EFBFBD> <20>̹<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ǿ<EFBFBD><C7BE><EFBFBD> <20><><EFBFBD><EFBFBD> Hit <20>ñ׳<C3B1> <20><><EFBFBD><EFBFBD><EFBFBD>Ǵ<EFBFBD> <20><><EFBFBD>̱<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Target <20><> <20><><EFBFBD><EFBFBD><EFBFBD>ȴ<EFBFBD>.
|
|||
|
|
switch( pLocalStruct->ApplyType )
|
|||
|
|
{
|
|||
|
|
case CDnSkill::ApplySelf:
|
|||
|
|
continue;
|
|||
|
|
break;
|
|||
|
|
|
|||
|
|
case CDnSkill::ApplyTarget:
|
|||
|
|
break;
|
|||
|
|
|
|||
|
|
case CDnSkill::ApplyEnemy:
|
|||
|
|
if( GetTeam() == hVecActorToApplyStateEffect[ i ]->GetTeam() )
|
|||
|
|
continue;
|
|||
|
|
break;
|
|||
|
|
|
|||
|
|
case CDnSkill::ApplyFriend:
|
|||
|
|
if( GetTeam() != hVecActorToApplyStateEffect[ i ]->GetTeam() )
|
|||
|
|
continue;
|
|||
|
|
break;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// <20><><EFBFBD><EFBFBD> <20><>ų <20><>ø<EFBFBD><C3B8> <20><><EFBFBD>쿣 <20><>ų ȿ<><C8BF> <20>߿<EFBFBD> Ȯ<><C8AE> üũ<C3BC>ϴ<EFBFBD> <20>͵<EFBFBD><CDB5><EFBFBD> <20>̹<EFBFBD> CanApplySkillStateEffect <20><><EFBFBD><EFBFBD> Ȯ<><C8AE>üũ<C3BC>ǰ<EFBFBD>
|
|||
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>̴<EFBFBD>. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>⼱ Ȯ<><C8AE> üũ <20>Ȱ<EFBFBD><C8B0><EFBFBD> Ȯ<><C8AE><EFBFBD>ϰ<EFBFBD> <20>ȰŶ<C8B0><C5B6><EFBFBD> <20>ٽ<EFBFBD> Ȯ<><C8AE> üũ <20><><EFBFBD>ϵ<EFBFBD><CFB5><EFBFBD> <20>Լ<EFBFBD> ȣ<><C8A3> <20><><EFBFBD>ش<EFBFBD>.
|
|||
|
|
bool bAllowAddThisSE = true;
|
|||
|
|
bool bCheckCanBegin = true;
|
|||
|
|
if( CDnSkill::ApplyDuplicateSameSkill == eResult )
|
|||
|
|
{
|
|||
|
|
map<int, bool>::iterator iter = mapDuplicateResult.find( pLocalStruct->nID );
|
|||
|
|
// <20>ʿ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>Ͱ<EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD> <20>ɷ<EFBFBD><C9B7><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD> <20>׳<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF> <20>߰<EFBFBD> <20><>ƾ <20><><EFBFBD><EFBFBD>.
|
|||
|
|
if( mapDuplicateResult.end() != iter )
|
|||
|
|
{
|
|||
|
|
// <20><><EFBFBD><EFBFBD> <20><>ų<EFBFBD><C5B3> Ȯ<><C8AE><EFBFBD>ִ<EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ɷ<EFBFBD><C9B7>־ CanAdd <20><> ȣ<><C8A3><EFBFBD>غ<EFBFBD><D8BA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
|||
|
|
// <20>̷<EFBFBD> <20><><EFBFBD>쿣 <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF> <20>߰<EFBFBD><DFB0><EFBFBD><EFBFBD><EFBFBD> <20>ʴ´<CAB4>.
|
|||
|
|
if( false == (iter->second) )
|
|||
|
|
bAllowAddThisSE = false;
|
|||
|
|
else
|
|||
|
|
// <20>̹<EFBFBD> CanAdd <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>̹Ƿ<CCB9> CmdAddStateEffect ȣ<><C8A3> <20><> <20><><EFBFBD><EFBFBD> üũ<C3BC><C5A9><EFBFBD><EFBFBD> <20>ʵ<EFBFBD><CAB5><EFBFBD> <20><><EFBFBD>ش<EFBFBD>.
|
|||
|
|
bCheckCanBegin = false;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if( bAllowAddThisSE )
|
|||
|
|
{
|
|||
|
|
// #72931 <20><>ũ<EFBFBD><C5A9><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><>Ÿ<EFBFBD><C5B8> <20><><EFBFBD><EFBFBD> ó<><C3B3> -> <20><><EFBFBD>߿<EFBFBD> <20>̷<EFBFBD><CCB7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>°<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Ϲ<EFBFBD>ȭ<EFBFBD>ؾ<EFBFBD><D8BE><EFBFBD>
|
|||
|
|
bool bShareCurseCoolTime = false;
|
|||
|
|
if( pLocalStruct->nID == STATE_BLOW::BLOW_244 )
|
|||
|
|
{
|
|||
|
|
DNVector(DnBlowHandle) vlhBlows;
|
|||
|
|
GatherAppliedStateBlowByBlowIndex( STATE_BLOW::BLOW_244, vlhBlows );
|
|||
|
|
if( static_cast<int>( vlhBlows.size() ) > 0 )
|
|||
|
|
{
|
|||
|
|
CDnCurseBlow* pDnCurseBlow = static_cast<CDnCurseBlow*>( vlhBlows[0].GetPointer() );
|
|||
|
|
if( pDnCurseBlow )
|
|||
|
|
{
|
|||
|
|
pLocalStruct->szValue += ";";
|
|||
|
|
pLocalStruct->szValue += FormatA( "%f", pDnCurseBlow->GetCoolTime() );
|
|||
|
|
bShareCurseCoolTime = true;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// <20><><EFBFBD>⼭ <20><><EFBFBD>ϵǾ<CFB5> <20>ִ<EFBFBD> <20><><EFBFBD><EFBFBD> <20>Ǿ<EFBFBD><C7BE><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD> <20><><EFBFBD>ش<EFBFBD>. [2010/12/08 semozz]
|
|||
|
|
hVecActorToApplyStateEffect[i]->RemoveResetStateBlow();
|
|||
|
|
|
|||
|
|
hVecActorToApplyStateEffect[i]->CmdAddStateEffect( m_hProcessSkill->GetInfo(), (STATE_BLOW::emBLOW_INDEX)pLocalStruct->nID,
|
|||
|
|
pLocalStruct->nDurationTime, pLocalStruct->szValue.c_str(), false, bCheckCanBegin );
|
|||
|
|
|
|||
|
|
if( bShareCurseCoolTime ) // #72931 <20><>Ÿ<EFBFBD><C5B8> <20>ٿ<EFBFBD><D9BF><EFBFBD><EFBFBD><EFBFBD> <20>ٽ<EFBFBD> <20><><EFBFBD><EFBFBD>
|
|||
|
|
{
|
|||
|
|
std::string::size_type delimiterindex = pLocalStruct->szValue.rfind( ";" );
|
|||
|
|
if( delimiterindex != std::string::npos )
|
|||
|
|
{
|
|||
|
|
pLocalStruct->szValue.erase( delimiterindex, pLocalStruct->szValue.length() - delimiterindex );
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> OnDamage() ȣ<><C8A3><EFBFBD>Ǹ<EFBFBD> <20><><EFBFBD>ʿ<EFBFBD><CABF><EFBFBD> DamageRemainTime <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ش<EFBFBD>. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
// <20><>ó<EFBFBD><C3B3> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD> <20>߰<EFBFBD><DFB0><EFBFBD>Ű<EFBFBD><C5B0> <20><><EFBFBD><EFBFBD> hit <20>ñ׳ε<D7B3> <20><><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD> OnDamage() ȣ<><C8A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ʾҴ<CABE><D2B4><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
// <20><><EFBFBD>⼭ LastDamageTime <20><> <20><><EFBFBD><EFBFBD> <20>ȵǾ<C8B5><C7BE>ִ<EFBFBD> <20>༮<EFBFBD><E0BCAE> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ<EFBFBD><D6B5><EFBFBD> <20>Ѵ<EFBFBD>.
|
|||
|
|
// <20>̷<EFBFBD><CCB7><EFBFBD> <20>ؾ<EFBFBD> hit <20>ñ׳ο<D7B3> <20>ѹ游 <20>´´<C2B4>.
|
|||
|
|
if( !bOnDamageCalled )
|
|||
|
|
{
|
|||
|
|
hVecActorToApplyStateEffect[ i ]->SetDamageRemainTime( GetUniqueID(), HitParam.RemainTime );
|
|||
|
|
hVecActorToApplyStateEffect[ i ]->SetLastDamageHitUniqueID( GetUniqueID(), HitParam.iUniqueID );
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
// <20><>ų <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>¸<EFBFBD><C2B8><EFBFBD>Ʈ <20>ʱ<EFBFBD>ȭ [2010/12/09 semozz]
|
|||
|
|
hVecActorToApplyStateEffect[i]->InitStateBlowIDToRemove();
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if( bHit ) {
|
|||
|
|
m_LastHitSignalTime = SignalEndTime;
|
|||
|
|
OnHitFinish( LocalTime, pStruct );
|
|||
|
|
}
|
|||
|
|
else m_LastHitSignalTime = -1;
|
|||
|
|
|
|||
|
|
// <20><><EFBFBD><EFBFBD> üũ
|
|||
|
|
// Note: <20><><EFBFBD><EFBFBD>üũ<C3BC><C5A9> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD> <20>ִ<EFBFBD> Heal <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> üũ<C3BC><C5A9><EFBFBD><EFBFBD> <20>ʵ<EFBFBD><CAB5><EFBFBD> <20>մϴ<D5B4>. HitAction <20><> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>.
|
|||
|
|
if( false == HitParam.szActionName.empty()
|
|||
|
|
//<2F><><EFBFBD>Ͱ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ǿ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><> <20>ִ<EFBFBD>.
|
|||
|
|
&& pStruct->StateEffectFilter == 0
|
|||
|
|
)
|
|||
|
|
{
|
|||
|
|
DNVector(CEtWorldProp*) pVecProp;
|
|||
|
|
CDnWorld* pWorld = CDnWorld::GetInstancePtr(GetRoom());
|
|||
|
|
|
|||
|
|
pWorld->ScanProp( vPos, fDistance, pVecProp );
|
|||
|
|
|
|||
|
|
for( DWORD i=0; i<pVecProp.size(); i++ )
|
|||
|
|
{
|
|||
|
|
if( false == ((CDnWorldProp*)pVecProp[i])->IsBrokenType() )
|
|||
|
|
continue;
|
|||
|
|
|
|||
|
|
if( !((CDnWorldBrokenProp*)pVecProp[i])->IsHittable( GetMySmartPtr(), LocalTime ) )
|
|||
|
|
continue;
|
|||
|
|
|
|||
|
|
pVecProp[i]->GetBoundingBox( Box );
|
|||
|
|
|
|||
|
|
if( SquaredDistance( vPos, Box ) > fXZDistanceSQ ) continue;
|
|||
|
|
if( SquaredDistance( vPos, Box, false ) < fXZDistanceMinSQ ) continue;
|
|||
|
|
|
|||
|
|
vDir = ((CDnWorldProp*)pVecProp[i])->GetMatEx()->m_vPosition - vPos;
|
|||
|
|
|
|||
|
|
EtVec3Normalize( &vDir, &vDir );
|
|||
|
|
fDot = EtVec3Dot( &vZVec, &vDir );
|
|||
|
|
if( EtToDegree( acos( fDot ) ) > pStruct->fAngle )
|
|||
|
|
continue;
|
|||
|
|
|
|||
|
|
if( Box.Min.y < vPos.y + pStruct->fHeightMin && Box.Max.y < m_Cross.m_vPosition.y + pStruct->fHeightMin )
|
|||
|
|
continue;
|
|||
|
|
if( Box.Min.y > vPos.y + fHeightMax && Box.Max.y > m_Cross.m_vPosition.y + fHeightMax )
|
|||
|
|
continue;
|
|||
|
|
|
|||
|
|
HitParam.vViewVec = -vDir;
|
|||
|
|
((CDnWorldProp*)pVecProp[i])->OnDamage( GetMySmartPtr(), HitParam );
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
//////////////////////////////////////////////////////////////////////////
|
|||
|
|
// <20><><EFBFBD>ξ<EFBFBD> <20><><EFBFBD>ݿ<EFBFBD> <20><>ų <20><>..
|
|||
|
|
InitPrefixOffenceSkills();
|
|||
|
|
//////////////////////////////////////////////////////////////////////////
|
|||
|
|
|
|||
|
|
// PROFILE_TICK_TEST_BLOCK_END();
|
|||
|
|
}
|
|||
|
|
break;
|
|||
|
|
case STE_VelocityAccel:
|
|||
|
|
{
|
|||
|
|
VelocityAccelStruct *pStruct = (VelocityAccelStruct *)pPtr;
|
|||
|
|
|
|||
|
|
MAMovementBase *pMovement = GetMovement();
|
|||
|
|
|
|||
|
|
// #24949 VelocityAccel <20>ñ׳<C3B1> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> <20>κе<CEBA> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ó<><C3B3>.
|
|||
|
|
EtVector3 vVelocity = *pStruct->vVelocity;
|
|||
|
|
EtVector3 vResistance = *pStruct->vResistance;
|
|||
|
|
if( 0 < GetCantXZMoveSEReferenceCount() )
|
|||
|
|
{
|
|||
|
|
vVelocity.x = vVelocity.z = 0.0f;
|
|||
|
|
vResistance.x = vResistance.z = 0.0f;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if( pMovement )
|
|||
|
|
{
|
|||
|
|
pMovement->SetVelocity( vVelocity );
|
|||
|
|
pMovement->SetResistance( vResistance );
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
break;
|
|||
|
|
case STE_State:
|
|||
|
|
{
|
|||
|
|
if( IsCustomProcessSignal() ) break;
|
|||
|
|
StateStruct *pStruct = (StateStruct *)pPtr;
|
|||
|
|
|
|||
|
|
int nState = CDnActorState::s_nActorStateIndex[pStruct->nStateOne] |
|
|||
|
|
CDnActorState::s_nActorStateIndex[pStruct->nStateTwo] |
|
|||
|
|
CDnActorState::s_nActorStateIndex[pStruct->nStateThree];
|
|||
|
|
|
|||
|
|
SetState( (ActorStateEnum)nState );
|
|||
|
|
}
|
|||
|
|
break;
|
|||
|
|
case STE_CustomState:
|
|||
|
|
{
|
|||
|
|
if( IsCustomProcessSignal() ) break;
|
|||
|
|
CustomStateStruct *pStruct = (CustomStateStruct *)pPtr;
|
|||
|
|
|
|||
|
|
int nState = CDnActorState::s_nActorCustomStateIndex[pStruct->nStateOne] |
|
|||
|
|
CDnActorState::s_nActorCustomStateIndex[pStruct->nStateTwo] |
|
|||
|
|
CDnActorState::s_nActorCustomStateIndex[pStruct->nStateThree];
|
|||
|
|
SetCustomState( (ActorCustomStateEnum)nState );
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
break;
|
|||
|
|
case STE_CanHit:
|
|||
|
|
{
|
|||
|
|
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD>°<EFBFBD> <20>Ǿ<EFBFBD><C7BE><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ǿ<D7BC><C7BF><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ž<EFBFBD>Ǵ<EFBFBD> <20><><EFBFBD>찡<EFBFBD>ִµ<D6B4>
|
|||
|
|
// Ư<><C6AF> <20><EFBFBD><D7BC><EFBFBD> STE_CanHit <20><> False <20><> <20><><EFBFBD><EFBFBD><EFBFBD>϶<EFBFBD><CFB6><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¿<EFBFBD><C2BF><EFBFBD><EFBFBD><EFBFBD> Hit <20><> <20><><EFBFBD><EFBFBD><EEB0A1> <20>ʴ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>־ <20><><EFBFBD><EFBFBD> <20><><EFBFBD>¿<EFBFBD><C2BF><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
// <20>µ<EFBFBD><C2B5><EFBFBD> <20><><EFBFBD>ش<EFBFBD>.
|
|||
|
|
if(GetStateBlow()->IsApplied( STATE_BLOW::BLOW_041))
|
|||
|
|
{
|
|||
|
|
SetHittable(true);
|
|||
|
|
break;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
CanHitStruct *pStruct = (CanHitStruct *)pPtr;
|
|||
|
|
SetHittable( ( pStruct->bHittable == TRUE ) ? true : false );
|
|||
|
|
}
|
|||
|
|
break;
|
|||
|
|
case STE_CanMove:
|
|||
|
|
{
|
|||
|
|
if( CDnActorState::Cant_Move != (m_StateEffect & CDnActorState::Cant_Move) )
|
|||
|
|
{
|
|||
|
|
CanMoveStruct *pStruct = (CanMoveStruct *)pPtr;
|
|||
|
|
SetMovable( ( pStruct->bCanMove == TRUE ) ? true : false );
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
break;
|
|||
|
|
case STE_SendAction_Weapon:
|
|||
|
|
{
|
|||
|
|
SendAction_WeaponStruct *pStruct = (SendAction_WeaponStruct *)pPtr;
|
|||
|
|
|
|||
|
|
if( 2 <= pStruct->nWeaponIndex ) // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ε<EFBFBD><CEB5><EFBFBD><EFBFBD>̴<EFBFBD>.
|
|||
|
|
break;
|
|||
|
|
|
|||
|
|
if( !GetActiveWeapon( pStruct->nWeaponIndex ) ) break;
|
|||
|
|
if( pStruct->szActionName )
|
|||
|
|
{
|
|||
|
|
// <20>÷<EFBFBD><C3B7>̾<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ǿ<D7BC><C7BF><EFBFBD> <20><> <20><> <20>ִ<EFBFBD> <20><EFBFBD>ü <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD>ü <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ش<EFBFBD>.
|
|||
|
|
if( GetActiveWeapon( pStruct->nWeaponIndex )->IsExistAction( pStruct->szActionName ) )
|
|||
|
|
{
|
|||
|
|
GetActiveWeapon( pStruct->nWeaponIndex )->SetActionQueue( pStruct->szActionName );
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
break;
|
|||
|
|
case STE_MotionSpeed:
|
|||
|
|
{
|
|||
|
|
if( IsModifyPlaySpeed() ) break;
|
|||
|
|
MotionSpeedStruct *pStruct = (MotionSpeedStruct *)pPtr;
|
|||
|
|
float fIncreadSpeed = 1.f / pStruct->fFrame * 60.f;
|
|||
|
|
DWORD dwTime = (DWORD)( ( SignalEndTime - SignalStartTime ) * fIncreadSpeed );
|
|||
|
|
float fSpeed = 1.f / 60.f * pStruct->fFrame;
|
|||
|
|
SetPlaySpeed( dwTime, fSpeed );
|
|||
|
|
}
|
|||
|
|
break;
|
|||
|
|
case STE_NormalSuperAmmor:
|
|||
|
|
{
|
|||
|
|
NormalSuperAmmorStruct *pStruct = (NormalSuperAmmorStruct *)pPtr;
|
|||
|
|
m_bEnableNormalSuperAmmor = ( pStruct->bEnable == TRUE ) ? true : false;
|
|||
|
|
m_nNormalSuperAmmorTime = pStruct->nTime;
|
|||
|
|
m_fBreakNormalSuperAmmorDurability = pStruct->fBreakDurability;
|
|||
|
|
|
|||
|
|
if ( m_bIngnoreNormalSuperArmor )
|
|||
|
|
{
|
|||
|
|
m_bEnableNormalSuperAmmor = false;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
break;
|
|||
|
|
case STE_ResetVelocity:
|
|||
|
|
{
|
|||
|
|
ResetVelocityStruct *pStruct = (ResetVelocityStruct *)pPtr;
|
|||
|
|
if( pStruct->bXAxis ) {
|
|||
|
|
SetVelocityX( 0.f );
|
|||
|
|
SetResistanceX( 0.f );
|
|||
|
|
}
|
|||
|
|
if( pStruct->bYAxis ) {
|
|||
|
|
SetVelocityY( 0.f );
|
|||
|
|
SetResistanceY( 0.f );
|
|||
|
|
}
|
|||
|
|
if( pStruct->bZAxis ) {
|
|||
|
|
SetVelocityZ( 0.f );
|
|||
|
|
SetResistanceZ( 0.f );
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
break;
|
|||
|
|
case STE_Projectile:
|
|||
|
|
{
|
|||
|
|
ProjectileStruct *pStruct = (ProjectileStruct *)pPtr;
|
|||
|
|
|
|||
|
|
OutputDebug("%s m_bOnSignalFromChargerSE: %d m_ActorType: %d", __FUNCTION__, m_bOnSignalFromChargerSE, m_ActorType);
|
|||
|
|
// Note: <20>÷<EFBFBD><C3B7>̾<EFBFBD><CCBE><EFBFBD> <20><><EFBFBD>쿣 <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ÿ<EFBFBD><C5B8> <20><>Ŷ<EFBFBD><C5B6> Ŭ<><C5AC><EFBFBD>κ<EFBFBD><CEBA><EFBFBD> <20>Ƽ<DEBE> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>.
|
|||
|
|
// Direction Ÿ<><C5B8><EFBFBD>̶<EFBFBD><CCB6><EFBFBD> <20><> <20><><EFBFBD><EFBFBD> ī<><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ֱ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>..
|
|||
|
|
if( false == m_bOnSignalFromChargerSE )
|
|||
|
|
if( m_ActorType <= CDnActorState::Reserved6 )
|
|||
|
|
break;
|
|||
|
|
|
|||
|
|
MatrixEx LocalCross = *GetMatEx();
|
|||
|
|
CDnProjectile *pProjectile = CDnProjectile::CreateProjectile( GetRoom(), GetMySmartPtr(), LocalCross, pStruct );
|
|||
|
|
if( pProjectile == NULL ) break;
|
|||
|
|
pProjectile->SetShooterType( GetMySmartPtr(), m_nActionIndex, nSignalIndex );
|
|||
|
|
|
|||
|
|
//bool bActorAttachWeapon = false;
|
|||
|
|
//if( pStruct->nWeaponTableID == 0 && GetWeapon(1) ) bActorAttachWeapon = true;
|
|||
|
|
if( m_bOnSignalFromChargerSE && m_hChargetDestActor )
|
|||
|
|
{
|
|||
|
|
DNVector(DnBlowHandle) vlhChargerBlows;
|
|||
|
|
m_hChargetDestActor->GetStateBlow()->GetStateBlowFromBlowIndex( STATE_BLOW::BLOW_062, vlhChargerBlows ); // 1<><31> <20>̻<EFBFBD> <20>ߺ<EFBFBD><DFBA><EFBFBD><EFBFBD><EFBFBD> <20>ʴ<EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ȹ<EFBFBD><C8B9><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>.
|
|||
|
|
for( int i = 0; i < (int)vlhChargerBlows.size(); ++i )
|
|||
|
|
{
|
|||
|
|
if( vlhChargerBlows[i] )
|
|||
|
|
static_cast<CDnChargerBlow*>( vlhChargerBlows.at( i ).GetPointer() )->OnProjectileSignal( pProjectile );
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if( false == m_bOnSignalFromChargerSE )
|
|||
|
|
{
|
|||
|
|
OnProjectile( pProjectile, pStruct, LocalCross, nSignalIndex );
|
|||
|
|
OnSkillProjectile( pProjectile );
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
break;
|
|||
|
|
case STE_SkillSuperAmmor:
|
|||
|
|
{
|
|||
|
|
SkillSuperAmmorStruct *pStruct = (SkillSuperAmmorStruct *)pPtr;
|
|||
|
|
|
|||
|
|
m_nSkillSuperAmmorValue[0] = (int)( GetSuperAmmor() * pStruct->fSuperAmmorOneProb );
|
|||
|
|
m_nSkillSuperAmmorValue[1] = (int)( GetSuperAmmor() * pStruct->fSuperAmmorTwoProb );
|
|||
|
|
m_nSkillSuperAmmorValue[2] = (int)( GetSuperAmmor() * pStruct->fSuperAmmorThreeProb );
|
|||
|
|
m_nSkillSuperAmmorValue[3] = (int)( GetSuperAmmor() * pStruct->fSuperAmmorFourProb );
|
|||
|
|
memcpy( m_nLastUpdateSkillSuperAmmorValue, m_nSkillSuperAmmorValue, sizeof(m_nSkillSuperAmmorValue) );
|
|||
|
|
m_nSkillSuperAmmorTime = pStruct->nTime;
|
|||
|
|
m_fSkillSuperAmmorDamageDecreaseProb = pStruct->fDamageDecreaseProb;
|
|||
|
|
}
|
|||
|
|
break;
|
|||
|
|
case STE_SummonMonster:
|
|||
|
|
{
|
|||
|
|
// #48747 <20><>ī<EFBFBD><C4AB><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><>ȯü<C8AF><C3BC> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ϴ<EFBFBD> <20><><EFBFBD>쿣 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Ἥ <20>ɷ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ȯ<EFBFBD><C8AF> <20>ȵǾ<C8B5><C7BE><EFBFBD> <20><>..
|
|||
|
|
if( IsPlayerActor() && ((CDnPlayerActor*)this)->IsInvalidPlayerChecker() ) break;
|
|||
|
|
|
|||
|
|
SummonMonsterStruct* pStruct = (SummonMonsterStruct *)pPtr;
|
|||
|
|
|
|||
|
|
CDnGameTask* pGameTask = static_cast<CDnGameTask*>(CTaskManager::GetInstancePtr(GetRoom())->GetTask( "GameTask" ));
|
|||
|
|
if( pGameTask )
|
|||
|
|
{
|
|||
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ٲ㼭 <20><><EFBFBD><EFBFBD><EFBFBD>ϱ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ݵ<EFBFBD><DDB5><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ؼ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ѵ<EFBFBD>.
|
|||
|
|
#ifdef PRE_FIX_MEMOPT_SIGNALH
|
|||
|
|
SummonMonsterStruct Struct;
|
|||
|
|
CopyShallow_SummonMonsterStruct(Struct, pStruct);
|
|||
|
|
#else
|
|||
|
|
SummonMonsterStruct Struct = *pStruct;
|
|||
|
|
#endif
|
|||
|
|
// 167<36><37> <20><>ȯ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ų<EFBFBD><C5B3><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF> ó<><C3B3>. ///////////////////
|
|||
|
|
if( IsPlayerActor() )
|
|||
|
|
{
|
|||
|
|
if( IsAppliedThisStateBlow( STATE_BLOW::BLOW_167 ) )
|
|||
|
|
{
|
|||
|
|
DNVector(DnBlowHandle) vlBlows;
|
|||
|
|
GetStateBlow()->GetStateBlowFromBlowIndex( STATE_BLOW::BLOW_167, vlBlows );
|
|||
|
|
if( false == vlBlows.empty() )
|
|||
|
|
{
|
|||
|
|
Struct.nForceSkillLevel = (int)vlBlows.front()->GetFloatValue();
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
//////////////////////////////////////////////////////////////////////////
|
|||
|
|
|
|||
|
|
if(Struct.PositionCheck == TRUE )
|
|||
|
|
{
|
|||
|
|
MatrixEx Cross = *GetMatEx();
|
|||
|
|
Cross.m_vPosition += Cross.m_vXAxis * pStruct->vPosition->x;
|
|||
|
|
Cross.m_vPosition += Cross.m_vYAxis * pStruct->vPosition->y;
|
|||
|
|
Cross.m_vPosition += Cross.m_vZAxis * pStruct->vPosition->z;
|
|||
|
|
|
|||
|
|
if( INSTANCE(CDnWorld).IsOnNavigationMesh( Cross.GetPosition() ) == false )
|
|||
|
|
break;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
pGameTask->RequestSummonMonster( GetActorHandle(), &Struct );
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
break;
|
|||
|
|
//case STE_SummonProp:
|
|||
|
|
// {
|
|||
|
|
// SummonPropStruct *pStruct = (SummonPropStruct *)pPtr;
|
|||
|
|
|
|||
|
|
// MatrixEx Cross = m_Cross;
|
|||
|
|
// Cross.m_vPosition += Cross.m_vXAxis * pStruct->vPosition->x;
|
|||
|
|
// Cross.m_vPosition += Cross.m_vYAxis * pStruct->vPosition->y;
|
|||
|
|
// Cross.m_vPosition += Cross.m_vZAxis * pStruct->vPosition->z;
|
|||
|
|
|
|||
|
|
// float fDot = EtVec3Dot( &EtVector3( 0.f, 0.f, 1.f ), &Cross.m_vZAxis );
|
|||
|
|
// EtVector3 vRotate;
|
|||
|
|
// vRotate = *pStruct->vRotate;
|
|||
|
|
// vRotate.y += EtToDegree( acos(fDot) );
|
|||
|
|
|
|||
|
|
// CDnGameTask* pGameTask = static_cast<CDnGameTask*>(CTaskManager::GetInstancePtr(GetRoom())->GetTask( "GameTask" ));
|
|||
|
|
|
|||
|
|
// DnPropHandle hProp = pGameTask->RequestGenerationProp( pStruct->nSummonPropTableID, Cross.m_vPosition, vRotate, *pStruct->vScale );
|
|||
|
|
// }
|
|||
|
|
// break;
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
// ****************************************************************************************************************
|
|||
|
|
// <20><><EFBFBD><EFBFBD> <20><>ȯ <20>ñ׳ο<D7B3><CEBF><EFBFBD> <20><>ȯ<EFBFBD>Ǵ<EFBFBD> <20><><EFBFBD><EFBFBD> Ŭ<><C5AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ݵ<EFBFBD><DDB5><EFBFBD> void ReleasePostCustomParam() <20><> <20><><EFBFBD><EFBFBD><EFBFBD>ؾ<EFBFBD> <20><>!!
|
|||
|
|
// Ÿ<>Կ<EFBFBD> <20><><EFBFBD>缭 <20><><EFBFBD><EFBFBD> struct <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> boost::pool <20><><EFBFBD><EFBFBD> <20><EFBFBD><DEB8><EFBFBD> courrupt
|
|||
|
|
// ****************************************************************************************************************
|
|||
|
|
case STE_SummonChestProp:
|
|||
|
|
{
|
|||
|
|
// #48747 <20><>ī<EFBFBD><C4AB><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><>ȯü<C8AF><C3BC> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ϴ<EFBFBD> <20><><EFBFBD>쿣 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Ἥ <20>ɷ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ȯ<EFBFBD><C8AF> <20>ȵǾ<C8B5><C7BE><EFBFBD> <20><>..
|
|||
|
|
if( IsPlayerActor() && ((CDnPlayerActor*)this)->IsInvalidPlayerChecker() ) break;
|
|||
|
|
|
|||
|
|
SummonChestPropStruct *pStruct = (SummonChestPropStruct *)pPtr;
|
|||
|
|
|
|||
|
|
MatrixEx Cross = m_Cross;
|
|||
|
|
Cross.m_vPosition += Cross.m_vXAxis * pStruct->vPosition->x;
|
|||
|
|
Cross.m_vPosition += Cross.m_vYAxis * pStruct->vPosition->y;
|
|||
|
|
Cross.m_vPosition += Cross.m_vZAxis * pStruct->vPosition->z;
|
|||
|
|
|
|||
|
|
float fDot = EtVec3Dot( &EtVector3( 0.f, 0.f, 1.f ), &Cross.m_vZAxis );
|
|||
|
|
EtVector3 vRotate;
|
|||
|
|
vRotate = *pStruct->vRotate;
|
|||
|
|
vRotate.y += EtToDegree( acos(fDot) );
|
|||
|
|
|
|||
|
|
ChestStruct* pChestPropInfo = new ChestStruct;
|
|||
|
|
pChestPropInfo->nItemDropGroupTableID = pStruct->nItemDropGroupTableID;
|
|||
|
|
pChestPropInfo->nNeedKeyID = pStruct->nNeedKeyID;
|
|||
|
|
|
|||
|
|
CDnGameTask* pGameTask = static_cast<CDnGameTask*>(CTaskManager::GetInstancePtr(GetRoom())->GetTask( "GameTask" ));
|
|||
|
|
|
|||
|
|
DnPropHandle hProp = pGameTask->RequestGenerationProp( pStruct->nSummonPropTableID, PTE_Chest, Cross.m_vPosition, vRotate, *pStruct->vScale, pStruct->nLifeTime, (void*)pChestPropInfo );
|
|||
|
|
|
|||
|
|
if( -1 < pStruct->nLifeTime )
|
|||
|
|
hProp->SetLifeTime( pStruct->nLifeTime );
|
|||
|
|
|
|||
|
|
hProp->SetMasterActor(GetMySmartPtr());
|
|||
|
|
}
|
|||
|
|
break;
|
|||
|
|
case STE_SummonBrokenProp:
|
|||
|
|
{
|
|||
|
|
// #48747 <20><>ī<EFBFBD><C4AB><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><>ȯü<C8AF><C3BC> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ϴ<EFBFBD> <20><><EFBFBD>쿣 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Ἥ <20>ɷ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ȯ<EFBFBD><C8AF> <20>ȵǾ<C8B5><C7BE><EFBFBD> <20><>..
|
|||
|
|
if( IsPlayerActor() && ((CDnPlayerActor*)this)->IsInvalidPlayerChecker() ) break;
|
|||
|
|
|
|||
|
|
SummonBrokenPropStruct *pStruct = (SummonBrokenPropStruct *)pPtr;
|
|||
|
|
|
|||
|
|
MatrixEx Cross = m_Cross;
|
|||
|
|
Cross.m_vPosition += Cross.m_vXAxis * pStruct->vPosition->x;
|
|||
|
|
Cross.m_vPosition += Cross.m_vYAxis * pStruct->vPosition->y;
|
|||
|
|
Cross.m_vPosition += Cross.m_vZAxis * pStruct->vPosition->z;
|
|||
|
|
|
|||
|
|
float fDot = EtVec3Dot( &EtVector3( 0.f, 0.f, 1.f ), &Cross.m_vZAxis );
|
|||
|
|
EtVector3 vRotate;
|
|||
|
|
vRotate = *pStruct->vRotate;
|
|||
|
|
vRotate.y += EtToDegree( acos(fDot) );
|
|||
|
|
|
|||
|
|
BrokenStruct* pBrokenPropInfo = new BrokenStruct;
|
|||
|
|
pBrokenPropInfo->nDurability = pStruct->nDurability;
|
|||
|
|
pBrokenPropInfo->nItemDropGroupTableID = pStruct->nItemDropGroupTableID;
|
|||
|
|
|
|||
|
|
CDnGameTask* pGameTask = static_cast<CDnGameTask*>(CTaskManager::GetInstancePtr(GetRoom())->GetTask( "GameTask" ));
|
|||
|
|
|
|||
|
|
DnPropHandle hProp = pGameTask->RequestGenerationProp( pStruct->nSummonPropTableID, PTE_Broken, Cross.m_vPosition, vRotate, *pStruct->vScale, pStruct->nLifeTime, (void*)pBrokenPropInfo );
|
|||
|
|
|
|||
|
|
if( -1 < pStruct->nLifeTime )
|
|||
|
|
hProp->SetLifeTime( pStruct->nLifeTime );
|
|||
|
|
|
|||
|
|
hProp->SetMasterActor(GetMySmartPtr());
|
|||
|
|
}
|
|||
|
|
break;
|
|||
|
|
case STE_SummonBrokenDamageProp:
|
|||
|
|
{
|
|||
|
|
// #48747 <20><>ī<EFBFBD><C4AB><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><>ȯü<C8AF><C3BC> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ϴ<EFBFBD> <20><><EFBFBD>쿣 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Ἥ <20>ɷ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ȯ<EFBFBD><C8AF> <20>ȵǾ<C8B5><C7BE><EFBFBD> <20><>..
|
|||
|
|
if( IsPlayerActor() && ((CDnPlayerActor*)this)->IsInvalidPlayerChecker() ) break;
|
|||
|
|
|
|||
|
|
SummonBrokenDamagePropStruct *pStruct = (SummonBrokenDamagePropStruct *)pPtr;
|
|||
|
|
|
|||
|
|
MatrixEx Cross = m_Cross;
|
|||
|
|
Cross.m_vPosition += Cross.m_vXAxis * pStruct->vPosition->x;
|
|||
|
|
Cross.m_vPosition += Cross.m_vYAxis * pStruct->vPosition->y;
|
|||
|
|
Cross.m_vPosition += Cross.m_vZAxis * pStruct->vPosition->z;
|
|||
|
|
|
|||
|
|
float fDot = EtVec3Dot( &EtVector3( 0.f, 0.f, 1.f ), &Cross.m_vZAxis );
|
|||
|
|
EtVector3 vRotate;
|
|||
|
|
vRotate = *pStruct->vRotate;
|
|||
|
|
vRotate.y += EtToDegree( acos(fDot) );
|
|||
|
|
|
|||
|
|
BrokenDamageStruct* pBrokenDamagePropInfo = new BrokenDamageStruct;
|
|||
|
|
pBrokenDamagePropInfo->nMonsterTableID = 102; // goblin
|
|||
|
|
pBrokenDamagePropInfo->nDurability = pStruct->nDurability;
|
|||
|
|
pBrokenDamagePropInfo->nItemDropGroupTableID = pStruct->nItemDropGroupTableID;
|
|||
|
|
pBrokenDamagePropInfo->nSkillTableID = pStruct->nSkillTableID;
|
|||
|
|
pBrokenDamagePropInfo->nSkillLevel = pStruct->nSkillLevel;
|
|||
|
|
|
|||
|
|
CDnGameTask* pGameTask = static_cast<CDnGameTask*>(CTaskManager::GetInstancePtr(GetRoom())->GetTask( "GameTask" ));
|
|||
|
|
|
|||
|
|
DnPropHandle hProp = pGameTask->RequestGenerationProp( pStruct->nSummonPropTableID, PTE_BrokenDamage, Cross.m_vPosition, vRotate,
|
|||
|
|
*pStruct->vScale, pStruct->nLifeTime, (void*)pBrokenDamagePropInfo );
|
|||
|
|
if( !hProp )
|
|||
|
|
break;
|
|||
|
|
|
|||
|
|
MAActorProp* pActorProp = dynamic_cast<MAActorProp*>(hProp.GetPointer());
|
|||
|
|
_ASSERT( pActorProp );
|
|||
|
|
if( pActorProp )
|
|||
|
|
pActorProp->CopyActorStateFromThis( GetMySmartPtr() );
|
|||
|
|
|
|||
|
|
if( -1 < pStruct->nLifeTime )
|
|||
|
|
hProp->SetLifeTime( pStruct->nLifeTime );
|
|||
|
|
|
|||
|
|
hProp->SetMasterActor(GetMySmartPtr());
|
|||
|
|
}
|
|||
|
|
break;
|
|||
|
|
case STE_SummonHitMoveDamageBrokenProp:
|
|||
|
|
{
|
|||
|
|
// #48747 <20><>ī<EFBFBD><C4AB><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><>ȯü<C8AF><C3BC> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ϴ<EFBFBD> <20><><EFBFBD>쿣 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Ἥ <20>ɷ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ȯ<EFBFBD><C8AF> <20>ȵǾ<C8B5><C7BE><EFBFBD> <20><>..
|
|||
|
|
if( IsPlayerActor() && ((CDnPlayerActor*)this)->IsInvalidPlayerChecker() ) break;
|
|||
|
|
|
|||
|
|
SummonHitMoveDamageBrokenPropStruct *pStruct = (SummonHitMoveDamageBrokenPropStruct *)pPtr;
|
|||
|
|
|
|||
|
|
MatrixEx Cross = m_Cross;
|
|||
|
|
Cross.m_vPosition += Cross.m_vXAxis * pStruct->vPosition->x;
|
|||
|
|
Cross.m_vPosition += Cross.m_vYAxis * pStruct->vPosition->y;
|
|||
|
|
Cross.m_vPosition += Cross.m_vZAxis * pStruct->vPosition->z;
|
|||
|
|
|
|||
|
|
float fDot = EtVec3Dot( &EtVector3( 0.f, 0.f, 1.f ), &Cross.m_vZAxis );
|
|||
|
|
EtVector3 vRotate;
|
|||
|
|
vRotate = *pStruct->vRotate;
|
|||
|
|
vRotate.y += EtToDegree( acos(fDot) );
|
|||
|
|
|
|||
|
|
HitMoveDamageBrokenStruct* pHitMoveDamageBrokenPropInfo = new HitMoveDamageBrokenStruct;
|
|||
|
|
pHitMoveDamageBrokenPropInfo->nMonsterTableID = 102; // goblin
|
|||
|
|
pHitMoveDamageBrokenPropInfo->nDurability = pStruct->nDurability;
|
|||
|
|
pHitMoveDamageBrokenPropInfo->nItemDropGroupTableID = pStruct->nItemDropGroupTableID;
|
|||
|
|
pHitMoveDamageBrokenPropInfo->MovingAxis = pStruct->MovingAxis;
|
|||
|
|
pHitMoveDamageBrokenPropInfo->fDefaultAxisMovingSpeed = pStruct->fDefaultAxisMovingSpeed;
|
|||
|
|
pHitMoveDamageBrokenPropInfo->fMaxAxisMoveDistance = pStruct->fMaxAxisMoveDistance;
|
|||
|
|
|
|||
|
|
CDnGameTask* pGameTask = static_cast<CDnGameTask*>(CTaskManager::GetInstancePtr(GetRoom())->GetTask( "GameTask" ));
|
|||
|
|
|
|||
|
|
DnPropHandle hProp = pGameTask->RequestGenerationProp( pStruct->nSummonPropTableID, PTE_HitMoveDamageBroken, Cross.m_vPosition, vRotate,
|
|||
|
|
*pStruct->vScale, pStruct->nLifeTime, (void*)pHitMoveDamageBrokenPropInfo );
|
|||
|
|
if( !hProp )
|
|||
|
|
break;
|
|||
|
|
|
|||
|
|
MAActorProp* pActorProp = dynamic_cast<MAActorProp*>(hProp.GetPointer());
|
|||
|
|
_ASSERT( pActorProp );
|
|||
|
|
if( pActorProp )
|
|||
|
|
pActorProp->CopyActorStateFromThis( GetMySmartPtr() );
|
|||
|
|
|
|||
|
|
if( -1 < pStruct->nLifeTime )
|
|||
|
|
hProp->SetLifeTime( pStruct->nLifeTime );
|
|||
|
|
|
|||
|
|
hProp->SetMasterActor(GetMySmartPtr());
|
|||
|
|
}
|
|||
|
|
break;
|
|||
|
|
case STE_SummonBuffProp:
|
|||
|
|
{
|
|||
|
|
// #48747 <20><>ī<EFBFBD><C4AB><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><>ȯü<C8AF><C3BC> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ϴ<EFBFBD> <20><><EFBFBD>쿣 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Ἥ <20>ɷ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ȯ<EFBFBD><C8AF> <20>ȵǾ<C8B5><C7BE><EFBFBD> <20><>..
|
|||
|
|
if( IsPlayerActor() && ((CDnPlayerActor*)this)->IsInvalidPlayerChecker() ) break;
|
|||
|
|
|
|||
|
|
SummonBuffPropStruct *pStruct = (SummonBuffPropStruct *)pPtr;
|
|||
|
|
|
|||
|
|
MatrixEx Cross = m_Cross;
|
|||
|
|
Cross.m_vPosition += Cross.m_vXAxis * pStruct->vPosition->x;
|
|||
|
|
Cross.m_vPosition += Cross.m_vYAxis * pStruct->vPosition->y;
|
|||
|
|
Cross.m_vPosition += Cross.m_vZAxis * pStruct->vPosition->z;
|
|||
|
|
|
|||
|
|
float fDot = EtVec3Dot( &EtVector3( 0.f, 0.f, 1.f ), &Cross.m_vZAxis );
|
|||
|
|
EtVector3 vRotate;
|
|||
|
|
vRotate = *pStruct->vRotate;
|
|||
|
|
vRotate.y += EtToDegree( acos(fDot) );
|
|||
|
|
|
|||
|
|
BuffStruct* pBuffPropInfo = new BuffStruct;
|
|||
|
|
pBuffPropInfo->nMonsterTableID = 102; // goblin
|
|||
|
|
pBuffPropInfo->nSkillTableID = pStruct->nSkillTableID;
|
|||
|
|
pBuffPropInfo->nSkillLevel = pStruct->nSkillLevel;
|
|||
|
|
pBuffPropInfo->nTeam = pStruct->nTeam;
|
|||
|
|
pBuffPropInfo->fCheckRange = pStruct->fCheckRange;
|
|||
|
|
|
|||
|
|
CDnGameTask* pGameTask = static_cast<CDnGameTask*>(CTaskManager::GetInstancePtr(GetRoom())->GetTask( "GameTask" ));
|
|||
|
|
|
|||
|
|
DnPropHandle hProp = pGameTask->RequestGenerationProp( pStruct->nSummonPropTableID, PTE_Buff, Cross.m_vPosition, vRotate, *pStruct->vScale, pStruct->nLifeTime, (void*)pBuffPropInfo );
|
|||
|
|
|
|||
|
|
if( !hProp )
|
|||
|
|
break;
|
|||
|
|
|
|||
|
|
MAActorProp* pActorProp = dynamic_cast<MAActorProp*>(hProp.GetPointer());
|
|||
|
|
_ASSERT( pActorProp );
|
|||
|
|
if( pActorProp )
|
|||
|
|
pActorProp->CopyActorStateFromThis( GetMySmartPtr() );
|
|||
|
|
|
|||
|
|
if( -1 < pStruct->nLifeTime )
|
|||
|
|
hProp->SetLifeTime( pStruct->nLifeTime );
|
|||
|
|
|
|||
|
|
static_cast<CDnBuffProp*>(hProp.GetPointer())->SetSummoner( GetMySmartPtr() );
|
|||
|
|
|
|||
|
|
hProp->SetMasterActor(GetMySmartPtr());
|
|||
|
|
}
|
|||
|
|
break;
|
|||
|
|
case STE_SummonBuffBrokenProp:
|
|||
|
|
{
|
|||
|
|
// #48747 <20><>ī<EFBFBD><C4AB><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><>ȯü<C8AF><C3BC> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ϴ<EFBFBD> <20><><EFBFBD>쿣 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Ἥ <20>ɷ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ȯ<EFBFBD><C8AF> <20>ȵǾ<C8B5><C7BE><EFBFBD> <20><>..
|
|||
|
|
if( IsPlayerActor() && ((CDnPlayerActor*)this)->IsInvalidPlayerChecker() ) break;
|
|||
|
|
|
|||
|
|
SummonBuffBrokenPropStruct *pStruct = (SummonBuffBrokenPropStruct *)pPtr;
|
|||
|
|
|
|||
|
|
MatrixEx Cross = m_Cross;
|
|||
|
|
Cross.m_vPosition += Cross.m_vXAxis * pStruct->vPosition->x;
|
|||
|
|
Cross.m_vPosition += Cross.m_vYAxis * pStruct->vPosition->y;
|
|||
|
|
Cross.m_vPosition += Cross.m_vZAxis * pStruct->vPosition->z;
|
|||
|
|
|
|||
|
|
float fDot = EtVec3Dot( &EtVector3( 0.f, 0.f, 1.f ), &Cross.m_vZAxis );
|
|||
|
|
EtVector3 vRotate;
|
|||
|
|
vRotate = *pStruct->vRotate;
|
|||
|
|
vRotate.y += EtToDegree( acos(fDot) );
|
|||
|
|
|
|||
|
|
BuffBrokenStruct* pBuffBrokenPropInfo = new BuffBrokenStruct;
|
|||
|
|
pBuffBrokenPropInfo->nMonsterTableID = 102; // goblin
|
|||
|
|
pBuffBrokenPropInfo->nDurability = pStruct->nDurability;
|
|||
|
|
pBuffBrokenPropInfo->nItemDropGroupTableID = pStruct->nItemDropGroupTableID;
|
|||
|
|
pBuffBrokenPropInfo->nSkillTableID = pStruct->nSkillTableID;
|
|||
|
|
pBuffBrokenPropInfo->nSkillLevel = pStruct->nSkillLevel;
|
|||
|
|
pBuffBrokenPropInfo->nTeam = pStruct->nTeam;
|
|||
|
|
pBuffBrokenPropInfo->fCheckRange = pStruct->fCheckRange;
|
|||
|
|
|
|||
|
|
CDnGameTask* pGameTask = static_cast<CDnGameTask*>(CTaskManager::GetInstancePtr(GetRoom())->GetTask( "GameTask" ));
|
|||
|
|
|
|||
|
|
DnPropHandle hProp = pGameTask->RequestGenerationProp( pStruct->nSummonPropTableID, PTE_BuffBroken, Cross.m_vPosition, vRotate, *pStruct->vScale, pStruct->nLifeTime, (void*)pBuffBrokenPropInfo );
|
|||
|
|
|
|||
|
|
if( !hProp )
|
|||
|
|
break;
|
|||
|
|
|
|||
|
|
MAActorProp* pActorProp = dynamic_cast<MAActorProp*>(hProp.GetPointer());
|
|||
|
|
_ASSERT( pActorProp );
|
|||
|
|
if( pActorProp )
|
|||
|
|
pActorProp->CopyActorStateFromThis( GetMySmartPtr() );
|
|||
|
|
|
|||
|
|
if( -1 < pStruct->nLifeTime )
|
|||
|
|
hProp->SetLifeTime( pStruct->nLifeTime );
|
|||
|
|
|
|||
|
|
static_cast<CDnWorldBrokenBuffProp*>(hProp.GetPointer())->SetSummoner( GetMySmartPtr() );
|
|||
|
|
|
|||
|
|
hProp->SetMasterActor(GetMySmartPtr());
|
|||
|
|
}
|
|||
|
|
break;
|
|||
|
|
// ****************************************************************************************************************
|
|||
|
|
// <20><><EFBFBD><EFBFBD> <20><>ȯ <20>ñ׳ο<D7B3><CEBF><EFBFBD> <20><>ȯ<EFBFBD>Ǵ<EFBFBD> <20><><EFBFBD><EFBFBD> Ŭ<><C5AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ݵ<EFBFBD><DDB5><EFBFBD> void ReleasePostCustomParam() <20><> <20><><EFBFBD><EFBFBD><EFBFBD>ؾ<EFBFBD> <20><>!!
|
|||
|
|
// ****************************************************************************************************************
|
|||
|
|
case STE_DropItem:
|
|||
|
|
{
|
|||
|
|
DropItemStruct *pStruct = (DropItemStruct*)pPtr;
|
|||
|
|
|
|||
|
|
DNVector(CDnItem::DropItemStruct) VecList;
|
|||
|
|
CDnDropItem::CalcDropItemList( GetRoom(), pStruct->nDropItemTableID, VecList );
|
|||
|
|
|
|||
|
|
MatrixEx Cross = m_Cross;
|
|||
|
|
Cross.m_vPosition += Cross.m_vXAxis * pStruct->vOffset->x;
|
|||
|
|
Cross.m_vPosition += Cross.m_vYAxis * pStruct->vOffset->y;
|
|||
|
|
Cross.m_vPosition += Cross.m_vZAxis * pStruct->vOffset->z;
|
|||
|
|
CDnItemTask *pTask = (CDnItemTask *)CTaskManager::GetInstance(GetRoom()).GetTask( "ItemTask" );
|
|||
|
|
|
|||
|
|
int nSeed = 0;
|
|||
|
|
for( DWORD i=0; i<VecList.size(); i++ )
|
|||
|
|
{
|
|||
|
|
#if defined(PRE_FIX_46730)
|
|||
|
|
//bFixPosition<6F><6E> true<75><65> <20><><EFBFBD><EFBFBD><EFBFBD>Ǹ<EFBFBD> nSeed<65><64><EFBFBD><EFBFBD> 0<><30><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ؼ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ġ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ʵ<EFBFBD><CAB5><EFBFBD> <20>Ѵ<EFBFBD>.
|
|||
|
|
if (( pStruct->bFixPosition?true:false) == true)
|
|||
|
|
nSeed = 0;
|
|||
|
|
else
|
|||
|
|
nSeed = VecList[i].nSeed;
|
|||
|
|
#if defined(PRE_ADD_STAGE_CLEAR_ENCHANT_REWARD)
|
|||
|
|
pTask->RequestDropItem( VecList[i].dwUniqueID, Cross.m_vPosition, VecList[i].nItemID, nSeed, VecList[i].nCount, 0, -1, VecList[i].nEnchantID );
|
|||
|
|
#else // #if defined(PRE_ADD_STAGE_CLEAR_ENCHANT_REWARD)
|
|||
|
|
pTask->RequestDropItem( VecList[i].dwUniqueID, Cross.m_vPosition, VecList[i].nItemID, nSeed, VecList[i].nCount, 0 );
|
|||
|
|
#endif // #if defined(PRE_ADD_STAGE_CLEAR_ENCHANT_REWARD)
|
|||
|
|
#else
|
|||
|
|
#if defined(PRE_ADD_STAGE_CLEAR_ENCHANT_REWARD)
|
|||
|
|
pTask->RequestDropItem( VecList[i].dwUniqueID, Cross.m_vPosition, VecList[i].nItemID, VecList[i].nSeed, VecList[i].nCount, 0, -1, VecList[i].nEnchantID );
|
|||
|
|
#else // #if defined(PRE_ADD_STAGE_CLEAR_ENCHANT_REWARD)
|
|||
|
|
pTask->RequestDropItem( VecList[i].dwUniqueID, Cross.m_vPosition, VecList[i].nItemID, VecList[i].nSeed, VecList[i].nCount, 0 );
|
|||
|
|
#endif // #if defined(PRE_ADD_STAGE_CLEAR_ENCHANT_REWARD)
|
|||
|
|
#endif // PRE_FIX_46730
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
break;
|
|||
|
|
// <20>ѱ<EFBFBD> 2009.7.27
|
|||
|
|
// <20>ڽſ<DABD><C5BF><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> ȿ<><C8BF> <20><><EFBFBD><EFBFBD> <20>ð<EFBFBD> <20><><EFBFBD><EFBFBD> (#1911)
|
|||
|
|
case STE_ApplyStateEffect:
|
|||
|
|
{
|
|||
|
|
// <20><>ų<EFBFBD><C5B3> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF> <20><><EFBFBD><EFBFBD><EFBFBD>DZ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>Ͱ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD> <20>߰<EFBFBD><DFB0><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD>
|
|||
|
|
// <20>Ʒ<EFBFBD><C6B7><EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF> <20><>ƾ<EFBFBD><C6BE> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ű<EFBFBD><C5B0> <20>ʴ´<CAB4>.
|
|||
|
|
if( GetHP() <= 0 )
|
|||
|
|
{
|
|||
|
|
if( m_hAuraSkill && m_hAuraSkill->IsAuraOn() )
|
|||
|
|
{
|
|||
|
|
OnSkillAura( m_hAuraSkill, false );
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
ClearSelfStateSignalBlowQueue();
|
|||
|
|
|
|||
|
|
break;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if( false == m_dqApplySelfStateBlowQ.empty() )
|
|||
|
|
{
|
|||
|
|
ApplyStateEffectStruct* pStruct = (ApplyStateEffectStruct*)pPtr;
|
|||
|
|
if( pStruct->StateEffectIndex < (int)m_dqApplySelfStateBlowQ.size() )
|
|||
|
|
{
|
|||
|
|
const S_NO_PACKET_SELF_STATEBLOW& StateBlowInfo = m_dqApplySelfStateBlowQ.at( pStruct->StateEffectIndex );
|
|||
|
|
ApplyStateEffectSignalProcess(StateBlowInfo, pStruct);
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
OutputDebug( "[Error!!]CDnActor::OnSignal, case STE_ApplyStateEffect: <20><>ų<EFBFBD><C5B3> <20><><EFBFBD><EFBFBD><EFBFBD>ִ<EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF> <20><><EFBFBD><EFBFBD>(%d)<29><> <20><><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF> <20>ε<EFBFBD><CEB5><EFBFBD>(%d)<29><>.\n",
|
|||
|
|
(int)m_dqApplySelfStateBlowQ.size(), pStruct->StateEffectIndex );
|
|||
|
|
_ASSERT( !"case STE_ApplyStateEffect: <20><>ų<EFBFBD><C5B3> <20><><EFBFBD><EFBFBD><EFBFBD>ִ<EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF> <20>ε<EFBFBD><CEB5><EFBFBD><EFBFBD><EFBFBD>" );
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
break;
|
|||
|
|
case STE_Parring:
|
|||
|
|
{
|
|||
|
|
ParringStruct* pStruct = (ParringStruct*)pPtr;
|
|||
|
|
|
|||
|
|
DNVector(DnBlowHandle) vlhParryBlows;
|
|||
|
|
m_pStateBlow->GetStateBlowFromBlowIndex( STATE_BLOW::BLOW_031, vlhParryBlows );
|
|||
|
|
|
|||
|
|
int iNumParryBlow = (int)vlhParryBlows.size();
|
|||
|
|
for( int i = 0; i < iNumParryBlow; ++i )
|
|||
|
|
{
|
|||
|
|
DnBlowHandle hParryBlow = vlhParryBlows.at( i );
|
|||
|
|
if( !hParryBlow )
|
|||
|
|
continue;
|
|||
|
|
|
|||
|
|
const CDnSkill::SkillInfo* pParentSkillInfo = hParryBlow->GetParentSkillInfo();
|
|||
|
|
if( pParentSkillInfo && pStruct->nSkillID == pParentSkillInfo->iSkillID )
|
|||
|
|
{
|
|||
|
|
CDnParryBlow* pParryBlow = static_cast<CDnParryBlow*>(hParryBlow.GetPointer());
|
|||
|
|
|
|||
|
|
if( false == pParryBlow->IsEnabled() )
|
|||
|
|
{
|
|||
|
|
pParryBlow->EnableParrying( pStruct->fProb );
|
|||
|
|
pParryBlow->SetParringActionName( pStruct->szParringActionName );
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
break;
|
|||
|
|
case STE_CooltimeParring:
|
|||
|
|
{
|
|||
|
|
CooltimeParringStruct* pStruct = (CooltimeParringStruct*)pPtr;
|
|||
|
|
|
|||
|
|
DNVector(DnBlowHandle) vlhParryBlows;
|
|||
|
|
m_pStateBlow->GetStateBlowFromBlowIndex( STATE_BLOW::BLOW_153, vlhParryBlows );
|
|||
|
|
|
|||
|
|
int iNumParryBlow = (int)vlhParryBlows.size();
|
|||
|
|
for( int i = 0; i < iNumParryBlow; ++i )
|
|||
|
|
{
|
|||
|
|
DnBlowHandle hParryBlow = vlhParryBlows.at( i );
|
|||
|
|
if( !hParryBlow )
|
|||
|
|
continue;
|
|||
|
|
|
|||
|
|
const CDnSkill::SkillInfo* pParentSkillInfo = hParryBlow->GetParentSkillInfo();
|
|||
|
|
if( pParentSkillInfo && pStruct->nSkillID == pParentSkillInfo->iSkillID )
|
|||
|
|
{
|
|||
|
|
CDnCooltimeParryBlow* pParryBlow = static_cast<CDnCooltimeParryBlow*>(hParryBlow.GetPointer());
|
|||
|
|
|
|||
|
|
if( false == pParryBlow->IsEnabled() )
|
|||
|
|
{
|
|||
|
|
pParryBlow->EnableParrying( pStruct->fProb );
|
|||
|
|
pParryBlow->SetParringActionName( pStruct->szParringActionName );
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
break;
|
|||
|
|
case STE_Gravity:
|
|||
|
|
{
|
|||
|
|
GravityStruct *pStruct = (GravityStruct *)pPtr;
|
|||
|
|
|
|||
|
|
MatrixEx CrossOffset = m_Cross;
|
|||
|
|
CrossOffset.MoveLocalXAxis( pStruct->vOffset->x );
|
|||
|
|
CrossOffset.MoveLocalYAxis( pStruct->vOffset->y );
|
|||
|
|
CrossOffset.MoveLocalZAxis( pStruct->vOffset->z );
|
|||
|
|
|
|||
|
|
DNVector(DnActorHandle) hVecList;
|
|||
|
|
CDnActor::ScanActor( GetRoom(), CrossOffset.m_vPosition, pStruct->fDistanceMax, hVecList );
|
|||
|
|
|
|||
|
|
#ifdef PRE_ADD_GRAVITY_PROPERTY
|
|||
|
|
EtVector3 vPos = CrossOffset.m_vPosition;
|
|||
|
|
|
|||
|
|
float fXZDistanceMaxSQ = pStruct->fDistanceMax;
|
|||
|
|
float fXZDistanceMinSQ = pStruct->fDistanceMin;
|
|||
|
|
|
|||
|
|
fXZDistanceMaxSQ *= fXZDistanceMaxSQ;
|
|||
|
|
fXZDistanceMinSQ *= fXZDistanceMinSQ;
|
|||
|
|
|
|||
|
|
SAABox Box;
|
|||
|
|
float fDot = 0.0f;
|
|||
|
|
EtVector3 vZVec = m_Cross.m_vZAxis;
|
|||
|
|
|
|||
|
|
if( pStruct->fCenterAngle != 0.f )
|
|||
|
|
{
|
|||
|
|
EtMatrix matRotate;
|
|||
|
|
EtMatrixRotationY( &matRotate, EtToRadian( pStruct->fCenterAngle ) );
|
|||
|
|
EtVec3TransformNormal( &vZVec, &vZVec, &matRotate );
|
|||
|
|
}
|
|||
|
|
#endif // PRE_ADD_GRAVITY_PROPERTY
|
|||
|
|
|
|||
|
|
for( DWORD i=0; i<hVecList.size(); i++ ) {
|
|||
|
|
if( !hVecList[i] ) continue;
|
|||
|
|
if( hVecList[i] == GetMySmartPtr() ) continue;
|
|||
|
|
if( hVecList[i]->IsDie() ) continue;
|
|||
|
|
if( hVecList[i]->GetWeight() == 0.f ) continue;
|
|||
|
|
if( hVecList[i]->IsNpcActor() ) continue;
|
|||
|
|
if( hVecList[i]->ProcessIgnoreGravitySignal() ) continue;
|
|||
|
|
|
|||
|
|
bool bHittable = false;
|
|||
|
|
switch( pStruct->nTargetType ) {
|
|||
|
|
case 0: // Enemy
|
|||
|
|
if( hVecList[i]->GetTeam() == GetTeam() ) break;
|
|||
|
|
bHittable = true;
|
|||
|
|
break;
|
|||
|
|
case 1: // Friend
|
|||
|
|
if( hVecList[i]->GetTeam() != GetTeam() ) break;
|
|||
|
|
bHittable = true;
|
|||
|
|
break;
|
|||
|
|
case 2: // All
|
|||
|
|
bHittable = true;
|
|||
|
|
break;
|
|||
|
|
}
|
|||
|
|
if( !bHittable ) continue;
|
|||
|
|
|
|||
|
|
bHittable = true;
|
|||
|
|
switch( pStruct->nApplyTargetState ) {
|
|||
|
|
case 0: // Normal
|
|||
|
|
if( hVecList[i]->GetState() == CDnActorState::Down ) break;
|
|||
|
|
bHittable = true;
|
|||
|
|
break;
|
|||
|
|
case 1: // Down
|
|||
|
|
if( !( hVecList[i]->GetState() & CDnActorState::Down ) ) break;
|
|||
|
|
bHittable = true;
|
|||
|
|
break;
|
|||
|
|
case 2: // Normal + Down
|
|||
|
|
bHittable = true;
|
|||
|
|
break;
|
|||
|
|
}
|
|||
|
|
if( !bHittable ) continue;
|
|||
|
|
|
|||
|
|
#ifdef PRE_ADD_GRAVITY_PROPERTY
|
|||
|
|
bool bCheckArea = true;
|
|||
|
|
DnActorHandle hActor = hVecList[i];
|
|||
|
|
EtVector3 vDirActorToPos;
|
|||
|
|
vDirActorToPos = *hActor->GetPosition() - vPos;
|
|||
|
|
vDirActorToPos.y = 0.f;
|
|||
|
|
|
|||
|
|
hActor->GetBoundingBox( Box );
|
|||
|
|
|
|||
|
|
float fSQDistance = SquaredDistance( vPos, Box );
|
|||
|
|
|
|||
|
|
if( fSQDistance > fXZDistanceMaxSQ )
|
|||
|
|
bCheckArea = false;
|
|||
|
|
|
|||
|
|
if( fSQDistance <= fXZDistanceMinSQ )
|
|||
|
|
bCheckArea = false;
|
|||
|
|
|
|||
|
|
if( pStruct->fAngle != 0.0f )
|
|||
|
|
{
|
|||
|
|
EtVec3Normalize( &vDirActorToPos, &vDirActorToPos );
|
|||
|
|
fDot = EtVec3Dot( &vZVec, &vDirActorToPos );
|
|||
|
|
if( EtToDegree( acos( fDot ) ) > pStruct->fAngle )
|
|||
|
|
bCheckArea = false;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if( pStruct->fHeightMax == 0.0f )
|
|||
|
|
pStruct->fHeightMax = 3000.0f;
|
|||
|
|
|
|||
|
|
if( Box.Min.y < vPos.y + pStruct->fHeightMin && Box.Max.y < vPos.y + pStruct->fHeightMin )
|
|||
|
|
bCheckArea = false;
|
|||
|
|
|
|||
|
|
if( Box.Min.y > vPos.y + pStruct->fHeightMax && Box.Max.y > vPos.y + pStruct->fHeightMax )
|
|||
|
|
bCheckArea = false;
|
|||
|
|
|
|||
|
|
if( !bCheckArea )
|
|||
|
|
{
|
|||
|
|
hActor->SetVelocityZ( 0.0f );
|
|||
|
|
hActor->SetResistanceZ( 0.0f );
|
|||
|
|
hActor->ResetLook();
|
|||
|
|
continue;
|
|||
|
|
}
|
|||
|
|
#endif // PRE_ADD_GRAVITY_PROPERTY
|
|||
|
|
|
|||
|
|
MAMovementBase *pMovement = hVecList[i]->GetMovement();
|
|||
|
|
if( !pMovement ) continue;
|
|||
|
|
|
|||
|
|
EtVector3 vDir = *hVecList[i]->GetPosition() - CrossOffset.m_vPosition;
|
|||
|
|
float fDistance = EtVec3Length( &vDir );
|
|||
|
|
float fDistance2 = EtVec3Length( &EtVector3( vDir.x, 0.f, vDir.z ) );
|
|||
|
|
EtVec3Normalize( &vDir, &vDir );
|
|||
|
|
|
|||
|
|
#ifdef PRE_ADD_GRAVITY_PROPERTY
|
|||
|
|
float fDistanceMaxToMin = pStruct->fDistanceMax - pStruct->fDistanceMin;
|
|||
|
|
float fTemp = 0.0f;
|
|||
|
|
if( fDistanceMaxToMin > 0.0f )
|
|||
|
|
fTemp = pStruct->fMinVelocity + ( ( (pStruct->fMaxVelocity - pStruct->fMinVelocity) / fDistanceMaxToMin ) * ( fDistanceMaxToMin - fDistance ) );
|
|||
|
|
|
|||
|
|
float fHeight = CrossOffset.m_vPosition.y - hVecList[i]->GetPosition()->y;
|
|||
|
|
float fHeightMaxToMin = pStruct->fHeightMax - pStruct->fHeightMin;
|
|||
|
|
float fTempVertical = 0.0f;
|
|||
|
|
if( fHeightMaxToMin > 0.0f )
|
|||
|
|
fTempVertical = pStruct->fMinVelocity_Vertical + ( ( (pStruct->fMaxVelocity_Vertical - pStruct->fMinVelocity_Vertical) / fHeightMaxToMin ) * ( fHeightMaxToMin - fHeight ) );
|
|||
|
|
#else // PRE_ADD_GRAVITY_PROPERTY
|
|||
|
|
float fTemp = pStruct->fMinVelocity + ( ( (pStruct->fMaxVelocity - pStruct->fMinVelocity) / pStruct->fDistanceMax ) * ( pStruct->fDistanceMax - fDistance ) );
|
|||
|
|
#endif // PRE_ADD_GRAVITY_PROPERTY
|
|||
|
|
EtVector3 vVel;
|
|||
|
|
if( pMovement ) {
|
|||
|
|
EtVector3 vCurLook = *pMovement->GetLookDir();
|
|||
|
|
pMovement->Look( EtVec3toVec2(vDir), true );
|
|||
|
|
pMovement->SetVelocityZ( -fTemp );
|
|||
|
|
pMovement->SetResistanceZ( fTemp * 2.f );
|
|||
|
|
#ifdef PRE_ADD_GRAVITY_PROPERTY
|
|||
|
|
if( fTempVertical > 0.0f )
|
|||
|
|
{
|
|||
|
|
pMovement->SetVelocityY( fTempVertical );
|
|||
|
|
pMovement->SetResistanceY( fTempVertical * 2.f );
|
|||
|
|
pMovement->SetAppliedYDistance( true );
|
|||
|
|
hVecList[i]->SetGravityEnd( 0.2f + ( float(SignalEndTime - SignalStartTime) / 1000.0f ) );
|
|||
|
|
}
|
|||
|
|
#endif // PRE_ADD_GRAVITY_PROPERTY
|
|||
|
|
pMovement->Look( EtVec3toVec2(vCurLook), true );
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
break;
|
|||
|
|
case STE_MoveY:
|
|||
|
|
{
|
|||
|
|
if( m_pMovement )
|
|||
|
|
{
|
|||
|
|
MoveYStruct* pStruct = (MoveYStruct*)pPtr;
|
|||
|
|
float fYDelta = pStruct->fVelocityY * ((float(SignalEndTime - SignalStartTime) / 1000.0f));
|
|||
|
|
float fWholeMoveYDistance = (0.0f < fYDelta) ? fYDelta : -fYDelta;
|
|||
|
|
m_pMovement->SetMoveYDistancePerSec( pStruct->fVelocityY, fWholeMoveYDistance, (pStruct->bMaintainYPos == TRUE) ? true : false );
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
break;
|
|||
|
|
// Signal Rotate.
|
|||
|
|
case STE_Rotate:
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
RotateStruct * pStruct = static_cast< RotateStruct * >( pPtr );
|
|||
|
|
float fLength = (float)( SignalEndTime - SignalStartTime ) * (CDnActionBase::m_fFPS / 60.0f);
|
|||
|
|
DWORD dwTime = (DWORD)( fLength - 16.6666f );
|
|||
|
|
SetRotate( dwTime, pStruct->fStartSpeed, pStruct->fEndSpeed, *(pStruct->vAxis), pStruct->bLeft == TRUE ? true : false );
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
break;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
LOCAL_TIME CDnActor::CheckRemainFrameTime()
|
|||
|
|
{
|
|||
|
|
float fCurFrame = GetCurFrame();
|
|||
|
|
int nCurActionIndex = GetCurrentActionIndex();
|
|||
|
|
ActionElementStruct *pStruct = GetElement(nCurActionIndex);
|
|||
|
|
LOCAL_TIME remainTime = 0;
|
|||
|
|
|
|||
|
|
if (pStruct)
|
|||
|
|
remainTime = pStruct->dwLength - (LOCAL_TIME)fCurFrame;
|
|||
|
|
|
|||
|
|
return remainTime;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
bool CDnActor::SetActionQueue( const char *szActionName, int nLoopCount, float fBlendFrame, float fStartFrame, bool bCheck, bool bCheckStateEffect )
|
|||
|
|
{
|
|||
|
|
if( m_pStateBlow->IsApplied( STATE_BLOW::BLOW_224 ) )
|
|||
|
|
{
|
|||
|
|
DNVector(DnBlowHandle) vlhDisableActionSetBlow;
|
|||
|
|
m_pStateBlow->GetStateBlowFromBlowIndex( STATE_BLOW::BLOW_224, vlhDisableActionSetBlow );
|
|||
|
|
|
|||
|
|
// <20><EFBFBD> <20><> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20>ִ<EFBFBD>.
|
|||
|
|
int iNumBlow = (int)vlhDisableActionSetBlow.size();
|
|||
|
|
for( int i = 0; i < iNumBlow; ++i )
|
|||
|
|
{
|
|||
|
|
CDnDisableActionBlow* pDisableActionSetBlow = static_cast<CDnDisableActionBlow*>( vlhDisableActionSetBlow.at( i ).GetPointer() );
|
|||
|
|
if(pDisableActionSetBlow->IsMatchedAction(szActionName))
|
|||
|
|
return false;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
const char *szName = szActionName;
|
|||
|
|
|
|||
|
|
if( bCheck ) {
|
|||
|
|
if( m_szActionQueue.empty() ) {
|
|||
|
|
if( strcmp( szName, m_szAction.c_str() ) == NULL )
|
|||
|
|
{
|
|||
|
|
LOCAL_TIME remainTime = CheckRemainFrameTime();
|
|||
|
|
|
|||
|
|
//<2F><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ٸ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ٰ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ѵ<EFBFBD>..
|
|||
|
|
if (remainTime >= 20)
|
|||
|
|
return false;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
else {
|
|||
|
|
if( strcmp( szName, m_szActionQueue.c_str() ) == NULL )
|
|||
|
|
{
|
|||
|
|
LOCAL_TIME remainTime = CheckRemainFrameTime();
|
|||
|
|
|
|||
|
|
//<2F><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ٸ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ٰ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ѵ<EFBFBD>..
|
|||
|
|
if (remainTime >= 20)
|
|||
|
|
return false;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
int nCurrentActionIndex = GetElementIndex( szName );
|
|||
|
|
if( bCheckStateEffect && nCurrentActionIndex > -1 )
|
|||
|
|
{
|
|||
|
|
int nActionState = GetState( nCurrentActionIndex );
|
|||
|
|
|
|||
|
|
// State<74><65> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>~
|
|||
|
|
// <20><><EFBFBD>ݺҰ<DDBA><D2B0><EFBFBD> <20><> <20><><EFBFBD><EFBFBD> state <20><> <20><EFBFBD><D7BC><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>.
|
|||
|
|
if( (nActionState & ActorStateEnum::Attack) && !( nActionState & ActorStateEnum::IgnoreCantAction) )
|
|||
|
|
{
|
|||
|
|
if( (GetStateEffect() & CDnActorState::Cant_AttackAction) == CDnActorState::Cant_AttackAction )
|
|||
|
|
{
|
|||
|
|
if( !IsDie() || IsGMTrace() )
|
|||
|
|
return false;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
CDnActionBase::SetActionQueue( szName, nLoopCount, fBlendFrame, fStartFrame );
|
|||
|
|
if( nCurrentActionIndex != -1 ) {
|
|||
|
|
for( int i=(int)m_VecPreActionState[nCurrentActionIndex].size()-1; i>=0; i-- ) {
|
|||
|
|
if( (int)fStartFrame >= m_VecPreActionState[nCurrentActionIndex][i].nOffset ) {
|
|||
|
|
SetState( (CDnActorState::ActorStateEnum)m_VecPreActionState[nCurrentActionIndex][i].nState );
|
|||
|
|
break;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
for( int i=(int)m_VecPreActionCustomState[nCurrentActionIndex].size()-1; i>=0; i-- ) {
|
|||
|
|
if( (int)fStartFrame >= m_VecPreActionCustomState[nCurrentActionIndex][i].nOffset ) {
|
|||
|
|
SetCustomState( (CDnActorState::ActorCustomStateEnum)m_VecPreActionCustomState[nCurrentActionIndex][i].nState );
|
|||
|
|
break;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
for( int i=(int)m_VecPreCanMoveState[nCurrentActionIndex].size()-1; i>=0; i-- ) {
|
|||
|
|
if( (int)fStartFrame >= m_VecPreCanMoveState[nCurrentActionIndex][i].nOffset ) {
|
|||
|
|
SetMovable( ( m_VecPreCanMoveState[nCurrentActionIndex][i].nState == TRUE ) ? true : false );
|
|||
|
|
break;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
return true;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::SetCustomAction( const char *szActionName, float fFrame )
|
|||
|
|
{
|
|||
|
|
if( m_hToggleSkill && m_hToggleSkill->IsToggleOn() )
|
|||
|
|
{
|
|||
|
|
CDnChangeActionStrProcessor* pChangeAction = static_cast<CDnChangeActionStrProcessor*>( m_hToggleSkill->GetProcessor( IDnSkillProcessor::CHANGE_ACTIONSTR ) );
|
|||
|
|
if( pChangeAction ) {
|
|||
|
|
pChangeAction->GetChangeActionName( szActionName );
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
CDnActionBase::SetCustomAction( szActionName, fFrame );
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::ProcessDown( LOCAL_TIME LocalTime, float fDelta )
|
|||
|
|
{
|
|||
|
|
if( IsDie() ) return;
|
|||
|
|
if( GetState() == CDnActorState::Down && m_fDownDelta > 0.f )
|
|||
|
|
{
|
|||
|
|
m_fDownDelta -= ( fDelta * ( ( 1.f / 60.f ) * CDnActionBase::GetFPS() ) );
|
|||
|
|
if( m_fDownDelta <= 0.f ) {
|
|||
|
|
m_fDownDelta = 0.f;
|
|||
|
|
m_fLastDownRatio = 1.f;
|
|||
|
|
SetActionQueue( "Down_StandUp", 0, 0.f, 0.f, true, false );
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::ProcessStiff( LOCAL_TIME LocalTime, float fDelta )
|
|||
|
|
{
|
|||
|
|
if( IsDie() ) return;
|
|||
|
|
|
|||
|
|
if( IsStiff() ) {
|
|||
|
|
if( m_fStiffDelta == 0.f ) return;
|
|||
|
|
m_fStiffDelta -= ( fDelta * ( ( 1.f / 60.f ) * CDnActionBase::GetFPS() ) );
|
|||
|
|
if( m_fStiffDelta <= 0.f ) {
|
|||
|
|
m_fStiffDelta = 0.f;
|
|||
|
|
ActionElementStruct *pStruct = GetElement( m_szAction.c_str() );
|
|||
|
|
if( pStruct ) SetActionQueue( pStruct->szNextActionName.c_str(), 0, 3.f );
|
|||
|
|
else SetActionQueue( "Stand", 0, 3.f );
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
else m_fStiffDelta = 0.f;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::ProcessDie( LOCAL_TIME LocalTime, float fDelta )
|
|||
|
|
{
|
|||
|
|
if( !IsDie() ) return;
|
|||
|
|
m_fDieDelta -= fDelta;
|
|||
|
|
if( m_fDieDelta <= 0.f ) {
|
|||
|
|
SetDestroy();
|
|||
|
|
return;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::RequestKillAfterProcessStateBlow(DnActorHandle hHitter)
|
|||
|
|
{
|
|||
|
|
m_bCompleteKill_AfterProcessStateBlow = true;
|
|||
|
|
m_hCompleteKillActor = hHitter;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::ExecuteKillAfterProcessStateBlow()
|
|||
|
|
{
|
|||
|
|
if(m_bCompleteKill_AfterProcessStateBlow)
|
|||
|
|
{
|
|||
|
|
SetHP( 0 );
|
|||
|
|
RequestHPMPDelta( CDnState::ElementEnum_Amount, -( GetMaxHP() *2 ), GetUniqueID() );
|
|||
|
|
m_bCompleteKill_AfterProcessStateBlow = false;
|
|||
|
|
|
|||
|
|
//<2F><><EFBFBD><EFBFBD> Dieȣ<65><C8A3>
|
|||
|
|
Die(m_hCompleteKillActor);
|
|||
|
|
m_hCompleteKillActor.Identity();
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::CmdRefreshHPSP( INT64 nHP, int nSP )
|
|||
|
|
{
|
|||
|
|
SetHP( min( nHP, GetMaxHP() ) );
|
|||
|
|
SetSP( min( nSP, GetMaxSP() ) );
|
|||
|
|
|
|||
|
|
BYTE pBuffer[128];
|
|||
|
|
CPacketCompressStream Stream( pBuffer, 128 );
|
|||
|
|
Stream.Write( &m_nHP, sizeof(INT64) );
|
|||
|
|
Stream.Write( &m_nSP, sizeof(int) );
|
|||
|
|
|
|||
|
|
//printf("[RLKT_DEBUG][%s] CurHP: %lld FuncRecvCurHP: %lld SP: %d\n", __FUNCTION__, m_nHP, nHP , m_nSP);
|
|||
|
|
|
|||
|
|
Send( eActor::SC_REFRESHHPSP, &Stream );
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::CmdAction( const char *szActionName, int nLoopCount, float fBlendFrame, bool bCheckOverlapAction, bool bFromStateBlow/* = false*/, bool bSkillChain/* = false*/ )
|
|||
|
|
{
|
|||
|
|
SetActionQueue( szActionName, nLoopCount, fBlendFrame, 0.f, bCheckOverlapAction );
|
|||
|
|
|
|||
|
|
// Note: <20><><EFBFBD><EFBFBD>¡ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ó<><C3B3> <20>Է¿<D4B7> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><EFBFBD><D7BC><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><>ų<EFBFBD><C5B3>
|
|||
|
|
// <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD> <20><><EFBFBD>ӵǾ<D3B5><C7BE><EFBFBD> <20>ϹǷ<CFB9> <20><>ų <20>ʿ<EFBFBD> <20>˷<EFBFBD><CBB7>ֵ<EFBFBD><D6B5><EFBFBD> <20>Ѵ<EFBFBD>.
|
|||
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD>δ<EFBFBD> CmdActon <20><> ȣ<><C8A3><EFBFBD><EFBFBD> <20><> <20><>Ŷ<EFBFBD><C5B6> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>ư<EFBFBD>.
|
|||
|
|
if( bSkillChain )
|
|||
|
|
{
|
|||
|
|
if( m_hProcessSkill )
|
|||
|
|
m_hProcessSkill->OnChainInput( szActionName );
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
int CDnActor::CmdAddStateEffect( const CDnSkill::SkillInfo* pParentSkillInfo, STATE_BLOW::emBLOW_INDEX emBlowIndex, int nDurationTime, const char *szParam, bool bOnPlayerInit/* = false*/, bool bCheckCanBegin/* = true*/ , bool bEternity /*= false*/ )
|
|||
|
|
{
|
|||
|
|
if( emBlowIndex < STATE_BLOW::BLOW_NONE || emBlowIndex >= STATE_BLOW::BLOW_MAX )
|
|||
|
|
{
|
|||
|
|
if( pParentSkillInfo )
|
|||
|
|
g_Log.Log(LogType::_ERROR, L"[CDnActor::CmdAddStateEffect] SkillID:%d, STATE_BLOW:%d\r\n", pParentSkillInfo->iSkillID, emBlowIndex );
|
|||
|
|
else
|
|||
|
|
g_Log.Log(LogType::_ERROR, L"[CDnActor::CmdAddStateEffect] STATE_BLOW:%d\r\n", emBlowIndex);
|
|||
|
|
return -1;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// [2011/03/18 semozz]
|
|||
|
|
// <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF> <20><><EFBFBD><EFBFBD> Begin<69><6E> <20><><EFBFBD><EFBFBD> <20>ڵ<EFBFBD> <20><><EFBFBD><EFBFBD>
|
|||
|
|
int nBlowID = AddStateBlow( emBlowIndex, pParentSkillInfo, nDurationTime, szParam, bOnPlayerInit, bCheckCanBegin , bEternity );
|
|||
|
|
|
|||
|
|
DnBlowHandle hBlow = GetStateBlowFromID(nBlowID);
|
|||
|
|
if (pParentSkillInfo && pParentSkillInfo->bItemPrefixSkill)
|
|||
|
|
ForceBeginStateBlow(hBlow);
|
|||
|
|
|
|||
|
|
return nBlowID;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::CmdModifyStateEffect( int iBlowID, STATE_BLOW& StateBlowInfo )
|
|||
|
|
{
|
|||
|
|
DnBlowHandle hBlow = m_pStateBlow->GetStateBlowFromID( iBlowID );
|
|||
|
|
|
|||
|
|
if( hBlow )
|
|||
|
|
{
|
|||
|
|
char acBuffer[ 32 ];
|
|||
|
|
CPacketCompressStream Stream( acBuffer, sizeof(acBuffer) );
|
|||
|
|
|
|||
|
|
Stream.Write( &iBlowID, sizeof(int) );
|
|||
|
|
Stream.Write( &StateBlowInfo.fDurationTime, sizeof(float) );
|
|||
|
|
|
|||
|
|
Send( eActor::SC_CMDMODIFYSTATEEFFECT, &Stream );
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
DnBlowHandle CDnActor::GetStateBlowFromID( int nStateBlowID )
|
|||
|
|
{
|
|||
|
|
return m_pStateBlow->GetStateBlowFromID( nStateBlowID );
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::CmdRemoveStateEffect( STATE_BLOW::emBLOW_INDEX emBlowIndex, bool bRemoveFromServerToo/* = true*/ )
|
|||
|
|
{
|
|||
|
|
DelStateBlow( emBlowIndex );
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::CmdRemoveStateEffectImmediately( STATE_BLOW::emBLOW_INDEX emBlowIndex )
|
|||
|
|
{
|
|||
|
|
if( !m_pStateBlow )
|
|||
|
|
return;
|
|||
|
|
|
|||
|
|
m_pStateBlow->RemoveImediatlyStateEffectByBlowIndex( emBlowIndex );
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::CmdRemoveStateEffectFromID( int nID )
|
|||
|
|
{
|
|||
|
|
#ifdef PRE_FIX_REMOVE_STATE_EFFECT_PACKET
|
|||
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ְԵǸ<D4B5> <20><><EFBFBD><EFBFBD><EFBFBD>ս<EFBFBD> <20><><EFBFBD>ϰ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><E2B6A7><EFBFBD><EFBFBD> <20>ϴ<EFBFBD><CFB4><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ʽ<EFBFBD><CABD>ϴ<EFBFBD>.
|
|||
|
|
// <20>ظ<EFBFBD><D8B8>Ѱ<EFBFBD><D1B0>쿡<EFBFBD><ECBFA1><EFBFBD><EFBFBD> <20><><EFBFBD>ο<EFBFBD> <20><><EFBFBD>̵<EFBFBD><CCB5><EFBFBD> ã<><C3A3><EFBFBD><EFBFBD><EFBFBD>Ŀ<EFBFBD> <20>־<EFBFBD><D6BE>ֱ<D6B1><E2B6A7><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>˻<EFBFBD><CBBB><EFBFBD> <20>ʿ<EFBFBD><CABF><EFBFBD> <20><><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
|||
|
|
// if( m_pStateBlow->IsExistStateBlowFromBlowID( nID ) == false )
|
|||
|
|
// return;
|
|||
|
|
#endif
|
|||
|
|
|
|||
|
|
m_pStateBlow->RemoveStateBlowFromID( nID );
|
|||
|
|
SendRemoveStateEffectFromID(nID);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::ClearTriggerBuff()
|
|||
|
|
{
|
|||
|
|
for( int itr = 0; itr < (int)m_vTriggerBuff.size(); ++itr )
|
|||
|
|
CmdRemoveStateEffectFromID( m_vTriggerBuff[itr] );
|
|||
|
|
|
|||
|
|
m_vTriggerBuff.clear();
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::CmdWarp()
|
|||
|
|
{
|
|||
|
|
CmdWarp( *GetPosition(), EtVec3toVec2( *GetLookDir() ) );
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::CmdWarp( EtVector3 &vPos, EtVector2 &vLook, CDNUserSession* pGameSession/*=NULL*/, bool bCheckPlayerFollowSummonedMonster/*=false*/ )
|
|||
|
|
{
|
|||
|
|
SetPosition( vPos );
|
|||
|
|
SetPrevPosition( vPos );
|
|||
|
|
Look( vLook, true );
|
|||
|
|
if( abs( CDnWorld::GetInstance(GetRoom()).GetHeight( vPos ) - vPos.y ) > 5.f ) {
|
|||
|
|
SetVelocityY( -3.0f );
|
|||
|
|
SetResistanceY( -18.0f );
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
BYTE pBuffer[128];
|
|||
|
|
CPacketCompressStream Stream( pBuffer, 128 );
|
|||
|
|
|
|||
|
|
Stream.Write( &vPos, sizeof(EtVector3), CPacketCompressStream::VECTOR3_BIT );
|
|||
|
|
Stream.Write( &vLook, sizeof(EtVector2), CPacketCompressStream::VECTOR2_SHORT );
|
|||
|
|
|
|||
|
|
// pGameSession <20><> <20>ִ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ش<EFBFBD> <20><><EFBFBD>ǿ<EFBFBD><C7BF>Ը<EFBFBD> <20><>Ŷ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
|||
|
|
if( pGameSession )
|
|||
|
|
Send( pGameSession, eActor::SC_CMDWARP, GetUniqueID(), &Stream );
|
|||
|
|
else
|
|||
|
|
Send( eActor::SC_CMDWARP, &Stream );
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
bool CDnActor::CheckDamageAction( DnActorHandle hActor )
|
|||
|
|
{
|
|||
|
|
MAMovementBase *pMovement = GetMovement();
|
|||
|
|
// <20><><EFBFBD>缼 <20><><EFBFBD><EFBFBD>
|
|||
|
|
if( ( IsAir() ) ||
|
|||
|
|
( IsHit() && IsDown() && !IsStun() )
|
|||
|
|
|| GetState() == ActorStateEnum::Down )
|
|||
|
|
{
|
|||
|
|
if( IsStandHit( m_HitParam.szActionName.c_str() ) )
|
|||
|
|
{
|
|||
|
|
m_HitParam.szActionName = "Hit_AirBounce";
|
|||
|
|
m_HitParam.vVelocity.y = pMovement->GetLastVelocity()->y * 0.8f;
|
|||
|
|
m_HitParam.vResistance.y = pMovement->GetResistance()->y;
|
|||
|
|
|
|||
|
|
if( m_HitParam.vVelocity.y > 0.f && m_HitParam.vResistance.y >= 0.f )
|
|||
|
|
{
|
|||
|
|
m_HitParam.vResistance.y = -18.f;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
return true;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::CheckDamageVelocity( DnActorHandle hActor )
|
|||
|
|
{
|
|||
|
|
MAMovementBase *pMovement = GetMovement();
|
|||
|
|
|
|||
|
|
// <20>ٶ<D9B6> <20><><EFBFBD><EFBFBD>
|
|||
|
|
EtVector2 vViewVec = EtVec3toVec2( m_HitParam.vViewVec );
|
|||
|
|
EtVec2Normalize( &vViewVec, &vViewVec );
|
|||
|
|
if( EtVec2LengthSq( &vViewVec ) > 0.f ) {
|
|||
|
|
pMovement->Look( vViewVec );
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// <20><><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ִ<EFBFBD> <20><><EFBFBD>°<EFBFBD> <20>ƴԿ<C6B4><D4BF><EFBFBD> Air <20><> Hit <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>츦 <20><><EFBFBD><EFBFBD><EFBFBD>ؼ<EFBFBD> <20><><EFBFBD>⼭ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ġ<EFBFBD><C4A1> <20><><EFBFBD><EFBFBD><EFBFBD>ֱ<EFBFBD><D6B1><EFBFBD> <20><><EFBFBD><EFBFBD>
|
|||
|
|
// (ex. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ִ³<D6B4> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴµ<CFB4> y<><79><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ӵ<EFBFBD><D3B5><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ʱ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ִ»<D6B4><C2BB>·<EFBFBD> <20><><EFBFBD>ϰ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ǵ<EFBFBD> <20><><EFBFBD>찡 <20>ִ<EFBFBD>. )
|
|||
|
|
ActorStateEnum HitState = (ActorStateEnum)GetState( m_HitParam.szActionName.c_str() );
|
|||
|
|
if( ( HitState & ActorStateEnum::Air ) && m_HitParam.vVelocity.y == 0.f ) {
|
|||
|
|
m_HitParam.vVelocity.y = 3.f;
|
|||
|
|
m_HitParam.vResistance.y = -18.f;
|
|||
|
|
}
|
|||
|
|
if( m_HitParam.vVelocity.y == 0.f && pMovement->GetVelocity() && pMovement->GetVelocity()->y != 0.f &&
|
|||
|
|
( GetAddHeight() != 0.f ) || ( m_HitParam.szActionName.empty() && ( GetState() & ActorStateEnum::Air ) ) ) {
|
|||
|
|
m_HitParam.vVelocity.y = pMovement->GetVelocity()->y;
|
|||
|
|
m_HitParam.vResistance.y = pMovement->GetResistance()->y;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// Weight <20><> 0<≯<EFBFBD> <20>ȶߴ³<DFB4><C2B3>̴<EFBFBD>. <20><EFBFBD><D7B7><EFBFBD> <20>ñ׳<C3B1><D7B3>߿<EFBFBD> Air <20><><EFBFBD>·<EFBFBD> <20><><EFBFBD>ְԵǸ<D4B5> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ó<EFBFBD><C3B3><EFBFBD><EFBFBD>ƾ<EFBFBD><C6BE> <20><><EFBFBD><EFBFBD><EFBFBD>ϰԵDZⶫ<C7B1><E2B6AB>
|
|||
|
|
// <20>ٴڿ<D9B4><DABF><EFBFBD> Air <20><> <20><><EFBFBD><EFBFBD><EFBFBD>Ǵ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 0<>γ<EFBFBD><CEB3><EFBFBD> <20><><EFBFBD>°<EFBFBD> <20><><EFBFBD><EFBFBD> Air <20><> <20>Ǹ<EFBFBD> <20>ȵȴ<C8B5>.
|
|||
|
|
if( GetWeight() == 0.f )
|
|||
|
|
{
|
|||
|
|
// <20>ܵ<EFBFBD><DCB5><EFBFBD>(301) <20><><EFBFBD><EFBFBD> Ʈ<><C6AE>ó<EFBFBD><C3B3> <20><><EFBFBD><EFBFBD> 0.0 <20><><EFBFBD><EFBFBD> <20>ٲٴ<D9B2> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20>¾Ƽ<C2BE>
|
|||
|
|
// <20><><EFBFBD>߿<EFBFBD> <20>ߴ<EFBFBD> <20>˹<EFBFBD> <20><EFBFBD><D7BC><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ϴ<EFBFBD> <20><><EFBFBD>װ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD> <20><><EFBFBD><EFBFBD>. (#12253)
|
|||
|
|
if( IsAir( m_HitParam.szActionName.c_str() ) )
|
|||
|
|
m_HitParam.szActionName.assign( GetCurrentAction() );
|
|||
|
|
|
|||
|
|
m_HitParam.vVelocity = EtVector3( 0.f, 0.f, 0.f );
|
|||
|
|
m_HitParam.vResistance = EtVector3( 0.f, 0.f, 0.f );
|
|||
|
|
}
|
|||
|
|
pMovement->SetVelocity( m_HitParam.vVelocity );
|
|||
|
|
pMovement->SetResistance( m_HitParam.vResistance );
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
int GetGaussianRandom( int nMin, int nMax, CMultiRoom *pRoom )
|
|||
|
|
{
|
|||
|
|
float f1 = ( _rand(pRoom) % 10001 ) / 10000.f;
|
|||
|
|
float f2 = ( _rand(pRoom) % 10001 ) / 10000.f;
|
|||
|
|
|
|||
|
|
int nResult = (int)( ((nMin+nMax)/2.f) + ( ( sqrt(-2.f*log(f1)) * cos(2.f*3.1415926f*f2) ) * ((nMax-nMin)/6.f) ) );
|
|||
|
|
|
|||
|
|
if( nResult < nMin || nResult > nMax )
|
|||
|
|
nResult = (nMin + nMax) / 2;
|
|||
|
|
|
|||
|
|
return nResult;
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
float GetGaussianRandom( float fMin, float fMax, CMultiRoom *pRoom, float fPrecision = 0.01f )
|
|||
|
|
{
|
|||
|
|
float f1 = ( _rand(pRoom) % 10001 ) / 10000.f;
|
|||
|
|
float f2 = ( _rand(pRoom) % 10001 ) / 10000.f;
|
|||
|
|
|
|||
|
|
float fResult = ((fMin+fMax)/2.f) + ( ( sqrt(-2.f*log(f1)) * cos(2.f*3.1415926f*f2) ) * ((fMax-fMin)/6.f) );
|
|||
|
|
|
|||
|
|
if( fResult < fMin || fResult > fMax )
|
|||
|
|
fResult = (fMin + fMax) / 2;
|
|||
|
|
|
|||
|
|
return fResult;
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
|
|||
|
|
CDnState::ElementEnum CDnActor::CalcHitElementType( bool bUseSkillApplyWeaponElement, CDnState::ElementEnum eSkillElement, bool bUsingSkill )
|
|||
|
|
{
|
|||
|
|
// #33312 Ư<><C6AF> <20><>Ȳ<EFBFBD><C8B2><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Ӽ<EFBFBD><D3BC><EFBFBD> <20>ִٸ<D6B4> <20>ش<EFBFBD> <20>Ӽ<EFBFBD><D3BC><EFBFBD><EFBFBD><EFBFBD> ó<><C3B3>.
|
|||
|
|
if( false == m_vlForceSettedHitElement.empty() )
|
|||
|
|
return static_cast<CDnState::ElementEnum>(m_vlForceSettedHitElement.back());
|
|||
|
|
|
|||
|
|
bool bProcessSkill = (m_hProcessSkill ? true : false);
|
|||
|
|
ElementEnum eProcessSkillElement = CDnState::ElementEnum_Amount;
|
|||
|
|
if( m_hProcessSkill )
|
|||
|
|
eProcessSkillElement = m_hProcessSkill->GetElement();
|
|||
|
|
|
|||
|
|
// <20>ܺο<DCBA><CEBF><EFBFBD> <20><>ų <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> ȣ<><C8A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>(<28><>ų<EFBFBD><C5B3> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ÿ<EFBFBD><C5B8>)
|
|||
|
|
if( bUsingSkill )
|
|||
|
|
{
|
|||
|
|
bProcessSkill = bUsingSkill;
|
|||
|
|
eProcessSkillElement = eSkillElement;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
ElementEnum Type = CDnState::ElementEnum_Amount;
|
|||
|
|
if( bProcessSkill )
|
|||
|
|
{
|
|||
|
|
if( eProcessSkillElement == CDnState::ElementEnum_Amount )
|
|||
|
|
{
|
|||
|
|
if( bUseSkillApplyWeaponElement )
|
|||
|
|
{
|
|||
|
|
if( IsPlayerActor() )
|
|||
|
|
{
|
|||
|
|
Type = ( CDnActor::GetWeapon() ) ? CDnActor::GetWeapon()->GetElementType() : CDnState::ElementEnum_Amount;
|
|||
|
|
}
|
|||
|
|
else if( IsMonsterActor() )
|
|||
|
|
{
|
|||
|
|
Type = static_cast<CDnMonsterActor*>(this)->GetElementType();
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
Type = eProcessSkillElement;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
if( m_ActorType <= ActorTypeEnum::Reserved6 )
|
|||
|
|
Type = ( CDnActor::GetWeapon() ) ? CDnActor::GetWeapon()->GetElementType() : CDnState::ElementEnum_Amount;
|
|||
|
|
else
|
|||
|
|
Type = static_cast<CDnMonsterActor*>(this)->GetElementType();
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
return Type;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
// <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD> <20><><EFBFBD>õ<EFBFBD> <20>κ<EFBFBD><CEBA><EFBFBD> #pragma region <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϰ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>
|
|||
|
|
// Visual Studio <20>ɼǿ<C9BC><C7BF><EFBFBD> <20><>Ʈ<EFBFBD>ɼǿ<C9BC> "<22><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ý<EFBFBD>Ʈ" <20>κп<CEBA> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>صνø<CEBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.
|
|||
|
|
float CDnActor::PreCalcDamage( CDnDamageBase *pHitter, SHitParam &HitParam, const float fDefenseRate/*=1.f*/, float fStateEffectAttackM /*= -1.0f */ )
|
|||
|
|
{
|
|||
|
|
float fResult = 0.f;
|
|||
|
|
float fHitPer = HitParam.fDamage;
|
|||
|
|
float fAttackPower = 0.0f;
|
|||
|
|
|
|||
|
|
int nDefense = 0;
|
|||
|
|
float fDefenseWeight = 0.0f;
|
|||
|
|
|
|||
|
|
float fElementWeight = 1.f;
|
|||
|
|
float fGausianResultProb = 1.f;
|
|||
|
|
|
|||
|
|
DnActorHandle hHitter = pHitter->GetActorHandle();
|
|||
|
|
CDnState *pState = NULL;
|
|||
|
|
CDnStateBlow *pHitterStateBlow = hHitter->GetStateBlow();
|
|||
|
|
|
|||
|
|
bool bCalcDamageFromStateEffect = ( fStateEffectAttackM != -1.0f );
|
|||
|
|
|
|||
|
|
if( bCalcDamageFromStateEffect == true )
|
|||
|
|
{
|
|||
|
|
if( hHitter )
|
|||
|
|
pState = static_cast<CDnActorState *>(hHitter.GetPointer());
|
|||
|
|
|
|||
|
|
fAttackPower = fStateEffectAttackM;
|
|||
|
|
nDefense = GetDefenseM();
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
if( hHitter && !HitParam.bFromProjectile )
|
|||
|
|
{
|
|||
|
|
pState = static_cast<CDnActorState *>(hHitter.GetPointer());
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
if( HitParam.hWeapon )
|
|||
|
|
{
|
|||
|
|
CDnProjectile *pHitterProjectile = static_cast<CDnProjectile*>( HitParam.hWeapon.GetPointer() );
|
|||
|
|
if( pHitterProjectile )
|
|||
|
|
{
|
|||
|
|
pState = pHitterProjectile->GetShooterStateSnapshot().get();
|
|||
|
|
#if defined(PRE_ADD_PROJECTILE_SE_INFO)
|
|||
|
|
CDnStateBlow *pProjectileStateBlow = static_cast<CDnProjectile*>( HitParam.hWeapon.GetPointer() )->GetShooterStateBlow().get();
|
|||
|
|
if( pProjectileStateBlow )
|
|||
|
|
pHitterStateBlow = pProjectileStateBlow;
|
|||
|
|
#endif
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
#if !defined(PRE_ADD_PROJECTILE_SE_INFO)
|
|||
|
|
if (hHitter&& hHitter->IsApplyPrefixOffenceSkill())
|
|||
|
|
pState = static_cast<CDnActorState *>(hHitter.GetPointer());
|
|||
|
|
#endif
|
|||
|
|
|
|||
|
|
if( hHitter && pState == NULL )
|
|||
|
|
pState = static_cast<CDnActorState *>(hHitter.GetPointer());
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
if( bCalcDamageFromStateEffect == false )
|
|||
|
|
{
|
|||
|
|
int nAttack[2] = { 0, };
|
|||
|
|
|
|||
|
|
switch( HitParam.cAttackType )
|
|||
|
|
{
|
|||
|
|
case 0: // <20><><EFBFBD><EFBFBD>
|
|||
|
|
{
|
|||
|
|
nAttack[0] = pState->GetAttackPMin();
|
|||
|
|
nAttack[1] = pState->GetAttackPMax();
|
|||
|
|
|
|||
|
|
#pragma region ++ [ ADD DAMAGE BY SELF ( BLOW_109 ) ] ++
|
|||
|
|
|
|||
|
|
if( IsAppliedThisStateBlow( STATE_BLOW::BLOW_109 ) )
|
|||
|
|
{
|
|||
|
|
int aiAdditionalPAttack[ 2 ] = { 0 };
|
|||
|
|
DNVector(DnBlowHandle) vlhBlows;
|
|||
|
|
GetStateBlow()->GetStateBlowFromBlowIndex( STATE_BLOW::BLOW_109, vlhBlows );
|
|||
|
|
int iNumBlow = (int)vlhBlows.size();
|
|||
|
|
for( int i = 0; i < iNumBlow; ++i )
|
|||
|
|
{
|
|||
|
|
aiAdditionalPAttack[ 0 ] += int((float)GetAttackPMin() * vlhBlows.at(i)->GetFloatValue());
|
|||
|
|
aiAdditionalPAttack[ 1 ] += int((float)GetAttackPMax() * vlhBlows.at(i)->GetFloatValue());
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
nAttack[ 0 ] += aiAdditionalPAttack[ 0 ];
|
|||
|
|
nAttack[ 1 ] += aiAdditionalPAttack[ 1 ];
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
#pragma endregion
|
|||
|
|
|
|||
|
|
nDefense = GetDefenseP();
|
|||
|
|
}
|
|||
|
|
break;
|
|||
|
|
|
|||
|
|
case 1: // <20><><EFBFBD><EFBFBD>
|
|||
|
|
case 2: //rlkt_test
|
|||
|
|
{
|
|||
|
|
nAttack[0] = pState->GetAttackMMin();
|
|||
|
|
nAttack[1] = pState->GetAttackMMax();
|
|||
|
|
|
|||
|
|
#pragma region ++ [ ADD DAMAGE BY HITTER ( BLOW_180 ) ] ++
|
|||
|
|
|
|||
|
|
if( pHitterStateBlow && pHitterStateBlow->IsApplied(STATE_BLOW::BLOW_180) )
|
|||
|
|
{
|
|||
|
|
CDnActorState* pActorState = static_cast<CDnActorState *>(hHitter.GetPointer());
|
|||
|
|
CDnState* pSkillState = pActorState ? pActorState->GetStateStep(1) : NULL;
|
|||
|
|
|
|||
|
|
if (pSkillState)
|
|||
|
|
{
|
|||
|
|
nAttack[0] += pSkillState->GetAttackPMin();
|
|||
|
|
nAttack[1] += pSkillState->GetAttackPMax();
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
#pragma endregion
|
|||
|
|
|
|||
|
|
#pragma region ++ [ ADD DAMAGE BY SELF ( BLOW_110 ) ] ++
|
|||
|
|
|
|||
|
|
if( IsAppliedThisStateBlow( STATE_BLOW::BLOW_110 ) )
|
|||
|
|
{
|
|||
|
|
int aiAdditionalMAttack[ 2 ] = { 0 };
|
|||
|
|
DNVector(DnBlowHandle) vlhBlows;
|
|||
|
|
GetStateBlow()->GetStateBlowFromBlowIndex( STATE_BLOW::BLOW_110, vlhBlows );
|
|||
|
|
int iNumBlow = (int)vlhBlows.size();
|
|||
|
|
for( int i = 0; i < iNumBlow; ++i )
|
|||
|
|
{
|
|||
|
|
aiAdditionalMAttack[ 0 ] += int((float)GetAttackMMin() * vlhBlows.at(i)->GetFloatValue());
|
|||
|
|
aiAdditionalMAttack[ 1 ] += int((float)GetAttackMMax() * vlhBlows.at(i)->GetFloatValue());
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
nAttack[ 0 ] += aiAdditionalMAttack[ 0 ];
|
|||
|
|
nAttack[ 1 ] += aiAdditionalMAttack[ 1 ];
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
#pragma endregion
|
|||
|
|
|
|||
|
|
nDefense = GetDefenseM();
|
|||
|
|
}
|
|||
|
|
break;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
#pragma region ++ [ ADD DAMAGE BY HITTER ( BLOW_213 ) ] ++
|
|||
|
|
|
|||
|
|
if( pHitterStateBlow && m_pStateBlow->IsApplied(STATE_BLOW::BLOW_213) )
|
|||
|
|
{
|
|||
|
|
int nAddAttack[2] = { 0, };
|
|||
|
|
int HitterAttackP[2] = {pState->GetAttackPMin(), pState->GetAttackPMax()};
|
|||
|
|
|
|||
|
|
DNVector(DnBlowHandle) vlhBlows;
|
|||
|
|
pHitterStateBlow->GetStateBlowFromBlowIndex( STATE_BLOW::BLOW_213, vlhBlows );
|
|||
|
|
int iNumBlow = (int)vlhBlows.size();
|
|||
|
|
for( int i = 0; i < iNumBlow; ++i )
|
|||
|
|
{
|
|||
|
|
nAddAttack[ 0 ] += int((float)HitterAttackP[0] * vlhBlows.at(i)->GetFloatValue());
|
|||
|
|
nAddAttack[ 1 ] += int((float)HitterAttackP[1] * vlhBlows.at(i)->GetFloatValue());
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
nAttack[ 0 ] += nAddAttack[ 0 ];
|
|||
|
|
nAttack[ 1 ] += nAddAttack[ 1 ];
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
#pragma endregion
|
|||
|
|
|
|||
|
|
#pragma region ++ [ ADD DAMAGE BY HITTER ( BLOW_214 ) ] ++
|
|||
|
|
|
|||
|
|
if( pHitterStateBlow && pHitterStateBlow->IsApplied(STATE_BLOW::BLOW_214) )
|
|||
|
|
{
|
|||
|
|
int nAddAttack[2] = { 0, };
|
|||
|
|
int HitterAttackM[2] = {pState->GetAttackMMin(), pState->GetAttackMMax()};
|
|||
|
|
|
|||
|
|
DNVector(DnBlowHandle) vlhBlows;
|
|||
|
|
pHitterStateBlow->GetStateBlowFromBlowIndex( STATE_BLOW::BLOW_214, vlhBlows );
|
|||
|
|
int iNumBlow = (int)vlhBlows.size();
|
|||
|
|
for( int i = 0; i < iNumBlow; ++i )
|
|||
|
|
{
|
|||
|
|
nAddAttack[ 0 ] += int((float)HitterAttackM[0] * vlhBlows.at(i)->GetFloatValue());
|
|||
|
|
nAddAttack[ 1 ] += int((float)HitterAttackM[1] * vlhBlows.at(i)->GetFloatValue());
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
nAttack[ 0 ] += nAddAttack[ 0 ];
|
|||
|
|
nAttack[ 1 ] += nAddAttack[ 1 ];
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
#pragma endregion
|
|||
|
|
|
|||
|
|
#pragma region ++ [ ADD DAMAGE BY HITTER ( BLOW_221 ) ] ++
|
|||
|
|
|
|||
|
|
if( pHitterStateBlow && pHitterStateBlow->IsApplied(STATE_BLOW::BLOW_221))
|
|||
|
|
{
|
|||
|
|
int nAddAttack[2] = { 0, };
|
|||
|
|
int HitterAttackValue[2] = {0, };
|
|||
|
|
|
|||
|
|
switch( HitParam.cAttackType )
|
|||
|
|
{
|
|||
|
|
case 0: //<2F><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>϶<EFBFBD>.
|
|||
|
|
HitterAttackValue[0] = pState->GetAttackPMin();
|
|||
|
|
HitterAttackValue[1] = pState->GetAttackPMax();
|
|||
|
|
break;
|
|||
|
|
case 1: //<2F><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>϶<EFBFBD>.
|
|||
|
|
HitterAttackValue[0] = pState->GetAttackMMin();
|
|||
|
|
HitterAttackValue[1] = pState->GetAttackMMax();
|
|||
|
|
break;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
DNVector(DnBlowHandle) vlhBlows;
|
|||
|
|
pHitterStateBlow->GetStateBlowFromBlowIndex( STATE_BLOW::BLOW_221, vlhBlows );
|
|||
|
|
int iNumBlow = (int)vlhBlows.size();
|
|||
|
|
for( int i = 0; i < iNumBlow; ++i )
|
|||
|
|
{
|
|||
|
|
nAddAttack[ 0 ] += int((float)HitterAttackValue[0] * vlhBlows.at(i)->GetFloatValue());
|
|||
|
|
nAddAttack[ 1 ] += int((float)HitterAttackValue[1] * vlhBlows.at(i)->GetFloatValue());
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
nAttack[ 0 ] += nAddAttack[ 0 ];
|
|||
|
|
nAttack[ 1 ] += nAddAttack[ 1 ];
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
#pragma endregion
|
|||
|
|
|
|||
|
|
|
|||
|
|
float fFinalDamageValue[4] =
|
|||
|
|
{
|
|||
|
|
CGlobalWeightTable::GetInstance().GetValue( CGlobalWeightTable::FinalDamageValue1 ),
|
|||
|
|
CGlobalWeightTable::GetInstance().GetValue( CGlobalWeightTable::FinalDamageValue2 ),
|
|||
|
|
CGlobalWeightTable::GetInstance().GetValue( CGlobalWeightTable::FinalDamageValue3 ),
|
|||
|
|
CGlobalWeightTable::GetInstance().GetValue( CGlobalWeightTable::FinalDamageValue4 ),
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
float fFValue = GetFinalDamageConstant();
|
|||
|
|
|
|||
|
|
float fFinalDamage1 = (float)( pState->GetFinalDamage() / fFValue ) * fFinalDamageValue[3];
|
|||
|
|
float fFinalDamage2 = powf( (float)( pState->GetFinalDamage() / fFValue ), fFinalDamageValue[1] ) * fFinalDamageValue[2];
|
|||
|
|
float fResultFinalDamage = min( max(fFinalDamage1, fFinalDamage2), fFinalDamageValue[2] );
|
|||
|
|
|
|||
|
|
// 184, 185<38><35> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>̳<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>/<2F><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF>
|
|||
|
|
float fResultAdditionalFinalDamage = 0.0f;
|
|||
|
|
|
|||
|
|
if( 0 == HitParam.cAttackType ) // <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
#pragma region ++ [ fResultAdditionalFinalDamage BY HITTER ( BLOW_184 ) ] ++
|
|||
|
|
|
|||
|
|
if( pHitterStateBlow && pHitterStateBlow->IsApplied( STATE_BLOW::BLOW_184 ) )
|
|||
|
|
{
|
|||
|
|
DNVector(DnBlowHandle) vlhFinalPDamageBlows;
|
|||
|
|
pHitterStateBlow->GetStateBlowFromBlowIndex( STATE_BLOW::BLOW_184, vlhFinalPDamageBlows );
|
|||
|
|
int iNumBlow = (int)vlhFinalPDamageBlows.size();
|
|||
|
|
for( int i = 0; i < iNumBlow; ++i )
|
|||
|
|
{
|
|||
|
|
DnBlowHandle hBlow = vlhFinalPDamageBlows.at( i );
|
|||
|
|
fResultAdditionalFinalDamage += hBlow->GetFloatValue();
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
#pragma endregion
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
else if (1 == HitParam.cAttackType || 2 == HitParam.cAttackType) // <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>// rlkt_test
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
#pragma region ++ [ fResultAdditionalFinalDamage BY HITTER ( BLOW_185 ) ] ++
|
|||
|
|
|
|||
|
|
if( pHitterStateBlow && pHitterStateBlow->IsApplied( STATE_BLOW::BLOW_185 ) )
|
|||
|
|
{
|
|||
|
|
DNVector(DnBlowHandle) vlhFinalPDamageBlows;
|
|||
|
|
pHitterStateBlow->GetStateBlowFromBlowIndex( STATE_BLOW::BLOW_185, vlhFinalPDamageBlows );
|
|||
|
|
int iNumBlow = (int)vlhFinalPDamageBlows.size();
|
|||
|
|
for( int i = 0; i < iNumBlow; ++i )
|
|||
|
|
{
|
|||
|
|
DnBlowHandle hBlow = vlhFinalPDamageBlows.at( i );
|
|||
|
|
fResultAdditionalFinalDamage += hBlow->GetFloatValue();
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
#pragma endregion
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
float fGausianResult = (float)GetGaussianRandom( nAttack[0], nAttack[1], GetRoom() );
|
|||
|
|
fGausianResultProb = fGausianResult / nAttack[1];
|
|||
|
|
fAttackPower = fGausianResult * fHitPer;
|
|||
|
|
|
|||
|
|
float fDamageRatioBlowValue = 0.f;
|
|||
|
|
|
|||
|
|
#pragma region ++ [ fDamageRatioBlowValue BY HITTER ( BLOW_050 ) ] ++
|
|||
|
|
|
|||
|
|
if( pHitterStateBlow && pHitterStateBlow->IsApplied(STATE_BLOW::BLOW_050))
|
|||
|
|
{
|
|||
|
|
DNVector(DnBlowHandle) vlhDamageRatioBlows;
|
|||
|
|
pHitterStateBlow->GetStateBlowFromBlowIndex( STATE_BLOW::BLOW_050, vlhDamageRatioBlows );
|
|||
|
|
int iNumBlow = (int)vlhDamageRatioBlows.size();
|
|||
|
|
for( int i = 0; i < iNumBlow; ++i )
|
|||
|
|
{
|
|||
|
|
DnBlowHandle hBlow = vlhDamageRatioBlows.at( i );
|
|||
|
|
fDamageRatioBlowValue += hBlow->GetFloatValue();
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
#pragma endregion
|
|||
|
|
|
|||
|
|
|
|||
|
|
#if defined(PRE_FIX_65287)
|
|||
|
|
//<2F><EFBFBD>ü<EFBFBD><C3BC> <20><><EFBFBD>ؼ<EFBFBD> FinalDamageRate<74><65><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ǿ<EFBFBD> <20>ִ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ϵ<EFBFBD><CFB5><EFBFBD> <20>Ѵ<EFBFBD>.
|
|||
|
|
//<2F><>ų<EFBFBD><C5B3> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> 50<35><30> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>̶<EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ؾ<EFBFBD> <20><>.
|
|||
|
|
float fShooterFinalDamageRate = 0.0f;
|
|||
|
|
if (HitParam.bFromProjectile)
|
|||
|
|
{
|
|||
|
|
CDnProjectile* pProjectile = static_cast<CDnProjectile*>( HitParam.hWeapon.GetPointer() );
|
|||
|
|
|
|||
|
|
fShooterFinalDamageRate = pProjectile ? pProjectile->GetShooterFinalDamageRate() : 0.0f;
|
|||
|
|
|
|||
|
|
if (fShooterFinalDamageRate != 0.0f)
|
|||
|
|
fDamageRatioBlowValue = fShooterFinalDamageRate;
|
|||
|
|
}
|
|||
|
|
#endif // PRE_FIX_65287
|
|||
|
|
|
|||
|
|
|
|||
|
|
fAttackPower = fAttackPower * ( 1.f + fResultFinalDamage + fDamageRatioBlowValue + fResultAdditionalFinalDamage );
|
|||
|
|
|
|||
|
|
#pragma region ++ [ fAttackPower BY HITTER ( BLOW_074 ) ] ++
|
|||
|
|
// 74<37><34> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF>. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ִ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>..
|
|||
|
|
if( pHitterStateBlow && pHitterStateBlow->IsApplied( STATE_BLOW::BLOW_074 ) )
|
|||
|
|
fAttackPower = (float)nAttack[1];
|
|||
|
|
#pragma endregion
|
|||
|
|
|
|||
|
|
|
|||
|
|
#pragma region ++ [ fAttackPower BY HITTER ( BLOW_209 ) ] ++
|
|||
|
|
// <20>ű<EFBFBD> ij<><C4B3><EFBFBD><EFBFBD>(<28><>ī<EFBFBD><C4AB><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>)
|
|||
|
|
// <20>⺻ <20><><EFBFBD>ݷ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>..(<28>Ϲݰ<CFB9><DDB0><EFBFBD><EFBFBD>ϰ<EFBFBD><CFB0>츸....) // <20><>ų<EFBFBD><C5B3> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ʰ<EFBFBD> , <20><EFBFBD>ü<EFBFBD><C3BC> <20>ƴϰų<CFB0> , <20><EFBFBD>ü<EFBFBD><C3BC><EFBFBD><EFBFBD> <20><>ų<EFBFBD><C5B3><EFBFBD><EFBFBD> <20><EFBFBD>ü<EFBFBD><C3BC> <20>ƴҶ<C6B4>
|
|||
|
|
// <20>ϴ<EFBFBD> <20><>ī<EFBFBD><C4AB><EFBFBD><EFBFBD> <20>ΰ<EFBFBD><CEB0>츸 <20><><EFBFBD>밡<EFBFBD><EBB0A1> <20>ϵ<EFBFBD><CFB5><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Ǿ<EFBFBD><C7BE>ִ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>̴<EFBFBD> , <20>ٸ<EFBFBD>Ŭ<EFBFBD><C5AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>ܻ<EFBFBD>Ȳ<EFBFBD><C8B2> <20><><EFBFBD><EFBFBD> <20><EFBFBD>Ʈ <20><><EFBFBD>ּ<EFBFBD><D6BC><EFBFBD>
|
|||
|
|
// < Ex> <20><><EFBFBD>Ľ<EFBFBD><C4BD><EFBFBD> Ȱ<><C8B0>ȭ <20>Ǿ<EFBFBD><C7BE>ִ<EFBFBD> <20><><EFBFBD>¿<EFBFBD><C2BF><EFBFBD> <20><><EFBFBD><EFBFBD> <20><>Ȳ Ȯ<><C8AE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ó<><C3B3><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> >
|
|||
|
|
if (false == hHitter->IsProcessSkill() && (( HitParam.bFromProjectile && !HitParam.bFromProjectileSkill ) || !HitParam.bFromProjectile ) &&
|
|||
|
|
!hHitter->IsAppliedThisStateBlow(STATE_BLOW::BLOW_121) && !hHitter->IsAppliedThisStateBlow(STATE_BLOW::BLOW_129) //<2F><>ŷ<EFBFBD><C5B7><EFBFBD>ٽ<EFBFBD><D9BD><EFBFBD>)
|
|||
|
|
)
|
|||
|
|
{
|
|||
|
|
if( pHitterStateBlow && pHitterStateBlow->IsApplied(STATE_BLOW::BLOW_209) )
|
|||
|
|
{
|
|||
|
|
DNVector(DnBlowHandle) vlBlowList;
|
|||
|
|
float fAddtionalAttackPower = 0.f;
|
|||
|
|
pHitterStateBlow->GetStateBlowFromBlowIndex(STATE_BLOW::BLOW_209, vlBlowList);
|
|||
|
|
|
|||
|
|
for (int i=0 ; i< (int)vlBlowList.size(); ++i )
|
|||
|
|
{
|
|||
|
|
if(vlBlowList[i]->GetFloatValue() > 0.f)
|
|||
|
|
{
|
|||
|
|
fAddtionalAttackPower = fAttackPower * vlBlowList[i]->GetFloatValue();
|
|||
|
|
break;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
fAttackPower += fAddtionalAttackPower;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
#pragma endregion
|
|||
|
|
|
|||
|
|
if( fAttackPower < 0.f )
|
|||
|
|
fAttackPower = 0.f;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
//rlkt_damage!
|
|||
|
|
CDnSkill::SkillInfo *pDmgSkillInfo = NULL;
|
|||
|
|
DnSkillHandle hDmgSkill;
|
|||
|
|
|
|||
|
|
if (HitParam.bFromProjectile && HitParam.hWeapon)
|
|||
|
|
hDmgSkill = static_cast<CDnProjectile*>(HitParam.hWeapon.GetPointer())->GetParentSkill();
|
|||
|
|
else
|
|||
|
|
hDmgSkill = hHitter->GetProcessSkill();
|
|||
|
|
|
|||
|
|
bool bIsPVP = GetGameRoom()->bIsPvPRoom();
|
|||
|
|
|
|||
|
|
if (hDmgSkill)
|
|||
|
|
{
|
|||
|
|
pDmgSkillInfo = const_cast<CDnSkill::SkillInfo*>(hDmgSkill->GetInfo());
|
|||
|
|
if (bIsPVP)
|
|||
|
|
{
|
|||
|
|
CDNGameDataManager::TPVPSkills* nSkillInfo = NULL;
|
|||
|
|
nSkillInfo = g_pDataManager->GetPVPSkillPDamage(pDmgSkillInfo->iSkillID, pDmgSkillInfo->iLevel);
|
|||
|
|
if (nSkillInfo)
|
|||
|
|
{
|
|||
|
|
printf("hDmgSkill PVP OK atak: %.2f skill:%d lvl:%d\n", fAttackPower, pDmgSkillInfo->iSkillID, pDmgSkillInfo->iLevel);
|
|||
|
|
fAttackPower = (float)(fAttackPower*(float)(nSkillInfo->fPDamage + 1.f));//test
|
|||
|
|
printf("hDmgSkill PVP AFTER OK multi:%.4f atak: %.2f skill:%d lvl:%d\n", nSkillInfo->fPDamage, fAttackPower, pDmgSkillInfo->iSkillID, pDmgSkillInfo->iLevel);
|
|||
|
|
}
|
|||
|
|
} else {
|
|||
|
|
printf("hDmgSkill OK atak: %.2f skill:%d lvl:%d\n", fAttackPower, pDmgSkillInfo->iSkillID, pDmgSkillInfo->iLevel);
|
|||
|
|
TSkillLevelData *pData = g_pDataManager->GetSkillLevelData(pDmgSkillInfo->iSkillID, pDmgSkillInfo->iLevel);
|
|||
|
|
if (pData)
|
|||
|
|
{
|
|||
|
|
if (pData->nPhyDamage > 0.01f && fAttackPower > 0.001f)
|
|||
|
|
fAttackPower = fAttackPower + (float)(fAttackPower*(float)(pData->nPhyDamage + 1.f));//test
|
|||
|
|
}
|
|||
|
|
printf("hDmgSkill AFTER OK atak: %.2f skill:%d lvl:%d\n", fAttackPower, pDmgSkillInfo->iSkillID, pDmgSkillInfo->iLevel);
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
#pragma region ++ [ nDefense BY SELF ( BLOW_101 ~ BLOW_108 ) ] ++
|
|||
|
|
// [OBT] <20>߰<EFBFBD> <20><>ų ȿ<><C8BF> <20><><EFBFBD><EFBFBD> - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> (#7839) ///////////////////////////////////////
|
|||
|
|
STATE_BLOW::emBLOW_INDEX AppliedDefenseChangeBlowIndex = STATE_BLOW::BLOW_NONE;
|
|||
|
|
switch( HitParam.DistanceType )
|
|||
|
|
{
|
|||
|
|
case CDnDamageBase::DistanceTypeEnum::Melee:
|
|||
|
|
{
|
|||
|
|
if( 0 == HitParam.cAttackType )
|
|||
|
|
{
|
|||
|
|
// <20><><EFBFBD><EFBFBD> <20>и<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> : 101
|
|||
|
|
if( IsAppliedThisStateBlow( STATE_BLOW::BLOW_101 ) )
|
|||
|
|
AppliedDefenseChangeBlowIndex = STATE_BLOW::BLOW_101;
|
|||
|
|
else
|
|||
|
|
// <20><><EFBFBD><EFBFBD> <20>и<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
|||
|
|
if( IsAppliedThisStateBlow( STATE_BLOW::BLOW_102 ) )
|
|||
|
|
AppliedDefenseChangeBlowIndex = STATE_BLOW::BLOW_102;
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
if( 1 == HitParam.cAttackType || 2 == HitParam.cAttackType) //rlkt_test
|
|||
|
|
{
|
|||
|
|
// <20><><EFBFBD><EFBFBD> <20>и<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
|||
|
|
if( IsAppliedThisStateBlow( STATE_BLOW::BLOW_105 ) )
|
|||
|
|
AppliedDefenseChangeBlowIndex = STATE_BLOW::BLOW_105;
|
|||
|
|
else
|
|||
|
|
// <20><><EFBFBD><EFBFBD> <20>и<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
|||
|
|
if( IsAppliedThisStateBlow( STATE_BLOW::BLOW_106 ) )
|
|||
|
|
AppliedDefenseChangeBlowIndex = STATE_BLOW::BLOW_106;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
break;
|
|||
|
|
|
|||
|
|
case CDnDamageBase::DistanceTypeEnum::Range:
|
|||
|
|
{
|
|||
|
|
if( 0 == HitParam.cAttackType )
|
|||
|
|
{
|
|||
|
|
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> : 101
|
|||
|
|
if( IsAppliedThisStateBlow( STATE_BLOW::BLOW_103 ) )
|
|||
|
|
AppliedDefenseChangeBlowIndex = STATE_BLOW::BLOW_103;
|
|||
|
|
else
|
|||
|
|
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
|||
|
|
if( IsAppliedThisStateBlow( STATE_BLOW::BLOW_104 ) )
|
|||
|
|
AppliedDefenseChangeBlowIndex = STATE_BLOW::BLOW_104;
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
if( 1 == HitParam.cAttackType || 2 == HitParam.cAttackType) //rlkt_test
|
|||
|
|
{
|
|||
|
|
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
|||
|
|
if( IsAppliedThisStateBlow( STATE_BLOW::BLOW_107 ) )
|
|||
|
|
AppliedDefenseChangeBlowIndex = STATE_BLOW::BLOW_107;
|
|||
|
|
else
|
|||
|
|
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
|||
|
|
if( IsAppliedThisStateBlow( STATE_BLOW::BLOW_108 ) )
|
|||
|
|
AppliedDefenseChangeBlowIndex = STATE_BLOW::BLOW_108;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
break;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if( STATE_BLOW::BLOW_NONE != AppliedDefenseChangeBlowIndex )
|
|||
|
|
{
|
|||
|
|
switch( AppliedDefenseChangeBlowIndex )
|
|||
|
|
{
|
|||
|
|
// <20><><EFBFBD>밪 <20><><EFBFBD><EFBFBD>
|
|||
|
|
case STATE_BLOW::BLOW_101:
|
|||
|
|
case STATE_BLOW::BLOW_103:
|
|||
|
|
case STATE_BLOW::BLOW_105:
|
|||
|
|
case STATE_BLOW::BLOW_107:
|
|||
|
|
{
|
|||
|
|
DNVector(DnBlowHandle) vlhDefenseAbChangeBlow;
|
|||
|
|
GetStateBlow()->GetStateBlowFromBlowIndex( AppliedDefenseChangeBlowIndex, vlhDefenseAbChangeBlow );
|
|||
|
|
int iNumBlow = (int)vlhDefenseAbChangeBlow.size();
|
|||
|
|
for( int i = 0; i < iNumBlow; ++i )
|
|||
|
|
{
|
|||
|
|
DnBlowHandle hBlow = vlhDefenseAbChangeBlow.at( i );
|
|||
|
|
int iValue = (int)hBlow->GetFloatValue();
|
|||
|
|
nDefense += iValue;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
break;
|
|||
|
|
|
|||
|
|
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
|||
|
|
case STATE_BLOW::BLOW_102:
|
|||
|
|
case STATE_BLOW::BLOW_104:
|
|||
|
|
case STATE_BLOW::BLOW_106:
|
|||
|
|
case STATE_BLOW::BLOW_108:
|
|||
|
|
{
|
|||
|
|
DNVector(DnBlowHandle) vlhDefenseRtChangeBlow;
|
|||
|
|
GetStateBlow()->GetStateBlowFromBlowIndex( AppliedDefenseChangeBlowIndex, vlhDefenseRtChangeBlow );
|
|||
|
|
float fChangeRatio = 1.0f; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ִ<EFBFBD> <20><><EFBFBD>츦 <20><><EFBFBD><EFBFBD><EFBFBD>ؼ<EFBFBD> 100%<25><> <20>Ѿ<D1BE><EEB0A1> <20><>ġ<EFBFBD><C4A1> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ش<EFBFBD>.
|
|||
|
|
int iNumBlow = (int)vlhDefenseRtChangeBlow.size();
|
|||
|
|
for( int i = 0; i < iNumBlow; ++i )
|
|||
|
|
{
|
|||
|
|
DnBlowHandle hBlow = vlhDefenseRtChangeBlow.at( i );
|
|||
|
|
fChangeRatio += (hBlow->GetFloatValue()-1.0f);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
nDefense += int( (float)nDefense*fChangeRatio );
|
|||
|
|
}
|
|||
|
|
break;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
#pragma endregion
|
|||
|
|
|
|||
|
|
|
|||
|
|
float fDefensePower = 1.f;
|
|||
|
|
|
|||
|
|
#if defined(PRE_ADD_SKILLBUF_RENEW)
|
|||
|
|
|
|||
|
|
//<2F><><EFBFBD><EFBFBD> <20><><EFBFBD>ݷ<EFBFBD> <20><><EFBFBD>꿡<EFBFBD><EABFA1> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ȴ<EFBFBD>.
|
|||
|
|
|
|||
|
|
fDefenseWeight = hHitter->GetDefenseConstant();
|
|||
|
|
|
|||
|
|
fDefensePower = nDefense / fDefenseWeight;
|
|||
|
|
if( fDefensePower < 0.f ) fDefensePower = 0.f;
|
|||
|
|
else if( fDefensePower > CGlobalWeightTable::GetInstance().GetValue( CGlobalWeightTable::DefenseMax ) )
|
|||
|
|
fDefensePower = CGlobalWeightTable::GetInstance().GetValue( CGlobalWeightTable::DefenseMax );
|
|||
|
|
|
|||
|
|
fDefensePower = 1.f - fDefensePower;
|
|||
|
|
|
|||
|
|
//ũ<><C5A9>Ƽ<EFBFBD><C6BC><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> AttackPower<65><72> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ų<EFBFBD><C5B2>.
|
|||
|
|
if (HitParam.HitType == CDnWeapon::Critical)
|
|||
|
|
{
|
|||
|
|
//#57510 PvP<76><50><EFBFBD><EFBFBD> ũ<><C5A9>Ƽ<EFBFBD><C6BC> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 1.5
|
|||
|
|
float fCriticalIncValue = 1.0f;
|
|||
|
|
|
|||
|
|
if( GetGameRoom()->bIsPvPRoom() == true )
|
|||
|
|
fCriticalIncValue = CGlobalWeightTable::GetInstance().GetValue( CGlobalWeightTable::CriticalIncrease_PVP );
|
|||
|
|
else
|
|||
|
|
fCriticalIncValue = CGlobalWeightTable::GetInstance().GetValue( CGlobalWeightTable::CriticalIncrease );
|
|||
|
|
|
|||
|
|
fAttackPower = fAttackPower * fCriticalIncValue;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
#else // PRE_ADD_SKILLBUF_RENEW
|
|||
|
|
|
|||
|
|
if( HitParam.HitType == CDnWeapon::Critical )
|
|||
|
|
{
|
|||
|
|
fDefensePower = CGlobalWeightTable::GetInstance().GetValue( CGlobalWeightTable::CriticalIncrease );
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
fDefenseWeight = hHitter->GetDefenseConstant();
|
|||
|
|
|
|||
|
|
fDefensePower = nDefense / fDefenseWeight;
|
|||
|
|
if( fDefensePower < 0.f ) fDefensePower = 0.f;
|
|||
|
|
else if( fDefensePower > CGlobalWeightTable::GetInstance().GetValue( CGlobalWeightTable::DefenseMax ) )
|
|||
|
|
fDefensePower = CGlobalWeightTable::GetInstance().GetValue( CGlobalWeightTable::DefenseMax );
|
|||
|
|
|
|||
|
|
fDefensePower = 1.f - fDefensePower;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
#endif // PRE_ADD_SKILLBUF_RENEW
|
|||
|
|
|
|||
|
|
|
|||
|
|
fResult = fAttackPower * fDefensePower;
|
|||
|
|
|
|||
|
|
#pragma region ++ [ fResult *= fChangeRatio BY SELF ( BLOW_134, BLOW_135 ) ] ++
|
|||
|
|
|
|||
|
|
// <20><><EFBFBD><EFBFBD>/<2F><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> #12354, #12353 ///////////////////////////////////////////
|
|||
|
|
if( IsAppliedThisStateBlow( STATE_BLOW::BLOW_134 ) && 0 == HitParam.cAttackType )
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
DNVector( DnBlowHandle ) vlhBlows;
|
|||
|
|
GatherAppliedStateBlowByBlowIndex( STATE_BLOW::BLOW_134, vlhBlows );
|
|||
|
|
|
|||
|
|
float fChangeRatio = 1.0f; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ִ<EFBFBD> <20><><EFBFBD>츦 <20><><EFBFBD><EFBFBD><EFBFBD>ؼ<EFBFBD> 100%<25><> <20>Ѿ<D1BE><EEB0A1> <20><>ġ<EFBFBD><C4A1> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ش<EFBFBD>.
|
|||
|
|
#ifdef PRE_ADD_BUFF_STATE_LIMIT
|
|||
|
|
float fBuffStateRatioValue = 1.f;
|
|||
|
|
#endif
|
|||
|
|
for( int i = 0; i < (int)vlhBlows.size(); ++i )
|
|||
|
|
{
|
|||
|
|
DnBlowHandle hBlow = vlhBlows.at( i );
|
|||
|
|
float fValue = hBlow->GetFloatValue();
|
|||
|
|
fChangeRatio += (fValue-1.0f);
|
|||
|
|
#ifdef PRE_ADD_BUFF_STATE_LIMIT
|
|||
|
|
if( hBlow->GetAddBlowStateType() == CDnActorState::AddBlowStateType::Equip_Buff_Level )
|
|||
|
|
fBuffStateRatioValue += (fValue-1.0f);
|
|||
|
|
#endif
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
#ifdef PRE_ADD_BUFF_STATE_LIMIT
|
|||
|
|
float fMinLimit = CGlobalWeightTable::GetInstance().GetValue( CGlobalWeightTable::Change_DamageTaken_Physical_Min );
|
|||
|
|
float fMaxLimit = CGlobalWeightTable::GetInstance().GetValue( CGlobalWeightTable::Change_DamageTaken_Physical_Max );
|
|||
|
|
|
|||
|
|
if(IsPlayerActor())
|
|||
|
|
{
|
|||
|
|
if( fChangeRatio < fMinLimit ) //#77817 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ϰ<EFBFBD><CFB0>쿡<EFBFBD><ECBFA1> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ҷ<EFBFBD><D2B7><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>.
|
|||
|
|
fChangeRatio = fMinLimit;
|
|||
|
|
}
|
|||
|
|
else if(IsMonsterActor())
|
|||
|
|
{
|
|||
|
|
if( fBuffStateRatioValue > fMaxLimit )
|
|||
|
|
fChangeRatio += -fBuffStateRatioValue + fMaxLimit;
|
|||
|
|
}
|
|||
|
|
#else
|
|||
|
|
float fDamageChangeClampLowestRatio = CGlobalWeightTable::GetInstance().GetValue( CGlobalWeightTable::DamageChangeClampLowestRatio );
|
|||
|
|
if( fChangeRatio < fDamageChangeClampLowestRatio )
|
|||
|
|
fChangeRatio = fDamageChangeClampLowestRatio;
|
|||
|
|
#endif
|
|||
|
|
|
|||
|
|
if(fChangeRatio < 0)
|
|||
|
|
fChangeRatio = 0.f;
|
|||
|
|
|
|||
|
|
fResult *= fChangeRatio;
|
|||
|
|
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
else if( IsAppliedThisStateBlow( STATE_BLOW::BLOW_135 ) && 1 == HitParam.cAttackType
|
|||
|
|
|| IsAppliedThisStateBlow(STATE_BLOW::BLOW_135) && 2 == HitParam.cAttackType) //rlkt_test
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
DNVector( DnBlowHandle ) vlhBlows;
|
|||
|
|
GatherAppliedStateBlowByBlowIndex( STATE_BLOW::BLOW_135, vlhBlows );
|
|||
|
|
|
|||
|
|
float fChangeRatio = 1.f;
|
|||
|
|
#ifdef PRE_ADD_BUFF_STATE_LIMIT
|
|||
|
|
float fBuffStateRatioValue = 1.f;
|
|||
|
|
|
|||
|
|
#endif
|
|||
|
|
for( int i = 0; i < (int)vlhBlows.size(); ++i )
|
|||
|
|
{
|
|||
|
|
DnBlowHandle hBlow = vlhBlows.at( i );
|
|||
|
|
float fValue = hBlow->GetFloatValue();
|
|||
|
|
fChangeRatio += (fValue-1.0f);
|
|||
|
|
|
|||
|
|
#ifdef PRE_ADD_BUFF_STATE_LIMIT
|
|||
|
|
if( hBlow->GetAddBlowStateType() == CDnActorState::AddBlowStateType::Equip_Buff_Level )
|
|||
|
|
fBuffStateRatioValue += (fValue-1.0f);
|
|||
|
|
#endif
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
#ifdef PRE_ADD_BUFF_STATE_LIMIT
|
|||
|
|
float fMinLimit = CGlobalWeightTable::GetInstance().GetValue( CGlobalWeightTable::Change_DamageTaken_Magical_Min );
|
|||
|
|
float fMaxLimit = CGlobalWeightTable::GetInstance().GetValue( CGlobalWeightTable::Change_DamageTaken_Magical_Max );
|
|||
|
|
|
|||
|
|
if(IsPlayerActor())
|
|||
|
|
{
|
|||
|
|
if( fChangeRatio < fMinLimit ) //#77817 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ϰ<EFBFBD><CFB0>쿡<EFBFBD><ECBFA1> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ҷ<EFBFBD><D2B7><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>.
|
|||
|
|
fChangeRatio = fMinLimit;
|
|||
|
|
}
|
|||
|
|
else if(IsMonsterActor())
|
|||
|
|
{
|
|||
|
|
if( fBuffStateRatioValue > fMaxLimit )
|
|||
|
|
fChangeRatio += -fBuffStateRatioValue + fMaxLimit;
|
|||
|
|
}
|
|||
|
|
#else
|
|||
|
|
float fDamageChangeClampLowestRatio = CGlobalWeightTable::GetInstance().GetValue( CGlobalWeightTable::DamageChangeClampLowestRatio );
|
|||
|
|
if( fChangeRatio < fDamageChangeClampLowestRatio )
|
|||
|
|
fChangeRatio = fDamageChangeClampLowestRatio;
|
|||
|
|
#endif
|
|||
|
|
|
|||
|
|
|
|||
|
|
if(fChangeRatio < 0)
|
|||
|
|
fChangeRatio = 0.f;
|
|||
|
|
|
|||
|
|
fResult *= fChangeRatio;
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
#pragma endregion
|
|||
|
|
|
|||
|
|
|
|||
|
|
#pragma region ++ [ fResult += fResult * fChangeRatio BY SELF ( BLOW_268 ) ] ++
|
|||
|
|
#if defined(PRE_ADD_TOTAL_LEVEL_SKILL)
|
|||
|
|
if (IsAppliedThisStateBlow( STATE_BLOW::BLOW_268 ))
|
|||
|
|
{
|
|||
|
|
DNVector( DnBlowHandle ) vlhBlows;
|
|||
|
|
GatherAppliedStateBlowByBlowIndex( STATE_BLOW::BLOW_268, vlhBlows );
|
|||
|
|
|
|||
|
|
float fChangeRatio = 0.0f;
|
|||
|
|
for( int i = 0; i < (int)vlhBlows.size(); ++i )
|
|||
|
|
{
|
|||
|
|
DnBlowHandle hBlow = vlhBlows.at( i );
|
|||
|
|
if (hBlow && hBlow->IsEnd() == false)
|
|||
|
|
{
|
|||
|
|
CDnDamageChagneBlow* pDamageChageBlow = static_cast<CDnDamageChagneBlow*>(hBlow.GetPointer());
|
|||
|
|
if (pDamageChageBlow && pDamageChageBlow->IsActivated() == true && pDamageChageBlow->GetLeftCoolTime() > 0.0f)
|
|||
|
|
{
|
|||
|
|
fChangeRatio += pDamageChageBlow->GetDamageRate();
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if (fChangeRatio >= 0.0f)
|
|||
|
|
{
|
|||
|
|
fResult += fResult * fChangeRatio;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
#endif // PRE_ADD_TOTAL_LEVEL_SKILL
|
|||
|
|
#pragma endregion
|
|||
|
|
|
|||
|
|
|
|||
|
|
if( HitParam.HasElement != CDnActorState::ElementEnum_Amount )
|
|||
|
|
{
|
|||
|
|
fElementWeight = 1.f;
|
|||
|
|
fElementWeight = ( ( 1.f + pState->GetElementAttack( HitParam.HasElement ) ) * ( 1.f - GetElementDefense( HitParam.HasElement ) ) );
|
|||
|
|
#ifndef PRE_ADD_BUFF_STATE_LIMIT
|
|||
|
|
fElementWeight = max( fElementWeight, CGlobalWeightTable::GetInstance().GetValue( CGlobalWeightTable::ElementMinRevision ) );
|
|||
|
|
#endif
|
|||
|
|
fResult *= fElementWeight;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// ũ<><C5A9>Ƽ<EFBFBD><C6BC> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ؼ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ش<EFBFBD>. (<28>극<EFBFBD><EAB7B9>ŷ <20><><EFBFBD><EFBFBD>Ʈ(<28><><EFBFBD>۾Ƹ<DBBE> <20>극<EFBFBD><EAB7B9>ũ)<29><> <20><><EFBFBD><EFBFBD><EFBFBD>Ǿ<EFBFBD> <20><><EFBFBD><EFBFBD> <20>ʾƾ<CABE><C6BE><EFBFBD>)
|
|||
|
|
if( HitParam.HitType == CDnWeapon::Critical && false == HitParam.bBreakSuperAmmor)
|
|||
|
|
{
|
|||
|
|
float fCriticalValue = hHitter->GetCriticalConstant();
|
|||
|
|
float fCriticalResistProb = GetCriticalResistance() / fCriticalValue;
|
|||
|
|
if( fCriticalResistProb > CGlobalWeightTable::GetInstance().GetValue( CGlobalWeightTable::CriticalResistanceMax ) )
|
|||
|
|
fCriticalResistProb = CGlobalWeightTable::GetInstance().GetValue( CGlobalWeightTable::CriticalResistanceMax );
|
|||
|
|
if( _rand(GetRoom())%100 < (int)( fCriticalResistProb * 100.f ) ) {
|
|||
|
|
#if defined(PRE_FIX_51491)
|
|||
|
|
//ũ<><C5A9>Ƽ<EFBFBD>÷<EFBFBD> <20><EFBFBD><DFBB>ߴ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>ش<EFBFBD>..
|
|||
|
|
//#57510 PvP<76><50><EFBFBD><EFBFBD> ũ<><C5A9>Ƽ<EFBFBD><C6BC> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 1.5
|
|||
|
|
|
|||
|
|
float fCriticalIncValue = 1.0f;
|
|||
|
|
if( GetGameRoom()->bIsPvPRoom() == true )
|
|||
|
|
fCriticalIncValue = CGlobalWeightTable::GetInstance().GetValue( CGlobalWeightTable::CriticalIncrease_PVP );
|
|||
|
|
else
|
|||
|
|
fCriticalIncValue = CGlobalWeightTable::GetInstance().GetValue( CGlobalWeightTable::CriticalIncrease );
|
|||
|
|
|
|||
|
|
fResult = fResult / fCriticalIncValue;
|
|||
|
|
#else
|
|||
|
|
fResult *= CGlobalWeightTable::GetInstance().GetValue( CGlobalWeightTable::CriticalResistance );
|
|||
|
|
#endif // PRE_FIX_51491
|
|||
|
|
|
|||
|
|
m_HitParam.HitType = CDnWeapon::CriticalRes;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
#pragma region ++ [ pComboDamageLimitBlow BY SELF ( BLOW_242 ) ] ++
|
|||
|
|
// #52332 <20><><EFBFBD><EFBFBD> HIT<49><54> <20><><EFBFBD>Ŀ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ҵǴ<D2B5> ȿ<><C8BF> <20><><EFBFBD><EFBFBD>
|
|||
|
|
// 242<34><32> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF> <20><><EFBFBD><EFBFBD><EFBFBD>Ǿ<EFBFBD> <20>ִ<EFBFBD> <20><><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>꿡 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ų/<2F><><EFBFBD><EFBFBD> <20>̿<EFBFBD><CCBF>ؼ<EFBFBD> Hitī<74><C4AB>Ʈ <20><><EFBFBD>Ѱ<EFBFBD><D1B0><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ѵ<EFBFBD>..
|
|||
|
|
if( IsAppliedThisStateBlow( STATE_BLOW::BLOW_242 ) )
|
|||
|
|
{
|
|||
|
|
CDnSkill::SkillInfo *pSkillInfo = NULL;
|
|||
|
|
DnSkillHandle hSkill;
|
|||
|
|
|
|||
|
|
if (HitParam.bFromProjectile && HitParam.hWeapon)
|
|||
|
|
hSkill = static_cast<CDnProjectile*>( HitParam.hWeapon.GetPointer() )->GetParentSkill();
|
|||
|
|
else
|
|||
|
|
hSkill = hHitter->GetProcessSkill();
|
|||
|
|
|
|||
|
|
if (hSkill)
|
|||
|
|
pSkillInfo = const_cast<CDnSkill::SkillInfo*>(hSkill->GetInfo());
|
|||
|
|
|
|||
|
|
DNVector(DnBlowHandle) vlBlows;
|
|||
|
|
m_pStateBlow->GetStateBlowFromBlowIndex( STATE_BLOW::BLOW_242, vlBlows );
|
|||
|
|
int nBlowCount = (int)vlBlows.size();
|
|||
|
|
for (int i = 0; i < nBlowCount; ++i)
|
|||
|
|
{
|
|||
|
|
DnBlowHandle hBlow = vlBlows[i];
|
|||
|
|
if (hBlow)
|
|||
|
|
{
|
|||
|
|
CDnComboDamageLimitBlow* pComboDamageLimitBlow = dynamic_cast<CDnComboDamageLimitBlow*>(hBlow.GetPointer());
|
|||
|
|
if (pComboDamageLimitBlow)
|
|||
|
|
pComboDamageLimitBlow->UpdateHitCount(pSkillInfo, HitParam);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
#pragma endregion
|
|||
|
|
|
|||
|
|
// <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>߰<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><> <20><><EFBFBD><EFBFBD>.
|
|||
|
|
fResult += m_pStateBlow->OnCalcDamage( fResult, m_HitParam );
|
|||
|
|
|
|||
|
|
#if defined(PRE_FIX_59680)
|
|||
|
|
//<2F><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> OnCalcDamage<67><65> ȣ<><C8A3> <20>Ҷ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> StateBlow<6F><77> OnCalcDamage<67><65> ȣ<><C8A3><EFBFBD><EFBFBD> <20>Ǿ<EFBFBD><C7BE><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ɶ<EFBFBD> ȿ<><C8BF><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ȴ<EFBFBD>.
|
|||
|
|
//Ŭ<><C5AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ȧ<><C8A6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ڽſ<DABD><C5BF><EFBFBD> CDnAddStateOnHitBlow(178) <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ǰ<EFBFBD>, <20><><EFBFBD>Ŀ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ȯ <20>ɰ<EFBFBD><C9B0><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD>
|
|||
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ʴ<EFBFBD>. <20><EFBFBD><D7B7><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ŭ<><C5AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> HP<48><50><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD> <20>ߵ<EFBFBD><DFB5><EFBFBD><EFBFBD><EFBFBD> <20>ʴ´<CAB4>.
|
|||
|
|
if (IsMonsterActor())
|
|||
|
|
{
|
|||
|
|
DnActorHandle hSummonerActor;
|
|||
|
|
CDnStateBlow *pOwnerStateBlow = NULL;
|
|||
|
|
|
|||
|
|
CDnMonsterActor* pMonsterActor = dynamic_cast<CDnMonsterActor*>(m_MySmartPtr.GetPointer());
|
|||
|
|
if (pMonsterActor && pMonsterActor->IsSummonedMonster() && pMonsterActor->IsPuppetSummonMonster())
|
|||
|
|
hSummonerActor = pMonsterActor->GetSummonerPlayerActor();
|
|||
|
|
|
|||
|
|
if(hSummonerActor)
|
|||
|
|
pOwnerStateBlow = hSummonerActor->GetStateBlow();
|
|||
|
|
|
|||
|
|
if (pOwnerStateBlow)
|
|||
|
|
pOwnerStateBlow->OnCalcDamage(fResult, m_HitParam);
|
|||
|
|
}
|
|||
|
|
#endif // PRE_FIX_59680
|
|||
|
|
|
|||
|
|
// OnTargetHit<69><74> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȯ<EFBFBD><C8AE><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> [2011/02/15 semozz]
|
|||
|
|
m_HitParam.nCalcDamage = (int)fResult;
|
|||
|
|
hHitter->GetStateBlow()->OnTargetHit( GetMySmartPtr() );
|
|||
|
|
|
|||
|
|
#pragma region ++ [ fResult -= fAbsorbDamage BY SELF ( BLOW_243 ) ] ++
|
|||
|
|
if( IsAppliedThisStateBlow( STATE_BLOW::BLOW_243 ) )
|
|||
|
|
{
|
|||
|
|
float fAbsorbDamage = 0.f;
|
|||
|
|
int nAbsorbSP = 0;
|
|||
|
|
|
|||
|
|
DNVector( DnBlowHandle ) vlhManaShieldBlow;
|
|||
|
|
GatherAppliedStateBlowByBlowIndex( STATE_BLOW::BLOW_243, vlhManaShieldBlow );
|
|||
|
|
for( DWORD n=0; n<vlhManaShieldBlow.size(); n++ )
|
|||
|
|
{
|
|||
|
|
CDnManaShieldBlow* pManShieldBlow = static_cast<CDnManaShieldBlow*>(vlhManaShieldBlow[n].GetPointer());
|
|||
|
|
pManShieldBlow->CalcManaShield( fResult , fAbsorbDamage , nAbsorbSP );
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if( nAbsorbSP > GetSP() )
|
|||
|
|
{
|
|||
|
|
fAbsorbDamage -= (fAbsorbDamage * (nAbsorbSP - GetSP()) / nAbsorbSP);
|
|||
|
|
nAbsorbSP = GetSP();
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if( fAbsorbDamage > fResult )
|
|||
|
|
fAbsorbDamage = fResult;
|
|||
|
|
|
|||
|
|
fResult -= fAbsorbDamage;
|
|||
|
|
|
|||
|
|
SetSP( GetSP() -nAbsorbSP );
|
|||
|
|
RequestHPMPDelta( ElementEnum::ElementEnum_Amount, -nAbsorbSP, UINT_MAX, true , true );
|
|||
|
|
}
|
|||
|
|
#pragma endregion
|
|||
|
|
|
|||
|
|
#pragma region ++ [ fResult = 0.0f; BY SELF ( BLOW_051 ) ] ++
|
|||
|
|
#if defined(PRE_FIX_61382)
|
|||
|
|
if (IsAppliedThisStateBlow(STATE_BLOW::BLOW_051))
|
|||
|
|
{
|
|||
|
|
DNVector(DnBlowHandle) vlhTransmitBlows;
|
|||
|
|
GetStateBlow()->GetStateBlowFromBlowIndex( STATE_BLOW::BLOW_051, vlhTransmitBlows );
|
|||
|
|
|
|||
|
|
int iNumBlow = (int)vlhTransmitBlows.size();
|
|||
|
|
for( int i = 0; i < iNumBlow; ++i )
|
|||
|
|
{
|
|||
|
|
CDnTransmitDamageBlow* pTransmitDamageBlow = static_cast<CDnTransmitDamageBlow*>(vlhTransmitBlows[i].GetPointer());
|
|||
|
|
|
|||
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>Ǵ<DEB5> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>Ʈ <20><><EFBFBD>θ<EFBFBD> Ȯ<><C8AE> <20>ؼ<EFBFBD> <20><>Ʈ <20><><EFBFBD><EFBFBD><EFBFBD>϶<EFBFBD><CFB6><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ѵ<EFBFBD>.
|
|||
|
|
DnActorHandle hTargetActor = pTransmitDamageBlow->GetActorHandle();
|
|||
|
|
|
|||
|
|
bool isEnableTransmitDamage = false;
|
|||
|
|
|
|||
|
|
if (hTargetActor)
|
|||
|
|
{
|
|||
|
|
if (hTargetActor->IsMonsterActor())
|
|||
|
|
{
|
|||
|
|
CDnMonsterActor* pMonsterActor = static_cast<CDnMonsterActor*>(hTargetActor.GetPointer());
|
|||
|
|
isEnableTransmitDamage = pMonsterActor ? pMonsterActor->IsEnableNoDamage() == false : true;
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
isEnableTransmitDamage = true;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ϸ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><>Ų<EFBFBD><C5B2>.
|
|||
|
|
if (isEnableTransmitDamage == true)
|
|||
|
|
pTransmitDamageBlow->TransmitDamage( fResult , m_HitParam );
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ϰ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 0<><30><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><>Ŵ..
|
|||
|
|
fResult = 0.0f;
|
|||
|
|
}
|
|||
|
|
#endif // PRE_FIX_61382
|
|||
|
|
#pragma endregion
|
|||
|
|
|
|||
|
|
#pragma region ++ [ STAGE DAMAGE LIMIT ] ++
|
|||
|
|
#ifdef PRE_ADD_STAGE_DAMAGE_LIMIT
|
|||
|
|
CDnGameTask *pTask = (CDnGameTask *)CTaskManager::GetInstance(GetRoom()).GetTask( "GameTask" );
|
|||
|
|
if( pTask && pTask->GetStageDamageLimit()->fDamageLimit > 0.f )
|
|||
|
|
{
|
|||
|
|
if( hHitter )
|
|||
|
|
{
|
|||
|
|
CDnPlayerActor *pPlayerActor = NULL;
|
|||
|
|
|
|||
|
|
if( hHitter->IsPlayerActor() )
|
|||
|
|
{
|
|||
|
|
pPlayerActor = static_cast<CDnPlayerActor*>(hHitter.GetPointer());
|
|||
|
|
}
|
|||
|
|
else if( hHitter->IsMonsterActor() )
|
|||
|
|
{
|
|||
|
|
CDnMonsterActor *pMonsterActor = static_cast<CDnMonsterActor*>(hHitter.GetPointer());
|
|||
|
|
if( pMonsterActor && pMonsterActor->GetSummonerPlayerActor() )
|
|||
|
|
pPlayerActor = static_cast<CDnPlayerActor*>(hHitter.GetPointer());
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if( pPlayerActor )
|
|||
|
|
{
|
|||
|
|
bool bNotifyInterface = false;
|
|||
|
|
|
|||
|
|
float fBaseAttackPower = 0.f;
|
|||
|
|
if( HitParam.cAttackType == 0)
|
|||
|
|
{
|
|||
|
|
fBaseAttackPower = pState->GetAttackPMax() * fGausianResultProb * fHitPer;
|
|||
|
|
bNotifyInterface = pPlayerActor->GetDamageLimitInfo()->bPhysicalAttack;
|
|||
|
|
}
|
|||
|
|
else if (HitParam.cAttackType == 1)
|
|||
|
|
{
|
|||
|
|
fBaseAttackPower = pState->GetAttackMMax() * fGausianResultProb * fHitPer;
|
|||
|
|
bNotifyInterface = pPlayerActor->GetDamageLimitInfo()->bMagicalAttack;
|
|||
|
|
}
|
|||
|
|
else if (HitParam.cAttackType == 2) //rlkt_test
|
|||
|
|
{
|
|||
|
|
fBaseAttackPower = pState->GetAttackMMax() * fGausianResultProb * fHitPer;
|
|||
|
|
bNotifyInterface = pPlayerActor->GetDamageLimitInfo()->bMagicalAttack;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if( fResult > (fBaseAttackPower * pTask->GetStageDamageLimit()->fDamageLimit) )
|
|||
|
|
{
|
|||
|
|
fResult = (fBaseAttackPower * pTask->GetStageDamageLimit()->fDamageLimit);
|
|||
|
|
#ifdef PRE_ADD_STAGE_LIMIT_INTERFACE
|
|||
|
|
if( bNotifyInterface == true )
|
|||
|
|
HitParam.bStageLimit = true;
|
|||
|
|
#endif
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
#endif
|
|||
|
|
#pragma endregion
|
|||
|
|
|
|||
|
|
|
|||
|
|
if( fResult < 0.f )
|
|||
|
|
fResult = 0.f;
|
|||
|
|
|
|||
|
|
return fResult;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
float CDnActor::CalcDamage( CDnDamageBase *pHitter, SHitParam &HitParam )
|
|||
|
|
{
|
|||
|
|
float fResult = PreCalcDamage( pHitter, HitParam );
|
|||
|
|
|
|||
|
|
#if defined( NODAMAGE ) || defined( STRESS_TEST )
|
|||
|
|
return fResult;
|
|||
|
|
#endif
|
|||
|
|
|
|||
|
|
#if defined(PRE_ADD_MISSION_COUPON)
|
|||
|
|
INT64 nSaveHP = m_nHP;
|
|||
|
|
SetHP((INT64)( m_nHP - fResult ));
|
|||
|
|
m_nHP = (INT64)( nSaveHP - fResult );
|
|||
|
|
#else
|
|||
|
|
m_nHP = (INT64)( m_nHP - fResult );
|
|||
|
|
#endif
|
|||
|
|
|
|||
|
|
#if defined(PRE_ADD_TOTAL_LEVEL_SKILL)
|
|||
|
|
if (IsAppliedThisStateBlow( STATE_BLOW::BLOW_268 ))
|
|||
|
|
{
|
|||
|
|
float fHpRate = 1.0f;
|
|||
|
|
if (m_nMaxHP > 0)
|
|||
|
|
fHpRate = (float)m_nHP / (float)m_nMaxHP;
|
|||
|
|
|
|||
|
|
DNVector( DnBlowHandle ) vlhBlows;
|
|||
|
|
GatherAppliedStateBlowByBlowIndex( STATE_BLOW::BLOW_268, vlhBlows );
|
|||
|
|
|
|||
|
|
float fChangeRatio = 0.0f;
|
|||
|
|
for( int i = 0; i < (int)vlhBlows.size(); ++i )
|
|||
|
|
{
|
|||
|
|
DnBlowHandle hBlow = vlhBlows.at( i );
|
|||
|
|
if (hBlow && hBlow->IsEnd() == false)
|
|||
|
|
{
|
|||
|
|
CDnDamageChagneBlow* pDamageChageBlow = static_cast<CDnDamageChagneBlow*>(hBlow.GetPointer());
|
|||
|
|
if (pDamageChageBlow)
|
|||
|
|
{
|
|||
|
|
float fHPLimit = pDamageChageBlow->GetHpLimit();
|
|||
|
|
|
|||
|
|
if (fHpRate < fHPLimit &&
|
|||
|
|
pDamageChageBlow->IsActivated() == false &&
|
|||
|
|
pDamageChageBlow->GetLeftCoolTime() == 0.0f)
|
|||
|
|
{
|
|||
|
|
pDamageChageBlow->ApplyDamageChange();
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
#endif // PRE_ADD_TOTAL_LEVEL_SKILL
|
|||
|
|
|
|||
|
|
return fResult;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::Die( DnActorHandle hHitter )
|
|||
|
|
{
|
|||
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>Ÿģ <20>͵<EFBFBD> CP <20><><EFBFBD><EFBFBD> ó<><C3B3><EFBFBD>ؾ<EFBFBD><D8BE>ؼ<EFBFBD> <20>̰<EFBFBD><CCB0><EFBFBD><EFBFBD><EFBFBD> <20><>ü <20><><EFBFBD><EFBFBD> <20>ش<EFBFBD>.
|
|||
|
|
if( hHitter && hHitter->IsMonsterActor() && IsMonsterActor() )
|
|||
|
|
{
|
|||
|
|
DnActorHandle hSummonMasterPlayerActor = static_cast<CDnMonsterActor*>(hHitter.GetPointer())->GetSummonerPlayerActor();
|
|||
|
|
if( hSummonMasterPlayerActor )
|
|||
|
|
hHitter = hSummonMasterPlayerActor;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
#if defined( PRE_ADD_58761 )
|
|||
|
|
// <20><EFBFBD><D7BE><EFBFBD><EFBFBD><EFBFBD> <20>α<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
CDNGameRoom *pRoom = GetGameRoom();
|
|||
|
|
if( pRoom && CDnWorld::GetInstance(pRoom).GetMapSubType() == EWorldEnum::MapSubTypeNest)
|
|||
|
|
{
|
|||
|
|
if( hHitter && hHitter->IsMonsterActor() && IsPlayerActor() )
|
|||
|
|
{
|
|||
|
|
DnMonsterActorHandle hMonster = hHitter;
|
|||
|
|
int nSkillID = 0;
|
|||
|
|
if(hMonster->GetProcessSkill())
|
|||
|
|
nSkillID = hMonster->GetProcessSkill()->GetClassID();
|
|||
|
|
CDNUserSession *pSession = pRoom->GetUserSession( GetSessionID() );
|
|||
|
|
if (pSession)
|
|||
|
|
pRoom->NestDeathLog( pSession, hMonster->GetMonsterClassID(), nSkillID, pSession->GetUserJob(), pSession->GetLevel());
|
|||
|
|
else
|
|||
|
|
_DANGER_POINT();
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
#endif
|
|||
|
|
#if defined(PRE_FIX_44884)
|
|||
|
|
bool bStateBlowProcessed = true;
|
|||
|
|
|
|||
|
|
if (IsDie())
|
|||
|
|
bStateBlowProcessed = m_pStateBlow->OnDie( hHitter );
|
|||
|
|
|
|||
|
|
if (IsDie())
|
|||
|
|
OnDie(hHitter);
|
|||
|
|
#else
|
|||
|
|
OnDie( hHitter );
|
|||
|
|
bool bStateBlowProcessed = m_pStateBlow->OnDie( hHitter );
|
|||
|
|
#endif // PRE_FIX_44884
|
|||
|
|
|
|||
|
|
bool bCheckDie = false;
|
|||
|
|
|
|||
|
|
if( false == bStateBlowProcessed )
|
|||
|
|
{
|
|||
|
|
if( IsStandHit( m_HitParam.szActionName.c_str() ) )
|
|||
|
|
m_HitParam.szActionName = "Die", bCheckDie = true;
|
|||
|
|
if( IsStun( m_HitParam.szActionName.c_str() ) && !IsAir( m_HitParam.szActionName.c_str() ) )
|
|||
|
|
m_HitParam.szActionName = "Die", bCheckDie = true;
|
|||
|
|
|
|||
|
|
if( !bCheckDie ) {
|
|||
|
|
// Ȧ<><C8A6> <20><>ų <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Stay <20><><EFBFBD>ǵ<EFBFBD> <20><><EFBFBD><EFBFBD>.. <20>ȱ<C8B1><D7B7><EFBFBD> Die <20><EFBFBD><D7BC><EFBFBD> <20>ߵ<EFBFBD><DFB5><EFBFBD> <20>ȵǾ hold <20>°<EFBFBD> <20>ѹ濡 <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> Ŭ<><EFBFBD> "stand" <20><EFBFBD><D7BC><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
// OnDamage <20><>Ŷ<EFBFBD><C5B6> <20><EFBFBD> <20><> ä<><C3A4> <20>װ<EFBFBD> <20><>..
|
|||
|
|
if( IsStay( m_HitParam.szActionName.c_str() ) )
|
|||
|
|
m_HitParam.szActionName = "Die", bCheckDie = true;
|
|||
|
|
|
|||
|
|
if( IsAir( m_HitParam.szActionName.c_str() ) ) {
|
|||
|
|
if( IsExistAction( "Die_Air" ) ) m_HitParam.szActionName = "Die_Air", bCheckDie = true;
|
|||
|
|
}
|
|||
|
|
if( IsDown( m_HitParam.szActionName.c_str() ) ) {
|
|||
|
|
if( IsExistAction( "Die_Down" ) ) m_HitParam.szActionName = "Die_Down", bCheckDie = true;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if( !bCheckDie ) m_HitParam.szActionName = "Die";
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD>Ͱ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>鼭 <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> <20><>ų <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Die <20><EFBFBD><D7BC><EFBFBD> <20>ƴ϶<C6B4> <20>׳<EFBFBD> stand <20><>Ŵ. (#16331)
|
|||
|
|
m_HitParam.szActionName = "Stand";
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
m_bEnableNormalSuperAmmor = false;
|
|||
|
|
|
|||
|
|
if (hHitter)
|
|||
|
|
{
|
|||
|
|
if (hHitter->IsMonsterActor())
|
|||
|
|
{
|
|||
|
|
CDnMonsterActor* pMonster = static_cast<CDnMonsterActor*>(hHitter.GetPointer());
|
|||
|
|
if (pMonster && pMonster->IsCannonMonsterActor())
|
|||
|
|
{
|
|||
|
|
CDnCannonMonsterActor* pCannonMonster = static_cast<CDnCannonMonsterActor*>(hHitter.GetPointer());
|
|||
|
|
if (pCannonMonster && pCannonMonster->GetMasterPlayerActor() && pCannonMonster->GetMasterPlayerActor()->IsPlayerActor())
|
|||
|
|
{
|
|||
|
|
CDnPlayerActor* pPlayerActor = static_cast<CDnPlayerActor*>(pCannonMonster->GetMasterPlayerActor().GetPointer());
|
|||
|
|
if( pPlayerActor )
|
|||
|
|
pPlayerActor->OnKillMonster(GetMySmartPtr());
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
else if (hHitter->IsPlayerActor())
|
|||
|
|
{
|
|||
|
|
CDnPlayerActor* pPlayerActor = static_cast<CDnPlayerActor*>(hHitter.GetPointer());
|
|||
|
|
if( pPlayerActor )
|
|||
|
|
pPlayerActor->OnKillMonster(GetMySmartPtr());
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// <20><> <20><>Ƽ<EFBFBD><C6BC><EFBFBD>鿡<EFBFBD><E9BFA1> <20><><EFBFBD><EFBFBD><EFBFBD>Ͱ<EFBFBD> <20><EFBFBD><D7BE>ٰ<EFBFBD> ó<><C3B3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
|||
|
|
// NOTE: <20><><EFBFBD>ɸ<EFBFBD><C9B8><EFBFBD> <20>״<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ŭ<><C5AC><EFBFBD>̾<EFBFBD>Ʈ<EFBFBD><C6AE> <20><><EFBFBD>ϱ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>״´<D7B4>. pTask<73><6B> <20><><EFBFBD><EFBFBD><EFBFBD>Ⱚ<EFBFBD><E2B0AA><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>..
|
|||
|
|
CDnGameTask *pTask = (CDnGameTask *)CTaskManager::GetInstance(GetRoom()).GetTask( "GameTask" );
|
|||
|
|
|
|||
|
|
if ( pTask )
|
|||
|
|
{
|
|||
|
|
for( DWORD i=0; i< pTask->GetRoom()->GetUserCount(); i++ )
|
|||
|
|
{
|
|||
|
|
CDNGameRoom::PartyStruct *pStruct = pTask->GetRoom()->GetPartyData(i);
|
|||
|
|
if (!pStruct)
|
|||
|
|
continue;
|
|||
|
|
if( !IsMonsterActor() )
|
|||
|
|
continue;
|
|||
|
|
CDnMonsterActor* pMonster = static_cast<CDnMonsterActor*>(this);
|
|||
|
|
if( pStruct->pSession && pStruct->pSession->GetQuest() )
|
|||
|
|
pStruct->pSession->GetQuest()->OnDieMonster(pMonster->GetMonsterClassID());
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
void CDnActor::OnDamage( CDnDamageBase *pHitter, SHitParam &HitParam, HitStruct *pHitStruct )
|
|||
|
|
{
|
|||
|
|
//<2F><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> IsHitable<6C><65><EFBFBD><EFBFBD> üũ <20>ǰ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>.
|
|||
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ó<><C3B3> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>..
|
|||
|
|
RemoveStateEffectByHitSignal(pHitStruct);
|
|||
|
|
|
|||
|
|
DnActorHandle hHitterActor = pHitter->GetActorHandle();
|
|||
|
|
|
|||
|
|
if( hHitterActor && hHitterActor->IsAppliedThisStateBlow(STATE_BLOW::BLOW_183) == false )
|
|||
|
|
{
|
|||
|
|
#if defined(PRE_ADD_PREFIX_SYSTE_RENEW)
|
|||
|
|
hHitterActor->ApplyPrefixOffenceSkillToTarget_New(GetActorHandle());
|
|||
|
|
#else
|
|||
|
|
hHitterActor->ApplyPrefixOffenceSkillToTarget(GetActorHandle());
|
|||
|
|
#endif
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
m_HitParam = HitParam;
|
|||
|
|
DnActorHandle hHitter = pHitter->GetActorHandle();
|
|||
|
|
CDnStateBlow *pHitterStateBlow = hHitter->GetStateBlow();
|
|||
|
|
|
|||
|
|
#if defined(PRE_ADD_PROJECTILE_SE_INFO)
|
|||
|
|
if( hHitter && HitParam.bFromProjectile && HitParam.hWeapon )
|
|||
|
|
{
|
|||
|
|
CDnStateBlow *pProjectileStateBlow = static_cast<CDnProjectile*>( HitParam.hWeapon.GetPointer() )->GetShooterStateBlow().get();
|
|||
|
|
if( pProjectileStateBlow )
|
|||
|
|
pHitterStateBlow = pProjectileStateBlow;
|
|||
|
|
}
|
|||
|
|
#endif
|
|||
|
|
|
|||
|
|
#ifdef PRE_ADD_EXPORT_DPS_INFORMATION
|
|||
|
|
if( CDnDPSReporter::IsActive() && hHitter && hHitter->IsPlayerActor() )
|
|||
|
|
{
|
|||
|
|
CDnPlayerActor* pPlayerActor = static_cast<CDnPlayerActor*>( hHitter.GetPointer());
|
|||
|
|
|
|||
|
|
if(CDnDPSReporter::GetInstance().IsEnabledUser(pPlayerActor->GetCharacterDBID()))
|
|||
|
|
CDnDPSReporter::GetInstance().StartReport();
|
|||
|
|
}
|
|||
|
|
float fDPS_DAMAGE = 0;
|
|||
|
|
#endif
|
|||
|
|
|
|||
|
|
CDnWeapon::HitTypeEnum HitType = CDnWeapon::Normal;
|
|||
|
|
// <20><><EFBFBD>߷<EFBFBD> <20><><EFBFBD><EFBFBD>
|
|||
|
|
SetDamageRemainTime( hHitter->GetUniqueID(), HitParam.RemainTime , hHitter->GetCurrentActionIndex() );
|
|||
|
|
SetLastDamageHitUniqueID( hHitter->GetUniqueID(), HitParam.iUniqueID );
|
|||
|
|
m_fStiffDelta = 0.f;
|
|||
|
|
if( m_fDownDelta > 0.f ) m_fLastDownRatio *= 0.5f;
|
|||
|
|
m_fDownDelta = 0.f;
|
|||
|
|
|
|||
|
|
bool bAir = false;
|
|||
|
|
if( IsAir() && IsHit() ) bAir = true;
|
|||
|
|
|
|||
|
|
bool bHitSuccess = CheckDamageAction( hHitter );
|
|||
|
|
|
|||
|
|
|
|||
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>.. [2011/02/21 semozz]
|
|||
|
|
if (hHitter && hHitter->IsAppliedThisStateBlow(STATE_BLOW::BLOW_180))
|
|||
|
|
{
|
|||
|
|
if (0 == m_HitParam.cAttackType)
|
|||
|
|
{
|
|||
|
|
//BLOW_180<38><30> <20><><EFBFBD><EFBFBD><EFBFBD>ڿ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ǿ<EFBFBD><C7BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ѵ<EFBFBD>.
|
|||
|
|
m_HitParam.cAttackType = 1;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if( pHitterStateBlow && pHitterStateBlow->IsApplied(STATE_BLOW::BLOW_182) )
|
|||
|
|
{
|
|||
|
|
//<2F>Ӽ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>??
|
|||
|
|
if( m_HitParam.HasElement == CDnActorState::ElementEnum_Amount )
|
|||
|
|
{
|
|||
|
|
DNVector(DnBlowHandle) vlChangeElementBlows;
|
|||
|
|
pHitterStateBlow->GetStateBlowFromBlowIndex( STATE_BLOW::BLOW_182, vlChangeElementBlows );
|
|||
|
|
CDnState::ElementEnum eElementType = CDnState::ElementEnum_Amount;
|
|||
|
|
if (!vlChangeElementBlows.empty())
|
|||
|
|
{
|
|||
|
|
eElementType = CDnState::ElementEnum(int(vlChangeElementBlows.at(0)->GetFloatValue()));
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if (eElementType != CDnActorState::ElementEnum_Amount)
|
|||
|
|
m_HitParam.HasElement = eElementType;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if( m_pStateBlow->IsApplied( STATE_BLOW::BLOW_149 ) == false ) // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF> <20>ɷ<EFBFBD><C9B7><EFBFBD> <20><><EFBFBD><EFBFBD> OnDefenseAttack <20><> <20>Ƽ<DEBE> ó<><C3B3><EFBFBD>ϴ<EFBFBD> <20>и<EFBFBD>, <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF> ó<><C3B3><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>.
|
|||
|
|
{
|
|||
|
|
CDnState* pAttackerState = NULL;
|
|||
|
|
if( hHitter && !HitParam.bFromProjectile )
|
|||
|
|
{
|
|||
|
|
pAttackerState = static_cast<CDnActorState *>(hHitter.GetPointer());
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
if( HitParam.hWeapon )
|
|||
|
|
pAttackerState = static_cast<CDnProjectile*>( HitParam.hWeapon.GetPointer() )->GetShooterStateSnapshot().get();
|
|||
|
|
|
|||
|
|
#if !defined(PRE_ADD_PROJECTILE_SE_INFO)
|
|||
|
|
if (hHitter&& hHitter->IsApplyPrefixOffenceSkill())
|
|||
|
|
pAttackerState = static_cast<CDnActorState *>(hHitter.GetPointer());
|
|||
|
|
#endif
|
|||
|
|
|
|||
|
|
if( hHitter && pAttackerState == NULL )
|
|||
|
|
pAttackerState = static_cast<CDnActorState *>(hHitter.GetPointer());
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
#ifdef PRE_ADD_MONSTER_CATCH
|
|||
|
|
bool bCheckOnDefense = true;
|
|||
|
|
if( IsPlayerActor() )
|
|||
|
|
{
|
|||
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD>Ϳ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>¿<EFBFBD><C2BF><EFBFBD><EFBFBD><EFBFBD> <20><>ų <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>.
|
|||
|
|
if( static_cast<CDnPlayerActor*>(this)->IsCatchedByMonster() || m_HitParam.bReleaseCatchActor )
|
|||
|
|
bCheckOnDefense = false;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// <20><><EFBFBD><EFBFBD> <20>༮<EFBFBD><E0BCAE> hActor <20><><EFBFBD><EFBFBD> state <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϸ<EFBFBD> <20><>ų <20><EFBFBD><D7BC><EFBFBD> <20>̹<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20>ֱ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>ݷ<EFBFBD>/<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD>
|
|||
|
|
// <20><EFBFBD>ü<EFBFBD><C3BC> <20>Ǿ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ͱ<EFBFBD><CDB1><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> pAttackerState <20><> <20><><EFBFBD><EFBFBD><EFBFBD>Ѵ<EFBFBD>.
|
|||
|
|
// pAttackerState <20><> <20>Լ<EFBFBD> <20><><EFBFBD>ο<EFBFBD><CEBF><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>, <20>ݵ<EFBFBD><DDB5><EFBFBD> <20><><EFBFBD>ο<EFBFBD><CEBF><EFBFBD> NULL <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> üũ<C3BC><C5A9> <20>ؾ<EFBFBD> <20><>.
|
|||
|
|
if( bCheckOnDefense )
|
|||
|
|
bHitSuccess = m_pStateBlow->OnDefenseAttack( hHitter, pAttackerState, m_HitParam, bHitSuccess );
|
|||
|
|
#else
|
|||
|
|
bHitSuccess = m_pStateBlow->OnDefenseAttack( hHitter, pAttackerState, m_HitParam, bHitSuccess );
|
|||
|
|
#endif
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ݻ<EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> hitter <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> Die ó<><C3B3><EFBFBD>Ǿ<EFBFBD> <20><>ü<EFBFBD><C3BC> destroy <20><> <20><> <20>ִ<EFBFBD>.
|
|||
|
|
// <20>÷<EFBFBD><C3B7>̾<EFBFBD><CCBE><EFBFBD> <20><><EFBFBD><EFBFBD> <20><>ü<EFBFBD><C3BC> <20>ı<EFBFBD><C4B1><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD> CheckDamageVelocity() <20>Լ<EFBFBD><D4BC><EFBFBD> ȣ<><C8A3><EFBFBD>Ǿ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϰ<EFBFBD>
|
|||
|
|
// <20>ǰݾ<DDBE><D7BC><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20>ֵ<EFBFBD><D6B5><EFBFBD> ó<><C3B3><EFBFBD>Ѵ<EFBFBD>.#23559
|
|||
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ڸ<EFBFBD><DAB8><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ݻ<EFBFBD><DDBB><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ͱ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ӵ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><>Ȯ<EFBFBD><C8AE> <20><><EFBFBD><EFBFBD> <20>ȵǾ<C8B5> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
// <20>켱 <20>÷<EFBFBD><C3B7>̾<EFBFBD><CCBE>ʸ<EFBFBD> ó<><C3B3><EFBFBD>صд<D8B5>.
|
|||
|
|
if( hHitter->IsMonsterActor() )
|
|||
|
|
{
|
|||
|
|
if( !hHitter || hHitter->IsDie() )
|
|||
|
|
return;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
bool isBreakSuperArmorBlow = false;
|
|||
|
|
|
|||
|
|
if( bHitSuccess ) {
|
|||
|
|
// <20><><EFBFBD><EFBFBD> <20>ð<EFBFBD> <20><><EFBFBD><EFBFBD>
|
|||
|
|
float fStiffResult = 0.f;
|
|||
|
|
if( GetStiffResistance() > 0 ) fStiffResult = ( hHitter->GetStiff() * m_HitParam.fStiffProb ) / GetStiffResistance();
|
|||
|
|
fStiffResult *= CGlobalWeightTable::GetInstance().GetValue( CGlobalWeightTable::StiffRevision );
|
|||
|
|
|
|||
|
|
if( fStiffResult < 0.001f )
|
|||
|
|
fStiffResult = 0.001f; // CPacketCompressStream::FLOAT_SHORT <20><> <20><><EFBFBD><EFBFBD><EFBFBD>ϱ<CFB1><E2B6A7><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EEB3AA> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ʵ<EFBFBD><CAB5><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ѵ<EFBFBD>.
|
|||
|
|
|
|||
|
|
if( fStiffResult <= 0.f )
|
|||
|
|
{
|
|||
|
|
fStiffResult = 0.05f;
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
float fStiffMax = 0.f;
|
|||
|
|
|
|||
|
|
#if defined PRE_ADD_PVP_STIFF_MAX
|
|||
|
|
if( GetGameRoom()->bIsPvPRoom() == true )
|
|||
|
|
fStiffMax = CGlobalWeightTable::GetInstance().GetValue( CGlobalWeightTable::StiffMax_PVP );
|
|||
|
|
else
|
|||
|
|
fStiffMax = CGlobalWeightTable::GetInstance().GetValue( CGlobalWeightTable::StiffMax );
|
|||
|
|
#else
|
|||
|
|
fStiffMax = CGlobalWeightTable::GetInstance().GetValue( CGlobalWeightTable::StiffMax );
|
|||
|
|
#endif
|
|||
|
|
if( fStiffResult > fStiffMax )
|
|||
|
|
fStiffResult = fStiffMax;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
m_fStiffDelta = s_fMaxStiffTime * fStiffResult;
|
|||
|
|
|
|||
|
|
// <20>ٿ<EFBFBD><D9BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
|||
|
|
if( !IsDown() ) {
|
|||
|
|
m_fLastDownRatio = 1.f;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
float fTemp = ( 3.f * ( 1.f - GetDownDelayProb() ) ) * m_fLastDownRatio;
|
|||
|
|
int nTemp = (int)( fTemp * DOWN_DELAY_RANDOM_RANGE * 100.f );
|
|||
|
|
if( nTemp == 0 ) m_fDownDelta = fTemp;
|
|||
|
|
else m_fDownDelta = fTemp - DOWN_DELAY_RANDOM_RANGE + ( _rand(GetRoom())%( nTemp * 2 ) / 100.f );
|
|||
|
|
if( m_fDownDelta >= 3.f ) m_fDownDelta = 3.f;
|
|||
|
|
if( m_fDownDelta <= 0.01f ) m_fDownDelta = 0.01f;
|
|||
|
|
|
|||
|
|
// ũ<><C5A9>Ƽ<EFBFBD><C6BC> <20><><EFBFBD><EFBFBD>
|
|||
|
|
float fCritical = CGlobalWeightTable::GetInstance().GetValue( CGlobalWeightTable::CriticalValue );
|
|||
|
|
float fCriticalValue = hHitter->GetLevelWeightValue() * fCritical;
|
|||
|
|
float fCriticalProb = 0.f;
|
|||
|
|
if( fCriticalValue > 0.f )
|
|||
|
|
fCriticalProb = hHitter->GetCritical() / fCriticalValue;
|
|||
|
|
else
|
|||
|
|
g_Log.Log(LogType::_SESSIONCRASH, L"fCriticalValue = 0.f ClassID=%d\n", hHitter->GetClassID() );
|
|||
|
|
|
|||
|
|
|
|||
|
|
float fAddCiriticalValue = 0.0f;
|
|||
|
|
|
|||
|
|
if (IsAppliedThisStateBlow(STATE_BLOW::BLOW_250))
|
|||
|
|
{
|
|||
|
|
DNVector( DnBlowHandle ) vlhCriticalIncBlows;
|
|||
|
|
GatherAppliedStateBlowByBlowIndex( STATE_BLOW::BLOW_250, vlhCriticalIncBlows );
|
|||
|
|
int nListCount = (int)vlhCriticalIncBlows.size();
|
|||
|
|
for (int i = 0; i < nListCount; ++i)
|
|||
|
|
{
|
|||
|
|
DnBlowHandle hBlow = vlhCriticalIncBlows[i];
|
|||
|
|
if (hBlow)
|
|||
|
|
fAddCiriticalValue += hBlow->GetFloatValue();
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
if( pHitterStateBlow )
|
|||
|
|
{
|
|||
|
|
if( pHitterStateBlow->IsApplied(STATE_BLOW::BLOW_251) )
|
|||
|
|
{
|
|||
|
|
DNVector(DnBlowHandle) vlhCriticalIncBlows;
|
|||
|
|
pHitterStateBlow->GetStateBlowFromBlowIndex( STATE_BLOW::BLOW_251, vlhCriticalIncBlows );
|
|||
|
|
int nListCount = (int)vlhCriticalIncBlows.size();
|
|||
|
|
for (int i = 0; i < nListCount; ++i)
|
|||
|
|
{
|
|||
|
|
DnBlowHandle hBlow = vlhCriticalIncBlows[i];
|
|||
|
|
if (hBlow)
|
|||
|
|
fAddCiriticalValue += hBlow->GetFloatValue();
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
fCriticalProb += fAddCiriticalValue;
|
|||
|
|
|
|||
|
|
if( fCriticalProb > CGlobalWeightTable::GetInstance().GetValue( CGlobalWeightTable::CriticalMax ) )
|
|||
|
|
fCriticalProb = CGlobalWeightTable::GetInstance().GetValue( CGlobalWeightTable::CriticalMax );
|
|||
|
|
|
|||
|
|
bool bBreakSuperAmmor = false;
|
|||
|
|
//<2F><><EFBFBD>۾ƸӺ극<D3BA><EAB7B9>ũ <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF> <20>ɷ<EFBFBD> <20>ְ<EFBFBD>, Ȯ<><C8AE><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ũ<><C5A9>Ƽ<EFBFBD>÷<EFBFBD> <20><><EFBFBD><EFBFBD>.( <20>鿪<EFBFBD><E9BFAA> <20>ƴϾ<C6B4><CFBE><EFBFBD> <20>Ѵ<EFBFBD>..)
|
|||
|
|
if (hHitter->IsAppliedThisStateBlow(STATE_BLOW::BLOW_162) && !IsImmuned(STATE_BLOW::BLOW_162))
|
|||
|
|
{
|
|||
|
|
DNVector( DnBlowHandle ) vlhBreakSuperArmors;
|
|||
|
|
hHitter->GatherAppliedStateBlowByBlowIndex( STATE_BLOW::BLOW_162, vlhBreakSuperArmors );
|
|||
|
|
|
|||
|
|
float fRate = 0.0f;
|
|||
|
|
DnSkillHandle hSkill;
|
|||
|
|
|
|||
|
|
if (!vlhBreakSuperArmors.empty())
|
|||
|
|
{
|
|||
|
|
const CDnSkill::SkillInfo* pSkillInfo = vlhBreakSuperArmors.at(0)->GetParentSkillInfo();
|
|||
|
|
if (pSkillInfo)
|
|||
|
|
hSkill = hHitter->FindSkill(pSkillInfo->iSkillID);
|
|||
|
|
|
|||
|
|
if (hSkill && CDnSkill::UsingResult::Success == hSkill->CanExecute())
|
|||
|
|
{
|
|||
|
|
fRate = vlhBreakSuperArmors.at(0)->GetFloatValue();
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
bBreakSuperAmmor = rand() % 10000 <= (fRate * 10000.0f);
|
|||
|
|
|
|||
|
|
if (bBreakSuperAmmor)
|
|||
|
|
{
|
|||
|
|
fCriticalProb = 1.0f;
|
|||
|
|
m_HitParam.bBreakSuperAmmor = true;
|
|||
|
|
|
|||
|
|
if (hSkill && CDnSkill::Passive == hSkill->GetSkillType())
|
|||
|
|
{
|
|||
|
|
// PassiveSkill <20><>Ÿ<EFBFBD><C5B8> ǥ<>ø<EFBFBD> <20><><EFBFBD><EFBFBD> <20><>Ŷ <20><><EFBFBD><EFBFBD>...
|
|||
|
|
BYTE pBuffer[128];
|
|||
|
|
CPacketCompressStream Stream( pBuffer, 128 );
|
|||
|
|
|
|||
|
|
DWORD dwUniqueID = hHitter ? hHitter->GetUniqueID() : -1;
|
|||
|
|
int nSkillID = hSkill->GetClassID();
|
|||
|
|
|
|||
|
|
Stream.Write( &dwUniqueID, sizeof(dwUniqueID) );
|
|||
|
|
Stream.Write( &nSkillID, sizeof(nSkillID));
|
|||
|
|
|
|||
|
|
hHitter->Send(eActor::SC_PASSIVESKILL_COOLTIME, &Stream);
|
|||
|
|
|
|||
|
|
//<2F><><EFBFBD><EFBFBD> <20><>Ÿ<EFBFBD><C5B8> <20><><EFBFBD><EFBFBD>.
|
|||
|
|
hSkill->OnBeginCoolTime();
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
//<2F><><EFBFBD>۾ƸӺ극<D3BA><EAB7B9>ũ <20><><EFBFBD><EFBFBD>Ʈ ǥ<><C7A5> <20><>Ŷ <20><><EFBFBD><EFBFBD>..
|
|||
|
|
{
|
|||
|
|
//<2F><><EFBFBD><EFBFBD>Ʈ ǥ<>ÿ<EFBFBD> <20><>Ŷ<EFBFBD><C5B6> <20><><EFBFBD><EFBFBD>..
|
|||
|
|
BYTE pBuffer[128];
|
|||
|
|
CPacketCompressStream Stream( pBuffer, 128 );
|
|||
|
|
|
|||
|
|
DWORD dwUniqueID = hHitter ? hHitter->GetUniqueID() : -1;
|
|||
|
|
STATE_BLOW::emBLOW_INDEX blowIndex = STATE_BLOW::BLOW_162;
|
|||
|
|
bool bShowEffect = true;
|
|||
|
|
Stream.Write( &dwUniqueID, sizeof(dwUniqueID) );
|
|||
|
|
Stream.Write( &blowIndex, sizeof(blowIndex));
|
|||
|
|
Stream.Write( &bShowEffect, sizeof(bShowEffect));
|
|||
|
|
|
|||
|
|
hHitter->Send(eActor::SC_SHOW_STATE_EFFECT, &Stream);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
//162<36><32> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ƸӰ<C6B8> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ȯ<><C8AE>
|
|||
|
|
if (bBreakSuperAmmor)
|
|||
|
|
isBreakSuperArmorBlow = true;
|
|||
|
|
|
|||
|
|
//79<37><39> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD> <20>ɷ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>Ƹ<EFBFBD> <20><><EFBFBD><EFBFBD>..
|
|||
|
|
if (IsAppliedThisStateBlow(STATE_BLOW::BLOW_079))
|
|||
|
|
isBreakSuperArmorBlow = true;
|
|||
|
|
|
|||
|
|
EtVector3 vVelocity = m_HitParam.vVelocity;
|
|||
|
|
|
|||
|
|
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
|||
|
|
int nStunProb = (int)( CGlobalWeightTable::GetInstance().GetValue( CGlobalWeightTable::StunMax ) * 100.f );
|
|||
|
|
if( GetStunResistance() > 0 ) {
|
|||
|
|
float fLocalTemp = powf( (float)( hHitter->GetStun() / GetStunResistance() ), CGlobalWeightTable::GetInstance().GetValue( CGlobalWeightTable::StunRevisioin ) ) * CGlobalWeightTable::GetInstance().GetValue( CGlobalWeightTable::StunRevision2 );
|
|||
|
|
if( fLocalTemp > CGlobalWeightTable::GetInstance().GetValue( CGlobalWeightTable::StunMax ) )
|
|||
|
|
fLocalTemp = CGlobalWeightTable::GetInstance().GetValue( CGlobalWeightTable::StunMax );
|
|||
|
|
nStunProb = (int)( fLocalTemp * 100.f );
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
bool isAppliedForceSturn = false;
|
|||
|
|
|
|||
|
|
// Ÿ<><C5B8><EFBFBD>ڰ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD> <20>ִ<EFBFBD> <20><>Ȳ<EFBFBD>̶<EFBFBD><CCB6><EFBFBD> <20>ش<EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF> <20><>ġ<EFBFBD><C4A1> <20>ִ<EFBFBD> Ȯ<><C8AE> <20><> (0.0~1.0)<29><> <20><><EFBFBD>Ѵ<EFBFBD>.
|
|||
|
|
if( hHitter && hHitter->IsAppliedThisStateBlow( STATE_BLOW::BLOW_133 ) )
|
|||
|
|
{
|
|||
|
|
DNVector( DnBlowHandle ) vlhStunBlow;
|
|||
|
|
hHitter->GatherAppliedStateBlowByBlowIndex( STATE_BLOW::BLOW_133, vlhStunBlow );
|
|||
|
|
for( int i = 0; i < (int)vlhStunBlow.size(); ++i )
|
|||
|
|
nStunProb += int(vlhStunBlow.at(i)->GetFloatValue() * 100.0f);
|
|||
|
|
|
|||
|
|
isAppliedForceSturn = true;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// if( hHitter->GetStun() > 0 ) nStunProb = (int)( ( ( 1.f - ( hHitter->GetStun() / GetStunResistance() ) ) * 100 ) * CGlobalWeightTable::GetInstance().GetValue( CGlobalWeightTable::StunRevisioin ) );
|
|||
|
|
nStunProb = (int)( nStunProb * m_HitParam.fDamage );
|
|||
|
|
if( _rand(GetRoom())%100 < nStunProb ) {
|
|||
|
|
if( IsStandHit( m_HitParam.szActionName.c_str() ) ) {
|
|||
|
|
m_HitParam.szActionName = "Stun";
|
|||
|
|
}
|
|||
|
|
else if( IsAir( m_HitParam.szActionName.c_str() ) ) {
|
|||
|
|
if( strstr( m_HitParam.szActionName.c_str(), "High" ) == NULL ) {
|
|||
|
|
m_HitParam.szActionName = "Hit_AirUp";
|
|||
|
|
}
|
|||
|
|
vVelocity = m_HitParam.vVelocity * CGlobalWeightTable::GetInstance().GetValue( CGlobalWeightTable::StunVelocityRevision ) * ( 1.f + pHitStruct->fStunVelocityRevision );
|
|||
|
|
}
|
|||
|
|
else if( IsDown( m_HitParam.szActionName.c_str() ) ) {
|
|||
|
|
m_HitParam.szActionName = "Hit_AirUp";
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Ǵ<EFBFBD><C7B4><EFBFBD><EFBFBD><EFBFBD> ũ<><C5A9>Ƽ<EFBFBD><C6BC><EFBFBD><EFBFBD> <20><EFBFBD><DFBB>Ǿ<EFBFBD><C7BE><EFBFBD> <20><>.
|
|||
|
|
//<2F><EFBFBD><D7B7><EFBFBD> STATE_BLOW::BLOW_133 <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD> <20>ٸ<EFBFBD> Stun<75><6E><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϰ<EFBFBD>
|
|||
|
|
//STATE_BLOW::BLOW_133<33><33><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD> <20>ְ<EFBFBD>, hitType<70><65> <20><><EFBFBD><EFBFBD><EFBFBD>Ǿ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> hitType<70><65> Sturn<72><6E><EFBFBD><EFBFBD> <20>ٲ<EFBFBD><D9B2><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
|||
|
|
if (!isAppliedForceSturn)
|
|||
|
|
HitType = CDnWeapon::Stun;
|
|||
|
|
else if (HitType == CDnWeapon::Normal)
|
|||
|
|
HitType = CDnWeapon::Stun;
|
|||
|
|
|
|||
|
|
m_fStiffDelta = 0.f;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if ( m_HitParam.HasElement == CDnActorState::Fire && IsAppliedThisStateBlow(STATE_BLOW::BLOW_042)) // <20><>Ʈ <20>Ӽ<EFBFBD><D3BC><EFBFBD> ȭ<><C8AD><EFBFBD≯<EFBFBD> , ȭ<><C8AD><EFBFBD><EFBFBD> <20>ɷ<EFBFBD><C9B7>ִ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>̶<EFBFBD><CCB6><EFBFBD>
|
|||
|
|
{
|
|||
|
|
if (hHitter && hHitter->IsAppliedThisStateBlow(STATE_BLOW::BLOW_222)) // <20><><EFBFBD><EFBFBD><EFBFBD>༮<EFBFBD><E0BCAE> ȭ<><C8AD><EFBFBD>Ӽ<EFBFBD> ũ<><C5A9> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ִٸ<D6B4>.
|
|||
|
|
{
|
|||
|
|
DNVector( DnBlowHandle ) vBurnCriticalBlows;
|
|||
|
|
hHitter->GatherAppliedStateBlowByBlowIndex( STATE_BLOW::BLOW_222, vBurnCriticalBlows );
|
|||
|
|
|
|||
|
|
if (!vBurnCriticalBlows.empty())
|
|||
|
|
{
|
|||
|
|
if(vBurnCriticalBlows.at(0))
|
|||
|
|
{
|
|||
|
|
CDnBurnCriticalBlow *pBurnCriticalBlow = static_cast<CDnBurnCriticalBlow*>(vBurnCriticalBlows.at(0).GetPointer());
|
|||
|
|
|
|||
|
|
if(pBurnCriticalBlow->GetMultiplyRatio() > 0)
|
|||
|
|
fCriticalProb = fCriticalProb + ( fCriticalProb * ( (float)pBurnCriticalBlow->GetMultiplyRatio() * 1/100 ) );
|
|||
|
|
|
|||
|
|
if(pBurnCriticalBlow->GetAddValueRatio() > 0)
|
|||
|
|
fCriticalProb = fCriticalProb + (pBurnCriticalBlow->GetAddValueRatio() / fCriticalValue);
|
|||
|
|
|
|||
|
|
|
|||
|
|
if( fCriticalProb > CGlobalWeightTable::GetInstance().GetValue( CGlobalWeightTable::CriticalMax ) )
|
|||
|
|
fCriticalProb = CGlobalWeightTable::GetInstance().GetValue( CGlobalWeightTable::CriticalMax );
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
//<2F><><EFBFBD><EFBFBD>Ȯ<EFBFBD><C8AE> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> ũ<><C5A9>Ƽ<EFBFBD><C6BC> Ȯ<><C8AE> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>.
|
|||
|
|
if( _rand(GetRoom())%100 < (int)( fCriticalProb * 100.f ) ) {
|
|||
|
|
vVelocity = m_HitParam.vVelocity * CGlobalWeightTable::GetInstance().GetValue( CGlobalWeightTable::CriticalVelocityRevision ) * ( 1.f + pHitStruct->fCriticalVelocityRevision );
|
|||
|
|
HitType = CDnWeapon::Critical;
|
|||
|
|
|
|||
|
|
#if defined(PRE_ADD_TOTAL_LEVEL_SKILL)
|
|||
|
|
//ũ<><C5A9>Ƽ<EFBFBD><C6BC><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>շ<EFBFBD><D5B7><EFBFBD><EFBFBD><EFBFBD>ų<EFBFBD><C5B3> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF>
|
|||
|
|
if (hHitter->IsAppliedThisStateBlow(STATE_BLOW::BLOW_267))
|
|||
|
|
{
|
|||
|
|
DNVector( DnBlowHandle ) vlhBlows;
|
|||
|
|
hHitter->GatherAppliedStateBlowByBlowIndex( STATE_BLOW::BLOW_267, vlhBlows );
|
|||
|
|
|
|||
|
|
int nCount = (int)vlhBlows.size();
|
|||
|
|
for( int i = 0; i < (int)vlhBlows.size(); ++i )
|
|||
|
|
{
|
|||
|
|
CDnAddCriticalRateBlow* pBlow = static_cast<CDnAddCriticalRateBlow*>(vlhBlows[i].GetPointer());
|
|||
|
|
if (pBlow && pBlow->IsActivated() == false && pBlow->GetLeftCoolTime() == 0.0f)
|
|||
|
|
pBlow->ApplyCriticalIncBlow();
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
#endif // PRE_ADD_TOTAL_LEVEL_SKILL
|
|||
|
|
|
|||
|
|
//rlkt_mastery!
|
|||
|
|
//printf("%s, OnCriticalHit Passive %d \n ", __FUNCTION__, 7529);
|
|||
|
|
//mastery 1 dark avenger
|
|||
|
|
/* CDnPlayerActor *pPlayer = static_cast<CDnPlayerActor*>(hHitter.GetPointer());
|
|||
|
|
boost::shared_ptr<IDnObserverNotifyEvent> pEvent(IDnObserverNotifyEvent::Create(EVENT_ONCRITICALHIT));
|
|||
|
|
pEvent->SetSkillID(hHitter->GetProcessSkill()->GetClassID());
|
|||
|
|
pPlayer->Notify(pEvent);*/
|
|||
|
|
CDnPlayerActor *pPlayer = static_cast<CDnPlayerActor*>(hHitter.GetPointer());
|
|||
|
|
if (pPlayer && pPlayer->IsPlayerActor()) {
|
|||
|
|
|
|||
|
|
printf("%s Notify EVENT_ONCRITICALHIT\n",__FUNCTION__);
|
|||
|
|
|
|||
|
|
boost::shared_ptr<IDnObserverNotifyEvent> pEvent(IDnObserverNotifyEvent::Create(EVENT_ONCRITICALHIT));
|
|||
|
|
pEvent->SetSkillID(pPlayer->GetLastUsedSkill());
|
|||
|
|
pPlayer->Notify(pEvent);
|
|||
|
|
|
|||
|
|
//boost::shared_ptr<IDnObserverNotifyEvent> pEvent(IDnObserverNotifyEvent::Create(EVENT_ONCRITICALHIT));
|
|||
|
|
////pEvent->SetSkillID(pPlayer->GetLastUsedSkill());
|
|||
|
|
//pPlayer->Notify(pEvent);
|
|||
|
|
}
|
|||
|
|
/* CDnPlayerActor *pPlayer = static_cast<CDnPlayerActor*>(hHitter.GetPointer());
|
|||
|
|
shared_ptr<IDnObserverNotifyEvent> pNotifyEvent(new CDnOnCriticalHitMessage);
|
|||
|
|
shared_ptr<CDnOnCriticalHitMessage> pOnCriticalEvent = shared_polymorphic_downcast<CDnOnCriticalHitMessage>(pNotifyEvent);
|
|||
|
|
pOnCriticalEvent->SetSkillID(hHitter->GetProcessSkill()->GetClassID());
|
|||
|
|
pPlayer->Notify(pNotifyEvent);*/
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// <20><><EFBFBD><EFBFBD> <20><EFBFBD> <20><><EFBFBD><EFBFBD>
|
|||
|
|
if( IsAir() && IsHit() ) {
|
|||
|
|
m_nAirComboCount++;
|
|||
|
|
hHitter->OnAirCombo( m_nAirComboCount );
|
|||
|
|
}
|
|||
|
|
else m_nAirComboCount = 0;
|
|||
|
|
|
|||
|
|
m_HitParam.vVelocity = vVelocity;
|
|||
|
|
}
|
|||
|
|
else HitType = CDnWeapon::Defense;
|
|||
|
|
|
|||
|
|
m_HitParam.HitType = HitType;
|
|||
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
|||
|
|
switch( HitType ) {
|
|||
|
|
case CDnWeapon::Normal:
|
|||
|
|
case CDnWeapon::Critical:
|
|||
|
|
case CDnWeapon::Stun:
|
|||
|
|
case CDnWeapon::CriticalRes:
|
|||
|
|
{
|
|||
|
|
// <20><><EFBFBD>Կ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>ӵ<EFBFBD> <20>ٿ<EFBFBD><D9BF>ش<EFBFBD>.
|
|||
|
|
if( GetWeight() > 0.f )
|
|||
|
|
m_HitParam.vVelocity.y /= GetWeight();
|
|||
|
|
if( GetWeight() > 1.f ) {
|
|||
|
|
float fTemp = m_HitParam.vVelocity.z;
|
|||
|
|
float fTest = CalcMovement( fTemp, 1.f, FLT_MAX, FLT_MIN, m_HitParam.vResistance.z );
|
|||
|
|
if( m_HitParam.vVelocity.z * fTest > 0.f ) {
|
|||
|
|
m_HitParam.vVelocity.x /= powf( 1.1f, GetWeight() );
|
|||
|
|
m_HitParam.vVelocity.z /= powf( 1.1f, GetWeight() );
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> üũ<C3BC>ؿ<EFBFBD>
|
|||
|
|
int nDamageType = m_HitParam.nDamageType;
|
|||
|
|
|
|||
|
|
// #13885 <20>̽<EFBFBD> <20><><EFBFBD><EFBFBD>.
|
|||
|
|
if( hHitter->IsAppliedThisStateBlow( STATE_BLOW::BLOW_086 ) )
|
|||
|
|
{
|
|||
|
|
// <20><> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF> <20>ϳ<EFBFBD><CFB3><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ȴ<EFBFBD>.
|
|||
|
|
DNVector( DnBlowHandle ) vlReverseTeamBlows;
|
|||
|
|
hHitter->GatherAppliedStateBlowByBlowIndex( STATE_BLOW::BLOW_086, vlReverseTeamBlows );
|
|||
|
|
_ASSERT( false == vlReverseTeamBlows.empty() );
|
|||
|
|
if( false == vlReverseTeamBlows.empty() )
|
|||
|
|
{
|
|||
|
|
DnBlowHandle hBlow = vlReverseTeamBlows.front();
|
|||
|
|
CDnReverseTeamBlow* pReverseTeamBlow = static_cast<CDnReverseTeamBlow*>(hBlow.GetPointer());
|
|||
|
|
if( CDnReverseTeamBlow::HIT_SIGNAL_TARGET_CHANGE == pReverseTeamBlow->GetType() )
|
|||
|
|
{
|
|||
|
|
switch( nDamageType )
|
|||
|
|
{
|
|||
|
|
case 0: // Enemy -> Friend
|
|||
|
|
nDamageType = 1;
|
|||
|
|
break;
|
|||
|
|
|
|||
|
|
case 1: // Friend -> Enemy
|
|||
|
|
nDamageType = 0; // #50166 <20>̽<EFBFBD><CCBD><EFBFBD><EFBFBD><EFBFBD> Hittalbe<62><65><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ó<><C3B3><EFBFBD>Ѵ<EFBFBD>.
|
|||
|
|
break;
|
|||
|
|
|
|||
|
|
case 2: // All -> All
|
|||
|
|
break;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
if( CDnReverseTeamBlow::HIT_SIGNAL_TARGET_ALL == pReverseTeamBlow->GetType() )
|
|||
|
|
{
|
|||
|
|
// Ÿ<>ݴ<EFBFBD><DDB4><EFBFBD> all <20><> <20>ٲ<EFBFBD><D9B2><EFBFBD>.
|
|||
|
|
nDamageType = 2;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
//rlkt_damage
|
|||
|
|
bool bCalcDamage = true;
|
|||
|
|
float fDamage = 0.f;
|
|||
|
|
switch( nDamageType )
|
|||
|
|
{
|
|||
|
|
case 0: // Enemy
|
|||
|
|
if( GetTeam() == hHitter->GetTeam() ) bCalcDamage = false;
|
|||
|
|
break;
|
|||
|
|
case 1: // Friend
|
|||
|
|
if( GetTeam() != hHitter->GetTeam() ) bCalcDamage = false;
|
|||
|
|
break;
|
|||
|
|
case 2: // All
|
|||
|
|
break;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if( bCalcDamage )
|
|||
|
|
{
|
|||
|
|
fDamage = CalcDamage( hHitter, m_HitParam );
|
|||
|
|
#ifdef PRE_ADD_EXPORT_DPS_INFORMATION
|
|||
|
|
fDPS_DAMAGE = fDamage;
|
|||
|
|
#endif
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// <20><EFBFBD><D7BE><EFBFBD> üũ
|
|||
|
|
if( GetHP() <= 0.f )
|
|||
|
|
Die( hHitter );
|
|||
|
|
|
|||
|
|
if (fDamage > 0.0f && //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ְ<EFBFBD>
|
|||
|
|
GetHP() > 0.0f && //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ƴϰ<C6B4>
|
|||
|
|
!IsAppliedThisStateBlow(STATE_BLOW::BLOW_183)) //<2F><><EFBFBD>ξ<EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF> <20><><EFBFBD><EFBFBD>(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) <20>ƴѰ<C6B4><D1B0><EFBFBD>)
|
|||
|
|
{
|
|||
|
|
#if defined(PRE_ADD_PREFIX_SYSTE_RENEW)
|
|||
|
|
ProcessPrefixDefenceSkill_New(hHitterActor);
|
|||
|
|
#else
|
|||
|
|
ProcessPrefixDefenceSkill(hHitterActor);
|
|||
|
|
#endif // PRE_ADD_PREFIX_SYSTE_RENEW
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
bool bSuccessNormalDamage = true;
|
|||
|
|
int nSuperAmmorTime = 0;
|
|||
|
|
|
|||
|
|
if( !IsDie() ) {
|
|||
|
|
// Skill Super Ammor Check
|
|||
|
|
// if( m_HitParam.nSkillSuperAmmorIndex == -1 || ( m_HitParam.nSkillSuperAmmorIndex != -1 && m_nSkillSuperAmmorValue[m_HitParam.nSkillSuperAmmorIndex] > 0 ) {
|
|||
|
|
bool bApplySuperAmmor = false;
|
|||
|
|
if( m_HitParam.nSkillSuperAmmorIndex != -1 && m_HitParam.nSkillSuperAmmorIndex < 0)
|
|||
|
|
break;
|
|||
|
|
if( m_HitParam.nSkillSuperAmmorIndex == -1 ) {
|
|||
|
|
bApplySuperAmmor = true;
|
|||
|
|
}
|
|||
|
|
else if( m_nSkillSuperAmmorValue[m_HitParam.nSkillSuperAmmorIndex] > 0 ) {
|
|||
|
|
int nAmmorDamage = m_HitParam.nSkillSuperAmmorDamage;// * (( HitType == CDnWeapon::Critical ) ? 2 : 1);
|
|||
|
|
|
|||
|
|
// <20><><EFBFBD><EFBFBD> <20>Ƹ<EFBFBD> <20><>ȣ <20><><EFBFBD><EFBFBD> ȿ<><C8BF><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>Ǿ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>Ƹ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>.[2010/12/28 semozz]
|
|||
|
|
bool isApplySuperArmorShield = false;
|
|||
|
|
|
|||
|
|
isApplySuperArmorShield = this->IsAppliedThisStateBlow(STATE_BLOW::BLOW_156);
|
|||
|
|
|
|||
|
|
// [2011/02/09 semozz]
|
|||
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Shield<6C><64><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>Ǿ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>۾ƸӴ<C6B8> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ʴ´<CAB4>.
|
|||
|
|
// <20><><EFBFBD>۾Ƹ<DBBE> <20><>ȣ<EFBFBD><C8A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>켱<EFBFBD><ECBCB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>.
|
|||
|
|
if (!isApplySuperArmorShield)
|
|||
|
|
isApplySuperArmorShield = this->IsAppliedThisStateBlow(STATE_BLOW::BLOW_055);
|
|||
|
|
|
|||
|
|
//<2F><><EFBFBD>۾Ƹ<DBBE> <20>극<EFBFBD><EAB7B9>ũ <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF> <20><><EFBFBD><EFBFBD><EFBFBD>Ǿ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>۾Ƹ<DBBE> 0<><30><EFBFBD><EFBFBD>
|
|||
|
|
if (isBreakSuperArmorBlow)
|
|||
|
|
{
|
|||
|
|
m_nSkillSuperAmmorValue[m_HitParam.nSkillSuperAmmorIndex] = 0;
|
|||
|
|
}
|
|||
|
|
else if (!isApplySuperArmorShield)
|
|||
|
|
{
|
|||
|
|
//////////////////////////////////////////////////////////////////////////
|
|||
|
|
// 142<34><32> <20><><EFBFBD>۾Ƹ<DBBE> <20><><EFBFBD>ݷ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF>
|
|||
|
|
if( hHitter->IsAppliedThisStateBlow( STATE_BLOW::BLOW_142 ) )
|
|||
|
|
{
|
|||
|
|
DNVector(DnBlowHandle) vlBlows;
|
|||
|
|
float fValue = 1.0f;
|
|||
|
|
hHitter->GatherAppliedStateBlowByBlowIndex( STATE_BLOW::BLOW_142, vlBlows );
|
|||
|
|
for( int i = 0; i < (int)vlBlows.size(); ++i )
|
|||
|
|
{
|
|||
|
|
DnBlowHandle hBlow = vlBlows.at( i );
|
|||
|
|
fValue += (hBlow->GetFloatValue() - 1.0f);
|
|||
|
|
}
|
|||
|
|
nAmmorDamage = int((float)nAmmorDamage * fValue);
|
|||
|
|
}
|
|||
|
|
//////////////////////////////////////////////////////////////////////////
|
|||
|
|
|
|||
|
|
m_nSkillSuperAmmorValue[m_HitParam.nSkillSuperAmmorIndex] -= nAmmorDamage;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if( m_nSkillSuperAmmorValue[m_HitParam.nSkillSuperAmmorIndex] <= 0 ) {
|
|||
|
|
m_nSkillSuperAmmorValue[m_HitParam.nSkillSuperAmmorIndex] = 0;
|
|||
|
|
hHitter->OnBreakSkillSuperAmmor( m_HitParam.nSkillSuperAmmorIndex, m_nLastUpdateSkillSuperAmmorValue[m_HitParam.nSkillSuperAmmorIndex], nAmmorDamage );
|
|||
|
|
OnBreakSkillSuperAmmor( m_HitParam );
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
else bApplySuperAmmor = true;
|
|||
|
|
}
|
|||
|
|
if( bApplySuperAmmor ) {
|
|||
|
|
bSuccessNormalDamage = false;
|
|||
|
|
nSuperAmmorTime = m_nSkillSuperAmmorTime;
|
|||
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ش<EFBFBD>.
|
|||
|
|
SetHP( GetHP() + (INT64)( fDamage * m_fSkillSuperAmmorDamageDecreaseProb ) );
|
|||
|
|
#ifdef PRE_ADD_EXPORT_DPS_INFORMATION
|
|||
|
|
fDPS_DAMAGE += (int)( fDamage * m_fSkillSuperAmmorDamageDecreaseProb );
|
|||
|
|
#endif
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// Normal Super Ammor Check
|
|||
|
|
if( m_bEnableNormalSuperAmmor == true ) {
|
|||
|
|
if( m_HitParam.fDurability >= m_fBreakNormalSuperAmmorDurability )
|
|||
|
|
m_bEnableNormalSuperAmmor = false;
|
|||
|
|
else {
|
|||
|
|
bSuccessNormalDamage = false;
|
|||
|
|
nSuperAmmorTime = m_nNormalSuperAmmorTime;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
if( pHitStruct->nSuperAmmorTime > 0 ) nSuperAmmorTime = pHitStruct->nSuperAmmorTime;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
bool bSuperAmmorReset = true;
|
|||
|
|
|
|||
|
|
//////////////////////////////////////////////////////////////////////////
|
|||
|
|
// <20><>ī<EFBFBD><C4AB><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ƿ<EFBFBD> <20><>ų ó<><C3B3> [2011/07/04 semozz]
|
|||
|
|
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ְ<EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>ٸ<EFBFBD> <20><><EFBFBD>۾Ƹ<DBBE> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
|||
|
|
if( 0 < m_HitParam.nWeightValueLimit )
|
|||
|
|
{
|
|||
|
|
if( (float)m_HitParam.nWeightValueLimit >= GetWeight() )
|
|||
|
|
{
|
|||
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ؼ<EFBFBD> bSuccessNormalDamage<67><65> true<75><65> <20><><EFBFBD><EFBFBD><EFBFBD>ϰ<EFBFBD>.
|
|||
|
|
bSuccessNormalDamage = true;
|
|||
|
|
//<2F><><EFBFBD>۾Ƹ<DBBE> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ȵǵ<C8B5><C7B5><EFBFBD><EFBFBD>Ѵ<EFBFBD>..
|
|||
|
|
bSuperAmmorReset = false;
|
|||
|
|
//<2F><><EFBFBD>۾ƸӰ<C6B8> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(0) hit<69><74><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ϰ<EFBFBD>, <20><><EFBFBD>۾ƸӰ<C6B8> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Hit<69><74><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>Ѵ<EFBFBD>.
|
|||
|
|
//#39137 <20><><EFBFBD><EFBFBD><EFBFBD>Ͱ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ŵ
|
|||
|
|
if (!IsDie() && m_HitParam.nSkillSuperAmmorIndex>=0 && m_nSkillSuperAmmorValue[m_HitParam.nSkillSuperAmmorIndex] > 0)
|
|||
|
|
m_HitParam.szActionName.clear();
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
//////////////////////////////////////////////////////////////////////////
|
|||
|
|
|
|||
|
|
//<2F><> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD> <20>ɷ<EFBFBD> <20>ִ<EFBFBD> <20><><EFBFBD>¿<EFBFBD><C2BF><EFBFBD> <20>ǰ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ϸ<EFBFBD> Escape<70><65><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ǰ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>߰<EFBFBD><DFB0><EFBFBD> <20><><EFBFBD>ҵ<EFBFBD>.
|
|||
|
|
if (IsAppliedThisStateBlow(STATE_BLOW::BLOW_218))
|
|||
|
|
{
|
|||
|
|
#if defined(PRE_FIX_50007)
|
|||
|
|
//#50007 Escape<70>߿<EFBFBD><DFBF><EFBFBD> <20>״<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>δ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Ǿ<EFBFBD><C7BE><EFBFBD> <20><>.(Die<69><65><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ƴ<EFBFBD> <20><><EFBFBD>츸 Hit<69><74><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>)
|
|||
|
|
if (strstr(m_HitParam.szActionName.c_str(), "Die") == NULL)
|
|||
|
|
#endif // PRE_FIX_50007
|
|||
|
|
m_HitParam.szActionName.clear();
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
m_HitParam.bSuccessNormalDamage = bSuccessNormalDamage;
|
|||
|
|
m_HitParam.nSuperAmmorDelay = nSuperAmmorTime;
|
|||
|
|
|
|||
|
|
if( bSuccessNormalDamage ) {
|
|||
|
|
m_nNormalSuperAmmorTime = 0;
|
|||
|
|
|
|||
|
|
if (bSuperAmmorReset)
|
|||
|
|
memset( m_nSkillSuperAmmorValue, 0, sizeof(m_nSkillSuperAmmorValue) );
|
|||
|
|
|
|||
|
|
CheckDamageVelocity( hHitter );
|
|||
|
|
|
|||
|
|
// <20>¾<EFBFBD><C2BE><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ұ͵<D2B0> <20><><EFBFBD><EFBFBD>
|
|||
|
|
MAMovementBase *pMovement = GetMovement();
|
|||
|
|
if( pMovement ) {
|
|||
|
|
pMovement->ResetMove();
|
|||
|
|
pMovement->ResetLook();
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if( !m_HitParam.szActionName.empty() )
|
|||
|
|
{
|
|||
|
|
#ifdef PRE_FIX_81750
|
|||
|
|
CDnChangeStandActionBlow::ReleaseStandChangeSkill( GetActorHandle(), true );
|
|||
|
|
#endif
|
|||
|
|
SetActionQueue( m_HitParam.szActionName.c_str(), 0, 3.f, 0.f, false );
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
else {
|
|||
|
|
int nDelay = (int)( nSuperAmmorTime * ( m_fStiffDelta / s_fMaxStiffTime ) );
|
|||
|
|
if( nDelay > 0 ) {
|
|||
|
|
SetPlaySpeed( (DWORD)( nSuperAmmorTime * ( m_fStiffDelta / s_fMaxStiffTime ) ), 0.03f );
|
|||
|
|
if( m_HitParam.hWeapon && m_HitParam.hWeapon->GetEquipType() != CDnWeapon::Arrow )
|
|||
|
|
{
|
|||
|
|
#ifdef PRE_FIX_HITSTIFF
|
|||
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD> <20>켱 ó<><C3B3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̹Ƿ<CCB9> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̶<EFBFBD><CCB6><EFBFBD> SetPlaySpeed() <20>Լ<EFBFBD> <20><><EFBFBD><EFBFBD>.
|
|||
|
|
if( false == (0 < hHitter->GetFrameStopRefCount() || hHitter->IsAppliedThisStateBlow( STATE_BLOW::BLOW_025 )) )
|
|||
|
|
{
|
|||
|
|
hHitter->SetPlaySpeed( 100, 0.03f );
|
|||
|
|
}
|
|||
|
|
#else
|
|||
|
|
hHitter->SetPlaySpeed( 100, 0.03f );
|
|||
|
|
#endif // #ifdef PRE_FIX_HITSTIFF
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
m_HitParam.szActionName.clear();
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
break;
|
|||
|
|
case CDnWeapon::Defense:
|
|||
|
|
m_HitParam.vVelocity *= 0.5f;
|
|||
|
|
m_HitParam.vVelocity.y = 0.f;
|
|||
|
|
if( m_HitParam.hWeapon && m_HitParam.hWeapon->GetEquipType() != CDnWeapon::Arrow )
|
|||
|
|
{
|
|||
|
|
//#ifdef PRE_FIX_HITSTIFF
|
|||
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD> <20>켱 ó<><C3B3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̹Ƿ<CCB9> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̶<EFBFBD><CCB6><EFBFBD> SetPlaySpeed() <20>Լ<EFBFBD> <20><><EFBFBD><EFBFBD>.
|
|||
|
|
if( false == (0 < hHitter->GetFrameStopRefCount() || hHitter->IsAppliedThisStateBlow( STATE_BLOW::BLOW_025 )) )
|
|||
|
|
{
|
|||
|
|
hHitter->SetPlaySpeed( 100, 0.03f );
|
|||
|
|
}
|
|||
|
|
//#else
|
|||
|
|
// hHitter->SetPlaySpeed( 100, 0.03f );
|
|||
|
|
//#endif // #ifdef PRE_FIX_HITSTIFF
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
CheckDamageVelocity( hHitter );
|
|||
|
|
// <20><><EFBFBD><EFBFBD> <20><>Ű<EFBFBD><C5B0>
|
|||
|
|
if( !m_HitParam.szActionName.empty() )
|
|||
|
|
SetActionQueue( m_HitParam.szActionName.c_str(), 0, 3.f, 0.f, false );
|
|||
|
|
break;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// OutputDebug( "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> : %s, %.2f, %.2f ( %.2f, %.2f )\n", m_HitParam.szActionName.c_str(), m_HitParam.vVelocity.y, m_HitParam.vResistance.y, GetVelocity() ? GetVelocity()->y :0.f, GetResistance() ? GetResistance()->y : 0.f);
|
|||
|
|
|
|||
|
|
// <20><><EFBFBD><EFBFBD> <20>Ҹ<EFBFBD>, <20><>ƼŬ <20><><EFBFBD><EFBFBD> ó<><C3B3><EFBFBD>ϱ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ش<EFBFBD>.
|
|||
|
|
if( m_HitParam.hWeapon ) {
|
|||
|
|
m_HitParam.hWeapon->OnHitSuccess( GetMySmartPtr(), HitType, m_HitParam.vPosition, m_HitParam.bFirstHit );
|
|||
|
|
if( HitParam.hWeapon->GetWeaponType() & CDnWeapon::Projectile ) {
|
|||
|
|
CDnProjectile *pProjectile = static_cast<CDnProjectile *>(HitParam.hWeapon.GetPointer());
|
|||
|
|
if( pProjectile ) pProjectile->OnDamageSuccess( GetMySmartPtr(), m_HitParam );
|
|||
|
|
else HitParam.hWeapon->SetDestroy();
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
// <20><>ų <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ǰݽ<C7B0> <20><>ų <20><><EFBFBD><EFBFBD>.
|
|||
|
|
if( false == m_HitParam.szActionName.empty() )
|
|||
|
|
{
|
|||
|
|
// <20><>ų <20><EFBFBD> <20><> <20>ǰݽ<C7B0> <20><>ų <20><><EFBFBD>ҿ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> IsProcessSkill() <20><> üũ<C3BC><C5A9><EFBFBD><EFBFBD> <20>ʰ<EFBFBD> <20><>ü<EFBFBD><C3BC> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> üũ<C3BC>Ѵ<EFBFBD>.
|
|||
|
|
// IsFinished() <20><> <20><><EFBFBD>ο<EFBFBD><CEBF><EFBFBD> üũ<C3BC>ϸ<EFBFBD> PlayAniProcess <20><><EFBFBD>ο<EFBFBD><CEBF><EFBFBD> GetCurrentAction() <20><> <20><EFBFBD> ť <20><><EFBFBD><EFBFBD> <20>켱<EFBFBD>ؼ<EFBFBD>
|
|||
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ǰݾ<DDBE><D7BC><EFBFBD> SetActionQueue<75><65> <20><><EFBFBD>õǸ<C3B5> <20><>ų<EFBFBD><C5B3> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ǴܵǾ<DCB5> <20>Ʒ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ʴ´<CAB4>.
|
|||
|
|
if( m_hProcessSkill )
|
|||
|
|
{
|
|||
|
|
// <20><><EFBFBD><EFBFBD> <20><>ų <20><><EFBFBD><EFBFBD> <20><>.. <20><EFBFBD><D7B7>ϱ<EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF> <20><> <20><><EFBFBD><EFBFBD><EEB0A1> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ÿ<>ݵǾ<DDB5><C7BE>ٸ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><>ų<EFBFBD><C5B3> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ƴ<EFBFBD>
|
|||
|
|
if( IsEnabledAuraSkill() && m_hProcessSkill->IsAuraOn() )
|
|||
|
|
{
|
|||
|
|
//#41352 <20><><EFBFBD><EFBFBD> <20><>ų <20><><EFBFBD>ҵɶ<D2B5> Ŭ<><C5AC><EFBFBD>̾<EFBFBD>Ʈ<EFBFBD><C6AE> <20><><EFBFBD><EFBFBD> <20><>Ŷ<EFBFBD><C5B6> <20><><EFBFBD><EFBFBD><EFBFBD>ؾ<EFBFBD><D8BE><EFBFBD>..
|
|||
|
|
CmdFinishAuraSkill(m_hAuraSkill->GetClassID());
|
|||
|
|
|
|||
|
|
OnSkillAura( m_hAuraSkill, false );
|
|||
|
|
m_hProcessSkill.Identity();
|
|||
|
|
|
|||
|
|
OutputDebug( "### <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ų <20>ǰݴ<C7B0><DDB4>ؼ<EFBFBD> ĵ<><C4B5><EFBFBD><EFBFBD>!!\n" );
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
m_hCanceledSkill = m_hProcessSkill;
|
|||
|
|
m_hProcessSkill->OnEnd( CDnActionBase::m_LocalTime, 0.f );
|
|||
|
|
m_hProcessSkill.Identity();
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>нú<D0BD> <20><>ų<EFBFBD><C5B3> <20>ǰݵǾ<DDB5><C7BE><EFBFBD> <20><> <20>ۿ<EFBFBD> <20>ߵ<EFBFBD><DFB5><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>.
|
|||
|
|
UseAutoPassiveSkill( 0, 0.0f );
|
|||
|
|
|
|||
|
|
if( hHitter ) hHitter->OnHitSuccess( CDnActionBase::m_LocalTime, GetMySmartPtr(), pHitStruct );
|
|||
|
|
|
|||
|
|
#ifdef PRE_ADD_EXPORT_DPS_INFORMATION
|
|||
|
|
if( CDnDPSReporter::IsActive() && hHitter && hHitter->IsPlayerActor() )
|
|||
|
|
{
|
|||
|
|
CDnPlayerActor* pPlayerActor = static_cast<CDnPlayerActor*>( hHitter.GetPointer());
|
|||
|
|
if(CDnDPSReporter::GetInstance().IsEnabledUser(pPlayerActor->GetCharacterDBID()))
|
|||
|
|
{
|
|||
|
|
DNVector(DnActorHandle) hVecList;
|
|||
|
|
ScanActor( GetRoom(), *hHitter->GetPosition() , 500.f , hVecList );
|
|||
|
|
|
|||
|
|
CDnDPSReporter::GetInstance().ApplyAreaMonsterCount( (int)hVecList.size() );
|
|||
|
|
CDnDPSReporter::GetInstance().ApplyBaseData( &m_HitParam , fDPS_DAMAGE );
|
|||
|
|
CDnDPSReporter::GetInstance().ApplyTargetData(GetActorHandle());
|
|||
|
|
CDnDPSReporter::GetInstance().EndReport();
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
#endif
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::RequestDamage( CDnDamageBase *pHitter, int nSeed, INT64 nDamage )
|
|||
|
|
{
|
|||
|
|
BYTE pBuffer[128];
|
|||
|
|
CPacketCompressStream Stream( pBuffer, 128 );
|
|||
|
|
|
|||
|
|
char cHitterType = pHitter->GetDamageObjectType();
|
|||
|
|
DWORD dwUniqueID = pHitter->GetDamageObjectUniqueID();
|
|||
|
|
ASSERT( dwUniqueID != -1 && "<EFBFBD>߸<EFBFBD><EFBFBD><EFBFBD> DamageBase <20><><EFBFBD>̵<EFBFBD>" );
|
|||
|
|
bool bSendWeaponSerialID = false;
|
|||
|
|
DWORD dwWeaponUniqueID = -1;
|
|||
|
|
INT64 nWeaponSerialID = -1;
|
|||
|
|
|
|||
|
|
int nActionIndex = GetElementIndex( m_HitParam.szActionName.c_str() );
|
|||
|
|
if( m_HitParam.hWeapon ) {
|
|||
|
|
if( m_HitParam.hWeapon->GetSerialID() == -1 )
|
|||
|
|
dwWeaponUniqueID = m_HitParam.hWeapon->GetUniqueID();
|
|||
|
|
else {
|
|||
|
|
bSendWeaponSerialID = true;
|
|||
|
|
nWeaponSerialID = m_HitParam.hWeapon->GetSerialID();
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
INT64 nCurrentHP = GetHP();
|
|||
|
|
|
|||
|
|
Stream.Write( &nSeed, sizeof(int) );
|
|||
|
|
Stream.Write( &cHitterType, sizeof(char) );
|
|||
|
|
Stream.Write( &dwUniqueID, sizeof(DWORD) );
|
|||
|
|
Stream.Write( &bSendWeaponSerialID, sizeof(bool) );
|
|||
|
|
if( bSendWeaponSerialID ) Stream.Write( &nWeaponSerialID, sizeof(INT64) );
|
|||
|
|
else Stream.Write( &dwWeaponUniqueID, sizeof(DWORD) );
|
|||
|
|
Stream.Write( &nActionIndex, sizeof(int), CPacketCompressStream::INTEGER_SHORT );
|
|||
|
|
Stream.Write( &nDamage, sizeof(INT64) );
|
|||
|
|
Stream.Write( &nCurrentHP, sizeof(INT64) ); // <20>ϴ<EFBFBD> <20>־<EFBFBD><D6BE><EFBFBD><EFBFBD>ϴ<EFBFBD>.
|
|||
|
|
Stream.Write( &m_HitParam.HitType, sizeof(int), CPacketCompressStream::INTEGER_CHAR );
|
|||
|
|
Stream.Write( GetPosition(), sizeof(EtVector3), CPacketCompressStream::VECTOR3_BIT );
|
|||
|
|
Stream.Write( ( GetVelocity() ) ? GetVelocity() : &EtVector3( 0.f, 0.f, 0.f ), sizeof(EtVector3), CPacketCompressStream::VECTOR3_BIT );
|
|||
|
|
Stream.Write( ( GetResistance() ) ? GetResistance() : &EtVector3( 0.f, 0.f, 0.f ), sizeof(EtVector3), CPacketCompressStream::VECTOR3_BIT );
|
|||
|
|
Stream.Write( &m_HitParam.vPosition, sizeof(EtVector3), CPacketCompressStream::VECTOR3_BIT );
|
|||
|
|
Stream.Write( &EtVec3toVec2(m_HitParam.vViewVec), sizeof(EtVector2), CPacketCompressStream::VECTOR2_SHORT );
|
|||
|
|
Stream.Write( &m_HitParam.bFirstHit, sizeof(bool) );
|
|||
|
|
//Stream.Write( &m_HitParam.nBoneIndex, sizeof(int), CPacketCompressStream::INTEGER_SHORT );
|
|||
|
|
Stream.Write( &m_fStiffDelta, sizeof(float), CPacketCompressStream::FLOAT_SHORT, 10000.f );
|
|||
|
|
Stream.Write( &m_fDownDelta, sizeof(float), CPacketCompressStream::FLOAT_SHORT, 1000.f );
|
|||
|
|
Stream.Write( &m_HitParam.nSuperAmmorDelay, sizeof(int), CPacketCompressStream::INTEGER_SHORT );
|
|||
|
|
Stream.Write( &m_HitParam.bSuccessNormalDamage, sizeof(bool) );
|
|||
|
|
Stream.Write( &m_HitParam.DistanceType, sizeof(int), CPacketCompressStream::INTEGER_CHAR );
|
|||
|
|
|
|||
|
|
// #32722 Ŭ<><C5AC><EFBFBD>̾<EFBFBD>Ʈ<EFBFBD><C6AE><EFBFBD><EFBFBD> <20><>ų <20><><EFBFBD><EFBFBD><EFBFBD>Ѵٴ<D1B4> <20><>Ŷ<EFBFBD><C5B6> <20><><EFBFBD><EFBFBD><EFBFBD>ϱ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ǰݵ<C7B0> <20><><EFBFBD><EFBFBD> Ŭ<><C5AC><EFBFBD>̾<EFBFBD>Ʈ<EFBFBD><C6AE> <20><>ų <20><EFBFBD><D7BC><EFBFBD> ĵ<><C4B5><EFBFBD>Ǵ<EFBFBD> <20><> <20><><EFBFBD><EFBFBD>.
|
|||
|
|
int iCanceledSkillID = 0;
|
|||
|
|
if( IsPlayerActor() )
|
|||
|
|
{
|
|||
|
|
if( m_hCanceledSkill )
|
|||
|
|
{
|
|||
|
|
iCanceledSkillID = m_hCanceledSkill->GetClassID();
|
|||
|
|
m_hCanceledSkill.Identity();
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
if( IsDie() ) // <20><>ų <20><><EFBFBD>ٰ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>쿣 CanceledSkillID <20><> -1 <20><> <20><><EFBFBD><EFBFBD><EFBFBD>༭ Ŭ<><C5AC><EFBFBD>ʿ<EFBFBD><CABF><EFBFBD> <20><> <20><> <20>ֵ<EFBFBD><D6B5><EFBFBD> <20>Ѵ<EFBFBD>.
|
|||
|
|
{
|
|||
|
|
iCanceledSkillID = -1;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
Stream.Write( &iCanceledSkillID, sizeof(int), CPacketCompressStream::INTEGER_SHORT );
|
|||
|
|
//////////////////////////////////////////////////////////////////////////
|
|||
|
|
|
|||
|
|
// <20>ӽ<EFBFBD>
|
|||
|
|
// ToDo : <20>ؿ<EFBFBD><D8BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>߿<EFBFBD> <20><><EFBFBD>ּž<D6BC> <20><>. <20>ӽ÷<D3BD> <20><><EFBFBD>װԸ<D7B0> <20><><EFBFBD>Ƶ<EFBFBD>.
|
|||
|
|
int nSuperArmorValue = 0;
|
|||
|
|
// <20>÷<EFBFBD><C3B7>̾<EFBFBD><CCBE><EFBFBD> <20><><EFBFBD>۾ƸӰ<C6B8> 33000 <20><><EFBFBD><EFBFBD> <20>Ǵ<EFBFBD> <20><><EFBFBD>찡 <20>־<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ʰ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>. (#10065)
|
|||
|
|
Stream.Write( (m_HitParam.nSkillSuperAmmorIndex >= 0 && m_HitParam.nSkillSuperAmmorIndex <= 3) ? &m_nSkillSuperAmmorValue[ m_HitParam.nSkillSuperAmmorIndex ] : &nSuperArmorValue, sizeof(int) );
|
|||
|
|
Stream.Write( (m_HitParam.nSkillSuperAmmorIndex >= 0 && m_HitParam.nSkillSuperAmmorIndex <= 3) ? &m_nLastUpdateSkillSuperAmmorValue[ m_HitParam.nSkillSuperAmmorIndex ] : &nSuperArmorValue, sizeof(int) );
|
|||
|
|
//Stream.Write( (m_HitParam.nSkillSuperAmmorIndex >= 0 && m_HitParam.nSkillSuperAmmorIndex <= 3) ? &m_nSkillSuperAmmorValue[ m_HitParam.nSkillSuperAmmorIndex ] : &nSuperArmorValue, sizeof(int), CPacketCompressStream::INTEGER_SHORT );
|
|||
|
|
//Stream.Write( (m_HitParam.nSkillSuperAmmorIndex >= 0 && m_HitParam.nSkillSuperAmmorIndex <= 3) ? &m_nLastUpdateSkillSuperAmmorValue[ m_HitParam.nSkillSuperAmmorIndex ] : &nSuperArmorValue, sizeof(int), CPacketCompressStream::INTEGER_SHORT );
|
|||
|
|
|
|||
|
|
// Combo <20><><EFBFBD><EFBFBD>
|
|||
|
|
|
|||
|
|
Stream.Write( &m_HitParam.HasElement, sizeof(int), CPacketCompressStream::INTEGER_CHAR );
|
|||
|
|
|
|||
|
|
#if defined( PRE_ADD_LOTUSGOLEM )
|
|||
|
|
Stream.Write( &m_HitParam.bIgnoreShowDamage, sizeof(bool) );
|
|||
|
|
#endif // #if defined( PRE_ADD_LOTUSGOLEM )
|
|||
|
|
#ifdef PRE_ADD_STAGE_LIMIT_INTERFACE
|
|||
|
|
Stream.Write( &m_HitParam.bStageLimit, sizeof(bool) );
|
|||
|
|
#endif
|
|||
|
|
|
|||
|
|
switch( pHitter->GetDamageObjectType() ) {
|
|||
|
|
case DamageObjectTypeEnum::Actor:
|
|||
|
|
{
|
|||
|
|
DnActorHandle hActor = pHitter->GetActorHandle();
|
|||
|
|
if( !hActor ) break;
|
|||
|
|
if( dwUniqueID >= 100000 ) {
|
|||
|
|
CDnPlayerActor *pPlayer = ( hActor->IsPlayerActor() ) ? static_cast<CDnPlayerActor*>(hActor.GetPointer()) : NULL;
|
|||
|
|
if( !pPlayer ) break;
|
|||
|
|
int nComboCount = pPlayer->GetComboCount();
|
|||
|
|
int nComboDelay = pPlayer->GetComboDelay();
|
|||
|
|
Stream.Write( &nComboCount, sizeof(int), CPacketCompressStream::INTEGER_SHORT );
|
|||
|
|
Stream.Write( &nComboDelay, sizeof(int), CPacketCompressStream::INTEGER_SHORT );
|
|||
|
|
}
|
|||
|
|
// (#11415) <20>̽<EFBFBD> <20><><EFBFBD><EFBFBD>, <20><>ȯ<EFBFBD><C8AF> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> <20>͵<EFBFBD> <20><EFBFBD> ī<><C4AB>Ʈ<EFBFBD><C6AE> <20><><EFBFBD>Խ<EFBFBD>Ų<EFBFBD><C5B2>.
|
|||
|
|
// <20><><EFBFBD><EFBFBD> <20>÷<EFBFBD><C3B7>̾<CCBE>Լ<EFBFBD> <20><>ȯ<EFBFBD><C8AF> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ÿ<><C5B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ؼ<EFBFBD> <20>´ٸ<C2B4> <20><>Ŷ<EFBFBD><C5B6> <20>Ǿ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
|||
|
|
// Ŭ<><C5AC><EFBFBD>ʿ<EFBFBD><CABF><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Ǵ<EFBFBD>.
|
|||
|
|
else if( hActor->IsMonsterActor() )
|
|||
|
|
{
|
|||
|
|
CDnMonsterActor* pMonsterActor = static_cast<CDnMonsterActor*>(hActor.GetPointer());
|
|||
|
|
|
|||
|
|
// <20><><EFBFBD><EFBFBD>(<28><>ȯ<EFBFBD><C8AF>)<29><> hit <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><>ȯ<EFBFBD><C8AF> <20>÷<EFBFBD><C3B7>̾<CCBE><EEBFA1> <20><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20><><EFBFBD>ش<EFBFBD>. (#11415)
|
|||
|
|
DnActorHandle hSummonMasterPlayer = pMonsterActor->GetSummonerPlayerActor();
|
|||
|
|
if( hSummonMasterPlayer && hSummonMasterPlayer->IsPlayerActor() )
|
|||
|
|
{
|
|||
|
|
CDnPlayerActor* pPlayerActor = static_cast<CDnPlayerActor*>(hSummonMasterPlayer.GetPointer());
|
|||
|
|
int nComboCount = pPlayerActor->GetComboCount();
|
|||
|
|
int nComboDelay = pPlayerActor->GetComboDelay();
|
|||
|
|
Stream.Write( &nComboCount, sizeof(int), CPacketCompressStream::INTEGER_SHORT );
|
|||
|
|
Stream.Write( &nComboDelay, sizeof(int), CPacketCompressStream::INTEGER_SHORT );
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
if( CDnActorState::Cannon == pMonsterActor->GetActorType() )
|
|||
|
|
{
|
|||
|
|
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ͱ<EFBFBD> hit <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD> ī<><C4AB>Ʈ<EFBFBD><C6AE> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20><><EFBFBD>ش<EFBFBD>. (#25778)
|
|||
|
|
CDnCannonMonsterActor* pCannonMonster = static_cast<CDnCannonMonsterActor*>( pMonsterActor );
|
|||
|
|
DnActorHandle hPlayerActor = pCannonMonster->GetMasterPlayerActor();
|
|||
|
|
|
|||
|
|
int nComboCount = 0;
|
|||
|
|
int nComboDelay = 0;
|
|||
|
|
if( hPlayerActor && hPlayerActor->IsPlayerActor() )
|
|||
|
|
{
|
|||
|
|
CDnPlayerActor* pPlayerActor = static_cast<CDnPlayerActor*>(hPlayerActor.GetPointer());
|
|||
|
|
int nComboCount = pPlayerActor->GetComboCount();
|
|||
|
|
int nComboDelay = pPlayerActor->GetComboDelay();
|
|||
|
|
}
|
|||
|
|
Stream.Write( &nComboCount, sizeof(int), CPacketCompressStream::INTEGER_SHORT );
|
|||
|
|
Stream.Write( &nComboDelay, sizeof(int), CPacketCompressStream::INTEGER_SHORT );
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
break;
|
|||
|
|
case DamageObjectTypeEnum::Prop:
|
|||
|
|
break;
|
|||
|
|
}
|
|||
|
|
OnDamageWriteAdditionalPacket( &Stream );
|
|||
|
|
|
|||
|
|
Send( eActor::SC_ONDAMAGE, &Stream );
|
|||
|
|
|
|||
|
|
// #31022 <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><EFBFBD><D7BC><EFBFBD> hit <20>ñ׳η<D7B3> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ʴ´<CAB4>.
|
|||
|
|
// ȭ<><C8AD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>۰<EFBFBD><DBB0><EFBFBD> <20><><EFBFBD>µ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ʱ<EFBFBD> <20><><EFBFBD><EFBFBD>..
|
|||
|
|
DnActorHandle hHitter = pHitter->GetActorHandle();
|
|||
|
|
if( hHitter && false == hHitter->IsOnSignalFromChargerSE() )
|
|||
|
|
m_iLastDamage = nDamage;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
void CDnActor::OnRequestHPMPDelta( /*IN OUT*/ INT64& nHPMPDelta, const DWORD dwHitterUniqueID, bool bIsMPDelta /* = false */ )
|
|||
|
|
{
|
|||
|
|
if( false == bIsMPDelta && 0 < nHPMPDelta )
|
|||
|
|
{
|
|||
|
|
// 141<34><31> ġ<><C4A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF>.
|
|||
|
|
if( IsAppliedThisStateBlow( STATE_BLOW::BLOW_141 ) )
|
|||
|
|
{
|
|||
|
|
DNVector(DnBlowHandle) vlBlows;
|
|||
|
|
float fValue = 1.0f;
|
|||
|
|
GatherAppliedStateBlowByBlowIndex( STATE_BLOW::BLOW_141, vlBlows );
|
|||
|
|
for( int i = 0; i < (int)vlBlows.size(); ++i )
|
|||
|
|
{
|
|||
|
|
DnBlowHandle hBlow = vlBlows.at( i );
|
|||
|
|
fValue += (hBlow->GetFloatValue() - 1.0f);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
nHPMPDelta = INT64((float)nHPMPDelta * fValue);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> HP/MP <20><> <20>ٲ<EFBFBD><D9B2><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD> <20>ݵ<EFBFBD><DDB5><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> HP<48><50> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>!
|
|||
|
|
#ifdef PRE_FIX_77172
|
|||
|
|
void CDnActor::RequestHPMPDelta( ElementEnum eElement, INT64 nHPMPDelta, const DWORD dwHitterUniqueID, bool bIsMPDelta /*= false */,
|
|||
|
|
bool bShowValue, CDnDamageBase::SHitParam* pHitParam/* = NULL*/, bool bKeepJumpMovement /*=false*/ )
|
|||
|
|
#else // PRE_FIX_77172
|
|||
|
|
void CDnActor::RequestHPMPDelta( ElementEnum eElement, INT64 nHPMPDelta, const DWORD dwHitterUniqueID, bool bIsMPDelta /*= false */, bool bShowValue, CDnDamageBase::SHitParam* pHitParam/* = NULL*/ )
|
|||
|
|
#endif // PRE_FIX_77172
|
|||
|
|
{
|
|||
|
|
OnRequestHPMPDelta( nHPMPDelta, dwHitterUniqueID, bIsMPDelta );
|
|||
|
|
|
|||
|
|
#if defined(PRE_FIX_59680)
|
|||
|
|
//<2F><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> TransmitDamageBlow(51)<29><> <20><><EFBFBD>ؼ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Hit<69>ñ׳<C3B1> ó<><C3B3><EFBFBD><EFBFBD> <20>ȵǴ<C8B5> <20><><EFBFBD><EFBFBD> RecoverHPByAttack(248) <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> ó<><C3B3><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ʴ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><EFBFBD><DFBB><EFBFBD>.
|
|||
|
|
//51<35><31> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>ͷ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ó<><C3B3><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>Լ<EFBFBD> ȣ<><C8A3><EFBFBD><EFBFBD> <20>ϴµ<CFB4>, <20><><EFBFBD>⼭ HitParam<61><6D><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD>ƾ<EFBFBD> 248<34><38> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
//HPȸ<50><C8B8><EFBFBD><EFBFBD> <20><> <20><> <20>ִ<EFBFBD>.(248<34><38> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD> TargetActor<6F><72> SummonMonster<65><72> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> HitParam <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>;<EFBFBD> <20><>.)
|
|||
|
|
if (bIsMPDelta == false)
|
|||
|
|
{
|
|||
|
|
m_HitParam.nCalcDamage = -nHPMPDelta;
|
|||
|
|
}
|
|||
|
|
#endif // PRE_FIX_59680
|
|||
|
|
|
|||
|
|
BYTE pBuffer[ 32 ];
|
|||
|
|
CPacketCompressStream Stream( pBuffer, 32 );
|
|||
|
|
|
|||
|
|
Stream.Write( &eElement, sizeof(ElementEnum), CPacketCompressStream::INTEGER_CHAR );
|
|||
|
|
Stream.Write( &nHPMPDelta, sizeof(INT64) );
|
|||
|
|
Stream.Write( &dwHitterUniqueID, sizeof(DWORD) );
|
|||
|
|
Stream.Write( &bIsMPDelta, sizeof(bool) );
|
|||
|
|
Stream.Write( &bShowValue, sizeof(bool) );
|
|||
|
|
|
|||
|
|
#if defined(PRE_FIX_59308)
|
|||
|
|
int nHitType = pHitParam ? pHitParam->HitType : CDnWeapon::Normal;
|
|||
|
|
Stream.Write( &nHitType, sizeof(int) );
|
|||
|
|
#endif // PRE_FIX_59308
|
|||
|
|
#ifdef PRE_FIX_77172
|
|||
|
|
Stream.Write( &bKeepJumpMovement, sizeof(bool) );
|
|||
|
|
#endif // PRE_FIX_77172
|
|||
|
|
|
|||
|
|
Send( eActor::SC_SETHPMP_DELTA, &Stream );
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
// Ȯ<><C8AE> <20>ߵ<EFBFBD><DFB5><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>κ<EFBFBD><CEBA><EFBFBD> <20>ߵ<EFBFBD><DFB5>Ǿ<EFBFBD><C7BE>ٰ<EFBFBD> Ŭ<><C5AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>˷<EFBFBD><CBB7><EFBFBD>. <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ŭ<><C5AC><EFBFBD><EFBFBD> <20><><EFBFBD>⸸ <20>Ҷ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
|||
|
|
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD>̹<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
|||
|
|
void CDnActor::RequestSEProbSuccess( int iSkillID, STATE_BLOW::emBLOW_INDEX eBlowIndex )
|
|||
|
|
{
|
|||
|
|
BYTE pBuffer[ 16 ];
|
|||
|
|
CPacketCompressStream Stream( pBuffer, 16 );
|
|||
|
|
|
|||
|
|
Stream.Write( &iSkillID, sizeof(int) );
|
|||
|
|
Stream.Write( &eBlowIndex, sizeof(STATE_BLOW::emBLOW_INDEX) );
|
|||
|
|
|
|||
|
|
Send( eActor::SC_STATEEFFECT_PROB_SUCCESS, &Stream );
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::RequestCooltimeReset( int iSkillID )
|
|||
|
|
{
|
|||
|
|
BYTE pBuffer[ 4 ];
|
|||
|
|
|
|||
|
|
CPacketCompressStream Stream( pBuffer, 16 );
|
|||
|
|
|
|||
|
|
Stream.Write( &iSkillID, sizeof(int) );
|
|||
|
|
|
|||
|
|
Send( eActor::SC_COOLTIME_RESET, &Stream );
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
bool CDnActor::Compare_PreStateOrder( CDnActor::PreStateStruct &a, CDnActor::PreStateStruct &b )
|
|||
|
|
{
|
|||
|
|
return ( a.nOffset < b.nOffset ) ? true : false;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActorActionStateCache::LoadAction( CDnActor* pActor, const char* szFullPathName, \
|
|||
|
|
std::vector<CEtActionBase::ActionElementStruct*>* pVecActionElementList, \
|
|||
|
|
std::vector<std::vector<CDnActor::PreStateStruct>>& ActionState, \
|
|||
|
|
std::vector<std::vector<CDnActor::PreStateStruct>>& ActionCustomState, \
|
|||
|
|
std::vector<std::vector<CDnActor::PreStateStruct>>& CanMoveState )
|
|||
|
|
{
|
|||
|
|
// ij<><C4B3> <20>Ǿ<EFBFBD> <20>ִ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ִ<EFBFBD><D6B4><EFBFBD> Ȯ<><C8AE>
|
|||
|
|
{
|
|||
|
|
//CPerformanceLog log("loadaction-cache");
|
|||
|
|
|
|||
|
|
std::map<std::string,SData>::iterator itor;
|
|||
|
|
{
|
|||
|
|
ScopeLock<CSyncLock> lock(m_Lock);
|
|||
|
|
itor = m_mRepository.find( szFullPathName );
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if( itor != m_mRepository.end() )
|
|||
|
|
{
|
|||
|
|
ActionState.reserve( (*itor).second.VecPreActionState.size() );
|
|||
|
|
ActionCustomState.reserve( (*itor).second.VecPreActionCustomState.size() );
|
|||
|
|
CanMoveState.reserve( (*itor).second.VecPreCanMoveState.size() );
|
|||
|
|
|
|||
|
|
ActionState = (*itor).second.VecPreActionState;
|
|||
|
|
ActionCustomState = (*itor).second.VecPreActionCustomState;
|
|||
|
|
CanMoveState = (*itor).second.VecPreCanMoveState;
|
|||
|
|
return;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
SData data;
|
|||
|
|
|
|||
|
|
int nValue = 0;
|
|||
|
|
std::vector<CDnActor::PreStateStruct> VecList;
|
|||
|
|
CEtActionSignal *pSignal;
|
|||
|
|
for( DWORD i=0; i< pVecActionElementList->size(); i++ )
|
|||
|
|
{
|
|||
|
|
// STE_State
|
|||
|
|
VecList.clear();
|
|||
|
|
for( int j=0; ; j++ )
|
|||
|
|
{
|
|||
|
|
nValue = 0;
|
|||
|
|
pSignal = pActor->GetSignal( i, STE_State, j );
|
|||
|
|
if( pSignal )
|
|||
|
|
{
|
|||
|
|
StateStruct *pStruct = (StateStruct *)pSignal->GetData();
|
|||
|
|
nValue = CDnActorState::s_nActorStateIndex[pStruct->nStateOne] |
|
|||
|
|
CDnActorState::s_nActorStateIndex[pStruct->nStateTwo] |
|
|||
|
|
CDnActorState::s_nActorStateIndex[pStruct->nStateThree];
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
break;
|
|||
|
|
|
|||
|
|
VecList.push_back( CDnActor::PreStateStruct( nValue, pSignal->GetStartFrame() ) );
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if( VecList.empty() )
|
|||
|
|
VecList.push_back( CDnActor::PreStateStruct( nValue, 0 ) );
|
|||
|
|
else
|
|||
|
|
std::sort( VecList.begin(), VecList.end(), pActor->Compare_PreStateOrder );
|
|||
|
|
|
|||
|
|
data.VecPreActionState.push_back( VecList );
|
|||
|
|
|
|||
|
|
// STE_CustomState
|
|||
|
|
VecList.clear();
|
|||
|
|
for( int j=0; ; j++ )
|
|||
|
|
{
|
|||
|
|
nValue = 0;
|
|||
|
|
pSignal = pActor->GetSignal( i, STE_CustomState, j );
|
|||
|
|
if( pSignal ) {
|
|||
|
|
CustomStateStruct *pStruct = (CustomStateStruct *)pSignal->GetData();
|
|||
|
|
nValue = CDnActorState::s_nActorStateIndex[pStruct->nStateOne] |
|
|||
|
|
CDnActorState::s_nActorStateIndex[pStruct->nStateTwo] |
|
|||
|
|
CDnActorState::s_nActorStateIndex[pStruct->nStateThree];
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
break;
|
|||
|
|
|
|||
|
|
VecList.push_back( CDnActor::PreStateStruct( nValue, pSignal->GetStartFrame() ) );
|
|||
|
|
}
|
|||
|
|
if( VecList.empty() )
|
|||
|
|
VecList.push_back( CDnActor::PreStateStruct( nValue, 0 ) );
|
|||
|
|
else
|
|||
|
|
std::sort( VecList.begin(), VecList.end(), pActor->Compare_PreStateOrder );
|
|||
|
|
|
|||
|
|
data.VecPreActionCustomState.push_back( VecList );
|
|||
|
|
|
|||
|
|
// STE_CanMove
|
|||
|
|
VecList.clear();
|
|||
|
|
for( int j=0; ; j++ )
|
|||
|
|
{
|
|||
|
|
nValue = 0;
|
|||
|
|
pSignal = pActor->GetSignal( i, STE_CanMove, j );
|
|||
|
|
if( pSignal )
|
|||
|
|
{
|
|||
|
|
CanMoveStruct *pStruct = (CanMoveStruct *)pSignal->GetData();
|
|||
|
|
nValue = pStruct->bCanMove;
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
break;
|
|||
|
|
|
|||
|
|
VecList.push_back( CDnActor::PreStateStruct( nValue, pSignal->GetStartFrame() ) );
|
|||
|
|
}
|
|||
|
|
if( VecList.empty() )
|
|||
|
|
VecList.push_back( CDnActor::PreStateStruct( nValue, 0 ) );
|
|||
|
|
else
|
|||
|
|
std::sort( VecList.begin(), VecList.end(), pActor->Compare_PreStateOrder );
|
|||
|
|
|
|||
|
|
data.VecPreCanMoveState.push_back( VecList );
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// ij<><C4B3><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
|||
|
|
{
|
|||
|
|
ScopeLock<CSyncLock> lock(m_Lock);
|
|||
|
|
m_mRepository.insert( std::make_pair(szFullPathName, data) );
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
ActionState.reserve( data.VecPreActionState.size() );
|
|||
|
|
ActionCustomState.reserve( data.VecPreActionCustomState.size() );
|
|||
|
|
CanMoveState.reserve( data.VecPreCanMoveState.size() );
|
|||
|
|
|
|||
|
|
ActionState = data.VecPreActionState;
|
|||
|
|
ActionCustomState = data.VecPreActionCustomState;
|
|||
|
|
CanMoveState = data.VecPreCanMoveState;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
bool CDnActor::LoadAction( const char *szFullPathName )
|
|||
|
|
{
|
|||
|
|
bool bResult = CDnActionBase::LoadAction( szFullPathName );
|
|||
|
|
if( !bResult ) return false;
|
|||
|
|
|
|||
|
|
CDnActorActionStateCache::GetInstance().LoadAction( this, szFullPathName, m_pVecActionElementList, m_VecPreActionState, m_VecPreActionCustomState, m_VecPreCanMoveState );
|
|||
|
|
|
|||
|
|
return bResult;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::FreeAction()
|
|||
|
|
{
|
|||
|
|
CDnActionBase::FreeAction();
|
|||
|
|
SAFE_DELETE_VEC( m_VecPreActionState );
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::LinkWeapon( int nEquipIndex )
|
|||
|
|
{
|
|||
|
|
switch( m_hWeapon[nEquipIndex]->GetEquipType() ) {
|
|||
|
|
case CDnWeapon::Sword:
|
|||
|
|
case CDnWeapon::Axe:
|
|||
|
|
case CDnWeapon::Hammer:
|
|||
|
|
case CDnWeapon::SmallBow:
|
|||
|
|
case CDnWeapon::BigBow:
|
|||
|
|
case CDnWeapon::CrossBow:
|
|||
|
|
case CDnWeapon::Staff:
|
|||
|
|
case CDnWeapon::Book:
|
|||
|
|
case CDnWeapon::Orb:
|
|||
|
|
case CDnWeapon::Puppet:
|
|||
|
|
case CDnWeapon::Mace:
|
|||
|
|
case CDnWeapon::Flail:
|
|||
|
|
case CDnWeapon::Wand:
|
|||
|
|
case CDnWeapon::Shield:
|
|||
|
|
case CDnWeapon::Gauntlet:
|
|||
|
|
m_hWeapon[nEquipIndex]->LinkWeapon( GetMySmartPtr(), nEquipIndex );
|
|||
|
|
break;
|
|||
|
|
case CDnWeapon::Arrow:
|
|||
|
|
m_hWeapon[nEquipIndex]->LinkWeapon( GetMySmartPtr(), m_hWeapon[0] );
|
|||
|
|
break;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::AttachWeapon( DnWeaponHandle hWeapon, int nEquipIndex, bool bDelete )
|
|||
|
|
{
|
|||
|
|
#if defined(PRE_ADD_50907)
|
|||
|
|
if (IsAppliedThisStateBlow(STATE_BLOW::BLOW_237))
|
|||
|
|
{
|
|||
|
|
if (IsChangeWeaponLock() == true)
|
|||
|
|
{
|
|||
|
|
//<2F><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>ε<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Ǵ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ȵǵ<C8B5><C7B5><EFBFBD> <20><>ŵ<EFBFBD>ϰ<EFBFBD>,
|
|||
|
|
//OrigWeapon <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ѵ<EFBFBD>.
|
|||
|
|
SetOrigWeaponWhenDisarmament(hWeapon, bDelete);
|
|||
|
|
return;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
#endif // PRE_ADD_50907
|
|||
|
|
|
|||
|
|
if( m_hWeapon[nEquipIndex] ) {
|
|||
|
|
DetachWeapon( nEquipIndex );
|
|||
|
|
}
|
|||
|
|
m_hWeapon[nEquipIndex] = hWeapon;
|
|||
|
|
m_bSelfDeleteWeapon[nEquipIndex] = bDelete;
|
|||
|
|
m_hWeapon[nEquipIndex]->CreateObject();
|
|||
|
|
|
|||
|
|
LinkWeapon( nEquipIndex );
|
|||
|
|
|
|||
|
|
#if defined(PRE_ADD_50907)
|
|||
|
|
if (IsSkipOnAttatchDetachWeapon() == true)
|
|||
|
|
return;
|
|||
|
|
#endif // PRE_ADD_50907
|
|||
|
|
|
|||
|
|
MASkillUser::OnAttachWeapon( m_hWeapon[ nEquipIndex ], nEquipIndex );
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::DetachWeapon( int nEquipIndex )
|
|||
|
|
{
|
|||
|
|
if( !m_hWeapon[nEquipIndex] ) return;
|
|||
|
|
|
|||
|
|
#if defined(PRE_ADD_50907)
|
|||
|
|
if (IsAppliedThisStateBlow(STATE_BLOW::BLOW_237))
|
|||
|
|
{
|
|||
|
|
if (IsChangeWeaponLock() == true)
|
|||
|
|
return;
|
|||
|
|
}
|
|||
|
|
#endif // PRE_ADD_50907
|
|||
|
|
|
|||
|
|
m_hWeapon[nEquipIndex]->FreeObject();
|
|||
|
|
m_hWeapon[nEquipIndex]->UnlinkWeapon();
|
|||
|
|
|
|||
|
|
if( m_bSelfDeleteWeapon[nEquipIndex] ) {
|
|||
|
|
SAFE_RELEASE_SPTR( m_hWeapon[nEquipIndex] );
|
|||
|
|
m_bSelfDeleteWeapon[nEquipIndex] = false;
|
|||
|
|
}
|
|||
|
|
m_hWeapon[nEquipIndex].Identity();
|
|||
|
|
|
|||
|
|
#if defined(PRE_ADD_50907)
|
|||
|
|
if (IsSkipOnAttatchDetachWeapon() == true)
|
|||
|
|
return;
|
|||
|
|
#endif // PRE_ADD_50907
|
|||
|
|
|
|||
|
|
MASkillUser::OnDetachWeapon( m_hWeapon[ nEquipIndex ], nEquipIndex );
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::ShowWeapon( int nEquipIndex, bool bShow )
|
|||
|
|
{
|
|||
|
|
if( m_hWeapon[nEquipIndex] )
|
|||
|
|
m_hWeapon[nEquipIndex]->ShowWeapon( bShow );
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
bool CDnActor::IsStay( const char *szActionName )
|
|||
|
|
{
|
|||
|
|
int nIndex;
|
|||
|
|
if( ( nIndex = GetElementIndex( szActionName ) ) != -1 ) return ( m_VecPreActionState[nIndex][0].nState & ActorStateEnum::Stay ) ? true : false;
|
|||
|
|
return false;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
bool CDnActor::IsMove( const char *szActionName )
|
|||
|
|
{
|
|||
|
|
int nIndex;
|
|||
|
|
if( ( nIndex = GetElementIndex( szActionName ) ) != -1 ) return ( m_VecPreActionState[nIndex][0].nState & ActorStateEnum::Move ) ? true : false;
|
|||
|
|
return false;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
bool CDnActor::IsAttack( const char *szActionName )
|
|||
|
|
{
|
|||
|
|
int nIndex;
|
|||
|
|
if( ( nIndex = GetElementIndex( szActionName ) ) != -1 ) return ( m_VecPreActionState[nIndex][0].nState & ActorStateEnum::Attack ) ? true : false;
|
|||
|
|
return false;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
bool CDnActor::IsHit( const char *szActionName )
|
|||
|
|
{
|
|||
|
|
int nIndex;
|
|||
|
|
if( ( nIndex = GetElementIndex( szActionName ) ) != -1 ) return ( m_VecPreActionState[nIndex][0].nState & ActorStateEnum::Hit ) ? true : false;
|
|||
|
|
return false;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
bool CDnActor::IsAir( const char *szActionName )
|
|||
|
|
{
|
|||
|
|
int nIndex;
|
|||
|
|
if( ( nIndex = GetElementIndex( szActionName ) ) != -1 ) return ( m_VecPreActionState[nIndex][0].nState & ActorStateEnum::Air ) ? true : false;
|
|||
|
|
return false;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
bool CDnActor::IsDown( const char *szActionName )
|
|||
|
|
{
|
|||
|
|
int nIndex;
|
|||
|
|
if( ( nIndex = GetElementIndex( szActionName ) ) != -1 ) return ( m_VecPreActionState[nIndex][0].nState & ActorStateEnum::Down ) ? true : false;
|
|||
|
|
return false;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
bool CDnActor::IsStun( const char *szActionName )
|
|||
|
|
{
|
|||
|
|
int nIndex;
|
|||
|
|
if( ( nIndex = GetElementIndex( szActionName ) ) != -1 ) return ( m_VecPreActionState[nIndex][0].nState & ActorStateEnum::Stun ) ? true : false;
|
|||
|
|
return false;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
bool CDnActor::IsStiff( const char *szActionName )
|
|||
|
|
{
|
|||
|
|
int nIndex;
|
|||
|
|
if( ( nIndex = GetElementIndex( szActionName ) ) != -1 ) return ( m_VecPreActionState[nIndex][0].nState & ActorStateEnum::Stiff ) ? true : false;
|
|||
|
|
return false;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
bool CDnActor::IsFly( const char *szActionName )
|
|||
|
|
{
|
|||
|
|
int nIndex;
|
|||
|
|
if( ( nIndex = GetElementIndex( szActionName ) ) != -1 ) return ( m_VecPreActionCustomState[nIndex][0].nState & ActorCustomStateEnum::Custom_Fly ) ? true : false;
|
|||
|
|
return false;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
bool CDnActor::IsGround( const char *szActionName )
|
|||
|
|
{
|
|||
|
|
int nIndex;
|
|||
|
|
if( ( nIndex = GetElementIndex( szActionName ) ) != -1 ) return ( m_VecPreActionCustomState[nIndex][0].nState & ActorCustomStateEnum::Custom_Ground ) ? true : false;
|
|||
|
|
return false;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
bool CDnActor::IsStandHit( const char *szActionName )
|
|||
|
|
{
|
|||
|
|
int nIndex;
|
|||
|
|
int nState = 0;
|
|||
|
|
if( ( nIndex = GetElementIndex( szActionName ) ) != -1 ) nState = m_VecPreActionState[nIndex][0].nState;
|
|||
|
|
else return false;
|
|||
|
|
if( nState == ActorStateEnum::Hit || nState == ( ActorStateEnum::Hit | ActorStateEnum::Stiff ) ) return true;
|
|||
|
|
return false;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
int CDnActor::GetState( const char *szActionName )
|
|||
|
|
{
|
|||
|
|
int nIndex;
|
|||
|
|
if( ( nIndex = GetElementIndex( szActionName ) ) != -1 ) return m_VecPreActionState[nIndex][0].nState;
|
|||
|
|
return 0;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
int CDnActor::GetState( int nElementIndex )
|
|||
|
|
{
|
|||
|
|
if( nElementIndex < 0 || nElementIndex >= (int)m_VecPreActionState.size() ) return 0;
|
|||
|
|
return m_VecPreActionState[nElementIndex][0].nState;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
// SetPlaySpeed <20>ʹ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD> Begin/End <20><> <20><> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20>Ǵ<EFBFBD> <20>Լ<EFBFBD><D4BC>̴<EFBFBD>.
|
|||
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>Ѳ<EFBFBD><D1B2><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>ؼ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ش<EFBFBD>.
|
|||
|
|
// FrameStop <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD> <20>ִٸ<D6B4> <20>ƿ<EFBFBD> 0 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ó<><C3B3>.
|
|||
|
|
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ִٸ<D6B4> 60 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ش<EFBFBD>.
|
|||
|
|
// SetPlaySpeed <20>ʹ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ư<EFBFBD><C6B0><EFBFBD><EFBFBD><EFBFBD> ProcessPlaySpeed() <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Ŀ<EFBFBD> <20><> <20>Լ<EFBFBD><D4BC><EFBFBD> <20>ѹ<EFBFBD> <20><> ȣ<><C8A3><EFBFBD>ؼ<EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ٽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20><><EFBFBD>־<EFBFBD><D6BE><EFBFBD> <20>Ѵ<EFBFBD>. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD>ʿ<EFBFBD><CABF><EFBFBD><EFBFBD><EFBFBD> SetPlaySpeed <20>Լ<EFBFBD><D4BC><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ؼ<EFBFBD><D8BC><EFBFBD> <20>ȵȴ<C8B5>.
|
|||
|
|
void CDnActor::UpdateFPS( void )
|
|||
|
|
{
|
|||
|
|
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD>ʹ<EFBFBD> process <20><> <20><><EFBFBD><EFBFBD> <20>ʱ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> playspeed <20><><EFBFBD><EFBFBD><EFBFBD>ϸ<EFBFBD> <20>ȵȴ<C8B5>. #26354
|
|||
|
|
if( ActorTypeEnum::PropActor == GetActorType() )
|
|||
|
|
return;
|
|||
|
|
|
|||
|
|
float fFrameRatio = 1.0f;
|
|||
|
|
if( m_bModifyPlaySpeed )
|
|||
|
|
{
|
|||
|
|
fFrameRatio = m_fPlaySpeed;
|
|||
|
|
|
|||
|
|
float fPrevFPS = CDnActionBase::m_fFPS;
|
|||
|
|
CDnActionBase::SetFPS( 60.f * fFrameRatio );
|
|||
|
|
|
|||
|
|
for( DWORD i=0; i<m_hVecLastHitListByRemainTime.size(); i++ )
|
|||
|
|
{
|
|||
|
|
if( m_hVecLastHitListByRemainTime[i] )
|
|||
|
|
{
|
|||
|
|
// <20><><EFBFBD><EFBFBD> 60 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><>Ų <20><>
|
|||
|
|
float fFrame = ( ( m_hVecLastHitListByRemainTime[i]->GetDamageRemainTime( GetUniqueID() ) - CDnActionBase::m_LocalTime ) / 1000.f ) * fPrevFPS;
|
|||
|
|
|
|||
|
|
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ǵ<EFBFBD><C7B5><EFBFBD> RemainTime <20><> <20><><EFBFBD><EFBFBD>.
|
|||
|
|
m_hVecLastHitListByRemainTime[i]->SetDamageRemainTime( GetUniqueID(), CDnActionBase::m_LocalTime + (LOCAL_TIME)( fFrame / ( CDnActionBase::m_fFPS) * 1000.f ) );
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
ResetPlaySpeed();
|
|||
|
|
|
|||
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF>. <20>ϳ<EFBFBD><CFB3><EFBFBD><EFBFBD><EFBFBD> <20>ɷ<EFBFBD><C9B7>ִٸ<D6B4> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>.
|
|||
|
|
if( 0 < GetFrameStopRefCount() )
|
|||
|
|
{
|
|||
|
|
float fPrevFPS = CDnActionBase::m_fFPS;
|
|||
|
|
CDnActionBase::SetFPS( 0.0f );
|
|||
|
|
fFrameRatio = 0.0f;
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
if( IsAppliedThisStateBlow( STATE_BLOW::BLOW_025 ) ||
|
|||
|
|
IsAppliedThisStateBlow( STATE_BLOW::BLOW_144 ) ||
|
|||
|
|
IsAppliedThisStateBlow( STATE_BLOW::BLOW_220)
|
|||
|
|
)
|
|||
|
|
{
|
|||
|
|
#ifdef PRE_ADD_SLOW_DEBUFF_LIMIT
|
|||
|
|
float fBuffFrameRatio = 0.0f;
|
|||
|
|
#endif // PRE_ADD_SLOW_DEBUFF_LIMIT
|
|||
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>Ƽ<EFBFBD> <20><><EFBFBD><EFBFBD>.
|
|||
|
|
DNVector( DnBlowHandle ) vlhFrameBlows;
|
|||
|
|
GatherAppliedStateBlowByBlowIndex( STATE_BLOW::BLOW_025, vlhFrameBlows );
|
|||
|
|
for( int i = 0; i < (int)vlhFrameBlows.size(); ++i )
|
|||
|
|
{
|
|||
|
|
DnBlowHandle hBlow = vlhFrameBlows.at( i );
|
|||
|
|
#ifdef PRE_ADD_SLOW_DEBUFF_LIMIT
|
|||
|
|
if( hBlow->GetAddBlowStateType() == AddBlowStateType::Equip_Buff_Level )
|
|||
|
|
fBuffFrameRatio += hBlow->GetFloatValue();
|
|||
|
|
else
|
|||
|
|
fFrameRatio += hBlow->GetFloatValue();
|
|||
|
|
#else // PRE_ADD_SLOW_DEBUFF_LIMIT
|
|||
|
|
fFrameRatio += hBlow->GetFloatValue();
|
|||
|
|
#endif // PRE_ADD_SLOW_DEBUFF_LIMIT
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// #27320 <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ȿ<><C8BF><EFBFBD><EFBFBD> <20>ִ<EFBFBD>.
|
|||
|
|
vlhFrameBlows.clear();
|
|||
|
|
GatherAppliedStateBlowByBlowIndex( STATE_BLOW::BLOW_144, vlhFrameBlows );
|
|||
|
|
for( int i = 0; i < (int)vlhFrameBlows.size(); ++i )
|
|||
|
|
{
|
|||
|
|
DnBlowHandle hBlow = vlhFrameBlows.at( i );
|
|||
|
|
#ifdef PRE_ADD_SLOW_DEBUFF_LIMIT
|
|||
|
|
if( hBlow->GetAddBlowStateType() == AddBlowStateType::Equip_Buff_Level )
|
|||
|
|
fBuffFrameRatio += static_cast<CDnFrostbiteBlow*>(hBlow.GetPointer())->GetFrameBlowArg();
|
|||
|
|
else
|
|||
|
|
fFrameRatio += static_cast<CDnFrostbiteBlow*>(hBlow.GetPointer())->GetFrameBlowArg();
|
|||
|
|
#else // PRE_ADD_SLOW_DEBUFF_LIMIT
|
|||
|
|
fFrameRatio += static_cast<CDnFrostbiteBlow*>(hBlow.GetPointer())->GetFrameBlowArg();
|
|||
|
|
#endif // PRE_ADD_SLOW_DEBUFF_LIMIT
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
vlhFrameBlows.clear();
|
|||
|
|
GatherAppliedStateBlowByBlowIndex( STATE_BLOW::BLOW_220, vlhFrameBlows );
|
|||
|
|
for( int i = 0; i < (int)vlhFrameBlows.size(); ++i )
|
|||
|
|
{
|
|||
|
|
DnBlowHandle hBlow = vlhFrameBlows.at( i );
|
|||
|
|
#ifdef PRE_ADD_SLOW_DEBUFF_LIMIT
|
|||
|
|
if( hBlow->GetAddBlowStateType() == AddBlowStateType::Equip_Buff_Level )
|
|||
|
|
fBuffFrameRatio += hBlow->GetFloatValue();
|
|||
|
|
else
|
|||
|
|
fFrameRatio += hBlow->GetFloatValue();
|
|||
|
|
#else // PRE_ADD_SLOW_DEBUFF_LIMIT
|
|||
|
|
fFrameRatio += hBlow->GetFloatValue();
|
|||
|
|
#endif // PRE_ADD_SLOW_DEBUFF_LIMIT
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
#ifdef PRE_ADD_SLOW_DEBUFF_LIMIT
|
|||
|
|
if( GetGameRoom() && GetGameRoom()->bIsPvPRoom() )
|
|||
|
|
{
|
|||
|
|
if( fBuffFrameRatio < CGlobalWeightTable::GetInstance().GetValue( CGlobalWeightTable::FrameSpeedRatio_Limit_Min ) )
|
|||
|
|
fBuffFrameRatio = CGlobalWeightTable::GetInstance().GetValue( CGlobalWeightTable::FrameSpeedRatio_Limit_Min );
|
|||
|
|
else if( fBuffFrameRatio > CGlobalWeightTable::GetInstance().GetValue( CGlobalWeightTable::FrameSpeedRatio_Limit_Max ) )
|
|||
|
|
fBuffFrameRatio = CGlobalWeightTable::GetInstance().GetValue( CGlobalWeightTable::FrameSpeedRatio_Limit_Max );
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
fFrameRatio += fBuffFrameRatio;
|
|||
|
|
#endif // PRE_ADD_SLOW_DEBUFF_LIMIT
|
|||
|
|
|
|||
|
|
if( fFrameRatio < 0.0f )
|
|||
|
|
fFrameRatio = 0.0f;
|
|||
|
|
|
|||
|
|
float fPrevFPS = CDnActionBase::m_fFPS;
|
|||
|
|
CDnActionBase::SetFPS( 60.0f * fFrameRatio );
|
|||
|
|
|
|||
|
|
for( DWORD i=0; i<m_hVecLastHitListByRemainTime.size(); i++ )
|
|||
|
|
{
|
|||
|
|
if( m_hVecLastHitListByRemainTime[i] )
|
|||
|
|
{
|
|||
|
|
// <20><><EFBFBD><EFBFBD> 60 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><>Ų <20><>
|
|||
|
|
float fFrame = ( ( m_hVecLastHitListByRemainTime[i]->GetDamageRemainTime( GetUniqueID() ) - CDnActionBase::m_LocalTime ) / 1000.f ) * fPrevFPS;
|
|||
|
|
|
|||
|
|
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ǵ<EFBFBD><C7B5><EFBFBD> RemainTime <20><> <20><><EFBFBD><EFBFBD>.
|
|||
|
|
m_hVecLastHitListByRemainTime[i]->SetDamageRemainTime( GetUniqueID(), CDnActionBase::m_LocalTime + (LOCAL_TIME)( fFrame / ( CDnActionBase::m_fFPS ) * 1000.f ) );
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
fFrameRatio = 1.0f;
|
|||
|
|
|
|||
|
|
float fPrevFPS = CDnActionBase::m_fFPS;
|
|||
|
|
|
|||
|
|
// <20><><EFBFBD><EFBFBD>
|
|||
|
|
CDnActionBase::SetFPS( 60.0f );
|
|||
|
|
|
|||
|
|
for( DWORD i=0; i<m_hVecLastHitListByRemainTime.size(); i++ )
|
|||
|
|
{
|
|||
|
|
if( m_hVecLastHitListByRemainTime[i] )
|
|||
|
|
{
|
|||
|
|
float fFrame = ( ( m_hVecLastHitListByRemainTime[i]->GetDamageRemainTime( GetUniqueID() ) - CDnActionBase::m_LocalTime ) / 1000.f ) * fPrevFPS;
|
|||
|
|
if( m_hVecLastHitListByRemainTime[i] )
|
|||
|
|
m_hVecLastHitListByRemainTime[i]->SetDamageRemainTime( GetUniqueID(), CDnActionBase::m_LocalTime + (LOCAL_TIME)( fFrame / ( CDnActionBase::m_fFPS ) * 1000.f ) );
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
m_hVecLastHitListByRemainTime.clear();
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if( IsPlayerActor() )
|
|||
|
|
{
|
|||
|
|
CDnPlayerActor* pPlayerActor = static_cast<CDnPlayerActor*>(this);
|
|||
|
|
pPlayerActor->OnChangePlaySpeed( 0, fFrameRatio );
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::AddedFrameStop( void )
|
|||
|
|
{
|
|||
|
|
++m_iFrameStopRefCount;
|
|||
|
|
|
|||
|
|
// #28345 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> AI <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><EFBFBD><D7BC><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>õǸ鼭
|
|||
|
|
// 0 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ٲ<EFBFBD><D9B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>.
|
|||
|
|
if( IsMonsterActor() )
|
|||
|
|
{
|
|||
|
|
static_cast<CDnMonsterActor*>(this)->SetAIState( MAAiReceiver::Disable, false );
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
UpdateFPS();
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
void CDnActor::RemovedFrameStop( void )
|
|||
|
|
{
|
|||
|
|
m_iFrameStopRefCount--;
|
|||
|
|
if( m_iFrameStopRefCount < 0 )
|
|||
|
|
m_iFrameStopRefCount = 0;
|
|||
|
|
|
|||
|
|
// #28345 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> AI <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><EFBFBD><D7BC><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>õǸ鼭
|
|||
|
|
// 0 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ٲ<EFBFBD><D9B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>.
|
|||
|
|
if( IsMonsterActor() )
|
|||
|
|
{
|
|||
|
|
if( 0 == m_iFrameStopRefCount )
|
|||
|
|
{
|
|||
|
|
static_cast<CDnMonsterActor*>(this)->SetAIState( MAAiReceiver::Threat, false );
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
UpdateFPS();
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
|
|||
|
|
void CDnActor::SetPlaySpeed( DWORD dwFrame, float fSpeed )
|
|||
|
|
{
|
|||
|
|
//// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD> <20>켱 ó<><C3B3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̹Ƿ<CCB9> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̶<EFBFBD><CCB6><EFBFBD> SetPlaySpeed() <20>Լ<EFBFBD> <20><><EFBFBD><EFBFBD>.
|
|||
|
|
//if( 0 < GetFrameStopRefCount() || IsAppliedThisStateBlow( STATE_BLOW::BLOW_025 ) )
|
|||
|
|
// return;
|
|||
|
|
|
|||
|
|
if( m_bModifyPlaySpeed == true )
|
|||
|
|
return;
|
|||
|
|
|
|||
|
|
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD>ʹ<EFBFBD> process <20><> <20><><EFBFBD><EFBFBD> <20>ʱ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> playspeed <20><><EFBFBD><EFBFBD><EFBFBD>ϸ<EFBFBD> <20>ȵȴ<C8B5>. #26354
|
|||
|
|
if( ActorTypeEnum::PropActor == GetActorType() )
|
|||
|
|
return;
|
|||
|
|
|
|||
|
|
m_bModifyPlaySpeed = true;
|
|||
|
|
m_PlaySpeedStartTime = CDnActionBase::m_LocalTime;
|
|||
|
|
m_dwPlaySpeedTime = dwFrame;
|
|||
|
|
|
|||
|
|
m_fPlaySpeed = fSpeed;
|
|||
|
|
UpdateFPS();
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
void CDnActor::ProcessPlaySpeed( LOCAL_TIME LocalTime, float fDelta )
|
|||
|
|
{
|
|||
|
|
if( m_bModifyPlaySpeed == false ) return;
|
|||
|
|
if( m_PlaySpeedStartTime == 0 ) m_PlaySpeedStartTime = LocalTime;
|
|||
|
|
if( LocalTime - m_PlaySpeedStartTime > m_dwPlaySpeedTime )
|
|||
|
|
{
|
|||
|
|
//m_bModifyPlaySpeed = false; // ResetPlaySpeed <20>Լ<EFBFBD> <20><><EFBFBD>ο<EFBFBD><CEBF><EFBFBD> ȣ<><C8A3><EFBFBD><EFBFBD>.
|
|||
|
|
ResetPlaySpeed();
|
|||
|
|
UpdateFPS();
|
|||
|
|
return;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
// #15065 <20>̽<EFBFBD> <20><><EFBFBD><EFBFBD>.
|
|||
|
|
// <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ߴ<EFBFBD> <20><> SetPlaySpeed <20>Լ<EFBFBD> ȣ<><C8A3><EFBFBD><EFBFBD> <20><> <20>̹<EFBFBD> Ÿ<>ݶ<EFBFBD><DDB6><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> PlaySpeed <20><><EFBFBD><EFBFBD><EFBFBD>Ǵ<EFBFBD> Ÿ<>̹<EFBFBD><CCB9><EFBFBD> <20><><EFBFBD><EFBFBD> <20>־
|
|||
|
|
// <20>Լ<EFBFBD>ȣ<EFBFBD><C8A3><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ִ<EFBFBD>. CDnFreezingBlow::OnBegin() <20><><EFBFBD><EFBFBD> SetPlaySpeed() ȣ<><C8A3><EFBFBD>ϱ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>½<EFBFBD>Ű<EFBFBD><C5B0> ȣ<><C8A3><EFBFBD>Ѵ<EFBFBD>.
|
|||
|
|
void CDnActor::ResetPlaySpeed()
|
|||
|
|
{
|
|||
|
|
if( m_bModifyPlaySpeed == false )
|
|||
|
|
return;
|
|||
|
|
|
|||
|
|
for( DWORD i=0; i<m_hVecLastHitListByRemainTime.size(); i++ ) {
|
|||
|
|
if( m_hVecLastHitListByRemainTime[i] ) {
|
|||
|
|
float fFrame = ( ( m_hVecLastHitListByRemainTime[i]->GetDamageRemainTime( GetUniqueID() ) - CDnActionBase::m_LocalTime ) / 1000.f ) * CDnActionBase::m_fFPS;
|
|||
|
|
m_hVecLastHitListByRemainTime[i]->SetDamageRemainTime( GetUniqueID(), CDnActionBase::m_LocalTime + (LOCAL_TIME)( fFrame / 60.f * 1000.f ) );
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
CDnActionBase::SetFPS( 60.f );
|
|||
|
|
|
|||
|
|
if( IsPlayerActor() )
|
|||
|
|
{
|
|||
|
|
CDnPlayerActor* pPlayerActor = static_cast<CDnPlayerActor*>(this);
|
|||
|
|
pPlayerActor->OnChangePlaySpeed( 0, 60.0f / CDnActionBase::m_fFPS );
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// Note: SignalEndTime <20><> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>⼭ <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.
|
|||
|
|
//m_hVecLastHitListByRemainTime.clear();
|
|||
|
|
|
|||
|
|
m_bModifyPlaySpeed = false;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
void CDnActor::SyncClassTime( LOCAL_TIME LocalTime )
|
|||
|
|
{
|
|||
|
|
CDnActionBase::m_LocalTime = LocalTime;
|
|||
|
|
MASkillUser::m_LocalTime = LocalTime;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::OnClash( EtVector3 &vPosition, OnClashFloorCheckType bFloorClash )
|
|||
|
|
{
|
|||
|
|
if( !IsDie() && IsHit() && ( IsAir() || IsDown() ) && !IsStun() ) {
|
|||
|
|
float fDecrease = 0.85f;
|
|||
|
|
|
|||
|
|
if( GetVelocity()->x != 0.f ) {
|
|||
|
|
SetVelocityX( -GetVelocity()->x * fDecrease );
|
|||
|
|
SetResistanceX( -GetResistance()->x );
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if( GetVelocityValue()->z < -120.f ) {
|
|||
|
|
float fVelocityValue = GetVelocityValue()->z; // <20><><EFBFBD><EFBFBD> <20>̻<EFBFBD><CCBB><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>쿡<EFBFBD><ECBFA1> <20>谨<EFBFBD><E8B0A8><EFBFBD>ش<EFBFBD>. <20><><EFBFBD>ݻ<EFBFBD><DDBB>¿<EFBFBD><C2BF><EFBFBD> 300 <20><> <20><><EFBFBD><EFBFBD>..
|
|||
|
|
if( fVelocityValue < -300.f ) fVelocityValue = -300.f;
|
|||
|
|
float fYVel = 5.f + ( -fVelocityValue * 0.01f );
|
|||
|
|
// if( fYVel > 8.f ) fYVel = 8.f;
|
|||
|
|
// if( fVelocityValue >
|
|||
|
|
// OutputDebug( "PrevVel Z : %.2f PrevVel Y : %.2f - %.2f\n", GetVelocity()->z, GetVelocity()->y, GetVelocityValue()->z );
|
|||
|
|
SetVelocityZ( -GetVelocity()->z * ( 1.35f - ( 1.f / 4.f * ( -fVelocityValue * 0.01f ) ) ) );
|
|||
|
|
SetResistanceZ( -GetResistance()->z );
|
|||
|
|
|
|||
|
|
SetVelocityY( fYVel );
|
|||
|
|
SetResistanceY( -18.f );
|
|||
|
|
|
|||
|
|
// OutputDebug( "Vel Z : %.2f Vel Y : %.2f\n", GetVelocity()->z, GetVelocity()->y );
|
|||
|
|
// OutputDebug( "Res Z : %.2f Res Y : %.2f\n", GetResistance()->z, GetResistance()->y );
|
|||
|
|
|
|||
|
|
EtVector3 vLook;
|
|||
|
|
vLook = -m_Cross.m_vZAxis;
|
|||
|
|
vLook.y = 0.f;
|
|||
|
|
EtVec3Normalize( &vLook, &vLook );
|
|||
|
|
Look( EtVector2( vLook.x, vLook.z ) );
|
|||
|
|
if( IsDie() ) SetActionQueue( "Die_Air", 0, 0.f );
|
|||
|
|
else SetActionQueue( "Hit_AirUp", 0, 0.f );
|
|||
|
|
if( m_HitParam.hWeapon ) {
|
|||
|
|
m_HitParam.hWeapon->OnHitSuccess( GetMySmartPtr(), CDnWeapon::Stun, vPosition, true );
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
else {
|
|||
|
|
if( GetVelocity()->z != 0.f ) {
|
|||
|
|
SetVelocityZ( -GetVelocity()->z * fDecrease );
|
|||
|
|
SetResistanceZ( -GetResistance()->z );
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
bool CDnActor::IsHittable( DnActorHandle hHitter, LOCAL_TIME LocalTime, HitStruct *pHitSignal, int iHitUniqueID /*= -1*/ )
|
|||
|
|
{
|
|||
|
|
#if !defined( _FINAL_BUILD )
|
|||
|
|
if( bIsIgnoreHit() ) return false;
|
|||
|
|
#endif // #if !defined( _FINAL_BUILD )
|
|||
|
|
|
|||
|
|
bool isSelfCheck = false;
|
|||
|
|
isSelfCheck = pHitSignal ? (pHitSignal->isSelfCheck?true:false) : false;
|
|||
|
|
|
|||
|
|
//<2F>ڽ<EFBFBD> üũ<C3BC><C5A9> <20><><EFBFBD><EFBFBD><EFBFBD>Ǿ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(false<73><65> <20>⺻. Ư<><C6AF>(<28>ν<EFBFBD> <20><>ų...)<29><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> true<75><65> <20><><EFBFBD><EFBFBD>.
|
|||
|
|
//true<75><65> <20><><EFBFBD><EFBFBD><EFBFBD>Ǿ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ڽŵ<DABD> Hitó<74><C3B3>..
|
|||
|
|
if (false == isSelfCheck)
|
|||
|
|
if( hHitter == GetMySmartPtr() ) return false;
|
|||
|
|
|
|||
|
|
if( IsDie() ) return false;
|
|||
|
|
|
|||
|
|
CDnActorState::ActorTypeEnum actorType = GetActorType();
|
|||
|
|
|
|||
|
|
if( actorType == CDnActorState::Npc ) return false;
|
|||
|
|
|
|||
|
|
//ActorType [0:All/1:User/2:Monster]
|
|||
|
|
if (pHitSignal)
|
|||
|
|
{
|
|||
|
|
switch(pHitSignal->nActorType)
|
|||
|
|
{
|
|||
|
|
case 1: //User(<28><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ε<EFBFBD> <20><><EFBFBD><EFBFBD> actor<6F><72> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ƴ϶<C6B4><CFB6><EFBFBD>)
|
|||
|
|
{
|
|||
|
|
if (!IsPlayerActor())
|
|||
|
|
return false;
|
|||
|
|
}
|
|||
|
|
break;
|
|||
|
|
case 2: //Monster(<28><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ε<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ͱ<EFBFBD> <20>ƴ϶<C6B4><CFB6><EFBFBD>)
|
|||
|
|
{
|
|||
|
|
if (!IsMonsterActor())
|
|||
|
|
return false;
|
|||
|
|
}
|
|||
|
|
break;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if( GetLastDamageHitUniqueID( hHitter->GetUniqueID() ) != -1 )
|
|||
|
|
{
|
|||
|
|
if( GetLastDamageHitUniqueID( hHitter->GetUniqueID() ) == iHitUniqueID )
|
|||
|
|
if( GetDamageRemainTime( hHitter->GetUniqueID() ) >= LocalTime )
|
|||
|
|
return false;
|
|||
|
|
}
|
|||
|
|
else if( GetDamageRemainTime( hHitter->GetUniqueID() ) >= LocalTime )
|
|||
|
|
{
|
|||
|
|
bool bIsChangedByInputAction = false;
|
|||
|
|
|
|||
|
|
// #69997 <20><><EFBFBD><EFBFBD> <20>ǿ<D7BC><C7BF><EFBFBD> <20><EFBFBD><DFBB><EFBFBD> <20><>Ʈ<EFBFBD>ñ׳<C3B1><D7B3><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ǿ<D7BC><C7BF><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ġ<EFBFBD><C4A1> <20>κ<EFBFBD> <20><><EFBFBD><EFBFBD>.
|
|||
|
|
if( m_nLastDamageHitterActionIndex > 0 && m_nLastDamageHitterActionIndex != hHitter->GetCurrentActionIndex() )
|
|||
|
|
{
|
|||
|
|
if( hHitter->GetProcessSkill() )
|
|||
|
|
{
|
|||
|
|
bIsChangedByInputAction = hHitter->GetProcessSkill()->IsChainInputAction( hHitter->GetCurrentAction() );
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if( bIsChangedByInputAction == false && hHitter->IsOnSignalFromChargerSE() == false )
|
|||
|
|
{
|
|||
|
|
return false;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// hit <20>ñ׳<C3B1> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> üũ<C3BC>ȴٸ<C8B4> 149<34><39> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD> <20>ִٸ<D6B4> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>µ<EFBFBD><C2B5><EFBFBD> <20>ȴ<EFBFBD>. //
|
|||
|
|
if( m_pStateBlow->IsApplied( STATE_BLOW::BLOW_149 ) && pHitSignal )
|
|||
|
|
{
|
|||
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̴<EFBFBD><CCB4><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF> <20><><EFBFBD>Ͱ<EFBFBD> <20><><EFBFBD><EFBFBD> <20>Ǿ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> üũ
|
|||
|
|
if( pHitSignal->StateEffectFilter != 0 )
|
|||
|
|
{
|
|||
|
|
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ż<EFBFBD>ε<EFBFBD><CEB5><EFBFBD> <20><><EFBFBD>̽<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ǿ<EFBFBD><C7BF><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 2<><32><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF> <20><><EFBFBD><EFBFBD><CDB8><EFBFBD> <20>ɰ<EFBFBD> <20>ִµ<D6B4>
|
|||
|
|
// <20><> <20>߿<EFBFBD> <20>ϳ<EFBFBD><CFB3><EFBFBD> hit <20>DZ<EFBFBD> <20><><EFBFBD>ϱ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> üũ<C3BC><C5A9> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><CDB8><EFBFBD> <20>ɸ<EFBFBD><C9B8><EFBFBD> <20>ʵ<EFBFBD><CAB5><EFBFBD> <20>Ѵ<EFBFBD>. #28747
|
|||
|
|
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD>ǿ<EFBFBD> <20>ɸ<EFBFBD><C9B8><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Ϲ<EFBFBD><CFB9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ó<><C3B3><EFBFBD><EFBFBD>.
|
|||
|
|
if( false == hHitter->CheckHitSignalStateEffectFilterException( GetUniqueID(), pHitSignal->StateEffectFilter) )
|
|||
|
|
{
|
|||
|
|
return false;
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
if( false == m_pStateBlow->IsApplied( (STATE_BLOW::emBLOW_INDEX)pHitSignal->StateEffectFilter ) )
|
|||
|
|
{
|
|||
|
|
return false;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
int nOriginalTeam = GetOriginalTeam();
|
|||
|
|
int nHitterTeam = hHitter->GetTeam();
|
|||
|
|
//<2F><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>¿<EFBFBD><C2BF><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ȵǰ<C8B5>, <20>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>Դ<EFBFBD> <20>¾ƾ<C2BE> <20>Ѵ<EFBFBD>.??
|
|||
|
|
if (nOriginalTeam != nHitterTeam)
|
|||
|
|
return false;
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ε<EFBFBD>.. <20>ڽ<EFBFBD> <20>̶<EFBFBD><CCB6><EFBFBD>
|
|||
|
|
if (pHitSignal->nTargetType == 0 && GetMySmartPtr() == hHitter->GetMySmartPtr() )
|
|||
|
|
return false;
|
|||
|
|
|
|||
|
|
//<2F><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>¿<EFBFBD><C2BF><EFBFBD><EFBFBD><EFBFBD> <20>Ʊ<EFBFBD><C6B1><EFBFBD><EFBFBD>Դ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>¾ƾ<C2BE> <20>Ѵ<EFBFBD>..
|
|||
|
|
return true;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
//////////////////////////////////////////////////////////////////////////
|
|||
|
|
|
|||
|
|
// ignorecanhit <20><> <20><><EFBFBD><EFBFBD><EFBFBD>ְ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ʴ´<CAB4>.
|
|||
|
|
if( pHitSignal )
|
|||
|
|
{
|
|||
|
|
if( pHitSignal->bIgnoreCanHit == TRUE )
|
|||
|
|
{
|
|||
|
|
DNVector(DnBlowHandle) vBlows;
|
|||
|
|
m_pStateBlow->GetStateBlowFromBlowIndex( STATE_BLOW::BLOW_099, vBlows );
|
|||
|
|
for( int i = 0; i < (int)vBlows.size(); ++i )
|
|||
|
|
{
|
|||
|
|
if( vBlows[i]->GetFloatValue() == -1 )
|
|||
|
|
return false;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
else if( m_pStateBlow->IsApplied(STATE_BLOW::BLOW_099) )
|
|||
|
|
{
|
|||
|
|
return false;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
#if !defined(PRE_FIX_73833)
|
|||
|
|
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ִٸ<D6B4> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>ϰ<EFBFBD> <20>Ǿ<EFBFBD><C7BE><EFBFBD> <20><><EFBFBD><EFBFBD> <20>´´<C2B4>.
|
|||
|
|
if( 0 < pHitSignal->nWeightValueLimit )
|
|||
|
|
{
|
|||
|
|
if( (float)pHitSignal->nWeightValueLimit < GetWeight() )
|
|||
|
|
return false;
|
|||
|
|
}
|
|||
|
|
#endif
|
|||
|
|
}
|
|||
|
|
else if( m_pStateBlow->IsApplied( STATE_BLOW::BLOW_099 ) )
|
|||
|
|
return false;
|
|||
|
|
|
|||
|
|
if( hHitter->GetProcessSkill() )
|
|||
|
|
{
|
|||
|
|
bool bResist = false;
|
|||
|
|
if( !IsHittableSkill( hHitter->GetProcessSkill()->GetClassID() , bResist ) )
|
|||
|
|
{
|
|||
|
|
if( bResist )
|
|||
|
|
{
|
|||
|
|
SendAddSEFail( CDnStateBlow::ADD_FAIL_BY_IMMUNE , STATE_BLOW::BLOW_154 );
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
return false;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
#if defined(PRE_ADD_50923)
|
|||
|
|
//<2F><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF> Type<70><65> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Ǿ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
if ( m_pStateBlow->IsApplied(STATE_BLOW::BLOW_239))
|
|||
|
|
{
|
|||
|
|
DNVector(DnBlowHandle) vResult;
|
|||
|
|
m_pStateBlow->GetStateBlowFromBlowIndex(STATE_BLOW::BLOW_239, vResult);
|
|||
|
|
|
|||
|
|
//<2F><><EFBFBD><EFBFBD> Type <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>´<EFBFBD>.
|
|||
|
|
std::map<int, int> invincibleTypeList;
|
|||
|
|
for( UINT i=0 ; i<vResult.size() ; ++i )
|
|||
|
|
{
|
|||
|
|
DnBlowHandle hBlow = vResult.at( i );
|
|||
|
|
if( !hBlow )
|
|||
|
|
continue;
|
|||
|
|
|
|||
|
|
CDnInvincibleTypeBlow* pInvincibleTypeBlow = static_cast<CDnInvincibleTypeBlow*>(hBlow.GetPointer());
|
|||
|
|
if (NULL == pInvincibleTypeBlow)
|
|||
|
|
continue;
|
|||
|
|
|
|||
|
|
int nInvincibleTypeValue = pInvincibleTypeBlow->GetInvincibleTypeValue();
|
|||
|
|
invincibleTypeList.insert(std::make_pair(nInvincibleTypeValue, nInvincibleTypeValue));
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if (hHitter->IsAppliedThisStateBlow(STATE_BLOW::BLOW_240))
|
|||
|
|
{
|
|||
|
|
DNVector(DnBlowHandle) vResultImmunByType;
|
|||
|
|
CDnStateBlow *pHitterStateBlow = hHitter->GetStateBlow();
|
|||
|
|
if (pHitterStateBlow)
|
|||
|
|
pHitterStateBlow->GetStateBlowFromBlowIndex(STATE_BLOW::BLOW_240, vResultImmunByType);
|
|||
|
|
|
|||
|
|
for( UINT i=0 ; i<vResultImmunByType.size() ; ++i )
|
|||
|
|
{
|
|||
|
|
DnBlowHandle hBlow = vResultImmunByType.at( i );
|
|||
|
|
if( !hBlow )
|
|||
|
|
continue;
|
|||
|
|
|
|||
|
|
CDnImmuneByType* pImmuneTypeBlow = static_cast<CDnImmuneByType*>(hBlow.GetPointer());
|
|||
|
|
if (NULL == pImmuneTypeBlow)
|
|||
|
|
continue;
|
|||
|
|
|
|||
|
|
int nImmuneTypeValue = pImmuneTypeBlow->GetImmuneTypeValue();
|
|||
|
|
|
|||
|
|
std::map<int, int>::iterator findIter = invincibleTypeList.find(nImmuneTypeValue);
|
|||
|
|
if (findIter != invincibleTypeList.end())
|
|||
|
|
invincibleTypeList.erase(findIter);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
//<2F><><EFBFBD><EFBFBD> Type <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>Ű<EFBFBD> <20>Ǿ<EFBFBD><C7BE><EFBFBD> Hit<69><74> <20><> <20>ִ<EFBFBD>.
|
|||
|
|
//<2F><><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> <20><><EFBFBD><EFBFBD> <20>ִٸ<D6B4> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD> Hit<69><74> <20><> <20><><EFBFBD><EFBFBD>.
|
|||
|
|
if (invincibleTypeList.empty() == false)
|
|||
|
|
return false;
|
|||
|
|
}
|
|||
|
|
//<2F><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF> Type <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD> Hitter<65><72> <20><><EFBFBD><EFBFBD> <20>Ǿ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Hit<69><74> <20><> <20><><EFBFBD><EFBFBD>.
|
|||
|
|
else
|
|||
|
|
return false;
|
|||
|
|
}
|
|||
|
|
#endif // PRE_ADD_50923
|
|||
|
|
|
|||
|
|
// <20><EFBFBD><D7BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF> <20><><EFBFBD><EFBFBD><CDB8><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ǿ<EFBFBD><C7BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> üũ<C3BC>Ѵ<EFBFBD>.
|
|||
|
|
if( pHitSignal )
|
|||
|
|
{
|
|||
|
|
#ifdef PRE_ADD_HITDIRECTION
|
|||
|
|
EtVector3 vDir = *GetPosition() - *hHitter->GetPosition();
|
|||
|
|
EtVec3Normalize( &vDir, &vDir );
|
|||
|
|
switch( pHitSignal->CheckHitDirection )
|
|||
|
|
{
|
|||
|
|
// front
|
|||
|
|
case 1:
|
|||
|
|
{
|
|||
|
|
// <20>ǰ<EFBFBD><C7B0>ڰ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ٶ<D9B6> <20>ִ<EFBFBD> <20><><EFBFBD><EFBFBD> hit ó<><C3B3>.
|
|||
|
|
float fDot = EtVec3Dot( &vDir, &(m_Cross.m_vZAxis) );
|
|||
|
|
if( fDot >= -0.1f ) // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ǰ<EFBFBD><C7B0><EFBFBD>(<28>Ϲ<EFBFBD><CFB9><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>÷<EFBFBD><C3B7>̾<EFBFBD>)<29><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϰ<EFBFBD> <20><><EFBFBD><EFBFBD>.
|
|||
|
|
return false;
|
|||
|
|
}
|
|||
|
|
break;
|
|||
|
|
// back
|
|||
|
|
case 2:
|
|||
|
|
{
|
|||
|
|
// <20>ǰ<EFBFBD><C7B0>ڰ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ִ<EFBFBD> <20><><EFBFBD><EFBFBD> hit ó<><C3B3>.
|
|||
|
|
float fDot = EtVec3Dot( &vDir, &(m_Cross.m_vZAxis) );
|
|||
|
|
if( fDot < 0.1f )
|
|||
|
|
return false;
|
|||
|
|
}
|
|||
|
|
break;
|
|||
|
|
}
|
|||
|
|
#endif // #ifdef PRE_ADD_HITDIRECTION
|
|||
|
|
|
|||
|
|
#if defined(PRE_ADD_57090)
|
|||
|
|
//////////////////////////////////////////////////////////////////////////
|
|||
|
|
//#57090 Ư<><C6AF> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ݴ<EFBFBD><DDB4><EFBFBD><EFBFBD><EFBFBD> <20>ʰ<EFBFBD> <20>ϴ<EFBFBD> <20><><EFBFBD><EFBFBD> - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>Ǿ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>Ʈ <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>.
|
|||
|
|
//StateEffectFilter<65><72><EFBFBD><EFBFBD> <20>켱 <20>˻<EFBFBD>...
|
|||
|
|
std::vector<string> vlTokens;
|
|||
|
|
string strArgument = pHitSignal->szUnStateEffectFilter ? pHitSignal->szUnStateEffectFilter : "";
|
|||
|
|
TokenizeA( strArgument, vlTokens, ";" );
|
|||
|
|
|
|||
|
|
if (vlTokens.empty() == false)
|
|||
|
|
{
|
|||
|
|
int nTokenSize = (int)vlTokens.size();
|
|||
|
|
for (int i = 0; i < nTokenSize; ++i)
|
|||
|
|
{
|
|||
|
|
STATE_BLOW::emBLOW_INDEX emBlowIndex = (STATE_BLOW::emBLOW_INDEX)atoi(vlTokens[i].c_str());
|
|||
|
|
if( true == m_pStateBlow->IsApplied( emBlowIndex ) )
|
|||
|
|
{
|
|||
|
|
return false;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
//////////////////////////////////////////////////////////////////////////
|
|||
|
|
#endif // PRE_ADD_57090
|
|||
|
|
|
|||
|
|
if( pHitSignal->StateEffectFilter != 0 )
|
|||
|
|
{
|
|||
|
|
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ż<EFBFBD>ε<EFBFBD><CEB5><EFBFBD> <20><><EFBFBD>̽<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ǿ<EFBFBD><C7BF><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 2<><32><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF> <20><><EFBFBD><EFBFBD><CDB8><EFBFBD> <20>ɰ<EFBFBD> <20>ִµ<D6B4>
|
|||
|
|
// <20><> <20>߿<EFBFBD> <20>ϳ<EFBFBD><CFB3><EFBFBD> hit <20>DZ<EFBFBD> <20><><EFBFBD>ϱ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> üũ<C3BC><C5A9> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><CDB8><EFBFBD> <20>ɸ<EFBFBD><C9B8><EFBFBD> <20>ʵ<EFBFBD><CAB5><EFBFBD> <20>Ѵ<EFBFBD>. #28747
|
|||
|
|
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD>ǿ<EFBFBD> <20>ɸ<EFBFBD><C9B8><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Ϲ<EFBFBD><CFB9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ó<><C3B3><EFBFBD><EFBFBD>.
|
|||
|
|
if( false == hHitter->CheckHitSignalStateEffectFilterException( GetUniqueID(), pHitSignal->StateEffectFilter) )
|
|||
|
|
{
|
|||
|
|
return false;
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
if( false == m_pStateBlow->IsApplied( (STATE_BLOW::emBLOW_INDEX)pHitSignal->StateEffectFilter ) )
|
|||
|
|
{
|
|||
|
|
return false;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
#ifdef PRE_ADD_MONSTER_CATCH
|
|||
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD>Ϳ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> üũ<C3BC>ϴ<EFBFBD> <20>÷<EFBFBD><C3B7>װ<EFBFBD> <20><><EFBFBD><EFBFBD> <20>ִٸ<D6B4> <20><><EFBFBD><EFBFBD><EFBFBD>Ϳ<EFBFBD><CDBF><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>츸 <20><><EFBFBD><EFBFBD>.
|
|||
|
|
if( TRUE == pHitSignal->bIsCatchedActor )
|
|||
|
|
{
|
|||
|
|
if( IsPlayerActor() )
|
|||
|
|
{
|
|||
|
|
CDnPlayerActor* pPlayerActor = static_cast<CDnPlayerActor*>(this);
|
|||
|
|
if( false == pPlayerActor->IsCatchedByMonster() )
|
|||
|
|
{
|
|||
|
|
return false;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
#endif // #ifdef PRE_ADD_MONSATER_CATCH
|
|||
|
|
|
|||
|
|
// <20>ֺ<EFBFBD><D6BA><EFBFBD> <20><><EFBFBD><EFBFBD> <20><>ȯ<EFBFBD><C8AF> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ƴ<EFBFBD><C6B4><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <20><>ũ <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><>ų<EFBFBD><C5B3><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
|||
|
|
if( TRUE == pHitSignal->bUseMyRelicFilter )
|
|||
|
|
{
|
|||
|
|
bool bIsMyRelicMonster = hHitter->IsMyRelicMonster( GetMySmartPtr() );
|
|||
|
|
if( bIsMyRelicMonster )
|
|||
|
|
return true;
|
|||
|
|
else
|
|||
|
|
return false;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// #13885 <20>̽<EFBFBD> <20><><EFBFBD><EFBFBD>.
|
|||
|
|
int nTargetType = pHitSignal->nTargetType;
|
|||
|
|
if( hHitter->IsAppliedThisStateBlow( STATE_BLOW::BLOW_086 ) )
|
|||
|
|
{
|
|||
|
|
// <20><> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF> <20>ϳ<EFBFBD><CFB3><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ȴ<EFBFBD>.
|
|||
|
|
DNVector( DnBlowHandle ) vlReverseTeamBlows;
|
|||
|
|
hHitter->GatherAppliedStateBlowByBlowIndex( STATE_BLOW::BLOW_086, vlReverseTeamBlows );
|
|||
|
|
_ASSERT( false == vlReverseTeamBlows.empty() );
|
|||
|
|
if( false == vlReverseTeamBlows.empty() )
|
|||
|
|
{
|
|||
|
|
DnBlowHandle hBlow = vlReverseTeamBlows.front();
|
|||
|
|
CDnReverseTeamBlow* pReverseTeamBlow = static_cast<CDnReverseTeamBlow*>(hBlow.GetPointer());
|
|||
|
|
if( CDnReverseTeamBlow::HIT_SIGNAL_TARGET_CHANGE == pReverseTeamBlow->GetType() )
|
|||
|
|
{
|
|||
|
|
switch( nTargetType )
|
|||
|
|
{
|
|||
|
|
case 0: // Enemy -> Friend
|
|||
|
|
nTargetType = 1;
|
|||
|
|
break;
|
|||
|
|
|
|||
|
|
case 1: // Friend -> Enemy
|
|||
|
|
{
|
|||
|
|
// #50166 <20><><EFBFBD>߰<EFBFBD><DFB0><EFBFBD> <20>ñ׳<C3B1><D7B3><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¸<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5><EFBFBD> <20>Ѵ<EFBFBD>.
|
|||
|
|
if(pHitSignal->fDamageProb > 0)
|
|||
|
|
nTargetType = 1;
|
|||
|
|
else
|
|||
|
|
nTargetType = 0;
|
|||
|
|
}
|
|||
|
|
break;
|
|||
|
|
|
|||
|
|
case 2: // All -> All
|
|||
|
|
{
|
|||
|
|
// #51871 <20>̽<EFBFBD><CCBD><EFBFBD><EFBFBD><EFBFBD> All Ÿ<><C5B8><EFBFBD><EFBFBD> <20><><EFBFBD>쿡<EFBFBD><ECBFA1> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ִ°<D6B4><C2B0><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ġ<EFBFBD><C4A1> <20>ʵ<EFBFBD><CAB5><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>.
|
|||
|
|
if(pHitSignal->fDamageProb > 0)
|
|||
|
|
nTargetType = 1;
|
|||
|
|
}
|
|||
|
|
break;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
if( CDnReverseTeamBlow::HIT_SIGNAL_TARGET_ALL == pReverseTeamBlow->GetType() )
|
|||
|
|
{
|
|||
|
|
// Ÿ<>ݴ<EFBFBD><DDB4><EFBFBD> all <20><> <20>ٲ<EFBFBD><D9B2><EFBFBD>.
|
|||
|
|
nTargetType = 2;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
switch( nTargetType )
|
|||
|
|
{
|
|||
|
|
case 0: // Enemy
|
|||
|
|
if( GetTeam() == hHitter->GetTeam() ) return false;
|
|||
|
|
if( GetMySmartPtr() == hHitter->GetMySmartPtr() ) return false;
|
|||
|
|
if( false == pHitSignal->bIgnoreCanHit &&
|
|||
|
|
false == IsAppliedThisStateBlow( STATE_BLOW::BLOW_138 ) )
|
|||
|
|
{
|
|||
|
|
if( !CDnActorState::IsHittable() )
|
|||
|
|
return false;
|
|||
|
|
}
|
|||
|
|
break;
|
|||
|
|
|
|||
|
|
case 1: // Friend
|
|||
|
|
|
|||
|
|
if( GetTeam() != hHitter->GetTeam() ) return false;
|
|||
|
|
|
|||
|
|
#ifdef PRE_FIX_63315
|
|||
|
|
// #63315 - TargetType <20><> Friend <20><> <20><><EFBFBD>쿡<EFBFBD><ECBFA1> Hittable <20>˻<EFBFBD><CBBB>ϵ<EFBFBD><CFB5><EFBFBD> <20>߰<EFBFBD>.
|
|||
|
|
if( false == pHitSignal->bIgnoreCanHit &&
|
|||
|
|
false == IsAppliedThisStateBlow( STATE_BLOW::BLOW_138 ) )
|
|||
|
|
{
|
|||
|
|
if( !CDnActorState::IsHittable() )
|
|||
|
|
return false;
|
|||
|
|
}
|
|||
|
|
#endif // PRE_FIX_63315
|
|||
|
|
break;
|
|||
|
|
|
|||
|
|
case 2: // All
|
|||
|
|
// CanHit <20>ñ׳<C3B1><D7B3><EFBFBD> false <20><> <20><> hit <20>ñ׳<C3B1> targettype <20><> all <20>̶<EFBFBD><CCB6><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> hit <20><><EFBFBD><EFBFBD> <20>ʵ<EFBFBD><CAB5><EFBFBD> <20><><EFBFBD><EFBFBD>. (#10570)
|
|||
|
|
if( GetTeam() != hHitter->GetTeam() )
|
|||
|
|
{
|
|||
|
|
// Hit <20>ñ׳ο<D7B3> CanHit <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> <20>÷<EFBFBD><C3B7><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20>ִ<EFBFBD> <20><><EFBFBD>·<EFBFBD> <20>Ǵ<EFBFBD>.
|
|||
|
|
// 138<33><38> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF> <20>ɷ<EFBFBD><C9B7><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. (#19619)
|
|||
|
|
if( false == pHitSignal->bIgnoreCanHit &&
|
|||
|
|
false == IsAppliedThisStateBlow( STATE_BLOW::BLOW_138 ) )
|
|||
|
|
{
|
|||
|
|
if( !CDnActorState::IsHittable() )
|
|||
|
|
return false;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
break;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
switch( pHitSignal->nStateCondition )
|
|||
|
|
{
|
|||
|
|
case 0: // Normal
|
|||
|
|
if( GetState() == CDnActorState::Down ) return false;
|
|||
|
|
break;
|
|||
|
|
case 1: // Down
|
|||
|
|
if( !( GetState() & CDnActorState::Down ) ) return false;
|
|||
|
|
break;
|
|||
|
|
case 2: // Normal + Down
|
|||
|
|
break;
|
|||
|
|
case 3: // All
|
|||
|
|
break;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
return true;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
bool CDnActor::IsHittableSkill( int iSkillIndex , bool &bSendResist )
|
|||
|
|
{
|
|||
|
|
// Ư<><C6AF> <20><>ų<EFBFBD><C5B3> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> ó<><C3B3> [2010/11/22 semozz]
|
|||
|
|
if( m_pStateBlow->IsApplied( STATE_BLOW::BLOW_154 ) )
|
|||
|
|
{
|
|||
|
|
DNVector(DnBlowHandle) vResult;
|
|||
|
|
m_pStateBlow->GetStateBlowFromBlowIndex(STATE_BLOW::BLOW_154, vResult);
|
|||
|
|
|
|||
|
|
for( UINT i=0 ; i<vResult.size() ; ++i )
|
|||
|
|
{
|
|||
|
|
DnBlowHandle hBlow = vResult.at( i );
|
|||
|
|
if( hBlow )
|
|||
|
|
{
|
|||
|
|
CDNInvincibleAtBlow* pInvincibleAtBlow = static_cast<CDNInvincibleAtBlow*>(hBlow.GetPointer());
|
|||
|
|
if ( pInvincibleAtBlow && pInvincibleAtBlow->IsInvincibleAt(iSkillIndex) )
|
|||
|
|
{
|
|||
|
|
bSendResist = pInvincibleAtBlow->IsEnableSendResist();
|
|||
|
|
return false;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
return true;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::Show( bool bShow )
|
|||
|
|
{
|
|||
|
|
m_bShow = bShow;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::ResetActor()
|
|||
|
|
{
|
|||
|
|
Show( true );
|
|||
|
|
m_fDownDelta = 0.f;
|
|||
|
|
m_fDieDelta = 0.f;
|
|||
|
|
m_fStiffDelta = 0.f;
|
|||
|
|
m_mapLastDamageTime.clear();
|
|||
|
|
m_mapLastHitUniqueID.clear();
|
|||
|
|
m_nLastDamageHitterActionIndex = 0;
|
|||
|
|
m_LastHitSignalTime = 0;
|
|||
|
|
m_nLastHitSignalIndex = -1;
|
|||
|
|
|
|||
|
|
m_bModifyPlaySpeed = false;
|
|||
|
|
m_PlaySpeedStartTime = 0;
|
|||
|
|
m_dwPlaySpeedTime = 0;
|
|||
|
|
|
|||
|
|
m_bEnableNormalSuperAmmor = false;
|
|||
|
|
m_nNormalSuperAmmorTime = 0;
|
|||
|
|
m_fBreakNormalSuperAmmorDurability = 0.f;
|
|||
|
|
// CDnActionBase::SetFPS( 60.f );
|
|||
|
|
CDnActionBase::ResetActionBase();
|
|||
|
|
MAActorRenderBase::ResetActorRenderBase();
|
|||
|
|
|
|||
|
|
ResetMove();
|
|||
|
|
ResetLook();
|
|||
|
|
|
|||
|
|
SetVelocity( EtVector3( 0.f, 0.f, 0.f ) );
|
|||
|
|
SetResistance( EtVector3( 0.f, 0.f, 0.f ) );
|
|||
|
|
SetAddHeight( 0.f );
|
|||
|
|
|
|||
|
|
SetMagnetLength( 0.f );
|
|||
|
|
SetMagnetDir( EtVector2( 0.f, 0.f ) );
|
|||
|
|
|
|||
|
|
m_vlForceSettedHitElement.clear();
|
|||
|
|
|
|||
|
|
if( IsCustomAction() ) ResetCustomAction();
|
|||
|
|
SetActionQueue( "Stand", 0, 0.f, 0.f, false, false );
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::ProcessCollision( EtVector3 &vMove )
|
|||
|
|
{
|
|||
|
|
m_pMovement->PushAndCollisionCheck( vMove );
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::ProcessState( LOCAL_TIME LocalTime, float fDelta )
|
|||
|
|
{
|
|||
|
|
CDnActorState::ProcessState( LocalTime, fDelta );
|
|||
|
|
|
|||
|
|
// #48950 <20><><EFBFBD>ӾƸӰ<C6B8> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>쿣 MoveY <20>ñ׳<C3B1> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ش<EFBFBD>.
|
|||
|
|
if( IsHit() )
|
|||
|
|
{
|
|||
|
|
ResetMoveYDistance();
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if( m_pStateBlow &&
|
|||
|
|
false == IsNpcActor() )
|
|||
|
|
{
|
|||
|
|
m_pStateBlow->Process( LocalTime, fDelta );
|
|||
|
|
ProcessReservedRemoveBlows();
|
|||
|
|
ExecuteKillAfterProcessStateBlow();
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::SendAddSEFail( int iAddSEResult, STATE_BLOW::emBLOW_INDEX emBlowIndex )
|
|||
|
|
{
|
|||
|
|
BYTE pBuffer[ 16 ];
|
|||
|
|
CPacketCompressStream Stream( pBuffer, 16 );
|
|||
|
|
|
|||
|
|
Stream.Write( &iAddSEResult, sizeof(int) );
|
|||
|
|
|
|||
|
|
Send( eActor::SC_ADD_STATE_EFFECT_DENIED, &Stream );
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::PushSummonMonster( DnMonsterActorHandle hMonster, const SummonMonsterStruct* pSummonMonsterStruct, bool bReCreateFollowStageMonster/* = false*/ )
|
|||
|
|
{
|
|||
|
|
//if( bReCreateFollowStageMonster )
|
|||
|
|
// return;
|
|||
|
|
|
|||
|
|
if( 0 == pSummonMonsterStruct->nGroupID )
|
|||
|
|
{
|
|||
|
|
m_listSummonMonster.push_back( hMonster );
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
bool CDnActor::bIsCanSummonMonster( const SummonMonsterStruct* pSummonMonsterStruct )
|
|||
|
|
{
|
|||
|
|
// 0 <20≯<EFBFBD> <20><>ü<EFBFBD><C3BC> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ʰڴٴ<DAB4> <20><><EFBFBD><EFBFBD>~!
|
|||
|
|
if( pSummonMonsterStruct->nMaxCount == 0 )
|
|||
|
|
return true;
|
|||
|
|
|
|||
|
|
// <20><EFBFBD> ID <20><> <20><><EFBFBD>ǵǾ<C7B5> <20>ִٸ<D6B4> <20><EFBFBD> map <20><> <20><><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> ã<>Ƽ<EFBFBD> ó<><C3B3>.
|
|||
|
|
int iCount = 0;
|
|||
|
|
if( IsPlayerActor() && 0 < pSummonMonsterStruct->nGroupID )
|
|||
|
|
{
|
|||
|
|
if( 0 < m_mapSummonMonsterByGroup.count( pSummonMonsterStruct->nGroupID ) )
|
|||
|
|
{
|
|||
|
|
std::list<DnMonsterActorHandle>& listSummonedGroupMonster = m_mapSummonMonsterByGroup[ pSummonMonsterStruct->nGroupID ];
|
|||
|
|
for( std::list<DnMonsterActorHandle>::iterator itor=listSummonedGroupMonster.begin(); itor!=listSummonedGroupMonster.end(); )
|
|||
|
|
{
|
|||
|
|
DnMonsterActorHandle hMonster = *itor;
|
|||
|
|
if( hMonster )
|
|||
|
|
{
|
|||
|
|
++iCount;
|
|||
|
|
++itor;
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
itor = listSummonedGroupMonster.erase( itor );
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if( iCount < pSummonMonsterStruct->nMaxCount )
|
|||
|
|
return true;
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
return true;
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
for( std::list<DnMonsterActorHandle>::iterator itor=m_listSummonMonster.begin() ; itor!=m_listSummonMonster.end() ; )
|
|||
|
|
{
|
|||
|
|
DnMonsterActorHandle hMonster = *itor;
|
|||
|
|
if( hMonster )
|
|||
|
|
{
|
|||
|
|
if( hMonster->GetMonsterClassID() == pSummonMonsterStruct->MonsterID )
|
|||
|
|
++iCount;
|
|||
|
|
|
|||
|
|
++itor;
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
itor = m_listSummonMonster.erase( itor );
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if( iCount < pSummonMonsterStruct->nMaxCount )
|
|||
|
|
return true;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
return false;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
int CDnActor::AddStateBlow( STATE_BLOW::emBLOW_INDEX emBlowIndex, const CDnSkill::SkillInfo* pParentSkill,
|
|||
|
|
int nDurationTime, const char *szParam, bool bOnPlayerInit/* = false*/, bool bCheckCanBegin/* = true*/ , bool bEternity /*=false*/ )
|
|||
|
|
{
|
|||
|
|
// <20><>Ȱ <20><><EFBFBD><EFBFBD><EFBFBD>ϰ<EFBFBD> <20><EFBFBD><D7BE><EFBFBD> <20><> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF> <20>߰<EFBFBD> <20>ȵ<EFBFBD>
|
|||
|
|
// PvP <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>۽<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¿<EFBFBD><C2BF><EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD> <20>ɾ<EFBFBD><C9BE>ٶ<EFBFBD> bOnPlayerInit = true <20><> <20>Ѿ<EFBFBD><D1BE>ͼ<EFBFBD> Die üũ <20><><EFBFBD><EFBFBD>. by <20><><EFBFBD><EFBFBD>
|
|||
|
|
if( false == bOnPlayerInit )
|
|||
|
|
if( IsDie() && STATE_BLOW::emBLOW_INDEX::BLOW_057 != emBlowIndex ) return -1;
|
|||
|
|
|
|||
|
|
if( !m_pStateBlow ) return -1;
|
|||
|
|
int iAddSEResult = m_pStateBlow->CanAddThisBlow( pParentSkill, emBlowIndex );
|
|||
|
|
switch( iAddSEResult )
|
|||
|
|
{
|
|||
|
|
case CDnStateBlow::ADD_FAIL_BY_IMMUNE:
|
|||
|
|
{
|
|||
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>..
|
|||
|
|
SendAddSEFail( iAddSEResult, emBlowIndex );
|
|||
|
|
return -1;
|
|||
|
|
}
|
|||
|
|
break;
|
|||
|
|
|
|||
|
|
case CDnStateBlow::ADD_FAIL_BY_DIED:
|
|||
|
|
OutputDebug( "[Add State Effect Failed by die]\n" );
|
|||
|
|
return -1;
|
|||
|
|
|
|||
|
|
case CDnStateBlow::ADD_FAIL_BY_INVINCIBLE:
|
|||
|
|
OutputDebug( "[Add State Effect Failed by Invincible]\n" );
|
|||
|
|
return -1;
|
|||
|
|
|
|||
|
|
case CDnStateBlow::ADD_FAIL_BY_REVIVAL:
|
|||
|
|
OutputDebug( "[Add State Effect Failed by Revival blow!]\n" );
|
|||
|
|
return -1;
|
|||
|
|
case CDnStateBlow::ADD_FAIL_BY_GUILDBLOW_PRIORITY:
|
|||
|
|
return -1;
|
|||
|
|
case CDnStateBlow::ADD_FAIL_BY_PROB_SKILL_INVINCIBLE:
|
|||
|
|
OutputDebug( "[Add State Effect Failed by Prob Skill Invincible]\n" );
|
|||
|
|
return -1;
|
|||
|
|
case CDnStateBlow::ADD_FAIL_BY_COMBOLIMITBLOW:
|
|||
|
|
OutputDebug( "[Add State Effect Failed by ComboLimitBlow]\n" );
|
|||
|
|
return -1;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
//<2F>ӵ<EFBFBD><D3B5><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> ȿ<><C8BF> <20><><EFBFBD><EFBFBD><EFBFBD>ɶ<EFBFBD> Accelȿ<6C><C8BF> <20>̹<EFBFBD> <20><><EFBFBD><EFBFBD> <20>Ǿ<EFBFBD> <20>ִٸ<D6B4>
|
|||
|
|
//Accelȿ<6C><C8BF><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>(STATE_END?)<29>ȴ<EFBFBD>..
|
|||
|
|
switch(emBlowIndex)
|
|||
|
|
{
|
|||
|
|
case STATE_BLOW::BLOW_076:
|
|||
|
|
case STATE_BLOW::BLOW_025:
|
|||
|
|
case STATE_BLOW::BLOW_144:
|
|||
|
|
{
|
|||
|
|
if (IsAppliedThisStateBlow(STATE_BLOW::BLOW_220))
|
|||
|
|
{
|
|||
|
|
DNVector(DnBlowHandle) vlhFrameBlows;
|
|||
|
|
GatherAppliedStateBlowByBlowIndex( STATE_BLOW::BLOW_220, vlhFrameBlows );
|
|||
|
|
for( int i = 0; i < (int)vlhFrameBlows.size(); ++i )
|
|||
|
|
{
|
|||
|
|
DnBlowHandle hBlow = vlhFrameBlows.at(i);
|
|||
|
|
if (hBlow)
|
|||
|
|
hBlow->SetState(STATE_BLOW::STATE_END);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
break;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
#if defined(PRE_ADD_50923)
|
|||
|
|
//240<34><30><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD> <20>ϳ<EFBFBD><CFB3><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ǿ<EFBFBD><C7BE><EFBFBD> <20>Ѵ<EFBFBD>. <20><><EFBFBD>ο<EFBFBD> 240<34><30> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
//<2F><><EFBFBD><EFBFBD> <20>ϵ<EFBFBD><CFB5><EFBFBD><EFBFBD>Ѵ<EFBFBD>.
|
|||
|
|
if (emBlowIndex == STATE_BLOW::BLOW_240)
|
|||
|
|
{
|
|||
|
|
if (IsAppliedThisStateBlow(STATE_BLOW::BLOW_240))
|
|||
|
|
{
|
|||
|
|
DNVector(DnBlowHandle) vlhFrameBlows;
|
|||
|
|
GatherAppliedStateBlowByBlowIndex( STATE_BLOW::BLOW_240, vlhFrameBlows );
|
|||
|
|
for( int i = 0; i < (int)vlhFrameBlows.size(); ++i )
|
|||
|
|
{
|
|||
|
|
DnBlowHandle hBlow = vlhFrameBlows.at(i);
|
|||
|
|
if (hBlow)
|
|||
|
|
hBlow->SetState(STATE_BLOW::STATE_END);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
#endif // PRE_ADD_50923
|
|||
|
|
|
|||
|
|
DnBlowHandle hBlow = m_pStateBlow->CreateStateBlow( GetMySmartPtr(), pParentSkill, emBlowIndex, nDurationTime, szParam );
|
|||
|
|
if( !hBlow )
|
|||
|
|
return -1;
|
|||
|
|
|
|||
|
|
// Ȯ<><C8AE><EFBFBD><EFBFBD> <20>ִ<EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD> Ȯ<><C8AE><EFBFBD><EFBFBD> <20>ɸ<EFBFBD><C9B8><EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF> <20><> <20>ɸ<EFBFBD>.
|
|||
|
|
// Ŭ<><C5AC><EFBFBD>ʿ<EFBFBD><CABF><EFBFBD> <20><> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF> <20>߰<EFBFBD><DFB0><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ߴ<EFBFBD><DFB4><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>˾ƾ<CBBE> <20>ϹǷ<CFB9> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>Ŷ<EFBFBD><C5B6><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
|||
|
|
if( bCheckCanBegin && (false == hBlow->CanBegin()) )
|
|||
|
|
{
|
|||
|
|
SendAddSEFail( CDnStateBlow::ADD_FAIL_BY_PROBABILITY, emBlowIndex );
|
|||
|
|
//hBlow->Release();
|
|||
|
|
|
|||
|
|
#if defined(PRE_FIX_49208)
|
|||
|
|
//#49208 <20>̹<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD> OnBegin<69><6E> ȣ<><C8A3> <20><> <20><><EFBFBD>¿<EFBFBD><C2BF><EFBFBD> Duplicated<65><64> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><E2BFA1> <20>ٷ<EFBFBD> Delete<74><65> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> referenceī<65><C4AB>Ʈ<EFBFBD><C6AE> <20><><EFBFBD>߳<EFBFBD><DFB3><EFBFBD> <20><>.
|
|||
|
|
if (hBlow->IsDuplicated() == false)
|
|||
|
|
#endif // PRE_FIX_49208
|
|||
|
|
SAFE_RELEASE_SPTR( hBlow );
|
|||
|
|
|
|||
|
|
OutputDebug( "[Add State Effect Failed by probability fail!] BlowIndex: %d\n", emBlowIndex );
|
|||
|
|
return -1;
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
if( hBlow->IsDuplicated() )
|
|||
|
|
return hBlow->GetBlowID();
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
hBlow->SetParentSkillInfo( pParentSkill );
|
|||
|
|
//hBlow->SetParentSkillID( iParentSkillID );
|
|||
|
|
//hBlow->SetParentSkillLevelID( iParentSkillLevelID );
|
|||
|
|
|
|||
|
|
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF> <20><><EFBFBD><EFBFBD><EEB0A1> <20><>, <20><> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ѵ<EFBFBD>..
|
|||
|
|
if( hBlow->GetBlowIndex() == STATE_BLOW::BLOW_099 )
|
|||
|
|
{
|
|||
|
|
// ȭ<><C8AD><EFBFBD><EFBFBD> <20>ߵ<EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>.
|
|||
|
|
if( IsAppliedThisStateBlow( STATE_BLOW::BLOW_042 ) ||
|
|||
|
|
IsAppliedThisStateBlow( STATE_BLOW::BLOW_044 ) )
|
|||
|
|
{
|
|||
|
|
DNVector(DnBlowHandle) vlBlows;
|
|||
|
|
GatherAppliedStateBlowByBlowIndex( STATE_BLOW::BLOW_042, vlBlows );
|
|||
|
|
GatherAppliedStateBlowByBlowIndex( STATE_BLOW::BLOW_044, vlBlows );
|
|||
|
|
for( int i = 0; i < (int)vlBlows.size(); ++i )
|
|||
|
|
{
|
|||
|
|
DnBlowHandle hBlow = vlBlows.at( i );
|
|||
|
|
int iBlowID = hBlow->GetBlowID();
|
|||
|
|
|
|||
|
|
CmdRemoveStateEffectFromID( iBlowID );
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
hBlow->SetEternity( bEternity );
|
|||
|
|
|
|||
|
|
return m_pStateBlow->AddStateBlow( hBlow );
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::DelStateBlow( STATE_BLOW::emBLOW_INDEX emBlowIndex )
|
|||
|
|
{
|
|||
|
|
if( !m_pStateBlow ) return;
|
|||
|
|
m_pStateBlow->RemoveStateBlowByBlowDefineIndex( emBlowIndex );
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
int CDnActor::RemoveStateBlowByBlowDefineIndex( STATE_BLOW::emBLOW_INDEX emBlowIndex )
|
|||
|
|
{
|
|||
|
|
if( !m_pStateBlow ) return -1;
|
|||
|
|
return m_pStateBlow->RemoveStateBlowByBlowDefineIndex( emBlowIndex );
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::RemoveStateBlowFromID( int nStateBlowID )
|
|||
|
|
{
|
|||
|
|
if( !m_pStateBlow ) return;
|
|||
|
|
m_pStateBlow->RemoveStateBlowFromID( nStateBlowID );
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::RemoveAllBlow()
|
|||
|
|
{
|
|||
|
|
DNVector(DnBlowHandle) vlAppliedStateBlow;
|
|||
|
|
GetAllAppliedStateBlow( vlAppliedStateBlow );
|
|||
|
|
int iNumStateBlow = (int)vlAppliedStateBlow.size();
|
|||
|
|
for( int iBlow = 0; iBlow < iNumStateBlow; ++iBlow )
|
|||
|
|
m_pStateBlow->RemoveStateBlowFromID( vlAppliedStateBlow.at( iBlow )->GetBlowID() );
|
|||
|
|
|
|||
|
|
ApplyPassiveSkills();
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::RemoveAllBlowExpectPassiveSkill()
|
|||
|
|
{
|
|||
|
|
DNVector(DnBlowHandle) vlAppliedStateBlow;
|
|||
|
|
GetAllAppliedStateBlow( vlAppliedStateBlow );
|
|||
|
|
int iNumStateBlow = (int)vlAppliedStateBlow.size();
|
|||
|
|
for( int iBlow = 0; iBlow < iNumStateBlow; ++iBlow )
|
|||
|
|
{
|
|||
|
|
DnBlowHandle hBlow = vlAppliedStateBlow.at( iBlow );
|
|||
|
|
if( !hBlow )
|
|||
|
|
continue;
|
|||
|
|
if( bIsPassiveSkill( hBlow ) )
|
|||
|
|
continue;
|
|||
|
|
|
|||
|
|
// <20>ٿ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ȯ<><C8AE> <20><>ų <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD>־<EFBFBD><D6BE><EFBFBD> <20>Ѵ<EFBFBD>.
|
|||
|
|
if( IsShouldRemainBlowWhenDie( hBlow ) )
|
|||
|
|
continue;
|
|||
|
|
|
|||
|
|
m_pStateBlow->RemoveStateBlowFromID( hBlow->GetBlowID() );
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
bool CDnActor::IsShouldRemainBlowWhenDie( DnBlowHandle hBlow )
|
|||
|
|
{
|
|||
|
|
bool bResult = false;
|
|||
|
|
|
|||
|
|
if( hBlow )
|
|||
|
|
{
|
|||
|
|
if( hBlow->IsFromSourceItem() )
|
|||
|
|
return true;
|
|||
|
|
|
|||
|
|
if( hBlow->IsEternity() )
|
|||
|
|
return true;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
return bResult;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
int CDnActor::GetNumAppliedStateBlow( void )
|
|||
|
|
{
|
|||
|
|
return m_pStateBlow->GetNumStateBlow();
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
DnBlowHandle CDnActor::GetAppliedStateBlow( int iIndex )
|
|||
|
|
{
|
|||
|
|
return m_pStateBlow->GetStateBlow( iIndex );
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
bool CDnActor::IsAppliedThisStateBlow( STATE_BLOW::emBLOW_INDEX iBlowIndex )
|
|||
|
|
{
|
|||
|
|
if( !m_pStateBlow )
|
|||
|
|
return false;
|
|||
|
|
|
|||
|
|
return m_pStateBlow->IsApplied( iBlowIndex );
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
void CDnActor::GetAllAppliedStateBlow(DNVector(DnBlowHandle)& /*IN OUT*/ out)
|
|||
|
|
{
|
|||
|
|
int nSize = m_pStateBlow->GetNumStateBlow();
|
|||
|
|
if( 0 < nSize ) out.reserve( out.capacity() + nSize ); // 20080916 <20><><EFBFBD>ɰ<EFBFBD><C9B0><EFBFBD>
|
|||
|
|
for ( int i = 0 ; i < nSize ; i++ )
|
|||
|
|
{
|
|||
|
|
DnBlowHandle hBlow = m_pStateBlow->GetStateBlow(i);
|
|||
|
|
if( hBlow && STATE_BLOW::STATE_END != hBlow->GetBlowState() )
|
|||
|
|
out.push_back(hBlow);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::GetAllAppliedStateBlowBySkillID(int nSkillID, DNVector(DnBlowHandle)& /*IN OUT*/ out)
|
|||
|
|
{
|
|||
|
|
int nSize = m_pStateBlow->GetNumStateBlow();
|
|||
|
|
if( 0 < nSize ) out.reserve( out.capacity() + nSize ); // 20080916 <20><><EFBFBD>ɰ<EFBFBD><C9B0><EFBFBD>
|
|||
|
|
|
|||
|
|
for ( int i = 0 ; i < nSize ; i++ )
|
|||
|
|
{
|
|||
|
|
DnBlowHandle hBlow = m_pStateBlow->GetStateBlow(i);
|
|||
|
|
if( hBlow )
|
|||
|
|
{
|
|||
|
|
const CDnSkill::SkillInfo* pSkillinfo = hBlow->GetParentSkillInfo();
|
|||
|
|
if( pSkillinfo && pSkillinfo->iSkillID == nSkillID &&
|
|||
|
|
STATE_BLOW::STATE_END != hBlow->GetBlowState() )
|
|||
|
|
{
|
|||
|
|
out.push_back(hBlow);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
void CDnActor::GatherAppliedStateBlowByBlowIndex( STATE_BLOW::emBLOW_INDEX BlowIndex, DNVector(DnBlowHandle)& /*IN OUT*/ out )
|
|||
|
|
{
|
|||
|
|
int iNumStateBlow = m_pStateBlow->GetNumStateBlow();
|
|||
|
|
for( int i = 0; i < iNumStateBlow; ++i )
|
|||
|
|
{
|
|||
|
|
DnBlowHandle hBlow = m_pStateBlow->GetStateBlow( i );
|
|||
|
|
if( hBlow && hBlow->GetBlowIndex() == BlowIndex &&
|
|||
|
|
STATE_BLOW::STATE_END != hBlow->GetBlowState() )
|
|||
|
|
out.push_back( hBlow );
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
void CDnActor::OnSkillProjectile( CDnProjectile *pProjectile )
|
|||
|
|
{
|
|||
|
|
MASkillUser::OnSkillProjectile( pProjectile );
|
|||
|
|
|
|||
|
|
if( pProjectile )
|
|||
|
|
{
|
|||
|
|
if( IsProcessSkill() || IsEnabledToggleSkill() )
|
|||
|
|
{
|
|||
|
|
DnSkillHandle hSkill;
|
|||
|
|
if( IsProcessSkill() )
|
|||
|
|
hSkill = m_hProcessSkill;
|
|||
|
|
else
|
|||
|
|
if( IsEnabledToggleSkill() )
|
|||
|
|
hSkill = GetEnabledToggleSkill();
|
|||
|
|
|
|||
|
|
_ASSERT( hSkill && "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ÿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><>ų<EFBFBD><C5B3> <20><><EFBFBD>ٴ<EFBFBD>?" );
|
|||
|
|
|
|||
|
|
pProjectile->SetParentSkill( hSkill );
|
|||
|
|
|
|||
|
|
for( DWORD i = 0; i < hSkill->GetStateEffectCount(); i++ )
|
|||
|
|
{
|
|||
|
|
CDnSkill::StateEffectStruct *pStruct = hSkill->GetStateEffectFromIndex(i);
|
|||
|
|
if( pStruct->ApplyType == CDnSkill::ApplySelf ) continue;
|
|||
|
|
pProjectile->AddStateEffect( *pStruct );
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if( IsAppliedThisStateBlow( STATE_BLOW::BLOW_167 ) )
|
|||
|
|
{
|
|||
|
|
DNVector(DnBlowHandle) vlBlows;
|
|||
|
|
GatherAppliedStateBlowByBlowIndex( STATE_BLOW::BLOW_167, vlBlows );
|
|||
|
|
if( false == vlBlows.empty() )
|
|||
|
|
{
|
|||
|
|
int iForceSkillLevel = (int)vlBlows.front()->GetFloatValue();
|
|||
|
|
pProjectile->SetSummonMonsterForceSkillLevel( iForceSkillLevel );
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
//////////////////////////////////////////////////////////////////////////
|
|||
|
|
//<2F>־<EFBFBD><D6BE><EFBFBD> <20><><EFBFBD><EFBFBD> <20><>ų<EFBFBD><C5B3> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF> ó<><C3B3><EFBFBD><EFBFBD> <20><><EFBFBD>ؼ<EFBFBD> <20><EFBFBD>ü<EFBFBD><C3BC> <20><><EFBFBD><EFBFBD> <20>ɶ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><>ų<EFBFBD><C5B3> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ش<EFBFBD> <20><>ų<EFBFBD><C5B3> <20><EFBFBD>ü<EFBFBD><C3BC> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>´<EFBFBD>.
|
|||
|
|
//<2F><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ų<EFBFBD><C5B3> 242<34><32><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ִ<EFBFBD> <20><>ų<EFBFBD≯<EFBFBD>
|
|||
|
|
if (hSkill)
|
|||
|
|
{
|
|||
|
|
bool bExistState = false;
|
|||
|
|
int nStateEffectCount = hSkill->GetStateEffectCount();
|
|||
|
|
for (int i = 0; i < nStateEffectCount; ++i)
|
|||
|
|
{
|
|||
|
|
CDnSkill::StateEffectStruct* pSE = hSkill->GetStateEffectFromIndex( i );
|
|||
|
|
if (pSE && (STATE_BLOW::emBLOW_INDEX)pSE->nID == STATE_BLOW::BLOW_242)
|
|||
|
|
{
|
|||
|
|
bExistState = true;
|
|||
|
|
break;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if (bExistState == true)
|
|||
|
|
{
|
|||
|
|
LOCAL_TIME skillStartTime = hSkill->GetSkillStartTime();
|
|||
|
|
pProjectile->SetSkillStartTime(skillStartTime); //<2F><EFBFBD>ü<EFBFBD><C3BC><EFBFBD><EFBFBD> <20><>ų <20><><EFBFBD><EFBFBD> <20>ð<EFBFBD><C3B0><EFBFBD> <20><><EFBFBD><EFBFBD> <20>س<EFBFBD><D8B3>´<EFBFBD>.
|
|||
|
|
hSkill->AddProjectile(pProjectile);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
#if defined(PRE_FIX_68645)
|
|||
|
|
//129<32><39> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD> <20>ְ<EFBFBD>, <20><><EFBFBD><EFBFBD> <20>Ӽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ִ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><EFBFBD>ü<EFBFBD><C3BC> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD>´<EFBFBD>.
|
|||
|
|
if( m_pStateBlow->IsApplied( STATE_BLOW::BLOW_129 ) )
|
|||
|
|
{
|
|||
|
|
DNVector(DnBlowHandle) vlhChangeActionSetBlow;
|
|||
|
|
m_pStateBlow->GetStateBlowFromBlowIndex( STATE_BLOW::BLOW_129, vlhChangeActionSetBlow );
|
|||
|
|
|
|||
|
|
// <20><EFBFBD> <20><> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20>ִ<EFBFBD>.
|
|||
|
|
int iNumBlow = (int)vlhChangeActionSetBlow.size();
|
|||
|
|
for( int i = 0; i < iNumBlow; ++i )
|
|||
|
|
{
|
|||
|
|
if( !vlhChangeActionSetBlow[i] )
|
|||
|
|
continue;
|
|||
|
|
CDnChangeActionSetBlow* pChangeActionSetBlow = static_cast<CDnChangeActionSetBlow*>( vlhChangeActionSetBlow.at(i).GetPointer() );
|
|||
|
|
|
|||
|
|
if (pChangeActionSetBlow->IsEnable() == true)
|
|||
|
|
{
|
|||
|
|
CDnChangeActionStrProcessor* pProcessor = pChangeActionSetBlow->GetChangeActionStrProcessor(); // <20><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>Ÿ<EFBFBD><C5B8><EFBFBD><EFBFBD> <20><>Ȱ<EFBFBD><C8B0>ȭ <20><><EFBFBD><EFBFBD><EFBFBD>϶<EFBFBD><CFB6><EFBFBD> NULL <20><><EFBFBD>ϵ<EFBFBD>.
|
|||
|
|
if( pProcessor && m_vlForceSettedHitElement.empty() == false)
|
|||
|
|
{
|
|||
|
|
ElementEnum forceElement = (ElementEnum)m_vlForceSettedHitElement[0];
|
|||
|
|
|
|||
|
|
pProjectile->SetForceHitElement(forceElement);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|
|||
|
|
#endif // PRE_FIX_68645
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::OnInitializeNextStage( void )
|
|||
|
|
{
|
|||
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>нú<D0BD> <20><EFBFBD> <20><>ų<EFBFBD><C5B3> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
if( m_hProcessSkill )
|
|||
|
|
{
|
|||
|
|
if( (m_hProcessSkill->GetSkillType() == CDnSkill::Passive || m_hProcessSkill->GetSkillType() == CDnSkill::AutoPassive) &&
|
|||
|
|
m_hProcessSkill->GetDurationType() == CDnSkill::Instantly )
|
|||
|
|
{
|
|||
|
|
m_hProcessSkill->OnEnd( 0, 0.0f );
|
|||
|
|
m_hProcessSkill.Identity();
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><>ų <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
if( m_hAuraSkill )
|
|||
|
|
{
|
|||
|
|
OnSkillAura( m_hAuraSkill, false );
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF> <20>ɷ<EFBFBD> <20>ִ<EFBFBD>ä<EFBFBD><C3A4> <20>̵<EFBFBD><CCB5>Ǵ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><EFBFBD><D7B7>ٸ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
|||
|
|
if( m_pStateBlow->IsApplied( STATE_BLOW::BLOW_041 ) )
|
|||
|
|
m_pStateBlow->RemoveStateBlowByBlowDefineIndex( STATE_BLOW::BLOW_041 );
|
|||
|
|
|
|||
|
|
RemoveNonAvailableStateBlow();
|
|||
|
|
|
|||
|
|
// Note: <20><> <20>̵<EFBFBD><CCB5><EFBFBD> <20><> ȣ<><C8A3><EFBFBD><EFBFBD>. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ȴ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> <20>̰<EFBFBD><CCB0><EFBFBD><EFBFBD><EFBFBD> <20>ʱ<EFBFBD>ȭ<EFBFBD><C8AD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
// <20><><EFBFBD>ȴ<EFBFBD> <20>ֵ<EFBFBD><D6B5><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20>ִ<EFBFBD>. <20><EFBFBD> <20><>Ȳ<EFBFBD><C8B2><EFBFBD><EFBFBD> Hit <20><><EFBFBD>μ<EFBFBD><CEBC><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD>ư<EFBFBD><C6B0><EFBFBD> <20><><EFBFBD><EFBFBD>.
|
|||
|
|
m_hVecLastHitList.clear();
|
|||
|
|
m_hVecLastHitListByRemainTime.clear();
|
|||
|
|
|
|||
|
|
m_iCantMoveReferenceCount = 0;
|
|||
|
|
m_iCantActionReferenceCount = 0;
|
|||
|
|
|
|||
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ÿ<>ݵ<EFBFBD> <20><>Ʈ<EFBFBD>ñ׳<C3B1> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ
|
|||
|
|
m_mapLastDamageTime.clear();
|
|||
|
|
m_mapLastHitUniqueID.clear();
|
|||
|
|
m_nLastDamageHitterActionIndex = 0;
|
|||
|
|
|
|||
|
|
RefreshState();
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// <20><><EFBFBD><EFBFBD> <20>Լ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ٲ<EFBFBD><D9B2><EFBFBD> Ŭ<><C5AC><EFBFBD>̾<EFBFBD>Ʈ<EFBFBD><C6AE><EFBFBD><EFBFBD><EFBFBD><EFBFBD> SC_START_PVPROUND <20><>Ŷ ó<><C3B3><EFBFBD>κ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ǿ<EFBFBD><C7BE><EFBFBD><EFBFBD>Ѵ<EFBFBD>.
|
|||
|
|
void CDnActor::OnInitializePVPRoundRestart( void )
|
|||
|
|
{
|
|||
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>нú<D0BD> <20><EFBFBD><D7BC><EFBFBD> <20>ִٸ<D6B4> <20><><EFBFBD><EFBFBD>.
|
|||
|
|
if( m_hProcessSkill )
|
|||
|
|
{
|
|||
|
|
if( (m_hProcessSkill->GetSkillType() == CDnSkill::Passive || m_hProcessSkill->GetSkillType() == CDnSkill::AutoPassive) &&
|
|||
|
|
m_hProcessSkill->GetDurationType() == CDnSkill::Instantly )
|
|||
|
|
{
|
|||
|
|
m_hProcessSkill->OnEnd( 0, 0.0f );
|
|||
|
|
m_hProcessSkill.Identity();
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> AutoPassive <20><>ų <20><><EFBFBD><EFBFBD>.
|
|||
|
|
EndAutoPassiveSkill( CDnActionBase::m_LocalTime, 0.0f );
|
|||
|
|
|
|||
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD>۽<EFBFBD>ų <20><><EFBFBD><EFBFBD>
|
|||
|
|
if( m_hItemSkill )
|
|||
|
|
{
|
|||
|
|
if( m_hItemSkill->IsFinished() )
|
|||
|
|
{
|
|||
|
|
m_hItemSkill->OnEnd( 0, 0.f );
|
|||
|
|
|
|||
|
|
deque<DnSkillHandle>::iterator iter = find( m_dqhItemSkillList.begin(), m_dqhItemSkillList.end(), m_hItemSkill );
|
|||
|
|
_ASSERT( m_dqhItemSkillList.end() != iter );
|
|||
|
|
m_dqhItemSkillList.erase( iter );
|
|||
|
|
|
|||
|
|
SAFE_RELEASE_SPTR( m_hItemSkill );
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><>ų<EFBFBD><C5B3> <20>ִٸ<D6B4> <20><><EFBFBD><EFBFBD>.
|
|||
|
|
if( m_hAuraSkill )
|
|||
|
|
{
|
|||
|
|
OnSkillAura( m_hAuraSkill, false );
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><>ų<EFBFBD><C5B3> <20>ִٸ<D6B4> <20><><EFBFBD><EFBFBD>.
|
|||
|
|
if( m_hToggleSkill )
|
|||
|
|
{
|
|||
|
|
OnSkillToggle( m_hToggleSkill, false );
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF> <20><><EFBFBD><EFBFBD>
|
|||
|
|
RemoveAllBlowExpectPassiveSkill();
|
|||
|
|
|
|||
|
|
if( IsPlayerActor() )
|
|||
|
|
{
|
|||
|
|
CDnPlayerActor *pPlayer = static_cast<CDnPlayerActor*>(this);
|
|||
|
|
pPlayer->RemoveAllBubbles( false );
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
m_hVecLastHitList.clear();
|
|||
|
|
m_hVecLastHitListByRemainTime.clear();
|
|||
|
|
|
|||
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ȴ<EFBFBD> <20><>Ʈ<EFBFBD>ñ׳<C3B1> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ
|
|||
|
|
m_mapLastDamageTime.clear();
|
|||
|
|
m_mapLastHitUniqueID.clear();
|
|||
|
|
m_nLastDamageHitterActionIndex = 0;
|
|||
|
|
|
|||
|
|
for( std::list<DnMonsterActorHandle>::iterator itor=m_listSummonMonster.begin() ; itor!=m_listSummonMonster.end() ; itor++ )
|
|||
|
|
{
|
|||
|
|
DnMonsterActorHandle hMonster = *itor;
|
|||
|
|
if( hMonster ) hMonster->CmdSuicide( false, false );
|
|||
|
|
}
|
|||
|
|
SAFE_DELETE_VEC( m_listSummonMonster );
|
|||
|
|
|
|||
|
|
std::list<DnMonsterActorHandle> suicideMonsterList;
|
|||
|
|
|
|||
|
|
map<int, list<DnMonsterActorHandle> >::iterator iter = m_mapSummonMonsterByGroup.begin();
|
|||
|
|
for( iter; iter != m_mapSummonMonsterByGroup.end(); ++iter )
|
|||
|
|
{
|
|||
|
|
// <20><><EFBFBD><EFBFBD> <20>ð<EFBFBD> <20><> <20>Ǿ<EFBFBD> ȥ<><C8A5> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ȯ <20><><EFBFBD><EFBFBD><EFBFBD>ʹ<EFBFBD> <20><><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> invalid<69><64> <20>ڵ鸸 <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD> <20><><EFBFBD><EFBFBD>.
|
|||
|
|
list<DnMonsterActorHandle>& listSummonedMonsters = iter->second;
|
|||
|
|
list<DnMonsterActorHandle>::iterator iterList = listSummonedMonsters.begin();
|
|||
|
|
for( iterList; iterList != listSummonedMonsters.end(); )
|
|||
|
|
{
|
|||
|
|
if( *iterList )
|
|||
|
|
{
|
|||
|
|
DnMonsterActorHandle hMonster = *iterList;
|
|||
|
|
//CmdSuicide<64>Լ<EFBFBD> <20><><EFBFBD>ο<EFBFBD><CEBF><EFBFBD> PlayerActor::OnDieSummonedMonsterȣ<72><C8A3><EFBFBD><EFBFBD>.
|
|||
|
|
//<2F><> <20>Լ<EFBFBD><D4BC><EFBFBD><EFBFBD><EFBFBD> m_mapSummonMonsterByGroup/listSummonMonster<65><72><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
|||
|
|
//<2F><EFBFBD><D7B7><EFBFBD> CmdSuicide<64><65> <20>༮<EFBFBD><E0BCAE><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> <20><><EFBFBD>Ƽ<EFBFBD> <20>Ʒ<EFBFBD><C6B7>ʿ<EFBFBD><CABF><EFBFBD> ó<><C3B3> <20>ϵ<EFBFBD><CFB5><EFBFBD> <20><>..
|
|||
|
|
//hMonster->CmdSuicide( false, false );
|
|||
|
|
suicideMonsterList.push_back(hMonster);
|
|||
|
|
|
|||
|
|
++iterList;
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
iterList = listSummonedMonsters.erase( iterList );
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> CmdSuicide<64><65> <20>༮<EFBFBD><E0BCAE> ó<><C3B3><EFBFBD>Ѵ<EFBFBD>.
|
|||
|
|
for( std::list<DnMonsterActorHandle>::iterator itor=suicideMonsterList.begin() ; itor!=suicideMonsterList.end() ; itor++ )
|
|||
|
|
{
|
|||
|
|
DnMonsterActorHandle hMonster = *itor;
|
|||
|
|
if( hMonster ) hMonster->CmdSuicide( false, false );
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
m_mapSummonMonsterByGroup.clear();
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
void CDnActor::ResetStateEffect( int nSkillDurationType )
|
|||
|
|
{
|
|||
|
|
m_pStateBlow->ResetStateBlowBySkillType( nSkillDurationType );
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
void CDnActor::ProcessPress()
|
|||
|
|
{
|
|||
|
|
if( m_nPressLevel == 0 ) return;
|
|||
|
|
if( IsDie() ) return;
|
|||
|
|
if( IsFly() ) return;
|
|||
|
|
if( IsUnderGround() ) return;
|
|||
|
|
|
|||
|
|
DNVector(DnActorHandle) hVecList;
|
|||
|
|
if( m_iLastProcessPressCount > 0 )
|
|||
|
|
hVecList.reserve( m_iLastProcessPressCount );
|
|||
|
|
EtVector3 vAniDist = *GetPosition();
|
|||
|
|
vAniDist.x -= GetAniDistance()->x;
|
|||
|
|
vAniDist.z -= GetAniDistance()->z;
|
|||
|
|
|
|||
|
|
float fScanRadius = 0.0f;
|
|||
|
|
if( m_Press == Press_Circle ) fScanRadius = (float)GetUnitSize() + 50.f;
|
|||
|
|
else if( m_Press == Press_Capsule ) fScanRadius = (float)GetUnitSize()*2.0f + 50.f;
|
|||
|
|
|
|||
|
|
int nCount = ScanActor( GetRoom(), vAniDist, fScanRadius, hVecList );
|
|||
|
|
if( nCount > 0 ) {
|
|||
|
|
for( int i=0; i<nCount; i++ ) {
|
|||
|
|
if( hVecList[i] == GetMySmartPtr() ) continue;
|
|||
|
|
if( hVecList[i]->IsDie() ) continue;
|
|||
|
|
if( hVecList[i]->GetPressLevel() > m_nPressLevel ) continue;
|
|||
|
|
if( hVecList[i]->GetPressLevel() == -1 ) continue;
|
|||
|
|
if( m_Press == Press_NoneSameCircle && hVecList[i]->m_Press == Press_NoneSameCircle ) continue;
|
|||
|
|
|
|||
|
|
ProcessPress( hVecList[i] );
|
|||
|
|
}
|
|||
|
|
m_iLastProcessPressCount = nCount;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::ProcessPress( DnActorHandle hTarget )
|
|||
|
|
{
|
|||
|
|
EtVector2 Dir;
|
|||
|
|
float Dist = 0.0f;
|
|||
|
|
bool bCheckPress = false;
|
|||
|
|
if( GetPress() == CDnActorState::Press_Circle && hTarget->GetPress() == CDnActorState::Press_Circle ) {
|
|||
|
|
if( CheckPressCircle2Clrcle2( GetMySmartPtr(), hTarget, Dir, Dist ) ) {
|
|||
|
|
hTarget->MoveToWorld( Dir * Dist );
|
|||
|
|
bCheckPress = true;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
else if( GetPress() == CDnActorState::Press_Capsule && hTarget->GetPress() == CDnActorState::Press_Capsule ) {
|
|||
|
|
if( CheckPressCapsule2Capsule2( GetMySmartPtr(), hTarget, Dir, Dist ) ) {
|
|||
|
|
hTarget->MoveToWorld( Dir * Dist );
|
|||
|
|
bCheckPress = true;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
else if( GetPress() == CDnActorState::Press_Capsule && hTarget->GetPress() == CDnActorState::Press_Circle ) {
|
|||
|
|
if( CheckPressCapsule2Circle2( GetMySmartPtr(), hTarget, Dir, Dist ) ) {
|
|||
|
|
hTarget->MoveToWorld( Dir * Dist );
|
|||
|
|
bCheckPress = true;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
else if( GetPress() == CDnActorState::Press_Circle && hTarget->GetPress() == CDnActorState::Press_Capsule ) {
|
|||
|
|
if( CheckPressCapsule2Circle2( hTarget, GetMySmartPtr(), Dir, Dist ) ) {
|
|||
|
|
hTarget->MoveToWorld( -Dir * Dist );
|
|||
|
|
bCheckPress = true;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if( bCheckPress ) {
|
|||
|
|
if( hTarget->IsPlayerActor() ) {
|
|||
|
|
CDnPlayerActor *pPlayer = (CDnPlayerActor *)hTarget.GetPointer();
|
|||
|
|
if( pPlayer->GetPlayerSpeedHackChecker() )
|
|||
|
|
((CDnPlayerSpeedHackChecker*)pPlayer->GetPlayerSpeedHackChecker())->SetCheckPress( true, Dist );
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
bool CDnActor::CheckPressCircle2Clrcle2( DnActorHandle hActor1, DnActorHandle hActor2, EtVector2 &Dir, float &Dist )
|
|||
|
|
{
|
|||
|
|
EtVector2 vDir;
|
|||
|
|
int nSumSize;
|
|||
|
|
vDir = EtVec3toVec2( *hActor2->GetPosition() - *hActor1->GetPosition() );
|
|||
|
|
nSumSize = hActor1->GetUnitSize() + hActor2->GetUnitSize();
|
|||
|
|
float fLength = D3DXVec2Length( &vDir );
|
|||
|
|
if( fLength > (float)nSumSize ) return false;
|
|||
|
|
|
|||
|
|
D3DXVec2Normalize( &Dir, &vDir );
|
|||
|
|
Dist = (float)( nSumSize - fLength );
|
|||
|
|
return true;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
bool CDnActor::CheckPressCapsule2Capsule2( DnActorHandle hActor1, DnActorHandle hActor2, EtVector2 &Dir, float &Dist )
|
|||
|
|
{
|
|||
|
|
// <20>ڽ<EFBFBD><DABD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ĸ<><C4B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ϰ<EFBFBD>(<28><><EFBFBD><EFBFBD>)
|
|||
|
|
int nSizeX = hActor1->GetUnitSizeParam1();
|
|||
|
|
int nSizeZ = hActor1->GetUnitSizeParam2();
|
|||
|
|
EtVector3 vCapsule1, vCapsule2;
|
|||
|
|
int nSumSize = 0;
|
|||
|
|
if( nSizeX < nSizeZ ) {
|
|||
|
|
vCapsule1.x = vCapsule2.x = vCapsule1.y = vCapsule2.y = 0.0f;
|
|||
|
|
vCapsule1.z = (float)(nSizeZ - nSizeX);
|
|||
|
|
vCapsule2.z = -vCapsule1.z;
|
|||
|
|
nSumSize += nSizeX;
|
|||
|
|
}
|
|||
|
|
else {
|
|||
|
|
vCapsule1.z = vCapsule2.z = vCapsule1.y = vCapsule2.y = 0.0f;
|
|||
|
|
vCapsule1.x = (float)(nSizeX - nSizeZ);
|
|||
|
|
vCapsule2.x = -vCapsule1.x;
|
|||
|
|
nSumSize += nSizeZ;
|
|||
|
|
}
|
|||
|
|
EtMatrix matWorld = *hActor1->GetMatEx();
|
|||
|
|
EtVec3TransformCoord( &vCapsule1, &vCapsule1, &matWorld );
|
|||
|
|
EtVec3TransformCoord( &vCapsule2, &vCapsule2, &matWorld );
|
|||
|
|
EtVector2 vLine1, vLine2;
|
|||
|
|
vLine1 = EtVec3toVec2( vCapsule1 );
|
|||
|
|
vLine2 = EtVec3toVec2( vCapsule2 );
|
|||
|
|
|
|||
|
|
// Ÿ<><C5B8><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ĸ<><C4B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ϰ<EFBFBD>(<28><><EFBFBD><EFBFBD>)
|
|||
|
|
int nTargetSizeX = hActor2->GetUnitSizeParam1();
|
|||
|
|
int nTargetSizeZ = hActor2->GetUnitSizeParam2();
|
|||
|
|
EtVector3 vTargetCapsule1, vTargetCapsule2;
|
|||
|
|
if( nTargetSizeX < nTargetSizeZ ) {
|
|||
|
|
vTargetCapsule1.x = vTargetCapsule2.x = vTargetCapsule1.y = vTargetCapsule2.y = 0.0f;
|
|||
|
|
vTargetCapsule1.z = (float)(nTargetSizeZ - nTargetSizeX);
|
|||
|
|
vTargetCapsule2.z = -vTargetCapsule1.z;
|
|||
|
|
nSumSize += nTargetSizeX;
|
|||
|
|
}
|
|||
|
|
else {
|
|||
|
|
vTargetCapsule1.z = vTargetCapsule2.z = vTargetCapsule1.y = vTargetCapsule2.y = 0.0f;
|
|||
|
|
vTargetCapsule1.x = (float)(nTargetSizeX - nTargetSizeZ);
|
|||
|
|
vTargetCapsule2.x = -vTargetCapsule1.x;
|
|||
|
|
nSumSize += nTargetSizeZ;
|
|||
|
|
}
|
|||
|
|
EtMatrix matTargetWorld = *hActor2->GetMatEx();
|
|||
|
|
EtVec3TransformCoord( &vTargetCapsule1, &vTargetCapsule1, &matTargetWorld );
|
|||
|
|
EtVec3TransformCoord( &vTargetCapsule2, &vTargetCapsule2, &matTargetWorld );
|
|||
|
|
EtVector2 vTargetLine1, vTargetLine2;
|
|||
|
|
vTargetLine1 = EtVec3toVec2( vTargetCapsule1 );
|
|||
|
|
vTargetLine2 = EtVec3toVec2( vTargetCapsule2 );
|
|||
|
|
|
|||
|
|
if( hActor1 == hActor2 ) return false;
|
|||
|
|
|
|||
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>Ÿ<EFBFBD><C5B8><EFBFBD> <20><><EFBFBD><EFBFBD> <20><>
|
|||
|
|
EtVector2 vPressDir;
|
|||
|
|
float fLength = DistLine2DToLine2D( vLine1, vLine2, vTargetLine1, vTargetLine2, vPressDir );
|
|||
|
|
if( fLength > 0.0f ) {
|
|||
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ʴ´ٸ<C2B4>, PressDir<69><72> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>̴<EFBFBD>.
|
|||
|
|
// <20><EFBFBD><D7B8><EFBFBD> <20>̶<EFBFBD> <20>Ϲ<EFBFBD><CFB9><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Ÿ<EFBFBD><C5B8><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> SumSize<7A><65> <20><><EFBFBD><EFBFBD><EFBFBD>Ǵ<EFBFBD><C7B4><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ѵ<EFBFBD>.
|
|||
|
|
if( fLength > (float)nSumSize ) return false;
|
|||
|
|
Dir = vPressDir;
|
|||
|
|
Dist = (float)( nSumSize - fLength );
|
|||
|
|
}
|
|||
|
|
else {
|
|||
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD>ϸ<EFBFBD>
|
|||
|
|
// ù<><C3B9>° <20><><EFBFBD>а<EFBFBD> <20>ι<EFBFBD>° <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Ÿ<EFBFBD><C5B8><EFBFBD> <20><> <20><>
|
|||
|
|
EtVector2 vDir1, vDir2;
|
|||
|
|
float fDist1 = DistPointToLine2D( vTargetLine1, vLine1, vLine2, vDir1 );
|
|||
|
|
float fDist2 = DistPointToLine2D( vTargetLine2, vLine1, vLine2, vDir2 );
|
|||
|
|
|
|||
|
|
// <20>Ÿ<EFBFBD><C5B8><EFBFBD> ª<><C2AA> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ݴ<EFBFBD><DDB4><EFBFBD> <20><><EFBFBD><EFBFBD>.
|
|||
|
|
if( fDist1 < fDist2 ) {
|
|||
|
|
vPressDir = -vDir1;
|
|||
|
|
fLength = fDist1;
|
|||
|
|
}
|
|||
|
|
else {
|
|||
|
|
vPressDir = -vDir2;
|
|||
|
|
fLength = fDist2;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD>Ѵٸ<D1B4> SumSize<7A><65><EFBFBD><EFBFBD> <20>Ÿ<EFBFBD><C5B8><EFBFBD> <20>ʿ<EFBFBD><CABF><EFBFBD><EFBFBD><EFBFBD>.
|
|||
|
|
// <20>̹<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ƴٸ<C6B4>, <20>ּҰŸ<D2B0><C5B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>о<D0BE><EEB3BB> <20><><EFBFBD><EFBFBD> <20>ܿ<EFBFBD> <20><><EFBFBD><EFBFBD>.
|
|||
|
|
Dir = vPressDir;
|
|||
|
|
Dist = (float)( nSumSize + fLength );
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
return true;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
bool CDnActor::CheckPressCapsule2Circle2( DnActorHandle hActor1, DnActorHandle hActor2, EtVector2 &Dir, float &Dist )
|
|||
|
|
{
|
|||
|
|
int nSizeX = hActor1->GetUnitSizeParam1();
|
|||
|
|
int nSizeZ = hActor1->GetUnitSizeParam2();
|
|||
|
|
EtVector3 vCapsule1, vCapsule2;
|
|||
|
|
int nSumSize;
|
|||
|
|
if( nSizeX < nSizeZ ) {
|
|||
|
|
vCapsule1.x = vCapsule2.x = vCapsule1.y = vCapsule2.y = 0.0f;
|
|||
|
|
vCapsule1.z = (float)(nSizeZ - nSizeX);
|
|||
|
|
vCapsule2.z = -vCapsule1.z;
|
|||
|
|
nSumSize = nSizeX + hActor2->GetUnitSize();
|
|||
|
|
}
|
|||
|
|
else {
|
|||
|
|
vCapsule1.z = vCapsule2.z = vCapsule1.y = vCapsule2.y = 0.0f;
|
|||
|
|
vCapsule1.x = (float)(nSizeX - nSizeZ);
|
|||
|
|
vCapsule2.x = -vCapsule1.x;
|
|||
|
|
nSumSize = nSizeZ + hActor2->GetUnitSize();
|
|||
|
|
}
|
|||
|
|
EtMatrix matWorld = *hActor1->GetMatEx();
|
|||
|
|
EtVec3TransformCoord( &vCapsule1, &vCapsule1, &matWorld );
|
|||
|
|
EtVec3TransformCoord( &vCapsule2, &vCapsule2, &matWorld );
|
|||
|
|
EtVector2 vLine1, vLine2;
|
|||
|
|
vLine1 = EtVec3toVec2( vCapsule1 );
|
|||
|
|
vLine2 = EtVec3toVec2( vCapsule2 );
|
|||
|
|
|
|||
|
|
EtVector2 vTargetPos = EtVec3toVec2( *hActor2->GetPosition() );
|
|||
|
|
EtVector2 vPressDir;
|
|||
|
|
float fLength = DistPointToLine2D( vTargetPos, vLine1, vLine2, vPressDir );
|
|||
|
|
if( fLength > (float)nSumSize ) return false;
|
|||
|
|
|
|||
|
|
Dir = vPressDir;
|
|||
|
|
Dist = (float)( nSumSize - fLength );
|
|||
|
|
return true;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
bool CDnActor::bIsObserver()
|
|||
|
|
{
|
|||
|
|
if( GetGameRoom() && GetGameRoom()->bIsPvPRoom() )
|
|||
|
|
{
|
|||
|
|
if( GetTeam() == PvPCommon::Team::Observer )
|
|||
|
|
return true;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
return false;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
float CDnActor::SquaredDistance( const EtVector3& vPos, const SAABox& BBox, bool bNear )
|
|||
|
|
{
|
|||
|
|
float fSQDist = 0.0f;
|
|||
|
|
|
|||
|
|
for( int i = 0; i < 3; ++i )
|
|||
|
|
{
|
|||
|
|
// y <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
|||
|
|
if( 1 == i )
|
|||
|
|
continue;
|
|||
|
|
|
|||
|
|
float v = vPos[ i ];
|
|||
|
|
|
|||
|
|
if( bNear ) {
|
|||
|
|
if( v < BBox.Min[ i ] )
|
|||
|
|
fSQDist += (BBox.Min[ i ] - v) * (BBox.Min[ i ] - v);
|
|||
|
|
|
|||
|
|
if( v > BBox.Max[ i ] )
|
|||
|
|
fSQDist += (v - BBox.Max[ i ]) * (v - BBox.Max[ i ]);
|
|||
|
|
}
|
|||
|
|
else {
|
|||
|
|
if( v > BBox.Min[ i ] )
|
|||
|
|
fSQDist += (BBox.Min[ i ] - v) * (BBox.Min[ i ] - v);
|
|||
|
|
|
|||
|
|
if( v < BBox.Max[ i ] )
|
|||
|
|
fSQDist += (v - BBox.Max[ i ]) * (v - BBox.Max[ i ]);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
return fSQDist;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
void CDnActor::CmdChangeTeam( int nTeam )
|
|||
|
|
{
|
|||
|
|
SetTeam( nTeam );
|
|||
|
|
|
|||
|
|
printf("CDnActor::CmdChangeTeam %d\n",nTeam);
|
|||
|
|
|
|||
|
|
char pBuffer[32];
|
|||
|
|
CPacketCompressStream Stream( pBuffer, sizeof(pBuffer) );
|
|||
|
|
Stream.Write( &m_nTeam, sizeof(int) );
|
|||
|
|
|
|||
|
|
Send( eActor::SC_CMDCHANGETEAM, &Stream );
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::OnHitFinish( LOCAL_TIME LocalTime, HitStruct *pStruct )
|
|||
|
|
{
|
|||
|
|
if( !pStruct->vSelfVelocity || !pStruct->vSelfResistance ) return;
|
|||
|
|
if( GetVelocity() == NULL || GetResistance() == NULL ) return;
|
|||
|
|
if( EtVec3LengthSq( pStruct->vSelfVelocity ) == 0.f && EtVec3LengthSq( pStruct->vSelfResistance ) == 0.f ) return;
|
|||
|
|
|
|||
|
|
EtVector3 vVelocity = *pStruct->vSelfVelocity;
|
|||
|
|
EtVector3 vResistance = *pStruct->vSelfResistance;
|
|||
|
|
|
|||
|
|
// y <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ִµ<D6B4> <20><><EFBFBD>⼭ <20><><EFBFBD><EFBFBD><EEBEBA><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD> y <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ش<EFBFBD>.
|
|||
|
|
if( GetVelocity()->y != 0.f && pStruct->vSelfVelocity->y == 0.f ) {
|
|||
|
|
vVelocity.y = GetVelocity()->y;
|
|||
|
|
vResistance.y = GetResistance()->y;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
CmdForceVelocity( vVelocity, vResistance );
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::CmdForceVelocity( EtVector3 &vVelocity, EtVector3 &vResistance )
|
|||
|
|
{
|
|||
|
|
SetVelocity( vVelocity );
|
|||
|
|
SetResistance( vResistance );
|
|||
|
|
|
|||
|
|
BYTE pBuffer[128];
|
|||
|
|
CPacketCompressStream Stream( pBuffer, 128 );
|
|||
|
|
|
|||
|
|
Stream.Write( GetPosition(), sizeof(EtVector3), CPacketCompressStream::VECTOR3_BIT );
|
|||
|
|
Stream.Write( ( GetVelocity() ) ? GetVelocity() : &EtVector3( 0.f, 0.f, 0.f ), sizeof(EtVector3), CPacketCompressStream::VECTOR3_BIT );
|
|||
|
|
Stream.Write( ( GetResistance() ) ? GetResistance() : &EtVector3( 0.f, 0.f, 0.f ), sizeof(EtVector3), CPacketCompressStream::VECTOR3_BIT );
|
|||
|
|
|
|||
|
|
Send( eActor::SC_CMDFORCEVELOCITY, &Stream );
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::CmdChatBalloon( LPCWSTR wszMessage )
|
|||
|
|
{
|
|||
|
|
BYTE pBuffer[128];
|
|||
|
|
CPacketCompressStream Stream( pBuffer, 128 );
|
|||
|
|
|
|||
|
|
int nLength = static_cast<int>(wcslen( wszMessage ) * 2);
|
|||
|
|
if( nLength > 120 ) nLength = 120;
|
|||
|
|
|
|||
|
|
Stream.Write( &nLength, sizeof(int) );
|
|||
|
|
Stream.Write( wszMessage, nLength );
|
|||
|
|
|
|||
|
|
Send( eActor::SC_CMDCHATBALLOON, &Stream );
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
#if defined(PRE_ADD_MULTILANGUAGE)
|
|||
|
|
void CDnActor::CmdChatBalloon( int nUIStringIndex )
|
|||
|
|
{
|
|||
|
|
BYTE pBuffer[128];
|
|||
|
|
CPacketCompressStream Stream( pBuffer, 128 );
|
|||
|
|
|
|||
|
|
Stream.Write( &nUIStringIndex, sizeof(int) );
|
|||
|
|
|
|||
|
|
Send( eActor::SC_CMDCHATBALLOON_AS_INDEX, &Stream );
|
|||
|
|
}
|
|||
|
|
#endif //#if defined(PRE_ADD_MULTILANGUAGE)
|
|||
|
|
|
|||
|
|
void CDnActor::CmdShowExposureInfo( bool bShow )
|
|||
|
|
{
|
|||
|
|
BYTE pBuffer[128];
|
|||
|
|
CPacketCompressStream Stream( pBuffer, 128 );
|
|||
|
|
|
|||
|
|
Stream.Write( &bShow, sizeof(bool) );
|
|||
|
|
|
|||
|
|
Send( eActor::SC_SHOWEXPOSUREINFO, &Stream );
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::CmdForceAddSkill( int nSkillID )
|
|||
|
|
{
|
|||
|
|
AddSkill( nSkillID );
|
|||
|
|
|
|||
|
|
BYTE pBuffer[128];
|
|||
|
|
CPacketCompressStream Stream( pBuffer, 128 );
|
|||
|
|
|
|||
|
|
Stream.Write( &nSkillID, sizeof(int) );
|
|||
|
|
Send( eActor::SC_FORCE_ADD_SKILL, &Stream );
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::CmdForceRemoveSkill( int nSkillId )
|
|||
|
|
{
|
|||
|
|
RemoveSkill( nSkillId );
|
|||
|
|
|
|||
|
|
BYTE pBuffer[128];
|
|||
|
|
CPacketCompressStream Stream( pBuffer, 128 );
|
|||
|
|
|
|||
|
|
Stream.Write( &nSkillId, sizeof(int) );
|
|||
|
|
Send( eActor::SC_FORCE_REMOVE_SKILL, &Stream );
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::OnProjectile( CDnProjectile *pProjectile, ProjectileStruct* pStruct, MatrixEx& LocalCross, int nSignalIndex )
|
|||
|
|
{
|
|||
|
|
int iShootActionIndex = GetElementIndex( GetCurrentAction() );
|
|||
|
|
|
|||
|
|
if( -1 != iShootActionIndex )
|
|||
|
|
pProjectile->SetShootActionIndex( iShootActionIndex );
|
|||
|
|
|
|||
|
|
pProjectile->SetSignalArrayIndex( nSignalIndex );
|
|||
|
|
|
|||
|
|
boost::shared_ptr<ProjectileStruct> pProjectileStruct = boost::shared_ptr<ProjectileStruct>(new ProjectileStruct);
|
|||
|
|
#ifdef PRE_FIX_MEMOPT_SIGNALH
|
|||
|
|
CopyShallow_ProjectileStruct(*pProjectileStruct, pStruct);
|
|||
|
|
#else
|
|||
|
|
*pProjectileStruct = *pStruct;
|
|||
|
|
#endif
|
|||
|
|
|
|||
|
|
pProjectile->SetProjectileSignal( pProjectileStruct );
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::CmdSyncBlow( CDNUserSession* pGameSession )
|
|||
|
|
{
|
|||
|
|
for( int i=0 ; i<GetNumAppliedStateBlow() ; ++i )
|
|||
|
|
{
|
|||
|
|
DnBlowHandle hBlow = GetAppliedStateBlow( i );
|
|||
|
|
if( hBlow )
|
|||
|
|
{
|
|||
|
|
const CDnSkill::SkillInfo* pSkillInfo = hBlow->GetParentSkillInfo();
|
|||
|
|
if( !pSkillInfo )
|
|||
|
|
{
|
|||
|
|
_DANGER_POINT();
|
|||
|
|
continue;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// #24143 <20>нú<D0BD> <20><><EFBFBD><EFBFBD> <20><>ų<EFBFBD><C5B3> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD> <20><><EFBFBD>쿣 <20><><EFBFBD>⸦ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ʽ<EFBFBD><CABD>ϴ<EFBFBD>.
|
|||
|
|
// <20>нú<D0BD> <20><>ų<EFBFBD><C5B3> Ŭ<><C5AC><EFBFBD>̾<EFBFBD>Ʈ<EFBFBD><C6AE> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20>ް<EFBFBD> <20>Ǵ<EFBFBD> <20>ٸ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ų<EFBFBD><C5B3><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE>
|
|||
|
|
// <20>ʱ<EFBFBD>ȭ <20>Ҷ<EFBFBD> <20>ڵ<EFBFBD><DAB5><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>˴ϴ<CBB4>.
|
|||
|
|
if( CDnSkill::Passive == pSkillInfo->eSkillType &&
|
|||
|
|
CDnSkill::Buff == pSkillInfo->eDurationType &&
|
|||
|
|
CDnSkill::ApplySelf == pSkillInfo->eTargetType )
|
|||
|
|
{
|
|||
|
|
continue;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
const CPacketCompressStream* pPacket = hBlow->GetPacketStream();
|
|||
|
|
Send( pGameSession, eActor::SC_CMDADDSTATEEFFECT, GetUniqueID(), const_cast<CPacketCompressStream*>(pPacket) );
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::OnDie( DnActorHandle hHitter )
|
|||
|
|
{
|
|||
|
|
m_fDieDelta = m_fMaxDieDelta;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::UseMP( int iMPDelta )
|
|||
|
|
{
|
|||
|
|
int iResult = m_pStateBlow->OnUseMP( iMPDelta );
|
|||
|
|
SetSP( GetSP() + iResult );
|
|||
|
|
|
|||
|
|
RequestHPMPDelta( ElementEnum::ElementEnum_Amount, iResult, UINT_MAX, true );
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::RequestDamageFromStateBlow( DnBlowHandle hFromBlow, int iDamage, CDnDamageBase::SHitParam* pHitParam/* = NULL*/ )
|
|||
|
|
{
|
|||
|
|
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF> <20>ɷ<EFBFBD><C9B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>.
|
|||
|
|
if( hFromBlow && false == IsAppliedThisStateBlow( STATE_BLOW::BLOW_099 ) )
|
|||
|
|
{
|
|||
|
|
// <20><><EFBFBD>̷<EFBFBD><CCB7><EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD> <20>ִ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ʾƾ<CABE> <20>Ѵ<EFBFBD>.
|
|||
|
|
float fDamage = (float)iDamage;
|
|||
|
|
if( IsAppliedThisStateBlow( STATE_BLOW::BLOW_143 ) )
|
|||
|
|
{
|
|||
|
|
// IsAppliedThisStateBlow() <20>Լ<EFBFBD><D4BC><EFBFBD><EFBFBD><EFBFBD> true <20><> <20><><EFBFBD>ϵ<EFBFBD><CFB5><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ӽð<D3BD><C3B0><EFBFBD> <20><> <20><>
|
|||
|
|
// <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD> GatherAppliedStateBlowByBlowIndex() <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD> <20><><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><> <20>ִ<EFBFBD>.
|
|||
|
|
DNVector( DnBlowHandle ) vlhHighLanderBlow;
|
|||
|
|
GatherAppliedStateBlowByBlowIndex( STATE_BLOW::BLOW_143, vlhHighLanderBlow );
|
|||
|
|
if( 0 < (int)vlhHighLanderBlow.size() )
|
|||
|
|
{
|
|||
|
|
CDnHighlanderBlow* pHighlanderBlow = static_cast<CDnHighlanderBlow*>(vlhHighLanderBlow.front().GetPointer());
|
|||
|
|
fDamage += pHighlanderBlow->CalcDamage( fDamage );
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
CDnSkill::SkillInfo* pParentSkillInfo = const_cast<CDnSkill::SkillInfo*>(hFromBlow->GetParentSkillInfo());
|
|||
|
|
DWORD dwHitterUniqueID = 0;
|
|||
|
|
ElementEnum eElement = ElementEnum::ElementEnum_Amount;
|
|||
|
|
if( pParentSkillInfo )
|
|||
|
|
{
|
|||
|
|
dwHitterUniqueID = pParentSkillInfo->hSkillUser ? pParentSkillInfo->hSkillUser->GetUniqueID() : -1;
|
|||
|
|
eElement = pParentSkillInfo->eSkillElement;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if( IsAppliedThisStateBlow( STATE_BLOW::BLOW_243 ) )
|
|||
|
|
{
|
|||
|
|
float fAbsorbDamage = 0.f;
|
|||
|
|
int nAbsorbSP = 0;
|
|||
|
|
|
|||
|
|
DNVector( DnBlowHandle ) vlhManaShieldBlow;
|
|||
|
|
GatherAppliedStateBlowByBlowIndex( STATE_BLOW::BLOW_243, vlhManaShieldBlow );
|
|||
|
|
for( DWORD n=0; n<vlhManaShieldBlow.size(); n++ )
|
|||
|
|
{
|
|||
|
|
CDnManaShieldBlow* pManShieldBlow = static_cast<CDnManaShieldBlow*>(vlhManaShieldBlow[n].GetPointer());
|
|||
|
|
pManShieldBlow->CalcManaShield( fDamage , fAbsorbDamage , nAbsorbSP );
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if( nAbsorbSP > GetSP() )
|
|||
|
|
{
|
|||
|
|
fAbsorbDamage -= (fAbsorbDamage * (nAbsorbSP - GetSP()) / nAbsorbSP);
|
|||
|
|
nAbsorbSP = GetSP();
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if( fAbsorbDamage > fDamage )
|
|||
|
|
fAbsorbDamage = fDamage;
|
|||
|
|
|
|||
|
|
fDamage -= fAbsorbDamage;
|
|||
|
|
SetSP( GetSP() -nAbsorbSP );
|
|||
|
|
RequestHPMPDelta( ElementEnum::ElementEnum_Amount, -nAbsorbSP, UINT_MAX, true , true );
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
#if defined(PRE_FIX_59347)
|
|||
|
|
//<2F><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>?<3F><> <20><><EFBFBD>ؼ<EFBFBD>
|
|||
|
|
#ifdef PRE_FIX_67656
|
|||
|
|
ApplyPartsDamage(fDamage, pParentSkillInfo->hSkillUser);
|
|||
|
|
#else
|
|||
|
|
if (GetApplyPartsDamage() == true)
|
|||
|
|
ApplyPartsDamage(fDamage, pParentSkillInfo->hSkillUser);
|
|||
|
|
#endif
|
|||
|
|
|
|||
|
|
//<2F>Ӽ<EFBFBD> ǥ<><C7A5>
|
|||
|
|
if (pHitParam)
|
|||
|
|
eElement = pHitParam->HasElement;
|
|||
|
|
#endif // PRE_FIX_59347
|
|||
|
|
|
|||
|
|
SetHP( GetHP()-(INT64)fDamage );
|
|||
|
|
#ifdef PRE_FIX_77172
|
|||
|
|
if( hFromBlow->GetBlowIndex() == STATE_BLOW::BLOW_042 )
|
|||
|
|
RequestHPMPDelta( eElement, -(INT64)fDamage, dwHitterUniqueID, false, true, pHitParam, true );
|
|||
|
|
else
|
|||
|
|
RequestHPMPDelta( eElement, -(INT64)fDamage, dwHitterUniqueID, false, true, pHitParam );
|
|||
|
|
#else // PRE_FIX_77172
|
|||
|
|
RequestHPMPDelta( eElement, -(INT64)fDamage, dwHitterUniqueID, false, true, pHitParam );
|
|||
|
|
#endif // PRE_FIX_77172
|
|||
|
|
|
|||
|
|
#ifdef PRE_ADD_EXPORT_DPS_INFORMATION
|
|||
|
|
if( CDnDPSReporter::IsActive() && pParentSkillInfo && pParentSkillInfo->hSkillUser && pParentSkillInfo->hSkillUser->IsPlayerActor() )
|
|||
|
|
{
|
|||
|
|
CDnPlayerActor* pPlayerActor = static_cast<CDnPlayerActor*>( pParentSkillInfo->hSkillUser.GetPointer());
|
|||
|
|
|
|||
|
|
if(CDnDPSReporter::GetInstance().IsEnabledUser( pPlayerActor->GetCharacterDBID() ))
|
|||
|
|
{
|
|||
|
|
CDnDPSReporter::GetInstance().StartReport();
|
|||
|
|
DNVector(DnActorHandle) hVecList;
|
|||
|
|
ScanActor( GetRoom(), *GetActorHandle()->GetPosition() , 500.f , hVecList );
|
|||
|
|
CDnDPSReporter::GetInstance().ApplyAreaMonsterCount( (int)hVecList.size() );
|
|||
|
|
CDnDPSReporter::GetInstance().ApplyDotDamageData( (int)fDamage , GetActorHandle() , hFromBlow );
|
|||
|
|
CDnDPSReporter::GetInstance().EndReport();
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
#endif
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::CmdFreezingPrisonDurablity(int nStateBlowID, float fDuabilityRate, bool bShowGauge)
|
|||
|
|
{
|
|||
|
|
BYTE pBuffer[128];
|
|||
|
|
CPacketCompressStream Stream( pBuffer, 128 );
|
|||
|
|
Stream.Write( &nStateBlowID, sizeof(nStateBlowID) );
|
|||
|
|
Stream.Write( &fDuabilityRate, sizeof(fDuabilityRate) );
|
|||
|
|
Stream.Write( &bShowGauge, sizeof(bShowGauge) );
|
|||
|
|
|
|||
|
|
Send( eActor::SC_FREEZINGPRISON_DURABILITY, &Stream );
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::SendRemoveStateEffectFromID( int nID )
|
|||
|
|
{
|
|||
|
|
char acBuffer[ 32 ];
|
|||
|
|
CPacketCompressStream Stream( acBuffer, sizeof(acBuffer) );
|
|||
|
|
Stream.Write( &nID, sizeof(nID) );
|
|||
|
|
|
|||
|
|
Send( eActor::SC_CMDREMOVESTATEEFFECTFROMID, &Stream );
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::RemoveResetStateBlow()
|
|||
|
|
{
|
|||
|
|
// [2010/12/15 semozz]
|
|||
|
|
// <20><> <20>Լ<EFBFBD> ȣ<><C8A3><EFBFBD>Ŀ<EFBFBD> <20><><EFBFBD>ο<EFBFBD> <20><><EFBFBD><EFBFBD> ȿ<><C8BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ü<EFBFBD>Ǿ<EFBFBD><C7BE><EFBFBD> <20>ϱ<CFB1><E2B6A7><EFBFBD><EFBFBD>
|
|||
|
|
// <20><><EFBFBD>⼭<EFBFBD><E2BCAD> <20>ٷ<EFBFBD> <20><><EFBFBD><EFBFBD> ȿ<><C8BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ؾ<EFBFBD><D8BE>Ѵ<EFBFBD>.
|
|||
|
|
|
|||
|
|
std::map<int, int>::iterator iter = m_vlStateBlowIDToRemove.begin();
|
|||
|
|
for (; iter != m_vlStateBlowIDToRemove.end(); ++iter)
|
|||
|
|
{
|
|||
|
|
//<2F><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF> <20><><EFBFBD><EFBFBD> <20>ϰ<EFBFBD>
|
|||
|
|
m_pStateBlow->RemoveImediatlyStateEffectFromID(iter->second);
|
|||
|
|
|
|||
|
|
//Ŭ<><C5AC><EFBFBD>̾<EFBFBD>Ʈ<EFBFBD><C6AE> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF> <20><><EFBFBD><EFBFBD> <20><>Ŷ <20><><EFBFBD><EFBFBD>.
|
|||
|
|
SendRemoveStateEffectFromID(iter->second);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
m_vlStateBlowIDToRemove.clear();
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
void CDnActor::ForceKnockBack(DnActorHandle hHitter, CDnDamageBase::SHitParam& HitParam)
|
|||
|
|
{
|
|||
|
|
m_HitParam = HitParam;
|
|||
|
|
|
|||
|
|
int nSeed = CRandom::Seed(GetRoom());
|
|||
|
|
_srand( GetRoom(), nSeed );
|
|||
|
|
|
|||
|
|
CDnWeapon::HitTypeEnum HitType = CDnWeapon::Normal;
|
|||
|
|
|
|||
|
|
//////////////////////////////////////////////////////////////////////////
|
|||
|
|
// <20><><EFBFBD><EFBFBD> <20>ð<EFBFBD> <20><><EFBFBD><EFBFBD>
|
|||
|
|
float fStiffResult = 0.f;
|
|||
|
|
if( GetStiffResistance() > 0 ) fStiffResult = ( hHitter->GetStiff() * m_HitParam.fStiffProb ) / GetStiffResistance();
|
|||
|
|
fStiffResult *= CGlobalWeightTable::GetInstance().GetValue( CGlobalWeightTable::StiffRevision );
|
|||
|
|
|
|||
|
|
if( fStiffResult <= 0.f ) fStiffResult = 0.05f;
|
|||
|
|
else if( fStiffResult > CGlobalWeightTable::GetInstance().GetValue( CGlobalWeightTable::StiffMax ) )
|
|||
|
|
fStiffResult = CGlobalWeightTable::GetInstance().GetValue( CGlobalWeightTable::StiffMax );
|
|||
|
|
|
|||
|
|
m_fStiffDelta = s_fMaxStiffTime * fStiffResult;
|
|||
|
|
|
|||
|
|
//////////////////////////////////////////////////////////////////////////
|
|||
|
|
|
|||
|
|
//////////////////////////////////////////////////////////////////////////
|
|||
|
|
// <20>ٿ<EFBFBD><D9BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
|||
|
|
if( !IsDown() ) {
|
|||
|
|
m_fLastDownRatio = 1.f;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
float fTemp = ( 3.f * ( 1.f - GetDownDelayProb() ) ) * m_fLastDownRatio;
|
|||
|
|
int nTemp = (int)( fTemp * DOWN_DELAY_RANDOM_RANGE * 100.f );
|
|||
|
|
if( nTemp == 0 ) m_fDownDelta = fTemp;
|
|||
|
|
else m_fDownDelta = fTemp - DOWN_DELAY_RANDOM_RANGE + ( _rand(GetRoom())%( nTemp * 2 ) / 100.f );
|
|||
|
|
if( m_fDownDelta >= 3.f ) m_fDownDelta = 3.f;
|
|||
|
|
if( m_fDownDelta <= 0.1f ) m_fDownDelta = 0.01f;
|
|||
|
|
//////////////////////////////////////////////////////////////////////////
|
|||
|
|
|
|||
|
|
m_HitParam.HitType = HitType;
|
|||
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
|||
|
|
switch( HitType )
|
|||
|
|
{
|
|||
|
|
case CDnWeapon::Normal:
|
|||
|
|
case CDnWeapon::Critical:
|
|||
|
|
case CDnWeapon::Stun:
|
|||
|
|
case CDnWeapon::CriticalRes:
|
|||
|
|
{
|
|||
|
|
// <20><><EFBFBD>Կ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>ӵ<EFBFBD> <20>ٿ<EFBFBD><D9BF>ش<EFBFBD>.
|
|||
|
|
if( GetWeight() > 0.f )
|
|||
|
|
m_HitParam.vVelocity.y /= GetWeight();
|
|||
|
|
if( GetWeight() > 1.f )
|
|||
|
|
{
|
|||
|
|
float fTemp = m_HitParam.vVelocity.z;
|
|||
|
|
float fTest = CalcMovement( fTemp, 1.f, FLT_MAX, FLT_MIN, m_HitParam.vResistance.z );
|
|||
|
|
if( m_HitParam.vVelocity.z * fTest > 0.f )
|
|||
|
|
{
|
|||
|
|
m_HitParam.vVelocity.x /= powf( 1.1f, GetWeight() );
|
|||
|
|
m_HitParam.vVelocity.z /= powf( 1.1f, GetWeight() );
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
bool bSuccessNormalDamage = true;
|
|||
|
|
int nSuperAmmorTime = 0;
|
|||
|
|
|
|||
|
|
m_HitParam.bSuccessNormalDamage = bSuccessNormalDamage;
|
|||
|
|
m_HitParam.nSuperAmmorDelay = nSuperAmmorTime;
|
|||
|
|
|
|||
|
|
memset( m_nSkillSuperAmmorValue, 0, sizeof(m_nSkillSuperAmmorValue) );
|
|||
|
|
OnBreakSkillSuperAmmor( m_HitParam );
|
|||
|
|
|
|||
|
|
if( bSuccessNormalDamage ) {
|
|||
|
|
CheckDamageVelocity( hHitter );
|
|||
|
|
|
|||
|
|
// <20>¾<EFBFBD><C2BE><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ұ͵<D2B0> <20><><EFBFBD><EFBFBD>
|
|||
|
|
MAMovementBase *pMovement = GetMovement();
|
|||
|
|
if( pMovement ) {
|
|||
|
|
pMovement->ResetMove();
|
|||
|
|
pMovement->ResetLook();
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if( !m_HitParam.szActionName.empty() ) {
|
|||
|
|
SetActionQueue( m_HitParam.szActionName.c_str(), 0, 3.f, 0.f, false );
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
break;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
INT64 nDamage = 0;
|
|||
|
|
|
|||
|
|
RequestDamage(hHitter, nSeed, nDamage);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::RemoveNonAvailableStateBlow()
|
|||
|
|
{
|
|||
|
|
if (NULL == m_pStateBlow)
|
|||
|
|
return;
|
|||
|
|
|
|||
|
|
CDNGameRoom* pGameRoom = static_cast<CDNGameRoom*>(GetRoom());
|
|||
|
|
CDNUserSession *pUserSession = pGameRoom ? pGameRoom->GetUserSession(GetSessionID()) : NULL;
|
|||
|
|
|
|||
|
|
if (!pUserSession)
|
|||
|
|
return;
|
|||
|
|
|
|||
|
|
const TMapInfo* pMapData = g_pDataManager->GetMapInfo( pUserSession->GetMapIndex() );
|
|||
|
|
if (!pMapData)
|
|||
|
|
return;
|
|||
|
|
|
|||
|
|
//<2F><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ŵ
|
|||
|
|
if (GlobalEnum::MAP_WORLDMAP == pMapData->MapType)
|
|||
|
|
return;
|
|||
|
|
|
|||
|
|
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> AllowType<70><65> <20><><EFBFBD><EFBFBD> <20>´<EFBFBD>..
|
|||
|
|
int nAllowMapType = pMapData->nAllowMapType;
|
|||
|
|
|
|||
|
|
|
|||
|
|
int nSize = m_pStateBlow->GetNumStateBlow();
|
|||
|
|
for ( int i = 0 ; i < nSize ; i++ )
|
|||
|
|
{
|
|||
|
|
DnBlowHandle hBlow = m_pStateBlow->GetStateBlow(i);
|
|||
|
|
|
|||
|
|
if( hBlow && STATE_BLOW::STATE_END != hBlow->GetBlowState() )
|
|||
|
|
{
|
|||
|
|
//<2F><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ų<EFBFBD><C5B3> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ȯ<><C8AE><EFBFBD>ؼ<EFBFBD>
|
|||
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ƾ<EFBFBD><C6BE><EFBFBD> ID<49><44> <20><><EFBFBD><EFBFBD> <20>´<EFBFBD>.
|
|||
|
|
const CDnSkill::SkillInfo* pSkillInfo = hBlow->GetParentSkillInfo();
|
|||
|
|
if (pSkillInfo && pSkillInfo->bIsItemSkill)
|
|||
|
|
{
|
|||
|
|
int nItemID = pSkillInfo->nItemID;
|
|||
|
|
|
|||
|
|
const TItemData* pItemData = g_pDataManager->GetItemData(nItemID);
|
|||
|
|
if (pItemData)
|
|||
|
|
{
|
|||
|
|
//<2F><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> AllowMapType<70><65> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> AllowMapType <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ٸ<EFBFBD><D9B8>ٸ<EFBFBD>
|
|||
|
|
if ((nAllowMapType & pItemData->nAllowMapType) == 0)
|
|||
|
|
{
|
|||
|
|
CmdRemoveStateEffectFromID(hBlow->GetBlowID());
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::RemovedActivatedStateBlow( bool bIgnoreItemSkill )
|
|||
|
|
{
|
|||
|
|
if (NULL == m_pStateBlow)
|
|||
|
|
return;
|
|||
|
|
|
|||
|
|
CDNGameRoom* pGameRoom = static_cast<CDNGameRoom*>(GetRoom());
|
|||
|
|
CDNUserSession *pUserSession = pGameRoom ? pGameRoom->GetUserSession(GetSessionID()) : NULL;
|
|||
|
|
|
|||
|
|
if (!pUserSession)
|
|||
|
|
return;
|
|||
|
|
|
|||
|
|
int nSize = m_pStateBlow->GetNumStateBlow();
|
|||
|
|
for ( int i = 0 ; i < nSize ; i++ )
|
|||
|
|
{
|
|||
|
|
DnBlowHandle hBlow = m_pStateBlow->GetStateBlow(i);
|
|||
|
|
|
|||
|
|
if( hBlow && STATE_BLOW::STATE_END != hBlow->GetBlowState() )
|
|||
|
|
{
|
|||
|
|
const CDnSkill::SkillInfo* pSkillInfo = hBlow->GetParentSkillInfo();
|
|||
|
|
if( bIgnoreItemSkill == true && pSkillInfo && pSkillInfo->bIsItemSkill )
|
|||
|
|
continue;
|
|||
|
|
|
|||
|
|
if ( hBlow->IsFromSourceItem() )
|
|||
|
|
continue;
|
|||
|
|
|
|||
|
|
if( hBlow->IsEternity() )
|
|||
|
|
continue;
|
|||
|
|
|
|||
|
|
if ( !bIsPassiveSkill( hBlow ) )
|
|||
|
|
{
|
|||
|
|
CmdRemoveStateEffectFromID(hBlow->GetBlowID());
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::FindSkillBySkillType(CDnSkill::SkillTypeEnum eSkillType, DNVector(DnSkillHandle)& vlSkillList)
|
|||
|
|
{
|
|||
|
|
#ifndef PRE_FIX_SKILLLIST
|
|||
|
|
for( DWORD i=0; i<m_vlhSkillList.size(); i++ )
|
|||
|
|
{
|
|||
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD>̳<EFBFBD> <20><><EFBFBD><EFBFBD> <20><>ų<EFBFBD>̶<EFBFBD><CCB6><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
|||
|
|
DnSkillHandle hSkill = m_vlhSkillList.at(i);
|
|||
|
|
if(!hSkill)
|
|||
|
|
continue;
|
|||
|
|
|
|||
|
|
if (eSkillType == hSkill->GetSkillType())
|
|||
|
|
vlSkillList.push_back(hSkill);
|
|||
|
|
}
|
|||
|
|
#else
|
|||
|
|
DWORD dwNumSkill = GetSkillCount();
|
|||
|
|
for( DWORD i = 0; i < dwNumSkill; ++i )
|
|||
|
|
{
|
|||
|
|
DnSkillHandle hSkill = GetSkillFromIndex( i );
|
|||
|
|
if( !hSkill )
|
|||
|
|
continue;
|
|||
|
|
|
|||
|
|
if( eSkillType == hSkill->GetSkillType() )
|
|||
|
|
vlSkillList.push_back( hSkill );
|
|||
|
|
}
|
|||
|
|
#endif // #ifndef PRE_FIX_SKILLLIST
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::OnLoopAction( float fFrame, float fPrevFrame )
|
|||
|
|
{
|
|||
|
|
/*
|
|||
|
|
if( m_nActionIndex == -1 || m_nVecAniIndexList[m_nActionIndex] == -1 ) return;
|
|||
|
|
MAActorRenderBase *pRenderBase = static_cast<MAActorRenderBase *>(this);
|
|||
|
|
if( !pRenderBase ) return;
|
|||
|
|
|
|||
|
|
ActionElementStruct *pStruct = GetElement( m_nActionIndex );
|
|||
|
|
|
|||
|
|
EtVector3 vDist;
|
|||
|
|
pRenderBase->CalcAniDistance( m_nVecAniIndexList[m_nActionIndex], min( (float)pStruct->dwLength, fFrame ), fPrevFrame, vDist );
|
|||
|
|
pRenderBase->AddAniDistance( vDist );
|
|||
|
|
*/
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::CmdUpdateStateBlow(int nBlowID)
|
|||
|
|
{
|
|||
|
|
BYTE pBuffer[128];
|
|||
|
|
CPacketCompressStream Stream( pBuffer, 128 );
|
|||
|
|
DWORD dwUniqueID = GetUniqueID();
|
|||
|
|
Stream.Write( &dwUniqueID, sizeof(dwUniqueID) );
|
|||
|
|
Stream.Write( &nBlowID, sizeof(nBlowID) );
|
|||
|
|
|
|||
|
|
Send( eActor::SC_CMDUPDATESTATEBLOW, &Stream );
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::CmdFinishAuraSkill(DWORD nSkillID)
|
|||
|
|
{
|
|||
|
|
BYTE pBuffer[128];
|
|||
|
|
CPacketCompressStream Stream( pBuffer, 128 );
|
|||
|
|
DWORD dwUniqueID = GetUniqueID();
|
|||
|
|
Stream.Write( &dwUniqueID, sizeof(dwUniqueID) );
|
|||
|
|
Stream.Write( &nSkillID, sizeof(nSkillID) );
|
|||
|
|
|
|||
|
|
Send( eActor::SC_FINISH_AURASKILL, &Stream );
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
bool CDnActor::IsImmuned(STATE_BLOW::emBLOW_INDEX blowIndex)
|
|||
|
|
{
|
|||
|
|
CDnStateBlow *pStateBlow = GetStateBlow();
|
|||
|
|
if (!pStateBlow)
|
|||
|
|
return false;
|
|||
|
|
|
|||
|
|
return pStateBlow->IsImmuned(blowIndex);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::SetAction( const char *szActionName, float fFrame, float fBlendFrame, bool bLoop /* = false */ )
|
|||
|
|
{
|
|||
|
|
CDnActionBase::SetAction( CheckChangeActionBlow( szActionName ), fFrame, fBlendFrame, bLoop );
|
|||
|
|
|
|||
|
|
//<2F><><EFBFBD><EFBFBD> <20>ٲ<EFBFBD><D9B2><EFBFBD> HitLimitCount<6E><74><EFBFBD><EFBFBD> <20>ʱ<EFBFBD>ȭ
|
|||
|
|
m_HitLimitCountInfoList.clear();
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
const char *CDnActor::CheckChangeActionBlow( const char *szActionName )
|
|||
|
|
{
|
|||
|
|
const char *szResultActionName = szActionName;
|
|||
|
|
// Move <20>ǵ<D7BC> <20>ٲ<EFBFBD><D9B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD> <20><>¿ <20><> <20><><EFBFBD><EFBFBD> SetAction <20>Լ<EFBFBD><D4BC><EFBFBD> <20><><EFBFBD><EFBFBD>... <20>Ф<EFBFBD>
|
|||
|
|
// 129<32><39> <20><EFBFBD> <20≯<EFBFBD> <20><>ü <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF> ///////////////////////////////////////////////////////////////////
|
|||
|
|
if( m_pStateBlow->IsApplied( STATE_BLOW::BLOW_129 ) )
|
|||
|
|
{
|
|||
|
|
DNVector(DnBlowHandle) vlhChangeActionSetBlow;
|
|||
|
|
m_pStateBlow->GetStateBlowFromBlowIndex( STATE_BLOW::BLOW_129, vlhChangeActionSetBlow );
|
|||
|
|
|
|||
|
|
// <20><EFBFBD> <20><> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20>ִ<EFBFBD>.
|
|||
|
|
int iNumBlow = (int)vlhChangeActionSetBlow.size();
|
|||
|
|
for( int i = 0; i < iNumBlow; ++i )
|
|||
|
|
{
|
|||
|
|
if( !vlhChangeActionSetBlow[i] )
|
|||
|
|
continue;
|
|||
|
|
|
|||
|
|
CDnChangeActionSetBlow* pChangeActionSetBlow = static_cast<CDnChangeActionSetBlow*>( vlhChangeActionSetBlow.at(i).GetPointer() );
|
|||
|
|
if( STATE_BLOW::STATE_END != pChangeActionSetBlow->GetBlowState() )
|
|||
|
|
{
|
|||
|
|
CDnChangeActionStrProcessor* pProcessor = pChangeActionSetBlow->GetChangeActionStrProcessor();
|
|||
|
|
if( pProcessor )
|
|||
|
|
{
|
|||
|
|
// <20><><EFBFBD>Ӽ<EFBFBD><D3BC><EFBFBD> <20><><EFBFBD><EFBFBD> Ȯ<>ο<EFBFBD>.
|
|||
|
|
string strNowActionName( szResultActionName );
|
|||
|
|
const char* pChangeActionName = pProcessor->GetChangeActionName( strNowActionName );
|
|||
|
|
if( pChangeActionName )
|
|||
|
|
szResultActionName = pChangeActionName;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// 121<32><31> <20><><EFBFBD>ĵ<EFBFBD> <20><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD> <20>ִ<EFBFBD> <20><><EFBFBD><EFBFBD>. <20>ش<EFBFBD> <20><EFBFBD><D7BC><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>. ///////////////////////////
|
|||
|
|
if( m_pStateBlow->IsApplied( STATE_BLOW::BLOW_121 ) )
|
|||
|
|
{
|
|||
|
|
if( 0 == strcmp(szResultActionName, "Stand") )
|
|||
|
|
{
|
|||
|
|
DNVector(DnBlowHandle) vlhChangeStandActionBlow;
|
|||
|
|
m_pStateBlow->GetStateBlowFromBlowIndex( STATE_BLOW::BLOW_121, vlhChangeStandActionBlow );
|
|||
|
|
if( false == vlhChangeStandActionBlow.empty() )
|
|||
|
|
{
|
|||
|
|
_ASSERT( 1 == vlhChangeStandActionBlow.size() );
|
|||
|
|
if( STATE_BLOW::STATE_END != vlhChangeStandActionBlow.front()->GetBlowState() )
|
|||
|
|
szResultActionName = vlhChangeStandActionBlow.front()->GetValue();
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
return szResultActionName;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::ForceBeginStateBlow(DnBlowHandle hBlow)
|
|||
|
|
{
|
|||
|
|
if (hBlow)
|
|||
|
|
{
|
|||
|
|
hBlow->OnBegin( CDnActionBase::m_LocalTime, 0.0f );
|
|||
|
|
OnBeginStateBlow( hBlow );
|
|||
|
|
|
|||
|
|
// <20><><EFBFBD>ٷ<EFBFBD> end <20><> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> blow <20><> <20>ֱ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> üũ.
|
|||
|
|
if( STATE_BLOW::STATE_END != hBlow->GetBlowState() )
|
|||
|
|
hBlow->SetState( STATE_BLOW::STATE_DURATION );
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
bool CDnActor::CanUsePrefixSkill()
|
|||
|
|
{
|
|||
|
|
bool isCanUse = false;
|
|||
|
|
|
|||
|
|
// <20><>Ÿ<EFBFBD>̰ų<CCB0> <20><>ų<EFBFBD><C5B3> <20><><EFBFBD>ξ<EFBFBD> <20><>ų <20>ߵ<EFBFBD> <20>÷<EFBFBD><C3B7>װ<EFBFBD> <20><><EFBFBD><EFBFBD> <20>Ǿ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ߵ<EFBFBD><DFB5><EFBFBD>. [2011/01/31 semozz]
|
|||
|
|
// [2011/02/11 semozz]
|
|||
|
|
// <20><><EFBFBD>ξ<EFBFBD> <20><>ų <20>ߵ<EFBFBD> <20>÷<EFBFBD><C3B7><EFBFBD> üũ<C3BC><C5A9><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
|||
|
|
// [2011/03/14 semozz]
|
|||
|
|
// <20><>ŷ<EFBFBD><C5B7><EFBFBD>ٽ<EFBFBD><D9BD><EFBFBD> <20><>ų<EFBFBD><C5B3> ChangeStandAction<6F><6E><EFBFBD><EFBFBD> ȿ<><C8BF><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>Ǿ<EFBFBD> <20>־ m_hProcessSkill<6C><6C> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ų <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>̴<EFBFBD>.
|
|||
|
|
// ChangeStandAction<6F><6E><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>Ÿ<EFBFBD><C5B8> <20>ƴϴ<C6B4>..<2E><><EFBFBD><EFBFBD> <20>ϴ<EFBFBD><CFB4><EFBFBD> <20>Ǵ<EFBFBD><C7B4>Ѵ<EFBFBD>..
|
|||
|
|
// <20><><EFBFBD>ξ<EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ȵ<EFBFBD> [2011/03/23 semozz]
|
|||
|
|
|
|||
|
|
isCanUse = (false == IsProcessSkill() && //<2F><>Ÿ
|
|||
|
|
!IsAppliedThisStateBlow(STATE_BLOW::BLOW_121) && !IsAppliedThisStateBlow(STATE_BLOW::BLOW_129) && //<2F><>ŷ<EFBFBD><C5B7><EFBFBD>ٽ<EFBFBD><D9BD><EFBFBD>
|
|||
|
|
!IsAppliedThisStateBlow(STATE_BLOW::BLOW_183) //<2F><><EFBFBD>ξ<EFBFBD> <20><><EFBFBD><EFBFBD>
|
|||
|
|
/* || IsPrefixTriggerSkill()*/);
|
|||
|
|
|
|||
|
|
return isCanUse;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::AddStateBlowSignal(DnBlowHandle hBlow)
|
|||
|
|
{
|
|||
|
|
if (m_pStateBlowSignalProcessor && hBlow)
|
|||
|
|
m_pStateBlowSignalProcessor->AddBlow(hBlow);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::RemoveStateBlowSignal(DnBlowHandle hBlow)
|
|||
|
|
{
|
|||
|
|
if (m_pStateBlowSignalProcessor && hBlow)
|
|||
|
|
m_pStateBlowSignalProcessor->RemoveBlow(hBlow);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::ReserveStealMagicBuff(DnActorHandle hActor, CDnSkill::SkillInfo *pSkillInfo, int nDurationTime, STATE_BLOW::emBLOW_INDEX blowIndex, const char* szValue)
|
|||
|
|
{
|
|||
|
|
StateBlowInfo newBlowInfo;
|
|||
|
|
newBlowInfo.blowIndex = blowIndex;
|
|||
|
|
newBlowInfo.strValue = szValue ? szValue : "";
|
|||
|
|
|
|||
|
|
STEAL_MAGIC_BUFF_INFO_LIST::iterator findIter = m_StealMagicBuffAddList.find(hActor);
|
|||
|
|
if (findIter != m_StealMagicBuffAddList.end())
|
|||
|
|
{
|
|||
|
|
findIter->second.stateBlowList.push_back(newBlowInfo);
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
StealMagicBuffInfo newInfo;
|
|||
|
|
newInfo.nDurationTime = nDurationTime;
|
|||
|
|
if (pSkillInfo)
|
|||
|
|
newInfo.skillInfo = *pSkillInfo;
|
|||
|
|
|
|||
|
|
newInfo.stateBlowList.push_back(newBlowInfo);
|
|||
|
|
|
|||
|
|
m_StealMagicBuffAddList.insert(STEAL_MAGIC_BUFF_INFO_LIST::value_type(hActor, newInfo));
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::UpdateStealMagicBuff()
|
|||
|
|
{
|
|||
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ƿ<EFBFBD><C6BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD> <20>ִٸ<D6B4> <20><><EFBFBD><EFBFBD><EFBFBD>ϰ<EFBFBD>..
|
|||
|
|
if (!m_StealMagicBuffList.empty())
|
|||
|
|
{
|
|||
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD> <20><>ƿ<EFBFBD><C6BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>Ѵ<EFBFBD>.
|
|||
|
|
STEAL_MAGIC_BUFF_LIST::iterator firstIter = m_StealMagicBuffList.begin();
|
|||
|
|
if (firstIter != m_StealMagicBuffList.end())
|
|||
|
|
{
|
|||
|
|
std::list<int>::iterator iter = firstIter->second.begin();
|
|||
|
|
for (; iter != firstIter->second.end(); )
|
|||
|
|
{
|
|||
|
|
int nBlowID = (*iter);
|
|||
|
|
|
|||
|
|
std::map<int, int>::iterator findIter = m_RemovedStealMagicStateBlowIDList.find(nBlowID);
|
|||
|
|
if (findIter != m_RemovedStealMagicStateBlowIDList.end())
|
|||
|
|
{
|
|||
|
|
iter = firstIter->second.erase(iter);
|
|||
|
|
continue;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
++iter;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
m_RemovedStealMagicStateBlowIDList.clear();
|
|||
|
|
|
|||
|
|
//<2F><>ƿ<EFBFBD><C6BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF> <20><><EFBFBD><EFBFBD><EFBFBD>Ȱ<EFBFBD> <20><><EFBFBD>ٸ<EFBFBD> <20>dzʶٰ<CAB6>...
|
|||
|
|
if (m_StealMagicBuffAddList.empty())
|
|||
|
|
return;
|
|||
|
|
|
|||
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ƿ<EFBFBD><C6BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD> <20>ִٸ<D6B4> <20><><EFBFBD><EFBFBD><EFBFBD>ϰ<EFBFBD>..
|
|||
|
|
if (!m_StealMagicBuffList.empty())
|
|||
|
|
{
|
|||
|
|
//<2F><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>Ǿ<EFBFBD> <20>ִ<EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF> <20><><EFBFBD><EFBFBD> <20>Ѵ<EFBFBD>..
|
|||
|
|
STEAL_MAGIC_BUFF_LIST::iterator firstIter = m_StealMagicBuffList.begin();
|
|||
|
|
if (firstIter != m_StealMagicBuffList.end())
|
|||
|
|
{
|
|||
|
|
std::list<int>::iterator iter = firstIter->second.begin();
|
|||
|
|
std::list<int>::iterator endIter = firstIter->second.end();
|
|||
|
|
for (; iter != endIter; ++iter)
|
|||
|
|
{
|
|||
|
|
int nBlowID = (*iter);
|
|||
|
|
|
|||
|
|
//<2F><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF> <20><><EFBFBD><EFBFBD> <20>ϰ<EFBFBD>
|
|||
|
|
m_pStateBlow->RemoveImediatlyStateEffectFromID(nBlowID);
|
|||
|
|
|
|||
|
|
//Ŭ<><C5AC><EFBFBD>̾<EFBFBD>Ʈ<EFBFBD><C6AE> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF> <20><><EFBFBD><EFBFBD> <20><>Ŷ <20><><EFBFBD><EFBFBD>.
|
|||
|
|
SendRemoveStateEffectFromID(nBlowID);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
firstIter->second.clear();
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
m_StealMagicBuffList.clear();
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ƿ<EFBFBD><C6BF><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF> <20><><EFBFBD><EFBFBD>
|
|||
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD>ϰ<EFBFBD> <20>ϳ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>..
|
|||
|
|
int nCount = (int)m_StealMagicBuffAddList.size();
|
|||
|
|
int nSelectIndex = rand() % nCount;
|
|||
|
|
|
|||
|
|
STEAL_MAGIC_BUFF_INFO_LIST::iterator selectedIter = m_StealMagicBuffAddList.begin();
|
|||
|
|
for (int i = 0; i < nSelectIndex; ++i)
|
|||
|
|
++selectedIter;
|
|||
|
|
|
|||
|
|
if (selectedIter != m_StealMagicBuffAddList.end())
|
|||
|
|
{
|
|||
|
|
StealMagicBuffInfo &buffInfo = selectedIter->second;
|
|||
|
|
|
|||
|
|
STATE_BLOW_INFO_LIST::iterator iter = selectedIter->second.stateBlowList.begin();
|
|||
|
|
STATE_BLOW_INFO_LIST::iterator endIter = selectedIter->second.stateBlowList.end();
|
|||
|
|
|
|||
|
|
for (; iter != endIter; ++iter)
|
|||
|
|
{
|
|||
|
|
int nBlowID = CmdAddStateEffect(&buffInfo.skillInfo, iter->blowIndex, buffInfo.nDurationTime, iter->strValue.c_str(), false, false);
|
|||
|
|
|
|||
|
|
AddStealMagicStateBlow(buffInfo.skillInfo.iSkillID, nBlowID);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
m_StealMagicBuffAddList.clear();
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::AddStealMagicStateBlow(int nSkillID, int nBlowID)
|
|||
|
|
{
|
|||
|
|
STEAL_MAGIC_BUFF_LIST::iterator findIter = m_StealMagicBuffList.find(nSkillID);
|
|||
|
|
if (findIter != m_StealMagicBuffList.end())
|
|||
|
|
{
|
|||
|
|
findIter->second.push_back(nBlowID);
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
std::list<int> blowIDList;
|
|||
|
|
blowIDList.push_back(nBlowID);
|
|||
|
|
|
|||
|
|
m_StealMagicBuffList.insert(STEAL_MAGIC_BUFF_LIST::value_type(nSkillID, blowIDList));
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::RemoveStealMagicStateBlow(int nDeletedBlowID)
|
|||
|
|
{
|
|||
|
|
//<2F><>ƿ<EFBFBD><C6BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>߰<EFBFBD><DFB0><EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ִٸ<D6B4>
|
|||
|
|
if (!m_StealMagicBuffList.empty())
|
|||
|
|
{
|
|||
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD>Ϳ<EFBFBD><CDBF><EFBFBD><EFBFBD><EFBFBD> <20><>ƿ<EFBFBD><C6BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ϱ<CFB1><E2B6A7><EFBFBD><EFBFBD> begin<69><6E> <20>ִ°<C2B0> Ȯ<><C8AE>..
|
|||
|
|
STEAL_MAGIC_BUFF_LIST::iterator firstIter = m_StealMagicBuffList.begin();
|
|||
|
|
if (firstIter != m_StealMagicBuffList.end())
|
|||
|
|
{
|
|||
|
|
std::list<int>::iterator iter = firstIter->second.begin();
|
|||
|
|
std::list<int>::iterator endIter = firstIter->second.end();
|
|||
|
|
for (; iter != firstIter->second.end(); )
|
|||
|
|
{
|
|||
|
|
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD>ŵǴ<C5B5> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD> BlowID<49><44> <20><><EFBFBD><EFBFBD> <20>༮<EFBFBD><E0BCAE> <20>߰<EFBFBD> <20>ϸ<EFBFBD> <20><><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>Ѵ<EFBFBD>.
|
|||
|
|
if (nDeletedBlowID == (*iter))
|
|||
|
|
{
|
|||
|
|
m_RemovedStealMagicStateBlowIDList.insert(std::map<int, int>::value_type(nDeletedBlowID, nDeletedBlowID));
|
|||
|
|
break;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
++iter;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
void CDnActor::OnEndStateBlow( DnBlowHandle hBlow )
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
//<2F><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF> <20><><EFBFBD><EFBFBD> <20>ɶ<EFBFBD> <20><>ƿ<EFBFBD><C6BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD≯<EFBFBD> <20><><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ϱ<EFBFBD> <20><><EFBFBD><EFBFBD> <20>ڵ<EFBFBD>
|
|||
|
|
if (!hBlow)
|
|||
|
|
return;
|
|||
|
|
|
|||
|
|
int nDeletedBlowID = hBlow->GetBlowID();
|
|||
|
|
RemoveStealMagicStateBlow(nDeletedBlowID);
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
#ifdef PRE_ADD_MONSTER_CATCH
|
|||
|
|
bool CDnActor::CatchCalcSuperArmor( DnActorHandle hCatcherActor, int iSuperArmorDamage )
|
|||
|
|
{
|
|||
|
|
bool bResult = false;
|
|||
|
|
|
|||
|
|
// <20><><EFBFBD>۾Ƹ<DBBE> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϰ<EFBFBD> 0 <20><><EFBFBD>ϸ<EFBFBD> <20><><EFBFBD><EFBFBD>.
|
|||
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϰ<EFBFBD> <20><><EFBFBD>۾ƸӰ<C6B8> <20><><EFBFBD><EFBFBD><EFBFBD>ִٸ<D6B4> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ϰ<EFBFBD> <20>н<EFBFBD>. <20><><EFBFBD><EFBFBD> <20><><EFBFBD>۾ƸӴ<C6B8> 0<><30> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
|||
|
|
m_nSkillSuperAmmorValue[ 0 ] -= iSuperArmorDamage;
|
|||
|
|
if( m_nSkillSuperAmmorValue[ 0 ] < 0 )
|
|||
|
|
{
|
|||
|
|
bResult = true;
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
// <20>켱 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD>.
|
|||
|
|
//// <20><><EFBFBD><EFBFBD> <20>Ƹӷ<C6B8> <20><><EFBFBD><EFBFBD>.
|
|||
|
|
//int iSuperArmorTime = m_nSkillSuperAmmorTime;
|
|||
|
|
//int iDelay = (int)( iSuperArmorTime * ( m_fStiffDelta / s_fMaxStiffTime ) );
|
|||
|
|
//if( iDelay > 0 )
|
|||
|
|
//{
|
|||
|
|
// SetPlaySpeed( (DWORD)( iSuperArmorTime * ( m_fStiffDelta / s_fMaxStiffTime ) ), 0.03f );
|
|||
|
|
//}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
return bResult;
|
|||
|
|
}
|
|||
|
|
#endif // #ifdef PRE_ADD_MONSTER_CATCH
|
|||
|
|
|
|||
|
|
bool CDnActor::CheckCollisionHitCondition(const EtVector3& vObjPos, const MatrixEx& objCross, EtVector3 &vTargetPos, float angleAllow)
|
|||
|
|
{
|
|||
|
|
EtVector3 vDir = vTargetPos - vObjPos;
|
|||
|
|
vDir.y = 0.f;
|
|||
|
|
|
|||
|
|
EtVec3Normalize(&vDir, &vDir);
|
|||
|
|
|
|||
|
|
EtVector3 vZVec = objCross.m_vZAxis;
|
|||
|
|
float fDeg = EtToDegree(acos(EtVec3Dot(&vZVec, &vDir)));
|
|||
|
|
if (fDeg > angleAllow)
|
|||
|
|
return false;
|
|||
|
|
|
|||
|
|
return true;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
DnMonsterActorHandle CDnActor::FindOldSummonMonster(const SummonMonsterStruct* pSummonMonsterStruct)
|
|||
|
|
{
|
|||
|
|
DnMonsterActorHandle hSelectedSummon;
|
|||
|
|
|
|||
|
|
LOCAL_TIME tempTime = 0x7FFFFFFFFFFFFFFF;
|
|||
|
|
if( 0 < pSummonMonsterStruct->nGroupID )
|
|||
|
|
{
|
|||
|
|
if( 0 < m_mapSummonMonsterByGroup.count( pSummonMonsterStruct->nGroupID ) )
|
|||
|
|
{
|
|||
|
|
std::list<DnMonsterActorHandle>& listSummonedGroupMonster = m_mapSummonMonsterByGroup[ pSummonMonsterStruct->nGroupID ];
|
|||
|
|
for( std::list<DnMonsterActorHandle>::iterator itor=listSummonedGroupMonster.begin(); itor!=listSummonedGroupMonster.end(); ++itor)
|
|||
|
|
{
|
|||
|
|
DnMonsterActorHandle hMonster = *itor;
|
|||
|
|
|
|||
|
|
//Group<75><70> <20><><EFBFBD><EFBFBD><EFBFBD>Ǿ<EFBFBD> <20>ִ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> MonsterID<49><44> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ʰ<EFBFBD> <20>쳻<D7B7><ECB3BB> <20>ִ<EFBFBD> <20><>ȯ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>߿<EFBFBD><DFBF><EFBFBD> <20><>ȯ <20>ð<EFBFBD><C3B0><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>༮<EFBFBD><E0BCAE> <20><><EFBFBD><EFBFBD> <20>ϵ<EFBFBD><CFB5><EFBFBD> <20>Ѵ<EFBFBD>.
|
|||
|
|
if (!hMonster)
|
|||
|
|
continue;
|
|||
|
|
|
|||
|
|
LOCAL_TIME requestSummonTime = hMonster->GetRequestSummonTime();
|
|||
|
|
if( requestSummonTime < tempTime)
|
|||
|
|
{
|
|||
|
|
hSelectedSummon = hMonster;
|
|||
|
|
tempTime = requestSummonTime;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
for( std::list<DnMonsterActorHandle>::iterator itor=m_listSummonMonster.begin() ; itor!=m_listSummonMonster.end(); ++itor)
|
|||
|
|
{
|
|||
|
|
DnMonsterActorHandle hMonster = *itor;
|
|||
|
|
if (!hMonster || hMonster->GetMonsterClassID() != pSummonMonsterStruct->MonsterID)
|
|||
|
|
continue;
|
|||
|
|
|
|||
|
|
LOCAL_TIME requestSummonTime = hMonster->GetRequestSummonTime();
|
|||
|
|
if( requestSummonTime < tempTime)
|
|||
|
|
{
|
|||
|
|
hSelectedSummon = hMonster;
|
|||
|
|
tempTime = requestSummonTime;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
return hSelectedSummon;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::RequestActionChange(int nActionIndex)
|
|||
|
|
{
|
|||
|
|
BYTE pBuffer[ 16 ];
|
|||
|
|
CPacketCompressStream Stream( pBuffer, 16 );
|
|||
|
|
|
|||
|
|
Stream.Write( &nActionIndex, sizeof(int) );
|
|||
|
|
|
|||
|
|
Send( eActor::SC_ACTION_CHANGE, &Stream );
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
const std::list<DnMonsterActorHandle>& CDnActor::GetSummonedMonsterList( void )
|
|||
|
|
{
|
|||
|
|
for( std::list<DnMonsterActorHandle>::iterator itor=m_listSummonMonster.begin() ; itor!=m_listSummonMonster.end() ; )
|
|||
|
|
{
|
|||
|
|
if( !(*itor) )
|
|||
|
|
{
|
|||
|
|
itor = m_listSummonMonster.erase( itor );
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
++itor;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
return m_listSummonMonster;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
const std::map<int, std::list<DnMonsterActorHandle> >& CDnActor::GetGroupingSummonedMonsterList( void )
|
|||
|
|
{
|
|||
|
|
map<int, list<DnMonsterActorHandle> >::iterator iter = m_mapSummonMonsterByGroup.begin();
|
|||
|
|
for( iter; iter != m_mapSummonMonsterByGroup.end(); ++iter )
|
|||
|
|
{
|
|||
|
|
list<DnMonsterActorHandle>& listSummonedMonsters = iter->second;
|
|||
|
|
list<DnMonsterActorHandle>::iterator iterList = listSummonedMonsters.begin();
|
|||
|
|
for( iterList; iterList != listSummonedMonsters.end(); )
|
|||
|
|
{
|
|||
|
|
if( !(*iterList) )
|
|||
|
|
{
|
|||
|
|
iterList = listSummonedMonsters.erase( iterList );
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
++iterList;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
return m_mapSummonMonsterByGroup;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::SendChainAttackProjectile(DnActorHandle hRootAttacker, DWORD dwPrevAttackerActorUniqueID, int iActionIndex, int iProjectileSignalArrayIndex, DnActorHandle hActorToAttack, int iSkillID)
|
|||
|
|
{
|
|||
|
|
if (!hRootAttacker || !hActorToAttack)
|
|||
|
|
return;
|
|||
|
|
|
|||
|
|
BYTE pBuffer[ 256 ];
|
|||
|
|
CPacketCompressStream Stream( pBuffer, 256 );
|
|||
|
|
|
|||
|
|
//
|
|||
|
|
DWORD dwRootAttackerID = hRootAttacker->GetUniqueID();
|
|||
|
|
DWORD dwActorToAttackID = hActorToAttack->GetUniqueID();
|
|||
|
|
|
|||
|
|
Stream.Write(&dwRootAttackerID, sizeof(DWORD));
|
|||
|
|
Stream.Write(&dwPrevAttackerActorUniqueID, sizeof(DWORD));
|
|||
|
|
Stream.Write(&dwActorToAttackID, sizeof(DWORD));
|
|||
|
|
|
|||
|
|
Stream.Write(&iActionIndex, sizeof(int));
|
|||
|
|
Stream.Write(&iProjectileSignalArrayIndex, sizeof(int));
|
|||
|
|
Stream.Write(&iSkillID, sizeof(int));
|
|||
|
|
|
|||
|
|
Send( eActor::SC_CHAINATTACK_PROJECTILE, &Stream );
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::RemoveStateEffectByHitSignal(HitStruct* pHitStruct)
|
|||
|
|
{
|
|||
|
|
if (NULL == pHitStruct)
|
|||
|
|
return;
|
|||
|
|
|
|||
|
|
//RemoveStateIndex<65><78><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><>û<EFBFBD><C3BB><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> RemoveStateIndex<65><78> <20><><EFBFBD><EFBFBD> <20>ϵ<EFBFBD><CFB5><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
|||
|
|
#if defined(PRE_FIX_51988)
|
|||
|
|
if (pHitStruct->szRemoveStateIndexList == NULL)
|
|||
|
|
return;
|
|||
|
|
#else
|
|||
|
|
if (pHitStruct->RemoveStateIndex == 0 && pHitStruct->szRemoveStateIndexList == NULL)
|
|||
|
|
return;
|
|||
|
|
#endif // PRE_FIX_51988
|
|||
|
|
|
|||
|
|
#if defined(PRE_FIX_51988)
|
|||
|
|
std::string str = pHitStruct->szRemoveStateIndexList ? pHitStruct->szRemoveStateIndexList : "";
|
|||
|
|
#else
|
|||
|
|
std::string str = FormatA("%d;%s", pHitStruct->RemoveStateIndex, pHitStruct->szRemoveStateIndexList ? pHitStruct->szRemoveStateIndexList : "");
|
|||
|
|
#endif // PRE_FIX_51988
|
|||
|
|
std::vector<std::string> tokens;
|
|||
|
|
std::string delimiters = ";";
|
|||
|
|
|
|||
|
|
//1. <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF> <20>ε<EFBFBD><CEB5><EFBFBD> <20><><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
|||
|
|
TokenizeA(str, tokens, delimiters);
|
|||
|
|
for (int i = 0; i < (int)tokens.size(); ++i)
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
STATE_BLOW::emBLOW_INDEX eBlowIndex = (STATE_BLOW::emBLOW_INDEX)(atoi(tokens[i].c_str()));
|
|||
|
|
|
|||
|
|
if (eBlowIndex == STATE_BLOW::emBLOW_INDEX::BLOW_NONE)
|
|||
|
|
continue;
|
|||
|
|
|
|||
|
|
//<2F><>Ŷ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>...
|
|||
|
|
SendRemoveStateEffect(eBlowIndex);
|
|||
|
|
|
|||
|
|
//<2F><><EFBFBD>⼭<EFBFBD><E2BCAD> <20><><EFBFBD><EFBFBD> <20>ٷ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>...
|
|||
|
|
m_pStateBlow->RemoveImediatlyStateEffectByBlowIndex(eBlowIndex);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
bool CDnActor::ProcessIgnoreHitSignal()
|
|||
|
|
{
|
|||
|
|
bool bIgnoreHitSignal = false;
|
|||
|
|
DnBlowHandle hIgnoreHitSignalBlow;
|
|||
|
|
if (IsAppliedThisStateBlow(STATE_BLOW::BLOW_228))
|
|||
|
|
{
|
|||
|
|
DNVector(DnBlowHandle) vecBlowList;
|
|||
|
|
GatherAppliedStateBlowByBlowIndex(STATE_BLOW::BLOW_228, vecBlowList);
|
|||
|
|
for (int i = 0; i < (int)vecBlowList.size(); ++i)
|
|||
|
|
{
|
|||
|
|
DnBlowHandle hBlow = vecBlowList[i];
|
|||
|
|
if (hBlow && hBlow->CanBegin())
|
|||
|
|
{
|
|||
|
|
bIgnoreHitSignal = true;
|
|||
|
|
hIgnoreHitSignalBlow = hBlow;
|
|||
|
|
break;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
//<2F><>Ʈ <20>ñ׳<C3B1> <20><><EFBFBD>ð<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Ǹ<EFBFBD> <20>ش<EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF> <20><><EFBFBD><EFBFBD>Ʈ ǥ<>ÿ<EFBFBD> <20><>Ŷ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>̻<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ó<><C3B3> <20><><EFBFBD>ϵ<EFBFBD><CFB5><EFBFBD> <20>Ѵ<EFBFBD>.
|
|||
|
|
if (hIgnoreHitSignalBlow && bIgnoreHitSignal == true)
|
|||
|
|
{
|
|||
|
|
BYTE pBuffer[128];
|
|||
|
|
CPacketCompressStream Stream( pBuffer, 128 );
|
|||
|
|
|
|||
|
|
DWORD dwUniqueID = GetUniqueID();
|
|||
|
|
STATE_BLOW::emBLOW_INDEX stateBlowIndex = hIgnoreHitSignalBlow->GetBlowIndex();
|
|||
|
|
bool bShowEffect = true;
|
|||
|
|
|
|||
|
|
Stream.Write( &dwUniqueID, sizeof(dwUniqueID) );
|
|||
|
|
Stream.Write( &stateBlowIndex, sizeof(stateBlowIndex));
|
|||
|
|
Stream.Write( &bShowEffect, sizeof(bShowEffect));
|
|||
|
|
|
|||
|
|
Send(eActor::SC_SHOW_STATE_EFFECT, &Stream);
|
|||
|
|
|
|||
|
|
return true;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
return false;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
bool CDnActor::ProcessIgnoreGravitySignal()
|
|||
|
|
{
|
|||
|
|
bool bIgnoreGravitySignal = false;
|
|||
|
|
if( IsAppliedThisStateBlow( STATE_BLOW::BLOW_273 ) )
|
|||
|
|
{
|
|||
|
|
DNVector(DnBlowHandle) vecBlowList;
|
|||
|
|
GatherAppliedStateBlowByBlowIndex( STATE_BLOW::BLOW_273, vecBlowList );
|
|||
|
|
for( int i=0; i<(int)vecBlowList.size(); ++i )
|
|||
|
|
{
|
|||
|
|
DnBlowHandle hBlow = vecBlowList[i];
|
|||
|
|
if( hBlow && hBlow->CanBegin() )
|
|||
|
|
{
|
|||
|
|
bIgnoreGravitySignal = true;
|
|||
|
|
break;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
return bIgnoreGravitySignal;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::AddSkillStateEffect(DnSkillHandle hSkill)
|
|||
|
|
{
|
|||
|
|
m_ApplySkillStateEffectList.push_back(hSkill);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::ApplySkillStateEffect()
|
|||
|
|
{
|
|||
|
|
if (m_ApplySkillStateEffectList.empty())
|
|||
|
|
return;
|
|||
|
|
|
|||
|
|
std::vector<DnSkillHandle>::iterator iter = m_ApplySkillStateEffectList.begin();
|
|||
|
|
for (; iter != m_ApplySkillStateEffectList.end(); ++iter)
|
|||
|
|
{
|
|||
|
|
DnSkillHandle hSkill = *(iter);
|
|||
|
|
if (hSkill)
|
|||
|
|
{
|
|||
|
|
DWORD stateCount = hSkill->GetStateEffectCount();
|
|||
|
|
CDnStateBlow *pStateBlow = GetStateBlow();
|
|||
|
|
const CDnSkill::SkillInfo* skillInfo = hSkill->GetInfo();
|
|||
|
|
if (pStateBlow)
|
|||
|
|
{
|
|||
|
|
for (DWORD dwIndex = 0; dwIndex < stateCount; ++dwIndex)
|
|||
|
|
{
|
|||
|
|
CDnSkill::StateEffectStruct *pStateEffect = hSkill->GetStateEffectFromIndex(dwIndex);
|
|||
|
|
if (pStateEffect == NULL || pStateEffect->ApplyType != CDnSkill::StateEffectApplyType::ApplySelf)
|
|||
|
|
continue;
|
|||
|
|
|
|||
|
|
CDnSkill::CanApply eResult = CDnSkill::CanApply::Apply;
|
|||
|
|
eResult = pStateBlow->CanApplySkillStateEffect(skillInfo, *pStateEffect);
|
|||
|
|
|
|||
|
|
if (CDnSkill::CanApply::Fail != eResult)
|
|||
|
|
{
|
|||
|
|
RemoveResetStateBlow();
|
|||
|
|
|
|||
|
|
int nBlowID = CmdAddStateEffect( skillInfo, (STATE_BLOW::emBLOW_INDEX)pStateEffect->nID,
|
|||
|
|
pStateEffect->nDurationTime, pStateEffect->szValue.c_str(), false, false );
|
|||
|
|
|
|||
|
|
//<2F><><EFBFBD><EFBFBD> <20>ð<EFBFBD><C3B0><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><>ų<EFBFBD><C5B3> <20><><EFBFBD><EFBFBD>.
|
|||
|
|
if (-1 != nBlowID && pStateEffect->nDurationTime == -1)
|
|||
|
|
{
|
|||
|
|
hSkill->AddSignalApplyNoPacketStateEffectHandle(nBlowID);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
m_ApplySkillStateEffectList.clear();
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::SendProbInvincibleSuccess( void )
|
|||
|
|
{
|
|||
|
|
BYTE pBuffer[ 4 ] = { 0 };
|
|||
|
|
CPacketCompressStream Stream( pBuffer, 4 );
|
|||
|
|
|
|||
|
|
Send( eActor::SC_PROBINVINCIBLE_SUCCESS, &Stream );
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
EtVector3 CDnActor::FindAutoTargetPos()
|
|||
|
|
{
|
|||
|
|
EtVector3 vTargetPosition = *GetPosition();
|
|||
|
|
|
|||
|
|
if( !m_FindAutoTargetName.empty())
|
|||
|
|
{
|
|||
|
|
int nBoneIndex = GetBoneIndex( m_FindAutoTargetName.c_str() );
|
|||
|
|
if( nBoneIndex != -1 )
|
|||
|
|
{
|
|||
|
|
EtMatrix boneMatrix = GetBoneMatrix(m_FindAutoTargetName.c_str());
|
|||
|
|
vTargetPosition = *(EtVector3*)&boneMatrix._41;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
return vTargetPosition;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::ApplyStateEffectSignalProcess( const S_NO_PACKET_SELF_STATEBLOW &StateBlowInfo, ApplyStateEffectStruct* pStruct )
|
|||
|
|
{
|
|||
|
|
// StateBlow<6F><77> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> Ȯ<><C8AE> <20><><EFBFBD><EFBFBD> [2010/11/11 semozz]
|
|||
|
|
if (false == StateBlowInfo.bUsed)
|
|||
|
|
{
|
|||
|
|
CDnSkill::CanApply eResult = CDnSkill::CanApply::Apply;
|
|||
|
|
|
|||
|
|
// [2010/11/11 semozz]
|
|||
|
|
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD>ϵǾ<CFB5> <20>ִ<EFBFBD> <20><>ų<EFBFBD><C5B3> StateBlow<6F><77> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ȯ<><C8AE> <20><> CmdAddStateEffect<63><74> ȣ<><C8A3> <20>ؾ<EFBFBD> <20>Ѵ<EFBFBD>.
|
|||
|
|
// CDnSkill<6C><6C> OnBegin<69><6E><EFBFBD><EFBFBD> üũ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD> ȣ<><C8A3> <20><><EFBFBD><EFBFBD> <20>ٸ<EFBFBD> StateBlow<6F><77> <20><><EFBFBD><EFBFBD> <20>Ǿ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20>ִ<EFBFBD>.
|
|||
|
|
// #20008<30><38> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>ÿ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>̷<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD>.
|
|||
|
|
eResult = m_pStateBlow->CanApplySkillStateEffect(&StateBlowInfo.ParentSkillInfo, StateBlowInfo.StateEffect);
|
|||
|
|
|
|||
|
|
if( CDnSkill::CanApply::Fail != eResult )
|
|||
|
|
{
|
|||
|
|
// [2010/12/08 semozz]
|
|||
|
|
// <20><>ų <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> CanApplySkillStateEffect<63>Լ<EFBFBD><D4BC><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><>ų <20><><EFBFBD>µ<EFBFBD> <20><><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>͵<EFBFBD><CDB5><EFBFBD>
|
|||
|
|
// <20><><EFBFBD>⼭ <20><><EFBFBD><EFBFBD> <20>Ѵ<EFBFBD>.
|
|||
|
|
RemoveResetStateBlow();
|
|||
|
|
|
|||
|
|
// Note <20>ѱ<EFBFBD>: <20><>ų<EFBFBD><C5B3> <20>ߵ<EFBFBD><DFB5><EFBFBD> <20>ÿ<EFBFBD> <20>ڽſ<DABD><C5BF><EFBFBD> <20><>ų <20><EFBFBD> <20>ð<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ɸ<EFBFBD><C9B8><EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD>
|
|||
|
|
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ų <20><>ü<EFBFBD><C3BC> <20>˰<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD> <20><>ų <20><>ü<EFBFBD><C3BC><EFBFBD><EFBFBD> nopacket <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF>. <20><><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> <20>־<EFBFBD><D6BE>ش<EFBFBD>.
|
|||
|
|
// nopacket <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD> Ŭ<><C5AC><EFBFBD>̾<EFBFBD>Ʈ<EFBFBD><C6AE><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ų<EFBFBD><C5B3> <20><><EFBFBD><EFBFBD><EFBFBD>Ǹ<EFBFBD> <20>˾Ƽ<CBBE> <20>߰<EFBFBD><DFB0>ϰ<EFBFBD> <20><><EFBFBD>ش<EFBFBD>.
|
|||
|
|
// <20>׳<EFBFBD> <20>ڽſ<DABD><C5BF><EFBFBD> <20>Ŵ<EFBFBD> <20><><EFBFBD><EFBFBD> <20>Ŵ<EFBFBD> <20><><EFBFBD>ӽð<D3BD><C3B0><EFBFBD> <20>ִ<EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD> <20><><EFBFBD>ӽð<D3BD><C3B0><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD> <20>ð<EFBFBD> <20><> <20>Ǹ<EFBFBD>
|
|||
|
|
// <20>˾Ƽ<CBBE> <20><><EFBFBD>ŵǹǷ<C7B9> <20><><EFBFBD><EFBFBD> <20>ý<EFBFBD><C3BD><EFBFBD><EFBFBD><EFBFBD> <20>״<EFBFBD><D7B4><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ؼ<EFBFBD> CmdAddStateEffect <20><>Ų<EFBFBD><C5B2>. <20><>Ŷ<EFBFBD><C5B6> <20>˾Ƽ<CBBE> <20><><EFBFBD><EFBFBD>. <20><> <20><><EFBFBD>쿣 Ŭ<><EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF> <20>ߵ<EFBFBD><DFB5><EFBFBD>Ű<EFBFBD><C5B0> <20>ʰ<EFBFBD>
|
|||
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>Ŷ<EFBFBD><C5B6> <20><><EFBFBD>ٸ<EFBFBD><D9B8><EFBFBD>.
|
|||
|
|
if( StateBlowInfo.StateEffect.ApplyType == CDnSkill::ApplySelf &&
|
|||
|
|
StateBlowInfo.StateEffect.nDurationTime == -1 /*&& // <20><><EFBFBD><EFBFBD>/<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>/<2F><><EFBFBD><EFBFBD> <20><><EFBFBD> <20><> <20><> <20>ֱ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.
|
|||
|
|
CDnSkill::Instantly == StateBlowInfo.ParentSkillInfo.eDurationType*/ )
|
|||
|
|
{
|
|||
|
|
// [2010/12/09 semozz]
|
|||
|
|
// <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF> <20>߰<EFBFBD> <20><>Ŷ<EFBFBD><C5B6> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Ѵ<EFBFBD>.
|
|||
|
|
int iBlowID = CmdAddStateEffect( &StateBlowInfo.ParentSkillInfo, (STATE_BLOW::emBLOW_INDEX)StateBlowInfo.StateEffect.nID,
|
|||
|
|
StateBlowInfo.StateEffect.nDurationTime, StateBlowInfo.StateEffect.szValue.c_str() );
|
|||
|
|
|
|||
|
|
if( -1 != iBlowID )
|
|||
|
|
{
|
|||
|
|
if( m_hProcessSkill )
|
|||
|
|
{
|
|||
|
|
//_ASSERT( m_hProcessSkill && -1 != iBlowID );
|
|||
|
|
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF> (30<33><30>)<29><> <20><><EFBFBD>ӽð<D3BD><C3B0><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ǿ<EFBFBD><C7BE><EFBFBD><EFBFBD>Ƿ<EFBFBD> <20><><EFBFBD>ܷ<EFBFBD> <20><><EFBFBD> <20>߰<EFBFBD><DFB0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ʴ´<CAB4>.
|
|||
|
|
// <20>߰<EFBFBD> <20><>Ű<EFBFBD><C5B0> <20><EFBFBD><D7BC><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. 2010.09.20
|
|||
|
|
if( !((-1 == StateBlowInfo.StateEffect.nDurationTime) &&
|
|||
|
|
(STATE_BLOW::BLOW_030 == StateBlowInfo.StateEffect.nID)) )
|
|||
|
|
m_hProcessSkill->AddSignalApplyNoPacketStateEffectHandle( iBlowID );
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
if( m_hAuraSkill && CDnSkill::Aura == StateBlowInfo.ParentSkillInfo.eDurationType )
|
|||
|
|
{
|
|||
|
|
m_hAuraSkill->AddSignalApplyNoPacketStateEffectHandle( iBlowID );
|
|||
|
|
}
|
|||
|
|
#ifdef _DEBUG
|
|||
|
|
else
|
|||
|
|
_ASSERT( !"<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȿ<EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ñ׳<C3B1> Ÿ<>̹<EFBFBD> <20>߰<EFBFBD> <20><><EFBFBD><EFBFBD>!!" );
|
|||
|
|
#endif
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
// <20><><EFBFBD>ӽð<D3BD><C3B0><EFBFBD> <20>ִ<EFBFBD> self <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF>
|
|||
|
|
int iBlowID = CmdAddStateEffect( &StateBlowInfo.ParentSkillInfo, (STATE_BLOW::emBLOW_INDEX)StateBlowInfo.StateEffect.nID,
|
|||
|
|
StateBlowInfo.StateEffect.nDurationTime, StateBlowInfo.StateEffect.szValue.c_str() );
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
// <20><>ų <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>¸<EFBFBD><C2B8><EFBFBD>Ʈ <20>ʱ<EFBFBD>ȭ [2010/12/09 semozz]
|
|||
|
|
InitStateBlowIDToRemove();
|
|||
|
|
|
|||
|
|
// <20><>ų <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ص<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ѱɷ<D1B0> <20>ؾ<EFBFBD><D8BE>ϴ<EFBFBD><CFB4><EFBFBD><EFBFBD><EFBFBD> Ȯ<><C8AE> <20>غ<EFBFBD><D8BA><EFBFBD> <20>ҵ<EFBFBD> [2010/11/11 semozz]
|
|||
|
|
const_cast<S_NO_PACKET_SELF_STATEBLOW&>(StateBlowInfo).Used();
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
OutputDebug( "[Error!!] <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF> <20><><EFBFBD><EFBFBD> <20>ñ׳ο<D7B3><CEBF><EFBFBD> <20>̹<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF> <20>ε<EFBFBD><CEB5><EFBFBD>(%d) <20><><EFBFBD><EFBFBD>!!\n", pStruct->StateEffectIndex );
|
|||
|
|
_ASSERT( !"<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȿ<EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ñ׳ο<D7B3><CEBF><EFBFBD> <20>̹<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF> <20>ε<EFBFBD><CEB5><EFBFBD> <20><><EFBFBD><EFBFBD>!!" );
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
#if defined(PRE_FIX_51048)
|
|||
|
|
void CDnActor::RemoveDebufAction(LOCAL_TIME LocalTime, float fDelta)
|
|||
|
|
{
|
|||
|
|
//Freezing
|
|||
|
|
if( IsAppliedThisStateBlow( STATE_BLOW::BLOW_041 ) )
|
|||
|
|
{
|
|||
|
|
DNVector(DnBlowHandle) vlBlows;
|
|||
|
|
GetStateBlow()->GetStateBlowFromBlowIndex( STATE_BLOW::BLOW_041, vlBlows );
|
|||
|
|
|
|||
|
|
int nBlowCount = (int)vlBlows.size();
|
|||
|
|
for (int i = 0; i < nBlowCount; ++i)
|
|||
|
|
{
|
|||
|
|
DnBlowHandle hBlow = vlBlows[i];
|
|||
|
|
if (hBlow)
|
|||
|
|
hBlow->RemoveDebufAction(LocalTime, fDelta);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
//Frostbite
|
|||
|
|
if( IsAppliedThisStateBlow( STATE_BLOW::BLOW_144 ) )
|
|||
|
|
{
|
|||
|
|
DNVector(DnBlowHandle) vlBlows;
|
|||
|
|
GetStateBlow()->GetStateBlowFromBlowIndex( STATE_BLOW::BLOW_144, vlBlows );
|
|||
|
|
|
|||
|
|
int nBlowCount = (int)vlBlows.size();
|
|||
|
|
for (int i = 0; i < nBlowCount; ++i)
|
|||
|
|
{
|
|||
|
|
DnBlowHandle hBlow = vlBlows[i];
|
|||
|
|
if (hBlow)
|
|||
|
|
hBlow->RemoveDebufAction(LocalTime, fDelta);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
//ElectricShock
|
|||
|
|
if( IsAppliedThisStateBlow( STATE_BLOW::BLOW_043 ) )
|
|||
|
|
{
|
|||
|
|
DNVector(DnBlowHandle) vlBlows;
|
|||
|
|
GetStateBlow()->GetStateBlowFromBlowIndex( STATE_BLOW::BLOW_043, vlBlows );
|
|||
|
|
|
|||
|
|
int nBlowCount = (int)vlBlows.size();
|
|||
|
|
for (int i = 0; i < nBlowCount; ++i)
|
|||
|
|
{
|
|||
|
|
DnBlowHandle hBlow = vlBlows[i];
|
|||
|
|
if (hBlow)
|
|||
|
|
hBlow->RemoveDebufAction(LocalTime, fDelta);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
//Escape
|
|||
|
|
if( IsAppliedThisStateBlow( STATE_BLOW::BLOW_218 ) )
|
|||
|
|
{
|
|||
|
|
DNVector(DnBlowHandle) vlBlows;
|
|||
|
|
GetStateBlow()->GetStateBlowFromBlowIndex( STATE_BLOW::BLOW_218, vlBlows );
|
|||
|
|
|
|||
|
|
int nBlowCount = (int)vlBlows.size();
|
|||
|
|
for (int i = 0; i < nBlowCount; ++i)
|
|||
|
|
{
|
|||
|
|
DnBlowHandle hBlow = vlBlows[i];
|
|||
|
|
if (hBlow)
|
|||
|
|
hBlow->RemoveDebufAction(LocalTime, fDelta);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
#endif // PRE_FIX_51048
|
|||
|
|
|
|||
|
|
void CDnActor::SetState(ActorStateEnum State)
|
|||
|
|
{
|
|||
|
|
#if defined(PRE_FIX_59939)
|
|||
|
|
//<2F><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> SetState<74><65> ȣ<><C8A3> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ֻ<EFBFBD><D6BB><EFBFBD>ȿ<EFBFBD><C8BF>(244)<29><><EFBFBD><EFBFBD> <20><>ü <20><>Ÿ<EFBFBD><C5B8> <20><><EFBFBD><EFBFBD><EFBFBD>ϱ <20>׳<EFBFBD> ȣ<><C8A3> <20>ϵ<EFBFBD><CFB5><EFBFBD> <20>Ѵ<EFBFBD>...
|
|||
|
|
//
|
|||
|
|
__super::SetState(State);
|
|||
|
|
|
|||
|
|
bool isAttackState = IsAttack();
|
|||
|
|
if (isAttackState)
|
|||
|
|
OnAttackChange();
|
|||
|
|
|
|||
|
|
#else
|
|||
|
|
bool isPreAttackState = IsAttack();
|
|||
|
|
|
|||
|
|
__super::SetState(State);
|
|||
|
|
|
|||
|
|
bool isNewAttackState = IsAttack();
|
|||
|
|
if (isPreAttackState == false && isNewAttackState == true)
|
|||
|
|
OnAttackChange();
|
|||
|
|
#endif // PRE_FIX_59939
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::OnAttackChange()
|
|||
|
|
{
|
|||
|
|
if (IsAppliedThisStateBlow(STATE_BLOW::BLOW_244))
|
|||
|
|
{
|
|||
|
|
DNVector(DnBlowHandle) vlBlows;
|
|||
|
|
GatherAppliedStateBlowByBlowIndex( STATE_BLOW::BLOW_244, vlBlows );
|
|||
|
|
|
|||
|
|
int nBlowCount = (int)vlBlows.size();
|
|||
|
|
for (int i = 0; i < nBlowCount; ++i)
|
|||
|
|
{
|
|||
|
|
DnBlowHandle hBlow = vlBlows[i];
|
|||
|
|
if (hBlow)
|
|||
|
|
{
|
|||
|
|
CDnCurseBlow* pCurseBlow = dynamic_cast<CDnCurseBlow*>(hBlow.GetPointer());
|
|||
|
|
if (pCurseBlow)
|
|||
|
|
pCurseBlow->OnAttackChange();
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
int CDnActor::ExceptionHitList(DNVector(DnActorHandle) &hVecList, MatrixEx& Cross, DnActorHandle hHiterActor, HitStruct* pStruct)
|
|||
|
|
{
|
|||
|
|
std::map<DWORD, DnActorHandle> hOwnerActorList; //<2F><><EFBFBD>ΰ<EFBFBD><CEB0><EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ִ<EFBFBD> <20><><EFBFBD>ξ<EFBFBD><CEBE><EFBFBD> <20>ĺ<EFBFBD>? <20><><EFBFBD><EFBFBD>Ʈ
|
|||
|
|
std::map<DWORD, DnActorHandle> eraseActorList; //<2F><><EFBFBD><EFBFBD> <20>Ǿ<EFBFBD><C7BE><EFBFBD> <20><> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>Ʈ
|
|||
|
|
std::vector<CDnMonsterActor*> hSummonActorList; //<2F><>ȯ<EFBFBD><C8AF> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>Ʈ
|
|||
|
|
|
|||
|
|
DNVector(DnActorHandle) hNewVecList; //<2F><><EFBFBD>ο<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>Ʈ
|
|||
|
|
|
|||
|
|
int nWeaponLength = 0;
|
|||
|
|
bool bOnDamageCalled = false;
|
|||
|
|
if (hHiterActor)
|
|||
|
|
{
|
|||
|
|
if( pStruct->bIncludeWeaponLength && hHiterActor->GetWeapon() )
|
|||
|
|
nWeaponLength = hHiterActor->GetWeapon()->GetWeaponLength();
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
MatrixEx CrossTemp = Cross;
|
|||
|
|
|
|||
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><>Ʈ <20>ñ׳<C3B1><D7B3><EFBFBD> <20>߽<EFBFBD><DFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><>ġ<EFBFBD><C4A1> <20>´<EFBFBD> <20><><EFBFBD><EFBFBD> <20>ƴϱ<C6B4> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD>¿<EFBFBD><C2BF><EFBFBD> <20><>Ȯ<EFBFBD>ϰ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>Ѵ<EFBFBD>.(#18971)
|
|||
|
|
EtVector3 vScale = EtVector3(1.0f, 1.0f, 1.0f);
|
|||
|
|
if (hHiterActor)
|
|||
|
|
vScale = *hHiterActor->GetScale();
|
|||
|
|
|
|||
|
|
EtVector3 vOffset = *pStruct->vOffset * vScale.y;
|
|||
|
|
|
|||
|
|
CrossTemp.MoveLocalZAxis( vOffset.z );
|
|||
|
|
CrossTemp.MoveLocalXAxis( vOffset.x );
|
|||
|
|
CrossTemp.MoveLocalYAxis( vOffset.y );
|
|||
|
|
|
|||
|
|
// Ư<><C6AF> <20><><EFBFBD><EFBFBD> <20><>ũ<EFBFBD><C5A9> <20><><EFBFBD>¶<EFBFBD><C2B6><EFBFBD>..
|
|||
|
|
if( hHiterActor &&
|
|||
|
|
pStruct->szLinkBoneName && strlen(pStruct->szLinkBoneName) > 0 )
|
|||
|
|
{
|
|||
|
|
int nBoneIndex = hHiterActor->GetBoneIndex( pStruct->szLinkBoneName );
|
|||
|
|
if( -1 != nBoneIndex )
|
|||
|
|
{
|
|||
|
|
EtMatrix matBoneWorld = hHiterActor->GetBoneMatrix( pStruct->szLinkBoneName );
|
|||
|
|
EtMatrixMultiply( (EtMatrix*)&CrossTemp, (EtMatrix*)&CrossTemp, &matBoneWorld );
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD>ʹ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ͽ<EFBFBD><CFBF><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ѵ<EFBFBD>.
|
|||
|
|
float fDistanceMax = pStruct->fDistanceMax * vScale.y;
|
|||
|
|
float fDistanceMin = pStruct->fDistanceMin * vScale.y;
|
|||
|
|
float fHeightMax = pStruct->fHeightMax * vScale.y;
|
|||
|
|
///////////////////////////////////////////////
|
|||
|
|
|
|||
|
|
EtVector3 vPos = CrossTemp.m_vPosition;
|
|||
|
|
|
|||
|
|
float fDistance = max( fDistanceMax, fHeightMax - pStruct->fHeightMin ) + nWeaponLength;
|
|||
|
|
float fXZDistanceSQ = fDistanceMax + nWeaponLength;
|
|||
|
|
float fXZDistanceMinSQ = fDistanceMin; // Min <20><> Weapon <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ȹ<C8B9><DEBD>ϴ<EFBFBD>.
|
|||
|
|
|
|||
|
|
fXZDistanceSQ *= fXZDistanceSQ;
|
|||
|
|
fXZDistanceMinSQ *= fXZDistanceMinSQ;
|
|||
|
|
|
|||
|
|
EtVector3 vDir;
|
|||
|
|
EtVector3 vZVec = Cross.m_vZAxis;
|
|||
|
|
|
|||
|
|
if( pStruct->fCenterAngle != 0.f )
|
|||
|
|
{
|
|||
|
|
EtMatrix matRotate;
|
|||
|
|
EtMatrixRotationY( &matRotate, EtToRadian( pStruct->fCenterAngle ) );
|
|||
|
|
EtVec3TransformNormal( &vZVec, &vZVec, &matRotate );
|
|||
|
|
}
|
|||
|
|
SAABox Box;
|
|||
|
|
float fDot = 0.0f;
|
|||
|
|
|
|||
|
|
#if defined(PRE_FIX_59680)
|
|||
|
|
int nMyTeamID = -1;
|
|||
|
|
if (hHiterActor)
|
|||
|
|
{
|
|||
|
|
nMyTeamID = hHiterActor->GetTeam();
|
|||
|
|
if (hHiterActor->IsAppliedThisStateBlow(STATE_BLOW::BLOW_149))
|
|||
|
|
nMyTeamID = hHiterActor->GetOriginalTeam();
|
|||
|
|
}
|
|||
|
|
#endif // PRE_FIX_59680
|
|||
|
|
|
|||
|
|
int nListCount = (int)hVecList.size();
|
|||
|
|
for (int i = 0; i < nListCount; ++i)
|
|||
|
|
{
|
|||
|
|
DnActorHandle hActor = hVecList[i];
|
|||
|
|
if (!hActor)
|
|||
|
|
continue;
|
|||
|
|
|
|||
|
|
switch( hActor->GetHitCheckType() )
|
|||
|
|
{
|
|||
|
|
case HitCheckTypeEnum::BoundingBox:
|
|||
|
|
{
|
|||
|
|
vDir = *hActor->GetPosition() - vPos;
|
|||
|
|
vDir.y = 0.f;
|
|||
|
|
|
|||
|
|
hActor->GetBoundingBox( Box );
|
|||
|
|
|
|||
|
|
if( SquaredDistance( vPos, Box ) > fXZDistanceSQ ) continue;
|
|||
|
|
if( SquaredDistance( vPos, Box, false ) < fXZDistanceMinSQ ) continue;
|
|||
|
|
|
|||
|
|
EtVec3Normalize( &vDir, &vDir );
|
|||
|
|
fDot = EtVec3Dot( &vZVec, &vDir );
|
|||
|
|
if( EtToDegree( acos( fDot ) ) > pStruct->fAngle ) continue;
|
|||
|
|
|
|||
|
|
if( Box.Min.y < vPos.y + pStruct->fHeightMin &&
|
|||
|
|
Box.Max.y < vPos.y + pStruct->fHeightMin ) continue;
|
|||
|
|
if( Box.Min.y > vPos.y + fHeightMax &&
|
|||
|
|
Box.Max.y > vPos.y + fHeightMax ) continue;
|
|||
|
|
}
|
|||
|
|
break;
|
|||
|
|
case HitCheckTypeEnum::Collision:
|
|||
|
|
{
|
|||
|
|
SCollisionCapsule Capsule;
|
|||
|
|
SCollisionResponse CollisionResult;
|
|||
|
|
DNVector(SCollisionResponse) vCollisionResult;
|
|||
|
|
//
|
|||
|
|
Capsule.Segment.vOrigin = vPos;
|
|||
|
|
float fHeight = fHeightMax - pStruct->fHeightMin;
|
|||
|
|
Capsule.Segment.vOrigin.y = Capsule.Segment.vOrigin.y - ( pStruct->fHeightMin + ( fHeight / 2.f ) );
|
|||
|
|
Capsule.Segment.vDirection = EtVector3( 0.f, fHeight / 2.f, 0.f );
|
|||
|
|
Capsule.fRadius = ( fDistanceMax + nWeaponLength );
|
|||
|
|
|
|||
|
|
//int nParentBoneIndex = -1;
|
|||
|
|
EtVector3 vDestPos;
|
|||
|
|
if( hActor->GetObjectHandle()->CEtCollisionEntity::FindCapsuleCollision( Capsule, CollisionResult, &vCollisionResult ) == false )
|
|||
|
|
continue;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
//<2F><><EFBFBD>ΰ<EFBFBD><CEB0><EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD> <20>ִ<EFBFBD> <20><><EFBFBD>ξ<EFBFBD><CEBE><EFBFBD> <20>ĺ<EFBFBD> <20><><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>..
|
|||
|
|
if (hActor->IsAppliedThisStateBlow(STATE_BLOW::BLOW_247))
|
|||
|
|
{
|
|||
|
|
hOwnerActorList.insert(std::make_pair(hActor->GetUniqueID(), hActor));
|
|||
|
|
}
|
|||
|
|
//<2F><><EFBFBD>ΰ<EFBFBD><CEB0>÷<EFBFBD> <20><>ȯ<EFBFBD><C8AF> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>..
|
|||
|
|
else if (hActor->IsMonsterActor())
|
|||
|
|
{
|
|||
|
|
CDnMonsterActor* pMonsterActor = static_cast<CDnMonsterActor*>(hActor.GetPointer());
|
|||
|
|
if (pMonsterActor &&
|
|||
|
|
pMonsterActor->IsSummonedMonster() &&
|
|||
|
|
pMonsterActor->IsPuppetSummonMonster())
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
#if defined(PRE_FIX_59680)
|
|||
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ų<EFBFBD><C5B3> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>̵<EFBFBD>.
|
|||
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Hit<69>ñ׳<C3B1> ó<><C3B3><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>Ʈ <20>߰<EFBFBD><DFB0><EFBFBD> <20>ǰ<EFBFBD>, <20>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>Ͱ<EFBFBD> <20><><EFBFBD><EFBFBD> <20>Ǿ <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> ó<><C3B3> <20><><EFBFBD><EFBFBD> <20>ʴ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><DFBB><EFBFBD>.
|
|||
|
|
//<2F><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> <20><><EFBFBD><EFBFBD> <20>Ǿ<EFBFBD><C7BE><EFBFBD><EFBFBD>Ѵ<EFBFBD>.
|
|||
|
|
int nTargetTeam = hActor->GetTeam();
|
|||
|
|
if (hActor->IsAppliedThisStateBlow(STATE_BLOW::BLOW_149))
|
|||
|
|
nTargetTeam = hActor->GetOriginalTeam();
|
|||
|
|
|
|||
|
|
//<2F><EFBFBD>ü<EFBFBD><C3BC><EFBFBD><EFBFBD> Hiter<65><72><EFBFBD>Ͱ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20>ִ<EFBFBD>. Prop<6F><70> <20><><EFBFBD><EFBFBD>(Hiter<65><72><EFBFBD>Ͱ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>߰<EFBFBD>)
|
|||
|
|
if (hHiterActor)
|
|||
|
|
{
|
|||
|
|
//<2F><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ٸ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>վ<EFBFBD><D5BE><EFBFBD> <20><><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> <20>߰<EFBFBD> <20>ϰ<EFBFBD>
|
|||
|
|
//<2F><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>߰<EFBFBD><DFB0>ؼ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Ѵ<EFBFBD>.
|
|||
|
|
if (nMyTeamID != nTargetTeam)
|
|||
|
|
hSummonActorList.push_back(pMonsterActor);
|
|||
|
|
else
|
|||
|
|
eraseActorList.insert(std::make_pair(hActor->GetUniqueID(), hActor));
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
hSummonActorList.push_back(pMonsterActor);
|
|||
|
|
#else
|
|||
|
|
hSummonActorList.push_back(pMonsterActor);
|
|||
|
|
#endif // PRE_FIX_59680
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
//<2F><>ȯ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>Ͱ<EFBFBD> <20>ִ<EFBFBD> <20><><EFBFBD><EFBFBD>
|
|||
|
|
//<2F><>ȯ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>Ͱ<EFBFBD> <20><><EFBFBD><EFBFBD> <20>ϴ<EFBFBD> <20><> Ȯ<><C8AE> <20>ؼ<EFBFBD>, <20><><EFBFBD><EFBFBD> <20><><EFBFBD>Ͱ<EFBFBD> <20><><EFBFBD><EFBFBD> <20>ϸ<EFBFBD>
|
|||
|
|
//<2F><><EFBFBD>︮<EFBFBD><EFB8AE>Ʈ<EFBFBD><C6AE> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>߰<EFBFBD> <20><> <20><><EFBFBD>´<EFBFBD>.
|
|||
|
|
int nSummonActorList = (int)hSummonActorList.size();
|
|||
|
|
for (int iIndex = 0; iIndex < nSummonActorList; ++iIndex)
|
|||
|
|
{
|
|||
|
|
CDnMonsterActor* pSummonMonsterActor = hSummonActorList[iIndex];
|
|||
|
|
|
|||
|
|
//<2F><>ȯ<EFBFBD><C8AF><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> Ȯ<><C8AE> <20>Ѵ<EFBFBD>.
|
|||
|
|
DnActorHandle hOwnerActor = pSummonMonsterActor->GetSummonerPlayerActor();
|
|||
|
|
DWORD dwOwnerUniqueID = hOwnerActor ? hOwnerActor->GetUniqueID() : -1;
|
|||
|
|
if (dwOwnerUniqueID == -1)
|
|||
|
|
continue;
|
|||
|
|
|
|||
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD>ĺ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> ã<>´<EFBFBD>.
|
|||
|
|
std::map<DWORD, DnActorHandle>::iterator findIter = hOwnerActorList.find(dwOwnerUniqueID);
|
|||
|
|
if (findIter != hOwnerActorList.end())
|
|||
|
|
{
|
|||
|
|
//<2F><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> <20>߰<EFBFBD> <20>Ѵ<EFBFBD>.
|
|||
|
|
eraseActorList.insert(std::make_pair(dwOwnerUniqueID, hOwnerActor));
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
nListCount = (int)hVecList.size();
|
|||
|
|
for (int i = 0; i < nListCount; ++i)
|
|||
|
|
{
|
|||
|
|
DnActorHandle hActor = hVecList[i];
|
|||
|
|
if (!hActor)
|
|||
|
|
continue;
|
|||
|
|
|
|||
|
|
//<2F><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> <20><><EFBFBD>鼭, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> ã<><C3A3> <20><> <20>ϸ<EFBFBD> <20><><EFBFBD>ο<EFBFBD> <20><><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> <20>߰<EFBFBD> <20>Ѵ<EFBFBD>.
|
|||
|
|
DWORD dwOwnerUniqueID = hActor->GetUniqueID();
|
|||
|
|
std::map<DWORD, DnActorHandle>::iterator findIter = eraseActorList.find(dwOwnerUniqueID);
|
|||
|
|
if (findIter == eraseActorList.end())
|
|||
|
|
hNewVecList.push_back(hActor);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
std::swap(hVecList, hNewVecList);
|
|||
|
|
|
|||
|
|
return (int)hVecList.size();
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
//<2F><>ĵ<EFBFBD><C4B5> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> Hit<69><74><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ִ<EFBFBD> <20>༮<EFBFBD>鸸 <20><><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
|||
|
|
void CDnActor::CheckHitAreaActorList(DNVector(DnActorHandle)& hVecList, MatrixEx& Cross, DnActorHandle hHiterActor, HitStruct* pStruct, int nCheckType, float fScanLength, EtVector3& vPrePos)
|
|||
|
|
{
|
|||
|
|
DNVector(DnActorHandle) hNewVecList; //<2F><><EFBFBD>ο<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>Ʈ
|
|||
|
|
|
|||
|
|
int nWeaponLength = 0;
|
|||
|
|
bool bOnDamageCalled = false;
|
|||
|
|
if (hHiterActor)
|
|||
|
|
{
|
|||
|
|
if( pStruct->bIncludeWeaponLength && hHiterActor->GetWeapon() )
|
|||
|
|
nWeaponLength = hHiterActor->GetWeapon()->GetWeaponLength();
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
MatrixEx CrossTemp = Cross;
|
|||
|
|
|
|||
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><>Ʈ <20>ñ׳<C3B1><D7B3><EFBFBD> <20>߽<EFBFBD><DFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><>ġ<EFBFBD><C4A1> <20>´<EFBFBD> <20><><EFBFBD><EFBFBD> <20>ƴϱ<C6B4> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD>¿<EFBFBD><C2BF><EFBFBD> <20><>Ȯ<EFBFBD>ϰ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>Ѵ<EFBFBD>.(#18971)
|
|||
|
|
EtVector3 vScale = EtVector3(1.0f, 1.0f, 1.0f);
|
|||
|
|
if (hHiterActor)
|
|||
|
|
vScale = *hHiterActor->GetScale();
|
|||
|
|
|
|||
|
|
EtVector3 vOffset = *pStruct->vOffset * vScale.y;
|
|||
|
|
|
|||
|
|
CrossTemp.MoveLocalZAxis( vOffset.z );
|
|||
|
|
CrossTemp.MoveLocalXAxis( vOffset.x );
|
|||
|
|
CrossTemp.MoveLocalYAxis( vOffset.y );
|
|||
|
|
|
|||
|
|
// Ư<><C6AF> <20><><EFBFBD><EFBFBD> <20><>ũ<EFBFBD><C5A9> <20><><EFBFBD>¶<EFBFBD><C2B6><EFBFBD>..
|
|||
|
|
if( pStruct->szLinkBoneName && strlen(pStruct->szLinkBoneName) > 0 )
|
|||
|
|
{
|
|||
|
|
int nBoneIndex = hHiterActor->GetBoneIndex( pStruct->szLinkBoneName );
|
|||
|
|
if( -1 != nBoneIndex )
|
|||
|
|
{
|
|||
|
|
EtMatrix matBoneWorld = hHiterActor->GetBoneMatrix( pStruct->szLinkBoneName );
|
|||
|
|
EtMatrixMultiply( (EtMatrix*)&CrossTemp, (EtMatrix*)&CrossTemp, &matBoneWorld );
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD>ʹ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ͽ<EFBFBD><CFBF><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ѵ<EFBFBD>.
|
|||
|
|
float fDistanceMax = pStruct->fDistanceMax * vScale.y;
|
|||
|
|
float fDistanceMin = pStruct->fDistanceMin * vScale.y;
|
|||
|
|
float fHeightMax = pStruct->fHeightMax * vScale.y;
|
|||
|
|
///////////////////////////////////////////////
|
|||
|
|
|
|||
|
|
EtVector3 vPos = CrossTemp.m_vPosition;
|
|||
|
|
|
|||
|
|
float fDistance = max( fDistanceMax, fHeightMax - pStruct->fHeightMin ) + nWeaponLength;
|
|||
|
|
float fXZDistanceSQ = fDistanceMax + nWeaponLength;
|
|||
|
|
float fXZDistanceMinSQ = fDistanceMin; // Min <20><> Weapon <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ȹ<C8B9><DEBD>ϴ<EFBFBD>.
|
|||
|
|
|
|||
|
|
fXZDistanceSQ *= fXZDistanceSQ;
|
|||
|
|
fXZDistanceMinSQ *= fXZDistanceMinSQ;
|
|||
|
|
|
|||
|
|
EtVector3 vDir;
|
|||
|
|
EtVector3 vZVec = Cross.m_vZAxis;
|
|||
|
|
|
|||
|
|
if( pStruct->fCenterAngle != 0.f )
|
|||
|
|
{
|
|||
|
|
EtMatrix matRotate;
|
|||
|
|
EtMatrixRotationY( &matRotate, EtToRadian( pStruct->fCenterAngle ) );
|
|||
|
|
EtVec3TransformNormal( &vZVec, &vZVec, &matRotate );
|
|||
|
|
}
|
|||
|
|
SAABox Box;
|
|||
|
|
float fDot = 0.0f;
|
|||
|
|
|
|||
|
|
int nListCount = (int)hVecList.size();
|
|||
|
|
for (int i = 0; i < nListCount; ++i)
|
|||
|
|
{
|
|||
|
|
DnActorHandle hActor = hVecList[i];
|
|||
|
|
if (!hActor)
|
|||
|
|
continue;
|
|||
|
|
|
|||
|
|
if( !hActor->GetObjectHandle() )
|
|||
|
|
continue;
|
|||
|
|
|
|||
|
|
switch( hActor->GetHitCheckType() )
|
|||
|
|
{
|
|||
|
|
case HitCheckTypeEnum::BoundingBox:
|
|||
|
|
{
|
|||
|
|
switch(nCheckType)
|
|||
|
|
{
|
|||
|
|
case 0: //CDnActor<6F><72> OnSignal<61><6C> <20>ִ<EFBFBD> üũ <20><><EFBFBD><EFBFBD>...
|
|||
|
|
{
|
|||
|
|
vDir = *hActor->GetPosition() - vPos;
|
|||
|
|
vDir.y = 0.f;
|
|||
|
|
|
|||
|
|
hActor->GetBoundingBox( Box );
|
|||
|
|
|
|||
|
|
if( SquaredDistance( vPos, Box ) > fXZDistanceSQ ) continue;
|
|||
|
|
if( SquaredDistance( vPos, Box, false ) < fXZDistanceMinSQ ) continue;
|
|||
|
|
|
|||
|
|
EtVec3Normalize( &vDir, &vDir );
|
|||
|
|
fDot = EtVec3Dot( &vZVec, &vDir );
|
|||
|
|
if( EtToDegree( acos( fDot ) ) > pStruct->fAngle ) continue;
|
|||
|
|
|
|||
|
|
if( Box.Min.y < vPos.y + pStruct->fHeightMin &&
|
|||
|
|
Box.Max.y < vPos.y + pStruct->fHeightMin ) continue;
|
|||
|
|
if( Box.Min.y > vPos.y + fHeightMax &&
|
|||
|
|
Box.Max.y > vPos.y + fHeightMax ) continue;
|
|||
|
|
}
|
|||
|
|
break;
|
|||
|
|
case 1: //Projectile<6C><65> ù<><C3B9>° üũ <20><><EFBFBD><EFBFBD>.
|
|||
|
|
{
|
|||
|
|
float fPropContactDistance = FLT_MAX;
|
|||
|
|
float fNowFrameActorContactDistanceSQ = FLT_MAX;
|
|||
|
|
|
|||
|
|
vDir = *hActor->GetPosition() - vPos;
|
|||
|
|
vDir.y = 0.f;
|
|||
|
|
|
|||
|
|
hActor->GetBoundingBox( Box );
|
|||
|
|
|
|||
|
|
if( CDnActor::SquaredDistance( vPos, Box ) > fXZDistanceSQ ) continue;
|
|||
|
|
if( CDnActor::SquaredDistance( vPos, Box, false ) < fXZDistanceMinSQ ) continue;
|
|||
|
|
|
|||
|
|
EtVec3Normalize( &vDir, &vDir );
|
|||
|
|
fDot = EtVec3Dot( &vZVec, &vDir );
|
|||
|
|
if( EtToDegree( acos( fDot ) ) > pStruct->fAngle ) continue;
|
|||
|
|
|
|||
|
|
if( Box.Min.y < vPos.y + pStruct->fHeightMin &&
|
|||
|
|
Box.Max.y < vPos.y + pStruct->fHeightMin ) continue;
|
|||
|
|
if( Box.Min.y > vPos.y + pStruct->fHeightMax &&
|
|||
|
|
Box.Max.y > vPos.y + pStruct->fHeightMax ) continue;
|
|||
|
|
fNowFrameActorContactDistanceSQ = EtVec3LengthSq( &EtVector3( vPos - vPrePos ) );
|
|||
|
|
if( fNowFrameActorContactDistanceSQ > fPropContactDistance ) continue;
|
|||
|
|
}
|
|||
|
|
break;
|
|||
|
|
case 2: //Projectile<6C><65> <20>ι<EFBFBD>° üũ <20><><EFBFBD><EFBFBD>
|
|||
|
|
{
|
|||
|
|
bool bResult = false;
|
|||
|
|
float fPropContactDistance = FLT_MAX;
|
|||
|
|
float fNowFrameActorContactDistanceSQ = FLT_MAX;
|
|||
|
|
|
|||
|
|
SCollisionResponse Response;
|
|||
|
|
DNVector(SCollisionResponse) vResponse;
|
|||
|
|
|
|||
|
|
float fThickness = max( fabs( pStruct->fHeightMin ), fabs( pStruct->fHeightMax ) );
|
|||
|
|
|
|||
|
|
SSegment Segment;
|
|||
|
|
Segment.vOrigin = vPrePos;
|
|||
|
|
Segment.vDirection = Cross.m_vZAxis * fScanLength;
|
|||
|
|
|
|||
|
|
SCollisionCapsule Capsule;
|
|||
|
|
Capsule.Segment = Segment;
|
|||
|
|
Capsule.fRadius = fThickness;
|
|||
|
|
|
|||
|
|
|
|||
|
|
if( fThickness == 0.f ) bResult = hActor->GetObjectHandle()->FindSegmentCollision( Segment, Response );
|
|||
|
|
else bResult = hActor->GetObjectHandle()->FindCapsuleCollision( Capsule, Response );
|
|||
|
|
|
|||
|
|
fNowFrameActorContactDistanceSQ = EtVec3LengthSq( &EtVector3( *hActor->GetPosition() - vPrePos ) );
|
|||
|
|
if( fNowFrameActorContactDistanceSQ > fPropContactDistance ) continue;
|
|||
|
|
|
|||
|
|
if (bResult == false)
|
|||
|
|
continue;
|
|||
|
|
}
|
|||
|
|
break;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
break;
|
|||
|
|
case HitCheckTypeEnum::Collision:
|
|||
|
|
{
|
|||
|
|
switch(nCheckType)
|
|||
|
|
{
|
|||
|
|
case 0://CDnActor<6F><72> OnSignal üũ <20><><EFBFBD><EFBFBD>..
|
|||
|
|
{
|
|||
|
|
SCollisionCapsule Capsule;
|
|||
|
|
SCollisionResponse CollisionResult;
|
|||
|
|
DNVector(SCollisionResponse) vCollisionResult;
|
|||
|
|
//
|
|||
|
|
Capsule.Segment.vOrigin = vPos;
|
|||
|
|
float fHeight = fHeightMax - pStruct->fHeightMin;
|
|||
|
|
Capsule.Segment.vOrigin.y = Capsule.Segment.vOrigin.y - ( pStruct->fHeightMin + ( fHeight / 2.f ) );
|
|||
|
|
Capsule.Segment.vDirection = EtVector3( 0.f, fHeight / 2.f, 0.f );
|
|||
|
|
Capsule.fRadius = ( fDistanceMax + nWeaponLength );
|
|||
|
|
|
|||
|
|
//int nParentBoneIndex = -1;
|
|||
|
|
EtVector3 vDestPos;
|
|||
|
|
if( hActor->GetObjectHandle()->CEtCollisionEntity::FindCapsuleCollision( Capsule, CollisionResult, &vCollisionResult ) == false )
|
|||
|
|
continue;
|
|||
|
|
}
|
|||
|
|
break;
|
|||
|
|
case 1://Projectile<6C><65> ù<><C3B9>° üũ <20><><EFBFBD><EFBFBD>..
|
|||
|
|
{
|
|||
|
|
SCollisionCapsule Capsule;
|
|||
|
|
SCollisionResponse CollisionResult;
|
|||
|
|
DNVector(SCollisionResponse) vCollisionResult;
|
|||
|
|
//
|
|||
|
|
Capsule.Segment.vOrigin = vPos;
|
|||
|
|
float fHeight = pStruct->fHeightMax - pStruct->fHeightMin;
|
|||
|
|
Capsule.Segment.vOrigin.y = Capsule.Segment.vOrigin.y - ( pStruct->fHeightMin + ( fHeight / 2.f ) );
|
|||
|
|
Capsule.Segment.vDirection = EtVector3( 0.f, fHeight / 2.f, 0.f );
|
|||
|
|
Capsule.fRadius = pStruct->fDistanceMax;
|
|||
|
|
|
|||
|
|
//int nParentBoneIndex = -1;
|
|||
|
|
EtVector3 vDestPos;
|
|||
|
|
if( hActor->GetObjectHandle()->CEtCollisionEntity::FindCapsuleCollision( Capsule, CollisionResult, &vCollisionResult ) == false )
|
|||
|
|
continue;
|
|||
|
|
}
|
|||
|
|
break;
|
|||
|
|
case 2://Projectile<6C><65> <20>ι<EFBFBD>° üũ <20><><EFBFBD><EFBFBD>..
|
|||
|
|
{
|
|||
|
|
float fPropContactDistance = FLT_MAX;
|
|||
|
|
float fNowFrameActorContactDistanceSQ = FLT_MAX;
|
|||
|
|
|
|||
|
|
bool bResult = false;
|
|||
|
|
float fThickness = max( fabs( pStruct->fHeightMin ), fabs( pStruct->fHeightMax ) );
|
|||
|
|
SSegment Segment;
|
|||
|
|
Segment.vOrigin = vPrePos;
|
|||
|
|
Segment.vDirection = Cross.m_vZAxis * fScanLength;
|
|||
|
|
|
|||
|
|
SCollisionCapsule Capsule;
|
|||
|
|
Capsule.Segment = Segment;
|
|||
|
|
Capsule.fRadius = fThickness;
|
|||
|
|
|
|||
|
|
SCollisionResponse Response;
|
|||
|
|
DNVector(SCollisionResponse) vResponse;
|
|||
|
|
|
|||
|
|
int nParentBoneIndex = -1;
|
|||
|
|
EtVector3 vDestPos;
|
|||
|
|
if( fThickness == 0.f )
|
|||
|
|
bResult = hActor->GetObjectHandle()->FindSegmentCollision( Segment, Response, &vResponse );
|
|||
|
|
else
|
|||
|
|
bResult = hActor->GetObjectHandle()->FindCapsuleCollision( Capsule, Response, &vResponse );
|
|||
|
|
|
|||
|
|
if (bResult)
|
|||
|
|
{
|
|||
|
|
fNowFrameActorContactDistanceSQ = EtVec3LengthSq( &EtVector3( Segment.vDirection * Response.fContactTime ) );
|
|||
|
|
if( fNowFrameActorContactDistanceSQ > fPropContactDistance ) continue;
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
continue;
|
|||
|
|
}
|
|||
|
|
break;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
hNewVecList.push_back(hActor);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
std::swap(hVecList, hNewVecList);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
int CDnActor::ExceptionHitList2(DNVector(DnActorHandle) &hVecList, MatrixEx& Cross, DnActorHandle hHiterActor, HitStruct* pStruct,
|
|||
|
|
DNVector(DnActorHandle)& hAddStateEffectActorList,
|
|||
|
|
int nCheckType, float fScanLength, EtVector3& vPrePos)
|
|||
|
|
{
|
|||
|
|
//<2F><>Ʈ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ִ<EFBFBD> <20><><EFBFBD>͵鸸 <20><><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> <20><><EFBFBD>´<EFBFBD>...
|
|||
|
|
CDnActor::CheckHitAreaActorList(hVecList, Cross, hHiterActor, pStruct, nCheckType, fScanLength, vPrePos);
|
|||
|
|
|
|||
|
|
int nMyTeamID = -1;
|
|||
|
|
if (hHiterActor)
|
|||
|
|
{
|
|||
|
|
nMyTeamID = hHiterActor->GetTeam();
|
|||
|
|
if (hHiterActor->IsAppliedThisStateBlow(STATE_BLOW::BLOW_149))
|
|||
|
|
nMyTeamID = hHiterActor->GetOriginalTeam();
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
struct _PuppetNOwnerInfo
|
|||
|
|
{
|
|||
|
|
DWORD dwOwnerID;
|
|||
|
|
CDnMonsterActor* pPuppetMonster;
|
|||
|
|
DnActorHandle hPuppetActor;
|
|||
|
|
DnActorHandle hOwnerActor;
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
std::map<DWORD, _PuppetNOwnerInfo> PuppetnOnwerInfoList;
|
|||
|
|
|
|||
|
|
DNVector(DnActorHandle) hNewVecList; //<2F><><EFBFBD>ο<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>Ʈ
|
|||
|
|
|
|||
|
|
EtVector3 vPos = *hHiterActor->GetPosition();
|
|||
|
|
|
|||
|
|
int nListCount = (int)hVecList.size();
|
|||
|
|
for (int i = 0; i < nListCount; ++i)
|
|||
|
|
{
|
|||
|
|
DnActorHandle hActor = hVecList[i];
|
|||
|
|
if (!hActor)
|
|||
|
|
continue;
|
|||
|
|
|
|||
|
|
bool bSeperated = false;
|
|||
|
|
|
|||
|
|
//<2F><><EFBFBD>ΰ<EFBFBD><CEB0><EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD> <20>ִ<EFBFBD> <20><><EFBFBD>ξ<EFBFBD><CEBE><EFBFBD> <20>ĺ<EFBFBD> <20><><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>..
|
|||
|
|
if (hActor->IsAppliedThisStateBlow(STATE_BLOW::BLOW_247))
|
|||
|
|
{
|
|||
|
|
bSeperated = true;
|
|||
|
|
DWORD dwOwnerUniqueID = hActor->GetUniqueID();
|
|||
|
|
|
|||
|
|
std::map<DWORD, _PuppetNOwnerInfo>::iterator findIter = PuppetnOnwerInfoList.find(dwOwnerUniqueID);
|
|||
|
|
if (findIter == PuppetnOnwerInfoList.end())
|
|||
|
|
{
|
|||
|
|
_PuppetNOwnerInfo _info;
|
|||
|
|
_info.dwOwnerID = dwOwnerUniqueID;
|
|||
|
|
_info.hOwnerActor = hActor;
|
|||
|
|
|
|||
|
|
PuppetnOnwerInfoList.insert(std::make_pair(dwOwnerUniqueID, _info));
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
_PuppetNOwnerInfo& _info = findIter->second;
|
|||
|
|
_info.hOwnerActor = hActor;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
//<2F><><EFBFBD>ΰ<EFBFBD><CEB0>÷<EFBFBD> <20><>ȯ<EFBFBD><C8AF> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>..
|
|||
|
|
else if (hActor->IsMonsterActor())
|
|||
|
|
{
|
|||
|
|
CDnMonsterActor* pMonsterActor = static_cast<CDnMonsterActor*>(hActor.GetPointer());
|
|||
|
|
if (pMonsterActor &&
|
|||
|
|
pMonsterActor->IsSummonedMonster() &&
|
|||
|
|
pMonsterActor->IsPuppetSummonMonster())
|
|||
|
|
{
|
|||
|
|
bSeperated = true;
|
|||
|
|
|
|||
|
|
DnActorHandle hOwnerActor = pMonsterActor->GetSummonerPlayerActor();
|
|||
|
|
DWORD dwOwnerUniqueID = hOwnerActor ? hOwnerActor->GetUniqueID() : -1;
|
|||
|
|
|
|||
|
|
std::map<DWORD, _PuppetNOwnerInfo>::iterator findIter = PuppetnOnwerInfoList.find(dwOwnerUniqueID);
|
|||
|
|
if (findIter == PuppetnOnwerInfoList.end())
|
|||
|
|
{
|
|||
|
|
_PuppetNOwnerInfo _info;
|
|||
|
|
_info.dwOwnerID = dwOwnerUniqueID;
|
|||
|
|
_info.hPuppetActor = hActor;
|
|||
|
|
_info.pPuppetMonster = pMonsterActor;
|
|||
|
|
|
|||
|
|
PuppetnOnwerInfoList.insert(std::make_pair(dwOwnerUniqueID, _info));
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
_PuppetNOwnerInfo& _info = findIter->second;
|
|||
|
|
_info.hPuppetActor = hActor;
|
|||
|
|
_info.pPuppetMonster = pMonsterActor;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
//<2F><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>/ <20><>ȯ <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> <20><><EFBFBD>Ե<EFBFBD><D4B5><EFBFBD> <20>ʴ<EFBFBD> <20>༮<EFBFBD><E0BCAE><EFBFBD><EFBFBD> <20><><EFBFBD>ο<EFBFBD> <20><><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> <20≯<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>´<EFBFBD>.
|
|||
|
|
if (bSeperated == false)
|
|||
|
|
hNewVecList.push_back(hActor);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
std::map<DWORD, _PuppetNOwnerInfo>::iterator iter = PuppetnOnwerInfoList.begin();
|
|||
|
|
std::map<DWORD, _PuppetNOwnerInfo>::iterator endIter = PuppetnOnwerInfoList.end();
|
|||
|
|
for (; iter != endIter; ++iter)
|
|||
|
|
{
|
|||
|
|
_PuppetNOwnerInfo& _info = iter->second;
|
|||
|
|
|
|||
|
|
if (_info.hOwnerActor && _info.hPuppetActor)
|
|||
|
|
{
|
|||
|
|
/*
|
|||
|
|
//<2F><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>߰<EFBFBD> <20>Ѵ<EFBFBD>.
|
|||
|
|
//<2F><><EFBFBD><EFBFBD> <20><><EFBFBD>Ͱ<EFBFBD> <20><><EFBFBD><EFBFBD> <20>Ǵ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>ܵ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> <20>߰<EFBFBD> <20><> <20><><EFBFBD>´<EFBFBD>.(<28><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF> <20>߰<EFBFBD><DFB0><EFBFBD> <20><><EFBFBD><EFBFBD>)
|
|||
|
|
EtVector3 vOwnerDiff = (*_info.hOwnerActor->GetPosition()) - vPos;
|
|||
|
|
EtVector3 vPuppetDiff = (*_info.hPuppetActor->GetPosition()) - vPos;
|
|||
|
|
|
|||
|
|
float fOwnerLength = EtVec3LengthSq(&vOwnerDiff);
|
|||
|
|
float fPuppetLength = EtVec3LengthSq(&vPuppetDiff);
|
|||
|
|
*/
|
|||
|
|
|
|||
|
|
int nTargetTeam = _info.hOwnerActor->GetTeam();
|
|||
|
|
if (_info.hOwnerActor->IsAppliedThisStateBlow(STATE_BLOW::BLOW_149))
|
|||
|
|
nTargetTeam = _info.hOwnerActor->GetOriginalTeam();
|
|||
|
|
|
|||
|
|
/*
|
|||
|
|
//<2F><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>Ÿ<EFBFBD><C5B8><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>߰<EFBFBD>
|
|||
|
|
//<2F><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>Ÿ<EFBFBD><C5B8><EFBFBD> <20><> <20>ִٸ<D6B4> <20><>ȯ <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> <20>߰<EFBFBD> <20>ϰ<EFBFBD>, <20><><EFBFBD>ܵ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>߰<EFBFBD>
|
|||
|
|
if (nMyTeamID != nTargetTeam && fOwnerLength > fPuppetLength)
|
|||
|
|
*/
|
|||
|
|
|
|||
|
|
|
|||
|
|
//<2F>Ÿ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><>Ʈ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ȯ <20><><EFBFBD><EFBFBD> <20><>Ʈ <20><><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> <20>߰<EFBFBD> <20>Ѵ<EFBFBD>.
|
|||
|
|
if (hHiterActor &&
|
|||
|
|
nMyTeamID != nTargetTeam)
|
|||
|
|
{
|
|||
|
|
hNewVecList.push_back(_info.hPuppetActor);
|
|||
|
|
|
|||
|
|
hAddStateEffectActorList.push_back(_info.hOwnerActor);
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
hNewVecList.push_back(_info.hOwnerActor);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
//<2F><>ȯ <20><><EFBFBD><EFBFBD>/<2F><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ƴ<EFBFBD> <20><><EFBFBD><EFBFBD>(<28><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ϳ<EFBFBD><CFB3><EFBFBD> <20>ִ°<D6B4><C2B0><EFBFBD>) <20><><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> <20>߰<EFBFBD>
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
DnActorHandle hActor = _info.hOwnerActor ? _info.hOwnerActor : _info.hPuppetActor;
|
|||
|
|
if (hActor)
|
|||
|
|
hNewVecList.push_back(hActor);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
std::swap(hVecList, hNewVecList);
|
|||
|
|
|
|||
|
|
return (int)hVecList.size();
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::ScanActorByStateIndex(DNVector(DnActorHandle) &Veclist, STATE_BLOW::emBLOW_INDEX blowIndex)
|
|||
|
|
{
|
|||
|
|
DNVector(DnActorHandle) scanActorList;
|
|||
|
|
ScanActor(GetRoom(), *GetPosition(), FLT_MAX, scanActorList);
|
|||
|
|
int nListCount = (int)scanActorList.size();
|
|||
|
|
for (int i = 0; i < nListCount; ++i)
|
|||
|
|
{
|
|||
|
|
DnActorHandle hActor = scanActorList[i];
|
|||
|
|
if (hActor && hActor->IsDie() == false)
|
|||
|
|
{
|
|||
|
|
DNVector(DnBlowHandle) blowList;
|
|||
|
|
if (hActor->IsAppliedThisStateBlow(blowIndex))
|
|||
|
|
hActor->GetStateBlow()->GetStateBlowFromBlowIndex(blowIndex, blowList);
|
|||
|
|
|
|||
|
|
int nBlowCount = (int)blowList.size();
|
|||
|
|
for (int j = 0; j < nBlowCount; ++j)
|
|||
|
|
{
|
|||
|
|
DnBlowHandle hBlow = blowList[j];
|
|||
|
|
if (hBlow && hBlow->IsEnd() == false)
|
|||
|
|
{
|
|||
|
|
//<2F>ش<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD> <20><>ų <20><><EFBFBD><EFBFBD><EFBFBD>ڰ<EFBFBD> <20>ڽ<EFBFBD><DABD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> <20><><EFBFBD>´<EFBFBD>.
|
|||
|
|
CDnSkill::SkillInfo *pSkillInfo = const_cast<CDnSkill::SkillInfo*>(hBlow->GetParentSkillInfo());
|
|||
|
|
DnActorHandle hSkillActor = GetMySmartPtr();
|
|||
|
|
if (IsMonsterActor())
|
|||
|
|
{
|
|||
|
|
CDnMonsterActor* pMonsterActor = static_cast<CDnMonsterActor*>(hSkillActor.GetPointer());
|
|||
|
|
if (pMonsterActor)
|
|||
|
|
hSkillActor = pMonsterActor->GetSummonerPlayerActor();
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if (pSkillInfo && pSkillInfo->hSkillUser == hSkillActor)
|
|||
|
|
Veclist.push_back(hActor);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
|
|||
|
|
// Signal Rotate.
|
|||
|
|
void CDnActor::SetRotate( DWORD dwTime, float fStart, float fEnd, EtVector3 & vPos, bool bLeft )
|
|||
|
|
{
|
|||
|
|
m_bRotate = true;
|
|||
|
|
m_dwRotateStartTime = CDnActionBase::m_LocalTime;
|
|||
|
|
m_dwRotateTime = dwTime;
|
|||
|
|
m_fStartSpeed = fStart; m_fEndSpeed = fEnd;
|
|||
|
|
m_vRotAxis = vPos; m_bRotLeft = bLeft;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// Rotate.
|
|||
|
|
void CDnActor::ProcessRotate( LOCAL_TIME LocalTime, float fDelta )
|
|||
|
|
{
|
|||
|
|
if( !m_bRotate )
|
|||
|
|
return;
|
|||
|
|
|
|||
|
|
if( (LocalTime - m_dwRotateStartTime) > m_dwRotateTime )
|
|||
|
|
{
|
|||
|
|
m_bRotate = false;
|
|||
|
|
return;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
if( m_dwRotateStartTime == 0 ) m_dwRotateStartTime = LocalTime;
|
|||
|
|
|
|||
|
|
// <20>ӵ<EFBFBD>( ȸ<><C8B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD> )
|
|||
|
|
if( m_fStartSpeed == m_fEndSpeed )
|
|||
|
|
{
|
|||
|
|
m_fSpeedRot = m_fStartSpeed;
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
/*float frame = pObject->GetCurFrame();
|
|||
|
|
float w = ( frame - m_pSignal->GetStartFrame() ) / ( m_pSignal->GetEndFrame() - m_pSignal->GetStartFrame() );
|
|||
|
|
m_fSpeedRot = m_fStartSpeed + ( ( m_fEndSpeed - m_fStartSpeed ) * w ); */
|
|||
|
|
m_fSpeedRot = m_fStartSpeed;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
// <20><><EFBFBD><EFBFBD>.
|
|||
|
|
if( m_bRotLeft )
|
|||
|
|
m_fSpeedRot = -m_fSpeedRot;
|
|||
|
|
|
|||
|
|
m_fSpeedRot *= fDelta;
|
|||
|
|
|
|||
|
|
//// ȸ<><C8B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǥ<EFBFBD>̵<EFBFBD>.
|
|||
|
|
m_Cross.MoveLocalXAxis( m_vRotAxis.x );
|
|||
|
|
m_Cross.MoveLocalYAxis( m_vRotAxis.y );
|
|||
|
|
m_Cross.MoveLocalZAxis( m_vRotAxis.z );
|
|||
|
|
|
|||
|
|
// ȸ<><C8B8>.
|
|||
|
|
m_Cross.RotateYaw( (-m_fSpeedRot) );
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
#if defined(PRE_FIX_61382)
|
|||
|
|
//<2F><><EFBFBD>ΰ<EFBFBD><CEB0><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><>ȯ.
|
|||
|
|
DnActorHandle CDnActor::GetOwnerActorHandle(DnActorHandle hActor)
|
|||
|
|
{
|
|||
|
|
DnActorHandle hOwnerActor = hActor;
|
|||
|
|
|
|||
|
|
if (hActor && hActor->IsMonsterActor())
|
|||
|
|
{
|
|||
|
|
CDnMonsterActor* pMonsterActor = static_cast<CDnMonsterActor*>(hActor.GetPointer());
|
|||
|
|
if (pMonsterActor && pMonsterActor->IsPuppetSummonMonster())
|
|||
|
|
hOwnerActor = pMonsterActor->GetSummonerPlayerActor();
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
return hOwnerActor;
|
|||
|
|
}
|
|||
|
|
#endif // PRE_FIX_61382
|
|||
|
|
|
|||
|
|
#if defined(PRE_ADD_65808)
|
|||
|
|
void CDnActor::AddSummonMonsterGlyphInfo(int monsterID, int glyphID)
|
|||
|
|
{
|
|||
|
|
std::map<int, std::list<int>>::iterator findIter = m_SummonMonsterGlyphInfo.find(monsterID);
|
|||
|
|
if (findIter != m_SummonMonsterGlyphInfo.end())
|
|||
|
|
{
|
|||
|
|
findIter->second.push_back(glyphID);
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
std::list<int> glyphIDList;
|
|||
|
|
glyphIDList.push_back(glyphID);
|
|||
|
|
|
|||
|
|
m_SummonMonsterGlyphInfo.insert(std::make_pair(monsterID, glyphIDList));
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::AddSummonMonsterGlyphStateEffectID(int monsterID, int glyphID, DWORD dwMonsterUniqueID, int stateEffectID)
|
|||
|
|
{
|
|||
|
|
std::map<int, std::map<int, std::list<_StateEffectInfo>>>::iterator findIter = m_SummonMonsterGlyphStateEffectIDs.find(monsterID);
|
|||
|
|
|
|||
|
|
//<2F>ش<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ٸ<EFBFBD>
|
|||
|
|
if (findIter == m_SummonMonsterGlyphStateEffectIDs.end())
|
|||
|
|
{
|
|||
|
|
//<2F><><EFBFBD>ο<EFBFBD> glyphID, stateEffectIDList<73><74> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ѵ<EFBFBD>.
|
|||
|
|
std::map<int, std::list<_StateEffectInfo>> newList;
|
|||
|
|
std::list<_StateEffectInfo> stateEffectList;
|
|||
|
|
_StateEffectInfo info;
|
|||
|
|
info.nStateEffectID = stateEffectID;
|
|||
|
|
info.dwUniqueID = dwMonsterUniqueID;
|
|||
|
|
|
|||
|
|
stateEffectList.push_back(info);
|
|||
|
|
|
|||
|
|
newList.insert(std::make_pair(glyphID, stateEffectList));
|
|||
|
|
|
|||
|
|
m_SummonMonsterGlyphStateEffectIDs.insert(std::make_pair(monsterID, newList));
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
std::map<int, std::list<_StateEffectInfo>>& oldList = findIter->second;
|
|||
|
|
|
|||
|
|
std::map<int, std::list<_StateEffectInfo>>::iterator iter = oldList.find(glyphID);
|
|||
|
|
if (iter != oldList.end())
|
|||
|
|
{
|
|||
|
|
//<2F>̹<EFBFBD> glyphID<49><44> <20><><EFBFBD><EFBFBD> <20>Ǿ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> stateEffectID<49><44> <20><><EFBFBD><EFBFBD><EFBFBD>Ѵ<EFBFBD>.
|
|||
|
|
_StateEffectInfo info;
|
|||
|
|
info.nStateEffectID = stateEffectID;
|
|||
|
|
info.dwUniqueID = dwMonsterUniqueID;
|
|||
|
|
|
|||
|
|
iter->second.push_back(info);
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD>ʹ<EFBFBD> <20><><EFBFBD><EFBFBD> <20>Ǿ<EFBFBD> <20>ִµ<D6B4>, glyphID<49><44> <20><><EFBFBD><EFBFBD> <20>Ǿ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>..
|
|||
|
|
//<2F><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF> <20><><EFBFBD><EFBFBD>Ʈ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,
|
|||
|
|
std::list<_StateEffectInfo> stateEffectList;
|
|||
|
|
|
|||
|
|
_StateEffectInfo info;
|
|||
|
|
info.nStateEffectID = stateEffectID;
|
|||
|
|
info.dwUniqueID = dwMonsterUniqueID;
|
|||
|
|
|
|||
|
|
stateEffectList.push_back(info);
|
|||
|
|
|
|||
|
|
//glyphID<49><44> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF> <20><><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> <20><><EFBFBD><EFBFBD> <20>Ѵ<EFBFBD>.
|
|||
|
|
oldList.insert(std::make_pair(glyphID, stateEffectList));
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::RemoveSummonMonsterGlyphInfo(int monsterID, int glyphID)
|
|||
|
|
{
|
|||
|
|
std::map<int, std::list<int>>::iterator findIter = m_SummonMonsterGlyphInfo.find(monsterID);
|
|||
|
|
if (findIter != m_SummonMonsterGlyphInfo.end())
|
|||
|
|
{
|
|||
|
|
std::list<int>& oldList = findIter->second;
|
|||
|
|
std::list<int>::iterator iter = oldList.begin();
|
|||
|
|
std::list<int>::iterator endIter = oldList.end();
|
|||
|
|
|
|||
|
|
int nGlyphID = 0;
|
|||
|
|
for (; iter != endIter; ++iter)
|
|||
|
|
{
|
|||
|
|
nGlyphID = (*iter);
|
|||
|
|
|
|||
|
|
if (nGlyphID == glyphID)
|
|||
|
|
{
|
|||
|
|
oldList.erase(iter);
|
|||
|
|
break;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
//<2F><>ȯ<EFBFBD><C8AF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>߿<EFBFBD> monsterID<49><44> <20>ش<EFBFBD><D8B4>ϴ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>͵<EFBFBD><CDB5><EFBFBD> ã<>´<EFBFBD>..
|
|||
|
|
std::list<DnMonsterActorHandle> monsterActorList;
|
|||
|
|
FindSummonMonster(monsterID, monsterActorList);
|
|||
|
|
|
|||
|
|
std::list<DnMonsterActorHandle>::iterator iter = monsterActorList.begin();
|
|||
|
|
std::list<DnMonsterActorHandle>::iterator endIter = monsterActorList.end();
|
|||
|
|
for (; iter != endIter; ++iter)
|
|||
|
|
{
|
|||
|
|
DnMonsterActorHandle hMonsterActor = (*iter);
|
|||
|
|
|
|||
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> <20><>ȸ <20>ϴµ<CFB4><C2B5><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ȵȴ<C8B5>..
|
|||
|
|
RemoveSummonMonsterStateEffectByGlyph(hMonsterActor, monsterID, glyphID);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
//<2F><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>⼭ <20><><EFBFBD><EFBFBD> <20>ǵ<EFBFBD><C7B5><EFBFBD> <20>Ѵ<EFBFBD>.
|
|||
|
|
RemoveSummonMonsterGlyphStateEffects(monsterID);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::RemoveSummonMonsterStateEffectByGlyph(DnMonsterActorHandle hMonsterActor, int monsterID, int glyphID)
|
|||
|
|
{
|
|||
|
|
std::map<int, std::map<int, std::list<_StateEffectInfo>>>::iterator findIter = m_SummonMonsterGlyphStateEffectIDs.find(monsterID);
|
|||
|
|
|
|||
|
|
if (findIter != m_SummonMonsterGlyphStateEffectIDs.end())
|
|||
|
|
{
|
|||
|
|
std::map<int, std::list<_StateEffectInfo>>& oldList = findIter->second;
|
|||
|
|
|
|||
|
|
std::map<int, std::list<_StateEffectInfo>>::iterator glyphIter = oldList.find(glyphID);
|
|||
|
|
if (glyphIter != oldList.end())
|
|||
|
|
{
|
|||
|
|
std::list<_StateEffectInfo>& stateEffectIDList = glyphIter->second;
|
|||
|
|
|
|||
|
|
if (stateEffectIDList.empty() == false)
|
|||
|
|
{
|
|||
|
|
std::list<_StateEffectInfo>::iterator iter = stateEffectIDList.begin();
|
|||
|
|
std::list<_StateEffectInfo>::iterator endIter = stateEffectIDList.end();
|
|||
|
|
|
|||
|
|
for (; iter != endIter; ++iter)
|
|||
|
|
{
|
|||
|
|
_StateEffectInfo& info = (*iter);
|
|||
|
|
|
|||
|
|
if (hMonsterActor && hMonsterActor->GetUniqueID() == info.dwUniqueID)
|
|||
|
|
hMonsterActor->CmdRemoveStateEffectFromID(info.nStateEffectID);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
//<2F><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ͱ<EFBFBD> <20><EFBFBD><D7BE><EFBFBD><EFBFBD><EFBFBD> PlayerActor::OnDieSummonMonster<65>Լ<EFBFBD><D4BC><EFBFBD><EFBFBD><EFBFBD> ȣ<><C8A3> <20><>.
|
|||
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD>Ͱ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>̹Ƿ<CCB9> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF><EFBFBD><EFBFBD> ã<><C3A3> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ʿ<EFBFBD><CABF><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>..
|
|||
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>..
|
|||
|
|
void CDnActor::RemoveSummonMonsterGlyphStateEffects(int monsterID)
|
|||
|
|
{
|
|||
|
|
std::map<int, std::map<int, std::list<_StateEffectInfo>>>::iterator findIter = m_SummonMonsterGlyphStateEffectIDs.find(monsterID);
|
|||
|
|
if (findIter != m_SummonMonsterGlyphStateEffectIDs.end())
|
|||
|
|
{
|
|||
|
|
m_SummonMonsterGlyphStateEffectIDs.erase(findIter);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
bool CDnActor::GetSummonMonsterGlyphInfo(int monsterID, std::list<int>& glyphIDs)
|
|||
|
|
{
|
|||
|
|
std::map<int, std::list<int>>::iterator findIter = m_SummonMonsterGlyphInfo.find(monsterID);
|
|||
|
|
if (findIter != m_SummonMonsterGlyphInfo.end())
|
|||
|
|
{
|
|||
|
|
std::list<int>& oldList = findIter->second;
|
|||
|
|
std::list<int>::iterator iter = oldList.begin();
|
|||
|
|
std::list<int>::iterator endIter = oldList.end();
|
|||
|
|
|
|||
|
|
int nGlyphID = 0;
|
|||
|
|
for (; iter != endIter; ++iter)
|
|||
|
|
{
|
|||
|
|
nGlyphID = (*iter);
|
|||
|
|
|
|||
|
|
glyphIDs.push_back(nGlyphID);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
return true;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
return false;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::FindSummonMonster(int monsterID, std::list<DnMonsterActorHandle>& monsterActorList)
|
|||
|
|
{
|
|||
|
|
std::map<int, std::list<DnMonsterActorHandle> >::iterator iter = m_mapSummonMonsterByGroup.begin();
|
|||
|
|
std::map<int, std::list<DnMonsterActorHandle> >::iterator endIter = m_mapSummonMonsterByGroup.end();
|
|||
|
|
|
|||
|
|
for (; iter != endIter; ++iter)
|
|||
|
|
{
|
|||
|
|
std::list<DnMonsterActorHandle>::iterator monsterIter = iter->second.begin();
|
|||
|
|
std::list<DnMonsterActorHandle>::iterator monsterEndIter = iter->second.end();
|
|||
|
|
for (; monsterIter != monsterEndIter; ++monsterIter)
|
|||
|
|
{
|
|||
|
|
DnMonsterActorHandle hMonster = *monsterIter;
|
|||
|
|
|
|||
|
|
if (!hMonster)
|
|||
|
|
continue;
|
|||
|
|
|
|||
|
|
if (hMonster->GetMonsterClassID() == monsterID)
|
|||
|
|
{
|
|||
|
|
monsterActorList.push_back(hMonster);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
{
|
|||
|
|
for( std::list<DnMonsterActorHandle>::iterator itor=m_listSummonMonster.begin() ; itor!=m_listSummonMonster.end(); ++itor)
|
|||
|
|
{
|
|||
|
|
DnMonsterActorHandle hMonster = *itor;
|
|||
|
|
if (!hMonster || hMonster->GetMonsterClassID() != monsterID)
|
|||
|
|
continue;
|
|||
|
|
|
|||
|
|
monsterActorList.push_back(hMonster);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
#endif // PRE_ADD_65808
|
|||
|
|
|
|||
|
|
|
|||
|
|
#if defined(PRE_FIX_68898)
|
|||
|
|
void CDnActor::SetSkipEndAction(bool isSkipEndAction)
|
|||
|
|
{
|
|||
|
|
if (IsProcessSkill() && m_hProcessSkill)
|
|||
|
|
{
|
|||
|
|
CDnPartialPlayProcessor* pPartialPlayProcess = static_cast<CDnPartialPlayProcessor*>(m_hProcessSkill->GetProcessor( IDnSkillProcessor::PARTIAL_PLAY_ANI ));
|
|||
|
|
if (pPartialPlayProcess)
|
|||
|
|
pPartialPlayProcess->SetSkipEndAction(isSkipEndAction);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
#endif // PRE_FIX_68898
|
|||
|
|
|
|||
|
|
|
|||
|
|
void CDnActor::ResetDamageRemainTime()
|
|||
|
|
{
|
|||
|
|
m_mapLastDamageTime.clear();
|
|||
|
|
m_nLastDamageHitterActionIndex = 0;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
LOCAL_TIME CDnActor::GetDamageRemainTime( DWORD dwActorUniqueID )
|
|||
|
|
{
|
|||
|
|
map<DWORD, LOCAL_TIME>::iterator iter = m_mapLastDamageTime.find( dwActorUniqueID );
|
|||
|
|
if( m_mapLastDamageTime.end() != iter )
|
|||
|
|
return iter->second;
|
|||
|
|
else
|
|||
|
|
return 0;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::SetDamageRemainTime( DWORD dwActorUniqueID, LOCAL_TIME LastDamageTime, int nCurrentActionIndex )
|
|||
|
|
{
|
|||
|
|
m_mapLastDamageTime[ dwActorUniqueID ] = LastDamageTime;
|
|||
|
|
m_nLastDamageHitterActionIndex = nCurrentActionIndex;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnActor::SetLastDamageHitUniqueID( DWORD dwActorUniqueID, int iLastHitUniqueID )
|
|||
|
|
{
|
|||
|
|
m_mapLastHitUniqueID[ dwActorUniqueID ] = iLastHitUniqueID;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
int CDnActor::GetLastDamageHitUniqueID( DWORD dwActorUniqueID )
|
|||
|
|
{
|
|||
|
|
if( m_mapLastHitUniqueID.end() != m_mapLastHitUniqueID.find( dwActorUniqueID ) )
|
|||
|
|
return m_mapLastHitUniqueID[ dwActorUniqueID ];
|
|||
|
|
else
|
|||
|
|
return -1;
|
|||
|
|
};
|