stoneage8.5/石器时代8.5客户端最新源代码/石器源码/systeminc/character.h
2020-06-23 15:27:59 +08:00

342 lines
9.1 KiB
C
Raw Blame History

#ifndef _CHARACTER_H_
#define _CHARACTER_H_
#include"action.h"
#include"pc.h"
enum
{
CHR_STATUS_P = 0x0001, // <20>
CHR_STATUS_N = 0x0002, // ??
CHR_STATUS_Q = 0x0004, // <20>?
CHR_STATUS_S = 0x0008, // 禆?
CHR_STATUS_D = 0x0010, // ??
CHR_STATUS_C = 0x0020, // ??
CHR_STATUS_W = 0x0040, // ??𣸰?卷???
CHR_STATUS_H = 0x0080, // ??????
CHR_STATUS_LEADER = 0x0100, // ????
CHR_STATUS_PARTY = 0x0200, // ???????
CHR_STATUS_BATTLE = 0x0400, // ·卯?
CHR_STATUS_USE_MAGIC= 0x0800, // 𠳓无𠮏?
CHR_STATUS_HELP = 0x1000, // ???
CHR_STATUS_FUKIDASHI= 0x2000, // ??𡠩?
CHR_STATUS_WATCH = 0x4000, // ?·?
CHR_STATUS_TRADE = 0x8000, // 蝠眢笢
#ifdef _ANGEL_SUMMON
CHR_STATUS_ANGEL = 0x10000 // 妏氪¦昢笢
#endif
};
enum
{ // ???????㠶?
CHAROBJ_TYPE_NPC = 0x0001, // NPC
CHAROBJ_TYPE_ITEM = 0x0002, // ????
CHAROBJ_TYPE_MONEY = 0x0004, // ??
CHAROBJ_TYPE_USER_NPC = 0x0008, // 兝鎅??????
CHAROBJ_TYPE_LOOKAT = 0x0010, // ???
CHAROBJ_TYPE_PARTY_OK = 0x0020, // ?????向??
CHAROBJ_TYPE_ALL = 0x00FF // 「?
};
// ???𣸰????吻?
enum
{
CHAR_TYPENONE, // ?????
CHAR_TYPEPLAYER, // ?????
CHAR_TYPEENEMY, // <20>
CHAR_TYPEPET, // ???
CHAR_TYPEDOOR, // ??
CHAR_TYPEBOX , // <20>?
CHAR_TYPEMSG , // ?即
CHAR_TYPEWARP , // ??????
CHAR_TYPESHOP , // <20>
CHAR_TYPEHEALER , // ????
CHAR_TYPEOLDMAN , // <20>?
CHAR_TYPEROOMADMIN, // 自去厠?
CHAR_TYPETOWNPEOPLE, // ?????
CHAR_TYPEDENGON, // <20>?吭
CHAR_TYPEADM, // <20>?吭
CHAR_TYPETEMPLE, // Temple master
CHAR_TYPESTORYTELLER, // ???
CHAR_TYPERANKING, // 自去厠?????牙𦲁???
CHAR_TYPEOTHERNPC, // ??兝???▋𣾂?????NPC
CHAR_TYPEPRINTPASSMAN, // ????????牙𦲁??NPC
CHAR_TYPENPCENEMY, // ?叉<>
CHAR_TYPEACTION, // ??????劫???NPC
CHAR_TYPEWINDOWMAN, // ?????牙𦲁??NPC??????)
CHAR_TYPESAVEPOINT, // ???????
CHAR_TYPEWINDOWHEALER, // ?????????????
CHAR_TYPEITEMSHOP, // ?<3F>
CHAR_TYPESTONESHOP, // 禆吸?????????
CHAR_TYPEDUELRANKING, // DUEL?????NPC
CHAR_TYPEWARPMAN, // ?????NPC
CHAR_TYPEEVENT, // ????NPC
CHAR_TYPEMIC, // ????NPC
CHAR_TYPELUCKYMAN, // ????NPC
CHAR_TYPEBUS, // ??????
CHAR_TYPECHARM, // ????NPC
CHAR_TYPENUM
};
typedef struct
{
short use; // 𠮏???
short type; // 㠶?
int id; // ??????吻?
int graNo; // ??????吻?
int gx, gy; // ?????火
int level; // ???
int dir; // ??
int stockDir; // ?去????阪?????阪???
int stockDirX, stockDirY;// stockDir?<3F>????火
short nameColor; // <20>〈牙𦲁??䄄
#ifdef _ANGEL_SUMMON
unsigned status; // ?????
#else
unsigned short status; // ?????
#endif
int classNo; // ????????
int money; // ???
char name[CHAR_NAME_LEN+1]; // <20>
char freeName[CHAR_FREENAME_LEN+1]; // ????至??湼?
char info[64]; // ????????????ACTION?向??????????
int battleNo; // ·卯吻?
short sideNo; // ·卯?????????﹫?????
short helpMode; // ??????
int charType; // ?????? 叉??﹫葢
short newFoundFlag; // 𤑚伶???敍?????????????
ACTION *ptAct;
int charNameColor; // ???????????<3F>〈?䄄
// shan add
char fmname[CHAR_FMNAME_LEN+1]; // 模逜靡備
// Robin
char petName[CHAR_FREENAME_LEN+1];
int petLevel;
//#ifdef _CHAR_PROFESSION // WON ADD <20>昜眥珛
// int profession_class;
//#endif
} CHAROBJ;
typedef struct
{
int charObjTblId; // ????????吻??向?????
unsigned int drawFukidashiTime; // ??𡠩??𡠩???
ACTION *ptActLeaderMark; // ???????牙𦲁?
ACTION *ptActMagicEffect; // 𠳓无?????
#ifdef __EMOTION
ACTION *ptActEmotion;
#endif
#ifdef _MIND_ICON
ACTION *ptMindIcon;
#endif
#ifdef _SHOWFAMILYBADGE_
ACTION *ptFamilyIcon;
#endif
#ifdef FAMILY_MANOR_
ACTION *ptmFamilyIcon;
#endif
#ifdef _CHAR_MANOR_
ACTION *ptmManorIcon;
#endif
#ifdef _CHARTITLE_
ACTION *ptTitleIcon;
#endif
#ifdef _STREET_VENDOR
ACTION *ptStreetVendor;
#endif
#ifdef _ANGEL_SUMMON
ACTION *ptActAngelMark;
#endif
#ifdef _ITEM_FIREWORK
ACTION *pActFirework[2];
#endif
#ifdef _NPC_MAGICCARD
ACTION *pActMagiccard[4];
#endif
#ifdef _NPC_PICTURE
ACTION *ptActPicture;
#endif
#ifdef _NPC_EVENT_NOTICE
ACTION *ptNoticeIcon;
#endif
} CHAREXTRA;
typedef struct
{
short mode; // ????去????
short moveDir; // ?去?????<3F>?
short preDir; // ???〈???????
short dirCnt; // ?㎝???????
int preGx, preGy; // ???〈?????
int walkCnt; // ?去卷?
unsigned int createTime; // ?𥂝??
ACTION *ptAct;
ACTION *ptAct2;
float angle;
int r;
int id; // ??????吻?
} PETEXTRA;
#ifdef _NPC_MAGICCARD
struct Posstruct
{
int humanX;
int humanY;
int petX;
int petY;
int magic1X;
int magic1Y;
//int offsetX; //茷躉衄弇痄奀腔講
//int offsetY;
};
#endif
extern short nameOverTheHeadFlag;
void charMove( ACTION * );
void charMove2( ACTION * );
void _charMove( ACTION * );
void shiftBufCount( ACTION * );
ACTION *createCharAction( int, int, int, int );
#ifdef _WATERANIMATION //Syu ADD 濡眳漆雄賒脯
ACTION *createWaterAnimation( int , int , int , int );
#endif
void stockCharMovePoint( ACTION *, int, int );
void correctCharMovePoint( ACTION *, int, int );
void setCharMovePoint( ACTION *, int, int );
void _setCharMovePoint( ACTION *, int, int );
void setCharWarpPoint( ACTION *, int, int );
void setCharStatus( unsigned short *, char * );
ACTION *createCommmonEffectAction( int, int, int, int, int, int );
ACTION *createCommmonEffectNoLoop( int, int, int, int, int, int );
void drawCharStatus( ACTION * );
void changeCharAct( ACTION *, int, int, int, int, int, int, int );
void setCharLeader( ACTION * );
void delCharLeader( ACTION * );
void setCharParty( ACTION * );
void delCharParty( ACTION * );
void setCharWatch( ACTION * );
void delCharWatch( ACTION * );
void setCharBattle( ACTION *, int, short, short );
void delCharBattle( ACTION * );
void setCharTrade( ACTION *, int );
void delCharTrade( ACTION * );
void setCharUseMagic( ACTION * );
void delCharUseMagic( ACTION * );
#ifdef _ANGEL_SUMMON
void setCharAngel( ACTION * );
void delCharAngel( ACTION * );
#endif
#ifdef _MIND_ICON
void setCharMind( ACTION *ptAct, int MindNo);
void delCharMind( ACTION *ptAct);
#endif
#ifdef _SHOWFAMILYBADGE_
void setCharFamily( ACTION *ptAct, int MindNo);
void delCharFamily( ACTION *ptAct);
#endif
#ifdef FAMILY_MANOR_
void setCharmFamily( ACTION *ptAct, int MindNo);
void delCharmFamily( ACTION *ptAct);
#endif
#ifdef _CHAR_MANOR_
void setCharmManor( ACTION *ptAct, int MindNo);
void delCharmManor( ACTION *ptAct);
#endif
#ifdef _CHARTITLE_
void setCharmTitle( ACTION *ptAct, int MindNo);
void delCharmTitle( ACTION *ptAct);
#endif
#ifdef _NPC_EVENT_NOTICE
void setNpcNotice( ACTION *ptAct, int MindNo);
void delNpcNotice( ACTION *ptAct);
#endif
void setCharFukidashi( ACTION *, unsigned int );
void setCharNameColor( ACTION *, int );
BOOL checkCharObjPoint( int, int, short );
#ifdef _ANGEL_SUMMON
int checkCharObjPointStatus( int, int, short, unsigned );
int checkCharObjPointNotStatus( int, int, short, unsigned );
#else
int checkCharObjPointStatus( int, int, short, unsigned short );
int checkCharObjPointNotStatus( int, int, short, unsigned short );
#endif
#ifdef _CHAR_PROFESSION // WON ADD <20>昜眥珛
#ifdef _GM_IDENTIFY // Rog ADD GM妎梗
void setNpcCharObj( int, int, int, int, int, char *, char *, char *, int, char *, int, int, int, int, int, int, char *);
#else
#ifdef _NPC_PICTURE
void setNpcCharObj( int, int, int, int, int, char *, char *, char *, int, char *, int, int, int, int, int, int, int );
#else
void setNpcCharObj( int, int, int, int, int, char *, char *, char *, int, char *, int, int, int, int, int, int );
#endif
#endif
#else
#ifdef _NPC_EVENT_NOTICE
void setNpcCharObj( int, int, int, int, int, char *, char *, char *, int, char *, int, int, int, int, int, int
#ifdef _CHARTITLE_STR_
,char *
#endif
);
#else
void setNpcCharObj( int, int, int, int, int, char *, char *, char *, int, char *, int, int, int, int, int);
#endif
#endif
BOOL setReturnPetObj( int, int, int, int, int, char *, char *, int, int, int, int, int );
void setItemCharObj( int, int, int, int, int, int, char * );
void setMoneyCharObj( int, int, int, int, int, int, char * );
int getAtrCharType( int );
int getAtrCharObjType( int );
void delCharObj( int );
void initCharObj( void );
void resetCharObj( void );
void clearPtActCharObj( void );
void restorePtActCharObjAll( void );
void restorePtActCharObj( int );
void setMovePointCharObj( int, int, int );
ACTION *getCharObjAct( int );
int getCharObjBuf( void );
void initItemOverlapCheck( void );
BOOL itemOverlapCheck( unsigned int, int, int );
ACTION *createPetAction( int, int, int, int, int, int, int );
void ajustClientDir( short * );
#endif
#ifdef _WIN_LUAJIT_
typedef struct{
char data[25][100];
int len[25];
}SA_MESSAGE;
typedef struct{
ACTION *ptActMenuWin;
STR_BUFFER input;
SA_MESSAGE message;
int totalMsgLine;
}SA_WINDOWS;
#endif