早期的石器时代名片系统是有bug的,下面是修复代码
打开 addressbook.c 搜索ADDRESSBOOK_sendAddressbookTable
将下面这段函数替换了就OK了。
BOOL ADDRESSBOOK_sendAddressbookTable( int cindex ) { int stringlen=0; int i; if( !CHAR_CHECKINDEX( cindex ) )return FALSE; for( i=0 ; i<ADDRESSBOOK_MAX ; i++){ ADDRESSBOOK_entry *ae; ae = CHAR_getAddressbookEntry( cindex , i ); if( ae && ae->use ){ char tmp[CHARNAMELEN+32]; char charname_escaped[CHARNAMELEN*2]; makeEscapeString( ae->charname, charname_escaped , sizeof(charname_escaped )); /* 银迕白仿弘| 蟆|伊矛伙|仿奶白|白仿弘 */ snprintf( tmp , sizeof( tmp ), "%d|%s|%d|%d|%d|%d|%d||" , ae->use, charname_escaped , ae->level , ae->duelpoint,ae->online,ae->graphicsno, ae->transmigration); strcpysafe ( ADDRESSBOOK_returnstring + stringlen , sizeof(ADDRESSBOOK_returnstring) - stringlen, tmp ); stringlen += strlen( tmp ); if( stringlen >= sizeof(ADDRESSBOOK_returnstring) ) { break; } }else{ /*银匀化卅中犯□正手冲徇及心匹霜月 */ char tmp[32]; snprintf( tmp , sizeof( tmp ), "||||||||" ); strcpysafe ( ADDRESSBOOK_returnstring + stringlen , sizeof(ADDRESSBOOK_returnstring) - stringlen, tmp ); stringlen += strlen( tmp ); if( stringlen >= sizeof(ADDRESSBOOK_returnstring)) { break; } } } dchop( ADDRESSBOOK_returnstring, "|" ); { int fd; fd = getfdFromCharaIndex( cindex ); if( fd == -1 ) return FALSE; lssproto_AB_send( fd, ADDRESSBOOK_returnstring ); } return TRUE; }
发表评论
◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。