221 lines
5.9 KiB
C++
221 lines
5.9 KiB
C++
|
|
#pragma once
|
|
|
|
//#include <string>
|
|
//#include <vector>
|
|
#include <toolkit/khash.h>
|
|
#include <mmo/ArTime.h>
|
|
#include "MotionBase.h"
|
|
//////////////////////////////////////////////////////////////////////////
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
/// 2010.11.30 - prodongi
|
|
struct strAniSet
|
|
{
|
|
std::vector< int > m_vANICLS_UNA;
|
|
std::vector< int > m_vANICLS_SWO;
|
|
std::vector< int > m_vANICLS_SWA;
|
|
std::vector< int > m_vANICLS_SPA;
|
|
std::vector< int > m_vANICLS_BWA;
|
|
std::vector< int > m_vANICLS_DGO;
|
|
std::vector< int > m_vANICLS_SWT;
|
|
std::vector< int > m_vANICLS_DGT;
|
|
std::vector< int > m_vANICLS_SFO;
|
|
std::vector< int > m_vANICLS_SFA;
|
|
std::vector< int > m_vANICLS_AXO;
|
|
std::vector< int > m_vANICLS_AXA;
|
|
std::vector< int > m_vANICLS_AXT;
|
|
std::vector< int > m_vANICLS_MAO;
|
|
std::vector< int > m_vANICLS_MAA;
|
|
std::vector< int > m_vANICLS_CBO;
|
|
<<<<<<< HEAD
|
|
std::vector< int > m_vANICLS_CBT;
|
|
=======
|
|
std::vector< int > m_vANICLS_CBT; // From ZONE source; dual crossbows
|
|
>>>>>>> a34328224e914a577b99c79ec6e8ffbcea554a05
|
|
|
|
std::vector< int > * GetAniSet( int nAniClass )
|
|
{
|
|
switch( nAniClass )
|
|
{
|
|
case ANICLS_UNA : return &m_vANICLS_UNA;
|
|
case ANICLS_SWO : return &m_vANICLS_SWO;
|
|
case ANICLS_SWA : return &m_vANICLS_SWA;
|
|
case ANICLS_SPA : return &m_vANICLS_SPA;
|
|
case ANICLS_BWA : return &m_vANICLS_BWA;
|
|
case ANICLS_DGO : return &m_vANICLS_DGO;
|
|
case ANICLS_SWT : return &m_vANICLS_SWT;
|
|
case ANICLS_DGT : return &m_vANICLS_DGT;
|
|
case ANICLS_SFO : return &m_vANICLS_SFO;
|
|
case ANICLS_SFA : return &m_vANICLS_SFA;
|
|
case ANICLS_AXO : return &m_vANICLS_AXO;
|
|
case ANICLS_AXA : return &m_vANICLS_AXA;
|
|
case ANICLS_AXT : return &m_vANICLS_AXT;
|
|
case ANICLS_MAO : return &m_vANICLS_MAO;
|
|
case ANICLS_MAA : return &m_vANICLS_MAA;
|
|
case ANICLS_CBO : return &m_vANICLS_CBO;
|
|
<<<<<<< HEAD
|
|
case ANICLS_CBT : return &m_vANICLS_CBT;
|
|
=======
|
|
case ANICLS_CBT : return &m_vANICLS_CBT; // From ZONE source; dual crossbows
|
|
>>>>>>> a34328224e914a577b99c79ec6e8ffbcea554a05
|
|
}
|
|
|
|
return NULL;
|
|
};
|
|
};
|
|
|
|
class SMotionSetDB
|
|
{
|
|
protected:
|
|
KHash< _MOTION_SET*, hashPr_mod_int> m_hashMotionSet;
|
|
|
|
strAniSet m_defAniSet;
|
|
strAniSet m_demAniSet;
|
|
strAniSet m_asfAniSet;
|
|
strAniSet m_asmAniSet;
|
|
strAniSet m_gafAniSet;
|
|
strAniSet m_gamAniSet;
|
|
|
|
protected:
|
|
void Init();
|
|
void Destroy();
|
|
void Load();
|
|
public:
|
|
SMotionSetDB();
|
|
~SMotionSetDB();
|
|
|
|
void AddAniClass( _MOTION_SET * pMotionSet );
|
|
|
|
/// 2010.11.30 - prodongi
|
|
std::vector<int> * GetAniClass( int nClan, int nSex, int nAniClass );
|
|
|
|
_MOTION_SET* GetMotionSet( int nMotionID );
|
|
/// 2010.11.30 - prodongi
|
|
int GetAniId( int nObjType, int nMotionID, int nRace, int nSex, int nAniClass );
|
|
const char * GetAni( int nObjType, int nMotionID, int nRace, int nSex, int nAniClass );
|
|
|
|
public:
|
|
static SMotionSetDB* m_pThis;
|
|
};
|
|
|
|
SMotionSetDB & GetMotionSetDB();
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
class SMonsterMotionSetDB
|
|
{
|
|
protected:
|
|
KHash< struct _MOTION_SET_MONSTER*, hashPr_mod_int> m_hashMotionSet;
|
|
protected:
|
|
void Init();
|
|
void Destroy();
|
|
void Load();
|
|
public:
|
|
SMonsterMotionSetDB();
|
|
~SMonsterMotionSetDB();
|
|
/// 2010.11.30 - prodongi
|
|
int GetAniId( int nMotionID, int nAniIndex );
|
|
const char * GetAni( int nMotionID, int nAniIndex );
|
|
|
|
struct _MOTION_SET_MONSTER* GetMotionSet( int nMotionID );
|
|
|
|
public:
|
|
static SMonsterMotionSetDB* m_pThis;
|
|
};
|
|
|
|
SMonsterMotionSetDB & GetMonsterMotionSetDB();
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
class SCharacterMotionDB
|
|
{
|
|
protected:
|
|
KHash< _CHARACTER_MOTION*, hashPr_mod_int> m_hashCharacterMotoiion;
|
|
KHash< _CHARACTER_MOTION*, hashPr_string_nocase> m_hashCharacterMotoiionEvent;
|
|
|
|
std::vector< _CHARACTER_MOTION* > m_vCharacterMototionList;
|
|
|
|
protected:
|
|
void Init();
|
|
void Destroy();
|
|
void Load();
|
|
public:
|
|
SCharacterMotionDB();
|
|
~SCharacterMotionDB();
|
|
|
|
_CHARACTER_MOTION* GetAniEvent( const char * pAniName );
|
|
_CHARACTER_MOTION* GetAniEvent( int nMotionID );
|
|
/// 2010.11.30 - prodongi
|
|
char const* getFileName(int motionid);
|
|
|
|
public:
|
|
static SCharacterMotionDB* m_pThis;
|
|
};
|
|
|
|
SCharacterMotionDB & GetCharacterMotionEventDB();
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
class SMotionEventHanderDB
|
|
{
|
|
protected:
|
|
KHash< _MOTION_EVENT_HANDER*, hashPr_mod_int> m_hashMotionEventHander;
|
|
protected:
|
|
void Init();
|
|
void Destroy();
|
|
void Load();
|
|
public:
|
|
enum EVENT_SCRIPT_TYPE
|
|
{
|
|
EV_HIT = 1, ///< 힛팅
|
|
EV_SHOOT = 2, ///< 슈팅
|
|
EV_LEFT_HAND_HIT = 3, ///< 힛팅_왼손
|
|
EV_RIGHT_HAND_HIT = 4, ///< 힛팅_오른손
|
|
EV_TWO_HAND_HIT = 5, ///< 힛팅_양손
|
|
EV_WALK = 11, ///< 스텝_걷기
|
|
EV_RUN = 12, ///< 스텝_뛰기
|
|
EV_MWALK = 13, ///< 몬스터스텝_걷기
|
|
EV_MRUN = 14, ///< 몬스터스텝_뛰기
|
|
EV_DEAD = 21, ///< 캐릭터사망시 땅에부딛힘
|
|
EV_SWING = 51, ///< 무기휘두름(사운드)
|
|
EV_WEAPON_HIT = 52, ///< 무기히트(피격처리)
|
|
EV_SCREAM = 53, ///< 맞을때비명(랜덤처리)
|
|
};
|
|
|
|
SMotionEventHanderDB();
|
|
~SMotionEventHanderDB();
|
|
|
|
_MOTION_EVENT_HANDER * GetScript( int nHandleID );
|
|
|
|
public:
|
|
static SMotionEventHanderDB* m_pThis;
|
|
};
|
|
|
|
SMotionEventHanderDB & GetMotionEventHanderDB();
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
class SMotionFxSetDB
|
|
{
|
|
protected:
|
|
KHash< _MOTION_FX_SET*, hashPr_mod_int> m_hashMotionFxSet;
|
|
protected:
|
|
void Init();
|
|
void Destroy();
|
|
void Load();
|
|
public:
|
|
SMotionFxSetDB();
|
|
~SMotionFxSetDB();
|
|
|
|
_MOTION_FX_SET* GetFXSet( int nFX_ID );
|
|
|
|
public:
|
|
static SMotionFxSetDB* m_pThis;
|
|
};
|
|
|
|
SMotionFxSetDB & GetMotionFxSetDB(); |