126 lines
3.7 KiB
C++
126 lines
3.7 KiB
C++
|
|
#include "StdAfx.h"
|
|||
|
|
#include "DnDisarmamentBlow.h"
|
|||
|
|
#include "DnPlayerActor.h"
|
|||
|
|
|
|||
|
|
#if !defined( USE_BOOST_MEMPOOL )
|
|||
|
|
#ifdef _DEBUG
|
|||
|
|
#define new new(_NORMAL_BLOCK,__FILE__,__LINE__)
|
|||
|
|
#endif
|
|||
|
|
#endif // #if !defined( USE_BOOST_MEMPOOL )
|
|||
|
|
|
|||
|
|
CDnDisarmamentBlow::CDnDisarmamentBlow( DnActorHandle hActor, const char* szValue ) : CDnBlow( hActor )
|
|||
|
|
{
|
|||
|
|
m_StateBlow.emBlowIndex = STATE_BLOW::BLOW_237;
|
|||
|
|
SetValue( szValue );
|
|||
|
|
m_fValue = 0.0f;
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
CDnDisarmamentBlow::~CDnDisarmamentBlow(void)
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnDisarmamentBlow::OnBegin( LOCAL_TIME LocalTime, float fDelta )
|
|||
|
|
{
|
|||
|
|
OutputDebug( "%s\n", __FUNCTION__);
|
|||
|
|
|
|||
|
|
#if defined(PRE_ADD_50907)
|
|||
|
|
if (m_hActor)
|
|||
|
|
m_hActor->AddDisarmamentRefCount();
|
|||
|
|
|
|||
|
|
//<2F><><EFBFBD>ʿ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>⸦ <20><EFBFBD> <20><><EFBFBD>´<EFBFBD>.
|
|||
|
|
if (m_hActor && m_hActor->GetDisarmamentRefCount() == 1)
|
|||
|
|
{
|
|||
|
|
DnWeaponHandle hOrigWeapon = m_hActor->GetWeapon(0);
|
|||
|
|
bool bOrigSelefDelete = m_hActor->GetWeaponSelfDelete(0);
|
|||
|
|
|
|||
|
|
//ChangeWeaponBlow<6F><77><EFBFBD>¿<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>θ<EFBFBD> <20>ǵ<EFBFBD><C7B5><EFBFBD><EFBFBD><EFBFBD> <20>ȴ<EFBFBD>..
|
|||
|
|
|
|||
|
|
// //ChangeWeapon<6F><6E><EFBFBD><EFBFBD> <20><><EFBFBD>Ⱑ <20><><EFBFBD><EFBFBD> <20>Ǿ<EFBFBD><C7BE>ٸ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ChangeWeapon<6F><6E> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ǿ<EFBFBD><C7BE><EFBFBD> <20>Ѵ<EFBFBD>.
|
|||
|
|
// if (m_hActor->GetChangeWeaponRefCount() > 0)
|
|||
|
|
// {
|
|||
|
|
// hOrigWeapon = m_hActor->GetOrigWeaponWhenChangeWeapon();
|
|||
|
|
// bOrigSelefDelete = m_hActor->GetOrigWeaponWhenChangeWeaponSelfDelete();
|
|||
|
|
// }
|
|||
|
|
|
|||
|
|
m_hActor->SetOrigWeaponWhenDisarmament(hOrigWeapon, bOrigSelefDelete);
|
|||
|
|
|
|||
|
|
m_hActor->SetSkipOnAttatchDetachWeapon(true); //<2F><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>س<EFBFBD><D8B3>ƾ<EFBFBD> DetachWeapon<6F><6E><EFBFBD><EFBFBD> MASkillUser::OnDetachWeapon<6F>Լ<EFBFBD> ȣ<><C8A3><EFBFBD><EFBFBD> <20>ȵ<EFBFBD>.(<28>Լ<EFBFBD> <20><><EFBFBD>ο<EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF> <20><><EFBFBD><EFBFBD> ȣ<><C8A3><EFBFBD><EFBFBD> <20><> <20><> <20><><EFBFBD><EFBFBD>)
|
|||
|
|
m_hActor->SetChangeWeaponLock(false);
|
|||
|
|
m_hActor->SetSkipChangeWeaponAction(true);
|
|||
|
|
m_hActor->DetachWeapon(0);
|
|||
|
|
m_hActor->SetSkipChangeWeaponAction(false);
|
|||
|
|
m_hActor->SetChangeWeaponLock(true);
|
|||
|
|
m_hActor->SetSkipOnAttatchDetachWeapon(false);
|
|||
|
|
|
|||
|
|
if (m_hActor->IsPlayerActor())
|
|||
|
|
{
|
|||
|
|
CDnPlayerActor* pPlayerActor = dynamic_cast<CDnPlayerActor*>(m_hActor.GetPointer());
|
|||
|
|
if (pPlayerActor)
|
|||
|
|
pPlayerActor->SetBattleMode(false);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
#endif // PRE_ADD_50907
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
void CDnDisarmamentBlow::OnEnd( LOCAL_TIME LocalTime, float fDelta )
|
|||
|
|
{
|
|||
|
|
OutputDebug( "%s\n", __FUNCTION__);
|
|||
|
|
|
|||
|
|
#if defined(PRE_ADD_50907)
|
|||
|
|
if (m_hActor)
|
|||
|
|
m_hActor->RemoveDisarmamentRefCount();
|
|||
|
|
|
|||
|
|
if (m_hActor && m_hActor->GetDisarmamentRefCount() == 0)
|
|||
|
|
{
|
|||
|
|
//<2F><><EFBFBD><EFBFBD> <20>ٽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>⺻ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ʰ<EFBFBD> <20><>.
|
|||
|
|
//<2F><EFBFBD><D7B7><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ô<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>ϰ<EFBFBD> <20>ϰ<EFBFBD>, <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ϵ<EFBFBD><CFB5><EFBFBD><EFBFBD><EFBFBD>.
|
|||
|
|
m_hActor->SetChangeWeaponLock(false);
|
|||
|
|
//m_hActor->SetSkipChangeWeaponAction(true);
|
|||
|
|
m_hActor->SetSkipOnAttatchDetachWeapon(true); //<2F><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>س<EFBFBD><D8B3>ƾ<EFBFBD> AttachWeapon/DetachWeapon<6F><6E><EFBFBD><EFBFBD> MASkillUser::OnAttachWeapon/OnDetachWeapon<6F>Լ<EFBFBD> ȣ<><C8A3><EFBFBD><EFBFBD> <20>ȵ<EFBFBD>.(<28>Լ<EFBFBD> <20><><EFBFBD>ο<EFBFBD><CEBF><EFBFBD> <20><><EFBFBD><EFBFBD>ȿ<EFBFBD><C8BF> <20><><EFBFBD><EFBFBD>/<2F>߰<EFBFBD> ȣ<><C8A3><EFBFBD><EFBFBD> <20><> <20><> <20><><EFBFBD><EFBFBD>)
|
|||
|
|
|
|||
|
|
DnWeaponHandle hOrigWeapon = m_hActor->GetOrigWeaponWhenDisarmament();
|
|||
|
|
bool bSelfDelete = m_hActor->GetOrigWeaponWhenDisarmamentSelfDelete();
|
|||
|
|
|
|||
|
|
if (hOrigWeapon)
|
|||
|
|
m_hActor->AttachWeapon(hOrigWeapon, 0, bSelfDelete);
|
|||
|
|
else
|
|||
|
|
m_hActor->DetachWeapon(0);
|
|||
|
|
|
|||
|
|
//m_hActor->SetSkipChangeWeaponAction(false);
|
|||
|
|
m_hActor->SetSkipOnAttatchDetachWeapon(false);
|
|||
|
|
|
|||
|
|
if (m_hActor->IsPlayerActor())
|
|||
|
|
{
|
|||
|
|
CDnPlayerActor* pPlayerActor = dynamic_cast<CDnPlayerActor*>(m_hActor.GetPointer());
|
|||
|
|
if (pPlayerActor)
|
|||
|
|
{
|
|||
|
|
if (hOrigWeapon)
|
|||
|
|
pPlayerActor->SetBattleMode(true);
|
|||
|
|
else
|
|||
|
|
pPlayerActor->SetBattleMode(false);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
#endif // PRE_ADD_50907
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
|
|||
|
|
#if defined(PRE_ADD_PREFIX_SYSTE_RENEW)
|
|||
|
|
void CDnDisarmamentBlow::AddStateEffectValue(const char* szOrigValue, const char* szAddValue, std::string& szNewValue)
|
|||
|
|
{
|
|||
|
|
char szBuff[128] = {0, };
|
|||
|
|
|
|||
|
|
szNewValue = szOrigValue;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
void CDnDisarmamentBlow::RemoveStateEffectValue(const char* szOrigValue, const char* szAddValue, std::string& szNewValue)
|
|||
|
|
{
|
|||
|
|
char szBuff[128] = {0, };
|
|||
|
|
|
|||
|
|
szNewValue = szOrigValue;
|
|||
|
|
}
|
|||
|
|
#endif // PRE_ADD_PREFIX_SYSTE_RENEW
|