2022-03-05 12:44:06 +02:00
# ifndef __INC_METIN_II_GAME_CSkillManager_H__
# define __INC_METIN_II_GAME_CSkillManager_H__
2022-03-06 00:01:03 +02:00
# include <libpoly/include/Poly.h>
2022-03-05 12:44:06 +02:00
enum ESkillFlags
{
SKILL_FLAG_ATTACK = ( 1 < < 0 ) , // <20> <> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD>
SKILL_FLAG_USE_MELEE_DAMAGE = ( 1 < < 1 ) , // <20> ⺻ <20> и<EFBFBD> Ÿ<> <C5B8> ġ<EFBFBD> <C4A1> b <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD>
SKILL_FLAG_COMPUTE_ATTGRADE = ( 1 < < 2 ) , // <20> <> <EFBFBD> ݵ<EFBFBD> <DDB5> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> Ѵ <EFBFBD>
SKILL_FLAG_SELFONLY = ( 1 < < 3 ) , // <20> ڽſ <DABD> <C5BF> Ը<EFBFBD> <20> <> <20> <> <20> <> <EFBFBD> <EFBFBD>
SKILL_FLAG_USE_MAGIC_DAMAGE = ( 1 < < 4 ) , // <20> ⺻ <20> <> <EFBFBD> <EFBFBD> Ÿ<> <C5B8> ġ<EFBFBD> <C4A1> b <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD>
SKILL_FLAG_USE_HP_AS_COST = ( 1 < < 5 ) , // HP<48> <50> SP<53> <50> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD>
SKILL_FLAG_COMPUTE_MAGIC_DAMAGE = ( 1 < < 6 ) ,
SKILL_FLAG_SPLASH = ( 1 < < 7 ) ,
SKILL_FLAG_GIVE_PENALTY = ( 1 < < 8 ) , // <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> õ<EFBFBD> <C3B5> <EFBFBD> (3<> <33> ) 2<> <32> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> ´ <DEB4> .
SKILL_FLAG_USE_ARROW_DAMAGE = ( 1 < < 9 ) , // <20> ⺻ ȭ<> <C8AD> Ÿ<> <C5B8> ġ<EFBFBD> <C4A1> b <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD>
SKILL_FLAG_PENETRATE = ( 1 < < 10 ) , // <20> <> <EFBFBD> <EFBFBD> <EEB9AB>
SKILL_FLAG_IGNORE_TARGET_RATING = ( 1 < < 11 ) , // <20> <> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD>
SKILL_FLAG_SLOW = ( 1 < < 12 ) , // <20> <> <EFBFBD> ο <EFBFBD> <20> <> <EFBFBD> <EFBFBD>
SKILL_FLAG_STUN = ( 1 < < 13 ) , // <20> <> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD>
SKILL_FLAG_HP_ABSORB = ( 1 < < 14 ) , // HP <20> <> <EFBFBD> <EFBFBD>
SKILL_FLAG_SP_ABSORB = ( 1 < < 15 ) , // SP <20> <> <EFBFBD> <EFBFBD>
SKILL_FLAG_FIRE_CONT = ( 1 < < 16 ) , // FIRE <20> <> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
SKILL_FLAG_REMOVE_BAD_AFFECT = ( 1 < < 17 ) , // <20> <> <EFBFBD> <EFBFBD> ȿ<EFBFBD> <C8BF> <20> <> <EFBFBD> <EFBFBD>
SKILL_FLAG_REMOVE_GOOD_AFFECT = ( 1 < < 18 ) , // <20> <> <EFBFBD> <EFBFBD> ȿ<EFBFBD> <C8BF> <20> <> <EFBFBD> <EFBFBD>
SKILL_FLAG_CRUSH = ( 1 < < 19 ) , // <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD>
SKILL_FLAG_POISON = ( 1 < < 20 ) , // <20> <> <20> <> <EFBFBD> <EFBFBD>
SKILL_FLAG_TOGGLE = ( 1 < < 21 ) , // <20> <> <EFBFBD> <EFBFBD>
SKILL_FLAG_DISABLE_BY_POINT_UP = ( 1 < < 22 ) , // <20> <> <EFBFBD> <20> ø<EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> .
SKILL_FLAG_CRUSH_LONG = ( 1 < < 23 ) , // <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> ָ<EFBFBD> <20> <> <EFBFBD> <EFBFBD>
SKILL_FLAG_WIND = ( 1 < < 24 ) , // <20> ٶ<EFBFBD> <20> Ӽ<EFBFBD>
SKILL_FLAG_ELEC = ( 1 < < 25 ) , // <20> <> <EFBFBD> <EFBFBD> <20> Ӽ<EFBFBD>
SKILL_FLAG_FIRE = ( 1 < < 26 ) , // <20> <> <20> Ӽ<EFBFBD>
} ;
enum
{
SKILL_PENALTY_DURATION = 3 ,
SKILL_TYPE_HORSE = 5 ,
} ;
enum ESkillIndexes
{
SKILL_RESERVED = 0 ,
// <20> <> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <20> 迭
// A
SKILL_SAMYEON = 1 , // <20> ↓<EFBFBD> <EFBFAC> (<28> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> )
SKILL_PALBANG , // <20> ȹ<EFBFBD> dz<EFBFBD> <C7B3>
// S
SKILL_JEONGWI , // <20> <> <EFBFBD> <EFBFBD> ȥ
SKILL_GEOMKYUNG , // <20> ˰<EFBFBD>
SKILL_TANHWAN , // źȯ<C5BA> <C8AF>
// <20> <> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <20> 迭
// A
SKILL_GIGONGCHAM = 16 , // <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
SKILL_GYOKSAN , // <20> ݻ<EFBFBD> Ÿ<EFBFBD> <C5B8>
SKILL_DAEJINGAK , // <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
// S
SKILL_CHUNKEON , // õ<> <C3B5> <EFBFBD> <EFBFBD>
SKILL_GEOMPUNG , // <20> <> dz
// <20> ڰ<EFBFBD> <20> ϻ<EFBFBD> <20> 迭
// A
SKILL_AMSEOP = 31 , // <20> Ͻ<EFBFBD>
SKILL_GUNGSIN , // <20> ý<EFBFBD> ź<EFBFBD> <C5BA>
SKILL_CHARYUN , // <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
// S
SKILL_EUNHYUNG , // <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
SKILL_SANGONG , // <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
// <20> ڰ<EFBFBD> <20> ü<EFBFBD> <20> 迭
// A
SKILL_YEONSA = 46 , // <20> <> <EFBFBD> <EFBFBD>
SKILL_KWANKYEOK , // <20> <> <EFBFBD> ݼ<EFBFBD>
SKILL_HWAJO , // ȭ<> <C8AD> <EFBFBD> <EFBFBD>
// S
SKILL_GYEONGGONG , // <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
SKILL_GIGUNG , // <20> <> <EFBFBD> <EFBFBD>
// <20> <> <EFBFBD> <EFBFBD> <20> <>
// A
SKILL_SWAERYUNG = 61 , // <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
SKILL_YONGKWON , // <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
// S
SKILL_GWIGEOM , // <20> Ͱ<EFBFBD>
SKILL_TERROR , // <20> <> <EFBFBD> <EFBFBD>
SKILL_JUMAGAP , // <20> ָ<EFBFBD> <D6B8> <EFBFBD>
SKILL_PABEOB , // <20> Ĺ<EFBFBD> <C4B9> <EFBFBD>
// <20> <> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD>
// A
SKILL_MARYUNG = 76 , // <20> <> <EFBFBD> <EFBFBD>
SKILL_HWAYEOMPOK , // ȭ<> <C8AD> <EFBFBD> <EFBFBD>
SKILL_MUYEONG , // <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
// S
SKILL_MANASHILED , // <20> <> <EFBFBD> ż<EFBFBD> ȣ
SKILL_TUSOK , // <20> <> <EFBFBD> Ӹ<EFBFBD> <D3B8> <EFBFBD>
SKILL_MAHWAN , // <20> <> ȯ<EFBFBD> <C8AF>
// <20> <> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD>
// A
SKILL_BIPABU = 91 ,
SKILL_YONGBI , // <20> <> <EFBFBD> <EFBFBD> <F1B1A4BB> <EFBFBD>
SKILL_PAERYONG , // <20> з泪<D0B7> ѹ<EFBFBD>
// S
//SKILL_BUDONG, // <20> ε<EFBFBD> <CEB5> ں<EFBFBD>
SKILL_HOSIN , // ȣ <> <C8A3>
SKILL_REFLECT , // <20> <> ȣ
SKILL_GICHEON , // <20> <> õ<EFBFBD> <C3B5> <EFBFBD> <EFBFBD>
// <20> <> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD>
// A
SKILL_NOEJEON = 106 , // <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
SKILL_BYEURAK , // <20> <> <EFBFBD> <EFBFBD>
SKILL_CHAIN , // ü<> ζ<EFBFBD> <CEB6> <EFBFBD> Ʈ<EFBFBD> <C6AE>
// S
SKILL_JEONGEOP , // <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
SKILL_KWAESOK , // <20> ̵<EFBFBD> <CCB5> ӵ<EFBFBD> <D3B5> <EFBFBD>
SKILL_JEUNGRYEOK , // <20> <> <EFBFBD> ¼<EFBFBD>
// <20> <> <EFBFBD> <EFBFBD> <20> <> ų
// 7
SKILL_7_A_ANTI_TANHWAN = 112 ,
SKILL_7_B_ANTI_AMSEOP ,
SKILL_7_C_ANTI_SWAERYUNG ,
SKILL_7_D_ANTI_YONGBI ,
// 8
SKILL_8_A_ANTI_GIGONGCHAM ,
SKILL_8_B_ANTI_YEONSA ,
SKILL_8_C_ANTI_MAHWAN ,
SKILL_8_D_ANTI_BYEURAK ,
// <20> <> <EFBFBD> <EFBFBD> <20> <> ų
SKILL_LEADERSHIP = 121 , // <20> <> <EFBFBD> ַ<EFBFBD>
SKILL_COMBO = 122 , // <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
SKILL_CREATE = 123 , // <20> <> <EFBFBD> <EFBFBD>
SKILL_MINING = 124 ,
SKILL_LANGUAGE1 = 126 , // <20> ż<EFBFBD> <C5BC> <EFBFBD> <20> ɷ<EFBFBD>
SKILL_LANGUAGE2 = 127 , // õ<> <C3B5> <EFBFBD> <EFBFBD> <20> ɷ<EFBFBD>
SKILL_LANGUAGE3 = 128 , // <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> ɷ<EFBFBD>
SKILL_POLYMORPH = 129 , // <20> а <EFBFBD>
SKILL_HORSE = 130 , // <20> ¸ <EFBFBD> <20> <> ų
SKILL_HORSE_SUMMON = 131 , // <20> <> <20> <> ȯ <20> <> ų
SKILL_HORSE_WILDATTACK = 137 , // <20> <> <EFBFBD> <EFBFBD>
SKILL_HORSE_CHARGE = 138 , // <20> <> <EFBFBD> <EFBFBD>
SKILL_HORSE_ESCAPE = 139 , // Ż<> <C5BB>
SKILL_HORSE_WILDATTACK_RANGE = 140 , // <20> <> <EFBFBD> <EFBFBD> (Ȱ)
SKILL_ADD_HP = 141 , // <20> <> <EFBFBD> <EFBFBD>
SKILL_RESIST_PENETRATE = 142 , // ö<> <C3B6>
GUILD_SKILL_START = 151 ,
GUILD_SKILL_EYE = 151 ,
GUILD_SKILL_BLOOD = 152 ,
GUILD_SKILL_BLESS = 153 ,
GUILD_SKILL_SEONGHWI = 154 ,
GUILD_SKILL_ACCEL = 155 ,
GUILD_SKILL_BUNNO = 156 ,
GUILD_SKILL_JUMUN = 157 ,
GUILD_SKILL_TELEPORT = 158 ,
GUILD_SKILL_DOOR = 159 ,
GUILD_SKILL_END = 162 ,
GUILD_SKILL_COUNT = GUILD_SKILL_END - GUILD_SKILL_START + 1 ,
} ;
class CSkillProto
{
public :
char szName [ 64 ] ;
DWORD dwVnum ; // <20> <> ȣ
DWORD dwType ; // 0: <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> , 1: <20> <> <EFBFBD> <EFBFBD> , 2: <20> ڰ<EFBFBD> , 3: <20> <> <EFBFBD> <EFBFBD> , 4: <20> <> <EFBFBD> <EFBFBD>
BYTE bMaxLevel ; // <20> ִ<EFBFBD> <20> <> <EFBFBD> õ<EFBFBD>
BYTE bLevelLimit ; // <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
int iSplashRange ; // <20> <> <EFBFBD> ÷<EFBFBD> <C3B7> <EFBFBD> <20> Ÿ<EFBFBD> <20> <> <EFBFBD> <EFBFBD>
BYTE bPointOn ; // <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <20> <> Ű<EFBFBD> °<EFBFBD> ? (Ÿ<> <C5B8> ġ, MAX HP, HP REGEN <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> )
CPoly kPointPoly ; // <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD>
CPoly kSPCostPoly ; // <20> <> <EFBFBD> <EFBFBD> SP <20> <> <EFBFBD> <EFBFBD>
CPoly kDurationPoly ; // <20> <> <EFBFBD> <EFBFBD> <20> ð<EFBFBD> <20> <> <EFBFBD> <EFBFBD>
CPoly kDurationSPCostPoly ; // <20> <> <EFBFBD> <EFBFBD> SP <20> <> <EFBFBD> <EFBFBD>
CPoly kCooldownPoly ; // <20> <> <EFBFBD> ٿ<EFBFBD> <20> ð<EFBFBD> <20> <> <EFBFBD> <EFBFBD>
CPoly kMasterBonusPoly ; // <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> ʽ <EFBFBD> <20> <> <EFBFBD> <EFBFBD>
CPoly kSplashAroundDamageAdjustPoly ; // <20> <> <EFBFBD> ÷<EFBFBD> <C3B7> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD>
DWORD dwFlag ; // <20> <> ų<EFBFBD> ɼ<EFBFBD>
DWORD dwAffectFlag ; // <20> <> ų<EFBFBD> <C5B3> <20> <> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> Ǵ<EFBFBD> Affect
BYTE bLevelStep ; // <20> ѹ<EFBFBD> <D1B9> <EFBFBD> <20> ø<EFBFBD> <C3B8> µ<EFBFBD> <20> ʿ<EFBFBD> <CABF> <EFBFBD> <20> <> ų <20> <> <EFBFBD> <EFBFBD> Ʈ <20> <>
DWORD preSkillVnum ; // <20> <> <EFBFBD> <EFBFBD> <EFBFBD> µ<EFBFBD> <20> ʿ<EFBFBD> <CABF> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> ų
BYTE preSkillLevel ; // <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> ų<EFBFBD> <C5B3> <20> <> <EFBFBD> <EFBFBD>
long lMaxHit ;
BYTE bSkillAttrType ;
// 2<> <32> <20> <> <EFBFBD> <EFBFBD>
BYTE bPointOn2 ;
CPoly kPointPoly2 ;
CPoly kDurationPoly2 ;
DWORD dwFlag2 ;
DWORD dwAffectFlag2 ;
DWORD dwTargetRange ;
bool IsChargeSkill ( )
{
return dwVnum = = SKILL_TANHWAN | | dwVnum = = SKILL_HORSE_CHARGE ;
}
// 3<> <33> <20> <> <EFBFBD> <EFBFBD>
BYTE bPointOn3 ;
CPoly kPointPoly3 ;
CPoly kDurationPoly3 ;
CPoly kGrandMasterAddSPCostPoly ;
void SetPointVar ( const std : : string & strName , double dVar ) ;
void SetDurationVar ( const std : : string & strName , double dVar ) ;
void SetSPCostVar ( const std : : string & strName , double dVar ) ;
} ;
class CSkillManager : public singleton < CSkillManager >
{
public :
CSkillManager ( ) ;
virtual ~ CSkillManager ( ) ;
bool Initialize ( TSkillTable * pTab , int iSize ) ;
CSkillProto * Get ( DWORD dwVnum ) ;
CSkillProto * Get ( const char * c_pszSkillName ) ;
protected :
std : : map < DWORD , CSkillProto * > m_map_pkSkillProto ;
} ;
# endif