Advertisement
Guest User

Taskbar V19 (Motion Tooltip Removal)

a guest
Sep 23rd, 2022
353
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 171.35 KB | Source Code | 0 0
  1. // WndArcane.cpp: implementation of the CWndNeuz class.
  2. //
  3. //////////////////////////////////////////////////////////////////////
  4.  
  5. #include "stdafx.h"
  6. #include "defineText.h"
  7. #include "AppDefine.h"
  8. #include "DialogMsg.h"
  9. #include "WndField.h"
  10. #include "WndManager.h"
  11. #include "WndRegVend.h"
  12. #include "DPClient.h"
  13.  
  14. #ifdef __NEW_TASKBAR_V19
  15. #include "definesound.h"
  16. #include <fstream>
  17. #include "defineSkill.h"
  18. #define M_PI 3.14159265358979323846f
  19. bool CWndTaskBarInterface::m_bLock = false;
  20. #endif // __NEW_TASKBAR_V19
  21.  
  22. extern  CDPClient   g_DPlay;
  23.  
  24. _ERROR_STATE g_Error_State;
  25.  
  26.  
  27. #define WND_WIDTH 210
  28. #define TASKBAR_HEIGHT 48
  29.  
  30.  
  31. /////////////////////////////////////////////////////////////////////////////////////////////////////////
  32. /////////////////////////////////////////////////////////////////////////////////////////////////////////
  33. //
  34. // ÀÛ¾÷ À©µµ
  35. //
  36. /////////////////////////////////////////////////////////////////////////////////////////////////////////
  37. /////////////////////////////////////////////////////////////////////////////////////////////////////////
  38. CWndShortcut::CWndShortcut()
  39. {
  40. }
  41. CWndShortcut::~CWndShortcut()
  42. {
  43. }
  44. void CWndShortcut::OnDraw(C2DRender* p2DRender)
  45. {
  46.     CWndButton::OnDraw( p2DRender );
  47. }
  48. BOOL CWndShortcut::Process()
  49. {
  50.     return CWndButton::Process();
  51. }
  52. void CWndShortcut::PaintFrame( C2DRender* p2DRender )
  53. {
  54.     CWndButton::PaintFrame( p2DRender );
  55. }
  56. void CWndShortcut::OnLButtonUp(UINT nFlags, CPoint point)
  57. {
  58.     CWndButton::OnLButtonUp( nFlags, point );
  59. }
  60. void CWndShortcut::OnLButtonDown(UINT nFlags, CPoint point)
  61. {
  62.     CWndButton::OnLButtonDown( nFlags, point );
  63. }
  64. void CWndShortcut::OnRButtonUp(UINT nFlags, CPoint point)
  65. {
  66.     CWndButton::OnRButtonUp( nFlags, point );
  67. }
  68. void CWndShortcut::OnRButtonDown(UINT nFlags, CPoint point)
  69. {
  70.     CWndButton::OnRButtonDown( nFlags, point );
  71. }
  72. void CWndShortcut::OnLButtonDblClk(UINT nFlags, CPoint point)
  73. {
  74.     CWndButton::OnLButtonDblClk( nFlags, point );
  75. }
  76. void CWndShortcut::OnRButtonDblClk(UINT nFlags, CPoint point)
  77. {
  78.     CWndButton::OnRButtonDblClk( nFlags, point );
  79. }
  80. void CWndShortcut::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
  81. {
  82.     CWndButton::OnKeyDown( nChar, nRepCnt, nFlags );
  83. }
  84. void CWndShortcut::OnMouseMove(UINT nFlags, CPoint point)
  85. {
  86.     CWndButton::OnMouseMove( nFlags, point );
  87. }
  88. /////////////////////////////////////////////////////////////////////////////////////////////////////////
  89. /////////////////////////////////////////////////////////////////////////////////////////////////////////
  90. //
  91. // Äü ¸®½ºÆ®
  92. //
  93. /////////////////////////////////////////////////////////////////////////////////////////////////////////
  94. /////////////////////////////////////////////////////////////////////////////////////////////////////////
  95.  
  96. CWndQuickList::CWndQuickList()
  97. {
  98. }
  99. CWndQuickList::~CWndQuickList()
  100. {
  101. }
  102. void CWndQuickList::OnDraw( C2DRender* p2DRender )
  103. {
  104.     CWndTaskBar* pWndTaskBar = (CWndTaskBar*)m_pParentWnd;
  105.     // ¾ÆÀÌÅÛ ¾ÆÀÌÄÜ Ãâ·Â
  106.     CPoint point = CPoint( 0, 0);//POINT_ITEM;
  107.     for( int y = 0; y < 4; y++ )
  108.     {
  109.         for( int i = 0; i < MAX_SLOT_ITEM; i++ )
  110.         {
  111.             point = CPoint( i * 32 + 32 , y * 38 + 6 );
  112.             LPSHORTCUT lpShortcut = &pWndTaskBar->m_aSlotItem[ y ][ i ] ;
  113.             if( !lpShortcut->IsEmpty() )
  114.             {
  115.                 if( lpShortcut->m_pTexture )
  116.                     p2DRender->RenderTexture( point, lpShortcut->m_pTexture );
  117.                 if( lpShortcut->m_dwShortcut == SHORTCUT_ITEM )
  118.                 {
  119.                     CItemBase* pItemBase = g_pPlayer->GetItemId( lpShortcut->m_dwId );
  120.                     CItemElem* pItemElem = (CItemElem*)pItemBase;
  121.  
  122.                     if( pItemElem  )
  123.                     {
  124.                         if( pItemElem->GetProp()->dwPackMax > 1 )
  125.                         {
  126.                             TCHAR szTemp[ 32 ];
  127.                             _stprintf( szTemp, "%d", pItemElem->m_nItemNum );
  128.                             CSize size = m_p2DRender->m_pFont->GetTextExtent( szTemp );
  129. #if __VER >= 19
  130.                             CD3DFont* pOldFont = p2DRender->GetFont();
  131.                             p2DRender->SetFont( CWndBase::m_Theme.m_pFontWndNewTitle2 );
  132.  
  133.                             p2DRender->TextOut( point.x + 35 - size.cx, point.y + 35 - size.cy, szTemp, 0xFF000000 );
  134.                             p2DRender->TextOut( point.x + 34 - size.cx, point.y + 34 - size.cy, szTemp, 0xFF85FF8A );
  135.                        
  136.                             p2DRender->SetFont( pOldFont );
  137. #else // __VER >= 19
  138.                             p2DRender->TextOut( point.x + 32 - size.cx, point.y + 32 - size.cy, szTemp, 0xff0000ff );
  139.                             p2DRender->TextOut( point.x + 31 - size.cx, point.y + 31 - size.cy, szTemp, 0xffb0b0f0 );
  140. #endif // __VER >= 19
  141.                         }
  142.                     }
  143.                     else
  144.                         lpShortcut->m_dwShortcut = SHORTCUT_NONE;              
  145.                 }
  146.             }
  147.         }
  148.     }
  149. }
  150. void CWndQuickList::OnInitialUpdate()
  151. {
  152.     CWndNeuz::OnInitialUpdate();
  153.     CRect rectRoot = m_pWndRoot->GetLayoutRect();
  154.     CRect rectWindow = GetWindowRect();
  155.     CPoint point( rectRoot.right - rectWindow.Width(), 110 );
  156.     Move( point );
  157.     MoveParentCenter();
  158. }
  159. // óÀ½ ÀÌ ÇÔ¼ö¸¦ ºÎ¸£¸é À©µµ°¡ ¿­¸°´Ù.
  160. BOOL CWndQuickList::Initialize( CWndBase* pWndParent, DWORD /*dwWndId*/ )
  161. {
  162.     // Daisy¿¡¼­ ¼³Á¤ÇÑ ¸®¼Ò½º·Î À©µµ¸¦ ¿¬´Ù.
  163.     return CWndNeuz::InitDialog( g_Neuz.GetSafeHwnd(), APP_QUICKLIST, 0, CPoint( 0, 0 ), pWndParent );
  164.    
  165. }
  166. /*
  167.   Á÷Á¢ À©µµ¸¦ ¿­¶§ »ç¿ë
  168. BOOL CWndQuickList::Initialize( CWndBase* pWndParent, DWORD dwWndId )
  169. {
  170.     CRect rectWindow = m_pWndRoot->GetWindowRect();
  171.     CRect rect( 50 ,50, 300, 300 );
  172.     SetTitle( _T( "title" ) );
  173.     return CWndNeuz::Create( WBS_THICKFRAME | WBS_MOVE | WBS_SOUND | WBS_CAPTION, rect, pWndParent, dwWndId );
  174. }
  175. */
  176. BOOL CWndQuickList::OnCommand( UINT nID, DWORD dwMessage, CWndBase* pWndBase )
  177. {
  178.     return CWndNeuz::OnCommand( nID, dwMessage, pWndBase );
  179. }
  180. void CWndQuickList::OnSize( UINT nType, int cx, int cy ) \
  181. {
  182.     CWndNeuz::OnSize( nType, cx, cy );
  183. }
  184. void CWndQuickList::OnLButtonUp( UINT nFlags, CPoint point )
  185. {
  186. }
  187. void CWndQuickList::OnLButtonDown( UINT nFlags, CPoint point )
  188. {
  189. }
  190. BOOL CWndQuickList::OnChildNotify( UINT message, UINT nID, LRESULT* pLResult )
  191. {
  192.     return CWndNeuz::OnChildNotify( message, nID, pLResult );
  193. }
  194. //#ifdef __NEWINTERFACE
  195.  
  196. //#define TASKSHORTCUT 45
  197. #define ICON_SIZE    32
  198. #define SKILL_SIZE   28
  199.  
  200. /*
  201. #define POINT_APPLET_X  87
  202. #define POINT_APPLET_Y   9
  203. #define POINT_ITEM_X   295
  204. #define POINT_ITEM_Y     9
  205. #define POINT_QUEUE_X  649
  206. #define POINT_QUEUE_Y    9
  207. */
  208. DWORD   POINT_APPLET_X ;
  209. DWORD   POINT_APPLET_Y ;
  210. DWORD   POINT_ITEM_X   ;
  211. DWORD   POINT_ITEM_Y   ;
  212. DWORD   POINT_QUEUE_X  ;
  213. DWORD   POINT_QUEUE_Y  ;
  214.  
  215. #define HORIRC_APPLET( nIndex ) CRect( POINT_APPLET_X + nIndex * ICON_SIZE, 6, POINT_APPLET_X + nIndex * ICON_SIZE + ICON_SIZE , 6 + ICON_SIZE )
  216. #define VERTRC_APPLET( nIndex ) CRect( 6, POINT_APPLET_X + nIndex * ICON_SIZE, 3 + ICON_SIZE, POINT_APPLET_X + nIndex * ICON_SIZE + ICON_SIZE )
  217. #define HORIRC_ITEM( nIndex )   CRect( POINT_ITEM_X + nIndex * ICON_SIZE, 6, POINT_ITEM_X + nIndex * ICON_SIZE + ICON_SIZE , 6 + ICON_SIZE )
  218. #define VERTRC_ITEM( nIndex )   CRect( 6, POINT_ITEM_X + nIndex * ICON_SIZE, 3 + ICON_SIZE, POINT_ITEM_X + nIndex * ICON_SIZE + ICON_SIZE )
  219. #define HORIRC_QUEUE( nIndex )  CRect( POINT_QUEUE_X + nIndex * SKILL_SIZE, 6, POINT_QUEUE_X + nIndex * SKILL_SIZE + SKILL_SIZE, 7 + SKILL_SIZE )
  220. #define VERTRC_QUEUE( nIndex )  CRect( 6, POINT_QUEUE_X + nIndex * SKILL_SIZE, 6 + SKILL_SIZE, POINT_QUEUE_X + nIndex * SKILL_SIZE + SKILL_SIZE )
  221.  
  222. #define RECT_APPLET CRect( POINT_APPLET_X, POINT_APPLET_Y, POINT_APPLET_X + m_nMaxSlotApplet * ICON_SIZE , POINT_APPLET_Y + ICON_SIZE  )
  223. #define RECT_ITEM   CRect( POINT_ITEM_X  , POINT_ITEM_Y  , POINT_ITEM_X   + MAX_SLOT_ITEM   * ICON_SIZE , POINT_ITEM_Y   + ICON_SIZE  )
  224. #define RECT_QUEUE  CRect( POINT_QUEUE_X , POINT_QUEUE_Y , POINT_QUEUE_X  + MAX_SLOT_QUEUE  * SKILL_SIZE, POINT_QUEUE_Y  + SKILL_SIZE )
  225.  
  226. #define POINT_APPLET CPoint( POINT_APPLET_X, POINT_APPLET_Y )
  227. #define POINT_ITEM   CPoint( POINT_ITEM_X  , POINT_ITEM_Y   )
  228. #define POINT_QUEUE  CPoint( POINT_QUEUE_X , POINT_QUEUE_Y  )
  229.  
  230. //#else
  231. /*
  232. #define TASKSHORTCUT 45
  233. #define ICON_SIZE    32
  234. #define SKILL_SIZE   28
  235.  
  236. #define POINT_APPLET_X  89
  237. #define POINT_APPLET_Y   8
  238. #define POINT_ITEM_X   306
  239. #define POINT_ITEM_Y     8
  240. #define POINT_QUEUE_X  648
  241. #define POINT_QUEUE_Y    6
  242.  
  243. #define HORIRC_APPLET( nIndex ) CRect( 89 + nIndex * ICON_SIZE, 6, 89 + nIndex * ICON_SIZE + ICON_SIZE , 6 + ICON_SIZE )
  244. #define VERTRC_APPLET( nIndex ) CRect( 6, 89 + nIndex * ICON_SIZE, 3 + ICON_SIZE, 292 + nIndex * ICON_SIZE + ICON_SIZE )
  245. #define HORIRC_ITEM( nIndex )   CRect( 306 + nIndex * ICON_SIZE, 6, 306 + nIndex * ICON_SIZE + ICON_SIZE , 6 + ICON_SIZE )
  246. #define VERTRC_ITEM( nIndex )   CRect( 6, 292 + nIndex * ICON_SIZE, 3 + ICON_SIZE, 292 + nIndex * ICON_SIZE + ICON_SIZE )
  247. #define HORIRC_QUEUE( nIndex )  CRect( 648 + nIndex * SKILL_SIZE, 6, 648 + nIndex * SKILL_SIZE + SKILL_SIZE, 7 + SKILL_SIZE )
  248. #define VERTRC_QUEUE( nIndex )  CRect( 6, 648 + nIndex * SKILL_SIZE, 6 + 32, 648 + nIndex * SKILL_SIZE + SKILL_SIZE )
  249.  
  250. #define RECT_APPLET CRect(  89, 6, 280, 38 )
  251. #define RECT_ITEM   CRect( 306, 6, 612, 38 )
  252. #define RECT_QUEUE  CRect( 648, 6, 790, 38 )
  253.  
  254. #define POINT_APPLET CPoint( POINT_APPLET_X, POINT_APPLET_Y )
  255. #define POINT_ITEM   CPoint( POINT_ITEM_X  , POINT_ITEM_Y   )
  256. #define POINT_QUEUE  CPoint( POINT_QUEUE_X , POINT_QUEUE_Y  )
  257.  
  258. #endif
  259.   */
  260. void CWndTaskBar::OnDestroyChildWnd( CWndBase* pWndChild )
  261. {
  262.     if( m_pWndQuickList == pWndChild )
  263.         SAFE_DELETE( m_pWndQuickList );
  264. #ifdef __NEW_TASKBAR_V19
  265.     SAFE_DELETE(pWndTaskBar_HUD);
  266.     SAFE_DELETE(pWndTaskBar_HUD_SLIDE);
  267.     SAFE_DELETE(pWndTaskBar_HUD_EX1);
  268.     SAFE_DELETE(pWndTaskBar_HUD_EX2);
  269.     SAFE_DELETE(pWndTaskBar_HUD_EX3);
  270.     SAFE_DELETE(pWndNewSkillSlot);
  271. #endif // __NEW_TASKBAR_V19
  272. }
  273.  
  274. void CWndTaskBar::Serialize( CAr & ar )
  275. {
  276.     if( ar.IsStoring() )
  277.     {
  278.         int nCount  = 0;
  279.         u_long uOffset  = ar.GetOffset();
  280.         ar << nCount;
  281.         for( int i = 0; i < MAX_SLOT_APPLET; i++ )
  282.         {
  283.             if( m_aSlotApplet[i].m_dwShortcut == SHORTCUT_NONE )        // °ªÀÌ µé¾îÀÖ´ÂÁö °Ë»ç
  284.             {
  285.                 ar << i;
  286.                 ar << m_aSlotApplet[i].m_dwShortcut <<  m_aSlotApplet[i].m_dwId << m_aSlotApplet[i].m_dwType;
  287.                 ar << m_aSlotApplet[i].m_dwIndex << m_aSlotApplet[i].m_dwUserId << m_aSlotApplet[i].m_dwData;
  288.                 if( m_aSlotApplet[i].m_dwShortcut == SHORTCUT_CHAT )
  289.                     ar.WriteString( m_aSlotApplet[i].m_szString );
  290.                 nCount++;
  291.             }
  292.         }
  293.         int nBufSize;
  294.         LPBYTE lpBuf    = ar.GetBuffer( &nBufSize );
  295.         *(UNALIGNED int*)( lpBuf + uOffset )    = nCount;
  296.  
  297.         nCount  = 0;
  298.         uOffset = ar.GetOffset();
  299.         ar << nCount;
  300.         for( int i = 0; i < MAX_SLOT_ITEM_COUNT; i++ )
  301.         {
  302.             for( int j = 0; j < MAX_SLOT_ITEM; j++ )
  303.             {
  304.                 if( m_aSlotItem[i][j].m_dwShortcut == SHORTCUT_NONE )       // °ªÀÌ µé¾îÀÖ´ÂÁö °Ë»ç
  305.                 {
  306.                     ar << i << j;
  307.                     ar << m_aSlotItem[i][j].m_dwShortcut << m_aSlotItem[i][j].m_dwId << m_aSlotItem[i][j].m_dwType;
  308.                     ar << m_aSlotItem[i][j].m_dwIndex << m_aSlotItem[i][j].m_dwUserId << m_aSlotItem[i][j].m_dwData;
  309.                     if( m_aSlotItem[i][j].m_dwShortcut == SHORTCUT_CHAT)
  310.                         ar.WriteString( m_aSlotItem[i][j].m_szString );
  311.                     nCount++;
  312.                    
  313.                 }
  314.             }
  315.         }
  316.         lpBuf   = ar.GetBuffer( &nBufSize );
  317.         *(UNALIGNED int*)( lpBuf + uOffset )    = nCount;
  318.  
  319.         nCount  = 0;
  320.         uOffset = ar.GetOffset();
  321.         ar << nCount;
  322.         for( int i = 0; i < MAX_SLOT_QUEUE; i++ )
  323.         {
  324.             if( m_aSlotQueue[i].m_dwShortcut == SHORTCUT_NONE )     // °ªÀÌ µé¾îÀÖ´ÂÁö °Ë»ç
  325.             {
  326.                 ar << i;
  327.                 ar << m_aSlotQueue[i].m_dwShortcut << m_aSlotQueue[i].m_dwId << m_aSlotQueue[i].m_dwType;
  328.                 ar << m_aSlotQueue[i].m_dwIndex << m_aSlotQueue[i].m_dwUserId << m_aSlotQueue[i].m_dwData;
  329.                 nCount++;
  330.             }
  331.         }
  332.         ar << m_nActionPoint;
  333.  
  334.         lpBuf   = ar.GetBuffer( &nBufSize );
  335.         *(UNALIGNED int*)( lpBuf + uOffset )    = nCount;
  336.     }
  337.     else
  338.     {
  339.         InitTaskBar();
  340.         int nCount, nIndex;
  341.         ar >> nCount;   // applet count
  342.         for( int i = 0; i < nCount; i++ )
  343.         {
  344.             ar >> nIndex;
  345.             ar >> m_aSlotApplet[nIndex].m_dwShortcut >> m_aSlotApplet[nIndex].m_dwId >> m_aSlotApplet[nIndex].m_dwType;
  346.             ar >> m_aSlotApplet[nIndex].m_dwIndex >> m_aSlotApplet[nIndex].m_dwUserId >> m_aSlotApplet[nIndex].m_dwData;
  347.             if( m_aSlotApplet[nIndex].m_dwShortcut == SHORTCUT_CHAT)
  348.                 ar.ReadString( m_aSlotApplet[nIndex].m_szString, MAX_SHORTCUT_STRING );
  349.             m_aSlotApplet[nIndex].m_dwIndex = nIndex;
  350.             SetTaskBarTexture( &m_aSlotApplet[nIndex] );
  351.  
  352.             if( m_aSlotApplet[nIndex].m_dwShortcut == SHORTCUT_SKILL ) 
  353.             {
  354.                 ItemProp* pProp;
  355.                 if( m_aSlotApplet[nIndex].m_dwType == 2 )
  356.                     pProp =  prj.GetPartySkill( m_aSlotApplet[nIndex].m_dwId );
  357.                 else
  358.                 {
  359.                     LPSKILL pSkill = g_pPlayer->GetSkill( 0, m_aSlotApplet[nIndex].m_dwId );
  360.                     pProp = prj.GetSkillProp( pSkill->dwSkill );   
  361.                 }
  362.                 if( pProp == NULL || (pProp->dwComboStyle != CT_STEP && pProp->dwComboStyle != CT_GENERAL) )   
  363.                 {
  364.                     m_aSlotApplet[nIndex].Empty();
  365.                 }
  366.             }
  367. #ifdef __CLIENT
  368. #if __VER >= 8  // __JEFF_VER_8
  369.             else if( m_aSlotApplet[nIndex].m_dwShortcut == SHORTCUT_ITEM )
  370.             {
  371.                 if( g_pPlayer )
  372.                 {
  373.                     CItemBase* pItemBase    = g_pPlayer->GetItemId( m_aSlotApplet[nIndex].m_dwId );
  374.                     if( pItemBase && pItemBase->GetProp()->dwPackMax > 1 )  // º´ÇÕ °¡´ÉÇÑ ¾ÆÀÌÅÛÀ̸é?
  375.                         m_aSlotApplet[nIndex].m_dwItemId    = pItemBase->m_dwItemId;
  376.                 }
  377.             }
  378. #endif  // __JEFF_VER_8
  379. #endif  // __CLIENT
  380.         }
  381.         ar >> nCount;   // slot item count
  382.         int nIndex2;
  383.         for( int i = 0; i < nCount; i++ )
  384.         {
  385.             ar >> nIndex >> nIndex2;    // index
  386.             ar >> m_aSlotItem[nIndex][nIndex2].m_dwShortcut >>  m_aSlotItem[nIndex][nIndex2].m_dwId >> m_aSlotItem[nIndex][nIndex2].m_dwType;
  387.             ar >> m_aSlotItem[nIndex][nIndex2].m_dwIndex >> m_aSlotItem[nIndex][nIndex2].m_dwUserId >> m_aSlotItem[nIndex][nIndex2].m_dwData;
  388.             if( m_aSlotItem[nIndex][nIndex2].m_dwShortcut == SHORTCUT_CHAT )
  389.                 ar.ReadString( m_aSlotItem[nIndex][nIndex2].m_szString, MAX_SHORTCUT_STRING );
  390. #ifdef __CLIENT
  391. #if __VER >= 8  // __JEFF_VER_8
  392.             else if( m_aSlotItem[nIndex][nIndex2].m_dwShortcut == SHORTCUT_ITEM )
  393.             {
  394.                 if( g_pPlayer )
  395.                 {
  396.                     CItemBase* pItemBase    = g_pPlayer->GetItemId( m_aSlotItem[nIndex][nIndex2].m_dwId );
  397.                     if( pItemBase && pItemBase->GetProp()->dwPackMax > 1 )  // º´ÇÕ °¡´ÉÇÑ ¾ÆÀÌÅÛÀ̸é?
  398.                         m_aSlotItem[nIndex][nIndex2].m_dwItemId = pItemBase->m_dwItemId;
  399.                 }
  400.             }
  401. #endif  // __JEFF_VER_8
  402. #endif  // __CLIENT
  403.             m_aSlotItem[nIndex][nIndex2].m_dwIndex = nIndex2;
  404.             SetTaskBarTexture( &m_aSlotItem[nIndex][nIndex2] );
  405.         }
  406.  
  407.         ar >> nCount;
  408.         for( int i = 0; i < nCount; i++ )
  409.         {
  410.             ar >> nIndex;
  411.             ar >> m_aSlotQueue[nIndex].m_dwShortcut >> m_aSlotQueue[nIndex].m_dwId >> m_aSlotQueue[nIndex].m_dwType;
  412.             ar >> m_aSlotQueue[nIndex].m_dwIndex >> m_aSlotQueue[nIndex].m_dwUserId >> m_aSlotQueue[nIndex].m_dwData;
  413.  
  414.             m_aSlotQueue[nIndex].m_dwIndex = nIndex;
  415.  
  416.             LPSKILL lpSkill = g_pPlayer->GetSkill( m_aSlotQueue[nIndex].m_dwType, m_aSlotQueue[nIndex].m_dwId );
  417.             //pWndButton->SetTexture( g_Neuz.m_pd3dDevice, MakePath( DIR_ICON, lpSkill->GetProp()->szIcon ) );
  418.             m_aSlotQueue[nIndex].m_pTexture = m_textureMng.AddTexture( g_Neuz.m_pd3dDevice, MakePath( DIR_ICON, lpSkill->GetProp()->szIcon/*pItemBase->GetProp()->szIcon*/), 0xffff00ff, FALSE );
  419.         }
  420.         ar >> m_nActionPoint;
  421.         m_nCurQueueNum = nCount;
  422.     }
  423. #ifdef __NEW_TASKBAR_V19
  424.     CWndTaskBar_HUD_SLIDE* pManageSlide;
  425.     pManageSlide = new CWndTaskBar_HUD_SLIDE;
  426.     for (int y = 0; y < 4; y++)
  427.     {
  428.         for (int i = 0; i < MAX_SLOT_ITEM; i++)
  429.         {
  430.             pManageSlide->m_pSlotItem[i] = &m_aSlotItem[4][i];
  431.     }
  432.     }
  433.     CWndTaskBar_HUD_SLIDE* pWndTaskBar_HUD_SLIDE = (CWndTaskBar_HUD_SLIDE*)GetWndBase(APP_NEWTASKBAR02);
  434.     if (pWndTaskBar_HUD_SLIDE)
  435.     {
  436.         if (!pWndTaskBar_HUD_SLIDE->IsOpenWnd())
  437.             pManageSlide->Initialize(&g_WndMng);
  438.     }
  439.     else
  440.     {
  441.         pManageSlide->Initialize(&g_WndMng);
  442.     }
  443.  
  444.     CWndNewSkillSlot* pManageskill;
  445.     pManageskill = new CWndNewSkillSlot;
  446.     for (int i = 0; i < MAX_SLOT_QUEUE; i++)
  447.     {
  448.         pManageskill->m_pSlotQueue[i] = &m_aSlotQueue[i];
  449.     }
  450.     CWndNewSkillSlot * pWndNewSkillSlot = (CWndNewSkillSlot*)GetWndBase(APP_SLOT);
  451.     if (pWndNewSkillSlot)
  452.     {
  453.         if (!pWndNewSkillSlot->IsOpenWnd())
  454.             pManageskill->Initialize(&g_WndMng);
  455.     }
  456.     else
  457.     {
  458.         pManageskill->Initialize(&g_WndMng);
  459.     }
  460.  
  461.     CWndTaskBar_HUD* pManage;
  462.     pManage = new CWndTaskBar_HUD;
  463.     //for( int y = 0; y < 4; y++ )
  464.     {
  465.     for (int i = 0; i < MAX_SLOT_ITEM; i++)
  466.         {
  467.         pManage->m_pSlotItem[i] = &m_aSlotItem[0][i];
  468.         }
  469.     }
  470.     CWndTaskBar_HUD * pWndTaskBar_HUD = (CWndTaskBar_HUD*)GetWndBase(APP_NEWTASKBAR);
  471.     if (pWndTaskBar_HUD)
  472.     {
  473.         if (!pWndTaskBar_HUD->IsOpenWnd())
  474.             pManage->Initialize(&g_WndMng);
  475.     }
  476.     else
  477.     {
  478.         pManage->Initialize(&g_WndMng);
  479.     }
  480.     pManage->Move(pManageskill->GetWndRect().left - 544, pManageskill->GetWndRect().bottom - 88);
  481. #endif // __NEW_TASKBAR_V19
  482. }
  483.  
  484. void CWndTaskBar::SetTaskBarTexture( LPSHORTCUT pShortcut )
  485. {
  486.     if( pShortcut->m_dwShortcut == SHORTCUT_APPLET )
  487.     {
  488.         AppletFunc* pAppletFunc = g_WndMng.GetAppletFunc( pShortcut->m_dwId );
  489.         if( pAppletFunc )
  490.         {
  491.             pShortcut->m_pTexture = m_textureMng.AddTexture( g_Neuz.m_pd3dDevice,  MakePath( DIR_ICON, pAppletFunc->m_pszIconName ), 0xffff00ff );
  492.         } else
  493.         {
  494.         }
  495.     }
  496.     else if( pShortcut->m_dwShortcut == SHORTCUT_ITEM )
  497.     {
  498.         CItemBase* pItemBase;
  499.         pItemBase   = g_pPlayer->GetItemId( pShortcut->m_dwId );
  500.         if( pItemBase )
  501.             pShortcut->m_pTexture   = pItemBase->GetTexture();
  502.     }
  503.     else if ( pShortcut->m_dwShortcut == SHORTCUT_SKILL)
  504.     {
  505.         if( pShortcut->m_dwType == 2 )
  506.         {
  507.             ItemProp* pProp =  prj.GetPartySkill( pShortcut->m_dwId );
  508.             pShortcut->m_pTexture = m_textureMng.AddTexture( g_Neuz.m_pd3dDevice, MakePath( DIR_ICON, pProp->szIcon/*pItemBase->GetProp()->szIcon*/), 0xffff00ff );
  509.         }
  510.         else
  511.         {  
  512.             LPSKILL lpSkill = g_pPlayer->GetSkill( pShortcut->m_dwType, pShortcut->m_dwId );
  513.             ItemProp* pSkillProp = prj.m_aPropSkill.GetAt( lpSkill->dwSkill );
  514.             if( pSkillProp )
  515.                 pShortcut->m_pTexture = m_textureMng.AddTexture( g_Neuz.m_pd3dDevice, MakePath( DIR_ICON, pSkillProp->szIcon ), 0xffff00ff );
  516.         }
  517.     }
  518. #if __VER >= 12 // __LORD
  519.     else if ( pShortcut->m_dwShortcut == SHORTCUT_LORDSKILL)
  520.     {
  521.         CCLord* pLord                                   = CCLord::Instance();
  522.         CLordSkillComponentExecutable* pComponent       = pLord->GetSkills()->GetSkill(pShortcut->m_dwId); 
  523.         if(pComponent) pShortcut->m_pTexture                            = pComponent->GetTexture();
  524.     }
  525. #endif
  526.     else if ( pShortcut->m_dwShortcut == SHORTCUT_MOTION )
  527.     {
  528.         MotionProp* pMotionProp = prj.GetMotionProp( pShortcut->m_dwId );
  529.         if(pMotionProp)         //061206 ma 8Â÷¿¡ µé¾î°¥ ¸ð¼Ç°ü¸®¸¦ À§ÇØ ¹öÀü Ãß°¡  propMotion.txt
  530.         {
  531.             pMotionProp->pTexture = m_textureMng.AddTexture( g_Neuz.m_pd3dDevice, MakePath( DIR_ICON, pMotionProp->szIconName ), 0xffff00ff );
  532.             pShortcut->m_pTexture = pMotionProp->pTexture;
  533.         }
  534.     }
  535.     else if( pShortcut->m_dwShortcut == SHORTCUT_CHAT )
  536.     {
  537.         pShortcut->m_pTexture   = m_textureMng.AddTexture( g_Neuz.m_pd3dDevice, MakePath( DIR_ICON, "icon_MacroChat.dds" ), 0xffff00ff );
  538.     }
  539.     else if( pShortcut->m_dwShortcut == SHORTCUT_EMOTICON )
  540.     {
  541.         if( pShortcut->m_dwId >= 0 && pShortcut->m_dwId < MAX_EMOTICON_NUM  )
  542.         {
  543.             TCHAR buffer[MAX_SHORTCUT_STRING] = { 0 };
  544.             _tcscat( buffer, "/" );
  545.             _tcscat( buffer, g_DialogMsg.m_EmiticonCmd[pShortcut->m_dwId].m_szCommand );
  546.             _tcscpy( pShortcut->m_szString, buffer );
  547.             pShortcut->m_pTexture = g_DialogMsg.m_texEmoticonUser.GetAt(pShortcut->m_dwId);
  548.         }
  549.     }
  550.     else if( pShortcut->m_dwShortcut == SHORTCUT_SKILLFUN )
  551.     {
  552.         pShortcut->m_pTexture   = m_pTexture;
  553.     }
  554. }
  555.  
  556. /*
  557. * ¾×¼Ç Æ÷ÀÎÆ®
  558. . ¾×¼Ç Æ÷ÀÎÆ® º¯¼ö CWndTaskBar::m_nActionPoint
  559. . ½ºÅ³¹Ù¿¡ ¹ÝÅõ¸í »ç°¢Çü ±×¸®±â
  560. . ¾×¼ÇÆ÷ÀÎÆ® ½Ã¸®¾ó¶óÀÌÁî
  561. . ÆÐÅÏ°ø°ÝÀÇ 2¹ø° °ø°ÝÀ» »ç¿ë½Ã¿¡´Â ¾×¼ÇÆ÷ÀÎÆ® Áõ°¡ 1Á¡¾¿ - 100ÀÌ ÇÑ°è
  562. . ¾×¼Ç Æ÷ÀÎÆ®¿¡ µû¸¥ ½¦ÀÌµå ±×¸®±â - ´©ÀûÆ÷ÀÎÆ®¿¡µû¶ó ´Ù¸£´Ù.
  563. . ½ºÅ³»ç¿ë½Ã ´Ü°èº°·Î ¾×¼ÇÆ÷ÀÎÆ® ¼Ò¸ð·® ´Ù¸£°Ô.
  564.  
  565. */
  566.  
  567. CWndTaskBar::CWndTaskBar()
  568. {
  569.     m_nCurQueue = -1;
  570.     m_nCurQueueNum = 0;
  571.     m_nPosition = TASKBAR_BOTTOM;
  572.     memset( m_aSlotApplet, 0, sizeof( m_aSlotApplet ) );
  573.     memset( m_aSlotItem  , 0, sizeof( m_aSlotItem ) );
  574.     memset( m_aSlotQueue , 0, sizeof( m_aSlotQueue ) );
  575.     memset( &m_aSlotSkill, 0, sizeof( m_aSlotSkill ) );
  576.  
  577.     m_pWndQuickList = NULL;
  578.     m_pSelectShortcut = NULL;
  579.     m_bStartTimeBar = FALSE;
  580.     m_nSkillBar = 0;
  581.     m_nUsedSkillQueue = 0;
  582.     m_nExecute = 0;
  583.     m_nSlotIndex = 0;
  584.     m_paSlotItem = m_aSlotItem[ m_nSlotIndex ];
  585.     m_nActionPoint = 0;
  586.     m_dwHighAlpha = 0;
  587. }
  588.  
  589. CWndTaskBar::~CWndTaskBar()
  590. {
  591.     /*
  592.     for( int i = 0; i < m_awndShortCut.GetSize(); i++ )
  593.     {
  594.         CWndButton* pButton = (CWndButton*)m_awndShortCut.GetAt( i );
  595.         SAFE_DELETE( pButton );
  596.     }
  597.     */
  598. }
  599.  
  600. void CWndTaskBar::InitTaskBar()
  601. {
  602.     m_nCurQueue = -1;
  603.     m_nCurQueueNum = 0;
  604.     //m_nPosition = TASKBAR_RIGHT;//LEFT;//TASKBAR_TOP;
  605.     m_nPosition = TASKBAR_BOTTOM;//LEFT;//TASKBAR_TOP;
  606.     memset( m_aSlotApplet, 0, sizeof( m_aSlotApplet ) );
  607.     memset( m_aSlotItem  , 0, sizeof( m_aSlotItem ) );
  608.     memset( m_aSlotQueue , 0, sizeof( m_aSlotQueue ) );
  609.    
  610.     m_pWndQuickList = NULL;
  611.     m_pSelectShortcut = NULL;
  612.     m_bStartTimeBar = FALSE;
  613.     m_nSkillBar = 0;
  614.     m_nUsedSkillQueue = 0;
  615.     m_nExecute = 0;
  616.     m_nSlotIndex = 0;
  617.     m_paSlotItem = m_aSlotItem[ m_nSlotIndex ];
  618.     m_nActionPoint = 0;
  619.     m_dwHighAlpha = 0;
  620.     //m_nMaxSlotApplet = 5;
  621. }
  622.  
  623. void CWndTaskBar::PutTooTip( LPSHORTCUT pShortcut, CPoint point, CRect* pRect )
  624. {
  625.     ClientToScreen( &point );
  626.     ClientToScreen( pRect );
  627.     if( pShortcut->m_dwShortcut == SHORTCUT_APPLET )
  628.     {
  629.         AppletFunc* pAppletFunc = g_WndMng.GetAppletFunc( pShortcut->m_dwId );
  630.         if( pAppletFunc )
  631.         {
  632.             //do
  633.         //  {
  634.            
  635.             //CString string;
  636.             CEditString strEdit;
  637.             if( pAppletFunc->m_cHotkey == 0 )
  638.                 strEdit.AddString( pAppletFunc->m_pAppletDesc );
  639.             else
  640.             {
  641.                 strEdit.AddString( pAppletFunc->m_pAppletDesc );
  642.                 strEdit.AddString( "\n" );
  643.                 CString string;
  644.                 string.Format( "[%s %c]", prj.GetText( TID_GAME_TOOLTIP_HOTKEY ), pAppletFunc->m_cHotkey );
  645.                 strEdit.AddString( string, 0xff0000ff );
  646.             }
  647.             //CEditString strEdit;
  648.             //strEdit.SetParsingString( string );
  649.             //strEdit.SetAt( 0, (CHAR)(aaa >> 8) );
  650.             //strEdit.SetAt( 1, (CHAR)(aaa & 0xff00) );
  651.             //aaa++;
  652.             //TRACE( "aaa %x\n", aaa );
  653.             g_toolTip.PutToolTip( pShortcut->m_dwId, strEdit, *pRect, point, 0 );
  654.             //} while( aaa < 0xffff );
  655.         }
  656.     }
  657.     else   
  658.     if( pShortcut->m_dwShortcut == SHORTCUT_CHAT )
  659.     {
  660.         g_toolTip.PutToolTip( 10000, pShortcut->m_szString, *pRect, point, 0 );
  661.     }
  662.     else
  663.     if( pShortcut->m_dwShortcut == SHORTCUT_EMOTICON )
  664.     {
  665.         g_toolTip.PutToolTip( 10000, pShortcut->m_szString, *pRect, point, 0 );
  666.     }
  667.     else   
  668.     if( pShortcut->m_dwShortcut == SHORTCUT_ITEM  )
  669.     {
  670.         if( pShortcut->m_dwId != 0 )
  671.         g_WndMng.PutToolTip_Item( pShortcut->m_dwType, pShortcut->m_dwId, point, pRect );
  672.     }
  673.     else   
  674.     if( pShortcut->m_dwShortcut == SHORTCUT_SKILL )
  675.     {
  676.         if( pShortcut->m_dwType == 2 )
  677.         {
  678.             g_WndMng.PutToolTip_Troupe( pShortcut->m_dwId, point, pRect );
  679.         }
  680.         else
  681. //      if( pShortcut->m_dwType == 0 || pShortcut->m_dwType == 1 || pShortcut->m_dwType == 3 )
  682.         {
  683.             LPSKILL lpSkill = g_pPlayer->GetSkill( 0, pShortcut->m_dwId );
  684.             g_WndMng.PutToolTip_Skill( lpSkill->dwSkill, lpSkill->dwLevel, point, pRect );
  685.         }
  686.     }
  687. #if __VER >= 12 // __LORD
  688.     else   
  689.     if( pShortcut->m_dwShortcut == SHORTCUT_LORDSKILL )
  690.     {
  691.         CCLord*                         pLord       = CCLord::Instance();
  692.         CLordSkillComponentExecutable*  pComponent  = pLord->GetSkills()->GetSkill(pShortcut->m_dwId);
  693.         CString                         string, str;
  694.         CEditString                     strEdit;
  695.  
  696.         if(!pComponent) return;
  697.  
  698.         string.Format( "#b#cff2fbe6d%s#nb#nc\n%s", pComponent->GetName(), pComponent->GetDesc());
  699.         if(pComponent->GetTick() != 0)
  700.         {
  701.             str.Format( prj.GetText(TID_TOOLTIP_COOLTIME), pComponent->GetTick(), 0);
  702.             string += "\n";
  703.             string += str;
  704.         }
  705.    
  706.         strEdit.SetParsingString( string );
  707.         g_toolTip.PutToolTip(10000, strEdit, *pRect, point, 0);
  708.     }
  709. #endif
  710.     /* FIX YOURSELF
  711.     else   
  712.     if( pShortcut->m_dwShortcut == SHORTCUT_MOTION )
  713.     {
  714.         MotionProp* pMotionProp = prj.GetMotionProp( pShortcut->m_dwId );
  715.         if(!pMotionProp)        //061206 ma 8Â÷¿¡ µé¾î°¥ ¸ð¼Ç°ü¸®¸¦ À§ÇØ ¹öÀü Ãß°¡  propMotion.txt
  716.             return;
  717.  
  718.         CString string;
  719.  
  720.         string.Format( "%s", pMotionProp->szDesc );
  721.        
  722.         if( pMotionProp->dwID == MOT_BASE_CHEER )
  723.         {
  724.             if( g_pPlayer )
  725.             {
  726.                 CString str;
  727.                 str.Format( prj.GetText(TID_CHEER_MESSAGE1), g_pPlayer->m_nCheerPoint );
  728.  
  729.                 string += "\n\n";
  730.                 string += str;
  731.  
  732.                 if( g_pPlayer->m_nCheerPoint < MAX_CHEERPOINT )
  733.                 {
  734.                     CTimeSpan ct( ((g_pPlayer->m_dwTickCheer - GetTickCount()) / 1000) );       // ³²Àº½Ã°£À» ÃÊ´ÜÀ§·Î º¯È¯Çؼ­ ³Ñ°ÜÁÜ
  735.  
  736.                     if( ct.GetMinutes() <= 0 )
  737.                     {
  738.                         str.Format( prj.GetText(TID_PK_LIMIT_SECOND), ct.GetSeconds() );
  739.                     }
  740.                     else
  741.                     {
  742.                         str.Format( prj.GetText(TID_PK_LIMIT_MINUTE), ct.GetMinutes() );
  743.                     }
  744.                    
  745.                     string += "\n";
  746.                     string += (prj.GetText(TID_CHEER_MESSAGE2)+str);
  747.                 }
  748.             }
  749.         }
  750.  
  751.         CEditString strEdit;
  752.         strEdit.SetParsingString( string );
  753.         g_toolTip.PutToolTip( pShortcut->m_dwId , strEdit, *pRect, point, 0 );
  754.     }
  755.     */
  756.     else
  757.     if( pShortcut->m_dwShortcut == SHORTCUT_SKILLFUN )
  758.     {
  759.         strcpy( pShortcut->m_szString, prj.GetText(TID_GAME_SKILLSHORTCUT) );
  760.         g_toolTip.PutToolTip( 10000, pShortcut->m_szString, *pRect, point, 0 );
  761.     }
  762.        
  763. }
  764.  
  765. void CWndTaskBar::OnMouseWndSurface( CPoint point )
  766. {
  767. #ifndef __NEW_TASKBAR_V19
  768.     CRect rect = CRect(POINT_APPLET_X, POINT_APPLET_Y, POINT_APPLET_X + ICON_SIZE, POINT_APPLET_Y + ICON_SIZE);
  769.     for (int i = 0; i < m_nMaxSlotApplet; i++)
  770.     {
  771.         LPSHORTCUT lpShortcut = &m_aSlotApplet[i];
  772.         if (!lpShortcut->IsEmpty() && rect.PtInRect(point))
  773.         {
  774.             MotionProp* pMotionProp = prj.GetMotionProp(lpShortcut->m_dwId);
  775.  
  776.             if (!IsShortcut(lpShortcut, SHORTCUT_MOTION, MOT_BASE_CHEER))
  777.                 PutTooTip(lpShortcut, point, &rect);
  778.         }
  779.         rect += CPoint(ICON_SIZE, 0);
  780.     }
  781.  
  782.     rect = CRect(POINT_ITEM_X, POINT_ITEM_Y, POINT_ITEM_X + ICON_SIZE, POINT_ITEM_Y + ICON_SIZE);
  783.     for (int i = 0; i < MAX_SLOT_ITEM; i++)
  784.     {
  785.         LPSHORTCUT lpShortcut = &m_paSlotItem[i];
  786.         if (!lpShortcut->IsEmpty() && rect.PtInRect(point))
  787.         {
  788.             if (!IsShortcut(lpShortcut, SHORTCUT_MOTION, MOT_BASE_CHEER))
  789.                 PutTooTip(lpShortcut, point, &rect);
  790.         }
  791.         rect += CPoint(ICON_SIZE, 0);
  792.     }
  793.     rect = CRect(POINT_QUEUE_X, POINT_QUEUE_Y, POINT_QUEUE_X + SKILL_SIZE, POINT_QUEUE_Y + SKILL_SIZE);
  794.     for (int i = 0; i < MAX_SLOT_QUEUE; i++)
  795.     {
  796.         LPSHORTCUT lpShortcut = &m_aSlotQueue[i];
  797.         if (!lpShortcut->IsEmpty() && rect.PtInRect(point))
  798.         {
  799.             if (!IsShortcut(lpShortcut, SHORTCUT_MOTION, MOT_BASE_CHEER))
  800.                 PutTooTip(lpShortcut, point, &rect);
  801.         }
  802.         rect += CPoint(SKILL_SIZE, 0);
  803.     }
  804.  
  805.     rect = CRect(POINT_QUEUE_X - ICON_SIZE - 5, POINT_QUEUE_Y, (POINT_QUEUE_X - ICON_SIZE - 5) + 32, POINT_QUEUE_Y + 32);
  806.  
  807.     if (rect.PtInRect(point))
  808.     {
  809.         SHORTCUT Shortcut;
  810.         Shortcut.m_dwShortcut = SHORTCUT_SKILLFUN;
  811.         PutTooTip(&Shortcut, point, &rect);
  812.     }
  813. #endif // __NEW_TASKBAR_V19
  814. }
  815.  
  816. #define DRAW_HOTKEY( p2DRender, point, cHotkey ) { CString string; string.Format( "%c", cHotkey ); \
  817.                     p2DRender->TextOut( point.x - 0 + 2, point.y - 0 - 4, string, 0xffffffff ); }
  818.                    
  819.                    
  820. /*
  821. #define DRAW_HOTKEY( p2DRender, point, cHotkey ) {  \
  822.     if( cHotkey >= 'A' && cHotkey <= 'Z' ) m_texPack.GetAt( cHotkey - 'A' )->Render( p2DRender, point, m_nAlphaCount );  \
  823.     if( cHotkey >= '0' && cHotkey <= '9' ) m_texPack.GetAt( cHotkey - '0' + 26 )->Render( p2DRender, point, m_nAlphaCount ); }
  824. */
  825.  
  826.  
  827. void CWndTaskBar::OnDraw( C2DRender* p2DRender )
  828. {
  829.     if( NULL == g_pPlayer )
  830.         return;
  831.  
  832.     DWORD dwCur = g_tmCurrent;
  833.     CRect rect = GetWindowRect();
  834.     CRect rectSkillQueue;
  835.  
  836.     CD3DFont* pOldFont = p2DRender->GetFont();
  837.     p2DRender->SetFont( CWndBase::m_Theme.m_pFontWndTitle );
  838.        
  839.     if( m_nPosition == TASKBAR_TOP || m_nPosition == TASKBAR_BOTTOM )
  840.     {
  841.          rectSkillQueue.SetRect( rect.Width() - 32 * 4 - 6, 0, rect.Width(), rect.Height() );
  842.     }
  843.     else
  844.     if( m_nPosition == TASKBAR_LEFT || m_nPosition == TASKBAR_RIGHT )
  845.     {
  846.         rectSkillQueue.SetRect( 0, rect.Height() - 32 * 4 - 6, rect.Width(), rect.Height() );
  847.     }
  848.  
  849.     // µå·¡±× ÇÏÀ̶óÀÌÆ® ½½·Ô Ç¥½Ã
  850.     if( m_GlobalShortcut.IsEmpty() == FALSE )
  851.     {
  852.         DWORD dwColor;
  853.         if( m_dwHighAlpha < 128 )
  854.             dwColor = D3DCOLOR_ARGB( m_dwHighAlpha, 0, 0, 255 );
  855.         else
  856.             dwColor = D3DCOLOR_ARGB( 128 - ( m_dwHighAlpha - 128 ), 0, 0, 255 );
  857.  
  858.         LPWNDCTRL pApplet = GetWndCtrl( WIDC_CUSTOM1 );
  859.         LPWNDCTRL pItem   = GetWndCtrl( WIDC_CUSTOM2 );
  860.         LPWNDCTRL pSkill  = GetWndCtrl( WIDC_CUSTOM3 );
  861.  
  862.         CRect rectApplet = pApplet->rect;
  863.         CRect rectItem = pItem->rect;
  864.         CRect rectSkill = pSkill->rect;
  865.  
  866.         rectApplet.top = 42;
  867.         rectApplet.bottom = 47;
  868.         rectApplet.left -= 6;
  869.         rectApplet.right += 6;
  870.         rectItem.top = 42;
  871.         rectItem.bottom = 47;
  872.         rectItem.left -= 6;
  873.         rectItem.right += 6;
  874.         rectSkill.top = 42;
  875.         rectSkill.bottom = 47;
  876.         rectSkill.left -= 3;
  877.         rectSkill.right += 4;
  878.        
  879.         switch( m_GlobalShortcut.m_dwShortcut )
  880.         {
  881.             case SHORTCUT_APPLET:
  882.             case SHORTCUT_ITEM:
  883.             case SHORTCUT_MOTION:
  884.                 p2DRender->RenderFillRect( rectApplet, dwColor );
  885.                 p2DRender->RenderFillRect( rectItem, dwColor );
  886.                 break;
  887.             case SHORTCUT_SKILL:
  888.                 if( m_GlobalShortcut.m_dwType == 0 )
  889.                 {
  890.                     DWORD dwSkill = g_pPlayer->GetSkill( 0, m_GlobalShortcut.m_dwId )->dwSkill;
  891.                     DWORD dwComboStyleSrc = prj.GetSkillProp( dwSkill )->dwComboStyle;
  892.                     if( dwComboStyleSrc == CT_STEP  || dwComboStyleSrc == CT_GENERAL  )     // ½ºÅÜÀ̳ª Á¦³×·²À̸é ÇÕ°Ý
  893.                         p2DRender->RenderFillRect( rectItem, dwColor );    
  894.                     p2DRender->RenderFillRect( rectSkill, dwColor );
  895.                 }
  896.                 else
  897.                     p2DRender->RenderFillRect( rectItem, dwColor );
  898.                 break;
  899.         }      
  900.     }
  901.  
  902.     // ¾ÖÇ÷¿ ¾ÆÀÌÄÜ Ãâ·Â
  903.     CPoint point = POINT_APPLET;
  904.     for( int i = 0; i < m_nMaxSlotApplet; i++ )
  905.     {
  906.         LPSHORTCUT lpShortcut = &m_aSlotApplet[ i ] ;
  907.         if( !lpShortcut->IsEmpty() )
  908.         {
  909.             if( lpShortcut->m_pTexture )
  910.                 p2DRender->RenderTexture( point, lpShortcut->m_pTexture );
  911.             if( lpShortcut->m_dwShortcut == SHORTCUT_ITEM )
  912.             {
  913.                 CItemBase* pItemBase = g_pPlayer->GetItemId( lpShortcut->m_dwId );
  914.                 CItemElem* pItemElem = (CItemElem*)pItemBase;
  915.                 if( pItemElem )
  916.                 {
  917.                     if( pItemElem->GetProp()->dwPackMax > 1 )
  918.                     {
  919.                         TCHAR szTemp[ 32 ];
  920. #if __VER >= 8  // __JEFF_VER_8
  921.                         _stprintf( szTemp, "%d", g_pPlayer?g_pPlayer->m_Inventory.GetItemCount( pItemElem->m_dwItemId ): 0 );
  922. #else   // __JEFF_VER_8
  923.                         _stprintf( szTemp, "%d", pItemElem->m_nItemNum );
  924. #endif  // __JEFF_VER_8
  925.                         CSize size = m_p2DRender->m_pFont->GetTextExtent( szTemp );
  926. #if __VER >= 19
  927.                         CD3DFont* pOldFont = p2DRender->GetFont();
  928.                         p2DRender->SetFont( CWndBase::m_Theme.m_pFontWndNewTitle2 );
  929.  
  930.                         p2DRender->TextOut( point.x + 35 - size.cx, point.y + 35 - size.cy, szTemp, 0xFF000000 );
  931.                         p2DRender->TextOut( point.x + 34 - size.cx, point.y + 34 - size.cy, szTemp, 0xFF85FF8A );
  932.                        
  933.                         p2DRender->SetFont( pOldFont );
  934. #else // __VER >= 19
  935.                         p2DRender->TextOut( point.x + 32 - size.cx, point.y + 32 - size.cy, szTemp, 0xff0000ff );
  936.                         p2DRender->TextOut( point.x + 31 - size.cx, point.y + 31 - size.cy, szTemp, 0xffb0b0f0 );
  937. #endif // __VER >= 19
  938.                     }
  939.                     DWORD dwGroup = g_pPlayer->m_cooltimeMgr.GetGroup( pItemElem->GetProp() );
  940.                     if( dwGroup )
  941.                     {
  942.                         DWORD dwEnd = g_pPlayer->m_cooltimeMgr.GetTime( dwGroup );      // À̺¥Æ® Á¾·á ½Ã°¢
  943.                         if( dwEnd != 0 && dwEnd > dwCur )  
  944.                         {
  945.                             DWORD dwBase = g_pPlayer->m_cooltimeMgr.GetBase( dwGroup ); // À̺¥Æ® ½ÃÀÛ ½Ã°¢
  946.                             RenderRadar( p2DRender, point, dwCur - dwBase, dwEnd - dwBase );
  947.                         }
  948.                     }
  949.                 }
  950.                 else
  951.                 {
  952. #if __VER >= 8  // __JEFF_VER_8
  953.                     ItemProp* pItemProp = prj.GetItemProp( lpShortcut->m_dwItemId );
  954.                     if( pItemProp && pItemProp->dwPackMax > 1 ) // º´ÇÕ °¡´ÉÇÑ ¾ÆÀÌÅÛÀ̸é?
  955.                     {
  956.                         DWORD dwId  = g_pPlayer->m_Inventory.Find( lpShortcut->m_dwItemId );
  957.                         if( dwId != NULL_ID )   // °°Àº Á¾·ùÀÇ ¾ÆÀÌÅÛÀÌ ÀÖ´Ù¸é?
  958.                         {
  959.                             lpShortcut->m_dwId  = dwId;
  960.                             g_DPlay.SendAddAppletTaskBar( i, lpShortcut );
  961.                         }
  962.                         else
  963.                         {
  964.                             lpShortcut->Empty();
  965.                             g_DPlay.SendRemoveAppletTaskBar( i );
  966.                         }
  967.                     }
  968.                     else
  969.                     {
  970.                         lpShortcut->Empty();
  971.                         g_DPlay.SendRemoveAppletTaskBar( i );
  972.                     }
  973. #else   // __JEFF_VER_8
  974.                     lpShortcut->Empty();
  975.                     g_DPlay.SendRemoveAppletTaskBar( i );
  976. #endif  // __JEFF_VER_8
  977.                 }
  978.             }
  979.             else
  980.             if( lpShortcut->m_dwShortcut == SHORTCUT_APPLET )
  981.             {
  982.                 AppletFunc* pAppletFunc = g_WndMng.GetAppletFunc( lpShortcut->m_dwId );
  983.                 if( pAppletFunc && pAppletFunc->m_cHotkey )
  984.                 {
  985.                     CPoint ptHotkey( point.x + 8, point.y - 9 );
  986.                     DRAW_HOTKEY( p2DRender, ptHotkey, pAppletFunc->m_cHotkey );
  987.                 }
  988.             }
  989.             else if( lpShortcut->m_dwShortcut == SHORTCUT_SKILL && lpShortcut->m_dwType != 2 ) //±Ø´Ü½ºÅ³Àº ÄðŸÀÓ °ü·Ã Render¸¦ ÇÏÁö ¾Ê´Â´Ù.
  990.             {
  991.                 RenderCollTime( point, lpShortcut->m_dwId, p2DRender );
  992.             }
  993.         #if __VER >= 12 // __LORD
  994.             else if( lpShortcut->m_dwShortcut == SHORTCUT_LORDSKILL)
  995.             {
  996.                     RenderLordCollTime( point, lpShortcut->m_dwId, p2DRender );
  997.             }
  998.         #endif
  999.             else
  1000.             if( lpShortcut->m_dwShortcut == SHORTCUT_MOTION )
  1001.             {
  1002.                 if( lpShortcut->m_dwId == MOT_BASE_ESCAPE )
  1003.                 {
  1004.                     ItemProp* pItem = prj.GetItemProp( g_AddSMMode.dwSMItemID[SM_ESCAPE] );
  1005.                    
  1006.                     if( pItem && g_pPlayer )
  1007.                     {
  1008.                         CTimeSpan ct( g_pPlayer->m_dwSMTime[SM_ESCAPE] );
  1009.                        
  1010.                         if( ct.GetTotalSeconds() )
  1011.                         {
  1012.                             point.y -= 1;
  1013.                             point.x += 1;
  1014.                             RenderRadar( m_p2DRender, point, (DWORD)( pItem->dwCircleTime - ct.GetTotalSeconds() ), pItem->dwCircleTime );
  1015.                         }
  1016.                     }
  1017.                 }
  1018.             }  
  1019.         }
  1020.         point += CPoint( ICON_SIZE, 0 );
  1021.     }
  1022.     // ¾ÆÀÌÅÛ ¾ÆÀÌÄÜ Ãâ·Â
  1023.     point = POINT_ITEM;
  1024.     for( int i = 0; i < MAX_SLOT_ITEM; i++ )
  1025.     {
  1026.         LPSHORTCUT lpShortcut = &m_paSlotItem[ i ] ;
  1027.         if( !lpShortcut->IsEmpty() )
  1028.         {
  1029.             if( lpShortcut->m_pTexture )
  1030.                 p2DRender->RenderTexture( point, lpShortcut->m_pTexture );
  1031.             if( lpShortcut->m_dwShortcut == SHORTCUT_ITEM )
  1032.             {
  1033.                 CItemBase* pItemBase = g_pPlayer->GetItemId( lpShortcut->m_dwId );
  1034.                 CItemElem* pItemElem = (CItemElem*)pItemBase;
  1035.                 if( pItemElem  )
  1036.                 {
  1037.                     if( pItemElem->GetProp()->dwPackMax > 1 )
  1038.                     {
  1039.                         TCHAR szTemp[ 32 ];
  1040. #if __VER >= 8  // __JEFF_VER_8
  1041.                         _stprintf( szTemp, "%d", g_pPlayer?g_pPlayer->m_Inventory.GetItemCount( pItemElem->m_dwItemId ): 0 );
  1042. #else   // __JEFF_VER_8
  1043.                         _stprintf( szTemp, "%d", pItemElem->m_nItemNum );
  1044. #endif  // __JEFF_VER_8
  1045.                         CSize size = m_p2DRender->m_pFont->GetTextExtent( szTemp );
  1046. #if __VER >= 19
  1047.                         CD3DFont* pOldFont = p2DRender->GetFont();
  1048.                         p2DRender->SetFont( CWndBase::m_Theme.m_pFontWndNewTitle2 );
  1049.  
  1050.                         p2DRender->TextOut( point.x + 35 - size.cx, point.y + 35 - size.cy, szTemp, 0xFF000000 );
  1051.                         p2DRender->TextOut( point.x + 34 - size.cx, point.y + 34 - size.cy, szTemp, 0xFF85FF8A );
  1052.                        
  1053.                         p2DRender->SetFont( pOldFont );
  1054. #else // __VER >= 19
  1055.                         p2DRender->TextOut( point.x + 32 - size.cx, point.y + 32 - size.cy, szTemp, 0xff0000ff );
  1056.                         p2DRender->TextOut( point.x + 31 - size.cx, point.y + 31 - size.cy, szTemp, 0xffb0b0f0 );
  1057. #endif // __VER >= 19
  1058.                     }
  1059.                 }
  1060.  
  1061.                 DWORD dwGroup = g_pPlayer->m_cooltimeMgr.GetGroup( pItemElem->GetProp() );
  1062.                 if( dwGroup )
  1063.                 {
  1064.                     DWORD dwEnd = g_pPlayer->m_cooltimeMgr.GetTime( dwGroup );      // À̺¥Æ® Á¾·á ½Ã°¢
  1065.                     if( dwEnd != 0 && dwEnd > dwCur )
  1066.                     {
  1067.                         DWORD dwBase = g_pPlayer->m_cooltimeMgr.GetBase( dwGroup ); // À̺¥Æ® ½ÃÀÛ ½Ã°¢
  1068.                         RenderRadar( p2DRender, point, dwCur - dwBase, dwEnd - dwBase );
  1069.                     }
  1070.                 }
  1071.             }
  1072.             else if( lpShortcut->m_dwShortcut == SHORTCUT_SKILL && lpShortcut->m_dwType != 2 ) //±Ø´Ü½ºÅ³Àº ÄðŸÀÓ °ü·Ã Render¸¦ ÇÏÁö ¾Ê´Â´Ù.
  1073.             {
  1074.                 RenderCollTime( point, lpShortcut->m_dwId, p2DRender );
  1075.             }
  1076.         #if __VER >= 12 // __LORD
  1077.             else if( lpShortcut->m_dwShortcut == SHORTCUT_LORDSKILL)
  1078.             {
  1079.                     RenderLordCollTime( point, lpShortcut->m_dwId, p2DRender );
  1080.             }
  1081.         #endif
  1082.             else
  1083.             if( lpShortcut->m_dwShortcut == SHORTCUT_MOTION )
  1084.             {
  1085.                 if( lpShortcut->m_dwId == MOT_BASE_ESCAPE )
  1086.                 {
  1087.                     ItemProp* pItem = prj.GetItemProp( g_AddSMMode.dwSMItemID[SM_ESCAPE] );
  1088.  
  1089.                     if( pItem && g_pPlayer )
  1090.                     {
  1091.                         CTimeSpan ct( g_pPlayer->m_dwSMTime[SM_ESCAPE] );
  1092.                        
  1093.                         if( ct.GetTotalSeconds() )
  1094.                         {
  1095.                             point.y -= 1;
  1096.                             point.x += 1;
  1097.                             RenderRadar( m_p2DRender, point, (DWORD)( pItem->dwCircleTime - ct.GetTotalSeconds() ), pItem->dwCircleTime );
  1098.                         }
  1099.                     }
  1100.                 }
  1101.             }      
  1102.  
  1103.                
  1104.         }
  1105.         // hotkey Ãâ·Â
  1106.         CHAR cHotkey = ( i == 9 ) ? '0' : '1' + i;
  1107.         CPoint ptHotkey( point.x + 8, point.y - 9 );
  1108.         //DRAW_HOTKEY( p2DRender, ptHotkey, cHotkey );
  1109.         point += CPoint( ICON_SIZE, 0 );
  1110.     }
  1111.    
  1112.     point = CPoint( POINT_QUEUE_X - ICON_SIZE - 5, POINT_QUEUE_Y );
  1113.     p2DRender->RenderTexture( point, m_pTexture );
  1114.  
  1115.     // ½ºÅ³ Å¥
  1116.     point = POINT_QUEUE;
  1117.     //p2DRender->TextOut( point.x - 5, point.y - 16, "ACTION SLOT" );
  1118.     for( int i = 0; i < m_nCurQueueNum; i++ )
  1119.     {
  1120.         LPSHORTCUT lpShortcut = &m_aSlotQueue[ i ] ;
  1121.         if( !lpShortcut->IsEmpty() )
  1122.         {
  1123.             if( lpShortcut->m_pTexture )
  1124.             {
  1125.                 p2DRender->RenderTexture( point, lpShortcut->m_pTexture );
  1126. //              LPSKILL pSkill = g_pPlayer->GetSkill( lpShortcut->m_dwType, lpShortcut->m_dwId );
  1127. //              if( g_pPlayer->m_nReUseDelay[ lpShortcut->m_dwId ] > 0 )
  1128. //                  p2DRender->TextOut( point.x, point.y, g_pPlayer->m_nReUseDelay[ lpShortcut->m_dwId ] );
  1129.  
  1130.             }
  1131.         }
  1132.         point += CPoint( SKILL_SIZE, 0 );
  1133.     }
  1134.  
  1135. #ifndef __NEW_TASKBAR_V19
  1136.     if (!(g_pPlayer->IsSMMode(SM_ACTPOINT)))
  1137.     {
  1138. #define LV2MAXAP    10      // 2´Ü°è ½ºÅ³ÀÌ ´ÙÂ÷´Âµ¥ ÇÊ¿äÇÑ action point
  1139. #define LV3MAXAP    25     
  1140. #define LV4MAXAP    50
  1141. #define LV5MAXAP    100
  1142.  
  1143.         point = POINT_QUEUE;
  1144.         point.x += SKILL_SIZE;  // ½ºÅ³ 2¹ø°ĭºÎÅÍ ½¦À̵åµÈ´Ù.
  1145.         {
  1146.             int nAP2Size;   // ¾×¼ÇÆ÷ÀÎÆ®¸¦ ÇÏÀ̶óÀÌÆ®¾çÀ¸·Î º¯È¯ÇÑ°ª.
  1147.             if (m_nActionPoint >= LV4MAXAP) // LV4MAXAP¸¦ ³Ñ¾î¼­¸é 5´Ü°è ½ÃÀÛ.
  1148.                 nAP2Size = (SKILL_SIZE * 3) + (((m_nActionPoint - LV4MAXAP) * SKILL_SIZE) / (LV5MAXAP - LV4MAXAP));
  1149.             else if (m_nActionPoint >= LV3MAXAP)
  1150.                 nAP2Size = (SKILL_SIZE * 2) + (((m_nActionPoint - LV3MAXAP) * SKILL_SIZE) / (LV4MAXAP - LV3MAXAP));
  1151.             else if (m_nActionPoint >= LV2MAXAP)
  1152.                 nAP2Size = (SKILL_SIZE * 1) + (((m_nActionPoint - LV2MAXAP) * SKILL_SIZE) / (LV3MAXAP - LV2MAXAP));
  1153.             else
  1154.                 nAP2Size = (m_nActionPoint * SKILL_SIZE) / LV2MAXAP;
  1155.  
  1156.             p2DRender->m_pd3dDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, TRUE);
  1157.             p2DRender->m_pd3dDevice->SetRenderState(D3DRS_ALPHATESTENABLE, FALSE);
  1158.             point.x += nAP2Size;
  1159.             nAP2Size = (SKILL_SIZE * 4) - nAP2Size;
  1160.             p2DRender->RenderFillRect(CRect(point.x, point.y, point.x + nAP2Size, point.y + SKILL_SIZE + 2),
  1161.                 D3DCOLOR_ARGB(0x7f, 0, 0, 0));
  1162.  
  1163.             if (m_nCurQueueNum > 0)
  1164.             {
  1165.                 int show = 1;
  1166.  
  1167.                 if (m_nActionPoint >= LV2MAXAP)
  1168.                     show = 2;
  1169.                 if (m_nActionPoint >= LV3MAXAP)
  1170.                     show = 3;
  1171.                 if (m_nActionPoint >= LV4MAXAP)
  1172.                     show = 4;
  1173.                 if (m_nActionPoint >= LV5MAXAP)
  1174.                     show = 5;
  1175.  
  1176.                 if (m_nCurQueueNum <= show)
  1177.                     show = m_nCurQueueNum;
  1178.  
  1179.                 CPoint Point = CPoint(POINT_QUEUE_X, POINT_QUEUE_Y + 1);
  1180.  
  1181.                 RenderOutLineLamp(POINT_QUEUE_X, POINT_QUEUE_Y + 1, show, SKILL_SIZE);
  1182.             }
  1183.         }
  1184.     }
  1185. #endif // __NEW_TASKBAR_V19
  1186.  
  1187.     CWndButton* pWndButton = (CWndButton*)GetDlgItem( WIDC_UP );
  1188.     rect = pWndButton->GetWindowRect( TRUE );
  1189.     rect.top = rect.bottom - 2;
  1190.     p2DRender->TextOut( rect.left, rect.top, m_nSlotIndex + 1, 0xffffffff );
  1191.     p2DRender->SetFont( pOldFont );
  1192. }
  1193.  
  1194. void CWndTaskBar::UpdateItem()
  1195. {
  1196.     if( g_pPlayer == NULL )
  1197.         return;
  1198.    
  1199.     for( int i = 0; i < MAX_SLOT_ITEM; i++ )
  1200.     {
  1201.         LPSHORTCUT lpShortcut = &m_paSlotItem[ i ] ;
  1202.         if( !lpShortcut->IsEmpty() )
  1203.         {
  1204.             if( lpShortcut->m_dwShortcut == SHORTCUT_ITEM )
  1205.             {
  1206.                 CItemBase* pItemBase = g_pPlayer->GetItemId( lpShortcut->m_dwId );
  1207.                 CItemElem* pItemElem = (CItemElem*)pItemBase;
  1208.  
  1209.                 if( pItemElem )
  1210.                 {
  1211.                     if( lpShortcut->m_pTexture != pItemElem->GetTexture() )
  1212.                         lpShortcut->m_pTexture = pItemElem->GetTexture();
  1213.                 }
  1214.                 else
  1215.                 {
  1216. #if __VER >= 8  // __JEFF_VER_8
  1217.                     ItemProp* pItemProp = prj.GetItemProp( lpShortcut->m_dwItemId );
  1218.                     if( pItemProp && pItemProp->dwPackMax > 1 ) // º´ÇÕ °¡´ÉÇÑ ¾ÆÀÌÅÛÀ̸é?
  1219.                     {
  1220.                         DWORD dwId  = g_pPlayer->m_Inventory.Find( lpShortcut->m_dwItemId );
  1221.                         if( dwId != NULL_ID )   // °°Àº Á¾·ùÀÇ ¾ÆÀÌÅÛÀÌ ÀÖ´Ù¸é?
  1222.                         {
  1223.                             lpShortcut->m_dwId  = dwId;
  1224.                             g_DPlay.SendAddItemTaskBar( m_nSlotIndex, i, lpShortcut );
  1225.                         }
  1226.                         else
  1227.                         {
  1228.                             lpShortcut->Empty();               
  1229.                             g_DPlay.SendRemoveItemTaskBar( m_nSlotIndex, i );
  1230.                         }
  1231.                     }
  1232.                     else
  1233.                     {
  1234.                         lpShortcut->Empty();               
  1235.                         g_DPlay.SendRemoveItemTaskBar( m_nSlotIndex, i );
  1236.                     }
  1237. #else   // __JEFF_VER_8
  1238.                     lpShortcut->Empty();               
  1239.                     g_DPlay.SendRemoveItemTaskBar( m_nSlotIndex, i );
  1240. #endif  // __JEFF_VER_8
  1241.                 }
  1242.             }
  1243.         }
  1244.     }
  1245. }
  1246.  
  1247. void CWndTaskBar::OnKeyUp( UINT nChar, UINT nRepCnt, UINT nFlags )
  1248. {
  1249. }
  1250. void CWndTaskBar::OnInitialUpdate()
  1251. {
  1252.     CWndNeuz::OnInitialUpdate();
  1253.  
  1254.     LPWNDCTRL pApplet = GetWndCtrl( WIDC_CUSTOM1 );
  1255.     LPWNDCTRL pItem   = GetWndCtrl( WIDC_CUSTOM2 );
  1256.     LPWNDCTRL pSkill  = GetWndCtrl( WIDC_CUSTOM3 );
  1257.  
  1258.     POINT_APPLET_X = pApplet->rect.left;
  1259.     POINT_APPLET_Y = pApplet->rect.top;
  1260.     POINT_ITEM_X   = pItem->rect.left;
  1261.     POINT_ITEM_Y   = pItem->rect.top;
  1262.     POINT_QUEUE_X  = pSkill->rect.left;
  1263.     POINT_QUEUE_Y  = pSkill->rect.top;
  1264.  
  1265.     CRect rect( 5, 7, 754, 40 );
  1266.  
  1267.     g_WndMng.m_pWndTaskBar = this;
  1268.     {
  1269.         rect = g_Neuz.GetDeviceRect();
  1270.         m_pWndRoot->m_rectLayout = rect;
  1271. #ifdef __NEW_TASKBAR_V19
  1272.         pWndTaskBar_HUD       = new CWndTaskBar_HUD;
  1273.         pWndTaskBar_HUD_SLIDE = new CWndTaskBar_HUD_SLIDE;
  1274.         pWndTaskBar_HUD_EX1   = new CWndTaskBar_HUD_EX1;
  1275.         pWndTaskBar_HUD_EX2   = new CWndTaskBar_HUD_EX2;
  1276.         pWndTaskBar_HUD_EX3   = new CWndTaskBar_HUD_EX3;
  1277.         pWndNewSkillSlot      = new CWndNewSkillSlot;
  1278. #else // __NEW_TASKBAR_V19
  1279.         switch( m_nPosition )
  1280.         {
  1281.         case TASKBAR_TOP:
  1282.             rect.bottom = TASKBAR_HEIGHT;
  1283.             m_pWndRoot->m_rectLayout.top = rect.bottom;
  1284.             break;
  1285.         case TASKBAR_BOTTOM:
  1286.             rect.top = rect.bottom - TASKBAR_HEIGHT;
  1287.             m_pWndRoot->m_rectLayout.bottom = rect.top;
  1288.             break;
  1289.         case TASKBAR_LEFT:
  1290.             rect.right = TASKBAR_HEIGHT;
  1291.             m_pWndRoot->m_rectLayout.left = rect.right;
  1292.             break;
  1293.         case TASKBAR_RIGHT:
  1294.             rect.left = rect.right - TASKBAR_HEIGHT;
  1295.             m_pWndRoot->m_rectLayout.right = rect.left;
  1296.             break;
  1297.         }
  1298.         SetWndRect( rect );
  1299. #endif // __NEW_TASKBAR_V19
  1300.     }
  1301.     m_texPack.LoadScript( m_pApp->m_pd3dDevice, MakePath( DIR_THEME, "hotkey.inc" ) );
  1302.  
  1303.     m_menuShortcut.CreateMenu( this ); 
  1304.     m_menuShortcut.AppendMenu( 0, 0 ,_T( "»èÁ¦" ) );
  1305.  
  1306.     m_pTexture = m_textureMng.AddTexture( g_Neuz.m_pd3dDevice,  MakePath( DIR_ICON, "icon_ActionSkill.dds" ), 0xffff00ff );
  1307.     m_aSlotSkill.m_dwShortcut = SHORTCUT_SKILLFUN;
  1308.     m_aSlotSkill.m_pTexture   = m_pTexture;
  1309. }
  1310.  
  1311. HRESULT CWndTaskBar::InvalidateDeviceObjects()
  1312. {
  1313.     CWndBase::InvalidateDeviceObjects();
  1314.    
  1315. #ifdef __YDEBUG
  1316.     m_texPack.InvalidateDeviceObjects();
  1317. #endif //__YDEBUG
  1318.     return S_OK;
  1319. }
  1320.  
  1321. HRESULT CWndTaskBar::DeleteDeviceObjects()
  1322. {
  1323.     CWndBase::DeleteDeviceObjects();
  1324.    
  1325. #ifdef __YDEBUG
  1326.     m_texPack.DeleteDeviceObjects();
  1327. #endif //__YDEBUG
  1328.     return S_OK;
  1329. }
  1330.  
  1331. HRESULT CWndTaskBar::RestoreDeviceObjects()
  1332. {
  1333.     CWndBase::RestoreDeviceObjects();
  1334.    
  1335. #ifdef __YDEBUG
  1336.     m_texPack.RestoreDeviceObjects(m_pApp->m_pd3dDevice);
  1337. #endif //__YDEBUG
  1338.    
  1339.     return 0;
  1340. }
  1341.  
  1342. BOOL CWndTaskBar::Initialize(CWndBase* pWndParent,DWORD dwWndId)
  1343. {
  1344.     CRect rect = g_Neuz.GetDeviceRect();
  1345.     //m_rectLayout = rect;
  1346. /*
  1347.     switch( m_nPosition )
  1348.     {
  1349.     case TASKBAR_TOP:
  1350.         rect.bottom = TASKBAR_HEIGHT;
  1351.         m_pWndRoot->m_rectLayout.top = rect.bottom;
  1352.         break;
  1353.     case TASKBAR_BOTTOM:
  1354.         rect.top = rect.bottom - TASKBAR_HEIGHT;
  1355.         m_pWndRoot->m_rectLayout.bottom = rect.top;
  1356.         break;
  1357.     case TASKBAR_LEFT:
  1358.         break;
  1359.     case TASKBAR_RIGHT:
  1360.         break;
  1361.     }
  1362.     */
  1363.     //m_pWndRoot->SetWndRect( rectRoot );
  1364.  
  1365. //CMainFrame
  1366.     //rect.top = rect.bottom;
  1367.     //rect.bottom += TASKBAR_HEIGHT;
  1368. //  rect.bottom = CLIENT_HEIGHT;
  1369.     //m_strMessage = lpszMessage;
  1370.     //m_dwType = nType;
  1371.     //SetTitle("¸ÞÁö½Ã À©µµ");
  1372. //  return CWndBase::Create( 0 | /*WBS_MODAL|*/ WBS_MANAGER | WBS_SOUND | WBS_NOFRAME, rect, &g_WndMng, APP_TASKBAR );
  1373.     BOOL bResult;
  1374.     if( g_Option.m_nResWidth == 800 )
  1375.     {
  1376.         m_nMaxSlotApplet = 5;
  1377.         bResult = CWndNeuz::InitDialog( g_Neuz.GetSafeHwnd(), APP_TASKBAR800, WBS_MANAGER | WBS_SOUND, CPoint( 0, 0 ), pWndParent );
  1378.     }
  1379.     else
  1380.     if( g_Option.m_nResWidth == 1024 )
  1381.     {
  1382.         m_nMaxSlotApplet = 10;
  1383.         bResult = CWndNeuz::InitDialog( g_Neuz.GetSafeHwnd(), APP_TASKBAR1024, WBS_MANAGER | WBS_SOUND, CPoint( 0, 0 ), pWndParent );
  1384.     }
  1385.     else
  1386.     if( g_Option.m_nResWidth == 1280 )
  1387.     {
  1388.         m_nMaxSlotApplet = MAX_SLOT_APPLET;
  1389.         bResult = CWndNeuz::InitDialog( g_Neuz.GetSafeHwnd(), APP_TASKBAR1280, WBS_MANAGER | WBS_SOUND, CPoint( 0, 0 ), pWndParent );
  1390.     }
  1391. #if __VER >= 9 // __CSC_VER9_RESOLUTION
  1392.     else if( g_Option.m_nResWidth == 1360 )
  1393.     {
  1394.         m_nMaxSlotApplet = MAX_SLOT_APPLET;
  1395.         bResult = CWndNeuz::InitDialog( g_Neuz.GetSafeHwnd(), APP_TASKBAR1360W, WBS_MANAGER | WBS_SOUND, CPoint( 0, 0 ), pWndParent );
  1396.     }
  1397.     else if( g_Option.m_nResWidth == 1400 )
  1398.     {
  1399.         m_nMaxSlotApplet = MAX_SLOT_APPLET;
  1400.         bResult = CWndNeuz::InitDialog( g_Neuz.GetSafeHwnd(), APP_TASKBAR1400, WBS_MANAGER | WBS_SOUND, CPoint( 0, 0 ), pWndParent );
  1401.     }
  1402.     else if( g_Option.m_nResWidth == 1440 )
  1403.     {
  1404.         m_nMaxSlotApplet = MAX_SLOT_APPLET;
  1405.         bResult = CWndNeuz::InitDialog( g_Neuz.GetSafeHwnd(), APP_TASKBAR1440W, WBS_MANAGER | WBS_SOUND, CPoint( 0, 0 ), pWndParent );
  1406.     }
  1407.     else if( g_Option.m_nResWidth == 1600 )
  1408.     {
  1409.         m_nMaxSlotApplet = MAX_SLOT_APPLET;
  1410.         bResult = CWndNeuz::InitDialog( g_Neuz.GetSafeHwnd(), APP_TASKBAR1600, WBS_MANAGER | WBS_SOUND, CPoint( 0, 0 ), pWndParent );
  1411.     }
  1412.     else if( g_Option.m_nResWidth == 1680 )
  1413.     {
  1414.         m_nMaxSlotApplet = MAX_SLOT_APPLET;
  1415.         bResult = CWndNeuz::InitDialog( g_Neuz.GetSafeHwnd(), APP_TASKBAR1680W, WBS_MANAGER | WBS_SOUND, CPoint( 0, 0 ), pWndParent );
  1416.     }  
  1417. #endif //__CSC_VER9_RESOLUTION
  1418.    
  1419.     DelWndStyle( WBS_MOVE );
  1420.     return bResult;
  1421.    
  1422. }
  1423. BOOL CWndTaskBar::RemoveDeleteObj()
  1424. {
  1425.     /*
  1426.     for( int i = 0; i < m_awndShortCut.GetSize(); i++ )
  1427.     {
  1428.         CWndButton* pWndButton = (CWndButton*)m_awndShortCut.GetAt( i );
  1429.         if( pWndButton )
  1430.         {
  1431.             if( pWndButton->m_shortcut.m_dwShortcut == SHORTCUT_OBJECT )
  1432.             {
  1433.                 CObj* pObj = (CObj*) pWndButton->m_shortcut.m_dwData;
  1434.                 if( IsValidObj( pObj ) == FALSE )
  1435.                     pWndButton->m_shortcut.m_dwData = 0;
  1436.             }
  1437.             else
  1438.             if( pWndButton->m_shortcut.m_dwShortcut == SHORTCUT_ITEM )
  1439.             {
  1440.                 CItemBase* pItemBase = (CItemBase*) pWndButton->m_shortcut.m_dwData;
  1441.                 if( pItemBase && pItemBase->IsEmpty() )
  1442.                     pWndButton->Destroy( TRUE );
  1443.             }
  1444.         }
  1445.     }
  1446.     */
  1447.     return TRUE;
  1448. }
  1449. void CWndTaskBar::SetItemSlot( int nSlot )
  1450. {
  1451.     if( nSlot >= 0 && nSlot < MAX_SLOT_ITEM_COUNT)
  1452.         m_paSlotItem = m_aSlotItem[ m_nSlotIndex = nSlot ];
  1453. }
  1454. BOOL CWndTaskBar::OnChildNotify(UINT message,UINT nID,LRESULT* pLResult)
  1455. {
  1456.     CWndButton* pWndButton = (CWndButton*) pLResult;
  1457.     if( message == WIN_ITEMDROP )
  1458.     {
  1459.         /*
  1460.         LPSHORTCUT pShortcut = (LPSHORTCUT) pLResult;
  1461.         if( pShortcut && pShortcut->m_dwData == 2 ) // ½ºÅ³ Å¥ ¹öÆ°ÀÇ ¾ÆÀ̵ð´Â 1000 ÀÌ»ó
  1462.         {
  1463.             SetSkillQueue( nID - 1000, pShortcut->m_dwShortcut, pShortcut->m_dwType, pShortcut->m_dwId, pShortcut->m_dwData, pShortcut->m_pTexture );
  1464.         }
  1465.         */
  1466.     }
  1467.     else
  1468.     switch( nID )
  1469.     {
  1470.         case 101:
  1471.             /*
  1472.             if( m_pWndQuickList )
  1473.                 m_pWndQuickList->Destroy();
  1474.             else
  1475.             {
  1476.                 m_pWndQuickList = new CWndQuickList;
  1477.                 m_pWndQuickList->Initialize( this );//&g_WndMng );
  1478.             }
  1479.             */
  1480.             break;
  1481.         case WIDC_UP:
  1482.             m_nSlotIndex--;
  1483.             if( m_nSlotIndex < 0 ) m_nSlotIndex = MAX_SLOT_ITEM_COUNT-1;
  1484.             m_paSlotItem = m_aSlotItem[ m_nSlotIndex ];
  1485.             break;
  1486.         case WIDC_DOWN:
  1487.             m_nSlotIndex++;
  1488.             if( m_nSlotIndex > MAX_SLOT_ITEM_COUNT-1 ) m_nSlotIndex = 0;
  1489.             m_paSlotItem = m_aSlotItem[ m_nSlotIndex ];
  1490.             break;
  1491.         case WIDC_BUTTON1: // Menu
  1492.         {
  1493.             g_WndMng.OpenMenu();
  1494.             CRect rect = g_Neuz.GetDeviceRect();
  1495.             CRect rectMenu = m_wndMenu.GetScreenRect();
  1496.             switch( m_nPosition )
  1497.             {
  1498.             case TASKBAR_TOP:
  1499.                 if( g_WndMng.m_pWndMenu )
  1500.                     g_WndMng.m_pWndMenu->Move( CPoint( 0, TASKBAR_HEIGHT ) );
  1501.                 break;
  1502.             case TASKBAR_BOTTOM:
  1503.                 if( g_WndMng.m_pWndMenu )
  1504.                     g_WndMng.m_pWndMenu->Move( CPoint( 0, rect.bottom - TASKBAR_HEIGHT - g_WndMng.m_pWndMenu->GetWndRect().Height() ) );
  1505.                 break;
  1506.             case TASKBAR_LEFT:
  1507.                 if( g_WndMng.m_pWndMenu )
  1508.                     g_WndMng.m_pWndMenu->Move( CPoint( TASKBAR_HEIGHT, 0 ) );
  1509.                 break;
  1510.             case TASKBAR_RIGHT:
  1511.                 if( g_WndMng.m_pWndMenu )
  1512.                     g_WndMng.m_pWndMenu->Move( CPoint( rect.right - TASKBAR_HEIGHT - g_WndMng.m_pWndMenu->GetWndRect().Width(), 0 ) );
  1513.                 break;
  1514.             }
  1515.  
  1516.         }
  1517.         default:
  1518.             {
  1519.                 switch( pWndButton->m_shortcut.m_dwIndex )
  1520.                 {
  1521.                     case APP_TRADE:     g_DPlay.SendTrade( (CMover*)g_WorldMng.Get()->GetObjFocus() );  break;
  1522.                     default:
  1523.                         g_WndMng.ObjectExecutor( &pWndButton->m_shortcut );
  1524.                         break;
  1525.                 }
  1526.             }
  1527.     }
  1528.     return TRUE;
  1529. }
  1530. BOOL CWndTaskBar::OnCommand( UINT nID, DWORD dwMessage, CWndBase* pWndBase )
  1531. {
  1532.     return TRUE;
  1533. }
  1534. void CWndTaskBar::OnSize(UINT nType, int cx, int cy)
  1535. {
  1536.     CWndNeuz::OnSize( nType, cx, cy );
  1537. //  CRect rect = GetClientRect();
  1538. //  rect.DeflateRect( 5, 5);
  1539. //  rect.right = 37;
  1540.     //ect rect( 5, 5, 44, 40 );//GetClientRect();
  1541.     //wndMenu.SetWndRect( rect );
  1542.  
  1543. //ect = GetClientRect();
  1544.  
  1545.     // Create Command button
  1546.     //for(int i = 0; i < 10; i++)
  1547.         //m_pWndCommand[i].SetWndRect(CRect(60+i*18,3,76+i*18,21));
  1548.  
  1549.     //int i;
  1550.     // Create Tray button
  1551.     //int nMax = 3;
  1552.     //int nStart = (rect.Width() - nMax * 26);
  1553.     //for(i = 0; i < nMax; i++)
  1554. //      m_pWndTray[i].SetWndRect(CRect(nStart + i * 25, 6, nStart + 24 + i * 25, 30));
  1555. }
  1556. void CWndTaskBar::RemoveSkillQueue( int nIndex, BOOL bSend )
  1557. {
  1558.     if( m_nExecute )    return;     // ½ºÅ³Å¥ ½ÇÇàÁß¿£ »©ÁöÁöµµ ¾Ê´Â´Ù.
  1559. BACK:
  1560.     if( !m_aSlotQueue[ nIndex ].IsEmpty() )
  1561.     {
  1562.         ItemProp* pItemProp = g_pPlayer->GetSkill( 0, m_aSlotQueue[ nIndex ].m_dwId )->GetProp();
  1563.         DWORD dwComboStyleSrc = pItemProp->dwComboStyle;
  1564.         int i = NULL;
  1565.         for( i = nIndex; i < MAX_SLOT_QUEUE - 1; i++ )
  1566.         {
  1567.             memcpy( &m_aSlotQueue[ i ], &m_aSlotQueue[ i + 1 ], sizeof( SHORTCUT ) );
  1568.             m_aSlotQueue[ i ].m_dwIndex = i;
  1569.         }
  1570.         m_aSlotQueue[ i ].m_dwShortcut = SHORTCUT_NONE;
  1571.         m_aSlotQueue[ i ].m_dwId = 0;
  1572.         m_nCurQueueNum--;
  1573.         if( m_nCurQueueNum < 0 )
  1574.             m_nCurQueueNum = 0;
  1575.        
  1576. #ifdef __NEW_TASKBAR_V19
  1577.         PLAYSND(SND_PC_ACTIONREMOVE);
  1578. #endif // __NEW_TASKBAR_V19
  1579.         if( CheckAddSkill( dwComboStyleSrc, nIndex /*- 1*/ ) == FALSE )
  1580.             goto BACK;
  1581.     }
  1582.     if( bSend )
  1583.         g_DPlay.SendSkillTaskBar( );
  1584.     // ½ºÅ³À» Áö¿ì´Â °÷ ¼­¹ö·Î º¸³»¾ßÇÔ.   
  1585.  
  1586. }
  1587. void CWndTaskBar::OnRButtonUp( UINT nFlags, CPoint point )
  1588. {
  1589.     CRect rect = RECT_APPLET;
  1590.     if( rect.PtInRect( point ) )
  1591.     {
  1592.         point.x -= rect.left;
  1593.         point.x /= ICON_SIZE;
  1594.         if( FALSE == m_aSlotApplet[ point.x ].IsEmpty() )
  1595.         {
  1596.             m_aSlotApplet[ point.x ].Empty();          
  1597.             g_DPlay.SendRemoveAppletTaskBar( (BYTE)( point.x ) );       // ¾ÆÀÌÅÛ »èÁ¦ ¼­¹ö·Î Àü¼Û
  1598.         }
  1599.     }
  1600.     rect = RECT_ITEM;
  1601.     if( rect.PtInRect( point ) )
  1602.     {
  1603.         point.x -= rect.left;
  1604.  
  1605.         point.x /= ICON_SIZE;
  1606.         if( FALSE == m_paSlotItem[ point.x ].IsEmpty() )
  1607.         {
  1608.             m_paSlotItem[ point.x ].Empty();
  1609.             g_DPlay.SendRemoveItemTaskBar( (BYTE)( m_nSlotIndex ), (BYTE)( point.x ) ); // ¾ÆÀÌÅÛ »èÁ¦ ¼­¹ö·Î Àü¼Û         
  1610.         }
  1611.  
  1612.     }
  1613.     rect = RECT_QUEUE;
  1614.     if( rect.PtInRect( point ) )
  1615.     {
  1616.         point.x -= rect.left;
  1617.         point.y -= rect.top;
  1618.         point.x /= SKILL_SIZE;
  1619.         RemoveSkillQueue( point.x );
  1620.     }
  1621. }
  1622.  
  1623. BOOL CWndTaskBar::SetShortcut( int nIndex, DWORD dwShortcut, DWORD dwType, DWORD dwId, CTexture* pTexture, int nWhere )
  1624. {
  1625.     LPSHORTCUT pShortcut = NULL;
  1626.     //CWndShortcut* pWndButton = new CWndShortcut;
  1627. //  pWndButton->Create( _T( "" ), 0, CRect( 65 + nIndex * 32, 3, 65 + nIndex * 32 + 32 , 3 + 32), this, dwId );
  1628.  
  1629.     //pShortcut = m_aSlotApplet[ nIndex ];
  1630. #if __VER >= 11 // __CSC_VER11_5
  1631.     // Chat Shortcut 10°³·Î Á¦ÇÑ
  1632.     if(dwShortcut == SHORTCUT_CHAT)
  1633.     {
  1634.         int nchatshortcut = 0;
  1635.         for( int i=0; i<MAX_SLOT_ITEM_COUNT; i++ )
  1636.         {
  1637.             for( int j=0; j<MAX_SLOT_ITEM; j++ )
  1638.             {
  1639.                 if( m_aSlotItem[i][j].m_dwShortcut == SHORTCUT_CHAT )
  1640.                     nchatshortcut++;
  1641.             }
  1642.         }
  1643.         for( int k = 0; k < m_nMaxSlotApplet; ++k )
  1644.             if( m_aSlotApplet[ k ].m_dwShortcut == SHORTCUT_CHAT )
  1645.                 ++nchatshortcut;
  1646.  
  1647.         if(nchatshortcut > 9)
  1648.         {
  1649.             g_WndMng.PutString( prj.GetText( TID_GAME_MAX_SHORTCUT_CHAT ), NULL, prj.GetTextColor( TID_GAME_MAX_SHORTCUT_CHAT ) );
  1650.             return FALSE;
  1651.         }
  1652.     }
  1653. #endif //__CSC_VER11_5
  1654.  
  1655.     switch( m_nPosition )
  1656.     {
  1657.     case TASKBAR_TOP:
  1658.     case TASKBAR_BOTTOM:
  1659.         if( nWhere == 0 )
  1660.             pShortcut = &m_aSlotApplet[ nIndex ];
  1661.         else
  1662.         if( nWhere == 1 )
  1663.             pShortcut = &m_paSlotItem[ nIndex ];
  1664.         break;
  1665.     case TASKBAR_LEFT:
  1666.     case TASKBAR_RIGHT:
  1667.         if( nWhere == 0 )
  1668.             pShortcut = &m_aSlotApplet[ nIndex ];
  1669.         else
  1670.         if( nWhere == 1 )
  1671.             pShortcut = &m_paSlotItem[ nIndex ];
  1672.         break;
  1673.     }
  1674.     if( pTexture == NULL )
  1675.     {
  1676.         CItemBase* pItemBase;
  1677.         if( dwShortcut == SHORTCUT_APPLET )
  1678.         {
  1679.             AppletFunc* pAppletFunc = g_WndMng.GetAppletFunc( dwId );
  1680.             pShortcut->m_pTexture = m_textureMng.AddTexture( g_Neuz.m_pd3dDevice,  MakePath( DIR_ICON, pAppletFunc->m_pszIconName ), 0xffff00ff );
  1681.                 //pWndButton->SetTexture( g_Neuz.m_pd3dDevice, MakePath( DIR_ICON, pAppletFunc->m_pszIconName ) );
  1682.             //pCardElem->m_pTexture = m_textureMng.AddTexture( g_Neuz.m_pd3dDevice, MakePath( DIR_ITEM, pCardElem->GetProp()->szIcon), 0xff000000 );
  1683.  
  1684.         }
  1685.         else
  1686.         if( dwShortcut == SHORTCUT_ITEM )
  1687.         {
  1688.             pItemBase = g_pPlayer->GetItemId( dwId );
  1689.             CTexture* pTexture = m_textureMng.AddTexture( g_Neuz.m_pd3dDevice, MakePath( DIR_ITEM, pItemBase->GetProp()->szIcon), 0xffff00ff );
  1690.             pItemBase->SetTexture( pTexture );
  1691.             pShortcut->m_pTexture = pTexture ;
  1692.         }
  1693.         else
  1694.         if( dwShortcut == SHORTCUT_MOTION )
  1695.         {
  1696.             MotionProp* pMotionProp = prj.GetMotionProp( dwId );
  1697.             if(pMotionProp)     //061206 ma 8Â÷¿¡ µé¾î°¥ ¸ð¼Ç°ü¸®¸¦ À§ÇØ ¹öÀü Ãß°¡  propMotion.txt
  1698.             {
  1699.                 pMotionProp->pTexture = m_textureMng.AddTexture( g_Neuz.m_pd3dDevice, MakePath( DIR_ICON, pMotionProp->szIconName ), 0xffff00ff );
  1700.                 pShortcut->m_pTexture = pMotionProp->pTexture;
  1701.                 //pWndButton->SetTexture( g_Neuz.m_pd3dDevice, pItemBase->m_pTexture );
  1702.             }
  1703.             else
  1704.                 return FALSE;
  1705.         }
  1706.         /*
  1707.         else
  1708.         if( dwShortcut == SHORTCUT_CARD )
  1709.         {
  1710.             pItemBase = g_pPlayer->m_Card.GetAt( dwId );//m_apItem[ i ] ;
  1711.             pItemBase->m_pTexture = m_textureMng.AddTexture( g_Neuz.m_pd3dDevice, MakePath( DIR_ITEM, pItemBase->GetProp()->szIcon), 0xff000000 );
  1712.             pWndButton->SetTexture( g_Neuz.m_pd3dDevice, pItemBase->m_pTexture );
  1713.         }
  1714.         else
  1715.         if( dwShortcut == SHORTCUT_JACKBOX )
  1716.         {
  1717.             pItemBase = g_pPlayer->m_Cube.GetAt( dwId );//m_apItem[ i ] ;
  1718.             pItemBase->m_pTexture = m_textureMng.AddTexture( g_Neuz.m_pd3dDevice, MakePath( DIR_ITEM, pItemBase->GetProp()->szIcon), 0xff000000 );
  1719.             pWndButton->SetTexture( g_Neuz.m_pd3dDevice, pItemBase->m_pTexture );
  1720.         }
  1721.         */
  1722.         else
  1723.         if( dwShortcut == SHORTCUT_SKILL )
  1724.         {
  1725.             if( pShortcut->m_dwType == 2 )
  1726.             {
  1727.                 ItemProp* pProp =  prj.GetPartySkill( pShortcut->m_dwId );
  1728.                 pShortcut->m_pTexture = m_textureMng.AddTexture( g_Neuz.m_pd3dDevice, MakePath( DIR_ICON, pProp->szIcon/*pItemBase->GetProp()->szIcon*/), 0xffff00ff );
  1729.             }
  1730.             else
  1731.             {  
  1732.                 LPSKILL lpSkill = g_pPlayer->GetSkill( dwType, dwId );
  1733.                 //pWndButton->SetTexture( g_Neuz.m_pd3dDevice, MakePath( DIR_ICON, lpSkill->GetProp()->szIcon ) );
  1734.                 pShortcut->m_pTexture = m_textureMng.AddTexture( g_Neuz.m_pd3dDevice, MakePath( DIR_ITEM, lpSkill->GetProp()->szIcon/*pItemBase->GetProp()->szIcon*/), 0xffff00ff, TRUE );
  1735.             }
  1736.         }  
  1737.         else
  1738.         if( dwShortcut == SHORTCUT_SKILLFUN )
  1739.             pShortcut->m_pTexture = pTexture;
  1740.            
  1741.     }
  1742.     else
  1743.         pShortcut->m_pTexture = pTexture;
  1744.  
  1745. #if __VER >= 8  // __JEFF_VER_8
  1746.     if( dwShortcut == SHORTCUT_ITEM )
  1747.     {
  1748.         CItemBase* pItemBase    = g_pPlayer->GetItemId( dwId );
  1749.         if( pShortcut && pItemBase && pItemBase->GetProp()->dwPackMax > 1 ) // º´ÇÕ °¡´ÉÇÑ ¾ÆÀÌÅÛÀ̸é?
  1750.             pShortcut->m_dwItemId   = pItemBase->m_dwItemId;
  1751.     }
  1752. #endif  // __JEFF_VER_8
  1753.  
  1754.     pShortcut->m_dwShortcut = dwShortcut   ;
  1755.     pShortcut->m_dwType     = dwType;
  1756.     pShortcut->m_dwIndex    = nIndex;//0;//dwIndex;
  1757.     pShortcut->m_dwId       = dwId;
  1758.     pShortcut->m_dwUserId   = 0 ;
  1759.     pShortcut->m_dwData     = nWhere;
  1760.     strcpy( pShortcut->m_szString, m_GlobalShortcut.m_szString );//, sizeof(pShortcut->m_szString) );
  1761.     //pWndButton->SetTitle( m_GlobalShortcut.m_szString );
  1762. #if __VER >= 12 // __LORD
  1763.     if( dwShortcut == SHORTCUT_LORDSKILL)
  1764.         pShortcut->m_dwId--;
  1765. #endif
  1766.     if( nWhere == 0 ) //m_aSlotApplet
  1767.     {
  1768.         g_DPlay.SendAddAppletTaskBar( nIndex, pShortcut );
  1769.     }
  1770.     else
  1771.     if( nWhere == 1 ) //m_paSlotItem
  1772.     {
  1773.         g_DPlay.SendAddItemTaskBar( m_nSlotIndex, nIndex, pShortcut );
  1774.     }
  1775.     return TRUE;
  1776. }
  1777. BOOL CWndTaskBar::CheckAddSkill( int nSkillStyleSrc, int nQueueDest  )
  1778. {
  1779.     /*
  1780.     START -> FINISH, FG
  1781.     CIRCLE -> START, CIRCLE
  1782.     FINISH -> START, CIRCLE
  1783.     */
  1784.     DWORD dwComboStyleSrc = nSkillStyleSrc;
  1785.     if( nQueueDest == 0 )       // ùĭ¿¡ ³ÖÀ¸·Á ½Ãµµ ÇßÀ»°æ¿ì
  1786.     {
  1787.         /*
  1788.         if( ÀÌ¹Ì ½ºÅ³Ã¢¿¡ µî·ÏµÇ¾î ÀÖ´Ù )
  1789.         {
  1790.             if( »ðÀÔÇÏ·Á´Â°Ô CT_GENERALÀΰ¡ )
  1791.                 if( ÀÌ¹Ì »ðÀԵǾî ÀÖ´Â°Ô CT_GENERALÀΰ¡ )
  1792.                 return TRUE;
  1793.             return FALSE;       // CT_GENERALÀÌ¿ÜÀÇ °ÍÀ» ùĭ¿¡ »ðÀÔÇÏ·Á¸é ¸ðµÎ ½ÇÆÐ.
  1794.         } else
  1795.         {
  1796.             // ¾Æ¹«°Íµµ µî·ÏµÇ¾î ÀÖÁö ¾Ê´Ù.
  1797.             // ½ºÅÜ, Á¦³×·²¸¸ ÇÕ°Ý.
  1798.             if( dwComboStyleSrc == CT_STEP  || dwComboStyleSrc == CT_GENERAL  )
  1799.                 return TRUE;
  1800.             return FALSE;   // ±×¿Ü¿£ ¸ðµÎ ºÒÇÕ°Ý.
  1801.         }
  1802.          */
  1803.         if( m_nCurQueueNum == 0 )       // ºñ¾îÀÖ´Ù
  1804.         {
  1805.             if( dwComboStyleSrc == CT_STEP  || dwComboStyleSrc == CT_GENERAL  )     // ½ºÅÜÀ̳ª Á¦³×·²À̸é ÇÕ°Ý
  1806.                 return TRUE;
  1807.             return  FALSE;
  1808.         } else
  1809.         // ¹º°¡ ÀÖ´Ù.
  1810.         {
  1811.             DWORD dwComboStyleDest;
  1812.             DWORD dwSkill = g_pPlayer->GetSkill( 0, m_aSlotQueue[ nQueueDest ].m_dwId )->dwSkill;
  1813.                 //m_aSlotQueue[ nQueueDest ].m_dwId;    // ³ÖÀ¸·Á´Â Ä­ÀÇ ½ºÅ³
  1814.             if( dwSkill )
  1815.                 dwComboStyleDest = prj.GetSkillProp( dwSkill )->dwComboStyle;       // ±×Ä­ÀÇ ½ºÅ¸ÀÏ
  1816.             else
  1817.                 dwComboStyleDest = 0;
  1818.             if( dwComboStyleSrc == CT_GENERAL && dwComboStyleDest == CT_GENERAL )   // À̹ÌÀִ°͵µ Á¦³×·²ÀÌ°í »ðÀÔÇÏ·Á´Â°Íµµ Á¦³×·²À̸é ÇÕ°Ý
  1819.                 return TRUE;
  1820.             return FALSE;   // ±×¿Ü´Â ¸ðµÎ ùĭ¿¡ »ðÀÔÇÒ ¼ö ¾øÀ½.
  1821.         }
  1822.     }
  1823.     else
  1824.     if( nQueueDest == 4 )       // ¸¶Áö¸·Ä­¿¡ ³ÖÀ¸·Á°í ÇßÀ»°æ¿ì
  1825.     {
  1826.         if( dwComboStyleSrc == CT_STEP )    // ½ºÅÜÀº ùĭÀÌ ¾Æ´Ï¸é ¹«Á¶°Ç ¸ø³Ö´Â´Ù.
  1827.             return FALSE;
  1828.         DWORD dwSkill = g_pPlayer->GetSkill( 0, m_aSlotQueue[ nQueueDest - 1 ].m_dwId )->dwSkill;
  1829.             //m_aSlotQueue[ nQueueDest - 1 ].m_dwId;    // ³ÖÀ¸·Á´Â Ä­ÀÇ ¾Õ¿¡ÀÖ´Â ½ºÅ³
  1830.         DWORD dwComboStylePrev;
  1831.         if( dwSkill )
  1832.             dwComboStylePrev = prj.GetSkillProp( dwSkill )->dwComboStyle;       // ¾ÕÄ­ÀÇ ½ºÅ¸ÀÏ
  1833.         else
  1834.             dwComboStylePrev = 0;
  1835.         if( dwComboStylePrev == CT_FINISH )     // ¾Õ ½ºÅ³ÀÌ ÇǴϽ¬¸é ´õÀÌ»ó ³ÖÀ» ¼ö ¾ø´Ù.
  1836.             return FALSE;
  1837.         // ¼­Å¬±â¼úÀ» ³ÖÀ¸·ÁÇÏ°í ¾ÕÄ­¿¡ Á¦³×·²ÀÌ¸é ¸ø³ÖÀ½.
  1838.         if( dwComboStyleSrc == CT_CIRCLE && dwComboStylePrev == CT_GENERAL )
  1839.             return FALSE;
  1840.         // ÇǴϽ¬(¾Ï³ð)¸¦ ³ÖÀ¸·ÁÇÏ°í ¾ÕÄ­¿¡ Á¦³×·²ÀÌ¸é ¸ø³ÖÀ½.
  1841.         if( dwComboStyleSrc == CT_FINISH && dwComboStylePrev == CT_GENERAL )
  1842.             return FALSE;
  1843.         // Á¦³×·²À» ³ÖÀ¸·ÁÇÏ°í ¾ÕÄ­ÀÌ Á¦³×·²ÀÌ ¾Æ´Ï¸é ¸ø³ÖÀ½.
  1844.         if( dwComboStyleSrc == CT_GENERAL && dwComboStylePrev != CT_GENERAL )
  1845.             return FALSE;
  1846.        
  1847.         return TRUE;    // ±×¿Ü´Â ¸ðµÎ ÇÕ°Ý
  1848.     }
  1849.     else
  1850.     // ±×¿Ü Áß°£¿¡ ³ÖÀ¸·Á ÇÑ°æ¿ì.
  1851.     {
  1852.         // µÑ°ĭ ÀÌ»óºÎÅÍ ³ÖÀ¸·Á°í ÇßÀ»¶§ ó¸®.
  1853.         if( dwComboStyleSrc == CT_STEP )    // ½ºÅÜÀº ùĭÀÌ ¾Æ´Ï¸é ¹«Á¶°Ç ¸ø³Ö´Â´Ù.
  1854.             return FALSE;
  1855.         DWORD dwComboStylePrev;
  1856.         DWORD dwComboStyleDest;
  1857.         DWORD dwSkill = g_pPlayer->GetSkill( 0, m_aSlotQueue[ nQueueDest - 1 ].m_dwId )->dwSkill;
  1858.             //m_aSlotQueue[ nQueueDest - 1 ].m_dwId;    // ³ÖÀ¸·Á´Â Ä­ÀÇ ¾Õ¿¡ÀÖ´Â ½ºÅ³
  1859.         if( dwSkill )
  1860.             dwComboStylePrev = prj.GetSkillProp( dwSkill )->dwComboStyle;       // ¾ÕÄ­ÀÇ ½ºÅ¸ÀÏ
  1861.         else
  1862.             dwComboStylePrev = 0;
  1863.         dwSkill = g_pPlayer->GetSkill( 0, m_aSlotQueue[ nQueueDest ].m_dwId )->dwSkill;
  1864.         //dwSkill = m_aSlotQueue[ nQueueDest ].m_dwId;  // ³ÖÀ¸·Á´Â Ä­ÀÇ ½ºÅ³
  1865.         if( dwSkill )
  1866.             dwComboStyleDest = prj.GetSkillProp( dwSkill )->dwComboStyle;       // ±×Ä­ÀÇ ½ºÅ¸ÀÏ
  1867.         else
  1868.             dwComboStyleDest = 0;
  1869.         if( dwComboStylePrev == CT_FINISH )     // ¾Õ ½ºÅ³ÀÌ ÇǴϽ¬¸é ´õÀÌ»ó ³ÖÀ» ¼ö ¾ø´Ù.
  1870.             return FALSE;
  1871.         // ¼­Å¬±â¼úÀ» ³ÖÀ¸·ÁÇÏ°í ¾ÕÄ­¿¡ Á¦³×·²ÀÌ¸é ¸ø³ÖÀ½.
  1872.         if( dwComboStyleSrc == CT_CIRCLE && dwComboStylePrev == CT_GENERAL )
  1873.             return FALSE;
  1874.         // ÇǴϽ¬(¾Ï³ð)¸¦ ³ÖÀ¸·ÁÇÏ°í ¾ÕÄ­¿¡ Á¦³×·²ÀÌ¸é ¸ø³ÖÀ½.
  1875.         if( dwComboStyleSrc == CT_FINISH && dwComboStylePrev == CT_GENERAL )
  1876.             return FALSE;
  1877.         // ÇǴϽ¬¸¦ ³ÖÀ¸·ÁÇÏ°í ±×Ä­¿¡ ¼­Å¬ÀÌ¸é ¸ø³ÖÀ½.
  1878.         if( dwComboStyleSrc == CT_FINISH && dwComboStyleDest == CT_CIRCLE )
  1879.             return FALSE;
  1880.         // ÇǴϽ¬¸¦ ³ÖÀ¸·ÁÇÏ°í ±×Ä­¿¡ ÇǴϽ¬ÀÌ¸é ¸ø³ÖÀ½.
  1881.         if( dwComboStyleSrc == CT_FINISH && dwComboStyleDest == CT_FINISH )
  1882.             return FALSE;
  1883.         // Á¦³×·²À» ³ÖÀ¸·ÁÇÏ°í
  1884.         if( dwComboStyleSrc == CT_GENERAL )
  1885.         {
  1886.             if( dwComboStylePrev != CT_GENERAL )    // ¾ÕÄ­ÀÌ Á¦³×·²ÀÌ ¾Æ´Ï¸é ¸ø³ÖÀ½.
  1887.                 return FALSE;
  1888.             if( dwComboStyleDest != CT_GENERAL && m_nCurQueueNum > nQueueDest ) // ±×Ä­ÀÌ Á¦³×·²ÀÌ ¾Æ´Ï¸é ¸ø³Ö´Âµ¥ ¸Ç ³¡ÀÌ¸é ³ÖÀ»¼ö ÀÖ´Ù.
  1889.                     return FALSE;
  1890.         }
  1891.        
  1892.         return TRUE;    // ±× ¿Ü´Â ¸ðµÎ ÇÕ°Ý
  1893.     }
  1894.     return FALSE;
  1895. }
  1896. BOOL CWndTaskBar::SetSkillQueue( int nIndex, DWORD dwType, DWORD dwId, CTexture* pTexture )
  1897. {
  1898.     if( m_nExecute )        return FALSE;       // ½ºÅ³Å¥ ½ÇÇàÁß¿£ µî·Ï ¾ÈµÊ.
  1899. #ifdef __NEW_TASKBAR_V19
  1900.     if( m_nCurQueueNum >= 6 )
  1901. #else // __NEW_TASKBAR_V19
  1902.     if (m_nCurQueueNum >= 5)
  1903. #endif // __NEW_TASKBAR_V19
  1904.     {
  1905.         return FALSE;
  1906.     }
  1907.     // m_nCurQueueNum º¸´Ù ÀÛÀº ½½·Ô¿¡ ºñ¾îÀÖ´Â°Ô ÀÖ´Ù¸é ¿À·ù »óÅ´Ù. Ŭ¸®¾îÇÏÀÚ.
  1908.     for( int i = 0; i < m_nCurQueueNum; i++ )
  1909.     {
  1910.         if( m_aSlotQueue[ i ].IsEmpty() )
  1911.         {
  1912.             for( i = 0; i < m_nCurQueueNum; i++ )
  1913.                 m_aSlotQueue[ i ].Empty();
  1914.             m_nCurQueueNum = 0;
  1915.             break;
  1916.         }
  1917.     }
  1918.      if( nIndex > m_nCurQueueNum )
  1919.          nIndex = m_nCurQueueNum;
  1920.      
  1921. #ifdef __NEW_TASKBAR_V19
  1922.      for (int i = 0; i < MAX_SLOT_QUEUE; i++)
  1923.      {
  1924.          PLAYSND(SND_PC_ACTIONREGISTER);
  1925.          break;
  1926.      }
  1927. #endif // __NEW_TASKBAR_V19
  1928.  
  1929.     LPSHORTCUT pShortcut = NULL;
  1930.     CRect rect = GetWindowRect();
  1931.     LPSKILL lpSkill = g_pPlayer->GetSkill( 0, dwId );
  1932.     DWORD dwSkill = lpSkill->dwSkill;
  1933.     DWORD dwLevel = lpSkill->dwLevel;
  1934.     ItemProp *pSkillProp = prj.GetSkillProp( dwSkill );
  1935.     DWORD dwComboStyleSrc = pSkillProp->dwComboStyle;
  1936.  
  1937.     if( dwLevel <= 0 )
  1938.         return FALSE;
  1939.  
  1940. #if __VER >= 9  // __SKILL_0706
  1941.     AddSkillProp* pAddSkillProp = prj.GetAddSkillProp( pSkillProp->dwSubDefine, dwLevel );
  1942.     ASSERT( pAddSkillProp );
  1943.     if( (int)pAddSkillProp->dwCooldown > 0 )    //  ÄðŸÀÓÀÖ´Â ½ºÅ³Àº ¾×¼Ç½½·Ô¿¡ ¸øµé¾î°¨
  1944. #else   // __SKILL_0705
  1945.     if( (int)(pSkillProp->dwSkillReady) > 0 )   //  ÄðŸÀÓÀÖ´Â ½ºÅ³Àº ¾×¼Ç½½·Ô¿¡ ¸øµé¾î°¨
  1946. #endif  // __SKILL_0705
  1947.     {
  1948.         CString str;
  1949.         str.Format( prj.GetText(TID_GAME_SKILLLNOTUSE), pSkillProp->szName );
  1950.         g_WndMng.PutString( str , NULL, prj.GetTextColor(TID_GAME_SKILLLNOTUSE) );
  1951.         return FALSE;
  1952.     }
  1953.  
  1954. //  DWORD dwComboStyleDest;
  1955. //  ItemProp* pItemProp1, * pItemProp2,* pItemProp3;
  1956.     if( nIndex < m_nCurQueueNum ) // insert     // nIndex´Â ¼¼ÆÃÇÒ Ä­ÀÇ À妽º
  1957.     {
  1958.         if( !CheckAddSkill( dwComboStyleSrc, nIndex ) )     // Src¸¦ nIndex¿¡ ³Ö¾îµµ µÇ´ÂÁö üũ
  1959.             return FALSE;
  1960.         for( int i = m_nCurQueueNum; i > nIndex; i-- )
  1961.         {
  1962.             memcpy( &m_aSlotQueue[ i ], &m_aSlotQueue[ i - 1 ], sizeof( SHORTCUT ) );
  1963.         }
  1964.         pShortcut = &m_aSlotQueue[ nIndex ];
  1965.         m_nCurQueueNum++;
  1966.     }
  1967.     else // add
  1968.     {
  1969.         if( !CheckAddSkill( dwComboStyleSrc,  m_nCurQueueNum ) )    // Á¦ÀÏ ¸¶Áö¸· Ä­¿¡ ³Ö¾îµµ µÇ´ÂÁö Å×½ºÆ®.
  1970.             return FALSE;
  1971.         pShortcut = &m_aSlotQueue[ m_nCurQueueNum ];
  1972.         nIndex = m_nCurQueueNum;
  1973.         m_nCurQueueNum++;
  1974.     }
  1975.     m_nCurQueue = -1;
  1976.     if( pTexture == NULL )
  1977.     {
  1978.         LPSKILL lpSkill = g_pPlayer->GetSkill( dwType, dwId );
  1979.         pShortcut->m_pTexture = m_textureMng.AddTexture( g_Neuz.m_pd3dDevice, MakePath( DIR_ICON, lpSkill->GetProp()->szIcon), 0xff000000, FALSE );
  1980.     }
  1981.     else pShortcut->m_pTexture = pTexture;
  1982.  
  1983.  
  1984.     pShortcut->m_dwShortcut = SHORTCUT_SKILL   ;
  1985.     pShortcut->m_dwType     = dwType; // Á÷¾÷
  1986.     pShortcut->m_dwIndex    = nIndex;//dwIndex; // ½ºÅ³ ÄÜÆ®·Ñ¿¡¼­ÀÇ ¼ø¼­
  1987.     pShortcut->m_dwId       = dwId; // ½ºÅ³ À妽º
  1988.     pShortcut->m_dwUserId   = 0 ;
  1989.     pShortcut->m_dwData     = 2;
  1990.     _tcscpy( pShortcut->m_szString, m_GlobalShortcut.m_szString );
  1991.     g_DPlay.SendSkillTaskBar();
  1992.     // ½ºÅ³ µî·Ï ¿©±â¼­ ¼­¹ö·Î º¸³»¾ß ÇÔ
  1993.     return TRUE;
  1994. }
  1995.  
  1996. BOOL CWndTaskBar::OnDropIcon( LPSHORTCUT pShortcut, CPoint point )
  1997. {
  1998.     CRect rect = GetWindowRect();
  1999.     rect.DeflateRect( 3, 3);
  2000.     // ¹ÛÀ¸·Î ¹ö·ÈÀ» °æ¿ì
  2001.     if( pShortcut->m_pFromWnd == this )
  2002.     {
  2003.         LPSHORTCUT lpShortcut = (LPSHORTCUT) pShortcut->m_dwData;
  2004.         // Æ÷ÀÎÆ®°¡ Å×½ºÅ©¹Ù°¡ ¾Æ´Ñ °÷À̶ó¸é. ÀǵµÀûÀ¸·Î ¼ôÄÆÀ» Áö¿ì·Á°í ŽºÅ©¹Ù ¹Û¿¡ ³õÀº °ÍÀÓ. Áö¿ìÀÚ.
  2005.         if( GetClientRect().PtInRect( point ) == FALSE )
  2006.         {
  2007.             // ¾ÆÀÌÅÛ »èÁ¦ ¼­¹ö·Î Àü¼Û
  2008.             if( lpShortcut->m_dwData == 0 )
  2009.                 g_DPlay.SendRemoveAppletTaskBar( (BYTE)( lpShortcut->m_dwIndex ) );
  2010.             else
  2011.             if( lpShortcut->m_dwData == 1 )
  2012.                 g_DPlay.SendRemoveItemTaskBar( m_nSlotIndex, (BYTE)( lpShortcut->m_dwIndex ) );
  2013.             else
  2014.             if( lpShortcut->m_dwData == 2 )
  2015.             {
  2016.                 RemoveSkillQueue( lpShortcut->m_dwIndex );
  2017.                 return TRUE;
  2018.                 //g_DPlay.SendSkillTaskBar( );
  2019.             }
  2020.             lpShortcut->Empty();
  2021.             return TRUE;
  2022.         }
  2023.     //  return TRUE;
  2024.     }
  2025.     CWndBase* pWndFrame =  pShortcut->m_pFromWnd->GetFrameWnd();
  2026.  
  2027. #ifdef __NEW_SKILL_TREE
  2028.     if( pWndFrame && ( pWndFrame->GetWndId() != APP_INVENTORY && pWndFrame != g_WndMng.m_pWndTaskBar && pWndFrame->GetWndId() != APP_COMMUNICATION_CHAT && pWndFrame->GetWndId() != APP_SKILL4 && pWndFrame->GetWndId() != APP_MOTION && pWndFrame->GetWndId() != APP_PARTY && pWndFrame->GetWndId() != APP_LORD_SKILL) )
  2029. #else // __NEW_SKILL_TREE
  2030. #if __VER >= 10 // __CSC_VER9_1
  2031. #if __VER >= 12 // __LORD
  2032.     if( pWndFrame && ( pWndFrame->GetWndId() != APP_INVENTORY && pWndFrame != g_WndMng.m_pWndTaskBar && pWndFrame->GetWndId() != APP_COMMUNICATION_CHAT && pWndFrame->GetWndId() != APP_SKILL3 && pWndFrame->GetWndId() != APP_MOTION && pWndFrame->GetWndId() != APP_PARTY && pWndFrame->GetWndId() != APP_LORD_SKILL) )
  2033. #else
  2034.     if( pWndFrame && ( pWndFrame->GetWndId() != APP_INVENTORY && pWndFrame != g_WndMng.m_pWndTaskBar && pWndFrame->GetWndId() != APP_COMMUNICATION_CHAT && pWndFrame->GetWndId() != APP_SKILL3 && pWndFrame->GetWndId() != APP_MOTION && pWndFrame->GetWndId() != APP_PARTY ) )
  2035. #endif
  2036. #else
  2037.     if( pWndFrame && ( pWndFrame->GetWndId() != APP_INVENTORY && pWndFrame != g_WndMng.m_pWndTaskBar && pWndFrame->GetWndId() != APP_COMMUNICATION_CHAT && pWndFrame->GetWndId() != APP_SKILL1 && pWndFrame->GetWndId() != APP_MOTION && pWndFrame->GetWndId() != APP_PARTY ) )
  2038. #endif //__CSC_VER9_1
  2039. #endif // __NEW_SKILL_TREE 
  2040.     {
  2041.         SetForbid( TRUE );
  2042.         return FALSE;
  2043.     }
  2044.    
  2045.     if( pShortcut->m_dwShortcut == SHORTCUT_SKILL && pShortcut->m_dwType != 2 ) // ±Ø´Ü½ºÅ³Àº ¾Èµé¾î°¨
  2046.     {
  2047.         LPSKILL pSkill = g_pPlayer->GetSkill( 0, pShortcut->m_dwId );
  2048.         if( pSkill && (pSkill->dwLevel <= 0 || g_pPlayer->CheckSkill( pSkill->dwSkill ) == FALSE) )
  2049.         {
  2050.             SetForbid( TRUE );
  2051.             return FALSE;
  2052.         }
  2053.     }
  2054. #if __VER >= 12 // __LORD
  2055.     if( pShortcut->m_dwId == 0 && strlen( pShortcut->m_szString ) < 1 && pShortcut->m_dwShortcut != SHORTCUT_SKILLFUN && pShortcut->m_dwShortcut != SHORTCUT_LORDSKILL)
  2056. #else
  2057.     if( pShortcut->m_dwId == 0 && strlen( pShortcut->m_szString ) < 1 && pShortcut->m_dwShortcut != SHORTCUT_SKILLFUN)
  2058. #endif
  2059.     {
  2060.         SetForbid( TRUE );
  2061.         return FALSE;
  2062.     }
  2063.     // ³»ºÎ¿¡¼­ À̵¿µÇ°Å³ª, ¿ÜºÎ¿¡¼­ ³»ºÎ·Î
  2064.     if( m_nPosition == TASKBAR_TOP || m_nPosition == TASKBAR_BOTTOM )
  2065.     {
  2066.         BOOL bForbid = TRUE;
  2067.         CRect rect = RECT_APPLET;
  2068.         if( rect.PtInRect( point ) )
  2069.         {
  2070.             point.x -= rect.left;
  2071.             point.y -= rect.top;
  2072.             point.x /= ICON_SIZE;
  2073.             // ³»ºÎ¿¡¼­ À̵¿
  2074.             if( pShortcut->m_pFromWnd == this )
  2075.             {
  2076.                 LPSHORTCUT lpCurShortcut = (LPSHORTCUT) pShortcut->m_dwData;           
  2077.  
  2078.                 if( &m_aSlotApplet[ point.x ] == lpCurShortcut )
  2079.                 {
  2080.                     //SetForbid( TRUE );
  2081.                     return FALSE;
  2082.                 }
  2083.                 // ¿À¸®Áö³¯ÀÌ ¾×¼Ç½½·ÔÀÌ´Ù.
  2084.                 //if( lpCurShortcut->m_dwData == 2 )
  2085.                 //  RemoveSkillQueue( lpCurShortcut->m_dwIndex );
  2086.             }
  2087.             if( pShortcut->m_dwShortcut == SHORTCUT_SKILL )
  2088.             {
  2089.                 ItemProp* pProp;
  2090.                 if( pShortcut->m_dwType == 2 )
  2091.                     pProp =  prj.GetPartySkill( pShortcut->m_dwId );
  2092.                 else
  2093.                 {
  2094.                     LPSKILL pSkill = g_pPlayer->GetSkill( 0, pShortcut->m_dwId );
  2095.                     pProp = prj.GetSkillProp( pSkill->dwSkill );   
  2096.                 }
  2097.                 if( pProp->dwComboStyle != CT_STEP && pProp->dwComboStyle != CT_GENERAL )  
  2098.                 {
  2099.                     SetForbid( TRUE );
  2100.                     return FALSE;   // Äü½½·Ô¿¡ µî·ÏÇÏ·Á´Â ½ºÅ³ÀÌ ½ºÅܱâ¼úÀÌ ¾Æ´Ñ°Ç µî·Ï ¸øÇÔ.
  2101.                 }
  2102. /*             
  2103.                 ItemProp *pProp = prj.GetSkillProp( pShortcut->m_dwId );   
  2104.                 if( pProp->dwComboStyle != CT_STEP && pProp->dwComboStyle != CT_GENERAL )  
  2105.                 {
  2106.                     SetForbid( TRUE );
  2107.                     return FALSE;   // Äü½½·Ô¿¡ µî·ÏÇÏ·Á´Â ½ºÅ³ÀÌ ½ºÅܱâ¼úÀÌ ¾Æ´Ñ°Ç µî·Ï ¸øÇÔ.
  2108.                 }              
  2109.                 */
  2110.                 //if( pProp->dwComboStyle != CT_STEP )
  2111.                 //{
  2112.                 //  SetForbid( TRUE );
  2113.                 //  return FALSE;   // Äü½½·Ô¿¡ µî·ÏÇÏ·Á´Â ½ºÅ³ÀÌ ½ºÅܱâ¼úÀÌ ¾Æ´Ñ°Ç µî·Ï ¸øÇÔ.
  2114.                 //}
  2115.             }
  2116.  
  2117.             SetShortcut( point.x, pShortcut->m_dwShortcut, pShortcut->m_dwType, pShortcut->m_dwId, pShortcut->m_pTexture, 0 );
  2118.             bForbid = FALSE;
  2119.         }
  2120.         rect = RECT_ITEM;
  2121. //      rect.right += 32;
  2122.         if( rect.PtInRect( point ) )
  2123.         {
  2124.             point.x -= rect.left;
  2125.             point.y -= rect.top;
  2126.             point.x /= ICON_SIZE;
  2127.             // ³»ºÎ¿¡¼­ À̵¿
  2128.             if( pShortcut->m_pFromWnd == this )
  2129.             {
  2130.                 LPSHORTCUT lpCurShortcut = (LPSHORTCUT) pShortcut->m_dwData;
  2131.                 if( &m_aSlotItem[ m_nSlotIndex ][ point.x ] == lpCurShortcut )
  2132.                     return FALSE;
  2133.                 // ¿À¸®Áö³¯ÀÌ ¾×¼Ç½½·ÔÀÌ´Ù.
  2134.                 //if( lpCurShortcut->m_dwData == 2 )
  2135.                 //  RemoveSkillQueue( lpCurShortcut->m_dwIndex );
  2136.             }
  2137.             if( pShortcut->m_dwShortcut == SHORTCUT_CHAT )
  2138.             {
  2139.                 CString sChat   = m_GlobalShortcut.m_szString;
  2140.                 sChat.Replace( "--", "" );
  2141.                 sChat.Replace( "'", "" );
  2142.                 sChat.Replace( "/*", "" );
  2143.                 sChat.Replace( "*/", "" );
  2144.                 strcpy( m_GlobalShortcut.m_szString, (const char*)sChat );
  2145.             }
  2146.             else if( pShortcut->m_dwShortcut == SHORTCUT_SKILL )   
  2147.             {
  2148.                 ItemProp* pProp;
  2149.                 if( pShortcut->m_dwType == 2 )
  2150.                     pProp =  prj.GetPartySkill( pShortcut->m_dwId );
  2151.                 else
  2152.                 {
  2153.                     LPSKILL pSkill = g_pPlayer->GetSkill( 0, pShortcut->m_dwId );
  2154.                     pProp = prj.GetSkillProp( pSkill->dwSkill );   
  2155.                 }
  2156.                 if( pProp->dwComboStyle != CT_STEP && pProp->dwComboStyle != CT_GENERAL )  
  2157.                 {
  2158.                     SetForbid( TRUE );
  2159.                     return FALSE;   // Äü½½·Ô¿¡ µî·ÏÇÏ·Á´Â ½ºÅ³ÀÌ ½ºÅܱâ¼úÀÌ ¾Æ´Ñ°Ç µî·Ï ¸øÇÔ.
  2160.                 }
  2161.             }
  2162.             SetShortcut( point.x, pShortcut->m_dwShortcut, pShortcut->m_dwType, pShortcut->m_dwId, pShortcut->m_pTexture, 1 );
  2163.             bForbid = FALSE;
  2164.         }
  2165.         rect = RECT_QUEUE;
  2166.         if( rect.PtInRect( point ) )
  2167.         {
  2168.             if( pShortcut->m_dwShortcut == SHORTCUT_SKILL && pShortcut->m_dwType == 0 )     // ½ºÅ³ÀÏ°æ¿ì¸¸ µî·Ï
  2169.             {
  2170.                 point.x -= rect.left;
  2171.                 point.y -= rect.top;
  2172.                 point.x /= SKILL_SIZE;
  2173.                 // ³»ºÎ¿¡¼­ À̵¿ ; º¸ÅëÀº ¾Æ·¡ ºÎºÐ¿¡¼­ »èÁ¦¸¦ ó¸®Çϳª, ½ºÅ³ Å¥¿¡¼­ÀÇ À̵¿Àº »èÁ¦ÈÄ ¹Ù·Î Ãß°¡ÇؾßÇϱ⠶§¹®¿¡ ¿©±â¼­ »èÁ¦¸¦ ÇÑ´Ù.
  2174.                 if( pShortcut->m_pFromWnd == this )
  2175.                 {
  2176.                     LPSHORTCUT lpShortcut = (LPSHORTCUT) pShortcut->m_dwData;
  2177.                     if( lpShortcut->m_dwData == 2 )
  2178.                     {
  2179.                         RemoveSkillQueue( lpShortcut->m_dwIndex, FALSE );
  2180.                         SetSkillQueue( point.x, pShortcut->m_dwType, pShortcut->m_dwId, pShortcut->m_pTexture );// == FALSE )
  2181.                         return TRUE;
  2182.                     }
  2183.                 }
  2184.                 if( SetSkillQueue( point.x, pShortcut->m_dwType, pShortcut->m_dwId, pShortcut->m_pTexture ) == FALSE )
  2185.                     SetForbid( TRUE );
  2186.                 bForbid = FALSE;
  2187.             }
  2188.         }
  2189.         if( pShortcut->m_pFromWnd != this )
  2190.             SetForbid( bForbid );
  2191.     }
  2192.     // ¾ÈÀ¸·Î ¹ö·ÈÀ» °æ¿ì, ¶Ç´Â ¾È¿¡¼­ À̵¿ÇßÀ» °æ¿ì ¿À¸®Áö³¯ ºÎºÐ »èÁ¦  
  2193.     // ŽºÅ©¹Ù¿¡ ÀÖ´Â ¾ÆÀÌÅÛÀ» ½½·Ô ¾ÈÀÇ °ø¹é ºÎºÐ¿¡ µå·¡±×ÇßÀ» °æ¿ì
  2194.     if( pShortcut->m_pFromWnd == this )
  2195.     {
  2196.         LPSHORTCUT lpShortcut = (LPSHORTCUT) pShortcut->m_dwData;
  2197.         // ¾ÆÀÌÅÛ »èÁ¦ ¼­¹ö·Î Àü¼Û
  2198.         if( lpShortcut->m_dwData == 0 )
  2199.             g_DPlay.SendRemoveAppletTaskBar( (BYTE)( lpShortcut->m_dwIndex ) );
  2200.         else
  2201.         if( lpShortcut->m_dwData == 1 )
  2202.             g_DPlay.SendRemoveItemTaskBar( m_nSlotIndex, (BYTE)( lpShortcut->m_dwIndex ) );
  2203.         else
  2204.         if( lpShortcut->m_dwData == 2 )
  2205.         {
  2206.             RemoveSkillQueue( lpShortcut->m_dwIndex );
  2207.             //g_DPlay.SendSkillTaskBar( );
  2208.             return TRUE;
  2209.         }
  2210.         lpShortcut->Empty();
  2211.     }
  2212.     return TRUE;
  2213. }
  2214. LPSHORTCUT CWndTaskBar::Select( CPoint point )
  2215. {
  2216.     CRect rect = RECT_APPLET;
  2217.     LPSHORTCUT pShortcut = NULL;
  2218.     if( rect.PtInRect( point ) )
  2219.     {
  2220.         point.x -= rect.left;
  2221.         point.y -= rect.top;
  2222.         point.x /= ICON_SIZE;
  2223.         pShortcut = &m_aSlotApplet[ point.x ];
  2224.         if( !pShortcut->IsEmpty() )
  2225.         {
  2226.             return pShortcut;
  2227.         }
  2228.     }
  2229.     rect = RECT_ITEM;
  2230.     if( rect.PtInRect( point ) )
  2231.     {
  2232.         point.x -= rect.left;
  2233.         point.y -= rect.top;
  2234.         point.x /= ICON_SIZE;
  2235.         pShortcut = &m_paSlotItem[ point.x ];
  2236.         if( !pShortcut->IsEmpty() )
  2237.             return pShortcut;
  2238.     }
  2239.     rect = RECT_QUEUE;
  2240.     if( rect.PtInRect( point ) )
  2241.     {
  2242.         point.x -= rect.left;
  2243.         point.y -= rect.top;
  2244.         point.x /= SKILL_SIZE;
  2245.         pShortcut = &m_aSlotQueue[ point.x ];
  2246.         if( !pShortcut->IsEmpty() )
  2247.             return pShortcut;
  2248.  
  2249.     }
  2250.     rect = CRect( POINT_QUEUE_X - ICON_SIZE - 5, POINT_QUEUE_Y, (POINT_QUEUE_X - ICON_SIZE - 5) + 32, POINT_QUEUE_Y + 32);
  2251.     if( rect.PtInRect( point ) )
  2252.     {
  2253.         m_aSlotSkill.m_dwShortcut = SHORTCUT_SKILLFUN;
  2254.  
  2255.         pShortcut   = &m_aSlotSkill;
  2256.  
  2257.         if( !pShortcut->IsEmpty() )
  2258.             return pShortcut;
  2259.     }
  2260.  
  2261.     return NULL;
  2262. }
  2263. void CWndTaskBar::OnMouseMove(UINT nFlags, CPoint point)
  2264. {
  2265.     if( m_bLButtonDown && IsPush() )
  2266.     {
  2267.     //PSHORTCUT pShortcut = Select( point );
  2268.     //  if( pShortcut && pShortcut == m_pSelectShortcut && !pShortcut->IsEmpty() )
  2269.         if( m_pSelectShortcut && !m_pSelectShortcut->IsEmpty() ) //&& m_pSelectShortcut->m_dwShortcut != SHORTCUT_SKILL )
  2270.         {
  2271. #if __VER >= 12 // __LORD
  2272.             if(m_pSelectShortcut->m_dwShortcut == SHORTCUT_LORDSKILL)
  2273.             {
  2274.                 m_pSelectShortcut->m_dwId++;
  2275.             }
  2276. #endif
  2277.             memcpy( &m_GlobalShortcut, m_pSelectShortcut, sizeof( m_GlobalShortcut ) );
  2278.             m_GlobalShortcut.m_pFromWnd = this;
  2279.             m_GlobalShortcut.m_dwData = (DWORD)m_pSelectShortcut;
  2280.             m_pSelectShortcut = NULL;
  2281.         }
  2282.     }
  2283.     CWndNeuz::OnMouseMove( nFlags, point );
  2284. }
  2285.  
  2286. void CWndTaskBar::OnLButtonDown(UINT nFlags, CPoint point)
  2287. {
  2288.     if(g_WndMng.m_pWndMenu && g_WndMng.m_pWndMenu->IsVisible())
  2289.         g_WndMng.m_pWndMenu->SetVisible(FALSE);
  2290.  
  2291.     m_pSelectShortcut = Select( point );
  2292.     SetCapture();
  2293. }
  2294. void CWndTaskBar::OnLButtonUp(UINT nFlags, CPoint point)
  2295. {
  2296.     ReleaseCapture();
  2297.     LPSHORTCUT pShortcut = Select( point );
  2298.    
  2299.     if( pShortcut && pShortcut == m_pSelectShortcut && !pShortcut->IsEmpty() && pShortcut->m_dwData != 2 )
  2300.     {
  2301.         g_WndMng.ObjectExecutor( pShortcut );
  2302.     }
  2303.  
  2304. }
  2305.  
  2306. BOOL CWndTaskBar::OnEraseBkgnd(C2DRender* p2DRender)
  2307. {
  2308.     return TRUE;
  2309. }
  2310. void CWndTaskBar::PaintFrame( C2DRender* p2DRender )
  2311. {
  2312.     CRect rect = GetWindowRect();
  2313.     //m_pTheme->RenderWndTaskBar( p2DRender, &rect );
  2314.     CWndBase::PaintFrame( p2DRender );
  2315. }
  2316.  
  2317. LPSKILL CWndTaskBar::GetCurrentSkillQueue()
  2318. {
  2319.     LPSKILL pSkill = NULL;
  2320.     LPSHORTCUT pShortcut = &m_aSlotQueue[ m_nUsedSkillQueue ];
  2321.  
  2322.     if( pShortcut && pShortcut->IsEmpty() == FALSE )
  2323.         pSkill = g_pPlayer->GetSkill( 0, pShortcut->m_dwId );
  2324.  
  2325.     return pSkill;
  2326. }
  2327. //
  2328. // ½ºÅ³Å¥ ½ÇÇà °í!
  2329. //
  2330.  
  2331. #ifdef __NEW_TASKBAR_V19
  2332. BOOL CWndTaskBar::UseSkillQueue1(CCtrl* pTargetObj)
  2333. {
  2334.     if (m_nExecute == 2)    return FALSE;   // ÀÌ¹Ì ½ºÅ³¹Ù ½ÇÇàÁßÀ̶ó¸é ´Ù½Ã µé¾î¿ÀÁö ¾ÊÀ½.
  2335.     if (g_pPlayer->m_pActMover->IsActAttack())          return FALSE;       // ÀÌ¹Ì °ø°Ýµ¿ÀÛÀÌ ÀÌ·ïÁö°í ÀÖÀ¸¸é µé¾î¿ÀÁö ¸¶¶ó.
  2336.     if (g_pPlayer->m_pActMover->IsActJump())            return FALSE;       // Á¡ÇÁÁß¿£ ½ºÅ³»ç¿ë ¾ÈµÊ.
  2337.     if (g_pPlayer->m_pActMover->IsFly())                return FALSE;
  2338. #ifdef __SYS_MOUNT
  2339.     if(g_pPlayer->IsMount())                return FALSE;
  2340. #endif // __SYS_MOUNT
  2341.     if (pTargetObj && pTargetObj->GetType() != OT_MOVER)    return FALSE;
  2342.  
  2343.     if (pTargetObj)
  2344.     {
  2345.         if (pTargetObj->GetType() == OT_OBJ)
  2346.             m_idTarget = NULL_ID;
  2347.         else
  2348.             m_idTarget = ((CCtrl*)pTargetObj)->GetId();
  2349.     }
  2350.     else
  2351.         m_idTarget = NULL_ID;
  2352.     CMover* pTargetMover = (CMover*)pTargetObj;
  2353.     if (IsInvalidObj(pTargetMover))
  2354.         m_idTarget = NULL_ID;
  2355.  
  2356.     LPSHORTCUT pShortcut = &m_aSlotQueue[m_nUsedSkillQueue];
  2357.     if (pShortcut->IsEmpty() == FALSE)
  2358.     {
  2359.         LPSKILL pSkill = g_pPlayer->GetSkill(0, pShortcut->m_dwId);
  2360.         if (pSkill == NULL)
  2361.             return FALSE;
  2362.  
  2363.         if (g_pPlayer->IsBullet(pSkill->GetProp()) == FALSE)
  2364.             return FALSE;
  2365.  
  2366.         m_nExecute = 1;
  2367.  
  2368.         if (g_pPlayer->CMD_SetUseSkill(m_idTarget, pShortcut->m_dwId, SUT_QUEUESTART) == 0)     // ½ÇÇàÇÒ ¸í·ÉÀ» ¼ÂÆÃ. À̵¿ + ½ºÅ³»ç¿ëÀÌ ÇÕÃÄÁø ¸í·É.
  2369.         {
  2370.             OnCancelSkill();
  2371.         }
  2372.         else
  2373.         {
  2374.             ItemProp* pItemProp = g_pPlayer->GetActiveHandItemProp();
  2375.             if (pItemProp)
  2376.             {
  2377.                 if (pItemProp->dwItemKind3 != IK3_STAFF && pItemProp->dwItemKind3 != IK3_CHEERSTICK)
  2378.                 {
  2379.                     g_WndMng.m_pWndWorld->SetNextSkill(NEXTSKILL_NONE);
  2380.                 }
  2381.             }
  2382.         }
  2383.         return TRUE;
  2384.     }
  2385.     else
  2386.         g_WndMng.m_pWndWorld->SetNextSkill(NEXTSKILL_NONE);
  2387.  
  2388.     return FALSE;
  2389. }
  2390.  
  2391. BOOL CWndTaskBar::UseSkillQueue(CCtrl * pTargetObj)
  2392. {
  2393.     CWndNewSkillSlot* m_SkillSL = (CWndNewSkillSlot*)g_WndMng.GetWndBase(APP_SLOT);
  2394.     if (UseSkillQueue1(pTargetObj))
  2395.     {
  2396.         if ((g_WndMng.m_pWndTaskBar->m_nUsedSkillQueue == 0) && (m_SkillSL->m_nActionSlot > 0))
  2397.         {
  2398.             g_WndMng.m_pWndWorld->m_dwNextSkill = NEXTSKILL_ACTIONSLOT;
  2399.         }
  2400.     }
  2401.     return FALSE;
  2402. }
  2403. #else // __NEW_TASKBAR_V19
  2404. BOOL CWndTaskBar::UseSkillQueue(CCtrl * pTargetObj)
  2405. {
  2406.     if (m_nExecute == 2)    return FALSE;   // ÀÌ¹Ì ½ºÅ³¹Ù ½ÇÇàÁßÀ̶ó¸é ´Ù½Ã µé¾î¿ÀÁö ¾ÊÀ½.
  2407.     if (g_pPlayer->m_pActMover->IsActAttack())          return FALSE;       // ÀÌ¹Ì °ø°Ýµ¿ÀÛÀÌ ÀÌ·ïÁö°í ÀÖÀ¸¸é µé¾î¿ÀÁö ¸¶¶ó.
  2408.     if (g_pPlayer->m_pActMover->IsActJump())            return FALSE;       // Á¡ÇÁÁß¿£ ½ºÅ³»ç¿ë ¾ÈµÊ.
  2409. //  if( g_pPlayer->m_pActMover->IsActDamage() )         return FALSE;       // µ¥¹ÌÁö ¸ð¼ÇÁß¿£ ½ºÅ³»ç¿ë ¾ÈµÊ.
  2410.     if (g_pPlayer->m_pActMover->IsFly())                return FALSE;
  2411. #ifdef __SYS_MOUNT
  2412.     if(g_pPlayer->IsMount())                return FALSE;
  2413. #endif // __SYS_MOUNT
  2414.     //  if( g_pPlayer->m_dwFlag & MVRF_SKILL )      return FALSE;               // ÀÌ¹Ì ½ºÅ³ »ç¿ëÁßÀÌ¸é »ç¿ë ¾ÈµÊ.
  2415.     if (pTargetObj && pTargetObj->GetType() != OT_MOVER)    return FALSE;
  2416.  
  2417.     // ¿ÀºêÁ§Æ®¿¡ ¿À¸¥ÂÊ Å¬¸¯ ÇßÀ»¶§
  2418.     if (pTargetObj)
  2419.     {
  2420.         if (pTargetObj->GetType() == OT_OBJ)        // ¿ÀºêÁ§Æ®°¡ OT_OBJ(¹è°æ)ÀÌ¸é ¼±Åà ¾ÈÇÑ°É·Î °£ÁÖÇÔ.
  2421.             m_idTarget = NULL_ID;
  2422.         else
  2423.             m_idTarget = ((CCtrl*)pTargetObj)->GetId();     // OT_OBJ°¡ ¾Æ´Ï¸é ¾ÆÀ̵𸦠°¡Á®¿È
  2424.     }
  2425.     else
  2426.         m_idTarget = NULL_ID;       // Ÿ°ÙÀ» ¼±ÅÃÇÏÁö ¾Ê¾ÒÀ¸¸é NULL_ID
  2427.     CMover* pTargetMover = (CMover*)pTargetObj;     // prj.GetMover( m_idTarget );
  2428.     if (IsInvalidObj(pTargetMover))     // °Å½Ã±âÇÑ Å¸°ÙÀ̾úÀ¸¸é Ÿ°Ù ¾ÈÇÑ°É·Î °£ÁÖ.
  2429.         m_idTarget = NULL_ID;
  2430.  
  2431.  
  2432.     m_nUsedSkillQueue = 0;
  2433.  
  2434.     LPSHORTCUT pShortcut = &m_aSlotQueue[m_nUsedSkillQueue];
  2435.  
  2436.     if (pShortcut->IsEmpty() == FALSE)
  2437.     {
  2438.         LPSKILL pSkill = g_pPlayer->GetSkill(0, pShortcut->m_dwId);
  2439.         if (pSkill == NULL) return FALSE;
  2440.  
  2441.         if (g_pPlayer->IsBullet(pSkill->GetProp()) == FALSE)
  2442.             return FALSE;
  2443.  
  2444.         m_nExecute = 1;     // 1 ½ºÅ³¹Ù»ç¿ë ½ÇÇà´ë±âÁß
  2445.         // ¿©±â¿£ m_idTargetÀÌ NULL_ID°¡ µé¾î°¥¼öµµ ÀÖ´Ù.
  2446.         if (g_pPlayer->CMD_SetUseSkill(m_idTarget, pShortcut->m_dwId, SUT_QUEUESTART) == 0)     // ½ÇÇàÇÒ ¸í·ÉÀ» ¼ÂÆÃ. À̵¿ + ½ºÅ³»ç¿ëÀÌ ÇÕÃÄÁø ¸í·É.
  2447.         {
  2448.             OnCancelSkill();    // ù½ºÅ³ºÎÅÍ ½ÇÆÐÇß´Ù¸é ½ºÅ³Å¥ »ç¿ëÀ» Ãë¼Ò.
  2449.         } else
  2450.         {   // success
  2451.             // 1´Ü°è ¾µ¶§´Â ap°¡ ¼Ò¸ðµÇÁö ¾Ê´Â´Ù.
  2452.             ItemProp* pItemProp = g_pPlayer->GetActiveHandItemProp();
  2453.             if (pItemProp)
  2454.             {   // ¼Õ¿¡ µé°í ÀÖ´Â°Ô ½ºÅÂÇÁ³ª Ä¡¾î½ºÆ½ÀÌ ¾Æ´Ò¶§¸¸ NEXTSKILL_NONE·Î º¯°æ. ¾ÈÇÏ¸é ½ºÅ³ÀÌ À̾îÁöÁö ¾ÊÀ½.
  2455.                 if (pItemProp->dwItemKind3 != IK3_STAFF && pItemProp->dwItemKind3 != IK3_CHEERSTICK)
  2456.                     g_WndMng.m_pWndWorld->SetNextSkill(NEXTSKILL_NONE); // 2006/06/12 ½ºÅ³Å¥¸¦ ½ÇÇàÇßÀ¸´Ï ½ºÅ³Å¥»ç¿ë ¸í·É Ŭ¸®¾î.-xuzhu-
  2457.             }
  2458.  
  2459.         }
  2460.         return TRUE;
  2461.     }
  2462.     else
  2463.         g_WndMng.m_pWndWorld->SetNextSkill(NEXTSKILL_NONE); // ¾×¼Ç½ºÅ³ÀÌ ºñ¾îÀÖÀ¸¸é Ãë¼Ò.
  2464.  
  2465.     return FALSE;
  2466. }
  2467. #endif // __NEW_TASKBAR_V19
  2468.  
  2469. BOOL CWndTaskBar::Process( void )
  2470. {
  2471.     // ÅøÆÁ °è¼Ó °»½ÅÇؾßÇϴ°͵éÀº ¿©±â¼­...
  2472.     CPoint point = GetMousePoint();
  2473. #ifdef __SECURITY_FIXES
  2474.     CRect wndRect = GetWindowRect();
  2475.     if( wndRect.PtInRect( point ) )
  2476. #endif
  2477.     {
  2478.         CRect rect = CRect( POINT_APPLET_X, POINT_APPLET_Y, POINT_APPLET_X + ICON_SIZE, POINT_APPLET_Y + ICON_SIZE );
  2479.         for( int i = 0; i < m_nMaxSlotApplet; i++ )
  2480.         {
  2481.             LPSHORTCUT lpShortcut = &m_aSlotApplet[ i ] ;
  2482.             if( !lpShortcut->IsEmpty() && rect.PtInRect( point) )
  2483.             {
  2484.                 MotionProp* pMotionProp = prj.GetMotionProp( lpShortcut->m_dwId );
  2485.                
  2486.                 if( IsShortcut( lpShortcut, SHORTCUT_MOTION, MOT_BASE_CHEER ) )
  2487.                     PutTooTip( lpShortcut, point, &rect );
  2488.             }
  2489.             rect += CPoint( ICON_SIZE, 0 );
  2490.         }
  2491.        
  2492.         rect = CRect( POINT_ITEM_X, POINT_ITEM_Y, POINT_ITEM_X + ICON_SIZE, POINT_ITEM_Y + ICON_SIZE );
  2493.         for( int i = 0; i < MAX_SLOT_ITEM; i++ )
  2494.         {
  2495.             LPSHORTCUT lpShortcut = &m_paSlotItem[ i ] ;
  2496.             if( !lpShortcut->IsEmpty() && rect.PtInRect( point)  )
  2497.             {
  2498.                 if( IsShortcut( lpShortcut, SHORTCUT_MOTION, MOT_BASE_CHEER ) )
  2499.                     PutTooTip( lpShortcut, point,&rect );
  2500.             }
  2501.             rect += CPoint( ICON_SIZE, 0 );
  2502.         }
  2503.         rect = CRect( POINT_QUEUE_X, POINT_QUEUE_Y, POINT_QUEUE_X + SKILL_SIZE, POINT_QUEUE_Y + SKILL_SIZE );
  2504.         for( int i = 0; i < MAX_SLOT_QUEUE; i++ )
  2505.         {
  2506.             LPSHORTCUT lpShortcut = &m_aSlotQueue[ i ] ;
  2507.             if( !lpShortcut->IsEmpty() && rect.PtInRect( point)  )
  2508.             {
  2509.                 if( IsShortcut( lpShortcut, SHORTCUT_MOTION, MOT_BASE_CHEER ) )
  2510.                     PutTooTip( lpShortcut, point,&rect );
  2511.             }
  2512.             rect += CPoint( SKILL_SIZE, 0 );
  2513.         }
  2514.     }
  2515.    
  2516.     if( m_nExecute )
  2517.     {
  2518.         if( m_idTarget != NULL_ID )     // m_idTargetÀÌ NULL_IDÀΰæ¿ì´Â ÀÚ±â Àڽſ¡°Ô ¾´°æ¿ì±â¶«¿¡ ĵ½½½ÃÄѼ± ¾ÈµÈ´Ù.
  2519.         {
  2520.             CMover* pObj = prj.GetMover( m_idTarget );
  2521.             if( IsInvalidObj(pObj) )                        // ½ÇÇàÁß¿¡ ´ë»óÀÌ ¾ø¾îÁ³´Ù¸é ½ºÅ³»ç¿ëÀ» ¸ØÃã.
  2522.                 OnCancelSkill();
  2523.         }
  2524. //      if( pObj && pObj->IsDie() )                     // ½ÇÇàÁß ´ë»óÀÌ Á×¾úÀ¸¸é ½ºÅ³¹Ù ½ÇÇà ¸ØÃã.
  2525. //          OnCancelSkill();
  2526.  
  2527. //      if( (g_pPlayer->m_dwFlag & MVRF_SKILL) == 0 )
  2528. //          OnCancelSkill();                                                    // ½ºÅ³»ç¿ë ÇØÁ¦
  2529.     }
  2530.     // µå·¡±× ÇÏÀ̶óÀÌÆ® ½½·Ô ¾ËÆÄ Ã³¸®
  2531.     if( m_GlobalShortcut.IsEmpty() == FALSE )
  2532.     {
  2533.         m_dwHighAlpha += 10;
  2534.         if( m_dwHighAlpha >= 256 )
  2535.             m_dwHighAlpha = 0;
  2536.     }
  2537.     // µå·¡±×Áß¿¡´Â ÇÖÅ°¸¦ »ç¿ëÇÒ ¼ö ¾øÀ½
  2538.     else
  2539.     {
  2540. #ifdef __NEW_TASKBAR_V19
  2541.         if (g_bKeyTable[VK_HOME])
  2542.         {
  2543.             g_bKeyTable[VK_HOME] = FALSE;
  2544.             g_WndMng.ScreenCapture();
  2545.         }
  2546. #endif // __NEW_TASKBAR_V19
  2547.         ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  2548.         // ÇÖÅ° ó¸®
  2549.         ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  2550.         if( g_bKeyTable[ VK_RETURN ] )
  2551.         {
  2552.             g_bKeyTable[ VK_RETURN ] = FALSE;
  2553.             CWndBase* pWndBase = GetWndBase( APP_COMMUNICATION_CHAT );
  2554.             if( pWndBase == NULL )
  2555.             {
  2556.                 g_WndMng.ObjectExecutor( SHORTCUT_APPLET, APP_COMMUNICATION_CHAT );
  2557.                 CWndChat* pWndChat = (CWndChat*)GetWndBase( APP_COMMUNICATION_CHAT );
  2558.                 if( pWndChat != NULL )
  2559.                 {
  2560.                     pWndChat->m_wndEdit.SetFocus();
  2561.                 }
  2562.             }
  2563.         }
  2564.         else
  2565.         {
  2566.             AppletFunc* pApplet;
  2567.             DWORD dwIdApplet;
  2568.             POSITION pos = g_WndMng.m_mapAppletFunc.GetStartPosition();
  2569.             BOOL bKey = FALSE;
  2570.             while( pos )
  2571.             {
  2572.                 g_WndMng.m_mapAppletFunc.GetNextAssoc( pos, dwIdApplet, (void*&)pApplet );
  2573.                
  2574. #ifdef __XKEYEDGE
  2575.                 bKey = g_bKeyTable[ pApplet->m_cHotkey ];
  2576.                 if( bKey && !g_bKeyTable2[ pApplet->m_cHotkey ] )
  2577. #else
  2578.                 if( g_bKeyTable[ pApplet->m_cHotkey ] )         //gmpbigsun: ÇÏ¿ì¡ YÅ°( °¡±¸Ã¢ ) °Ë»ç
  2579. #endif
  2580.                 {
  2581.                     g_Error_State.m_ch = pApplet->m_cHotkey;
  2582.                     g_Error_State.m_bIsShowWnd = TRUE;
  2583.                     g_Error_State.m_dwWndId = pApplet->m_dwIdApplet;
  2584.                    
  2585.                     g_WndMng.ObjectExecutor( SHORTCUT_APPLET, pApplet->m_dwIdApplet );
  2586. #ifndef __XKEYEDGE                 
  2587.                     g_bKeyTable[ pApplet->m_cHotkey ] = FALSE;
  2588. #endif                 
  2589.                 }          
  2590. #ifdef __XKEYEDGE
  2591.                 g_bKeyTable2[ pApplet->m_cHotkey ] = bKey;
  2592.                 bKey = FALSE;
  2593. #endif
  2594.  
  2595.             }
  2596.  
  2597. #ifndef __NEW_TASKBAR_V19
  2598.             CWndRegVend* pWndRegVend = (CWndRegVend*)g_WndMng.GetWndBase(APP_VENDOREX_SELL);
  2599.             CWndRegVend* pWndVendorBuy = (CWndRegVend*)g_WndMng.GetWndBase(APP_VENDOREX_BUY);
  2600.  
  2601.             if (!pWndRegVend || !pWndVendorBuy)
  2602.             {
  2603.                 DWORD* dwHotkey;
  2604. #ifdef __Y_INTERFACE_VER3              
  2605.                 DWORD dwHotkey1[10] = { '1', '2', '3', '4', '5', '6', '7', '8', '9', '0' };
  2606.                 DWORD dwHotkey2[10] = { 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79 };
  2607.  
  2608.                 if (g_Option.m_nInterface == 2)
  2609.                     dwHotkey = dwHotkey1;
  2610.                 else
  2611.                     dwHotkey = dwHotkey2;
  2612. #else //__Y_INTERFACE_VER3
  2613.                 DWORD dwHotkey1[10] = { 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79 };
  2614.                 dwHotkey = dwHotkey1;
  2615. #endif //__Y_INTERFACE_VER3
  2616.  
  2617.                 for (int i = 0; i < 10; i++)
  2618.                 {
  2619.                     if (g_bKeyTable[dwHotkey[i]] && g_bSlotSwitchAboutEquipItem[i] == FALSE)
  2620.                     {
  2621.                         LPSHORTCUT lpShortcut = &m_paSlotItem[i];
  2622.                         if (lpShortcut->m_dwShortcut == SHORTCUT_ITEM)
  2623.                         {
  2624.                             CItemBase* pItemBase = g_pPlayer->GetItemId(lpShortcut->m_dwId);
  2625.                             if (pItemBase)
  2626.                             {
  2627.                                 int nPart = pItemBase->GetProp()->dwParts;
  2628.                                 if (nPart != -1)
  2629.                                     g_bSlotSwitchAboutEquipItem[i] = TRUE;
  2630.                             }
  2631.                         }
  2632.                         g_WndMng.ObjectExecutor(lpShortcut);
  2633.                         g_bKeyTable[dwHotkey[i]] = 0;
  2634.                     }
  2635.                 }
  2636.             }
  2637. #endif // __NEW_TASKBAR_V19
  2638.         }
  2639.     }
  2640.  
  2641.     UpdateItem();
  2642.     return CWndBase::Process();
  2643. }
  2644.  
  2645. // ½ºÅ³¹Ù »ç¿ëÀ» Ãë¼Ò(Áß´Ü)ÇÔ.
  2646. void CWndTaskBar::OnCancelSkill( void )
  2647. {
  2648.     if( g_pPlayer->m_dwReqFlag & REQ_USESKILL )
  2649.         return;
  2650.  
  2651. #ifdef __NEW_TASKBAR_V19
  2652.     int tempoespera = 0;
  2653.     bool podeusar;
  2654.     tempoespera--;
  2655.     podeusar = false;
  2656. #endif // __NEW_TASKBAR_V19
  2657.     m_nExecute = 0;
  2658.     m_nUsedSkillQueue = 0;
  2659.     g_pPlayer->ClearDestObj();
  2660.     g_WndMng.m_pWndWorld->SetNextSkill( NEXTSKILL_NONE );
  2661. }
  2662.  
  2663. // ½ºÅ³ µ¿ÀÛ ³¡³µÀ»¶§ È£Ãâ.
  2664. void CWndTaskBar::OnEndSkill( void )
  2665. {
  2666. }
  2667.  
  2668.  
  2669.  
  2670. /////////////////////////////////////////////////////////////////////////////////////////////////////////
  2671. /////////////////////////////////////////////////////////////////////////////////////////////////////////
  2672. //
  2673. // ŽºÅ© ¹ÙÀÇ ¸Å´º ó¸® À©µµ  
  2674. //
  2675. /////////////////////////////////////////////////////////////////////////////////////////////////////////
  2676. /////////////////////////////////////////////////////////////////////////////////////////////////////////
  2677.  
  2678. CWndTaskMenu::CWndTaskMenu()
  2679. {
  2680.     m_pMenu1 = NULL;
  2681.     m_pMenu2 = NULL;
  2682.     m_pMenu3 = NULL;
  2683.     m_pMenu4 = NULL;
  2684.     m_pMenu5 = NULL;
  2685.     m_pMenu6 = NULL;
  2686.     m_pMenu7 = NULL;
  2687. }
  2688.  
  2689. CWndTaskMenu::~CWndTaskMenu()
  2690. {
  2691.     SAFE_DELETE( m_pMenu1 );
  2692.     SAFE_DELETE( m_pMenu2 );
  2693.     SAFE_DELETE( m_pMenu3 );
  2694.     SAFE_DELETE( m_pMenu4 );
  2695.     SAFE_DELETE( m_pMenu5 );
  2696.     SAFE_DELETE( m_pMenu6 );
  2697.     SAFE_DELETE( m_pMenu7 );
  2698. }
  2699. void CWndTaskMenu::OnDraw(C2DRender* p2DRender)
  2700. {
  2701.     return;
  2702.     p2DRender->TextOut( 10, 20,  _T( "MASQUERADE" ),  D3DCOLOR_ARGB( 255, 250, 250, 250 ) );
  2703.  
  2704.     CRect rect = GetWindowRect();
  2705.     // Å׵θ® ¹Ú½º
  2706.     DWORD dwColor1t = D3DCOLOR_ARGB( 055,  91, 104, 205 );
  2707.     DWORD dwColor2t = D3DCOLOR_ARGB( 055, 116, 128, 220 );
  2708.     DWORD dwColor4t = D3DCOLOR_ARGB( 055, 143, 173, 245 );
  2709.     DWORD dwColor1b = D3DCOLOR_ARGB( 055,  41, 104, 155 );
  2710.     DWORD dwColor2b = D3DCOLOR_ARGB( 055,  66,  78, 170 );
  2711.     DWORD dwColor4b = D3DCOLOR_ARGB( 055, 143, 173, 245 );
  2712.  
  2713.     DWORD dwColor3t = D3DCOLOR_ARGB( 155, 250, 250, 250 );
  2714.     DWORD dwColor3b = D3DCOLOR_ARGB(  55,  00,  00,  00 );
  2715.    
  2716.     //p2DRender->RenderRoundRect( rect, dwColor1t, dwColor1t, dwColor1b, dwColor1b );
  2717.     rect.DeflateRect(1,1);
  2718.     //p2DRender->RenderRoundRect( rect, dwColor2t, dwColor2t, dwColor2b, dwColor2b );
  2719. //  rect.DeflateRect(1,1);
  2720.  
  2721.     CRect rect1 = rect; rect1.bottom = rect1.top + 40;
  2722.     CRect rect2 = rect; rect2.top    = rect2.top + 40;
  2723.  
  2724.     p2DRender->RenderFillRect( rect1, dwColor3t, dwColor3t, dwColor3b, dwColor3b );
  2725.     p2DRender->RenderFillRect( rect2, dwColor3b, dwColor3b, dwColor4b, dwColor4b );
  2726.  
  2727. //  p2DRender->RenderLine( CPoint( 10, 5 * 22 + 54 ), CPoint( 140, 5 * 22 + 54 ), dwColor1t );
  2728.     // client ¿µ¿ª Ä¥Çϱâ
  2729.     //OnEraseBkgnd(p2DRender);
  2730.     //.OffsetRect(-rect.TopLeft());
  2731.     //p2DRender->PaintRect( rect,MKHIGHRGB(255>>3,255>>3,255>>3) );
  2732.     //p2DRender->TextOut( 5,20,"HP : 100 / 100", dwColor1t );
  2733.     //p2DRender->TextOut( 5,35,"MP : 100 / 100", dwColor1t );
  2734. }
  2735. BOOL CWndTaskMenu::Process()
  2736. {
  2737.     if( CWndBase::m_GlobalShortcut.m_dwShortcut != SHORTCUT_NONE )
  2738.         return CWndBase::Process();
  2739.  
  2740.     if( IsVisible() == FALSE )
  2741.         return CWndBase::Process();
  2742.  
  2743.     for( int i = 0; i < m_awndMenuItem.GetSize(); i++ )
  2744.     {
  2745.         BOOL bHighLight = FALSE;
  2746.         CWndButton* pWndButton = (CWndButton*)m_awndMenuItem.GetAt( i );
  2747.         if( pWndButton->GetClientRect( TRUE ).PtInRect( m_ptMouse ) )
  2748.         {
  2749.             // ¸ðµÎ ¼û±â±â
  2750.             if( pWndButton->m_pWndMenu == NULL || pWndButton->m_pWndMenu->IsVisible( ) == FALSE )
  2751.             {
  2752.                 for( int i2 = 0; i2 < m_awndMenuItem.GetSize(); i2++)
  2753.                 {
  2754.                     if( ((CWndButton*)m_awndMenuItem.GetAt( i2 ) )->m_pWndMenu )
  2755.                         ((CWndButton*)m_awndMenuItem.GetAt( i2 ) )->m_pWndMenu->SetVisibleSub( FALSE );
  2756.                 }
  2757.             }
  2758.             // »õ ¸Å´º¸¦ º¸ÀÌ°í Æ÷Ä¿½º ÁÖ±â
  2759.             if( pWndButton->m_pWndMenu )
  2760.             {
  2761.                 if( pWndButton->m_pWndMenu->IsVisible() == FALSE )
  2762.                 {
  2763.                     CRect rect = pWndButton->GetScreenRect();
  2764.                     pWndButton->m_pWndMenu->Move( CPoint( rect.right , rect.top ) );
  2765.                 }
  2766.                 // ¸Þ´ºÀÇ ÁÂÇ¥ ÁöÁ¤
  2767.                 CRect rcButton = pWndButton->GetScreenRect();
  2768.                 pWndButton->m_pWndMenu->Move( CPoint( rcButton.right, rcButton.top ) );
  2769.                 // ±×·±µ¥ ±× ¸Þ´º°¡ È­¸éÀ» ¹þ¾î³µ´Ù¸é À§Ä¡¸¦ ¼öÁ¤
  2770.                 CRect rcMenu = pWndButton->m_pWndMenu->GetScreenRect();
  2771.                 CRect rcLayout = m_pWndRoot->GetLayoutRect();
  2772.                 CPoint pt = rcMenu.TopLeft();
  2773.                 if( rcMenu.right > rcLayout.right )
  2774.                 {
  2775.                     pt.x = rcButton.left - rcMenu.Width();
  2776.                     //pWndButton->m_pWndMenu->Move( CPoint( rcButton.left - rcMenu.Width(), rcButton.top ) );
  2777.                 }
  2778.                 if( rcMenu.bottom > rcLayout.bottom )
  2779.                 {
  2780.                     pt.y -= rcMenu.bottom - rcLayout.bottom;
  2781.                     //pWndButton->m_pWndMenu->Move( CPoint( rcButton.left - rcMenu.Width(), rcButton.top ) );
  2782.                 }
  2783.                 pWndButton->m_pWndMenu->Move( pt );
  2784.                 pWndButton->m_pWndMenu->SetVisible( TRUE );
  2785.                 pWndButton->m_pWndMenu->SetFocus();
  2786.             }
  2787.         }
  2788.     }
  2789.     return CWndBase::Process();
  2790. }
  2791. void CWndTaskMenu::SetTexture( CWndButton* pWndButton )
  2792. {
  2793.     pWndButton->SetTexture( g_Neuz.m_pd3dDevice, MakePath( DIR_ICON, g_WndMng.GetAppletFunc( pWndButton->GetWndId() )->m_pszIconName ) );
  2794. }
  2795.  
  2796. void CWndTaskMenu::OnInitialUpdate()
  2797. {
  2798.     CWndMenu::OnInitialUpdate();
  2799.  
  2800.     CWndButton* pWndButton;
  2801.     // 0 ~ 9¹ø
  2802.     if( g_pPlayer->IsAuthHigher( AUTH_GAMEMASTER ) )
  2803.     {
  2804.         pWndButton = AppendMenu( this, 0, APP_DEBUGINFO     , GETTEXT( TID_APP_DEBUGINFO     ) );
  2805.     }
  2806.  
  2807.     pWndButton = AppendMenu( this, 0, APP_STATUS1    , GETTEXT( TID_APP_STATUS        ) );
  2808.     pWndButton = AppendMenu( this, 0, APP_NAVIGATOR , GETTEXT( TID_APP_NAVIGATOR     ) );
  2809. #if __VER >= 13 // __RENEW_CHARINFO
  2810.     pWndButton = AppendMenu( this, 0, APP_CHARACTER3 , GETTEXT( TID_APP_CHARACTER     ) );
  2811. #elif __VER >= 9 // __CSC_VER9_2
  2812.     pWndButton = AppendMenu( this, 0, APP_CHARACTER2 , GETTEXT( TID_APP_CHARACTER     ) );
  2813. #else //__CSC_VER9_2
  2814.     pWndButton = AppendMenu( this, 0, APP_CHARACTER , GETTEXT( TID_APP_CHARACTER     ) );
  2815. #endif //__CSC_VER9_2
  2816.     pWndButton = AppendMenu( this, 0, APP_INVENTORY , GETTEXT( TID_APP_INVENTORY     ) );
  2817. #if __VER >= 11 // __SYS_POCKET
  2818. #ifndef __TMP_POCKET
  2819.     pWndButton = AppendMenu( this, 0, APP_BAG_EX , GETTEXT( TID_APP_BAG_EX     ) );
  2820. #endif
  2821. #if __VER >= 13 // __HOUSING
  2822.     pWndButton = AppendMenu( this, 0, APP_HOUSING, GETTEXT(TID_GAME_HOUSING_BOX));
  2823. #endif // __HOUSING
  2824. #endif // __SYS_POCKET
  2825. #if __VER >= 8 // __S8_VENDOR_REVISION
  2826.     pWndButton = AppendMenu( this, 0, APP_VENDOR_REVISION , GETTEXT( TID_APP_VENDOR     ) );
  2827. #else // __VER >= 8 // __S8_VENDOR_REVISION
  2828.     pWndButton = AppendMenu( this, 0, APP_VENDOREX , GETTEXT( TID_APP_VENDOR     ) );
  2829. #endif // __VER >= 8 // __S8_VENDOR_REVISION
  2830. #if __VER >= 10 // __CSC_VER9_1
  2831. #ifdef __NEW_SKILL_TREE
  2832.     pWndButton = AppendMenu( this, 0, APP_SKILL4     , GETTEXT( TID_APP_SKILL         ) );
  2833. #else // __NEW_SKILL_TREE
  2834.     pWndButton = AppendMenu( this, 0, APP_SKILL3     , GETTEXT( TID_APP_SKILL         ) );
  2835. #endif // __NEW_SKILL_TREE
  2836. #else
  2837.     pWndButton = AppendMenu( this, 0, APP_SKILL1     , GETTEXT( TID_APP_SKILL         ) );
  2838. #endif //__CSC_VER9_1
  2839. #if __VER >= 15 // __IMPROVE_QUEST_INTERFACE
  2840.     pWndButton = AppendMenu( this, 0, APP_QUEST_EX_LIST     , GETTEXT( TID_APP_QUEST         ) );
  2841. #else // __IMPROVE_QUEST_INTERFACE
  2842.     pWndButton = AppendMenu( this, 0, APP_QUEST     , GETTEXT( TID_APP_QUEST         ) );
  2843. #endif // __IMPROVE_QUEST_INTERFACE
  2844.     pWndButton = AppendMenu( this, 0, APP_MOTION   , GETTEXT( TID_APP_MOTION       ) );
  2845.  
  2846. #if __VER >= 9  // __INSERT_MAP
  2847. #ifdef __IMPROVE_MAP_SYSTEM
  2848.     pWndButton = AppendMenu( this, 0, APP_MAP_EX, GETTEXT( TID_APP_MAP ) );
  2849. #else // __IMPROVE_MAP_SYSTEM
  2850.     pWndButton = AppendMenu( this, 0, APP_MAP, GETTEXT( TID_APP_MAP));//GETTEXT( TID_APP_MAP));
  2851. #endif // __IMPROVE_MAP_SYSTEM
  2852. #endif
  2853.     CWndButton* pWndButton7 = NULL;
  2854.     pWndButton7 = AppendMenu( this, 0, 0 , GETTEXT( TID_APP_COMMITEM  ) ); pWndButton7->SetTexture( g_Neuz.m_pd3dDevice, MakePath( DIR_ICON, _T( "icon_Folder.dds" ) ) );
  2855.  
  2856.     CWndButton* pWndButton1 = AppendMenu( this, 0, 0 , GETTEXT( TID_APP_COMMUNICATION ) ); pWndButton1->SetTexture( g_Neuz.m_pd3dDevice, MakePath( DIR_ICON, _T( "icon_Folder.dds" ) ) );
  2857.     CWndButton* pWndButton2 = AppendMenu( this, 0, 0 , GETTEXT( TID_APP_COMMUNITY     ) ); pWndButton2->SetTexture( g_Neuz.m_pd3dDevice, MakePath( DIR_ICON, _T( "icon_Folder.dds" ) ) );
  2858. //  CWndButton* pWndButton3 = AppendMenu( this, 0, 0 , GETTEXT( TID_APP_FIND          ) ); pWndButton3->SetTexture( g_Neuz.m_pd3dDevice, MakePath( DIR_ICON, _T( "icon_Folder.dds" ) ) );
  2859.     CWndButton* pWndButton5 = AppendMenu( this, 0, 0 , GETTEXT( TID_APP_INFOMATION    ) ); pWndButton5->SetTexture( g_Neuz.m_pd3dDevice, MakePath( DIR_ICON, _T( "icon_Folder.dds" ) ) );
  2860.     CWndButton* pWndButton6 = AppendMenu( this, 0, 0 , GETTEXT( TID_APP_HELPER        ) ); pWndButton6->SetTexture( g_Neuz.m_pd3dDevice, MakePath( DIR_ICON, _T( "icon_Folder.dds" ) ) ); // »ç¿ëÀÚ, ½Ã³À½º
  2861.     CWndButton* pWndButton4 = AppendMenu( this, 0, APP_OPTIONEX, GETTEXT(TID_APP_OPTION) );
  2862.  
  2863.     pWndButton = AppendMenu( this, 0, APP_LOGOUT    , GETTEXT( TID_APP_LOGOUT      ) );
  2864.     pWndButton = AppendMenu( this, 0, APP_QUIT      , GETTEXT( TID_APP_QUIT          ) );
  2865.  
  2866. //  if( GetLanguage() == LANG_TWN )
  2867. //      pWndButton  = AppendMenu( this, 0, APP_WEBBOX2  , GETTEXT( TID_TIP_QOODO    ) );
  2868.  
  2869.     CWndBase::SetTexture(m_pApp->m_pd3dDevice, MakePath( DIR_THEME, _T("WndTaskMenu.tga")), TRUE);
  2870.  
  2871.     for(int i = 0; i < m_awndMenuItem.GetSize(); i++)
  2872.     {
  2873.         CWndButton* pWndButton = GetMenuItem( i );
  2874.         pWndButton->SetWndRect( CRect(  10, 50 + ( i * 22 ), m_pTexture->m_size.cx - 20, 50 + 20 + ( i * 22 ) ) );
  2875.     }
  2876.     SetWndRect( CRect( 0, 0, m_pTexture->m_size.cx, m_pTexture->m_size.cy ) );
  2877.  
  2878. //  CRect rect = g_WndMng.m_pWndTaskBar->m_wndMenu.GetScreenRect();
  2879. //  Move( CPoint( 0, rect.top - GetWindowRect().Height() ) );
  2880.  
  2881.     m_pMenu1 = new CWndMenu;
  2882.     m_pMenu1->CreateMenu( this );
  2883.     pWndButton = AppendMenu( m_pMenu1, 0, APP_COMMUNICATION_CHAT , GETTEXT( TID_APP_COMMUNICATION_CHAT    ) );
  2884.     pWndButton = AppendMenu( m_pMenu1, 0, APP_MESSENGER_         , GETTEXT( TID_APP_MESSENGER ) );
  2885. #if __VER >= 13 // __CSC_VER13_2
  2886.     pWndButton = AppendMenu( m_pMenu1, 0, APP_COUPLE_MAIN        , GETTEXT( TID_GAME_COUPLE ) );
  2887. #endif //__CSC_VER13_2
  2888.     pWndButton->m_shortcut.m_dwShortcut = SHORTCUT_APPLET; SetTexture( pWndButton );
  2889.     pWndButton1->SetMenu( m_pMenu1 );
  2890.  
  2891.     m_pMenu2 = new CWndMenu;
  2892.     m_pMenu2->CreateMenu( this );
  2893.     pWndButton = AppendMenu( m_pMenu2, 0, APP_PARTY      , GETTEXT( TID_APP_PARTY          ) ) ;
  2894.     pWndButton = AppendMenu( m_pMenu2, 0, APP_GUILD      , GETTEXT( TID_APP_COMPANY         ) ) ;
  2895.    
  2896. #ifdef __GUILDVOTE
  2897.     pWndButton = AppendMenu( m_pMenu2, 0, APP_GUILD_VOTE      , GETTEXT( TID_GAME_TOOLTIP_GUILDVOTE     ) ) ;
  2898. #endif 
  2899.     pWndButton2->SetMenu( m_pMenu2 );
  2900.  
  2901.     m_pMenu5 = new CWndMenu;
  2902.     m_pMenu5->CreateMenu( this );
  2903.     pWndButton = AppendMenu( m_pMenu5, 0, APP_INFO_NOTICE   , GETTEXT( TID_APP_INFO_NOTICE   ) );
  2904.     pWndButton5->SetMenu( m_pMenu5 );
  2905.  
  2906.     m_pMenu6 = new CWndMenu;
  2907.     m_pMenu6->CreateMenu( this );
  2908.     pWndButton = AppendMenu( m_pMenu6, 0, APP_HELPER_HELP , GETTEXT( TID_APP_HELPER_HELP ) );
  2909.     pWndButton = AppendMenu( m_pMenu6, 0, APP_HELPER_TIP  , GETTEXT( TID_APP_HELPER_TIP  ) );
  2910.     pWndButton = AppendMenu( m_pMenu6, 0, APP_HELPER_FAQ  , GETTEXT( TID_APP_HELPER_FAQ  ) );
  2911. #if __VER >= 12 // __MOD_TUTORIAL
  2912.     pWndButton = AppendMenu( m_pMenu6, 0, APP_INFOPANG , GETTEXT( TID_APP_INFOPANG ) );
  2913.     //pWndButton->SetTexture( g_Neuz.m_pd3dDevice, MakePath( DIR_ICON, _T( "icon_Folder.dds" ) ) );
  2914. #endif
  2915. #ifdef __NEW_WEB_BOX
  2916. #ifdef __INTERNALSERVER
  2917.     pWndButton = AppendMenu( m_pMenu6, 0, APP_WEBBOX2 , GETTEXT( TID_GAME_HELPER_WEB_BOX_ICON_TITLE ) );
  2918. #else // __INTERNALSERVER
  2919.     if( ( GetLanguage() == LANG_ENG && GetSubLanguage() == LANG_SUB_USA ) )
  2920.     {
  2921.         pWndButton = AppendMenu( m_pMenu6, 0, APP_WEBBOX2 , GETTEXT( TID_GAME_HELPER_WEB_BOX_ICON_TITLE ) );
  2922.     }
  2923. #endif // __INTERNALSERVER
  2924. #endif // __NEW_WEB_BOX
  2925.     pWndButton6->SetMenu( m_pMenu6 );
  2926.    
  2927.     m_pMenu7 = new CWndMenu;
  2928.     m_pMenu7->CreateMenu( this );
  2929.     pWndButton = AppendMenu( m_pMenu7, 0, APP_WEBBOX, GETTEXT( TID_APP_ITEMMALL ) ); pWndButton->m_shortcut.m_dwShortcut = SHORTCUT_APPLET; SetTexture( pWndButton );
  2930.     pWndButton = AppendMenu( m_pMenu7, 0, APP_COMM_ITEM , GETTEXT( TID_APP_ITEMTIME ) ); pWndButton->m_shortcut.m_dwShortcut = SHORTCUT_APPLET; SetTexture( pWndButton );
  2931.     pWndButton7->SetMenu( m_pMenu7 );
  2932. }
  2933. CWndButton* CWndTaskMenu::AppendMenu( CWndMenu* pWndMenu, UINT nFlags, UINT nIDNewItem, LPCTSTR lpszNewItem )
  2934. {
  2935.     CWndButton* pWndButton = (CWndButton*)pWndMenu->AppendMenu( nFlags, nIDNewItem, lpszNewItem );
  2936.     AppletFunc* pAppletFunc = g_WndMng.GetAppletFunc( nIDNewItem );
  2937.     if( pAppletFunc )
  2938.     {
  2939.         pWndButton->m_cHotkey = pAppletFunc->m_cHotkey;
  2940.         CString string;
  2941.         if( pAppletFunc->m_cHotkey == 0 )
  2942.             string.Format( "%s", pAppletFunc->m_pAppletDesc );
  2943.         else
  2944.             string.Format( "%s\n[%s %c]", pAppletFunc->m_pAppletDesc,  prj.GetText( TID_GAME_TOOLTIP_HOTKEY ), pAppletFunc->m_cHotkey );
  2945.         pWndButton->m_strToolTip = string;
  2946.         pWndButton->m_shortcut.m_dwShortcut = SHORTCUT_APPLET;
  2947.         SetTexture( pWndButton );
  2948.     }
  2949.    
  2950. //  SetWndRect( CRect( 0, 0, 180, 50 + 5 + 5 + ( m_awndMenuItem.GetSize() * 22 ) ) );
  2951.  
  2952.     return pWndButton;
  2953.     /*
  2954.  
  2955.   CString string;
  2956.   if( pAppletFunc->m_cHotkey == 0 )
  2957.   string.Format( "¾ÖÇ÷¿\n%s", pAppletFunc->m_pAppletDesc );
  2958.   else
  2959.   string.Format( "¾ÖÇ÷¿\n%s\n[´ÜÃàÅ° %c]", pAppletFunc->m_pAppletDesc, pAppletFunc->m_cHotkey );
  2960.   g_toolTip.PutToolTip( pShortcut->m_dwId , string, *pRect, point, 0 );
  2961.  
  2962.     CWndButton* pWndButton = new CWndButton;
  2963.     int nCount = m_awndMenuItem.GetSize();
  2964.     CSize size = m_pFont->GetTextExtent( lpszNewItem );
  2965.     if( size.cx > m_nLargeWidth )
  2966.         m_nLargeWidth = size.cx + 60;
  2967.     pWndButton->Create(lpszNewItem, WBS_MENUITEM | WBS_HIGHLIGHT, CRect( 2, 2 + ( nCount * 22 ), m_nLargeWidth, 2 + ( nCount * 22 ) + 20 ), this, nIDNewItem );
  2968.     m_awndMenuItem.Add( pWndButton );
  2969.     for( int i = 0; i < m_awndMenuItem.GetSize(); i++ )
  2970.     {
  2971.         pWndButton = (CWndButton*)m_awndMenuItem.GetAt( i );
  2972.         CRect rect = pWndButton->GetWindowRect( TRUE );
  2973.         rect.right = rect.left + m_nLargeWidth;
  2974.         pWndButton->SetWndRect( rect );
  2975.     }
  2976.     SetWndRect( CRect( 0, 0, m_nLargeWidth + 10, 5 + 5 + ( ( nCount + 1 ) * 22 ) ) );
  2977.     return pWndButton;
  2978.     */
  2979. }
  2980.  
  2981. BOOL CWndTaskMenu::Initialize(CWndBase* pWndParent,DWORD dwWndId)
  2982. {
  2983.     CreateMenu( &g_WndMng );
  2984.     SetVisible(TRUE);
  2985.     return TRUE;
  2986. }
  2987.  
  2988. void CWndTaskMenu::OnKillFocus(CWndBase* pNewWnd)
  2989. {
  2990.     if(g_WndMng.m_pWndTaskBar != pNewWnd)
  2991.         CWndMenu::OnKillFocus(pNewWnd);
  2992. }
  2993.  
  2994. BOOL CWndTaskMenu::OnCommand( UINT nID, DWORD dwMessage, CWndBase* pWndBase )
  2995. {
  2996. //  g_WndMng.ObjectExecutor( SHORTCUT_APPLET, nID );
  2997.     return TRUE;
  2998. }
  2999. BOOL CWndTaskMenu::OnChildNotify(UINT message,UINT nID,LRESULT* pLResult)
  3000. {
  3001.     if( message == WNM_CLICKED )
  3002.         g_WndMng.ObjectExecutor( SHORTCUT_APPLET, nID );
  3003.     return TRUE;
  3004. }
  3005. void CWndTaskMenu::OnSize(UINT nType, int cx, int cy)
  3006. {
  3007.     CWndMenu::OnSize( nType, cx, cy );
  3008. }
  3009. void CWndTaskMenu::OnLButtonUp(UINT nFlags, CPoint point)
  3010. {
  3011.     //if(IsWndStyle(WBS_CAPTION) && m_bPickup)
  3012.     {//
  3013.     //  m_wndTitleBar.m_wndMinimize.SetVisible(TRUE);
  3014.         //m_wndTitleBar.m_wndMaximize.SetVisible(TRUE);
  3015.     }
  3016. }
  3017. void CWndTaskMenu::OnLButtonDown(UINT nFlags, CPoint point)
  3018. {
  3019. //  CWndBase::OnLButtonDown(nFlags,point
  3020.     if(IsWndRoot())
  3021.         return;
  3022. //  return;
  3023.  
  3024. }
  3025.  
  3026. void CWndTaskMenu::PaintFrame( C2DRender* p2DRender )
  3027. {
  3028. //  p2DRender->RenderFillRect( GetWindowRect(), D3DCOLOR_ARGB( 255, 76,124,193 ) );
  3029. //  p2DRender->RenderRect( GetWindowRect(), D3DCOLOR_ARGB( 255, 36,74,100 ) );
  3030.     CWndBase::PaintFrame( p2DRender );
  3031. }
  3032. BOOL CWndTaskMenu::OnEraseBkgnd( C2DRender* p2DRender )
  3033. {
  3034.     CRect rect = GetWindowRect();
  3035.     rect.top += 50;
  3036. //  p2DRender->RenderFillRect(rect, D3DCOLOR_ARGB( 255, 255,255,255 ) );
  3037.     return CWndBase::OnEraseBkgnd( p2DRender );
  3038. }
  3039.  
  3040.  
  3041. void CWndTaskBar::RenderCollTime(CPoint pt, DWORD dwSkillId, C2DRender* p2DRender )
  3042. {
  3043.     LPSKILL lpSkill = &g_pPlayer->m_aJobSkill[ dwSkillId ];
  3044.     if( lpSkill )
  3045.     {
  3046.         DWORD dwDelay = g_pPlayer->GetReuseDelay( dwSkillId );
  3047.         if( dwDelay > 0 )
  3048.         {
  3049. #if __VER >= 9  // __SKILL_0706
  3050.             ItemProp* pSkillProp    = lpSkill->GetProp();
  3051.             ASSERT( pSkillProp );
  3052.             AddSkillProp* pAddSkillProp = prj.GetAddSkillProp( pSkillProp->dwSubDefine, lpSkill->dwLevel );
  3053.             ASSERT( pAddSkillProp );
  3054.             RenderRadar( p2DRender, pt,
  3055.                          pAddSkillProp->dwCooldown - dwDelay,
  3056.                          pAddSkillProp->dwCooldown );  
  3057. #else   // __SKILL_0706
  3058.             RenderRadar( p2DRender, pt,
  3059.                          lpSkill->GetProp()->dwSkillReady - dwDelay,
  3060.                          lpSkill->GetProp()->dwSkillReady );   
  3061. #endif  // __SKILL_0706
  3062.         }
  3063.     }              
  3064. }
  3065.  
  3066. #if __VER >= 12 // __LORD
  3067.     void CWndTaskBar::RenderLordCollTime( CPoint pt, DWORD dwSkillId, C2DRender* p2DRender )
  3068.     {
  3069.         CCLord* pLord                                   = CCLord::Instance();
  3070.         CLordSkillComponentExecutable* pComponent       = pLord->GetSkills()->GetSkill(dwSkillId);
  3071.         if(!pComponent) return;
  3072.         DWORD dwDelay = 0;
  3073.         if(pComponent->GetTick() > 0)
  3074.             RenderRadar( p2DRender, pt, pComponent->GetCooltime() - pComponent->GetTick(), pComponent->GetCooltime() );
  3075.     }
  3076. #endif
  3077.  
  3078. void CWndTaskBar::RenderOutLineLamp(int x, int y, int num, DWORD size)
  3079. {
  3080.     CPoint Point = CPoint( x, y );
  3081.     LONG   thick = 10;
  3082.  
  3083.     D3DXCOLOR dwColorDest2  = D3DCOLOR_ARGB( 0, 40, 0, 255 );
  3084.  
  3085.     D3DXCOLOR dwColor  = D3DCOLOR_ARGB( 196, 40, 0, 255 );
  3086.  
  3087.     D3DXCOLOR dwColor1 = D3DCOLOR_ARGB( 0, 255, 255, 255 );
  3088.     D3DXCOLOR dwColor2 = D3DCOLOR_ARGB( 0, 255, 255, 255 );
  3089.  
  3090.     static BOOL  bReverse = FALSE;
  3091.     static FLOAT fLerp = 0.0f;
  3092.  
  3093.     if( bReverse )
  3094.         fLerp-=0.05f;
  3095.     else
  3096.         fLerp+=0.05f;
  3097.  
  3098.     if( fLerp > 1.0f )
  3099.     {
  3100.         bReverse = TRUE;
  3101.         fLerp = 1.0f;
  3102.     }
  3103.     else
  3104.     if( fLerp < 0.0f )
  3105.     {
  3106.         bReverse = FALSE;
  3107.         fLerp = 0.0f;
  3108.     }
  3109.    
  3110.     D3DXColorLerp( &dwColor2, &dwColor, &dwColorDest2, fLerp);
  3111.    
  3112.     CRect Rect = CRect( 0, 0, (size * num), size );
  3113.    
  3114.     m_p2DRender->RenderFillRect( CRect( (Point.x+Rect.left)-thick, Point.y+Rect.top, (Point.x+Rect.left), Point.y+Rect.bottom ),
  3115.         dwColor1, dwColor2, dwColor1, dwColor2 );
  3116.    
  3117.     m_p2DRender->RenderFillRect( CRect( (Point.x+Rect.left), (Point.y+Rect.top)-thick, (Point.x+Rect.right), Point.y+Rect.top ),
  3118.         dwColor1, dwColor1, dwColor2, dwColor2 );
  3119.    
  3120.     m_p2DRender->RenderFillRect( CRect( (Point.x+Rect.right), Point.y+Rect.top, (Point.x+Rect.right)+thick, Point.y+Rect.bottom ),
  3121.         dwColor2, dwColor1, dwColor2, dwColor1 );
  3122.    
  3123.     m_p2DRender->RenderFillRect( CRect( (Point.x+Rect.left), (Point.y+Rect.bottom), (Point.x+Rect.right), (Point.y+Rect.bottom)+thick ),
  3124.         dwColor2, dwColor2, dwColor1, dwColor1 );
  3125. }
  3126.  
  3127. BOOL CWndTaskBar::IsShortcut( LPSHORTCUT lpShortcut, DWORD dwShortcut, DWORD dwId )
  3128. {
  3129.     if( lpShortcut->m_dwShortcut == SHORTCUT_APPLET )
  3130.     {
  3131.     }
  3132.     else
  3133.     if( lpShortcut->m_dwShortcut == SHORTCUT_SKILL )
  3134.     {
  3135.     }
  3136.     else
  3137.     if( lpShortcut->m_dwShortcut == SHORTCUT_ITEM )
  3138.     {
  3139.     }
  3140.     else
  3141.     if( lpShortcut->m_dwShortcut == SHORTCUT_CHAT )
  3142.     {
  3143.     }
  3144.     else
  3145.     if( lpShortcut->m_dwShortcut == SHORTCUT_MOTION )
  3146.     {
  3147.         if( lpShortcut->m_dwShortcut == dwShortcut )
  3148.         {
  3149.             MotionProp* pMotionProp = prj.GetMotionProp( dwId );
  3150.        
  3151.             if( pMotionProp )
  3152.             {
  3153.                 return TRUE;
  3154.             }
  3155.         }
  3156.     }
  3157.    
  3158.     return FALSE;
  3159. }
  3160.  
  3161. #ifdef __NEW_TASKBAR_V19
  3162. CWndTaskBar_HUD::CWndTaskBar_HUD()
  3163. {
  3164.     CWndTaskBarInterface::CWndTaskBarInterface();
  3165.     m_nDisplay = 2;
  3166.     m_nHPWidth = -1;
  3167.     m_nMPWidth = -1;
  3168.     m_nFPWidth = -1;
  3169.     m_nEXPWidth = -1;
  3170.  
  3171.     m_pAppletSlotOpen = FALSE;
  3172.     m_paltSlotOpen = FALSE;
  3173.     m_pfSlotOpen = FALSE;
  3174.     m_pVBHPGauge = NULL;
  3175.     m_pVBMPGauge = NULL;
  3176.     m_pVBFPGauge = NULL;
  3177.     m_pVBEXPGauge = NULL;
  3178.  
  3179.     m_bVBHPGauge = TRUE;
  3180.     m_bVBMPGauge = TRUE;
  3181.     m_bVBFPGauge = TRUE;
  3182.  
  3183.     m_nSlotIndex = 0;
  3184.     m_nActionListener[0] = '1';
  3185.     m_nActionListener[1] = '2';
  3186.     m_nActionListener[2] = '3';
  3187.     m_nActionListener[3] = '4';
  3188.     m_nActionListener[4] = '5';
  3189.     m_nActionListener[5] = '6';
  3190.     m_nActionListener[6] = '7';
  3191.     m_nActionListener[7] = '8';
  3192.     m_nActionListener[8] = '9';
  3193.     m_nActionListener[9] = '0';
  3194. }
  3195.  
  3196. void CWndTaskBar_HUD::OnInitialUpdate()
  3197. {
  3198.     CWndTaskBarInterface::OnInitialUpdate();
  3199.     {
  3200.         m_HPGaugeTexture.LoadTexture(m_pApp->m_pd3dDevice, MakePath(DIR_THEME, "Targetgauge01.tga"), 0xffff00ff, TRUE);
  3201.         m_MPGaugeTexture.LoadTexture(m_pApp->m_pd3dDevice, MakePath(DIR_THEME, "Targetgauge02.tga"), 0xffff00ff, TRUE);
  3202.         m_FPGaugeTexture.LoadTexture(m_pApp->m_pd3dDevice, MakePath(DIR_THEME, "Targetgauge03.tga"), 0xffff00ff, TRUE);
  3203.     }
  3204.     m_EXPGaugeTexture.LoadTexture(m_pApp->m_pd3dDevice, MakePath(DIR_THEME, "WndMainBarGauge.tga"), 0xffff00ff, TRUE);
  3205.  
  3206.     CRect rectRoot = m_pWndRoot->GetLayoutRect();
  3207.     CRect rectWindow = GetWindowRect();
  3208.     CPoint point((rectRoot.right - 166) - rectWindow.Width(), rectRoot.bottom - rectWindow.Height());
  3209.     Move(point);
  3210.  
  3211.     pWndTaskBar_HUD_EX3 = new CWndTaskBar_HUD_EX3;
  3212.     pWndTaskBar_HUD_EX2 = new CWndTaskBar_HUD_EX2;
  3213.     pWndTaskBar_HUD_EX1 = new CWndTaskBar_HUD_EX1;
  3214.     pWndTaskBar_HUD_EX3->Initialize(&g_WndMng);
  3215.     pWndTaskBar_HUD_EX2->Initialize(&g_WndMng);
  3216.     pWndTaskBar_HUD_EX1->Initialize(&g_WndMng);
  3217.  
  3218.     if (g_Option.m_nTBDisplay == 0)
  3219.     {
  3220.         pWndTaskBar_HUD_EX1->SetVisible(FALSE);
  3221.         pWndTaskBar_HUD_EX3->SetVisible(FALSE);
  3222.         pWndTaskBar_HUD_EX2->SetVisible(FALSE);
  3223.     }
  3224.     else if (g_Option.m_nTBDisplay == 1)
  3225.     {
  3226.         pWndTaskBar_HUD_EX3->SetVisible(FALSE);
  3227.         pWndTaskBar_HUD_EX2->SetVisible(FALSE);
  3228.         m_paltSlotOpen = TRUE;
  3229.     }
  3230.     else if (g_Option.m_nTBDisplay == 2)
  3231.     {
  3232.         pWndTaskBar_HUD_EX3->SetVisible(FALSE);
  3233.         m_pfSlotOpen = TRUE;
  3234.         m_paltSlotOpen = TRUE;
  3235.     }
  3236.     else
  3237.     {
  3238.         m_pAppletSlotOpen = TRUE;
  3239.         m_pfSlotOpen = TRUE;
  3240.         m_paltSlotOpen = TRUE;
  3241.     }
  3242.     for (int i = 0; i < 10; i++)
  3243.     {
  3244.         m_pSlotItem[i] = &g_WndMng.m_pWndTaskBar->m_aSlotItem[0][i];
  3245.         pWndTaskBar_HUD_EX1->m_pSlotItem[i] = &g_WndMng.m_pWndTaskBar->m_aSlotItem[1][i];
  3246.         pWndTaskBar_HUD_EX2->m_pSlotItem[i] = &g_WndMng.m_pWndTaskBar->m_aSlotItem[2][i];
  3247.         pWndTaskBar_HUD_EX3->m_pSlotItem[i] = &g_WndMng.m_pWndTaskBar->m_aSlotItem[3][i];
  3248.     }
  3249.  
  3250.     CWndButton* pWndButton = (CWndButton*)GetDlgItem(WIDC_BUTTON1);
  3251.     pWndButton->SetCheck(!CWndTaskBarInterface::IsLock());
  3252.     RestoreDeviceObjects();
  3253.  
  3254.     DelWndStyle(WBS_MOVE);
  3255. }
  3256.  
  3257. BOOL CWndTaskBar_HUD::Initialize(CWndBase* pWndParent, DWORD dwWndId)
  3258. {
  3259.     return CWndNeuz::InitDialog(g_Neuz.GetSafeHwnd(), APP_NEWTASKBAR, WBS_MANAGER | WBS_SOUND, CPoint(0, 0), pWndParent);
  3260. }
  3261.  
  3262. BOOL CWndTaskBar_HUD::Process()
  3263. {
  3264.     if (g_bKeyTable[VK_OEM_3])
  3265.     {
  3266.         g_bKeyTable[VK_OEM_3] = 0;
  3267.         ScrollTaskBars();
  3268.     }
  3269.  
  3270.     return CWndTaskBarInterface::Process();
  3271. }
  3272.  
  3273. void CWndTaskBar_HUD::MakeGaugeVertex()
  3274. {
  3275.     LPWNDCTRL lpHP = GetWndCtrl(WIDC_CUSTOM11);
  3276.     LPWNDCTRL lpMP = GetWndCtrl(WIDC_CUSTOM12);
  3277.     LPWNDCTRL lpFP = GetWndCtrl(WIDC_CUSTOM13);
  3278.     LPWNDCTRL lpExp = GetWndCtrl(WIDC_CUSTOM14);
  3279.  
  3280.     CMover* pMover = CMover::GetActiveMover();
  3281.     if (pMover)
  3282.     {
  3283.         CRect rect = GetClientRect();
  3284.         CRect rectTemp;
  3285.  
  3286.         int nWidthClient;
  3287.         int nWidth;
  3288.  
  3289.         {
  3290.             nWidthClient = lpHP->rect.Width();
  3291.             nWidth = (int)((__int64)nWidthClient * (__int64)pMover->GetHitPoint() / (__int64)pMover->GetMaxHitPoint());
  3292.             if (m_nHPWidth != nWidth)
  3293.             {
  3294.                 m_nHPWidth = nWidth;
  3295.                 rect = lpHP->rect;
  3296.                 rectTemp = rect;
  3297.                 rectTemp.right = rectTemp.left + nWidth;
  3298.                 ClientToScreen(rectTemp);
  3299.                 m_bVBHPGauge = m_pTheme->MakeGaugeVertex(m_pApp->m_pd3dDevice, &rectTemp, 0xffffffff, m_pVBHPGauge, &m_HPGaugeTexture);
  3300.             }
  3301.             nWidth = nWidthClient * pMover->GetManaPoint() / pMover->GetMaxManaPoint();
  3302.             if (m_nMPWidth != nWidth)
  3303.             {
  3304.                 m_nMPWidth = nWidth;
  3305.                 rect = lpMP->rect;
  3306.                 rectTemp = rect;
  3307.                 rectTemp.right = rectTemp.left + nWidth;
  3308.                 ClientToScreen(rectTemp);
  3309.                 m_bVBMPGauge = m_pTheme->MakeGaugeVertex(m_pApp->m_pd3dDevice, &rectTemp, 0xffffffff, m_pVBMPGauge, &m_MPGaugeTexture);
  3310.             }
  3311.             nWidth = nWidthClient * pMover->GetFatiguePoint() / pMover->GetMaxFatiguePoint();
  3312.             if (m_nFPWidth != nWidth)
  3313.             {
  3314.                 m_nFPWidth = nWidth;
  3315.                 rect = lpFP->rect;
  3316.                 rectTemp = rect;
  3317.                 rectTemp.right = rectTemp.left + nWidth;
  3318.                 ClientToScreen(rectTemp);
  3319.                 m_bVBFPGauge = m_pTheme->MakeGaugeVertex(m_pApp->m_pd3dDevice, &rectTemp, 0xffffffff, m_pVBFPGauge, &m_FPGaugeTexture);
  3320.             }
  3321.         }
  3322.  
  3323.         nWidthClient = lpExp->rect.Width();
  3324.         nWidth = (int)(((float)nWidthClient / pMover->GetMaxExp1()) * pMover->GetExp1());
  3325.         if (m_nEXPWidth != nWidth)
  3326.         {
  3327.             m_nEXPWidth = nWidth;
  3328.             rect = lpExp->rect;
  3329.             rectTemp = rect;
  3330.             rectTemp.right = rectTemp.left + nWidth;
  3331.             ClientToScreen(rectTemp);
  3332.             m_bVBEXPGauge = m_pTheme->MakeGaugeVertex(m_pApp->m_pd3dDevice, &rectTemp, 0xffffffff, m_pVBEXPGauge, &m_EXPGaugeTexture);
  3333.         }
  3334.     }
  3335. }
  3336.  
  3337. void CWndTaskBar_HUD::OnDraw(C2DRender* p2DRender)
  3338. {
  3339.     CWndTaskBarInterface::OnDraw(p2DRender);
  3340.     CMover* pMover = CMover::GetActiveMover();
  3341.     if (pMover == NULL)
  3342.         return;
  3343.  
  3344.     CRect rect = GetClientRect();
  3345.     int nWidthClient = GetClientRect().Width() - 110;
  3346.  
  3347.     CRect rectTemp;
  3348.     LPWNDCTRL lpHP = GetWndCtrl(WIDC_CUSTOM11);
  3349.     LPWNDCTRL lpMP = GetWndCtrl(WIDC_CUSTOM12);
  3350.     LPWNDCTRL lpFP = GetWndCtrl(WIDC_CUSTOM13);
  3351.     LPWNDCTRL lpExp = GetWndCtrl(WIDC_CUSTOM14);
  3352.  
  3353.     if (pMover)
  3354.     {
  3355.         MakeGaugeVertex();
  3356.  
  3357.         {
  3358.             if (m_bVBHPGauge)
  3359.                 m_pTheme->RenderGauge(p2DRender->m_pd3dDevice, m_pVBHPGauge, &m_HPGaugeTexture);
  3360.             if (m_bVBMPGauge)
  3361.                 m_pTheme->RenderGauge(p2DRender->m_pd3dDevice, m_pVBMPGauge, &m_MPGaugeTexture);
  3362.             if (m_bVBFPGauge)
  3363.                 m_pTheme->RenderGauge(p2DRender->m_pd3dDevice, m_pVBFPGauge, &m_FPGaugeTexture);
  3364.         }
  3365.  
  3366.         if (m_bVBEXPGauge)
  3367.             m_pTheme->RenderGauge(p2DRender->m_pd3dDevice, m_pVBEXPGauge, &m_EXPGaugeTexture);
  3368.     }
  3369.     if (m_nDisplay != 0)
  3370.     {
  3371.         DWORD dwColor = D3DCOLOR_ARGB(255, 255, 255, 255);
  3372.         char cbufHp[16] = { 0, };
  3373.         char cbufMp[16] = { 0, };
  3374.         char cbufFp[16] = { 0, };
  3375.         char cbufExp[16] = { 0, };
  3376.  
  3377.         char cbufPxp[16] = { 0, };
  3378.         int nCharHP, nCharMP, nCharFP;
  3379.         CSize size = p2DRender->m_pFont->GetTextExtent("8");
  3380.         int nMaxHeight = p2DRender->m_pFont->GetMaxHeight();
  3381.         int nTopGap = 0;
  3382.  
  3383.         if (::GetLanguage() == LANG_FRE || ::GetLanguage() == LANG_GER)
  3384.         {
  3385.             nTopGap = 3;
  3386.         }
  3387.         else
  3388.         {
  3389.             if (nMaxHeight > 14)
  3390.                 nTopGap = nMaxHeight - 14;
  3391.         }
  3392.         if (m_nDisplay != 1)
  3393.         {
  3394.  
  3395.             {
  3396.                 CString szbufHp = Separator(pMover->GetHitPoint(), '.');
  3397.                 CString szbufMp = Separator(pMover->GetManaPoint(), '.');
  3398.                 CString szbufFp = Separator(pMover->GetFatiguePoint(), '.');
  3399.  
  3400.                 if (pMover->GetHitPoint() >= 10000 && pMover->GetHitPoint() < 1000000)
  3401.                     szbufHp.Format("%.1fk", float(pMover->GetHitPoint()) / 1000);
  3402.                 else if (pMover->GetHitPoint() >= 1000000 && pMover->GetHitPoint() < 1000000000)
  3403.                     szbufHp.Format("%.1fm", float(pMover->GetHitPoint()) / 1000000);
  3404.                 else if (pMover->GetHitPoint() >= 1000000000)
  3405.                     szbufHp.Format("%.1fb", float(pMover->GetHitPoint()) / 1000000000);
  3406.  
  3407.                 if (pMover->GetManaPoint() >= 10000 && pMover->GetManaPoint() < 1000000)
  3408.                     szbufMp.Format("%.1fk", float(pMover->GetManaPoint()) / 1000);
  3409.                 else if (pMover->GetManaPoint() >= 1000000 && pMover->GetManaPoint() < 1000000000)
  3410.                     szbufMp.Format("%.1fm", float(pMover->GetManaPoint()) / 1000000);
  3411.                 else if (pMover->GetManaPoint() >= 1000000000)
  3412.                     szbufMp.Format("%.1fb", float(pMover->GetManaPoint()) / 1000000000);
  3413.  
  3414.                 if (pMover->GetFatiguePoint() >= 10000 && pMover->GetFatiguePoint() < 1000000)
  3415.                     szbufFp.Format("%.1fk", float(pMover->GetFatiguePoint()) / 1000);
  3416.                 else if (pMover->GetFatiguePoint() >= 1000000 && pMover->GetFatiguePoint() < 1000000000)
  3417.                     szbufFp.Format("%.1fm", float(pMover->GetFatiguePoint()) / 1000000);
  3418.                 else if (pMover->GetFatiguePoint() >= 1000000000)
  3419.                     szbufFp.Format("%.1fb", float(pMover->GetFatiguePoint()) / 1000000000);
  3420.  
  3421.                 nCharHP = wsprintf(cbufHp, "%s", szbufHp);
  3422.                 nCharMP = wsprintf(cbufMp, "%s", szbufMp);
  3423.                 nCharFP = wsprintf(cbufFp, "%s", szbufFp);
  3424.  
  3425.                 int x = lpHP->rect.right - 82 - 10;
  3426.                 p2DRender->TextOut(x - (int)(((float)nCharHP / 2.0f) * size.cx), lpHP->rect.top - nTopGap, cbufHp, dwColor, 0xff000000);
  3427.                 p2DRender->TextOut(x - (int)(((float)nCharMP / 2.0f) * size.cx), lpMP->rect.top - nTopGap, cbufMp, dwColor, 0xff000000);
  3428.                 p2DRender->TextOut(x - (int)(((float)nCharFP / 2.0f) * size.cx), lpFP->rect.top - nTopGap, cbufFp, dwColor, 0xff000000);
  3429.  
  3430.                 szbufHp = Separator(pMover->GetMaxHitPoint(), '.');
  3431.                 szbufMp = Separator(pMover->GetMaxManaPoint(), '.');
  3432.                 szbufFp = Separator(pMover->GetMaxFatiguePoint(), '.');
  3433.  
  3434.                 if (pMover->GetMaxHitPoint() >= 10000 && pMover->GetMaxHitPoint() < 1000000)
  3435.                     szbufHp.Format("%.1fk", float(pMover->GetMaxHitPoint()) / 1000);
  3436.                 else if (pMover->GetMaxHitPoint() >= 1000000 && pMover->GetMaxHitPoint() < 1000000000)
  3437.                     szbufHp.Format("%.1fm", float(pMover->GetMaxHitPoint()) / 1000000);
  3438.                 else if (pMover->GetMaxHitPoint() >= 1000000000)
  3439.                     szbufHp.Format("%.1fb", float(pMover->GetMaxHitPoint()) / 1000000000);
  3440.  
  3441.                 if (pMover->GetMaxManaPoint() >= 10000 && pMover->GetMaxManaPoint() < 1000000)
  3442.                     szbufMp.Format("%.1fk", float(pMover->GetMaxManaPoint()) / 1000);
  3443.                 else if (pMover->GetMaxManaPoint() >= 1000000 && pMover->GetMaxManaPoint() < 1000000000)
  3444.                     szbufMp.Format("%.1fm", float(pMover->GetMaxManaPoint()) / 1000000);
  3445.                 else if (pMover->GetMaxManaPoint() >= 1000000000)
  3446.                     szbufMp.Format("%.1fb", float(pMover->GetMaxManaPoint()) / 1000000000);
  3447.  
  3448.                 if (pMover->GetMaxFatiguePoint() >= 10000 && pMover->GetMaxFatiguePoint() < 1000000)
  3449.                     szbufFp.Format("%.1fk", float(pMover->GetMaxFatiguePoint()) / 1000);
  3450.                 else if (pMover->GetMaxFatiguePoint() >= 1000000 && pMover->GetMaxFatiguePoint() < 1000000000)
  3451.                     szbufFp.Format("%.1fm", float(pMover->GetMaxFatiguePoint()) / 1000000);
  3452.                 else if (pMover->GetMaxFatiguePoint() >= 1000000000)
  3453.                     szbufFp.Format("%.1fb", float(pMover->GetMaxFatiguePoint()) / 1000000000);
  3454.  
  3455.                 nCharHP = wsprintf(cbufHp, "%s", szbufHp);
  3456.                 nCharMP = wsprintf(cbufMp, "%s", szbufMp);
  3457.                 nCharFP = wsprintf(cbufFp, "%s", szbufFp);
  3458.  
  3459.                 x = lpHP->rect.right - 30 - 10;//30
  3460.                 p2DRender->TextOut(x - (int)(((float)nCharHP / 2.0f) * size.cx), lpHP->rect.top - nTopGap, cbufHp, dwColor, 0xff000000);
  3461.                 p2DRender->TextOut(x - (int)(((float)nCharMP / 2.0f) * size.cx), lpMP->rect.top - nTopGap, cbufMp, dwColor, 0xff000000);
  3462.                 p2DRender->TextOut(x - (int)(((float)nCharFP / 2.0f) * size.cx), lpFP->rect.top - nTopGap, cbufFp, dwColor, 0xff000000);
  3463.  
  3464.                 LPWNDCTRL lpHP = GetWndCtrl(WIDC_CUSTOM1);
  3465.                 int nWidthCustom = lpHP->rect.Width();
  3466.                 int nGap = lpHP->rect.left + 25 + 10;
  3467.  
  3468.                 p2DRender->TextOut(lpMP->rect.right - nGap, lpHP->rect.top - (nTopGap + 2), "/", dwColor, 0xff000000);
  3469.                 p2DRender->TextOut(lpMP->rect.right - nGap, lpMP->rect.top - nTopGap, "/", dwColor, 0xff000000);
  3470.                 p2DRender->TextOut(lpFP->rect.right - nGap, lpFP->rect.top - nTopGap, "/", dwColor, 0xff000000);
  3471.             }
  3472.         }
  3473.  
  3474.         CRect therect = lpExp->rect;
  3475.         if (therect.PtInRect(GetMousePoint()))
  3476.         {
  3477.             CPoint point = GetMousePoint();;
  3478.             ClientToScreen(&point);
  3479.             ClientToScreen(&therect);
  3480.  
  3481.             CString strEdit;
  3482.  
  3483.             EXPINTEGER  nExpResult = pMover->GetExp1() * (EXPINTEGER)10000 / pMover->GetMaxExp1();
  3484.             float fExp = (float)nExpResult / 100.0f;
  3485.  
  3486.             if (fExp >= 99.99f)
  3487.                 fExp = 99.99f;
  3488.             if (fExp < 0.0f)
  3489.                 fExp = 0.0f;
  3490.  
  3491.             strEdit.Format(prj.GetText(TID_MMI_UIEXPTOOLTIP), pMover->GetExp1(), pMover->GetMaxExp1(), fExp);
  3492.             g_toolTip.PutToolTip(10000, strEdit, therect, point, 0);
  3493.         }
  3494.  
  3495.         int x = lpHP->rect.right - 10; // -40
  3496.     }
  3497.     CTexture* mainbar_EXP;
  3498.     mainbar_EXP = CWndBase::m_textureMng.AddTexture(D3DDEVICE, MakePath(DIR_THEME, "WndMainBar.tga"), 0xffff00ff, TRUE);
  3499.     if (mainbar_EXP != NULL)
  3500.     {
  3501.         CPoint point;
  3502.  
  3503.         point.y = 78;
  3504.         point.x = 30;
  3505.  
  3506.         mainbar_EXP->Render(&g_Neuz.m_2DRender, point);
  3507.     }
  3508.     for (int i = 0; i < 10; i++)
  3509.     {
  3510.         CString szTemp;
  3511.         CPoint point = CPoint(wndCtrl[i]->rect.left, wndCtrl[i]->rect.top);
  3512.         switch (i)
  3513.         {
  3514.         case 0:  szTemp = "1"; break;
  3515.         case 1:  szTemp = "2"; break;
  3516.         case 2:  szTemp = "3"; break;
  3517.         case 3:  szTemp = "4"; break;
  3518.         case 4:  szTemp = "5"; break;
  3519.         case 5:  szTemp = "6"; break;
  3520.         case 6:  szTemp = "7"; break;
  3521.         case 7:  szTemp = "8"; break;
  3522.         case 8:  szTemp = "9"; break;
  3523.         case 9:  szTemp = "0"; break;
  3524.         }
  3525.  
  3526.         point.x += 8;
  3527.         CD3DFont* pOldFont = p2DRender->GetFont();
  3528.         p2DRender->SetFont(CWndBase::m_Theme.m_pFontWndTitle);
  3529.         p2DRender->TextOut((1 + (point.x / point.x + point.x)), point.y - 12, szTemp);
  3530.         p2DRender->SetFont(pOldFont);
  3531.     }
  3532. }
  3533.  
  3534. HRESULT CWndTaskBar_HUD::RestoreDeviceObjects()
  3535. {
  3536.     CWndBase::RestoreDeviceObjects();
  3537.     if (m_pVBHPGauge == NULL)
  3538.     {
  3539.         m_pApp->m_pd3dDevice->CreateVertexBuffer(sizeof(TEXTUREVERTEX2) * 3 * 6, D3DUSAGE_WRITEONLY | D3DUSAGE_DYNAMIC, D3DFVF_TEXTUREVERTEX2, D3DPOOL_DEFAULT, &m_pVBHPGauge, NULL);
  3540.         m_pApp->m_pd3dDevice->CreateVertexBuffer(sizeof(TEXTUREVERTEX2) * 3 * 6, D3DUSAGE_WRITEONLY | D3DUSAGE_DYNAMIC, D3DFVF_TEXTUREVERTEX2, D3DPOOL_DEFAULT, &m_pVBMPGauge, NULL);
  3541.         m_pApp->m_pd3dDevice->CreateVertexBuffer(sizeof(TEXTUREVERTEX2) * 3 * 6, D3DUSAGE_WRITEONLY | D3DUSAGE_DYNAMIC, D3DFVF_TEXTUREVERTEX2, D3DPOOL_DEFAULT, &m_pVBFPGauge, NULL);
  3542.         m_pApp->m_pd3dDevice->CreateVertexBuffer(sizeof(TEXTUREVERTEX2) * 3 * 6, D3DUSAGE_WRITEONLY | D3DUSAGE_DYNAMIC, D3DFVF_TEXTUREVERTEX2, D3DPOOL_DEFAULT, &m_pVBEXPGauge, NULL);
  3543.  
  3544.         m_nHPWidth = -1;
  3545.         m_nMPWidth = -1;
  3546.         m_nFPWidth = -1;
  3547.         m_nEXPWidth = -1;
  3548.     }
  3549.     m_HPGaugeTexture.SetInvalidate(m_pApp->m_pd3dDevice);
  3550.     m_MPGaugeTexture.SetInvalidate(m_pApp->m_pd3dDevice);
  3551.     m_FPGaugeTexture.SetInvalidate(m_pApp->m_pd3dDevice);
  3552.     m_EXPGaugeTexture.SetInvalidate(m_pApp->m_pd3dDevice);
  3553.  
  3554.     return S_OK;
  3555. }
  3556.  
  3557. HRESULT CWndTaskBar_HUD::InvalidateDeviceObjects()
  3558. {
  3559.     CWndBase::InvalidateDeviceObjects();
  3560.     SAFE_RELEASE(m_pVBHPGauge);
  3561.     SAFE_RELEASE(m_pVBMPGauge);
  3562.     SAFE_RELEASE(m_pVBFPGauge);
  3563.     SAFE_RELEASE(m_pVBEXPGauge);
  3564.  
  3565.     m_HPGaugeTexture.Invalidate();
  3566.     m_MPGaugeTexture.Invalidate();
  3567.     m_FPGaugeTexture.Invalidate();
  3568.     m_EXPGaugeTexture.Invalidate();
  3569.  
  3570.     return S_OK;
  3571. }
  3572.  
  3573. HRESULT CWndTaskBar_HUD::DeleteDeviceObjects()
  3574. {
  3575.     CWndBase::DeleteDeviceObjects();
  3576.     return InvalidateDeviceObjects();
  3577. }
  3578.  
  3579. void CWndTaskBar_HUD::SetWndRect(CRect rectWnd, BOOL bOnSize)
  3580. {
  3581.     m_nHPWidth = -1;
  3582.     m_nMPWidth = -1;
  3583.     m_nFPWidth = -1;
  3584.     m_nEXPWidth = -1;
  3585.     CWndNeuz::SetWndRect(rectWnd, bOnSize);
  3586. }
  3587.  
  3588. BOOL CWndTaskBar_HUD::OnChildNotify(UINT message, UINT nID, LRESULT* pLResult)
  3589. {
  3590.     switch (nID)
  3591.     {
  3592.     case WIDC_BUTTON1:
  3593.     {
  3594.         CWndButton* pWndButton = (CWndButton*)GetDlgItem(WIDC_BUTTON1);
  3595.         CWndTaskBarInterface::Lock();
  3596.         pWndButton->SetCheck(!CWndTaskBarInterface::IsLock());
  3597.         break;
  3598.     }
  3599.     case WIDC_BUTTON2:
  3600.     {
  3601.         if (!CWndTaskBarInterface::IsLock())
  3602.         {
  3603.             if (m_paltSlotOpen == FALSE)
  3604.             {
  3605.                 pWndTaskBar_HUD_EX1->SetVisible(TRUE);
  3606.                 m_paltSlotOpen = TRUE;
  3607.                 g_Option.m_nTBDisplay = 1;
  3608.                 break;
  3609.             }
  3610.             if (m_pfSlotOpen == FALSE)
  3611.             {
  3612.                 pWndTaskBar_HUD_EX2->SetVisible(TRUE);
  3613.                 m_pfSlotOpen = TRUE;
  3614.                 g_Option.m_nTBDisplay = 2;
  3615.                 break;
  3616.             }
  3617.             if (m_pAppletSlotOpen == FALSE)
  3618.             {
  3619.                 pWndTaskBar_HUD_EX3->SetVisible(TRUE);
  3620.                 m_pAppletSlotOpen = TRUE;
  3621.                 g_Option.m_nTBDisplay = 3;
  3622.                 break;
  3623.             }
  3624.         }
  3625.         break;
  3626.     }
  3627.     case WIDC_BUTTON3:
  3628.     {
  3629.         if (!CWndTaskBarInterface::IsLock())
  3630.         {
  3631.             if (pWndTaskBar_HUD_EX3->IsVisible())
  3632.             {
  3633.                 pWndTaskBar_HUD_EX3->SetVisible(FALSE);
  3634.                 m_pAppletSlotOpen = FALSE;
  3635.                 g_Option.m_nTBDisplay = 2;
  3636.                 break;
  3637.             }
  3638.             else if (pWndTaskBar_HUD_EX2->IsVisible())
  3639.             {
  3640.                 pWndTaskBar_HUD_EX2->SetVisible(FALSE);
  3641.                 m_pfSlotOpen = FALSE;
  3642.                 g_Option.m_nTBDisplay = 1;
  3643.                 break;
  3644.             }
  3645.             else if (pWndTaskBar_HUD_EX1->IsVisible())
  3646.             {
  3647.                 pWndTaskBar_HUD_EX1->SetVisible(FALSE);
  3648.                 m_paltSlotOpen = FALSE;
  3649.                 g_Option.m_nTBDisplay = 0;
  3650.                 break;
  3651.             }
  3652.         }
  3653.         break;
  3654.     }
  3655.     case WIDC_BUTTON4:
  3656.     {
  3657.         if (!CWndTaskBarInterface::IsLock())
  3658.             ScrollTaskBars();
  3659.         break;
  3660.     }
  3661.     }
  3662.  
  3663.     return TRUE;
  3664. }
  3665.  
  3666. void CWndTaskBar_HUD::ScrollTaskBars()
  3667. {
  3668.     for (int i = 0; i < 10; ++i)
  3669.     {
  3670.         SHORTCUT scTemp = *m_pSlotItem[i];
  3671.         *m_pSlotItem[i] = *pWndTaskBar_HUD_EX1->m_pSlotItem[i];
  3672.         *pWndTaskBar_HUD_EX1->m_pSlotItem[i] = *pWndTaskBar_HUD_EX2->m_pSlotItem[i];
  3673.         *pWndTaskBar_HUD_EX2->m_pSlotItem[i] = scTemp;
  3674.     }
  3675.  
  3676.     g_DPlay.SendScrollTaskBar();
  3677. }
  3678.  
  3679. void CWndTaskBar_HUD::OnMouseWndSurface(CPoint point)
  3680. {
  3681.     CWndTaskBarInterface::OnMouseWndSurface(point);
  3682. }
  3683.  
  3684. BOOL CWndTaskBar_HUD_EX3::Initialize(CWndBase* pWndParent, DWORD dwType)
  3685. {
  3686.     return CWndNeuz::InitDialog(g_Neuz.GetSafeHwnd(), APP_NEWTASKBAR04, WBS_MANAGER | WBS_SOUND, CPoint(0, 0), pWndParent);
  3687. }
  3688.  
  3689. void CWndTaskBar_HUD_EX3::OnInitialUpdate(void)
  3690. {
  3691.     CWndTaskBarInterface::OnInitialUpdate();
  3692.  
  3693.     m_nSlotIndex = 3;
  3694.     CRect rectRoot = m_pWndRoot->GetLayoutRect();
  3695.     CRect rectWindow = GetWindowRect();
  3696.     CRect rect = g_Neuz.GetDeviceRect();
  3697.     CPoint point(rectRoot.right - rectWindow.Width(), (rect.Height() - rectWindow.Height()) / 2);
  3698.     Move(point);
  3699.  
  3700.     CWndStatic* pStatic = (CWndStatic*)GetDlgItem(WIDC_STATIC1);
  3701.     CWndStatic* pStatic2 = (CWndStatic*)GetDlgItem(WIDC_STATIC2);
  3702.     pStatic->Move(rectWindow.right + 40, rectWindow.bottom + 40);
  3703.     pStatic2->Move(rectWindow.right + 40, rectWindow.bottom + 40);
  3704.     DelWndStyle(WBS_MOVE);
  3705.     RestoreDeviceObjects();
  3706. }
  3707.  
  3708. BOOL CWndTaskBar_HUD_EX1::Initialize(CWndBase* pWndParent, DWORD dwType)
  3709. {
  3710.     return CWndNeuz::InitDialog(g_Neuz.GetSafeHwnd(), APP_NEWTASKBAR03, WBS_MANAGER | WBS_SOUND, CPoint(0, 0), pWndParent);
  3711. }
  3712.  
  3713. void CWndTaskBar_HUD_EX1::OnDraw(C2DRender* p2DRender)
  3714. {
  3715.     if (IsValidObj(g_pPlayer))
  3716.     {
  3717.         CWndTaskBarInterface::OnDraw(p2DRender);
  3718.         for (int i = 0; i < 10; i++)
  3719.         {
  3720.             CString szTemp;
  3721.             CPoint point = CPoint(wndCtrl[i]->rect.left, wndCtrl[i]->rect.top);
  3722.             switch (i)
  3723.             {
  3724.             case 0: { szTemp = "A1"; break; }
  3725.             case 1: { szTemp = "A2"; break; }
  3726.             case 2: { szTemp = "A3"; break; }
  3727.             case 3: { szTemp = "A4"; break; }
  3728.             case 4: { szTemp = "A5"; break; }
  3729.             case 5: { szTemp = "A6"; break; }
  3730.             case 6: { szTemp = "A7"; break; }
  3731.             case 7: { szTemp = "A8"; break; }
  3732.             case 8: { szTemp = "A9"; break; }
  3733.             case 9: { szTemp = "A0"; break; }
  3734.             }
  3735.             point.x += 4;
  3736.             CD3DFont* pOldFont = p2DRender->GetFont();
  3737.             p2DRender->SetFont(CWndBase::m_Theme.m_pFontWndTitle);
  3738.             p2DRender->TextOut((1 + (point.x / point.x + point.x)), point.y - 8, szTemp);
  3739.             p2DRender->SetFont(pOldFont);
  3740.         }
  3741.     }
  3742. }
  3743.  
  3744. void CWndTaskBar_HUD_EX1::OnInitialUpdate(void)
  3745. {
  3746.     CWndTaskBarInterface::OnInitialUpdate();
  3747.     m_nActionListener[0] = '1';
  3748.     m_nActionListener[1] = '2';
  3749.     m_nActionListener[2] = '3';
  3750.     m_nActionListener[3] = '4';
  3751.     m_nActionListener[4] = '5';
  3752.     m_nActionListener[5] = '6';
  3753.     m_nActionListener[6] = '7';
  3754.     m_nActionListener[7] = '8';
  3755.     m_nActionListener[8] = '9';
  3756.     m_nActionListener[9] = '0';
  3757.     m_bReqAlt = true;
  3758.     m_nSlotIndex = 1;
  3759.  
  3760.     CRect rectRoot = m_pWndRoot->GetLayoutRect();
  3761.     CRect rectWindow = GetWindowRect();
  3762.     CRect rect = g_Neuz.GetDeviceRect();
  3763.  
  3764.     CPoint point(rectRoot.right - rectWindow.Width() - 185, rect.Height() - rectWindow.Height() - 70);
  3765.     Move(point);
  3766.  
  3767.     CWndStatic* pStatic = (CWndStatic*)GetDlgItem(WIDC_STATIC1);
  3768.     CWndStatic* pStatic2 = (CWndStatic*)GetDlgItem(WIDC_STATIC2);
  3769.     pStatic->Move(rectWindow.right + 40, rectWindow.bottom + 40);
  3770.     pStatic2->Move(rectWindow.right + 40, rectWindow.bottom + 40);
  3771.  
  3772.     RestoreDeviceObjects();
  3773.     DelWndStyle(WBS_MOVE);
  3774. }
  3775.  
  3776. BOOL CWndTaskBar_HUD_EX2::Initialize(CWndBase* pWndParent, DWORD dwType)
  3777. {
  3778.     return CWndNeuz::InitDialog(g_Neuz.GetSafeHwnd(), APP_NEWTASKBAR03, WBS_MANAGER | WBS_SOUND, CPoint(0, 0), pWndParent);
  3779. }
  3780.  
  3781. void CWndTaskBar_HUD_EX2::OnDraw(C2DRender* p2DRender)
  3782. {
  3783.     CWndTaskBarInterface::OnDraw(p2DRender);
  3784.     for (int i = 0; i < 10; i++)
  3785.     {
  3786.         CString szTemp;
  3787.         CPoint point = CPoint(wndCtrl[i]->rect.left, wndCtrl[i]->rect.top);
  3788.         switch (i)
  3789.         {
  3790.         case 0: { szTemp = "F1"; break; }
  3791.         case 1: { szTemp = "F2"; break; }
  3792.         case 2: { szTemp = "F3"; break; }
  3793.         case 3: { szTemp = "F4"; break; }
  3794.         case 4: { szTemp = "F5"; break; }
  3795.         case 5: { szTemp = "F6"; break; }
  3796.         case 6: { szTemp = "F7"; break; }
  3797.         case 7: { szTemp = "F8"; break; }
  3798.         case 8: { szTemp = "F9"; break; }
  3799.         case 9: { szTemp = "F10"; break; }
  3800.         }
  3801.         point.x += 2;
  3802.         CD3DFont* pOldFont = p2DRender->GetFont();
  3803.         p2DRender->SetFont(CWndBase::m_Theme.m_pFontWndTitle);
  3804.         p2DRender->TextOut((1 + (point.x / point.x + point.x)), point.y - 8, szTemp);
  3805.         p2DRender->SetFont(pOldFont);
  3806.     }
  3807. }
  3808.  
  3809. void CWndTaskBar_HUD_EX2::OnInitialUpdate(void)
  3810. {
  3811.     CWndTaskBarInterface::OnInitialUpdate();
  3812.     m_nActionListener[0] = VK_F1;
  3813.     m_nActionListener[1] = VK_F2;
  3814.     m_nActionListener[2] = VK_F3;
  3815.     m_nActionListener[3] = VK_F4;
  3816.     m_nActionListener[4] = VK_F5;
  3817.     m_nActionListener[5] = VK_F6;
  3818.     m_nActionListener[6] = VK_F7;
  3819.     m_nActionListener[7] = VK_F8;
  3820.     m_nActionListener[8] = VK_F9;
  3821.     m_nActionListener[9] = VK_F10;
  3822.     m_nSlotIndex = 2;
  3823.  
  3824.     CRect rectRoot = m_pWndRoot->GetLayoutRect();
  3825.     CRect rectWindow = GetWindowRect();
  3826.     CRect rect = g_Neuz.GetDeviceRect();
  3827.  
  3828.     CPoint point(rectRoot.right - rectWindow.Width() - 185, rect.Height() - rectWindow.Height() - 115);
  3829.     Move(point);
  3830.  
  3831.     CWndStatic* pStatic = (CWndStatic*)GetDlgItem(WIDC_STATIC1);
  3832.     CWndStatic* pStatic2 = (CWndStatic*)GetDlgItem(WIDC_STATIC2);
  3833.     pStatic->Move(rectWindow.right + 40, rectWindow.bottom + 40);
  3834.     pStatic2->Move(rectWindow.right + 40, rectWindow.bottom + 40);
  3835.  
  3836.     DelWndStyle(WBS_MOVE);
  3837.     RestoreDeviceObjects();
  3838. }
  3839.  
  3840. class CTimers
  3841. {
  3842. public:
  3843.     CTimers(void)
  3844.     {
  3845.         dwStop = 0;
  3846.     }
  3847.     ~CTimers(void)
  3848.     {
  3849.     }
  3850.     void Start(float fSec)
  3851.     {
  3852.         dwStop = (DWORD)(fSec * 1) + timeGetTime();
  3853.     }
  3854.     void Stop(void)
  3855.     {
  3856.         dwStop = 0;
  3857.     }
  3858.     float TimeLeft(void)
  3859.     {
  3860.         if (Running())
  3861.             return (((float)(dwStop - timeGetTime()) / 1));
  3862.  
  3863.         return 0;
  3864.     }
  3865.     bool Running(void)
  3866.     {
  3867.         return (dwStop > timeGetTime());
  3868.     }
  3869.  
  3870. protected:
  3871.     DWORD dwStop;
  3872. };
  3873.  
  3874. CTimers RotateTimer;
  3875.  
  3876. CWndNewSkillSlot::CWndNewSkillSlot(void)
  3877. {
  3878.     rotates = 0;
  3879.     RotateAllEffect = 1;
  3880.     RotateSkillEffect = 1;
  3881.  
  3882.     Time = 0;
  3883.  
  3884.     m_RotateAtiv = FALSE;
  3885.     m_SFire0 = NULL;
  3886.     m_SFire1 = NULL;
  3887.     m_SFire2 = NULL;
  3888.     m_SFire3 = NULL;
  3889.     m_SFire4 = NULL;
  3890.     m_SFire5 = NULL;
  3891.     m_SFireALPHA0 = 0;
  3892.  
  3893.     m_DROPFireALPHA = 0;
  3894.     m_bFireFLASH = TRUE;
  3895.  
  3896.     m_USEFireALPHA = 115;
  3897.  
  3898.     m_pSelectShortcut = NULL;
  3899.     m_aSlotSkill.Empty();
  3900.  
  3901.     memset(m_pSlotQueue, 0, sizeof(m_pSlotQueue));
  3902.     for (int i = 0; i < 6; i++)
  3903.     {
  3904.         m_SlotEffectSoltaAL = 0;
  3905.         slot1[i] = NULL;
  3906.         slot12[i] = NULL;
  3907.         m_bFlash = TRUE;
  3908.         m_SURF_FIRE[i] = NULL;
  3909.  
  3910.         m_nFlashAlpha[i] = 0;
  3911.         m_SURF_FireALPHA[i] = 0;
  3912.         m_bSURF_FireFLASH = TRUE;
  3913.         bRenderIllu[i] = false;
  3914.     }
  3915.  
  3916.     m_nActionSlot = 0;
  3917.     EffectRotate = 0;
  3918.     m_pTexture = NULL;
  3919.     rotate = 0;
  3920.     rotate1 = 0.0f;
  3921.     rotate2 = 0.0f;
  3922.     rotate3 = 5.0f;
  3923.     rot1 = TRUE;
  3924.     rot3 = FALSE;
  3925.     reload = FALSE;
  3926.     xPos = 0.0f;
  3927.     zPos = -5.0f;
  3928.  
  3929.     xPosition[0] = 0;
  3930.     yPosition[0] = 50.5f;
  3931.     xPosition[1] = 44;
  3932.     yPosition[1] = 24.5f;
  3933.     xPosition[2] = 44;
  3934.     yPosition[2] = -25.5f;
  3935.     xPosition[3] = 0;
  3936.     yPosition[3] = -50.5f;
  3937.     xPosition[4] = -44;
  3938.     yPosition[4] = -25.5f;
  3939.     xPosition[5] = -44;
  3940.     yPosition[5] = 24.5f;
  3941.  
  3942.     usedskill1 = usedskill2 = usedskill3 = usedskill4 = usedskill5 = FALSE;
  3943.     fusedskill1 = fusedskill2 = fusedskill3 = fusedskill4 = fusedskill5 = FALSE;
  3944.     useskill = FALSE;
  3945.  
  3946.     RotateSLOT = false;
  3947.     m_tmStartCoolDown = clock();
  3948.     m_tmCoolDown = clock();
  3949.     m_bStopCoolDown = false;
  3950.     RotateCoolDownEffect = 721;
  3951.     m_bArrival = false;
  3952. }
  3953.  
  3954. CWndNewSkillSlot::~CWndNewSkillSlot(void)
  3955. {
  3956.     for (int i = 0; i < 6; i++)
  3957.     {
  3958.         slot1[i] = NULL;
  3959.         slot12[i] = NULL;
  3960.         m_SURF_FIRE[i] = NULL;
  3961.     }
  3962.  
  3963.     CWndBase::m_textureMng.RemoveTexture(MakePath(DIR_THEME, "slot02.tga"));
  3964.     CWndBase::m_textureMng.RemoveTexture(MakePath(DIR_THEME, "slot03.tga"));
  3965.  
  3966.     m_SFire0 = NULL;
  3967.     m_SFire1 = NULL;
  3968.     m_SFire2 = NULL;
  3969.     m_SFire3 = NULL;
  3970.     m_SFire4 = NULL;
  3971.     m_SFire5 = NULL;
  3972.     m_pTexture = NULL;
  3973.  
  3974.     CWndBase::DeleteDeviceObjects();
  3975. }
  3976.  
  3977. BOOL CWndNewSkillSlot::Initialize(CWndBase* pWndParent, DWORD dwType)
  3978. {
  3979.     return CWndNeuz::InitDialog(g_Neuz.GetSafeHwnd(), APP_SLOT, WBS_MANAGER | WBS_SOUND, CPoint(0, 0), pWndParent);
  3980. }
  3981.  
  3982. BOOL CWndNewSkillSlot::OnCommand(UINT nID, DWORD dwMessage, CWndBase* pWndBase)
  3983. {
  3984.     return CWndNeuz::OnCommand(nID, dwMessage, pWndBase);
  3985. }
  3986.  
  3987. void CWndNewSkillSlot::OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags)
  3988. {
  3989.     CWndNeuz::OnKeyUp(nChar, nRepCnt, nFlags);
  3990. }
  3991.  
  3992. void CWndNewSkillSlot::OnSize(UINT nType, int cx, int cy)
  3993. {
  3994.     CWndNeuz::OnSize(nType, cx, cy);
  3995. }
  3996.  
  3997. void CWndNewSkillSlot::OnRButtonUp(UINT nFlags, CPoint point)
  3998. {
  3999.     if (m_pSelectShortcut != NULL)
  4000.     {
  4001.         if (m_pSelectShortcut->m_dwShortcut == SHORTCUT_SKILL)
  4002.         {
  4003.             g_WndMng.m_pWndTaskBar->RemoveSkillQueue(m_pSlotQueue[m_pSelectShortcut->m_dwIndex]->m_dwIndex);
  4004.             m_pSelectShortcut = m_pSlotQueue[0];
  4005.         }
  4006.     }
  4007.  
  4008.     ReleaseCapture();
  4009. }
  4010.  
  4011. void CWndNewSkillSlot::OnLButtonUp(UINT nFlags, CPoint point)
  4012. {
  4013.     CWndNewSkillSlot* m_SkillSL = (CWndNewSkillSlot*)g_WndMng.GetWndBase(APP_SLOT);
  4014.     LPSHORTCUT pShortcut = NULL;
  4015.     CWorld* pWorld = g_WorldMng.Get();
  4016.     if (PtInRect(SlotCustom->rect, point))
  4017.     {
  4018.         if (clock() < m_SkillSL->m_tmCoolDown || m_SkillSL->m_bStopCoolDown)
  4019.         {
  4020.             return;
  4021.         }
  4022.         if (g_WndMng.m_pWndTaskBar->m_nExecute == 0)
  4023.         {
  4024.             if ((g_WndMng.m_pWndTaskBar->m_nUsedSkillQueue == 0) && (m_SkillSL->m_nActionSlot > 0))
  4025.             {
  4026.                 g_WndMng.m_pWndWorld->m_dwNextSkill = NEXTSKILL_ACTIONSLOT;
  4027.             }
  4028.         }
  4029.     }
  4030.  
  4031.     ReleaseCapture();
  4032. }
  4033.  
  4034. void CWndNewSkillSlot::OnLButtonDblClk(UINT nFlags, CPoint point)
  4035. {
  4036. }
  4037.  
  4038. void CWndNewSkillSlot::OnRButtonDblClk(UINT nFlags, CPoint point)
  4039. {
  4040.     CPoint PTM = CPoint(SlotRt->m_ptCenter.x - 36, SlotRt->m_ptCenter.y);
  4041.     CTRECT[0] = CRect(PTM.x + 97, PTM.y + 116, PTM.x + 97 + 34, PTM.y + 116 + 34);
  4042.     CTRECT[1] = CRect(PTM.x + 141, PTM.y + 90, PTM.x + 141 + 34, PTM.y + 90 + 34);
  4043.     CTRECT[2] = CRect(PTM.x + 141, PTM.y + 40, PTM.x + 141 + 34, PTM.y + 40 + 34);
  4044.     CTRECT[3] = CRect(PTM.x + 97, PTM.y + 15, PTM.x + 97 + 34, PTM.y + 15 + 34);
  4045.     CTRECT[4] = CRect(PTM.x + 53, PTM.y + 40, PTM.x + 53 + 34, PTM.y + 40 + 34);
  4046.     CTRECT[5] = CRect(PTM.x + 53, PTM.y + 90, PTM.x + 53 + 34, PTM.y + 90 + 34);
  4047.  
  4048.     if (m_bLButtonDown && IsPush())
  4049.     {
  4050.         for (int i = 0; i < MAX_SLOT_QUEUE; i++)
  4051.         {
  4052.             if (CTRECT[i].PtInRect(GetMousePoint()))
  4053.             {
  4054.                 g_WndMng.m_pWndTaskBar->RemoveSkillQueue(m_pSlotQueue[i]->m_dwIndex);
  4055.             }
  4056.         }
  4057.     }
  4058. }
  4059.  
  4060. BOOL CWndNewSkillSlot::Process(void)
  4061. {
  4062.     if ((m_pSlotQueue[0]->m_dwShortcut != SHORTCUT_NONE) && (m_pSlotQueue[0]->m_pTexture != NULL))
  4063.     {
  4064.         m_nActionSlot = 1;
  4065.     }
  4066.     else
  4067.     {
  4068.         m_nActionSlot = NULL;
  4069.     }
  4070.  
  4071.     m_DROPFireALPHA -= 5;
  4072.  
  4073.     if (m_DROPFireALPHA < 5)
  4074.     {
  4075.         m_DROPFireALPHA = 0;
  4076.     }
  4077.  
  4078.     if (RotateSLOT == rotate1 && m_USEFireALPHA != 115 && g_WndMng.m_pWndTaskBar->m_nExecute > 0 && useskill)
  4079.     {
  4080.         m_USEFireALPHA += 3;
  4081.         if (m_USEFireALPHA >= 200)
  4082.         {
  4083.             int nPos = (int)RotateSLOT / 60;
  4084.             bRenderIllu[nPos] = true;
  4085.         }
  4086.         if (m_USEFireALPHA >= 255)
  4087.         {
  4088.             m_USEFireALPHA = 115;
  4089.         }
  4090.     }
  4091.  
  4092.     if (m_bFireFLASH == TRUE)
  4093.     {
  4094.         m_SFireALPHA0 += 4;
  4095.  
  4096.         if ((m_SFireALPHA0 > 80))
  4097.         {
  4098.             m_SFireALPHA0 = 80;
  4099.             m_bFireFLASH = FALSE;
  4100.         }
  4101.     }
  4102.     else
  4103.     {
  4104.         m_SFireALPHA0 -= 4;
  4105.  
  4106.         if ((m_SFireALPHA0 < 10))
  4107.         {
  4108.             m_SFireALPHA0 = 10;
  4109.             m_bFireFLASH = TRUE;
  4110.         }
  4111.     }
  4112.  
  4113.     for (int i = 0; i < 6; i++)
  4114.     {
  4115.         if (m_bFlash == TRUE)
  4116.         {
  4117.             m_nFlashAlpha[i] += 8;
  4118.             if ((m_nFlashAlpha[i] > 250))
  4119.             {
  4120.                 m_nFlashAlpha[i] = 250;
  4121.                 m_bFlash = FALSE;
  4122.             }
  4123.         }
  4124.         else
  4125.         {
  4126.             m_nFlashAlpha[i] -= 8;
  4127.             if ((m_nFlashAlpha[i] < 80))
  4128.             {
  4129.                 m_nFlashAlpha[i] = 80;
  4130.                 m_bFlash = TRUE;
  4131.             }
  4132.         }
  4133.     }
  4134.  
  4135.     CPoint PTM = CPoint(SlotRt->m_ptCenter.x - 36, SlotRt->m_ptCenter.y);
  4136.     CTRECT[0] = CRect(PTM.x + 97, PTM.y + 116, PTM.x + 97 + 34, PTM.y + 116 + 34);
  4137.     CTRECT[1] = CRect(PTM.x + 141, PTM.y + 90, PTM.x + 141 + 34, PTM.y + 90 + 34);
  4138.     CTRECT[2] = CRect(PTM.x + 141, PTM.y + 40, PTM.x + 141 + 34, PTM.y + 40 + 34);
  4139.     CTRECT[3] = CRect(PTM.x + 97, PTM.y + 15, PTM.x + 97 + 34, PTM.y + 15 + 34);
  4140.     CTRECT[4] = CRect(PTM.x + 53, PTM.y + 40, PTM.x + 53 + 34, PTM.y + 40 + 34);
  4141.     CTRECT[5] = CRect(PTM.x + 53, PTM.y + 90, PTM.x + 53 + 34, PTM.y + 90 + 34);
  4142.  
  4143.     for (int i = 0; i < MAX_SLOT_QUEUE; i++)
  4144.     {
  4145.         BOOL bInRect = CTRECT[i].PtInRect(GetMousePoint());
  4146.         if (!bInRect)
  4147.         {
  4148.             m_SURF_FIRE[i] = NULL;
  4149.         }
  4150.         else
  4151.         {
  4152.             if (m_SURF_FIRE[i] != NULL)
  4153.             {
  4154.                 if (m_bSURF_FireFLASH == TRUE)
  4155.                 {
  4156.                     m_SURF_FireALPHA[i] += 10;
  4157.                     if ((m_SURF_FireALPHA[i] > 250))
  4158.                     {
  4159.                         m_SURF_FireALPHA[i] = 250;
  4160.                         PLAYSND(SND_PC_ACTIONSLOTMOVE01);
  4161.                         m_bSURF_FireFLASH = FALSE;
  4162.                     }
  4163.                 }
  4164.                 else
  4165.                 {
  4166.                     m_SURF_FireALPHA[i] -= 10;
  4167.                     if ((m_SURF_FireALPHA[i] < 50))
  4168.                     {
  4169.                         m_SURF_FireALPHA[i] = 50;
  4170.                         m_bSURF_FireFLASH = TRUE;
  4171.                     }
  4172.                 }
  4173.             }
  4174.         }
  4175.     }
  4176.  
  4177.     return CWndBase::Process();
  4178. }
  4179.  
  4180. void CWndNewSkillSlot::OnRButtonDown(UINT nFlags, CPoint point)
  4181. {
  4182.     LPSHORTCUT pShortcut = NULL;
  4183.     CPoint PTM = CPoint(SlotRt->m_ptCenter.x - 36, SlotRt->m_ptCenter.y);
  4184.     CTRECT[0] = CRect(PTM.x + 97, PTM.y + 116, PTM.x + 97 + 34, PTM.y + 116 + 34);
  4185.     CTRECT[1] = CRect(PTM.x + 141, PTM.y + 90, PTM.x + 141 + 34, PTM.y + 90 + 34);
  4186.     CTRECT[2] = CRect(PTM.x + 141, PTM.y + 40, PTM.x + 141 + 34, PTM.y + 40 + 34);
  4187.     CTRECT[3] = CRect(PTM.x + 97, PTM.y + 15, PTM.x + 97 + 34, PTM.y + 15 + 34);
  4188.     CTRECT[4] = CRect(PTM.x + 53, PTM.y + 40, PTM.x + 53 + 34, PTM.y + 40 + 34);
  4189.     CTRECT[5] = CRect(PTM.x + 53, PTM.y + 90, PTM.x + 53 + 34, PTM.y + 90 + 34);
  4190.  
  4191.     for (int i = 0; i < 6; i++)
  4192.     {
  4193.         if (SlotCustom->rect.PtInRect(point))
  4194.         {
  4195.             &CWndBase::OnRButtonDown;
  4196.         }
  4197.         if (PtInRect(CTRECT[i], point))
  4198.         {
  4199.             CRect rect = CTRECT[i];
  4200.             ClientToScreen(&point);
  4201.             ClientToScreen(&rect);
  4202.             m_pSelectShortcut = m_pSlotQueue[i];
  4203.  
  4204.             SetCapture();
  4205.         }
  4206.     }
  4207. }
  4208.  
  4209. void CWndNewSkillSlot::OnLButtonDown(UINT nFlags, CPoint point)
  4210. {
  4211.     LPSHORTCUT pShortcut = NULL;
  4212.     CPoint PTM = CPoint(SlotRt->m_ptCenter.x - 36, SlotRt->m_ptCenter.y);
  4213.     CTRECT[0] = CRect(PTM.x + 97, PTM.y + 116, PTM.x + 97 + 34, PTM.y + 116 + 34);
  4214.     CTRECT[1] = CRect(PTM.x + 141, PTM.y + 90, PTM.x + 141 + 34, PTM.y + 90 + 34);
  4215.     CTRECT[2] = CRect(PTM.x + 141, PTM.y + 40, PTM.x + 141 + 34, PTM.y + 40 + 34);
  4216.     CTRECT[3] = CRect(PTM.x + 97, PTM.y + 15, PTM.x + 97 + 34, PTM.y + 15 + 34);
  4217.     CTRECT[4] = CRect(PTM.x + 53, PTM.y + 40, PTM.x + 53 + 34, PTM.y + 40 + 34);
  4218.     CTRECT[5] = CRect(PTM.x + 53, PTM.y + 90, PTM.x + 53 + 34, PTM.y + 90 + 34);
  4219.  
  4220.     for (int i = 0; i < MAX_SLOT_QUEUE; i++)
  4221.     {
  4222.         if (PtInRect(CTRECT[i], point))
  4223.         {
  4224.             CRect rect = CTRECT[i];
  4225.             ClientToScreen(&point);
  4226.             ClientToScreen(&rect);
  4227.  
  4228.             m_pSelectShortcut = m_pSlotQueue[i];
  4229.             SetCapture();
  4230.         }
  4231.     }
  4232.     if (SlotCustom->rect.PtInRect(point))
  4233.     {
  4234.         m_aSlotSkill.m_dwShortcut = SHORTCUT_SKILLFUN;
  4235.         m_pSelectShortcut = &m_aSlotSkill;
  4236.     }
  4237. }
  4238.  
  4239. void CWndNewSkillSlot::OnMouseMove(UINT nFlags, CPoint point)
  4240. {
  4241.     CPoint PTM = CPoint(SlotRt->m_ptCenter.x - 36, SlotRt->m_ptCenter.y);
  4242.     CTRECT[0] = CRect(PTM.x + 97, PTM.y + 116, PTM.x + 97 + 34, PTM.y + 116 + 34);
  4243.     CTRECT[1] = CRect(PTM.x + 141, PTM.y + 90, PTM.x + 141 + 34, PTM.y + 90 + 34);
  4244.     CTRECT[2] = CRect(PTM.x + 141, PTM.y + 40, PTM.x + 141 + 34, PTM.y + 40 + 34);
  4245.     CTRECT[3] = CRect(PTM.x + 97, PTM.y + 15, PTM.x + 97 + 34, PTM.y + 15 + 34);
  4246.     CTRECT[4] = CRect(PTM.x + 53, PTM.y + 40, PTM.x + 53 + 34, PTM.y + 40 + 34);
  4247.     CTRECT[5] = CRect(PTM.x + 53, PTM.y + 90, PTM.x + 53 + 34, PTM.y + 90 + 34);
  4248.  
  4249.     if (m_bLButtonDown && IsPush())
  4250.     {
  4251.         for (int i = 0; i < MAX_SLOT_QUEUE; i++)
  4252.         {
  4253.             if (CTRECT[i].PtInRect(GetMousePoint()))
  4254.             {
  4255.                 if (m_pSelectShortcut)
  4256.                 {
  4257.                     memcpy(&m_GlobalShortcut, m_pSelectShortcut, sizeof(m_GlobalShortcut));
  4258.                     m_GlobalShortcut.m_pFromWnd = this;
  4259.                     m_GlobalShortcut.m_dwData = (DWORD)m_pSelectShortcut;
  4260.                     m_pSelectShortcut = NULL;
  4261.                 }
  4262.             }
  4263.         }
  4264.     }
  4265.  
  4266.     CWndNeuz::OnMouseMove(nFlags, point);
  4267. }
  4268.  
  4269. BOOL CWndNewSkillSlot::OnDropIcon(LPSHORTCUT pShortcut, CPoint point)
  4270. {
  4271.     CPoint point2;
  4272.     CPoint PTM = CPoint(SlotRt->m_ptCenter.x - 36, SlotRt->m_ptCenter.y);
  4273.     CTRECT[0] = CRect(PTM.x + 97, PTM.y + 116, PTM.x + 97 + 34, PTM.y + 116 + 36);
  4274.     CTRECT[1] = CRect(PTM.x + 141, PTM.y + 90, PTM.x + 141 + 34, PTM.y + 90 + 36);
  4275.     CTRECT[2] = CRect(PTM.x + 141, PTM.y + 40, PTM.x + 141 + 34, PTM.y + 40 + 36);
  4276.     CTRECT[3] = CRect(PTM.x + 97, PTM.y + 15, PTM.x + 97 + 34, PTM.y + 15 + 36);
  4277.     CTRECT[4] = CRect(PTM.x + 53, PTM.y + 40, PTM.x + 53 + 34, PTM.y + 40 + 36);
  4278.     CTRECT[5] = CRect(PTM.x + 53, PTM.y + 90, PTM.x + 53 + 34, PTM.y + 90 + 36);
  4279.  
  4280.     if (pShortcut->m_dwShortcut != SHORTCUT_SKILL && pShortcut->m_dwShortcut != SHORTCUT_LORDSKILL)
  4281.     {
  4282.         return FALSE;
  4283.     }
  4284.     CRect rect = GetWindowRect();
  4285.     rect.DeflateRect(3, 3);
  4286.  
  4287.     if ((pShortcut->m_pFromWnd == this) && (pShortcut->m_dwShortcut != SHORTCUT_SKILLFUN))
  4288.     {
  4289.         LPSHORTCUT lpShortcut = (LPSHORTCUT)pShortcut->m_dwData;
  4290.         if (GetClientRect().PtInRect(point) == FALSE)
  4291.         {
  4292.             g_WndMng.m_pWndTaskBar->RemoveSkillQueue(lpShortcut->m_dwIndex);
  4293.             return TRUE;
  4294.         }
  4295.     }
  4296.     CWndBase* pWndFrame = pShortcut->m_pFromWnd->GetFrameWnd();
  4297.  
  4298.     if (pWndFrame && (pWndFrame->GetWndId() != APP_INVENTORY
  4299.         && pWndFrame != g_WndMng.m_pWndTaskBar && pWndFrame->GetWndId() != APP_COMMUNICATION_CHAT
  4300.         && pWndFrame->GetWndId() != APP_SKILL4 && pWndFrame->GetWndId() != APP_MOTION && pWndFrame->GetWndId() != APP_PARTY
  4301.         && pWndFrame->GetWndId() != APP_LORD_SKILL && pWndFrame->GetWndId() != APP_NEWTASKBAR
  4302.         && pWndFrame->GetWndId() != APP_NEWTASKBAR02 && pWndFrame->GetWndId() != APP_NEWTASKBAR03
  4303.         && pWndFrame->GetWndId() != APP_NEWTASKBAR04 && pWndFrame->GetWndId() != APP_SLOT))
  4304.     {
  4305.         SetForbid(TRUE);
  4306.         return FALSE;
  4307.     }
  4308.  
  4309.     for (int i = 0; i < 6; i++)
  4310.     {
  4311.         PLAYSND(SND_PC_ACTIONREGISTER);
  4312.         if (PtInRect(CTRECT[i], point))
  4313.         {
  4314.             CRect rect = CTRECT[i];
  4315.             ClientToScreen(&point);
  4316.             ClientToScreen(&rect);
  4317.  
  4318.             if (m_pSlotQueue[0]->m_dwShortcut == SHORTCUT_NONE)
  4319.                 i = 0;
  4320.             else if (m_pSlotQueue[1]->m_dwShortcut == SHORTCUT_NONE)
  4321.                 i = 1;
  4322.             else if (m_pSlotQueue[2]->m_dwShortcut == SHORTCUT_NONE)
  4323.                 i = 2;
  4324.             else if (m_pSlotQueue[3]->m_dwShortcut == SHORTCUT_NONE)
  4325.                 i = 3;
  4326.             else if (m_pSlotQueue[4]->m_dwShortcut == SHORTCUT_NONE)
  4327.                 i = 4;
  4328.             else if (m_pSlotQueue[5]->m_dwShortcut == SHORTCUT_NONE)
  4329.                 i = 5;
  4330.             else
  4331.             {
  4332.                 SetForbid(TRUE);
  4333.                 return FALSE;
  4334.             }
  4335.             if (g_WndMng.m_pWndTaskBar->SetSkillQueue(i, pShortcut->m_dwType, pShortcut->m_dwId, pShortcut->m_pTexture))
  4336.                 m_DROPFireALPHA = 255;
  4337.             return TRUE;
  4338.         }
  4339.     }
  4340.  
  4341.     return TRUE;
  4342. }
  4343.  
  4344. void CWndNewSkillSlot::OnMouseWndSurface(CPoint point)
  4345. {
  4346.     CRect DrawRect[MAX_SLOT_QUEUE];
  4347.     for (int i = 0; i < MAX_SLOT_QUEUE; i++)
  4348.     {
  4349.         LPSHORTCUT lpShortcut = m_pSlotQueue[i];
  4350.         DrawRect[i] = CTRECT[i];
  4351.  
  4352.         if (DrawRect[i].PtInRect(point) && !g_WndMng.m_pLogOutWaitting)
  4353.         {
  4354.             CPoint point2 = point;
  4355.             ClientToScreen(&point2);
  4356.             ClientToScreen(&DrawRect[i]);
  4357.  
  4358.             if (!lpShortcut->IsEmpty())
  4359.             {
  4360.                 if (lpShortcut->m_dwShortcut == SHORTCUT_SKILL)
  4361.                 {
  4362.                     if (lpShortcut->m_dwType == 2)
  4363.                     {
  4364.                         g_WndMng.PutToolTip_Troupe(lpShortcut->m_dwId, point2, &DrawRect[i]);
  4365.                     }
  4366.                     else
  4367.                     {
  4368.                         LPSKILL lpSkill = g_pPlayer->GetSkill(0, lpShortcut->m_dwId);
  4369.                         g_WndMng.PutToolTip_Skill(lpSkill->dwSkill, lpSkill->dwLevel, point2, &DrawRect[i]);
  4370.                     }
  4371.                 }
  4372.             }
  4373.             if (m_SURF_FIRE[i] == NULL)
  4374.             {
  4375.                 m_SURF_FIRE[i] = CWndBase::m_textureMng.AddTexture(D3DDEVICE, MakePath(DIR_THEME, "ActionSlotEff.tga"), 0xffff00ff, TRUE);
  4376.             }
  4377.         }
  4378.         else
  4379.         {
  4380.             m_SURF_FIRE[i] = NULL;
  4381.         }
  4382.     }
  4383.  
  4384.     if (g_WndMng.m_pLogOutWaitting == NULL)
  4385.     {
  4386.         if (PtInRect(SlotCustom->rect, point))
  4387.         {
  4388.             CRect rect = SlotCustom->rect;
  4389.             CPoint point2 = point;
  4390.             ClientToScreen(&point2);
  4391.             ClientToScreen(&rect);
  4392.             g_toolTip.PutToolTip(100000, prj.GetText(TID_GAME_SKILLSHORTCUT), rect, point2);
  4393.         }
  4394.     }
  4395. }
  4396.  
  4397. void CWndNewSkillSlot::OnDraw(C2DRender* p2DRender)
  4398. {
  4399.     CRect rect = GetWindowRect();
  4400.     CPoint point;
  4401.     CPoint point2;
  4402.     CTexture* pTop, * pBottom;
  4403.     clock_t tmCur = clock();
  4404.  
  4405.     if (tmCur > m_tmCoolDown && RotateCoolDownEffect == 0)
  4406.     {
  4407.         m_bStopCoolDown = true;
  4408.         for (int i = 0; i < MAX_SLOT_QUEUE; i++)
  4409.             bRenderIllu[i] = false;
  4410.     }
  4411.     if (m_bStopCoolDown)
  4412.     {
  4413.         RotateCoolDownEffect++;
  4414.         if (RotateCoolDownEffect > 25)
  4415.         {
  4416.             PLAYSND(SND_PC_ACTIONOULINE01);
  4417.             m_bStopCoolDown = false;
  4418.             m_bArrival = false;
  4419.         }
  4420.     }
  4421.  
  4422.     pTop = CWndBase::m_textureMng.AddTexture(D3DDEVICE, MakePath(DIR_THEME, "slot02.tga"), 0xffff00ff, TRUE);
  4423.     pBottom = CWndBase::m_textureMng.AddTexture(D3DDEVICE, MakePath(DIR_THEME, "slot03.tga"), 0xffff00ff, TRUE);
  4424.  
  4425.     CPoint PTM = CPoint(SlotRt->m_ptCenter.x - 36, SlotRt->m_ptCenter.y);
  4426.  
  4427.     if (RotateSLOT != rotate1)
  4428.     {
  4429.         if (RotateSLOT > rotate1)
  4430.         {
  4431.             rotate1 += 10;
  4432.             if (rotate1 > RotateSLOT)
  4433.                 rotate1 = RotateSLOT - 10;
  4434.         }
  4435.         else
  4436.         {
  4437.             RotateSLOT = 0;
  4438.             rotate1 -= 6;
  4439.             if (rotate1 < RotateSLOT)
  4440.                 rotate1 = RotateSLOT;
  4441.         }
  4442.  
  4443.         for (int i = 0; i < 6; ++i)
  4444.         {
  4445.             float fAngle = 90 + rotate1 - 60 * i;
  4446.             float fRadianEnd;
  4447.             fRadianEnd = fAngle * (M_PI / 180);
  4448.             xPosition[i] = cos(fRadianEnd) * 50.5f;
  4449.             yPosition[i] = sin(fRadianEnd) * 50.5f;
  4450.         }
  4451.     }
  4452.  
  4453.     for (int i = 0; i < 6; ++i)
  4454.         m_wndCustom[i].SetWndRect(CRect((int)(xPosition[i] + 97 + PTM.x), (int)(yPosition[i] + 65.5f + PTM.y), 34, 34));
  4455.  
  4456.     CTRECT[0] = CRect(PTM.x + 97, PTM.y + 116, PTM.x + 97 + 34, PTM.y + 116 + 34);
  4457.     CTRECT[1] = CRect(PTM.x + 141, PTM.y + 90, PTM.x + 141 + 34, PTM.y + 90 + 34);
  4458.     CTRECT[2] = CRect(PTM.x + 141, PTM.y + 40, PTM.x + 141 + 34, PTM.y + 40 + 34);
  4459.     CTRECT[3] = CRect(PTM.x + 97, PTM.y + 15, PTM.x + 97 + 34, PTM.y + 15 + 34);
  4460.     CTRECT[4] = CRect(PTM.x + 53, PTM.y + 40, PTM.x + 53 + 34, PTM.y + 40 + 34);
  4461.     CTRECT[5] = CRect(PTM.x + 53, PTM.y + 90, PTM.x + 53 + 34, PTM.y + 90 + 34);
  4462.  
  4463.     if ((m_nActionSlot > 0) && (g_WndMng.m_pWndTaskBar->m_nExecute > 0))
  4464.     {
  4465.         float Time = 1000.0f;
  4466.         if (!RotateTimer.Running())
  4467.         {
  4468.             RotateTimer.Start(Time);
  4469.         }
  4470.         if (Time <= 1)
  4471.         {
  4472.             rotates += 180;
  4473.             Time += 1000.0f;
  4474.         }
  4475.     }
  4476.     else if ((m_nActionSlot == 0) && (g_WndMng.m_pWndTaskBar->m_nExecute == 0))
  4477.     {
  4478.         rotates = 0;
  4479.     }
  4480.  
  4481.     float fRadian = rotate1 * (M_PI / 180);
  4482.     SlotRt->RenderRotate(p2DRender, CPoint(0, 0), fRadian, TRUE, 255, 1.0f, 1.0f);
  4483.  
  4484.     if ((m_nActionSlot > 0) && (g_WndMng.m_pWndTaskBar->m_nExecute > 0))
  4485.         SlotEffect2->RenderRotate(p2DRender, CPoint(0, 0), fRadian, TRUE, m_nFlashAlpha[0], 1.0f, 1.0f);
  4486.     else
  4487.         SlotEffect2->Render(p2DRender, CPoint(0, 0), 0);
  4488.  
  4489.     for (int i = 0; i < MAX_SLOT_QUEUE; i++)
  4490.     {
  4491.         LPSHORTCUT lpShortcut = m_pSlotQueue[i];
  4492.         if (!lpShortcut->IsEmpty())
  4493.         {
  4494.             float fScal = 1.25f;
  4495.             FLOAT fBlend = 0.20f;
  4496.             if (bRenderIllu[i])
  4497.                 fBlend = 0.85f;
  4498.  
  4499.             point = CPoint(m_wndCustom[i].m_rectClient.left + 2, m_wndCustom[i].m_rectClient.top - 1);
  4500.             if (lpShortcut->m_pTexture)
  4501.             {
  4502.                 p2DRender->RenderTextureRotateALPHA(point, m_Marronzinha, lpShortcut->m_pTexture, fRadian, fBlend, fScal, fScal);
  4503.             }
  4504.         }
  4505.     }
  4506.  
  4507.     CPoint DropFPoint;
  4508.     if (m_pSlotQueue[1]->m_dwShortcut == SHORTCUT_NONE)
  4509.         DropFPoint = CPoint(CTRECT[0].left - 12, CTRECT[0].top - 14);
  4510.     else if (m_pSlotQueue[2]->m_dwShortcut == SHORTCUT_NONE)
  4511.         DropFPoint = CPoint(CTRECT[1].left - 12, CTRECT[1].top - 14);
  4512.     else if (m_pSlotQueue[3]->m_dwShortcut == SHORTCUT_NONE)
  4513.         DropFPoint = CPoint(CTRECT[2].left - 12, CTRECT[2].top - 14);
  4514.     else if (m_pSlotQueue[4]->m_dwShortcut == SHORTCUT_NONE)
  4515.         DropFPoint = CPoint(CTRECT[3].left - 12, CTRECT[3].top - 14);
  4516.     else if (m_pSlotQueue[5]->m_dwShortcut == SHORTCUT_NONE)
  4517.         DropFPoint = CPoint(CTRECT[4].left - 12, CTRECT[4].top - 14);
  4518.     else
  4519.     {
  4520.         DropFPoint = CPoint(CTRECT[5].left - 12, CTRECT[5].top - 14);
  4521.     }
  4522.  
  4523.     m_DROP_Fire->Render(&g_Neuz.m_2DRender, DropFPoint, m_DROPFireALPHA);
  4524.  
  4525.     for (int i = 0; i < 6; i++)
  4526.     {
  4527.         if ((m_nActionSlot > 0) && (g_WndMng.m_pWndTaskBar->m_nExecute > 0))
  4528.         {
  4529.             m_SURF_FIRE[i] = NULL;
  4530.         }
  4531.         if (m_SURF_FIRE[i] != NULL)
  4532.         {
  4533.             m_SURF_FIRE[i]->Render(p2DRender, CPoint(m_wndCustom[i].m_rectClient.left - 10, m_wndCustom[i].m_rectClient.top - 14), m_nFlashAlpha[i]);
  4534.         }
  4535.  
  4536.     }
  4537.     if (pTop && pBottom)
  4538.     {
  4539.         point.y = ((rect.top + rect.bottom) / 2 - (pTop->m_size.cy / 2));
  4540.         point.x = ((rect.right / 2) - (pTop->m_size.cx / 2));
  4541.         if ((m_nActionSlot > 0) && (g_WndMng.m_pWndTaskBar->m_nExecute > 0) && !m_bArrival)
  4542.         {
  4543.             pTop->Render(p2DRender, point);
  4544.         }
  4545.         else
  4546.         {
  4547.             float fPercent = 1.0f - (float)(tmCur - m_tmStartCoolDown) / (float)(m_tmCoolDown - m_tmStartCoolDown);
  4548.             if (fPercent > 1.0f)
  4549.                 fPercent = 1.0f;
  4550.             else if (fPercent < 0.0f)
  4551.                 fPercent = 0.0f;
  4552.  
  4553.             LPDIRECT3DTEXTURE9 pTexture = NULL;
  4554.  
  4555.             pTexture = p2DRender->RenderMergeTextures(pTop, pBottom, 64, 64, fPercent);
  4556.             if (pTexture)
  4557.                 p2DRender->RenderTextureNative(point, pTexture, 64, 64, TRUE);
  4558.         }
  4559.     }
  4560.     if (slot5 != NULL && pTop != NULL)
  4561.     {
  4562.         point.y = 0;
  4563.         point.x = ((rect.right / 2) - (pTop->m_size.cx / 2) - (pTop->m_size.cx + 7));
  4564.         slot5->Render(&g_Neuz.m_2DRender, point);
  4565.  
  4566.     }
  4567.     if (m_bStopCoolDown)
  4568.     {
  4569.         SlotEffect5->RenderRotate(p2DRender, CPoint(0, 0), (FLOAT)RotateCoolDownEffect / 8.0f, 1);
  4570.         SlotEffect5->RenderRotate(p2DRender, CPoint(0, 0), 180.0f - (FLOAT)RotateCoolDownEffect / 8.0f, 1);
  4571.     }
  4572.     if ((m_nActionSlot > 0) && (g_WndMng.m_pWndTaskBar->m_nExecute > 0))
  4573.     {
  4574.         if (m_bArrival)
  4575.         {
  4576.             RotateAllEffect++;
  4577.             RotateSkillEffect++;
  4578.             SlotEffect5->RenderRotate(p2DRender, CPoint(0, 0), RotateAllEffect / 8, 1);
  4579.             int nPos = (int)(RotateSLOT / 60.0f);
  4580.             if (RotateSLOT == rotate1)
  4581.             {
  4582.                 SlotEffect3->RenderRotate(p2DRender, CPoint(CTRECT[0].left - 10, CTRECT[0].top - 14), RotateSkillEffect / 3, 1);
  4583.                 if (m_USEFireALPHA != 115 && useskill)
  4584.                     m_DROP_Fire->Render(p2DRender, CPoint(CTRECT[0].left - 10, CTRECT[0].top - 12), m_USEFireALPHA);
  4585.                 else if (m_USEFireALPHA == 115 && useskill)
  4586.                     useskill = FALSE;
  4587.             }
  4588.         }
  4589.     }
  4590. }
  4591.  
  4592. HRESULT CWndNewSkillSlot::RestoreDeviceObjects()
  4593. {
  4594.     CWndBase::RestoreDeviceObjects();
  4595.     return S_OK;
  4596. }
  4597.  
  4598. HRESULT CWndNewSkillSlot::InvalidateDeviceObjects()
  4599. {
  4600.     CWndBase::InvalidateDeviceObjects();
  4601.     return S_OK;
  4602. }
  4603.  
  4604. HRESULT CWndNewSkillSlot::DeleteDeviceObjects()
  4605. {
  4606.     CWndBase::DeleteDeviceObjects();
  4607.     return InvalidateDeviceObjects();
  4608. }
  4609.  
  4610. void CWndNewSkillSlot::OnInitialUpdate(void)
  4611. {
  4612.     CWndNeuz::OnInitialUpdate();
  4613.     RestoreDeviceObjects();
  4614.     m_wndCustom[0].Create("", 0, CRect(97, 116, 34, 34), this, 101);
  4615.     m_wndCustom[1].Create("", 0, CRect(141, 90, 34, 34), this, 102);
  4616.     m_wndCustom[2].Create("", 0, CRect(141, 40, 34, 34), this, 103);
  4617.     m_wndCustom[3].Create("", 0, CRect(97, 15, 34, 34), this, 104);
  4618.     m_wndCustom[4].Create("", 0, CRect(53, 40, 34, 34), this, 105);
  4619.     m_wndCustom[5].Create("", 0, CRect(53, 90, 34, 34), this, 106);
  4620.  
  4621.     SlotCustom = GetWndCtrl(WIDC_CUSTOM1);
  4622.     slot5 = CWndBase::m_textureMng.AddTexture(D3DDEVICE, MakePath(DIR_THEME, "slot05.tga"), 0xffff00ff, TRUE);
  4623.     SlotRt = CWndBase::m_textureMng.AddTexture(D3DDEVICE, MakePath(DIR_THEME, "slot04.tga"), 0xffff00ff, TRUE);
  4624.     SlotEffect5 = CWndBase::m_textureMng.AddTexture(D3DDEVICE, MakePath(DIR_THEME, "ActionSlotEff5.tga"), 0xffffffff, TRUE);
  4625.     SlotEffect3 = CWndBase::m_textureMng.AddTexture(D3DDEVICE, MakePath(DIR_THEME, "ActionSlotEff3_02.tga"), 0xffffffff, TRUE);
  4626.     SlotEffect2 = CWndBase::m_textureMng.AddTexture(D3DDEVICE, MakePath(DIR_THEME, "ActionSlotEff4.tga"), 0xffffffff, TRUE);
  4627.     m_Marronzinha = CWndBase::m_textureMng.AddTexture(D3DDEVICE, MakePath(DIR_THEME, "slot07.tga"), 0xffffffff, TRUE);
  4628.     m_DROP_Fire = CWndBase::m_textureMng.AddTexture(D3DDEVICE, MakePath(DIR_THEME, "ActionSlotEff2.tga"), 0xffff00ff, TRUE);
  4629.  
  4630.     m_aSlotSkill.m_pTexture = m_textureMng.AddTexture(g_Neuz.m_pd3dDevice, MakePath(DIR_ICON, "icon_ActionSkill.dds"), 0xffff00ff, TRUE);
  4631.     m_aSlotSkill.m_dwShortcut = SHORTCUT_SKILLFUN;
  4632.  
  4633.     CRect rectRoot = m_pWndRoot->GetLayoutRect();
  4634.     CPoint point(rectRoot.right - 166, rectRoot.bottom - 170);
  4635.     Move(point);
  4636.     DelWndStyle(WBS_MOVE);
  4637. }
  4638.  
  4639. CWndTaskBar_HUD_SLIDE::CWndTaskBar_HUD_SLIDE(void)
  4640. {
  4641.     CWndTaskBarInterface::CWndTaskBarInterface();
  4642.     m_bPick = &m_bPickup_SLIDE;
  4643.     m_nSlotIndex = 4;
  4644.     m_TEXTUCtrl = NULL;
  4645.     for (int i = 0; i < 10; i++)
  4646.     {
  4647.         m_dwALPHA[i] = 255;
  4648.     }
  4649. }
  4650.  
  4651. BOOL CWndTaskBar_HUD_SLIDE::Initialize(CWndBase* pWndParent, DWORD dwType)
  4652. {
  4653.     return CWndNeuz::InitDialog(g_Neuz.GetSafeHwnd(), APP_NEWTASKBAR02, WBS_MANAGER | WBS_SOUND, CPoint(0, 0), pWndParent);
  4654. }
  4655.  
  4656. BOOL CWndTaskBar_HUD_SLIDE::Process(void)
  4657. {
  4658.     BOOL bInRect = GetWindowRect().PtInRect(GetMousePoint());
  4659.     for (int i = 0; i < 10; i++)
  4660.     {
  4661.         if (!bInRect)
  4662.             slot1[i] = NULL;
  4663.         m_USEFireALPHA[i] -= 20;
  4664.  
  4665.         if (m_USEFireALPHA[i] < 5)
  4666.         {
  4667.             m_USEFireALPHA[i] = 0;
  4668.         }
  4669.     }
  4670.  
  4671.     return CWndBase::Process();
  4672. }
  4673.  
  4674. void CWndTaskBar_HUD_SLIDE::OnDraw(C2DRender* p2DRender)
  4675. {
  4676.     if (IsValidObj(g_pPlayer))
  4677.     {
  4678.         for (int i = 0; i < 10; i++)
  4679.         {
  4680.             if (wndCtrl[i]->rect.Width() <= 48 + 50)
  4681.                 m_bCtrlVisible[i] = false;
  4682.             if (GetWindowRect().Width() >= 34 * (i + 1) + 50 + 2 * (i + 1))
  4683.                 m_bCtrlVisible[i] = true;
  4684.             if (m_bCtrlVisible[i])
  4685.                 m_TEXTUCtrl->Render(p2DRender, CPoint(wndCtrl[i]->rect.left, wndCtrl[i]->rect.top));
  4686.         }
  4687.         CWndTaskBarInterface::OnDraw(p2DRender);
  4688.     }
  4689. }
  4690.  
  4691. void CWndTaskBar_HUD_SLIDE::OnInitialUpdate(void)
  4692. {
  4693.     CWndTaskBarInterface::OnInitialUpdate();
  4694.     CRect rectRoot = m_pWndRoot->GetLayoutRect();
  4695.     CRect rectWindow = GetWindowRect();
  4696.  
  4697.     CPoint point(rectRoot.right - rectWindow.Width() - 270, rectRoot.bottom - 70);
  4698.     Move(point);
  4699.     SetWndRect(CRect(GetWndRect().left, rectRoot.bottom - 70, rectRoot.right - 672, GetWndRect().bottom));
  4700.  
  4701.     CWndStatic* pStatic = (CWndStatic*)GetDlgItem(WIDC_STATIC1);
  4702.     pStatic->Move(rectWindow.right, rectWindow.bottom);
  4703.     CRect rect = GetWndRect();
  4704.     rect.left = rect.right - g_Option.m_nWidthSlideBar;
  4705.     SetWndRect(rect);
  4706.  
  4707.     m_TEXTUCtrl = CWndBase::m_textureMng.AddTexture(D3DDEVICE, MakePath(DIR_THEME, "WndExpansionSlot01_1.tga"), 0xffff00ff);
  4708.  
  4709.     DelWndStyle(WBS_MOVE);
  4710.     RestoreDeviceObjects();
  4711. }
  4712.  
  4713. CWndTaskBarInterface::CWndTaskBarInterface(void)
  4714. {
  4715.     m_pSelectShortcut = NULL;
  4716.     for (int i = 0; i < 10; i++)
  4717.     {
  4718.         slot1[i] = NULL;
  4719.         m_USEFireALPHA[i] = 0;
  4720.         m_nActionListener[i] = -1;
  4721.         m_pSlotItem[i] = NULL;
  4722.         m_bCtrlVisible[i] = true;
  4723.     }
  4724.  
  4725.     m_bReqAlt = false;
  4726.     m_bPick = &m_bPickup;
  4727.     m_nSlotIndex = 0;
  4728. }
  4729.  
  4730. CWndTaskBarInterface::~CWndTaskBarInterface(void)
  4731. {
  4732.     m_pSelectShortcut = NULL;
  4733.     for (int i = 0; i < 10; i++)
  4734.     {
  4735.         slot1[i] = NULL;
  4736.     }
  4737.     DeleteDeviceObjects();
  4738. }
  4739.  
  4740. void CWndTaskBarInterface::OnSize(UINT nType, int cx, int cy)
  4741. {
  4742.     CWndNeuz::OnSize(nType, cx, cy);
  4743. }
  4744.  
  4745. void CWndTaskBarInterface::OnLButtonUp(UINT nFlags, CPoint point)
  4746. {
  4747.     LPSHORTCUT pShortcut = NULL;
  4748.     if (!CWndTaskBarInterface::IsLock())
  4749.         *m_bPick = FALSE;
  4750.  
  4751.     for (int i = 0; i < 10; i++)
  4752.     {
  4753.         if (!m_bCtrlVisible[i])
  4754.             continue;
  4755.         if (wndCtrl[i]->rect.PtInRect(point))
  4756.         {
  4757.             pShortcut = m_pSlotItem[i];
  4758.             m_USEFireALPHA[i] = 255;
  4759.         }
  4760.     }
  4761.     if (pShortcut && pShortcut == m_pSelectShortcut && !pShortcut->IsEmpty() && pShortcut->m_dwData != 2)
  4762.     {
  4763.         if (pShortcut->m_dwShortcut == SHORTCUT_SKILLFUN)
  4764.         {
  4765.             CWndNewSkillSlot* m_SkillSL = (CWndNewSkillSlot*)g_WndMng.GetWndBase(APP_SLOT);
  4766.             if (clock() < m_SkillSL->m_tmCoolDown || m_SkillSL->m_bStopCoolDown)
  4767.             {
  4768.                 return;
  4769.             }
  4770.             else
  4771.             {
  4772.                 if (g_WndMng.m_pWndTaskBar->m_nExecute == 0)
  4773.                     g_WndMng.ObjectExecutor(pShortcut);
  4774.             }
  4775.         }
  4776.         g_WndMng.ObjectExecutor(pShortcut);
  4777.     }
  4778.     ReleaseCapture();
  4779. }
  4780.  
  4781. void CWndTaskBarInterface::OnLButtonDown(UINT nFlags, CPoint point)
  4782. {
  4783.     if (g_WndMng.m_pWndMenu && g_WndMng.m_pWndMenu->IsVisible())
  4784.         g_WndMng.m_pWndMenu->SetVisible(FALSE);
  4785.  
  4786.     CRect ST_Rect = CRect(2, 4, 20, 36);
  4787.     CRect ST_Rect2 = CRect(384, 4, 390, 36);
  4788.  
  4789.     if (PtInRect(ST_Rect, point) || PtInRect(ST_Rect2, point))
  4790.     {
  4791.         ClientToScreen(&point);
  4792.  
  4793.         if (!CWndTaskBarInterface::IsLock())
  4794.         {
  4795.             *m_bPick = TRUE;
  4796.         }
  4797.     }
  4798.  
  4799.     LPSHORTCUT pShortcut = NULL;
  4800.     for (int i = 0; i < 10; i++)
  4801.     {
  4802.         if (!m_bCtrlVisible[i])
  4803.             continue;
  4804.         if (wndCtrl[i]->rect.PtInRect(point))
  4805.         {
  4806.             if (!m_pSlotItem[i]->IsEmpty())
  4807.             {
  4808.                 if (!CWndTaskBarInterface::IsLock())
  4809.                 {
  4810.                     *m_bPick = FALSE;
  4811.                 }
  4812.                 m_pSelectShortcut = m_pSlotItem[i];
  4813.             }
  4814.         }
  4815.     }
  4816.     SetCapture();
  4817. }
  4818.  
  4819. void CWndTaskBarInterface::OnRButtonUp(UINT nFlags, CPoint point)
  4820. {
  4821.     for (int i = 0; i < 10; i++)
  4822.     {
  4823.         if (!m_bCtrlVisible[i])
  4824.             continue;
  4825.         CRect rect = wndCtrl[i]->rect;
  4826.         if (rect.PtInRect(point))
  4827.         {
  4828.             CPoint point2 = point;
  4829.             ClientToScreen(&point2);
  4830.             ClientToScreen(&rect);
  4831.  
  4832.             if (!m_pSlotItem[i]->IsEmpty())
  4833.             {
  4834.                 m_pSlotItem[i]->Empty();
  4835.                 g_DPlay.SendRemoveItemTaskBar(m_nSlotIndex, (BYTE)(i));
  4836.             }
  4837.         }
  4838.     }
  4839. }
  4840.  
  4841. void CWndTaskBarInterface::OnMouseMove(UINT nFlags, CPoint point)
  4842. {
  4843.     CWndTaskBar_HUD* pWndTB = (CWndTaskBar_HUD*)g_WndMng.GetWndBase(APP_NEWTASKBAR);
  4844.     CRect ST_Rect = CRect(2, 4, 20, 36);
  4845.     CRect ST_Rect2 = CRect(384, 4, 390, 36);
  4846.  
  4847.     if (m_bLButtonDown && IsPush())
  4848.     {
  4849.         if (m_pSelectShortcut && !m_pSelectShortcut->IsEmpty())
  4850.         {
  4851.             if (m_pSelectShortcut->m_dwId == 400)
  4852.                 return;
  4853.  
  4854.             if (m_pSelectShortcut->m_dwShortcut == SHORTCUT_LORDSKILL)
  4855.             {
  4856.                 m_pSelectShortcut->m_dwId++;
  4857.             }
  4858.             memcpy(&m_GlobalShortcut, m_pSelectShortcut, sizeof(m_GlobalShortcut));
  4859.             m_GlobalShortcut.m_pFromWnd = this;
  4860.             m_GlobalShortcut.m_dwData = (DWORD)m_pSelectShortcut;
  4861.             m_pSelectShortcut = NULL;
  4862.         }
  4863.     }
  4864.     CWndNeuz::OnMouseMove(nFlags, point);
  4865. }
  4866.  
  4867. void CWndTaskBarInterface::OnMouseWndSurface(CPoint point)
  4868. {
  4869.     for (int i = 0; i < MAX_SLOT_ITEM; i++)
  4870.     {
  4871.         LPSHORTCUT lpShortcut = m_pSlotItem[i];
  4872.         CRect DrawRect = wndCtrl[i]->rect;
  4873.         if (DrawRect.PtInRect(point) && !g_WndMng.m_pLogOutWaitting)
  4874.         {
  4875.             CPoint point2 = point;
  4876.             ClientToScreen(&point2);
  4877.             ClientToScreen(&DrawRect);
  4878.  
  4879.             if (!m_pSlotItem[i]->IsEmpty())
  4880.             {
  4881.                 if (lpShortcut->m_dwShortcut >= 0 && lpShortcut->m_dwShortcut <= 11)
  4882.                 {
  4883.                     g_WndMng.m_pWndTaskBar->PutTooTip(m_pSlotItem[i], point2, &DrawRect);
  4884.                 }
  4885.             }
  4886.             if (slot1[i] == NULL)
  4887.             {
  4888.                 slot1[i] = CWndBase::m_textureMng.AddTexture(D3DDEVICE, MakePath(DIR_THEME, "SlotSelect.tga"), 0xffff00ff);
  4889.             }
  4890.         }
  4891.         else
  4892.             slot1[i] = NULL;
  4893.     }
  4894. }
  4895.  
  4896. BOOL CWndTaskBarInterface::Process(void)
  4897. {
  4898.     CWndRegVend* pWndRegVend = (CWndRegVend*)g_WndMng.GetWndBase(APP_VENDOREX_SELL);
  4899.     CWndRegVend* pWndVendorBuy = (CWndRegVend*)g_WndMng.GetWndBase(APP_VENDOREX_BUY);
  4900.     if (pWndRegVend || pWndVendorBuy)
  4901.     {
  4902.         return CWndBase::Process();
  4903.     }
  4904.     CWndEdit* pWndEdit = CWndEdit::GetWndEditCtrl();
  4905.     if ((g_Neuz.m_bActiveNeuz != FALSE) && (pWndEdit == NULL))
  4906.     {
  4907.         for (int i = 0; i < 10; i++)
  4908.         {
  4909.             m_USEFireALPHA[i] -= 20;
  4910.  
  4911.             if (m_USEFireALPHA[i] < 5)
  4912.             {
  4913.                 m_USEFireALPHA[i] = 0;
  4914.             }
  4915.         }
  4916.         BOOL bALTKeySwitch = (GetKeyState(VK_MENU) & 0x8000);
  4917.         bool bALT = (bALTKeySwitch && m_bReqAlt || !bALTKeySwitch && !m_bReqAlt);
  4918.         BOOL bInRect = GetWindowRect().PtInRect(GetMousePoint());
  4919.         for (int i = 0; i < 10; i++)
  4920.         {
  4921.             if (!bInRect)
  4922.                 slot1[i] = NULL;
  4923.             if (m_nActionListener[i] == -1)
  4924.                 continue;
  4925.  
  4926.             if (GetKeyState(m_nActionListener[i]) & 0x8000 && m_USEFireALPHA[i] == 0 && bALT)
  4927.             {
  4928.                 if (m_pSlotItem[i]->IsEmpty())
  4929.                     return CWndBase::Process();
  4930.                 if (m_pSlotItem[i]->m_dwShortcut == SHORTCUT_ITEM)
  4931.                 {
  4932.                     CItemBase* pItemBase = g_pPlayer->GetItemId(m_pSlotItem[i]->m_dwId);
  4933.                     if (pItemBase)
  4934.                     {
  4935.                         int nPart = pItemBase->GetProp()->dwParts;
  4936.                         if (nPart != -1)
  4937.                             g_bSlotSwitchAboutEquipItem[i] = TRUE;
  4938.                     }
  4939.                 }
  4940.                 if (m_pSlotItem[i]->m_dwShortcut == SHORTCUT_SKILLFUN)
  4941.                 {
  4942.                     CWndNewSkillSlot* m_SkillSL = (CWndNewSkillSlot*)g_WndMng.GetWndBase(APP_SLOT);
  4943.                     if (clock() < m_SkillSL->m_tmCoolDown || m_SkillSL->m_bStopCoolDown)
  4944.                     {
  4945.                         return CWndBase::Process();
  4946.                     }
  4947.                     if (g_WndMng.m_pWndTaskBar->m_nExecute != 0)
  4948.                     {
  4949.                         return CWndBase::Process();
  4950.                     }
  4951.                 }
  4952.                 g_WndMng.ObjectExecutor(m_pSlotItem[i]);
  4953.                 m_USEFireALPHA[i] = 255;
  4954.             }
  4955.         }
  4956.     }
  4957.     return CWndBase::Process();
  4958. }
  4959.  
  4960. BOOL CWndTaskBarInterface::OnDropIcon(LPSHORTCUT pShortcut, CPoint point)
  4961. {
  4962.     if (CWndTaskBarInterface::IsLock())
  4963.         return FALSE;
  4964.  
  4965.     CRect rect = GetWindowRect();
  4966.     rect.DeflateRect(3, 3);
  4967.  
  4968.     if (pShortcut->m_pFromWnd == this)
  4969.     {
  4970.         LPSHORTCUT lpShortcut = (LPSHORTCUT)pShortcut->m_dwData;
  4971.         if (GetClientRect().PtInRect(point) == FALSE)
  4972.         {
  4973.             g_DPlay.SendRemoveItemTaskBar(m_nSlotIndex, (BYTE)(lpShortcut->m_dwIndex));
  4974.             m_pSlotItem[lpShortcut->m_dwIndex]->Empty();
  4975.             lpShortcut->Empty();
  4976.             return TRUE;
  4977.         }
  4978.     }
  4979.     CWndBase* pWndFrame = pShortcut->m_pFromWnd->GetFrameWnd();
  4980.  
  4981.     if (pWndFrame && (pWndFrame->GetWndId() != APP_SLOT && pWndFrame->GetWndId() != APP_INVENTORY
  4982.         && pWndFrame != g_WndMng.m_pWndTaskBar && pWndFrame->GetWndId() != APP_COMMUNICATION_CHAT
  4983.         && pWndFrame->GetWndId() != APP_SKILL4 && pWndFrame->GetWndId() != APP_MOTION && pWndFrame->GetWndId() != APP_PARTY
  4984.         && pWndFrame->GetWndId() != APP_LORD_SKILL && pWndFrame->GetWndId() != APP_NEWTASKBAR
  4985.         && pWndFrame->GetWndId() != APP_NEWTASKBAR02 && pWndFrame->GetWndId() != APP_NEWTASKBAR03
  4986.         && pWndFrame->GetWndId() != APP_NEWTASKBAR04))
  4987.     {
  4988.         SetForbid(TRUE);
  4989.         return FALSE;
  4990.     }
  4991.  
  4992.     for (int i = 0; i < 10; i++)
  4993.     {
  4994.         if (!m_bCtrlVisible[i])
  4995.             continue;
  4996.  
  4997.         if (wndCtrl[i]->rect.PtInRect(point))
  4998.         {
  4999.             if (pShortcut->m_pFromWnd == this)
  5000.             {
  5001.                 LPSHORTCUT lpCurShortcut = (LPSHORTCUT)pShortcut->m_dwData;
  5002.                 if (m_pSlotItem[i] == lpCurShortcut)
  5003.                     return FALSE;
  5004.             }
  5005.             if (pShortcut->m_dwShortcut == SHORTCUT_CHAT)
  5006.             {
  5007.                 CString sChat = m_GlobalShortcut.m_szString;
  5008.                 sChat.Replace("--", "");
  5009.                 sChat.Replace("'", "");
  5010.                 sChat.Replace("/*", "");
  5011.                 sChat.Replace("*/", "");
  5012.                 strcpy(m_GlobalShortcut.m_szString, (const char*)sChat);
  5013.             }
  5014.             else if (pShortcut->m_dwShortcut == SHORTCUT_SKILL)
  5015.             {
  5016.                 ItemProp* pProp;
  5017.                 if (pShortcut->m_dwType == 2)
  5018.                     pProp = prj.GetPartySkill(pShortcut->m_dwId);
  5019.                 else
  5020.                 {
  5021.                     LPSKILL pSkill = g_pPlayer->GetSkill(0, pShortcut->m_dwId);
  5022.                     pProp = prj.GetSkillProp(pSkill->dwSkill);
  5023.                 }
  5024.                 if (pProp->dwComboStyle != CT_STEP && pProp->dwComboStyle != CT_GENERAL)
  5025.                 {
  5026.                     SetForbid(TRUE);
  5027.                     return FALSE;
  5028.                 }
  5029.             }
  5030.             if (pShortcut->m_dwShortcut == SHORTCUT_APPLET)
  5031.             {
  5032.                 AppletFunc* pAppletFunc = g_WndMng.GetAppletFunc(pShortcut->m_dwId);
  5033.                 m_pSlotItem[i]->m_pTexture = m_textureMng.AddTexture(g_Neuz.m_pd3dDevice, MakePath(DIR_ICON, pAppletFunc->m_pszIconName), 0xffff00ff);
  5034.             }
  5035.             else if (pShortcut->m_dwShortcut == SHORTCUT_SKILL)
  5036.             {
  5037.                 if (pShortcut->m_dwType == 2)
  5038.                 {
  5039.                     ItemProp* pProp = prj.GetPartySkill(pShortcut->m_dwId);
  5040.                     m_pSlotItem[i]->m_pTexture = m_textureMng.AddTexture(g_Neuz.m_pd3dDevice, MakePath(DIR_ICON, pProp->szIcon), 0xffff00ff);
  5041.                 }
  5042.                 else
  5043.                 {
  5044.                     LPSKILL lpSkill = g_pPlayer->GetSkill(pShortcut->m_dwType, pShortcut->m_dwId);
  5045.                     ItemProp* pSkillProp = prj.m_aPropSkill.GetAt(lpSkill->dwSkill);
  5046.                     if (pSkillProp)
  5047.                         m_pSlotItem[i]->m_pTexture = m_textureMng.AddTexture(g_Neuz.m_pd3dDevice, MakePath(DIR_ICON, pSkillProp->szIcon), 0xffff00ff);
  5048.                 }
  5049.             }
  5050.             else if (pShortcut->m_dwShortcut == SHORTCUT_CHAT)
  5051.             {
  5052.                 m_pSlotItem[i]->m_pTexture = m_textureMng.AddTexture(g_Neuz.m_pd3dDevice, MakePath(DIR_ICON, "icon_MacroChat.dds"), 0xffff00ff);
  5053.             }
  5054.             else if (pShortcut->m_dwShortcut == SHORTCUT_EMOTICON)
  5055.             {
  5056.                 if (pShortcut->m_dwId >= 0 && pShortcut->m_dwId < MAX_EMOTICON_NUM)
  5057.                 {
  5058.                     TCHAR buffer[MAX_SHORTCUT_STRING] = { 0 };
  5059.                     _tcscat(buffer, "/");
  5060.                     _tcscat(buffer, g_DialogMsg.m_EmiticonCmd[pShortcut->m_dwId].m_szCommand);
  5061.                     _tcscpy(pShortcut->m_szString, buffer);
  5062.                     m_pSlotItem[i]->m_pTexture = g_DialogMsg.m_texEmoticonUser.GetAt(pShortcut->m_dwId);
  5063.                 }
  5064.             }
  5065.             else if (pShortcut->m_dwShortcut == SHORTCUT_ITEM)
  5066.             {
  5067.                 CItemBase* pItemBase;
  5068.                 pItemBase = g_pPlayer->GetItemId(pShortcut->m_dwId);
  5069.                 if (pItemBase)
  5070.                     m_pSlotItem[i]->m_pTexture = pItemBase->GetTexture();
  5071.             }
  5072.             else if (pShortcut->m_dwShortcut == SHORTCUT_MOTION)
  5073.             {
  5074.                 MotionProp* pMotionProp = prj.GetMotionProp(pShortcut->m_dwId);
  5075.                 if (pMotionProp)
  5076.                 {
  5077.                     pMotionProp->pTexture = m_textureMng.AddTexture(g_Neuz.m_pd3dDevice, MakePath(DIR_ICON, pMotionProp->szIconName), 0xffff00ff);
  5078.                     m_pSlotItem[i]->m_pTexture = pMotionProp->pTexture;
  5079.                 }
  5080.                 else
  5081.                     return FALSE;
  5082.             }
  5083.             else if (pShortcut->m_dwShortcut == SHORTCUT_SKILL)
  5084.             {
  5085.                 LPSKILL lpSkill = g_pPlayer->GetSkill(pShortcut->m_dwType, pShortcut->m_dwId);
  5086.                 m_pSlotItem[i]->m_pTexture = m_textureMng.AddTexture(g_Neuz.m_pd3dDevice, MakePath(DIR_ITEM, lpSkill->GetProp()->szIcon), 0xffff00ff, TRUE);
  5087.             }
  5088.             else if (pShortcut->m_dwShortcut == SHORTCUT_SKILLFUN)
  5089.                 m_pSlotItem[i]->m_pTexture = pShortcut->m_pTexture;
  5090.  
  5091.             if (pShortcut->m_dwShortcut == SHORTCUT_ITEM)
  5092.             {
  5093.                 CItemBase* pItemBase = g_pPlayer->GetItemId(pShortcut->m_dwId);
  5094.                 if (pShortcut && pItemBase && pItemBase->GetProp()->dwPackMax > 1)
  5095.                     m_pSlotItem[i]->m_dwItemId = pItemBase->m_dwItemId;
  5096.             }
  5097.             if (pShortcut->m_pFromWnd == this)
  5098.             {
  5099.                 LPSHORTCUT lpShortcut = (LPSHORTCUT)pShortcut->m_dwData;
  5100.                 g_DPlay.SendRemoveItemTaskBar(m_nSlotIndex, (BYTE)(lpShortcut->m_dwIndex));
  5101.             }
  5102.  
  5103.             if (pShortcut->m_pTexture != NULL)
  5104.                 m_pSlotItem[i]->m_pTexture = pShortcut->m_pTexture;
  5105.  
  5106.             m_pSlotItem[i]->m_dwShortcut = pShortcut->m_dwShortcut;
  5107.             m_pSlotItem[i]->m_dwType = pShortcut->m_dwType;
  5108.             m_pSlotItem[i]->m_dwIndex = i;
  5109.             m_pSlotItem[i]->m_dwId = pShortcut->m_dwId;
  5110.             m_pSlotItem[i]->m_dwUserId = 0;
  5111.             m_pSlotItem[i]->m_dwData = 1;
  5112.  
  5113.             if (pShortcut->m_dwShortcut == SHORTCUT_LORDSKILL)
  5114.                 m_pSlotItem[i]->m_dwId--;
  5115.  
  5116.             strcpy(m_pSlotItem[i]->m_szString, m_GlobalShortcut.m_szString);
  5117.             g_DPlay.SendAddItemTaskBar(m_nSlotIndex, i, pShortcut);
  5118.  
  5119.             return TRUE;
  5120.         }
  5121.     }
  5122.     return TRUE;
  5123. }
  5124.  
  5125. void CWndTaskBarInterface::RenderCollTime(CPoint pt, DWORD dwSkillId, C2DRender* p2DRender)
  5126. {
  5127.     LPSKILL lpSkill = &g_pPlayer->m_aJobSkill[dwSkillId];
  5128.     if (lpSkill)
  5129.     {
  5130.         DWORD dwDelay = g_pPlayer->GetReuseDelay(dwSkillId);
  5131.         if (dwDelay > 0)
  5132.         {
  5133. #if __VER >= 9
  5134.             ItemProp* pSkillProp = lpSkill->GetProp();
  5135.             ASSERT(pSkillProp);
  5136.             AddSkillProp* pAddSkillProp = prj.GetAddSkillProp(pSkillProp->dwSubDefine, lpSkill->dwLevel);
  5137.             ASSERT(pAddSkillProp);
  5138.             RenderRadar(p2DRender, pt,
  5139.                 pAddSkillProp->dwCooldown - dwDelay,
  5140.                 pAddSkillProp->dwCooldown);
  5141. #else
  5142.             RenderRadar(p2DRender, pt,
  5143.                 lpSkill->GetProp()->dwSkillReady - dwDelay,
  5144.                 lpSkill->GetProp()->dwSkillReady);
  5145. #endif
  5146.         }
  5147.     }
  5148. }
  5149.  
  5150. #if __VER >= 12
  5151. void CWndTaskBarInterface::RenderLordCollTime(CPoint pt, DWORD dwSkillId, C2DRender* p2DRender)
  5152. {
  5153.     CCLord* pLord = CCLord::Instance();
  5154.     CLordSkillComponentExecutable* pComponent = pLord->GetSkills()->GetSkill(dwSkillId);
  5155.     if (!pComponent) return;
  5156.     DWORD dwDelay = 0;
  5157.     if (pComponent->GetTick() > 0)
  5158.         RenderRadar(p2DRender, pt, pComponent->GetCooltime() - pComponent->GetTick(), pComponent->GetCooltime());
  5159. }
  5160. #endif
  5161.  
  5162. void CWndTaskBarInterface::OnDraw(C2DRender* p2DRender)
  5163. {
  5164.     if (IsValidObj(g_pPlayer))
  5165.     {
  5166.         CPoint point;
  5167.         DWORD dwCur = g_tmCurrent;
  5168.         if (m_GlobalShortcut.IsEmpty() == FALSE)
  5169.         {
  5170.             for (int i = 0; i < MAX_SLOT_ITEM; i++)
  5171.             {
  5172.                 DWORD dwColor = D3DCOLOR_ARGB(15, 20, 0, 200);
  5173.                 CRect Rectskill = wndCtrl[i]->rect;
  5174.  
  5175.                 switch (m_GlobalShortcut.m_dwShortcut)
  5176.                 {
  5177.                 case SHORTCUT_APPLET:
  5178.                 case SHORTCUT_ITEM:
  5179.                 case SHORTCUT_MOTION:
  5180.                     p2DRender->RenderFillRect(Rectskill, dwColor);
  5181.                     p2DRender->RenderFillRect(Rectskill, dwColor);
  5182.                     break;
  5183.                 case SHORTCUT_SKILL:
  5184.                     if (m_GlobalShortcut.m_dwType == 0)
  5185.                     {
  5186.                         DWORD dwSkill = g_pPlayer->GetSkill(0, m_GlobalShortcut.m_dwId)->dwSkill;
  5187.                         DWORD dwComboStyleSrc = prj.GetSkillProp(dwSkill)->dwComboStyle;
  5188.                         if (dwComboStyleSrc == CT_STEP || dwComboStyleSrc == CT_GENERAL)
  5189.                             p2DRender->RenderFillRect(Rectskill, dwColor);
  5190.                         p2DRender->RenderFillRect(Rectskill, dwColor);
  5191.                     }
  5192.                     else
  5193.                         p2DRender->RenderFillRect(Rectskill, dwColor);
  5194.                     break;
  5195.                 case SHORTCUT_SKILLFUN:
  5196.                     p2DRender->RenderFillRect(Rectskill, dwColor);
  5197.                     break;
  5198.                 }
  5199.             }
  5200.         }
  5201.         for (int i = 0; i < MAX_SLOT_ITEM; i++)
  5202.         {
  5203.             if (!m_bCtrlVisible[i])
  5204.                 continue;
  5205.             point = CPoint(wndCtrl[i]->rect.left, wndCtrl[i]->rect.top);
  5206.             LPSHORTCUT lpShortcut = m_pSlotItem[i];
  5207.  
  5208.             if (!lpShortcut->IsEmpty())
  5209.             {
  5210.                 if (lpShortcut->m_pTexture)
  5211.                     p2DRender->RenderTexture(point, lpShortcut->m_pTexture);
  5212.  
  5213.  
  5214.                 if (lpShortcut->m_dwShortcut == SHORTCUT_ITEM)
  5215.                 {
  5216.                     CItemBase* pItemBase = g_pPlayer->GetItemId(lpShortcut->m_dwId);
  5217.                     CItemElem* pItemElem = (CItemElem*)pItemBase;
  5218.                     if (pItemElem)
  5219.                     {
  5220.                         if (pItemElem->GetProp()->dwPackMax > 1)
  5221.                         {
  5222.                             TCHAR szTemp[32];
  5223.                             _stprintf(szTemp, "%d", g_pPlayer ? g_pPlayer->m_Inventory.GetItemCount(pItemElem->m_dwItemId) : 0);
  5224.                             CSize size = m_p2DRender->m_pFont->GetTextExtent(szTemp);
  5225.                             CD3DFont* pOldFont = p2DRender->GetFont();
  5226.                             p2DRender->SetFont(CWndBase::m_Theme.m_pFontWndNewTitle2);
  5227.                             p2DRender->TextOut(point.x + 32 - size.cx, point.y + 35 - size.cy, szTemp, 0xffeaebdd);
  5228.                             p2DRender->SetFont(pOldFont);
  5229.                         }
  5230.                         DWORD dwGroup = g_pPlayer->m_cooltimeMgr.GetGroup(pItemElem->GetProp());
  5231.                         if (dwGroup)
  5232.                         {
  5233.                             DWORD dwEnd = g_pPlayer->m_cooltimeMgr.GetTime(dwGroup);
  5234.                             if (dwEnd != 0 && dwEnd > dwCur)
  5235.                             {
  5236.                                 DWORD dwBase = g_pPlayer->m_cooltimeMgr.GetBase(dwGroup);
  5237.                                 RenderRadar(p2DRender, point, dwCur - dwBase, dwEnd - dwBase);
  5238.                             }
  5239.                         }
  5240.                     }
  5241.                     else
  5242.                     {
  5243.                         ItemProp* pItemProp = prj.GetItemProp(lpShortcut->m_dwItemId);
  5244.                         if (pItemProp && pItemProp->dwPackMax > 1)
  5245.                         {
  5246.                             DWORD dwId = g_pPlayer->m_Inventory.Find(lpShortcut->m_dwItemId);
  5247.                             if (dwId != NULL_ID)
  5248.                             {
  5249.                                 lpShortcut->m_dwId = dwId;
  5250.                                 g_DPlay.SendAddAppletTaskBar(i, lpShortcut);
  5251.                             }
  5252.                             else
  5253.                             {
  5254.                                 lpShortcut->Empty();
  5255.                                 g_DPlay.SendRemoveAppletTaskBar(i);
  5256.                             }
  5257.                         }
  5258.                         else
  5259.                         {
  5260.                             lpShortcut->Empty();
  5261.                             g_DPlay.SendRemoveAppletTaskBar(i);
  5262.                         }
  5263.                     }
  5264.                 }
  5265.                 else if (lpShortcut->m_dwShortcut == SHORTCUT_APPLET)
  5266.                 {
  5267.                     AppletFunc* pAppletFunc = g_WndMng.GetAppletFunc(lpShortcut->m_dwId);
  5268.                     if (pAppletFunc && pAppletFunc->m_cHotkey)
  5269.                     {
  5270.                         CPoint ptHotkey(point.x + 8, point.y - 9);
  5271.                         DRAW_HOTKEY(p2DRender, ptHotkey, pAppletFunc->m_cHotkey);
  5272.                     }
  5273.                 }
  5274.                 else if (lpShortcut->m_dwShortcut == SHORTCUT_SKILL && lpShortcut->m_dwType != 2)
  5275.                 {
  5276.                     RenderCollTime(point, lpShortcut->m_dwId, p2DRender);
  5277.                 }
  5278. #if __VER >= 12
  5279.                 else if (lpShortcut->m_dwShortcut == SHORTCUT_LORDSKILL)
  5280.                 {
  5281.                     RenderLordCollTime(point, lpShortcut->m_dwId, p2DRender);
  5282.                 }
  5283. #endif
  5284.                 else if (lpShortcut->m_dwShortcut == SHORTCUT_MOTION)
  5285.                 {
  5286.                     if (lpShortcut->m_dwId == MOT_BASE_ESCAPE)
  5287.                     {
  5288.                         ItemProp* pItem = prj.GetItemProp(g_AddSMMode.dwSMItemID[SM_ESCAPE]);
  5289.  
  5290.                         if (pItem && g_pPlayer)
  5291.                         {
  5292.                             CTimeSpan ct(g_pPlayer->m_dwSMTime[SM_ESCAPE]);
  5293.  
  5294.                             if (ct.GetTotalSeconds())
  5295.                             {
  5296.                                 point.y -= 1;
  5297.                                 point.x += 1;
  5298.                                 RenderRadar(m_p2DRender, point, (DWORD)(pItem->dwCircleTime - ct.GetTotalSeconds()), pItem->dwCircleTime);
  5299.                             }
  5300.                         }
  5301.                     }
  5302.                 }
  5303.                 else if (lpShortcut->m_dwShortcut == SHORTCUT_SKILLFUN)
  5304.                 {
  5305.                     CWndNewSkillSlot* m_SkillSL = (CWndNewSkillSlot*)g_WndMng.GetWndBase(APP_SLOT);
  5306.                     if (clock() < m_SkillSL->m_tmCoolDown || m_SkillSL->m_bStopCoolDown)
  5307.                     {
  5308.                         RenderRadar(m_p2DRender, point, (DWORD)(m_SkillSL->m_tmCoolDown), m_SkillSL->m_tmStartCoolDown);
  5309.                     }
  5310.                 }
  5311.             }
  5312.         }
  5313.     }
  5314.     for (int i = 0; i < 10; i++)
  5315.     {
  5316.         if (!m_bCtrlVisible[i])
  5317.             continue;
  5318.         if (slot1[i] != NULL)
  5319.         {
  5320.             slot1[i]->Render(p2DRender, CPoint(wndCtrl[i]->rect.left - 3, wndCtrl[i]->rect.top - 3));
  5321.         }
  5322.         if ((m_USEFIRE[i] != NULL) && (!m_pSlotItem[i]->IsEmpty()))
  5323.         {
  5324.             m_USEFIRE[i]->Render(p2DRender, CPoint(wndCtrl[i]->rect.left, wndCtrl[i]->rect.top), m_USEFireALPHA[i]);
  5325.         }
  5326.     }
  5327. }
  5328.  
  5329. void CWndTaskBarInterface::OnInitialUpdate(void)
  5330. {
  5331.     CWndNeuz::OnInitialUpdate();
  5332.  
  5333.     if (CWndTaskBarInterface::IsLock())
  5334.         *m_bPick = FALSE;
  5335.  
  5336.     wndCtrl[0] = GetWndCtrl(WIDC_CUSTOM1);
  5337.     wndCtrl[1] = GetWndCtrl(WIDC_CUSTOM2);
  5338.     wndCtrl[2] = GetWndCtrl(WIDC_CUSTOM3);
  5339.     wndCtrl[3] = GetWndCtrl(WIDC_CUSTOM4);
  5340.     wndCtrl[4] = GetWndCtrl(WIDC_CUSTOM5);
  5341.     wndCtrl[5] = GetWndCtrl(WIDC_CUSTOM6);
  5342.     wndCtrl[6] = GetWndCtrl(WIDC_CUSTOM7);
  5343.     wndCtrl[7] = GetWndCtrl(WIDC_CUSTOM8);
  5344.     wndCtrl[8] = GetWndCtrl(WIDC_CUSTOM9);
  5345.     wndCtrl[9] = GetWndCtrl(WIDC_CUSTOM10);
  5346.  
  5347.     for (int i = 0; i < 10; i++)
  5348.     {
  5349.         m_USEFIRE[i] = CWndBase::m_textureMng.AddTexture(D3DDEVICE, MakePath(DIR_THEME, "UseSlot.tga"), 0xffff00ff, TRUE);
  5350.     }
  5351. }
  5352.  
  5353. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement