Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Flyff > Flyff Private Server
You last visited: Today at 18:36

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



v15 Action slot NEUZ CRASH

Discussion on v15 Action slot NEUZ CRASH within the Flyff Private Server forum part of the Flyff category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Nov 2009
Posts: 182
Received Thanks: 13
v15 Action slot NEUZ CRASH

Hello good afternoon elitepvper ! i want to request some help in my v15 Actions Slot .

im using v15 Interface . i have some problem on my Action slot . if i make i GM char . the action slot its WORKING . no neuz crash . if im using NORMAL CHARACTER . then ill drag or put some skills on action slot its always getting neuz crash anyone know how to fix my problem please help me .



Sorry for my bad english
Thankyou !
bhengot is offline  
Old 06/23/2015, 08:20   #2
 
WooTheFck's Avatar
 
elite*gold: 0
Join Date: May 2013
Posts: 239
Received Thanks: 11
what source did you used?
WooTheFck is offline  
Old 06/23/2015, 08:55   #3
 
elite*gold: 0
Join Date: Nov 2009
Posts: 182
Received Thanks: 13
v15 Source .

Acount have a DATABSAE ? i think ill have wrong on database .
bhengot is offline  
Old 06/23/2015, 09:42   #4
 
elite*gold: 0
Join Date: Oct 2012
Posts: 948
Received Thanks: 157
Put your error log here.
raventh1984 is offline  
Old 06/23/2015, 13:27   #5
 
elite*gold: 0
Join Date: Nov 2009
Posts: 182
Received Thanks: 13
Here my Error Log sir ! ill hope you'll help me
Quote:
2015/ 6/23 19:25:26 g_pPlayer is ready

2015/ 6/23 19:25:28 CWndTaskBar::SetTaskBarTexture : Lyanna 2010

2015/ 6/23 19:25:28 CWndTaskBar::SetTaskBarTexture : Lyanna 581

2015/ 6/23 19:25:41 GetSkillProp range_error min:0, max:443, index:-1

2015/ 6/23 19:25:44 Jun 20 2015 01:59:00 1 rCnt=1

Neuz.exe caused an EXCEPTION_ACCESS_VIOLATION in module Neuz.exe at 001B:006020D7, CWndTaskBar::CheckAddSkill()+0503 byte(s), d:\elemental source\program\_interface\wndtaskbar.cpp, line 1753+0014 byte(s)

- Registers

EAX=00000000 EBX=00000000 ECX=009C7F5C EDX=0000000A ESI=00000203
EDI=0012FD8C EBP=0012F534 ESP=0012F510 EIP=006020D7 FLG=00210246
CS=001B DS=0023 SS=0023 ES=0023 FS=003B GS=0000

001B:006020D7 Neuz.exe, CWndTaskBar::CheckAddSkill()+0503 byte(s)
001B:00602422 Neuz.exe, CWndTaskBar::SetSkillQueue()+0690 byte(s)
001B:0057DB86 Neuz.exe, CWndSkillTreeEx::OnLButtonDblClk()+0422 byte(s)
001B:00514D2D Neuz.exe, CWndBase:efWindowProcA()+1661 byte(s)
001B:00513DE4 Neuz.exe, CWndBase::WindowProc()+1508 byte(s)
001B:00513EA4 Neuz.exe, CWndBase::WindowProc()+1700 byte(s)
001B:005137DB Neuz.exe, CWndBase::WindowRootProc()+1371 byte(s)
001B:00471832 Neuz.exe, CNeuzApp::MsgProc()+0338 byte(s)
001B:0048FB54 Neuz.exe, WndProc()+0036 byte(s)
001B:772686EF USER32.dll, IsThreadDesktopComposited()+0287 byte(s)
001B:77268876 USER32.dll, IsThreadDesktopComposited()+0678 byte(s)
001B:772689B5 USER32.dll, IsThreadDesktopComposited()+0997 byte(s)
001B:77263578 USER32.dll, DispatchMessageA()+0015 byte(s)
001B:00491E27 Neuz.exe, CD3DApplication::Run()+0199 byte(s)
001B:00477E2C Neuz.exe, WinMain()+0332 byte(s)
001B:00923DBC Neuz.exe, WinMainCRTStartup()+0388 byte(s)
001B:76E13C45 kernel32.dll, BaseThreadInitThunk()+0018 byte(s)
001B:774C37F5 ntdll.dll, RtlInitializeExceptionChain()+0239 byte(s)
001B:774C37C8 ntdll.dll, RtlInitializeExceptionChain()+0194 byte(s)
bhengot is offline  
Old 06/23/2015, 14:00   #6
 
Rhyder`'s Avatar
 
elite*gold: 115
Join Date: Jan 2012
Posts: 1,156
Received Thanks: 894
it is about on skill queue.. kindly check it here in this function: CWndTaskBar::CheckAddSkill also here CWndTaskBar::SetSkillQueue
Rhyder` is offline  
Old 06/23/2015, 15:14   #7
 
elite*gold: 0
Join Date: Nov 2009
Posts: 182
Received Thanks: 13
Help what i need change ?? HELP me please ! Where's my WndTaskbar.cpp

Quote:
// WndArcane.cpp: implementation of the CWndNeuz class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "defineText.h"
#include "AppDefine.h"
#include "DialogMsg.h"
#include "WndField.h"
#include "WndManager.h"
#include "WndRegVend.h"

#include "DPClient.h"
extern CDPClient g_DPlay;


_ERROR_STATE g_Error_State;


#define WND_WIDTH 210
#define TASKBAR_HEIGHT 48


