/* output by ../../bin/lsgen.perl 0.41 ( 1998 May) * made Thu Feb 17 17:30:27 2000 * user ringo * host indy * file /opt/ringo/chsa/src/saac/./saacproto_serv.c * util ./saacproto_util.c , ./saacproto_util.h * src /opt/ringo/chsa/src/saac/../../doc/saacproto.html */ #define _SAACPROTOSERV_C_ #include "version.h" #include "saacproto_serv.h" #include "main.h" #ifdef _RECAL_BACKUP_PLAYER // WON 回溯功能 #include "recv.h" #endif #ifdef _DEATH_FAMILY_GM_COMMAND // WON ADD 家族战GM指令 #include "acfamily.h" #endif // Nuke : This 'fd' is not a socket, it's the index of structure connect int saacproto_ServerDispatchMessage( int fd , char *encoded, char *debugfun) { unsigned int msgid; char funcname[1024]; saacproto_splitString( encoded ); saacproto_GetMessageInfo(&msgid , funcname ,sizeof(funcname), saacproto.token_list ); if( strcmp( funcname , "ACServerLogin" ) == 0 ){ char* servername; char* serverpas; servername = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); serverpas = saacproto_wrapStringAddr( saacproto_stringwrapper[2] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[3] )); saacproto_ACServerLogin_recv( fd,servername,serverpas); return 0; } if( strcmp( funcname , "ACServerLogout" ) == 0 ){ saacproto_ACServerLogout_recv( fd); return 0; } if( strcmp( funcname , "ACCharList" ) == 0 ){ char* id; char* pas; int mesgid; id = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); pas = saacproto_wrapStringAddr( saacproto_stringwrapper[2] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[3] )); mesgid = saacproto_demkstr_int( saacproto.token_list[4] ); saacproto_ACCharList_recv( fd,id,pas,mesgid); return 0; } if( strcmp( funcname , "ACCharLoad" ) == 0 ){ char* id; char* pas; char* charname; int lock; char* opt; int mesgid; id = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); pas = saacproto_wrapStringAddr( saacproto_stringwrapper[2] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[3] )); charname = saacproto_wrapStringAddr( saacproto_stringwrapper[3] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[4] )); lock = saacproto_demkstr_int( saacproto.token_list[5] ); opt = saacproto_wrapStringAddr( saacproto_stringwrapper[5] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[6] )); mesgid = saacproto_demkstr_int( saacproto.token_list[7] ); saacproto_ACCharLoad_recv( fd,id,pas,charname,lock,opt,mesgid); return 0; } #ifdef _RELOGIN if( strcmp( funcname , "ACCharLoadII" ) == 0 ){ char* id; char* pas; char* charname; int lock; char* opt; int mesgid; int gs1; int gs2; id = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); pas = saacproto_wrapStringAddr( saacproto_stringwrapper[2] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[3] )); charname = saacproto_wrapStringAddr( saacproto_stringwrapper[3] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[4] )); lock = saacproto_demkstr_int( saacproto.token_list[5] ); opt = saacproto_wrapStringAddr( saacproto_stringwrapper[5] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[6] )); mesgid = saacproto_demkstr_int( saacproto.token_list[7] ); gs1 = saacproto_demkstr_int( saacproto.token_list[8] ); gs2 = saacproto_demkstr_int( saacproto.token_list[9] ); saacproto_ACCharLoadII_recv( fd,id,pas,charname,lock,opt,mesgid,gs1,gs2); return 0; } #endif if( strcmp( funcname , "ACCharSave" ) == 0 ){ char* id; char* charname; char* opt; char* charinfo; int unlock; int mesgid; #ifdef _NewSave int charindex; #endif id = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); charname = saacproto_wrapStringAddr( saacproto_stringwrapper[2] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[3] )); opt = saacproto_wrapStringAddr( saacproto_stringwrapper[3] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[4] )); charinfo = saacproto_wrapStringAddr( saacproto_stringwrapper[4] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[5] )); unlock = saacproto_demkstr_int( saacproto.token_list[6] ); mesgid = saacproto_demkstr_int( saacproto.token_list[7] ); #ifdef _NewSave charindex = saacproto_demkstr_int( saacproto.token_list[8] ); saacproto_ACCharSave_recv( fd,id,charname,opt,charinfo,unlock,mesgid,charindex); #else saacproto_ACCharSave_recv( fd,id,charname,opt,charinfo,unlock,mesgid); #endif return 0; } #ifdef _RELOGIN if( strcmp( funcname , "ACCharSaveII" ) == 0 ){ char* id; char* charname; char* opt; char* charinfo; int unlock; int mesgid; int charindex; int gs1; int gs2; id = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); charname = saacproto_wrapStringAddr( saacproto_stringwrapper[2] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[3] )); opt = saacproto_wrapStringAddr( saacproto_stringwrapper[3] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[4] )); charinfo = saacproto_wrapStringAddr( saacproto_stringwrapper[4] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[5] )); unlock = saacproto_demkstr_int( saacproto.token_list[6] ); mesgid = saacproto_demkstr_int( saacproto.token_list[7] ); charindex = saacproto_demkstr_int( saacproto.token_list[8] ); charindex = saacproto_demkstr_int( saacproto.token_list[9] ); charindex = saacproto_demkstr_int( saacproto.token_list[10] ); // saacproto_ACCharSaveII_recv( fd,id,charname,opt,charinfo,unlock,mesgid,charindex,gs1,gs2); saacproto_ACCharSaveII_recv( fd,id,charname,opt,charinfo,unlock,mesgid,charindex); return 0; } #endif if( strcmp( funcname , "ACCharDelete" ) == 0 ){ char* id; char* passwd; char* charname; char* option; int mesgid; id = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); passwd = saacproto_wrapStringAddr( saacproto_stringwrapper[2] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[3] )); charname = saacproto_wrapStringAddr( saacproto_stringwrapper[3] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[4] )); option = saacproto_wrapStringAddr( saacproto_stringwrapper[4] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[5] )); mesgid = saacproto_demkstr_int( saacproto.token_list[6] ); saacproto_ACCharDelete_recv( fd,id,passwd,charname,option,mesgid); return 0; } if( strcmp( funcname , "ACLock" ) == 0 ){ char* id; int lock; int mesgid; id = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); lock = saacproto_demkstr_int( saacproto.token_list[3] ); mesgid = saacproto_demkstr_int( saacproto.token_list[4] ); saacproto_ACLock_recv( fd,id,lock,mesgid); return 0; } #ifdef _WAEI_KICK if( strcmp( funcname , "ACKick" ) == 0 ){ 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] ); flg = saacproto_demkstr_int( saacproto.token_list[4] ); saacproto_ACKick_recv( fd, id, flg, clifd); return 0; } #endif #ifdef _NEW_PLAYERGOLD if( strcmp( funcname , "LoadNEWPlayer" ) == 0 ){ 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] )); saacproto_LoadNEWPlayer_recv( fd, charaindex, filename); return 0; } #endif #ifdef _DEATH_CONTEND if( strcmp( funcname , "PKLISTGETDATA" ) == 0 ){ int start=-1, count; start = saacproto_demkstr_int( saacproto.token_list[2] ); count = saacproto_demkstr_int( saacproto.token_list[3] ); saacproto_PKLISTGETDATA_recv( fd, start, count); return 0; } if( strcmp( funcname , "PKLISTUPDATE" ) == 0 ){ char *mecdkey, *tocdkey; int menum, tonum, winer, flg; mecdkey = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); tocdkey = saacproto_wrapStringAddr( saacproto_stringwrapper[2] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[3] )); menum = saacproto_demkstr_int( saacproto.token_list[4] ); tonum = saacproto_demkstr_int( saacproto.token_list[5] ); winer = saacproto_demkstr_int( saacproto.token_list[6] ); flg = saacproto_demkstr_int( saacproto.token_list[7] ); saacproto_PKLISTUPDATE_recv( fd, menum, mecdkey, tonum, tocdkey, winer, flg); return 0; } if( strcmp( funcname , "PKLISTCHARTS" ) == 0 ){ int type, flg; //要求资讯 type = saacproto_demkstr_int( saacproto.token_list[2] ); flg = saacproto_demkstr_int( saacproto.token_list[3] ); saacproto_PKLISTCHARTS_recv( fd, type, flg); return 0; } #endif #ifdef _PAUCTION_MAN if( strcmp( funcname , "AUCTIONADDITEM" ) == 0 ){ int ItemId=-1; char *name; char *data; int flg, ret; name = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); data = saacproto_wrapStringAddr( saacproto_stringwrapper[2] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[3] )); ItemId = saacproto_demkstr_int( saacproto.token_list[4] ); ret = saacproto_demkstr_int( saacproto.token_list[5] ); flg = saacproto_demkstr_int( saacproto.token_list[6] ); saacproto_ACItemAuction_recv( fd, name, data, ItemId, ret, flg); return 0; } #endif if( strcmp( funcname , "ACUCheck" ) == 0 ){ char* mem_id; int status; mem_id = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); status = saacproto_demkstr_int( saacproto.token_list[3] ); saacproto_ACUCheck_recv( fd,mem_id,status); return 0; } if( strcmp( funcname , "DBUpdateEntryString" ) == 0 ){ char* table; char* key; char* value; int msgid; int msgid2; table = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); key = saacproto_wrapStringAddr( saacproto_stringwrapper[2] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[3] )); value = saacproto_wrapStringAddr( saacproto_stringwrapper[3] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[4] )); msgid = saacproto_demkstr_int( saacproto.token_list[5] ); msgid2 = saacproto_demkstr_int( saacproto.token_list[6] ); saacproto_DBUpdateEntryString_recv( fd,table,key,value,msgid,msgid2); return 0; } if( strcmp( funcname , "DBDeleteEntryString" ) == 0 ){ char* table; char* key; int msgid; int msgid2; table = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); key = saacproto_wrapStringAddr( saacproto_stringwrapper[2] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[3] )); msgid = saacproto_demkstr_int( saacproto.token_list[4] ); msgid2 = saacproto_demkstr_int( saacproto.token_list[5] ); saacproto_DBDeleteEntryString_recv( fd,table,key,msgid,msgid2); return 0; } if( strcmp( funcname , "DBGetEntryString" ) == 0 ){ char* table; char* key; int msgid; int msgid2; table = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); key = saacproto_wrapStringAddr( saacproto_stringwrapper[2] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[3] )); msgid = saacproto_demkstr_int( saacproto.token_list[4] ); msgid2 = saacproto_demkstr_int( saacproto.token_list[5] ); saacproto_DBGetEntryString_recv( fd,table,key,msgid,msgid2); return 0; } if( strcmp( funcname , "DBUpdateEntryInt" ) == 0 ){ char* table; char* key; int value; char* info; int msgid; int msgid2; table = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); key = saacproto_wrapStringAddr( saacproto_stringwrapper[2] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[3] )); value = saacproto_demkstr_int( saacproto.token_list[4] ); info = saacproto_wrapStringAddr( saacproto_stringwrapper[4] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[5] )); msgid = saacproto_demkstr_int( saacproto.token_list[6] ); msgid2 = saacproto_demkstr_int( saacproto.token_list[7] ); saacproto_DBUpdateEntryInt_recv( fd,table,key,value,info,msgid,msgid2); return 0; } if( strcmp( funcname , "DBGetEntryRank" ) == 0 ){ char* table; char* key; int msgid; int msgid2; table = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); key = saacproto_wrapStringAddr( saacproto_stringwrapper[2] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[3] )); msgid = saacproto_demkstr_int( saacproto.token_list[4] ); msgid2 = saacproto_demkstr_int( saacproto.token_list[5] ); saacproto_DBGetEntryRank_recv( fd,table,key,msgid,msgid2); return 0; } #ifdef _ALLDOMAN // Syu ADD 排行榜NPC if ( strcmp( funcname , "UpdataStele" ) == 0 ) { char *cdkey; char *name; char *title; int level; int trns; int time; int floor; cdkey = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); name = saacproto_wrapStringAddr( saacproto_stringwrapper[2] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[3] )); title = saacproto_wrapStringAddr( saacproto_stringwrapper[3] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[4] )); level = saacproto_demkstr_int( saacproto.token_list[5] ); trns = saacproto_demkstr_int( saacproto.token_list[6] ); time = saacproto_demkstr_int( saacproto.token_list[7] ); floor = saacproto_demkstr_int( saacproto.token_list[8] ); saacproto_UpdataStele_recv ( fd , cdkey , name , title , level , trns , time , floor) ; return 0; } #endif if( strcmp( funcname , "DBDeleteEntryInt" ) == 0 ){ char* table; char* key; int msgid; int msgid2; table = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); key = saacproto_wrapStringAddr( saacproto_stringwrapper[2] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[3] )); msgid = saacproto_demkstr_int( saacproto.token_list[4] ); msgid2 = saacproto_demkstr_int( saacproto.token_list[5] ); saacproto_DBDeleteEntryInt_recv( fd,table,key,msgid,msgid2); return 0; } if( strcmp( funcname , "DBGetEntryInt" ) == 0 ){ char* table; char* key; int msgid; int msgid2; table = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); key = saacproto_wrapStringAddr( saacproto_stringwrapper[2] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[3] )); msgid = saacproto_demkstr_int( saacproto.token_list[4] ); msgid2 = saacproto_demkstr_int( saacproto.token_list[5] ); saacproto_DBGetEntryInt_recv( fd,table,key,msgid,msgid2); return 0; } if( strcmp( funcname , "DBGetEntryByRank" ) == 0 ){ char* table; int rank_start; int rank_end; int msgid; int msgid2; table = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); rank_start = saacproto_demkstr_int( saacproto.token_list[3] ); rank_end = saacproto_demkstr_int( saacproto.token_list[4] ); msgid = saacproto_demkstr_int( saacproto.token_list[5] ); msgid2 = saacproto_demkstr_int( saacproto.token_list[6] ); saacproto_DBGetEntryByRank_recv( fd,table,rank_start,rank_end,msgid,msgid2); return 0; } if( strcmp( funcname , "DBGetEntryByCount" ) == 0 ){ char* table; int count_start; int num; int msgid; int msgid2; table = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); count_start = saacproto_demkstr_int( saacproto.token_list[3] ); num = saacproto_demkstr_int( saacproto.token_list[4] ); msgid = saacproto_demkstr_int( saacproto.token_list[5] ); msgid2 = saacproto_demkstr_int( saacproto.token_list[6] ); saacproto_DBGetEntryByCount_recv( fd,table,count_start,num,msgid,msgid2); return 0; } if( strcmp( funcname , "Broadcast" ) == 0 ){ char* id; char* charname; char* message; int flag; id = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); charname = saacproto_wrapStringAddr( saacproto_stringwrapper[2] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[3] )); message = saacproto_wrapStringAddr( saacproto_stringwrapper[3] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[4] )); flag = saacproto_demkstr_int( saacproto.token_list[5] ); saacproto_Broadcast_recv( fd,id,charname,message,flag); return 0; } if( strcmp( funcname , "Message" ) == 0 ){ char* id_from; char* charname_from; char* id_to; char* charname_to; char* message; int option; id_from = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); charname_from = saacproto_wrapStringAddr( saacproto_stringwrapper[2] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[3] )); id_to = saacproto_wrapStringAddr( saacproto_stringwrapper[3] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[4] )); charname_to = saacproto_wrapStringAddr( saacproto_stringwrapper[4] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[5] )); message = saacproto_wrapStringAddr( saacproto_stringwrapper[5] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[6] )); option = saacproto_demkstr_int( saacproto.token_list[7] ); saacproto_Message_recv( fd,id_from,charname_from,id_to,charname_to,message,option); return 0; } if( strcmp( funcname , "MessageAck" ) == 0 ){ char* id; char* charname; char* result; int mesgid; id = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); charname = saacproto_wrapStringAddr( saacproto_stringwrapper[2] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[3] )); result = saacproto_wrapStringAddr( saacproto_stringwrapper[3] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[4] )); mesgid = saacproto_demkstr_int( saacproto.token_list[5] ); saacproto_MessageAck_recv( fd,id,charname,result,mesgid); return 0; } if( strcmp( funcname , "MessageFlush" ) == 0 ){ char* id; char* charname; id = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); charname = saacproto_wrapStringAddr( saacproto_stringwrapper[2] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[3] )); 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; #ifdef _PERSONAL_FAME int fame; #endif fmname = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); fmleadername = saacproto_wrapStringAddr(saacproto_stringwrapper[2], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[3])); fmleaderid = saacproto_wrapStringAddr(saacproto_stringwrapper[3], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[4])); fmleaderlv = saacproto_demkstr_int(saacproto.token_list[5]); petname = saacproto_wrapStringAddr(saacproto_stringwrapper[5], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[6])); petattr = saacproto_wrapStringAddr(saacproto_stringwrapper[6], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[7])); fmrule = saacproto_wrapStringAddr(saacproto_stringwrapper[7], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[8])); fmsprite = saacproto_demkstr_int(saacproto.token_list[9]); fmleadergrano = saacproto_demkstr_int(saacproto.token_list[10]); #ifdef _PERSONAL_FAME fame = saacproto_demkstr_int(saacproto.token_list[11]); charfdid = saacproto_demkstr_int(saacproto.token_list[12]); saacproto_ACAddFM_recv(fd, fmname, fmleadername, fmleaderid, fmleaderlv, petname, petattr, fmrule, fmsprite, fmleadergrano, fame, charfdid); #else charfdid = saacproto_demkstr_int(saacproto.token_list[11]); saacproto_ACAddFM_recv(fd, fmname, fmleadername, fmleaderid, fmleaderlv, petname, petattr, fmrule, fmsprite, fmleadergrano, charfdid); #endif return 0; } // 加入家族 if ( strcmp( funcname, "ACJoinFM") == 0){ #ifdef _PERSONAL_FAME // Arminius: 家族个人声望 int fmindex, charlv, charfdid, index, fame; #else int fmindex, charlv, charfdid, index; #endif char *fmname, *charname, *charid; fmname = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); fmindex = saacproto_demkstr_int(saacproto.token_list[3]); charname = saacproto_wrapStringAddr(saacproto_stringwrapper[3], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[4])); 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: 家族个人声望 fame = saacproto_demkstr_int(saacproto.token_list[8]); charfdid = saacproto_demkstr_int(saacproto.token_list[9]); saacproto_ACJoinFM_recv(fd, fmname, fmindex, charname, charid, charlv, index, fame, charfdid); #else charfdid = saacproto_demkstr_int(saacproto.token_list[8]); saacproto_ACJoinFM_recv(fd, fmname, fmindex, charname, charid, charlv, index, charfdid); #endif return 0; } // 退出家族 if ( strcmp( funcname, "ACLeaveFM") == 0){ int fmindex, charfdid, index; char *fmname, *charname, *charid; fmname = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); fmindex = saacproto_demkstr_int(saacproto.token_list[3]); charname = saacproto_wrapStringAddr(saacproto_stringwrapper[3], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[4])); charid = saacproto_wrapStringAddr(saacproto_stringwrapper[4], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[5])); index = saacproto_demkstr_int(saacproto.token_list[6]); charfdid = saacproto_demkstr_int(saacproto.token_list[7]); saacproto_ACLeaveFM_recv(fd, fmname, fmindex, charname, charid, index, charfdid); return 0; } // 解散家族 #ifdef _LEADERFUNCHECK if ( strcmp( funcname, "ACDelFM") == 0){ int fmindex, charfdid, index; char *fmname, *charname, *charid; fmname = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); fmindex = saacproto_demkstr_int(saacproto.token_list[3]); index = saacproto_demkstr_int(saacproto.token_list[4]); charname = saacproto_wrapStringAddr(saacproto_stringwrapper[4], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[5])); charid = saacproto_wrapStringAddr(saacproto_stringwrapper[5], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[6])); charfdid = saacproto_demkstr_int(saacproto.token_list[7]); saacproto_ACDelFM_recv(fd, fmname, fmindex, index, charname, charid, charfdid); return 0; } #else if ( strcmp( funcname, "ACDelFM") == 0){ int fmindex, charfdid, index; char *fmname; fmname = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); fmindex = saacproto_demkstr_int(saacproto.token_list[3]); index = saacproto_demkstr_int(saacproto.token_list[4]); charfdid = saacproto_demkstr_int(saacproto.token_list[5]); saacproto_ACDelFM_recv(fd, fmname, fmindex, index, charfdid); return 0; } #endif // 列出家族列表 if ( strcmp( funcname, "ACShowFMList") == 0){ saacproto_ACShowFMList_recv(fd); return 0; } // 列出成员列表 if ( strcmp( funcname, "ACShowMemberList") == 0){ int index; char *tmpbuf; tmpbuf = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); index = saacproto_demkstr_int(saacproto.token_list[3]); saacproto_ACShowMemberList_recv(fd, index); return 0; } // 列出家族详细资料 if ( strcmp( funcname, "ACFMDetail") == 0){ int fmindex, charfdid, index; char *fmname; fmname = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); fmindex = saacproto_demkstr_int(saacproto.token_list[3]); index = saacproto_demkstr_int(saacproto.token_list[4]); charfdid = saacproto_demkstr_int(saacproto.token_list[5]); saacproto_ACFMDetail_recv(fd, fmname, fmindex, index, charfdid); return 0; } // 列出家族留言 if (strcmp( funcname, "ACFMReadMemo") == 0){ int index; char *tmpbuf; tmpbuf = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); index = saacproto_demkstr_int(saacproto.token_list[3]); saacproto_ACFMReadMemo_recv(fd, index); return 0; } // 写入家族留言 if (strcmp( funcname, "ACFMWriteMemo") == 0){ int index, fmindex; char *fmname, *data; fmname = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); fmindex = saacproto_demkstr_int(saacproto.token_list[3]); data = saacproto_wrapStringAddr(saacproto_stringwrapper[3], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[4])); index = saacproto_demkstr_int(saacproto.token_list[5]); saacproto_ACFMWriteMemo_recv(fd, fmname, fmindex, data, index); return 0; } #ifdef _DEATH_FAMILY_GM_COMMAND // WON ADD 家族战GM指令 // reload 家族资料 if ( strcmp( funcname, "ACRELOADFM") == 0){ int charindex = -1; charindex = saacproto_demkstr_int(saacproto.token_list[2]); log("\n won test 40 ==> charindex(%d)", charindex ); saacproto_ACRELOADFM_recv( fd, charindex ); return 0; } if ( strcmp( funcname, "ACShowMemberList2") == 0){ int fm1 = -1, fm2 = -1, charindex = -1, time = -1, id = -1; charindex = saacproto_demkstr_int(saacproto.token_list[2]); fm1 = saacproto_demkstr_int(saacproto.token_list[3]); fm2 = saacproto_demkstr_int(saacproto.token_list[4]); time = saacproto_demkstr_int(saacproto.token_list[5]); id = saacproto_demkstr_int(saacproto.token_list[6]); log("\n won test 40 ==> charindex(%d) fm1(%d) fm2(%d) time(%d) id(%d)", charindex, fm1, fm2, time, id ); saacproto_ACShowMemberList_2_recv(fd, charindex, fm1, fm2, time, id ); return 0; } #endif #ifdef _DEATH_FAMILY_LOGIN_CHECK // WON ADD 家族战登入检查 // 玩家login2 if ( strcmp( funcname, "ACFMCharLogin2") == 0){ int charindex = -1; char *char_id, *char_name; char_id = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); char_name = saacproto_wrapStringAddr(saacproto_stringwrapper[2], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[3])); charindex = saacproto_demkstr_int(saacproto.token_list[4]); log("\n won test 4 ==> char_id(%s) char_name(%s) charindex(%d)", char_id, char_name, charindex ); saacproto_ACFMCharLogin2_recv(fd, char_id, char_name, charindex ); return 0; } #endif // 玩家login if ( strcmp( funcname, "ACFMCharLogin") == 0){ int fmindex, charlv, charfdid; #ifdef _FM_MODIFY int gsnum; #endif char *fmname, *charname, *charid; #ifdef _FMVER21 int eventflag; #endif fmname = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); fmindex = saacproto_demkstr_int(saacproto.token_list[3]); charname = saacproto_wrapStringAddr(saacproto_stringwrapper[3], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[4])); charid = saacproto_wrapStringAddr(saacproto_stringwrapper[4], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[5])); charlv = saacproto_demkstr_int(saacproto.token_list[6]); #ifdef _FMVER21 eventflag = saacproto_demkstr_int(saacproto.token_list[7]); charfdid = saacproto_demkstr_int(saacproto.token_list[8]); #ifdef _FM_MODIFY gsnum = saacproto_demkstr_int(saacproto.token_list[9]); saacproto_ACFMCharLogin_recv(fd, fmname, fmindex, charname,charid, charlv, eventflag, charfdid,gsnum); #else saacproto_ACFMCharLogin_recv(fd, fmname, fmindex, charname,charid, charlv, eventflag, charfdid); #endif #else charfdid = saacproto_demkstr_int(saacproto.token_list[7]); saacproto_ACFMCharLogin_recv(fd, fmname, fmindex, charname,charid, charlv, charfdid); #endif return 0; } // 玩家logout if ( strcmp( funcname, "ACFMCharLogout") == 0){ int fmindex, charfdid, charlv, index; char *fmname, *charname, *charid; fmname = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); fmindex = saacproto_demkstr_int(saacproto.token_list[3]); charname = saacproto_wrapStringAddr(saacproto_stringwrapper[3], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[4])); 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]); charfdid = saacproto_demkstr_int(saacproto.token_list[8]); saacproto_ACFMCharLogout_recv(fd, fmname, fmindex, charname, charid, charlv, index, charfdid); return 0; } // 族长审核成员加入家族、修改家族成员职位 if (strcmp( funcname, "ACMemberJoinFM") == 0){ int fmindex, charfdid, index, charindex, result; char *fmname, *charname; #ifdef _FMVER21 int meindex; #endif fmname = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); fmindex = saacproto_demkstr_int(saacproto.token_list[3]); charname = saacproto_wrapStringAddr(saacproto_stringwrapper[3], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[4])); charindex = saacproto_demkstr_int(saacproto.token_list[5]); index = saacproto_demkstr_int(saacproto.token_list[6]); result = saacproto_demkstr_int(saacproto.token_list[7]); #ifdef _FMVER21 meindex = saacproto_demkstr_int(saacproto.token_list[8]); charfdid = saacproto_demkstr_int(saacproto.token_list[9]); saacproto_ACMemberJoinFM_recv(fd, fmname, fmindex, charname, charindex, index, result, meindex, charfdid); #else charfdid = saacproto_demkstr_int(saacproto.token_list[8]); saacproto_ACMemberJoinFM_recv(fd, fmname, fmindex, charname, charindex, index, result, charfdid); #endif return 0; } // 族长审核成员离开家族 if (strcmp( funcname, "ACMemberLeaveFM") == 0){ int fmindex, charfdid, index, charindex; char *fmname, *charname; #ifdef _FMVER21 int meindex; #endif fmname = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); fmindex = saacproto_demkstr_int(saacproto.token_list[3]); charname = saacproto_wrapStringAddr(saacproto_stringwrapper[3], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[4])); charindex = saacproto_demkstr_int(saacproto.token_list[5]); index = saacproto_demkstr_int(saacproto.token_list[6]); #ifdef _FMVER21 meindex = saacproto_demkstr_int(saacproto.token_list[7]); charfdid = saacproto_demkstr_int(saacproto.token_list[8]); saacproto_ACMemberLeaveFM_recv(fd, fmname, fmindex, charname, charindex, index, meindex, charfdid); #else charfdid = saacproto_demkstr_int(saacproto.token_list[7]); saacproto_ACMemberLeaveFM_recv(fd, fmname, fmindex, charname, charindex, index, charfdid); #endif return 0; } // 列出家族据点 if ( strcmp( funcname, "ACFMPointList") == 0){ saacproto_ACFMPointList_recv(fd); return 0; } #ifdef _CK_ONLINE_PLAYER_COUNT // WON ADD 计算线上人数 if ( strcmp( funcname, "ACGSPCOUNT") == 0){ int playcount = 0; playcount = saacproto_demkstr_int(saacproto.token_list[2]); saacproto_GS_ACK_PLAYER_COUNT_recv( fd, playcount ); return 0; } #endif // 申请家族据点 if (strcmp( funcname, "ACSetFMPoint") == 0){ int fl, x, y, fmindex, index, fmpointindex, charfdid; char *fmname; fmname = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); fmindex = saacproto_demkstr_int(saacproto.token_list[3]); index = saacproto_demkstr_int(saacproto.token_list[4]); fmpointindex = saacproto_demkstr_int(saacproto.token_list[5]); fl = saacproto_demkstr_int(saacproto.token_list[6]); x = saacproto_demkstr_int(saacproto.token_list[7]); y = saacproto_demkstr_int(saacproto.token_list[8]); charfdid = saacproto_demkstr_int(saacproto.token_list[9]); saacproto_ACSetFMPoint_recv(fd, fmname, fmindex, index, fmpointindex, fl, x, y, charfdid); return 0; } // 设定家族据点 if (strcmp( funcname, "ACFixFMPoint") == 0){ int winindex, winfmindex, loseindex, losefmindex, village; char *winfmname, *losefmname; winfmname = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); winfmindex = saacproto_demkstr_int(saacproto.token_list[3]); winindex = saacproto_demkstr_int(saacproto.token_list[4]); losefmname = saacproto_wrapStringAddr(saacproto_stringwrapper[4], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[5])); losefmindex = saacproto_demkstr_int(saacproto.token_list[6]); loseindex = saacproto_demkstr_int(saacproto.token_list[7]); village= saacproto_demkstr_int(saacproto.token_list[8]); saacproto_ACFixFMPoint_recv(fd, winfmname, winfmindex, winindex, losefmname, losefmindex, loseindex, village); return 0; } // 族长对全员广播 if (strcmp( funcname, "ACFMAnnounce") == 0){ int index, fmindex, color; char *fmname, *data; fmname = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); fmindex = saacproto_demkstr_int(saacproto.token_list[3]); index = saacproto_demkstr_int(saacproto.token_list[4]); data = saacproto_wrapStringAddr(saacproto_stringwrapper[4], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[5])); color = saacproto_demkstr_int(saacproto.token_list[6]); saacproto_ACFMAnnounce_recv(fd, fmname, fmindex, index, data, color); return 0; } // 列出家族排行榜 if ( strcmp( funcname, "ACShowTopFMList") == 0){ int kindflag; char *tmpbuf; tmpbuf = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); kindflag = saacproto_demkstr_int(saacproto.token_list[3]); saacproto_ACShowTopFMList_recv(fd, kindflag); return 0; } // 修正家族资料 if (strcmp( funcname, "ACFixFMData") == 0){ int fmindex, charfdid, index, kindflag, charindex; char *fmname, *data1, *data2; fmname = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); fmindex = saacproto_demkstr_int(saacproto.token_list[3]); index = saacproto_demkstr_int(saacproto.token_list[4]); kindflag = saacproto_demkstr_int(saacproto.token_list[5]); data1 = saacproto_wrapStringAddr(saacproto_stringwrapper[5], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[6])); data2 = saacproto_wrapStringAddr(saacproto_stringwrapper[6], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[7])); charindex = saacproto_demkstr_int(saacproto.token_list[8]); charfdid = saacproto_demkstr_int(saacproto.token_list[9]); saacproto_ACFixFMData_recv(fd, fmname, fmindex, index, kindflag, data1, data2, charindex, charfdid); return 0; } #ifdef _FAMILYBANKSTONELOG if (strcmp( funcname, "ACgetFMBankgold") ==0){ int fmindex, charfdid, index, charindex; char *fmname; fmname = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); fmindex = saacproto_demkstr_int(saacproto.token_list[3]); index = saacproto_demkstr_int(saacproto.token_list[4]); charindex = saacproto_demkstr_int(saacproto.token_list[5]); charfdid = saacproto_demkstr_int(saacproto.token_list[6]); saacproto_ACgetFMBankgold_recv(fd, fmname, fmindex, index, charindex, charfdid); return 0; } #endif #ifdef _DEATH_FAMILY_STRUCT // WON ADD 家族战存放胜负资料 if (strcmp( funcname, "FMINITPKSTRUCT") == 0){ log("\n won test 300 ==>" ); set_fm_pk_score( "" ); // save_fm_pk_score(); return 0; } if (strcmp( funcname, "FMPKSTRUCT") == 0){ char *msg; msg = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); log("\n won test 54 ==> msg(%s)", msg ); set_fm_pk_score( msg ); // save_fm_pk_score(); return 0; } #endif // 家族PK後修正声望 if (strcmp( funcname, "ACFixFMPK") == 0){ int winindex, winfmindex, loseindex, losefmindex; char *winfmname, *losefmname; winfmname = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); winfmindex = saacproto_demkstr_int(saacproto.token_list[3]); winindex = saacproto_demkstr_int(saacproto.token_list[4]); losefmname = saacproto_wrapStringAddr(saacproto_stringwrapper[4], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[5])); losefmindex = saacproto_demkstr_int(saacproto.token_list[6]); loseindex = saacproto_demkstr_int(saacproto.token_list[7]); saacproto_ACFixFMPK_recv(fd, winfmname, winfmindex, winindex, losefmname, losefmindex, loseindex); return 0; } // GM修正家族资料 if (strcmp( funcname, "ACGMFixFMData") == 0){ int index, charfdid; char *cmd, *data, *tmpbuf,*charid; tmpbuf = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); index = saacproto_demkstr_int(saacproto.token_list[3]); charid = saacproto_wrapStringAddr(saacproto_stringwrapper[3], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[4])); cmd = saacproto_wrapStringAddr(saacproto_stringwrapper[4], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[5])); data = saacproto_wrapStringAddr(saacproto_stringwrapper[5], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[6])); charfdid = saacproto_demkstr_int(saacproto.token_list[7]); saacproto_ACGMFixFMData_recv(fd, index, charid, cmd, data, charfdid); return 0; } // 取得家族资料 if (strcmp( funcname, "ACGetFMData") == 0){ int fmindex, charfdid, index, kindflag; char *fmname; fmname = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); fmindex = saacproto_demkstr_int(saacproto.token_list[3]); index = saacproto_demkstr_int(saacproto.token_list[4]); kindflag = saacproto_demkstr_int(saacproto.token_list[5]); charfdid = saacproto_demkstr_int(saacproto.token_list[6]); saacproto_ACGetFMData_recv(fd, fmname, fmindex, index, kindflag, 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])); saacproto_ACManorPKAck_recv(fd, data); return 0; } #ifdef _CHECKFMSCHEDULE // Syu ADD 透过AC确认家族挑战排程 if (strcmp( funcname,"ACCheckSchedule") ==0) { char *data; data = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); saacproto_ACCheckSchedule_recv(fd,data); return 0; } #endif if (strcmp( funcname,"ACreLoadFmData") ==0){ int type, data; type = saacproto_demkstr_int(saacproto.token_list[2]); data = saacproto_demkstr_int(saacproto.token_list[3]); saacproto_ACreLoadFmData_recv( fd, type, data); return 0; } #ifdef _AC_SEND_FM_PK if (strcmp( funcname,"ACLoadFmPk") ==0) { int fmpks_pos; fmpks_pos = saacproto_demkstr_int(saacproto.token_list[2]); saacproto_ACLoadFmPk_recv(fd, fmpks_pos); return 0; } #ifdef _ACFMPK_LIST if (strcmp( funcname,"ACSendFmPk") ==0){ int fmpks_pos, userindex, flg; char *data; fmpks_pos = saacproto_demkstr_int(saacproto.token_list[2]); userindex = saacproto_demkstr_int(saacproto.token_list[3]); flg = saacproto_demkstr_int(saacproto.token_list[4]); data = saacproto_wrapStringAddr( saacproto_stringwrapper[4] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[5] )); saacproto_ACSendFmPk_recv( fd, fmpks_pos, userindex, flg, data); return 0; } #else if (strcmp( funcname,"ACSendFmPk") ==0){ int fmpks_pos; char *data; fmpks_pos = saacproto_demkstr_int(saacproto.token_list[2]); data = saacproto_wrapStringAddr( saacproto_stringwrapper[2] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[3] )); saacproto_ACSendFmPk_recv(fd, fmpks_pos, data); return 0; } #endif #endif #ifdef _RECAL_BACKUP_PLAYER // WON 回溯功能 if (strcmp( funcname,"ACSendRecalPlayer") ==0) { char *uid, *id; int userfdid, char_num, date, GmCliId, backup_flag; uid = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); userfdid = saacproto_demkstr_int(saacproto.token_list[3]); GmCliId = saacproto_demkstr_int(saacproto.token_list[4]); id = saacproto_wrapStringAddr( saacproto_stringwrapper[4] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[5] )); char_num = saacproto_demkstr_int(saacproto.token_list[6]); date = saacproto_demkstr_int(saacproto.token_list[7]); backup_flag = saacproto_demkstr_int(saacproto.token_list[8]); saacproto_ACRecalPlayer_recv(fd, uid, userfdid, GmCliId, id, char_num, date, backup_flag); return 0; } if (strcmp( funcname,"ACSendRecalBackup") ==0) { char *uid, *id, *char_data; int userfdid, char_num, date, GmCliId, backup_flag; uid = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); userfdid = saacproto_demkstr_int(saacproto.token_list[3]); GmCliId = saacproto_demkstr_int(saacproto.token_list[4]); id = saacproto_wrapStringAddr( saacproto_stringwrapper[4] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[5] )); char_num = saacproto_demkstr_int(saacproto.token_list[6]); date = saacproto_demkstr_int(saacproto.token_list[7]); char_data = saacproto_wrapStringAddr( saacproto_stringwrapper[7] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[8] )); backup_flag = saacproto_demkstr_int(saacproto.token_list[9]); saacproto_ACRecalBackup_recv(fd, uid, userfdid, GmCliId, id, char_num, date, char_data, backup_flag); return 0; } #endif // end RECAL_ASK_PLAYER #ifdef _AUCTIONEER if (strcmp( funcname,"ACAuctionSold") == 0){ char *data; data = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); saacproto_ACAuctionSold_recv(fd, data); return 0; } #endif #ifdef _NEW_PLAYERGOLD if (strcmp( funcname,"ACNewPlayerList") == 0){ int RunType=-1, userIndex=-1; char *CdKey, *UserName; CdKey = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); UserName = saacproto_wrapStringAddr(saacproto_stringwrapper[2], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[3])); userIndex = saacproto_demkstr_int(saacproto.token_list[4]); RunType = saacproto_demkstr_int(saacproto.token_list[5]); saacproto_ACNewPlayerList_recv( fd, CdKey, UserName, userIndex, RunType); return 0; } #endif #ifdef _DEFEND_NEWUSERS if( strcmp( funcname , "DEFENDLISTS" ) == 0 ){ char* data; int type; type = saacproto_demkstr_int(saacproto.token_list[2]); data = saacproto_wrapStringAddr( saacproto_stringwrapper[2] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[3] )); saacproto_DefendList_recv( fd, type, data); return 0; } if( strcmp( funcname , "CHECKDEFENDSCORE" ) == 0 ){ char *cdkey, *name; int userindex; cdkey = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); name = saacproto_wrapStringAddr( saacproto_stringwrapper[2] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[3] )); userindex = saacproto_demkstr_int(saacproto.token_list[4]); saacproto_CheckDefendScore_recv( fd, userindex, cdkey, name); return 0; } #endif #ifdef _CHAR_POOLITEM if( strcmp( funcname , "ACInsertPoolItem" ) == 0 ){ char *cdkey, *Pooldataarg; int clifdid, userindex; cdkey = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); Pooldataarg = saacproto_wrapStringAddr( saacproto_stringwrapper[2] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[3] )); userindex = saacproto_demkstr_int( saacproto.token_list[4] ); clifdid = saacproto_demkstr_int( saacproto.token_list[5] ); saacproto_ACCharInsertPoolItem_recv( fd, cdkey, userindex, clifdid, Pooldataarg); return 0; } if( strcmp( funcname , "ACSavePoolItem" ) == 0 ){ char *cdkey, *Pooldataarg; int clifdid, userindex; cdkey = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); Pooldataarg = saacproto_wrapStringAddr( saacproto_stringwrapper[2] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[3] )); userindex = saacproto_demkstr_int( saacproto.token_list[4] ); clifdid = saacproto_demkstr_int( saacproto.token_list[5] ); saacproto_ACCharSavePoolItem_recv( fd, cdkey, userindex, clifdid, Pooldataarg); return 0; } if( strcmp( funcname , "ACGetPoolItem" ) == 0 ){ char *cdkey; int clifdid, userindex, npcid; cdkey = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); userindex = saacproto_demkstr_int( saacproto.token_list[3] ); clifdid = saacproto_demkstr_int( saacproto.token_list[4] ); npcid = saacproto_demkstr_int( saacproto.token_list[5] ); saacproto_ACCharGetPoolItem_recv( fd, cdkey, userindex, clifdid, npcid); return 0; } #endif #ifdef _CHAR_POOLPET if( strcmp( funcname , "ACInsertPoolPet" ) == 0 ){ char *cdkey, *Pooldataarg; int clifdid, userindex; cdkey = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); Pooldataarg = saacproto_wrapStringAddr( saacproto_stringwrapper[2] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[3] )); userindex = saacproto_demkstr_int( saacproto.token_list[4] ); clifdid = saacproto_demkstr_int( saacproto.token_list[5] ); saacproto_ACCharInsertPoolPet_recv( fd, cdkey, userindex, clifdid, Pooldataarg); return 0; } if( strcmp( funcname , "ACSavePoolPet" ) == 0 ){ char *cdkey, *Pooldataarg; int clifdid, userindex; cdkey = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); Pooldataarg = saacproto_wrapStringAddr( saacproto_stringwrapper[2] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[3] )); userindex = saacproto_demkstr_int( saacproto.token_list[4] ); clifdid = saacproto_demkstr_int( saacproto.token_list[5] ); saacproto_ACCharSavePoolPet_recv( fd, cdkey, userindex, clifdid, Pooldataarg); return 0; } if( strcmp( funcname , "ACGetPoolPet" ) == 0 ){ char *cdkey; int clifdid, userindex, npcid; cdkey = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); userindex = saacproto_demkstr_int( saacproto.token_list[3] ); clifdid = saacproto_demkstr_int( saacproto.token_list[4] ); npcid = saacproto_demkstr_int( saacproto.token_list[5] ); saacproto_ACCharGetPoolPet_recv( fd, cdkey, userindex, clifdid, npcid); return 0; } #endif #ifdef _UNIVERSE_CHATROOM if( strcmp( funcname , "ACUniChatroom" ) == 0 ){ char *cdkey, *data; int clifdid, userindex; cdkey = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); data = saacproto_wrapStringAddr( saacproto_stringwrapper[2] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[3] )); userindex = saacproto_demkstr_int( saacproto.token_list[4] ); clifdid = saacproto_demkstr_int( saacproto.token_list[5] ); saacproto_ACUniChatroom_recv( fd, cdkey, data, userindex, clifdid ); return 0; } #endif #ifdef _ANGEL_SUMMON if( strcmp( funcname , "ACMissionTable" ) == 0 ){ int num; int type; char* data; //int charaindex; char* angelinfo; num = saacproto_demkstr_int( saacproto.token_list[2] ); type = saacproto_demkstr_int( saacproto.token_list[3] ); data = saacproto_wrapStringAddr( saacproto_stringwrapper[3] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[4] )); //charaindex = saacproto_demkstr_int( saacproto.token_list[5] ); angelinfo = saacproto_wrapStringAddr( saacproto_stringwrapper[4] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[5] )); saacproto_ACMissionTable_recv( fd, num, type, data, angelinfo); return 0; } #endif #ifdef _TEACHER_SYSTEM if( strcmp( funcname , "ACCheckCharacterOnLine" ) == 0 ){ int charaindex,flag; char *id; char *name; charaindex = saacproto_demkstr_int( saacproto.token_list[2] ); id = saacproto_wrapStringAddr( saacproto_stringwrapper[2] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[3] )); name = saacproto_wrapStringAddr( saacproto_stringwrapper[3] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[4] )); flag = saacproto_demkstr_int( saacproto.token_list[5] ); saacproto_ACCheckCharacterOnLine_recv(fd,charaindex,id,name,flag); return 0; } #endif #ifdef _RACEMAN if( strcmp( funcname , "ACRaceRecordandSort" ) == 0 ){ int charaindex,racetype,catchcnt,ranknum; char *id; char *name; char *code; charaindex = saacproto_demkstr_int( saacproto.token_list[2] ); code = saacproto_wrapStringAddr( saacproto_stringwrapper[2] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[3] )); 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要排名到几个 saacproto_ACRaceRecordandSort_recv( fd , charaindex , code , id , name , racetype , catchcnt ,ranknum ); return 0; } if( strcmp( funcname , "ACRaceRecordfmdo" ) == 0 ){ int charaindex; int fmid , bbi; char *unicode , *petname; charaindex = saacproto_demkstr_int( saacproto.token_list[2] ); fmid = saacproto_demkstr_int( saacproto.token_list[3] ); bbi = saacproto_demkstr_int( saacproto.token_list[4] ); unicode = saacproto_wrapStringAddr( saacproto_stringwrapper[4] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[5] )); petname = saacproto_wrapStringAddr( saacproto_stringwrapper[5] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[6] )); saacproto_ACRaceRecordfmdo_recv( fd , charaindex , fmid , bbi , unicode , petname ); return 0; } #endif sprintf( debugfun, "%s", funcname); return -1; } void saacproto_ACServerLogin_send( int fd,char* result,char* data ) { saacproto_CreateHeader( saacproto.work , "ACServerLogin" ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( result ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( data ) ,saacproto.workbufsize ); saacproto_Send( fd , saacproto.work ); } void saacproto_ACCharList_send( int fd,char* result,char* output,int id ) { saacproto_CreateHeader( saacproto.work , "ACCharList" ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( result ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( output ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( id ) ,saacproto.workbufsize ); saacproto_Send( fd , saacproto.work ); } static int CharDataLens = 0; #ifdef _NewSave void saacproto_ACCharLoad_send( int fd,char* result,char* data,int id,int charindex ) #else void saacproto_ACCharLoad_send( int fd,char* result,char* data,int id ) #endif { if( strstr( result, "successful") != NULL && strlen( data) > CharDataLens ){ CharDataLens = strlen( data); //andy_log log("最大数据长度:%d\n", CharDataLens ); } saacproto_CreateHeader( saacproto.work , "ACCharLoad" ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( result ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( data ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( id ) ,saacproto.workbufsize ); #ifdef _NewSave saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( charindex ) ,saacproto.workbufsize ); #endif saacproto_Send( fd , saacproto.work ); } #ifdef _RELOGIN void saacproto_ACCharLoadII_send( int fd,char* result,char* data,int id,int charindex,int gs1,int gs2 ) { saacproto_CreateHeader( saacproto.work , "ACCharLoadII" ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( result ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( data ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( id ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( charindex ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( gs1 ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( gs2 ) ,saacproto.workbufsize ); saacproto_Send( fd , saacproto.work ); } #endif /* 214 :
  • servertoclient ACCharSave( string result , string data,int id);
    215 : ACCharSave卞覆允月忒蚕[ 216 :

    217 :
    218 :
    string result 219 :
    "successful" , "failed" 及中勿木井[ 220 :
    string data 221 :
    "failed"及凛反 毛憎允谛棉及苇化坌月 侬 匹丐月[ 222 :
    int id 223 :
    娄醒及id毛公及引引戊疋□仄化忒允 224 :
    225 :
    226 :
    227 : 228 : 229 : 230 : */ void saacproto_ACCharSave_send( int fd,char* result,char* data,int id ) { saacproto_CreateHeader( saacproto.work , "ACCharSave" ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( result ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( data ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( id ) ,saacproto.workbufsize ); saacproto_Send( fd , saacproto.work ); } #ifdef _RELOGIN void saacproto_ACCharSaveII_send( int fd,char* result,char* data,int id,int gs1,int gs2 ) { saacproto_CreateHeader( saacproto.work , "ACCharSaveII" ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( result ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( data ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( id ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( gs1 ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( gs2 ) ,saacproto.workbufsize ); saacproto_Send( fd , saacproto.work ); } #endif /* 256 :
  • servertoclient ACCharDelete(string result, string data,int id);
    257 : ACCharDelete卞覆允月忒蚕[ 258 :

    259 :
    260 :
    string result 261 :
    "successful" , "failed" 及中勿木井[ 262 :
    string data 263 :
    "failed"及凛反 毛憎允谛棉及苇化坌月 侬 匹丐月[ 264 :
    int id 265 :
    娄醒及id及公及引引及戊疋□ 266 : 267 :
    268 :
    269 :
    270 : */ void saacproto_ACCharDelete_send( int fd,char* result,char* data,int id ) { saacproto_CreateHeader( saacproto.work , "ACCharDelete" ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( result ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( data ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( id ) ,saacproto.workbufsize ); saacproto_Send( fd , saacproto.work ); } /* 290 :
  • servertoclient ACLock( string result, string data ,int id);
    291 : ACLock卞覆允月忒蚕[ 292 :

    293 :
    294 :
    string result 295 :
    "successful" , "failed" 及中勿木井[ 296 :
    string data 297 :
    "failed"及凛反 毛憎允谛棉及苇化坌月 侬 匹丐月[ 298 :
    int id 299 :
    娄醒及id及公及引引戊疋□ 300 :
    301 :
    302 :
    303 : */ void saacproto_ACLock_send( int fd,char* result,char* data,int id ) { saacproto_CreateHeader( saacproto.work , "ACLock" ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( result ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( data ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( id ) ,saacproto.workbufsize ); saacproto_Send( fd , saacproto.work ); } /* 318 :
  • servertoclient ACUCheck( string mem_id );
    319 : 失市它件玄扔□田□井日必□丞扔□田□卞覆仄化}丐月交□扒□互蜇箕夫弘奶件 320 : 仄化中月井升丹井毛民尼永弁允月[ 321 :

    322 :
    323 :
    string mem_id 324 :
    譬屯月覆擂及交□扒□及gamersDream member id 325 :
    326 :

    327 : 328 : */ void saacproto_ACUCheck_send( int fd,char* mem_id ) { saacproto_CreateHeader( saacproto.work , "ACUCheck" ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( mem_id ) ,saacproto.workbufsize ); saacproto_Send( fd , saacproto.work ); } /* 344 :
  • servertoclient DBUpdateEntryString( string result, string table, string key, int msgid, int msgid2 );
    345 : 晓及戊穴件玉及瑛绊[撩 仄化手荚汊尕第 卅及匹 骰仄化方中冗 346 :
    347 :
    string result 348 :
    successful 井failed 349 :
    string table 350 :
    351 :
    int msgid 352 :
    353 :
    int msgid2 354 :
    355 :
    356 : */ void saacproto_DBUpdateEntryString_send( int fd,char* result,char* table,char* key,int msgid,int msgid2 ) { saacproto_CreateHeader( saacproto.work , "DBUpdateEntryString" ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( result ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( table ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( key ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( msgid ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( msgid2 ) ,saacproto.workbufsize ); saacproto_Send( fd , saacproto.work ); } /* 369 :
  • servertoclient DBDeleteEntryString( string result, string table, string key , int msgid , int msgid2 );
    370 : 侬 巨件玄伉及绰轮及瑛绊 371 :
    372 :
    string result 373 :
    successful / failed 374 :
    string table 375 :
    376 :
    string key 377 :
    378 :
    int msgid 379 :
    380 :
    int msgid2 381 :
    382 :
    383 : */ void saacproto_DBDeleteEntryString_send( int fd,char* result,char* table,char* key,int msgid,int msgid2 ) { saacproto_CreateHeader( saacproto.work , "DBDeleteEntryString" ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( result ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( table ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( key ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( msgid ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( msgid2 ) ,saacproto.workbufsize ); saacproto_Send( fd , saacproto.work ); } /* 396 :
  • servertoclient DBGetEntryString( string result, string value, string table, string key, int msgid, int msgid2 );
    397 : 潸曰分仄及忒曰袄 398 :
    399 :
    string result 400 :
    successful / failed 401 :
    string value 402 :
    袄 403 :
    string table 404 :
    405 :
    string key 406 :
    407 :
    int msgid 408 :
    409 :
    int msgid2 410 :
    411 :
    412 : */ void saacproto_DBGetEntryString_send( int fd,char* result,char* value,char* table,char* key,int msgid,int msgid2 ) { saacproto_CreateHeader( saacproto.work , "DBGetEntryString" ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( result ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( value ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( table ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( key ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( msgid ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( msgid2 ) ,saacproto.workbufsize ); saacproto_Send( fd , saacproto.work ); } /* 435 :
  • servertoclient DBUpdateEntryInt( string result , string table, string key, int msgid, int msgid2 );
    436 : DBUpdateEntry及瑛绊[ 437 :
    438 :
    string result 439 :
    succesful/failed 440 :
    string table 441 :
    □皮伙 毛公及引引井尹允 442 :
    string key 443 :
    平□毛公及引引井尹允 444 :
    int msgid, int msgid2 445 :
    msgid 毛公及引引忒允[ 446 :
    447 :

    448 : */ #ifdef _ALLDOMAN // Syu ADD 排行榜NPC void saacproto_UpdataStele_send( int fd , char *data ) { saacproto_CreateHeader( saacproto.work , "UpdataStele" ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( data ) ,saacproto.workbufsize ); saacproto_Send( fd , saacproto.work ); } void saacproto_S_UpdataStele_send( int fd , char *ocdkey , char *oname , char *ncdkey , char *nname , char *title , int level , int trns , int floor ) { saacproto_CreateHeader( saacproto.work , "S_UpdataStele" ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( ocdkey ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( oname ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( ncdkey ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( nname ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( title ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( level ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( trns ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( floor ) ,saacproto.workbufsize ); saacproto_Send( fd , saacproto.work ); } #endif void saacproto_DBUpdateEntryInt_send( int fd,char* result,char* table,char* key,int msgid,int msgid2 ) { saacproto_CreateHeader( saacproto.work , "DBUpdateEntryInt" ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( result ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( table ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( key ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( msgid ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( msgid2 ) ,saacproto.workbufsize ); saacproto_Send( fd , saacproto.work ); } /* 463 :
  • servertoclient DBGetEntryRank( string result , int rank , int count, string table, string key, int msgid, int msgid2 );
    464 : 赐匏毛忒允[ 465 :
    466 :
    string result 467 :
    successful/failed 468 :
    int rank 469 :
    赐匏[1动晓及袄毛潸月[ 470 :
    int count 471 :
    晓井日中仁勾户井[ 赓及巨件玄伉反0井日反元引月[ 472 :
    string table 473 :
    □皮伙 毛公及引引井尹允 474 :
    string key 475 :
    平□毛公及引引井尹允 476 :
    int msgid, int msgid2 477 :
    msgid 毛公及引引忒允 478 :
    479 :

    480 : 481 : */ void saacproto_DBGetEntryRank_send( int fd,char* result,int rank,int count,char* table,char* key,int msgid,int msgid2 ) { saacproto_CreateHeader( saacproto.work , "DBGetEntryRank" ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( result ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( rank ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( count ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( table ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( key ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( msgid ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( msgid2 ) ,saacproto.workbufsize ); saacproto_Send( fd , saacproto.work ); } /* 494 :
  • servertoclient DBDeleteEntryInt( string result , string table, string key, int msgid, int msgid2 );
    495 : 绰轮及瑛绊 496 :
    497 :
    string result 498 :
    successful/failed 499 :
    string table 500 :
    □皮伙 毛公及引引井尹允 501 :
    string key 502 :
    平□毛公及引引井尹允 503 :
    int msgid, int msgid2 504 :
    msgid 毛公及引引忒允 505 :
    506 :

    507 : */ void saacproto_DBDeleteEntryInt_send( int fd,char* result,char* table,char* key,int msgid,int msgid2 ) { saacproto_CreateHeader( saacproto.work , "DBDeleteEntryInt" ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( result ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( table ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( key ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( msgid ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( msgid2 ) ,saacproto.workbufsize ); saacproto_Send( fd , saacproto.work ); } /* 520 :
  • servertoclient DBGetEntryInt( string result , int value , string table, string key, int msgid, int msgid2 );
    521 : 巨件玄伉及袄毛井尹允 522 :
    523 :
    string result 524 :
    successful/failed 525 :
    int value 526 :
    袄公及手及 527 :
    string table 528 :
    □皮伙 毛公及引引井尹允 529 :
    string key 530 :
    平□毛公及引引井尹允 531 :
    int msgid, int msgid2 532 :
    msgid 毛公及引引忒允 533 :
    534 : 535 : 536 : */ void saacproto_DBGetEntryInt_send( int fd,char* result,int value,char* table,char* key,int msgid,int msgid2 ) { saacproto_CreateHeader( saacproto.work , "DBGetEntryInt" ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( result ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( value ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( table ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( key ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( msgid ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( msgid2 ) ,saacproto.workbufsize ); saacproto_Send( fd , saacproto.work ); } /* 552 :
  • servertoclient DBGetEntryByRank( string result , string list , string table, int msgid, int msgid2 );
    553 : DBGetEntryByRank及瑛绊[ 554 :
    555 :
    string result 556 :
    557 :
    string list 558 :
    "RANK,KEY,SCORE,INFO|RANK,KEY,SCORE,INFO|...."
    559 : RANK反赐匏匹丐月[KEY反公及赐匏卞卅匀化中月旦戊失毛手匀化中月 560 : 平□[SCORE反帮醒袄匹旦戊失匹丐月[ 561 : [
    562 : "1,RINGO,123465,data1|2,HOGE,4567,data2|2,FUCK,4567,data3"
    563 : 仇及 分午}2匏反2谛中月仇午卞卅月[ 564 :
    string table 565 :
    □皮伙 566 :
    int msgid, int msgid2 567 :
    568 :
    569 : 570 : */ void saacproto_DBGetEntryByRank_send( int fd,char* result,char* list,char* table,int msgid,int msgid2 ) { saacproto_CreateHeader( saacproto.work , "DBGetEntryByRank" ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( result ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( list ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( table ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( msgid ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( msgid2 ) ,saacproto.workbufsize ); saacproto_Send( fd , saacproto.work ); } /* 583 :
  • servertoclient DBGetEntryByCount( string result , string list , string table, int count_start, int msgid, int msgid2 );
    584 : DBGetEntryByCount 及瑛绊[ 585 :
    586 :
    string result 587 :
    SUCCESSFUL/FAILED 588 :
    string list 589 :
    请 伉旦玄[1巨件玄伉丐凶曰 "INDEX,RANK,KEY,SCORE,INFO" 及4蜊及树 590 : 及赚匹丐曰}公木互蜊醒坌 "|" 匹勾卅互月[蜊醒互0及桦宁反 591 : 坞 侬 [ 592 :
    int num 593 :
    中仁勾午曰分允井[1卅日1蜊[2卅日2蜊[ 594 :
    int msgid ,msgid2 595 :
    丢永本□斥ID. 596 :
    597 : */ void saacproto_DBGetEntryByCount_send( int fd,char* result,char* list,char* table,int count_start,int msgid,int msgid2 ) { saacproto_CreateHeader( saacproto.work , "DBGetEntryByCount" ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( result ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( list ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( table ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( count_start ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( msgid ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( msgid2 ) ,saacproto.workbufsize ); saacproto_Send( fd , saacproto.work ); } /* 611 :
  • servertoclient Broadcast( string id, string charname, string message );
    612 : Broadcast及失市它件玄扔□田□井日必□丞扔□田□尺及霜耨迕 613 :
    614 :
    string id 615 :
    user ID 616 :
    string charname 617 :
    character name 618 :
    string message 619 :
    丢永本□斥 620 :
    int flag 621 :
    1卞允月午}愤坌卞卞反 霜今木卅中[ 622 :
    623 : */ void saacproto_Broadcast_send( int fd,char* id,char* charname,char* message ) { saacproto_CreateHeader( saacproto.work , "Broadcast" ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( id ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( charname ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( message ) ,saacproto.workbufsize ); saacproto_Send( fd , saacproto.work ); } /* 642 :
  • servertoclient Message( string id_from, string charname_from, string id_to, string charname_to, string message , int option , int mesgid );
    643 : 失市它件玄扔□田□井日必□丞扔□田□卞丢永本□斥毛霜耨允月[ 644 :
    645 :
    string id_from 646 :
    from ID 647 :
    string charname_from 648 :
    from character name 649 :
    string id_to 650 :
    to ID 651 :
    string charname_to 652 :
    to character name 653 :
    string message 654 :
    丢永本□斥及 655 :
    int option 656 :
    左皿扑亦件(晓及楮醒毛辅寰) 657 :
    int mesgid 658 :
    丢永本□斥ID 失市它件玄扔□田□及栋 迕 659 :
    660 : */ void saacproto_Message_send( int fd,char* id_from,char* charname_from,char* id_to,char* charname_to,char* message,int option,int mesgid ) { saacproto_CreateHeader( saacproto.work , "Message" ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( id_from ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( charname_from ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( id_to ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( charname_to ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( message ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( option ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( mesgid ) ,saacproto.workbufsize ); saacproto_Send( fd , saacproto.work ); } void saacproto_SetServerLogFiles( char *r , char *w ) { saacproto_strcpysafe( saacproto_writelogfilename , w , sizeof(saacproto_writelogfilename )); saacproto_strcpysafe( saacproto_readlogfilename , r , sizeof(saacproto_readlogfilename )); } int saacproto_InitServer( int (*writefunc)(int,char*,int) , int worksiz ) { int i; if( (void*)writefunc == NULL){saacproto.write_func = saacproto_default_write_wrap;} else {saacproto.write_func = writefunc;} saacproto_AllocateCommonWork(worksiz); saacproto_stringwrapper = (char**)calloc( 1,sizeof(char*) * MAXLSRPCARGS); if(saacproto_stringwrapper ==NULL)return -1; memset( saacproto_stringwrapper , 0, sizeof(char*)*MAXLSRPCARGS); for(i=0;i