static void Postfix(HomeSystem __instance, int ___studySkillId) { if (!Main.enabled) { return; } if (Main.settings.crossMonth) { __instance.levelUPActorLevelText.text = DateFile.instance.SetColoer(20005, DateFile.instance.dayTime + " / " + studyTime, false); } if (___studySkillId <= 0) { return; } int time = studyTime; if (Main.settings.buildingAdvanced) { BuildingEffect.isGongfa = (__instance.studySkillTyp == 17); BuildingEffect.gongfaOrSkillId = ___studySkillId; int studyNoTimeProp = BuildingEffect.getBuildingEffectValue(BuildingEffect.BuildingType.ReduceStudyTime, __instance.homeMapPartId, __instance.homeMapPlaceId, __instance.homeMapbuildingIndex); if (UnityEngine.Random.Range(0, 100) < studyNoTimeProp) { UIDate.instance.ChangeTime(false, -time); time = 0; } } if (Main.settings.crossMonth && DateFile.instance.dayTime < time) { TrunChange.setAfterCrossTime(time); UIDate.instance.ChangeTime(false, -time); } }
static void Prefix(ReadBook __instance) { int time = BuildingEffect.levelUpTime; if (!Main.enabled) { return; } if (Main.settings.buildingAdvanced) { UIDate.instance.ChangeTime(false, -BuildingEffect.levelUpReducedTime); BuildingEffect.levelUpReducedTime = 0; } if (Main.settings.crossMonth && DateFile.instance.dayTime < time) { TrunChange.setAfterCrossTime(time); UIDate.instance.ChangeTime(false, -time); } }