59 lines
1.5 KiB
C++
59 lines
1.5 KiB
C++
|
|
|
|
#pragma once
|
|
|
|
#include "SInventoryMgr.h"
|
|
#include "SGameUIMgr.h"
|
|
|
|
class SStorageMgr : public SGameUIMgr
|
|
{
|
|
public:
|
|
SStorageMgr();
|
|
~SStorageMgr();
|
|
|
|
public:
|
|
void SortItemList();
|
|
void Process( DWORD time );
|
|
|
|
void Clear();
|
|
int AddItem( TS_ITEM_INFO* pItemInfo );
|
|
void DeleteItem( AR_HANDLE hItem );
|
|
void UpdateItemCount( AR_HANDLE hItem, count_t nCount );
|
|
// 아이템 삭제 후 처리 (인덱스 밀기)
|
|
void _onEraseItem( std::vector<SInventorySlot*>::iterator it );
|
|
|
|
const count_t GetItemCount( AR_HANDLE hItem ) const;
|
|
const std::vector<SInventorySlot*>& GetItemList() const { return m_vecItemList; };
|
|
|
|
AR_HANDLE GetDragItem() { return m_hDragItem; };
|
|
void SetDragItem( AR_HANDLE hItem ) { m_hDragItem = hItem; };
|
|
|
|
int GetMode() { return m_nStorageMode; };
|
|
void SetMode( int nMode ) { m_nStorageMode = nMode; };
|
|
|
|
bool IsExistItem( AR_HANDLE hItem );
|
|
bool IsExistItem( AR_HANDLE hItem, count_t nItemCount );
|
|
bool IsStorageOpen() { return m_bIsOpen; };
|
|
void SetStorageOpen( bool bOpen ) { m_bIsOpen = bOpen; };
|
|
|
|
SInventorySlot* GetItemInfo( AR_HANDLE hItem );
|
|
|
|
void ResetInfo();
|
|
protected:
|
|
std::vector<SInventorySlot*> m_vecItemList;
|
|
|
|
private:
|
|
|
|
DWORD m_dwCheckLendingTime;
|
|
unsigned int m_nCheckCount;
|
|
|
|
AR_HANDLE m_hDragItem;
|
|
int m_nStorageMode;
|
|
|
|
bool m_bIsOpen;
|
|
public:
|
|
void SetMaxSlotNum(int MaxSlotNum) {m_iMaxSlotNum = MaxSlotNum; };
|
|
int GetMaxSlotNum() const { return m_iMaxSlotNum; };
|
|
private:
|
|
int m_iMaxSlotNum; // 2011. 9. 15 - marine 창고 최대슬롯 개수 추가
|
|
}; |