/////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////////
//
// ÀÛ¾÷ À©µµ
//
/////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////////
CWndShortcut::CWndShortcut()
{
}
CWndShortcut::~CWndShortcut()
{
}
void CWndShortcut::OnDraw(C2DRender* p2DRender)
{
CWndButton::OnDraw( p2DRender );
}
BOOL CWndShortcut::Process()
{
return CWndButton::Process();
}
void CWndShortcut::PaintFrame( C2DRender* p2DRender )
{
CWndButton::PaintFrame( p2DRender );
}
void CWndShortcut::OnLButtonUp(UINT nFlags, CPoint point)
{
CWndButton::OnLButtonUp( nFlags, point );
}
void CWndShortcut::OnLButtonDown(UINT nFlags, CPoint point)
{
CWndButton::OnLButtonDown( nFlags, point );
}
void CWndShortcut::OnRButtonUp(UINT nFlags, CPoint point)
{
CWndButton::OnRButtonUp( nFlags, point );
}
void CWndShortcut::OnRButtonDown(UINT nFlags, CPoint point)
{
CWndButton::OnRButtonDown( nFlags, point );
}
void CWndShortcut::OnLButtonDblClk(UINT nFlags, CPoint point)
{
CWndButton::OnLButtonDblClk( nFlags, point );
}
void CWndShortcut::OnRButtonDblClk(UINT nFlags, CPoint point)
{
CWndButton::OnRButtonDblClk( nFlags, point );
}
void CWndShortcut::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
{
CWndButton::OnKeyDown( nChar, nRepCnt, nFlags );
}
void CWndShortcut::OnMouseMove(UINT nFlags, CPoint point)
{
CWndButton::OnMouseMove( nFlags, point );
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////////
//
// Äü ¸®½ºÆ®
//
/////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////////

CWndQuickList::CWndQuickList()
{
}
CWndQuickList::~CWndQuickList()
{
}
void CWndQuickList::OnDraw( C2DRender* p2DRender )
{
CWndTaskBar* pWndTaskBar = (CWndTaskBar*)m_pParentWnd;
// ¾ÆÀÌÅÛ ¾ÆÀÌÄÜ Ãâ·Â
CPoint point = CPoint( 0, 0);//POINT_ITEM;
for( int y = 0; y < 4; y++ )
{
for( int i = 0; i < MAX_SLOT_ITEM; i++ )
{
point = CPoint( i * 32 + 32 , y * 38 + 6 );
LPSHORTCUT lpShortcut = &pWndTaskBar->m_aSlotItem[ y ][ i ] ;
if( !lpShortcut->IsEmpty() )
{
if( lpShortcut->m_pTexture )
p2DRender->RenderTexture( point, lpShortcut->m_pTexture );
if( lpShortcut->m_dwShortcut == SHORTCUT_ITEM )
{
CItemBase* pItemBase = g_pPlayer->GetItemId( lpShortcut->m_dwId );
CItemElem* pItemElem = (CItemElem*)pItemBase;

if( pItemElem )
{
if( pItemElem->GetProp()->dwPackMax > 1 )
{
TCHAR szTemp[ 32 ];
_stprintf( szTemp, "%d", pItemElem->m_nItemNum );
CSize size = m_p2DRender->m_pFont->GetTextExtent( szTemp );
p2DRender->TextOut( point.x + 32 - size.cx, point.y + 32 - size.cy, szTemp, 0xff0000ff );
p2DRender->TextOut( point.x + 31 - size.cx, point.y + 31 - size.cy, szTemp, 0xffb0b0f0 );
}
}
else
lpShortcut->m_dwShortcut = SHORTCUT_NONE;
}
}
}
}
}
void CWndQuickList::OnInitialUpdate()
{
CWndNeuz::OnInitialUpdate();
CRect rectRoot = m_pWndRoot->GetLayoutRect();
CRect rectWindow = GetWindowRect();
CPoint point( rectRoot.right - rectWindow.Width(), 110 );
Move( point );
MoveParentCenter();
}
// óÀ½ ÀÌ ÇÔ¼ö¸¦ ºÎ¸£¸é À©µµ°¡ ¿*¸°´Ù.
BOOL CWndQuickList::Initialize( CWndBase* pWndParent, DWORD /*dwWndId*/ )
{
// Daisy¿¡¼* ¼³Á¤ÇÑ ¸®¼Ò½º·Î À©µµ¸¦ ¿¬´Ù.
return CWndNeuz::InitDialog( g_Neuz.GetSafeHwnd(), APP_QUICKLIST, 0, CPoint( 0, 0 ), pWndParent );

}
/*
Á÷Á¢ À©µµ¸¦ ¿*¶§ »ç¿ë
BOOL CWndQuickList::Initialize( CWndBase* pWndParent, DWORD dwWndId )
{
CRect rectWindow = m_pWndRoot->GetWindowRect();
CRect rect( 50 ,50, 300, 300 );
SetTitle( _T( "title" ) );
return CWndNeuz::Create( WBS_THICKFRAME | WBS_MOVE | WBS_SOUND | WBS_CAPTION, rect, pWndParent, dwWndId );
}
*/
BOOL CWndQuickList::OnCommand( UINT nID, DWORD dwMessage, CWndBase* pWndBase )
{
return CWndNeuz::OnCommand( nID, dwMessage, pWndBase );
}
void CWndQuickList::OnSize( UINT nType, int cx, int cy ) \
{
CWndNeuz::OnSize( nType, cx, cy );
}
void CWndQuickList::OnLButtonUp( UINT nFlags, CPoint point )
{
}
void CWndQuickList::OnLButtonDown( UINT nFlags, CPoint point )
{
}
BOOL CWndQuickList::OnChildNotify( UINT message, UINT nID, LRESULT* pLResult )
{
return CWndNeuz::OnChildNotify( message, nID, pLResult );
}
//#ifdef __NEWINTERFACE

//#define TASKSHORTCUT 45
#define ICON_SIZE 32
#define SKILL_SIZE 28

/*
#define POINT_APPLET_X 87
#define POINT_APPLET_Y 9
#define POINT_ITEM_X 295
#define POINT_ITEM_Y 9
#define POINT_QUEUE_X 649
#define POINT_QUEUE_Y 9
*/
DWORD POINT_APPLET_X ;
DWORD POINT_APPLET_Y ;
DWORD POINT_ITEM_X ;
DWORD POINT_ITEM_Y ;
DWORD POINT_QUEUE_X ;
DWORD POINT_QUEUE_Y ;

#define HORIRC_APPLET( nIndex ) CRect( POINT_APPLET_X + nIndex * ICON_SIZE, 6, POINT_APPLET_X + nIndex * ICON_SIZE + ICON_SIZE , 6 + ICON_SIZE )
#define VERTRC_APPLET( nIndex ) CRect( 6, POINT_APPLET_X + nIndex * ICON_SIZE, 3 + ICON_SIZE, POINT_APPLET_X + nIndex * ICON_SIZE + ICON_SIZE )
#define HORIRC_ITEM( nIndex ) CRect( POINT_ITEM_X + nIndex * ICON_SIZE, 6, POINT_ITEM_X + nIndex * ICON_SIZE + ICON_SIZE , 6 + ICON_SIZE )
#define VERTRC_ITEM( nIndex ) CRect( 6, POINT_ITEM_X + nIndex * ICON_SIZE, 3 + ICON_SIZE, POINT_ITEM_X + nIndex * ICON_SIZE + ICON_SIZE )
#define HORIRC_QUEUE( nIndex ) CRect( POINT_QUEUE_X + nIndex * SKILL_SIZE, 6, POINT_QUEUE_X + nIndex * SKILL_SIZE + SKILL_SIZE, 7 + SKILL_SIZE )
#define VERTRC_QUEUE( nIndex ) CRect( 6, POINT_QUEUE_X + nIndex * SKILL_SIZE, 6 + SKILL_SIZE, POINT_QUEUE_X + nIndex * SKILL_SIZE + SKILL_SIZE )

#define RECT_APPLET CRect( POINT_APPLET_X, POINT_APPLET_Y, POINT_APPLET_X + m_nMaxSlotApplet * ICON_SIZE , POINT_APPLET_Y + ICON_SIZE )
#define RECT_ITEM CRect( POINT_ITEM_X , POINT_ITEM_Y , POINT_ITEM_X + MAX_SLOT_ITEM * ICON_SIZE , POINT_ITEM_Y + ICON_SIZE )
#define RECT_QUEUE CRect( POINT_QUEUE_X , POINT_QUEUE_Y , POINT_QUEUE_X + MAX_SLOT_QUEUE * SKILL_SIZE, POINT_QUEUE_Y + SKILL_SIZE )

#define POINT_APPLET CPoint( POINT_APPLET_X, POINT_APPLET_Y )
#define POINT_ITEM CPoint( POINT_ITEM_X , POINT_ITEM_Y )
#define POINT_QUEUE CPoint( POINT_QUEUE_X , POINT_QUEUE_Y )

//#else
/*
#define TASKSHORTCUT 45
#define ICON_SIZE 32
#define SKILL_SIZE 28

#define POINT_APPLET_X 89
#define POINT_APPLET_Y 8
#define POINT_ITEM_X 306
#define POINT_ITEM_Y 8
#define POINT_QUEUE_X 648
#define POINT_QUEUE_Y 6

#define HORIRC_APPLET( nIndex ) CRect( 89 + nIndex * ICON_SIZE, 6, 89 + nIndex * ICON_SIZE + ICON_SIZE , 6 + ICON_SIZE )
#define VERTRC_APPLET( nIndex ) CRect( 6, 89 + nIndex * ICON_SIZE, 3 + ICON_SIZE, 292 + nIndex * ICON_SIZE + ICON_SIZE )
#define HORIRC_ITEM( nIndex ) CRect( 306 + nIndex * ICON_SIZE, 6, 306 + nIndex * ICON_SIZE + ICON_SIZE , 6 + ICON_SIZE )
#define VERTRC_ITEM( nIndex ) CRect( 6, 292 + nIndex * ICON_SIZE, 3 + ICON_SIZE, 292 + nIndex * ICON_SIZE + ICON_SIZE )
#define HORIRC_QUEUE( nIndex ) CRect( 648 + nIndex * SKILL_SIZE, 6, 648 + nIndex * SKILL_SIZE + SKILL_SIZE, 7 + SKILL_SIZE )
#define VERTRC_QUEUE( nIndex ) CRect( 6, 648 + nIndex * SKILL_SIZE, 6 + 32, 648 + nIndex * SKILL_SIZE + SKILL_SIZE )

#define RECT_APPLET CRect( 89, 6, 280, 38 )
#define RECT_ITEM CRect( 306, 6, 612, 38 )
#define RECT_QUEUE CRect( 648, 6, 790, 38 )

#define POINT_APPLET CPoint( POINT_APPLET_X, POINT_APPLET_Y )
#define POINT_ITEM CPoint( POINT_ITEM_X , POINT_ITEM_Y )
#define POINT_QUEUE CPoint( POINT_QUEUE_X , POINT_QUEUE_Y )

#endif
*/
void CWndTaskBar::OnDestroyChildWnd( CWndBase* pWndChild )
{
if( m_pWndQuickList == pWndChild )
SAFE_DELETE( m_pWndQuickList );
}

void CWndTaskBar::Serialize( CAr & ar )
{
if( ar.IsStoring() )
{
int nCount = 0;
u_long uOffset = ar.GetOffset();
ar << nCount;
for( int i = 0; i < MAX_SLOT_APPLET; i++ )
{
if( m_aSlotApplet[i].m_dwShortcut == SHORTCUT_NONE ) // °ªÀÌ µé¾îÀÖ´ÂÁö °Ë»ç
{
ar << i;
ar << m_aSlotApplet[i].m_dwShortcut << m_aSlotApplet[i].m_dwId << m_aSlotApplet[i].m_dwType;
ar << m_aSlotApplet[i].m_dwIndex << m_aSlotApplet[i].m_dwUserId << m_aSlotApplet[i].m_dwData;
if( m_aSlotApplet[i].m_dwShortcut == SHORTCUT_CHAT )
ar.WriteString( m_aSlotApplet[i].m_szString );
nCount++;
}
}
int nBufSize;
LPBYTE lpBuf = ar.GetBuffer( &nBufSize );
*(UNALIGNED int*)( lpBuf + uOffset ) = nCount;

nCount = 0;
uOffset = ar.GetOffset();
ar << nCount;
for( i = 0; i < MAX_SLOT_ITEM_COUNT; i++ )
{
for( int j = 0; j < MAX_SLOT_ITEM; j++ )
{
if( m_aSlotItem[i][j].m_dwShortcut == SHORTCUT_NONE ) // °ªÀÌ µé¾îÀÖ´ÂÁö °Ë»ç
{
ar << i << j;
ar << m_aSlotItem[i][j].m_dwShortcut << m_aSlotItem[i][j].m_dwId << m_aSlotItem[i][j].m_dwType;
ar << m_aSlotItem[i][j].m_dwIndex << m_aSlotItem[i][j].m_dwUserId << m_aSlotItem[i][j].m_dwData;
if( m_aSlotItem[i][j].m_dwShortcut == SHORTCUT_CHAT)
ar.WriteString( m_aSlotItem[i][j].m_szString );
nCount++;

}
}
}
lpBuf = ar.GetBuffer( &nBufSize );
*(UNALIGNED int*)( lpBuf + uOffset ) = nCount;

nCount = 0;
uOffset = ar.GetOffset();
ar << nCount;
for( i = 0; i < MAX_SLOT_QUEUE; i++ )
{
if( m_aSlotQueue[i].m_dwShortcut == SHORTCUT_NONE ) // °ªÀÌ µé¾îÀÖ´ÂÁö °Ë»ç
{
ar << i;
ar << m_aSlotQueue[i].m_dwShortcut << m_aSlotQueue[i].m_dwId << m_aSlotQueue[i].m_dwType;
ar << m_aSlotQueue[i].m_dwIndex << m_aSlotQueue[i].m_dwUserId << m_aSlotQueue[i].m_dwData;
nCount++;
}
}
ar << m_nActionPoint;

lpBuf = ar.GetBuffer( &nBufSize );
*(UNALIGNED int*)( lpBuf + uOffset ) = nCount;
}
else
{
InitTaskBar();
int nCount, nIndex;
ar >> nCount; // applet count
for( int i = 0; i < nCount; i++ )
{
ar >> nIndex;
ar >> m_aSlotApplet[nIndex].m_dwShortcut >> m_aSlotApplet[nIndex].m_dwId >> m_aSlotApplet[nIndex].m_dwType;
ar >> m_aSlotApplet[nIndex].m_dwIndex >> m_aSlotApplet[nIndex].m_dwUserId >> m_aSlotApplet[nIndex].m_dwData;
if( m_aSlotApplet[nIndex].m_dwShortcut == SHORTCUT_CHAT)
ar.ReadString( m_aSlotApplet[nIndex].m_szString, MAX_SHORTCUT_STRING );
m_aSlotApplet[nIndex].m_dwIndex = nIndex;
SetTaskBarTexture( &m_aSlotApplet[nIndex] );

if( m_aSlotApplet[nIndex].m_dwShortcut == SHORTCUT_SKILL )
{
ItemProp* pProp;
if( m_aSlotApplet[nIndex].m_dwType == 2 )
pProp = prj.GetPartySkill( m_aSlotApplet[nIndex].m_dwId );
else
{
LPSKILL pSkill = g_pPlayer->GetSkill( 0, m_aSlotApplet[nIndex].m_dwId );
pProp = prj.GetSkillProp( pSkill->dwSkill );
}
if( pProp == NULL || (pProp->dwComboStyle != CT_STEP && pProp->dwComboStyle != CT_GENERAL) )
{
m_aSlotApplet[nIndex].Empty();
}
}
#ifdef __CLIENT
#if __VER >= 8 // __JEFF_VER_8
else if( m_aSlotApplet[nIndex].m_dwShortcut == SHORTCUT_ITEM )
{
if( g_pPlayer )
{
CItemBase* pItemBase = g_pPlayer->GetItemId( m_aSlotApplet[nIndex].m_dwId );
if( pItemBase && pItemBase->GetProp()->dwPackMax > 1 ) // º´ÇÕ °¡´ÉÇÑ ¾ÆÀÌÅÛÀ̸é?
m_aSlotApplet[nIndex].m_dwItemId = pItemBase->m_dwItemId;
}
}
#endif // __JEFF_VER_8
#endif // __CLIENT
}
ar >> nCount; // slot item count
int nIndex2;
for( i = 0; i < nCount; i++ )
{
ar >> nIndex >> nIndex2; // index
ar >> m_aSlotItem[nIndex][nIndex2].m_dwShortcut >> m_aSlotItem[nIndex][nIndex2].m_dwId >> m_aSlotItem[nIndex][nIndex2].m_dwType;
ar >> m_aSlotItem[nIndex][nIndex2].m_dwIndex >> m_aSlotItem[nIndex][nIndex2].m_dwUserId >> m_aSlotItem[nIndex][nIndex2].m_dwData;
if( m_aSlotItem[nIndex][nIndex2].m_dwShortcut == SHORTCUT_CHAT )
ar.ReadString( m_aSlotItem[nIndex][nIndex2].m_szString, MAX_SHORTCUT_STRING );
#ifdef __CLIENT
#if __VER >= 8 // __JEFF_VER_8
else if( m_aSlotItem[nIndex][nIndex2].m_dwShortcut == SHORTCUT_ITEM )
{
if( g_pPlayer )
{
CItemBase* pItemBase = g_pPlayer->GetItemId( m_aSlotItem[nIndex][nIndex2].m_dwId );
if( pItemBase && pItemBase->GetProp()->dwPackMax > 1 ) // º´ÇÕ °¡´ÉÇÑ ¾ÆÀÌÅÛÀ̸é?
m_aSlotItem[nIndex][nIndex2].m_dwItemId = pItemBase->m_dwItemId;
}
}
#endif // __JEFF_VER_8
#endif // __CLIENT
m_aSlotItem[nIndex][nIndex2].m_dwIndex = nIndex2;
SetTaskBarTexture( &m_aSlotItem[nIndex][nIndex2] );
}

ar >> nCount;
for( i = 0; i < nCount; i++ )
{
ar >> nIndex;
ar >> m_aSlotQueue[nIndex].m_dwShortcut >> m_aSlotQueue[nIndex].m_dwId >> m_aSlotQueue[nIndex].m_dwType;
ar >> m_aSlotQueue[nIndex].m_dwIndex >> m_aSlotQueue[nIndex].m_dwUserId >> m_aSlotQueue[nIndex].m_dwData;

m_aSlotQueue[nIndex].m_dwIndex = nIndex;

LPSKILL lpSkill = g_pPlayer->GetSkill( m_aSlotQueue[nIndex].m_dwType, m_aSlotQueue[nIndex].m_dwId );
//pWndButton->SetTexture( g_Neuz.m_pd3dDevice, MakePath( DIR_ICON, lpSkill->GetProp()->szIcon ) );
m_aSlotQueue[nIndex].m_pTexture = m_textureMng.AddTexture( g_Neuz.m_pd3dDevice, MakePath( DIR_ICON, lpSkill->GetProp()->szIcon/*pItemBase->GetProp()->szIcon*/), 0xffff00ff, FALSE );
}
ar >> m_nActionPoint;
m_nCurQueueNum = nCount;
}
}

void CWndTaskBar::SetTaskBarTexture( LPSHORTCUT pShortcut )
{
if( pShortcut->m_dwShortcut == SHORTCUT_APPLET )
{
AppletFunc* pAppletFunc = g_WndMng.GetAppletFunc( pShortcut->m_dwId );
if( pAppletFunc )
{
pShortcut->m_pTexture = m_textureMng.AddTexture( g_Neuz.m_pd3dDevice, MakePath( DIR_ICON, pAppletFunc->m_pszIconName ), 0xffff00ff );
} else
{
#ifndef __BS_CONSOLE
Error( "CWndTaskBar::SetTaskBarTexture : %s %d", g_pPlayer->GetName(), pShortcut->m_dwId );
#endif
}
}
else if( pShortcut->m_dwShortcut == SHORTCUT_ITEM )
{
CItemBase* pItemBase;
pItemBase = g_pPlayer->GetItemId( pShortcut->m_dwId );
if( pItemBase )
pShortcut->m_pTexture = pItemBase->GetTexture();
}
else if ( pShortcut->m_dwShortcut == SHORTCUT_SKILL)
{
if( pShortcut->m_dwType == 2 )
{
ItemProp* pProp = prj.GetPartySkill( pShortcut->m_dwId );
pShortcut->m_pTexture = m_textureMng.AddTexture( g_Neuz.m_pd3dDevice, MakePath( DIR_ICON, pProp->szIcon/*pItemBase->GetProp()->szIcon*/), 0xffff00ff );
}
else
{
LPSKILL lpSkill = g_pPlayer->GetSkill( pShortcut->m_dwType, pShortcut->m_dwId );
ItemProp* pSkillProp = prj.m_aPropSkill.GetAt( lpSkill->dwSkill );
if( pSkillProp )
pShortcut->m_pTexture = m_textureMng.AddTexture( g_Neuz.m_pd3dDevice, MakePath( DIR_ICON, pSkillProp->szIcon ), 0xffff00ff );
}
}
#if __VER >= 12 // __LORD
else if ( pShortcut->m_dwShortcut == SHORTCUT_LORDSKILL)
{
CCLord* pLord = CCLord::Instance();
CLordSkillComponentExecutable* pComponent = pLord->GetSkills()->GetSkill(pShortcut->m_dwId);
if(pComponent) pShortcut->m_pTexture = pComponent->GetTexture();
}
#endif
else if ( pShortcut->m_dwShortcut == SHORTCUT_MOTION )
{
MotionProp* pMotionProp = prj.GetMotionProp( pShortcut->m_dwId );
if(pMotionProp) //061206 ma 8Â÷¿¡ µé¾î°¥ ¸ð¼Ç°ü¸®¸¦ À§ÇØ ¹öÀü Ãß°¡ propMotion.txt
{
pMotionProp->pTexture = m_textureMng.AddTexture( g_Neuz.m_pd3dDevice, MakePath( DIR_ICON, pMotionProp->szIconName ), 0xffff00ff );
pShortcut->m_pTexture = pMotionProp->pTexture;
}
}
else if( pShortcut->m_dwShortcut == SHORTCUT_CHAT )
{
pShortcut->m_pTexture = m_textureMng.AddTexture( g_Neuz.m_pd3dDevice, MakePath( DIR_ICON, "icon_MacroChat.dds" ), 0xffff00ff );
}
else if( pShortcut->m_dwShortcut == SHORTCUT_EMOTICON )
{
if( pShortcut->m_dwId >= 0 && pShortcut->m_dwId < MAX_EMOTICON_NUM )
{
TCHAR buffer[MAX_SHORTCUT_STRING] = { 0 };
_tcscat( buffer, "/" );
_tcscat( buffer, g_DialogMsg.m_EmiticonCmd[pShortcut->m_dwId].m_szCommand );
_tcscpy( pShortcut->m_szString, buffer );
pShortcut->m_pTexture = g_DialogMsg.m_texEmoticonUser.GetAt(pShortcut->m_dwId);
}
}
else if( pShortcut->m_dwShortcut == SHORTCUT_SKILLFUN )
{
pShortcut->m_pTexture = m_pTexture;
}
}

/*
* ¾×¼Ç Æ÷ÀÎÆ®
. ¾×¼Ç Æ÷ÀÎÆ® º¯¼ö CWndTaskBar::m_nActionPoint
. ½ºÅ³¹Ù¿¡ ¹ÝÅõ¸í »ç°¢Çü ±×¸®±â
. ¾×¼ÇÆ÷ÀÎÆ® ½Ã¸®¾ó¶óÀÌÁî
. ÆÐÅÏ°ø°ÝÀÇ 2¹ø° °ø°ÝÀ» »ç¿ë½Ã¿¡´Â ¾×¼ÇÆ÷ÀÎÆ® Áõ°¡ 1Á¡¾¿ - 100ÀÌ ÇÑ°è
. ¾×¼Ç Æ÷ÀÎÆ®¿¡ µû¸¥ ½¦ÀÌµå ±×¸®±â - ´©ÀûÆ÷ÀÎÆ®¿¡µû¶ó ´Ù¸£´Ù.
. ½ºÅ³»ç¿ë½Ã ´Ü°èº°·Î ¾×¼ÇÆ÷ÀÎÆ® ¼Ò¸ð·® ´Ù¸£°Ô.

*/

CWndTaskBar::CWndTaskBar()
{
m_nCurQueue = -1;
m_nCurQueueNum = 0;
//m_nPosition = TASKBAR_RIGHT;//LEFT;//TASKBAR_TOP;
m_nPosition = TASKBAR_BOTTOM;//LEFT;//TASKBAR_TOP;
memset( m_aSlotApplet, 0, sizeof( m_aSlotApplet ) );
memset( m_aSlotItem , 0, sizeof( m_aSlotItem ) );
memset( m_aSlotQueue , 0, sizeof( m_aSlotQueue ) );
memset( &m_aSlotSkill, 0, sizeof( m_aSlotSkill ) );

m_pWndQuickList = NULL;
m_pSelectShortcut = NULL;
m_bStartTimeBar = FALSE;
m_nSkillBar = 0;
m_nUsedSkillQueue = 0;
m_nExecute = 0;
m_nSlotIndex = 0;
m_paSlotItem = m_aSlotItem[ m_nSlotIndex ];
m_nActionPoint = 0;
m_dwHighAlpha = 0;
// m_nMaxSlotApplet = 5;
}

CWndTaskBar::~CWndTaskBar()
{
/*
for( int i = 0; i < m_awndShortCut.GetSize(); i++ )
{
CWndButton* pButton = (CWndButton*)m_awndShortCut.GetAt( i );
SAFE_DELETE( pButton );
}
*/
}

void CWndTaskBar::InitTaskBar()
{
m_nCurQueue = -1;
m_nCurQueueNum = 0;
//m_nPosition = TASKBAR_RIGHT;//LEFT;//TASKBAR_TOP;
m_nPosition = TASKBAR_BOTTOM;//LEFT;//TASKBAR_TOP;
memset( m_aSlotApplet, 0, sizeof( m_aSlotApplet ) );
memset( m_aSlotItem , 0, sizeof( m_aSlotItem ) );
memset( m_aSlotQueue , 0, sizeof( m_aSlotQueue ) );

m_pWndQuickList = NULL;
m_pSelectShortcut = NULL;
m_bStartTimeBar = FALSE;
m_nSkillBar = 0;
m_nUsedSkillQueue = 0;
m_nExecute = 0;
m_nSlotIndex = 0;
m_paSlotItem = m_aSlotItem[ m_nSlotIndex ];
m_nActionPoint = 0;
m_dwHighAlpha = 0;
//m_nMaxSlotApplet = 5;
}

void CWndTaskBar::PutTooTip( LPSHORTCUT pShortcut, CPoint point, CRect* pRect )
{
ClientToScreen( &point );
ClientToScreen( pRect );
if( pShortcut->m_dwShortcut == SHORTCUT_APPLET )
{
AppletFunc* pAppletFunc = g_WndMng.GetAppletFunc( pShortcut->m_dwId );
if( pAppletFunc )
{
//do
// {

//CString string;
CEditString strEdit;
if( pAppletFunc->m_cHotkey == 0 )
strEdit.AddString( pAppletFunc->m_pAppletDesc );
else
{
strEdit.AddString( pAppletFunc->m_pAppletDesc );
strEdit.AddString( "\n" );
CString string;
string.Format( "[%s %c]", prj.GetText( TID_GAME_TOOLTIP_HOTKEY ), pAppletFunc->m_cHotkey );
strEdit.AddString( string, 0xff0000ff );
}
//CEditString strEdit;
//strEdit.SetParsingString( string );
//strEdit.SetAt( 0, (CHAR)(aaa >> 8) );
//strEdit.SetAt( 1, (CHAR)(aaa & 0xff00) );
//aaa++;
//TRACE( "aaa %x\n", aaa );
g_toolTip.PutToolTip( pShortcut->m_dwId, strEdit, *pRect, point, 0 );
//} while( aaa < 0xffff );
}
}
else
if( pShortcut->m_dwShortcut == SHORTCUT_CHAT )
{
g_toolTip.PutToolTip( 10000, pShortcut->m_szString, *pRect, point, 0 );
}
else
if( pShortcut->m_dwShortcut == SHORTCUT_EMOTICON )
{
g_toolTip.PutToolTip( 10000, pShortcut->m_szString, *pRect, point, 0 );
}
else
if( pShortcut->m_dwShortcut == SHORTCUT_ITEM )
{
g_WndMng.PutToolTip_Item( pShortcut->m_dwType, pShortcut->m_dwId, point, pRect );
}
else
if( pShortcut->m_dwShortcut == SHORTCUT_SKILL )
{
if( pShortcut->m_dwType == 2 )
{
g_WndMng.PutToolTip_Troupe( pShortcut->m_dwId, point, pRect );
}
else
// if( pShortcut->m_dwType == 0 || pShortcut->m_dwType == 1 || pShortcut->m_dwType == 3 )
{
LPSKILL lpSkill = g_pPlayer->GetSkill( 0, pShortcut->m_dwId );
g_WndMng.PutToolTip_Skill( lpSkill->dwSkill, lpSkill->dwLevel, point, pRect );
}
}
#if __VER >= 12 // __LORD
else
if( pShortcut->m_dwShortcut == SHORTCUT_LORDSKILL )
{
CCLord* pLord = CCLord::Instance();
CLordSkillComponentExecutable* pComponent = pLord->GetSkills()->GetSkill(pShortcut->m_dwId);
CString string, str;
CEditString strEdit;

if(!pComponent) return;

string.Format( "#b#cff2fbe6d%s#nb#nc\n%s", pComponent->GetName(), pComponent->GetDesc());
if(pComponent->GetTick() != 0)
{
str.Format( prj.GetText(TID_TOOLTIP_COOLTIME), pComponent->GetTick(), 0);
string += "\n";
string += str;
}

strEdit.SetParsingString( string );
g_toolTip.PutToolTip(10000, strEdit, *pRect, point, 0);
}
#endif
else
if( pShortcut->m_dwShortcut == SHORTCUT_MOTION )
{
MotionProp* pMotionProp = prj.GetMotionProp( pShortcut->m_dwId );
if(!pMotionProp) //061206 ma 8Â÷¿¡ µé¾î°¥ ¸ð¼Ç°ü¸®¸¦ À§ÇØ ¹öÀü Ãß°¡ propMotion.txt
return;

CString string;

string.Format( "%s", pMotionProp->szDesc );

if( pMotionProp->dwID == MOT_BASE_CHEER )
{
if( g_pPlayer )
{
CString str;
str.Format( prj.GetText(TID_CHEER_MESSAGE1), g_pPlayer->m_nCheerPoint );

string += "\n\n";
string += str;

if( g_pPlayer->m_nCheerPoint < MAX_CHEERPOINT )
{
CTimeSpan ct( ((g_pPlayer->m_dwTickCheer - GetTickCount()) / 1000) ); // ³²Àº½Ã°£À» ÃÊ´ÜÀ§·Î º¯È¯Çؼ* ³Ñ°ÜÁÜ

if( ct.GetMinutes() <= 0 )
{
str.Format( prj.GetText(TID_PK_LIMIT_SECOND), ct.GetSeconds() );
}
else
{
str.Format( prj.GetText(TID_PK_LIMIT_MINUTE), ct.GetMinutes() );
}

string += "\n";
string += (prj.GetText(TID_CHEER_MESSAGE2)+str);
}
}
}

CEditString strEdit;
strEdit.SetParsingString( string );
g_toolTip.PutToolTip( pShortcut->m_dwId , strEdit, *pRect, point, 0 );
}
else
if( pShortcut->m_dwShortcut == SHORTCUT_SKILLFUN )
{
strcpy( pShortcut->m_szString, prj.GetText(TID_GAME_SKILLSHORTCUT) );
g_toolTip.PutToolTip( 10000, pShortcut->m_szString, *pRect, point, 0 );
}

}

void CWndTaskBar::OnMouseWndSurface( CPoint point )
{
CRect rect = CRect( POINT_APPLET_X, POINT_APPLET_Y, POINT_APPLET_X + ICON_SIZE, POINT_APPLET_Y + ICON_SIZE );
for( int i = 0; i < m_nMaxSlotApplet; i++ )
{
LPSHORTCUT lpShortcut = &m_aSlotApplet[ i ] ;
if( !lpShortcut->IsEmpty() && rect.PtInRect( point) )
{
MotionProp* pMotionProp = prj.GetMotionProp( lpShortcut->m_dwId );

if( !IsShortcut( lpShortcut, SHORTCUT_MOTION, MOT_BASE_CHEER ) )
PutTooTip( lpShortcut, point, &rect );
}
rect += CPoint( ICON_SIZE, 0 );
}

rect = CRect( POINT_ITEM_X, POINT_ITEM_Y, POINT_ITEM_X + ICON_SIZE, POINT_ITEM_Y + ICON_SIZE );
for( i = 0; i < MAX_SLOT_ITEM; i++ )
{
LPSHORTCUT lpShortcut = &m_paSlotItem[ i ] ;
if( !lpShortcut->IsEmpty() && rect.PtInRect( point) )
{
if( !IsShortcut( lpShortcut, SHORTCUT_MOTION, MOT_BASE_CHEER ) )
PutTooTip( lpShortcut, point,&rect );
}
rect += CPoint( ICON_SIZE, 0 );
}
rect = CRect( POINT_QUEUE_X, POINT_QUEUE_Y, POINT_QUEUE_X + SKILL_SIZE, POINT_QUEUE_Y + SKILL_SIZE );
for( i = 0; i < MAX_SLOT_QUEUE; i++ )
{
LPSHORTCUT lpShortcut = &m_aSlotQueue[ i ] ;
if( !lpShortcut->IsEmpty() && rect.PtInRect( point) )
{
if( !IsShortcut( lpShortcut, SHORTCUT_MOTION, MOT_BASE_CHEER ) )
PutTooTip( lpShortcut, point,&rect );
}
rect += CPoint( SKILL_SIZE, 0 );
}

rect = CRect( POINT_QUEUE_X - ICON_SIZE - 5, POINT_QUEUE_Y, (POINT_QUEUE_X - ICON_SIZE - 5) + 32, POINT_QUEUE_Y + 32);

if( rect.PtInRect( point) )
{
SHORTCUT Shortcut;
Shortcut.m_dwShortcut = SHORTCUT_SKILLFUN;
PutTooTip( &Shortcut, point,&rect );
}
}

#define DRAW_HOTKEY( p2DRender, point, cHotkey ) { CString string; string.Format( "%c", cHotkey ); \
p2DRender->TextOut( point.x - 0 + 2, point.y - 0 - 4, string, 0xffffffff ); }


