#pragma once #include "GameObject.h" #include #include #include "ObjectController.h" //¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦´ // class WiseCharacter; class WiseUser; class IPeriodicWork; typedef sMESSAGE_BLOCK SEND_MESSAGE_BLOCK; typedef sMESSAGE_BLOCK RECV_MESSAGE_BLOCK; //¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦´ class WiseUserAddin { friend class WiseUser; ////////////////////////////////////////////////////////////////////////// // private: ZoneControl m_ZoneController; sAuthController m_AuthController; AutoPlayControl m_AutoPlayController; AccountInfo m_Account; RECV_MESSAGE_BLOCK m_RECV_REF; SEND_MESSAGE_BLOCK m_SEND_REF; }; //¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦´ // // Ŭ¶óÀÌ¾ðÆ®°¡ Á¢¼ÓÇϰí Ç÷¹ÀÌÇÏ´Â »óÅ °ü·Ã ±¸ºÐÀÚ class WiseUser : public GameObject { public: public: WiseUser(); ~WiseUser(); public: void Init(LogicFlowBase* pLogicFlow); void Release(); inline IPeriodicWork* GetPeriodicWork() { return m_pPeriodicWork; } inline void SetPeriodicWork(IPeriodicWork* pWork) { m_pPeriodicWork = pWork; } inline LogicFlowDelegator& GetLogicFlow() { return m_rLogicFlow; } // LogicFlowConnection °´Ã¼ inline UserSessionMgr& GetSessionMgr() { return m_UserSessionMgr; } inline RECV_MESSAGE_BLOCK& RECV_MSG() { return m_pAddin->m_RECV_REF; } inline SEND_MESSAGE_BLOCK& SEND_MSG() { return m_pAddin->m_SEND_REF; } ////////////////////////////////////////////////////////////////////////// // public: inline WiseCharacter* GetSelectedCharacter(); inline void SelectCharacter(DWORD dwIdx); BOOL AddChar(SLOTIDX bySlotIdx, CLIENT_CHARACTER_PART& rCHAR_INFO); ////////////////////////////////////////////////////////////////////////// // void OnMsg(sSIG_MSG* pSIG_MSG); ////////////////////////////////////////////////////////////////////////// // public: inline sAuthController& AuthController() { return m_pAddin->m_AuthController; } inline ZoneControl& ZoneController() { return m_pAddin->m_ZoneController; } inline AutoPlayControl& AutoController() { return m_pAddin->m_AutoPlayController; } inline AccountInfo& AccountController() { return m_pAddin->m_Account; } private: friend class LogicFlowController; WiseUserAddin* m_pAddin; LogicFlowDelegator m_rLogicFlow; IPeriodicWork* m_pPeriodicWork; UserSessionMgr m_UserSessionMgr; WiseCharacter* m_pSelectedCharacter; WiseCharacter* m_pCharacters[MAX_CHARACTER_LIST_NUM]; BYTE m_pAddinStream[sizeof(WiseUserAddin)]; //ZoneControl m_ZoneController; //sAuthController m_AuthController; //AutoPlayControl m_AutoPlayController; //AccountInfo m_Account; //RECV_MESSAGE_BLOCK m_RECV_REF; //SEND_MESSAGE_BLOCK m_SEND_REF; }; //¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦´ // class WiseUserDelegator { public: WiseUserDelegator() : m_pUser(NULL) {} WiseUserDelegator(WiseUser* pUser) : m_pUser(pUser) {} public: inline WiseCharacter* GetSelectedCharacter() { if(m_pUser) return m_pUser->GetSelectedCharacter(); return NULL; } inline void SelectCharacter(DWORD dwIdx) { if(m_pUser) m_pUser->SelectCharacter(dwIdx); } void OnMsg(sSIG_MSG* pSIG_MSG) { if(m_pUser) m_pUser->OnMsg(pSIG_MSG); } private: WiseUser* m_pUser; }; //¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦¬¦´ // WiseCharacter* WiseUser::GetSelectedCharacter() { return m_pSelectedCharacter; } void WiseUser::SelectCharacter(DWORD dwIdx) { if(!(MAX_CHARACTER_LIST_NUM > dwIdx)) { m_pSelectedCharacter = NULL; return; } m_pSelectedCharacter = m_pCharacters[dwIdx]; }