#define DEV_EQUIPMENT #ifdef DEV_EQUIPMENT #pragma once #include //#include "SUIWnd.h" #include "SGameMessage.h" #include "SUIDisplayInfo.h" //#include "SUIUtil.h" // sonador 1.9.1 인벤토리 및 창고 정렬 기능 구현 class SUIDisplayInfo; class SUIDurabilityWnd; struct KUISendRecvDropMessage; // 2010.08.20 - prodongi #define DECO #define CONTRIBUTION // 전체수리. struct SRepairInfo { int maxEthereal; // 최대내구도. int crrEthereal; // 현재내구도. float percent; // 현재 내구도 %. int lossValue; // 내구도 손실값. int EtherealPerOne; // 1% 당 Ethereal 량. void Clear(){ maxEthereal=0; crrEthereal=0; percent = 0.0f; EtherealPerOne = 0; } void Set( ItemBaseEx_info * p, SInventorySlot * pSlot ); }; //-------------------------------------------------------------------------------------------------------------------------------------------------------------- //-------------------------------------------------------------------------------------------------------------------------------------------------------------- //-------------------------------------------------------------------------------------------------------------------------------------------------------------- //-------------------------------------------------------------------------------------------------------------------------------------------------------------- // // class SUIEquipmentWnd // // * 장비창. // // //-------------------------------------------------------------------------------------------------------------------------------------------------------------- class SUIEquipmentWnd : public SUIWnd, public sui::ticker { public: SUIEquipmentWnd( SGameManager* pGameManager, SUIDisplayInfo* pDisplayInfo, SUIInventoryWnd * pInventoryWnd ) : SUIWnd( pGameManager ) , m_pDisplayInfo( pDisplayInfo ), m_pInventoryWnd( pInventoryWnd ), m_pStaticTarget( NULL ), m_SeqType( 1 ) { enter(); } virtual ~SUIEquipmentWnd(); virtual SUIWnd * CreateWnd( const char* szFile, KUIWndManager* pWndManager, KPoint kPos, int nWindowID ); virtual void Process( DWORD dwTime ); virtual bool InitControls( KPoint kPos ); virtual bool InitData( bool bReload = false ); virtual void* Perform( KID id, KArg& msg ); virtual void PumpUpMessage( LPCSTR lpszControlID, DWORD nMessage, DWORD lparam, DWORD wparam ); virtual void ProcMsgAtStatic( SGameMessage* pMsg ); virtual void OnNotifyUIWindowOpen( bool bOpen, bool bLimitWnd = true ); private: //SUIDisplayInfo* m_pDisplayInfo; // ////int m_nInvenDropOffset; ///< 인벤토리 슬롯에 Drag & Drop하는 기준 offset. // 아이템슬롯의 top(Y). // //UI_ITEM_CATEGORY m_CurrentCategory; ///< 현재 선택된 아이템 분류 //int m_nCurrentSelect; ///< 현재 선택된 아이템 인덱스 (없으면 -1) void Req_BeltItem( AR_HANDLE hItem ); void ReqSwapItem( AR_HANDLE hBEGIN_DRAG, AR_HANDLE hRECV_DROP ); void CloseCreatureCardWnd(); void RefreshLendingItemTooltip(); void refreshBeltSlotItemToolTip(); /// 2010.11.01 - prodongi void RefreshChaos(); void RefreshEquipItems(); // 탈것 아이콘. void RefreshRideIcon(); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// #ifndef DECO void RefreshEquipItem( const char* szControlID, const char* defAniName, SInventorySlot* pItem ); #endif //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// #ifdef DECO void RefreshEquipItem( const char* szControlID, const char* defAniName, SInventorySlot* pItem, const char* lpTooltip, int wearType ); void GetEquipTooltip( int nWearType, std::string& rTooltip ); #endif void RefreshBeltSlot(); int GetSlotControlNum( const char* szSlotControlID ) const; void SetSeqForm( struct SIMSG_UI_MAINPLAYER_INFO* pMsg ); K3DVertex GetSeqPos( const char* szRace ); K3DVertex GetSeqTargetPos( const char* szRace ); void BodyView(); static ItemBase::ItemWearType GetEquipSlotWearType( const char* szEquipControlID ); //AR_HANDLE m_hLocal; bool AbleSubSlot( class SInventorySlot* pSlot ); bool AbleMainSlot( class SInventorySlot* pSlot ); //bool m_bShiptKey; // 팝업메뉴열기. void ShowPopupEquipment( const char * pStr, int x, int y ); // 무기교체. void WeaponSwap(); // 꾸미기장비 전체토글. void AllDecoEquipmentToggle(); // 꾸미기아이템 보임,숨김 아이콘처리. void DecoEquipmentChange(); // 전체수리. void AllRepair(); // 수리해야 할 내구도가 소모된 아이템. bool IsRepair( SInventorySlot * pSlot ); // 내구도게이지 출력설정.( % 에 따른 색상변경, 아이템종류에 따른 아이콘 출력 ) void RefreshDurability( SInventorySlot * pSlot, int wearType ); protected: // 2010.08.20 - prodongi void refreshBeltSlotBossCardGage(); void dragDropToBeltSlot(SUIInvenItemDragInfo* itemDragInfo, KUISendRecvDropMessage* recvMsg); void procBeltSlotEnchantIcon(int mx, int my); // 2010.08.25 - prodongi int getBeltSlotCount(); //----------------------------------------------------------------------------------------------------------------- private: SUIDisplayInfo* m_pDisplayInfo; SUIInventoryWnd * m_pInventoryWnd; // 인벤토리 윈도우. KUIWnd * m_pChaos; int m_ChaosWidth; int m_SeqType; KUIWnd * m_pLac; //int m_nInvenDropOffset; ///< 인벤토리 슬롯에 Drag & Drop하는 기준 offset. // 아이템슬롯의 top(Y). UI_ITEM_CATEGORY m_CurrentCategory; ///< 현재 선택된 아이템 분류 int m_nCurrentSelect; ///< 현재 선택된 아이템 인덱스 (없으면 -1) AR_HANDLE m_hLocal; bool m_bShiptKey; class KUIControl3DStatic * m_pStaticTarget; // 3D Static. std::vector< KUIWnd * > m_arrDrabilityGauge; // 내구도 게이지바. float m_fDurabilityGaugeW; // 내구도게이지 기본 넓이. std::vector< KUIWnd * > m_arrGeneralItem; // 장비가 내구도가없는 일반아이템의경우 출력될 X 아이콘. class KUIControlSimpleButton * m_pBtnAllDecoView; // 꾸미기아이템 모두 보임,숨김 버튼. class KUIControlMultiIcon * m_pRideIcon; // 탈것아이콘. std::string m_strDeco; // 텍스트 꾸미기 태그. std::vector< KUIControlMultiIcon * > m_arrMultiIcon; // 장비창에존재하는 멀티아이콘들.( 툴팁갱신용 ). std::vector m_arrBeltMultiIcon; /// 2010.11.01 벨트 슬롯용 멀티 아이콘 - prodongi protected: // 2010.08.20 장착된 보스 카드 핸들 - prodongi struct sBeltSlotBossCardInfo { sBeltSlotBossCardInfo() : m_handle(0), m_slotIndex(0) {} sBeltSlotBossCardInfo(AR_HANDLE handle, int slotIndex) : m_handle(handle), m_slotIndex(slotIndex) {} void clear() { m_handle = 0; m_slotIndex = 0; } AR_HANDLE m_handle; int m_slotIndex; }; sBeltSlotBossCardInfo m_beltSlotBossCardInfo; // 2010.08.24 - prodongi struct sBeltSlotEnchantIconName { sBeltSlotEnchantIconName() : m_sprName(NULL), m_aniName(NULL), m_aniOverName(NULL) {} sBeltSlotEnchantIconName(char const* sprName, char const* aniName, char const* aniOverName) { m_sprName = sprName; m_aniName = aniName; m_aniOverName = aniOverName; } char const* m_sprName; char const* m_aniName; char const* m_aniOverName; }; sBeltSlotEnchantIconName m_beltSlotEnchantIconName[8/*c_nBeltSlot_Cnt*/]; }; #endif