MMatchRuleQuest.h
00001 #ifndef _MMATCHRULEQUEST_H 00002 #define _MMATCHRULEQUEST_H 00003 00004 #include "MMatchRule.h" 00005 #include "MMatchRuleBaseQuest.h" 00006 #include "MMatchNPCObject.h" 00007 #include "MMatchQuestRound.h" 00008 00009 #ifdef _QUEST_ITEM 00010 #include "MQuestItem.h" 00011 #endif 00012 00013 00014 class MQuestLevel; 00015 00016 00017 class MQuestNPCSpawner 00018 { 00019 public: 00020 00021 }; 00022 00024 class MMatchRuleQuest : public MMatchRuleBaseQuest { 00025 private: 00027 enum COMBAT_PLAY_RESULT 00028 { 00029 CPR_PLAYING = 0, 00030 CPR_COMPLETE, 00031 CPR_FAILED 00032 }; 00033 00034 unsigned long m_nPrepareStartTime; 00035 00036 void ClearQuestLevel(); 00037 protected: 00038 MQuestLevel* m_pQuestLevel; 00039 MQuestCombatState m_nCombatState; 00040 00041 virtual void ProcessNPCSpawn(); 00042 virtual bool CheckNPCSpawnEnable(); 00043 virtual void RouteGameInfo(); 00044 virtual void RouteCompleted(); 00045 virtual void RouteFailed(); 00046 virtual void OnCompleted(); 00047 virtual void OnFailed(); 00048 virtual void DistributeReward(); 00049 00051 void RouteMapSectorStart(); 00054 void RouteMovetoPortal(const MUID& uidPlayer); 00057 void RouteReadyToNewSector(const MUID& uidPlayer); 00060 void RouteObtainQuestItem(unsigned long int nQuestItemID); 00062 void RouteCombatState(); 00064 void MakeQuestLevel(); 00067 void CombatProcess(); 00069 void MoveToNextSector(); 00071 void SetCombatState(MQuestCombatState nState); 00073 bool CheckReadytoNewSector(); 00075 COMBAT_PLAY_RESULT CheckCombatPlay(); 00077 bool CheckQuestCompleted(); 00079 void OnSectorCompleted(); 00081 void ProcessCombatPlay(); 00082 00084 void OnBeginCombatState(MQuestCombatState nState); 00086 void OnEndCombatState(MQuestCombatState nState); 00087 protected: 00088 virtual void OnBegin(); 00089 virtual void OnEnd(); 00090 virtual bool OnRun(); 00091 virtual void OnCommand(MCommand* pCommand); 00092 virtual bool OnCheckRoundFinish(); 00093 public: 00094 MMatchRuleQuest(MMatchStage* pStage); 00095 virtual ~MMatchRuleQuest(); 00096 00099 virtual void OnRequestPlayerDead(const MUID& uidVictim); 00104 virtual void OnObtainWorldItem(MMatchObject* pObj, int nItemID, int nQuestItemID); 00105 00106 void OnRequestTestSectorClear(); 00107 void OnRequestTestFinish(); 00108 00111 void OnRequestMovetoPortal(const MUID& uidPlayer); 00114 void OnReadyToNewSector(const MUID& uidPlayer); 00115 00116 #ifdef _QUEST_ITEM 00117 // MObtainQuestItemMap m_QuestItemMap; 00118 MQuestItemMap m_QuestItemMap; 00119 00120 void DistributeRewardQuestItem(); 00121 void AddQuestItem( MQuestItem* pQuestItem ); 00122 #endif 00123 }; 00124 00125 00126 #endif
MAIET entertainment