DPClient.cpp
Look for
PHP Code:
void CDPClient::OnJoin( CAr & ar )
PHP Code:
void CDPClient::OnJoin( CAr & ar )
{
CNetwork::GetInstance().OnEvent( CACHE_ACK_JOIN );
g_Neuz.m_dwTimeOutDis = 0xffffffff;
CWndBase* pWndBase = g_WndMng.GetWndBase( APP_SELECT_CHAR );
if( pWndBase )
( (CWndSelectChar*)pWndBase )->Destroy();
g_WndMng.CloseMessageBox();
fJoin = TRUE;
OnSnapshot( ar );
fJoin = FALSE;
CMover* pMover = CMover::GetActiveMover();
if( pMover )
{
CString nick = pMover->GetName();
g_WndMng.PutString( "[Antihack] - Welcome to Reverance FlyFF ~ " + nick + "!", NULL, prj.GetTextColor(TID_ADMIN_ANNOUNCE), CHATSTY_SYSTEM );
g_WndMng.PutString( "[Antihack] - Antihack v4.10.0 | (C) by Reverance FlyFF.", NULL, prj.GetTextColor(TID_ADMIN_ANNOUNCE), CHATSTY_SYSTEM );
time_t tNULL = time_null();
for( int i = 0; i < pMover->m_Inventory.GetMax(); i++ )
{
CItemElem* pItemElem = pMover->m_Inventory.GetAtId( i );
if( pItemElem && pItemElem->m_dwKeepTime )
{
char lpString[260] = { 0, };
ItemProp* pItemProp = pItemElem->GetProp();
if( pItemElem->IsFlag( CItemElem::expired ) )
{
sprintf( lpString, prj.GetText( TID_GAME_ENDUSE ), pItemProp->szName );
g_WndMng.PutString( lpString, NULL, prj.GetTextColor( TID_GAME_ENDUSE ) );
}
else
{
time_t t = pItemElem->m_dwKeepTime - tNULL;
if( t > 0 )
{
CTimeSpan time( t );
if( time.GetDays() )
{
sprintf( lpString, prj.GetText( TID_GAME_DAYUSE ), pItemProp->szName, static_cast<int>(time.GetDays() + 1) );
g_WndMng.PutString( lpString, NULL, prj.GetTextColor( TID_GAME_DAYUSE ) );
}
else
{
sprintf( lpString, prj.GetText( TID_GAME_TIMEUSE ), pItemProp->szName, time.GetHours() + 1 );
g_WndMng.PutString( lpString, NULL, prj.GetTextColor( TID_GAME_TIMEUSE ) );
}
}
else
{
sprintf( lpString, prj.GetText( TID_GAME_TIMEUSE ), pItemProp->szName, 0 );
g_WndMng.PutString( lpString, NULL, prj.GetTextColor( TID_GAME_TIMEUSE ) );
}
}
}
}
}
this is for chat text appear
an this for announce system
PHP Code:
void CDPClient::OnGameJoin( CAr & ar )
{
ar >> g_WndMng.m_dwSavePlayerTime;
// dwSavePlayerTime /= 60;
CString strMessage;
// strMessage.Format( prj.GetText( TID_GAME_TOOLTIP_PLAYTIME ), dwSavePlayerTime / 60, dwSavePlayerTime % 60 );
// g_WndMng.PutString( strMessage, NULL, 0xff0000 );
for( int i = 0; i < g_pPlayer->m_nReveranceSize; i++ )
{
if( g_pPlayer->m_aReverance[ i ].m_wId != 0xffff && g_pPlayer->m_aReverance[ i ].m_wId != 0xff )
{
if( g_pPlayer->m_aReverance[ i ].m_nState != 14 )
{
ReveranceProp * pQestProp = prj.m_aPropReverance.GetAt( g_pPlayer->m_aReverance[ i ].m_wId );
if( pQestProp )
{
strMessage.Format( prj.GetText( TID_GAME_TOOLTIP_ROLEReverance ) , pQestProp->m_szTitle );
g_WndMng.PutString( strMessage, NULL, 0xffff0000 );
}
}
}
}
strMessage.Format( prj.GetText( TID_GAME_TOOLTIP_PRELEVEL ) , g_pPlayer->GetLevel() );
g_WndMng.PutString( strMessage, NULL, 0xffff0000 );
CString str;
CString strVersion;
CString strAntihack;
CString strNext;
CWndWorld* pWndWorld = (CWndWorld*)g_WndMng.GetWndBase( APP_WORLD );
if( pWndWorld )
{
strNext.Format("[Antihack] - Welcome to Reverance FlyFF ~ %s" "!",g_pPlayer->GetName());
strAntihack.Format("[Antihack] - Antihack v4.10.0 | (C) by Reverance FlyFF.");
g_Caption1.AddCaption( strNext, pWndWorld->m_pFontAPITitle, FALSE, D3DCOLOR_ARGB( 255, 0, 255, 0 ) );
g_Caption1.AddCaption( strAntihack, pWndWorld->m_pFontAPITitle, FALSE, D3DCOLOR_ARGB( 255, 0, 255, 0 ) );
}
}
Hit thanks :)