StoneAge/gmsv/include/deathcontend.h

193 lines
5.3 KiB
C
Raw Normal View History

2018-08-07 15:51:35 +08:00
#include "version.h"
#ifdef _DEATH_CONTEND
//<2F>Ŷ<EFBFBD><C5B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
typedef struct
{
int use;
char cdkey[64];
char name[64];
}PkTeamMans;
//ս<><D5BD><EFBFBD><EFBFBD>¼
typedef struct
{
int use;
int teamnum;
int flg; //0 1
}BattleHistorys;
#define MAXTEAMMANNUM 5 //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
#define MAXBATTLENUM 100 //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ս<EFBFBD><D5BD><EFBFBD><EFBFBD>¼
#define MAXTEAMNUM 1000
#define DEFMAXBATTLENUM 50 //<2F><><EFBFBD>߾<EFBFBD><DFBE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
#define DEFWINSCORE 90
#define DEFLOSERATE 0.4
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>info
typedef struct _tagPkTeamLists
{
int use; //flg
int teamnum; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
char teamname[64]; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
char pathdir[64]; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ¼
char leadercdkey[64]; //<2F>ӳ<EFBFBD>CDKEY
int win; //ʤ
int lost; //<2F><>
int battleplay; //<2F>ܳ<EFBFBD><DCB3><EFBFBD>
int score;
int inside; //¼ȡ<C2BC><C8A1><EFBFBD><EFBFBD>
int read;
PkTeamMans MyTeamMans[MAXTEAMMANNUM];
BattleHistorys BHistory[MAXBATTLENUM];
}PkTeamLists;
#define MAXJOINTEAM 40
#define MAXWATCHMAP 16
typedef struct
{
int use;
int teamnum;
char cdkey[256];
char name[256];
int toindex;
int fd;
}JoinTeamList;
typedef struct _tagPKProcedureRow
{
int use;
int time;
int type;
JoinTeamList Team[2];
}PKProcedures;
enum{
PKTYPE_NONE=0, //<2F><>
PKTYPE_WAIT, //<2F>ȴ<EFBFBD><C8B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
PKTYPE_STANDBY, //׼<><D7BC><EFBFBD><EFBFBD>ս<EFBFBD>ȴ<EFBFBD>ʱ<EFBFBD><CAB1>
PKTYPE_PK, //<2F><>ս<EFBFBD><D5BD>
};
void del_rn( char *s );
void PKLIST_ResetOneTeamMan( int ti ); //<2F><><EFBFBD>ö<EFBFBD>Ա<EFBFBD><D4B1><EFBFBD><EFBFBD>
void PKLIST_ResetOneBHistory( int ti ); //<2F><><EFBFBD>ö<EFBFBD>ս<EFBFBD><D5BD><EFBFBD><EFBFBD>
void PKLIST_ResetOnePkTeamList( int ti ); //<2F><><EFBFBD>ò<EFBFBD><C3B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
int PKLIST_InitPkTeamList( int teamnum ); //<2F><><EFBFBD><EFBFBD>
int PKLIST_GetPkTeamListArray( int teamnum, char *cdkey);
int PKLIST_GetPkTeamListArrayFromNum( int teamnum);
//ȷ<><C8B7><EFBFBD>ظ<EFBFBD>Լս
BOOL PKLIST_CHECKPkTeamSame( int teamnum, int charaindex, char *cdkey, int toteamnum );
//ȷ<>϶<EFBFBD>ս<EFBFBD><D5BD><EFBFBD><EFBFBD>
int PKLIST_CHECKPkTeamNew( int teamnum, int charaindex, char *cdkey );
//LOAD DATA
BOOL PKLIST_LoadPkTeamListDataSub( int ti, char *data);
BOOL PKLIST_LoadPkTeamListDataMyTeamMans( int ti, char *data);
BOOL PKLIST_LoadPkTeamListDataBHistory( int ti, char *data);
//BOOL PKLIST_LoadPkTeamListData( char *data); //<2F><><EFBFBD><EFBFBD>ac<61><63><EFBFBD><EFBFBD><EFBFBD><EFBFBD> pklist
BOOL PKLIST_LoadPkTeamListData(void); // <20>ijɶ<C4B3><C9B6><EFBFBD>
void PKLIST_SavePkTeamListData(void);
void PKLIST_LoadInitPkTeamListData(void); // <20><>ȡ<EFBFBD><C8A1>ԭʼ<D4AD>IJ<EFBFBD><C4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
void PKLIST_UpData(char *mycdkey,char *tocdkey,int menum,int tonum,int winer,int flg);
int PKLIST_GetOneBHistory( int ti );
int PKLIST_SetOneBHistory( int ti, int hi, int use, int teamnum, int flg );
int PKLIST_UpdateOnePkTeamData( int ti, int forti, int winerflg);
void PKLIST_InsertTeamNum( int charaindex );
BOOL PKLIST_GetTeamLeaderCdkey( int teamnum, char *buf);
void PKLIST_ShowPkListTeamData( void);
int NPC_PKLIST_Finish_Exit( int menum, int tonum, int winside, int battlemap);
BOOL PKLIST_HandleChartsMess( int fd, char *data, int type, int flg);
BOOL PKLIST_GetChartsListData( int ti, char *data, int sizes );
BOOL PKLIST_GetMyPKListTeamData( int teamnum, char *data, int sizes );
/*
BOOL PKLIST_CheckPKSameTeam( int charaindex );
BOOL PKLIST_JoinPKProcedures( int charaindex );
void PKLIST_DelPKProcedures( int ti, int side );
void PKLIST_CheckPKProcedures( void );
void PKLIST_CheckPKProcedures_PKTYPEWAIT( int ti);
void PKLIST_CheckPKProcedures_PKTYPESTANDBY( int ti);
*/
//<2F><><EFBFBD><EFBFBD>
void PKLIST_DelPKProcedures( int ti, int side, int type);
BOOL PKLIST_CheckPklistInServerMap( int ti, int side);
BOOL PKLIST_CheckPKSameTeam( int charaindex );
BOOL PKLIST_CheckPKReapetTeam( int menum, int tonum);
BOOL PKLIST_JoinPKProcedures( int charaindex );
void PKLIST_CheckTeamBeEnable( void);
void PKLIST_warp( int ti, int side, int fl, int x, int y );
void NPC_PKLIST_PlayerLogout_Exit( int charaindex );
int PKLIST_GetPKProcedureArray( int menum );
BOOL PKLIST_CheckLOCKTeam( int menum);
void PKLIST_LOCKTeam( int menum);
void PKLIST_UNLOCKTeam( int menum);
void PKLIST_Sort_PKListSort( void);
//<2F><>ʽ<EFBFBD><CABD>
typedef struct _tagArrangeBattle
{
int use;
int fl;
int code;
int teamnum;
int type; //0 NULL // 1 in battle
int time;
char teamname[256];
int toindex;
struct _tagArrangeBattle *next[2];
struct _tagArrangeBattle *top;
}ArrangeBattleC;
#define MAXBAFLOOR 20
#define MAXNOWBATTLE 128
#define MAXBAHEAD 16
#define MAXBATTLEPAGE MAXJOINTEAM
void ABATTLE_InitABattle( int maxnums );
int ABATTLE_CreateNet( ArrangeBattleC *now, int ti, int fl, int maxfl);
void ABATTLE_ShowNet( ArrangeBattleC *now, int fl);
void ABATTLE_ShowBattlefromFl( int ti, int fl);
ArrangeBattleC *ArrangeBattleC_getNew( void);
BOOL ABATTLE_InsertBattle( ArrangeBattleC *aB); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
void ABATTLE_EnterBattle( ArrangeBattleC *aB); //<2F><>Χ
void ABATTLE_EliminateBattlefromFl( ArrangeBattleC *aB);//<2F>޳<EFBFBD>
BOOL ABATTLE_CheckInABattle( int ti);//ȷ<><C8B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ս<EFBFBD><D5BD>״̬ <20><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>
int ABATTLE_FindBattlefromFl( int ti, int fl); //<2F><>Ѱ<EFBFBD>ɼ<EFBFBD><C9BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̶<EFBFBD><CCB6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
void ABATTLE_CheckBattlefromFl(int charindex, int ti,int battleindex); //ȷ<>ϲ<EFBFBD><CFB2><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
int ABATTLE_CheckBattlefromFl_sub(int charindex, int ti, int fl,int battleindex); //ȷ<>ϲ<EFBFBD><CFB2><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>
ArrangeBattleC *ABATTLE_getInBattle( int teamnum); //ȡ<><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>head form teamnum
void ABATTLE_MakeInABattleString( void); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ִ<EFBFBD>
BOOL PKLIST_GetABattlelistDataString( int ti, int *tindex, int *stime,
char *buf1, char *buf2, char *buf3, int flg);//ȡ<><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ִ<EFBFBD>
ArrangeBattleC *ArrangeBattleC_getInBattleArray( int ti);
void ABATTLE_RecordBattle( int ti, char *buf1, char *tstr1,char *buf2, char *tstr2);
void remove_r( char *s );
void ABATTLE_GetRecordBattle( void);
#endif