112 lines
3.5 KiB
C
112 lines
3.5 KiB
C
![]() |
#ifndef __READNPCTEMPLATE_H__
|
|||
|
#define __READNPCTEMPLATE_H__
|
|||
|
|
|||
|
#include "util.h"
|
|||
|
#include "char_base.h"
|
|||
|
|
|||
|
#define NPC_TEMPLATEFILEMAGIC "NPCTEMPLATE\n"
|
|||
|
|
|||
|
#undef EXTERN
|
|||
|
#ifdef __NPCTEMPLATE__
|
|||
|
#define EXTERN
|
|||
|
#else
|
|||
|
#define EXTERN extern
|
|||
|
#endif /*__NPCTEMPLATE__*/
|
|||
|
|
|||
|
|
|||
|
|
|||
|
typedef struct tagNPC_haveItem
|
|||
|
{
|
|||
|
int itemnumber;
|
|||
|
int haverate;
|
|||
|
int havenum;
|
|||
|
}NPC_haveItem;
|
|||
|
|
|||
|
typedef enum
|
|||
|
{
|
|||
|
NPC_TEMPLATENAME, /* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> */
|
|||
|
NPC_TEMPLATECHARNAME, /* <20><> */
|
|||
|
|
|||
|
NPC_TEMPLATEINITFUNC, /* CHAR_INITFUNC<4E><43><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
|||
|
NPC_TEMPLATEWALKPREFUNC, /* CHAR_WALKPREFUNC */
|
|||
|
NPC_TEMPLATEWALKPOSTFUNC, /* CHAR_WALKPOSTFUNC */
|
|||
|
NPC_TEMPLATEPREOVERFUNC, /* CHAR_PREOVERFUNC */
|
|||
|
NPC_TEMPLATEPOSTOVERFUNC, /* CHAR_POSTOVERFUNC */
|
|||
|
NPC_TEMPLATEWATCHFUNC, /* CHAR_WATCHFUNC */
|
|||
|
NPC_TEMPLATELOOPFUNC, /* CHAR_LOOPFUNC */
|
|||
|
NPC_TEMPLATEDYINGFUNC, /* CHAR_DYINGFUNC */
|
|||
|
NPC_TEMPLATETALKEDFUNC, /* CHAR_TALKEDFUNC */
|
|||
|
|
|||
|
NPC_TEMPLATEPREATTACKEDFUNC, /* CHAR_PREATTACKEDFUNC */
|
|||
|
NPC_TEMPLATEPOSTATTACKEDFUNC, /* CHAR_POSTATTACKEDFUNC */
|
|||
|
|
|||
|
NPC_TEMPLATEOFFFUNC, /* CHAR_OFFFUNC */
|
|||
|
NPC_TEMPLATELOOKEDFUNC, /* CHAR_LOOKEDFUNC */
|
|||
|
NPC_TEMPLATEITEMPUTFUNC, /* CHAR_ITEMPUTFUNC */
|
|||
|
|
|||
|
NPC_TEMPLATESPECIALTALKEDFUNC, /* CHAR_SPECIALTALKEDFUNC */
|
|||
|
NPC_TEMPLATEWINDOWTALKEDFUNC, /* CHAR_WINDOWTALKEDFUNC */
|
|||
|
#ifdef _USER_CHARLOOPS
|
|||
|
NPC_TEMPLATELOOPFUNCTEMP1, //CHAR_LOOPFUNCTEMP1,
|
|||
|
NPC_TEMPLATELOOPFUNCTEMP2, //CHAR_LOOPFUNCTEMP2,
|
|||
|
NPC_TEMPLATEBATTLEPROPERTY, //CHAR_BATTLEPROPERTY,
|
|||
|
#endif
|
|||
|
NPC_TEMPLATECHARNUM,
|
|||
|
}NPC_TEMPLATECHAR;
|
|||
|
|
|||
|
typedef enum
|
|||
|
{
|
|||
|
NPC_TEMPLATEMAKEATNOBODY, /* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ئ<EFBFBD><D8A6><EFBFBD>ݱ<EFBFBD><DDB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¾<EFBFBD><C2BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
|||
|
NPC_TEMPLATEMAKEATNOSEE, /* έ<><CEAD>ئ<EFBFBD><D8A6><EFBFBD><EFBFBD>ƥ<EFBFBD><C6A5><EFBFBD>¾<EFBFBD><C2BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
|||
|
NPC_TEMPLATEIMAGENUMBER, /* <20><> į */
|
|||
|
NPC_TEMPLATETYPE, /* 裻<><E8A3BB><EFBFBD><EFBFBD>ݱ<EFBFBD>裻<EFBFBD><E8A3BB><EFBFBD> */
|
|||
|
|
|||
|
NPC_TEMPLATEMINHP, /* HP */
|
|||
|
|
|||
|
NPC_TEMPLATEMINMP, /* MP */
|
|||
|
|
|||
|
NPC_TEMPLATEMINSTR, /* STR */
|
|||
|
|
|||
|
NPC_TEMPLATEMINTOUGH, /* TOUGH */
|
|||
|
|
|||
|
NPC_TEMPLATEISFLYING, /* <20><>ƥ<EFBFBD>¾<EFBFBD><C2BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
|||
|
|
|||
|
NPC_TEMPLATEITEMNUM, /* <20>е<EFBFBD><D0B5><EFBFBD>ʧ<EFBFBD><CAA7> ة<><D8A9> <20><> */
|
|||
|
|
|||
|
NPC_TEMPLATELOOPFUNCTIME, /*
|
|||
|
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
* ë<EFBFBD><EFBFBD><EFBFBD>پ<EFBFBD>
|
|||
|
*/
|
|||
|
NPC_TEMPLATEFUNCTIONINDEX, /*
|
|||
|
* fucntionSet <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>
|
|||
|
* <EFBFBD>̼<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>͵<EFBFBD><EFBFBD><EFBFBD>
|
|||
|
*/
|
|||
|
|
|||
|
NPC_TEMPLATEINTNUM,
|
|||
|
}NPC_TEMPLATEINT;
|
|||
|
|
|||
|
typedef struct tagNPC_Template
|
|||
|
{
|
|||
|
STRING64 chardata[NPC_TEMPLATECHARNUM];
|
|||
|
int intdata[NPC_TEMPLATEINTNUM];
|
|||
|
int randomdata[NPC_TEMPLATEINTNUM]; /* <20>¼<EFBFBD>ĸة<C4B8><D8A9> <20><><EFBFBD><EFBFBD>
|
|||
|
<EFBFBD><EFBFBD> <EFBFBD>Ȼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
|||
|
int hash;
|
|||
|
NPC_haveItem* haveitem;
|
|||
|
}NPC_Template;
|
|||
|
|
|||
|
|
|||
|
EXTERN NPC_Template* NPC_template;
|
|||
|
EXTERN int NPC_templatenum;
|
|||
|
EXTERN int NPC_template_readindex;
|
|||
|
|
|||
|
INLINE int NPC_CHECKTEMPLATEINDEX(int index);
|
|||
|
|
|||
|
BOOL NPC_copyFunctionSetToChar( int id, Char* ch );
|
|||
|
|
|||
|
BOOL NPC_readNPCTemplateFiles( char* topdirectory ,int templatesize);
|
|||
|
int NPC_templateGetTemplateIndex( char* templatename );
|
|||
|
|
|||
|
#endif
|
|||
|
/*__READNPCTEMPLATE_H__*/
|