diff --git a/src/CommandHandler.cs b/src/CommandHandler.cs index 1a56072..9be6f1e 100644 --- a/src/CommandHandler.cs +++ b/src/CommandHandler.cs @@ -718,14 +718,14 @@ public void ToggleMana(bool? enabled = null) { Player.m_localPlayer.m_eitrRegenDelay = 0.0f; Player.m_localPlayer.m_eiterRegen = 1000f; - Player.m_localPlayer.SetMaxEitr(1000f, true); + Player.m_localPlayer.InvokePrivate("SetMaxEitr", 1000f, true); Plugin.NoMana = true; } else { Player.m_localPlayer.m_eitrRegenDelay = 1f; Player.m_localPlayer.m_eiterRegen = 5f; - Player.m_localPlayer.SetMaxEitr(100f, true); + Player.m_localPlayer.InvokePrivate("SetMaxEitr", 100f, true); Plugin.NoMana = false; } @@ -930,7 +930,7 @@ public void RepairBuildings(float radius = 50f, float health = 0f) int count = 0; - foreach (WearNTear obj in WearNTear.GetAllInstaces()) + foreach (WearNTear obj in WearNTear.GetAllInstances()) { if (Vector3.Distance(obj.gameObject.transform.position, Player.m_localPlayer.transform.position) <= radius) { @@ -1122,7 +1122,6 @@ public void SpawnPrefab(string prefab, int levelOrQuantity = 1) // I don't know if this is necessary, the base game's spawn command doesn't do it. // SkToolbox does it, seems like it's for networking reasons. I'll leave it here until I understand // whether it's necessary or not. - netView.GetZDO().SetPGWVersion(zdoManager.GetPGWVersion()); zdoManager.Set("spawn_id", netView.GetZDO().m_uid); zdoManager.Set("alive_time", ZNet.instance.GetTime().Ticks); diff --git a/src/Gungnir.cs b/src/Gungnir.cs index d6774f0..3c9fc1b 100644 --- a/src/Gungnir.cs +++ b/src/Gungnir.cs @@ -16,7 +16,7 @@ public class Gungnir : BaseUnityPlugin public const string ModName = "Gungnir"; public const string ModOrg = "zamboni"; public const string ModGUID = ModOrg + "." + ModName; - public const string ModVersion = "1.7.1"; + public const string ModVersion = "1.7.2"; private readonly Harmony m_harmony = new Harmony(ModGUID); private CommandHandler m_handler = new CommandHandler();