#ifndef _SKILL_MGR_H_ #define _SKILL_MGR_H_ #define g_SkillMgr CSkillMgr::GetInstance() #include #include #include "SkillStructure.h" // Àü¹æ ÂüÁ¶ class CDelimitedFile; class CSkillMgr : public CSingleton { public: enum _Const { MAX_SKILL_LOCKCOUNT = 5, // ½ºÅ³ÀÇ ÃÖ´ë °³¼ö (ÀÌ °³¼ö¸¸Å­ ProtoTypeÀÌ Á¸ÀçÇÑ´Ù) MAX_SKILL_LEVEL = 7, // ½ºÅ³ ·¹º§ÀÇ ÇѰè PARTY_SPELL = 0x80, // ÆÄƼ ÁÖ¹®ÀÇ ºñÆ® MAX_SKILL_PER_STATUS = 16, // æƮ¿Í ÀÎæƮÀÇ °¡Áþ¼ö NORMAL_SKILL = -1, MULTI_TARGET_SKILL = 1 // Ÿ°Ù ŸÀÔ (¹üÀ§ ¸¶¹ýÀÇ °æ¿ì Çѹø¸¸ MP¸¦ ¼Ò¸ðÇÑ´Ù) }; unsigned int GetRange(unsigned short usSkill_ID); bool LoadSkillsFromFile(const char* szFileName = 0); bool LoadSkillsFromBinary(const char* szFileNameBinary = 0); bool SaveSkillsToBinary(const char* szFileNameBinary = 0, const char* szTrashFile = 0); void ClearProtoType(); const Skill::ProtoType* GetSkillProtoType(unsigned short usSkill_ID); /* // ±âŸ ¸Þ¼Òµå #ifndef _RYL_GAME_CLIENT_ void ProcessSkillException(SKILL* pSkill, unsigned short cClass); #endif */ ~CSkillMgr(); private: CSkillMgr(); struct ProtoTypeArray { Skill::ProtoType m_ProtoTypes[MAX_SKILL_LOCKCOUNT]; inline bool operator < (ProtoTypeArray& rhs) { return m_ProtoTypes[0].m_usSkill_ID < rhs.m_ProtoTypes[0].m_usSkill_ID; } }; static const char* ms_szSkillScriptFileName; static CSkillMgr ms_this; ProtoTypeArray* m_ProtoTypeArray; size_t m_nSkillNum; // ¹®ÀÚ¿­°ú ºñ±³Çؼ­, ¾Ë¸ÂÀº ŸÀÔ °ªÀ» ¸®ÅÏÇÑ´Ù. ½ÇÆÐ½Ã nMaxTypeÀ» ¸®ÅÏÇÑ´Ù. unsigned char ReadStringToTypeValue(CDelimitedFile& DelimitedFile, const char* szColumn, const CTypeName* TypeArray, const unsigned char nMaxType); }; #endif