/*
#define DRAW_HOTKEY( p2DRender, point, cHotkey ) { \
if( cHotkey >= 'A' && cHotkey <= 'Z' ) m_texPack.GetAt( cHotkey - 'A' )->Render( p2DRender, point, m_nAlphaCount ); \
if( cHotkey >= '0' && cHotkey <= '9' ) m_texPack.GetAt( cHotkey - '0' + 26 )->Render( p2DRender, point, m_nAlphaCount ); }
*/


void CWndTaskBar::OnDraw( C2DRender* p2DRender )
{
if( NULL == g_pPlayer )
return;

DWORD dwCur = g_tmCurrent;
CRect rect = GetWindowRect();
CRect rectSkillQueue;

CD3DFont* pOldFont = p2DRender->GetFont();
p2DRender->SetFont( CWndBase::m_Theme.m_pFontWndTitle );

if( m_nPosition == TASKBAR_TOP || m_nPosition == TASKBAR_BOTTOM )
{
rectSkillQueue.SetRect( rect.Width() - 32 * 4 - 6, 0, rect.Width(), rect.Height() );
}
else
if( m_nPosition == TASKBAR_LEFT || m_nPosition == TASKBAR_RIGHT )
{
rectSkillQueue.SetRect( 0, rect.Height() - 32 * 4 - 6, rect.Width(), rect.Height() );
}

// µå·¡±× ÇÏÀ̶óÀÌÆ® ½½·Ô Ç¥½Ã
if( m_GlobalShortcut.IsEmpty() == FALSE )
{
DWORD dwColor;
if( m_dwHighAlpha < 128 )
dwColor = D3DCOLOR_ARGB( m_dwHighAlpha, 0, 0, 255 );
else
dwColor = D3DCOLOR_ARGB( 128 - ( m_dwHighAlpha - 128 ), 0, 0, 255 );

LPWNDCTRL pApplet = GetWndCtrl( WIDC_CUSTOM1 );
LPWNDCTRL pItem = GetWndCtrl( WIDC_CUSTOM2 );
LPWNDCTRL pSkill = GetWndCtrl( WIDC_CUSTOM3 );

CRect rectApplet = pApplet->rect;
CRect rectItem = pItem->rect;
CRect rectSkill = pSkill->rect;

rectApplet.top = 42;
rectApplet.bottom = 47;
rectApplet.left -= 6;
rectApplet.right += 6;
rectItem.top = 42;
rectItem.bottom = 47;
rectItem.left -= 6;
rectItem.right += 6;
rectSkill.top = 42;
rectSkill.bottom = 47;
rectSkill.left -= 3;
rectSkill.right += 4;

switch( m_GlobalShortcut.m_dwShortcut )
{
case SHORTCUT_APPLET:
case SHORTCUT_ITEM:
case SHORTCUT_MOTION:
p2DRender->RenderFillRect( rectApplet, dwColor );
p2DRender->RenderFillRect( rectItem, dwColor );
break;
case SHORTCUT_SKILL:
if( m_GlobalShortcut.m_dwType == 0 )
{
DWORD dwSkill = g_pPlayer->GetSkill( 0, m_GlobalShortcut.m_dwId )->dwSkill;
DWORD dwComboStyleSrc = prj.GetSkillProp( dwSkill )->dwComboStyle;
if( dwComboStyleSrc == CT_STEP || dwComboStyleSrc == CT_GENERAL ) // ½ºÅÜÀ̳ª Á¦³×·²À̸é ÇÕ°Ý
p2DRender->RenderFillRect( rectItem, dwColor );
p2DRender->RenderFillRect( rectSkill, dwColor );
}
else
p2DRender->RenderFillRect( rectItem, dwColor );
break;
}
}

// ¾ÖÇ÷¿ ¾ÆÀÌÄÜ Ãâ·Â
CPoint point = POINT_APPLET;
for( int i = 0; i < m_nMaxSlotApplet; i++ )
{
LPSHORTCUT lpShortcut = &m_aSlotApplet[ i ] ;
if( !lpShortcut->IsEmpty() )
{
if( lpShortcut->m_pTexture )
p2DRender->RenderTexture( point, lpShortcut->m_pTexture );
if( lpShortcut->m_dwShortcut == SHORTCUT_ITEM )
{
CItemBase* pItemBase = g_pPlayer->GetItemId( lpShortcut->m_dwId );
CItemElem* pItemElem = (CItemElem*)pItemBase;
if( pItemElem )
{
if( pItemElem->GetProp()->dwPackMax > 1 )
{
TCHAR szTemp[ 32 ];
#if __VER >= 8 // __JEFF_VER_8
_stprintf( szTemp, "%d", g_pPlayer?g_pPlayer->m_Inventory.GetItemCount( pItemElem->m_dwItemId ): 0 );
#else // __JEFF_VER_8
_stprintf( szTemp, "%d", pItemElem->m_nItemNum );
#endif // __JEFF_VER_8
CSize size = m_p2DRender->m_pFont->GetTextExtent( szTemp );
p2DRender->TextOut( point.x + 32 - size.cx, point.y + 32 - size.cy, szTemp, 0xff0000ff );
p2DRender->TextOut( point.x + 31 - size.cx, point.y + 31 - size.cy, szTemp, 0xffb0b0f0 );
}
DWORD dwGroup = g_pPlayer->m_cooltimeMgr.GetGroup( pItemElem->GetProp() );
if( dwGroup )
{
DWORD dwEnd = g_pPlayer->m_cooltimeMgr.GetTime( dwGroup ); // À̺¥Æ® Á¾·á ½Ã°¢
if( dwEnd != 0 && dwEnd > dwCur )
{
DWORD dwBase = g_pPlayer->m_cooltimeMgr.GetBase( dwGroup ); // À̺¥Æ® ½ÃÀÛ ½Ã°¢
RenderRadar( p2DRender, point, dwCur - dwBase, dwEnd - dwBase );
}
}
}
else
{
#if __VER >= 8 // __JEFF_VER_8
ItemProp* pItemProp = prj.GetItemProp( lpShortcut->m_dwItemId );
if( pItemProp && pItemProp->dwPackMax > 1 ) // º´ÇÕ °¡´ÉÇÑ ¾ÆÀÌÅÛÀ̸é?
{
DWORD dwId = g_pPlayer->m_Inventory.Find( lpShortcut->m_dwItemId );
if( dwId != NULL_ID ) // °°Àº Á¾·ùÀÇ ¾ÆÀÌÅÛÀÌ ÀÖ´Ù¸é?
{
lpShortcut->m_dwId = dwId;
g_DPlay.SendAddAppletTaskBar( i, lpShortcut );
}
else
{
lpShortcut->Empty();
g_DPlay.SendRemoveAppletTaskBar( i );
}
}
else
{
lpShortcut->Empty();
g_DPlay.SendRemoveAppletTaskBar( i );
}
#else // __JEFF_VER_8
lpShortcut->Empty();
g_DPlay.SendRemoveAppletTaskBar( i );
#endif // __JEFF_VER_8
}
}
else
if( lpShortcut->m_dwShortcut == SHORTCUT_APPLET )
{
AppletFunc* pAppletFunc = g_WndMng.GetAppletFunc( lpShortcut->m_dwId );
if( pAppletFunc && pAppletFunc->m_cHotkey )
{
CPoint ptHotkey( point.x + 8, point.y - 9 );
DRAW_HOTKEY( p2DRender, ptHotkey, pAppletFunc->m_cHotkey );
}
}
else if( lpShortcut->m_dwShortcut == SHORTCUT_SKILL && lpShortcut->m_dwType != 2 ) //±Ø´Ü½ºÅ³Àº ÄðŸÀÓ °ü·Ã Render¸¦ ÇÏÁö ¾Ê´Â´Ù.
{
RenderCollTime( point, lpShortcut->m_dwId, p2DRender );
}
#if __VER >= 12 // __LORD
else if( lpShortcut->m_dwShortcut == SHORTCUT_LORDSKILL)
{
RenderLordCollTime( point, lpShortcut->m_dwId, p2DRender );
}
#endif
else
if( lpShortcut->m_dwShortcut == SHORTCUT_MOTION )
{
if( lpShortcut->m_dwId == MOT_BASE_ESCAPE )
{
ItemProp* pItem = prj.GetItemProp( g_AddSMMode.dwSMItemID[SM_ESCAPE] );

if( pItem && g_pPlayer )
{
CTimeSpan ct( g_pPlayer->m_dwSMTime[SM_ESCAPE] );

if( ct.GetTotalSeconds() )
{
point.y -= 1;
point.x += 1;
RenderRadar( m_p2DRender, point, (DWORD)( pItem->dwCircleTime - ct.GetTotalSeconds() ), pItem->dwCircleTime );
}
}
}
}
}
point += CPoint( ICON_SIZE, 0 );
}
// ¾ÆÀÌÅÛ ¾ÆÀÌÄÜ Ãâ·Â
point = POINT_ITEM;
for( i = 0; i < MAX_SLOT_ITEM; i++ )
{
LPSHORTCUT lpShortcut = &m_paSlotItem[ i ] ;
if( !lpShortcut->IsEmpty() )
{
if( lpShortcut->m_pTexture )
p2DRender->RenderTexture( point, lpShortcut->m_pTexture );
if( lpShortcut->m_dwShortcut == SHORTCUT_ITEM )
{
CItemBase* pItemBase = g_pPlayer->GetItemId( lpShortcut->m_dwId );
CItemElem* pItemElem = (CItemElem*)pItemBase;
if( pItemElem )
{
if( pItemElem->GetProp()->dwPackMax > 1 )
{
TCHAR szTemp[ 32 ];
#if __VER >= 8 // __JEFF_VER_8
_stprintf( szTemp, "%d", g_pPlayer?g_pPlayer->m_Inventory.GetItemCount( pItemElem->m_dwItemId ): 0 );
#else // __JEFF_VER_8
_stprintf( szTemp, "%d", pItemElem->m_nItemNum );
#endif // __JEFF_VER_8
CSize size = m_p2DRender->m_pFont->GetTextExtent( szTemp );
p2DRender->TextOut( point.x + 32 - size.cx, point.y + 32 - size.cy, szTemp, 0xff0000ff );
p2DRender->TextOut( point.x + 31 - size.cx, point.y + 31 - size.cy, szTemp, 0xffb0b0f0 );
}
}

DWORD dwGroup = g_pPlayer->m_cooltimeMgr.GetGroup( pItemElem->GetProp() );
if( dwGroup )
{
DWORD dwEnd = g_pPlayer->m_cooltimeMgr.GetTime( dwGroup ); // À̺¥Æ® Á¾·á ½Ã°¢
if( dwEnd != 0 && dwEnd > dwCur )
{
DWORD dwBase = g_pPlayer->m_cooltimeMgr.GetBase( dwGroup ); // À̺¥Æ® ½ÃÀÛ ½Ã°¢
RenderRadar( p2DRender, point, dwCur - dwBase, dwEnd - dwBase );
}
}
}
else if( lpShortcut->m_dwShortcut == SHORTCUT_SKILL && lpShortcut->m_dwType != 2 ) //±Ø´Ü½ºÅ³Àº ÄðŸÀÓ °ü·Ã Render¸¦ ÇÏÁö ¾Ê´Â´Ù.
{
RenderCollTime( point, lpShortcut->m_dwId, p2DRender );
}
#if __VER >= 12 // __LORD
else if( lpShortcut->m_dwShortcut == SHORTCUT_LORDSKILL)
{
RenderLordCollTime( point, lpShortcut->m_dwId, p2DRender );
}
#endif
else
if( lpShortcut->m_dwShortcut == SHORTCUT_MOTION )
{
if( lpShortcut->m_dwId == MOT_BASE_ESCAPE )
{
ItemProp* pItem = prj.GetItemProp( g_AddSMMode.dwSMItemID[SM_ESCAPE] );

if( pItem && g_pPlayer )
{
CTimeSpan ct( g_pPlayer->m_dwSMTime[SM_ESCAPE] );

if( ct.GetTotalSeconds() )
{
point.y -= 1;
point.x += 1;
RenderRadar( m_p2DRender, point, (DWORD)( pItem->dwCircleTime - ct.GetTotalSeconds() ), pItem->dwCircleTime );
}
}
}
}


}
// hotkey Ãâ·Â
CHAR cHotkey = ( i == 9 ) ? '0' : '1' + i;
CPoint ptHotkey( point.x + 8, point.y - 9 );
//DRAW_HOTKEY( p2DRender, ptHotkey, cHotkey );
point += CPoint( ICON_SIZE, 0 );
}

point = CPoint( POINT_QUEUE_X - ICON_SIZE - 5, POINT_QUEUE_Y );
p2DRender->RenderTexture( point, m_pTexture );

// ½ºÅ³ Å¥
point = POINT_QUEUE;
//p2DRender->TextOut( point.x - 5, point.y - 16, "ACTION SLOT" );
for( i = 0; i < m_nCurQueueNum; i++ )
{
LPSHORTCUT lpShortcut = &m_aSlotQueue[ i ] ;
if( !lpShortcut->IsEmpty() )
{
if( lpShortcut->m_pTexture )
{
p2DRender->RenderTexture( point, lpShortcut->m_pTexture );
// LPSKILL pSkill = g_pPlayer->GetSkill( lpShortcut->m_dwType, lpShortcut->m_dwId );
// if( g_pPlayer->m_nReUseDelay[ lpShortcut->m_dwId ] > 0 )
// p2DRender->TextOut( point.x, point.y, g_pPlayer->m_nReUseDelay[ lpShortcut->m_dwId ] );

}
}
point += CPoint( SKILL_SIZE, 0 );
}


if( !( g_pPlayer->IsSMMode( SM_ACTPOINT ) ) )
{
#define LV2MAXAP 10 // 2´Ü°è ½ºÅ³ÀÌ ´ÙÂ÷´Âµ¥ ÇÊ¿äÇÑ action point
#define LV3MAXAP 25
#define LV4MAXAP 50
#define LV5MAXAP 100

point = POINT_QUEUE;
point.x += SKILL_SIZE; // ½ºÅ³ 2¹ø°Ä*ºÎÅÍ ½¦À̵åµÈ´Ù.
{
int nAP2Size; // ¾×¼ÇÆ÷ÀÎÆ®¸¦ ÇÏÀ̶óÀÌÆ®¾çÀ¸·Î º¯È¯ÇÑ°ª.
if( m_nActionPoint >= LV4MAXAP ) // LV4MAXAP¸¦ ³Ñ¾î¼*¸é 5´Ü°è ½ÃÀÛ.
nAP2Size = (SKILL_SIZE * 3) + (((m_nActionPoint - LV4MAXAP) * SKILL_SIZE) / (LV5MAXAP - LV4MAXAP));
else if( m_nActionPoint >= LV3MAXAP )
nAP2Size = (SKILL_SIZE * 2) + (((m_nActionPoint - LV3MAXAP) * SKILL_SIZE) / (LV4MAXAP - LV3MAXAP));
else if( m_nActionPoint >= LV2MAXAP )
nAP2Size = (SKILL_SIZE * 1) + (((m_nActionPoint - LV2MAXAP) * SKILL_SIZE) / (LV3MAXAP - LV2MAXAP));
else
nAP2Size = (m_nActionPoint * SKILL_SIZE) / LV2MAXAP;

p2DRender->m_pd3dDevice->SetRenderState( D3DRS_ALPHABLENDENABLE, TRUE );
p2DRender->m_pd3dDevice->SetRenderState( D3DRS_ALPHATESTENABLE, FALSE );
point.x += nAP2Size;
nAP2Size = (SKILL_SIZE * 4) - nAP2Size;
p2DRender->RenderFillRect( CRect(point.x, point.y, point.x + nAP2Size, point.y + SKILL_SIZE + 2),
D3DCOLOR_ARGB( 0x7f, 0, 0, 0 ) );

if( m_nCurQueueNum > 0 )
{
int show = 1;

if( m_nActionPoint >= LV2MAXAP )
show = 2;
if( m_nActionPoint >= LV3MAXAP )
show = 3;
if( m_nActionPoint >= LV4MAXAP )
show = 4;
if( m_nActionPoint >= LV5MAXAP )
show = 5;

if( m_nCurQueueNum <= show )
show = m_nCurQueueNum;

CPoint Point = CPoint( POINT_QUEUE_X, POINT_QUEUE_Y+1 );

RenderOutLineLamp( POINT_QUEUE_X, POINT_QUEUE_Y+1, show, SKILL_SIZE );
}
}
}

CWndButton* pWndButton = (CWndButton*)GetDlgItem( WIDC_UP );
rect = pWndButton->GetWindowRect( TRUE );
rect.top = rect.bottom - 2;
p2DRender->TextOut( rect.left, rect.top, m_nSlotIndex + 1, 0xffffffff );
p2DRender->SetFont( pOldFont );
}

