/* ========================================================================== * ÀÛ ¼º ÀÚ : À̼ø±Ô * ÀÛ ¼º ÀÏ : 2007.07.06 * ³» ¿ë : * ÁÖÀÇ»çÇ× : *===========================================================================*/ #pragma once #include "ItemDefine.h" #include "UIRoundGauge.h" #include "UIRect.h" #include "Icon.h" typedef tUIRect cUIRect; class cItemIcon; class cIconParam; class cUIImageFont; class cCoolData; /// ¾ÆÀÌÅÛ /// Àκ¥Å丮¿¡ µé¾î°¡´Â ½ÇÁ¦ ¾ÆÀÌÅÛ Á¤º¸¸¦ Æ÷ÇÔÇÑ´Ù. class cItem { friend class cItemManager; friend class cCoolTimeManager; public: cItem(); cItem( cItem& other ); ~cItem(); void Clear(); /// ¾ÆÀÌÄÜÀ» ¿¬°á void BindIcon( cItemIcon* icon ); cItemIcon* GetIcon() { return mIcon; } /// ¾ÆÀÌÅÛ »ç¿ë °ü·Ã Ȱ¼ºÈ­ ¼³Á¤ void SetUsedFlag( bool enabled, bool colorchange = true ); // ÀÎÁõ ¼³Á¤ void SetSeal( bool seal ); // ij½¬ ¼³Á¤ void SetCash( bool cash ); /// ¾ÆÀÌÅÛ ¶ô : ¸ðµç À̺¥Æ® ºÒ°¡ ( ÅøÆÁÁ¦¿Ü ) /// °Å·¡Ã¢, ³ëÁ¡Ã¢, ºÐÇØÃ¢µî UI¿¡ µî·ÏÇҽÿ¡ »ç¿ëÇÑ´Ù void SetLock( bool lock ); bool IsLock() { return mLock; } unsigned long GetIndex() const; unsigned short GetCount() const; unsigned char GetEnhanceStep() const; cItemDefine* GetDefine(); cItemTarot* GetTarotDefine(); bool IsSeal() { return mSeal; } bool IsCash() { return mCash; } sItemBill* GetBill() { return mItemBill; } unsigned long GetCardIndex1() { return mCardIndex1; } unsigned long GetCardIndex2() { return mCardIndex2; } unsigned long GetCardIndex3() { return mCardIndex3; } unsigned long GetCardIndex4() { return mCardIndex4; } unsigned long GetCardIndex5() { return mCardIndex5; } /// ÄðŸÀÓ º¹»ç void CopyCoolTime( unsigned long startTime, unsigned long restTime, unsigned long totalTime ); bool StartCoolTime( unsigned long cool ); void EndCoolTime(); bool IsCoolTime() const; /// Ä÷¯ void SetColor( NiColorA color ); NiColorA GetColor() { return mColor; } /// ´Ù¸¥ ¾ÆÀÌÅÛ°ú À§Ä¡ ÀÚü¸¦ º¯°æ ( ¸ðµçÁ¤º¸´Â ±×´ë·Î µÒ ) bool SwicthPosition( cUIRect& rect ); private: void SetTwoHanded( bool twoHanded, cIconParam* iconParam = 0, cItemDefine* define = 0 ); void SetCount( unsigned short count ); cItem& operator=( cItem& other ); cItem& operator=( unsigned int i ); void SetAniParam( sAniParam* param ); private: /// ¾ÆÀÌÅÛ À妽º unsigned long mIndex; /// ¾ÆÀÌÅÛ °íÀ¯ À妽º ( DB À妽º ) unsigned long mDBIndex; /// °­È­´Ü°è unsigned char mEnhanced; /// ¾ÆÀÌÅÛ ¼ö·® unsigned short mCount; /// ¾ÆÀÌÅÛ ºÀÀÎ ¿©ºÎ bool mSeal; /// ij½¬¾ÆÀÌÅÛ ¿©ºÎ bool mCash; /// ¾ÆÀÌÅÛ ÀåÂø Ä«µå unsigned long mCardIndex1; unsigned long mCardIndex2; unsigned long mCardIndex3; unsigned long mCardIndex4; unsigned long mCardIndex5; /// ¾ÆÀÌÅÛ Á¤ÀÇ cItemDefine* mDefine; /// ij½¬ ½Ã°£Á¤º¸ sItemBill* mItemBill; /// ÀåÂø ŸÀÔ eItemEquip mEquipType; /// Ç÷¢ eItemFlag mFlag; /// ¹ÙÀεù ¾ÆÀÌÄÜ cItemIcon* mIcon; /// »ç¿ë Ȱ¼ºÈ­ bool mEnableUse; /// ¶ô : ¸ðµç ¾ÆÀÌÅÛ°ü·Ã À̺¥Æ® ºÒ°¡ bool mLock; /// temp ¾ÆÀÌÅÛÁ¤º¸ ( ¾ÆÀÌÅÛ Ã¼ÀÎÁö½Ã tempÀÎÀÚ ÀÌ¿ëÇϹǷΠÇÊ¿ä ) cUIRoundGauge mGauge; cString mNumText; NiColorA mColor; unsigned int mNumber; eTooltipType mTipType; /// ·¹¾îµµ °ü·Ã bool mShowNumber; sAniParam mAniParam[eANI_MAX]; cIconParam* mIconParam; cUIImageFont* mImageFont; }; inline cItem::cItem() : mIndex( 0 ) , mDBIndex( 0 ) , mEnhanced( 0 ) , mCount( 0 ) , mSeal( false ) , mCash( false ) , mCardIndex1( 0 ) , mCardIndex2( 0 ) , mCardIndex3( 0 ) , mCardIndex4( 0 ) , mCardIndex5( 0 ) , mDefine( 0 ) , mEquipType( ITEM_EQUIP_NORMAL ) , mFlag( ITEM_FLAG_NULL ) , mIcon( 0 ) , mIconParam( 0 ) , mImageFont( 0 ) , mNumber( 0 ) , mEnableUse( true ) , mLock( false ) , mShowNumber( false ) , mColor( NiColorA::WHITE ) , mTipType( eTOOLTIP_NONE ) , mItemBill(0) { ::memset( mAniParam, 0, sizeof(mAniParam) ); } inline cItem::cItem( cItem& other ) : mIcon( 0 ) { operator=( other ); } inline cItem::~cItem() { } inline unsigned long cItem::GetIndex() const { return mIndex; } inline unsigned short cItem::GetCount() const { return mCount; } inline unsigned char cItem::GetEnhanceStep() const { return mEnhanced; } inline cItemDefine* cItem::GetDefine() { return mDefine; } inline cItemTarot* cItem::GetTarotDefine() { return mDefine->GetTarotDefine(); }