Chrono Ark

Chrono Ark

古明地觉
Pre-indexing to improve performance
Adding preindexing to the passive skill and other skills that require filtering though the entire skill list will improve performance dramatically. Like this:

public class P_GMDJ : Passive_Char, IP_PlayerTurn
{
// Token: 0x0600001C RID: 28
public override void Init()
{
base.Init();
this.OnePassive = true;
if (P_GMDJ.indexedSkills.Count == 0)
{
this.PreIndexSkills();
}
}

// Token: 0x06000036 RID: 54
private void PreIndexSkills()
{
foreach (GDESkillData gdeskillData in PlayData.ALLSKILLLIST)
{
if (gdeskillData.User != "" && !gdeskillData.NoDrop && !gdeskillData.Lock)
{
GDECharacterData gdecharacterData = new GDECharacterData(gdeskillData.User);
if (!(gdeskillData.KeyID == GDEItemKeys.Skill_S_Phoenix_6) && !(gdeskillData.Key == GDEItemKeys.Skill_S_Phoenix_6) && gdecharacterData != null && Misc.IsUseableCharacter(gdecharacterData.Key))
{
P_GMDJ.indexedSkills.Add(gdeskillData);
}
}
}
foreach (GDESkillData gdeskillData2 in PlayData.ALLRARESKILLLIST)
{
if (gdeskillData2.User != "" && !gdeskillData2.NoDrop && !gdeskillData2.Lock)
{
GDECharacterData gdecharacterData2 = new GDECharacterData(gdeskillData2.User);
if (gdecharacterData2 != null && Misc.IsUseableCharacter(gdecharacterData2.Key))
{
P_GMDJ.indexedSkills.Add(gdeskillData2);
}
}
}
}
< >
Showing 1-2 of 2 comments
蕾米莉亚  [developer] Sep 15, 2024 @ 8:52pm 
You can directly modify and publish it, just indicate the author
蕾米莉亚  [developer] Sep 15, 2024 @ 8:58pm 
My computer broke down before and I couldn't save the source files
< >
Showing 1-2 of 2 comments
Per page: 1530 50