📄 saacproto_serv.c
字号:
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 _NewSavevoid saacproto_ACCharLoad_send( int fd,char* result,char* data,int id,int charindex )#elsevoid 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 _RELOGINvoid 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 : <li><a name="ACCharSaveS"><font color=blue>servertoclient ACCharSave( string result , string data,int id);<br></font></a>215 : ACCharSave卞覆允月忒蚕[216 : <br><br>217 : <dl>218 : <dt> string result219 : <dd>"successful" , "failed" 及中勿木井[220 : <dt> string data221 : <dd>"failed"及凛反 毛憎允谛棉及苇化坌月 侬 匹丐月[222 : <dt> int id223 : <dd> 娄醒及id毛公及引引戊疋□仄化忒允224 : </dl>225 : <br>226 : <br>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 _RELOGINvoid 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 : <li><a name="ACCharDeleteS"><font color=blue>servertoclient ACCharDelete(string result, string data,int id);<br></font></a>257 : ACCharDelete卞覆允月忒蚕[258 : <br><br>259 : <dl>260 : <dt> string result261 : <dd>"successful" , "failed" 及中勿木井[262 : <dt> string data263 : <dd>"failed"及凛反 毛憎允谛棉及苇化坌月 侬 匹丐月[264 : <dt> int id265 : <dd> 娄醒及id及公及引引及戊疋□266 : 267 : </dl>268 : <br>269 : <br>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 : <LI> <a name="ACLockS"><font color=blue>servertoclient ACLock( string result, string data ,int id);<br></font></a>291 : ACLock卞覆允月忒蚕[292 : <br><br>293 : <dl>294 : <dt>string result295 : <dd>"successful" , "failed" 及中勿木井[296 : <dt>string data297 : <dd>"failed"及凛反 毛憎允谛棉及苇化坌月 侬 匹丐月[298 : <dt>int id299 : <dd>娄醒及id及公及引引戊疋□300 : </dl>301 : <br>302 : <br>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 : <LI><a name="ACUCheckS"><font color=blue>servertoclient ACUCheck( string mem_id );</font></a><BR>319 : 失市它件玄扔□田□井日必□丞扔□田□卞覆仄化}丐月交□扒□互蜇箕夫弘奶件320 : 仄化中月井升丹井毛民尼永弁允月[321 : <BR><BR>322 : <dl>323 : <dt>string mem_id324 : <dd>譬屯月覆擂及交□扒□及gamersDream member id325 : </dl> 326 : <BR><BR>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 : <LI><a name="DBUpdateEntryStringS"><font color=blue>servertoclient DBUpdateEntryString( string result, string table, string key, int msgid, int msgid2 );</font></a><BR>345 : 晓及戊穴件玉及瑛绊[撩 仄化手荚汊尕第 卅及匹 骰仄化方中冗346 : <dl>347 : <dt>string result348 : <dD>successful 井failed 349 : <dt>string table350 : <dD>351 : <dt>int msgid352 : <dD>353 : <dt>int msgid2354 : <dD>355 : </dL>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 : <LI><a name="DBDeleteEntryStringS"><font color=blue>servertoclient DBDeleteEntryString( string result, string table, string key , int msgid , int msgid2 );</font></a><BR>370 : 侬 巨件玄伉及绰轮及瑛绊371 : <dl>372 : <dt>string result373 : <dd>successful / failed374 : <dt>string table375 : <dd>376 : <dt>string key377 : <dd>378 : <dt>int msgid379 : <dd>380 : <dt>int msgid2381 : <dd> 382 : </dl>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 : <Li><a name="DBGetEntryStringS"><font color=blue>servertoclient DBGetEntryString( string result, string value, string table, string key, int msgid, int msgid2 );</font></a><BR>397 : 潸曰分仄及忒曰袄398 : <dl>399 : <dt>string result400 : <dd>successful / failed401 : <dt>string value402 : <dd>袄403 : <dt>string table404 : <dd> 405 : <dt>string key406 : <dd>407 : <dt>int msgid408 : <dd>409 : <dt>int msgid2410 : <dd> 411 : </dl>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 : <LI><a name="DBUpdateEntryIntS"><font color=blue>servertoclient DBUpdateEntryInt( string result , string table, string key, int msgid, int msgid2 );</font></a><BR>436 : DBUpdateEntry及瑛绊[437 : <dl>438 : <dt>string result439 : <dd>succesful/failed440 : <dt>string table441 : <dd> □皮伙 毛公及引引井尹允442 : <dt>string key443 : <dd>平□毛公及引引井
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -