// World Process PVOID WorldProcess( PVOID TS ) { while( GServer->ServerOnline ) { pthread_mutex_lock( &GServer->MapMutex ); for(UINT i=0;i<GServer->MapList.Map.size();i++) { CMap* map = GServer->MapList.Map.at(i); if( map->PlayerList.size()<1 ) continue; map->UpdateTime( ); pthread_mutex_lock( &map->DropMutex ); map->CleanDrops( ); pthread_mutex_unlock( &map->DropMutex ); pthread_mutex_lock( &map->MonsterMutex ); map->RespawnMonster( ); pthread_mutex_unlock( &map->MonsterMutex ); } pthread_mutex_unlock( &GServer->MapMutex ); GServer->RefreshFairy( ); #ifdef _WIN32 Sleep(GServer->Config.WorldDelay); #else usleep(GServer->Config.WorldDelay); #endif } pthread_exit(NULL); return 0; }