stoneage8.5/石器时代8.5客户端最新源代码/石器源码/systeminc/character.h

342 lines
9.3 KiB
C
Raw Normal View History

2020-06-23 15:53:23 +08:00
#ifndef _CHARACTER_H_
2020-06-23 15:27:59 +08:00
#define _CHARACTER_H_
#include"action.h"
#include"pc.h"
enum
{
2020-06-23 15:53:23 +08:00
CHR_STATUS_P = 0x0001, // 
2020-06-23 15:27:59 +08:00
CHR_STATUS_N = 0x0002, // ??
2020-06-23 15:53:23 +08:00
CHR_STATUS_Q = 0x0004, // ?
CHR_STATUS_S = 0x0008, // ?
2020-06-23 15:27:59 +08:00
CHR_STATUS_D = 0x0010, // ??
CHR_STATUS_C = 0x0020, // ??
2020-06-23 15:53:23 +08:00
CHR_STATUS_W = 0x0040, // ??????
2020-06-23 15:27:59 +08:00
CHR_STATUS_H = 0x0080, // ??????
CHR_STATUS_LEADER = 0x0100, // ????
CHR_STATUS_PARTY = 0x0200, // ???????
2020-06-23 15:53:23 +08:00
CHR_STATUS_BATTLE = 0x0400, // ?
CHR_STATUS_USE_MAGIC= 0x0800, // ?
2020-06-23 15:27:59 +08:00
CHR_STATUS_HELP = 0x1000, // ???
2020-06-23 15:53:23 +08:00
CHR_STATUS_FUKIDASHI= 0x2000, // ???
CHR_STATUS_WATCH = 0x4000, // ??
CHR_STATUS_TRADE = 0x8000, // 交易中
2020-06-23 15:27:59 +08:00
#ifdef _ANGEL_SUMMON
2020-06-23 15:53:23 +08:00
CHR_STATUS_ANGEL = 0x10000 // 使者任务中
2020-06-23 15:27:59 +08:00
#endif
};
enum
2020-06-23 15:53:23 +08:00
{ // ????????
2020-06-23 15:27:59 +08:00
CHAROBJ_TYPE_NPC = 0x0001, // NPC
CHAROBJ_TYPE_ITEM = 0x0002, // ????
CHAROBJ_TYPE_MONEY = 0x0004, // ??
2020-06-23 15:53:23 +08:00
CHAROBJ_TYPE_USER_NPC = 0x0008, // ??????
2020-06-23 15:27:59 +08:00
CHAROBJ_TYPE_LOOKAT = 0x0010, // ???
2020-06-23 15:53:23 +08:00
CHAROBJ_TYPE_PARTY_OK = 0x0020, // ???????
CHAROBJ_TYPE_ALL = 0x00FF // ?
2020-06-23 15:27:59 +08:00
};
2020-06-23 15:53:23 +08:00
// ????????
2020-06-23 15:27:59 +08:00
enum
{
CHAR_TYPENONE, // ?????
CHAR_TYPEPLAYER, // ?????
2020-06-23 15:53:23 +08:00
CHAR_TYPEENEMY, // 
2020-06-23 15:27:59 +08:00
CHAR_TYPEPET, // ???
CHAR_TYPEDOOR, // ??
2020-06-23 15:53:23 +08:00
CHAR_TYPEBOX , // ?
CHAR_TYPEMSG , // ?
2020-06-23 15:27:59 +08:00
CHAR_TYPEWARP , // ??????
2020-06-23 15:53:23 +08:00
CHAR_TYPESHOP , // 
2020-06-23 15:27:59 +08:00
CHAR_TYPEHEALER , // ????
2020-06-23 15:53:23 +08:00
CHAR_TYPEOLDMAN , // ?
CHAR_TYPEROOMADMIN, // ?
2020-06-23 15:27:59 +08:00
CHAR_TYPETOWNPEOPLE, // ?????
2020-06-23 15:53:23 +08:00
CHAR_TYPEDENGON, // ?
CHAR_TYPEADM, // ?
2020-06-23 15:27:59 +08:00
CHAR_TYPETEMPLE, // Temple master
CHAR_TYPESTORYTELLER, // ???
2020-06-23 15:53:23 +08:00
CHAR_TYPERANKING, // ????????
CHAR_TYPEOTHERNPC, // ??????????NPC
CHAR_TYPEPRINTPASSMAN, // ??????????NPC
CHAR_TYPENPCENEMY, // ?
CHAR_TYPEACTION, // ?????????NPC
CHAR_TYPEWINDOWMAN, // ???????NPC??????)
2020-06-23 15:27:59 +08:00
CHAR_TYPESAVEPOINT, // ???????
CHAR_TYPEWINDOWHEALER, // ?????????????
2020-06-23 15:53:23 +08:00
CHAR_TYPEITEMSHOP, // ?
CHAR_TYPESTONESHOP, // ?????????
2020-06-23 15:27:59 +08:00
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
{
2020-06-23 15:53:23 +08:00
short use; // ???
short type; // ?
int id; // ???????
int graNo; // ???????
int gx, gy; // ?????
2020-06-23 15:27:59 +08:00
int level; // ???
int dir; // ??
2020-06-23 15:53:23 +08:00
int stockDir; // ?????????????
int stockDirX, stockDirY;// stockDir?????
short nameColor; // ??
2020-06-23 15:27:59 +08:00
#ifdef _ANGEL_SUMMON
unsigned status; // ?????
#else
unsigned short status; // ?????
#endif
int classNo; // ????????
int money; // ???
2020-06-23 15:53:23 +08:00
char name[CHAR_NAME_LEN+1]; // 
char freeName[CHAR_FREENAME_LEN+1]; // ???????
char info[64]; // ????????????ACTION???????????
int battleNo; // ?
short sideNo; // ??????????????
2020-06-23 15:27:59 +08:00
short helpMode; // ??????
2020-06-23 15:53:23 +08:00
int charType; // ????????
short newFoundFlag; // ????????????????
2020-06-23 15:27:59 +08:00
ACTION *ptAct;
2020-06-23 15:53:23 +08:00
int charNameColor; // ????????????
2020-06-23 15:27:59 +08:00
// shan add
2020-06-23 15:53:23 +08:00
char fmname[CHAR_FMNAME_LEN+1]; // 家族名称
2020-06-23 15:27:59 +08:00
// Robin
char petName[CHAR_FREENAME_LEN+1];
int petLevel;
2020-06-23 15:53:23 +08:00
//#ifdef _CHAR_PROFESSION // WON ADD 人物职业
2020-06-23 15:27:59 +08:00
// int profession_class;
//#endif
} CHAROBJ;
typedef struct
{
2020-06-23 15:53:23 +08:00
int charObjTblId; // ???????????????
unsigned int drawFukidashiTime; // ???????
ACTION *ptActLeaderMark; // ????????
ACTION *ptActMagicEffect; // ?????
2020-06-23 15:27:59 +08:00
#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
{
2020-06-23 15:53:23 +08:00
short mode; // ????????
short moveDir; // ???????
short preDir; // ??????????
short dirCnt; // ????????
int preGx, preGy; // ????????
int walkCnt; // ??
unsigned int createTime; // ???
2020-06-23 15:27:59 +08:00
ACTION *ptAct;
ACTION *ptAct2;
float angle;
int r;
2020-06-23 15:53:23 +08:00
int id; // ???????
2020-06-23 15:27:59 +08:00
} PETEXTRA;
#ifdef _NPC_MAGICCARD
struct Posstruct
{
int humanX;
int humanY;
int petX;
int petY;
int magic1X;
int magic1Y;
2020-06-23 15:53:23 +08:00
//int offsetX; //荧幕有位移时的量
2020-06-23 15:27:59 +08:00
//int offsetY;
};
#endif
extern short nameOverTheHeadFlag;
void charMove( ACTION * );
void charMove2( ACTION * );
void _charMove( ACTION * );
void shiftBufCount( ACTION * );
ACTION *createCharAction( int, int, int, int );
2020-06-23 15:53:23 +08:00
#ifdef _WATERANIMATION //Syu ADD 泪之海动画层
2020-06-23 15:27:59 +08:00
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
2020-06-23 15:53:23 +08:00
#ifdef _CHAR_PROFESSION // WON ADD 人物职业
#ifdef _GM_IDENTIFY // Rog ADD GM识别
2020-06-23 15:27:59 +08:00
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