226 lines
6.4 KiB
C
226 lines
6.4 KiB
C
![]() |
#ifndef __FAMILY_H__
|
|||
|
#define __FAMILY_H__
|
|||
|
|
|||
|
#include "version.h"
|
|||
|
#include "common.h"
|
|||
|
#include "util.h"
|
|||
|
#include "net.h"
|
|||
|
#include "time.h"
|
|||
|
|
|||
|
#define FAMILY_MAXNUM 1000 // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
#ifdef _FMVER21
|
|||
|
#define FAMILY_MAXMEMBER 200 // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
#define FAMILY_MAXCHANNELMEMBER 50 // Ƶ<><C6B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
#else
|
|||
|
#define FAMILY_MAXMEMBER 50 // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
#define FAMILY_MAXCHANNELMEMBER 10 // Ƶ<><C6B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
#endif
|
|||
|
#define FAMILY_MAXCHANNEL 5 // <20><><EFBFBD><EFBFBD>Ƶ<EFBFBD><C6B5>
|
|||
|
|
|||
|
#define CHAR_MAXNAME 32
|
|||
|
#define CHAR_MAXID 20
|
|||
|
#define MINFMLEVLEFORPOINT 3 // 3 <20><><EFBFBD><EFBFBD>ׯ<D7AF><D4B0><EFBFBD>͵ȼ<CDB5>
|
|||
|
#define FMLEADERLV 30 // <20>峤<EFBFBD>ȼ<EFBFBD>
|
|||
|
|
|||
|
#ifdef _FAMILY_MANORNUM_CHANGE
|
|||
|
#define FAMILY_FMPKFLOOR 15 // <20><><EFBFBD><EFBFBD><EFBFBD>У<EFBFBD>ͼ<EFBFBD><CDBC>
|
|||
|
#else
|
|||
|
#define FAMILY_FMPKFLOOR 9 // <20><><EFBFBD><EFBFBD><EFBFBD>У<EFBFBD>ͼ<EFBFBD><CDBC>
|
|||
|
#define FMPOINTNUM 4 // <20>оݵ<D0BE><DDB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
#define MANORNUM 4
|
|||
|
#define FAMILY_MAXHOME 4 // <20><><EFBFBD><EFBFBD><EFBFBD>ݵ<EFBFBD>
|
|||
|
#endif
|
|||
|
|
|||
|
enum
|
|||
|
{
|
|||
|
FM_TOP_INTEGRATE = 1, // DPTOP <20>ۺ<EFBFBD>
|
|||
|
FM_TOP_ADV, // DPTOP ð<><C3B0>
|
|||
|
FM_TOP_FEED, // DPTOP <20><><EFBFBD><EFBFBD>
|
|||
|
FM_TOP_SYNTHESIZE, // DPTOP <20>ϳ<EFBFBD>
|
|||
|
FM_TOP_DEALFOOD, // DPTOP <20><><EFBFBD><EFBFBD>
|
|||
|
FM_TOP_PK, // DPTOP <20>У<EFBFBD>
|
|||
|
#ifdef _NEW_MANOR_LAW
|
|||
|
FM_TOP_MOMENTUM = 8, // DPTOP <20><><EFBFBD><EFBFBD>
|
|||
|
#endif
|
|||
|
FM_TOP_NUM, // DPTOP <20><><EFBFBD><EFBFBD>
|
|||
|
};
|
|||
|
|
|||
|
enum
|
|||
|
{
|
|||
|
FM_FIX_ACCEPTFLAG = 1,
|
|||
|
FM_FIX_FMPK,
|
|||
|
FM_FIX_FMPET,
|
|||
|
FM_FIX_FMRULE,
|
|||
|
FM_FIX_DELFMTIME,
|
|||
|
FM_FIX_FMGOLD,
|
|||
|
FM_FIX_FMADV,
|
|||
|
FM_FIX_FMFEED,
|
|||
|
FM_FIX_FMSYNTHESIZE,
|
|||
|
FM_FIX_FMDEALFOOD,
|
|||
|
FM_FIX_FMLEADERCHANGE,
|
|||
|
#ifdef _NEW_MANOR_LAW
|
|||
|
FM_FIX_FMMOMENTUM,
|
|||
|
FM_FIX_FAME,
|
|||
|
#endif
|
|||
|
};
|
|||
|
|
|||
|
/*
|
|||
|
* <EFBFBD>ӡ<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ְ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>缰 cdkey charname <EFBFBD><EFBFBD>Ӯ<EFBFBD><EFBFBD>ë<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
* CHEKEYLEN, CHARNAMELEN
|
|||
|
* ë<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>ʣ<EFBFBD>
|
|||
|
*/
|
|||
|
|
|||
|
void CHAR_Family(int fd, int index, char* message);
|
|||
|
void ACAddFM(int fd, int result, int fmindex, int index);
|
|||
|
void ACJoinFM(int fd, int result, int recv);
|
|||
|
void ACLeaveFM(int fd, int result, int resultflag);
|
|||
|
void ACDelFM(int fd, int result);
|
|||
|
void ACShowFMList(int ret, int fmnum, char *data);
|
|||
|
void ACFMDetail(int ret, char *data, int charfdid);
|
|||
|
void ACShowMemberList(int result, int index, int fmnumm,
|
|||
|
int fmacceptflag, int fmjoinnum, char *data);
|
|||
|
void ACShowDpTop(int result,int num, char *data, int kindflag);
|
|||
|
void ACShowPointList(int result, char *data);
|
|||
|
void ACShowFMMemo(int result, int index, int num, int dataindex, char *data);
|
|||
|
|
|||
|
#ifdef _PERSONAL_FAME // Arminius: <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
void ACFMCharLogin(int fd, int ret, int index, int floor, int fmdp,
|
|||
|
int joinflag, int fmsetupflag, int flag, int charindex, int charfame
|
|||
|
#ifdef _NEW_MANOR_LAW
|
|||
|
,int momentum
|
|||
|
#endif
|
|||
|
);
|
|||
|
#else
|
|||
|
void ACFMCharLogin(int fd, int ret, int index, int floor, int fmdp,
|
|||
|
int joinflag, int fmsetupflag, int flag, int charindex);
|
|||
|
#endif
|
|||
|
|
|||
|
void ACFMPointList(int ret, char *data);
|
|||
|
void ACSetFMPoint(int ret, int r, int clifd);
|
|||
|
void ACFMAnnounce(int ret, char *fmname, int fmindex, int index, int kindflag,
|
|||
|
char *data, int color);
|
|||
|
void ACFixFMPK(int winindex, int loseindex, int data);
|
|||
|
void ACFMJob( int fd, int ret, char* data1, char* data2 );
|
|||
|
|
|||
|
void FAMILY_Add(int fd, int meindex, char *message);
|
|||
|
void FAMILY_Join(int fd, int meindex, char *message);
|
|||
|
void FAMILY_Leave(int fd, int meindex, char *message);
|
|||
|
void FAMILY_Detail(int fd, int meindex, char *message);
|
|||
|
void FAMILY_CheckMember(int fd, int meindex, char *message);
|
|||
|
void FAMILY_Channel(int fd, int meindex, char *message);
|
|||
|
void FAMILY_Bank(int fd, int meindex, char *message);
|
|||
|
void FAMILY_SetPoint(int fd, int meindex, char *message);
|
|||
|
void FAMILY_Init(void);
|
|||
|
void FAMILY_SetAcceptFlag(int fd, int meindex, char *message);
|
|||
|
void FAMILY_FixRule( int fd, int meindex, char* message );
|
|||
|
int FAMILY_RidePet( int fd, int meindex, char* message );
|
|||
|
void FAMILY_LeaderFunc( int fd, int meindex, char* message );
|
|||
|
|
|||
|
#ifdef _ADD_FAMILY_TAX // WON ADD <20><><EFBFBD><EFBFBD>ׯ˰<D4B0><CBB0>
|
|||
|
void GS_ASK_TAX(void);
|
|||
|
void FAMILY_FIX_TAX( int fd, int index, char* message);
|
|||
|
#endif
|
|||
|
|
|||
|
void SetFMPetVarInit(int meindex);
|
|||
|
void SetFMVarInit(int meindex);
|
|||
|
|
|||
|
|
|||
|
int CheckFMLeader(int meindex);
|
|||
|
int getFmLv(int playerindex);
|
|||
|
|
|||
|
void getNewFMList( void );
|
|||
|
void checkFamilyIndex( void );
|
|||
|
|
|||
|
int CheckLeaderQ(int meindex);
|
|||
|
|
|||
|
|
|||
|
// shan add Begin
|
|||
|
struct FMMEMBER_LIST
|
|||
|
{
|
|||
|
// int fmindex;
|
|||
|
int fmnum;
|
|||
|
int fmjoinnum;
|
|||
|
// BOOL use; // 0->ûʹ<C3BB><CAB9> 1->ʹ<><CAB9>
|
|||
|
int memberindex[FAMILY_MAXMEMBER];
|
|||
|
char numberlistarray[FAMILY_MAXMEMBER][64];
|
|||
|
char memo[35][220]; // family dengon
|
|||
|
int accept; // <20><>ļ<EFBFBD><C4BC>Ա<EFBFBD><D4B1><EFBFBD><EFBFBD>
|
|||
|
int memonum;
|
|||
|
int memoindex;
|
|||
|
};
|
|||
|
// <20><><EFBFBD><EFBFBD>֮<EFBFBD><D6AE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
struct FMS_MEMO
|
|||
|
{
|
|||
|
char memo[140][220];
|
|||
|
int memonum;
|
|||
|
int memoindex;
|
|||
|
};
|
|||
|
// <20><><EFBFBD><EFBFBD>ǿ<EFBFBD>߱<EFBFBD>
|
|||
|
struct FMS_DPTOP
|
|||
|
{
|
|||
|
int num; // <20><>¼<EFBFBD>ж<EFBFBD><D0B6>ٸ<EFBFBD><D9B8><EFBFBD><EFBFBD><EFBFBD>(<28>ۺ<EFBFBD>)
|
|||
|
char topmemo[FAMILY_MAXNUM][128];
|
|||
|
int fmtopid[FAMILY_MAXNUM]; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
#ifdef _FMVER21
|
|||
|
int fmtopdp[FAMILY_MAXNUM]; // <20><><EFBFBD><EFBFBD><EFBFBD>ۺ<EFBFBD><DBBA><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
#endif
|
|||
|
#ifdef _NEW_MANOR_LAW
|
|||
|
int fmMomentum[FAMILY_MAXNUM]; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
char momentum_topmemo[FAMILY_MAXNUM][96]; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> top
|
|||
|
int momentum_topid[FAMILY_MAXNUM]; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> top id <20><><EFBFBD><EFBFBD>
|
|||
|
#endif
|
|||
|
int adv_num; // ð<><C3B0>
|
|||
|
char adv_topmemo[30][96];
|
|||
|
int feed_num; // <20><><EFBFBD><EFBFBD>
|
|||
|
char feed_topmemo[30][96];
|
|||
|
int syn_num; // <20>ϳ<EFBFBD>
|
|||
|
char syn_topmemo[30][96];
|
|||
|
int food_num; // <20><><EFBFBD><EFBFBD>
|
|||
|
char food_topmemo[30][96];
|
|||
|
int pk_num; // <20>У<EFBFBD>
|
|||
|
char pk_topmemo[30][96];
|
|||
|
};
|
|||
|
// <20><><EFBFBD><EFBFBD><EFBFBD>ݵ<EFBFBD>
|
|||
|
struct FM_POINTLIST
|
|||
|
{
|
|||
|
char pointlistarray[FAMILY_MAXHOME][1024]; // Arminius: 32->1024
|
|||
|
#ifdef _NEW_MANOR_LAW
|
|||
|
int fm_momentum[FAMILY_MAXHOME]; // <20><>¼<EFBFBD><C2BC>սʱ<D5BD>ڿ<EFBFBD>ʼʱ<CABC><CAB1><EFBFBD><EFBFBD>ׯ<EFBFBD><D7AF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ
|
|||
|
BOOL fm_inwar[FAMILY_MAXHOME]; // <20><>ׯ<D7AF>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>ׯ<D7AF>ų<EFBFBD><C5B3><EFBFBD>
|
|||
|
#endif
|
|||
|
};
|
|||
|
// <20><><EFBFBD><EFBFBD>PKͼ<4B><CDBC>
|
|||
|
struct FM_PKFLOOR
|
|||
|
{
|
|||
|
int fl;
|
|||
|
};
|
|||
|
// End
|
|||
|
|
|||
|
#ifdef _NEW_MANOR_LAW
|
|||
|
typedef struct _ManorSchedule_t{
|
|||
|
int iFmIndex[10]; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ս<EFBFBD>ų̵ļ<CCB5><C4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
int iFmMomentum[10]; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
int iSort[10]; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
char szMemo[10][256]; // <20><>¼: <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>|Լսʱ<D5BD><CAB1>|<7C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
char szFmName[10][32]; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
struct tm tm1[10]; // <20><>¼<EFBFBD><C2BC>սʱ<D5BD><CAB1>
|
|||
|
}ManorSchedule_t;
|
|||
|
|
|||
|
extern ManorSchedule_t ManorSchedule[MANORNUM];
|
|||
|
#endif
|
|||
|
|
|||
|
#define MAXFAMILYLIST 64*1024
|
|||
|
extern char familyListBuf[MAXFAMILYLIST];
|
|||
|
|
|||
|
void JoinMemberIndex( int charaindex, int fmindexi);
|
|||
|
|
|||
|
int channelMember[FAMILY_MAXNUM][FAMILY_MAXCHANNEL][FAMILY_MAXMEMBER];
|
|||
|
int familyMemberIndex[FAMILY_MAXNUM][FAMILY_MAXMEMBER];
|
|||
|
|
|||
|
#ifdef _CAX_LNS_CHARSUOXU
|
|||
|
int Char_GetFm( int id, int x);
|
|||
|
char * FM_getManorData(int ManorId,int Flg);
|
|||
|
#endif
|
|||
|
|
|||
|
#endif
|