avertuss 48 Posted June 1, 2019 Share Posted June 1, 2019 Hi, I wanted to use more race flag than 1 but works only the first. 2492 ??? BOSS MONSTER MELEE 75 AGGR 0 DEVIL, BOSS STUN,SLOW,CURSE,TERROR 0 ch_general 0 89 69 60 30 47 73 500000 30 20 29700 44550 1 90 140 130 100 2000 100 0 0 0 0 0 0 0 0 10 10 10 20 20 0 0 0 50 0 0 2 0 0 0 0 10 259 40 260 0 0 0 0 0 0 0 0 0 0 0 Link to comment Share on other sites More sharing options...
boaspessoal 8 Posted June 1, 2019 Share Posted June 1, 2019 Check your protoreader.cpp syntax, perhaps it only allows separating flags by a '|'(in int get_Mob_RaceFlag_Value search for: string* arInputString) 1 Link to comment Share on other sites More sharing options...
avertuss 48 Posted June 1, 2019 Author Share Posted June 1, 2019 19 minut temu, boaspessoal napisał: Check your protoreader.cpp syntax, perhaps it only allows separating flags by a '|'(in int get_Mob_RaceFlag_Value search for: string* arInputString) int get_Mob_RaceFlag_Value(string inputString) { string arRaceFlag[] = {"ANIMAL","UNDEAD","DEVIL","HUMAN","ORC","MILGYO","INSECT","FIRE","ICE","DESERT","TREE", "ATT_ELEC","ATT_FIRE","ATT_ICE","ATT_WIND","ATT_EARTH","ATT_DARK", "METIN", "BOSS", "DUNG"}; int retValue = 0; string* arInputString = StringSplit(inputString, ","); //프로토 정보 내용을 단어별로 쪼갠 배열. for(int i =0;i<sizeof(arRaceFlag)/sizeof(arRaceFlag[0]);i++) { string tempString = arRaceFlag[i]; for (int j=0; j<30 ; j++) //최대 30개 단어까지. (하드코딩) { string tempString2 = arInputString[j]; if (tempString2.compare(tempString)==0) { //일치하는지 확인. retValue = retValue + pow((float)2,(float)i); } if(tempString2.compare("") == 0) break; } } delete []arInputString; //cout << "Race Flag : " << raceFlagStr << " -> " << retValue << endl; return retValue; } idk, doesn't work with "," Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now