Definition at line 197 of file CharacterListMgnt.cpp. 00198 { 00199 uint32_t j = 100; 00200 bool found = true; 00201 00202 // if empty return the first possible ID 00203 if (!ciVector.size()) 00204 return j; 00205 00206 // run as long as ID is in use 00207 while (found){ 00208 j ++; 00209 found=false; 00210 for (int i = 0 ; i < ciVector.size(); i++) 00211 { 00212 if ((ciVector[i]->get_ID() == j) && (!ciVector[i]->get_finished())) { 00213 found=true; 00214 i = ciVector.size(); 00215 } 00216 } 00217 } 00218 00219 return j; 00220 } // getFreeID
|
1.5.1