void CWndTaskBar::UpdateItem()
{
if( g_pPlayer == NULL )
return;

for( int i = 0; i < MAX_SLOT_ITEM; i++ )
{
LPSHORTCUT lpShortcut = &m_paSlotItem[ i ] ;
if( !lpShortcut->IsEmpty() )
{
if( lpShortcut->m_dwShortcut == SHORTCUT_ITEM )
{
CItemBase* pItemBase = g_pPlayer->GetItemId( lpShortcut->m_dwId );
CItemElem* pItemElem = (CItemElem*)pItemBase;

if( pItemElem )
{
if( lpShortcut->m_pTexture != pItemElem->GetTexture() )
lpShortcut->m_pTexture = pItemElem->GetTexture();
}
else
{
#if __VER >= 8 // __JEFF_VER_8
ItemProp* pItemProp = prj.GetItemProp( lpShortcut->m_dwItemId );
if( pItemProp && pItemProp->dwPackMax > 1 ) // º´ÇÕ °¡´ÉÇÑ ¾ÆÀÌÅÛÀ̸é?
{
DWORD dwId = g_pPlayer->m_Inventory.Find( lpShortcut->m_dwItemId );
if( dwId != NULL_ID ) // °°Àº Á¾·ùÀÇ ¾ÆÀÌÅÛÀÌ ÀÖ´Ù¸é?
{
lpShortcut->m_dwId = dwId;
g_DPlay.SendAddItemTaskBar( m_nSlotIndex, i, lpShortcut );
}
else
{
lpShortcut->Empty();
g_DPlay.SendRemoveItemTaskBar( m_nSlotIndex, i );
}
}
else
{
lpShortcut->Empty();
g_DPlay.SendRemoveItemTaskBar( m_nSlotIndex, i );
}
#else // __JEFF_VER_8
lpShortcut->Empty();
g_DPlay.SendRemoveItemTaskBar( m_nSlotIndex, i );
#endif // __JEFF_VER_8
}
}
}
}
}

void CWndTaskBar::OnKeyUp( UINT nChar, UINT nRepCnt, UINT nFlags )
{
}
void CWndTaskBar::OnInitialUpdate()
{
CWndNeuz::OnInitialUpdate();

LPWNDCTRL pApplet = GetWndCtrl( WIDC_CUSTOM1 );
LPWNDCTRL pItem = GetWndCtrl( WIDC_CUSTOM2 );
LPWNDCTRL pSkill = GetWndCtrl( WIDC_CUSTOM3 );

POINT_APPLET_X = pApplet->rect.left;
POINT_APPLET_Y = pApplet->rect.top;
POINT_ITEM_X = pItem->rect.left;
POINT_ITEM_Y = pItem->rect.top;
POINT_QUEUE_X = pSkill->rect.left;
POINT_QUEUE_Y = pSkill->rect.top;

CRect rect( 5, 7, 754, 40 );

g_WndMng.m_pWndTaskBar = this;

{
rect = g_Neuz.GetDeviceRect();
m_pWndRoot->m_rectLayout = rect;
switch( m_nPosition )
{
case TASKBAR_TOP:
rect.bottom = TASKBAR_HEIGHT;
m_pWndRoot->m_rectLayout.top = rect.bottom;
break;
case TASKBAR_BOTTOM:
rect.top = rect.bottom - TASKBAR_HEIGHT;
m_pWndRoot->m_rectLayout.bottom = rect.top;
break;
case TASKBAR_LEFT:
rect.right = TASKBAR_HEIGHT;
m_pWndRoot->m_rectLayout.left = rect.right;
break;
case TASKBAR_RIGHT:
rect.left = rect.right - TASKBAR_HEIGHT;
m_pWndRoot->m_rectLayout.right = rect.left;
break;
}
SetWndRect( rect );
}
m_texPack.LoadScript( m_pApp->m_pd3dDevice, MakePath( DIR_THEME, "hotkey.inc" ) );

m_menuShortcut.CreateMenu( this );
m_menuShortcut.AppendMenu( 0, 0 ,_T( "»èÁ¦" ) );

m_pTexture = m_textureMng.AddTexture( g_Neuz.m_pd3dDevice, MakePath( DIR_ICON, "icon_ActionSkill.dds" ), 0xffff00ff );
m_aSlotSkill.m_dwShortcut = SHORTCUT_SKILLFUN;
m_aSlotSkill.m_pTexture = m_pTexture;
}

HRESULT CWndTaskBar::InvalidateDeviceObjects()
{
CWndBase::InvalidateDeviceObjects();

#ifdef __YDEBUG
m_texPack.InvalidateDeviceObjects();
#endif //__YDEBUG
return S_OK;
}

HRESULT CWndTaskBar:eleteDeviceObjects()
{
CWndBase:eleteDeviceObjects();

#ifdef __YDEBUG
m_texPack.DeleteDeviceObjects();
#endif //__YDEBUG
return S_OK;
}

HRESULT CWndTaskBar::RestoreDeviceObjects()
{
CWndBase::RestoreDeviceObjects();

#ifdef __YDEBUG
m_texPack.RestoreDeviceObjects(m_pApp->m_pd3dDevice);
#endif //__YDEBUG

return 0;
}

BOOL CWndTaskBar::Initialize(CWndBase* pWndParent,DWORD dwWndId)
{
CRect rect = g_Neuz.GetDeviceRect();
//m_rectLayout = rect;
/*
switch( m_nPosition )
{
case TASKBAR_TOP:
rect.bottom = TASKBAR_HEIGHT;
m_pWndRoot->m_rectLayout.top = rect.bottom;
break;
case TASKBAR_BOTTOM:
rect.top = rect.bottom - TASKBAR_HEIGHT;
m_pWndRoot->m_rectLayout.bottom = rect.top;
break;
case TASKBAR_LEFT:
break;
case TASKBAR_RIGHT:
break;
}
*/
//m_pWndRoot->SetWndRect( rectRoot );

//CMainFrame
//rect.top = rect.bottom;
//rect.bottom += TASKBAR_HEIGHT;
// rect.bottom = CLIENT_HEIGHT;
//m_strMessage = lpszMessage;
//m_dwType = nType;
//SetTitle("¸ÞÁö½Ã À©µµ");
// return CWndBase::Create( 0 | /*WBS_MODAL|*/ WBS_MANAGER | WBS_SOUND | WBS_NOFRAME, rect, &g_WndMng, APP_TASKBAR );
BOOL bResult;
if( g_Option.m_nResWidth == 800 )
{
m_nMaxSlotApplet = 5;
bResult = CWndNeuz::InitDialog( g_Neuz.GetSafeHwnd(), APP_TASKBAR800, WBS_MANAGER | WBS_SOUND, CPoint( 0, 0 ), pWndParent );
}
else
if( g_Option.m_nResWidth == 1024 )
{
m_nMaxSlotApplet = 10;
bResult = CWndNeuz::InitDialog( g_Neuz.GetSafeHwnd(), APP_TASKBAR1024, WBS_MANAGER | WBS_SOUND, CPoint( 0, 0 ), pWndParent );
}
else
if( g_Option.m_nResWidth == 1280 )
{
m_nMaxSlotApplet = MAX_SLOT_APPLET;
bResult = CWndNeuz::InitDialog( g_Neuz.GetSafeHwnd(), APP_TASKBAR1280, WBS_MANAGER | WBS_SOUND, CPoint( 0, 0 ), pWndParent );
}
#if __VER >= 9 // __CSC_VER9_RESOLUTION
else if( g_Option.m_nResWidth == 1360 )
{
m_nMaxSlotApplet = MAX_SLOT_APPLET;
bResult = CWndNeuz::InitDialog( g_Neuz.GetSafeHwnd(), APP_TASKBAR1360W, WBS_MANAGER | WBS_SOUND, CPoint( 0, 0 ), pWndParent );
}
else if( g_Option.m_nResWidth == 1400 )
{
m_nMaxSlotApplet = MAX_SLOT_APPLET;
bResult = CWndNeuz::InitDialog( g_Neuz.GetSafeHwnd(), APP_TASKBAR1400, WBS_MANAGER | WBS_SOUND, CPoint( 0, 0 ), pWndParent );
}
else if( g_Option.m_nResWidth == 1440 )
{
m_nMaxSlotApplet = MAX_SLOT_APPLET;
bResult = CWndNeuz::InitDialog( g_Neuz.GetSafeHwnd(), APP_TASKBAR1440W, WBS_MANAGER | WBS_SOUND, CPoint( 0, 0 ), pWndParent );
}
else if( g_Option.m_nResWidth == 1600 )
{
m_nMaxSlotApplet = MAX_SLOT_APPLET;
bResult = CWndNeuz::InitDialog( g_Neuz.GetSafeHwnd(), APP_TASKBAR1600, WBS_MANAGER | WBS_SOUND, CPoint( 0, 0 ), pWndParent );
}
else if( g_Option.m_nResWidth == 1680 )
{
m_nMaxSlotApplet = MAX_SLOT_APPLET;
bResult = CWndNeuz::InitDialog( g_Neuz.GetSafeHwnd(), APP_TASKBAR1680W, WBS_MANAGER | WBS_SOUND, CPoint( 0, 0 ), pWndParent );
}
#endif //__CSC_VER9_RESOLUTION

DelWndStyle( WBS_MOVE );
return bResult;

}
BOOL CWndTaskBar::RemoveDeleteObj()
{
/*
for( int i = 0; i < m_awndShortCut.GetSize(); i++ )
{
CWndButton* pWndButton = (CWndButton*)m_awndShortCut.GetAt( i );
if( pWndButton )
{
if( pWndButton->m_shortcut.m_dwShortcut == SHORTCUT_OBJECT )
{
CObj* pObj = (CObj*) pWndButton->m_shortcut.m_dwData;
if( IsValidObj( pObj ) == FALSE )
pWndButton->m_shortcut.m_dwData = 0;
}
else
if( pWndButton->m_shortcut.m_dwShortcut == SHORTCUT_ITEM )
{
CItemBase* pItemBase = (CItemBase*) pWndButton->m_shortcut.m_dwData;
if( pItemBase && pItemBase->IsEmpty() )
pWndButton->Destroy( TRUE );
}
}
}
*/
return TRUE;
}
void CWndTaskBar::SetItemSlot( int nSlot )
{
if( nSlot >= 0 && nSlot < MAX_SLOT_ITEM_COUNT)
m_paSlotItem = m_aSlotItem[ m_nSlotIndex = nSlot ];
}
BOOL CWndTaskBar::OnChildNotify(UINT message,UINT nID,LRESULT* pLResult)
{
CWndButton* pWndButton = (CWndButton*) pLResult;
if( message == WIN_ITEMDROP )
{
/*
LPSHORTCUT pShortcut = (LPSHORTCUT) pLResult;
if( pShortcut && pShortcut->m_dwData == 2 ) // ½ºÅ³ Å¥ ¹öÆ°ÀÇ ¾ÆÀ̵ð´Â 1000 ÀÌ»ó
{
SetSkillQueue( nID - 1000, pShortcut->m_dwShortcut, pShortcut->m_dwType, pShortcut->m_dwId, pShortcut->m_dwData, pShortcut->m_pTexture );
}
*/
}
else
switch( nID )
{
case 101:
/*
if( m_pWndQuickList )
m_pWndQuickList->Destroy();
else
{
m_pWndQuickList = new CWndQuickList;
m_pWndQuickList->Initialize( this );//&g_WndMng );
}
*/
break;
case WIDC_UP:
m_nSlotIndex--;
if( m_nSlotIndex < 0 ) m_nSlotIndex = MAX_SLOT_ITEM_COUNT-1;
m_paSlotItem = m_aSlotItem[ m_nSlotIndex ];
break;
case WIDC_DOWN:
m_nSlotIndex++;
if( m_nSlotIndex > MAX_SLOT_ITEM_COUNT-1 ) m_nSlotIndex = 0;
m_paSlotItem = m_aSlotItem[ m_nSlotIndex ];
break;
case WIDC_BUTTON1: // Menu
{
g_WndMng.OpenMenu();
CRect rect = g_Neuz.GetDeviceRect();
CRect rectMenu = m_wndMenu.GetScreenRect();
switch( m_nPosition )
{
case TASKBAR_TOP:
if( g_WndMng.m_pWndMenu )
g_WndMng.m_pWndMenu->Move( CPoint( 0, TASKBAR_HEIGHT ) );
break;
case TASKBAR_BOTTOM:
if( g_WndMng.m_pWndMenu )
g_WndMng.m_pWndMenu->Move( CPoint( 0, rect.bottom - TASKBAR_HEIGHT - g_WndMng.m_pWndMenu->GetWndRect().Height() ) );
break;
case TASKBAR_LEFT:
if( g_WndMng.m_pWndMenu )
g_WndMng.m_pWndMenu->Move( CPoint( TASKBAR_HEIGHT, 0 ) );
break;
case TASKBAR_RIGHT:
if( g_WndMng.m_pWndMenu )
g_WndMng.m_pWndMenu->Move( CPoint( rect.right - TASKBAR_HEIGHT - g_WndMng.m_pWndMenu->GetWndRect().Width(), 0 ) );
break;
}

}
default:
{
switch( pWndButton->m_shortcut.m_dwIndex )
{
case APP_TRADE: g_DPlay.SendTrade( (CMover*)g_WorldMng.Get()->GetObjFocus() ); break;
default:
g_WndMng.ObjectExecutor( &pWndButton->m_shortcut );
break;
}
}
}
return TRUE;
}
BOOL CWndTaskBar::OnCommand( UINT nID, DWORD dwMessage, CWndBase* pWndBase )
{
return TRUE;
}
void CWndTaskBar::OnSize(UINT nType, int cx, int cy)
{
CWndNeuz::OnSize( nType, cx, cy );
// CRect rect = GetClientRect();
// rect.DeflateRect( 5, 5);
// rect.right = 37;
//ect rect( 5, 5, 44, 40 );//GetClientRect();
//wndMenu.SetWndRect( rect );

//ect = GetClientRect();

// Create Command button
//for(int i = 0; i < 10; i++)
//m_pWndCommand[i].SetWndRect(CRect(60+i*18,3,76+i*18,21));

//int i;
// Create Tray button
//int nMax = 3;
//int nStart = (rect.Width() - nMax * 26);
//for(i = 0; i < nMax; i++)
// m_pWndTray[i].SetWndRect(CRect(nStart + i * 25, 6, nStart + 24 + i * 25, 30));
}
void CWndTaskBar::RemoveSkillQueue( int nIndex, BOOL bSend )
{
if( m_nExecute ) return; // ½ºÅ³Å¥ ½ÇÇàÁß¿£ »©ÁöÁöµµ ¾Ê´Â´Ù.
BACK:
if( !m_aSlotQueue[ nIndex ].IsEmpty() )
{
ItemProp* pItemProp = g_pPlayer->GetSkill( 0, m_aSlotQueue[ nIndex ].m_dwId )->GetProp();
DWORD dwComboStyleSrc = pItemProp->dwComboStyle;
for( int i = nIndex; i < MAX_SLOT_QUEUE - 1; i++ )
{
memcpy( &m_aSlotQueue[ i ], &m_aSlotQueue[ i + 1 ], sizeof( SHORTCUT ) );
m_aSlotQueue[ i ].m_dwIndex = i;
}
m_aSlotQueue[ i ].m_dwShortcut = SHORTCUT_NONE;
m_aSlotQueue[ i ].m_dwId = 0;
m_nCurQueueNum--;
if( m_nCurQueueNum < 0 )
m_nCurQueueNum = 0;
if( CheckAddSkill( dwComboStyleSrc, nIndex /*- 1*/ ) == FALSE )
goto BACK;
}
if( bSend )
g_DPlay.SendSkillTaskBar( );
// ½ºÅ³À» Áö¿ì´Â °÷ ¼*¹ö·Î º¸³»¾ßÇÔ.

}
void CWndTaskBar::OnRButtonUp( UINT nFlags, CPoint point )
{
CRect rect = RECT_APPLET;
if( rect.PtInRect( point ) )
{
point.x -= rect.left;
point.x /= ICON_SIZE;
if( FALSE == m_aSlotApplet[ point.x ].IsEmpty() )
{
#ifdef __MAINSERVER
if( point.x == 0 && m_aSlotApplet[ point.x ].m_dwId == 400 )
return;
#endif //__MAINSERVER

m_aSlotApplet[ point.x ].Empty();
g_DPlay.SendRemoveAppletTaskBar( (BYTE)( point.x ) ); // ¾ÆÀÌÅÛ »èÁ¦ ¼*¹ö·Î Àü¼Û
}
}
rect = RECT_ITEM;
if( rect.PtInRect( point ) )
{
point.x -= rect.left;

point.x /= ICON_SIZE;
if( FALSE == m_paSlotItem[ point.x ].IsEmpty() )
{
m_paSlotItem[ point.x ].Empty();
g_DPlay.SendRemoveItemTaskBar( (BYTE)( m_nSlotIndex ), (BYTE)( point.x ) ); // ¾ÆÀÌÅÛ »èÁ¦ ¼*¹ö·Î Àü¼Û
}

}
rect = RECT_QUEUE;
if( rect.PtInRect( point ) )
{
point.x -= rect.left;
point.y -= rect.top;
point.x /= SKILL_SIZE;
RemoveSkillQueue( point.x );
}
}

