#include "version.h" #define _SAACPROTOCLI_C_ #include "version.h" #include "saacproto_cli.h" #include #include #include #include "common.h" #include "net.h" #ifdef _SEND_EFFECT // WON ADD AC送下雪、下雨等特效 #include "chatmagic.h" #endif extern char *DebugMainFunction; #define IS_2BYTEWORD( _a_ ) ( (char)(0x80) <= (_a_) && (_a_) <= (char)(0xFF) ) /* 90 :
  • clienttoserver ACServerLogin(string servername,string serverpas);
    91 : 必□丞扔□田□互失市它件玄扔□田□卞夫弘奶件允月午五卞银丹[ 92 : 涛粮毛舰匀凶丐午}仇及夫弘奶件毛仄卅中午允屯化及扔□申旦毛仄卅中[ 93 :

    94 :
    95 :
    string servername 96 :
    扔□田□ [acserv.cf卞涩烂今木化中月[ 97 :
    string serverpas 98 :
    扔□田□由旦伐□玉[acserv.cf卞涩烂今木化中月[ 99 :
    100 : */ #ifdef _ALLDOMAN // (不可开) Syu ADD 排行榜NPC void saacproto_UpdataStele_send( int fd , char *cdkey , char *name , char *title , int level , int trns , int time , int floor) { saacproto_CreateHeader( saacproto.work , "UpdataStele" ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( cdkey ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( name ) ,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( time ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( floor ) ,saacproto.workbufsize ); saacproto_Send( fd , saacproto.work ); } #endif void saacproto_ACServerLogin_send( int fd,char* servername,char* serverpas ) { saacproto_CreateHeader( saacproto.work , "ACServerLogin" ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( servername ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( serverpas ) ,saacproto.workbufsize ); saacproto_Send( fd , saacproto.work ); } /* 114 :
  • clienttoserver ACServerLogout(void);
    115 : 扔□田□互失市它件玄扔□田□井日夫弘失它玄允月午五卞银丹[ 116 : 涛粮反扔□田卞方匀化 澎卞濠日木月[仄凶互匀化仇木卞覆允月失市它件玄扔□田 117 : 及忒蚕反戊生弁扑亦件毛濠月仪匹丐月[ 118 :
    119 :
    120 :
    121 : 122 : */ void saacproto_ACServerLogout_send( int fd ) { saacproto_CreateHeader( saacproto.work , "ACServerLogout" ); saacproto_strcatsafe( saacproto.work , "" ,saacproto.workbufsize ); saacproto_Send( fd , saacproto.work ); } #ifdef _PKSEVER_VER void saacproto_ACCharList_send( int fd,char* id,char* pas,int mesgid, int star) #else void saacproto_ACCharList_send( int fd,char* id,char* pas,int mesgid ) #endif { saacproto_CreateHeader( saacproto.work , "ACCharList" ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( id ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( pas ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( mesgid ) ,saacproto.workbufsize ); #ifdef _PKSEVER_VER saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( star ) ,saacproto.workbufsize ); #endif saacproto_Send( fd , saacproto.work ); } void saacproto_ACCharLoad_send( int fd,char* id,char* pas,char* charname,int lock,char* opt,int mesgid,char* ip ) { saacproto_CreateHeader( saacproto.work , "ACCharLoad" ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( id ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( pas ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( charname ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( lock ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( opt ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( mesgid ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( ip ) ,saacproto.workbufsize ); saacproto_Send( fd , saacproto.work ); } #ifdef _NEWSAVE void saacproto_ACCharSave_send( int fd,char* id,char* charname,char* opt,char* charinfo,int unlock,int mesgid,int saveindex ) #else void saacproto_ACCharSave_send( int fd,char* id,char* charname,char* opt,char* charinfo,int unlock,int mesgid ) #endif { saacproto_CreateHeader( saacproto.work , "ACCharSave" ); 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( opt ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( charinfo ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( unlock ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( mesgid ) ,saacproto.workbufsize ); #ifdef _NEWSAVE saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( saveindex ) ,saacproto.workbufsize ); #endif saacproto_Send( fd , saacproto.work ); } void saacproto_ACCharDelete_send( int fd,char* id,char* passwd,char* charname,char* option,int mesgid, char* userip ) { saacproto_CreateHeader( saacproto.work , "ACCharDelete" ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( id ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( passwd ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( charname ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( option ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( mesgid ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( userip ) ,saacproto.workbufsize ); saacproto_Send( fd , saacproto.work ); } void saacproto_ACLock_send( int fd,char* id,int lock,int mesgid ) { saacproto_CreateHeader( saacproto.work , "ACLock" ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( id ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( lock ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( mesgid ) ,saacproto.workbufsize ); saacproto_Send( fd , saacproto.work ); } void saacproto_ACUCheck_send( int fd,char* mem_id,int status ) { saacproto_CreateHeader( saacproto.work , "ACUCheck" ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( mem_id ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( status ) ,saacproto.workbufsize ); saacproto_Send( fd , saacproto.work ); } void saacproto_DBUpdateEntryString_send( int fd,char* table,char* key,char* value,int msgid,int msgid2 ) { saacproto_CreateHeader( saacproto.work , "DBUpdateEntryString" ); 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_string( value ) ,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 ); } void saacproto_DBDeleteEntryString_send( int fd,char* table,char* key,int msgid,int msgid2 ) { saacproto_CreateHeader( saacproto.work , "DBDeleteEntryString" ); 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 ); } void saacproto_DBGetEntryString_send( int fd,char* table,char* key,int msgid,int msgid2 ) { saacproto_CreateHeader( saacproto.work , "DBGetEntryString" ); 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 ); } void saacproto_DBUpdateEntryInt_send( int fd,char* table,char* key,int value,char* info,int msgid,int msgid2 ) { saacproto_CreateHeader( saacproto.work , "DBUpdateEntryInt" ); 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( value ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( info ) ,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 ); } void saacproto_DBGetEntryRank_send( int fd,char* table,char* key,int msgid,int msgid2 ) { saacproto_CreateHeader( saacproto.work , "DBGetEntryRank" ); 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 ); } void saacproto_DBDeleteEntryInt_send( int fd,char* table,char* key,int msgid,int msgid2 ) { saacproto_CreateHeader( saacproto.work , "DBDeleteEntryInt" ); 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 ); } void saacproto_DBGetEntryInt_send( int fd,char* table,char* key,int msgid,int msgid2 ) { saacproto_CreateHeader( saacproto.work , "DBGetEntryInt" ); 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 ); } void saacproto_DBGetEntryByRank_send( int fd,char* table,int rank_start,int rank_end,int msgid,int msgid2 ) { saacproto_CreateHeader( saacproto.work , "DBGetEntryByRank" ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( table ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( rank_start ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( rank_end ) ,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 ); } void saacproto_DBGetEntryByCount_send( int fd,char* table,int count_start,int num,int msgid,int msgid2 ) { saacproto_CreateHeader( saacproto.work , "DBGetEntryByCount" ); 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( num ) ,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 ); } /* 608 :
  • clienttoserver Broadcast( string id, string charname, string message , int flag );
    609 : 必□丞扔□田□卞覆仄化仇及戊穴件玉毛霜耨允月午} 610 : 允屯化及必□丞扔□田□卞凶中仄化 元丢永本□斥互霜耨今木月[ 611 : id , charname 反方仁勾井歹木月及匹}蜊 及娄醒毛手勾方丹卞仄凶[ 612 : 中切中切 侬 由□旦及伙□民件毛踏井卅仁化手中中方丹卞[ 613 :
    614 :
    string id 615 :
    user ID 616 :
    string charname 617 :
    平乓仿 (巨旦弗□皿卅仄) 618 :
    string message 619 :
    霜今木月丢永本□斥[必□丞扔□田□互驯五卞银丹[ 620 :
    */ void saacproto_Broadcast_send( int fd,char* id,char* charname,char* message,int flag ) { 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_strcatsafe( saacproto.work , saacproto_mkstr_int( flag ) ,saacproto.workbufsize ); saacproto_Send( fd , saacproto.work ); } /* 634 :
  • clienttoserver Message( string id_from, string charname_from, string id_to, string charname_to, string message , int option );
    635 : 奶件旦正件玄丢永本□斥毛霜耨允月 636 :
    637 :
    string id_from 638 :
    from ID 639 :
    string charname_from 640 :
    from Character name 641 :
    string id_to 642 :
    to ID 643 :
    string charname_to 644 :
    to character name 645 :
    string message 646 :
    丢永本□斥 647 :
    int option 648 :
    左皿扑亦件[民乓永玄及缙午井中欠中欠 木木月[漆 及傀舰迕 649 : 仇木毛升丹银丹井反必□丞扔□田□及 澎匹}失市它件玄扔□田□反 650 : 域濠仇及 卞正永民仄卅中 651 :
    */ void saacproto_Message_send( int fd,char* id_from,char* charname_from,char* id_to,char* charname_to,char* message,int option ) { 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_Send( fd , saacproto.work ); } void saacproto_MessageAck_send( int fd,char* id,char* charname,char* result,int mesgid ) { saacproto_CreateHeader( saacproto.work , "MessageAck" ); 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( result ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_int( mesgid ) ,saacproto.workbufsize ); saacproto_Send( fd , saacproto.work ); } void saacproto_MessageFlush_send( int fd,char* id,char* charname ) { saacproto_CreateHeader( saacproto.work , "MessageFlush" ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( id ) ,saacproto.workbufsize ); saacproto_strcatsafe( saacproto.work , saacproto_mkstr_string( charname ) ,saacproto.workbufsize ); saacproto_Send( fd , saacproto.work ); } /************************************************************ * CoolFish: Family 2001/5/18 ***********************************************************/ #ifdef _PERSONAL_FAME void saacproto_ACAddFM_send(int fd, char *fmname, char *fmleadername, char *fmleaderid, int fmleaderlv, char *petname, char *petattr, char *fmrule, int fmsprite, int fmleadergrano, int fame, int charfdid) #else void saacproto_ACAddFM_send(int fd, char *fmname, char *fmleadername, char *fmleaderid, int fmleaderlv, char *petname, char *petattr, char *fmrule, int fmsprite, int fmleadergrano, int charfdid) #endif { saacproto_CreateHeader(saacproto.work, "ACAddFM"); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(fmname), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(fmleadername), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(fmleaderid), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(fmleaderlv), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(petname), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(petattr), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(fmrule), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(fmsprite), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(fmleadergrano), saacproto.workbufsize); // #ifdef _PERSONAL_FAME saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(fame), saacproto.workbufsize); // #endif saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(charfdid), saacproto.workbufsize); saacproto_Send(fd, saacproto.work); } #ifdef _PERSONAL_FAME // Arminius: 家族个人声望 void saacproto_ACJoinFM_send(int fd, char *fmname, int fmindex, char *charname, char *charid, int charlv, int index, int fame, int charfdid) #else void saacproto_ACJoinFM_send(int fd, char *fmname, int fmindex, char *charname, char *charid, int charlv, int index, int charfdid) #endif { saacproto_CreateHeader(saacproto.work, "ACJoinFM"); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(fmname), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(fmindex), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(charname), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(charid), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(charlv), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(index), saacproto.workbufsize); // #ifdef _PERSONAL_FAME // Arminius: 家族个人声望 saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(fame), saacproto.workbufsize); // #endif saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(charfdid), saacproto.workbufsize); saacproto_Send(fd, saacproto.work); } void saacproto_ACLeaveFM_send(int fd, char *fmname, int fmindex, char *charname, char *charid, int index, int charfdid) { saacproto_CreateHeader(saacproto.work, "ACLeaveFM"); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(fmname), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(fmindex), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(charname), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(charid), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(index), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(charfdid), saacproto.workbufsize); saacproto_Send(fd, saacproto.work); } void saacproto_ACDelFM_send(int fd, char *fmname, int fmindex, int index, char *charname, char *charid, int charfdid) { saacproto_CreateHeader(saacproto.work, "ACDelFM"); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(fmname), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(fmindex), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(index), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(charname), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(charid), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(charfdid), saacproto.workbufsize); saacproto_Send(fd, saacproto.work); } void saacproto_ACShowFMList_send(int fd) { saacproto_CreateHeader(saacproto.work, "ACShowFMList"); saacproto_Send(fd, saacproto.work); } void saacproto_ACShowMemberList_send(int fd, int index) { saacproto_CreateHeader(saacproto.work, "ACShowMemberList"); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string("MemberList"), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(index), saacproto.workbufsize); saacproto_Send(fd, saacproto.work); } void saacproto_ACFMDetail_send(int fd, char *fmname, int fmindex, int index, int charfdid) { saacproto_CreateHeader(saacproto.work, "ACFMDetail"); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(fmname), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(fmindex), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(index), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(charfdid), saacproto.workbufsize); saacproto_Send(fd, saacproto.work); } #ifdef _FMVER21 void saacproto_ACMemberJoinFM_send(int fd, char *fmname, int fmindex, char *charname, int charindex, int index, int result, int meindex, int charfdid) #else void saacproto_ACMemberJoinFM_send(int fd, char *fmname, int fmindex, char *charname, int charindex, int index, int result, int charfdid) #endif { saacproto_CreateHeader(saacproto.work, "ACMemberJoinFM"); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(fmname), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(fmindex), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(charname), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(charindex), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(index), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(result), saacproto.workbufsize); #ifdef _FMVER21 saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(meindex), saacproto.workbufsize); #endif saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(charfdid), saacproto.workbufsize); saacproto_Send(fd, saacproto.work); } #ifdef _FMVER21 void saacproto_ACMemberLeaveFM_send(int fd, char *fmname, int fmindex, char *charname, int charindex, int index, int meindex, int charfdid) #else void saacproto_ACMemberLeaveFM_send(int fd, char *fmname, int fmindex, char *charname, int charindex, int index, int charfdid) #endif { saacproto_CreateHeader(saacproto.work, "ACMemberLeaveFM"); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(fmname), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(fmindex), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(charname), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(charindex), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(index), saacproto.workbufsize); #ifdef _FMVER21 saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(meindex), saacproto.workbufsize); #endif saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(charfdid), saacproto.workbufsize); saacproto_Send(fd, saacproto.work); } #ifdef _FM_MODIFY void saacproto_ACFMCharLogin_send(int fd, char *fmname, int fmindex, char *charname, char *charid, int charlv, int eventflag, int charfdid,int gsnum) #else #ifdef _FMVER21 void saacproto_ACFMCharLogin_send(int fd, char *fmname, int fmindex, char *charname, char *charid, int charlv, int eventflag, int charfdid) #else void saacproto_ACFMCharLogin_send(int fd, char *fmname, int fmindex, char *charname, char *charid, int charlv, int charfdid) #endif #endif { saacproto_CreateHeader(saacproto.work, "ACFMCharLogin"); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(fmname), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(fmindex), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(charname), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(charid), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(charlv), saacproto.workbufsize); #ifdef _FMVER21 saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(eventflag), saacproto.workbufsize); #endif saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(charfdid), saacproto.workbufsize); #ifdef _FM_MODIFY saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(gsnum), saacproto.workbufsize); #endif saacproto_Send(fd, saacproto.work); } void saacproto_ACFMCharLogout_send(int fd, char *fmname, int fmindex, char *charname, char *charid, int charlv, int index, int charfdid) { saacproto_CreateHeader(saacproto.work, "ACFMCharLogout"); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(fmname), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(fmindex), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(charname), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(charid), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(charlv), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(index), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(charfdid), saacproto.workbufsize); saacproto_Send(fd, saacproto.work); } void saacproto_ACFMReadMemo_send(int fd, int index) { saacproto_CreateHeader(saacproto.work, "ACFMReadMemo"); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string("ReadMemo"), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(index), saacproto.workbufsize); saacproto_Send(fd, saacproto.work); } void saacproto_ACFMWriteMemo_send(int fd, char *fmname, int fmindex, char *data, int index) { saacproto_CreateHeader(saacproto.work, "ACFMWriteMemo"); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(fmname), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(fmindex), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(data), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(index), saacproto.workbufsize); saacproto_Send(fd, saacproto.work); } void saacproto_ACFMPointList_send(int fd) { saacproto_CreateHeader(saacproto.work, "ACFMPointList"); saacproto_Send(fd, saacproto.work); } void saacproto_ACSetFMPoint_send(int fd, char *fmname, int fmindex, int index, int fmpointindex, int fl, int x, int y, int charfdid) { saacproto_CreateHeader(saacproto.work, "ACSetFMPoint"); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(fmname), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(fmindex), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(index), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(fmpointindex), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(fl), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(x), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(y), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(charfdid), saacproto.workbufsize); saacproto_Send(fd, saacproto.work); } void saacproto_ACFixFMPoint_send(int fd, char *winfmname, int winfmindex, int winindex, char *losefmname, int losefmindex, int loseindex, int village) { saacproto_CreateHeader(saacproto.work, "ACFixFMPoint"); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(winfmname), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(winfmindex), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(winindex), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(losefmname), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(losefmindex), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(loseindex), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(village), saacproto.workbufsize); saacproto_Send(fd, saacproto.work); } void saacproto_ACFMAnnounce_send(int fd, char *fmname, int fmindex, int index, char *data, int color) { saacproto_CreateHeader(saacproto.work, "ACFMAnnounce"); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(fmname), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(fmindex), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(index), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(data), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(color), saacproto.workbufsize); saacproto_Send(fd, saacproto.work); } void saacproto_ACShowTopFMList_send(int fd, int kindflag) { saacproto_CreateHeader(saacproto.work, "ACShowTopFMList"); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string("ShowTopFMList"), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(kindflag), saacproto.workbufsize); saacproto_Send(fd, saacproto.work); } void saacproto_ACFixFMData_send(int fd, char *fmname, int fmindex, int index, int kindflag, char *data1, char *data2, int charindex, int charfdid) { saacproto_CreateHeader(saacproto.work, "ACFixFMData"); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(fmname), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(fmindex), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(index), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(kindflag), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(data1), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(data2), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(charindex), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(charfdid), saacproto.workbufsize); saacproto_Send(fd, saacproto.work); } void saacproto_ACFixFMPK_send(int fd, char *winfmname, int winfmindex, int winindex, char *losefmname, int losefmindex, int loseindex) { saacproto_CreateHeader(saacproto.work, "ACFixFMPK"); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(winfmname), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(winfmindex), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(winindex), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(losefmname), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(losefmindex), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(loseindex), saacproto.workbufsize); saacproto_Send(fd, saacproto.work); } void saacproto_ACGMFixFMData_send(int fd, int index, char *charid, char *cmd, char *data, int charfdid) { saacproto_CreateHeader(saacproto.work, "ACGMFixFMData"); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string("ACGMFixFMData"), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(index), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(charid), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(cmd), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(data), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(charfdid), saacproto.workbufsize); saacproto_Send(fd, saacproto.work); } void saacproto_ACGetFMData_send(int fd, char *fmname, int fmindex, int index, int kindflag, int charfdid) { saacproto_CreateHeader(saacproto.work, "ACGetFMData"); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(fmname), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(fmindex), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(index), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(kindflag), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(charfdid), saacproto.workbufsize); saacproto_Send(fd, saacproto.work); } // Arminius 7.26 manor pk acknowledge void saacproto_ACManorPKAck_send(int fd, char *data) { saacproto_CreateHeader(saacproto.work, "ACManorPKAck"); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(data), saacproto.workbufsize); saacproto_Send(fd, saacproto.work); } void saacproto_ACreLoadFmData_send( int fd, int type, int data) { saacproto_CreateHeader( saacproto.work, "ACreLoadFmData"); saacproto_strcatsafe( saacproto.work, saacproto_mkstr_int( type), saacproto.workbufsize); saacproto_strcatsafe( saacproto.work, saacproto_mkstr_int( data), saacproto.workbufsize); saacproto_Send( fd, saacproto.work); } #ifdef _ACFMPK_LIST void saacproto_ACLoadFmPk_send(int fd, int fmpks_pos) { saacproto_CreateHeader(saacproto.work, "ACLoadFmPk"); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(fmpks_pos), saacproto.workbufsize); saacproto_Send(fd, saacproto.work); } void saacproto_ACSendFmPk_send(int fd, int toindex, int PkFlg, int fmpks_pos, char *msg) { saacproto_CreateHeader(saacproto.work, "ACSendFmPk"); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(fmpks_pos), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int( toindex), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int( PkFlg), saacproto.workbufsize); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(msg), saacproto.workbufsize); saacproto_Send(fd, saacproto.work); } #endif void saacproto_ACAuctionSold_send(int fd, char *data) { saacproto_CreateHeader(saacproto.work, "ACAuctionSold"); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_string(data), saacproto.workbufsize); saacproto_Send(fd, saacproto.work); } void saacproto_ACDelFmPoint_send(int fd, int fmindex) { saacproto_CreateHeader(saacproto.work, "ACDelFmPoint"); saacproto_strcatsafe(saacproto.work, saacproto_mkstr_int(fmindex), saacproto.workbufsize); saacproto_Send(fd, saacproto.work); } extern char saacretfunc[255]; int saacproto_ClientDispatchMessage(int fd ,char*line) { int msgid; char funcname[255]; char *line_bak; line_bak=line; saacproto_strcpysafe( saacproto.work , line, saacproto.workbufsize ); saacproto_splitString( saacproto.work); saacproto_GetMessageInfo( &msgid , funcname , sizeof(funcname),saacproto.token_list); strcpy( saacretfunc , funcname ); if( strcmp( funcname , "ACGmsvDownRequest" ) == 0 ){ int min; min = saacproto_demkstr_int( saacproto.token_list[2] ); saacproto_ACGmsvDownRequest_recv( fd,min); return 0; } if( strcmp( funcname , "ACServerLogin" ) == 0 ){ char* result; char* data; result = 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] )); saacproto_ACServerLogin_recv( fd,result,data); return 0; } if( strcmp( funcname , "ACCharList" ) == 0 ){ char* result; char* output; int id; result = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); output = saacproto_wrapStringAddr( saacproto_stringwrapper[2] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[3] )); id = saacproto_demkstr_int( saacproto.token_list[4] ); saacproto_ACCharList_recv( fd,result,output,id); return 0; } if( strcmp( funcname , "ACCharLoad" ) == 0 ){ char* result=NULL; char* data=NULL; int id; #ifdef _NEWSAVE int saveindex; #endif result = 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] )); id = saacproto_demkstr_int( saacproto.token_list[4] ); if( data == NULL ) return 0; if( result == NULL ) return 0; #ifdef _NEWSAVE saveindex = saacproto_demkstr_int( saacproto.token_list[5] ); saacproto_ACCharLoad_recv( fd,result,data,id,saveindex); #else saacproto_ACCharLoad_recv( fd,result,data,id, -1); #endif return 0; } if( strcmp( funcname , "ACCharSave" ) == 0 ){ char* result; char* data; int id; result = 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] )); id = saacproto_demkstr_int( saacproto.token_list[4] ); saacproto_ACCharSave_recv( fd,result,data,id); return 0; } if( strcmp( funcname , "ACCharDelete" ) == 0 ){ char* result; char* data; int id; result = 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] )); id = saacproto_demkstr_int( saacproto.token_list[4] ); saacproto_ACCharDelete_recv( fd,result,data,id); return 0; } if( strcmp( funcname , "ACLock" ) == 0 ){ char* result; char* data; int id; result = 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] )); id = saacproto_demkstr_int( saacproto.token_list[4] ); saacproto_ACLock_recv( fd,result,data,id); return 0; } #ifdef _WAEI_KICK if( strcmp( funcname , "ACKick" ) == 0 ){ int act; char* data; int id; act = saacproto_demkstr_int( saacproto.token_list[2] ); data = saacproto_wrapStringAddr( saacproto_stringwrapper[2] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[3] )); id = saacproto_demkstr_int( saacproto.token_list[4] ); saacproto_ACKick_recv( fd, act, data, id); return 0; } #endif #ifdef _CHAR_POOLITEM if( strcmp( funcname , "ACSavePoolItem" ) == 0 ){ char* result; char* data; int id; result = 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] )); id = saacproto_demkstr_int( saacproto.token_list[4] ); saacproto_ACCharSavePoolItem_recv( fd, result, data, id); return 0; } if( strcmp( funcname , "ACGetPoolItem" ) == 0 ){ char* result; char* data; int id, npcid; result = 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] )); id = saacproto_demkstr_int( saacproto.token_list[4] ); npcid = saacproto_demkstr_int( saacproto.token_list[5] ); saacproto_ACCharGetPoolItem_recv( fd, result, data, id, npcid); return 0; } #endif #ifdef _CHAR_POOLPET if( strcmp( funcname , "ACSavePoolPet" ) == 0 ){ char* result; char* data; int id; result = 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] )); id = saacproto_demkstr_int( saacproto.token_list[4] ); saacproto_ACCharSavePoolPet_recv( fd, result, data, id); return 0; } if( strcmp( funcname , "ACGetPoolPet" ) == 0 ){ char* result; char* data; int id, npcid; result = 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] )); id = saacproto_demkstr_int( saacproto.token_list[4] ); npcid = saacproto_demkstr_int( saacproto.token_list[5] ); saacproto_ACCharGetPoolPet_recv( fd, result, data, id, npcid); return 0; } #endif if( strcmp( funcname , "ACUCheck" ) == 0 ){ char* mem_id; mem_id = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); saacproto_ACUCheck_recv( fd,mem_id); return 0; } /* 354 :
  • servertoclient DBUpdateEntryString( string result, string table, string key, int msgid, int msgid2 );
    355 : 晓及戊穴件玉及瑛绊[撩 仄化手荚汊尕第 卅及匹 骰仄化方中冗 356 :
    357 :
    string result 358 :
    successful 井failed 359 :
    string table 360 :
    361 :
    int msgid 362 :
    363 :
    int msgid2 364 :
    365 :
    366 : */ if( strcmp( funcname , "DBUpdateEntryString" ) == 0 ){ char* result; char* table; char* key; int msgid; int msgid2; result = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); table = saacproto_wrapStringAddr( saacproto_stringwrapper[2] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[3] )); key = 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,result,table,key,msgid,msgid2); return 0; } /* 379 :
  • servertoclient DBDeleteEntryString( string result, string table, string key , int msgid , int msgid2 );
    380 : 侬 巨件玄伉及绰轮及瑛绊 381 :
    382 :
    string result 383 :
    successful / failed 384 :
    string table 385 :
    386 :
    string key 387 :
    388 :
    int msgid 389 :
    390 :
    int msgid2 391 :
    392 :
    393 : */ if( strcmp( funcname , "DBDeleteEntryString" ) == 0 ){ char* result; char* table; char* key; int msgid; int msgid2; result = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); table = saacproto_wrapStringAddr( saacproto_stringwrapper[2] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[3] )); key = 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_DBDeleteEntryString_recv( fd,result,table,key,msgid,msgid2); return 0; } /* 406 :
  • servertoclient DBGetEntryString( string result, string value, string table, string key, int msgid, int msgid2 );
    407 : 潸曰分仄及忒曰袄 408 :
    409 :
    string result 410 :
    successful / failed 411 :
    string value 412 :
    袄 413 :
    string table 414 :
    415 :
    string key 416 :
    417 :
    int msgid 418 :
    419 :
    int msgid2 420 :
    421 :
    422 : */ if( strcmp( funcname , "DBGetEntryString" ) == 0 ){ /* char* result; char* value; char* table; char* key; int msgid; int msgid2; result = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); value = saacproto_wrapStringAddr( saacproto_stringwrapper[2] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[3] )); table = saacproto_wrapStringAddr( saacproto_stringwrapper[3] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[4] )); key = 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_DBGetEntryString_recv( fd,result,value,table,key,msgid,msgid2);*/ return 0; } /* 445 :
  • servertoclient DBUpdateEntryInt( string result , string table, string key, int msgid, int msgid2 );
    446 : DBUpdateEntry及瑛绊[ 447 :
    448 :
    string result 449 :
    succesful/failed 450 :
    string table 451 :
    □皮伙 毛公及引引井尹允 452 :
    string key 453 :
    平□毛公及引引井尹允 454 :
    int msgid, int msgid2 455 :
    msgid 毛公及引引忒允[ 456 :
    457 :

    458 : */ if( strcmp( funcname , "DBUpdateEntryInt" ) == 0 ){ char* result; char* table; char* key; int msgid; int msgid2; result = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); table = saacproto_wrapStringAddr( saacproto_stringwrapper[2] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[3] )); key = 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_DBUpdateEntryInt_recv( fd,result,table,key,msgid,msgid2); return 0; } /* 473 :
  • servertoclient DBGetEntryRank( string result , int rank , int count, string table, string key, int msgid, int msgid2 );
    474 : 赐匏毛忒允[ 475 :
    476 :
    string result 477 :
    successful/failed 478 :
    int rank 479 :
    赐匏[1动晓及袄毛潸月[ 480 :
    int count 481 :
    晓井日中仁勾户井[ 赓及巨件玄伉反0井日反元引月[ 482 :
    string table 483 :
    □皮伙 毛公及引引井尹允 484 :
    string key 485 :
    平□毛公及引引井尹允 486 :
    int msgid, int msgid2 487 :
    msgid 毛公及引引忒允 488 :
    489 :

    490 : 491 : */ if( strcmp( funcname , "DBGetEntryRank" ) == 0 ){ char* result; int rank; int count; char* table; char* key; int msgid; int msgid2; result = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); rank = saacproto_demkstr_int( saacproto.token_list[3] ); count = saacproto_demkstr_int( saacproto.token_list[4] ); table = saacproto_wrapStringAddr( saacproto_stringwrapper[4] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[5] )); key = saacproto_wrapStringAddr( saacproto_stringwrapper[5] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[6] )); msgid = saacproto_demkstr_int( saacproto.token_list[7] ); msgid2 = saacproto_demkstr_int( saacproto.token_list[8] ); saacproto_DBGetEntryRank_recv( fd,result,rank,count,table,key,msgid,msgid2); return 0; } /* 504 :
  • servertoclient DBDeleteEntryInt( string result , string table, string key, int msgid, int msgid2 );
    505 : 绰轮及瑛绊 506 :
    507 :
    string result 508 :
    successful/failed 509 :
    string table 510 :
    □皮伙 毛公及引引井尹允 511 :
    string key 512 :
    平□毛公及引引井尹允 513 :
    int msgid, int msgid2 514 :
    msgid 毛公及引引忒允 515 :
    516 :

    517 : */ if( strcmp( funcname , "DBDeleteEntryInt" ) == 0 ){ char* result; char* table; char* key; int msgid; int msgid2; result = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); table = saacproto_wrapStringAddr( saacproto_stringwrapper[2] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[3] )); key = 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_DBDeleteEntryInt_recv( fd,result,table,key,msgid,msgid2); return 0; } /* 530 :
  • servertoclient DBGetEntryInt( string result , int value , string table, string key, int msgid, int msgid2 );
    531 : 巨件玄伉及袄毛井尹允 532 :
    533 :
    string result 534 :
    successful/failed 535 :
    int value 536 :
    袄公及手及 537 :
    string table 538 :
    □皮伙 毛公及引引井尹允 539 :
    string key 540 :
    平□毛公及引引井尹允 541 :
    int msgid, int msgid2 542 :
    msgid 毛公及引引忒允 543 :
    544 : 545 : 546 : */ if( strcmp( funcname , "DBGetEntryInt" ) == 0 ){ char* result; int value; char* table; char* key; int msgid; int msgid2; result = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); value = saacproto_demkstr_int( saacproto.token_list[3] ); table = saacproto_wrapStringAddr( saacproto_stringwrapper[3] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[4] )); key = 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_DBGetEntryInt_recv( fd,result,value,table,key,msgid,msgid2); return 0; } /* 562 :
  • servertoclient DBGetEntryByRank( string result , string list , string table, int msgid, int msgid2 );
    563 : DBGetEntryByRank及瑛绊[ 564 :
    565 :
    string result 566 :
    567 :
    string list 568 :
    "RANK,KEY,SCORE,INFO|RANK,KEY,SCORE,INFO|...."
    569 : RANK反赐匏匹丐月[KEY反公及赐匏卞卅匀化中月旦戊失毛手匀化中月 570 : 平□[SCORE反帮醒袄匹旦戊失匹丐月[ 571 : [
    572 : "1,RINGO,123465,data1|2,HOGE,4567,data2|2,FUCK,4567,data3"
    573 : 仇及 分午}2匏反2谛中月仇午卞卅月[ 574 :
    string table 575 :
    □皮伙 576 :
    int msgid, int msgid2 577 :
    578 :
    579 : 580 : */ if( strcmp( funcname , "DBGetEntryByRank" ) == 0 ){ char* result; char* list; char* table; int msgid; int msgid2; result = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); list = saacproto_wrapStringAddr( saacproto_stringwrapper[2] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[3] )); table = 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_DBGetEntryByRank_recv( fd,result,list,table,msgid,msgid2); return 0; } /* 593 :
  • servertoclient DBGetEntryByCount( string result , string list , string table, int count_start, int msgid, int msgid2 );
    594 : DBGetEntryByCount 及瑛绊[ 595 :
    596 :
    string result 597 :
    SUCCESSFUL/FAILED 598 :
    string list 599 :
    请 伉旦玄[1巨件玄伉丐凶曰 "INDEX,RANK,KEY,SCORE,INFO" 及4蜊及树 600 : 及赚匹丐曰}公木互蜊醒坌 "|" 匹勾卅互月[蜊醒互0及桦宁反 601 : 坞 侬 [ 602 :
    int num 603 :
    中仁勾午曰分允井[1卅日1蜊[2卅日2蜊[ 604 :
    int msgid ,msgid2 605 :
    丢永本□斥ID. 606 :
    607 : */ if( strcmp( funcname , "DBGetEntryByCount" ) == 0 ){ char* result; char* list; char* table; int count_start; int msgid; int msgid2; result = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); list = saacproto_wrapStringAddr( saacproto_stringwrapper[2] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[3] )); table = saacproto_wrapStringAddr( saacproto_stringwrapper[3] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[4] )); count_start = saacproto_demkstr_int( saacproto.token_list[5] ); msgid = saacproto_demkstr_int( saacproto.token_list[6] ); msgid2 = saacproto_demkstr_int( saacproto.token_list[7] ); saacproto_DBGetEntryByCount_recv( fd,result,list,table,count_start,msgid,msgid2); return 0; } #ifdef _ALLDOMAN // (不可开) Syu ADD 排行榜NPC if ( strcmp( funcname , "UpdataStele" ) == 0 ) { char* token; token = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); saacproto_UpdataStele_recv( fd , token) ; return 0; } if ( strcmp( funcname , "S_UpdataStele" ) == 0 ) { char* ocdkey; char* oname; char* ncdkey; char* nname; char* title; int level; int trns; int floor; ocdkey = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); oname = saacproto_wrapStringAddr( saacproto_stringwrapper[2] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[3] )); ncdkey = saacproto_wrapStringAddr( saacproto_stringwrapper[3] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[4] )); nname = saacproto_wrapStringAddr( saacproto_stringwrapper[4] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[5] )); title = saacproto_wrapStringAddr( saacproto_stringwrapper[5] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[6] )); level = saacproto_demkstr_int( saacproto.token_list[7] ); trns = saacproto_demkstr_int( saacproto.token_list[8] ); floor = saacproto_demkstr_int( saacproto.token_list[9] ); saacproto_S_UpdataStele_recv( fd , ocdkey , oname , ncdkey , nname , title , level , trns , floor ); return 0; } #endif /* 621 :
  • servertoclient Broadcast( string id, string charname, string message );
    622 : Broadcast及失市它件玄扔□田□井日必□丞扔□田□尺及霜耨迕 623 :
    624 :
    string id 625 :
    user ID 626 :
    string charname 627 :
    character name 628 :
    string message 629 :
    丢永本□斥 630 :
    int flag 631 :
    1卞允月午}愤坌卞卞反 霜今木卅中[ 632 :
    633 : */ if( strcmp( funcname , "Broadcast" ) == 0 ){ char* id; char* charname; char* message; 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] )); saacproto_Broadcast_recv( fd,id,charname,message); return 0; } /* 652 :
  • servertoclient Message( string id_from, string charname_from, string id_to, string charname_to, string message , int option , int mesgid );
    653 : 失市它件玄扔□田□井日必□丞扔□田□卞丢永本□斥毛霜耨允月[ 654 :
    655 :
    string id_from 656 :
    from ID 657 :
    string charname_from 658 :
    from character name 659 :
    string id_to 660 :
    to ID 661 :
    string charname_to 662 :
    to character name 663 :
    string message 664 :
    丢永本□斥及 665 :
    int option 666 :
    左皿扑亦件(晓及楮醒毛辅寰) 667 :
    int mesgid 668 :
    丢永本□斥ID 失市它件玄扔□田□及栋 迕 669 :
    670 : */ if( strcmp( funcname , "Message" ) == 0 ){ char* id_from; char* charname_from; char* id_to; char* charname_to; char* message; int option; int mesgid; 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] ); mesgid = saacproto_demkstr_int( saacproto.token_list[8] ); saacproto_Message_recv( fd,id_from,charname_from,id_to,charname_to,message,option,mesgid); return 0; } // CoolFish: Family 2001/5/9 if( strcmp( funcname, "ACAddFM") == 0){ int fmindex, index, charfdid; char *result; result = 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_ACAddFM_recv(fd, result, fmindex, charfdid, index); return 0; } if( strcmp( funcname, "ACJoinFM") == 0){ int charfdid, recv; char *result; result = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); recv = saacproto_demkstr_int(saacproto.token_list[3]); charfdid = saacproto_demkstr_int(saacproto.token_list[4]); saacproto_ACJoinFM_recv(fd, result, recv, charfdid); return 0; } if( strcmp( funcname, "ACLeaveFM") == 0){ int charfdid, resultflag; char *result; result = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); resultflag = saacproto_demkstr_int(saacproto.token_list[3]); charfdid = saacproto_demkstr_int(saacproto.token_list[4]); saacproto_ACLeaveFM_recv(fd, result, resultflag, charfdid); return 0; } if( strcmp( funcname, "ACDelFM") == 0){ int charfdid; char *result; result = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); charfdid = saacproto_demkstr_int(saacproto.token_list[3]); saacproto_ACDelFM_recv(fd, result, charfdid); return 0; } if( strcmp( funcname, "ACShowFMList") == 0){ int fmnum; char *result, *data; result = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); fmnum = saacproto_demkstr_int(saacproto.token_list[3]); data = saacproto_wrapStringAddr(saacproto_stringwrapper[3], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[4])); saacproto_ACShowFMList_recv(fd, result, fmnum, data); return 0; } if( strcmp( funcname, "ACShowMemberList") == 0){ int index, fmmemnum, fmacceptflag, fmjoinnum; char *result, *data; result = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); index = saacproto_demkstr_int(saacproto.token_list[3]); fmmemnum = saacproto_demkstr_int(saacproto.token_list[4]); fmacceptflag = saacproto_demkstr_int(saacproto.token_list[5]); fmjoinnum = saacproto_demkstr_int(saacproto.token_list[6]); data = saacproto_wrapStringAddr(saacproto_stringwrapper[6], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[7])); saacproto_ACShowMemberList_recv(fd, result, index, fmmemnum, fmacceptflag, fmjoinnum, data); return 0; } if( strcmp( funcname, "ACFMDetail") == 0){ int charfdid; char *result, *data; result = 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])); charfdid = saacproto_demkstr_int(saacproto.token_list[4]); saacproto_ACFMDetail_recv(fd, result, data, charfdid); return 0; } if( strcmp( funcname, "ACMemberJoinFM") == 0){ int charfdid; char *result, *data; result = 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])); charfdid = saacproto_demkstr_int(saacproto.token_list[4]); saacproto_ACMemberJoinFM_recv(fd, result, data, charfdid); return 0; } if( strcmp( funcname, "ACMemberLeaveFM") == 0){ int charfdid; char *result, *data; result = 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])); charfdid = saacproto_demkstr_int(saacproto.token_list[4]); saacproto_ACMemberLeaveFM_recv(fd, result, data, charfdid); return 0; } if( strcmp( funcname, "ACFMCharLogin") == 0){ int charfdid, index, floor, fmdp, joinflag, fmsetupflag, flag, charindex; #ifdef _PERSONAL_FAME // Arminius: 家族个人声望 int charfame; #endif #ifdef _NEW_MANOR_LAW int momentum; #endif char *result; result = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); index = saacproto_demkstr_int(saacproto.token_list[3]); floor = saacproto_demkstr_int(saacproto.token_list[4]); fmdp = saacproto_demkstr_int(saacproto.token_list[5]); joinflag = saacproto_demkstr_int(saacproto.token_list[6]); fmsetupflag = saacproto_demkstr_int(saacproto.token_list[7]); flag = saacproto_demkstr_int(saacproto.token_list[8]); charindex = saacproto_demkstr_int(saacproto.token_list[9]); #ifdef _PERSONAL_FAME // Arminius: 家族个人声望 charfame = saacproto_demkstr_int(saacproto.token_list[10]); charfdid = saacproto_demkstr_int(saacproto.token_list[11]); #ifdef _NEW_MANOR_LAW momentum = saacproto_demkstr_int(saacproto.token_list[12]); #endif saacproto_ACFMCharLogin_recv(fd, result, index, floor, fmdp, joinflag, fmsetupflag, flag, charindex, charfame, charfdid #ifdef _NEW_MANOR_LAW ,momentum #endif ); #else charfdid = saacproto_demkstr_int(saacproto.token_list[10]); saacproto_ACFMCharLogin_recv(fd, result, index, floor, fmdp, joinflag, fmsetupflag, flag, charindex, charfdid); #endif return 0; } if( strcmp( funcname, "ACFMCharLogout") == 0){ int charfdid; char *result; result = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); charfdid = saacproto_demkstr_int(saacproto.token_list[3]); saacproto_ACFMCharLogout_recv(fd, result, charfdid); return 0; } if( strcmp( funcname, "ACFMReadMemo") == 0){ int index, num, dataindex; char *result, *data; result = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); index = saacproto_demkstr_int(saacproto.token_list[3]); num = saacproto_demkstr_int(saacproto.token_list[4]); dataindex = saacproto_demkstr_int(saacproto.token_list[5]); data = saacproto_wrapStringAddr(saacproto_stringwrapper[5], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[6])); saacproto_ACFMReadMemo_recv(fd, result, index, num, dataindex, data); return 0; } if( strcmp( funcname, "ACFMWriteMemo") == 0){ int index; char *result; result = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); index = saacproto_demkstr_int(saacproto.token_list[3]); saacproto_ACFMWriteMemo_recv(fd, result, index); return 0; } if( strcmp( funcname, "ACFMPointList") == 0){ char *result, *data; result = 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])); saacproto_ACFMPointList_recv(fd, result, data); return 0; } if( strcmp( funcname, "ACSetFMPoint") == 0){ int charfdid, r; char *result; result = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); r = saacproto_demkstr_int(saacproto.token_list[3]); charfdid = saacproto_demkstr_int(saacproto.token_list[4]); saacproto_ACSetFMPoint_recv(fd, result, r, charfdid); return 0; } if( strcmp( funcname, "ACFixFMPoint") == 0){ int r; char *result; result = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); r = saacproto_demkstr_int(saacproto.token_list[3]); saacproto_ACFixFMPoint_recv(fd, result, r); return 0; } if( strcmp( funcname, "ACFMAnnounce") == 0){ int fmindex, index, color, kindflag; char *result, *fmname, *data; result = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); fmname = saacproto_wrapStringAddr(saacproto_stringwrapper[2], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[3])); fmindex = saacproto_demkstr_int(saacproto.token_list[4]); index = saacproto_demkstr_int(saacproto.token_list[5]); kindflag = saacproto_demkstr_int(saacproto.token_list[6]); data = saacproto_wrapStringAddr(saacproto_stringwrapper[6], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[7])); color = saacproto_demkstr_int(saacproto.token_list[8]); saacproto_ACFMAnnounce_recv(fd, result, fmname, fmindex, index, kindflag, data, color); return 0; } if( strcmp( funcname, "ACShowTopFMList") == 0){ int num, kindflag; char *result, *data; result = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); kindflag = saacproto_demkstr_int(saacproto.token_list[3]); num = saacproto_demkstr_int(saacproto.token_list[4]); data = saacproto_wrapStringAddr(saacproto_stringwrapper[4], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[5])); saacproto_ACShowTopFMList_recv(fd, result, kindflag, num, data); return 0; } if( strcmp( funcname, "ACFixFMData") == 0){ int kindflag, charfdid; char *result, *data1, *data2; result = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); kindflag = saacproto_demkstr_int(saacproto.token_list[3]); data1 = saacproto_wrapStringAddr(saacproto_stringwrapper[3], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[4])); data2 = saacproto_wrapStringAddr(saacproto_stringwrapper[4], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[5])); charfdid = saacproto_demkstr_int(saacproto.token_list[6]); saacproto_ACFixFMData_recv(fd, result, kindflag, data1, data2, charfdid); return 0; } if( strcmp( funcname, "ACFixFMPK") == 0){ int data, winindex, loseindex; char *result; result = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); data = saacproto_demkstr_int(saacproto.token_list[3]); winindex = saacproto_demkstr_int(saacproto.token_list[4]); loseindex = saacproto_demkstr_int(saacproto.token_list[5]); saacproto_ACFixFMPK_recv(fd, result, data, winindex, loseindex); return 0; } if( strcmp( funcname, "ACGMFixFMData") == 0){ int charfdid; char *result, *fmname; result = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); fmname = saacproto_wrapStringAddr(saacproto_stringwrapper[2], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[3])); charfdid = saacproto_demkstr_int(saacproto.token_list[4]); saacproto_ACGMFixFMData_recv(fd, result, fmname, charfdid); return 0; } if( strcmp( funcname, "ACGetFMData") == 0){ int kindflag, charfdid, data; char *result; result = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); kindflag = saacproto_demkstr_int(saacproto.token_list[3]); data = saacproto_demkstr_int(saacproto.token_list[4]); charfdid = saacproto_demkstr_int(saacproto.token_list[5]); saacproto_ACGetFMData_recv(fd, result, kindflag, data, charfdid); return 0; } if( strcmp( funcname, "ACFMClearPK") == 0){ int fmindex, index; char *result, *fmname; result = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); fmname = saacproto_wrapStringAddr(saacproto_stringwrapper[2], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[3])); fmindex = saacproto_demkstr_int(saacproto.token_list[4]); index = saacproto_demkstr_int(saacproto.token_list[5]); saacproto_ACFMClearPK_recv(fd, result, fmname, fmindex, index); return 0; } // Arminius 7.26 manor pk acknowledge 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 _ACFMPK_LIST if( strcmp( funcname, "ACLoadFmPk") == 0){ char *data; data = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); saacproto_ACLoadFmPk_recv( fd, data); return 0; } if( strcmp( funcname, "ACSendFmPk") == 0){ int toindex, flg; toindex = saacproto_demkstr_int( saacproto.token_list[2] ); flg =saacproto_demkstr_int( saacproto.token_list[3] ); saacproto_ACSendFmPk_recv( fd, toindex, flg); return 0; } #endif #ifdef _SEND_EFFECT // WON ADD AC送下雪、下雨等特效 if( strcmp(funcname, "EFFECT") == 0){ char *effect; effect = saacproto_wrapStringAddr(saacproto_stringwrapper[1], saacproto.workbufsize, saacproto_demkstr_string(saacproto.token_list[2])); print("\n AC send to GS weather effect !!"); CHAR_CHAT_DEBUG_sendeffect( fd, effect ); 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, charaindex); saacproto_ACMissionTable_recv( fd, num, type, data, angelinfo); return 0; } #endif #ifdef _TEACHER_SYSTEM if(strcmp(funcname,"ACCheckCharacterOnLine") == 0){ int flag,charaindex,iOnline; char* data; charaindex = saacproto_demkstr_int(saacproto.token_list[2]); iOnline = saacproto_demkstr_int(saacproto.token_list[3]); data = 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,iOnline,data,flag); return 0; } #endif if( strcmp( funcname , "ACCharLogin" ) == 0 ){ int flag; int clifd; clifd = saacproto_demkstr_int( saacproto.token_list[2] ); flag = saacproto_demkstr_int( saacproto.token_list[3] ); saacproto_ACCharLogin_recv(fd, clifd, flag); return 0; } if( strcmp( funcname , "QuerySafePasswd" ) == 0 ){ char* id; int res; int charaindex; id = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); res = saacproto_demkstr_int( saacproto.token_list[3] ); charaindex = saacproto_demkstr_int( saacproto.token_list[4] ); saacproto_QuerySafePasswd_recv(fd, id, res, charaindex); return 0; } if( strcmp( funcname , "AddSafePasswd" ) == 0 ){ char* id; int res; int charaindex; id = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); res = saacproto_demkstr_int( saacproto.token_list[3] ); charaindex = saacproto_demkstr_int( saacproto.token_list[4] ); saacproto_AddSafePasswd_recv(fd, id, res, charaindex); return 0; } if( strcmp( funcname , "PointCardSucces" ) == 0 ){ char* id; int res; int point; int charaindex; id = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); res = saacproto_demkstr_int( saacproto.token_list[3] ); point = saacproto_demkstr_int( saacproto.token_list[4] ); charaindex = saacproto_demkstr_int( saacproto.token_list[5] ); saacproto_PointCardSucces_recv(fd, id, res, point, charaindex); return 0; } if( strcmp( funcname , "PointCardErr" ) == 0 ){ char* id; int res; int charaindex; id = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); res = saacproto_demkstr_int( saacproto.token_list[3] ); charaindex = saacproto_demkstr_int( saacproto.token_list[4] ); saacproto_PointCardErr_recv(fd, id, res, charaindex); return 0; } if( strcmp( funcname , "LoginTime" ) == 0 ){ char* id; char* res; int charaindex; id = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); res = saacproto_wrapStringAddr( saacproto_stringwrapper[2] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[3] )); charaindex = saacproto_demkstr_int( saacproto.token_list[4] ); saacproto_LoginTime_recv(fd, id, res, charaindex); return 0; } #ifdef _ONLINE_SHOP if( strcmp( funcname , "ACShop" ) == 0 ){ char* res; int charaindex,shopnum,vippoint,piece,pieces,shopflag; charaindex = saacproto_demkstr_int( saacproto.token_list[2] ); shopnum = saacproto_demkstr_int( saacproto.token_list[3] ); vippoint = saacproto_demkstr_int( saacproto.token_list[4] ); piece = saacproto_demkstr_int( saacproto.token_list[5] ); pieces = saacproto_demkstr_int( saacproto.token_list[6] ); shopflag = saacproto_demkstr_int( saacproto.token_list[7] ); res = saacproto_wrapStringAddr( saacproto_stringwrapper[7] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[8] )); saacproto_ACShop_recv(fd, charaindex, shopnum, vippoint, piece, pieces, shopflag, res); return 0; } if( strcmp( funcname , "ACShopBuy" ) == 0 ){ char* res; int charaindex,shopnum,vippoint,piece,pieces,shopflag,shopno,buynum; charaindex = saacproto_demkstr_int( saacproto.token_list[2] ); shopnum = saacproto_demkstr_int( saacproto.token_list[3] ); vippoint = saacproto_demkstr_int( saacproto.token_list[4] ); piece = saacproto_demkstr_int( saacproto.token_list[5] ); pieces = saacproto_demkstr_int( saacproto.token_list[6] ); shopflag = saacproto_demkstr_int( saacproto.token_list[7] ); res = saacproto_wrapStringAddr( saacproto_stringwrapper[7] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[8] )); shopno = saacproto_demkstr_int( saacproto.token_list[9] ); buynum = saacproto_demkstr_int( saacproto.token_list[10] ); saacproto_ACShop_recv(fd, charaindex, shopnum, vippoint, piece, pieces, shopflag, res); saacproto_ACShopBuy_recv(charaindex, shopflag, shopno, buynum); return 0; } #endif #ifdef _QUESTION_ONLINE if( strcmp( funcname , "ACQuestion" ) == 0 ){ char* res; res = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); saacproto_ACQuestion_recv(res); return 0; } #endif #ifdef _ALL_ITEM if( strcmp( funcname , "ACAllnum" ) == 0 ){ int flag,allnum; flag = saacproto_demkstr_int( saacproto.token_list[2] ); allnum = saacproto_demkstr_int( saacproto.token_list[3] ); saacproto_ACAllnum_recv(flag,allnum); return 0; } #endif if( strcmp( funcname , "ACFmPkOnlineSn" ) == 0 ){ //DebugMainFunction="saac1"; int manorindex,flag; //DebugMainFunction="saac2"; char* gsname; //DebugMainFunction="saac3"; manorindex = saacproto_demkstr_int( saacproto.token_list[2] ); //DebugMainFunction="saac4"; gsname = saacproto_wrapStringAddr( saacproto_stringwrapper[2] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[3] )); //DebugMainFunction="saac5"; flag = saacproto_demkstr_int( saacproto.token_list[4] ); //DebugMainFunction="saac6"; saacproto_ACFmPkOnlineSn_recv(manorindex,gsname,flag); //DebugMainFunction="saac7"; return 0; } if( strcmp( funcname , "ACSystemAllTalk" ) == 0 ){ char* systemalltalkbuf; systemalltalkbuf = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); saacproto_ACSystemAllTalk_recv(systemalltalkbuf); return 0; } if( strcmp( funcname , "ACPlayerAllTalk" ) == 0 ){ char* servername; char* playername; char* playeralltalkbuf; servername = saacproto_wrapStringAddr( saacproto_stringwrapper[1] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[2] )); playername = saacproto_wrapStringAddr( saacproto_stringwrapper[2] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[3] )); playeralltalkbuf = saacproto_wrapStringAddr( saacproto_stringwrapper[3] , saacproto.workbufsize , saacproto_demkstr_string( saacproto.token_list[4] )); saacproto_ACPlayerAllTalk_recv(servername,playername,playeralltalkbuf); return 0; } printf("\n无法找到SAAC接口:%s\n",funcname); printf("\nfd=%d,line=%s\n",fd,line_bak); return -1; } void saacproto_SetClientLogFiles( char *r , char *w ) { saacproto_strcpysafe( saacproto_readlogfilename , r , sizeof( saacproto_readlogfilename ) ); saacproto_strcpysafe( saacproto_writelogfilename , w , sizeof( saacproto_writelogfilename ) ); } int saacproto_InitClient( int (*writefunc)(int,char*,int) ,int bufsiz ,int fd) { int i; if( (void*)writefunc == NULL){saacproto.write_func = saacproto_default_write_wrap;} else {saacproto.write_func = writefunc;} saacproto_AllocateCommonWork(bufsiz); 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