unsigned long Temp; unsigned long len_send = 0; TotalSent=0; //Pos=8; Pos = 9; memset(FullList,0,20480); for ( unsigned long i=0; i < pServer->Realms.Size; i++ ) { if ( RealmInfo *pRealm = pServer->Realms[i] ) { if ( pRealm->Active ) { Temp = pServer->ShowRealm(*pRealm, TotalSent+1, &FullList[Pos] ); TotalSent++; if ( TotalSent >= 250 ) break; Pos+=Temp; } } } #if defined(WIN32) && defined(NDEBUG) UpdateCounter++; if(UpdateCounter>=80 && dlg) { UpdateCounter=0; char temp[100]; sprintf(temp,"Connected to %i Townhall%c",TotalSent,(TotalSent==1)?'\x00':'s'); dlg->m_Connected.SetWindowText(temp); } #endif //FullList[Pos++]=0x04; //FullList[Pos++]=0x00; FullList[0] = 0x10; // REALMLIST opcode alen = (unsigned short)(Pos-3); *(unsigned short*)&FullList[1] = alen; // packet size - 3 // request code unsigned long request = 0; *(unsigned int*)&FullList[3] = 0; // unk int *(unsigned short*)&FullList[7] = TotalSent; // realm count vector tmplist = clients; clients.clear(); // process current clients