83 lines
3.5 KiB
C++
83 lines
3.5 KiB
C++
#pragma once
|
||
|
||
#include "DnActor.h"
|
||
#include "DnSimpleParts.h"
|
||
#include "MASingleBody.h"
|
||
#include "MAWalkMovement.h"
|
||
#include "DnPlayerActor.h"
|
||
#include "DnVehicleState.h"
|
||
|
||
class CDnVehicleActor : public CDnActor, public CDnVehicleState, virtual public MASingleBody
|
||
{
|
||
|
||
public:
|
||
CDnVehicleActor( CMultiRoom *pRoom, int nClassID );
|
||
virtual ~CDnVehicleActor();
|
||
|
||
virtual MAMovementBase* CreateMovement();
|
||
|
||
virtual bool Initialize();
|
||
virtual bool IsVehicleActor() { return true; }
|
||
virtual int GetMoveSpeed();
|
||
virtual void OnDrop( float fCurVelocity );
|
||
virtual void OnFall( float fCurVelocity );
|
||
virtual void CmdMove( EtVector3 &vPos, const char *szActionName, int nLoopCount = 0, float fBlendFrame = 3.f );
|
||
virtual void CmdStop( const char *szActionName, int nLoopCount = 0, float fBlendFrame = 3.f, float fStartFrame = 0.f, bool bResetStop = false );
|
||
virtual int CmdAddStateEffect( const CDnSkill::SkillInfo* pParentSkill, STATE_BLOW::emBLOW_INDEX emBlowIndex, int nDurationTime, const char *szParam, bool bOnPlayerInit = false, bool bCheckCanBegin = true , bool bEternity = false );
|
||
virtual void CmdAction( const char *szActionName, int nLoopCount = 0, float fBlendFrame = 3.f, bool bCheckOverlapAction = true, bool bFromStateBlow = false, bool bSkillChain = false );
|
||
virtual void Process( LOCAL_TIME LocalTime, float fDelta );
|
||
virtual void OnSignal( SignalTypeEnum Type, void *pPtr, LOCAL_TIME LocalTime, LOCAL_TIME SignalStartTime, LOCAL_TIME SignalEndTime, int nSignalIndex );
|
||
virtual void OnDispatchMessage( CDNUserSession *pSession, DWORD dwActorProtocol, BYTE *pPacket );
|
||
virtual bool SetActionQueue( const char *szActionName, int nLoopCount = 0, float fBlendFrame = 3.f, float fStartFrame = 0.f, bool bCheck = true, bool bCheckStateEffect = true );
|
||
virtual void ProcessDie( LOCAL_TIME LocalTime, float fDelta );
|
||
virtual void SendRemoveStateEffect( STATE_BLOW::emBLOW_INDEX emBlowIndex );
|
||
virtual void SetMagnetPosition( EtVector3 &vPos );
|
||
|
||
public:
|
||
|
||
DWORD GetSyncDatumGap() const { return GetTickCount()-m_dwSyncDatumTick; }
|
||
DnActorHandle GetMyPlayerActor(){return m_hMyActor;}; // <20><><EFBFBD><EFBFBD> Ÿ<><C5B8><EFBFBD>ִ<EFBFBD> <20>÷<EFBFBD><C3B7>̾ <20><> <20>ʿ䰡 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ֽ<EFBFBD><D6BD>ϴ<EFBFBD>.
|
||
|
||
bool IsLocalVehicle(){return m_bIsLocalVehicle;} // <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>÷<EFBFBD><C3B7>̾<EFBFBD><CCBE><EFBFBD> Ż<><C5BB><EFBFBD>ΰ<EFBFBD><CEB0><EFBFBD>?
|
||
UINT GetItemID(){return m_nItemID;}
|
||
void SetItemID(UINT nID){m_nItemID = nID;}
|
||
void SetMyPlayerActor(DnActorHandle hActor){m_hMyActor = hActor;};
|
||
void SetAttachToPlayer(bool bAttach){m_bAttachToPlayer = bAttach;}
|
||
void SetSyncDatumTick(){ m_dwSyncDatumTick = GetTickCount(); }
|
||
void ChangeHairColor(DWORD dwColor);
|
||
void SetDefaultHairColor();
|
||
void SetDefaultParts();
|
||
void EquipItem(TItem tInfo);
|
||
void UnEquipItem(int nSlot);
|
||
#ifdef PRE_ADD_VEHICLE_ACTION_STRING
|
||
std::string GetVehicleActionString(){return m_strVehicleActionString;}
|
||
void SetVehicleActionString(const char *szVehicleActionString) { m_strVehicleActionString = szVehicleActionString; }
|
||
#endif
|
||
#ifdef PRE_ADD_VEHICLE_SPECIAL_ACTION
|
||
bool CheckSpecialAction( const char *szAction );
|
||
#endif
|
||
|
||
protected:
|
||
|
||
EtVector3 m_vLastValidPos;
|
||
EtVector2 m_vPrevMoveVector;
|
||
std::string m_szPrevMoveAction;
|
||
LOCAL_TIME m_LastSendMoveMsg;
|
||
|
||
UINT m_nItemID;
|
||
bool m_bAttachToPlayer; // <20><><EFBFBD><EFBFBD> <20>÷<EFBFBD><C3B7>̾<CCBE><EEBFA1> <20>پ<EFBFBD><D9BE>ִ°<D6B4>?
|
||
bool m_bIsLocalVehicle;
|
||
bool m_bResetMoveMsg;
|
||
char m_cMovePushKeyFlag;
|
||
#ifdef PRE_ADD_VEHICLE_ACTION_STRING
|
||
std::string m_strVehicleActionString;
|
||
#endif
|
||
|
||
DWORD m_dwHairColor;
|
||
// <20><><EFBFBD>ٰ<EFBFBD><D9B0><EFBFBD>
|
||
DWORD m_dwSyncDatumTick;
|
||
|
||
DnActorHandle m_hMyActor; // Ż<>Ϳ<EFBFBD> <20>پ<EFBFBD><D9BE>ִ<EFBFBD> <20><><EFBFBD><EFBFBD><<3C>÷<EFBFBD><C3B7>̾<EFBFBD>>
|
||
DnSimplePartsHandle m_hSimpleParts[2]; // <20>ϴ<EFBFBD> <20>ΰ<EFBFBD><CEB0>ְ<EFBFBD> <20>߰<EFBFBD> <20><><EFBFBD>ο<EFBFBD><CEBF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>߰<EFBFBD><DFB0><EFBFBD><EFBFBD>ݽô<DDBD>.
|
||
|
||
};
|