BOOL CWndTaskBar::SetShortcut( int nIndex, DWORD dwShortcut, DWORD dwType, DWORD dwId, CTexture* pTexture, int nWhere )
{
LPSHORTCUT pShortcut = NULL;
//CWndShortcut* pWndButton = new CWndShortcut;
// pWndButton->Create( _T( "" ), 0, CRect( 65 + nIndex * 32, 3, 65 + nIndex * 32 + 32 , 3 + 32), this, dwId );

//pShortcut = m_aSlotApplet[ nIndex ];
#if __VER >= 11 // __CSC_VER11_5
// Chat Shortcut 10°³·Î Á¦ÇÑ
if(dwShortcut == SHORTCUT_CHAT)
{
int nchatshortcut = 0;
for( int i=0; i<MAX_SLOT_ITEM_COUNT; i++ )
{
for( int j=0; j<MAX_SLOT_ITEM; j++ )
{
if( m_aSlotItem[i][j].m_dwShortcut == SHORTCUT_CHAT )
nchatshortcut++;
}
}
for( int k = 0; k < m_nMaxSlotApplet; ++k )
if( m_aSlotApplet[ k ].m_dwShortcut == SHORTCUT_CHAT )
++nchatshortcut;

if(nchatshortcut > 9)
{
g_WndMng.PutString( prj.GetText( TID_GAME_MAX_SHORTCUT_CHAT ), NULL, prj.GetTextColor( TID_GAME_MAX_SHORTCUT_CHAT ) );
return FALSE;
}
}
#endif //__CSC_VER11_5

switch( m_nPosition )
{
case TASKBAR_TOP:
case TASKBAR_BOTTOM:
if( nWhere == 0 )
pShortcut = &m_aSlotApplet[ nIndex ];
else
if( nWhere == 1 )
pShortcut = &m_paSlotItem[ nIndex ];
break;
case TASKBAR_LEFT:
case TASKBAR_RIGHT:
if( nWhere == 0 )
pShortcut = &m_aSlotApplet[ nIndex ];
else
if( nWhere == 1 )
pShortcut = &m_paSlotItem[ nIndex ];
break;
}
if( pTexture == NULL )
{
CItemBase* pItemBase;
if( dwShortcut == SHORTCUT_APPLET )
{
AppletFunc* pAppletFunc = g_WndMng.GetAppletFunc( dwId );
pShortcut->m_pTexture = m_textureMng.AddTexture( g_Neuz.m_pd3dDevice, MakePath( DIR_ICON, pAppletFunc->m_pszIconName ), 0xffff00ff );
//pWndButton->SetTexture( g_Neuz.m_pd3dDevice, MakePath( DIR_ICON, pAppletFunc->m_pszIconName ) );
//pCardElem->m_pTexture = m_textureMng.AddTexture( g_Neuz.m_pd3dDevice, MakePath( DIR_ITEM, pCardElem->GetProp()->szIcon), 0xff000000 );

}
else
if( dwShortcut == SHORTCUT_ITEM )
{
pItemBase = g_pPlayer->GetItemId( dwId );
CTexture* pTexture = m_textureMng.AddTexture( g_Neuz.m_pd3dDevice, MakePath( DIR_ITEM, pItemBase->GetProp()->szIcon), 0xffff00ff );
pItemBase->SetTexture( pTexture );
pShortcut->m_pTexture = pTexture ;
}
else
if( dwShortcut == SHORTCUT_MOTION )
{
MotionProp* pMotionProp = prj.GetMotionProp( dwId );
if(pMotionProp) //061206 ma 8Â÷¿¡ µé¾î°¥ ¸ð¼Ç°ü¸®¸¦ À§ÇØ ¹öÀü Ãß°¡ propMotion.txt
{
pMotionProp->pTexture = m_textureMng.AddTexture( g_Neuz.m_pd3dDevice, MakePath( DIR_ICON, pMotionProp->szIconName ), 0xffff00ff );
pShortcut->m_pTexture = pMotionProp->pTexture;
//pWndButton->SetTexture( g_Neuz.m_pd3dDevice, pItemBase->m_pTexture );
}
else
return FALSE;
}
/*
else
if( dwShortcut == SHORTCUT_CARD )
{
pItemBase = g_pPlayer->m_Card.GetAt( dwId );//m_apItem[ i ] ;
pItemBase->m_pTexture = m_textureMng.AddTexture( g_Neuz.m_pd3dDevice, MakePath( DIR_ITEM, pItemBase->GetProp()->szIcon), 0xff000000 );
pWndButton->SetTexture( g_Neuz.m_pd3dDevice, pItemBase->m_pTexture );
}
else
if( dwShortcut == SHORTCUT_JACKBOX )
{
pItemBase = g_pPlayer->m_Cube.GetAt( dwId );//m_apItem[ i ] ;
pItemBase->m_pTexture = m_textureMng.AddTexture( g_Neuz.m_pd3dDevice, MakePath( DIR_ITEM, pItemBase->GetProp()->szIcon), 0xff000000 );
pWndButton->SetTexture( g_Neuz.m_pd3dDevice, pItemBase->m_pTexture );
}
*/
else
if( dwShortcut == SHORTCUT_SKILL )
{
if( pShortcut->m_dwType == 2 )
{
ItemProp* pProp = prj.GetPartySkill( pShortcut->m_dwId );
pShortcut->m_pTexture = m_textureMng.AddTexture( g_Neuz.m_pd3dDevice, MakePath( DIR_ICON, pProp->szIcon/*pItemBase->GetProp()->szIcon*/), 0xffff00ff );
}
else
{
LPSKILL lpSkill = g_pPlayer->GetSkill( dwType, dwId );
//pWndButton->SetTexture( g_Neuz.m_pd3dDevice, MakePath( DIR_ICON, lpSkill->GetProp()->szIcon ) );
pShortcut->m_pTexture = m_textureMng.AddTexture( g_Neuz.m_pd3dDevice, MakePath( DIR_ITEM, lpSkill->GetProp()->szIcon/*pItemBase->GetProp()->szIcon*/), 0xffff00ff, TRUE );
}
}
else
if( dwShortcut == SHORTCUT_SKILLFUN )
pShortcut->m_pTexture = pTexture;

}
else
pShortcut->m_pTexture = pTexture;

#if __VER >= 8 // __JEFF_VER_8
if( dwShortcut == SHORTCUT_ITEM )
{
CItemBase* pItemBase = g_pPlayer->GetItemId( dwId );
if( pShortcut && pItemBase && pItemBase->GetProp()->dwPackMax > 1 ) // º´ÇÕ °¡´ÉÇÑ ¾ÆÀÌÅÛÀ̸é?
pShortcut->m_dwItemId = pItemBase->m_dwItemId;
}
#endif // __JEFF_VER_8

pShortcut->m_dwShortcut = dwShortcut ;
pShortcut->m_dwType = dwType;
pShortcut->m_dwIndex = nIndex;//0;//dwIndex;
pShortcut->m_dwId = dwId;
pShortcut->m_dwUserId = 0 ;
pShortcut->m_dwData = nWhere;
strcpy( pShortcut->m_szString, m_GlobalShortcut.m_szString );//, sizeof(pShortcut->m_szString) );
//pWndButton->SetTitle( m_GlobalShortcut.m_szString );
#if __VER >= 12 // __LORD
if( dwShortcut == SHORTCUT_LORDSKILL)
pShortcut->m_dwId--;
#endif
if( nWhere == 0 ) //m_aSlotApplet
{
g_DPlay.SendAddAppletTaskBar( nIndex, pShortcut );
}
else
if( nWhere == 1 ) //m_paSlotItem
{
g_DPlay.SendAddItemTaskBar( m_nSlotIndex, nIndex, pShortcut );
}
return TRUE;
}
BOOL CWndTaskBar::CheckAddSkill( int nSkillStyleSrc, int nQueueDest )
{
/*
START -> FINISH, FG
CIRCLE -> START, CIRCLE
FINISH -> START, CIRCLE
*/
DWORD dwComboStyleSrc = nSkillStyleSrc;
if( nQueueDest == 0 ) // ùÄ*¿¡ ³ÖÀ¸·Á ½Ãµµ ÇßÀ»°æ¿ì
{
/*
if( ÀÌ¹Ì ½ºÅ³Ã¢¿¡ µî·ÏµÇ¾î ÀÖ´Ù )
{
if( »ðÀÔÇÏ·Á´Â°Ô CT_GENERALÀΰ¡ )
if( ÀÌ¹Ì »ðÀԵǾî ÀÖ´Â°Ô CT_GENERALÀΰ¡ )
return TRUE;
return FALSE; // CT_GENERALÀÌ¿ÜÀÇ °ÍÀ» ùÄ*¿¡ »ðÀÔÇÏ·Á¸é ¸ðµÎ ½ÇÆÐ.
} else
{
// ¾Æ¹«°Íµµ µî·ÏµÇ¾î ÀÖÁö ¾Ê´Ù.
// ½ºÅÜ, Á¦³×·²¸¸ ÇÕ°Ý.
if( dwComboStyleSrc == CT_STEP || dwComboStyleSrc == CT_GENERAL )
return TRUE;
return FALSE; // ±×¿Ü¿£ ¸ðµÎ ºÒÇÕ°Ý.
}
*/
if( m_nCurQueueNum == 0 ) // ºñ¾îÀÖ´Ù
{
if( dwComboStyleSrc == CT_STEP || dwComboStyleSrc == CT_GENERAL ) // ½ºÅÜÀ̳ª Á¦³×·²À̸é ÇÕ°Ý
return TRUE;
return FALSE;
} else
// ¹º°¡ ÀÖ´Ù.
{
DWORD dwComboStyleDest;
DWORD dwSkill = g_pPlayer->GetSkill( 0, m_aSlotQueue[ nQueueDest ].m_dwId )->dwSkill;
//m_aSlotQueue[ nQueueDest ].m_dwId; // ³ÖÀ¸·Á´Â Ä*ÀÇ ½ºÅ³
if( dwSkill )
dwComboStyleDest = prj.GetSkillProp( dwSkill )->dwComboStyle; // ±×Ä*ÀÇ ½ºÅ¸ÀÏ
else
dwComboStyleDest = 0;
if( dwComboStyleSrc == CT_GENERAL && dwComboStyleDest == CT_GENERAL ) // À̹ÌÀִ°͵µ Á¦³×·²ÀÌ°í »ðÀÔÇÏ·Á´Â°Íµµ Á¦³×·²À̸é ÇÕ°Ý
return TRUE;
return FALSE; // ±×¿Ü´Â ¸ðµÎ ùÄ*¿¡ »ðÀÔÇÒ ¼ö ¾øÀ½.
}
}
else
if( nQueueDest == 4 ) // ¸¶Áö¸·Ä*¿¡ ³ÖÀ¸·Á°í ÇßÀ»°æ¿ì
{
if( dwComboStyleSrc == CT_STEP ) // ½ºÅÜÀº ùÄ*ÀÌ ¾Æ´Ï¸é ¹«Á¶°Ç ¸ø³Ö´Â´Ù.
return FALSE;
DWORD dwSkill = g_pPlayer->GetSkill( 0, m_aSlotQueue[ nQueueDest - 1 ].m_dwId )->dwSkill;
//m_aSlotQueue[ nQueueDest - 1 ].m_dwId; // ³ÖÀ¸·Á´Â Ä*ÀÇ ¾Õ¿¡ÀÖ´Â ½ºÅ³
DWORD dwComboStylePrev;
if( dwSkill )
dwComboStylePrev = prj.GetSkillProp( dwSkill )->dwComboStyle; // ¾ÕÄ*ÀÇ ½ºÅ¸ÀÏ
else
dwComboStylePrev = 0;
if( dwComboStylePrev == CT_FINISH ) // ¾Õ ½ºÅ³ÀÌ ÇǴϽ¬¸é ´õÀÌ»ó ³ÖÀ» ¼ö ¾ø´Ù.
return FALSE;
// ¼*Ŭ±â¼úÀ» ³ÖÀ¸·ÁÇÏ°í ¾ÕÄ*¿¡ Á¦³×·²ÀÌ¸é ¸ø³ÖÀ½.
if( dwComboStyleSrc == CT_CIRCLE && dwComboStylePrev == CT_GENERAL )
return FALSE;
// ÇǴϽ¬(¾Ï³ð)¸¦ ³ÖÀ¸·ÁÇÏ°í ¾ÕÄ*¿¡ Á¦³×·²ÀÌ¸é ¸ø³ÖÀ½.
if( dwComboStyleSrc == CT_FINISH && dwComboStylePrev == CT_GENERAL )
return FALSE;
// Á¦³×·²À» ³ÖÀ¸·ÁÇÏ°í ¾ÕÄ*ÀÌ Á¦³×·²ÀÌ ¾Æ´Ï¸é ¸ø³ÖÀ½.
if( dwComboStyleSrc == CT_GENERAL && dwComboStylePrev != CT_GENERAL )
return FALSE;

return TRUE; // ±×¿Ü´Â ¸ðµÎ ÇÕ°Ý
}
else
// ±×¿Ü Áß°£¿¡ ³ÖÀ¸·Á ÇÑ°æ¿ì.
{
// µÑ°Ä* ÀÌ»óºÎÅÍ ³ÖÀ¸·Á°í ÇßÀ»¶§ ó¸®.
if( dwComboStyleSrc == CT_STEP ) // ½ºÅÜÀº ùÄ*ÀÌ ¾Æ´Ï¸é ¹«Á¶°Ç ¸ø³Ö´Â´Ù.
return FALSE;
DWORD dwComboStylePrev;
DWORD dwComboStyleDest;
DWORD dwSkill = g_pPlayer->GetSkill( 0, m_aSlotQueue[ nQueueDest - 1 ].m_dwId )->dwSkill;
//m_aSlotQueue[ nQueueDest - 1 ].m_dwId; // ³ÖÀ¸·Á´Â Ä*ÀÇ ¾Õ¿¡ÀÖ´Â ½ºÅ³
if( dwSkill )
dwComboStylePrev = prj.GetSkillProp( dwSkill )->dwComboStyle; // ¾ÕÄ*ÀÇ ½ºÅ¸ÀÏ
else
dwComboStylePrev = 0;
dwSkill = g_pPlayer->GetSkill( 0, m_aSlotQueue[ nQueueDest ].m_dwId )->dwSkill;
//dwSkill = m_aSlotQueue[ nQueueDest ].m_dwId; // ³ÖÀ¸·Á´Â Ä*ÀÇ ½ºÅ³
if( dwSkill )
dwComboStyleDest = prj.GetSkillProp( dwSkill )->dwComboStyle; // ±×Ä*ÀÇ ½ºÅ¸ÀÏ
else
dwComboStyleDest = 0;
if( dwComboStylePrev == CT_FINISH ) // ¾Õ ½ºÅ³ÀÌ ÇǴϽ¬¸é ´õÀÌ»ó ³ÖÀ» ¼ö ¾ø´Ù.
return FALSE;
// ¼*Ŭ±â¼úÀ» ³ÖÀ¸·ÁÇÏ°í ¾ÕÄ*¿¡ Á¦³×·²ÀÌ¸é ¸ø³ÖÀ½.
if( dwComboStyleSrc == CT_CIRCLE && dwComboStylePrev == CT_GENERAL )
return FALSE;
// ÇǴϽ¬(¾Ï³ð)¸¦ ³ÖÀ¸·ÁÇÏ°í ¾ÕÄ*¿¡ Á¦³×·²ÀÌ¸é ¸ø³ÖÀ½.
if( dwComboStyleSrc == CT_FINISH && dwComboStylePrev == CT_GENERAL )
return FALSE;
// ÇǴϽ¬¸¦ ³ÖÀ¸·ÁÇÏ°í ±×Ä*¿¡ ¼*ŬÀÌ¸é ¸ø³ÖÀ½.
if( dwComboStyleSrc == CT_FINISH && dwComboStyleDest == CT_CIRCLE )
return FALSE;
// ÇǴϽ¬¸¦ ³ÖÀ¸·ÁÇÏ°í ±×Ä*¿¡ ÇǴϽ¬ÀÌ¸é ¸ø³ÖÀ½.
if( dwComboStyleSrc == CT_FINISH && dwComboStyleDest == CT_FINISH )
return FALSE;
// Á¦³×·²À» ³ÖÀ¸·ÁÇÏ°í
if( dwComboStyleSrc == CT_GENERAL )
{
if( dwComboStylePrev != CT_GENERAL ) // ¾ÕÄ*ÀÌ Á¦³×·²ÀÌ ¾Æ´Ï¸é ¸ø³ÖÀ½.
return FALSE;
if( dwComboStyleDest != CT_GENERAL && m_nCurQueueNum > nQueueDest ) // ±×Ä*ÀÌ Á¦³×·²ÀÌ ¾Æ´Ï¸é ¸ø³Ö´Âµ¥ ¸Ç ³¡ÀÌ¸é ³ÖÀ»¼ö ÀÖ´Ù.
return FALSE;
}

return TRUE; // ±× ¿Ü´Â ¸ðµÎ ÇÕ°Ý
}
return FALSE;
}
BOOL CWndTaskBar::SetSkillQueue( int nIndex, DWORD dwType, DWORD dwId, CTexture* pTexture )
{
if( m_nExecute ) return FALSE; // ½ºÅ³Å¥ ½ÇÇàÁß¿£ µî·Ï ¾ÈµÊ.
if( m_nCurQueueNum >= 5 )
return FALSE;

// m_nCurQueueNum º¸´Ù ÀÛÀº ½½·Ô¿¡ ºñ¾îÀÖ´Â°Ô ÀÖ´Ù¸é ¿À·ù »óÅ´Ù. Ŭ¸®¾îÇÏÀÚ.
for( int i = 0; i < m_nCurQueueNum; i++ )
{
if( m_aSlotQueue[ i ].IsEmpty() )
{
for( i = 0; i < m_nCurQueueNum; i++ )
m_aSlotQueue[ i ].Empty();
m_nCurQueueNum = 0;
break;
}
}
if( nIndex > m_nCurQueueNum )
nIndex = m_nCurQueueNum;

LPSHORTCUT pShortcut = NULL;
CRect rect = GetWindowRect();
LPSKILL lpSkill = g_pPlayer->GetSkill( 0, dwId );
DWORD dwSkill = lpSkill->dwSkill;
DWORD dwLevel = lpSkill->dwLevel;
ItemProp *pSkillProp = prj.GetSkillProp( dwSkill );
DWORD dwComboStyleSrc = pSkillProp->dwComboStyle;

if( dwLevel <= 0 )
return FALSE;

#if __VER >= 9 // __SKILL_0706
AddSkillProp* pAddSkillProp = prj.GetAddSkillProp( pSkillProp->dwSubDefine, dwLevel );
ASSERT( pAddSkillProp );
if( (int)pAddSkillProp->dwCooldown > 0 ) // ÄðŸÀÓÀÖ´Â ½ºÅ³Àº ¾×¼Ç½½·Ô¿¡ ¸øµé¾î°¨
#else // __SKILL_0705
if( (int)(pSkillProp->dwSkillReady) > 0 ) // ÄðŸÀÓÀÖ´Â ½ºÅ³Àº ¾×¼Ç½½·Ô¿¡ ¸øµé¾î°¨
#endif // __SKILL_0705
{
CString str;
str.Format( prj.GetText(TID_GAME_SKILLLNOTUSE), pSkillProp->szName );
g_WndMng.PutString( str , NULL, prj.GetTextColor(TID_GAME_SKILLLNOTUSE) );
return FALSE;
}

// DWORD dwComboStyleDest;
// ItemProp* pItemProp1, * pItemProp2,* pItemProp3;
if( nIndex < m_nCurQueueNum ) // insert // nIndex´Â ¼¼ÆÃÇÒ Ä*ÀÇ À妽º
{
if( !CheckAddSkill( dwComboStyleSrc, nIndex ) ) // Src¸¦ nIndex¿¡ ³Ö¾îµµ µÇ´ÂÁö üũ
return FALSE;
for( int i = m_nCurQueueNum; i > nIndex; i-- )
{
memcpy( &m_aSlotQueue[ i ], &m_aSlotQueue[ i - 1 ], sizeof( SHORTCUT ) );
}
pShortcut = &m_aSlotQueue[ nIndex ];
m_nCurQueueNum++;
}
else // add
{
if( !CheckAddSkill( dwComboStyleSrc, m_nCurQueueNum ) ) // Á¦ÀÏ ¸¶Áö¸· Ä*¿¡ ³Ö¾îµµ µÇ´ÂÁö Å×½ºÆ®.
return FALSE;
pShortcut = &m_aSlotQueue[ m_nCurQueueNum ];
nIndex = m_nCurQueueNum;
m_nCurQueueNum++;
}
m_nCurQueue = -1;
if( pTexture == NULL )
{
LPSKILL lpSkill = g_pPlayer->GetSkill( dwType, dwId );
pShortcut->m_pTexture = m_textureMng.AddTexture( g_Neuz.m_pd3dDevice, MakePath( DIR_ICON, lpSkill->GetProp()->szIcon), 0xff000000, FALSE );
}
else pShortcut->m_pTexture = pTexture;


pShortcut->m_dwShortcut = SHORTCUT_SKILL ;
pShortcut->m_dwType = dwType; // Á÷¾÷
pShortcut->m_dwIndex = nIndex;//dwIndex; // ½ºÅ³ ÄÜÆ®·Ñ¿¡¼*ÀÇ ¼ø¼*
pShortcut->m_dwId = dwId; // ½ºÅ³ À妽º
pShortcut->m_dwUserId = 0 ;
pShortcut->m_dwData = 2;
_tcscpy( pShortcut->m_szString, m_GlobalShortcut.m_szString );
g_DPlay.SendSkillTaskBar();
// ½ºÅ³ µî·Ï ¿©±â¼* ¼*¹ö·Î º¸³»¾ß ÇÔ
return TRUE;
}

