PHP Code:
void CWndTaskBar::OnDraw( C2DRender* p2DRender )
{
if( NULL == g_pPlayer )
return;
DWORD dwCur = g_tmCurrent;
CRect rect = GetWindowRect();
CRect rectSkillQueue;
CD3DFont* pOldFont = p2DRender->GetFont();
p2DRender->SetFont( CWndBase::m_Theme.m_pFontWndTitle );
if( m_nPosition == TASKBAR_TOP || m_nPosition == TASKBAR_BOTTOM )
{
rectSkillQueue.SetRect( rect.Width() - 32 * 4 - 6, 0, rect.Width(), rect.Height() );
}
else
if( m_nPosition == TASKBAR_LEFT || m_nPosition == TASKBAR_RIGHT )
{
rectSkillQueue.SetRect( 0, rect.Height() - 32 * 4 - 6, rect.Width(), rect.Height() );
}
// µå·¡±× ÇÏÀ̶óÀÌÆ® ½½·Ô Ç¥½Ã
if( m_GlobalShortcut.IsEmpty() == FALSE )
{
DWORD dwColor;
if( m_dwHighAlpha < 128 )
dwColor = D3DCOLOR_ARGB( m_dwHighAlpha, 0, 0, 255 );
else
dwColor = D3DCOLOR_ARGB( 128 - ( m_dwHighAlpha - 128 ), 0, 0, 255 );
LPWNDCTRL pApplet = GetWndCtrl( WIDC_CUSTOM1 );
LPWNDCTRL pItem = GetWndCtrl( WIDC_CUSTOM2 );
LPWNDCTRL pSkill = GetWndCtrl( WIDC_CUSTOM3 );
CRect rectApplet = pApplet->rect;
CRect rectItem = pItem->rect;
CRect rectSkill = pSkill->rect;
rectApplet.top = 42;
rectApplet.bottom = 47;
rectApplet.left -= 6;
rectApplet.right += 6;
rectItem.top = 42;
rectItem.bottom = 47;
rectItem.left -= 6;
rectItem.right += 6;
rectSkill.top = 42;
rectSkill.bottom = 47;
rectSkill.left -= 3;
rectSkill.right += 4;
switch( m_GlobalShortcut.m_dwShortcut )
{
case SHORTCUT_APPLET:
case SHORTCUT_ITEM:
case SHORTCUT_MOTION:
p2DRender->RenderFillRect( rectApplet, dwColor );
p2DRender->RenderFillRect( rectItem, dwColor );
break;
case SHORTCUT_SKILL:
if( m_GlobalShortcut.m_dwType == 0 )
{
DWORD dwSkill = g_pPlayer->GetSkill( 0, m_GlobalShortcut.m_dwId )->dwSkill;
DWORD dwComboStyleSrc = prj.GetSkillProp( dwSkill )->dwComboStyle;
if( dwComboStyleSrc == CT_STEP || dwComboStyleSrc == CT_GENERAL ) // ½ºÅÜÀ̳ª Á¦³×·²À̸é ÇÕ°Ý
p2DRender->RenderFillRect( rectItem, dwColor );
p2DRender->RenderFillRect( rectSkill, dwColor );
}
else
p2DRender->RenderFillRect( rectItem, dwColor );
break;
}
}
// ¾ÖÇ÷¿ ¾ÆÀÌÄÜ Ãâ·Â
CPoint point = POINT_APPLET;
for( int i = 0; i < m_nMaxSlotApplet; i++ )
{
LPSHORTCUT lpShortcut = &m_aSlotApplet[ i ] ;
if( !lpShortcut->IsEmpty() )
{
if( lpShortcut->m_pTexture )
p2DRender->RenderTexture( point, lpShortcut->m_pTexture );
if( lpShortcut->m_dwShortcut == SHORTCUT_ITEM )
{
CItemBase* pItemBase = g_pPlayer->GetItemId( lpShortcut->m_dwId );
CItemElem* pItemElem = (CItemElem*)pItemBase;
if( pItemElem )
{
if( pItemElem->GetProp()->dwPackMax > 1 )
{
TCHAR szTemp[ 32 ];
#if __VER >= 8 // __JEFF_VER_8
_stprintf( szTemp, "%d", g_pPlayer?g_pPlayer->m_Inventory.GetItemCount( pItemElem->m_dwItemId ): 0 );
#else // __JEFF_VER_8
_stprintf( szTemp, "%d", pItemElem->m_nItemNum );
#endif // __JEFF_VER_8
CSize size = m_p2DRender->m_pFont->GetTextExtent( szTemp );
p2DRender->TextOut( point.x + 32 - size.cx, point.y + 32 - size.cy, szTemp, 0xfff6cc4d );
p2DRender->TextOut( point.x + 31 - size.cx, point.y + 31 - size.cy, szTemp, 0xfff6cc4d );
}
DWORD dwGroup = g_pPlayer->m_cooltimeMgr.GetGroup( pItemElem->GetProp() );
if( dwGroup )
{
DWORD dwEnd = g_pPlayer->m_cooltimeMgr.GetTime( dwGroup ); // À̺¥Æ® Á¾·á ½Ã°¢
if( dwEnd != 0 && dwEnd > dwCur )
{
DWORD dwBase = g_pPlayer->m_cooltimeMgr.GetBase( dwGroup ); // À̺¥Æ® ½ÃÀÛ ½Ã°¢
RenderRadar( p2DRender, point, dwCur - dwBase, dwEnd - dwBase );
}
}
}
else
{
#if __VER >= 8 // __JEFF_VER_8
ItemProp* pItemProp = prj.GetItemProp( lpShortcut->m_dwItemId );
if( pItemProp && pItemProp->dwPackMax > 1 ) // º´ÇÕ °¡´ÉÇÑ ¾ÆÀÌÅÛÀ̸é?
{
DWORD dwId = g_pPlayer->m_Inventory.Find( lpShortcut->m_dwItemId );
if( dwId != NULL_ID ) // °°Àº Á¾·ùÀÇ ¾ÆÀÌÅÛÀÌ ÀÖ´Ù¸é?
{
lpShortcut->m_dwId = dwId;
g_DPlay.SendAddAppletTaskBar( i, lpShortcut );
}
else
{
lpShortcut->Empty();
g_DPlay.SendRemoveAppletTaskBar( i );
}
}
else
{
lpShortcut->Empty();
g_DPlay.SendRemoveAppletTaskBar( i );
}
#else // __JEFF_VER_8
lpShortcut->Empty();
g_DPlay.SendRemoveAppletTaskBar( i );
#endif // __JEFF_VER_8
}
}
else
if( lpShortcut->m_dwShortcut == SHORTCUT_APPLET )
{
AppletFunc* pAppletFunc = g_WndMng.GetAppletFunc( lpShortcut->m_dwId );
if( pAppletFunc && pAppletFunc->m_cHotkey )
{
CPoint ptHotkey( point.x + 8, point.y - 9 );
DRAW_HOTKEY( p2DRender, ptHotkey, pAppletFunc->m_cHotkey );
}
}
else if( lpShortcut->m_dwShortcut == SHORTCUT_SKILL && lpShortcut->m_dwType != 2 ) //±Ø´Ü½ºÅ³Àº ÄðŸÀÓ °ü·Ã Render¸¦ ÇÏÁö ¾Ê´Â´Ù.
{
RenderCollTime( point, lpShortcut->m_dwId, p2DRender );
}
#if __VER >= 12 // __LORD
else if( lpShortcut->m_dwShortcut == SHORTCUT_LORDSKILL)
{
RenderLordCollTime( point, lpShortcut->m_dwId, p2DRender );
}
#endif
else
if( lpShortcut->m_dwShortcut == SHORTCUT_MOTION )
{
if( lpShortcut->m_dwId == MOT_BASE_ESCAPE )
{
ItemProp* pItem = prj.GetItemProp( g_AddSMMode.dwSMItemID[SM_ESCAPE] );
if( pItem && g_pPlayer )
{
CTimeSpan ct( g_pPlayer->m_dwSMTime[SM_ESCAPE] );
if( ct.GetTotalSeconds() )
{
point.y -= 1;
point.x += 1;
RenderRadar( m_p2DRender, point, (DWORD)( pItem->dwCircleTime - ct.GetTotalSeconds() ), pItem->dwCircleTime );
}
}
}
}
}
point += CPoint( ICON_SIZE, 0 );
}
// ¾ÆÀÌÅÛ ¾ÆÀÌÄÜ Ãâ·Â
point = POINT_ITEM;
for( i = 0; i < MAX_SLOT_ITEM; i++ )
{
LPSHORTCUT lpShortcut = &m_paSlotItem[ i ] ;
if( !lpShortcut->IsEmpty() )
{
if( lpShortcut->m_pTexture )
p2DRender->RenderTexture( point, lpShortcut->m_pTexture );
if( lpShortcut->m_dwShortcut == SHORTCUT_ITEM )
{
CItemBase* pItemBase = g_pPlayer->GetItemId( lpShortcut->m_dwId );
CItemElem* pItemElem = (CItemElem*)pItemBase;
if( pItemElem )
{
if( pItemElem->GetProp()->dwPackMax > 1 )
{
TCHAR szTemp[ 32 ];
#if __VER >= 8 // __JEFF_VER_8
_stprintf( szTemp, "%d", g_pPlayer?g_pPlayer->m_Inventory.GetItemCount( pItemElem->m_dwItemId ): 0 );
#else // __JEFF_VER_8
_stprintf( szTemp, "%d", pItemElem->m_nItemNum );
#endif // __JEFF_VER_8
CSize size = m_p2DRender->m_pFont->GetTextExtent( szTemp );
p2DRender->TextOut( point.x + 32 - size.cx, point.y + 32 - size.cy, szTemp, 0xfff6cc4d );
p2DRender->TextOut( point.x + 31 - size.cx, point.y + 31 - size.cy, szTemp, 0xfff6cc4d );
}
}
DWORD dwGroup = g_pPlayer->m_cooltimeMgr.GetGroup( pItemElem->GetProp() );
if( dwGroup )
{
DWORD dwEnd = g_pPlayer->m_cooltimeMgr.GetTime( dwGroup ); // À̺¥Æ® Á¾·á ½Ã°¢
if( dwEnd != 0 && dwEnd > dwCur )
{
DWORD dwBase = g_pPlayer->m_cooltimeMgr.GetBase( dwGroup ); // À̺¥Æ® ½ÃÀÛ ½Ã°¢
RenderRadar( p2DRender, point, dwCur - dwBase, dwEnd - dwBase );
}
}
}
else if( lpShortcut->m_dwShortcut == SHORTCUT_SKILL && lpShortcut->m_dwType != 2 ) //±Ø´Ü½ºÅ³Àº ÄðŸÀÓ °ü·Ã Render¸¦ ÇÏÁö ¾Ê´Â´Ù.
{
RenderCollTime( point, lpShortcut->m_dwId, p2DRender );
}
#if __VER >= 12 // __LORD
else if( lpShortcut->m_dwShortcut == SHORTCUT_LORDSKILL)
{
RenderLordCollTime( point, lpShortcut->m_dwId, p2DRender );
}
#endif
else
if( lpShortcut->m_dwShortcut == SHORTCUT_MOTION )
{
if( lpShortcut->m_dwId == MOT_BASE_ESCAPE )
{
ItemProp* pItem = prj.GetItemProp( g_AddSMMode.dwSMItemID[SM_ESCAPE] );
if( pItem && g_pPlayer )
{
CTimeSpan ct( g_pPlayer->m_dwSMTime[SM_ESCAPE] );
if( ct.GetTotalSeconds() )
{
point.y -= 1;
point.x += 1;
RenderRadar( m_p2DRender, point, (DWORD)( pItem->dwCircleTime - ct.GetTotalSeconds() ), pItem->dwCircleTime );
}
}
}
}
}
// hotkey Ãâ·Â
CHAR cHotkey = ( i == 9 ) ? '0' : '1' + i;
CPoint ptHotkey( point.x + 8, point.y - 9 );
//DRAW_HOTKEY( p2DRender, ptHotkey, cHotkey );
point += CPoint( ICON_SIZE, 0 );
}
point = CPoint( POINT_QUEUE_X - ICON_SIZE - 5, POINT_QUEUE_Y );
p2DRender->RenderTexture( point, m_pTexture );
// ½ºÅ³ Å¥
point = POINT_QUEUE;
//p2DRender->TextOut( point.x - 5, point.y - 16, "ACTION SLOT" );
for( i = 0; i < m_nCurQueueNum; i++ )
{
LPSHORTCUT lpShortcut = &m_aSlotQueue[ i ] ;
if( !lpShortcut->IsEmpty() )
{
if( lpShortcut->m_pTexture )
{
p2DRender->RenderTexture( point, lpShortcut->m_pTexture );
// LPSKILL pSkill = g_pPlayer->GetSkill( lpShortcut->m_dwType, lpShortcut->m_dwId );
// if( g_pPlayer->m_nReUseDelay[ lpShortcut->m_dwId ] > 0 )
// p2DRender->TextOut( point.x, point.y, g_pPlayer->m_nReUseDelay[ lpShortcut->m_dwId ] );
}
}
point += CPoint( SKILL_SIZE, 0 );
}
if( !( g_pPlayer->IsSMMode( SM_ACTPOINT ) ) )
{
#define LV2MAXAP 10 // 2´Ü°è ½ºÅ³ÀÌ ´ÙÂ÷´Âµ¥ ÇÊ¿äÇÑ action point
#define LV3MAXAP 25
#define LV4MAXAP 50
#define LV5MAXAP 100
point = POINT_QUEUE;
point.x += SKILL_SIZE; // ½ºÅ³ 2¹ø°ĺÎÅÍ ½¦À̵åµÈ´Ù.
{
int nAP2Size; // ¾×¼ÇÆ÷ÀÎÆ®¸¦ ÇÏÀ̶óÀÌÆ®¾çÀ¸·Î º¯È¯ÇÑ°ª.
if( m_nActionPoint >= LV4MAXAP ) // LV4MAXAP¸¦ ³Ñ¾î¼¸é 5´Ü°è ½ÃÀÛ.
nAP2Size = (SKILL_SIZE * 3) + (((m_nActionPoint - LV4MAXAP) * SKILL_SIZE) / (LV5MAXAP - LV4MAXAP));
else if( m_nActionPoint >= LV3MAXAP )
nAP2Size = (SKILL_SIZE * 2) + (((m_nActionPoint - LV3MAXAP) * SKILL_SIZE) / (LV4MAXAP - LV3MAXAP));
else if( m_nActionPoint >= LV2MAXAP )
nAP2Size = (SKILL_SIZE * 1) + (((m_nActionPoint - LV2MAXAP) * SKILL_SIZE) / (LV3MAXAP - LV2MAXAP));
else
nAP2Size = (m_nActionPoint * SKILL_SIZE) / LV2MAXAP;
p2DRender->m_pd3dDevice->SetRenderState( D3DRS_ALPHABLENDENABLE, TRUE );
p2DRender->m_pd3dDevice->SetRenderState( D3DRS_ALPHATESTENABLE, FALSE );
point.x += nAP2Size;
nAP2Size = (SKILL_SIZE * 4) - nAP2Size;
p2DRender->RenderFillRect( CRect(point.x, point.y, point.x + nAP2Size, point.y + SKILL_SIZE + 2),
D3DCOLOR_ARGB( 0x7f, 0, 0, 0 ) );
if( m_nCurQueueNum > 0 )
{
int show = 1;
if( m_nActionPoint >= LV2MAXAP )
show = 2;
if( m_nActionPoint >= LV3MAXAP )
show = 3;
if( m_nActionPoint >= LV4MAXAP )
show = 4;
if( m_nActionPoint >= LV5MAXAP )
show = 5;
if( m_nCurQueueNum <= show )
show = m_nCurQueueNum;
CPoint Point = CPoint( POINT_QUEUE_X, POINT_QUEUE_Y+1 );
RenderOutLineLamp( POINT_QUEUE_X, POINT_QUEUE_Y+1, show, SKILL_SIZE );
}
}
}
CWndButton* pWndButton = (CWndButton*)GetDlgItem( WIDC_UP );
rect = pWndButton->GetWindowRect( TRUE );
rect.top = rect.bottom - 2;
p2DRender->TextOut( rect.left, rect.top, m_nSlotIndex + 1, 0xffffffff );
p2DRender->SetFont( pOldFont );
}
Dann noch sichergehen das m_nActionPoint in eurer WndTaskbar.h definiert ist und alles sollte funktionieren.
PHP Code:
int m_nActionPoint;