#pragma once //============================================================================================================================= /// VendorSlot class /** @author Kim Min Wook < taiyo@webzen.com > @since 2004. 12. 29 @remark - SCSlotÀ» »ó¼Ó¹Þ¾Æ °³ÀλóÁ¡ ½½·ÔÀ» ±¸ÇöÇÑ Å¬·¡½º @note - @history - */ //============================================================================================================================= #include #include class VendorSlot : public SCSlot { public: VendorSlot(void); virtual ~VendorSlot(void); virtual VOID Clear(){ m_Money = 0; if(m_pItemSlot) m_pItemSlot->SetLock(FALSE); m_pItemSlot = NULL; } virtual VOID Copy( SCSlot & IN slot ); VOID CopyOut(VENDOR_ITEMSLOTEX & OUT ItemStream); VOID Create( SCItemSlot & IN slot, const MONEY & money );//< Àκ¥Å丮 ¾ÆÀÌÅÛÀÇ Á¤º¸¸¦ copy virtual eSlotType GetSlotType() const { return ST_VENDOR; } virtual DBSERIAL GetSerial() const { if( !m_pItemSlot) return 0; return m_pItemSlot->GetSerial();} virtual DBWLDSERIAL GetWorldSerial() const { if( !m_pItemSlot) return 0; return m_pItemSlot->GetWorldSerial(); } virtual SLOTCODE GetCode() const { return m_pItemSlot->GetCode();} // ÆÇ¸ÅÇϰíÀÚÇÏ´Â °³¼ö //virtual DURATYPE GetSellNum() const { return m_nSellNum; } MONEY& GetMoney() { return m_Money; } // (ADD)(20100324)(hukim)(STYLE) À§¿Í °°Àº °æ¿ì GetMoney()=xxx; ¿Í °°Àº Äڵ尡 ÀÛ¼º µÇ¾úÀ» °æ¿ì // À¯È¿ÇϹǷΠÀǹÌÀûÀ¸·Î getter & setterÀÌ´Ù. µû¶ó¼­ Àбâ Àü¿ë Á¢±ÙÀÚ¸¦ º°µµ·Î Ãß°¡ÇØ ÁÙ Çʿ䰡 // ÀÖ´Ù. MONEY GetMoney() const { return m_Money; } VOID SetLinkItem( SCItemSlot * pItem ) { if(pItem) pItem->SetLock(TRUE); if(m_pItemSlot) m_pItemSlot->SetLock(FALSE); m_pItemSlot = pItem; } SCItemSlot * GetLinkItem() const { return m_pItemSlot; } inline BOOL IsLocked() const { return m_bLocked; } inline VOID SetLock( BOOL val ) { m_bLocked = val; } virtual void Copy( BitStream & IN stream ); virtual void CopyOut( BitStream & OUT stream ); virtual void Copy( BitStream & IN stream, eSLOT_SERIALIZE eType ); virtual void CopyOut( BitStream & OUT stream, eSLOT_SERIALIZE eType ); private: SCItemSlot * m_pItemSlot; //< Àκ¥Å丮 ¾ÆÀÌÅÛÀÇ Á¤º¸ MONEY m_Money; //< ÆÇ¸Å °¡°Ý //DURATYPE m_nSellNum; //< ÆÇ¸ÅÇÏ´Â °³¼ö BOOL m_bLocked; };