BOOL CWndTaskBar::OnDropIcon( LPSHORTCUT pShortcut, CPoint point )
{
CRect rect = GetWindowRect();
rect.DeflateRect( 3, 3);
// ¹ÛÀ¸·Î ¹ö·ÈÀ» °æ¿ì
if( pShortcut->m_pFromWnd == this )
{
LPSHORTCUT lpShortcut = (LPSHORTCUT) pShortcut->m_dwData;
// Æ÷ÀÎÆ®°¡ Å×½ºÅ©¹Ù°¡ ¾Æ´Ñ °÷À̶ó¸é. ÀǵµÀûÀ¸·Î ¼ôÄÆÀ» Áö¿ì·Á°í ŽºÅ©¹Ù ¹Û¿¡ ³õÀº °ÍÀÓ. Áö¿ìÀÚ.
if( GetClientRect().PtInRect( point ) == FALSE )
{
// ¾ÆÀÌÅÛ »èÁ¦ ¼*¹ö·Î Àü¼Û
if( lpShortcut->m_dwData == 0 )
g_DPlay.SendRemoveAppletTaskBar( (BYTE)( lpShortcut->m_dwIndex ) );
else
if( lpShortcut->m_dwData == 1 )
g_DPlay.SendRemoveItemTaskBar( m_nSlotIndex, (BYTE)( lpShortcut->m_dwIndex ) );
else
if( lpShortcut->m_dwData == 2 )
{
RemoveSkillQueue( lpShortcut->m_dwIndex );
return TRUE;
//g_DPlay.SendSkillTaskBar( );
}
lpShortcut->Empty();
return TRUE;
}
// return TRUE;
}
CWndBase* pWndFrame = pShortcut->m_pFromWnd->GetFrameWnd();

#ifdef __NEW_SKILL_TREE
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) )
#else // __NEW_SKILL_TREE
#if __VER >= 10 // __CSC_VER9_1
#if __VER >= 12 // __LORD
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) )
#else
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 ) )
#endif
#else
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 ) )
#endif //__CSC_VER9_1
#endif // __NEW_SKILL_TREE
{
SetForbid( TRUE );
return FALSE;
}

if( pShortcut->m_dwShortcut == SHORTCUT_SKILL && pShortcut->m_dwType != 2 ) // ±Ø´Ü½ºÅ³Àº ¾Èµé¾î°¨
{
LPSKILL pSkill = g_pPlayer->GetSkill( 0, pShortcut->m_dwId );
if( pSkill && (pSkill->dwLevel <= 0 || g_pPlayer->CheckSkill( pSkill->dwSkill ) == FALSE) )
{
SetForbid( TRUE );
return FALSE;
}
}
#if __VER >= 12 // __LORD
if( pShortcut->m_dwId == 0 && strlen( pShortcut->m_szString ) < 1 && pShortcut->m_dwShortcut != SHORTCUT_SKILLFUN && pShortcut->m_dwShortcut != SHORTCUT_LORDSKILL)
#else
if( pShortcut->m_dwId == 0 && strlen( pShortcut->m_szString ) < 1 && pShortcut->m_dwShortcut != SHORTCUT_SKILLFUN)
#endif
{
SetForbid( TRUE );
return FALSE;
}
// ³»ºÎ¿¡¼* À̵¿µÇ°Å³ª, ¿ÜºÎ¿¡¼* ³»ºÎ·Î
if( m_nPosition == TASKBAR_TOP || m_nPosition == TASKBAR_BOTTOM )
{
BOOL bForbid = TRUE;
CRect rect = RECT_APPLET;
if( rect.PtInRect( point ) )
{
point.x -= rect.left;
point.y -= rect.top;
point.x /= ICON_SIZE;
// ³»ºÎ¿¡¼* À̵¿
if( pShortcut->m_pFromWnd == this )
{
LPSHORTCUT lpCurShortcut = (LPSHORTCUT) pShortcut->m_dwData;

if( &m_aSlotApplet[ point.x ] == lpCurShortcut )
{
//SetForbid( TRUE );
return FALSE;
}
// ¿À¸®Áö³¯ÀÌ ¾×¼Ç½½·ÔÀÌ´Ù.
//if( lpCurShortcut->m_dwData == 2 )
// RemoveSkillQueue( lpCurShortcut->m_dwIndex );
}
if( pShortcut->m_dwShortcut == SHORTCUT_SKILL )
{
ItemProp* pProp;
if( pShortcut->m_dwType == 2 )
pProp = prj.GetPartySkill( pShortcut->m_dwId );
else
{
LPSKILL pSkill = g_pPlayer->GetSkill( 0, pShortcut->m_dwId );
pProp = prj.GetSkillProp( pSkill->dwSkill );
}
if( pProp->dwComboStyle != CT_STEP && pProp->dwComboStyle != CT_GENERAL )
{
SetForbid( TRUE );
return FALSE; // Äü½½·Ô¿¡ µî·ÏÇÏ·Á´Â ½ºÅ³ÀÌ ½ºÅܱâ¼úÀÌ ¾Æ´Ñ°Ç µî·Ï ¸øÇÔ.
}
/*
ItemProp *pProp = prj.GetSkillProp( pShortcut->m_dwId );
if( pProp->dwComboStyle != CT_STEP && pProp->dwComboStyle != CT_GENERAL )
{
SetForbid( TRUE );
return FALSE; // Äü½½·Ô¿¡ µî·ÏÇÏ·Á´Â ½ºÅ³ÀÌ ½ºÅܱâ¼úÀÌ ¾Æ´Ñ°Ç µî·Ï ¸øÇÔ.
}
*/
//if( pProp->dwComboStyle != CT_STEP )
//{
// SetForbid( TRUE );
// return FALSE; // Äü½½·Ô¿¡ µî·ÏÇÏ·Á´Â ½ºÅ³ÀÌ ½ºÅܱâ¼úÀÌ ¾Æ´Ñ°Ç µî·Ï ¸øÇÔ.
//}
}

#ifdef __MAINSERVER
if( point.x == 0 && m_aSlotApplet[ point.x ].m_dwId == 400 )
return FALSE;
#endif //__MAINSERVER

SetShortcut( point.x, pShortcut->m_dwShortcut, pShortcut->m_dwType, pShortcut->m_dwId, pShortcut->m_pTexture, 0 );
bForbid = FALSE;
}
rect = RECT_ITEM;
// rect.right += 32;
if( rect.PtInRect( point ) )
{
point.x -= rect.left;
point.y -= rect.top;
point.x /= ICON_SIZE;
// ³»ºÎ¿¡¼* À̵¿
if( pShortcut->m_pFromWnd == this )
{
LPSHORTCUT lpCurShortcut = (LPSHORTCUT) pShortcut->m_dwData;
if( &m_aSlotItem[ m_nSlotIndex ][ point.x ] == lpCurShortcut )
return FALSE;
// ¿À¸®Áö³¯ÀÌ ¾×¼Ç½½·ÔÀÌ´Ù.
//if( lpCurShortcut->m_dwData == 2 )
// RemoveSkillQueue( lpCurShortcut->m_dwIndex );
}
if( pShortcut->m_dwShortcut == SHORTCUT_CHAT )
{
CString sChat = m_GlobalShortcut.m_szString;
sChat.Replace( "--", "" );
sChat.Replace( "'", "" );
sChat.Replace( "/*", "" );
sChat.Replace( "*/", "" );
strcpy( m_GlobalShortcut.m_szString, (const char*)sChat );
}
else if( pShortcut->m_dwShortcut == SHORTCUT_SKILL )
{
ItemProp* pProp;
if( pShortcut->m_dwType == 2 )
pProp = prj.GetPartySkill( pShortcut->m_dwId );
else
{
LPSKILL pSkill = g_pPlayer->GetSkill( 0, pShortcut->m_dwId );
pProp = prj.GetSkillProp( pSkill->dwSkill );
}
if( pProp->dwComboStyle != CT_STEP && pProp->dwComboStyle != CT_GENERAL )
{
SetForbid( TRUE );
return FALSE; // Äü½½·Ô¿¡ µî·ÏÇÏ·Á´Â ½ºÅ³ÀÌ ½ºÅܱâ¼úÀÌ ¾Æ´Ñ°Ç µî·Ï ¸øÇÔ.
}
}
SetShortcut( point.x, pShortcut->m_dwShortcut, pShortcut->m_dwType, pShortcut->m_dwId, pShortcut->m_pTexture, 1 );
bForbid = FALSE;
}
rect = RECT_QUEUE;
if( rect.PtInRect( point ) )
{
if( pShortcut->m_dwShortcut == SHORTCUT_SKILL && pShortcut->m_dwType == 0 ) // ½ºÅ³ÀÏ°æ¿ì¸¸ µî·Ï
{
point.x -= rect.left;
point.y -= rect.top;
point.x /= SKILL_SIZE;
// ³»ºÎ¿¡¼* À̵¿ ; º¸ÅëÀº ¾Æ·¡ ºÎºÐ¿¡¼* »èÁ¦¸¦ ó¸®Çϳª, ½ºÅ³ Å¥¿¡¼*ÀÇ À̵¿Àº »èÁ¦ÈÄ ¹Ù·Î Ãß°¡ÇؾßÇϱ⠶§¹®¿¡ ¿©±â¼* »èÁ¦¸¦ ÇÑ´Ù.
if( pShortcut->m_pFromWnd == this )
{
LPSHORTCUT lpShortcut = (LPSHORTCUT) pShortcut->m_dwData;
if( lpShortcut->m_dwData == 2 )
{
RemoveSkillQueue( lpShortcut->m_dwIndex, FALSE );
SetSkillQueue( point.x, pShortcut->m_dwType, pShortcut->m_dwId, pShortcut->m_pTexture );// == FALSE )
return TRUE;
}
}
if( SetSkillQueue( point.x, pShortcut->m_dwType, pShortcut->m_dwId, pShortcut->m_pTexture ) == FALSE )
SetForbid( TRUE );
bForbid = FALSE;
}
}
if( pShortcut->m_pFromWnd != this )
SetForbid( bForbid );
}
// ¾ÈÀ¸·Î ¹ö·ÈÀ» °æ¿ì, ¶Ç´Â ¾È¿¡¼* À̵¿ÇßÀ» °æ¿ì ¿À¸®Áö³¯ ºÎºÐ »èÁ¦
// ŽºÅ©¹Ù¿¡ ÀÖ´Â ¾ÆÀÌÅÛÀ» ½½·Ô ¾ÈÀÇ °ø¹é ºÎºÐ¿¡ µå·¡±×ÇßÀ» °æ¿ì
if( pShortcut->m_pFromWnd == this )
{
LPSHORTCUT lpShortcut = (LPSHORTCUT) pShortcut->m_dwData;
// ¾ÆÀÌÅÛ »èÁ¦ ¼*¹ö·Î Àü¼Û
if( lpShortcut->m_dwData == 0 )
g_DPlay.SendRemoveAppletTaskBar( (BYTE)( lpShortcut->m_dwIndex ) );
else
if( lpShortcut->m_dwData == 1 )
g_DPlay.SendRemoveItemTaskBar( m_nSlotIndex, (BYTE)( lpShortcut->m_dwIndex ) );
else
if( lpShortcut->m_dwData == 2 )
{
RemoveSkillQueue( lpShortcut->m_dwIndex );
//g_DPlay.SendSkillTaskBar( );
return TRUE;
}
lpShortcut->Empty();
}
return TRUE;
}
LPSHORTCUT CWndTaskBar::Select( CPoint point )
{
CRect rect = RECT_APPLET;
LPSHORTCUT pShortcut = NULL;
if( rect.PtInRect( point ) )
{
point.x -= rect.left;
point.y -= rect.top;
point.x /= ICON_SIZE;
pShortcut = &m_aSlotApplet[ point.x ];
if( !pShortcut->IsEmpty() )
{
return pShortcut;
}
}
rect = RECT_ITEM;
if( rect.PtInRect( point ) )
{
point.x -= rect.left;
point.y -= rect.top;
point.x /= ICON_SIZE;
pShortcut = &m_paSlotItem[ point.x ];
if( !pShortcut->IsEmpty() )
return pShortcut;
}
rect = RECT_QUEUE;
if( rect.PtInRect( point ) )
{
point.x -= rect.left;
point.y -= rect.top;
point.x /= SKILL_SIZE;
pShortcut = &m_aSlotQueue[ point.x ];
if( !pShortcut->IsEmpty() )
return pShortcut;

}
rect = CRect( POINT_QUEUE_X - ICON_SIZE - 5, POINT_QUEUE_Y, (POINT_QUEUE_X - ICON_SIZE - 5) + 32, POINT_QUEUE_Y + 32);
if( rect.PtInRect( point ) )
{
m_aSlotSkill.m_dwShortcut = SHORTCUT_SKILLFUN;

pShortcut = &m_aSlotSkill;

if( !pShortcut->IsEmpty() )
return pShortcut;
}

return NULL;
}
void CWndTaskBar::OnMouseMove(UINT nFlags, CPoint point)
{
if( m_bLButtonDown && IsPush() )
{
//PSHORTCUT pShortcut = Select( point );
// if( pShortcut && pShortcut == m_pSelectShortcut && !pShortcut->IsEmpty() )
if( m_pSelectShortcut && !m_pSelectShortcut->IsEmpty() ) //&& m_pSelectShortcut->m_dwShortcut != SHORTCUT_SKILL )
{
#ifdef __MAINSERVER
if( m_pSelectShortcut->m_dwId == 400 )
return;
#endif //__MAINSERVER
#if __VER >= 12 // __LORD
if(m_pSelectShortcut->m_dwShortcut == SHORTCUT_LORDSKILL)
{
m_pSelectShortcut->m_dwId++;
}
#endif
memcpy( &m_GlobalShortcut, m_pSelectShortcut, sizeof( m_GlobalShortcut ) );
m_GlobalShortcut.m_pFromWnd = this;
m_GlobalShortcut.m_dwData = (DWORD)m_pSelectShortcut;
m_pSelectShortcut = NULL;
}
}
CWndNeuz::OnMouseMove( nFlags, point );
}

void CWndTaskBar::OnLButtonDown(UINT nFlags, CPoint point)
{
if(g_WndMng.m_pWndMenu && g_WndMng.m_pWndMenu->IsVisible())
g_WndMng.m_pWndMenu->SetVisible(FALSE);

m_pSelectShortcut = Select( point );
SetCapture();
}
void CWndTaskBar::OnLButtonUp(UINT nFlags, CPoint point)
{
ReleaseCapture();
LPSHORTCUT pShortcut = Select( point );

if( pShortcut && pShortcut == m_pSelectShortcut && !pShortcut->IsEmpty() && pShortcut->m_dwData != 2 )
{
g_WndMng.ObjectExecutor( pShortcut );
}

}

BOOL CWndTaskBar::OnEraseBkgnd(C2DRender* p2DRender)
{
return TRUE;
}
void CWndTaskBar::PaintFrame( C2DRender* p2DRender )
{
CRect rect = GetWindowRect();
//m_pTheme->RenderWndTaskBar( p2DRender, &rect );
CWndBase::PaintFrame( p2DRender );
}

LPSKILL CWndTaskBar::GetCurrentSkillQueue()
{
LPSKILL pSkill = NULL;
LPSHORTCUT pShortcut = &m_aSlotQueue[ m_nUsedSkillQueue ];

if( pShortcut && pShortcut->IsEmpty() == FALSE )
pSkill = g_pPlayer->GetSkill( 0, pShortcut->m_dwId );

return pSkill;
}
//
// ½ºÅ³Å¥ ½ÇÇà °í!
//
BOOL CWndTaskBar::UseSkillQueue( CCtrl* pTargetObj )
{
if( m_nExecute == 2 ) return FALSE; // ÀÌ¹Ì ½ºÅ³¹Ù ½ÇÇàÁßÀ̶ó¸é ´Ù½Ã µé¾î¿ÀÁö ¾ÊÀ½.
if( g_pPlayer->m_pActMover->IsActAttack() ) return FALSE; // ÀÌ¹Ì °ø°Ýµ¿ÀÛÀÌ ÀÌ·ïÁö°í ÀÖÀ¸¸é µé¾î¿ÀÁö ¸¶¶ó.
if( g_pPlayer->m_pActMover->IsActJump() ) return FALSE; // Á¡ÇÁÁß¿£ ½ºÅ³»ç¿ë ¾ÈµÊ.
// if( g_pPlayer->m_pActMover->IsActDamage() ) return FALSE; // µ¥¹ÌÁö ¸ð¼ÇÁß¿£ ½ºÅ³»ç¿ë ¾ÈµÊ.
if( g_pPlayer->m_pActMover->IsFly() ) return FALSE;
// if( g_pPlayer->m_dwFlag & MVRF_SKILL ) return FALSE; // ÀÌ¹Ì ½ºÅ³ »ç¿ëÁßÀÌ¸é »ç¿ë ¾ÈµÊ.
if( pTargetObj && pTargetObj->GetType() != OT_MOVER ) return FALSE;

// ¿ÀºêÁ§Æ®¿¡ ¿À¸¥ÂÊ Å¬¸¯ ÇßÀ»¶§
if( pTargetObj )
{
if( pTargetObj->GetType() == OT_OBJ ) // ¿ÀºêÁ§Æ®°¡ OT_OBJ(¹è°æ)ÀÌ¸é ¼±Åà ¾ÈÇÑ°É·Î °£ÁÖÇÔ.
m_idTarget = NULL_ID;
else
m_idTarget = ((CCtrl*)pTargetObj)->GetId(); // OT_OBJ°¡ ¾Æ´Ï¸é ¾ÆÀ̵𸦠°¡Á®¿È
}
else
m_idTarget = NULL_ID; // Ÿ°ÙÀ» ¼±ÅÃÇÏÁö ¾Ê¾ÒÀ¸¸é NULL_ID
CMover *pTargetMover = (CMover*)pTargetObj; // prj.GetMover( m_idTarget );
if( IsInvalidObj( pTargetMover ) ) // °Å½Ã±âÇÑ Å¸°ÙÀ̾úÀ¸¸é Ÿ°Ù ¾ÈÇÑ°É·Î °£ÁÖ.
m_idTarget = NULL_ID;


m_nUsedSkillQueue = 0;

LPSHORTCUT pShortcut = &m_aSlotQueue[ m_nUsedSkillQueue ];

if( pShortcut->IsEmpty() == FALSE )
{
LPSKILL pSkill = g_pPlayer->GetSkill( 0, pShortcut->m_dwId );
if( pSkill == NULL ) return FALSE;

if( g_pPlayer->IsBullet( pSkill->GetProp() ) == FALSE )
return FALSE;

m_nExecute = 1; // 1 ½ºÅ³¹Ù»ç¿ë ½ÇÇà´ë±âÁß
// ¿©±â¿£ m_idTargetÀÌ NULL_ID°¡ µé¾î°¥¼öµµ ÀÖ´Ù.
if( g_pPlayer->CMD_SetUseSkill( m_idTarget, pShortcut->m_dwId, SUT_QUEUESTART ) == 0 ) // ½ÇÇàÇÒ ¸í·ÉÀ» ¼ÂÆÃ. À̵¿ + ½ºÅ³»ç¿ëÀÌ ÇÕÃÄÁø ¸í·É.
{
OnCancelSkill(); // ù½ºÅ³ºÎÅÍ ½ÇÆÐÇß´Ù¸é ½ºÅ³Å¥ »ç¿ëÀ» Ãë¼Ò.
} else
{ // success
// 1´Ü°è ¾µ¶§´Â ap°¡ ¼Ò¸ðµÇÁö ¾Ê´Â´Ù.
ItemProp *pItemProp = g_pPlayer->GetActiveHandItemProp();
if( pItemProp )
{ // ¼Õ¿¡ µé°í ÀÖ´Â°Ô ½ºÅÂÇÁ³ª Ä¡¾î½ºÆ½ÀÌ ¾Æ´Ò¶§¸¸ NEXTSKILL_NONE·Î º¯°æ. ¾ÈÇÏ¸é ½ºÅ³ÀÌ À̾îÁöÁö ¾ÊÀ½.
if( pItemProp->dwItemKind3 != IK3_STAFF && pItemProp->dwItemKind3 != IK3_CHEERSTICK )
g_WndMng.m_pWndWorld->SetNextSkill( NEXTSKILL_NONE ); // 2006/06/12 ½ºÅ³Å¥¸¦ ½ÇÇàÇßÀ¸´Ï ½ºÅ³Å¥»ç¿ë ¸í·É Ŭ¸®¾î.-xuzhu-
}

}
return TRUE;
} else
g_WndMng.m_pWndWorld->SetNextSkill( NEXTSKILL_NONE ); // ¾×¼Ç½ºÅ³ÀÌ ºñ¾îÀÖÀ¸¸é Ãë¼Ò.

return FALSE;
}

