8000 Fix diva home menu special talk not working by Xele02 · Pull Request #258 · Xele02/UMO · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix diva home menu special ta 8000 lk not working #258

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 29 additions & 8 deletions Unity/Assets/UMAssets/Scripts/Database/NPCCDMKJBMM.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@

using System;
using System.Collections.Generic;
using XeSys;

[System.Obsolete("Use NPCCDMKJBMM_HomeVoice", true)]
public class NPCCDMKJBMM { }
Expand All @@ -10,10 +12,10 @@ public class KLKLEALABPN
public int PPFNGGCBJKC; // 0x8
public sbyte PPEGAKEIEGM_Enabled; // 0xC
public sbyte INDDJNMPONH; // 0xD
public int NKCNHKHGJHN; // 0x10
public int CHOFDPDFPDC; // 0x14
public long PDBPFJJCADD; // 0x18
public long FDBNFFNFOND; // 0x20
public int NKCNHKHGJHN_TalkType; // 0x10
public int CHOFDPDFPDC_DivaId; // 0x14
public long PDBPFJJCADD_StartAt; // 0x18
public long FDBNFFNFOND_EndAt; // 0x20

// RVA: 0x1CB5F60 Offset: 0x1CB5F60 VA: 0x1CB5F60
//public uint CAOGDCBPBAN() { }
Expand Down Expand Up @@ -46,10 +48,29 @@ public override bool IIEMACPEEBJ(byte[] DBBGALAPFGC)
data.PPFNGGCBJKC = (int)array[i].PPFNGGCBJKC;
data.PPEGAKEIEGM_Enabled = (sbyte)JKAECBCNHAN_IsEnabled(array[i].IJEKNCDIIAE, (int)array[i].PLALNIIBLOF, 0);
data.INDDJNMPONH = (sbyte)array[i].GBJFNGCDKPM;
data.NKCNHKHGJHN = (int)array[i].CHOIMHCMAHG;
data.CHOFDPDFPDC = (int)array[i].JBFLEDKDFCO;
data.PDBPFJJCADD = array[i].PDBPFJJCADD;
data.FDBNFFNFOND = array[i].FDBNFFNFOND;
data.NKCNHKHGJHN_TalkType = (int)array[i].CHOIMHCMAHG;
data.CHOFDPDFPDC_DivaId = (int)array[i].JBFLEDKDFCO;
data.PDBPFJJCADD_StartAt = array[i].PDBPFJJCADD;
data.FDBNFFNFOND_EndAt = array[i].FDBNFFNFOND;
// UMO : Update all talk to work in current year
long prevStart = data.PDBPFJJCADD_StartAt;
if(data.PDBPFJJCADD_StartAt != 0)
{
DateTime startDate = Utility.GetLocalDateTime(data.PDBPFJJCADD_StartAt);
data.PDBPFJJCADD_StartAt = Utility.GetTargetUnixTime(DateTime.Now.Year, startDate.Month, startDate.Day, startDate.Hour, startDate.Minute, startDate.Second);
}
if(data.FDBNFFNFOND_EndAt != 0)
{
if(prevStart == 0)
{
DateTime endDate = Utility.GetLocalDateTime(data.FDBNFFNFOND_EndAt);
data.FDBNFFNFOND_EndAt = Utility.GetTargetUnixTime(DateTime.Now.Year, endDate.Month, endDate.Day, endDate.Hour, endDate.Minute, endDate.Second);
}
else
{
data.FDBNFFNFOND_EndAt = data.PDBPFJJCADD_StartAt + (data.FDBNFFNFOND_EndAt - prevStart);
}
}
CDENCMNHNGA.Add(data);
}
return true;
Expand Down
24 changes: 12 additions & 12 deletions Unity/Assets/UMAssets/Scripts/NJOOMLFFIJB.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ public static List<NJOOMLFFIJB> FKDIMODKKJD(int PDJEMLMOEPF)
{
if(voiceList[i].PPEGAKEIEGM_Enabled == 2)
{
if(voiceList[i].INDDJNMPONH == 2)
if(voiceList[i].INDDJNMPONH == (int)LGAJNFGABFK.DDAFHPDFFPI_Brithday)
{
if(time >= voiceList[i].PDBPFJJCADD && time < voiceList[i].FDBNFFNFOND && voiceList[i].CHOFDPDFPDC == PDJEMLMOEPF)
if(time >= voiceList[i].PDBPFJJCADD_StartAt && time < voiceList[i].FDBNFFNFOND_EndAt && voiceList[i].CHOFDPDFPDC_DivaId == PDJEMLMOEPF)
{
if(diva.DOAJJALOKLI_Month == date.Month)
{
Expand All @@ -41,31 +41,31 @@ public static List<NJOOMLFFIJB> FKDIMODKKJD(int PDJEMLMOEPF)
data.NEJBNCHLMNJ_Type = LGAJNFGABFK.DDAFHPDFFPI_Brithday;
data.KJBGCLPMLCG_StartAt = Utility.GetTargetUnixTime(date.Year, date.Month, date.Day, 0, 0, 0);
data.GJFPFFBAKGK_EndAt = data.KJBGCLPMLCG_StartAt + 86399;
data.NKCNHKHGJHN_TalkType = voiceList[i].NKCNHKHGJHN;
data.NKCNHKHGJHN_TalkType = voiceList[i].NKCNHKHGJHN_TalkType;
res.Add(data);
}
}
}
}
else if(voiceList[i].INDDJNMPONH == 1)
else if(voiceList[i].INDDJNMPONH == (int)LGAJNFGABFK.AJGKPBOPIJI_Limited)
{
if (time >= voiceList[i].PDBPFJJCADD && time < voiceList[i].FDBNFFNFOND && voiceList[i].CHOFDPDFPDC == PDJEMLMOEPF)
if (time >= voiceList[i].PDBPFJJCADD_StartAt && time < voiceList[i].FDBNFFNFOND_EndAt && voiceList[i].CHOFDPDFPDC_DivaId == PDJEMLMOEPF)
{
NJOOMLFFIJB data = new NJOOMLFFIJB();
data.NEJBNCHLMNJ_Type = LGAJNFGABFK.AJGKPBOPIJI_Limited;
data.KJBGCLPMLCG_StartAt = voiceList[i].PDBPFJJCADD;
data.GJFPFFBAKGK_EndAt = voiceList[i].FDBNFFNFOND;
data.NKCNHKHGJHN_TalkType = voiceList[i].NKCNHKHGJHN;
data.KJBGCLPMLCG_StartAt = voiceList[i].PDBPFJJCADD_StartAt;
data.GJFPFFBAKGK_EndAt = voiceList[i].FDBNFFNFOND_EndAt;
data.NKCNHKHGJHN_TalkType = voiceList[i].NKCNHKHGJHN_TalkType;
res.Add(data);
}
}
else if(voiceList[i].INDDJNMPONH == 0)
else if(voiceList[i].INDDJNMPONH == (int)LGAJNFGABFK.CCAPCGPIIPF_Normal)
{
NJOOMLFFIJB data = new NJOOMLFFIJB();
data.NEJBNCHLMNJ_Type = LGAJNFGABFK.CCAPCGPIIPF_Normal;
data.KJBGCLPMLCG_StartAt = voiceList[i].PDBPFJJCADD;
data.GJFPFFBAKGK_EndAt = voiceList[i].FDBNFFNFOND;
data.NKCNHKHGJHN_TalkType = voiceList[i].NKCNHKHGJHN;
data.KJBGCLPMLCG_StartAt = voiceList[i].PDBPFJJCADD_StartAt;
data.GJFPFFBAKGK_EndAt = voiceList[i].FDBNFFNFOND_EndAt;
data.NKCNHKHGJHN_TalkType = voiceList[i].NKCNHKHGJHN_TalkType;
res.Add(data);
}
}
Expand Down
0