CSCommon: MQuestPlayer.h 소스 파일

MAIET

MQuestPlayer.h

00001 #ifndef _MQUEST_PLAYER_H
00002 #define _MQUEST_PLAYER_H
00003 
00004 
00005 #include "MMatchNPCObject.h"
00006 
00008 struct MQuestPlayerInfo
00009 {
00010     // NPC Control 관련 /////////
00011     MMatchObject*       pObject;                    
00012     unsigned long int   nNPCControlCheckSum;        
00013     MMatchNPCObjectMap  NPCObjects;                 
00014     bool                bEnableNPCControl;          
00015 
00018     int GetNPCControlScore()                        
00019     {
00020         // 지금은 그냥 조종하는 NPC 개수
00021         return (int)(NPCObjects.size());
00022     }
00023 
00024 
00025     // 퀘스트 룰 관련 ///////////
00026     bool                bMovedtoNewSector;          
00027 
00028 
00029     // 서바이벌 룰 관련 /////////
00030 
00031 
00032 
00033     // 보상 관련 ////////////////
00034     int                 nQL;                        
00035     int                 nDeathCount;                
00036     int                 nUsedPageSacriItemCount;    
00037     int                 nUsedExtraSacriItemCount;   
00038     int                 nXP;                        
00039     int                 nBP;                        
00040 
00044     void Init(MMatchObject* pObj, int a_nQL)
00045     {
00046         pObject = pObj;
00047         bEnableNPCControl = true;
00048         nNPCControlCheckSum = 0;
00049         NPCObjects.clear();
00050         bMovedtoNewSector = true;
00051 
00052         nQL = a_nQL;
00053         nDeathCount = 0;
00054         nUsedPageSacriItemCount = 0;
00055         nUsedExtraSacriItemCount = 0;
00056         nXP = 0;
00057         nBP = 0;
00058     }
00059 
00061     MQuestPlayerInfo() : nXP(0), nBP(0)
00062     {
00063         
00064     }
00065 };
00066 
00068 class MQuestPlayerManager : public map<MUID, MQuestPlayerInfo*>
00069 {
00070 private:
00071     MMatchStage* m_pStage;
00072     void AddPlayer(MUID& uidPlayer);
00073 public:
00074     MQuestPlayerManager();                                      
00075     ~MQuestPlayerManager();                                     
00076     void Create(MMatchStage* pStage);                           
00077     void Destroy();                                             
00078     void DelPlayer(MUID& uidPlayer);                            
00079     void Clear();                                               
00080     MQuestPlayerInfo* GetPlayerInfo(const MUID& uidPlayer);     
00081 };
00082 
00083 
00084 
00085 
00086 #endif


MAIET entertainment