re-encoding the files to utf-8 for better display
This commit is contained in:
parent
4bd690b841
commit
40c0232101
@ -6,4 +6,4 @@ echo "char *genver=\"" > $OUT
|
||||
cat $IN | grep -e "^#define" | cut -b 9- | sed "s/\"/\'/g" | \
|
||||
sed 's/\\/\\\\/g' >> $OUT
|
||||
echo "<<Generated at "`date`">>" >> $OUT
|
||||
echo "by : Áúzoroš¤×÷ĘŇ\n\";" >> $OUT
|
||||
echo "by : 龙zoro工作室\n\";" >> $OUT
|
File diff suppressed because it is too large
Load Diff
@ -12,36 +12,36 @@
|
||||
#endif
|
||||
#define MIN_MEMBERNUM 10 // 10
|
||||
|
||||
#ifdef _FIX_9_FMPOINT // WON ADD 九大庄园
|
||||
#ifdef _FIX_9_FMPOINT // WON ADD 九大庄园
|
||||
#define MAX_FMPOINT 10
|
||||
#else
|
||||
#define MAX_FMPOINT 4 // 4
|
||||
#endif
|
||||
|
||||
#define PREDEL_TIME 60*60*24*7 // 七天 60*60*24*3
|
||||
#define PREDELMEMBER_TIME 60*60*24*30 // 30天 60*60*24*30
|
||||
#define FAMILY_MEMONUM 35 // 家族留言板最大留言数量
|
||||
#define PREDEL_TIME 60*60*24*7 // 七天 60*60*24*3
|
||||
#define PREDELMEMBER_TIME 60*60*24*30 // 30天 60*60*24*30
|
||||
#define FAMILY_MEMONUM 35 // 家族留言板最大留言数量
|
||||
#define FAMILY_MEMOLEN 256
|
||||
#define FMSMEMOINDEX 10000 // 家族之间留言板 index
|
||||
#define FMSMEMOINDEX 10000 // 家族之间留言板 index
|
||||
#define FMSMEMONUM 140
|
||||
#define TOPFMLISTNUM 10 // 家族排行榜数量
|
||||
#define TOPFMLISTNUM 10 // 家族排行榜数量
|
||||
#define MINFMPOPNUM -20000000
|
||||
// shan 20011207
|
||||
#define MAXFMPOPNUM 100000000
|
||||
//#define MAXFMPOPNUM 5000000
|
||||
#define MINAPPLYPNUM 30 // 申请家族最低人数
|
||||
#define MINAPPLYPNUM 30 // 申请家族最低人数
|
||||
#define FMMEMBERINDEX "fmmember"
|
||||
#define FMMEMOLIST "memo"
|
||||
#define FMELDERNUM 4 // 长老数量
|
||||
#define FMELDERNUM 4 // 长老数量
|
||||
#ifdef _EVERYONE_RIDE
|
||||
#define FMMAXGOLD 100000000 // 家族基金上限
|
||||
#define FMMAXGOLD 100000000 // 家族基金上限
|
||||
#else
|
||||
#define FMMAXGOLD 10000000 // 家族基金上限
|
||||
#define FMMAXGOLD 10000000 // 家族基金上限
|
||||
#endif
|
||||
// shan 20011207
|
||||
#define MAXRECVPOP 50000000 // 家族声望转移上限
|
||||
#define MAXRECVPOP 50000000 // 家族声望转移上限
|
||||
// CoolFish: 2001/11/26
|
||||
//#define MAXRECVPOP 2500000 // 家族声望转移上限
|
||||
//#define MAXRECVPOP 2500000 // 家族声望转移上限
|
||||
|
||||
typedef enum
|
||||
{
|
||||
@ -145,7 +145,7 @@ int ACAddFM(int fd, int *workindex, char *fmname, char *fmleadername,
|
||||
char *fmleaderid, int fmleaderlv, char *petname, char *petattr,
|
||||
char *fmrule, int fmsprite, int fmleadergrano, int charfdid);
|
||||
#endif
|
||||
#ifdef _PERSONAL_FAME // Arminius: 家族个人声望
|
||||
#ifdef _PERSONAL_FAME // Arminius: 家族个人声望
|
||||
int ACJoinFM(int fd, int index, char *fmname, int fmindex,
|
||||
char *charname, char *charid, int charlv, int fame, int charfdid);
|
||||
#else
|
||||
@ -185,7 +185,7 @@ int ACFMCharLogin(int fd, int index, char *fmname, int fmindex,
|
||||
#endif
|
||||
);
|
||||
#else
|
||||
#ifdef _PERSONAL_FAME // Arminius: 家族个人声望
|
||||
#ifdef _PERSONAL_FAME // Arminius: 家族个人声望
|
||||
int ACFMCharLogin(int fd, int index, char *fmname, int fmindex,
|
||||
char *charname, char *charid, int charlv, int *floor, int *fmpopular,
|
||||
int *joinflag, int *fmsetupflag, int *charindex, int charfdid,
|
||||
@ -245,7 +245,7 @@ int FMPK_SetData( int ti, int Pkflg, char *Data, int sizes);
|
||||
|
||||
|
||||
|
||||
#ifdef _DEATH_FAMILY_GM_COMMAND // WON ADD 家族战GM指令
|
||||
#ifdef _DEATH_FAMILY_GM_COMMAND // WON ADD 家族战GM指令
|
||||
void saacproto_ACRELOADFM_recv( int fd, int charindex );
|
||||
char *get_fm_leader_index( int fm_index );
|
||||
#endif
|
||||
@ -253,7 +253,7 @@ char *get_fm_leader_index( int fm_index );
|
||||
|
||||
|
||||
|
||||
#ifdef _DEATH_FAMILY_STRUCT // WON ADD 家族战存放胜负资料
|
||||
#ifdef _DEATH_FAMILY_STRUCT // WON ADD 家族战存放胜负资料
|
||||
|
||||
#define fm_pk_max 200
|
||||
|
||||
|
@ -67,7 +67,7 @@ BOOL IAData_ADDITEM( int fd, int ItemID, char *ITEMNAME, char *DATA, int flg)
|
||||
}
|
||||
}
|
||||
if( i>= MAXPAITEMS ) return FALSE;
|
||||
//ヒヘサリク<EFBFBD>S
|
||||
//送回给GS
|
||||
for(i=0;i<MAXCONNECTION;i++) {
|
||||
if( is_game_server_login(i) ){
|
||||
saacproto_ACItemAuction_send( i, IAData[num].ItemName, IAData[num].Data,
|
||||
|
140
saac/src/char.c
140
saac/src/char.c
@ -36,7 +36,7 @@ static int makeSaveCharString( char *out , int outlen ,
|
||||
static int findBlankCharIndex( char *id );
|
||||
|
||||
static int unlinkCharFile( char *id , int num );
|
||||
#ifdef _SLEEP_CHAR // 取得非活跃人物档名
|
||||
#ifdef _SLEEP_CHAR // 取得非活跃人物档名
|
||||
static void makeSleepCharFileName( char *id,char *output, int outlen, int num);
|
||||
static void makeSleepCharPoolItemFileName( char *id,char *output, int outlen);
|
||||
#endif
|
||||
@ -68,16 +68,16 @@ struct MissionTable missiontable[MAXMISSIONTABLE];
|
||||
/*
|
||||
|
||||
|
||||
仇及白央奶伙匹烂聒今木化中月楮醒反兮氏少 据毛勾井丹[
|
||||
仇及白央奶伙匹烂聒今木化中月楮醒反兮氏少 据毛勾井丹[
|
||||
|
||||
|
||||
char *c0 : ID
|
||||
char *c1 : Passwd 手丹 据允氏匹月井日银歹卅中
|
||||
char *c1 : Passwd 手丹 据允氏匹月井日银歹卅中
|
||||
char *c2 : Charname
|
||||
char *c3 : opt
|
||||
Spock fixed, opt change to process
|
||||
char *c3 : process
|
||||
char *c4 : 勾井歹氏
|
||||
char *c4 : 勾井歹氏
|
||||
int i0 : lock
|
||||
int i1 : mesgid
|
||||
*/
|
||||
@ -120,21 +120,21 @@ void charLoadCallback( int ti , int auth , char *c0, char* c1 ,
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef _FIX_MESSAGE // WON ADD 修改WORKER封包内容
|
||||
// 同一星系重覆登入送 game end
|
||||
#ifdef _FIX_MESSAGE // WON ADD 修改WORKER封包内容
|
||||
// 同一星系重覆登入送 game end
|
||||
if( auth == 204 ){
|
||||
#ifdef _WAEI_KICK
|
||||
log("\n (%s) AP同一星系重覆登入,踢人!! ", id );
|
||||
saacproto_ACKick_recv( ti, id, 7, -1); //踢人
|
||||
log("\n (%s) AP同一星系重覆登入,踢人!! ", id );
|
||||
saacproto_ACKick_recv( ti, id, 7, -1); //踢人
|
||||
#ifdef _UNLOCKPOOL
|
||||
addUnlockPool( ti, id, "", process, ""); // AP解锁
|
||||
addUnlockPool( ti, id, "", process, ""); // AP解锁
|
||||
#else
|
||||
addWorkerTask( id , "dummy" , "3" , dummyCallback , ti ,
|
||||
id , "dummy" , charname , process ,"", mesgid , 0 );
|
||||
#endif
|
||||
#endif
|
||||
}else
|
||||
log("\n (%s) 登入异常!!:%d ", id, auth );
|
||||
log("\n (%s) 登入异常!!:%d ", id, auth );
|
||||
#endif
|
||||
|
||||
return;
|
||||
@ -152,9 +152,9 @@ void charLoadCallback( int ti , int auth , char *c0, char* c1 ,
|
||||
#else
|
||||
saacproto_ACCharLoad_send( ti , FAILED , "locked" , mesgid );
|
||||
#endif
|
||||
//DeleteMemLock(getHash(id) & 0xff, id, &process); // 如果AP无锁则AC解锁
|
||||
log("\n (%s) AC同一星系重覆登入,踢人!! ", id );
|
||||
saacproto_ACKick_recv( ti, id, 7, -1); //踢人
|
||||
//DeleteMemLock(getHash(id) & 0xff, id, &process); // 如果AP无锁则AC解锁
|
||||
log("\n (%s) AC同一星系重覆登入,踢人!! ", id );
|
||||
saacproto_ACKick_recv( ti, id, 7, -1); //踢人
|
||||
|
||||
// checkGSUCheck( id);
|
||||
return;
|
||||
@ -171,7 +171,7 @@ void charLoadCallback( int ti , int auth , char *c0, char* c1 ,
|
||||
|
||||
charindex = getCharIndexByName( id , charname );
|
||||
#ifdef _NewSave
|
||||
//log("\n档案装载序号:%d 账号:%s 名字:%s\n", charindex, id, charname);
|
||||
//log("\n档案装载序号:%d 账号:%s 名字:%s\n", charindex, id, charname);
|
||||
#endif
|
||||
|
||||
#ifdef _SQL_BACKGROUND
|
||||
@ -179,7 +179,7 @@ void charLoadCallback( int ti , int auth , char *c0, char* c1 ,
|
||||
#endif
|
||||
|
||||
if( charindex < 0 ){
|
||||
/* 平乓仿互绣箕仄卅中及匹巨仿□卅及分 */
|
||||
/* 平乓仿互绣箕仄卅中及匹巨仿□卅及分 */
|
||||
#ifdef _NewSave
|
||||
saacproto_ACCharLoad_send( ti , FAILED ,
|
||||
"char nonexistent" , mesgid , charindex );
|
||||
@ -251,10 +251,10 @@ void charLoadCallback( int ti , int auth , char *c0, char* c1 ,
|
||||
makeStringFromEscaped( infobuf );
|
||||
|
||||
|
||||
#ifdef _BAD_PLAYER // WON ADD 送坏玩家去关
|
||||
#ifdef _BAD_PLAYER // WON ADD 送坏玩家去关
|
||||
{
|
||||
extern int MAX_BAD_PLAYER;
|
||||
extern char BadPlayerList[500][20]; // 定义最大 500 名
|
||||
extern char BadPlayerList[500][20]; // 定义最大 500 名
|
||||
int i;
|
||||
|
||||
for( i=0; i<=MAX_BAD_PLAYER; i++){
|
||||
@ -276,7 +276,7 @@ void charLoadCallback( int ti , int auth , char *c0, char* c1 ,
|
||||
#endif
|
||||
|
||||
#ifdef _WAEI_KICK
|
||||
saacproto_ACKick_recv( ti, id, 10, -1); //踢其他星系
|
||||
saacproto_ACKick_recv( ti, id, 10, -1); //踢其他星系
|
||||
#endif
|
||||
|
||||
|
||||
@ -357,7 +357,7 @@ int charSave( int ti , char *id ,
|
||||
}
|
||||
}
|
||||
|
||||
log( "账号:[%s] 人物:[%s]\n", id, charname );
|
||||
log( "账号:[%s] 人物:[%s]\n", id, charname );
|
||||
if( saveCharOne( id , charindex , savebuf ) < 0 ){
|
||||
log("\n ACCharSave:disk I/O error or a bug ");
|
||||
saacproto_ACCharSave_send( ti , FAILED , "disk I/O error or a bug", mesgid );
|
||||
@ -386,7 +386,7 @@ void charListCallback( int ti , int auth , char *c0 , char *c1 ,
|
||||
char *id = c0;
|
||||
int mesgid = i0;
|
||||
|
||||
//log(" 档案列表回溯:%s:%d \n", id, auth);
|
||||
//log(" 档案列表回溯:%s:%d \n", id, auth);
|
||||
|
||||
if( auth != 0 ){
|
||||
char data[100];
|
||||
@ -401,13 +401,13 @@ if (!sasql_query(c0,c1)){
|
||||
if(!sasql_register(c0,c1))
|
||||
#endif
|
||||
{
|
||||
log("密码错误或没有注册\n");
|
||||
log("密码错误或没有注册\n");
|
||||
saacproto_ACCharList_send( ti , FAILED , "Password error" , mesgid);
|
||||
return;}}
|
||||
|
||||
|
||||
// 取消下列 unlock 动作
|
||||
#ifndef _FIX_MESSAGE // WON ADD 修改WORKER封包内容
|
||||
// 取消下列 unlock 动作
|
||||
#ifndef _FIX_MESSAGE // WON ADD 修改WORKER封包内容
|
||||
#ifdef _DELAY_UNLOCK
|
||||
if( UNlockM_isBe( id ) ){
|
||||
saacproto_ACCharList_send( ti , FAILED , "locked" , mesgid );
|
||||
@ -431,13 +431,13 @@ if (!sasql_query(c0,c1)){
|
||||
}
|
||||
#else
|
||||
|
||||
#ifdef _SLEEP_CHAR // 如果无新档, 将旧档移至新档
|
||||
#ifdef _SLEEP_CHAR // 如果无新档, 将旧档移至新档
|
||||
{
|
||||
char fn_old[256], fn_new[256];
|
||||
FILE *fp_old, *fp_new;
|
||||
int i;
|
||||
|
||||
// 移人物档
|
||||
// 移人物档
|
||||
for( i=0; i<MAXCHAR_PER_USER; i++) {
|
||||
makeCharFileName( id, fn_new, sizeof(fn_new), i);
|
||||
fp_new = fopen( fn_new, "r");
|
||||
@ -446,9 +446,9 @@ if (!sasql_query(c0,c1)){
|
||||
fp_old = fopen( fn_old, "r");
|
||||
if( fp_old != NULL ) {
|
||||
fclose( fp_old);
|
||||
rename( fn_old, fn_new); // 搬移
|
||||
//filecopy( fn_old, fn_new); // 复制
|
||||
log(" 移档_%s ", fn_new);
|
||||
rename( fn_old, fn_new); // 搬移
|
||||
//filecopy( fn_old, fn_new); // 复制
|
||||
log(" 移档_%s ", fn_new);
|
||||
}
|
||||
}
|
||||
else {
|
||||
@ -456,7 +456,7 @@ if (!sasql_query(c0,c1)){
|
||||
}
|
||||
}
|
||||
|
||||
// 移仓库档
|
||||
// 移仓库档
|
||||
makeCharPoolItemFileName( id, fn_new, sizeof(fn_new));
|
||||
fp_new = fopen( fn_new, "r");
|
||||
if( fp_new == NULL ) {
|
||||
@ -464,9 +464,9 @@ if (!sasql_query(c0,c1)){
|
||||
fp_old = fopen( fn_old, "r");
|
||||
if( fp_old != NULL ) {
|
||||
fclose( fp_old);
|
||||
rename( fn_old, fn_new); // 搬移
|
||||
//filecopy( fn_old, fn_new); // 复制
|
||||
log(" 移档_%s ", fn_new);
|
||||
rename( fn_old, fn_new); // 搬移
|
||||
//filecopy( fn_old, fn_new); // 复制
|
||||
log(" 移档_%s ", fn_new);
|
||||
}
|
||||
}
|
||||
else {
|
||||
@ -476,14 +476,14 @@ if (!sasql_query(c0,c1)){
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef _DEATH_FAMILY_LOGIN_CHECK//无法读取人物资料
|
||||
#ifdef _DEATH_FAMILY_LOGIN_CHECK//无法读取人物资料
|
||||
if( loadCharNameAndOption( id , listbuf,sizeof(listbuf)) == 0 ){
|
||||
saacproto_ACCharList_send( ti , FAILED , "locked" , mesgid );
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef _DEATH_CONTEND //无法读取人物资料
|
||||
#ifdef _DEATH_CONTEND //无法读取人物资料
|
||||
if( loadCharNameAndOption( id , listbuf,sizeof(listbuf)) == 0 ){
|
||||
saacproto_ACCharList_send( ti , FAILED , "locked" , mesgid );
|
||||
return;
|
||||
@ -594,7 +594,7 @@ static void getCharNameFromString(char*str ,char *out )
|
||||
for(c=0;;c++){
|
||||
if( IS_2BYTEWORD( str[c] ) ){
|
||||
out[c] = str[c];
|
||||
c ++ ; // 戚及 侬尺
|
||||
c ++ ; // 戚及 侬尺
|
||||
out[c] = str[c];
|
||||
continue;
|
||||
}
|
||||
@ -618,7 +618,7 @@ static void getCharOptionFromString( char *str , char *out )
|
||||
if( str[c]=='\0')break;
|
||||
if( IS_2BYTEWORD( str[c] ) ){
|
||||
c++;
|
||||
if( str[c] == '\0' )break; // 公及 侬互允匹卞NULL卅日蔽
|
||||
if( str[c] == '\0' )break; // 公及 侬互允匹卞NULL卅日蔽
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -626,23 +626,23 @@ static void getCharOptionFromString( char *str , char *out )
|
||||
c++;
|
||||
for(;;c++){
|
||||
|
||||
if( str[c] == '\0' ){ // 蔽 分匀凶日 NULL 木化蔽歹月
|
||||
if( str[c] == '\0' ){ // 蔽 分匀凶日 NULL 木化蔽歹月
|
||||
out[outc] = '\0';
|
||||
break;
|
||||
}
|
||||
|
||||
// 仇仇手ㄡ田奶玄 侬及ㄠ田奶玄 卅日手丹域田奶玄戊疋□允月
|
||||
// 仇仇手ㄡ田奶玄 侬及ㄠ田奶玄 卅日手丹域田奶玄戊疋□允月
|
||||
//---- For 2Byte Code ----
|
||||
if( IS_2BYTEWORD( str[c] ) ){
|
||||
out[outc++] = str[c++]; // ㄠ田奶玄 戊疋□
|
||||
out[outc++] = str[c]; // ㄡ田奶玄 戊疋□
|
||||
if( str[c] == '\0' )break; // 公及 侬互允匹卞NULL卅日蔽
|
||||
out[outc++] = str[c++]; // ㄠ田奶玄 戊疋□
|
||||
out[outc++] = str[c]; // ㄡ田奶玄 戊疋□
|
||||
if( str[c] == '\0' )break; // 公及 侬互允匹卞NULL卅日蔽
|
||||
continue;
|
||||
}
|
||||
|
||||
// 骚橘 侬反ㄠ田奶玄戊疋□
|
||||
out[outc] = str[c]; // 引内戊疋□
|
||||
if( str[c] == '\0' )break; // 蔽 分匀凶日蔽歹月
|
||||
// 骚橘 侬反ㄠ田奶玄戊疋□
|
||||
out[outc] = str[c]; // 引内戊疋□
|
||||
if( str[c] == '\0' )break; // 蔽 分匀凶日蔽歹月
|
||||
|
||||
if( str[c] == SPACE ){
|
||||
out[outc] = '\0';
|
||||
@ -705,7 +705,7 @@ static void makeCharFileName( char *id,char *output, int outlen, int num)
|
||||
makeDirFilename(output , outlen, chardir , getHash(id) ,body);
|
||||
}
|
||||
|
||||
#ifdef _SLEEP_CHAR // 取得非活跃人物档名
|
||||
#ifdef _SLEEP_CHAR // 取得非活跃人物档名
|
||||
static void makeSleepCharFileName( char *id,char *output, int outlen, int num)
|
||||
{
|
||||
char body[1024];
|
||||
@ -840,7 +840,7 @@ int saveCharOne( char *id , int num , char *input )
|
||||
char fn[1024];
|
||||
FILE *fp;
|
||||
char *strp;
|
||||
char *strp1; // Won 修正 hp 为负的人
|
||||
char *strp1; // Won 修正 hp 为负的人
|
||||
|
||||
makeCharFileName( id , fn , sizeof(fn),num );
|
||||
fp= fopen( fn , "w" );
|
||||
@ -849,7 +849,7 @@ int saveCharOne( char *id , int num , char *input )
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Won 修正 hp 为负的人
|
||||
// Won 修正 hp 为负的人
|
||||
if ((strp=strstr(input,"\\nhp=-"))!=NULL) {
|
||||
strp1=strstr(input,"\\nmp=");
|
||||
*(strp+5)='1';
|
||||
@ -862,7 +862,7 @@ int saveCharOne( char *id , int num , char *input )
|
||||
fprintf( fp , "%s" , input );
|
||||
fclose(fp);
|
||||
|
||||
#if 0 //_SLEEP_CHAR // 旧档也存
|
||||
#if 0 //_SLEEP_CHAR // 旧档也存
|
||||
{
|
||||
char fn1[1024], fn2[1024];
|
||||
makeSleepCharFileName( id , fn1 , sizeof(fn1),num );
|
||||
@ -872,7 +872,7 @@ int saveCharOne( char *id , int num , char *input )
|
||||
fclose(fp);
|
||||
}
|
||||
|
||||
// 复制新仓库档到旧档
|
||||
// 复制新仓库档到旧档
|
||||
makeCharPoolItemFileName( id, fn1, sizeof(fn));
|
||||
makeSleepCharPoolItemFileName( id, fn2, sizeof(fn));
|
||||
filecopy( fn1, fn2);
|
||||
@ -882,7 +882,7 @@ int saveCharOne( char *id , int num , char *input )
|
||||
sasql_update(id,fn);
|
||||
sasql_online(id,NULL);
|
||||
#endif
|
||||
log( "写入 %s 档案文件:%s\n",id , fn );
|
||||
log( "写入 %s 档案文件:%s\n",id , fn );
|
||||
return 0;
|
||||
|
||||
}
|
||||
@ -897,7 +897,7 @@ static int makeSaveCharString( char *out , int outlen ,
|
||||
char *nmwork_p , *optwork_p , *infowork_p;
|
||||
int l;
|
||||
|
||||
/* 戊疋□仄化 */
|
||||
/* 戊疋□仄化 */
|
||||
|
||||
strncpy( nmwork , nm , sizeof( nmwork ));
|
||||
nmwork[strlen( nm)]=0;
|
||||
@ -908,7 +908,7 @@ static int makeSaveCharString( char *out , int outlen ,
|
||||
strncpy( infowork , info , sizeof( infowork ));
|
||||
infowork[strlen(info)]=0;
|
||||
|
||||
/* 巨旦弗□皿仄 */
|
||||
/* 巨旦弗□皿仄 */
|
||||
/* if ( esc ) {
|
||||
nmwork_p = makeEscapeString1( nm , nmwork ,sizeof( nmwork ));
|
||||
optwork_p = makeEscapeString1( opt , optwork , sizeof( optwork ));
|
||||
@ -943,7 +943,7 @@ static int makeSaveCharString( char *out , int outlen ,
|
||||
}
|
||||
#endif
|
||||
// }
|
||||
/* 勾卅仆月[赞中互巨仿□腹请及凶户卞域荚伐□弁卞中木月[ */
|
||||
/* 勾卅仆月[赞中互巨仿□腹请及凶户卞域荚伐□弁卞中木月[ */
|
||||
snprintf( outwork ,sizeof( outwork ) ,
|
||||
"%s" SPACESTRING "%s" SPACESTRING "%s" ,
|
||||
nmwork_p , optwork_p , infowork_p );
|
||||
@ -953,7 +953,7 @@ static int makeSaveCharString( char *out , int outlen ,
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* NULL 侬互 卞丐月井日0毛中木氏午中井氏及分[ */
|
||||
/* NULL 侬互 卞丐月井日0毛中木氏午中井氏及分[ */
|
||||
memcpy( out , outwork , l + 1);
|
||||
|
||||
return 0;
|
||||
@ -965,14 +965,14 @@ int getCharIndexByName( char *id , char *charname )
|
||||
for(i=0;i<MAXCHAR_PER_USER;i++){
|
||||
char output[CHARDATASIZE];
|
||||
if( loadCharOne( id , i , output , sizeof( output )) < 0 ){
|
||||
/* 丐中化中月″ */
|
||||
/* 丐中化中月″ */
|
||||
continue;
|
||||
} else {
|
||||
/* 平乓仿互绣箕仄凶 */
|
||||
/* 平乓仿互绣箕仄凶 */
|
||||
char cn[CHARDATASIZE];
|
||||
getCharNameFromString( output , cn );
|
||||
|
||||
/* Escape毛荸仁 */
|
||||
/* Escape毛荸仁 */
|
||||
if( strcmp( charname , makeStringFromEscaped(cn) ) == 0 ){
|
||||
return i;
|
||||
}else{
|
||||
@ -984,13 +984,13 @@ int getCharIndexByName( char *id , char *charname )
|
||||
|
||||
/*
|
||||
|
||||
平乓仿及丐中化中月旦夫永玄毛腹绸允月
|
||||
平乓仿及丐中化中月旦夫永玄毛腹绸允月
|
||||
|
||||
卅日丐中化中卅中[0动晓卅日丐五旦夫永玄及index.
|
||||
卅日丐中化中卅中[0动晓卅日丐五旦夫永玄及index.
|
||||
|
||||
|
||||
签卞夫□玉匹五卅井匀凶日公木毛井尹允分仃[
|
||||
手匀午切扎氏午匹五月支欠仃升手[
|
||||
签卞夫□玉匹五卅井匀凶日公木毛井尹允分仃[
|
||||
手匀午切扎氏午匹五月支欠仃升手[
|
||||
|
||||
*/
|
||||
static int findBlankCharIndex( char *id )
|
||||
@ -1008,7 +1008,7 @@ static int findBlankCharIndex( char *id )
|
||||
static int unlinkCharFile( char *id , int num )
|
||||
{
|
||||
char fname[1024];
|
||||
#ifdef _SLEEP_CHAR //删除人物时旧档也删
|
||||
#ifdef _SLEEP_CHAR //删除人物时旧档也删
|
||||
makeSleepCharFileName( id, fname, sizeof(fname),num );
|
||||
unlink( fname );
|
||||
#endif
|
||||
@ -1044,7 +1044,7 @@ int lockUser( char *gmsvname , char *id , char *passwd , int lock ,
|
||||
if (isLocked(id)) {
|
||||
snprintf( result , resultlen, FAILED );
|
||||
snprintf( retdata , retdatalen, "already locked" );
|
||||
log( "写入内存信息: 用户:%x/%s 已经同意锁定 !!\n", getHash(id), id);
|
||||
log( "写入内存信息: 用户:%x/%s 已经同意锁定 !!\n", getHash(id), id);
|
||||
return -1;
|
||||
} else {
|
||||
#ifdef _LOCK_ADD_NAME
|
||||
@ -1058,7 +1058,7 @@ int lockUser( char *gmsvname , char *id , char *passwd , int lock ,
|
||||
}
|
||||
} else {
|
||||
if( !isLocked( id) ) {
|
||||
log( "删除内存信息: 用户:%x/%s 没有锁定!!\n", getHash(id), id);
|
||||
log( "删除内存信息: 用户:%x/%s 没有锁定!!\n", getHash(id), id);
|
||||
}
|
||||
if( DeleteMemLock( getHash(id) & 0xff, id, &ret) ) {
|
||||
snprintf( result , resultlen, SUCCESSFUL );
|
||||
@ -1066,9 +1066,9 @@ int lockUser( char *gmsvname , char *id , char *passwd , int lock ,
|
||||
return ret;
|
||||
} else {
|
||||
snprintf( result , resultlen, FAILED );
|
||||
snprintf( retdata , retdatalen, "不能移除锁定" );
|
||||
snprintf( retdata , retdatalen, "不能移除锁定" );
|
||||
|
||||
log( "不能解锁 %x:%s !\n", getHash(id), id);
|
||||
log( "不能解锁 %x:%s !\n", getHash(id), id);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
@ -1099,7 +1099,7 @@ static void makeCharPoolItemFileName( char *id,char *output, int outlen)
|
||||
makeDirFilename(output , outlen, chardir , getHash(id) ,poolitem);
|
||||
}
|
||||
|
||||
#ifdef _SLEEP_CHAR // 取得非活跃人物仓库档名
|
||||
#ifdef _SLEEP_CHAR // 取得非活跃人物仓库档名
|
||||
static void makeSleepCharPoolItemFileName( char *id,char *output, int outlen)
|
||||
{
|
||||
char poolitem[256];
|
||||
@ -1151,7 +1151,7 @@ int saveCharPoolItem( char *id , char *input, int sizes)
|
||||
fprintf( fp , "%s" , input );
|
||||
fclose(fp);
|
||||
|
||||
log( "写入 %s 道具档案文件:%s\n", id , fn );
|
||||
log( "写入 %s 道具档案文件:%s\n", id , fn );
|
||||
return sizes;
|
||||
}
|
||||
|
||||
@ -1214,7 +1214,7 @@ static void makeCharPoolPetFileName( char *id,char *output, int outlen)
|
||||
makeDirFilename(output , outlen, chardir , getHash(id) ,poolpet);
|
||||
}
|
||||
|
||||
#ifdef _SLEEP_CHAR // 取得非活跃人物仓库档名
|
||||
#ifdef _SLEEP_CHAR // 取得非活跃人物仓库档名
|
||||
static void makeSleepCharPoolPetFileName( char *id,char *output, int outlen)
|
||||
{
|
||||
char poolpet[256];
|
||||
@ -1266,7 +1266,7 @@ int saveCharPoolPet( char *id , char *input, int sizes)
|
||||
fprintf( fp , "%s" , input );
|
||||
fclose(fp);
|
||||
|
||||
log( "写入 %s 宠物档案文件:%s\n", id , fn );
|
||||
log( "写入 %s 宠物档案文件:%s\n", id , fn );
|
||||
return sizes;
|
||||
}
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
#define _CHAR_H_
|
||||
#include "version.h"
|
||||
|
||||
/* 1슥∋건摩禁犢섟 틱텀력今(겜卵켈삼今) */
|
||||
/* 1交□扒丐凶曰及 平乓仿醒(白央奶伙醒) */
|
||||
#define MAXCHAR_PER_USER 2
|
||||
|
||||
int isLocked( char *id );
|
||||
|
@ -45,7 +45,7 @@ int CHATROOM_CreateChatRoom( int fd, char *cdkey, char *data,
|
||||
int chat=-1;
|
||||
char buf1[256];
|
||||
if( (chat=CHATROOM_getfreeChatRoom()) == -1 ){
|
||||
sprintf( message, "频道已满!");
|
||||
sprintf( message, "频道已满!");
|
||||
return -1;
|
||||
}
|
||||
CHATROOM_resetChat( chat);
|
||||
@ -139,7 +139,7 @@ extern gmsv gs[MAXCONNECTION];
|
||||
UniChatRoom[chat].charanum--;
|
||||
{
|
||||
int mti = UniChatRoom[chat].masindex;
|
||||
if( mti == uti ){ //室长离开
|
||||
if( mti == uti ){ //室长离开
|
||||
for( i=0; i<MAX_PPLINROOM; i++){
|
||||
if( UniChatRoom[chat].charalist[i].use == 0 ) continue;
|
||||
UniChatRoom[chat].masindex = i;
|
||||
@ -446,7 +446,7 @@ extern gmsv gs[MAXCONNECTION];
|
||||
);
|
||||
strcat( token, buf);
|
||||
}
|
||||
//更新.
|
||||
//更新.
|
||||
if( fd == -1 ){
|
||||
for( i=0; i<MAXCONNECTION; i++) {
|
||||
if( !gs[i].use ) continue;
|
||||
@ -469,27 +469,27 @@ void CHATROOM_RecvAll( int fd, char *cdkey, char *data, int userindex, int clifd
|
||||
|
||||
easyGetTokenFromBuf( data, '|', 1, comm, sizeof(comm) );
|
||||
|
||||
if( !strcmp( comm, "C") ){//建立频道
|
||||
if( !strcmp( comm, "C") ){//建立频道
|
||||
if( CHATROOM_CreateChatRoom( fd, cdkey, data, token, userindex, clifdid) >= 0 ){
|
||||
}else{
|
||||
saacproto_ACUniChatroom_send( fd, cdkey, FAILED, data, userindex, clifdid );
|
||||
}
|
||||
}else if( !strcmp( comm, "D") ) {//删除频道
|
||||
}else if( !strcmp( comm, "D") ) {//删除频道
|
||||
CHATROOM_DelChatRoom( cdkey, data);
|
||||
}else if( !strcmp( comm, "L") ) {//离开频道
|
||||
}else if( !strcmp( comm, "L") ) {//离开频道
|
||||
CHATROOM_LeaveChatRoom( cdkey, data);
|
||||
}else if( !strcmp( comm, "T") ) {//频道讯息
|
||||
}else if( !strcmp( comm, "T") ) {//频道讯息
|
||||
CHATROOM_MessageChatRoom( cdkey, data);
|
||||
}else if( !strcmp( comm, "K") ) {//踢出频道
|
||||
}else if( !strcmp( comm, "K") ) {//踢出频道
|
||||
CHATROOM_KickChatRoom( cdkey, data);
|
||||
}else if( !strcmp( comm, "J") ) {//申请加入频道
|
||||
}else if( !strcmp( comm, "J") ) {//申请加入频道
|
||||
CHATROOM_AgreeJoinCR( fd, data, userindex, clifdid);
|
||||
//CHATROOM_JoinChatRoom( cdkey, data);
|
||||
}else if( !strcmp( comm, "A") ) {//同意加入
|
||||
}else if( !strcmp( comm, "A") ) {//同意加入
|
||||
CHATROOM_AgreeChatRoom( cdkey, data);
|
||||
}else if ( strcmp ( comm , "M" ) == 0 ) { // 更换室长
|
||||
}else if ( strcmp ( comm , "M" ) == 0 ) { // 更换室长
|
||||
CHATROOM_MasterChatRoom( cdkey, data);
|
||||
}else if( !strcmp( comm, "U") ) {//更新频道
|
||||
}else if( !strcmp( comm, "U") ) {//更新频道
|
||||
easyGetTokenFromBuf( data, '|', 2, buf1, sizeof(buf1) );
|
||||
if( atoi( buf1) == -1 ){
|
||||
for( i=0; i<MAX_CHATROOM; i++){
|
||||
|
198
saac/src/db.c
198
saac/src/db.c
@ -1,9 +1,9 @@
|
||||
/*
|
||||
仿件平件弘窗 勾五犯□正矛□旦及 隶[
|
||||
仿件平件弘窗 勾五犯□正矛□旦及 隶[
|
||||
|
||||
1999 Aug 14 Created by ringo
|
||||
|
||||
犯□正矛□旦反1 及伉件弁及溥匹忡绣今木月[
|
||||
犯□正矛□旦反1 及伉件弁及溥匹忡绣今木月[
|
||||
|
||||
|
||||
*/
|
||||
@ -21,32 +21,32 @@
|
||||
#include <string.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
/* 侬 巨件玄伉及 length */
|
||||
/* 侬 巨件玄伉及 length */
|
||||
//#define CHARVALUE_MAX 1024
|
||||
#define MAXTABLE 16
|
||||
// Spock 2000/10/12
|
||||
#define CHARVALUE_MAX 256 // DB 字串资料的buffer大小
|
||||
#define KEY_MAX 64 // DB Key字串的buffer大小
|
||||
#define HASH_SIZE 65536 // Hash table 一次增加的Entry数量
|
||||
#define HASH_PRIME 65521 // Hash function 使用的质数
|
||||
#define DBINIT_SIZE 16384 // DB 每次配置Entry的数量
|
||||
#define CHARVALUE_MAX 256 // DB 字串资料的buffer大小
|
||||
#define KEY_MAX 64 // DB Key字串的buffer大小
|
||||
#define HASH_SIZE 65536 // Hash table 一次增加的Entry数量
|
||||
#define HASH_PRIME 65521 // Hash function 使用的质数
|
||||
#define DBINIT_SIZE 16384 // DB 每次配置Entry的数量
|
||||
// Spock end
|
||||
|
||||
/* 犯□正矛□旦及伉件弁及邰豳1蜊毛丐日歹允[ */
|
||||
/* 犯□正矛□旦及伉件弁及邰豳1蜊毛丐日歹允[ */
|
||||
struct dbentry
|
||||
{
|
||||
int use;
|
||||
// unsigned int keyhash; /* 腹绸平□及甩永扑亘戊□玉 */
|
||||
int ivalue; /* 旦戊失[玄永皿 NODE 反 -1 匹}
|
||||
允屯化及旦戊失反 0 动晓匹卅中午中仃卅中*/
|
||||
// int nextind; /* -1 分匀凶日 毛啦 允月 */
|
||||
// unsigned int keyhash; /* 腹绸平□及甩永扑亘戊□玉 */
|
||||
int ivalue; /* 旦戊失[玄永皿 NODE 反 -1 匹}
|
||||
允屯化及旦戊失反 0 动晓匹卅中午中仃卅中*/
|
||||
// int nextind; /* -1 分匀凶日 毛啦 允月 */
|
||||
// Spock 2000/10/12
|
||||
int prev; // 前一个dbentry, -1表示此项为head
|
||||
int next; // 下一个dbentry, -1表示此项为tail
|
||||
int prev; // 前一个dbentry, -1表示此项为head
|
||||
int next; // 下一个dbentry, -1表示此项为tail
|
||||
char key[KEY_MAX];
|
||||
char charvalue[CHARVALUE_MAX];
|
||||
// char key[64]; /* 腹绸平□午卅月 侬 */
|
||||
// int charvalue_index; /* 侬 田永白央毛今允index */
|
||||
// char key[64]; /* 腹绸平□午卅月 侬 */
|
||||
// int charvalue_index; /* 侬 田永白央毛今允index */
|
||||
// Spock end
|
||||
};
|
||||
|
||||
@ -54,11 +54,11 @@ struct dbentry
|
||||
// Database hashtable
|
||||
struct hashentry
|
||||
{
|
||||
char key[KEY_MAX]; // 索引key值
|
||||
int use; // 是否已被使用
|
||||
int dbind; // 指向 dbentry 的 index
|
||||
int prev; // 同一key值的上一个 hashentry, -1为head
|
||||
int next; // 同一key值的下一个 hashentry, -1为tail
|
||||
char key[KEY_MAX]; // 索引key值
|
||||
int use; // 是否已被使用
|
||||
int dbind; // 指向 dbentry 的 index
|
||||
int prev; // 同一key值的上一个 hashentry, -1为head
|
||||
int next; // 同一key值的下一个 hashentry, -1为tail
|
||||
};
|
||||
// Spock end
|
||||
|
||||
@ -68,24 +68,24 @@ typedef enum
|
||||
DB_STRING,
|
||||
}DBTYPE;
|
||||
|
||||
/* 1蜊及犯□正矛□旦毛丐日歹允 */
|
||||
/* 1蜊及犯□正矛□旦毛丐日歹允 */
|
||||
struct table
|
||||
{
|
||||
int use; // 0:未使用 1:已使用
|
||||
DBTYPE type; /* DB及潘 */
|
||||
char name[32]; /* 犯□正矛□旦及 蟆 */
|
||||
int num; /* 巨件玄伉及醒 */
|
||||
int use; // 0:未使用 1:已使用
|
||||
DBTYPE type; /* DB及潘 */
|
||||
char name[32]; /* 犯□正矛□旦及 蟆 */
|
||||
int num; /* 巨件玄伉及醒 */
|
||||
int toplinkindex;
|
||||
// Spock 2000/10/12
|
||||
struct hashentry *hashtable;
|
||||
int hashsize;
|
||||
int updated; // 0:dbflush後未更新 1:已更新
|
||||
int ent_finder; // 指向最後一次配置的 hashentry
|
||||
int updated; // 0:dbflush後未更新 1:已更新
|
||||
int ent_finder; // 指向最後一次配置的 hashentry
|
||||
// Spock end
|
||||
};
|
||||
|
||||
struct dbentry *master_buf; /* 巨件玄伉筏盛迕 */
|
||||
int dbsize = 0; /* 赓0匹}1,2,4,8,16...*/
|
||||
struct dbentry *master_buf; /* 巨件玄伉筏盛迕 */
|
||||
int dbsize = 0; /* 赓0匹}1,2,4,8,16...*/
|
||||
static int dbent_finder = 0;
|
||||
|
||||
struct table dbt[MAXTABLE];
|
||||
@ -119,7 +119,7 @@ int charvaluesize=0;
|
||||
*/
|
||||
|
||||
/*
|
||||
侬 田永白央□毛傀舰允月
|
||||
侬 田永白央□毛傀舰允月
|
||||
*/
|
||||
/* Spock deleted 2000/10/12
|
||||
int
|
||||
@ -157,8 +157,8 @@ reallocCharValue(void)
|
||||
*/
|
||||
|
||||
/*
|
||||
侬 田永白央□毛1蜊歹曰丐化月[
|
||||
凶曰卅仁卅匀凶日realloc允月[
|
||||
侬 田永白央□毛1蜊歹曰丐化月[
|
||||
凶曰卅仁卅匀凶日realloc允月[
|
||||
|
||||
*/
|
||||
/* Spock deleted 2000/10/12
|
||||
@ -188,7 +188,7 @@ dbAllocCharValue( void )
|
||||
*/
|
||||
|
||||
/*
|
||||
charvalue 井日/卞袄毛必永玄/本永玄允月
|
||||
charvalue 井日/卞袄毛必永玄/本永玄允月
|
||||
int index : charvalue index
|
||||
|
||||
*/
|
||||
@ -209,8 +209,8 @@ dbSetString( int index , char *data )
|
||||
*/
|
||||
|
||||
/*
|
||||
DB及云云五今互凶日氏仁卅匀凶日歹曰丐化卅云允[中引及扔奶术及2 卞允月
|
||||
0分匀凶日1卞允月
|
||||
DB及云云五今互凶日氏仁卅匀凶日歹曰丐化卅云允[中引及扔奶术及2 卞允月
|
||||
0分匀凶日1卞允月
|
||||
*/
|
||||
static int
|
||||
reallocDB( void )
|
||||
@ -230,20 +230,20 @@ reallocDB( void )
|
||||
|
||||
newbuf = (struct dbentry* ) calloc( 1, new_dbsize *
|
||||
sizeof( struct dbentry) );
|
||||
/* 丢乒伉凶曰卅中 */
|
||||
/* 丢乒伉凶曰卅中 */
|
||||
if( newbuf == NULL ){
|
||||
log( "重新分配数据: 内存不足!!! 新数据大小: %d\n", new_dbsize );
|
||||
log( "重新分配数据: 内存不足!!! 新数据大小: %d\n", new_dbsize );
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* 衙中幻丹井日蕙仄中 卞戊疋□仄化 */
|
||||
/* 衙中幻丹井日蕙仄中 卞戊疋□仄化 */
|
||||
|
||||
memset( newbuf , 0 , new_dbsize * sizeof( struct dbentry ) );
|
||||
/* Spock deleted 2000/10/19
|
||||
if( previous )memcpy( (char*)newbuf, (char*)previous,
|
||||
dbsize * sizeof( struct dbentry ));
|
||||
|
||||
// 衙中幻丹毛荸 仄
|
||||
// 衙中幻丹毛荸 仄
|
||||
free( previous );
|
||||
*/
|
||||
// Spock 2000/10/19
|
||||
@ -254,11 +254,11 @@ reallocDB( void )
|
||||
}
|
||||
// Spock end
|
||||
|
||||
dbent_finder = dbsize; // 将 dbent_finder 指向未使用的 entry
|
||||
dbent_finder = dbsize; // 将 dbent_finder 指向未使用的 entry
|
||||
dbsize = new_dbsize;
|
||||
master_buf = newbuf;
|
||||
|
||||
log( "重新分配数据: 新数据大小:%d 旧地址: %x 新地址:%x\n",
|
||||
log( "重新分配数据: 新数据大小:%d 旧地址: %x 新地址:%x\n",
|
||||
new_dbsize , (unsigned int)previous, (unsigned int)newbuf );
|
||||
|
||||
return 0;
|
||||
@ -283,11 +283,11 @@ dbAllocNode()
|
||||
if( master_buf[dbent_finder].use == 0 ){
|
||||
master_buf[dbent_finder].use = 1;
|
||||
/* Spock deleted 2000/10/12
|
||||
// int 匹手尥笛树 及啃卞stringbuffer毛 勾仪卞允月 kawata
|
||||
// int 匹手尥笛树 及啃卞stringbuffer毛 勾仪卞允月 kawata
|
||||
if( type == DB_STRING || type == DB_INT_SORTED){
|
||||
if( ( master_buf[dbent_finder].charvalue_index =
|
||||
dbAllocCharValue() ) < 0 ){
|
||||
// 侬 田永白央□互凶曰卅中冗
|
||||
// 侬 田永白央□互凶曰卅中冗
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
@ -295,14 +295,14 @@ dbAllocNode()
|
||||
return dbent_finder;
|
||||
}
|
||||
}
|
||||
log( "数据进入队列失败. 重新分配中....\n" );
|
||||
log( "数据进入队列失败. 重新分配中....\n" );
|
||||
if( reallocDB() < 0 ){
|
||||
log( "重新分配失败\n" );
|
||||
log( "重新分配失败\n" );
|
||||
} else {
|
||||
//return dbAllocNode( type );
|
||||
// Spock 2000/10/13
|
||||
master_buf[dbent_finder].use = 1;
|
||||
log( "数据探测=%d\n" , dbent_finder );
|
||||
log( "数据探测=%d\n" , dbent_finder );
|
||||
return dbent_finder;
|
||||
// Spock end
|
||||
}
|
||||
@ -329,7 +329,7 @@ dbShowLink( int topind )
|
||||
{
|
||||
int cur = topind;
|
||||
|
||||
log( "开始从 %d 链接数据\n", cur );
|
||||
log( "开始从 %d 链接数据\n", cur );
|
||||
|
||||
/* Spock deleted 2000/10/19
|
||||
for(;;){
|
||||
@ -363,7 +363,7 @@ reallocHash( int dbi )
|
||||
newbuf = (struct hashentry* ) calloc( 1, new_hashsize *
|
||||
sizeof( struct hashentry) );
|
||||
if( newbuf == NULL ){
|
||||
log( "重新分配无用信息: 内存不足!!! 新无用信息大小: %d\n", new_hashsize );
|
||||
log( "重新分配无用信息: 内存不足!!! 新无用信息大小: %d\n", new_hashsize );
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -382,7 +382,7 @@ reallocHash( int dbi )
|
||||
dbt[dbi].hashsize = new_hashsize;
|
||||
dbt[dbi].hashtable = newbuf;
|
||||
|
||||
log( "重新分配无用信息: 新无用信息大小:%d 旧地址: %x 新地址:%x\n",
|
||||
log( "重新分配无用信息: 新无用信息大小:%d 旧地址: %x 新地址:%x\n",
|
||||
new_hashsize , (unsigned int)previous, (unsigned int)newbuf );
|
||||
|
||||
return 0;
|
||||
@ -474,8 +474,8 @@ tableReleaseNode( int dbi , int ind )
|
||||
}
|
||||
// Spock end
|
||||
/*
|
||||
伉件弁及玄永皿毛芨尹日木凶日}平□毛 曰卞用□玉毛腹绸允月[
|
||||
心勾井日卅中桦宁反巨仿□匹反卅中及匹0
|
||||
伉件弁及玄永皿毛芨尹日木凶日}平□毛 曰卞用□玉毛腹绸允月[
|
||||
心勾井日卅中桦宁反巨仿□匹反卅中及匹0
|
||||
|
||||
*/
|
||||
/* Spock deleted 2000/10/13
|
||||
@ -486,20 +486,20 @@ dbExtractNodeByKey( int topind , char *k )
|
||||
int prev = -1;
|
||||
unsigned int h = hashpjw( k );
|
||||
|
||||
// 伉件弁互坞匹手心勾井日卅中分仃卅及匹0毛井尹允
|
||||
// 伉件弁互坞匹手心勾井日卅中分仃卅及匹0毛井尹允
|
||||
if( topind == -1 ) return 0;
|
||||
|
||||
for(;;){
|
||||
if( cur == -1 )break;
|
||||
if( master_buf[cur].keyhash == h
|
||||
&& strcmp( master_buf[cur].key , k ) == 0 ){
|
||||
// prev 及 戚互 cur 及戚卞卅月方丹卞允月
|
||||
// prev 及 戚互 cur 及戚卞卅月方丹卞允月
|
||||
if( prev == -1 ){
|
||||
// 燮 分匀凶及匹伉件弁反中元日卅中
|
||||
// 燮 分匀凶及匹伉件弁反中元日卅中
|
||||
} else {
|
||||
master_buf[prev].nextind = master_buf[cur].nextind;
|
||||
}
|
||||
// 公木匹愤坌互伉旦玄井日陆木月及匹荸 允月
|
||||
// 公木匹愤坌互伉旦玄井日陆木月及匹荸 允月
|
||||
dbReleaseNode( cur );
|
||||
log( "find key %s deleted\n", k );
|
||||
return 0;
|
||||
@ -554,9 +554,9 @@ dbGetEntryByKey( int topind , char *k )
|
||||
*/
|
||||
|
||||
/*
|
||||
伉件弁及玄永皿毛芨尹日木凶日}袄毛 曰卞用□玉毛腹绸仄化
|
||||
赝濠卅午仇欠卞 Insert 允月[切中今中 井日云云五中 卞卅日氏匹中月午
|
||||
移烂
|
||||
伉件弁及玄永皿毛芨尹日木凶日}袄毛 曰卞用□玉毛腹绸仄化
|
||||
赝濠卅午仇欠卞 Insert 允月[切中今中 井日云云五中 卞卅日氏匹中月午
|
||||
移烂
|
||||
|
||||
*/
|
||||
/* Spock deleted 2000/10/13
|
||||
@ -570,7 +570,7 @@ dbInsertNodeByIValue( int topind , int ins )
|
||||
|
||||
for(;;){
|
||||
if( cur == -1 ){
|
||||
// 引匹中匀凶及匹馨笛允月
|
||||
// 引匹中匀凶及匹馨笛允月
|
||||
master_buf[prev].nextind = ins;
|
||||
master_buf[ins].nextind = -1;
|
||||
return 0;
|
||||
@ -647,10 +647,10 @@ dbAppendNode( int topind , int ins )
|
||||
// Spock end
|
||||
|
||||
/*
|
||||
犯□正矛□旦及 蟆毛 月[db反醒互剂卅中及匹 骚卞strcmp仄化方中
|
||||
DBTYPE :潘 [
|
||||
犯□正矛□旦及 蟆毛 月[db反醒互剂卅中及匹 骚卞strcmp仄化方中
|
||||
DBTYPE :潘 [
|
||||
|
||||
云卅元卅引尹及 反}帮醒午 侬 及 卞绣箕允月仇午互匹五月[
|
||||
云卅元卅引尹及 反}帮醒午 侬 及 卞绣箕允月仇午互匹五月[
|
||||
|
||||
*/
|
||||
static int
|
||||
@ -665,7 +665,7 @@ dbGetTableIndex( char *tname , DBTYPE type )
|
||||
}
|
||||
}
|
||||
|
||||
/* 心勾井日卅井匀凶及匹蕙筋分 */
|
||||
/* 心勾井日卅井匀凶及匹蕙筋分 */
|
||||
for(i=0;i<MAXTABLE;i++){
|
||||
if( dbt[i].use == 0 ){
|
||||
int topind;
|
||||
@ -675,7 +675,7 @@ dbGetTableIndex( char *tname , DBTYPE type )
|
||||
// Spock 2000/10/16
|
||||
if ( reallocHash( i ) < 0 )
|
||||
{
|
||||
log( "重新分配无用信息失败\n");
|
||||
log( "重新分配无用信息失败\n");
|
||||
return -2;
|
||||
}
|
||||
dbt[i].ent_finder = HASH_PRIME;
|
||||
@ -685,7 +685,7 @@ dbGetTableIndex( char *tname , DBTYPE type )
|
||||
// Spock +1 2000/10/16
|
||||
topind = dbAllocNode();
|
||||
if( topind < 0 ){
|
||||
log( "数据分配节点失败\n" );
|
||||
log( "数据分配节点失败\n" );
|
||||
return -2;
|
||||
}
|
||||
/* Spock deleted 2000/10/16
|
||||
@ -695,9 +695,9 @@ dbGetTableIndex( char *tname , DBTYPE type )
|
||||
master_buf[topind].nextind = -1;
|
||||
*/
|
||||
|
||||
/* 玄永皿及用□玉毛赓渝祭允月卅曰[
|
||||
侬 及桦宁手帮醒及桦宁手云卅元匹方中[
|
||||
0x7fffffff午中丹袄反} 侬 及桦宁反今幻升啦 毛手凶卅中及分[*/
|
||||
/* 玄永皿及用□玉毛赓渝祭允月卅曰[
|
||||
侬 及桦宁手帮醒及桦宁手云卅元匹方中[
|
||||
0x7fffffff午中丹袄反} 侬 及桦宁反今幻升啦 毛手凶卅中及分[*/
|
||||
master_buf[topind].ivalue = 0x7fffffff;
|
||||
/* Spock deleted 2000/10/16
|
||||
if( type == DB_INT_SORTED ){
|
||||
@ -718,7 +718,7 @@ dbGetTableIndex( char *tname , DBTYPE type )
|
||||
}
|
||||
}
|
||||
|
||||
/* 互中匀天中分[ */
|
||||
/* 互中匀天中分[ */
|
||||
log( "dbGetTableIndex: table full. now tables are:\n" );
|
||||
dbShowAllTable();
|
||||
|
||||
@ -727,11 +727,11 @@ dbGetTableIndex( char *tname , DBTYPE type )
|
||||
|
||||
/*
|
||||
|
||||
午曰丐尹内 strtol 匹五月袄仄井扔禾□玄仄卅中方
|
||||
午曰丐尹内 strtol 匹五月袄仄井扔禾□玄仄卅中方
|
||||
|
||||
腹绸仄化苇勾仃凶用□玉卞覆仄化}
|
||||
伉件弁井日 五午匀化井日}漆蘸反末□玄允月及卞银丹袄毛凶方曰卞
|
||||
腹绸仄化}中中桦赭毛心勾仃凶日}公仇卞犒仄仇戈[
|
||||
腹绸仄化苇勾仃凶用□玉卞覆仄化}
|
||||
伉件弁井日 五午匀化井日}漆蘸反末□玄允月及卞银丹袄毛凶方曰卞
|
||||
腹绸仄化}中中桦赭毛心勾仃凶日}公仇卞犒仄仇戈[
|
||||
|
||||
*/
|
||||
/* Spock deleted 2000/10/16
|
||||
@ -758,7 +758,7 @@ int dbUpdateEntryInt( char *table , char *key , int value, char *info )
|
||||
master_buf[entind].keyhash = hashpjw( master_buf[entind].key );
|
||||
master_buf[entind].nextind = -1;
|
||||
|
||||
// 尥笛树 毛本永玄允月
|
||||
// 尥笛树 毛本永玄允月
|
||||
dbSetString( master_buf[entind].charvalue_index, info );
|
||||
|
||||
|
||||
@ -919,7 +919,7 @@ dbShowAllTable(void)
|
||||
|
||||
}
|
||||
|
||||
/* 犯□正毛1蜊潸曰分允[
|
||||
/* 犯□正毛1蜊潸曰分允[
|
||||
*/
|
||||
int
|
||||
dbGetEntryInt( char *table, char *key, int *output )
|
||||
@ -949,19 +949,19 @@ dbGetEntryInt( char *table, char *key, int *output )
|
||||
log( "dbGetEntryInt: Invalid dbind in hashtable of %s\n" , table );
|
||||
return -1;
|
||||
}
|
||||
/* 心勾井匀凶及匹袄毛请 卞 木化忒允 */
|
||||
/* 心勾井匀凶及匹袄毛请 卞 木化忒允 */
|
||||
*output = master_buf[entind].ivalue;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
巨仿□及桦宁反 [0分匀凶日岳 [
|
||||
巨仿□及桦宁反 [0分匀凶日岳 [
|
||||
|
||||
int *rank_out : 仿件弁及请
|
||||
int *count_out : 晓井日窒蜊 井及请
|
||||
int *rank_out : 仿件弁及请
|
||||
int *count_out : 晓井日窒蜊 井及请
|
||||
|
||||
int 犯□正矛□旦毁迕友
|
||||
int 犯□正矛□旦毁迕友
|
||||
|
||||
*/
|
||||
|
||||
@ -972,7 +972,7 @@ dbGetEntryRank( char *table, char *key , int *rank_out, int *count_out)
|
||||
// Spock deleted 2000/10/19
|
||||
//unsigned int hash = hashpjw(key);
|
||||
int cur;
|
||||
int now_score = 0x7fffffff; /*int 匹中切壬氏匹井中袄 */
|
||||
int now_score = 0x7fffffff; /*int 匹中切壬氏匹井中袄 */
|
||||
int r = -1 , i=0;
|
||||
|
||||
// Spock 2000/10/23
|
||||
@ -1021,14 +1021,14 @@ dbGetEntryRank( char *table, char *key , int *rank_out, int *count_out)
|
||||
}
|
||||
|
||||
/*
|
||||
int 毁迕友
|
||||
int 毁迕友
|
||||
*/
|
||||
int
|
||||
dbGetEntryRankRange( char *table,
|
||||
int start, int end, char *output, int outlen )
|
||||
{
|
||||
#define MAXHITS 1024 /* 赝癫支卅丐[匹手仇木匹蜗坌日仄中冗 ringo */
|
||||
struct hitent{ /* 仇及厌瞻 卞甲永玄仄凶支勾毛凶户化中仁 */
|
||||
#define MAXHITS 1024 /* 赝癫支卅丐[匹手仇木匹蜗坌日仄中冗 ringo */
|
||||
struct hitent{ /* 仇及厌瞻 卞甲永玄仄凶支勾毛凶户化中仁 */
|
||||
int entind;
|
||||
int rank;
|
||||
};
|
||||
@ -1163,11 +1163,11 @@ int dbRead( char *dir )
|
||||
char tmp[1024];
|
||||
snprintf( tmp, sizeof( tmp ), "%s/int" , dir );
|
||||
if( mkdir( tmp, 0755 )==0){
|
||||
log( "创建 %s\n", tmp );
|
||||
log( "创建 %s\n", tmp );
|
||||
}
|
||||
snprintf( tmp, sizeof( tmp ), "%s/string" , dir );
|
||||
if( mkdir( tmp, 0755 )==0){
|
||||
log( "创建 %s\n", tmp );
|
||||
log( "创建 %s\n", tmp );
|
||||
}
|
||||
}
|
||||
|
||||
@ -1175,7 +1175,7 @@ int dbRead( char *dir )
|
||||
"%s/int" , dir );
|
||||
d = opendir(dirname);
|
||||
if( d == NULL ){
|
||||
log( "不能打开文件 %s\n", dirname );
|
||||
log( "不能打开文件 %s\n", dirname );
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -1187,7 +1187,7 @@ int dbRead( char *dir )
|
||||
FILE *fp;
|
||||
struct stat s;
|
||||
snprintf( filename, sizeof(filename),"%s/%s",dirname, de->d_name );
|
||||
log( "读取数据:%s\n..", filename);
|
||||
log( "读取数据:%s\n..", filename);
|
||||
if( stat( filename, &s ) < 0 ){
|
||||
continue;
|
||||
}
|
||||
@ -1197,7 +1197,7 @@ int dbRead( char *dir )
|
||||
|
||||
fp = fopen( filename, "r" );
|
||||
if( fp == NULL ){
|
||||
log( "不能打开文件 %s %s\n",
|
||||
log( "不能打开文件 %s %s\n",
|
||||
filename, strerror( errno ));
|
||||
continue;
|
||||
}
|
||||
@ -1221,7 +1221,7 @@ int dbRead( char *dir )
|
||||
snprintf( dirname, sizeof( dirname), "%s/string" , dir );
|
||||
d = opendir( dirname );
|
||||
if( d == NULL ){
|
||||
log( "不能打开文件 %s\n", dirname );
|
||||
log( "不能打开文件 %s\n", dirname );
|
||||
return -1;
|
||||
}
|
||||
while(1){
|
||||
@ -1232,7 +1232,7 @@ int dbRead( char *dir )
|
||||
FILE *fp;
|
||||
struct stat s;
|
||||
snprintf( filename, sizeof( filename),"%s/%s",dirname,de->d_name );
|
||||
log( "读取数据:%s\n..", filename);
|
||||
log( "读取数据:%s\n..", filename);
|
||||
|
||||
if( stat( filename, &s ) < 0 ){
|
||||
continue;
|
||||
@ -1242,7 +1242,7 @@ int dbRead( char *dir )
|
||||
}
|
||||
fp = fopen( filename, "r" );
|
||||
if( fp == NULL ){
|
||||
log( "不能打开文件 %s %s\n",
|
||||
log( "不能打开文件 %s %s\n",
|
||||
filename, strerror(errno ));
|
||||
continue;
|
||||
}
|
||||
@ -1264,11 +1264,11 @@ int dbRead( char *dir )
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* 隙烂仄凶匏 井日隙烂仄凶蜊醒潸曰分允[
|
||||
撩 仄凶日 }岳 仄凶日0[岳 仄化手坞及请 及午五互丐月冗[
|
||||
“num互0及午五午井}竟癫允月巨件玄伉互卅中午五[
|
||||
/* 隙烂仄凶匏 井日隙烂仄凶蜊醒潸曰分允[
|
||||
撩 仄凶日 }岳 仄凶日0[岳 仄化手坞及请 及午五互丐月冗[
|
||||
“num互0及午五午井}竟癫允月巨件玄伉互卅中午五[
|
||||
|
||||
int 犯□正矛□旦毁迕分冗
|
||||
int 犯□正矛□旦毁迕分冗
|
||||
|
||||
*/
|
||||
int dbGetEntryCountRange( char *table, int count_start, int num,
|
||||
@ -1321,7 +1321,7 @@ int dbGetEntryCountRange( char *table, int count_start, int num,
|
||||
|
||||
|
||||
/*
|
||||
侬 犯□正矛□旦及质
|
||||
侬 犯□正矛□旦及质
|
||||
*/
|
||||
/* Spock deleted 2000/10/19
|
||||
int
|
||||
|
@ -63,7 +63,7 @@ int PKLIST_GetOneBHistory( int ti )
|
||||
log("return CODE_ERRBATTLEFULL err !! \n") ;
|
||||
return CODE_ERRBATTLEFULL;
|
||||
}
|
||||
//勿动-------------------------------------------------------
|
||||
//勿动-------------------------------------------------------
|
||||
void PKLIST_ResetOneTeamMan( int ti )
|
||||
{
|
||||
int k;
|
||||
@ -147,14 +147,14 @@ int PKLIST_UpdateOnePkTeamData( int ti, int forti, int winerflg)
|
||||
}else{
|
||||
PkTeamList[ti].lost++;
|
||||
}
|
||||
PkTeamList[ti].battleplay++; //场次
|
||||
PkTeamList[ti].score = (PkTeamList[ti].win*3) - (PkTeamList[ti].lost*1);//积分
|
||||
PkTeamList[ti].battleplay++; //场次
|
||||
PkTeamList[ti].score = (PkTeamList[ti].win*3) - (PkTeamList[ti].lost*1);//积分
|
||||
|
||||
PkTeamList[ti].updata = (int)time(NULL);
|
||||
|
||||
if( PkTeamList[ti].score >= DEFWINSCORE ){
|
||||
PkTeamList[ti].inside = 2; //录取
|
||||
}else if( PkTeamList[ti].lost > DEFMAXBATTLENUM*DEFLOSERATE){// 0.7 = (1-胜率3成)*最高场次
|
||||
PkTeamList[ti].inside = 2; //录取
|
||||
}else if( PkTeamList[ti].lost > DEFMAXBATTLENUM*DEFLOSERATE){// 0.7 = (1-胜率3成)*最高场次
|
||||
PkTeamList[ti].inside = 0;
|
||||
}else {
|
||||
PkTeamList[ti].inside = 1;
|
||||
@ -286,7 +286,7 @@ extern gmsv gs[MAXCONNECTION];
|
||||
if( (toti = PKLIST_GetPkTeamListArray( tonum, tocdkey)) == -1 ) return;
|
||||
|
||||
//andy_log
|
||||
log( "Update() [%d,%d] %s [%d,%d] ", meti, menum, (winer==0)?"胜":"负", toti, tonum);
|
||||
log( "Update() [%d,%d] %s [%d,%d] ", meti, menum, (winer==0)?"胜":"负", toti, tonum);
|
||||
if( PKLIST_UpdateCheckRepeatBHistory( meti, menum, toti, tonum ) == -1 ){
|
||||
log( " err Repeat !!\n");
|
||||
}else{
|
||||
@ -300,13 +300,13 @@ extern gmsv gs[MAXCONNECTION];
|
||||
log( "*UpdateOnePkTeamData( %d,%d,%d) err %d !!\n", toti, meti, (winer==1)?0:1, ret);
|
||||
return;
|
||||
}
|
||||
for (i = 0 ; i < MAXCONNECTION ; i ++ ) { //送del到game server
|
||||
for (i = 0 ; i < MAXCONNECTION ; i ++ ) { //送del到game server
|
||||
if ( gs[i].use && gs[i].name[0] ) {
|
||||
PKLIST_GetPkTeamListDataOne( i, meti);
|
||||
PKLIST_GetPkTeamListDataOne( i, toti);
|
||||
}
|
||||
}
|
||||
//备份
|
||||
//备份
|
||||
PKLIST_BackupPkTeamListfromFile( "pklist", "pk_list_team.txt" );
|
||||
|
||||
}
|
||||
@ -346,10 +346,10 @@ void PKLIST_CheckRepeatBattleHistory( void)
|
||||
if( PkTeamList[i].BHistory[j].flg == 0 ) PkTeamList[i].lost++;
|
||||
PkTeamList[i].battleplay++;
|
||||
}
|
||||
PkTeamList[i].score = (PkTeamList[i].win*3) - (PkTeamList[i].lost*1);//积分
|
||||
PkTeamList[i].score = (PkTeamList[i].win*3) - (PkTeamList[i].lost*1);//积分
|
||||
if( PkTeamList[i].score >= DEFWINSCORE ){
|
||||
PkTeamList[i].inside = 2; //录取
|
||||
}else if( PkTeamList[i].lost > DEFMAXBATTLENUM*DEFLOSERATE){// 0.7 = (1-胜率3成)*最高场次
|
||||
PkTeamList[i].inside = 2; //录取
|
||||
}else if( PkTeamList[i].lost > DEFMAXBATTLENUM*DEFLOSERATE){// 0.7 = (1-胜率3成)*最高场次
|
||||
PkTeamList[i].inside = 0;
|
||||
}else {
|
||||
PkTeamList[i].inside = 1;
|
||||
@ -357,7 +357,7 @@ void PKLIST_CheckRepeatBattleHistory( void)
|
||||
}
|
||||
}
|
||||
|
||||
//load档
|
||||
//load档
|
||||
int PKLIST_LoadPkTeamListfromFile( char *dirpath, char *listfilename )
|
||||
{
|
||||
char line[512], filename[256], buf1[64];
|
||||
@ -471,7 +471,7 @@ int PKLIST_LoadPkTeamListfromFile( char *dirpath, char *listfilename )
|
||||
readfirst = 0;
|
||||
continue;
|
||||
}
|
||||
if( bnum >= MAXBATTLENUM )break;//超过战斗场次
|
||||
if( bnum >= MAXBATTLENUM )break;//超过战斗场次
|
||||
for( k=0; k<10; k++){
|
||||
easyGetTokenFromBuf( bufarg, '|', k+1, buf1, sizeof( buf1 ));
|
||||
if( strlen( buf1) <= 0 ) continue;
|
||||
@ -533,7 +533,7 @@ int PKLIST_LoadPkTeamListfromFile( char *dirpath, char *listfilename )
|
||||
return 1;
|
||||
}
|
||||
|
||||
//Backup档
|
||||
//Backup档
|
||||
int PKLIST_BackupPkTeamListfromFile( char *dirpath, char *listfilename )
|
||||
{
|
||||
char filename[256];
|
||||
@ -606,7 +606,7 @@ int PKLIST_BackupPkTeamListfromFile( char *dirpath, char *listfilename )
|
||||
return 1;
|
||||
}
|
||||
//PKListSort[1000]
|
||||
void PKLIST_SortTheCharts( int ti) //排行榜处理
|
||||
void PKLIST_SortTheCharts( int ti) //排行榜处理
|
||||
{
|
||||
extern gmsv gs[MAXCONNECTION];
|
||||
int i, k, last=-1;
|
||||
@ -639,7 +639,7 @@ extern gmsv gs[MAXCONNECTION];
|
||||
log( "\nPKListSort[%d]=%d \n", PKListSort[last], ti);
|
||||
PKListSort[last]=ti;
|
||||
|
||||
//更新所有伺服器
|
||||
//更新所有伺服器
|
||||
for (i=0; i<MAXCONNECTION; i++) {
|
||||
if (gs[i].use && gs[i].name[0]) {
|
||||
PKLIST_TheCharts( i, 2, 1);
|
||||
@ -662,7 +662,7 @@ extern gmsv gs[MAXCONNECTION];
|
||||
PkTeamList[PKListSort[i]].battleplay, PkTeamList[PKListSort[i]].score,
|
||||
PkTeamList[PKListSort[i]].inside, PkTeamList[PKListSort[i]].updata );
|
||||
/*
|
||||
fprintf( fp, "%dth 队伍:%-32s 胜:%-4d 负:%-4d 场数:%-4d 积分:%-4d\n",
|
||||
fprintf( fp, "%dth 队伍:%-32s 胜:%-4d 负:%-4d 场数:%-4d 积分:%-4d\n",
|
||||
i, PkTeamList[PKListSort[i]].teamname,
|
||||
PkTeamList[PKListSort[i]].win, PkTeamList[PKListSort[i]].lost,
|
||||
PkTeamList[PKListSort[i]].battleplay, PkTeamList[PKListSort[i]].score );
|
||||
@ -681,13 +681,13 @@ extern gmsv gs[MAXCONNECTION];
|
||||
log("PKLIST_TheCharts( %d, %d) \n", type, flg);
|
||||
switch( type){
|
||||
case 1:
|
||||
for( i=0 ; i < MAXCONNECTION ; i ++ ) { //送del到game server
|
||||
for( i=0 ; i < MAXCONNECTION ; i ++ ) { //送del到game server
|
||||
if ( gs[i].use && gs[i].name[0] ) {
|
||||
PKLIST_GetPkTeamListDataOne( i, flg);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 2: //排行榜
|
||||
case 2: //排行榜
|
||||
memset( data, 0, sizeof(data));
|
||||
for( i=0; i<550; i++){
|
||||
if( PKListSort[i] == -1 ) continue;
|
||||
@ -730,10 +730,10 @@ extern gmsv gs[MAXCONNECTION];
|
||||
}
|
||||
}
|
||||
|
||||
//备份存档
|
||||
//备份存档
|
||||
|
||||
|
||||
//load档
|
||||
//load档
|
||||
int PKLIST_LoadUserfromFile( char *dirpath, char *listfilename )
|
||||
{
|
||||
char line[512], filename[256], buf1[64];
|
||||
@ -768,7 +768,7 @@ int PKLIST_LoadUserfromFile( char *dirpath, char *listfilename )
|
||||
if( count >= maxteam )break;
|
||||
del_rn( line);
|
||||
|
||||
//队伍名称 队伍序号
|
||||
//队伍名称 队伍序号
|
||||
easyGetTokenFromBuf( line, ',', 1, buf1, sizeof( buf1 ));
|
||||
if( strlen( buf1) <= 0 ) continue;
|
||||
sprintf( PkTeamList[count].teamname, "%s", buf1);
|
||||
@ -778,19 +778,19 @@ int PKLIST_LoadUserfromFile( char *dirpath, char *listfilename )
|
||||
while( 1){
|
||||
easyGetTokenFromBuf( line, ',', spoint++, buf1, sizeof( buf1 ));
|
||||
if( strlen( buf1) <= 0 ) break;
|
||||
sprintf( StartS, "%s", buf1); //星系
|
||||
sprintf( StartS, "%s", buf1); //星系
|
||||
|
||||
easyGetTokenFromBuf( line, ',', spoint++, buf1, sizeof( buf1 ));
|
||||
if( strlen( buf1) <= 0 ) break;
|
||||
sprintf( PkTeamList[count].MyTeamMans[ManNum].cdkey, "%s", buf1); //帐号
|
||||
sprintf( PkTeamList[count].MyTeamMans[ManNum].cdkey, "%s", buf1); //帐号
|
||||
|
||||
easyGetTokenFromBuf( line, ',', spoint++, buf1, sizeof( buf1 ));
|
||||
if( strlen( buf1) <= 0 ) break;
|
||||
sprintf( PkTeamList[count].MyTeamMans[ManNum].name, "%s", buf1); //人物名
|
||||
sprintf( PkTeamList[count].MyTeamMans[ManNum].name, "%s", buf1); //人物名
|
||||
|
||||
easyGetTokenFromBuf( line, ',', spoint++, buf1, sizeof( buf1 ));
|
||||
if( strlen( buf1) <= 0 ) break;
|
||||
leve = atoi( buf1); //人物等级
|
||||
leve = atoi( buf1); //人物等级
|
||||
|
||||
sprintf( dData, "%s,%s,%s,%d\n",
|
||||
StartS, PkTeamList[count].MyTeamMans[ManNum].cdkey,
|
||||
@ -825,7 +825,7 @@ int PKLIST_LoadUserfromFile( char *dirpath, char *listfilename )
|
||||
fclose( bfp);
|
||||
fclose( tfp);
|
||||
fclose( fp);
|
||||
//清除
|
||||
//清除
|
||||
sprintf( filename, "%s/%s", dirpath, listfilename);
|
||||
remove( filename);
|
||||
|
||||
@ -867,7 +867,7 @@ int PKLIST_LoadUserfromFile( char *dirpath, char *listfilename )
|
||||
}
|
||||
|
||||
|
||||
//load档
|
||||
//load档
|
||||
int PKLIST_CutStartUserfromFile( char *dirpath, char *listfilename )
|
||||
{
|
||||
char line[512], filename[256], buf1[64];
|
||||
@ -898,28 +898,28 @@ int PKLIST_CutStartUserfromFile( char *dirpath, char *listfilename )
|
||||
fprintf( bfp, "%s\n", line);
|
||||
continue;
|
||||
}
|
||||
sprintf( StartS, "%s", buf1); //星系
|
||||
sprintf( StartS, "%s", buf1); //星系
|
||||
|
||||
easyGetTokenFromBuf( line, ',', 2, buf1, sizeof( buf1 ));
|
||||
if( strlen( buf1) <= 0 ){
|
||||
fprintf( bfp, "%s\n", line);
|
||||
continue;
|
||||
}
|
||||
sprintf( cdkey, "%s", buf1); //帐号
|
||||
sprintf( cdkey, "%s", buf1); //帐号
|
||||
|
||||
easyGetTokenFromBuf( line, ',', 3, buf1, sizeof( buf1 ));
|
||||
if( strlen( buf1) <= 0 ){
|
||||
fprintf( bfp, "%s\n", line);
|
||||
continue;
|
||||
}
|
||||
sprintf( name, "%s", buf1); //人物名
|
||||
sprintf( name, "%s", buf1); //人物名
|
||||
|
||||
easyGetTokenFromBuf( line, ',', 4, buf1, sizeof( buf1 ));
|
||||
if( strlen( buf1) <= 0 ){
|
||||
fprintf( bfp, "%s\n", line);
|
||||
continue;
|
||||
}
|
||||
leve = atoi( buf1); //人物等级
|
||||
leve = atoi( buf1); //人物等级
|
||||
|
||||
{
|
||||
FILE *tfp=NULL;
|
||||
@ -938,7 +938,7 @@ int PKLIST_CutStartUserfromFile( char *dirpath, char *listfilename )
|
||||
return 1;
|
||||
}
|
||||
|
||||
//load档
|
||||
//load档
|
||||
int PKLIST_alteUserfromFile( char *dirpath, char *listfilename )
|
||||
{
|
||||
char line[512], filename[256], buf1[64];
|
||||
@ -966,22 +966,22 @@ extern gmsv gs[MAXCONNECTION];
|
||||
if( strlen( line) <= 0 || line[0] == '#' ) continue;
|
||||
del_rn( line);
|
||||
|
||||
//队伍
|
||||
//队伍
|
||||
easyGetTokenFromBuf( line, ',', 1, buf1, sizeof( buf1 ));
|
||||
if( strlen( buf1) <= 0 ) continue;
|
||||
sprintf( TeamName, "%s", buf1);
|
||||
|
||||
//星系
|
||||
//星系
|
||||
easyGetTokenFromBuf( line, ',', 2, buf1, sizeof( buf1 ));
|
||||
if( strlen( buf1) <= 0 ) continue;
|
||||
sprintf( Star, "%s", buf1);
|
||||
|
||||
//帐号
|
||||
//帐号
|
||||
easyGetTokenFromBuf( line, ',', 3, buf1, sizeof( buf1 ));
|
||||
if( strlen( buf1) <= 0 ) continue;
|
||||
sprintf( Cdkey, "%s", buf1);
|
||||
|
||||
//人物名
|
||||
//人物名
|
||||
easyGetTokenFromBuf( line, ',', 4, buf1, sizeof( buf1 ));
|
||||
if( strlen( buf1) <= 0 ) continue;
|
||||
sprintf( UserName, "%s", buf1);
|
||||
@ -1014,7 +1014,7 @@ extern gmsv gs[MAXCONNECTION];
|
||||
}
|
||||
break;
|
||||
}
|
||||
for( j=0 ; j < MAXCONNECTION ; j ++ ) { //送del到game server
|
||||
for( j=0 ; j < MAXCONNECTION ; j ++ ) { //送del到game server
|
||||
if ( gs[j].use && gs[j].name[0] ) {
|
||||
PKLIST_GetPkTeamListDataOne( j, i);
|
||||
}
|
||||
@ -1024,7 +1024,7 @@ extern gmsv gs[MAXCONNECTION];
|
||||
}
|
||||
fclose( bfp);
|
||||
fclose( fp);
|
||||
//清除
|
||||
//清除
|
||||
sprintf( filename, "%s/%s", dirpath, listfilename);
|
||||
remove( filename);
|
||||
PKLIST_CheckAllUser();
|
||||
@ -1109,19 +1109,19 @@ void PKLIST_CheckAllUser( void)
|
||||
fclose( ffp);
|
||||
}
|
||||
/*
|
||||
序号|队名|帐号_人物名|帐号_人物名|帐号_人物名|帐号_人物名|帐号_人物名|胜|败|0
|
||||
序号|队名|帐号_人物名|帐号_人物名|帐号_人物名|帐号_人物名|帐号_人物名|胜|败|0
|
||||
|
||||
#序号|目录|队名|帐号_人物名|胜|败|场|积分|0
|
||||
#序号|目录|队名|帐号_人物名|胜|败|场|积分|0
|
||||
|
||||
1|0x10|第1队|cdkey|胜|败|场|积分|0
|
||||
2|0x10|第2队|cdkey|胜|败|场|积分|0
|
||||
3|0x10|第3队|cdkey|胜|败|场|积分|0
|
||||
4|0x10|第4队|cdkey|胜|败|场|积分|0
|
||||
5|0x10|第5队|cdkey|胜|败|场|积分|0
|
||||
6|0x10|第6队|cdkey|胜|败|场|积分|0
|
||||
7|0x10|第7队|cdkey|胜|败|场|积分|0
|
||||
8|0x10|第8队|cdkey|胜|败|场|积分|0
|
||||
9|0x10|第9队|cdkey|胜|败|场|积分|0
|
||||
10|0x10|第10队|cdkey|胜|败|场|积分|0
|
||||
1|0x10|第1队|cdkey|胜|败|场|积分|0
|
||||
2|0x10|第2队|cdkey|胜|败|场|积分|0
|
||||
3|0x10|第3队|cdkey|胜|败|场|积分|0
|
||||
4|0x10|第4队|cdkey|胜|败|场|积分|0
|
||||
5|0x10|第5队|cdkey|胜|败|场|积分|0
|
||||
6|0x10|第6队|cdkey|胜|败|场|积分|0
|
||||
7|0x10|第7队|cdkey|胜|败|场|积分|0
|
||||
8|0x10|第8队|cdkey|胜|败|场|积分|0
|
||||
9|0x10|第9队|cdkey|胜|败|场|积分|0
|
||||
10|0x10|第10队|cdkey|胜|败|场|积分|0
|
||||
*/
|
||||
#endif
|
||||
|
@ -1,14 +1,14 @@
|
||||
#include "version.h"
|
||||
|
||||
#ifdef _DEATH_CONTEND
|
||||
//团队人物名单
|
||||
//团队人物名单
|
||||
typedef struct
|
||||
{
|
||||
int use;
|
||||
char cdkey[64];
|
||||
char name[64];
|
||||
}PkTeamMans;
|
||||
//战斗纪录
|
||||
//战斗纪录
|
||||
typedef struct
|
||||
{
|
||||
int use;
|
||||
@ -16,33 +16,33 @@ typedef struct
|
||||
int flg; //0 1
|
||||
}BattleHistorys;
|
||||
|
||||
#define MAXTEAMMANNUM 5 //队伍最高人数
|
||||
#define MAXBATTLENUM 100 //队伍最高战斗纪录
|
||||
#define MAXTEAMMANNUM 5 //队伍最高人数
|
||||
#define MAXBATTLENUM 100 //队伍最高战斗纪录
|
||||
|
||||
#define DEFMAXBATTLENUM 50 //最高决斗场次
|
||||
#define DEFMAXBATTLENUM 50 //最高决斗场次
|
||||
#define DEFWINSCORE 90
|
||||
#define DEFLOSERATE 0.4
|
||||
//决斗参赛队伍info
|
||||
//决斗参赛队伍info
|
||||
typedef struct _tagPkTeamLists
|
||||
{
|
||||
int use; //flg
|
||||
int teamnum; //队伍序号
|
||||
char teamname[64]; //队伍名称
|
||||
char pathdir[64]; //队伍资料目录
|
||||
char leadercdkey[64]; //队长CDKEY
|
||||
int win; //胜
|
||||
int lost; //负
|
||||
int battleplay; //总场次
|
||||
int teamnum; //队伍序号
|
||||
char teamname[64]; //队伍名称
|
||||
char pathdir[64]; //队伍资料目录
|
||||
char leadercdkey[64]; //队长CDKEY
|
||||
int win; //胜
|
||||
int lost; //负
|
||||
int battleplay; //总场次
|
||||
int score;
|
||||
int inside; //录取旗标
|
||||
int inside; //录取旗标
|
||||
|
||||
int updata; //更新时间
|
||||
int updata; //更新时间
|
||||
|
||||
PkTeamMans MyTeamMans[MAXTEAMMANNUM];
|
||||
BattleHistorys BHistory[MAXBATTLENUM];
|
||||
}PkTeamLists;
|
||||
|
||||
//勿动-------------------------------------------------------
|
||||
//勿动-------------------------------------------------------
|
||||
int PKLIST_getStringPkTeamData( int ti, char *data, int sizes);
|
||||
int PKLIST_SetOneBHistory( int ti, int hi, int use, int teamnum, int flg );
|
||||
int PKLIST_GetOneBHistory( int ti );
|
||||
@ -58,7 +58,7 @@ void PKLIST_GetPkTeamListDataOne( int fd, int ti);
|
||||
//-----------------------------------------------------------
|
||||
int PKLIST_LoadPkTeamListfromFile( char *dirpath, char *listfilename );
|
||||
int PKLIST_BackupPkTeamListfromFile( char *dirpath, char *listfilename );
|
||||
void PKLIST_SortTheCharts( int ti);//排行榜处理
|
||||
void PKLIST_SortTheCharts( int ti);//排行榜处理
|
||||
void PKLIST_TheCharts( int fd, int type, int flg);
|
||||
|
||||
int PKLIST_LoadUserfromFile( char *dirpath, char *listfilename );
|
||||
|
@ -68,7 +68,7 @@ void DEFEND_resetUserForList()
|
||||
for( i=0; i<DEFEND_MAXLISTS; i++) {
|
||||
memset( DEFENDUserList[ i].cdkey, 0, sizeof( DEFENDUserList[ i].cdkey) );
|
||||
memset( DEFENDUserList[ i].name, 0, sizeof( DEFENDUserList[ i].name) );
|
||||
DEFENDUserList[ i].defnums = 0; //次数
|
||||
DEFENDUserList[ i].defnums = 0; //次数
|
||||
DEFENDUserList[ i].type = 0;
|
||||
DEFENDUserList[ i].score = 0;
|
||||
DEFENDUserList[ i].use = 0;
|
||||
@ -82,7 +82,7 @@ void DEFEND_copyOneUserForList( int si, int pi)
|
||||
DEFENDUserList[ pi].cdkey, sizeof( DEFENDUserList[ si].cdkey) );
|
||||
memcpy( DEFENDUserList[ si].name,
|
||||
DEFENDUserList[ pi].name, sizeof( DEFENDUserList[ si].name) );
|
||||
DEFENDUserList[ si].defnums = DEFENDUserList[ pi].defnums; //次数
|
||||
DEFENDUserList[ si].defnums = DEFENDUserList[ pi].defnums; //次数
|
||||
DEFENDUserList[ si].type = DEFENDUserList[ pi].type;
|
||||
DEFENDUserList[ si].score = DEFENDUserList[ pi].score;
|
||||
DEFENDUserList[ si].use = DEFENDUserList[ pi].use;
|
||||
@ -92,7 +92,7 @@ void DEFEND_delOneUserForList( int si)
|
||||
{
|
||||
memset( DEFENDUserList[ si].cdkey, 0, sizeof( DEFENDUserList[ si].cdkey) );
|
||||
memset( DEFENDUserList[ si].name, 0, sizeof( DEFENDUserList[ si].name) );
|
||||
DEFENDUserList[ si].defnums = 0; //次数
|
||||
DEFENDUserList[ si].defnums = 0; //次数
|
||||
DEFENDUserList[ si].type = 0;
|
||||
DEFENDUserList[ si].score = 0;
|
||||
DEFENDUserList[ si].use = 0;
|
||||
@ -102,7 +102,7 @@ int DEFEND_addUserForList( char *cdkey, char *name, int score, int nums, int typ
|
||||
int ti=-1;
|
||||
int i,j;
|
||||
if( cdkey == NULL ) return -1;
|
||||
//清空相同帐号&名称
|
||||
//清空相同帐号&名称
|
||||
for( i=0; i<DEFEND_MAXLISTS; i++){
|
||||
if( DEFEND_getUse( i) <= 0 ) continue;
|
||||
if( !strcmp( DEFENDUserList[ i].cdkey, cdkey) &&
|
||||
@ -135,7 +135,7 @@ int DEFEND_addUserForList( char *cdkey, char *name, int score, int nums, int typ
|
||||
|
||||
memcpy( DEFENDUserList[ ti].cdkey, cdkey, sizeof( DEFENDUserList[ ti].cdkey) );
|
||||
memcpy( DEFENDUserList[ ti].name, name, sizeof( DEFENDUserList[ ti].name) );
|
||||
DEFENDUserList[ ti].defnums = nums; //次数
|
||||
DEFENDUserList[ ti].defnums = nums; //次数
|
||||
DEFENDUserList[ ti].type = type;
|
||||
DEFENDUserList[ ti].score = score;
|
||||
DEFENDUserList[ ti].use = 1;
|
||||
|
@ -9,21 +9,21 @@
|
||||
|
||||
typedef struct _tagDefendArrayList
|
||||
{
|
||||
char cdkey[256]; //帐号
|
||||
char name[256]; //人物名
|
||||
int defnums; //次数
|
||||
int type; //状态
|
||||
int score; //分数
|
||||
int use; //使用
|
||||
char cdkey[256]; //帐号
|
||||
char name[256]; //人物名
|
||||
int defnums; //次数
|
||||
int type; //状态
|
||||
int score; //分数
|
||||
int use; //使用
|
||||
}DefendArrayList;
|
||||
|
||||
typedef struct _tagScoreArrayList
|
||||
{
|
||||
char cdkey[256]; //帐号
|
||||
char name[256]; //人物名
|
||||
char cdkey[256]; //帐号
|
||||
char name[256]; //人物名
|
||||
char fromname[256];
|
||||
int score; //分数
|
||||
int use; //使用
|
||||
int score; //分数
|
||||
int use; //使用
|
||||
}ScoreArrayList;
|
||||
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
#include "main.h"
|
||||
#include "char.h"
|
||||
|
||||
#ifdef _WORKER_AUTO_LOGOUT // WON ADD GS断线自动送LOGOUT给WORKER
|
||||
#ifdef _WORKER_AUTO_LOGOUT // WON ADD GS断线自动送LOGOUT给WORKER
|
||||
#include "recv.h"
|
||||
#endif
|
||||
|
||||
@ -33,7 +33,7 @@ void Lock_Init(void)
|
||||
memset( userlock[i]->name, 0, sizeof( userlock[i]->name) );
|
||||
#endif
|
||||
}
|
||||
log("存贮器初始化");
|
||||
log("存贮器初始化");
|
||||
}
|
||||
|
||||
LockNode *Creat_newNodes( void)
|
||||
@ -63,9 +63,9 @@ int InsertMemLock(int entry, char *cdkey, char *passwd, char *server, int proces
|
||||
int j;
|
||||
LockNode *ln = userlock[entry];
|
||||
#ifdef _LOCK_ADD_NAME
|
||||
log("进入游戏:目录:char/0x%x 账号:%s 名称:%s 服务器:%s\n", entry, cdkey, name, server);
|
||||
log("进入游戏:目录:char/0x%x 账号:%s 名称:%s 服务器:%s\n", entry, cdkey, name, server);
|
||||
#else
|
||||
log("进入游戏:目录:%x 账号:%s 服务器:%s\n", entry, cdkey, server);
|
||||
log("进入游戏:目录:%x 账号:%s 服务器:%s\n", entry, cdkey, server);
|
||||
#endif
|
||||
|
||||
while( (ln!=NULL) && (ln->use!=0)) ln=ln->next;
|
||||
@ -105,12 +105,12 @@ int DeleteMemLock(int entry, char *cdkey, int *process)
|
||||
{
|
||||
LockNode *ln = userlock[entry];
|
||||
|
||||
log("删除内存信息 位置=%x 账号=%s ..\n", entry, cdkey);
|
||||
log("删除内存信息 位置=%x 账号=%s ..\n", entry, cdkey);
|
||||
|
||||
while (ln!=NULL) {
|
||||
if( ln->use != 0) {
|
||||
#ifdef _CHANGEGALAXY
|
||||
if( !strcmp( ln->cdkey, cdkey ) && strcmp( ln->server, "移民") ) break;
|
||||
if( !strcmp( ln->cdkey, cdkey ) && strcmp( ln->server, "移民") ) break;
|
||||
#else
|
||||
if( strcmp( ln->cdkey, cdkey ) == 0 ) break;
|
||||
#endif
|
||||
@ -125,10 +125,10 @@ int DeleteMemLock(int entry, char *cdkey, int *process)
|
||||
memset( ln->name, 0, sizeof( ln->name) );
|
||||
#endif
|
||||
*process = ln->process;
|
||||
log("删除成功\n");
|
||||
log("删除成功\n");
|
||||
return 1;
|
||||
}
|
||||
log("删除失败!!\n");
|
||||
log("删除失败!!\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -150,13 +150,13 @@ void DeleteMemLockServer(char *sname)
|
||||
}
|
||||
|
||||
|
||||
#ifdef _WORKER_AUTO_LOGOUT // WON ADD GS断线自动送LOGOUT给WORKER
|
||||
#ifdef _WORKER_AUTO_LOGOUT // WON ADD GS断线自动送LOGOUT给WORKER
|
||||
void Worker_auto_logout(int ti, char *sname)
|
||||
{
|
||||
int i;
|
||||
LockNode *ln;
|
||||
|
||||
log("\nGMSV 退出或工作站退出!! \n");
|
||||
log("\nGMSV 退出或工作站退出!! \n");
|
||||
|
||||
for (i=0; i<256; i++) {
|
||||
ln = userlock[i];
|
||||
@ -167,13 +167,13 @@ void Worker_auto_logout(int ti, char *sname)
|
||||
if( addUnlockPool( ti, ln->cdkey, "", "", "") <0 ) {
|
||||
char id[20];
|
||||
strcpy(id ,ln->cdkey);
|
||||
log("工作站发送退出 ==> ti(%d) 账号(%s) 序号(%d)\n", ti, id, iUnlockPoolAdd );
|
||||
log("工作站发送退出 ==> ti(%d) 账号(%s) 序号(%d)\n", ti, id, iUnlockPoolAdd );
|
||||
Worker_send_logout(ti, id);
|
||||
}
|
||||
#else
|
||||
char id[20];
|
||||
strcpy(id ,ln->cdkey);
|
||||
log("工作站发送退出==>ti(%d) 账号(%s)\n", ti, id );
|
||||
log("工作站发送退出==>ti(%d) 账号(%s)\n", ti, id );
|
||||
Worker_send_logout(ti, id);
|
||||
#endif
|
||||
}
|
||||
@ -193,8 +193,8 @@ int isMemLocked(int entry, char *cdkey)
|
||||
while (ln!=NULL) {
|
||||
if (ln->use != 0) {
|
||||
if (strcmp(ln->cdkey, cdkey)==0) {
|
||||
if( !strcmp(ln->server, "星系移民"))
|
||||
log(" 星系移民中 ");
|
||||
if( !strcmp(ln->server, "星系移民"))
|
||||
log(" 星系移民中 ");
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -210,13 +210,13 @@ int GetMemLockState(int entry, char *cdkey, char *result)
|
||||
while (ln!=NULL) {
|
||||
if (ln->use != 0) {
|
||||
if (strcmp(ln->cdkey, cdkey)==0) {
|
||||
sprintf(result, "%s 是在 %s 被锁的.",cdkey, ln->server);
|
||||
sprintf(result, "%s 是在 %s 被锁的.",cdkey, ln->server);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
ln=ln->next;
|
||||
}
|
||||
sprintf(result, "%s 没有被锁.", cdkey);
|
||||
sprintf(result, "%s 没有被锁.", cdkey);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -265,7 +265,7 @@ int DeleteGalaxyChangeLock( void)
|
||||
|
||||
while (ln!=NULL) {
|
||||
if( ln->use != 0) {
|
||||
if( strcmp( ln->server, "星系移民" ) == 0 ) {
|
||||
if( strcmp( ln->server, "星系移民" ) == 0 ) {
|
||||
ln->use=0;
|
||||
memset( ln->cdkey, 0, sizeof( ln->cdkey) );
|
||||
memset( ln->server, 0, sizeof( ln->server) );
|
||||
@ -298,8 +298,8 @@ int isChangeGalaxyLocked( char *cdkey)
|
||||
|
||||
while (ln!=NULL) {
|
||||
if (ln->use != 0) {
|
||||
if( !strcmp(ln->cdkey, cdkey) && !strcmp(ln->server, "星系移民") ) {
|
||||
log(" 星系移民中 ");
|
||||
if( !strcmp(ln->cdkey, cdkey) && !strcmp(ln->server, "星系移民") ) {
|
||||
log(" 星系移民中 ");
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -319,7 +319,7 @@ int ChangeMemDeadline(int entry, char *cdkey, char *deadline)
|
||||
while (ln!=NULL) {
|
||||
if (ln->use != 0) {
|
||||
if (strcmp(ln->cdkey, cdkey)==0) {
|
||||
log(" 修改Deadline ");
|
||||
log(" 修改Deadline ");
|
||||
strcpy( ln->deadline, deadline);
|
||||
break;
|
||||
}
|
||||
@ -338,7 +338,7 @@ void UnlockPoolProc( void)
|
||||
int cleanCount =0;
|
||||
|
||||
|
||||
if( sys_time < lastcheck + 3 ) // 每xx秒检查
|
||||
if( sys_time < lastcheck + 3 ) // 每xx秒检查
|
||||
return;
|
||||
lastcheck = sys_time;
|
||||
|
||||
@ -379,12 +379,12 @@ void UnlockPoolProc( void)
|
||||
|
||||
cleanCount++;
|
||||
|
||||
//if( cleanCount >=30) // 每次最多送X个logout
|
||||
//if( cleanCount >=30) // 每次最多送X个logout
|
||||
// break;
|
||||
}
|
||||
}
|
||||
|
||||
// 一次全清归零
|
||||
// 一次全清归零
|
||||
iUnlockPoolAdd =0;
|
||||
unlockindex =0;
|
||||
|
||||
|
@ -35,7 +35,7 @@ int GetMemLockServer(int entry, char *cdkey, char *result);
|
||||
int LockNode_getGname( int entries, char *id, char *gname);
|
||||
|
||||
|
||||
#ifdef _WORKER_AUTO_LOGOUT // WON ADD GS断线自动送LOGOUT给WORKER
|
||||
#ifdef _WORKER_AUTO_LOGOUT // WON ADD GS断线自动送LOGOUT给WORKER
|
||||
void Worker_auto_logout(int ti, char *sname);
|
||||
#endif
|
||||
|
||||
|
@ -52,8 +52,8 @@ getNextMessageID(void)
|
||||
if( fp == NULL ){
|
||||
fp = fopen( filename ,"w" );
|
||||
if( fp == NULL ){
|
||||
log( "不能创建 %s ... 使用同样的邮件ID,"
|
||||
" saac 发送变得缓慢!(id:9999)\n", filename );
|
||||
log( "不能创建 %s ... 使用同样的邮件ID,"
|
||||
" saac 发送变得缓慢!(id:9999)\n", filename );
|
||||
return 9999;
|
||||
}
|
||||
fprintf( fp, "10000\n" );
|
||||
@ -66,13 +66,13 @@ getNextMessageID(void)
|
||||
|
||||
fp = fopen( filename, "w" );
|
||||
if( fp == NULL ){
|
||||
log( "不能写入新的ID到 %s ... 使用同样的数字!\n", filename );
|
||||
log( "不能写入新的ID到 %s ... 使用同样的数字!\n", filename );
|
||||
return i;
|
||||
}
|
||||
fprintf( fp, "%u", i+1 );
|
||||
fclose(fp);
|
||||
|
||||
log( "新邮件ID:%u\n", i);
|
||||
log( "新邮件ID:%u\n", i);
|
||||
return i;
|
||||
}
|
||||
|
||||
@ -90,7 +90,7 @@ static int reallocMailBuf( void )
|
||||
newbuf = ( struct mail * )calloc( 1, new_mailbufsize *
|
||||
sizeof( struct mail ));
|
||||
if( newbuf == NULL ){
|
||||
log( "回复邮件缓冲: 内件不足!! 新邮件大小:%d\n",
|
||||
log( "回复邮件缓冲: 内件不足!! 新邮件大小:%d\n",
|
||||
new_mailbufsize );
|
||||
return -1;
|
||||
}
|
||||
@ -101,8 +101,8 @@ static int reallocMailBuf( void )
|
||||
mailbufsize = new_mailbufsize;
|
||||
mailbuf = newbuf;
|
||||
|
||||
log( "重新分配邮件缓冲: "
|
||||
"新邮件缓冲:%d 旧地址:%x 新地址:%x\n",
|
||||
log( "重新分配邮件缓冲: "
|
||||
"新邮件缓冲:%d 旧地址:%x 新地址:%x\n",
|
||||
new_mailbufsize, (unsigned int)previous,(unsigned int)newbuf );
|
||||
return 0;
|
||||
}
|
||||
@ -131,9 +131,9 @@ static int allocMail( int use_msgid, unsigned int msgid )
|
||||
return mailbuf_finder;
|
||||
}
|
||||
}
|
||||
log( "分配邮件: 邮件缓冲失败.正在进行分配...\n" );
|
||||
log( "分配邮件: 邮件缓冲失败.正在进行分配...\n" );
|
||||
if( reallocMailBuf() < 0 ){
|
||||
log( "分配邮件: 分配失败\n" );
|
||||
log( "分配邮件: 分配失败\n" );
|
||||
} else {
|
||||
return allocMail(use_msgid, msgid );
|
||||
}
|
||||
@ -157,7 +157,7 @@ void receiveMail( char *id_from,
|
||||
snprintf( id_charname, sizeof( id_charname), "%s_%s", id_to, charname_to );
|
||||
h = hashpjw( id_charname ) & 0xff ;
|
||||
if( (mbindex = allocMail(use_msgid, msgid )) < 0 ){
|
||||
log( "回复邮件: 获取新的邮件缓冲失败.\n" );
|
||||
log( "回复邮件: 获取新的邮件缓冲失败.\n" );
|
||||
return;
|
||||
}
|
||||
mailbuf[mbindex].id_charname_hash = h;
|
||||
@ -180,7 +180,7 @@ void receiveMail( char *id_from,
|
||||
makeDirFilename( savefile , sizeof(savefile), maildir, h, childname );
|
||||
fp = fopen( savefile, "w" );
|
||||
if( fp == NULL ){
|
||||
log( "回复邮件 : 不能保存邮件文件: %s %s\n",
|
||||
log( "回复邮件 : 不能保存邮件文件: %s %s\n",
|
||||
savefile, strerror( errno ));
|
||||
return;
|
||||
}
|
||||
@ -253,8 +253,8 @@ void receiveMailAck( char *id, char *charname, int a , int mesgid )
|
||||
log( "failed to unlink %s: %s\n",
|
||||
savefile, strerror(errno ));
|
||||
} else {
|
||||
log( "回复邮件: 删除邮件 "
|
||||
"%u 从 %s(%s) to %s(%s)\n",
|
||||
log( "回复邮件: 删除邮件 "
|
||||
"%u 从 %s(%s) to %s(%s)\n",
|
||||
mailbuf[i].message_id,
|
||||
mailbuf[i].id_from,
|
||||
mailbuf[i].charname_from,
|
||||
@ -264,7 +264,7 @@ void receiveMailAck( char *id, char *charname, int a , int mesgid )
|
||||
memset( &mailbuf[i], 0 , sizeof( mailbuf[0] ));
|
||||
return;
|
||||
} else {
|
||||
log( "回复邮件: 无用信息或ID或名称或声明严重错误" );
|
||||
log( "回复邮件: 无用信息或ID或名称或声明严重错误" );
|
||||
log( "use[%d] h[%d][%d] id[%s][%s] nm[%s][%s] st[%d]\n",
|
||||
mailbuf[i].use, mailbuf[i].id_charname_hash, h,
|
||||
mailbuf[i].id_to, id,
|
||||
@ -273,7 +273,7 @@ void receiveMailAck( char *id, char *charname, int a , int mesgid )
|
||||
}
|
||||
}
|
||||
}
|
||||
log( "回复邮件: 邮件 %u 不能从 %s(%s) 找到\n",
|
||||
log( "回复邮件: 邮件 %u 不能从 %s(%s) 找到\n",
|
||||
mesgid, id,charname );
|
||||
}
|
||||
|
||||
@ -290,14 +290,14 @@ void flushMail( int fd,
|
||||
snprintf( id_charname, sizeof( id_charname ) , "%s_%s", id, charname );
|
||||
h = hashpjw( id_charname );
|
||||
// Nuke +1
|
||||
log("邮件缓冲大小:%d (%s)\n",mailbufsize,chartime());
|
||||
log("邮件缓冲大小:%d (%s)\n",mailbufsize,chartime());
|
||||
// Nuke *1
|
||||
for(i=0;(i<mailbufsize)&&(i<MAX_FLUSH_MAIL);i++){
|
||||
if( mailbuf[i].id_charname_hash == h &&
|
||||
mailbuf[i].use &&
|
||||
strcmp( mailbuf[i].id_to , id ) == 0 &&
|
||||
strcmp( mailbuf[i].charname_to, charname ) == 0 ){
|
||||
log( "消息ID:%u\n", mailbuf[i].message_id );
|
||||
log( "消息ID:%u\n", mailbuf[i].message_id );
|
||||
flush_index[flush_i++] = i;
|
||||
c++;
|
||||
}
|
||||
@ -317,10 +317,10 @@ void flushMail( int fd,
|
||||
}
|
||||
}
|
||||
|
||||
/* 端卞霜耨允月 */
|
||||
/* 端卞霜耨允月 */
|
||||
for(i=0;i< flush_i; i++ ){
|
||||
/* flush 及桦宁反}flush毛霜耨仄化五凶必□丞扔□田□卞
|
||||
覆仄化分仃霜耨允木壬中中 */
|
||||
/* flush 及桦宁反}flush毛霜耨仄化五凶必□丞扔□田□卞
|
||||
覆仄化分仃霜耨允木壬中中 */
|
||||
saacproto_Message_send( fd,
|
||||
mailbuf[flush_index[i]].id_from,
|
||||
mailbuf[flush_index[i]].charname_from,
|
||||
@ -330,11 +330,11 @@ void flushMail( int fd,
|
||||
mailbuf[flush_index[i]].option,
|
||||
mailbuf[flush_index[i]].message_id );
|
||||
mailbuf[flush_index[i]].state = MS_WAIT_ACK;
|
||||
log( "分类邮件ID:%u\n",
|
||||
log( "分类邮件ID:%u\n",
|
||||
mailbuf[flush_index[i]].message_id );
|
||||
}
|
||||
// Nuke *1
|
||||
log( "邮件: 发送 %d 封邮件到 %s(%s)(%s)\n", c, id, charname ,chartime());
|
||||
log( "邮件: 发送 %d 封邮件到 %s(%s)(%s)\n", c, id, charname ,chartime());
|
||||
}
|
||||
|
||||
// Nuke start: To expire undelivered mail
|
||||
@ -347,22 +347,22 @@ expireMail()
|
||||
char id_charname[1000];
|
||||
time_t now=time(NULL);
|
||||
|
||||
/* 1荚及flush 匹霜耨允月 醒 */
|
||||
/* 1荚及flush 匹霜耨允月 醒 */
|
||||
#define MAX_FLUSH_MAIL 1024
|
||||
int flush_index[MAX_FLUSH_MAIL];
|
||||
int flush_i=0;
|
||||
// Nuke +1
|
||||
log("邮件缓冲大小:%d (%s)\n",mailbufsize,chartime());
|
||||
log("邮件缓冲大小:%d (%s)\n",mailbufsize,chartime());
|
||||
// Nuke *1
|
||||
for(i=0;(i<mailbufsize)&&(i<MAX_FLUSH_MAIL);i++){
|
||||
if(mailbuf[i].use && (now - mailbuf[i].recv_time >= MAIL_EXPIRE_TIME)) {
|
||||
log( "消息ID:%u 已过期\n", mailbuf[i].message_id );
|
||||
log( "消息ID:%u 已过期\n", mailbuf[i].message_id );
|
||||
flush_index[flush_i++] = i;
|
||||
c++;
|
||||
}
|
||||
}
|
||||
|
||||
/* 端卞霜耨允月 */
|
||||
/* 端卞霜耨允月 */
|
||||
for(i=0;i< flush_i; i++ ){
|
||||
|
||||
snprintf( id_charname, sizeof( id_charname), "%s_%s",
|
||||
@ -380,8 +380,8 @@ expireMail()
|
||||
log( "failed to unlink %s: %s\n",
|
||||
savefile, strerror(errno ));
|
||||
} else {
|
||||
log( "过期邮件: 删除游戏 "
|
||||
"%u 从 %s(%s) 到 %s(%s)\n",
|
||||
log( "过期邮件: 删除游戏 "
|
||||
"%u 从 %s(%s) 到 %s(%s)\n",
|
||||
mailbuf[flush_index[i]].message_id,
|
||||
mailbuf[flush_index[i]].id_from,
|
||||
mailbuf[flush_index[i]].charname_from,
|
||||
@ -392,7 +392,7 @@ expireMail()
|
||||
}
|
||||
}
|
||||
// Nuke *1
|
||||
log( "过期邮件: 过期 %d 消息 (%s)\n", c ,chartime());
|
||||
log( "过期邮件: 过期 %d 消息 (%s)\n", c ,chartime());
|
||||
}
|
||||
|
||||
int readMail( char *dir )
|
||||
@ -406,7 +406,7 @@ int readMail( char *dir )
|
||||
d = opendir(dirname);
|
||||
if(d == NULL ){
|
||||
mkdir( dirname, 0755);
|
||||
log("创建 %s\n", dirname);
|
||||
log("创建 %s\n", dirname);
|
||||
continue;
|
||||
}
|
||||
while(1){
|
||||
@ -425,7 +425,7 @@ int readMail( char *dir )
|
||||
if( !(s.st_mode & S_IFREG)) continue;
|
||||
fp = fopen( filename, "r" );
|
||||
if( fp == NULL ){
|
||||
log( "不能打开文件 %s %s\n",filename,strerror(errno));
|
||||
log( "不能打开文件 %s %s\n",filename,strerror(errno));
|
||||
continue;
|
||||
}
|
||||
{
|
||||
@ -478,8 +478,8 @@ int readMail( char *dir )
|
||||
if( toid[0] == 0 || fromid[0] == 0 ||
|
||||
tochar[0] == 0 || fromchar[0] == 0 ||
|
||||
text[0] == 0 ){
|
||||
log( "有问题邮件! %s 接收ID[%c] 接收名字[%c]"
|
||||
" 发送ID[%c] 发送名字[%c] 文本[%c]\n",
|
||||
log( "有问题邮件! %s 接收ID[%c] 接收名字[%c]"
|
||||
" 发送ID[%c] 发送名字[%c] 文本[%c]\n",
|
||||
filename,
|
||||
toid[0], tochar[0], fromid[0], fromchar[0],
|
||||
text[0] );
|
||||
@ -499,6 +499,6 @@ int readMail( char *dir )
|
||||
}
|
||||
closedir(d);
|
||||
}
|
||||
log( "读取邮件: 在'%s'目录里读取到 %d 封邮件 \n", dir, read_count );
|
||||
log( "读取邮件: 在'%s'目录里读取到 %d 封邮件 \n", dir, read_count );
|
||||
return 0;
|
||||
}
|
||||
|
410
saac/src/main.c
410
saac/src/main.c
File diff suppressed because it is too large
Load Diff
@ -31,19 +31,19 @@
|
||||
void set_nodelay( int sock );
|
||||
|
||||
#define OK 0
|
||||
#define TCPSTRUCT_ENOMEM -1 /* malloc 撩 */
|
||||
#define TCPSTRUCT_ESOCK -2 /* socket 撩 */
|
||||
#define TCPSTRUCT_EBIND -3 /* bind 撩 */
|
||||
#define TCPSTRUCT_ELISTEN -4 /* listen 撩 */
|
||||
#define TCPSTRUCT_EBUG -6 /* 田弘匹丐月 */
|
||||
#define TCPSTRUCT_EINVCIND -7 /* con尺及index互云井仄中方 */
|
||||
#define TCPSTRUCT_EREADFIN -8 /* read 允月犯□正互卅仁化 closed by remote */
|
||||
#define TCPSTRUCT_EHOST -9 /* gethostbyname 撩 */
|
||||
#define TCPSTRUCT_ECONNECT -10 /* connect 撩 */
|
||||
#define TCPSTRUCT_ECFULL -11 /* con 互中匀天中 */
|
||||
#define TCPSTRUCT_ETOOLONG -12 /* 垫互卅互允亢 */
|
||||
#define TCPSTRUCT_EMBFULL -13 /* mb 互中匀天中 */
|
||||
#define TCPSTRUCT_ECLOSEAGAIN -14 /* close 互2荚今木凶 */
|
||||
#define TCPSTRUCT_ENOMEM -1 /* malloc 撩 */
|
||||
#define TCPSTRUCT_ESOCK -2 /* socket 撩 */
|
||||
#define TCPSTRUCT_EBIND -3 /* bind 撩 */
|
||||
#define TCPSTRUCT_ELISTEN -4 /* listen 撩 */
|
||||
#define TCPSTRUCT_EBUG -6 /* 田弘匹丐月 */
|
||||
#define TCPSTRUCT_EINVCIND -7 /* con尺及index互云井仄中方 */
|
||||
#define TCPSTRUCT_EREADFIN -8 /* read 允月犯□正互卅仁化 closed by remote */
|
||||
#define TCPSTRUCT_EHOST -9 /* gethostbyname 撩 */
|
||||
#define TCPSTRUCT_ECONNECT -10 /* connect 撩 */
|
||||
#define TCPSTRUCT_ECFULL -11 /* con 互中匀天中 */
|
||||
#define TCPSTRUCT_ETOOLONG -12 /* 垫互卅互允亢 */
|
||||
#define TCPSTRUCT_EMBFULL -13 /* mb 互中匀天中 */
|
||||
#define TCPSTRUCT_ECLOSEAGAIN -14 /* close 互2荚今木凶 */
|
||||
#define TCPSTRUCT_WORKERROR -16
|
||||
#define TCPSTRUCT_WORKEBIND -17
|
||||
|
||||
|
270
saac/src/recv.c
270
saac/src/recv.c
@ -36,7 +36,7 @@
|
||||
#include "chatroom.h"
|
||||
#endif
|
||||
|
||||
#ifdef _RECAL_BACKUP_PLAYER // WON 回溯功能
|
||||
#ifdef _RECAL_BACKUP_PLAYER // WON 回溯功能
|
||||
#include <dirent.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
@ -52,7 +52,7 @@ static int char_data_count=0;
|
||||
|
||||
|
||||
|
||||
#ifdef _CK_ONLINE_PLAYER_COUNT // WON ADD 计算线上人数
|
||||
#ifdef _CK_ONLINE_PLAYER_COUNT // WON ADD 计算线上人数
|
||||
struct play_count
|
||||
{
|
||||
int playcount;
|
||||
@ -79,8 +79,8 @@ void saacproto_ACServerLogin_recv( int ti,char* servername ,
|
||||
saacproto_ACServerLogin_send( ti ,result ,retdata );
|
||||
}
|
||||
/*
|
||||
必□丞扔□田□互失市它件玄扔□田□井日夫弘失它玄允月[
|
||||
int fd : 覆擂socket
|
||||
必□丞扔□田□互失市它件玄扔□田□井日夫弘失它玄允月[
|
||||
int fd : 覆擂socket
|
||||
|
||||
*/
|
||||
void saacproto_ACServerLogout_recv( int ti )
|
||||
@ -103,7 +103,7 @@ void saacproto_ACCharLoad_recv( int ti,char* id,char* pas,char* charname ,
|
||||
|
||||
if (!sasql_query(id,pas)){
|
||||
if(!sasql_register(id,pas)){
|
||||
log("密码错误或没有注册\n");
|
||||
log("密码错误或没有注册\n");
|
||||
saacproto_ACCharList_send( ti , FAILED , "Password error" , mesgid);
|
||||
return;}}
|
||||
|
||||
@ -119,16 +119,16 @@ if (!sasql_query(id,pas)){
|
||||
|
||||
#ifdef _CHANGEGALAXY
|
||||
if( isChangeGalaxyLocked( id) ) {
|
||||
log(" 因星系移民被锁 ");
|
||||
log(" 因星系移民被锁 ");
|
||||
saacproto_ACCharLoad_send( ti , FAILED , "CHANGE_GALAXY" , mesgid, charindex );
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef _UNLOCKPOOL // 登入时检查是否已在UnlockPool中
|
||||
#ifdef _UNLOCKPOOL // 登入时检查是否已在UnlockPool中
|
||||
if( inUnlockPool(id) ) {
|
||||
log(" 已经在UNLOCKPOOL中 ");
|
||||
log(" 已经在UNLOCKPOOL中 ");
|
||||
saacproto_ACCharLoad_send( ti , FAILED ,
|
||||
"server load too high" , mesgid , charindex);
|
||||
return;
|
||||
@ -154,7 +154,7 @@ if (!sasql_query(id,pas)){
|
||||
}
|
||||
|
||||
// Spock 2000/10/31
|
||||
//log( "读取档案: 附加作业 %s %s, 进程=%d\n", id,pas,process );
|
||||
//log( "读取档案: 附加作业 %s %s, 进程=%d\n", id,pas,process );
|
||||
// Spock end
|
||||
}
|
||||
|
||||
@ -169,21 +169,21 @@ void saacproto_ACCharLoadII_recv( int ti,char* id,char* pas,char* charname ,
|
||||
saacproto_ACCharLoad_send( ti , FAILED , "not login" , mesgid, charindex );
|
||||
return;
|
||||
}
|
||||
// 检查Buffer中的资料是否符合
|
||||
// 检查原先从Wgs传回CharLoad做了什麽事
|
||||
// 更新名片资料
|
||||
// 检查Buffer中的资料是否符合
|
||||
// 检查原先从Wgs传回CharLoad做了什麽事
|
||||
// 更新名片资料
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
平乓仿忡绣
|
||||
平乓仿忡绣
|
||||
|
||||
char *id : ID
|
||||
char *pas : 天允歹□升
|
||||
char *charname : 平乓仿
|
||||
char *opt : 左皿扑亦件 侬 [ CharList及午五卞丢乒午仄化忒允树
|
||||
char *charinfo : 白央奶伙卞忡绣允月平乓仿弁正及旦 □正旦树 [
|
||||
int id : 丢永本□斥id
|
||||
char *pas : 天允歹□升
|
||||
char *charname : 平乓仿
|
||||
char *opt : 左皿扑亦件 侬 [ CharList及午五卞丢乒午仄化忒允树
|
||||
char *charinfo : 白央奶伙卞忡绣允月平乓仿弁正及旦 □正旦树 [
|
||||
int id : 丢永本□斥id
|
||||
*/
|
||||
#ifdef _NewSave
|
||||
void saacproto_ACCharSave_recv( int ti, char* id,
|
||||
@ -218,16 +218,16 @@ void saacproto_ACCharSave_recv( int ti, char* id,
|
||||
id , "dummy" , charname , process ,"",
|
||||
mesgid , 0 ) < 0 ) {
|
||||
#endif
|
||||
log("游戏退出失败, 进程=%s\n" , process );
|
||||
log("游戏退出失败, 进程=%s\n" , process );
|
||||
} else {
|
||||
log("游戏退出成功, 进程=%s\n" , process );
|
||||
log("游戏退出成功, 进程=%s\n" , process );
|
||||
}
|
||||
|
||||
} else {
|
||||
log("自动保存\n\n");
|
||||
log("自动保存\n\n");
|
||||
}
|
||||
|
||||
log("在线玩家保存\n");
|
||||
log("在线玩家保存\n");
|
||||
}
|
||||
|
||||
#ifdef _RELOGIN
|
||||
@ -244,10 +244,10 @@ void saacproto_ACCharSaveII_recv( int ti, char* id,
|
||||
}
|
||||
ret = charSave( ti, id, charname, opt, charinfo,
|
||||
unlock,mesgid, charindex );
|
||||
// 储存人物资料
|
||||
// 记录相关资讯
|
||||
// 不送GE至WGS
|
||||
// 不更新名片资料
|
||||
// 储存人物资料
|
||||
// 记录相关资讯
|
||||
// 不送GE至WGS
|
||||
// 不更新名片资料
|
||||
if (unlock) {
|
||||
#ifdef _UNLOCKPOOL
|
||||
if( addUnlockPool( ti, id, charname, process, mesgid) <0 ) {
|
||||
@ -256,14 +256,14 @@ void saacproto_ACCharSaveII_recv( int ti, char* id,
|
||||
id , "dummy" , charname , process ,"",
|
||||
mesgid , 0 ) < 0 ) {
|
||||
#endif
|
||||
log("游戏退出失败, 进程=%s\n" , process );
|
||||
log("游戏退出失败, 进程=%s\n" , process );
|
||||
} else {
|
||||
log("游戏退出成功, 进程=%s\n" , process );
|
||||
log("游戏退出成功, 进程=%s\n" , process );
|
||||
}
|
||||
} else {
|
||||
log("自动保存\n\n");
|
||||
log("自动保存\n\n");
|
||||
}
|
||||
log("在线玩家保存\n");
|
||||
log("在线玩家保存\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -281,7 +281,7 @@ void saacproto_ACCharList_recv( int ti,char* id,char* pas , int mesgid)
|
||||
|
||||
#ifdef _CHANGEGALAXY
|
||||
if( isChangeGalaxyLocked( id) ) {
|
||||
log(" 因星系移民被锁 ");
|
||||
log(" 因星系移民被锁 ");
|
||||
saacproto_ACCharList_send( ti , FAILED , "CHANGE_GALAXY" , mesgid );
|
||||
return;
|
||||
}
|
||||
@ -297,7 +297,7 @@ void saacproto_ACCharList_recv( int ti,char* id,char* pas , int mesgid)
|
||||
mesgid );
|
||||
return;
|
||||
}
|
||||
log( "档案列表: %s\n", id );
|
||||
log( "档案列表: %s\n", id );
|
||||
}
|
||||
|
||||
void saacproto_ACCharDelete_recv( int ti,char* id,char* pas,
|
||||
@ -308,13 +308,13 @@ void saacproto_ACCharDelete_recv( int ti,char* id,char* pas,
|
||||
saacproto_ACCharDelete_send( ti , FAILED , "not login" , mesgid );
|
||||
return;
|
||||
}
|
||||
#ifdef _DEATH_FAMILY_LOGIN_CHECK //无法删除人物资料
|
||||
#ifdef _DEATH_FAMILY_LOGIN_CHECK //无法删除人物资料
|
||||
saacproto_ACCharDelete_send( ti , FAILED , "server load too high",
|
||||
mesgid );
|
||||
return;
|
||||
#endif
|
||||
|
||||
#ifdef _DEATH_CONTEND //无法删除人物资料
|
||||
#ifdef _DEATH_CONTEND //无法删除人物资料
|
||||
saacproto_ACCharDelete_send( ti , FAILED , "server load too high",
|
||||
mesgid );
|
||||
return;
|
||||
@ -327,7 +327,7 @@ void saacproto_ACCharDelete_recv( int ti,char* id,char* pas,
|
||||
mesgid );
|
||||
return;
|
||||
}
|
||||
log( "档案删除: 附加作业 %s %s\n",id , pas );
|
||||
log( "档案删除: 附加作业 %s %s\n",id , pas );
|
||||
}
|
||||
|
||||
void saacproto_ACLock_recv( int ti ,char* id,int lock,int mesgid )
|
||||
@ -365,9 +365,9 @@ void saacproto_ACLock_recv( int ti ,char* id,int lock,int mesgid )
|
||||
if ( lockUser( getGSName( ti ) , id , "0" , lock , result,sizeof(result),
|
||||
retdata ,sizeof( retdata ) , "0" , "0") < 0 ) {
|
||||
#endif
|
||||
log( "锁定用户: %s 失败\n" , id );
|
||||
log( "锁定用户: %s 失败\n" , id );
|
||||
} else {
|
||||
log( "锁定用户: %s 成功\n" , id );
|
||||
log( "锁定用户: %s 成功\n" , id );
|
||||
}
|
||||
}
|
||||
// Spock end
|
||||
@ -490,7 +490,7 @@ void saacproto_DBUpdateEntryInt_recv( int fd,
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef _ALLDOMAN // (不可开) Syu ADD 排行榜NPC
|
||||
#ifdef _ALLDOMAN // (不可开) Syu ADD 排行榜NPC
|
||||
void saacproto_UpdataStele_recv( int fd , char *cdkey , char *name , char *title ,
|
||||
int level , int trns , int time , int floor )
|
||||
{
|
||||
@ -510,7 +510,7 @@ void saacproto_UpdataStele_recv( int fd , char *cdkey , char *name , char *title
|
||||
for( i=0; i<MAX_HERO_LIST; i++){
|
||||
if( Herolist[i].use == 0 )continue;
|
||||
if( floor <= Herolist[i].intdata[3] ) continue;
|
||||
for( j=MAX_HERO_LIST-1; j>i; j--){ //20031001bug (原j++)
|
||||
for( j=MAX_HERO_LIST-1; j>i; j--){ //20031001bug (原j++)
|
||||
sprintf( Herolist[j].strings[0], "%s", Herolist[j-1].strings[0] );
|
||||
sprintf( Herolist[j].strings[1], "%s", Herolist[j-1].strings[1] );
|
||||
sprintf( Herolist[j].strings[2], "%s", Herolist[j-1].strings[2] );
|
||||
@ -770,7 +770,7 @@ void saacproto_ACAddFM_recv( int fd, char *fmname, char *fmleadername,
|
||||
}
|
||||
|
||||
void saacproto_ACJoinFM_recv(int fd, char *fmname, int fmindex,
|
||||
#ifdef _PERSONAL_FAME // Arminius: 家族个人声望
|
||||
#ifdef _PERSONAL_FAME // Arminius: 家族个人声望
|
||||
char *charname, char *charid, int charlv, int index, int fame, int charfdid)
|
||||
#else
|
||||
char *charname, char *charid, int charlv, int index, int charfdid)
|
||||
@ -778,7 +778,7 @@ void saacproto_ACJoinFM_recv(int fd, char *fmname, int fmindex,
|
||||
{
|
||||
#ifdef __FAMILY
|
||||
int r = 0;
|
||||
#ifdef _PERSONAL_FAME // Arminius: 家族个人声望
|
||||
#ifdef _PERSONAL_FAME // Arminius: 家族个人声望
|
||||
r = ACJoinFM(fd, index, fmname, fmindex, charname, charid, charlv, fame, charfdid);
|
||||
#else
|
||||
r = ACJoinFM(fd, index, fmname, fmindex, charname, charid, charlv, charfdid);
|
||||
@ -875,7 +875,7 @@ void saacproto_ACShowFMList_recv(int fd)
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef _DEATH_FAMILY_GM_COMMAND // WON ADD 家族战GM指令
|
||||
#ifdef _DEATH_FAMILY_GM_COMMAND // WON ADD 家族战GM指令
|
||||
void saacproto_ACShowMemberList_2_recv( int fd, int charindex, int fm1, int fm2, int time, int id )
|
||||
{
|
||||
char *fm1_name, *fm2_name;
|
||||
@ -955,7 +955,7 @@ void saacproto_ACMemberLeaveFM_recv(int fd, char *fmname, int fmindex,
|
||||
{
|
||||
#ifdef __FAMILY
|
||||
int r = 0;
|
||||
int flag = 1; // 主动离开家族
|
||||
int flag = 1; // 主动离开家族
|
||||
#ifdef _FMVER21
|
||||
r = ACMemberLeaveFM(index, fmname, fmindex, charname, flag,
|
||||
charindex, meindex);
|
||||
@ -986,7 +986,7 @@ void saacproto_ACFMCharLogin_recv(int fd, char *fmname, int fmindex,
|
||||
#ifdef __FAMILY
|
||||
int r = 0, floor = 0, fmpopular = 0, joinflag = 0, fmsetupflag = 0;
|
||||
int flag = 0, charindex = 0;
|
||||
#ifdef _PERSONAL_FAME // Arminius: 家族个人声望
|
||||
#ifdef _PERSONAL_FAME // Arminius: 家族个人声望
|
||||
int charfame = 0;
|
||||
#endif
|
||||
#ifdef _NEW_MANOR_LAW
|
||||
@ -1001,7 +1001,7 @@ void saacproto_ACFMCharLogin_recv(int fd, char *fmname, int fmindex,
|
||||
#endif
|
||||
);
|
||||
#else
|
||||
#ifdef _PERSONAL_FAME // Arminius: 家族个人声望
|
||||
#ifdef _PERSONAL_FAME // Arminius: 家族个人声望
|
||||
r = ACFMCharLogin(fd, -1, fmname, fmindex, charname, charid, charlv,
|
||||
&floor, &fmpopular, &joinflag, &fmsetupflag, &charindex, charfdid,
|
||||
&charfame, eventflag);
|
||||
@ -1011,7 +1011,7 @@ void saacproto_ACFMCharLogin_recv(int fd, char *fmname, int fmindex,
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef _PERSONAL_FAME // Arminius: 家族个人声望
|
||||
#ifdef _PERSONAL_FAME // Arminius: 家族个人声望
|
||||
if (r < 0){
|
||||
saacproto_ACFMCharLogin_send(fd, FAILED, r, floor, fmpopular,
|
||||
joinflag, fmsetupflag, flag, charindex, charfame, charfdid
|
||||
@ -1102,7 +1102,7 @@ void saacproto_ACFMPointList_recv(int fd)
|
||||
|
||||
|
||||
|
||||
#ifdef _CK_ONLINE_PLAYER_COUNT // WON ADD 计算线上人数
|
||||
#ifdef _CK_ONLINE_PLAYER_COUNT // WON ADD 计算线上人数
|
||||
void PlayerCount(void)
|
||||
{
|
||||
int i, total_count=0;
|
||||
@ -1317,7 +1317,7 @@ extern gmsv gs[MAXCONNECTION];
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef _AC_SEND_FM_PK // WON ADD 庄园对战列表储存在AC
|
||||
#ifdef _AC_SEND_FM_PK // WON ADD 庄园对战列表储存在AC
|
||||
#ifdef _ACFMPK_LIST
|
||||
void saacproto_ACLoadFmPk_recv(int fd, int fmpks_pos)
|
||||
{
|
||||
@ -1344,7 +1344,7 @@ void saacproto_ACSendFmPk_recv(int fd, int fmpks_pos, int userindex, int flg, ch
|
||||
saacproto_ACLoadFmPk_send(i, FMPK_GetData( fmpks_pos-1) );
|
||||
}
|
||||
}
|
||||
//送确认讯息
|
||||
//送确认讯息
|
||||
if(userindex != -1) saacproto_ACSendFmPk_send( fd, userindex, 1);
|
||||
}
|
||||
#else
|
||||
@ -1381,7 +1381,7 @@ void saacproto_ACSendFmPk_recv(int fd, int fmpks_pos, char *data)
|
||||
|
||||
|
||||
|
||||
#ifdef _RECAL_BACKUP_PLAYER // WON 回溯功能
|
||||
#ifdef _RECAL_BACKUP_PLAYER // WON 回溯功能
|
||||
|
||||
#define arraysizeof( x ) (sizeof(x)/sizeof(x[0]))
|
||||
|
||||
@ -1394,13 +1394,13 @@ void saacproto_ACRecalPlayer_recv(int fd, char *uid, int userfdid, int GmCliId,
|
||||
if( date<20000000 ) { log("\n date(%d) format err!!", date); return; }
|
||||
|
||||
|
||||
if( backup_flag == 1 ){ // 备份日期
|
||||
// 回传有备份的日期
|
||||
if( backup_flag == 1 ){ // 备份日期
|
||||
// 回传有备份的日期
|
||||
get_backup_date(fd, uid, userfdid, GmCliId, id, char_num, date);
|
||||
|
||||
}else if( backup_flag == 2 ){ // 人物资料
|
||||
get_online_player_data(fd, uid, userfdid, GmCliId, id, char_num, date); // 传回线上人物资料
|
||||
get_backup_player_data(fd, uid, userfdid, GmCliId, id, char_num, date); // 传回备份人物资料
|
||||
}else if( backup_flag == 2 ){ // 人物资料
|
||||
get_online_player_data(fd, uid, userfdid, GmCliId, id, char_num, date); // 传回线上人物资料
|
||||
get_backup_player_data(fd, uid, userfdid, GmCliId, id, char_num, date); // 传回备份人物资料
|
||||
}
|
||||
|
||||
}
|
||||
@ -1414,27 +1414,27 @@ void saacproto_ACRecalBackup_recv(int fd, char *uid, int userfdid, int GmCliId,
|
||||
char filename1[128], filename2[128];
|
||||
char body[256];
|
||||
|
||||
if(backup_flag == 1){ // 回溯人物
|
||||
// 线上人物
|
||||
if(backup_flag == 1){ // 回溯人物
|
||||
// 线上人物
|
||||
sprintf(filename1, "~/saac/char/0x%x/%s.%d.char", (getHash(id)&0xff), id, char_num );
|
||||
|
||||
// 备份人物
|
||||
// 备份人物
|
||||
sprintf(filename2, "%s/char/0x%x/%s.%d.char", BACKUP_DIR, (getHash(id)&0xff), id, char_num );
|
||||
|
||||
// 移动备份人物至线上人物
|
||||
// 移动备份人物至线上人物
|
||||
strcpy(body, "");
|
||||
sprintf(body, "mv %s %s", filename2, filename1);
|
||||
system(body);
|
||||
|
||||
/* 回溯成功 */
|
||||
/* 回溯成功 */
|
||||
saacproto_ACRecalPlayer_send(fd, uid, userfdid, GmCliId, id, char_num, date, char_data, 4);
|
||||
|
||||
|
||||
}else if(backup_flag == 2 ){ // 部分回溯人物
|
||||
}else if(backup_flag == 2 ){ // 部分回溯人物
|
||||
|
||||
log("\n won test 44 ==> char_data_chang(%s)", char_data);
|
||||
|
||||
// 取出需回溯项目
|
||||
// 取出需回溯项目
|
||||
for(i=0;i<5;i++){
|
||||
memset(temp, 0, sizeof(temp));
|
||||
easyGetTokenFromString( char_data , count , temp , sizeof( temp ));
|
||||
@ -1462,7 +1462,7 @@ void saacproto_ACRecalBackup_recv(int fd, char *uid, int userfdid, int GmCliId,
|
||||
}
|
||||
|
||||
|
||||
// 处理部分回溯功能
|
||||
// 处理部分回溯功能
|
||||
recal_part_backup(fd, uid, userfdid, GmCliId, id, char_num, date);
|
||||
|
||||
}
|
||||
@ -1481,7 +1481,7 @@ void recal_part_backup(int fd, char *uid, int userfdid, int GmCliId, char *id, i
|
||||
char *temp=NULL, *temp2, *temp3, *temp4, *temp5, *msg1, delim[20], out_msg[65530];
|
||||
|
||||
|
||||
// 线上人物
|
||||
// 线上人物
|
||||
{
|
||||
c_ptr=onlin_char;
|
||||
snprintf(body , sizeof(body ) , "%s.%d.char" , id , char_num );
|
||||
@ -1503,7 +1503,7 @@ void recal_part_backup(int fd, char *uid, int userfdid, int GmCliId, char *id, i
|
||||
fclose(fp);
|
||||
}
|
||||
|
||||
// 备份人物
|
||||
// 备份人物
|
||||
{
|
||||
c_ptr=backup_char;
|
||||
snprintf(body , sizeof(body ) , "%s.%d.char" , id , char_num );
|
||||
@ -1533,7 +1533,7 @@ void recal_part_backup(int fd, char *uid, int userfdid, int GmCliId, char *id, i
|
||||
if( item_pet_chang.equit_item[i] != i ){
|
||||
log("\n won test 2 ==> i(%d) item(%d)", i, item_pet_chang.equit_item[i]);
|
||||
|
||||
// 线上人物
|
||||
// 线上人物
|
||||
while( temp==NULL ){
|
||||
log("\n won test 2.1 ==> temp(%s)", temp);
|
||||
sprintf( delim, "item%d=", i);
|
||||
@ -1558,7 +1558,7 @@ void recal_part_backup(int fd, char *uid, int userfdid, int GmCliId, char *id, i
|
||||
snprintf(msg1, strlen(onlin_char)-strlen(temp2), "%s", onlin_char );
|
||||
log("\n won test 3.2 ==> msg1(%s)", msg1);
|
||||
|
||||
// 备份人物
|
||||
// 备份人物
|
||||
sprintf( delim, "item%d=", item_pet_chang.equit_item[i]-5+1);
|
||||
temp3=strstr( backup_char, delim);
|
||||
temp4=strstr( temp3, "\n");
|
||||
@ -1566,10 +1566,10 @@ void recal_part_backup(int fd, char *uid, int userfdid, int GmCliId, char *id, i
|
||||
snprintf(temp5, strlen(temp3)-strlen(temp4), "%s", temp3);
|
||||
log("\n won test 4 ==> temp5(%s)", temp5);
|
||||
|
||||
// 组合
|
||||
// 组合
|
||||
memset(out_msg, 0, sizeof(out_msg));
|
||||
strcpy(out_msg, msg1);
|
||||
strcat(out_msg, temp5); // 回溯的部分
|
||||
strcat(out_msg, temp5); // 回溯的部分
|
||||
strcat(out_msg, temp2);
|
||||
log("\n won test 5 ==> out_msg(%s)", out_msg);
|
||||
}
|
||||
@ -1581,7 +1581,7 @@ void recal_part_backup(int fd, char *uid, int userfdid, int GmCliId, char *id, i
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef _CHECKFMSCHEDULE // Syu ADD 透过AC确认家族挑战排程
|
||||
#ifdef _CHECKFMSCHEDULE // Syu ADD 透过AC确认家族挑战排程
|
||||
void saacproto_ACCheckSchedule_recv(int fd,char *data)
|
||||
{
|
||||
extern gmsv gs[MAXCONNECTION];
|
||||
@ -1631,8 +1631,8 @@ void saacproto_ACManorPKAck_recv(int fd, char *data)
|
||||
{
|
||||
#ifdef __FAMILY
|
||||
|
||||
#ifdef _AC_SEND_FM_PK // WON ADD 庄园对战列表储存在AC
|
||||
// 不处理
|
||||
#ifdef _AC_SEND_FM_PK // WON ADD 庄园对战列表储存在AC
|
||||
// 不处理
|
||||
#else
|
||||
extern gmsv gs[MAXCONNECTION];
|
||||
int i;
|
||||
@ -1673,7 +1673,7 @@ void saacproto_ACKick_recv( int ti ,char* id, int lock,int mesgid )
|
||||
LServer_SAUNLock_send( ti, id, mesgid, 0);
|
||||
#endif
|
||||
break;
|
||||
case 1: //跨星球踢人 KICK
|
||||
case 1: //跨星球踢人 KICK
|
||||
{
|
||||
int i;
|
||||
for(i=0;i<MAXCONNECTION;i++) {
|
||||
@ -1704,7 +1704,7 @@ void saacproto_ACKick_recv( int ti ,char* id, int lock,int mesgid )
|
||||
sprintf(retdata, "LOCK USER !!");
|
||||
}
|
||||
break;
|
||||
case 5: //查询玩家状态 TYPE
|
||||
case 5: //查询玩家状态 TYPE
|
||||
{
|
||||
char buf[4096];
|
||||
if (GetMemLockState(getHash(id) & 0xff, id, buf)) {
|
||||
@ -1753,13 +1753,13 @@ void saacproto_ACKick_recv( int ti ,char* id, int lock,int mesgid )
|
||||
int i;
|
||||
if (GetMemLockState(getHash(id) & 0xff, id, buf)) {
|
||||
log("\n won test 20.1 ==>");
|
||||
// 有lock的话踢人
|
||||
// 有lock的话踢人
|
||||
for(i=0;i<MAXCONNECTION;i++) {
|
||||
if( is_game_server_login(i) ){
|
||||
saacproto_ACKick_send( i , 1 , id , mesgid );
|
||||
}
|
||||
}
|
||||
} else { // 没有lock的话,送 game end
|
||||
} else { // 没有lock的话,送 game end
|
||||
char result[100], retdata[100], process[16];
|
||||
int ret = 0;
|
||||
log("\n won test 20.2 ==>");
|
||||
@ -1786,7 +1786,7 @@ void saacproto_ACKick_recv( int ti ,char* id, int lock,int mesgid )
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
case 10: //跨星球踢人不含load该星球
|
||||
case 10: //跨星球踢人不含load该星球
|
||||
{
|
||||
int i;
|
||||
for(i=0;i<MAXCONNECTION;i++) {
|
||||
@ -1803,7 +1803,7 @@ void saacproto_ACKick_recv( int ti ,char* id, int lock,int mesgid )
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef _WORKER_AUTO_LOGOUT // WON ADD GS断线自动送LOGOUT给WORKER
|
||||
#ifdef _WORKER_AUTO_LOGOUT // WON ADD GS断线自动送LOGOUT给WORKER
|
||||
void Worker_send_logout( int ti ,char* id )
|
||||
{
|
||||
char result[100], retdata[100], process[16];
|
||||
@ -1860,9 +1860,9 @@ void saacproto_DefendList_recv( int fd, int type, char *data)
|
||||
case 2:
|
||||
DEFEND_LoadScoreForList( data);
|
||||
break;
|
||||
case 3: //检查积分
|
||||
case 3: //检查积分
|
||||
break;
|
||||
case 4: //删除积分纪录
|
||||
case 4: //删除积分纪录
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -1898,9 +1898,9 @@ void saacproto_LoadNEWPlayer_recv( int ti , int charaindex, char* filename)
|
||||
{
|
||||
char Token[256];
|
||||
if( LoadNEWPlayerListAdd( filename) <= 0 ){
|
||||
sprintf( Token, "重读新手名单-错误。");
|
||||
sprintf( Token, "重读新手名单-错误。");
|
||||
}else{
|
||||
sprintf( Token, "重读新手名单-完成。");
|
||||
sprintf( Token, "重读新手名单-完成。");
|
||||
}
|
||||
|
||||
saacproto_LoadNEWPlayer_send( ti, charaindex, Token);
|
||||
@ -1957,7 +1957,7 @@ void saacproto_PKLISTUPDATE_send( int fd, char *ret, int mesgid, int charindex,
|
||||
*/
|
||||
#endif
|
||||
|
||||
#ifdef _GM_BROADCAST // WON ADD 客服公告系统
|
||||
#ifdef _GM_BROADCAST // WON ADD 客服公告系统
|
||||
void broadcast( char *msg )
|
||||
{
|
||||
extern gmsv gs[MAXCONNECTION];
|
||||
@ -1991,7 +1991,7 @@ void broadcast( char *msg )
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef _SEND_EFFECT // WON ADD 送下雪、下雨等特效
|
||||
#ifdef _SEND_EFFECT // WON ADD 送下雪、下雨等特效
|
||||
void SendEffect(char *effect)
|
||||
{
|
||||
extern gmsv gs[MAXCONNECTION];
|
||||
@ -2006,11 +2006,11 @@ void SendEffect(char *effect)
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef _BAD_PLAYER // WON ADD 送坏玩家去关
|
||||
#ifdef _BAD_PLAYER // WON ADD 送坏玩家去关
|
||||
void BadPlayer(void)
|
||||
{
|
||||
int i;
|
||||
extern char BadPlayerList[500][20]; // 定义最大 500 名
|
||||
extern char BadPlayerList[500][20]; // 定义最大 500 名
|
||||
char *filename={"sendjail.txt"};
|
||||
FILE *fp;
|
||||
extern int MAX_BAD_PLAYER;
|
||||
@ -2042,7 +2042,7 @@ void BadPlayer(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef _AC_SEND_FM_PK // WON ADD 庄园对战列表储存在AC
|
||||
#ifdef _AC_SEND_FM_PK // WON ADD 庄园对战列表储存在AC
|
||||
void load_fm_pk_list()
|
||||
{
|
||||
int i;
|
||||
@ -2117,7 +2117,7 @@ void saacproto_ACCharGetPoolItem_recv( int fd, char *cdkey, int userindex, int c
|
||||
|
||||
ret = loadCharPoolItemOne( cdkey , loadbuf , sizeof(loadbuf));
|
||||
|
||||
if( ret == -1 ){//找不到档案
|
||||
if( ret == -1 ){//找不到档案
|
||||
saacproto_ACCharGetPoolItem_send( fd , FAILED, loadbuf, clifdid, npcid);
|
||||
return;
|
||||
}
|
||||
@ -2158,7 +2158,7 @@ void saacproto_ACCharGetPoolPet_recv( int fd, char *cdkey, int userindex, int cl
|
||||
|
||||
ret = loadCharPoolPetOne( cdkey , loadbuf , sizeof(loadbuf));
|
||||
|
||||
if( ret == -1 ){//找不到档案
|
||||
if( ret == -1 ){//找不到档案
|
||||
saacproto_ACCharGetPoolPet_send( fd , FAILED, loadbuf, clifdid, npcid);
|
||||
return;
|
||||
}
|
||||
@ -2177,10 +2177,10 @@ void saacproto_ACUniChatroom_recv( int fd, char *cdkey, char *data, int userinde
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef _RECAL_BACKUP_PLAYER // WON 回溯功能
|
||||
#ifdef _RECAL_BACKUP_PLAYER // WON 回溯功能
|
||||
|
||||
|
||||
// 取有备份的日期
|
||||
// 取有备份的日期
|
||||
void get_backup_date(int fd, char *uid, int userfdid, int GmCliId, char *id, int char_num, int date)
|
||||
{
|
||||
int filenum=-1, i;
|
||||
@ -2198,7 +2198,7 @@ void get_backup_date(int fd, char *uid, int userfdid, int GmCliId, char *id, int
|
||||
|
||||
memset(char_data, 0, sizeof(char_data));
|
||||
|
||||
// 找出符合帐号的备份日期
|
||||
// 找出符合帐号的备份日期
|
||||
for( i = 0 ; i < filenum ; i ++ ){
|
||||
if(strcmp(filenames[i].string, "") != 0 ){
|
||||
char temp[64];
|
||||
@ -2218,7 +2218,7 @@ void get_backup_date(int fd, char *uid, int userfdid, int GmCliId, char *id, int
|
||||
|
||||
}
|
||||
|
||||
// 取得线上人物资料
|
||||
// 取得线上人物资料
|
||||
void get_online_player_data(int fd, char *uid, int userfdid, int GmCliId, char *id, int char_num, int date)
|
||||
{
|
||||
FILE *fp;
|
||||
@ -2234,7 +2234,7 @@ void get_online_player_data(int fd, char *uid, int userfdid, int GmCliId, char *
|
||||
|
||||
if( !(fp=fopen(filename, "r")) ){
|
||||
log("\n open (%s) file err", filename );
|
||||
strcpy(char_data, "无此帐号人物资料");
|
||||
strcpy(char_data, "无此帐号人物资料");
|
||||
saacproto_ACRecalPlayer_send(fd, uid, userfdid, GmCliId, id, char_num, date, char_data, 2);
|
||||
return;
|
||||
}
|
||||
@ -2252,12 +2252,12 @@ void get_online_player_data(int fd, char *uid, int userfdid, int GmCliId, char *
|
||||
|
||||
if( char_data[0]=='|' && char_data[1]=='|' ){
|
||||
log("\n open (%s) file err", filename );
|
||||
strcpy(char_data, "此帐号人物资料异常");
|
||||
strcpy(char_data, "此帐号人物资料异常");
|
||||
saacproto_ACRecalPlayer_send(fd, uid, userfdid, GmCliId, id, char_num, date, char_data, 2);
|
||||
return;
|
||||
}
|
||||
|
||||
// 分析人物资料,取出所需的人物资料
|
||||
// 分析人物资料,取出所需的人物资料
|
||||
analysis_char(char_data);
|
||||
|
||||
saacproto_ACRecalPlayer_send(fd, uid, userfdid, GmCliId, id, char_num, date, char_data, 2);
|
||||
@ -2307,7 +2307,7 @@ void send_backup_player_data()
|
||||
date=atoi(temp[7]);
|
||||
|
||||
if( (strcmp(uid,"")==0)||(userfdid==-1)||(GmCliId==-1)||(strcmp(id,"")==0)||(char_num==-1)||(date==-1) ) {
|
||||
strcpy(char_data, "无此帐号人物资料1");
|
||||
strcpy(char_data, "无此帐号人物资料1");
|
||||
saacproto_ACRecalPlayer_send(fd, uid, userfdid, GmCliId, id, char_num, date, char_data, 3);
|
||||
return;
|
||||
}
|
||||
@ -2316,7 +2316,7 @@ void send_backup_player_data()
|
||||
|
||||
if( !(fp=fopen(filename, "r")) ){
|
||||
log("\n open (%s) file err", filename );
|
||||
strcpy(char_data, "无此帐号人物资料2");
|
||||
strcpy(char_data, "无此帐号人物资料2");
|
||||
saacproto_ACRecalPlayer_send(fd, uid, userfdid, GmCliId, id, char_num, date, char_data, 3);
|
||||
return;
|
||||
}
|
||||
@ -2335,7 +2335,7 @@ void send_backup_player_data()
|
||||
|
||||
if( char_data[0]=='|' && char_data[1]=='|' ){
|
||||
log("\n open (%s) file err", filename );
|
||||
strcpy(char_data, "此帐号人物资料异常");
|
||||
strcpy(char_data, "此帐号人物资料异常");
|
||||
saacproto_ACRecalPlayer_send(fd, uid, userfdid, GmCliId, id, char_num, date, char_data, 3);
|
||||
return;
|
||||
}
|
||||
@ -2440,47 +2440,47 @@ void analysis_char(char *char_data)
|
||||
strcpy(char_data, "");
|
||||
|
||||
// player name
|
||||
strcpy(char_data,"名称:");
|
||||
strcpy(char_data,"名称:");
|
||||
strcat(char_data, player_data.name);
|
||||
|
||||
// player information
|
||||
strcat(char_data,"转生:");
|
||||
strcat(char_data,"转生:");
|
||||
strcat(char_data, player_data.trn);
|
||||
strcat(char_data,"等级:");
|
||||
strcat(char_data,"等级:");
|
||||
strcat(char_data, player_data.lv);
|
||||
strcat(char_data,"经验值:");
|
||||
strcat(char_data,"经验值:");
|
||||
strcat(char_data, player_data.exp);
|
||||
strcat(char_data,"HP:");
|
||||
strcat(char_data,"HP:");
|
||||
strcat(char_data, player_data.hp);
|
||||
strcat(char_data,"MP:");
|
||||
strcat(char_data,"MP:");
|
||||
strcat(char_data, player_data.mp);
|
||||
strcat(char_data,"体:");
|
||||
strcat(char_data,"体:");
|
||||
strcat(char_data, player_data.vi);
|
||||
strcat(char_data,"攻:");
|
||||
strcat(char_data,"攻:");
|
||||
strcat(char_data, player_data.str);
|
||||
strcat(char_data,"防:");
|
||||
strcat(char_data,"防:");
|
||||
strcat(char_data, player_data.tou);
|
||||
strcat(char_data,"敏:");
|
||||
strcat(char_data,"敏:");
|
||||
strcat(char_data, player_data.dex);
|
||||
strcat(char_data,"金钱:");
|
||||
strcat(char_data,"金钱:");
|
||||
strcat(char_data, player_data.gold);
|
||||
strcat(char_data,"银行存款:");
|
||||
strcat(char_data,"银行存款:");
|
||||
strcat(char_data, player_data.bankgld);
|
||||
strcat(char_data,"伊甸个人存款:");
|
||||
strcat(char_data,"伊甸个人存款:");
|
||||
strcat(char_data, player_data.pgold);
|
||||
strcat(char_data,"家族编号:");
|
||||
strcat(char_data,"家族编号:");
|
||||
strcat(char_data, player_data.fmi);
|
||||
strcat(char_data,"家族名称:");
|
||||
strcat(char_data,"家族名称:");
|
||||
strcat(char_data, player_data.fmname);
|
||||
strcat(char_data,"族长旗标:");
|
||||
strcat(char_data,"族长旗标:");
|
||||
strcat(char_data, player_data.fmlf);
|
||||
strcat(char_data,"声望:");
|
||||
strcat(char_data,"声望:");
|
||||
strcat(char_data, player_data.fame);
|
||||
strcat(char_data,"图层:");
|
||||
strcat(char_data,"图层:");
|
||||
strcat(char_data, player_data.fl);
|
||||
strcat(char_data,"X:");
|
||||
strcat(char_data,"X:");
|
||||
strcat(char_data, player_data.x);
|
||||
strcat(char_data,"Y:");
|
||||
strcat(char_data,"Y:");
|
||||
strcat(char_data, player_data.y);
|
||||
|
||||
strcat(char_data, "|");
|
||||
@ -2612,7 +2612,7 @@ void _won_get_2(char *char_data, char *fun, char *check)
|
||||
|
||||
#endif // end RECAL_ASK_PLAYER
|
||||
|
||||
#ifdef _ALLDOMAN // Syu ADD 排行榜NPC
|
||||
#ifdef _ALLDOMAN // Syu ADD 排行榜NPC
|
||||
void LOAD_herolist()
|
||||
{
|
||||
FILE *fdb;
|
||||
@ -2901,14 +2901,14 @@ int UNlockM_UnlockPlayer( void)
|
||||
if( !UNlockM[i].use ) continue;
|
||||
if( UNlockM[i].time >= time(NULL) ) continue;
|
||||
if( isLocked( UNlockM[i].PlayerId ) ){
|
||||
log( "等待解锁玩家: %s 还需锁定!!\n", UNlockM[i].PlayerId);
|
||||
log( "等待解锁玩家: %s 还需锁定!!\n", UNlockM[i].PlayerId);
|
||||
}else{
|
||||
log( "等待解锁玩家: %s 已经解锁!!\n", UNlockM[i].PlayerId);
|
||||
log( "等待解锁玩家: %s 已经解锁!!\n", UNlockM[i].PlayerId);
|
||||
}
|
||||
reset_UNlockMPlayer( i);
|
||||
nums++;
|
||||
}
|
||||
log( "等待解锁玩家: 总计 %d 个用户解锁 !!\n", nums);
|
||||
log( "等待解锁玩家: 总计 %d 个用户解锁 !!\n", nums);
|
||||
return nums;
|
||||
}
|
||||
|
||||
@ -3072,7 +3072,7 @@ void saacproto_ACMissionTable_recv( int fd, int num, int type, char *data, char*
|
||||
void saacproto_ACCheckCharacterOnLine_recv( int fd, int charaindex, char *id, char *name, int flag)
|
||||
{
|
||||
LockNode *ln = userlock[getHash(id) & 0xff];
|
||||
// 须要确认名字
|
||||
// 须要确认名字
|
||||
if(name != NULL){
|
||||
while(ln != NULL){
|
||||
if(ln->use != 0){
|
||||
@ -3083,10 +3083,10 @@ void saacproto_ACCheckCharacterOnLine_recv( int fd, int charaindex, char *id, ch
|
||||
}
|
||||
ln = ln->next;
|
||||
}
|
||||
// 玩家不在线上
|
||||
// 玩家不在线上
|
||||
saacproto_ACCheckCharacterOnLine_send(fd,charaindex,0,"",flag);
|
||||
}
|
||||
// 不须要确认名字
|
||||
// 不须要确认名字
|
||||
else{
|
||||
while(ln != NULL){
|
||||
if(ln->use != 0){
|
||||
@ -3097,24 +3097,24 @@ void saacproto_ACCheckCharacterOnLine_recv( int fd, int charaindex, char *id, ch
|
||||
}
|
||||
ln = ln->next;
|
||||
}
|
||||
// 玩家不在线上
|
||||
// 玩家不在线上
|
||||
saacproto_ACCheckCharacterOnLine_send(fd,charaindex,0,"",flag);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef _RACEMAN
|
||||
//racetype 0:登记 9:删除 1~5:读资料 11~55:读资料
|
||||
//racetype 0:登记 9:删除 1~5:读资料 11~55:读资料
|
||||
void saacproto_ACRaceRecordandSort_recv( int fd, int charaindex, char *code , char *id, char *name , int racetype, int catchcnt, int ranknum )
|
||||
{
|
||||
//比较目前的排行 如果可以进入排行榜则写入 并且回传目前的排行榜
|
||||
//比较目前的排行 如果可以进入排行榜则写入 并且回传目前的排行榜
|
||||
FILE *fp;
|
||||
char rankfile[64];
|
||||
char allfile[64];
|
||||
char line[512];
|
||||
int i,j,findflag = 0;
|
||||
char buf[64];
|
||||
char data[4096]; //看server要多少笔就塞多少资料
|
||||
char data[4096]; //看server要多少笔就塞多少资料
|
||||
|
||||
//time_t endtime = (time_t)limittime;
|
||||
//struct tm *limit;
|
||||
@ -3162,7 +3162,7 @@ void saacproto_ACRaceRecordandSort_recv( int fd, int charaindex, char *code , ch
|
||||
fprintf(fp,"%s|%s|%d|\n",id,name,catchcnt);
|
||||
fclose(fp);
|
||||
}
|
||||
//处理排名
|
||||
//处理排名
|
||||
fp = fopen( rankfile, "w");
|
||||
if( fp == NULL ){
|
||||
log("create file:%s error !!\n", rankfile);
|
||||
@ -3171,7 +3171,7 @@ void saacproto_ACRaceRecordandSort_recv( int fd, int charaindex, char *code , ch
|
||||
for(i=0; i < DEFMAXRANK ;i++)
|
||||
{
|
||||
|
||||
if( catchcnt > ranktable[i].catchcnt){ //只有大於才能把人家挤掉
|
||||
if( catchcnt > ranktable[i].catchcnt){ //只有大於才能把人家挤掉
|
||||
for( j=DEFMAXRANK ; j>i+1 ; j-- )
|
||||
{
|
||||
strcpy(ranktable[j-1].id , ranktable[j-2].id);
|
||||
@ -3192,7 +3192,7 @@ void saacproto_ACRaceRecordandSort_recv( int fd, int charaindex, char *code , ch
|
||||
}
|
||||
fclose(fp);
|
||||
|
||||
}else if(racetype == 9){ //清除某笔资料
|
||||
}else if(racetype == 9){ //清除某笔资料
|
||||
|
||||
fp = fopen( rankfile, "w");
|
||||
if( fp == NULL ){
|
||||
@ -3209,7 +3209,7 @@ void saacproto_ACRaceRecordandSort_recv( int fd, int charaindex, char *code , ch
|
||||
}
|
||||
fclose(fp);
|
||||
|
||||
}else{ //server要资料而已
|
||||
}else{ //server要资料而已
|
||||
for(i=0;i<ranknum;i++)
|
||||
{
|
||||
buf[0]='\0';
|
||||
@ -3219,7 +3219,7 @@ void saacproto_ACRaceRecordandSort_recv( int fd, int charaindex, char *code , ch
|
||||
}
|
||||
}
|
||||
|
||||
//最後再送给server
|
||||
//最後再送给server
|
||||
saacproto_ACRaceRecordandSort_send( fd, charaindex , racetype , data );
|
||||
}
|
||||
|
||||
|
@ -1,32 +1,32 @@
|
||||
#ifndef _RECV_H_
|
||||
#define _RECV_H_
|
||||
|
||||
#ifdef _CK_ONLINE_PLAYER_COUNT // WON ADD 计算线上人数
|
||||
#ifdef _CK_ONLINE_PLAYER_COUNT // WON ADD 计算线上人数
|
||||
void PlayerCount(void);
|
||||
#endif
|
||||
|
||||
#ifdef _SEND_EFFECT // WON ADD 送下雪、下雨等特效
|
||||
#ifdef _SEND_EFFECT // WON ADD 送下雪、下雨等特效
|
||||
void SendEffect(char *ffect);
|
||||
#endif
|
||||
|
||||
#ifdef _BAD_PLAYER // WON ADD 送坏玩家去关
|
||||
#ifdef _BAD_PLAYER // WON ADD 送坏玩家去关
|
||||
void BadPlayer(void);
|
||||
char BadPlayerList[500][20];
|
||||
int MAX_BAD_PLAYER;
|
||||
#endif
|
||||
|
||||
#ifdef _WORKER_AUTO_LOGOUT // WON ADD GS断线自动送LOGOUT给WORKER
|
||||
#ifdef _WORKER_AUTO_LOGOUT // WON ADD GS断线自动送LOGOUT给WORKER
|
||||
void Worker_send_logout( int ti ,char* id );
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef _AC_SEND_FM_PK // WON ADD 庄园对战列表储存在AC
|
||||
#ifdef _AC_SEND_FM_PK // WON ADD 庄园对战列表储存在AC
|
||||
void load_fm_pk_list(void);
|
||||
void save_fm_pk_list(void);
|
||||
char fm_pk_list[9][255];
|
||||
#endif
|
||||
|
||||
#ifdef _ALLDOMAN // Syu ADD 排行榜NPC
|
||||
#ifdef _ALLDOMAN // Syu ADD 排行榜NPC
|
||||
void LOAD_herolist();
|
||||
void SAVE_herolist(int);
|
||||
void Send_A_herolist(int);
|
||||
@ -52,7 +52,7 @@ char Herolist[MAX_HERO_LIST][MAX_HERO_COLUMN][72];
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef _RECAL_BACKUP_PLAYER // WON 回溯功能
|
||||
#ifdef _RECAL_BACKUP_PLAYER // WON 回溯功能
|
||||
|
||||
struct PLAYER_DATA {
|
||||
char name[20];
|
||||
@ -130,12 +130,12 @@ int UNlockM_UnlockPlayer( void);
|
||||
int UNlockM_Init( void);
|
||||
|
||||
|
||||
#ifdef _GM_BROADCAST // WON ADD 客服公告系统
|
||||
#ifdef _GM_BROADCAST // WON ADD 客服公告系统
|
||||
void broadcast( char *msg );
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef _DEATH_FAMILY_GM_COMMAND // WON ADD 家族战GM指令
|
||||
#ifdef _DEATH_FAMILY_GM_COMMAND // WON ADD 家族战GM指令
|
||||
void saacproto_ACShowMemberList_2_recv( int fd, int charindex, int fm1, int fm2, int time, int id );
|
||||
#endif
|
||||
|
||||
|
@ -146,7 +146,7 @@ BOOL TcpIp_LS_accept()
|
||||
Ls.errs = 1;
|
||||
Ls.data[LS_LASTERROR] = LSMESS_READERROR;
|
||||
} else {
|
||||
Add_LS_WRMemBuffer( tmpbuf , rr, MEMREAD); //增加讯息
|
||||
Add_LS_WRMemBuffer( tmpbuf , rr, MEMREAD); //增加讯息
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -684,7 +684,7 @@ void saacproto_SAUCheck_send( char *Pcdkey, int flg)
|
||||
}
|
||||
}
|
||||
|
||||
void DefTimeC( char *buf, int flg)// 1 比较 2 秀时间 0 替换
|
||||
void DefTimeC( char *buf, int flg)// 1 比较 2 秀时间 0 替换
|
||||
{
|
||||
static long int dTimes = 0;
|
||||
time_t defLsTime;
|
||||
|
@ -76,7 +76,7 @@ int OAC_ConnectOacOne( int ti)
|
||||
}
|
||||
log( "connect OAC:%s", OAC_List[ti].addr);
|
||||
OAC_List[ti].fd = tfd;
|
||||
OAC_ACLogin_send( tfd, "测试机");
|
||||
OAC_ACLogin_send( tfd, "测试机");
|
||||
return tfd;
|
||||
}
|
||||
|
||||
@ -220,7 +220,7 @@ void OAC_ACLogin_send( int fd, char* data )
|
||||
OAC_Send( fd , saacproto.work );
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void OAC_ACCharLoad_recv( int fd, char *id, char *charname, int optti, int clifd, int gsfd)//要求
|
||||
void OAC_ACCharLoad_recv( int fd, char *id, char *charname, int optti, int clifd, int gsfd)//要求
|
||||
{
|
||||
int charindex;
|
||||
char loadbuf[CHARDATASIZE];
|
||||
|
@ -11,11 +11,11 @@
|
||||
#include "saacproto_serv.h"
|
||||
#include "main.h"
|
||||
|
||||
#ifdef _RECAL_BACKUP_PLAYER // WON 回溯功能
|
||||
#ifdef _RECAL_BACKUP_PLAYER // WON 回溯功能
|
||||
#include "recv.h"
|
||||
#endif
|
||||
|
||||
#ifdef _DEATH_FAMILY_GM_COMMAND // WON ADD 家族战GM指令
|
||||
#ifdef _DEATH_FAMILY_GM_COMMAND // WON ADD 家族战GM指令
|
||||
#include "acfamily.h"
|
||||
#endif
|
||||
|
||||
@ -174,8 +174,8 @@ int saacproto_ServerDispatchMessage( int fd , char *encoded, char *debugfun)
|
||||
|
||||
#ifdef _WAEI_KICK
|
||||
if( strcmp( funcname , "ACKick" ) == 0 ){
|
||||
char* id; //欲踢的帐号
|
||||
int flg; //事件flg
|
||||
char* id; //欲踢的帐号
|
||||
int flg; //事件flg
|
||||
int clifd; //GM
|
||||
id = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] ));
|
||||
clifd = saacproto_demkstr_int( saacproto.token_list[3] );
|
||||
@ -187,7 +187,7 @@ int saacproto_ServerDispatchMessage( int fd , char *encoded, char *debugfun)
|
||||
|
||||
#ifdef _NEW_PLAYERGOLD
|
||||
if( strcmp( funcname , "LoadNEWPlayer" ) == 0 ){
|
||||
char* filename; //欲踢的帐号
|
||||
char* filename; //欲踢的帐号
|
||||
int charaindex;
|
||||
charaindex = saacproto_demkstr_int( saacproto.token_list[2] );
|
||||
filename = saacproto_wrapStringAddr( saacproto_stringwrapper[2] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[3] ));
|
||||
@ -221,7 +221,7 @@ int saacproto_ServerDispatchMessage( int fd , char *encoded, char *debugfun)
|
||||
return 0;
|
||||
}
|
||||
if( strcmp( funcname , "PKLISTCHARTS" ) == 0 ){
|
||||
int type, flg; //要求资讯
|
||||
int type, flg; //要求资讯
|
||||
type = saacproto_demkstr_int( saacproto.token_list[2] );
|
||||
flg = saacproto_demkstr_int( saacproto.token_list[3] );
|
||||
|
||||
@ -327,7 +327,7 @@ int saacproto_ServerDispatchMessage( int fd , char *encoded, char *debugfun)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef _ALLDOMAN // Syu ADD 排行榜NPC
|
||||
#ifdef _ALLDOMAN // Syu ADD 排行榜NPC
|
||||
if ( strcmp( funcname , "UpdataStele" ) == 0 ) {
|
||||
char *cdkey;
|
||||
char *name;
|
||||
@ -456,7 +456,7 @@ int saacproto_ServerDispatchMessage( int fd , char *encoded, char *debugfun)
|
||||
saacproto_MessageFlush_recv( fd,id,charname);
|
||||
return 0;
|
||||
}
|
||||
// 成立家族
|
||||
// 成立家族
|
||||
if ( strcmp( funcname, "ACAddFM") == 0){
|
||||
int fmleaderlv, fmsprite, charfdid, fmleadergrano;
|
||||
char *fmname, *fmleadername, *fmleaderid, *petname, *petattr, *fmrule;
|
||||
@ -486,9 +486,9 @@ int saacproto_ServerDispatchMessage( int fd , char *encoded, char *debugfun)
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
// 加入家族
|
||||
// 加入家族
|
||||
if ( strcmp( funcname, "ACJoinFM") == 0){
|
||||
#ifdef _PERSONAL_FAME // Arminius: 家族个人声望
|
||||
#ifdef _PERSONAL_FAME // Arminius: 家族个人声望
|
||||
int fmindex, charlv, charfdid, index, fame;
|
||||
#else
|
||||
int fmindex, charlv, charfdid, index;
|
||||
@ -500,7 +500,7 @@ int saacproto_ServerDispatchMessage( int fd , char *encoded, char *debugfun)
|
||||
charid = saacproto_wrapStringAddr(saacproto_stringwrapper[4], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[5]));
|
||||
charlv = saacproto_demkstr_int(saacproto.token_list[6]);
|
||||
index = saacproto_demkstr_int(saacproto.token_list[7]);
|
||||
#ifdef _PERSONAL_FAME // Arminius: 家族个人声望
|
||||
#ifdef _PERSONAL_FAME // Arminius: 家族个人声望
|
||||
fame = saacproto_demkstr_int(saacproto.token_list[8]);
|
||||
charfdid = saacproto_demkstr_int(saacproto.token_list[9]);
|
||||
saacproto_ACJoinFM_recv(fd, fmname, fmindex, charname,
|
||||
@ -512,7 +512,7 @@ int saacproto_ServerDispatchMessage( int fd , char *encoded, char *debugfun)
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
// 退出家族
|
||||
// 退出家族
|
||||
if ( strcmp( funcname, "ACLeaveFM") == 0){
|
||||
int fmindex, charfdid, index;
|
||||
char *fmname, *charname, *charid;
|
||||
@ -526,7 +526,7 @@ int saacproto_ServerDispatchMessage( int fd , char *encoded, char *debugfun)
|
||||
charid, index, charfdid);
|
||||
return 0;
|
||||
}
|
||||
// 解散家族
|
||||
// 解散家族
|
||||
#ifdef _LEADERFUNCHECK
|
||||
if ( strcmp( funcname, "ACDelFM") == 0){
|
||||
int fmindex, charfdid, index;
|
||||
@ -552,12 +552,12 @@ int saacproto_ServerDispatchMessage( int fd , char *encoded, char *debugfun)
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
// 列出家族列表
|
||||
// 列出家族列表
|
||||
if ( strcmp( funcname, "ACShowFMList") == 0){
|
||||
saacproto_ACShowFMList_recv(fd);
|
||||
return 0;
|
||||
}
|
||||
// 列出成员列表
|
||||
// 列出成员列表
|
||||
if ( strcmp( funcname, "ACShowMemberList") == 0){
|
||||
int index;
|
||||
char *tmpbuf;
|
||||
@ -566,7 +566,7 @@ int saacproto_ServerDispatchMessage( int fd , char *encoded, char *debugfun)
|
||||
saacproto_ACShowMemberList_recv(fd, index);
|
||||
return 0;
|
||||
}
|
||||
// 列出家族详细资料
|
||||
// 列出家族详细资料
|
||||
if ( strcmp( funcname, "ACFMDetail") == 0){
|
||||
int fmindex, charfdid, index;
|
||||
char *fmname;
|
||||
@ -577,7 +577,7 @@ int saacproto_ServerDispatchMessage( int fd , char *encoded, char *debugfun)
|
||||
saacproto_ACFMDetail_recv(fd, fmname, fmindex, index, charfdid);
|
||||
return 0;
|
||||
}
|
||||
// 列出家族留言
|
||||
// 列出家族留言
|
||||
if (strcmp( funcname, "ACFMReadMemo") == 0){
|
||||
int index;
|
||||
char *tmpbuf;
|
||||
@ -586,7 +586,7 @@ int saacproto_ServerDispatchMessage( int fd , char *encoded, char *debugfun)
|
||||
saacproto_ACFMReadMemo_recv(fd, index);
|
||||
return 0;
|
||||
}
|
||||
// 写入家族留言
|
||||
// 写入家族留言
|
||||
if (strcmp( funcname, "ACFMWriteMemo") == 0){
|
||||
int index, fmindex;
|
||||
char *fmname, *data;
|
||||
@ -597,8 +597,8 @@ int saacproto_ServerDispatchMessage( int fd , char *encoded, char *debugfun)
|
||||
saacproto_ACFMWriteMemo_recv(fd, fmname, fmindex, data, index);
|
||||
return 0;
|
||||
}
|
||||
#ifdef _DEATH_FAMILY_GM_COMMAND // WON ADD 家族战GM指令
|
||||
// reload 家族资料
|
||||
#ifdef _DEATH_FAMILY_GM_COMMAND // WON ADD 家族战GM指令
|
||||
// reload 家族资料
|
||||
if ( strcmp( funcname, "ACRELOADFM") == 0){
|
||||
int charindex = -1;
|
||||
|
||||
@ -630,8 +630,8 @@ int saacproto_ServerDispatchMessage( int fd , char *encoded, char *debugfun)
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef _DEATH_FAMILY_LOGIN_CHECK // WON ADD 家族战登入检查
|
||||
// 玩家login2
|
||||
#ifdef _DEATH_FAMILY_LOGIN_CHECK // WON ADD 家族战登入检查
|
||||
// 玩家login2
|
||||
if ( strcmp( funcname, "ACFMCharLogin2") == 0){
|
||||
int charindex = -1;
|
||||
char *char_id, *char_name;
|
||||
@ -648,7 +648,7 @@ int saacproto_ServerDispatchMessage( int fd , char *encoded, char *debugfun)
|
||||
}
|
||||
#endif
|
||||
|
||||
// 玩家login
|
||||
// 玩家login
|
||||
if ( strcmp( funcname, "ACFMCharLogin") == 0){
|
||||
int fmindex, charlv, charfdid;
|
||||
#ifdef _FM_MODIFY
|
||||
@ -679,7 +679,7 @@ int saacproto_ServerDispatchMessage( int fd , char *encoded, char *debugfun)
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
// 玩家logout
|
||||
// 玩家logout
|
||||
if ( strcmp( funcname, "ACFMCharLogout") == 0){
|
||||
int fmindex, charfdid, charlv, index;
|
||||
char *fmname, *charname, *charid;
|
||||
@ -694,7 +694,7 @@ int saacproto_ServerDispatchMessage( int fd , char *encoded, char *debugfun)
|
||||
charid, charlv, index, charfdid);
|
||||
return 0;
|
||||
}
|
||||
// 族长审核成员加入家族、修改家族成员职位
|
||||
// 族长审核成员加入家族、修改家族成员职位
|
||||
if (strcmp( funcname, "ACMemberJoinFM") == 0){
|
||||
int fmindex, charfdid, index, charindex, result;
|
||||
char *fmname, *charname;
|
||||
@ -719,7 +719,7 @@ int saacproto_ServerDispatchMessage( int fd , char *encoded, char *debugfun)
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
// 族长审核成员离开家族
|
||||
// 族长审核成员离开家族
|
||||
if (strcmp( funcname, "ACMemberLeaveFM") == 0){
|
||||
int fmindex, charfdid, index, charindex;
|
||||
char *fmname, *charname;
|
||||
@ -743,14 +743,14 @@ int saacproto_ServerDispatchMessage( int fd , char *encoded, char *debugfun)
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
// 列出家族据点
|
||||
// 列出家族据点
|
||||
if ( strcmp( funcname, "ACFMPointList") == 0){
|
||||
saacproto_ACFMPointList_recv(fd);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
#ifdef _CK_ONLINE_PLAYER_COUNT // WON ADD 计算线上人数
|
||||
#ifdef _CK_ONLINE_PLAYER_COUNT // WON ADD 计算线上人数
|
||||
if ( strcmp( funcname, "ACGSPCOUNT") == 0){
|
||||
int playcount = 0;
|
||||
playcount = saacproto_demkstr_int(saacproto.token_list[2]);
|
||||
@ -759,7 +759,7 @@ int saacproto_ServerDispatchMessage( int fd , char *encoded, char *debugfun)
|
||||
}
|
||||
#endif
|
||||
|
||||
// 申请家族据点
|
||||
// 申请家族据点
|
||||
if (strcmp( funcname, "ACSetFMPoint") == 0){
|
||||
int fl, x, y, fmindex, index, fmpointindex, charfdid;
|
||||
char *fmname;
|
||||
@ -775,7 +775,7 @@ int saacproto_ServerDispatchMessage( int fd , char *encoded, char *debugfun)
|
||||
fmpointindex, fl, x, y, charfdid);
|
||||
return 0;
|
||||
}
|
||||
// 设定家族据点
|
||||
// 设定家族据点
|
||||
if (strcmp( funcname, "ACFixFMPoint") == 0){
|
||||
int winindex, winfmindex, loseindex, losefmindex, village;
|
||||
char *winfmname, *losefmname;
|
||||
@ -790,7 +790,7 @@ int saacproto_ServerDispatchMessage( int fd , char *encoded, char *debugfun)
|
||||
losefmname, losefmindex, loseindex, village);
|
||||
return 0;
|
||||
}
|
||||
// 族长对全员广播
|
||||
// 族长对全员广播
|
||||
if (strcmp( funcname, "ACFMAnnounce") == 0){
|
||||
int index, fmindex, color;
|
||||
char *fmname, *data;
|
||||
@ -802,7 +802,7 @@ int saacproto_ServerDispatchMessage( int fd , char *encoded, char *debugfun)
|
||||
saacproto_ACFMAnnounce_recv(fd, fmname, fmindex, index, data, color);
|
||||
return 0;
|
||||
}
|
||||
// 列出家族排行榜
|
||||
// 列出家族排行榜
|
||||
if ( strcmp( funcname, "ACShowTopFMList") == 0){
|
||||
int kindflag;
|
||||
char *tmpbuf;
|
||||
@ -811,7 +811,7 @@ int saacproto_ServerDispatchMessage( int fd , char *encoded, char *debugfun)
|
||||
saacproto_ACShowTopFMList_recv(fd, kindflag);
|
||||
return 0;
|
||||
}
|
||||
// 修正家族资料
|
||||
// 修正家族资料
|
||||
if (strcmp( funcname, "ACFixFMData") == 0){
|
||||
int fmindex, charfdid, index, kindflag, charindex;
|
||||
char *fmname, *data1, *data2;
|
||||
@ -841,7 +841,7 @@ int saacproto_ServerDispatchMessage( int fd , char *encoded, char *debugfun)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef _DEATH_FAMILY_STRUCT // WON ADD 家族战存放胜负资料
|
||||
#ifdef _DEATH_FAMILY_STRUCT // WON ADD 家族战存放胜负资料
|
||||
if (strcmp( funcname, "FMINITPKSTRUCT") == 0){
|
||||
log("\n won test 300 ==>" );
|
||||
set_fm_pk_score( "" );
|
||||
@ -864,7 +864,7 @@ int saacproto_ServerDispatchMessage( int fd , char *encoded, char *debugfun)
|
||||
#endif
|
||||
|
||||
|
||||
// 家族PK後修正声望
|
||||
// 家族PK後修正声望
|
||||
if (strcmp( funcname, "ACFixFMPK") == 0){
|
||||
int winindex, winfmindex, loseindex, losefmindex;
|
||||
char *winfmname, *losefmname;
|
||||
@ -878,7 +878,7 @@ int saacproto_ServerDispatchMessage( int fd , char *encoded, char *debugfun)
|
||||
losefmname, losefmindex, loseindex);
|
||||
return 0;
|
||||
}
|
||||
// GM修正家族资料
|
||||
// GM修正家族资料
|
||||
if (strcmp( funcname, "ACGMFixFMData") == 0){
|
||||
int index, charfdid;
|
||||
char *cmd, *data, *tmpbuf,*charid;
|
||||
@ -891,7 +891,7 @@ int saacproto_ServerDispatchMessage( int fd , char *encoded, char *debugfun)
|
||||
saacproto_ACGMFixFMData_recv(fd, index, charid, cmd, data, charfdid);
|
||||
return 0;
|
||||
}
|
||||
// 取得家族资料
|
||||
// 取得家族资料
|
||||
if (strcmp( funcname, "ACGetFMData") == 0){
|
||||
int fmindex, charfdid, index, kindflag;
|
||||
char *fmname;
|
||||
@ -904,7 +904,7 @@ int saacproto_ServerDispatchMessage( int fd , char *encoded, char *debugfun)
|
||||
charfdid);
|
||||
return 0;
|
||||
}
|
||||
// 广播踢馆人的资料
|
||||
// 广播踢馆人的资料
|
||||
if (strcmp( funcname,"ACManorPKAck") == 0){
|
||||
char *data;
|
||||
data = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2]));
|
||||
@ -912,7 +912,7 @@ int saacproto_ServerDispatchMessage( int fd , char *encoded, char *debugfun)
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef _CHECKFMSCHEDULE // Syu ADD 透过AC确认家族挑战排程
|
||||
#ifdef _CHECKFMSCHEDULE // Syu ADD 透过AC确认家族挑战排程
|
||||
if (strcmp( funcname,"ACCheckSchedule") ==0)
|
||||
{
|
||||
char *data;
|
||||
@ -964,7 +964,7 @@ int saacproto_ServerDispatchMessage( int fd , char *encoded, char *debugfun)
|
||||
|
||||
|
||||
|
||||
#ifdef _RECAL_BACKUP_PLAYER // WON 回溯功能
|
||||
#ifdef _RECAL_BACKUP_PLAYER // WON 回溯功能
|
||||
|
||||
if (strcmp( funcname,"ACSendRecalPlayer") ==0)
|
||||
{
|
||||
@ -1190,8 +1190,8 @@ int saacproto_ServerDispatchMessage( int fd , char *encoded, char *debugfun)
|
||||
id = saacproto_wrapStringAddr( saacproto_stringwrapper[3] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[4] ));
|
||||
name = saacproto_wrapStringAddr( saacproto_stringwrapper[4] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[5] ));
|
||||
racetype = saacproto_demkstr_int( saacproto.token_list[6] );
|
||||
catchcnt = saacproto_demkstr_int( saacproto.token_list[7] ); //玩家目前抓多少只
|
||||
ranknum = saacproto_demkstr_int( saacproto.token_list[8] ); //server要排名到几个
|
||||
catchcnt = saacproto_demkstr_int( saacproto.token_list[7] ); //玩家目前抓多少只
|
||||
ranknum = saacproto_demkstr_int( saacproto.token_list[8] ); //server要排名到几个
|
||||
|
||||
saacproto_ACRaceRecordandSort_recv( fd , charaindex , code , id , name , racetype , catchcnt ,ranknum );
|
||||
return 0;
|
||||
@ -1245,7 +1245,7 @@ void saacproto_ACCharLoad_send( int fd,char* result,char* data,int id )
|
||||
if( strstr( result, "successful") != NULL && strlen( data) > CharDataLens ){
|
||||
CharDataLens = strlen( data);
|
||||
//andy_log
|
||||
log("最大数据长度:%d\n", CharDataLens );
|
||||
log("最大数据长度:%d\n", CharDataLens );
|
||||
}
|
||||
|
||||
saacproto_CreateHeader( saacproto.work , "ACCharLoad" );
|
||||
@ -1274,15 +1274,15 @@ void saacproto_ACCharLoadII_send( int fd,char* result,char* data,int id,int char
|
||||
|
||||
/*
|
||||
214 : <li><a name="ACCharSaveS"><font color=blue>servertoclient ACCharSave( string result , string data,int id);<br></font></a>
|
||||
215 : ACCharSave卞覆允月忒蚕[
|
||||
215 : ACCharSave卞覆允月忒蚕[
|
||||
216 : <br><br>
|
||||
217 : <dl>
|
||||
218 : <dt> string result
|
||||
219 : <dd>"successful" , "failed" 及中勿木井[
|
||||
219 : <dd>"successful" , "failed" 及中勿木井[
|
||||
220 : <dt> string data
|
||||
221 : <dd>"failed"及凛反 毛憎允谛棉及苇化坌月 侬 匹丐月[
|
||||
221 : <dd>"failed"及凛反 毛憎允谛棉及苇化坌月 侬 匹丐月[
|
||||
222 : <dt> int id
|
||||
223 : <dd> 娄醒及id毛公及引引戊疋□仄化忒允
|
||||
223 : <dd> 娄醒及id毛公及引引戊疋□仄化忒允
|
||||
224 : </dl>
|
||||
225 : <br>
|
||||
226 : <br>
|
||||
@ -1316,15 +1316,15 @@ void saacproto_ACCharSaveII_send( int fd,char* result,char* data,int id,int gs1,
|
||||
|
||||
/*
|
||||
256 : <li><a name="ACCharDeleteS"><font color=blue>servertoclient ACCharDelete(string result, string data,int id);<br></font></a>
|
||||
257 : ACCharDelete卞覆允月忒蚕[
|
||||
257 : ACCharDelete卞覆允月忒蚕[
|
||||
258 : <br><br>
|
||||
259 : <dl>
|
||||
260 : <dt> string result
|
||||
261 : <dd>"successful" , "failed" 及中勿木井[
|
||||
261 : <dd>"successful" , "failed" 及中勿木井[
|
||||
262 : <dt> string data
|
||||
263 : <dd>"failed"及凛反 毛憎允谛棉及苇化坌月 侬 匹丐月[
|
||||
263 : <dd>"failed"及凛反 毛憎允谛棉及苇化坌月 侬 匹丐月[
|
||||
264 : <dt> int id
|
||||
265 : <dd> 娄醒及id及公及引引及戊疋□
|
||||
265 : <dd> 娄醒及id及公及引引及戊疋□
|
||||
266 :
|
||||
267 : </dl>
|
||||
268 : <br>
|
||||
@ -1342,15 +1342,15 @@ void saacproto_ACCharDelete_send( int fd,char* result,char* data,int id )
|
||||
}
|
||||
/*
|
||||
290 : <LI> <a name="ACLockS"><font color=blue>servertoclient ACLock( string result, string data ,int id);<br></font></a>
|
||||
291 : ACLock卞覆允月忒蚕[
|
||||
291 : ACLock卞覆允月忒蚕[
|
||||
292 : <br><br>
|
||||
293 : <dl>
|
||||
294 : <dt>string result
|
||||
295 : <dd>"successful" , "failed" 及中勿木井[
|
||||
295 : <dd>"successful" , "failed" 及中勿木井[
|
||||
296 : <dt>string data
|
||||
297 : <dd>"failed"及凛反 毛憎允谛棉及苇化坌月 侬 匹丐月[
|
||||
297 : <dd>"failed"及凛反 毛憎允谛棉及苇化坌月 侬 匹丐月[
|
||||
298 : <dt>int id
|
||||
299 : <dd>娄醒及id及公及引引戊疋□
|
||||
299 : <dd>娄醒及id及公及引引戊疋□
|
||||
300 : </dl>
|
||||
301 : <br>
|
||||
302 : <br>
|
||||
@ -1367,12 +1367,12 @@ void saacproto_ACLock_send( int fd,char* result,char* data,int id )
|
||||
}
|
||||
/*
|
||||
318 : <LI><a name="ACUCheckS"><font color=blue>servertoclient ACUCheck( string mem_id );</font></a><BR>
|
||||
319 : 失市它件玄扔□田□井日必□丞扔□田□卞覆仄化}丐月交□扒□互蜇箕夫弘奶件
|
||||
320 : 仄化中月井升丹井毛民尼永弁允月[
|
||||
319 : 失市它件玄扔□田□井日必□丞扔□田□卞覆仄化}丐月交□扒□互蜇箕夫弘奶件
|
||||
320 : 仄化中月井升丹井毛民尼永弁允月[
|
||||
321 : <BR><BR>
|
||||
322 : <dl>
|
||||
323 : <dt>string mem_id
|
||||
324 : <dd>譬屯月覆擂及交□扒□及gamersDream member id
|
||||
324 : <dd>譬屯月覆擂及交□扒□及gamersDream member id
|
||||
325 : </dl>
|
||||
326 : <BR><BR>
|
||||
327 :
|
||||
@ -1387,10 +1387,10 @@ void saacproto_ACUCheck_send( int fd,char* mem_id )
|
||||
}
|
||||
/*
|
||||
344 : <LI><a name="DBUpdateEntryStringS"><font color=blue>servertoclient DBUpdateEntryString( string result, string table, string key, int msgid, int msgid2 );</font></a><BR>
|
||||
345 : 晓及戊穴件玉及瑛绊[撩 仄化手荚汊尕第 卅及匹 骰仄化方中冗
|
||||
345 : 晓及戊穴件玉及瑛绊[撩 仄化手荚汊尕第 卅及匹 骰仄化方中冗
|
||||
346 : <dl>
|
||||
347 : <dt>string result
|
||||
348 : <dD>successful 井failed
|
||||
348 : <dD>successful 井failed
|
||||
349 : <dt>string table
|
||||
350 : <dD>
|
||||
351 : <dt>int msgid
|
||||
@ -1413,7 +1413,7 @@ void saacproto_DBUpdateEntryString_send( int fd,char* result,char* table,char* k
|
||||
}
|
||||
/*
|
||||
369 : <LI><a name="DBDeleteEntryStringS"><font color=blue>servertoclient DBDeleteEntryString( string result, string table, string key , int msgid , int msgid2 );</font></a><BR>
|
||||
370 : 侬 巨件玄伉及绰轮及瑛绊
|
||||
370 : 侬 巨件玄伉及绰轮及瑛绊
|
||||
371 : <dl>
|
||||
372 : <dt>string result
|
||||
373 : <dd>successful / failed
|
||||
@ -1441,12 +1441,12 @@ void saacproto_DBDeleteEntryString_send( int fd,char* result,char* table,char* k
|
||||
}
|
||||
/*
|
||||
396 : <Li><a name="DBGetEntryStringS"><font color=blue>servertoclient DBGetEntryString( string result, string value, string table, string key, int msgid, int msgid2 );</font></a><BR>
|
||||
397 : 潸曰分仄及忒曰袄
|
||||
397 : 潸曰分仄及忒曰袄
|
||||
398 : <dl>
|
||||
399 : <dt>string result
|
||||
400 : <dd>successful / failed
|
||||
401 : <dt>string value
|
||||
402 : <dd>袄
|
||||
402 : <dd>袄
|
||||
403 : <dt>string table
|
||||
404 : <dd>
|
||||
405 : <dt>string key
|
||||
@ -1472,21 +1472,21 @@ void saacproto_DBGetEntryString_send( int fd,char* result,char* value,char* tabl
|
||||
}
|
||||
/*
|
||||
435 : <LI><a name="DBUpdateEntryIntS"><font color=blue>servertoclient DBUpdateEntryInt( string result , string table, string key, int msgid, int msgid2 );</font></a><BR>
|
||||
436 : DBUpdateEntry及瑛绊[
|
||||
436 : DBUpdateEntry及瑛绊[
|
||||
437 : <dl>
|
||||
438 : <dt>string result
|
||||
439 : <dd>succesful/failed
|
||||
440 : <dt>string table
|
||||
441 : <dd> □皮伙 毛公及引引井尹允
|
||||
441 : <dd> □皮伙 毛公及引引井尹允
|
||||
442 : <dt>string key
|
||||
443 : <dd>平□毛公及引引井尹允
|
||||
443 : <dd>平□毛公及引引井尹允
|
||||
444 : <dt>int msgid, int msgid2
|
||||
445 : <dd>msgid 毛公及引引忒允[
|
||||
445 : <dd>msgid 毛公及引引忒允[
|
||||
446 : </dl>
|
||||
447 : <BR><BR>
|
||||
448 :
|
||||
*/
|
||||
#ifdef _ALLDOMAN // Syu ADD 排行榜NPC
|
||||
#ifdef _ALLDOMAN // Syu ADD 排行榜NPC
|
||||
void saacproto_UpdataStele_send( int fd , char *data )
|
||||
{
|
||||
saacproto_CreateHeader( saacproto.work , "UpdataStele" );
|
||||
@ -1521,20 +1521,20 @@ void saacproto_DBUpdateEntryInt_send( int fd,char* result,char* table,char* key,
|
||||
}
|
||||
/*
|
||||
463 : <LI><a name="DBGetEntryRankS"><font color=blue>servertoclient DBGetEntryRank( string result , int rank , int count, string table, string key, int msgid, int msgid2 );</font></a><BR>
|
||||
464 : 赐匏毛忒允[
|
||||
464 : 赐匏毛忒允[
|
||||
465 : <dl>
|
||||
466 : <dt>string result
|
||||
467 : <dd>successful/failed
|
||||
468 : <dt>int rank
|
||||
469 : <dd>赐匏[1动晓及袄毛潸月[
|
||||
469 : <dd>赐匏[1动晓及袄毛潸月[
|
||||
470 : <dt>int count
|
||||
471 : <dd>晓井日中仁勾户井[ 赓及巨件玄伉反0井日反元引月[
|
||||
471 : <dd>晓井日中仁勾户井[ 赓及巨件玄伉反0井日反元引月[
|
||||
472 : <dt>string table
|
||||
473 : <dd> □皮伙 毛公及引引井尹允
|
||||
473 : <dd> □皮伙 毛公及引引井尹允
|
||||
474 : <dt>string key
|
||||
475 : <dd>平□毛公及引引井尹允
|
||||
475 : <dd>平□毛公及引引井尹允
|
||||
476 : <dt>int msgid, int msgid2
|
||||
477 : <dd>msgid 毛公及引引忒允
|
||||
477 : <dd>msgid 毛公及引引忒允
|
||||
478 : </dl>
|
||||
479 : <BR><BR>
|
||||
480 :
|
||||
@ -1555,16 +1555,16 @@ void saacproto_DBGetEntryRank_send( int fd,char* result,int rank,int count,char*
|
||||
}
|
||||
/*
|
||||
494 : <LI><a name="DBDeleteEntryIntS"><font color=blue>servertoclient DBDeleteEntryInt( string result , string table, string key, int msgid, int msgid2 );</font></a><BR>
|
||||
495 : 绰轮及瑛绊
|
||||
495 : 绰轮及瑛绊
|
||||
496 : <dl>
|
||||
497 : <dt>string result
|
||||
498 : <dd>successful/failed
|
||||
499 : <dt>string table
|
||||
500 : <dd> □皮伙 毛公及引引井尹允
|
||||
500 : <dd> □皮伙 毛公及引引井尹允
|
||||
501 : <dt>string key
|
||||
502 : <dd>平□毛公及引引井尹允
|
||||
502 : <dd>平□毛公及引引井尹允
|
||||
503 : <dt>int msgid, int msgid2
|
||||
504 : <dd>msgid 毛公及引引忒允
|
||||
504 : <dd>msgid 毛公及引引忒允
|
||||
505 : </dl>
|
||||
506 : <BR><BR>
|
||||
507 :
|
||||
@ -1582,18 +1582,18 @@ void saacproto_DBDeleteEntryInt_send( int fd,char* result,char* table,char* key,
|
||||
}
|
||||
/*
|
||||
520 : <LI><a name="DBGetEntryIntS"><font color=blue>servertoclient DBGetEntryInt( string result , int value , string table, string key, int msgid, int msgid2 );</font></a><BR>
|
||||
521 : 巨件玄伉及袄毛井尹允
|
||||
521 : 巨件玄伉及袄毛井尹允
|
||||
522 : <dl>
|
||||
523 : <dt>string result
|
||||
524 : <dd>successful/failed
|
||||
525 : <dt>int value
|
||||
526 : <dd>袄公及手及
|
||||
526 : <dd>袄公及手及
|
||||
527 : <dt>string table
|
||||
528 : <dd> □皮伙 毛公及引引井尹允
|
||||
528 : <dd> □皮伙 毛公及引引井尹允
|
||||
529 : <dt>string key
|
||||
530 : <dd>平□毛公及引引井尹允
|
||||
530 : <dd>平□毛公及引引井尹允
|
||||
531 : <dt>int msgid, int msgid2
|
||||
532 : <dd>msgid 毛公及引引忒允
|
||||
532 : <dd>msgid 毛公及引引忒允
|
||||
533 : </dl>
|
||||
534 :
|
||||
535 :
|
||||
@ -1613,19 +1613,19 @@ void saacproto_DBGetEntryInt_send( int fd,char* result,int value,char* table,cha
|
||||
}
|
||||
/*
|
||||
552 : <LI><a name="DBGetEntryByRankS"><font color=blue>servertoclient DBGetEntryByRank( string result , string list , string table, int msgid, int msgid2 );</font></a><BR>
|
||||
553 : DBGetEntryByRank及瑛绊[
|
||||
553 : DBGetEntryByRank及瑛绊[
|
||||
554 : <dl>
|
||||
555 : <dt>string result
|
||||
556 : <dd>
|
||||
557 : <dt>string list
|
||||
558 : <dd>"RANK,KEY,SCORE,INFO|RANK,KEY,SCORE,INFO|...."<BR>
|
||||
559 : RANK反赐匏匹丐月[KEY反公及赐匏卞卅匀化中月旦戊失毛手匀化中月
|
||||
560 : 平□[SCORE反帮醒袄匹旦戊失匹丐月[
|
||||
561 : [<br>
|
||||
559 : RANK反赐匏匹丐月[KEY反公及赐匏卞卅匀化中月旦戊失毛手匀化中月
|
||||
560 : 平□[SCORE反帮醒袄匹旦戊失匹丐月[
|
||||
561 : [<br>
|
||||
562 : "1,RINGO,123465,data1|2,HOGE,4567,data2|2,FUCK,4567,data3"<BR>
|
||||
563 : 仇及 分午}2匏反2谛中月仇午卞卅月[
|
||||
563 : 仇及 分午}2匏反2谛中月仇午卞卅月[
|
||||
564 : <dt>string table
|
||||
565 : <dd> □皮伙
|
||||
565 : <dd> □皮伙
|
||||
566 : <dt>int msgid, int msgid2
|
||||
567 : <dd>
|
||||
568 : </dl>
|
||||
@ -1645,18 +1645,18 @@ void saacproto_DBGetEntryByRank_send( int fd,char* result,char* list,char* table
|
||||
}
|
||||
/*
|
||||
583 : <LI><a name="DBGetEntryByCountS"><font color=blue>servertoclient DBGetEntryByCount( string result , string list , string table, int count_start, int msgid, int msgid2 );</font></a><BR>
|
||||
584 : DBGetEntryByCount 及瑛绊[
|
||||
584 : DBGetEntryByCount 及瑛绊[
|
||||
585 : <dl>
|
||||
586 : <dt>string result
|
||||
587 : <dd>SUCCESSFUL/FAILED
|
||||
588 : <dt>string list
|
||||
589 : <dd>请 伉旦玄[1巨件玄伉丐凶曰 "INDEX,RANK,KEY,SCORE,INFO" 及4蜊及树
|
||||
590 : 及赚匹丐曰}公木互蜊醒坌 "|" 匹勾卅互月[蜊醒互0及桦宁反
|
||||
591 : 坞 侬 [
|
||||
589 : <dd>请 伉旦玄[1巨件玄伉丐凶曰 "INDEX,RANK,KEY,SCORE,INFO" 及4蜊及树
|
||||
590 : 及赚匹丐曰}公木互蜊醒坌 "|" 匹勾卅互月[蜊醒互0及桦宁反
|
||||
591 : 坞 侬 [
|
||||
592 : <dt>int num
|
||||
593 : <dd>中仁勾午曰分允井[1卅日1蜊[2卅日2蜊[
|
||||
593 : <dd>中仁勾午曰分允井[1卅日1蜊[2卅日2蜊[
|
||||
594 : <dt>int msgid ,msgid2
|
||||
595 : <dd>丢永本□斥ID.
|
||||
595 : <dd>丢永本□斥ID.
|
||||
596 : </dL>
|
||||
597 :
|
||||
*/
|
||||
@ -1674,16 +1674,16 @@ void saacproto_DBGetEntryByCount_send( int fd,char* result,char* list,char* tabl
|
||||
}
|
||||
/*
|
||||
611 : <LI><a name="Broadcast"><font color=blue>servertoclient Broadcast( string id, string charname, string message );</font></a><BR>
|
||||
612 : Broadcast及失市它件玄扔□田□井日必□丞扔□田□尺及霜耨迕
|
||||
612 : Broadcast及失市它件玄扔□田□井日必□丞扔□田□尺及霜耨迕
|
||||
613 : <dl>
|
||||
614 : <dt>string id
|
||||
615 : <dd>user ID
|
||||
616 : <dt>string charname
|
||||
617 : <dd>character name
|
||||
618 : <dt>string message
|
||||
619 : <dd>丢永本□斥
|
||||
619 : <dd>丢永本□斥
|
||||
620 : <dt>int flag
|
||||
621 : <dd>1卞允月午}愤坌卞卞反 霜今木卅中[
|
||||
621 : <dd>1卞允月午}愤坌卞卞反 霜今木卅中[
|
||||
622 : </dl>
|
||||
623 :
|
||||
*/
|
||||
@ -1698,7 +1698,7 @@ void saacproto_Broadcast_send( int fd,char* id,char* charname,char* message )
|
||||
}
|
||||
/*
|
||||
642 : <LI><a name="Message"><font color=blue>servertoclient Message( string id_from, string charname_from, string id_to, string charname_to, string message , int option , int mesgid );</font></a><BR>
|
||||
643 : 失市它件玄扔□田□井日必□丞扔□田□卞丢永本□斥毛霜耨允月[
|
||||
643 : 失市它件玄扔□田□井日必□丞扔□田□卞丢永本□斥毛霜耨允月[
|
||||
644 : <dl>
|
||||
645 : <dt>string id_from
|
||||
646 : <dd>from ID
|
||||
@ -1709,11 +1709,11 @@ void saacproto_Broadcast_send( int fd,char* id,char* charname,char* message )
|
||||
651 : <dt>string charname_to
|
||||
652 : <dd>to character name
|
||||
653 : <dt>string message
|
||||
654 : <dd>丢永本□斥及
|
||||
654 : <dd>丢永本□斥及
|
||||
655 : <dt>int option
|
||||
656 : <dd>左皿扑亦件(晓及楮醒毛辅寰)
|
||||
656 : <dd>左皿扑亦件(晓及楮醒毛辅寰)
|
||||
657 : <dt>int mesgid
|
||||
658 : <dd>丢永本□斥ID 失市它件玄扔□田□及栋 迕
|
||||
658 : <dd>丢永本□斥ID 失市它件玄扔□田□及栋 迕
|
||||
659 : </dl>
|
||||
660 :
|
||||
*/
|
||||
@ -1770,7 +1770,7 @@ void saacproto_CleanupServer( void )
|
||||
/************************************************************
|
||||
* CoolFish: Family 2001/5/18
|
||||
***********************************************************/
|
||||
// 成立家族
|
||||
// 成立家族
|
||||
void saacproto_ACAddFM_send(int fd, char *result, int fmindex, int index,
|
||||
int charfdid)
|
||||
{
|
||||
@ -1781,7 +1781,7 @@ void saacproto_ACAddFM_send(int fd, char *result, int fmindex, int index,
|
||||
saacproto_strcatsafe(saacproto.work , saacproto_mkstr_int(charfdid) ,saacproto.workbufsize );
|
||||
saacproto_Send( fd , saacproto.work );
|
||||
}
|
||||
// 加入家族
|
||||
// 加入家族
|
||||
void saacproto_ACJoinFM_send(int fd, char *result, int recv, int charfdid)
|
||||
{
|
||||
saacproto_CreateHeader(saacproto.work , "ACJoinFM");
|
||||
@ -1790,7 +1790,7 @@ void saacproto_ACJoinFM_send(int fd, char *result, int recv, int charfdid)
|
||||
saacproto_strcatsafe(saacproto.work , saacproto_mkstr_int(charfdid) ,saacproto.workbufsize );
|
||||
saacproto_Send( fd , saacproto.work );
|
||||
}
|
||||
// 退出家族
|
||||
// 退出家族
|
||||
void saacproto_ACLeaveFM_send(int fd, char *result, int resultflag, int charfdid)
|
||||
{
|
||||
saacproto_CreateHeader(saacproto.work , "ACLeaveFM");
|
||||
@ -1799,14 +1799,14 @@ void saacproto_ACLeaveFM_send(int fd, char *result, int resultflag, int charfdid
|
||||
saacproto_strcatsafe(saacproto.work , saacproto_mkstr_int(charfdid) ,saacproto.workbufsize );
|
||||
saacproto_Send( fd , saacproto.work );
|
||||
}
|
||||
// 解散家族
|
||||
// 解散家族
|
||||
void saacproto_ACDelFM_send(int fd, char *result, int charfdid)
|
||||
{
|
||||
saacproto_CreateHeader(saacproto.work , "ACDelFM");
|
||||
saacproto_strcatsafe(saacproto.work , saacproto_mkstr_string(result) ,saacproto.workbufsize );
|
||||
saacproto_strcatsafe(saacproto.work , saacproto_mkstr_int(charfdid) ,saacproto.workbufsize );
|
||||
saacproto_Send( fd , saacproto.work );}
|
||||
// 列出家族列表
|
||||
// 列出家族列表
|
||||
void saacproto_ACShowFMList_send(int fd, char *result, int num, char *data)
|
||||
{
|
||||
saacproto_CreateHeader(saacproto.work , "ACShowFMList");
|
||||
@ -1816,7 +1816,7 @@ void saacproto_ACShowFMList_send(int fd, char *result, int num, char *data)
|
||||
saacproto_Send( fd , saacproto.work );
|
||||
}
|
||||
|
||||
#ifdef _DEATH_FAMILY_GM_COMMAND // WON ADD 家族战GM指令
|
||||
#ifdef _DEATH_FAMILY_GM_COMMAND // WON ADD 家族战GM指令
|
||||
void saacproto_ACRELOADFM_send( int fd, int charindex )
|
||||
{
|
||||
saacproto_CreateHeader(saacproto.work , "ACRELOADFMOK");
|
||||
@ -1841,7 +1841,7 @@ void saacproto_ACSHOWMEMBERLIST_2_send( int fd, int charindex, int fm1, char *fm
|
||||
|
||||
|
||||
|
||||
#ifdef _DEATH_FAMILY_STRUCT // WON ADD 家族战存放胜负资料
|
||||
#ifdef _DEATH_FAMILY_STRUCT // WON ADD 家族战存放胜负资料
|
||||
void saacproto_ACFMPKSTRUCT_send( int fd, char *data )
|
||||
{
|
||||
saacproto_CreateHeader(saacproto.work , "ACSendFmPkStruct");
|
||||
@ -1852,7 +1852,7 @@ void saacproto_ACFMPKSTRUCT_send( int fd, char *data )
|
||||
|
||||
|
||||
|
||||
#ifdef _DEATH_FAMILY_LOGIN_CHECK // WON ADD 家族战登入检查
|
||||
#ifdef _DEATH_FAMILY_LOGIN_CHECK // WON ADD 家族战登入检查
|
||||
void saacproto_ACFMCharLogin2_send( int fd, char *result, int charindex, char *data )
|
||||
{
|
||||
saacproto_CreateHeader(saacproto.work , "ACSendMemberList");
|
||||
@ -1863,7 +1863,7 @@ void saacproto_ACFMCharLogin2_send( int fd, char *result, int charindex, char *d
|
||||
}
|
||||
#endif
|
||||
|
||||
// 列出成员列表
|
||||
// 列出成员列表
|
||||
void saacproto_ACShowMemberList_send(int fd, char *result, int index, int num,
|
||||
int acceptflag, int fmjoinnum, char *data)
|
||||
{
|
||||
@ -1876,7 +1876,7 @@ void saacproto_ACShowMemberList_send(int fd, char *result, int index, int num,
|
||||
saacproto_strcatsafe(saacproto.work , saacproto_mkstr_string(data) ,saacproto.workbufsize );
|
||||
saacproto_Send( fd , saacproto.work );
|
||||
}
|
||||
// 列出家族详细资料
|
||||
// 列出家族详细资料
|
||||
void saacproto_ACFMDetail_send(int fd, char *result, char *data,
|
||||
int charfdid)
|
||||
{
|
||||
@ -1886,7 +1886,7 @@ void saacproto_ACFMDetail_send(int fd, char *result, char *data,
|
||||
saacproto_strcatsafe(saacproto.work , saacproto_mkstr_int(charfdid) ,saacproto.workbufsize );
|
||||
saacproto_Send( fd , saacproto.work );
|
||||
}
|
||||
// 族长审核成员加入家族
|
||||
// 族长审核成员加入家族
|
||||
void saacproto_ACMemberJoinFM_send(int fd, char *result, int charfdid)
|
||||
{
|
||||
saacproto_CreateHeader(saacproto.work , "ACMemberJoinFM");
|
||||
@ -1894,7 +1894,7 @@ void saacproto_ACMemberJoinFM_send(int fd, char *result, int charfdid)
|
||||
saacproto_strcatsafe(saacproto.work , saacproto_mkstr_int(charfdid) ,saacproto.workbufsize );
|
||||
saacproto_Send( fd , saacproto.work );
|
||||
}
|
||||
// 族长审核成员离开家族
|
||||
// 族长审核成员离开家族
|
||||
void saacproto_ACMemberLeaveFM_send(int fd, char *result, int charfdid)
|
||||
{
|
||||
saacproto_CreateHeader(saacproto.work , "ACMemberLeaveFM");
|
||||
@ -1902,8 +1902,8 @@ void saacproto_ACMemberLeaveFM_send(int fd, char *result, int charfdid)
|
||||
saacproto_strcatsafe(saacproto.work , saacproto_mkstr_int(charfdid) ,saacproto.workbufsize );
|
||||
saacproto_Send( fd , saacproto.work );
|
||||
}
|
||||
// 加入家族之玩家login
|
||||
#ifdef _PERSONAL_FAME // Arminius: 家族个人声望
|
||||
// 加入家族之玩家login
|
||||
#ifdef _PERSONAL_FAME // Arminius: 家族个人声望
|
||||
void saacproto_ACFMCharLogin_send(int fd, char *result, int index, int floor,
|
||||
int fmpopular, int joinflag, int fmsetupflag, int flag, int charindex,
|
||||
int charfame, int charfdid
|
||||
@ -1926,7 +1926,7 @@ void saacproto_ACFMCharLogin_send(int fd, char *result, int index, int floor,
|
||||
saacproto_strcatsafe(saacproto.work , saacproto_mkstr_int(fmsetupflag) ,saacproto.workbufsize );
|
||||
saacproto_strcatsafe(saacproto.work , saacproto_mkstr_int(flag) ,saacproto.workbufsize );
|
||||
saacproto_strcatsafe(saacproto.work , saacproto_mkstr_int(charindex) ,saacproto.workbufsize );
|
||||
#ifdef _PERSONAL_FAME // Arminius: 家族个人声望
|
||||
#ifdef _PERSONAL_FAME // Arminius: 家族个人声望
|
||||
saacproto_strcatsafe(saacproto.work , saacproto_mkstr_int(charfame) ,saacproto.workbufsize );
|
||||
#endif
|
||||
saacproto_strcatsafe(saacproto.work , saacproto_mkstr_int(charfdid) ,saacproto.workbufsize );
|
||||
@ -1935,7 +1935,7 @@ void saacproto_ACFMCharLogin_send(int fd, char *result, int index, int floor,
|
||||
#endif
|
||||
saacproto_Send( fd , saacproto.work );
|
||||
}
|
||||
// 加入家族之玩家logout
|
||||
// 加入家族之玩家logout
|
||||
void saacproto_ACFMCharLogout_send(int fd, char *result, int charfdid)
|
||||
{
|
||||
saacproto_CreateHeader(saacproto.work , "ACFMCharLogout");
|
||||
@ -1943,7 +1943,7 @@ void saacproto_ACFMCharLogout_send(int fd, char *result, int charfdid)
|
||||
saacproto_strcatsafe(saacproto.work , saacproto_mkstr_int(charfdid) ,saacproto.workbufsize );
|
||||
saacproto_Send( fd , saacproto.work );
|
||||
}
|
||||
// 列出家族留言板
|
||||
// 列出家族留言板
|
||||
void saacproto_ACFMReadMemo_send(int fd, char *result, int index, int num,
|
||||
int dataindex, char *data)
|
||||
{
|
||||
@ -1955,7 +1955,7 @@ void saacproto_ACFMReadMemo_send(int fd, char *result, int index, int num,
|
||||
saacproto_strcatsafe(saacproto.work , saacproto_mkstr_string(data) ,saacproto.workbufsize );
|
||||
saacproto_Send( fd , saacproto.work );
|
||||
}
|
||||
// 写入家族留言板
|
||||
// 写入家族留言板
|
||||
void saacproto_ACFMWriteMemo_send(int fd, char *result, int index)
|
||||
{
|
||||
saacproto_CreateHeader(saacproto.work , "ACFMWriteMemo");
|
||||
@ -1963,7 +1963,7 @@ void saacproto_ACFMWriteMemo_send(int fd, char *result, int index)
|
||||
saacproto_strcatsafe(saacproto.work , saacproto_mkstr_int(index) ,saacproto.workbufsize );
|
||||
saacproto_Send( fd , saacproto.work );
|
||||
}
|
||||
// 列出家族据点
|
||||
// 列出家族据点
|
||||
void saacproto_ACFMPointList_send(int fd, char *result, char *data)
|
||||
{
|
||||
saacproto_CreateHeader(saacproto.work , "ACFMPointList");
|
||||
@ -1973,7 +1973,7 @@ void saacproto_ACFMPointList_send(int fd, char *result, char *data)
|
||||
}
|
||||
|
||||
|
||||
// 申请家族据点
|
||||
// 申请家族据点
|
||||
void saacproto_ACSetFMPoint_send(int fd, char *result, int r, int charfdid)
|
||||
{
|
||||
saacproto_CreateHeader(saacproto.work , "ACSetFMPoint");
|
||||
@ -1982,7 +1982,7 @@ void saacproto_ACSetFMPoint_send(int fd, char *result, int r, int charfdid)
|
||||
saacproto_strcatsafe(saacproto.work , saacproto_mkstr_int(charfdid) ,saacproto.workbufsize );
|
||||
saacproto_Send( fd , saacproto.work );
|
||||
}
|
||||
// 设定家族据点
|
||||
// 设定家族据点
|
||||
void saacproto_ACFixFMPoint_send(int fd, char *result, int r)
|
||||
{
|
||||
saacproto_CreateHeader(saacproto.work , "ACFixFMPoint");
|
||||
@ -1990,7 +1990,7 @@ void saacproto_ACFixFMPoint_send(int fd, char *result, int r)
|
||||
saacproto_strcatsafe(saacproto.work , saacproto_mkstr_int(r) ,saacproto.workbufsize );
|
||||
saacproto_Send( fd , saacproto.work );
|
||||
}
|
||||
// 族长对星系家族成员广播
|
||||
// 族长对星系家族成员广播
|
||||
void saacproto_ACFMAnnounce_send(int fd, char *result, char *fmname,
|
||||
int fmindex, int index, int kindflag, char *data, int color)
|
||||
{
|
||||
@ -2004,7 +2004,7 @@ void saacproto_ACFMAnnounce_send(int fd, char *result, char *fmname,
|
||||
saacproto_strcatsafe(saacproto.work , saacproto_mkstr_int(color) ,saacproto.workbufsize );
|
||||
saacproto_Send( fd , saacproto.work );
|
||||
}
|
||||
// 列出家族排行榜
|
||||
// 列出家族排行榜
|
||||
void saacproto_ACShowTopFMList_send(int fd, char *result, int kindflag,
|
||||
int num, char *data)
|
||||
{
|
||||
@ -2015,7 +2015,7 @@ void saacproto_ACShowTopFMList_send(int fd, char *result, int kindflag,
|
||||
saacproto_strcatsafe(saacproto.work , saacproto_mkstr_string(data) ,saacproto.workbufsize );
|
||||
saacproto_Send( fd , saacproto.work );
|
||||
}
|
||||
// 修正家族资料
|
||||
// 修正家族资料
|
||||
#ifdef _FAMILYBANKSTONELOG
|
||||
|
||||
void saacproto_ACgetFMBankgold_send(int fd,int charfdid, int r)
|
||||
@ -2038,7 +2038,7 @@ void saacproto_ACFixFMData_send(int fd, char *result, int kindflag, char *data1,
|
||||
saacproto_strcatsafe(saacproto.work , saacproto_mkstr_int(charfdid) ,saacproto.workbufsize );
|
||||
saacproto_Send( fd , saacproto.work );
|
||||
}
|
||||
// 设定家族据点
|
||||
// 设定家族据点
|
||||
void saacproto_ACFixFMPK_send(int fd, char *result, int award, int winindex,
|
||||
int loseindex)
|
||||
{
|
||||
@ -2049,7 +2049,7 @@ void saacproto_ACFixFMPK_send(int fd, char *result, int award, int winindex,
|
||||
saacproto_strcatsafe(saacproto.work , saacproto_mkstr_int(loseindex) ,saacproto.workbufsize );
|
||||
saacproto_Send( fd , saacproto.work );
|
||||
}
|
||||
// GM修正家族资料
|
||||
// GM修正家族资料
|
||||
void saacproto_ACGMFixFMData_send(int fd, char *result, char *fmname, int charfdid)
|
||||
{
|
||||
saacproto_CreateHeader(saacproto.work , "ACGMFixFMData");
|
||||
@ -2058,7 +2058,7 @@ void saacproto_ACGMFixFMData_send(int fd, char *result, char *fmname, int charfd
|
||||
saacproto_strcatsafe(saacproto.work , saacproto_mkstr_int(charfdid) ,saacproto.workbufsize );
|
||||
saacproto_Send( fd , saacproto.work );
|
||||
}
|
||||
// 取得家族资料
|
||||
// 取得家族资料
|
||||
void saacproto_ACGetFMData_send(int fd, char *result, int kindflag, int data,
|
||||
int charfdid)
|
||||
{
|
||||
@ -2080,7 +2080,7 @@ void saacproto_ACFMClearPK_send(int fd, char *result, char *fmname, int fmindex,
|
||||
saacproto_strcatsafe(saacproto.work , saacproto_mkstr_int(index) ,saacproto.workbufsize );
|
||||
saacproto_Send( fd , saacproto.work );
|
||||
}
|
||||
// 通知其他星球的踢馆人
|
||||
// 通知其他星球的踢馆人
|
||||
void saacproto_ACManorPKAck_send(int fd, char *data)
|
||||
{
|
||||
saacproto_CreateHeader(saacproto.work , "ACManorPKAck");
|
||||
@ -2088,7 +2088,7 @@ void saacproto_ACManorPKAck_send(int fd, char *data)
|
||||
saacproto_Send( fd , saacproto.work );
|
||||
}
|
||||
|
||||
#ifdef _CHECKFMSCHEDULE // Syu ADD 透过AC确认家族挑战排程
|
||||
#ifdef _CHECKFMSCHEDULE // Syu ADD 透过AC确认家族挑战排程
|
||||
void saacproto_ACCheckSchedule_send(int fd,char *data)
|
||||
{
|
||||
saacproto_CreateHeader(saacproto.work , "ACCheckSchedule");
|
||||
@ -2097,7 +2097,7 @@ void saacproto_ACCheckSchedule_send(int fd,char *data)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef _AC_SEND_FM_PK // WON ADD 庄园对战列表储存在AC
|
||||
#ifdef _AC_SEND_FM_PK // WON ADD 庄园对战列表储存在AC
|
||||
void saacproto_ACLoadFmPk_send(int fd, char *data)
|
||||
{
|
||||
saacproto_CreateHeader(saacproto.work , "ACLoadFmPk");
|
||||
@ -2116,13 +2116,13 @@ void saacproto_ACSendFmPk_send( int fd, int userindex, int flg)
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef _RECAL_BACKUP_PLAYER // WON 回溯功能
|
||||
#ifdef _RECAL_BACKUP_PLAYER // WON 回溯功能
|
||||
void saacproto_ACRecalPlayer_send(int fd, char *uid, int userfdid, int GmCliId, char *id, int char_num, int date, char *char_data, int backup_flag)
|
||||
{
|
||||
if(backup_flag==1) saacproto_CreateHeader(saacproto.work , "ACRecalBackupDate"); // 回传备份日期
|
||||
else if(backup_flag==2) saacproto_CreateHeader(saacproto.work , "ACRecalPlayer"); // 回传线上人物资料
|
||||
else if(backup_flag==3) saacproto_CreateHeader(saacproto.work , "ACRecalBackupPlayer"); // 回传备份人物资料
|
||||
else if(backup_flag==4) saacproto_CreateHeader(saacproto.work , "ACRecalAllBackupOK"); // 回传回溯ok讯息
|
||||
if(backup_flag==1) saacproto_CreateHeader(saacproto.work , "ACRecalBackupDate"); // 回传备份日期
|
||||
else if(backup_flag==2) saacproto_CreateHeader(saacproto.work , "ACRecalPlayer"); // 回传线上人物资料
|
||||
else if(backup_flag==3) saacproto_CreateHeader(saacproto.work , "ACRecalBackupPlayer"); // 回传备份人物资料
|
||||
else if(backup_flag==4) saacproto_CreateHeader(saacproto.work , "ACRecalAllBackupOK"); // 回传回溯ok讯息
|
||||
|
||||
saacproto_strcatsafe(saacproto.work , saacproto_mkstr_string(uid) ,saacproto.workbufsize );
|
||||
saacproto_strcatsafe(saacproto.work , saacproto_mkstr_int(userfdid) ,saacproto.workbufsize );
|
||||
@ -2137,7 +2137,7 @@ void saacproto_ACRecalPlayer_send(int fd, char *uid, int userfdid, int GmCliId,
|
||||
|
||||
|
||||
|
||||
// 通知委托人已卖出拍卖物
|
||||
// 通知委托人已卖出拍卖物
|
||||
#ifdef _AUCTIONEER
|
||||
void saacproto_ACAuctionSold_send(int fd, char *data)
|
||||
{
|
||||
@ -2197,7 +2197,7 @@ void saacproto_ACNewPlayerList_send( int fd, char *CdKey, char* UserName, int Us
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef _GM_BROADCAST // WON ADD 客服公告系统
|
||||
#ifdef _GM_BROADCAST // WON ADD 客服公告系统
|
||||
void saacproto_GmBroadcast_send(int fd, int time, int loop, int wait, char *post_msg)
|
||||
{
|
||||
saacproto_CreateHeader(saacproto.work , "GMBROADCAST");
|
||||
@ -2209,7 +2209,7 @@ void saacproto_GmBroadcast_send(int fd, int time, int loop, int wait, char *post
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef _SEND_EFFECT // WON ADD 送下雪、下雨等特效
|
||||
#ifdef _SEND_EFFECT // WON ADD 送下雪、下雨等特效
|
||||
void saacproto_SendEffect_send(int fd, char *effect)
|
||||
{
|
||||
saacproto_CreateHeader(saacproto.work , "EFFECT");
|
||||
|
@ -19,7 +19,7 @@
|
||||
#else
|
||||
#define MAXLSRPCARGS ( 7 + 1 )
|
||||
#endif
|
||||
#ifdef _ALLDOMAN // Syu ADD 排行榜NPC
|
||||
#ifdef _ALLDOMAN // Syu ADD 排行榜NPC
|
||||
void saacproto_UpdataStele_recv( int fd , char *cdkey , char *name , char *title , int level , int trns , int time , int floor) ;
|
||||
void saacproto_UpdataStele_send( int fd , char *data ) ;
|
||||
void saacproto_S_UpdataStele_send( int fd , char *ocdkey , char *oname , char *ncdkey ,
|
||||
@ -90,7 +90,7 @@ void saacproto_CleanupServer( void );
|
||||
int saacproto_ServerDispatchMessage( int fd , char *encoded, char *debugfun);
|
||||
|
||||
// CoolFish: Family 2001/5/9
|
||||
// 成立家族
|
||||
// 成立家族
|
||||
#ifdef _PERSONAL_FAME
|
||||
void saacproto_ACAddFM_recv(int fd, char *fmname, char *fmleadername,
|
||||
char *fmleaderid, int fmleaderlv, char *petname, char *petarrt,
|
||||
@ -102,8 +102,8 @@ void saacproto_ACAddFM_recv(int fd, char *fmname, char *fmleadername,
|
||||
#endif
|
||||
void saacproto_ACAddFM_send(int fd, char *result, int fmindex, int index,
|
||||
int charfdid);
|
||||
// 加入家族
|
||||
// #ifdef _PERSONAL_FAME // Arminius: 家族个人声望
|
||||
// 加入家族
|
||||
// #ifdef _PERSONAL_FAME // Arminius: 家族个人声望
|
||||
void saacproto_ACJoinFM_recv(int fd, char *fmname, int fmindex, char *charname,
|
||||
char *charid, int charlv, int index, int fame, int charfdid);
|
||||
// #else
|
||||
@ -111,11 +111,11 @@ void saacproto_ACJoinFM_recv(int fd, char *fmname, int fmindex, char *charname,
|
||||
// char *charid, int charlv, int index, int charfdid);
|
||||
// #endif
|
||||
void saacproto_ACJoinFM_send(int fd, char *result, int recv, int charfdid);
|
||||
// 退出家族
|
||||
// 退出家族
|
||||
void saacproto_ACLeaveFM_recv(int fd, char *fmname, int fmindex, char *charname,
|
||||
char *charid, int index, int charfdid);
|
||||
void saacproto_ACLeaveFM_send(int fd, char *result, int resultflag, int charfdid);
|
||||
// 解散家族
|
||||
// 解散家族
|
||||
#ifdef _LEADERFUNCHECK
|
||||
void saacproto_ACDelFM_recv(int fd, char *fmname, int fmindex, int index, char *charname,
|
||||
char *charid, int charfdid);
|
||||
@ -123,26 +123,26 @@ void saacproto_ACDelFM_recv(int fd, char *fmname, int fmindex, int index, char *
|
||||
void saacproto_ACDelFM_recv(int fd, char *fmname, int fmindex, int index, int charfdid);
|
||||
#endif
|
||||
void saacproto_ACDelFM_send(int fd, char *result, int charfdid);
|
||||
// 列出家族列表
|
||||
// 列出家族列表
|
||||
void saacproto_ACShowFMList_recv(int fd);
|
||||
void saacproto_ACShowFMList_send(int fd, char *result, int num, char *data);
|
||||
// 列出成员列表
|
||||
// 列出成员列表
|
||||
void saacproto_ACShowMemberList_recv(int fd, int index);
|
||||
void saacproto_ACShowMemberList_send(int fd, char *result, int index, int num,
|
||||
int acceptflag, int fmjoinnum, char *data);
|
||||
// 列出家族详细资料
|
||||
// 列出家族详细资料
|
||||
void saacproto_ACFMDetail_recv(int fd, char *fmname, int fmindex,
|
||||
int index, int charfdid);
|
||||
void saacproto_ACFMDetail_send(int fd, char *result, char *data, int charfdid);
|
||||
// 列出家族留言板
|
||||
// 列出家族留言板
|
||||
void saacproto_ACFMReadMemo_recv(int fd, int index);
|
||||
void saacproto_ACFMReadMemo_send(int fd, char *result, int index, int num,
|
||||
int dataindex, char *data);
|
||||
// 写入家族留言板
|
||||
// 写入家族留言板
|
||||
void saacproto_ACFMWriteMemo_recv(int fd, char *fmname, int fmindex,
|
||||
char *data, int index);
|
||||
void saacproto_ACFMWriteMemo_send(int fd, char *result, int index);
|
||||
// 玩家login
|
||||
// 玩家login
|
||||
#ifdef _FM_MODIFY
|
||||
void saacproto_ACFMCharLogin_recv(int fd, char *fmname, int fmindex,
|
||||
char *charname, char *charid, int charlv, int eventflag, int charfdid,int gsnum);
|
||||
@ -155,7 +155,7 @@ void saacproto_ACFMCharLogin_recv(int fd, char *fmname, int fmindex,
|
||||
char *charname, char *charid, int charlv, int charfdid);
|
||||
#endif
|
||||
#endif
|
||||
#ifdef _PERSONAL_FAME // Arminius: 家族个人声望
|
||||
#ifdef _PERSONAL_FAME // Arminius: 家族个人声望
|
||||
void saacproto_ACFMCharLogin_send(int fd, char *result, int index, int floor,
|
||||
int fmpopular, int joinflag, int fmsetupflag, int flag, int charindex,
|
||||
int charfame, int charfdid
|
||||
@ -169,11 +169,11 @@ void saacproto_ACFMCharLogin_send(int fd, char *result, int index, int floor,
|
||||
int charfdid);
|
||||
#endif
|
||||
|
||||
// 玩家logout
|
||||
// 玩家logout
|
||||
void saacproto_ACFMCharLogout_recv(int fd, char *fmname, int fmindex,
|
||||
char *charname, char *charid, int charlv, int index, int charfdid);
|
||||
void saacproto_ACFMCharLogout_send(int fd, char *result, int charfdid);
|
||||
// 族长审核成员加入家族、修改家族成员职位
|
||||
// 族长审核成员加入家族、修改家族成员职位
|
||||
#ifdef _FMVER21
|
||||
void saacproto_ACMemberJoinFM_recv(int fd, char* fmname, int fmindex,
|
||||
char* charname, int charindex, int index, int result, int meindex,
|
||||
@ -183,7 +183,7 @@ void saacproto_ACMemberJoinFM_recv(int fd, char* fmname, int fmindex,
|
||||
char* charname, int charindex, int index, int result, int charfdid);
|
||||
#endif
|
||||
void saacproto_ACMemberJoinFM_send(int fd, char* result, int charfdid);
|
||||
// 族长审核成员离开家族
|
||||
// 族长审核成员离开家族
|
||||
#ifdef _FMVER21
|
||||
void saacproto_ACMemberLeaveFM_recv(int fd, char* fmname, int fmindex,
|
||||
char* charname, int charindex, int index, int meindex, int charfdid);
|
||||
@ -192,38 +192,38 @@ void saacproto_ACMemberLeaveFM_recv(int fd, char* fmname, int fmindex,
|
||||
char* charname, int charindex, int index, int charfdid);
|
||||
#endif
|
||||
void saacproto_ACMemberLeaveFM_send(int fd, char* result, int charfdid);
|
||||
// 列出家族据点
|
||||
// 列出家族据点
|
||||
void saacproto_ACFMPointList_recv(int fd);
|
||||
void saacproto_ACFMPointList_send(int fd, char *result, char *data);
|
||||
|
||||
|
||||
|
||||
#ifdef _CK_ONLINE_PLAYER_COUNT // WON ADD 计算线上人数
|
||||
#ifdef _CK_ONLINE_PLAYER_COUNT // WON ADD 计算线上人数
|
||||
void saacproto_GS_ACK_PLAYER_COUNT_recv( int fd, int playcount );
|
||||
#endif
|
||||
|
||||
// 申请家族据点
|
||||
// 申请家族据点
|
||||
void saacproto_ACSetFMPoint_recv(int fd, char *fmname, int fmindex, int index,
|
||||
int fmpointindex, int fl, int x, int y, int charfdid);
|
||||
void saacproto_ACSetFMPoint_send(int fd, char *result, int r, int charfdid);
|
||||
// 设定家族据点
|
||||
// 设定家族据点
|
||||
void saacproto_ACFixFMPoint_recv(int fd, char *winfmname, int winfmindex,
|
||||
int winindex, char *losefmname, int losefmindex, int loseindex,
|
||||
int village);
|
||||
void saacproto_ACFixFMPoint_send(int fd, char *result, int r);
|
||||
// 族长对星系家族成员广播
|
||||
// kindflag 1:族长广播 2:家族被系统删除 3:系统通知讯息
|
||||
// 族长对星系家族成员广播
|
||||
// kindflag 1:族长广播 2:家族被系统删除 3:系统通知讯息
|
||||
void saacproto_ACFMAnnounce_recv(int fd, char *fmname, int fmindex, int index,
|
||||
char *data, int color);
|
||||
void saacproto_ACFMAnnounce_send(int fd, char *result, char *fmname,
|
||||
int fmindex, int index, int kindflag, char *data, int color);
|
||||
// 列出家族排行榜
|
||||
// 列出家族排行榜
|
||||
void saacproto_ACShowTopFMList_recv(int fd, int kindflag);
|
||||
void saacproto_ACShowTopFMList_send(int fd, char *result, int kindflag, int num, char *data);
|
||||
// 修正家族资料(是否招收成员)
|
||||
// kindflag 1:是否继续招募家族成员 2:家族PK声望 3:家族守护兽 4:家族主旨
|
||||
// 5:解散家族时间 6:家族基金 7:家族冒险声望 8:家族饲育声望
|
||||
// 9:家族合成、加工声望 10:家族料理声望
|
||||
// 修正家族资料(是否招收成员)
|
||||
// kindflag 1:是否继续招募家族成员 2:家族PK声望 3:家族守护兽 4:家族主旨
|
||||
// 5:解散家族时间 6:家族基金 7:家族冒险声望 8:家族饲育声望
|
||||
// 9:家族合成、加工声望 10:家族料理声望
|
||||
void saacproto_ACFixFMData_recv(int fd, char *fmname, int fmindex, int index,
|
||||
int kindflag, char *data1, char *data2, int charindex, int charfdid);
|
||||
#ifdef _FAMILYBANKSTONELOG
|
||||
@ -235,41 +235,41 @@ void saacproto_ACgetFMBankgold_send(int fd, int charfdid,int r);
|
||||
#endif
|
||||
void saacproto_ACFixFMData_send(int fd, char *result, int kindflag,
|
||||
char *data1, char *data2, int charfdid);
|
||||
// PK後更新家族声望
|
||||
// PK後更新家族声望
|
||||
void saacproto_ACFixFMPK_recv(int fd, char *winfmname, int winfmindex,
|
||||
int winindex, char *losefmname, int losefmindex, int loseindex);
|
||||
void saacproto_ACFixFMPK_send(int fd, char *result, int data, int winindex,
|
||||
int loseindex);
|
||||
// 取得家族资料
|
||||
// kindflag 1:家族银行
|
||||
// 取得家族资料
|
||||
// kindflag 1:家族银行
|
||||
void saacproto_ACGetFMData_recv(int fd, char *fmname, int fmindex, int index,
|
||||
int kindflag, int charfdid);
|
||||
void saacproto_ACGetFMData_send(int fd, char *result, int kindflag, int data,
|
||||
int charfdid);
|
||||
// GM修正家族资料
|
||||
// GM修正家族资料
|
||||
void saacproto_ACGMFixFMData_recv(int fd, int fmindex, char *charid,
|
||||
char *cmd, char *data, int charfdid);
|
||||
void saacproto_ACGMFixFMData_send(int fd, char *result, char *fmname, int charfdid);
|
||||
// 清除对战排程
|
||||
// 清除对战排程
|
||||
void saacproto_ACFMClearPK_send(int fd, char *result, char *fmname, int fmindex,
|
||||
int index);
|
||||
// CoolFish end
|
||||
|
||||
#ifdef _AC_SEND_FM_PK // WON ADD 庄园对战列表储存在AC
|
||||
#ifdef _AC_SEND_FM_PK // WON ADD 庄园对战列表储存在AC
|
||||
void saacproto_ACLoadFmPk_send(int fd, char *data);
|
||||
#ifdef _ACFMPK_LIST//ACSendFmPk
|
||||
void saacproto_ACSendFmPk_send( int fd, int userindex, int flg);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef _RECAL_BACKUP_PLAYER // WON 回溯功能
|
||||
#ifdef _RECAL_BACKUP_PLAYER // WON 回溯功能
|
||||
void saacproto_ACRecalPlayer_send(int fd, char *uid, int userfdid, int GmCliId, char *id, int char_num, int date, char *char_data, int backup_flag);
|
||||
#endif
|
||||
|
||||
// Arminius 8.1 manor pk
|
||||
void saacproto_ACManorPKAck_recv(int fd, char *data);
|
||||
void saacproto_ACManorPKAck_send(int fd, char *data);
|
||||
#ifdef _CHECKFMSCHEDULE // Syu ADD 透过AC确认家族挑战排程
|
||||
#ifdef _CHECKFMSCHEDULE // Syu ADD 透过AC确认家族挑战排程
|
||||
void saacproto_ACCheckSchedule_recv(int fd,char *data);
|
||||
void saacproto_ACCheckSchedule_send(int fd,char *data);
|
||||
#endif
|
||||
@ -280,7 +280,7 @@ void saacproto_ACAuctionSold_send(int fd, char *data);
|
||||
|
||||
void saacproto_ACreLoadFmData_recv(int fd, int type, int data);
|
||||
|
||||
#ifdef _AC_SEND_FM_PK // WON ADD 庄园对战列表储存在AC
|
||||
#ifdef _AC_SEND_FM_PK // WON ADD 庄园对战列表储存在AC
|
||||
void saacproto_ACLoadFmPk_recv(int fd, int fmpks_pos);
|
||||
#ifdef _ACFMPK_LIST
|
||||
void saacproto_ACSendFmPk_recv(int fd, int fmpks_pos, int userindex, int flg, char *data);
|
||||
@ -321,11 +321,11 @@ void saacproto_PKLISTCHARTS_recv( int fd, int type, int flg);
|
||||
void saacproto_PKLISTCHARTS_send( int fd, char *data, int type, int flg );
|
||||
#endif
|
||||
|
||||
#ifdef _SEND_EFFECT // WON ADD 送下雪、下雨等特效
|
||||
#ifdef _SEND_EFFECT // WON ADD 送下雪、下雨等特效
|
||||
void saacproto_SendEffect_send(int fd, char *effect);
|
||||
#endif
|
||||
|
||||
#ifdef _GM_BROADCAST // WON ADD 客服公告系统
|
||||
#ifdef _GM_BROADCAST // WON ADD 客服公告系统
|
||||
void saacproto_GmBroadcast_send(int fd, int time, int loop, int wait, char *post_msg);
|
||||
#endif
|
||||
|
||||
@ -358,18 +358,18 @@ void saacproto_ACCharGetPoolPet_send( int fd, char *Acces, char *Pooldataarg, in
|
||||
|
||||
|
||||
|
||||
#ifdef _DEATH_FAMILY_LOGIN_CHECK // WON ADD 家族战登入检查
|
||||
#ifdef _DEATH_FAMILY_LOGIN_CHECK // WON ADD 家族战登入检查
|
||||
void saacproto_ACFMCharLogin2_recv( int fd, char *char_id, char *char_name, int charindex );
|
||||
void saacproto_ACFMCharLogin2_send( int fd, char *result, int charindex, char *data );
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef _DEATH_FAMILY_GM_COMMAND // WON ADD 家族战GM指令
|
||||
#ifdef _DEATH_FAMILY_GM_COMMAND // WON ADD 家族战GM指令
|
||||
void saacproto_ACRELOADFM_send( int fd, int charindex );
|
||||
void saacproto_ACSHOWMEMBERLIST_2_send( int fd, int charindex, int fm1, char *fm1_name, int fm2, char *fm2_name, int time, int id );
|
||||
#endif
|
||||
|
||||
#ifdef _DEATH_FAMILY_STRUCT // WON ADD 家族战存放胜负资料
|
||||
#ifdef _DEATH_FAMILY_STRUCT // WON ADD 家族战存放胜负资料
|
||||
void saacproto_ACFMPKSTRUCT_send( int fd, char *data );
|
||||
#endif
|
||||
|
||||
|
@ -131,7 +131,7 @@ int tcpstruct_work_accept( int *tis , int ticount )
|
||||
wk[findWk].use = 1;
|
||||
wk[findWk].ti = newcon;
|
||||
wk[findWk].fd = newsockfd;
|
||||
log( "ÍŹŇ⚤×÷: sockfd:%d,newfd:%d=aWork:%d\n" , worksockfd, newsockfd, findWk);
|
||||
log( "同意工作: sockfd:%d,newfd:%d=aWork:%d\n" , worksockfd, newsockfd, findWk);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
#include "version.h"
|
||||
|
||||
#ifdef _SASQL1//新添加
|
||||
#ifdef _SASQL1//新添加
|
||||
|
||||
#include "main.h"
|
||||
#include "util.h"
|
||||
@ -60,7 +60,7 @@ int worksockfd;
|
||||
#include "saacproto_lserver.h"
|
||||
#endif
|
||||
|
||||
#ifdef _SEND_EFFECT // WON ADD 送下雪、下雨等特效
|
||||
#ifdef _SEND_EFFECT // WON ADD 送下雪、下雨等特效
|
||||
#include "recv.h"
|
||||
#endif
|
||||
|
||||
@ -130,54 +130,54 @@ static int readConfig( char *path )
|
||||
if( strcmp( command , "sql_IP" ) == 0 ){
|
||||
strcmp( config.sql_IP , param ) ;
|
||||
snprintf( config.sql_IP , sizeof( config.sql_IP) , param );
|
||||
log("\n数据库地址: %s",config.sql_IP);
|
||||
log("\n数据库地址: %s",config.sql_IP);
|
||||
} else if( strcmp( command , "sql_Port" ) == 0 ){
|
||||
config.sql_Port = atoi( param );
|
||||
snprintf( config.sql_Port1 , sizeof( config.sql_Port1) , param );
|
||||
log("\n数据库端口: %d",config.sql_Port);
|
||||
log("\n数据库端口: %d",config.sql_Port);
|
||||
} else if( strcmp( command , "sql_ID" ) == 0 ){
|
||||
strcmp( config.sql_ID , param ) ;
|
||||
snprintf( config.sql_ID , sizeof( config.sql_ID) , param );
|
||||
log("\n数据库用户: %s",config.sql_ID);
|
||||
log("\n数据库用户: %s",config.sql_ID);
|
||||
} else if( strcmp( command , "sql_PS" ) == 0 ){
|
||||
strcmp( config.sql_PS , param ) ;
|
||||
snprintf( config.sql_PS , sizeof( config.sql_PS) , param );
|
||||
log("\n数据库密码: %s",config.sql_PS);
|
||||
log("\n数据库密码: %s",config.sql_PS);
|
||||
} else if( strcmp( command , "sql_DataBase" ) == 0 ){
|
||||
strcmp( config.sql_DataBase , param ) ;
|
||||
snprintf( config.sql_DataBase , sizeof( config.sql_DataBase) , param );
|
||||
log("\n登陆数据库名:%s",config.sql_DataBase);
|
||||
log("\n登陆数据库名:%s",config.sql_DataBase);
|
||||
} else if( strcmp( command , "sql_Table" ) == 0 ){
|
||||
strcmp( config.sql_Table , param ) ;
|
||||
snprintf( config.sql_Table , sizeof( config.sql_Table) , param );
|
||||
log("\n数据库表名: %s",config.sql_Table);
|
||||
log("\n数据库表名: %s",config.sql_Table);
|
||||
} else if( strcmp( command , "sql_Name" ) == 0 ){
|
||||
strcmp( config.sql_Name , param ) ;
|
||||
snprintf( config.sql_Name , sizeof( config.sql_Name) , param );
|
||||
log("\n用户名字段: %s",config.sql_Name);
|
||||
log("\n用户名字段: %s",config.sql_Name);
|
||||
} else if( strcmp( command , "sql_PassWord" ) == 0 ){
|
||||
strcmp( config.sql_PassWord , param ) ;
|
||||
snprintf( config.sql_PassWord , sizeof( config.sql_PassWord) , param );
|
||||
log("\n密码字段: %s",config.sql_PassWord);
|
||||
log("\n密码字段: %s",config.sql_PassWord);
|
||||
} else if( strcmp( command , "sql_RegTime" ) == 0 ){
|
||||
strcmp( config.sql_RegTime , param ) ;
|
||||
snprintf( config.sql_RegTime , sizeof( config.sql_RegTime) , param );
|
||||
log("\n注册时间: %s",config.sql_RegTime);
|
||||
log("\n注册时间: %s",config.sql_RegTime);
|
||||
} else if( strcmp( command , "sql_LoginTime" ) == 0 ){
|
||||
strcmp( config.sql_LoginTime , param ) ;
|
||||
snprintf( config.sql_LoginTime , sizeof( config.sql_LoginTime) , param );
|
||||
log("\n登陆时间: %s",config.sql_LoginTime);
|
||||
log("\n登陆时间: %s",config.sql_LoginTime);
|
||||
} else if( strcmp( command , "sql_Path" ) == 0 ){
|
||||
strcmp( config.sql_Path , param ) ;
|
||||
snprintf( config.sql_Path , sizeof( config.sql_Path) , param );
|
||||
log("\n路径字段: %s",config.sql_Path);
|
||||
log("\n路径字段: %s",config.sql_Path);
|
||||
} else if( strcmp( command , "sql_OnlineName" ) == 0 ){
|
||||
strcmp( config.sql_OnlineName , param ) ;
|
||||
snprintf( config.sql_OnlineName , sizeof( config.sql_OnlineName) , param );
|
||||
log("\n在线玩家字段:%s",config.sql_OnlineName);
|
||||
log("\n在线玩家字段:%s",config.sql_OnlineName);
|
||||
} else if( strcmp( command , "AutoReg" ) == 0 ){
|
||||
AutoReg = atoi( param );
|
||||
log("\n开放自动注册:%d",AutoReg);
|
||||
log("\n开放自动注册:%d",AutoReg);
|
||||
fclose(fp);
|
||||
return 0;
|
||||
}
|
||||
@ -189,28 +189,28 @@ BOOL sasql_init( void )
|
||||
|
||||
if( mysql_init(&mysql) == NULL & readConfig("acserv.cf"))
|
||||
{
|
||||
log("\n数据库初始化失败!");
|
||||
log("\n数据库初始化失败!");
|
||||
exit(1);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if( !mysql_real_connect( &mysql,
|
||||
config.sql_IP,
|
||||
config.sql_ID,//帐号
|
||||
config.sql_PS,//密码
|
||||
config.sql_DataBase,//选择的资料库
|
||||
config.sql_ID,//帐号
|
||||
config.sql_PS,//密码
|
||||
config.sql_DataBase,//选择的资料库
|
||||
config.sql_Port,
|
||||
NULL,
|
||||
0 ) )
|
||||
{
|
||||
log("\n更新数据库失败!\n");
|
||||
log("\n更新数据库失败!\n");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
log("\n数据库连接成功!\n");
|
||||
log("\n数据库连接成功!\n");
|
||||
#ifdef _SQL_BACKGROUND
|
||||
if(!sasql_initonline())
|
||||
log("\n数据库初始化失败!\n");
|
||||
log("\n数据库初始化失败!\n");
|
||||
#endif
|
||||
return TRUE;
|
||||
}
|
||||
@ -234,7 +234,7 @@ BOOL sasql_query(char *nm, char *pas){
|
||||
else{
|
||||
return FALSE;}}
|
||||
else{
|
||||
log("\n 数据库查找失败!\n");
|
||||
log("\n 数据库查找失败!\n");
|
||||
return FALSE;}
|
||||
}
|
||||
|
||||
@ -246,7 +246,7 @@ BOOL sasql_update(char *nm, char *path){
|
||||
if(!mysql_query(&mysql,sqlstr)){
|
||||
return TRUE;}
|
||||
else{
|
||||
log("\n更新数据库失败!\n");
|
||||
log("\n更新数据库失败!\n");
|
||||
return FALSE;}
|
||||
}
|
||||
|
||||
@ -256,7 +256,7 @@ BOOL sasql_online(char *nm,char *lnm){
|
||||
if(!mysql_query(&mysql,sqlstr)){
|
||||
return TRUE;}
|
||||
else{
|
||||
log("\n更新数据库失败!\n");
|
||||
log("\n更新数据库失败!\n");
|
||||
return FALSE;}
|
||||
}
|
||||
|
||||
@ -284,15 +284,15 @@ BOOL sasql_register(char *nm, char *pas){
|
||||
if(num_row==0){
|
||||
sprintf(sqlstr,"INSERT INTO %s (%s,%s,%s) VALUES ('%s','%s',NOW())",config.sql_Table,config.sql_Name,config.sql_PassWord,config.sql_RegTime,nm,pas);
|
||||
if(!mysql_query(&mysql,sqlstr)){
|
||||
log("\n新用户注册成功!\n");
|
||||
log("\n新用户注册成功!\n");
|
||||
return TRUE;}
|
||||
else{
|
||||
log("\n新用户注册失败!\n");
|
||||
log("\n新用户注册失败!\n");
|
||||
return FALSE;}}
|
||||
else{
|
||||
return FALSE;}}
|
||||
else{
|
||||
log("\n 数据库查找失败!\n");
|
||||
log("\n 数据库查找失败!\n");
|
||||
return FALSE;}
|
||||
}
|
||||
else{
|
||||
|
@ -18,7 +18,7 @@
|
||||
#include <string.h>
|
||||
|
||||
void sasql_close( void );
|
||||
int sasql_save_nm( int idx, char *acc, char *data );//左右人物, 帐号, 资料
|
||||
int sasql_save_nm( int idx, char *acc, char *data );//左右人物, 帐号, 资料
|
||||
int sasql_save_opt( int idx, char *acc, char *data );
|
||||
int sasql_save_int_info( int idx, char *acc, char *data );
|
||||
int sasql_save_char_info( int idx, char *acc, char *data );
|
||||
|
@ -164,16 +164,16 @@ char* makeStringFromEscaped( char* src )
|
||||
if( src[i] == '\\' ){
|
||||
int j;
|
||||
|
||||
/* 戚及 侬卞垫仁 */
|
||||
/* 戚及 侬卞垫仁 */
|
||||
i++;
|
||||
for( j = 0; j<sizeof(escapeChar)/sizeof(escapeChar[0]); j++){
|
||||
if( escapeChar[j].escapedchar == src[i] ){
|
||||
/* 戚互巨旦弗□皿平乓仿分 */
|
||||
/* 戚互巨旦弗□皿平乓仿分 */
|
||||
src[searchindex++] = escapeChar[j].escapechar;
|
||||
goto NEXT;
|
||||
}
|
||||
}
|
||||
/* 巨仿□支仃升公及引引戊疋□仄化云仁 */
|
||||
/* 巨仿□支仃升公及引引戊疋□仄化云仁 */
|
||||
src[searchindex++] = src[i];
|
||||
}else{
|
||||
src[searchindex++] = src[i];
|
||||
@ -217,7 +217,7 @@ char * makeEscapeString( char* src , char* dest, int sizeofdest)
|
||||
dest[destindex+1] = escapechar;
|
||||
destindex+=2;
|
||||
dirty=TRUE;
|
||||
continue; /* 戚及 侬卞褡戈 */
|
||||
continue; /* 戚及 侬卞褡戈 */
|
||||
}else{
|
||||
dest[destindex] = '\0';
|
||||
return dest;
|
||||
@ -243,14 +243,14 @@ char * makeEscapeString1( char* src , char* dest, int sizeofdest)
|
||||
int j;
|
||||
char escapechar='\0';
|
||||
if( destindex + 1 >= sizeofdest )
|
||||
/* '\0'坌互箫曰卅中及匹仇仇匹蔽曰 */
|
||||
/* '\0'坌互箫曰卅中及匹仇仇匹蔽曰 */
|
||||
break;
|
||||
|
||||
/* // 蝈剩及ㄠ田奶玄 井升丹井毛民尼永弁
|
||||
/* // 蝈剩及ㄠ田奶玄 井升丹井毛民尼永弁
|
||||
if( IS_2BYTEWORD( src[i] ) ){
|
||||
// 蝈剩分[公及桦宁反ㄠ田奶玄芴坌卞褡引六月[
|
||||
// 凶分仄ㄠ田奶玄仄井卅中桦宁反公丹仄卅中
|
||||
// 公及引引ㄡ田奶玄鳖霜
|
||||
// 蝈剩分[公及桦宁反ㄠ田奶玄芴坌卞褡引六月[
|
||||
// 凶分仄ㄠ田奶玄仄井卅中桦宁反公丹仄卅中
|
||||
// 公及引引ㄡ田奶玄鳖霜
|
||||
if( destindex + 2 >= sizeofdest )break;
|
||||
|
||||
dest[destindex] = src[i];
|
||||
@ -268,17 +268,17 @@ char * makeEscapeString1( char* src , char* dest, int sizeofdest)
|
||||
}
|
||||
|
||||
if( dirty == TRUE ){
|
||||
/* 巨旦弗□皿允月 侬分 */
|
||||
/* 巨旦弗□皿允月 侬分 */
|
||||
if( destindex + 2 < sizeofdest ){
|
||||
/* +2 午中丹及反} '\\' 午 'n'及仪分 */
|
||||
/* 酸曰 侬反蜗坌分 */
|
||||
/* +2 午中丹及反} '\\' 午 'n'及仪分 */
|
||||
/* 酸曰 侬反蜗坌分 */
|
||||
dest[destindex] = '\\';
|
||||
dest[destindex+1] = escapechar;
|
||||
destindex+=2;
|
||||
dirty=TRUE;
|
||||
continue; /* 戚及 侬卞褡戈 */
|
||||
continue; /* 戚及 侬卞褡戈 */
|
||||
}else{
|
||||
/* 酸曰田永白央互尕箫仄化中月 */
|
||||
/* 酸曰田永白央互尕箫仄化中月 */
|
||||
dest[destindex] = '\0';
|
||||
return dest;
|
||||
}
|
||||
@ -297,7 +297,7 @@ char * makeEscapeString1( char* src , char* dest, int sizeofdest)
|
||||
|
||||
|
||||
|
||||
/* 赞中strcatsafe[田永白央互丐孔木月桦宁反窒手仄卅中[ */
|
||||
/* 赞中strcatsafe[田永白央互丐孔木月桦宁反窒手仄卅中[ */
|
||||
int
|
||||
strcatsafe( char *dest, int destlen , char *append )
|
||||
{
|
||||
|
@ -2,162 +2,162 @@
|
||||
#define __VERSION_H__
|
||||
#define _SASQL1
|
||||
|
||||
/* 请将控制专案的 definition 放在这个档案
|
||||
* 然後藉由 remark/unmark 来开关功能
|
||||
/* 请将控制专案的 definition 放在这个档案
|
||||
* 然後藉由 remark/unmark 来开关功能
|
||||
*/
|
||||
|
||||
/* -------------------------------------------------------------------
|
||||
* 专案:族人职务与家族功能补充
|
||||
* 人员:小瑜、彦勋、志伟、小民
|
||||
* 说明:
|
||||
* 专案:族人职务与家族功能补充
|
||||
* 人员:小瑜、彦勋、志伟、小民
|
||||
* 说明:
|
||||
*/
|
||||
#define _LEADERFLAG_VER // 嗯、ㄟ、这个.... (可开放)
|
||||
#define __FAMILY // (可开放)
|
||||
#define _PERSONAL_FAME // Arminius 8.30 家族个人声望 (可开放)
|
||||
#define _FMVER21 // CoolFish: 家族族长职务代理人 2001/8/30 (可开放)
|
||||
#define MEMBER_100 // CoolFish: 家族人数上限 2001/9/3 (可开放)
|
||||
#define _EVERYONE_RIDE // CoolFish: 骑宠平民化家族金额上限 2001/9/24 (可开放)
|
||||
#define _LEADERFLAG_VER // 嗯、ㄟ、这个.... (可开放)
|
||||
#define __FAMILY // (可开放)
|
||||
#define _PERSONAL_FAME // Arminius 8.30 家族个人声望 (可开放)
|
||||
#define _FMVER21 // CoolFish: 家族族长职务代理人 2001/8/30 (可开放)
|
||||
#define MEMBER_100 // CoolFish: 家族人数上限 2001/9/3 (可开放)
|
||||
#define _EVERYONE_RIDE // CoolFish: 骑宠平民化家族金额上限 2001/9/24 (可开放)
|
||||
|
||||
/* -------------------------------------------------------------------
|
||||
* 专案:当机不回朔之人物资料存档方式修正
|
||||
* 人员:小瑜、彦勋
|
||||
* 说明:修正人物资料存档方式
|
||||
* 专案:当机不回朔之人物资料存档方式修正
|
||||
* 人员:小瑜、彦勋
|
||||
* 说明:修正人物资料存档方式
|
||||
*/
|
||||
#define _NewSave // CoolFish: 2001/10/16 (可开放)
|
||||
#define _NewSave // CoolFish: 2001/10/16 (可开放)
|
||||
|
||||
/* -------------------------------------------------------------------
|
||||
* 专案:星球合并
|
||||
* 人员:阿民、彦勋、小瑜
|
||||
* 说明:
|
||||
* 专案:星球合并
|
||||
* 人员:阿民、彦勋、小瑜
|
||||
* 说明:
|
||||
*/
|
||||
//#define _RELOGIN // CoolFish: 重复登入机制 2001/10/29 (不可开放)
|
||||
//#define _RELOGIN // CoolFish: 重复登入机制 2001/10/29 (不可开放)
|
||||
|
||||
/* -------------------------------------------------------------------
|
||||
* 专案:伊甸大陆
|
||||
* 人员:彦豪、阿民、小瑜
|
||||
* 说明:工期 1/15
|
||||
* 专案:伊甸大陆
|
||||
* 人员:彦豪、阿民、小瑜
|
||||
* 说明:工期 1/15
|
||||
*/
|
||||
//#define _AUCTIONEER // Arminius 1.10 拍卖店 (伊甸大陆)
|
||||
//#define _AUCTIONEER // Arminius 1.10 拍卖店 (伊甸大陆)
|
||||
|
||||
/* -------------------------------------------------------------------
|
||||
* 专案:家族BUG修正
|
||||
* 人员:小瑜
|
||||
* 说明:
|
||||
* 专案:家族BUG修正
|
||||
* 人员:小瑜
|
||||
* 说明:
|
||||
*/
|
||||
#define _LEADERFUNCHECK // CoolFish: 2002/02/06 族长功能错误、禅让错误修正(可开放)
|
||||
#define _LEADERFUNCHECK // CoolFish: 2002/02/06 族长功能错误、禅让错误修正(可开放)
|
||||
|
||||
/* -------------------------------------------------------------------
|
||||
* 专案:跨星球踢人
|
||||
* 人员:彦豪
|
||||
* 说明:
|
||||
* 专案:跨星球踢人
|
||||
* 人员:彦豪
|
||||
* 说明:
|
||||
*/
|
||||
#define _WAEI_KICK // (可开放)(北京不必开)
|
||||
#define _FIX_WORKS // (可开放)(北京不必开) wk修改
|
||||
#define _WAEI_KICK // (可开放)(北京不必开)
|
||||
#define _FIX_WORKS // (可开放)(北京不必开) wk修改
|
||||
|
||||
//#define _DELAY_UNLOCK // (不可开) ANDY
|
||||
//#define _LOCK_SERVER // (不可开)
|
||||
//#define _TEST_LOCKSERVER // (不可开)
|
||||
//#define _NO_DOUBLECHECK // (不可开)
|
||||
//#define _PAUCTION_MAN // (不可开) 寄卖
|
||||
//#define _DELAY_UNLOCK // (不可开) ANDY
|
||||
//#define _LOCK_SERVER // (不可开)
|
||||
//#define _TEST_LOCKSERVER // (不可开)
|
||||
//#define _NO_DOUBLECHECK // (不可开)
|
||||
//#define _PAUCTION_MAN // (不可开) 寄卖
|
||||
/* -------------------------------------------------------------------
|
||||
* 专案:九大庄园(4.0)
|
||||
* 人员:志旺
|
||||
* 说明:
|
||||
* 专案:九大庄园(4.0)
|
||||
* 人员:志旺
|
||||
* 说明:
|
||||
*/
|
||||
#define _FIX_9_FMPOINT // (可开放) WON ADD 九大庄园
|
||||
#define _FIX_LEADER_ERR // (可开放) WON ADD 修正族长问题
|
||||
#define _REMOVE_FM_LOG // (可开放) WON ADD 移除不必要的家族 LOG
|
||||
//#define _ADD_FAMILY_TAX // (不可开) WON ADD 增加庄园税收
|
||||
#define _FIX_9_FMPOINT // (可开放) WON ADD 九大庄园
|
||||
#define _FIX_LEADER_ERR // (可开放) WON ADD 修正族长问题
|
||||
#define _REMOVE_FM_LOG // (可开放) WON ADD 移除不必要的家族 LOG
|
||||
//#define _ADD_FAMILY_TAX // (不可开) WON ADD 增加庄园税收
|
||||
|
||||
|
||||
/* -------------------------------------------------------------------
|
||||
* 专案:确认庄园挑战排程
|
||||
* 人员:旭诚
|
||||
* 说明:由AC下family目录里fmschedule档统一广播各庄园挑战排程
|
||||
* 专案:确认庄园挑战排程
|
||||
* 人员:旭诚
|
||||
* 说明:由AC下family目录里fmschedule档统一广播各庄园挑战排程
|
||||
*/
|
||||
//#define _CHECKFMSCHEDULE // (不可开) Syu ADD 透过AC确认家族挑战排程
|
||||
//#define _FAMILYBANKSTONELOG // (不可开) Syu ADD 新增家族银行存取Log
|
||||
//#define _FIXFMASSIGN // (不可开) Syu ADD 修正家族一百人无法指派、移除长老
|
||||
//#define _CHECKFMSCHEDULE // (不可开) Syu ADD 透过AC确认家族挑战排程
|
||||
//#define _FAMILYBANKSTONELOG // (不可开) Syu ADD 新增家族银行存取Log
|
||||
//#define _FIXFMASSIGN // (不可开) Syu ADD 修正家族一百人无法指派、移除长老
|
||||
|
||||
|
||||
/* -------------------------------------------------------------------
|
||||
* 专案:石器6.0
|
||||
* 人员:
|
||||
* 说明:
|
||||
* 专案:石器6.0
|
||||
* 人员:
|
||||
* 说明:
|
||||
*/
|
||||
#define _SEND_EFFECT // (可开放) WON ADD 送下雪、下雨等特效
|
||||
//#define _NEW_PLAYERGOLD // (不可开) ANDY 新帐号给钱
|
||||
//#define _BAD_PLAYER // (不可开) WON ADD 送坏玩家去关
|
||||
#define _SEND_EFFECT // (可开放) WON ADD 送下雪、下雨等特效
|
||||
//#define _NEW_PLAYERGOLD // (不可开) ANDY 新帐号给钱
|
||||
//#define _BAD_PLAYER // (不可开) WON ADD 送坏玩家去关
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
#define _AC_SEND_FM_PK // (可开放) WON ADD 庄园对战列表储存在AC
|
||||
#define _ACFMPK_LIST // (可开放) ANDY 庄园对战列表
|
||||
#define _CK_ONLINE_PLAYER_COUNT // (可开放) WON ADD 计算线上人数
|
||||
#define _AC_SEND_FM_PK // (可开放) WON ADD 庄园对战列表储存在AC
|
||||
#define _ACFMPK_LIST // (可开放) ANDY 庄园对战列表
|
||||
#define _CK_ONLINE_PLAYER_COUNT // (可开放) WON ADD 计算线上人数
|
||||
|
||||
/* -------------------------------------------------------------------
|
||||
* 专案:石器7.0
|
||||
* 人员:
|
||||
* 说明:
|
||||
* 专案:石器7.0
|
||||
* 人员:
|
||||
* 说明:
|
||||
*/
|
||||
#define _ALLDOMAN // (可开放) Syu ADD 排行榜NPC
|
||||
#define _CHAR_POOLITEM // (可开放) ANDY 共用仓库
|
||||
#define _CHAR_POOLPET // (可开放) Robin 共用宠物仓库
|
||||
//#define _FIX_ALLDOMAN // (不可开) ANDY
|
||||
#define _ALLDOMAN // (可开放) Syu ADD 排行榜NPC
|
||||
#define _CHAR_POOLITEM // (可开放) ANDY 共用仓库
|
||||
#define _CHAR_POOLPET // (可开放) Robin 共用宠物仓库
|
||||
//#define _FIX_ALLDOMAN // (不可开) ANDY
|
||||
// -------------------------------------------------------------------
|
||||
// 新功能:客服公告系统
|
||||
#define _GM_BROADCAST // (可开放) WON ADD 客服公告系统
|
||||
// 新功能:客服公告系统
|
||||
#define _GM_BROADCAST // (可开放) WON ADD 客服公告系统
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// 新功能:GM密频功能扩充
|
||||
//#define _RECAL_BACKUP_PLAYER // (可开放 (暂时先关起来) ) WON 回溯功能 (北京&韩国不必开)
|
||||
//#define _UNIVERSE_CHATROOM // (不可开) ANDY 全星系聊天
|
||||
// 新功能:GM密频功能扩充
|
||||
//#define _RECAL_BACKUP_PLAYER // (可开放 (暂时先关起来) ) WON 回溯功能 (北京&韩国不必开)
|
||||
//#define _UNIVERSE_CHATROOM // (不可开) ANDY 全星系聊天
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// 新功能:修改WORKER(新付费机制)
|
||||
#define _FIX_MESSAGE // (可开) WON ADD 修改WORKER封包内容 (北京&韩国不必开)
|
||||
#define _WORKER_AUTO_LOGOUT // (可开) WON ADD GS断线自动送LOGOUT给WORKER
|
||||
// 新功能:修改WORKER(新付费机制)
|
||||
#define _FIX_MESSAGE // (可开) WON ADD 修改WORKER封包内容 (北京&韩国不必开)
|
||||
#define _WORKER_AUTO_LOGOUT // (可开) WON ADD GS断线自动送LOGOUT给WORKER
|
||||
|
||||
//#define _DEFEND_NEWUSERS // (不可开) ANDY 老手带新手
|
||||
//#define _CHECK_BADFILES // (不可开) ANDY 判断坏挡
|
||||
#define _AC_UNLOCK_GS_PLAYER // (不可开) WON ADD 自动UNLOCK
|
||||
//#define _ACFMPK_NOFREE // (不可开) ANDY 家族无条件
|
||||
//#define _DEFEND_NEWUSERS // (不可开) ANDY 老手带新手
|
||||
//#define _CHECK_BADFILES // (不可开) ANDY 判断坏挡
|
||||
#define _AC_UNLOCK_GS_PLAYER // (不可开) WON ADD 自动UNLOCK
|
||||
//#define _ACFMPK_NOFREE // (不可开) ANDY 家族无条件
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// 新功能:跨星系pk伺服器
|
||||
//#define _OACSTRUCT_TCP // (不可开) ANDY 跨星系取得人物列表
|
||||
//#define _TCPIP_UTIL // (不可开) ANDY TCPIP
|
||||
//#define _DEATH_CONTEND // (不可开) ANDY 死斗
|
||||
//#define _DEATH_FAMILY_LOGIN_CHECK // (不可开) WON ADD 家族战登入检查
|
||||
//#define _DEATH_FAMILY_GM_COMMAND // (不可开) WON ADD 家族战GM指令
|
||||
//#define _DEATH_FAMILY_STRUCT // (不可开) WON ADD 家族战存放胜负资料
|
||||
// 新功能:跨星系pk伺服器
|
||||
//#define _OACSTRUCT_TCP // (不可开) ANDY 跨星系取得人物列表
|
||||
//#define _TCPIP_UTIL // (不可开) ANDY TCPIP
|
||||
//#define _DEATH_CONTEND // (不可开) ANDY 死斗
|
||||
//#define _DEATH_FAMILY_LOGIN_CHECK // (不可开) WON ADD 家族战登入检查
|
||||
//#define _DEATH_FAMILY_GM_COMMAND // (不可开) WON ADD 家族战GM指令
|
||||
//#define _DEATH_FAMILY_STRUCT // (不可开) WON ADD 家族战存放胜负资料
|
||||
|
||||
#define _CHANGEGALAXY // Robin 2003/10/27 星系移民
|
||||
#define _CHANGEGALAXY // Robin 2003/10/27 星系移民
|
||||
|
||||
//#define _TIMEOUTKICK // Robin 2003/11/07 时段制自动踢人
|
||||
//#define _TIMEOUTKICK // Robin 2003/11/07 时段制自动踢人
|
||||
|
||||
//#define _UNLOCKPOOL // Robin 2003/12/12 Logout暂存区
|
||||
//#define _UNLOCKPOOL // Robin 2003/12/12 Logout暂存区
|
||||
|
||||
//#define _KILLDEADWORKER // Robin 2004/02/ 用sigusr1清除所有Worker 在unlock.arg加'K'
|
||||
//#define _KILLDEADWORKER // Robin 2004/02/ 用sigusr1清除所有Worker 在unlock.arg加'K'
|
||||
|
||||
#define _SLEEP_CHAR // Robin 2004/02/12 活跃人物与非活跃人物分开储存
|
||||
#define _SLEEP_CHAR // Robin 2004/02/12 活跃人物与非活跃人物分开储存
|
||||
|
||||
#endif
|
||||
|
||||
// Terry define start -------------------------------------------------------------------
|
||||
#define _FM_MODIFY // 家族功能修改
|
||||
#define _CHANNEL_MODIFY // 频道功能整合
|
||||
#define _NEW_MANOR_LAW // 新庄园规则
|
||||
#define _LOCK_ADD_NAME // LockNode 增加名字栏位(未开放)
|
||||
#define _TEACHER_SYSTEM // 导师系统(未开放)
|
||||
#define _FM_MODIFY // 家族功能修改
|
||||
#define _CHANNEL_MODIFY // 频道功能整合
|
||||
#define _NEW_MANOR_LAW // 新庄园规则
|
||||
#define _LOCK_ADD_NAME // LockNode 增加名字栏位(未开放)
|
||||
#define _TEACHER_SYSTEM // 导师系统(未开放)
|
||||
// Terry define end -------------------------------------------------------------------
|
||||
|
||||
//#define _ANGEL_SUMMON // Robin 精灵的召唤
|
||||
//#define _SASQL //Change 石器资料库 (不可开)
|
||||
//#define _RACEMAN // cyg 猎宠大会
|
||||
//#define _ANGEL_SUMMON // Robin 精灵的召唤
|
||||
//#define _SASQL //Change 石器资料库 (不可开)
|
||||
//#define _RACEMAN // cyg 猎宠大会
|
||||
|
||||
|
||||
//--------------------------------------------------------
|
||||
//by longzoro
|
||||
#define _SQL_BACKGROUND //网页后台功能 需同时开放_SASQL1
|
||||
#define _SQL_BACKGROUND //网页后台功能 需同时开放_SASQL1
|
||||
|
||||
#define _SQL_REGISTER //自动注册功能 需同时开放_SASQL1
|
||||
#define _SQL_REGISTER //自动注册功能 需同时开放_SASQL1
|
||||
|
Loading…
Reference in New Issue
Block a user