#include #include "version.h" #include "longzoro/move.h" #include "char_base.h" #include "char.h" #include "autil.h" #ifdef _TALK_MOVE_FLOOR Talk_Move_Floor_t talkmovefloor[MAXTALKMOVEFLOOR]; BOOL talk_move_map(int charaindex, char *messageeraseescape) { if(messageeraseescape[0] == '/' && messageeraseescape[1] == 'm' && messageeraseescape[2] == 'o' && messageeraseescape[3] == 'v' && messageeraseescape[4] == 'e'){ char token[32]; char buf[256]=""; int i; easyGetTokenFromString( messageeraseescape , 2 , token, sizeof(token)); if(strcmp( token, "?") == 0){ strcpy( buf, "您可顺移地方:"); for(i=0;i= 220 ){ CHAR_talkToCli( charaindex, -1, buf, CHAR_COLORYELLOW); strcpy( buf, "您可顺移地方:"); } if( CHAR_getInt(charaindex, CHAR_TRANSMIGRATION) > talkmovefloor[i].trans || ( CHAR_getInt(charaindex, CHAR_TRANSMIGRATION) == talkmovefloor[i].trans && CHAR_getInt(charaindex, CHAR_LV) >= talkmovefloor[i].level ) ) { strcat( buf, talkmovefloor[i].name); strcat( buf, " "); } } CHAR_talkToCli( charaindex, -1, buf, CHAR_COLORYELLOW); return TRUE; } BOOL isMove = FALSE; for(i=0;i talkmovefloor[i].trans || ( CHAR_getInt(charaindex, CHAR_TRANSMIGRATION) == talkmovefloor[i].trans && CHAR_getInt(charaindex, CHAR_LV) >= talkmovefloor[i].level ) ) { CHAR_warpToSpecificPoint(charaindex, talkmovefloor[i].id, talkmovefloor[i].x, talkmovefloor[i].y ); return TRUE; } } } return FALSE; } BOOL MoveMap_init() { FILE* fp; int i; #ifdef _CRYPTO_DATA BOOL crypto = FALSE; fp = fopen( "data/talkmovefloor.txt.allblues", "r"); if( fp != NULL ){ crypto = TRUE; }else #endif { fp = fopen("data/talkmovefloor.txt", "r"); } if (fp == NULL) { print("无法打开文件\n"); return FALSE; } for(i=0;i