BOOL CWndTaskBar::Process( void )
{
// ÅøÆÁ °è¼Ó °»½ÅÇؾßÇϴ°͵éÀº ¿©±â¼*...
CPoint point = GetMousePoint();

CRect rect = CRect( POINT_APPLET_X, POINT_APPLET_Y, POINT_APPLET_X + ICON_SIZE, POINT_APPLET_Y + ICON_SIZE );
for( int i = 0; i < m_nMaxSlotApplet; i++ )
{
LPSHORTCUT lpShortcut = &m_aSlotApplet[ i ] ;
if( !lpShortcut->IsEmpty() && rect.PtInRect( point) )
{
MotionProp* pMotionProp = prj.GetMotionProp( lpShortcut->m_dwId );

if( IsShortcut( lpShortcut, SHORTCUT_MOTION, MOT_BASE_CHEER ) )
PutTooTip( lpShortcut, point, &rect );
}
rect += CPoint( ICON_SIZE, 0 );
}

rect = CRect( POINT_ITEM_X, POINT_ITEM_Y, POINT_ITEM_X + ICON_SIZE, POINT_ITEM_Y + ICON_SIZE );
for( i = 0; i < MAX_SLOT_ITEM; i++ )
{
LPSHORTCUT lpShortcut = &m_paSlotItem[ i ] ;
if( !lpShortcut->IsEmpty() && rect.PtInRect( point) )
{
if( IsShortcut( lpShortcut, SHORTCUT_MOTION, MOT_BASE_CHEER ) )
PutTooTip( lpShortcut, point,&rect );
}
rect += CPoint( ICON_SIZE, 0 );
}
rect = CRect( POINT_QUEUE_X, POINT_QUEUE_Y, POINT_QUEUE_X + SKILL_SIZE, POINT_QUEUE_Y + SKILL_SIZE );
for( i = 0; i < MAX_SLOT_QUEUE; i++ )
{
LPSHORTCUT lpShortcut = &m_aSlotQueue[ i ] ;
if( !lpShortcut->IsEmpty() && rect.PtInRect( point) )
{
if( IsShortcut( lpShortcut, SHORTCUT_MOTION, MOT_BASE_CHEER ) )
PutTooTip( lpShortcut, point,&rect );
}
rect += CPoint( SKILL_SIZE, 0 );
}

if( m_nExecute )
{
if( m_idTarget != NULL_ID ) // m_idTargetÀÌ NULL_IDÀΰæ¿ì´Â ÀÚ±â Àڽſ¡°Ô ¾´°æ¿ì±â¶«¿¡ ĵ½½½ÃÄѼ± ¾ÈµÈ´Ù.
{
CMover* pObj = prj.GetMover( m_idTarget );
if( IsInvalidObj(pObj) ) // ½ÇÇàÁß¿¡ ´ë»óÀÌ ¾ø¾îÁ³´Ù¸é ½ºÅ³»ç¿ëÀ» ¸ØÃã.
OnCancelSkill();
}
// if( pObj && pObj->IsDie() ) // ½ÇÇàÁß ´ë»óÀÌ Á×¾úÀ¸¸é ½ºÅ³¹Ù ½ÇÇà ¸ØÃã.
// OnCancelSkill();

// if( (g_pPlayer->m_dwFlag & MVRF_SKILL) == 0 )
// OnCancelSkill(); // ½ºÅ³»ç¿ë ÇØÁ¦
}
// µå·¡±× ÇÏÀ̶óÀÌÆ® ½½·Ô ¾ËÆÄ Ã³¸®
if( m_GlobalShortcut.IsEmpty() == FALSE )
{
m_dwHighAlpha += 10;
if( m_dwHighAlpha >= 256 )
m_dwHighAlpha = 0;
}
// µå·¡±×Áß¿¡´Â ÇÖÅ°¸¦ »ç¿ëÇÒ ¼ö ¾øÀ½
else
{
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// ÇÖÅ° ó¸®
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
if( g_bKeyTable[ VK_RETURN ] )
{
g_bKeyTable[ VK_RETURN ] = FALSE;
CWndBase* pWndBase = GetWndBase( APP_COMMUNICATION_CHAT );
if( pWndBase == NULL )
{
g_WndMng.ObjectExecutor( SHORTCUT_APPLET, APP_COMMUNICATION_CHAT );
CWndChat* pWndChat = (CWndChat*)GetWndBase( APP_COMMUNICATION_CHAT );
if( pWndChat != NULL )
{
pWndChat->m_wndEdit.SetFocus();
}
}
}
else
{
AppletFunc* pApplet;
DWORD dwIdApplet;
POSITION pos = g_WndMng.m_mapAppletFunc.GetStartPosition();
BOOL bKey = FALSE;
while( pos )
{
g_WndMng.m_mapAppletFunc.GetNextAssoc( pos, dwIdApplet, (void*&)pApplet );

#ifdef __XKEYEDGE
bKey = g_bKeyTable[ pApplet->m_cHotkey ];
if( bKey && !g_bKeyTable2[ pApplet->m_cHotkey ] )
#else
if( g_bKeyTable[ pApplet->m_cHotkey ] ) //gmpbigsun: ÇÏ¿ì¡ YÅ°( °¡±¸Ã¢ ) °Ë»ç
#endif
{
g_Error_State.m_ch = pApplet->m_cHotkey;
g_Error_State.m_bIsShowWnd = TRUE;
g_Error_State.m_dwWndId = pApplet->m_dwIdApplet;

g_WndMng.ObjectExecutor( SHORTCUT_APPLET, pApplet->m_dwIdApplet );
#ifndef __XKEYEDGE
g_bKeyTable[ pApplet->m_cHotkey ] = FALSE;
#endif
}
#ifdef __XKEYEDGE
g_bKeyTable2[ pApplet->m_cHotkey ] = bKey;
bKey = FALSE;
#endif

}

CWndRegVend* pWndRegVend = (CWndRegVend*)g_WndMng.GetWndBase(APP_VENDOREX_SEL L);
CWndRegVend* pWndVendorBuy = (CWndRegVend*)g_WndMng.GetWndBase(APP_VENDOREX_BUY );

if( !pWndRegVend || !pWndVendorBuy )
{
DWORD *dwHotkey;
#ifdef __Y_INTERFACE_VER3
DWORD dwHotkey1[10] = { '1', '2', '3', '4', '5', '6', '7', '8', '9', '0' };
DWORD dwHotkey2[10] = { 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79 };

if( g_Option.m_nInterface == 2 )
dwHotkey = dwHotkey1;
else
dwHotkey = dwHotkey2;
#else //__Y_INTERFACE_VER3
DWORD dwHotkey1[10] = { 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79 };
dwHotkey = dwHotkey1;
#endif //__Y_INTERFACE_VER3

for( int i = 0; i < 10; i++ )
{
if( g_bKeyTable[ dwHotkey[i] ] && g_bSlotSwitchAboutEquipItem[ i ] == FALSE )
{
LPSHORTCUT lpShortcut = &m_paSlotItem[ i ] ;
if( lpShortcut->m_dwShortcut == SHORTCUT_ITEM )
{
CItemBase* pItemBase = g_pPlayer->GetItemId( lpShortcut->m_dwId );
if( pItemBase )
{
int nPart = pItemBase->GetProp()->dwParts;
if( nPart != -1 )
g_bSlotSwitchAboutEquipItem[ i ] = TRUE;
}
}
g_WndMng.ObjectExecutor( lpShortcut );
g_bKeyTable[ dwHotkey[i] ] = 0;
}
}
}
}
}

UpdateItem();

return CWndBase::Process();
}

// ½ºÅ³¹Ù »ç¿ëÀ» Ãë¼Ò(Áß´Ü)ÇÔ.
void CWndTaskBar::OnCancelSkill( void )
{
if( g_pPlayer->m_dwReqFlag & REQ_USESKILL )
return;

m_nExecute = 0;
m_nUsedSkillQueue = 0;
g_pPlayer->ClearDestObj();
g_WndMng.m_pWndWorld->SetNextSkill( NEXTSKILL_NONE );
}

// ½ºÅ³ µ¿ÀÛ ³¡³µÀ»¶§ È£Ãâ.
void CWndTaskBar::OnEndSkill( void )
{
}



/////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////////
//
// ŽºÅ© ¹ÙÀÇ ¸Å´º ó¸® À©µµ
//
/////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////////

CWndTaskMenu::CWndTaskMenu()
{
m_pMenu1 = NULL;
m_pMenu2 = NULL;
m_pMenu3 = NULL;
m_pMenu4 = NULL;
m_pMenu5 = NULL;
m_pMenu6 = NULL;
m_pMenu7 = NULL;
}

CWndTaskMenu::~CWndTaskMenu()
{
SAFE_DELETE( m_pMenu1 );
SAFE_DELETE( m_pMenu2 );
SAFE_DELETE( m_pMenu3 );
SAFE_DELETE( m_pMenu4 );
SAFE_DELETE( m_pMenu5 );
SAFE_DELETE( m_pMenu6 );
SAFE_DELETE( m_pMenu7 );
}
void CWndTaskMenu::OnDraw(C2DRender* p2DRender)
{
return;
p2DRender->TextOut( 10, 20, _T( "MASQUERADE" ), D3DCOLOR_ARGB( 255, 250, 250, 250 ) );

CRect rect = GetWindowRect();
// Å׵θ® ¹Ú½º
DWORD dwColor1t = D3DCOLOR_ARGB( 055, 91, 104, 205 );
DWORD dwColor2t = D3DCOLOR_ARGB( 055, 116, 128, 220 );
DWORD dwColor4t = D3DCOLOR_ARGB( 055, 143, 173, 245 );
DWORD dwColor1b = D3DCOLOR_ARGB( 055, 41, 104, 155 );
DWORD dwColor2b = D3DCOLOR_ARGB( 055, 66, 78, 170 );
DWORD dwColor4b = D3DCOLOR_ARGB( 055, 143, 173, 245 );

DWORD dwColor3t = D3DCOLOR_ARGB( 155, 250, 250, 250 );
DWORD dwColor3b = D3DCOLOR_ARGB( 55, 00, 00, 00 );

//p2DRender->RenderRoundRect( rect, dwColor1t, dwColor1t, dwColor1b, dwColor1b );
rect.DeflateRect(1,1);
//p2DRender->RenderRoundRect( rect, dwColor2t, dwColor2t, dwColor2b, dwColor2b );
// rect.DeflateRect(1,1);

CRect rect1 = rect; rect1.bottom = rect1.top + 40;
CRect rect2 = rect; rect2.top = rect2.top + 40;

p2DRender->RenderFillRect( rect1, dwColor3t, dwColor3t, dwColor3b, dwColor3b );
p2DRender->RenderFillRect( rect2, dwColor3b, dwColor3b, dwColor4b, dwColor4b );

// p2DRender->RenderLine( CPoint( 10, 5 * 22 + 54 ), CPoint( 140, 5 * 22 + 54 ), dwColor1t );
// client ¿µ¿ª Ä¥Çϱâ
//OnEraseBkgnd(p2DRender);
//.OffsetRect(-rect.TopLeft());
//p2DRender->PaintRect( rect,MKHIGHRGB(255>>3,255>>3,255>>3) );
//p2DRender->TextOut( 5,20,"HP : 100 / 100", dwColor1t );
//p2DRender->TextOut( 5,35,"MP : 100 / 100", dwColor1t );
}
BOOL CWndTaskMenu::Process()
{
if( CWndBase::m_GlobalShortcut.m_dwShortcut != SHORTCUT_NONE )
return CWndBase::Process();

if( IsVisible() == FALSE )
return CWndBase::Process();

for( int i = 0; i < m_awndMenuItem.GetSize(); i++ )
{
BOOL bHighLight = FALSE;
CWndButton* pWndButton = (CWndButton*)m_awndMenuItem.GetAt( i );
if( pWndButton->GetClientRect( TRUE ).PtInRect( m_ptMouse ) )
{
// ¸ðµÎ ¼û±â±â
if( pWndButton->m_pWndMenu == NULL || pWndButton->m_pWndMenu->IsVisible( ) == FALSE )
{
for( int i2 = 0; i2 < m_awndMenuItem.GetSize(); i2++)
{
if( ((CWndButton*)m_awndMenuItem.GetAt( i2 ) )->m_pWndMenu )
((CWndButton*)m_awndMenuItem.GetAt( i2 ) )->m_pWndMenu->SetVisibleSub( FALSE );
}
}
// »õ ¸Å´º¸¦ º¸ÀÌ°í Æ÷Ä¿½º ÁÖ±â
if( pWndButton->m_pWndMenu )
{
if( pWndButton->m_pWndMenu->IsVisible() == FALSE )
{
CRect rect = pWndButton->GetScreenRect();
pWndButton->m_pWndMenu->Move( CPoint( rect.right , rect.top ) );
}
// ¸Þ´ºÀÇ ÁÂÇ¥ ÁöÁ¤
CRect rcButton = pWndButton->GetScreenRect();
pWndButton->m_pWndMenu->Move( CPoint( rcButton.right, rcButton.top ) );
// ±×·±µ¥ ±× ¸Þ´º°¡ È*¸éÀ» ¹þ¾î³µ´Ù¸é À§Ä¡¸¦ ¼öÁ¤
CRect rcMenu = pWndButton->m_pWndMenu->GetScreenRect();
CRect rcLayout = m_pWndRoot->GetLayoutRect();
CPoint pt = rcMenu.TopLeft();
if( rcMenu.right > rcLayout.right )
{
pt.x = rcButton.left - rcMenu.Width();
//pWndButton->m_pWndMenu->Move( CPoint( rcButton.left - rcMenu.Width(), rcButton.top ) );
}
if( rcMenu.bottom > rcLayout.bottom )
{
pt.y -= rcMenu.bottom - rcLayout.bottom;
//pWndButton->m_pWndMenu->Move( CPoint( rcButton.left - rcMenu.Width(), rcButton.top ) );
}
pWndButton->m_pWndMenu->Move( pt );
pWndButton->m_pWndMenu->SetVisible( TRUE );
pWndButton->m_pWndMenu->SetFocus();
}
}
}
return CWndBase::Process();
}
void CWndTaskMenu::SetTexture( CWndButton* pWndButton )
{
pWndButton->SetTexture( g_Neuz.m_pd3dDevice, MakePath( DIR_ICON, g_WndMng.GetAppletFunc( pWndButton->GetWndId() )->m_pszIconName ) );
}

