Skip to content

Commit

Permalink
Merge pull request #123 from Xele02/107-042-scene-switch-show-invalid…
Browse files Browse the repository at this point in the history
…-text

Fix live skill display bug in scene comparison + missing popup. Fix #107
  • Loading branch information
Xele02 authored Sep 9, 2023
2 parents b762856 + 61cf9fa commit 7a6d378
Show file tree
Hide file tree
Showing 4 changed files with 110 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,8 @@ protected void SetLoaded()
//// RVA: 0x1B5229C Offset: 0x1B5229C VA: 0x1B5229C
private void OnPushDetails(ComparisonSkillInfo info, int index)
{
TodoLogger.LogNotImplemented("OnPushDetails");
if(OnPushDetailsEvent != null)
OnPushDetailsEvent(info, index);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -218,19 +218,24 @@ public void SetSkillMask(SkillMask mask)
//// RVA: 0x1B570C4 Offset: 0x1B570C4 VA: 0x1B570C4
private void OnPushDetails()
{
TodoLogger.LogNotImplemented("OnPushDetails");
if(!m_descDetailsImage[0].enabled)
return;
OnPushDetailsEvent(this, 0);
}

//// RVA: 0x1B5719C Offset: 0x1B5719C VA: 0x1B5719C
private void OnPushDetails2()
{
TodoLogger.LogNotImplemented("OnPushDetails2");
if(!m_descDetailsImage[1].enabled)
return;
OnPushDetailsEvent(this, 1);
}

//// RVA: 0x1B57274 Offset: 0x1B57274 VA: 0x1B57274
private void OnPushRegulation()
{
TodoLogger.LogNotImplemented("OnPushRegulation");
if(OnPushRegulationEvent != null)
OnPushRegulationEvent();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -213,14 +213,14 @@ protected override void UpdateSkillText(int pos, int index)
{
SetSkillLevel(pos, sceneInfo.DDEDANKHHPN_SkillLevel, 0);
SetSkillRank(pos, (SkillRank.Type)sceneInfo.DHEFMEGKKDN_CenterSkillRank, 0);
SetSkillDescription(pos, sceneInfo.IHLINMFMCDN_GetCenterSkillDesc(false));
SetSkillDescription(pos, sceneInfo.IHLINMFMCDN_GetCenterSkillDesc(false), 0);
m_skillInfos[pos].RegulationButton.Setup(musicId, RegulationButton.Type.Center, sceneInfo);
resetDisplay = false;
if(skillId2 > 0)
{
SetSkillLevel(pos, sceneInfo.DDEDANKHHPN_SkillLevel, 1);
SetSkillRank(pos, (SkillRank.Type)sceneInfo.FFDCGHDNDFJ_CenterSkillRank2, 1);
SetSkillDescription(pos, sceneInfo.IHLINMFMCDN_GetCenterSkillDesc(true));
SetSkillDescription(pos, sceneInfo.IHLINMFMCDN_GetCenterSkillDesc(true), 1);
SetSkillCrossFade(pos, true);
}
}
Expand All @@ -235,7 +235,7 @@ protected override void UpdateSkillText(int pos, int index)
m_isDisp2ndCenterSkill = skillId == skillId2;
SetSkillLevel(pos, sceneInfo.DDEDANKHHPN_SkillLevel, 0);
SetSkillRank(pos, (SkillRank.Type)(m_isDisp2ndCenterSkill ? sceneInfo.FFDCGHDNDFJ_CenterSkillRank2 : sceneInfo.DHEFMEGKKDN_CenterSkillRank), 0);
SetSkillDescription(pos, sceneInfo.IHLINMFMCDN_GetCenterSkillDesc(false));
SetSkillDescription(pos, sceneInfo.IHLINMFMCDN_GetCenterSkillDesc(false), 0);
resetDisplay = false;
m_skillInfos[pos].RegulationButton.Setup(musicId, RegulationButton.Type.Center, sceneInfo);
}
Expand Down Expand Up @@ -280,15 +280,15 @@ protected override void UpdateSkillText(int pos, int index)
{
SetSkillLevel(pos, sceneInfo.AADFFCIDJCB_LiveSkillLevel, 0);
SetSkillRank(pos, (SkillRank.Type)sceneInfo.OAHMFMJIENM_LiveSkillRank, 0);
SetSkillDescription(pos, sceneInfo.KDGACEJPGFG_GetLiveSkillDesc(false));
SetSkillDescription(pos, sceneInfo.KDGACEJPGFG_GetLiveSkillDesc(false), 0);
resetDisplay = false;
m_skillInfos[pos].RegulationButton.Setup(musicId, RegulationButton.Type.Live, sceneInfo);
}
if(skillId2 > 0 && sceneInfo.BLPHPMBFIEI_LiveSkillHasSwitchPatternCond())
{
SetSkillLevel(pos, sceneInfo.AADFFCIDJCB_LiveSkillLevel, 1);
SetSkillRank(pos, (SkillRank.Type)sceneInfo.ELNJADBILOM_LiveSkillRank2, 1);
SetSkillDescription(pos, sceneInfo.KDGACEJPGFG_GetLiveSkillDesc(true));
SetSkillDescription(pos, sceneInfo.KDGACEJPGFG_GetLiveSkillDesc(true), 1);
SetSkillCrossFade(pos, true);
}
mask = ComparisonSkillInfo.SkillMask.None;
Expand All @@ -304,7 +304,7 @@ protected override void UpdateSkillText(int pos, int index)
}
SetSkillLevel(pos, sceneInfo.AADFFCIDJCB_LiveSkillLevel, 0);
SetSkillRank(pos, (SkillRank.Type)(m_isDisp2ndLiveSkill ? sceneInfo.ELNJADBILOM_LiveSkillRank2 : sceneInfo.OAHMFMJIENM_LiveSkillRank), 0);
SetSkillDescription(pos, sceneInfo.KDGACEJPGFG_GetLiveSkillDesc(m_isDisp2ndLiveSkill));
SetSkillDescription(pos, sceneInfo.KDGACEJPGFG_GetLiveSkillDesc(m_isDisp2ndLiveSkill), 0);
m_skillInfos[pos].RegulationButton.Setup(musicId, RegulationButton.Type.Live, sceneInfo);
resetDisplay = false;
}
Expand Down Expand Up @@ -356,7 +356,46 @@ private GCIJNCFDNON_SceneInfo GetSlotSceneData(SkillDiapIndex index)
//// RVA: 0x17D5E38 Offset: 0x17D5E38 VA: 0x17D5E38
private void OnShowSkillDetials(ComparisonSkillInfo info, int index)
{
TodoLogger.LogNotImplemented("OnShowSkillDetials");
GCIJNCFDNON_SceneInfo scene = GetSlotSceneData((SkillDiapIndex)m_skillDispIndex);
if(scene == null)
return;
string name = "";
string desc = "";
if(m_skillDispIndex < 2 || m_skillDispIndex > 4)
{
if(m_skillDispIndex == 1)
{
name = scene.ILCLGGPHHJO_ActiveSkillName;
desc = scene.PCMEMHPDABG_GetActiveSkillDesc();
}
else if(m_skillDispIndex == 0)
{
if(index < 1 && !m_isDisp2ndCenterSkill)
{
name = scene.PFHJFIHGCKP_CenterSkillName1;
desc = scene.IHLINMFMCDN_GetCenterSkillDesc(false);
}
else
{
name = scene.EFELCLMJEOL_CenterSkillName2;
desc = scene.IHLINMFMCDN_GetCenterSkillDesc(true);
}
}
}
else
{
if(index < 1 || !m_isDisp2ndLiveSkill)
{
name = scene.NDPPEMCHKHA_LiveSkillName1;
desc = scene.KDGACEJPGFG_GetLiveSkillDesc(false);
}
else if(index == 1)
{
name = scene.LNLECENGMKK_LiveSkillName2;
name = scene.KDGACEJPGFG_GetLiveSkillDesc(true);
}
}
MenuScene.Instance.UnitSaveWindowControl.ShowSkillWindow(name, desc);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ protected override void UpdateSkillText(int pos, int index)
{
SetSkillLevel(pos, m_sceneData.AADFFCIDJCB_LiveSkillLevel, 0);
SetSkillRank(pos, (SkillRank.Type)m_sceneData.OAHMFMJIENM_LiveSkillRank, 0);
SetSkillDescription(pos, m_sceneData.KDGACEJPGFG_GetLiveSkillDesc(false));
SetSkillDescription(pos, m_sceneData.KDGACEJPGFG_GetLiveSkillDesc(false), 0);
m_skillInfos[pos].RegulationButton.Setup(m_musicId, RegulationButton.Type.Live, m_sceneData);
needResetDisplay = false;
}
Expand All @@ -338,8 +338,8 @@ protected override void UpdateSkillText(int pos, int index)
SetSkillLevel(pos, m_sceneData.AADFFCIDJCB_LiveSkillLevel, 1);
SetSkillRank(pos, (SkillRank.Type)m_sceneData.ELNJADBILOM_LiveSkillRank2, 1);
SetSkillDescription(pos, m_sceneData.KDGACEJPGFG_GetLiveSkillDesc(true), 1);
SetSkillCrossFade(pos, true);
}
SetSkillCrossFade(pos, true);
if (!needResetDisplay)
{
SetSkillMisMatchMask(pos, (SkillDiapIndex)index);
Expand Down Expand Up @@ -384,7 +384,7 @@ protected override void UpdateSkillText(int pos, int index)
}
else
{
if(index != 0)
if(index == 0)
{
m_isDisp2ndCenterSkill = false;
if (m_sceneData != null)
Expand All @@ -405,7 +405,7 @@ protected override void UpdateSkillText(int pos, int index)
{
SetSkillLevel(pos, m_sceneData.DDEDANKHHPN_SkillLevel, 1);
SetSkillRank(pos, (SkillRank.Type)m_sceneData.FFDCGHDNDFJ_CenterSkillRank2, 1);
SetSkillDescription(pos, m_sceneData.IHLINMFMCDN_GetCenterSkillDesc(true));
SetSkillDescription(pos, m_sceneData.IHLINMFMCDN_GetCenterSkillDesc(true), 1);
SetSkillCrossFade(pos, true);
}
SetSkillMisMatchMask(pos, (SkillDiapIndex)index);
Expand Down Expand Up @@ -499,7 +499,56 @@ private void SetSkillMisMatchMask(int pos, SkillDiapIndex index)
//// RVA: 0x15A3050 Offset: 0x15A3050 VA: 0x15A3050
private void OnShowSkillDetials(ComparisonSkillInfo info, int index)
{
TodoLogger.LogNotImplemented("OnShowSkillDetials");
if(m_sceneData == null)
return;
string name = "";
string desc = "";
int idx = 0;
if(m_styleIndex == 5)
{
idx = m_skillDispIndex;
}
else
{
idx = 0;
for(int i = 0; i < m_skillInfos.Length; i++)
{
if(m_skillInfos[i] == info)
idx = i;
}
}
if(idx == 2)
{
if(index < 1 || !m_isDisp2ndLiveSkill)
{
name = m_sceneData.NDPPEMCHKHA_LiveSkillName1;
desc = m_sceneData.KDGACEJPGFG_GetLiveSkillDesc(false);
}
else if(index == 1)
{
name = m_sceneData.LNLECENGMKK_LiveSkillName2;
desc = m_sceneData.KDGACEJPGFG_GetLiveSkillDesc(true);
}
}
else if(idx == 1)
{
name = m_sceneData.ILCLGGPHHJO_ActiveSkillName;
desc = m_sceneData.PCMEMHPDABG_GetActiveSkillDesc();
}
else if(idx == 0)
{
if(index < 1 && !m_isDisp2ndCenterSkill)
{
name = m_sceneData.PFHJFIHGCKP_CenterSkillName1;
desc = m_sceneData.IHLINMFMCDN_GetCenterSkillDesc(false);
}
else
{
name = m_sceneData.EFELCLMJEOL_CenterSkillName2;
desc = m_sceneData.IHLINMFMCDN_GetCenterSkillDesc(true);
}
}
MenuScene.Instance.UnitSaveWindowControl.ShowSkillWindow(name, desc);
}
}
}

0 comments on commit 7a6d378

Please sign in to comment.