void CPythonPlayer::SetSkillLevel_(DWORD dwSkillIndex, DWORD dwSkillGrade, DWORD dwSkillLevel)
{
DWORD dwSlotIndex;
if (!GetSkillSlotIndex(dwSkillIndex, &dwSlotIndex))
return;
if (dwSlotIndex >= SKILL_MAX_NUM)
return;
switch (dwSkillGrade)
{
case 0:
m_playerStatus.aSkill[dwSlotIndex].iGrade = dwSkillGrade;
m_playerStatus.aSkill[dwSlotIndex].iLevel = dwSkillLevel;
break;
case 1:
m_playerStatus.aSkill[dwSlotIndex].iGrade = dwSkillGrade;
m_playerStatus.aSkill[dwSlotIndex].iLevel = dwSkillLevel - 20 + 1;
break;
case 2:
m_playerStatus.aSkill[dwSlotIndex].iGrade = dwSkillGrade;
m_playerStatus.aSkill[dwSlotIndex].iLevel = dwSkillLevel - 30 + 1;
break;
case 3:
m_playerStatus.aSkill[dwSlotIndex].iGrade = dwSkillGrade;
m_playerStatus.aSkill[dwSlotIndex].iLevel = dwSkillLevel - 40 + 1;
break;
#ifdef ENABLE_SKILLS_LEVEL_OVER_P
case 4:
m_playerStatus.aSkill[dwSlotIndex].iGrade = dwSkillGrade;
m_playerStatus.aSkill[dwSlotIndex].iLevel = dwSkillLevel - 50 + 1;
break;
#endif
}
#ifdef ENABLE_SKILLS_LEVEL_OVER_P
const DWORD SKILL_MAX_LEVEL = 50;
#else
const DWORD SKILL_MAX_LEVEL = 40;
#endif
if (dwSkillLevel>SKILL_MAX_LEVEL)
{
m_playerStatus.aSkill[dwSlotIndex].fcurEfficientPercentage = 0.0f;
m_playerStatus.aSkill[dwSlotIndex].fnextEfficientPercentage = 0.0f;
TraceError("CPythonPlayer::SetSkillLevel(SlotIndex=%d, SkillLevel=%d)", dwSlotIndex, dwSkillLevel);
return;
}
m_playerStatus.aSkill[dwSlotIndex].fcurEfficientPercentage = LocaleService_GetSkillPower(dwSkillLevel) / 100.0f;
m_playerStatus.aSkill[dwSlotIndex].fnextEfficientPercentage = LocaleService_GetSkillPower(dwSkillLevel + 1) / 100.0f;
}
{"html5":"htmlmixed","css":"css","javascript":"javascript","php":"php","python":"python","ruby":"ruby","lua":"text\/x-lua","bash":"text\/x-sh","go":"go","c":"text\/x-csrc","cpp":"text\/x-c++src","diff":"diff","latex":"stex","sql":"sql","xml":"xml","apl":"apl","asterisk":"asterisk","c_loadrunner":"text\/x-csrc","c_mac":"text\/x-csrc","coffeescript":"text\/x-coffeescript","csharp":"text\/x-csharp","d":"d","ecmascript":"javascript","erlang":"erlang","groovy":"text\/x-groovy","haskell":"text\/x-haskell","haxe":"text\/x-haxe","html4strict":"htmlmixed","java":"text\/x-java","java5":"text\/x-java","jquery":"javascript","mirc":"mirc","mysql":"sql","ocaml":"text\/x-ocaml","pascal":"text\/x-pascal","perl":"perl","perl6":"perl","plsql":"sql","properties":"text\/x-properties","q":"text\/x-q","scala":"scala","scheme":"text\/x-scheme","tcl":"text\/x-tcl","vb":"text\/x-vb","verilog":"text\/x-verilog","yaml":"text\/x-yaml","z80":"text\/x-z80"}