void CWndTaskMenu::OnInitialUpdate()
{
CWndMenu::OnInitialUpdate();

CWndButton* pWndButton;
// 0 ~ 9¹ø
if( g_pPlayer->IsAuthHigher( AUTH_GAMEMASTER2 ) )
{
pWndButton = AppendMenu( this, 0, APP_DEBUGINFO , GETTEXT( TID_APP_DEBUGINFO ) );
}

pWndButton = AppendMenu( this, 0, APP_STATUS1 , GETTEXT( TID_APP_STATUS ) );
#ifdef __WIKI
pWndButton = AppendMenu( this, 0, APP_WIKI, "Item-List" );
#else
pWndButton = AppendMenu( this, 0, APP_NAVIGATOR , GETTEXT( TID_APP_NAVIGATOR ) );
#endif
#if __VER >= 13 // __RENEW_CHARINFO
pWndButton = AppendMenu( this, 0, APP_CHARACTER3 , GETTEXT( TID_APP_CHARACTER ) );
#elif __VER >= 9 // __CSC_VER9_2
pWndButton = AppendMenu( this, 0, APP_CHARACTER2 , GETTEXT( TID_APP_CHARACTER ) );
#else //__CSC_VER9_2
pWndButton = AppendMenu( this, 0, APP_CHARACTER , GETTEXT( TID_APP_CHARACTER ) );
#endif //__CSC_VER9_2

pWndButton = AppendMenu( this, 0, APP_INVENTORY , GETTEXT( TID_APP_INVENTORY ) );

#if __VER >= 11 // __SYS_POCKET
#ifndef __TMP_POCKET
pWndButton = AppendMenu( this, 0, APP_BAG_EX , GETTEXT( TID_APP_BAG_EX ) );
#endif
#if __VER >= 13 // __HOUSING
pWndButton = AppendMenu( this, 0, APP_HOUSING, GETTEXT(TID_GAME_HOUSING_BOX));
#endif // __HOUSING
#endif // __SYS_POCKET
#if __VER >= 8 // __S8_VENDOR_REVISION
pWndButton = AppendMenu( this, 0, APP_VENDOR_REVISION , GETTEXT( TID_APP_VENDOR ) );
#else // __VER >= 8 // __S8_VENDOR_REVISION
pWndButton = AppendMenu( this, 0, APP_VENDOREX , GETTEXT( TID_APP_VENDOR ) );
#endif // __VER >= 8 // __S8_VENDOR_REVISION
#if __VER >= 10 // __CSC_VER9_1
#ifdef __NEW_SKILL_TREE
pWndButton = AppendMenu( this, 0, APP_SKILL4 , GETTEXT( TID_APP_SKILL ) );
#else // __NEW_SKILL_TREE
pWndButton = AppendMenu( this, 0, APP_SKILL3 , GETTEXT( TID_APP_SKILL ) );
#endif // __NEW_SKILL_TREE
#else
pWndButton = AppendMenu( this, 0, APP_SKILL1 , GETTEXT( TID_APP_SKILL ) );
#endif //__CSC_VER9_1
#if __VER >= 15 // __IMPROVE_QUEST_INTERFACE
pWndButton = AppendMenu( this, 0, APP_QUEST_EX_LIST , GETTEXT( TID_APP_QUEST ) );
#else // __IMPROVE_QUEST_INTERFACE
pWndButton = AppendMenu( this, 0, APP_QUEST , GETTEXT( TID_APP_QUEST ) );
#endif // __IMPROVE_QUEST_INTERFACE
pWndButton = AppendMenu( this, 0, APP_MOTION , GETTEXT( TID_APP_MOTION ) );

#if __VER >= 9 // __INSERT_MAP
#ifdef __IMPROVE_MAP_SYSTEM
pWndButton = AppendMenu( this, 0, APP_MAP_EX, GETTEXT( TID_APP_MAP ) );
#else // __IMPROVE_MAP_SYSTEM
pWndButton = AppendMenu( this, 0, APP_MAP, GETTEXT( TID_APP_MAP));//GETTEXT( TID_APP_MAP));
#endif // __IMPROVE_MAP_SYSTEM
#endif
CWndButton* pWndButton7 = NULL;
pWndButton7 = AppendMenu( this, 0, 0 , GETTEXT( TID_APP_COMMITEM ) ); pWndButton7->SetTexture( g_Neuz.m_pd3dDevice, MakePath( DIR_ICON, _T( "icon_Folder.dds" ) ) );

CWndButton* pWndButton1 = AppendMenu( this, 0, 0 , GETTEXT( TID_APP_COMMUNICATION ) ); pWndButton1->SetTexture( g_Neuz.m_pd3dDevice, MakePath( DIR_ICON, _T( "icon_Folder.dds" ) ) );
CWndButton* pWndButton2 = AppendMenu( this, 0, 0 , GETTEXT( TID_APP_COMMUNITY ) ); pWndButton2->SetTexture( g_Neuz.m_pd3dDevice, MakePath( DIR_ICON, _T( "icon_Folder.dds" ) ) );
// CWndButton* pWndButton3 = AppendMenu( this, 0, 0 , GETTEXT( TID_APP_FIND ) ); pWndButton3->SetTexture( g_Neuz.m_pd3dDevice, MakePath( DIR_ICON, _T( "icon_Folder.dds" ) ) );
CWndButton* pWndButton5 = AppendMenu( this, 0, 0 , GETTEXT( TID_APP_INFOMATION ) ); pWndButton5->SetTexture( g_Neuz.m_pd3dDevice, MakePath( DIR_ICON, _T( "icon_Folder.dds" ) ) );
CWndButton* pWndButton6 = AppendMenu( this, 0, 0 , GETTEXT( TID_APP_HELPER ) ); pWndButton6->SetTexture( g_Neuz.m_pd3dDevice, MakePath( DIR_ICON, _T( "icon_Folder.dds" ) ) ); // »ç¿ëÀÚ, ½Ã³À½º
CWndButton* pWndButton4 = AppendMenu( this, 0, APP_OPTIONEX, GETTEXT(TID_APP_OPTION) );

pWndButton = AppendMenu( this, 0, APP_LOGOUT , GETTEXT( TID_APP_LOGOUT ) );
pWndButton = AppendMenu( this, 0, APP_QUIT , GETTEXT( TID_APP_QUIT ) );

// if( GetLanguage() == LANG_TWN )
// pWndButton = AppendMenu( this, 0, APP_WEBBOX2 , GETTEXT( TID_TIP_QOODO ) );

CWndBase::SetTexture( m_pApp->m_pd3dDevice, MakePath( DIR_THEME, _T( "WndTaskMenu.tga" ) ), TRUE );

for(int i = 0; i < m_awndMenuItem.GetSize(); i++)
{
CWndButton* pWndButton = GetMenuItem( i );
pWndButton->SetWndRect( CRect( 10, 50 + ( i * 22 ), m_pTexture->m_size.cx - 20, 50 + 20 + ( i * 22 ) ) );
}
SetWndRect( CRect( 0, 0, m_pTexture->m_size.cx, m_pTexture->m_size.cy ) );

// CRect rect = g_WndMng.m_pWndTaskBar->m_wndMenu.GetScreenRect();
// Move( CPoint( 0, rect.top - GetWindowRect().Height() ) );

m_pMenu1 = new CWndMenu;
m_pMenu1->CreateMenu( this );
pWndButton = AppendMenu( m_pMenu1, 0, APP_COMMUNICATION_CHAT , GETTEXT( TID_APP_COMMUNICATION_CHAT ) );
pWndButton = AppendMenu( m_pMenu1, 0, APP_MESSENGER_ , GETTEXT( TID_APP_MESSENGER ) );
#if __VER >= 13 // __CSC_VER13_2
pWndButton = AppendMenu( m_pMenu1, 0, APP_COUPLE_MAIN , GETTEXT( TID_GAME_COUPLE ) );
#endif //__CSC_VER13_2
pWndButton->m_shortcut.m_dwShortcut = SHORTCUT_APPLET; SetTexture( pWndButton );
pWndButton1->SetMenu( m_pMenu1 );

m_pMenu2 = new CWndMenu;
m_pMenu2->CreateMenu( this );
pWndButton = AppendMenu( m_pMenu2, 0, APP_PARTY , GETTEXT( TID_APP_PARTY ) ) ;
pWndButton = AppendMenu( m_pMenu2, 0, APP_GUILD , GETTEXT( TID_APP_COMPANY ) ) ;

#ifdef __GUILDVOTE
pWndButton = AppendMenu( m_pMenu2, 0, APP_GUILD_VOTE , GETTEXT( TID_GAME_TOOLTIP_GUILDVOTE ) ) ;
#endif
pWndButton2->SetMenu( m_pMenu2 );

m_pMenu5 = new CWndMenu;
m_pMenu5->CreateMenu( this );
pWndButton = AppendMenu( m_pMenu5, 0, APP_INFO_NOTICE , GETTEXT( TID_APP_INFO_NOTICE ) );
pWndButton5->SetMenu( m_pMenu5 );

m_pMenu6 = new CWndMenu;
m_pMenu6->CreateMenu( this );
pWndButton = AppendMenu( m_pMenu6, 0, APP_HELPER_HELP , GETTEXT( TID_APP_HELPER_HELP ) );
pWndButton = AppendMenu( m_pMenu6, 0, APP_HELPER_TIP , GETTEXT( TID_APP_HELPER_TIP ) );
pWndButton = AppendMenu( m_pMenu6, 0, APP_HELPER_FAQ , GETTEXT( TID_APP_HELPER_FAQ ) );
#if __VER >= 12 // __MOD_TUTORIAL
pWndButton = AppendMenu( m_pMenu6, 0, APP_INFOPANG , GETTEXT( TID_APP_INFOPANG ) );
//pWndButton->SetTexture( g_Neuz.m_pd3dDevice, MakePath( DIR_ICON, _T( "icon_Folder.dds" ) ) );
#endif
#ifdef __NEW_WEB_BOX
#ifdef __INTERNALSERVER
pWndButton = AppendMenu( m_pMenu6, 0, APP_WEBBOX2 , GETTEXT( TID_GAME_HELPER_WEB_BOX_ICON_TITLE ) );
#else // __INTERNALSERVER
if( ( GetLanguage() == LANG_ENG && GetSubLanguage() == LANG_SUB_USA ) )
{
pWndButton = AppendMenu( m_pMenu6, 0, APP_WEBBOX2 , GETTEXT( TID_GAME_HELPER_WEB_BOX_ICON_TITLE ) );
}
#endif // __INTERNALSERVER
#endif // __NEW_WEB_BOX
pWndButton6->SetMenu( m_pMenu6 );

m_pMenu7 = new CWndMenu;
m_pMenu7->CreateMenu( this );
pWndButton = AppendMenu( m_pMenu7, 0, APP_WEBBOX, GETTEXT( TID_APP_ITEMMALL ) ); pWndButton->m_shortcut.m_dwShortcut = SHORTCUT_APPLET; SetTexture( pWndButton );
pWndButton = AppendMenu( m_pMenu7, 0, APP_COMM_ITEM , GETTEXT( TID_APP_ITEMTIME ) ); pWndButton->m_shortcut.m_dwShortcut = SHORTCUT_APPLET; SetTexture( pWndButton );
pWndButton7->SetMenu( m_pMenu7 );
}
CWndButton* CWndTaskMenu::AppendMenu( CWndMenu* pWndMenu, UINT nFlags, UINT nIDNewItem, LPCTSTR lpszNewItem )
{
CWndButton* pWndButton = (CWndButton*)pWndMenu->AppendMenu( nFlags, nIDNewItem, lpszNewItem );
AppletFunc* pAppletFunc = g_WndMng.GetAppletFunc( nIDNewItem );
if( pAppletFunc )
{
pWndButton->m_cHotkey = pAppletFunc->m_cHotkey;
CString string;
if( pAppletFunc->m_cHotkey == 0 )
string.Format( "%s", pAppletFunc->m_pAppletDesc );
else
string.Format( "%s\n[%s %c]", pAppletFunc->m_pAppletDesc, prj.GetText( TID_GAME_TOOLTIP_HOTKEY ), pAppletFunc->m_cHotkey );
pWndButton->m_strToolTip = string;
pWndButton->m_shortcut.m_dwShortcut = SHORTCUT_APPLET;
SetTexture( pWndButton );
}

// SetWndRect( CRect( 0, 0, 180, 50 + 5 + 5 + ( m_awndMenuItem.GetSize() * 22 ) ) );

return pWndButton;
/*

CString string;
if( pAppletFunc->m_cHotkey == 0 )
string.Format( "¾ÖÇ÷¿\n%s", pAppletFunc->m_pAppletDesc );
else
string.Format( "¾ÖÇ÷¿\n%s\n[´ÜÃàÅ° %c]", pAppletFunc->m_pAppletDesc, pAppletFunc->m_cHotkey );
g_toolTip.PutToolTip( pShortcut->m_dwId , string, *pRect, point, 0 );

CWndButton* pWndButton = new CWndButton;
int nCount = m_awndMenuItem.GetSize();
CSize size = m_pFont->GetTextExtent( lpszNewItem );
if( size.cx > m_nLargeWidth )
m_nLargeWidth = size.cx + 60;
pWndButton->Create(lpszNewItem, WBS_MENUITEM | WBS_HIGHLIGHT, CRect( 2, 2 + ( nCount * 22 ), m_nLargeWidth, 2 + ( nCount * 22 ) + 20 ), this, nIDNewItem );
m_awndMenuItem.Add( pWndButton );
for( int i = 0; i < m_awndMenuItem.GetSize(); i++ )
{
pWndButton = (CWndButton*)m_awndMenuItem.GetAt( i );
CRect rect = pWndButton->GetWindowRect( TRUE );
rect.right = rect.left + m_nLargeWidth;
pWndButton->SetWndRect( rect );
}
SetWndRect( CRect( 0, 0, m_nLargeWidth + 10, 5 + 5 + ( ( nCount + 1 ) * 22 ) ) );
return pWndButton;
*/
}

BOOL CWndTaskMenu::Initialize(CWndBase* pWndParent,DWORD dwWndId)
{
CreateMenu( &g_WndMng );
SetVisible(TRUE);
return TRUE;
}

void CWndTaskMenu::OnKillFocus(CWndBase* pNewWnd)
{
if(g_WndMng.m_pWndTaskBar != pNewWnd)
CWndMenu::OnKillFocus(pNewWnd);
}

BOOL CWndTaskMenu::OnCommand( UINT nID, DWORD dwMessage, CWndBase* pWndBase )
{
// g_WndMng.ObjectExecutor( SHORTCUT_APPLET, nID );
return TRUE;
}
BOOL CWndTaskMenu::OnChildNotify(UINT message,UINT nID,LRESULT* pLResult)
{
if( message == WNM_CLICKED )
g_WndMng.ObjectExecutor( SHORTCUT_APPLET, nID );
return TRUE;
}
void CWndTaskMenu::OnSize(UINT nType, int cx, int cy)
{
CWndMenu::OnSize( nType, cx, cy );
}
void CWndTaskMenu::OnLButtonUp(UINT nFlags, CPoint point)
{
//if(IsWndStyle(WBS_CAPTION) && m_bPickup)
{//
// m_wndTitleBar.m_wndMinimize.SetVisible(TRUE);
//m_wndTitleBar.m_wndMaximize.SetVisible(TRUE);
}
}
void CWndTaskMenu::OnLButtonDown(UINT nFlags, CPoint point)
{
// CWndBase::OnLButtonDown(nFlags,point
if(IsWndRoot())
return;
// return;

}

void CWndTaskMenu::PaintFrame( C2DRender* p2DRender )
{
// p2DRender->RenderFillRect( GetWindowRect(), D3DCOLOR_ARGB( 255, 76,124,193 ) );
// p2DRender->RenderRect( GetWindowRect(), D3DCOLOR_ARGB( 255, 36,74,100 ) );
CWndBase::PaintFrame( p2DRender );
}
BOOL CWndTaskMenu::OnEraseBkgnd( C2DRender* p2DRender )
{
CRect rect = GetWindowRect();
rect.top += 50;
// p2DRender->RenderFillRect(rect, D3DCOLOR_ARGB( 255, 255,255,255 ) );
return CWndBase::OnEraseBkgnd( p2DRender );
}


void CWndTaskBar::RenderCollTime(CPoint pt, DWORD dwSkillId, C2DRender* p2DRender )
{
LPSKILL lpSkill = &g_pPlayer->m_aJobSkill[ dwSkillId ];
if( lpSkill )
{
DWORD dwDelay = g_pPlayer->GetReuseDelay( dwSkillId );
if( dwDelay > 0 )
{
#if __VER >= 9 // __SKILL_0706
ItemProp* pSkillProp = lpSkill->GetProp();
ASSERT( pSkillProp );
AddSkillProp* pAddSkillProp = prj.GetAddSkillProp( pSkillProp->dwSubDefine, lpSkill->dwLevel );
ASSERT( pAddSkillProp );
RenderRadar( p2DRender, pt,
pAddSkillProp->dwCooldown - dwDelay,
pAddSkillProp->dwCooldown );
#else // __SKILL_0706
RenderRadar( p2DRender, pt,
lpSkill->GetProp()->dwSkillReady - dwDelay,
lpSkill->GetProp()->dwSkillReady );
#endif // __SKILL_0706
}
}
}

#if __VER >= 12 // __LORD
void CWndTaskBar::RenderLordCollTime( CPoint pt, DWORD dwSkillId, C2DRender* p2DRender )
{
CCLord* pLord = CCLord::Instance();
CLordSkillComponentExecutable* pComponent = pLord->GetSkills()->GetSkill(dwSkillId);
if(!pComponent) return;
DWORD dwDelay = 0;
if(pComponent->GetTick() > 0)
RenderRadar( p2DRender, pt, pComponent->GetCooltime() - pComponent->GetTick(), pComponent->GetCooltime() );
}
#endif

void CWndTaskBar::RenderOutLineLamp(int x, int y, int num, DWORD size)
{
CPoint Point = CPoint( x, y );
LONG thick = 10;

D3DXCOLOR dwColorDest2 = D3DCOLOR_ARGB( 0, 40, 0, 255 );

D3DXCOLOR dwColor = D3DCOLOR_ARGB( 196, 40, 0, 255 );

D3DXCOLOR dwColor1 = D3DCOLOR_ARGB( 0, 255, 255, 255 );
D3DXCOLOR dwColor2 = D3DCOLOR_ARGB( 0, 255, 255, 255 );

static BOOL bReverse = FALSE;
static FLOAT fLerp = 0.0f;

if( bReverse )
fLerp-=0.05f;
else
fLerp+=0.05f;

if( fLerp > 1.0f )
{
bReverse = TRUE;
fLerp = 1.0f;
}
else
if( fLerp < 0.0f )
{
bReverse = FALSE;
fLerp = 0.0f;
}

D3DXColorLerp( &dwColor2, &dwColor, &dwColorDest2, fLerp);

CRect Rect = CRect( 0, 0, (size * num), size );

m_p2DRender->RenderFillRect( CRect( (Point.x+Rect.left)-thick, Point.y+Rect.top, (Point.x+Rect.left), Point.y+Rect.bottom ),
dwColor1, dwColor2, dwColor1, dwColor2 );

m_p2DRender->RenderFillRect( CRect( (Point.x+Rect.left), (Point.y+Rect.top)-thick, (Point.x+Rect.right), Point.y+Rect.top ),
dwColor1, dwColor1, dwColor2, dwColor2 );

m_p2DRender->RenderFillRect( CRect( (Point.x+Rect.right), Point.y+Rect.top, (Point.x+Rect.right)+thick, Point.y+Rect.bottom ),
dwColor2, dwColor1, dwColor2, dwColor1 );

m_p2DRender->RenderFillRect( CRect( (Point.x+Rect.left), (Point.y+Rect.bottom), (Point.x+Rect.right), (Point.y+Rect.bottom)+thick ),
dwColor2, dwColor2, dwColor1, dwColor1 );
}

BOOL CWndTaskBar::IsShortcut( LPSHORTCUT lpShortcut, DWORD dwShortcut, DWORD dwId )
{
if( lpShortcut->m_dwShortcut == SHORTCUT_APPLET )
{
}
else
if( lpShortcut->m_dwShortcut == SHORTCUT_SKILL )
{
}
else
if( lpShortcut->m_dwShortcut == SHORTCUT_ITEM )
{
}
else
if( lpShortcut->m_dwShortcut == SHORTCUT_CHAT )
{
}
else
if( lpShortcut->m_dwShortcut == SHORTCUT_MOTION )
{
if( lpShortcut->m_dwShortcut == dwShortcut )
{
MotionProp* pMotionProp = prj.GetMotionProp( dwId );

if( pMotionProp )
{
return TRUE;
}
}
}

return FALSE;
}
help
bhengot is offline  
Reply


Similar Threads Similar Threads
Neuz Crash
03/29/2015 - Flyff Private Server - 5 Replies
how to fix it?
neuz crash
12/16/2014 - Flyff Private Server - 7 Replies
hi epvpers i have some problem in my neuz., i change my projectCmn.h into max level 200 and i change also the resource defineJob.h same max 200 level and i compile it and succcess, i try it ingame no error or neuz crash. here is my problem i try to change the max level into max level 300 when i compile no errors and success., i try it ingame when i reach the max level 200 my neuz is crashing, when i open again my level of my char is level 239 but when i login ingame i cant go ingame it...
[HELP] Neuz Crash
09/05/2014 - Flyff Private Server - 0 Replies
Please help me my neuz crash while opening Model Change app* Errorlogs Neuz.exe caused an EXCEPTION_ACCESS_VIOLATION in module Neuz.exe at 001B:005F2868, CItemBase::CItemBase()+0024 byte(s) - Registers EAX=0012F538 EBX=00000000 ECX=0012F538 EDX=00000000 ESI=00000084 EDI=0012FCE4 EBP=0012F4EC ESP=0012F4E0 EIP=005F2868 FLG=00210202 CS=001B DS=0023 SS=0023 ES=0023 FS=003B GS=0000
neuz crash
06/18/2013 - Flyff Private Server - 0 Replies
About this error : 2013/ 6/19 13:22:13 CTarga::Load Failed = Theme\Default\English\WndChatEdit02.tga 2013/ 6/19 13:22:13 CWndChat::OnInitialUpdate() m_wndChatEdit.lpData = NULL 2013/ 6/19 13:22:14 Apr 5 2013 10:53:46 1 rCnt=1 Neuz.exe caused an EXCEPTION_ACCESS_VIOLATION in module Neuz.exe at 001B:007DD100
Crash neuz.exe Wtf ?
05/23/2012 - Flyff Private Server - 1 Replies
Me Log Error :



All times are GMT +2. The time now is 18:36.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.