DragonNest/Server/DNGameServer/MSActionChangeProjectile.cpp
2024-12-20 16:56:44 +08:00

50 lines
2.3 KiB
C++
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#include "StdAfx.h"
#include "MSActionChangeProjectile.h"
#include "DnWeapon.h"
#include "DnProjectile.h"
#include "DnSkillBase.h"
int MSActionChangeProjectile::ID = -1;
MSActionChangeProjectile::MSActionChangeProjectile()
{
m_nSourceWeaponID = -1;
m_nChangeWeaponID = -1;
m_pProjectile = NULL;
}
MSActionChangeProjectile::~MSActionChangeProjectile()
{
SAFE_DELETE( m_pProjectile );
}
void MSActionChangeProjectile::Initialize( int nSourceWeaponID, int nChangeWeaponID )
{
m_nSourceWeaponID = nSourceWeaponID;
m_nChangeWeaponID = nChangeWeaponID;
CDnSkillBase *pSkill = dynamic_cast<CDnSkillBase *>(this);
if( !pSkill ) return;
DnActorHandle hActor = pSkill->GetActor();
if( !hActor ) return;
m_pProjectile = new CDnProjectile( STATICFUNC() hActor, false, false );
m_pProjectile->CDnWeapon::Initialize( m_nChangeWeaponID, 0 );
m_pProjectile->CDnWeapon::CreateObject();
}
void MSActionChangeProjectile::Execute( LOCAL_TIME LocalTime, float fDelta )
{
}
void MSActionChangeProjectile::Process( LOCAL_TIME LocalTime, float fDelta )
{
}
bool MSActionChangeProjectile::IsFinishAction()
{
return true;
}