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

724 lines
15 KiB
C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#ifndef _PC_H_
#define _PC_H_
#include "action.h"
#ifdef _MORECHARACTERS_
#define MAXCHARACTER 4
#else
#define MAXCHARACTER 2
#endif
#define CHAR_NAME_LEN 16
#define CHAR_FREENAME_LEN 32
#define MAGIC_NAME_LEN 28
#define MAGIC_MEMO_LEN 72
#define ITEM_NAME_LEN 28
#define ITEM_NAME2_LEN 16
#define ITEM_MEMO_LEN 84
#define PET_NAME_LEN 16
#define PET_FREENAME_LEN 32
#define CHAR_FMNAME_LEN 33 // 소痢츰냔
#ifdef _CHAR_PROFESSION // WON ADD 훙膠斂撚
#define PROFESSION_MEMO_LEN 84
#endif
#ifdef _GM_IDENTIFY // Rog ADD GM街깎
#define GM_NAME_LEN 32
#endif
//#define CHARNAMELEN 256 // ???????
#define MAX_PET 5
#define MAX_MAGIC 9
#define MAX_PARTY 5
#define MAX_ADR_BOOK_COUNT 4
#ifdef _EXTEND_AB
#define MAX_ADR_BOOK_PAGE 20//20 //10 20050214 cyg 10 add to 20
#else
#define MAX_ADR_BOOK_PAGE 10
#endif
#define MAX_ADR_BOOK (MAX_ADR_BOOK_COUNT*MAX_ADR_BOOK_PAGE)
#ifdef _ITEM_EQUITSPACE
typedef enum
{
CHAR_HEAD,
CHAR_BODY,
CHAR_ARM,
CHAR_DECORATION1,
CHAR_DECORATION2,
#ifdef _ITEM_EQUITSPACE
CHAR_EQBELT,
CHAR_EQSHIELD,
CHAR_EQSHOES,
#endif
#ifdef _EQUIT_NEWGLOVE
CHAR_EQGLOVE,
#endif
CHAR_EQUIPPLACENUM,
#ifdef _PET_ITEM
PET_HEAD = 0, // 庫
PET_WING, // 訥
PET_TOOTH, // 記
PET_PLATE, // <20>
PET_BACK, // 교
PET_CLAW, // 屢
PET_FOOT, // 신(呑)
PET_EQUIPNUM
#endif
}CHAR_EquipPlace;
#ifdef _PET_ITEM
typedef enum
{
// 녘膠돛야,묾씽蘆
ITEM_PET_HEAD = 29, // 庫
ITEM_PET_WING, // 訥
ITEM_PET_TOOTH, // 記
ITEM_PET_PLATE, // <20>竟빱솖
ITEM_PET_BACK, // 교꼬빱솖
ITEM_PET_CLAW, // 屢
ITEM_PET_1_FOOT, // 신꼬,崗璃
ITEM_PET_2_FOOT, // 신꼬,愷璃
ITEM_PET_FIN, // 신꼬,呑
ITEM_CATEGORYNUM
}ITEM_CATEGORY;
#define MAX_PET_ITEM 7
#endif
#define MAX_ITEMSTART CHAR_EQUIPPLACENUM
#define MAX_MAXHAVEITEM 15
#ifdef _NEW_ITEM_
#define MAX_ITEM (MAX_ITEMSTART+MAX_MAXHAVEITEM*3)
int ();
#else
#define MAX_ITEM (MAX_ITEMSTART+MAX_MAXHAVEITEM)
#endif
#else
#define MAX_ITEMSTART 5
#define MAX_ITEM 20
#endif
#define RESULT_ITEM_COUNT 3
#define RESULT_ITEM_NAME_LEN 24
//#define RESULT_CHR_EXP 4
#define RESULT_CHR_EXP 5
#define SKILL_NAME_LEN 24
#define SKILL_MEMO_LEN 72
#define MAX_SKILL 7
#define MAX_GOLD 1000000
#define MAX_BANKGOLD 10000000
#define MAX_FMBANKGOLD 100000000
#define MAX_PERSONAL_BANKGOLD 50000000
#ifdef _FMVER21
#define FAMILY_MAXMEMBER 100 // 소痢훙鑒
#else
#define FAMILY_MAXMEMBER 50 // 소痢훙鑒
#endif
enum
{
PC_ETCFLAG_PARTY = (1 << 0),
PC_ETCFLAG_DUEL = (1 << 1),
PC_ETCFLAG_CHAT_MODE = (1 << 2), //뚠橋틉돛역밑
PC_ETCFLAG_MAIL = (1 << 3), //츰튬틉돛
PC_ETCFLAG_TRADE = (1 << 4)
#ifdef _CHANNEL_MODIFY
,PC_ETCFLAG_CHAT_TELL = (1 << 5) //쵱刀틉돛역밑
,PC_ETCFLAG_CHAT_FM = (1 << 6) //소痢틉돛역밑
#ifdef _CHAR_PROFESSION
,PC_ETCFLAG_CHAT_OCC = (1 << 7) //斂撚틉돛역밑
#endif
,PC_ETCFLAG_CHAT_SAVE = (1 << 8) //뚤뺐뇨닸역밑
#ifdef _CHATROOMPROTOCOL
,PC_ETCFLAG_CHAT_CHAT = (1 << 9) //좔莖杆역밑
#endif
#endif
#ifdef _CHANNEL_WORLD
,PC_ETCFLAG_CHAT_WORLD = (1 << 10) //各썹틉돛역밑
#endif
#ifdef _CHANNEL_ALL_SERV
,PC_ETCFLAG_ALL_SERV = (1 << 11) //槿헷틉돛역밑
#endif
,PC_AI_MOD = (1 << 12)
};
enum
{
PC_ETCFLAG_CHAT_MODE_ID = 0
#ifdef _CHANNEL_MODIFY
,PC_ETCFLAG_CHAT_TELL_ID //쵱刀틉돛
,PC_ETCFLAG_CHAT_PARTY_ID //뚠橋틉돛
,PC_ETCFLAG_CHAT_FM_ID //소痢틉돛
#ifdef _CHAR_PROFESSION
,PC_ETCFLAG_CHAT_OCC_ID //斂撚틉돛
#endif
#ifdef _CHATROOMPROTOCOL
,PC_ETCFLAG_CHAT_CHAT_ID //좔莖杆
#endif
#else
,PC_ETCFLAG_CHAT_PARTY_ID //뚠橋틉돛
#endif
#ifdef _CHANNEL_WORLD
,PC_ETCFLAG_CHAT_WORLD_ID //各썹틉돛
#endif
#ifdef _CHANNEL_ALL_SERV
,PC_ETCFLAG_ALL_SERV_ID //槿헷틉돛역밑
#endif
,PC_ETCFLAG_CHAT_WORLD_NUM
};
#define ITEM_FLAG_PET_MAIL ( 1 << 0 )
#define ITEM_FLAG_MIX ( 1 << 1 )
#define ITEM_FLAG_COOKING_MIX ( 1 << 2 )
#define ITEM_FLAG_METAL_MIX ( 1 << 3 ) //쏜橄
#define ITEM_FLAG_JEWEL_MIX ( 1 << 4 ) //괜柯
#define ITEM_FLAG_FIX_MIX ( 1 << 5 ) //錦릿
#ifdef _ITEM_INTENSIFY
#define ITEM_FLAG_INTENSIFY_MIX ( 1 << 6 ) //퓻뺏
#endif
#ifdef _ITEM_UPINSLAY
#define ITEM_FLAG_UPINSLAY_MIX ( 1 << 7 ) //竇왝
#endif
typedef struct
{
int color; // <20>죘?翕
int graNo; // ??쬴?
int level; // ???????
#ifdef _ITEM_PILENUMS
int pile;
#endif
#ifdef _ALCHEMIST //#ifdef _ITEMSET7_TXT
char alch[4+200];
#endif
short useFlag; // 顯????
short field; // 顯????携?
short target; // 줻暄
short deadTargetFlag; // ???????줻暄???
short sendFlag; // ????????姬?쫢?
char name[ITEM_NAME_LEN*2+1]; // ????<3F>
char name2[ITEM_NAME2_LEN*2+1]; // ????<3F>?
char memo[ITEM_MEMO_LEN*2+1]; // ??
char damage[20];
#ifdef _PET_ITEM
char type;
#endif
#ifdef _ITEM_JIGSAW
char jigsaw[50];
#endif
#ifdef _NPC_ITEMUP
int itemup;
#endif
#ifdef _ITEM_COUNTDOWN
int counttime;
#endif
#ifdef _MAGIC_ITEM_
int ;
#endif
} ITEM;
typedef struct
{
int graNo;
int faceGraNo;
int id;
int dir;
int hp, maxHp;
int mp, maxMp;
int vital;
int str, tgh, dex;
int exp, maxExp;
int level;
int atk, def;
int quick, charm, luck;
int earth, water, fire, wind;
int gold;
#ifdef _NEW_MANOR_LAW
int fame;
#endif
int titleNo;
int dp;
char name[CHAR_NAME_LEN+1];
char freeName[CHAR_FREENAME_LEN+1];
short nameColor;
#ifdef _ANGEL_SUMMON
unsigned status;
#else
unsigned short status;
#endif
unsigned short etcFlag;
short battlePetNo;
short selectPetNo[MAX_PET];
short mailPetNo;
#ifdef _STANDBYPET
short standbyPet;
#endif
int battleNo;
short sideNo;
short helpMode;
ITEM item[MAX_ITEM];
ACTION *ptAct;
int pcNameColor;
short transmigration;
char chusheng[61];
char familyName[CHAR_NAME_LEN+1];
int familyleader;
int channel;
int quickChannel;
int personal_bankgold;
int ridePetNo;//녘膠近獗
int learnride;
unsigned int lowsride;
char ridePetName[CHAR_FREENAME_LEN+1];
int ridePetLevel;
int familySprite;
int baseGraNo;
ITEM itempool[MAX_ITEM];
int big4fm;
int trade_confirm; // 1 -> 놓迦令
// 2 -> <20>[乖렘객苟횅땍숩
// 3 -> 쏭뚤렘객苟횅땍숩
// 4 -> 崗렘쌉객苟횅땍숩
#ifdef _CHAR_PROFESSION // WON ADD 훙膠斂撚
int profession_class;
int profession_level;
// int profession_exp;
int profession_skill_point;
char profession_class_name[32];
#endif
#ifdef _ALLDOMAN // (꼇옵역) Syu ADD 탤契골NPC
int herofloor;
#endif
#ifdef _GM_IDENTIFY // Rog ADD GM街깎
char gm_name[GM_NAME_LEN+1];
#endif
#ifdef _FRIENDCHANNEL // ROG ADD 봤堂틉돛
char chatRoomNum[4];
#endif
#ifdef _STREET_VENDOR
int iOnStreetVendor; // 겠覡친駕
#endif
int skywalker; // GM莖契諒??
#ifdef _MOVE_SCREEN
BOOL bMoveScreenMode; // 盧땡段캥친駕
BOOL bCanUseMouse; // 角뤠옵鹿賈痰뺄柑盧땡
int iDestX; // 커깃듐 X 林깃
int iDestY; // 커깃듐 Y 林깃
#endif
#ifdef _THEATER
int iTheaterMode; // 양끝친駕
int iSceneryNumber; // 션쩌양牘교쒼暠뵀
ACTION *pActNPC[5]; // 션쩌양끝櫓줄珂끓<E78F82>놔윱돨NPC
#endif
#ifdef _NPC_DANCE
int iDanceMode; // 땡寧땡친駕
#endif
#ifdef _EVIL_KILL
int newfame; // 擎램침엊생롸
short ftype;
#endif
int debugmode;
#ifdef _SFUMATO
int sfumato; // 랗늴斡횡暠꿔<E69AA0>
#endif
#ifdef _NEW_ITEM_
int ;
#endif
#ifdef _CHARSIGNADY_NO_
int ;
#endif
#ifdef _MAGIC_ITEM_
int ;
int ;
#endif
} PC;
#ifdef _FMVER21
enum
{
FMMEMBER_NONE = -1, // 灌속흙훨부소痢
FMMEMBER_MEMBER = 1, // 寧겹냥逃
FMMEMBER_APPLY, // <20>헝속흙소痢
FMMEMBER_LEADER, // 소痢痢낀
FMMEMBER_ELDER, // 낀일
//FMMEMBER_INVITE, // 셈鱇
//FMMEMBER_BAILEE, // 꼿蛟낀
//FMMEMBER_VICELEADER, // 릴痢낀
FMMEMBER_NUMBER,
};
#endif
enum
{
MAGIC_FIELD_ALL,
MAGIC_FIELD_BATTLE,
MAGIC_FIELD_MAP
};
enum
{
MAGIC_TARGET_MYSELF,
MAGIC_TARGET_OTHER,
MAGIC_TARGET_ALLMYSIDE,
MAGIC_TARGET_ALLOTHERSIDE,
MAGIC_TARGET_ALL,
MAGIC_TARGET_NONE,
MAGIC_TARGET_OTHERWITHOUTMYSELF,
MAGIC_TARGET_WITHOUTMYSELFANDPET,
MAGIC_TARGET_WHOLEOTHERSIDE,
#ifdef __ATTACK_MAGIC
MAGIC_TARGET_SINGLE, // 濾뚤둔렘캐寧렘
MAGIC_TARGET_ONE_ROW, // 濾뚤둔렘캐寧죗
MAGIC_TARGET_ALL_ROWS, // 濾뚤둔렘杰唐훙
#endif
};
enum
{
PETSKILL_FIELD_ALL,
PETSKILL_FIELD_BATTLE,
PETSKILL_FIELD_MAP
};
enum
{
PETSKILL_TARGET_MYSELF,
PETSKILL_TARGET_OTHER,
PETSKILL_TARGET_ALLMYSIDE,
PETSKILL_TARGET_ALLOTHERSIDE,
PETSKILL_TARGET_ALL,
PETSKILL_TARGET_NONE,
PETSKILL_TARGET_OTHERWITHOUTMYSELF,
PETSKILL_TARGET_WITHOUTMYSELFANDPET
#ifdef _BATTLESKILL // (꼇옵역) Syu ADD 濫떱세콘썽충
,PETSKILL_TARGET_ONE_ROW
,PETSKILL_TARGET_ONE_LINE
,PETSKILL_TARGER_DEATH
#endif
#ifdef _SKILL_ADDBARRIER
,PETSKILL_TARGET_ONE_ROW_ALL //朞乖렘돨데탤
#endif
};
enum
{
ITEM_FIELD_ALL,
ITEM_FIELD_BATTLE,
ITEM_FIELD_MAP,
};
enum
{
ITEM_TARGET_MYSELF,
ITEM_TARGET_OTHER,
ITEM_TARGET_ALLMYSIDE,
ITEM_TARGET_ALLOTHERSIDE,
ITEM_TARGET_ALL,
ITEM_TARGET_NONE,
ITEM_TARGET_OTHERWITHOUTMYSELF,
ITEM_TARGET_WITHOUTMYSELFANDPET,
#ifdef _PET_ITEM
ITEM_TARGET_PET
#endif
};
typedef struct
{
int index; //貫零
int graNo; // ??쬴?
int hp, maxHp; // ????쥍??
int mp, maxMp; // ????쥍??
int exp, maxExp; // ??즟???????¸????즟
int level; // ???
int atk, def; // ????????<3F>\??
int quick; // 皇┽?
int ai; // ?<3F>
int earth, water, fire, wind; // 곑???
int maxSkill; // ?쥍????
int trn; // 녘膠瘻<E886A0>
#ifdef _SHOW_FUSION
int fusion; // low word: 녘뎔펴깃, hi word: 膠蘆긍쯤
#endif
#ifdef _ANGEL_SUMMON
unsigned status;
#else
unsigned short status; // ?????(??????)
#endif
char name[CHAR_NAME_LEN+1]; // 哄?<3F>
char freeName[PET_NAME_LEN+1]; // ???????<3F>
short useFlag; // ??????????????
short changeNameFlag; // <20>죘?????????
#ifdef _PET_ITEM
ITEM item[MAX_PET_ITEM]; // 녘膠돛야
#endif
#ifdef _PETCOM_
int oldlevel,oldhp,oldatk,oldquick,olddef;
#endif
#ifdef _RIDEPET_
int rideflg;
#endif
#ifdef _PETBLESS_
int blessflg;
int blesshp;
int blessatk;
int blessquick;
int blessdef;
#endif
} PET;
typedef struct
{
short useFlag;
int mp;
short field;
short target;
short deadTargetFlag;
char name[MAGIC_NAME_LEN+1];
char memo[MAGIC_MEMO_LEN+1];
} MAGIC;
typedef struct
{
short useFlag;
int id;
int level;
int maxHp;
int hp;
int mp;
char name[CHAR_NAME_LEN+1];
ACTION *ptAct;
} PARTY;
typedef struct
{
short useFlag;
short onlineFlag;
int level;
short transmigration;
int dp;
int graNo;
char name[CHAR_NAME_LEN+1];
#ifdef _MAILSHOWPLANET // (옵역렴) Syu ADD 鞫刻츰튬槿헷
char planetname[64];
#endif
} ADDRESS_BOOK;
typedef struct
{
short petNo;
short levelUp;
int exp;
} BATTLE_RESULT_CHR;
typedef struct
{
short useFlag;
BATTLE_RESULT_CHR resChr[RESULT_CHR_EXP];
char item[RESULT_ITEM_COUNT][RESULT_ITEM_NAME_LEN+1];
} BATTLE_RESULT_MSG;
typedef struct
{
short useFlag;
short skillId;
short field;
short target;
char name[SKILL_NAME_LEN+1];
char memo[SKILL_MEMO_LEN+1];
} PET_SKILL;
#ifdef _CHAR_PROFESSION // WON ADD 훙膠斂撚
typedef struct
{
short useFlag;
short skillId;
short target;
short kind;
char name[PROFESSION_MEMO_LEN+1];
char memo[PROFESSION_MEMO_LEN+1];
int icon;
int costmp;
int skill_level;
#ifdef _PRO3_ADDSKILL
int cooltime;
#endif
} PROFESSION_SKILL;
#endif
typedef struct
{
char name[CHAR_NAME_LEN+1]; // SJIS?<3F>죘????
short level; // ???
int login; // ??????
int faceGraNo; // ???쬴?
int hp; // ??
int str; // ???
int def; // <20>\??
int agi; // ┽孝?
int app; // <20>u?
int attr[4]; // 줟<>?곑???????
int dp; // ????????
} CHARLISTTABLE;
#ifdef _AIDENGLU_
typedef struct
{
int ;
int ;
int ;
int ;
int ;
int ;
int ;
char [4][32];
int ;
}Landed;
#endif
extern PC pc;
extern short maxPcNo;
extern short selectPcNo;
extern short prSendMode;
extern short prSendFlag;
extern short jbSendFlag;
extern short duelSendFlag;
extern int loginDp;
extern short helpFlag;
extern short tradeFlag;
extern short tradeStatus;
//extern short channel;
extern MAGIC magic[];
extern PET pet[];
extern PARTY party[];
extern short partyModeFlag;
extern ADDRESS_BOOK addressBook[];
extern BOOL addressBookFlag;
extern BATTLE_RESULT_MSG battleResultMsg;
extern PET_SKILL petSkill[][MAX_SKILL];
extern CHARLISTTABLE chartable[];
extern char newCharacterName[];
extern int newCharacterGraNo;
extern int newCharacterFaceGraNo;
extern int newCharacterVit;
extern int newCharacterStr;
extern int newCharacterTgh;
extern int newCharacterDex;
extern int newCharacterEarth;
extern int newCharacterWater;
extern int newCharacterFire;
extern int newCharacterWind;
extern int newCharacterHomeTown;
void initPcAll( void );
void initPc( void );
void createPc( int, int, int, int );
void resetPc( void );
void setPcWarpPoint( int, int );
void setPcPoint( void );
void setPcGraNo( int, int );
void setPcId( int );
void setPcDir( int );
void setPcAction( int );
#ifdef __EMOTION
void setPcEmotion( int emotion );
#endif
int getPcAction( void );
#ifdef _CHAR_PROFESSION // WON ADD 훙膠斂撚
#ifdef _PRO3_ADDSKILL
#define MAX_PROFESSION_SKILL 30
#else
#define MAX_PROFESSION_SKILL 26
#endif
extern PROFESSION_SKILL profession_skill[];
// #ifdef _GM_IDENTIFY // Rog ADD GM街깎
// void setPcParam( char *, char *, int, char *, int, int, int, int, int, int, int, int, char *);
// void setPcParam( char *, char *, int, char *, int, int, int, int, int, int, int, char *);
// #else
// void setPcParam( char *, char *, int, char *, int, int, int, int, int, int, int, int );
#ifdef _ALLDOMAN // (꼇옵역) Syu ADD 탤契골NPC
void setPcParam( char *, char *, int, char *, int, int, int, int, int, int, int , int );
#else
void setPcParam( char *, char *, int, char *, int, int, int, int, int, int, int );
#endif
// #endif
#else
void setPcParam( char *, char *, int, char *, int, int, int, int );
#endif
void updataPcAct( void );
void setPcLeader( void );
void delPcLeader( void );
void setPcParty( void );
void delPcParty( void );
void setPcWatch( void );
void delPcWatch( void );
void changePcAct( int, int, int, int, int, int, int );
void setPcWalkFlag( void );
void delPcWalkFlag( void );
int checkPcWalkFlag( void );
void setPcUseMagic( void );
void delPcUseMagic( void );
void setPcFukidashi( unsigned int );
void setPcNameColor( int );
void clearPartyParam( void );
void clearPtActPartyParam( void );
int existCharacterListEntry( int );
int cmpNameCharacterList( char * );
int setCharacterList( char *, char * );
int resetCharacterList( int );
void getItem( void );
void swapItem( int, int );
BOOL lookAtAround( void );
void initAddressBook( void );
void addressBookProc( void );
int CHAR_getMaxHaveGold( void);
#endif