MActParam.h
00001 #ifndef MACTPARAM_H 00002 #define MACTPARAM_H 00003 00004 00005 #include "MUID.h" 00006 #include <list> 00007 using namespace std; 00008 00009 class MObject; 00010 00011 00012 enum ACTPARAM_TYPE { 00013 ACTPARAM_TYPE_DAMAGE, 00014 ACTPARAM_TYPE_SKILL 00015 }; 00016 00017 00018 class MActParam { 00019 protected: 00020 ACTPARAM_TYPE m_nType; 00021 int m_nActionID; 00022 MUID m_TargetUID; 00023 00024 public: 00025 MActParam(ACTPARAM_TYPE nType) { m_nType = nType; } 00026 virtual ~MActParam() {} 00027 ACTPARAM_TYPE GetType() { return m_nType; } 00028 int GetActionID() { return m_nActionID; } 00029 void SetActionID(int nActionID) { m_nActionID = nActionID; } 00030 MObject* GetTarget(); 00031 void SetTarget(MObject* pTarget); 00032 }; 00033 typedef list<MActParam*> MActParamList; 00034 00035 00036 class MActParamDamage : public MActParam { 00037 protected: 00038 int m_nDamage; 00039 00040 public: 00041 MActParamDamage() : MActParam(ACTPARAM_TYPE_DAMAGE) {} 00042 virtual ~MActParamDamage() {} 00043 int GetDamage() { return m_nDamage; } 00044 void SetDamage(int nDamage) { m_nDamage = nDamage; } 00045 }; 00046 00047 class MActParamSkill : public MActParam { 00048 protected: 00049 int m_nSkillID; 00050 00051 public: 00052 MActParamSkill() : MActParam(ACTPARAM_TYPE_SKILL) {} 00053 virtual ~MActParamSkill() {} 00054 int GetSkillID() { return m_nSkillID; } 00055 void SetSkillID(int nSkillID) { m_nSkillID = nSkillID; } 00056 }; 00057 00058 00059 #endif
MAIET entertainment