static void Postfix(WitchUI __instance) { if (SpellUIUpdater.scrollrect != null) { //SpellUIUpdater.scrollrect.verticalNormalizedPosition = 1; } }
static void Postfix(WitchUI __instance) { bool anySpellsAvailable = false; System.Reflection.FieldInfo fieldInfo = typeof(WitchUI).GetField("witch", BindingFlags.NonPublic | BindingFlags.Instance); WitchHut witch = (WitchHut)fieldInfo.GetValue(__instance); fieldInfo = typeof(WitchHut).GetField("spellData", BindingFlags.NonPublic | BindingFlags.Instance); ICollection spellDataCollection = (ICollection)fieldInfo.GetValue(witch); int spellDataCount = 0; foreach (object spellData in spellDataCollection) { spellDataCount += 1; } if (spellDataCount == __instance.spellList.transform.childCount) { for (int spellIndex = 0; spellIndex < spellDataCount; spellIndex++) { SpellDataCustom spellDataCustom = witch.GetSpellData(spellIndex) as SpellDataCustom; if (spellDataCustom != null) { bool spellButtonsActive = witch.relationship >= spellDataCustom.relationship; if (!spellButtonsActive) { } __instance.spellList.transform.GetChild(spellIndex).gameObject.SetActive(spellButtonsActive); if (spellButtonsActive) { anySpellsAvailable = true; } } } if (anySpellsAvailable) { __instance.spellContainer.gameObject.SetActive(true); } } }
static void Postfix(WitchUI __instance) { SpellUIUpdater.UpdateContentSize(__instance.spellList); }
static void Postfix(WitchUI __instance) { SpellUIUpdater.UpdateUI(__instance.spellList); GameUI.inst.witchUI.RefreshAvailableSpells(); }