Various fixes

This commit is contained in:
Mind Rapist
2026-02-15 21:40:52 +02:00
parent fb48dbc9ce
commit 74a93ad116
9 changed files with 77 additions and 23 deletions

View File

@@ -2377,6 +2377,9 @@ void initPlayer()
PyModule_AddIntConstant(poModule, "ATTACKER_BONUS", POINT_PARTY_ATT_GRADE);
PyModule_AddIntConstant(poModule, "MAX_NUM", POINT_MAX_NUM);
////
// MR-12: Add Mall Attack speed affect
PyModule_AddIntConstant(poModule, "POINT_ATT_SPEED", POINT_ATT_SPEED);
// MR-12: -- END OF -- Add Mall Attack speed affect
PyModule_AddIntConstant(poModule, "POINT_CRITICAL_PCT", POINT_CRITICAL_PCT);
PyModule_AddIntConstant(poModule, "POINT_PENETRATE_PCT", POINT_PENETRATE_PCT);
PyModule_AddIntConstant(poModule, "POINT_MALL_ATTBONUS", POINT_MALL_ATTBONUS);

View File

@@ -10,6 +10,30 @@
void CPythonPlayer::ClearAffects()
{
PyCallClassMemberFunc(m_ppyGameWindow, "ClearAffects", Py_BuildValue("()"));
// MR-12: Deactivate all active toggle skills when affects are cleared (e.g., on death)
for (int i = 0; i < SKILL_MAX_NUM; ++i)
{
TSkillInstance & rkSkillInst = m_playerStatus.aSkill[i];
// Skip empty skill slots
if (0 == rkSkillInst.dwIndex)
continue;
CPythonSkill::TSkillData * pSkillData;
if (!CPythonSkill::Instance().GetSkillData(rkSkillInst.dwIndex, &pSkillData))
continue;
// Only deactivate toggle skills that are currently active
if (!pSkillData->IsToggleSkill())
continue;
if (!rkSkillInst.bActive)
continue;
__DeactivateSkillSlot(i);
}
// MR-12: -- END OF -- Deactivate all active toggle skills when affects are cleared (e.g., on death)
}
void CPythonPlayer::SetAffect(UINT uAffect)