Files
2026-06-01 12:46:52 +02:00

95 lines
3.3 KiB
C++

#pragma once
//#include "SUIWnd.h"
#include <mmo/ArType.h>
class SUIDisplayInfo;
class SCreatureInfo;
class SInventorySlot;
//편성창
class SUIEquipCreatureWnd : public SUIWnd
{
public:
SUIEquipCreatureWnd( class SGameManager* pGameManager, SUIDisplayInfo* pDisplayInfo ): SUIWnd( pGameManager )
, m_pDisplayInfo( pDisplayInfo )
, m_nCurrentSelectCreature( -1 ) // 2011.04.18 - servantes
, m_bFixedCreatureSlot( false ) // 2011.05.03 - servantes
{};
virtual bool InitControls( KPoint kPos );
virtual void* Perform( KID id, KArg& msg );
virtual void PumpUpMessage( LPCSTR lpszControlID, DWORD nMessage, DWORD lparam, DWORD wparam );
virtual void ProcMsgAtStatic( struct SGameMessage* pMsg );
virtual bool InitData( bool bReload = false );
virtual void OnRefresh( struct SGameMessage* pMsg );
virtual void OnNotifyUIWindowOpen( bool bOpen, bool bLimitWnd = true );
/// 편성이 되어있는지 검사
BOOL IsFormatCreature(AR_HANDLE hCreature); // 2011.03.24 - servantes
void SetFixedCreatureSlot(bool bFixed) { m_bFixedCreatureSlot = bFixed; } // 2011.05.02 - servantes
private:
/// 생성 ===========================
void CreateSlots();
void EnableSlot( int nPos = 0, bool bEnable = false );
void InitIconToolTip();
/// 편성 ============================
bool RequestEquipCreature( bool bCancel = false );
void SwapCreatureInfo( bool bDown = true );
/// 선택 처리 =========================
bool SelectCreature( int nPos, bool bShow = false );
void unSelectCreature(); /// 2011.06.07 - prodongi
/// 슬롯 ==============================
void RefreshSlots( int nPos = 0, bool bSwap = false );
void SetCreatureData( int nPos, int nIndex, const SCreatureInfo* pInfo );
void SetSlotNum( int nIndex, int nPos );
void EquipCreatureCard( int nPos, AR_HANDLE hCardItem );
void RefreshCardSlot( int nPos, AR_HANDLE hCard );
// 2010.05.19 변수명이 너무 헷깔린다, - prodongi
void RefreshCreatureItem( int nPos, int scrollPos, AR_HANDLE hCreature );
// void RefreshCreatureItem( int nPos, AR_HANDLE hCreature );
int GetCreatureSlotIndex( int x, int y );
int GetCardSlotIndex( const char* szControlID ) const;
int GetItemSlotIndex( const char* szControlID ) const;
/// 장착 =============================
int GetEmptySlot();
void RequestEquipItem( int nPos, AR_HANDLE hItem, bool bEquip = true );
bool IsEnableEquipItem( AR_HANDLE hItem );
bool IsEnableEquipCardItem( AR_HANDLE hItem );
AR_HANDLE GetItemInCreature( int nStartPos, int nPos, const char* szControlID );
/// 스크롤 바 =========================
void RefreshScrollbar();
/// 컨트롤 관리 =========================
void EnableControlOnSlot( int nIndex, bool bEnable );
void SetControlEnable( const char * pControlName, bool bEnable );
void OnControlEnablOption();
void OffSetRect( KRect& rRt, int x, int y );
/// @brief 2010.05.07 크리쳐 카드 아이콘 설정 - prodongi
void updateCreatureCardIcon(SInventorySlot* slot, int pos);
void syncSelectButton(int selectCreature); /// 2011.06.07 - prodongi
private:
class SUIDisplayInfo* m_pDisplayInfo;
int m_nSelSlotNum;
int m_nScrollPos;
AR_HANDLE m_hCreatureCardHandle[15]; //AR_HANDLE m_hCreatureCardHandle[ 6/*SSummonSlotMgr::MAX_CREATURE_SLOT*/ ];
int m_nCurrentSelectCreature; // 2011.04.18 - servantes
bool m_bFixedCreatureSlot; // 2011.05.02 - servantes
float m_fGaugeWidth;
};