BOOL CUser::GetWarpList(int warp_group)
{
_WARP_INFO* pWarp = NULL;
C3DMap* pMap = NULL;
int warpid = 0, send_index = 0; // Çì´õ¿Í Ä«¿îÆ®¸¦ ³ªÁß¿¡ ÆĞÅ·...
int zoneindex = -1, temp_index = 0, count = 0;
char buff[8192]; memset(buff, 0x00, 8192);
char send_buff[8192]; memset(send_buff, 0x00, 8192);
BYTE type = 1;
if( m_iZoneIndex < 0 || m_iZoneIndex >= m_pMain->m_ZoneArray.size() ) return FALSE;
pMap = m_pMain->m_ZoneArray[m_iZoneIndex];
if( !pMap )
return FALSE;
map < int, _WARP_INFO* >::iterator Iter1;
map < int, _WARP_INFO* >::iterator Iter2;
Iter1 = pMap->m_WarpArray.m_UserTypeMap.begin();
Iter2 = pMap->m_WarpArray.m_UserTypeMap.end();
for( ; Iter1 != Iter2; Iter1++ ) {
pWarp = (*Iter1).second;
if( !pWarp ) continue;
if( (pWarp->sWarpID / 10) != warp_group ) continue;
SetShort( buff, pWarp->sWarpID, send_index );
SetShort( buff, strlen(pWarp->strWarpName), send_index );
SetString( buff, pWarp->strWarpName, strlen(pWarp->strWarpName), send_index );
SetShort( buff, strlen(pWarp->strAnnounce), send_index );
SetString( buff, pWarp->strAnnounce, strlen(pWarp->strAnnounce), send_index );
SetShort( buff, pWarp->sZone, send_index );
SetShort( buff, 200, send_index );
SetDWORD( buff, pWarp->dwPay, send_index ); //
count++;
}
SetByte( send_buff, WIZ_WARP_LIST, temp_index );
SetByte( send_buff, type, temp_index );
SetShort( send_buff, count, temp_index );
SetString( send_buff, buff, send_index, temp_index );
Send( send_buff, temp_index );
return TRUE;
}