2016-12-24 08:45:52 +08:00
|
|
|
|
#ifndef __FAMILY_H__
|
|
|
|
|
#define __FAMILY_H__
|
|
|
|
|
|
|
|
|
|
#include "version.h"
|
|
|
|
|
#include "common.h"
|
|
|
|
|
#include "util.h"
|
|
|
|
|
#include "net.h"
|
|
|
|
|
#include "time.h"
|
|
|
|
|
|
2017-01-13 23:37:03 +08:00
|
|
|
|
#define FAMILY_MAXNUM 1000 // 家族数量
|
2016-12-24 08:45:52 +08:00
|
|
|
|
#ifdef _FMVER21
|
2017-01-13 23:37:03 +08:00
|
|
|
|
#define FAMILY_MAXMEMBER 200 // 家族人数
|
|
|
|
|
#define FAMILY_MAXCHANNELMEMBER 50 // 频道人数
|
2016-12-24 08:45:52 +08:00
|
|
|
|
#else
|
2017-01-13 23:37:03 +08:00
|
|
|
|
#define FAMILY_MAXMEMBER 50 // 家族人数
|
|
|
|
|
#define FAMILY_MAXCHANNELMEMBER 10 // 频道人数
|
2016-12-24 08:45:52 +08:00
|
|
|
|
#endif
|
2017-01-13 23:37:03 +08:00
|
|
|
|
#define FAMILY_MAXCHANNEL 5 // 家族频道
|
2016-12-24 08:45:52 +08:00
|
|
|
|
|
|
|
|
|
#define CHAR_MAXNAME 32
|
|
|
|
|
#define CHAR_MAXID 20
|
2017-01-13 23:37:03 +08:00
|
|
|
|
#define MINFMLEVLEFORPOINT 3 // 3 申请庄园最低等级
|
|
|
|
|
#define FMLEADERLV 30 // 族长等级
|
2016-12-24 08:45:52 +08:00
|
|
|
|
|
|
|
|
|
#ifdef _FAMILY_MANORNUM_CHANGE
|
2017-01-13 23:37:03 +08:00
|
|
|
|
#define FAMILY_FMPKFLOOR 15 // 家族PK图层
|
2016-12-24 08:45:52 +08:00
|
|
|
|
#else
|
2017-01-13 23:37:03 +08:00
|
|
|
|
#define FAMILY_FMPKFLOOR 9 // 家族PK图层
|
|
|
|
|
#define FMPOINTNUM 4 // 有据点家族的最大数量
|
2016-12-24 08:45:52 +08:00
|
|
|
|
#define MANORNUM 4
|
2017-01-13 23:37:03 +08:00
|
|
|
|
#define FAMILY_MAXHOME 4 // 家族据点
|
2016-12-24 08:45:52 +08:00
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
enum
|
|
|
|
|
{
|
2017-01-13 23:37:03 +08:00
|
|
|
|
FM_TOP_INTEGRATE = 1, // DPTOP 综合
|
|
|
|
|
FM_TOP_ADV, // DPTOP 冒险
|
|
|
|
|
FM_TOP_FEED, // DPTOP 饲育
|
|
|
|
|
FM_TOP_SYNTHESIZE, // DPTOP 合成
|
|
|
|
|
FM_TOP_DEALFOOD, // DPTOP 料理
|
|
|
|
|
FM_TOP_PK, // DPTOP PK
|
2016-12-24 08:45:52 +08:00
|
|
|
|
#ifdef _NEW_MANOR_LAW
|
2017-01-13 23:37:03 +08:00
|
|
|
|
FM_TOP_MOMENTUM = 8, // DPTOP 气势
|
2016-12-24 08:45:52 +08:00
|
|
|
|
#endif
|
2017-01-13 23:37:03 +08:00
|
|
|
|
FM_TOP_NUM, // DPTOP 数量
|
2016-12-24 08:45:52 +08:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/*
|
2017-01-13 23:37:03 +08:00
|
|
|
|
* 扔□田 及职及桦赭午及 cdkey charname 及赢今毛宁六月凶户卞
|
2016-12-24 08:45:52 +08:00
|
|
|
|
* CHEKEYLEN, CHARNAMELEN
|
2017-01-13 23:37:03 +08:00
|
|
|
|
* 毛银丹方丹卞 凳[
|
2016-12-24 08:45:52 +08:00
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
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);
|
|
|
|
|
|
2017-01-13 23:37:03 +08:00
|
|
|
|
#ifdef _PERSONAL_FAME // Arminius: 家族个人声望
|
2016-12-24 08:45:52 +08:00
|
|
|
|
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 );
|
|
|
|
|
|
2017-01-13 23:37:03 +08:00
|
|
|
|
#ifdef _ADD_FAMILY_TAX // WON ADD 增加庄园税收
|
2016-12-24 08:45:52 +08:00
|
|
|
|
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;
|
2017-01-13 23:37:03 +08:00
|
|
|
|
// BOOL use; // 0->没使用 1->使用
|
2016-12-24 08:45:52 +08:00
|
|
|
|
int memberindex[FAMILY_MAXMEMBER];
|
|
|
|
|
char numberlistarray[FAMILY_MAXMEMBER][64];
|
|
|
|
|
char memo[35][220]; // family dengon
|
2017-01-13 23:37:03 +08:00
|
|
|
|
int accept; // 召募成员与否
|
2016-12-24 08:45:52 +08:00
|
|
|
|
int memonum;
|
|
|
|
|
int memoindex;
|
|
|
|
|
};
|
2017-01-13 23:37:03 +08:00
|
|
|
|
// 家族之间的留言板
|
2016-12-24 08:45:52 +08:00
|
|
|
|
struct FMS_MEMO
|
|
|
|
|
{
|
|
|
|
|
char memo[140][220];
|
|
|
|
|
int memonum;
|
|
|
|
|
int memoindex;
|
|
|
|
|
};
|
2017-01-13 23:37:03 +08:00
|
|
|
|
// 家族强者表
|
2016-12-24 08:45:52 +08:00
|
|
|
|
struct FMS_DPTOP
|
|
|
|
|
{
|
2017-01-13 23:37:03 +08:00
|
|
|
|
int num; // 记录有多少个家族(综合)
|
2016-12-24 08:45:52 +08:00
|
|
|
|
char topmemo[FAMILY_MAXNUM][128];
|
2017-01-13 23:37:03 +08:00
|
|
|
|
int fmtopid[FAMILY_MAXNUM]; // 家族索引
|
2016-12-24 08:45:52 +08:00
|
|
|
|
#ifdef _FMVER21
|
2017-01-13 23:37:03 +08:00
|
|
|
|
int fmtopdp[FAMILY_MAXNUM]; // 家族综合声望
|
2016-12-24 08:45:52 +08:00
|
|
|
|
#endif
|
|
|
|
|
#ifdef _NEW_MANOR_LAW
|
2017-01-13 23:37:03 +08:00
|
|
|
|
int fmMomentum[FAMILY_MAXNUM]; // 家族气势
|
|
|
|
|
char momentum_topmemo[FAMILY_MAXNUM][96]; // 家族气势 top
|
|
|
|
|
int momentum_topid[FAMILY_MAXNUM]; // 家族气势 top id 索引
|
2016-12-24 08:45:52 +08:00
|
|
|
|
#endif
|
2017-01-13 23:37:03 +08:00
|
|
|
|
int adv_num; // 冒险
|
2016-12-24 08:45:52 +08:00
|
|
|
|
char adv_topmemo[30][96];
|
2017-01-13 23:37:03 +08:00
|
|
|
|
int feed_num; // 伺育
|
2016-12-24 08:45:52 +08:00
|
|
|
|
char feed_topmemo[30][96];
|
2017-01-13 23:37:03 +08:00
|
|
|
|
int syn_num; // 合成
|
2016-12-24 08:45:52 +08:00
|
|
|
|
char syn_topmemo[30][96];
|
2017-01-13 23:37:03 +08:00
|
|
|
|
int food_num; // 料理
|
2016-12-24 08:45:52 +08:00
|
|
|
|
char food_topmemo[30][96];
|
2017-01-13 23:37:03 +08:00
|
|
|
|
int pk_num; // PK
|
2016-12-24 08:45:52 +08:00
|
|
|
|
char pk_topmemo[30][96];
|
|
|
|
|
};
|
2017-01-13 23:37:03 +08:00
|
|
|
|
// 家族据点
|
2016-12-24 08:45:52 +08:00
|
|
|
|
struct FM_POINTLIST
|
|
|
|
|
{
|
|
|
|
|
char pointlistarray[FAMILY_MAXHOME][1024]; // Arminius: 32->1024
|
|
|
|
|
#ifdef _NEW_MANOR_LAW
|
2017-01-13 23:37:03 +08:00
|
|
|
|
int fm_momentum[FAMILY_MAXHOME]; // 记录挑战时期开始时的守庄家族气势值
|
|
|
|
|
BOOL fm_inwar[FAMILY_MAXHOME]; // 此庄园是否进行庄园排程中
|
2016-12-24 08:45:52 +08:00
|
|
|
|
#endif
|
|
|
|
|
};
|
2017-01-13 23:37:03 +08:00
|
|
|
|
// 家族PK图层
|
2016-12-24 08:45:52 +08:00
|
|
|
|
struct FM_PKFLOOR
|
|
|
|
|
{
|
|
|
|
|
int fl;
|
|
|
|
|
};
|
|
|
|
|
// End
|
|
|
|
|
|
|
|
|
|
#ifdef _NEW_MANOR_LAW
|
|
|
|
|
typedef struct _ManorSchedule_t{
|
2017-01-13 23:37:03 +08:00
|
|
|
|
int iFmIndex[10]; // 排入挑战排程的家族索引
|
|
|
|
|
int iFmMomentum[10]; // 家族气势
|
|
|
|
|
int iSort[10]; // 排名用
|
|
|
|
|
char szMemo[10][256]; // 记录: 家族名称|约战时间|家族气势
|
|
|
|
|
char szFmName[10][32]; // 家族名称
|
|
|
|
|
struct tm tm1[10]; // 记录挑战时间
|
2016-12-24 08:45:52 +08:00
|
|
|
|
}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
|