Files
Leviathan/Client/Game/game/GameSystem/SGameOtherEffect.h
T
2026-06-01 12:46:52 +02:00

211 lines
6.7 KiB
C++

#pragma once
#include "K3DTypes.h"
#include "SGameObject.h"
#include "MotionBase.h"
class KViewportObject;
class KSeqModel;
class SGameAvatarEx;
class SGameOtherEffect : public SGameObject
{
protected:
enum EFFECT_STEP
{
STEP_00 = 0,
STEP_01,
STEP_02,
STEP_03,
STEP_04,
STEP_05,
};
KSeqModel* m_pEffect;
struct _MOTION_FX_SET* m_pMotionSet;
int m_nFxID;
AR_HANDLE m_hCaster;
AR_HANDLE m_hTarget;
SGameAvatarEx* m_pCaster;
SGameAvatarEx* m_pTarget;
const K3DMatrix* m_pCasterEPMatrix;
const K3DMatrix* m_pTargetEPMatrix;
bool m_bIsEnd;
DWORD m_dwTime;
DWORD m_dwOldTime;
float m_fSpeed;
EFFECT_STEP m_nStep;
bool m_bEndEffect;
K3DVector m_vPosition;
float m_fAcceleration;
int m_nFxType;
int m_nSoundId;
std::string m_strSoundName;
public:
EFFECT_STEP GetStep() { return m_nStep; }
bool IsEnd() { return m_bIsEnd; }
int GetFxID() { return m_nFxID; }
virtual void EndEffect() {}
virtual void SetNextStepEffect() {}
AR_HANDLE GetCasterHandle() { return m_hCaster; }
AR_HANDLE GetTargetHandle() { return m_hTarget; }
int GetFxType() { return m_nFxType; }
public:
void SetStep( EFFECT_STEP nStep ) { m_nStep = nStep; }
void SetEnd( bool bEnd );
void SetRenderFlagOff( KSeqModel* pSeqModel );
virtual void SetMotionSetData( int nFxSetID );
virtual void SetPosition( const K3DVector* vPos ) {};
virtual void SetAnimation() {};
virtual void SetFxID( int nFXID ) { m_nFxID = nFXID; }
virtual void SetFxType( int nFxType ) { m_nFxType = nFxType; }
public:
virtual bool Process( DWORD dwTime, unsigned long uProcessBitVector=0 );
virtual bool Render( unsigned long uRenderBitVector, class KViewportObject** ppViewportList, int nViewportCount );
public:
bool CheckCaster();
bool CheckTarget();
const K3DMatrix* GetBoneFxMat( class SGameAvatarEx * pAvatar, int nFxPos );
void ResultMatrix( K3DMatrix& vOut, SGameAvatarEx* pAvatar, const K3DMatrix* pMatrix );
void ResultAcc( const K3DVector* vStart, const K3DVector* vEnd, float fSpeed );
float RandomNumber(float fMin, float fMax);
K3DVector RandomNumber(K3DVector vMin, K3DVector vMax);
void PlaySoundFx( SGameAvatarEx* pCaster, struct _MOTION_FX_SET* pFxSet, int nPlayStep, K3DVector* vPosition );
public:
SGameOtherEffect( AR_HANDLE hCaster, AR_HANDLE hTarget, SGameObject * pMsgHandler );
virtual ~SGameOtherEffect();
};
//////////////////////////////////////////////////////////////////////////////////////////////
/// 혼돈의 잔재 이펙트
class SGameChaosEffect : public SGameOtherEffect
{
private:
KSeqModel* m_pThrowFx;
KSeqModel* m_pHittingFx;
KSeqModel* m_pDrainHittingFx;
struct _MOTION_FX_SET* m_pThrowFxSet;
struct _MOTION_FX_SET* m_pHittingFxSet;
struct _MOTION_FX_SET* m_pDrainHittingFxSet;
K3DVector m_vPathPosition;
K3DVector m_vRandomPathPosition;
short m_nMoveCount;
short m_nMaxMoveCount;
K3DMatrix m_matCaster;
K3DMatrix m_matTarget;
int m_nLakSize;
public:
void CallNextStep( DWORD dwTime );
void SetAnimation();
virtual void SetMotionSetData( int nFxSetID );
void SetLakSize( int nSize );
public:
virtual bool Process( DWORD dwTime, unsigned long uProcessBitVector=0 );
virtual bool Render( unsigned long uRenderBitVector, class KViewportObject** ppViewportList, int nViewportCount );
public:
SGameChaosEffect( AR_HANDLE hCaster, AR_HANDLE hTarget, SGameObject * pMsgHandler );
virtual ~SGameChaosEffect();
};
//////////////////////////////////////////////////////////////////////////////////////////////
/// 크리처 진화 이펙트
class SGameCreatureEVEffect : public SGameOtherEffect
{
private:
KSeqModel* m_pRevolutionFx;
public:
void SetAnimation();
public:
virtual bool Process( DWORD dwTime, unsigned long uProcessBitVector=0 );
virtual bool Render( unsigned long uRenderBitVector, class KViewportObject** ppViewportList, int nViewportCount );
public:
SGameCreatureEVEffect( AR_HANDLE hCaster, AR_HANDLE hTarget, SGameObject * pMsgHandler );
virtual ~SGameCreatureEVEffect();
};
//////////////////////////////////////////////////////////////////////////////////////////////
/// 크리처 캐스팅 소환 이펙트
class SGameCastingSummonCreatureEffect : public SGameOtherEffect
{
private:
KSeqModel* m_pSummonEffect;
DWORD m_dwVisibleTime;
DWORD m_dwCatingTime;
public:
void SetAnimation();
void SetPosition( const K3DVector* vPos );
void SetCastingTime( DWORD dwCastingTime );
public:
virtual void EndEffect();
virtual bool Process( DWORD dwTime, unsigned long uProcessBitVector=0 );
virtual bool Render( unsigned long uRenderBitVector, class KViewportObject** ppViewportList, int nViewportCount );
public:
SGameCastingSummonCreatureEffect( AR_HANDLE hCaster, AR_HANDLE hTarget, SGameObject * pMsgHandler );
virtual ~SGameCastingSummonCreatureEffect();
};
//////////////////////////////////////////////////////////////////////////////////////////////
/// 크리처 소환 이펙트
class SGameSummonCreatureEffect : public SGameOtherEffect
{
private:
DWORD m_dwVisibleTime;
DWORD m_dwOldTime;
DWORD m_dwLeftTime;
public:
virtual bool Process( DWORD dwTime, unsigned long uProcessBitVector=0 );
virtual bool Render( unsigned long uRenderBitVector, class KViewportObject** ppViewportList, int nViewportCount );
public:
SGameSummonCreatureEffect( AR_HANDLE hCaster, AR_HANDLE hTarget, SGameObject * pMsgHandler );
virtual ~SGameSummonCreatureEffect();
};
//////////////////////////////////////////////////////////////////////////////////////////////
/// 크리처 역소환 이펙트
class SGameUnSummonCreatureEffect : public SGameOtherEffect
{
private:
KSeqModel* m_pUnSummonEffect;
DWORD m_dwVisibleTime;
DWORD m_dwOldTime;
DWORD m_dwLeftTime;
public:
void SetAnimation();
public:
virtual bool Process( DWORD dwTime, unsigned long uProcessBitVector=0 );
virtual bool Render( unsigned long uRenderBitVector, class KViewportObject** ppViewportList, int nViewportCount );
public:
SGameUnSummonCreatureEffect( AR_HANDLE hCaster, AR_HANDLE hTarget, SGameObject * pMsgHandler );
virtual ~SGameUnSummonCreatureEffect();
};
//////////////////////////////////////////////////////////////////////////////////////////////
/// 크리처 테이밍 이펙트
class SGameTamingEffect : public SGameOtherEffect
{
private:
KSeqModel* m_pTamingEffect;
public:
void SetAnimation();
public:
virtual void SetNextStepEffect();
virtual void EndEffect();
virtual bool Process( DWORD dwTime, unsigned long uProcessBitVector=0 );
virtual bool Render( unsigned long uRenderBitVector, class KViewportObject** ppViewportList, int nViewportCount );
public:
SGameTamingEffect( AR_HANDLE hCaster, AR_HANDLE hTarget, SGameObject * pMsgHandler );
virtual ~SGameTamingEffect();
};