#pragma once //#include "SUIWnd.h" //-------------------------------------------------------------------------------------------------------------------------------------------------------------- //-------------------------------------------------------------------------------------------------------------------------------------------------------------- //-------------------------------------------------------------------------------------------------------------------------------------------------------------- //-------------------------------------------------------------------------------------------------------------------------------------------------------------- // // class SUIRepairWnd // // * 수리창. // // //-------------------------------------------------------------------------------------------------------------------------------------------------------------- class SUIRepairWnd : public SUIWnd { private: int m_WndType; // 수리,복원,충전 std::string m_strFormal; // 공식. std::string m_strDecoFormal; // 공식 꾸미기 태그. std::string m_strFontNameFormal; // 공식 폰트명. KUIControl * m_pCtrlFormula; // 공식출력 컨트롤. class KUIControlVScrollSmallEx * m_pScrollFormal; // 스크롤바. int m_nScrollPos; // 현재 스크롤 값. KUIWnd * m_pCtlrFormalState; // 공식 상태. std::string m_strDecoFormalState; std::string m_strDecoEtherealStoneDurability; KUIWnd * m_pCtrlEtherealStoneDurability; // 에테리얼스톤 내구도충전량. KUIWnd * m_pCtrlEtherealStone; // 에테리얼스톤 충전량에 따른 이미지 출력용 컨트롤. int m_RechargeQuantity; // 아이템내구도 충전량. ( 입력기의 입력값 ) KUIWnd * m_pBtnRepair; // 수리버튼. KUIWnd * m_pCtrlLine; // 라인컨트롤. std::string m_strDecoBtn; // 버튼 꾸미기 태그. KUIWnd * m_pCtrlStringState; // 상태 텍스트 컨트롤. std::string m_strDecoState; // 상태 꾸미기 태그. KUIWnd * m_pCtrlGaugeDurability; // 내구도 백분률 출력 컨트롤. KUIWnd * m_pGaugeDurability; // 내구도 게이지. KUIWnd * m_pCtrlMarkDurability; // 내구도에 따른 마크 컨트롤. std::string m_strDurabilityDeco; // 내구도 꾸미기 태그. float m_fGaugeWidth; // 내구도 게이지 너비. float m_fDurabilityPercent; // 내구도 백분률. 0.0f ~ 1.0f std::vector< std::string > m_vLineList; // 공식 리스트 배열. public: public: SUIRepairWnd( SGameManager* pGameManager, class SUIDisplayInfo* pDisplayInfo ) : SUIWnd( pGameManager ) , m_pDisplayInfo( pDisplayInfo ), m_CombineItemHandel(0) {}; 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; struct COMBINEITEM { AR_HANDLE handle; count_t usiCount; COMBINEITEM() : handle( NULL ), usiCount( 0 ) { } COMBINEITEM( AR_HANDLE _handle, count_t _usiCount = count_t( 1 ) ) : handle( _handle ), usiCount( _usiCount ) { } void Clear(){ handle = 0; usiCount = count_t(0); } }; typedef std::vector COMBINEITEM_VECTOR; COMBINEITEM m_SourceItem; COMBINEITEM_VECTOR m_CombineItemsVector; AR_HANDLE GetItemHandle( const char* szControlID ) const; SUIRepairWnd::COMBINEITEM_VECTOR::iterator GetItemIterator( AR_HANDLE hItem ); void AddCombineItem( AR_HANDLE hItem, count_t usiCount ); void RemoveCombineItem( AR_HANDLE hItem ); void RemoveAllCombineItems( bool bRefreshSlot = true ); void RefreshSlots(); void SetItemIconStatic( class KUIControlMultiIcon* pIconStatic, KUIWnd* pItemCountControl, count_t nCount = count_t( 0 ), SInventorySlot* pSlot = NULL, bool bMain=false ); bool IsEquipItem( class SInventorySlot* pSlot, count_t usiCount ); void AddMainCombineItem( AR_HANDLE hItem, count_t usiCount, bool bEquip=true ); void AddSubCombineItem( AR_HANDLE hItem, count_t usiCount ); bool AbleAddSlot( COMBINEITEM Item ); bool AbleMainSlot( class SInventorySlot* pSlot ); bool AbleSubSlot( class SInventorySlot* pSlot ); AR_HANDLE m_CombineItemHandel; private: // 공식텍스트 출력. //void RefreshFormal(); // 에테리얼스톤 내구충전량 변화. void RefreshEtherealSton(); // 윈도우타입에 따른 처리. void RefreshWndType(); // 공식 초기화. void Clear(); bool isEnableRechargeItem() const; /// 2011.01.27 재료창에 있는 아이템이 충전 가능한지 검사 - prodongi void setWndType(int type); void refreshRepairButtonStatus(); bool isCheckedUseRechargeMsgBox() const; /// 2011.02.14 충전창 확인 윈도우 체크 버튼 확인 void setUseRechargeMsgBox(bool dontask, bool applyOption); /// 2011.02.16 :충전시 확인창 사용 체크/언체크 - prodongi /// 2011.08.11 - prodongi void performRepair(); void performRestortionRecharge(); /// 2012.03.27 선택한 아이템들이 수리용 조합인지 체크 - prodongi bool isRepairItems(); void getMainMixList( SInventorySlot* pSlot, std::vector& mainMixList ); void getSubMixList( SInventorySlot* pSlot, const std::vector& mainMixList, std::vector& subMixList); public: // 아이템을 넘겨받음. // bEquip : true(장착여부 판정O), false(장착여부 판정X) // 2011.04.26 - servantes / mantis : 12753 void ReceiveItem( AR_HANDLE hItem, std::string & strDropControlID, bool bEquip=true, int nItemCount=1 ); //--- 내구도 게이지. void SUIRepairWnd::GaugeDurability_Empty(); void SUIRepairWnd::GaugeDurability_Restoration(); void SUIRepairWnd::GaugeDurability_Repair(); void SUIRepairWnd::GaugeDurability_Recharge(); //-------------------- };