Move git root from Client/ to src/ to track all source code: - Client: Game client source (moved to Client/Client/) - Server: Game server source - GameTools: Development tools - CryptoSource: Encryption utilities - database: Database scripts - Script: Game scripts - rylCoder_16.02.2008_src: Legacy coder tools - GMFont, Game: Additional resources 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
70 lines
1.8 KiB
C++
70 lines
1.8 KiB
C++
#ifndef _SKILL_MGR_H_
|
|
#define _SKILL_MGR_H_
|
|
|
|
#define g_SkillMgr CSkillMgr::GetInstance()
|
|
#include <limits>
|
|
#include <Pattern/Singleton.h>
|
|
#include "SkillStructure.h"
|
|
|
|
// 전방 참조
|
|
class CDelimitedFile;
|
|
|
|
|
|
class CSkillMgr : public CSingleton<CSkillMgr>
|
|
{
|
|
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 |