#pragma once #include "DnObserver.h" //------------------------------------------------------------------------------ /** »ç¿ëÇÏ´Â À̺¥Æ®º°·Î ¼±¾ð. */ //------------------------------------------------------------------------------ enum { NONE_BUBBLE_EVENT_MESSAGE = 0, // ¹öºí ½Ã½ºÅÛ¿¡ Àü´ÞµÇ´Â ¸Þ½ÃÁöµé. ////////////////////////////////////// EVENT_BUBBLE_ON_USE_SKILL, // ƯÁ¤ ½ºÅ³À» »ç¿ëÇßÀ» ¶§. EVENT_BUBBLE_BLOCK_SUCCESS, // ƯÁ¤ ½ºÅ³¿¡¼­ ÁöÁ¤µÈ ºí·Ï »óÅÂÈ¿°ú°¡ ¼º°øÇßÀ» °æ¿ì. EVENT_BUBBLE_COUNT_UPDATED, // ƯÁ¤ ¹öºíÀÇ °¹¼ö°¡ °»½ÅµÊ. EVENT_BUBBLE_PARRING_SUCCESS, // ƯÁ¤ ½ºÅ³¿¡¼­ ÁöÁ¤µÈ ÆÐ¸µ »óÅÂÈ¿°ú°¡ ¼º°øÇßÀ» °æ¿ì. EVENT_BUBBLE_COOLTIME_PARRING_SUCCESS, // ƯÁ¤ ½ºÅ³¿¡¼­ ½ÃÁ¤µÈ ÄðŸÀÓ ÆÐ¸µ »óÅÂÈ¿°ú°¡ ¼º°øÇßÀ» °æ¿ì. //EVENT_BUBBLE_HIT_BY_SKILL, // ƯÁ¤ ½ºÅ³·Î hit µÊ. EVENT_ONCHANGEACTION, // ¾×¼Ç º¯°æµÊ. EVENT_PLAYER_KILL_TARGET, // ´©±º°¡¸¦ Á׿´À» ¶§ ////////////////////////////////////////////////////////////////////////// EVENT_ONCRITICALHIT = 50, }; //------------------------------------------------------------------------------ /** À̺¥Æ® ŸÀÔ ÀÎÅÍÆäÀ̽º */ //------------------------------------------------------------------------------ class IDnObserverNotifyEvent { private: int m_iEventType; protected: IDnObserverNotifyEvent( void ) { m_iEventType = 0; }; public: virtual ~IDnObserverNotifyEvent( void ) {}; static IDnObserverNotifyEvent* Create( int iType ); virtual void SetSkillID( int iSkillID ) {}; virtual void SetBubbleTypeID( int iBubbleTypeID ) {}; void SetEventType( int iEventType ) { m_iEventType = iEventType; }; int GetEventType( void ) { return m_iEventType; } }; //------------------------------------------------------------------------------ /** ¿ÉÀú¹ö µî·Ï/Á¦°Å ¹× À̺¥Æ® ÅëÁö */ //------------------------------------------------------------------------------ class CDnObservable { private: std::vector m_vlpObservers; public: CDnObservable( void ); virtual ~CDnObservable( void ); bool RegisterObserver( CDnObserver* pObserver ); bool RemoveObserver( CDnObserver* pObserver ); void Notify( boost::shared_ptr& pEvent ); };