CSCommon: MBaseQuest.h 소스 파일

MAIET

MBaseQuest.h

00001 #ifndef _MBASEQUEST_H
00002 #define _MBASEQUEST_H
00003 
00004 // 이곳에는 퀘스트관련 클라이언트와 서버가 공통으로 사용하는 것을 넣도록 한다.
00006 
00007 #include "MQuestNPC.h"
00008 #include "MQuestMap.h"
00009 #include "MQuestScenario.h"
00010 #include "MSurvivalMap.h"
00011 #include "MQuestDropTable.h"
00012 
00013 #include <map>
00014 using namespace std;
00015 
00016 
00017 struct MQuestNPCInfo;
00018 
00019 
00022 class MBaseQuest
00023 {
00024 private:
00025     bool m_bCreated;
00026 protected:
00027     
00028     MQuestMapCatalogue          m_MapCatalogue;                             
00029     MQuestNPCCatalogue          m_NPCCatalogue;                             
00030     MSurvivalMapCatalogue       m_SurvivalMapCatalogue;                     
00031     MQuestDropTable             m_DropTable;                                
00032     virtual bool OnCreate();                                                
00033     virtual void OnDestroy();                                               
00034 
00035     void ProcessNPCDropTableMatching();     // npc.xml의 Droptable을 매칭시킨다.
00036 public:
00037     MBaseQuest();                                                           
00038     virtual ~MBaseQuest();                                                  
00039     inline MQuestMapSectorInfo*     GetSectorInfo(int nSectorID);           
00040     inline MQuestNPCInfo*           GetNPCInfo(MQUEST_NPC nNPC);            
00041     inline MQuestNPCInfo*           GetNPCPageInfo( int nPage);             
00042     inline MSurvivalMapInfo*        GetSurvivalMapInfo(MSURVIVAL_MAP nMap); 
00043     inline MQuestDropTable*         GetDropTable();                         
00044     bool Create();                                                          
00045     void Destroy();                                                         
00046 };
00047 
00048 
00049 
00050 
00051 
00052 // inline functions //////////////////////////////////////////////////////////////////////////
00053 inline MQuestMapSectorInfo* MBaseQuest::GetSectorInfo(int nSectorID)
00054 {
00055     return m_MapCatalogue.GetSectorInfo(nSectorID);
00056 }
00057 
00058 inline MQuestNPCInfo* MBaseQuest::GetNPCInfo(MQUEST_NPC nNPC)
00059 {
00060     return m_NPCCatalogue.GetInfo(nNPC);
00061 }
00062 
00063 inline MQuestNPCInfo* MBaseQuest::GetNPCPageInfo( int nPage)
00064 {
00065     return m_NPCCatalogue.GetPageInfo(nPage);
00066 }
00067 
00068 inline MSurvivalMapInfo* MBaseQuest::GetSurvivalMapInfo(MSURVIVAL_MAP nMap)
00069 {
00070     return m_SurvivalMapCatalogue.GetInfo(nMap);
00071 }
00072 
00073 inline MQuestDropTable* MBaseQuest::GetDropTable()
00074 {
00075     return &m_DropTable;
00076 }
00077 
00078 
00079 
00080 
00081 
00082 
00083 #endif


MAIET entertainment