1.0 compatibility

This commit is contained in:
Ferdinando 2026-09-10 18:05:24 +02:00
commit 6193b3ee2d
33 changed files with 712 additions and 49 deletions

View file

@ -93,8 +93,10 @@ namespace RacesOfValheim
}
// ─── Block external Burning (fire pits, arrows) from being applied ────
// Valheim 1.0 appended a 'short variant' parameter to this overload. The type array has to
// match it exactly or the patch silently fails to bind and PatchAll throws.
[HarmonyPatch(typeof(SEMan), "AddStatusEffect",
new System.Type[] { typeof(int), typeof(bool), typeof(int), typeof(float) })]
new System.Type[] { typeof(int), typeof(bool), typeof(int), typeof(float), typeof(short) })]
public static class FurlingFire_SuppressExternalBurning_Patch
{
public static bool AllowNextBurning = false;

View file

@ -445,7 +445,7 @@ namespace RacesOfValheim
int quality = craftUpgradeItem != null ? craftUpgradeItem.m_quality + 1 : 1;
int craftVariant = HarmonyLib.Traverse.Create(__instance).Field("m_craftVariant").GetValue<int>();
ItemDrop.ItemData addedItem = player.GetInventory().AddItem(itemDrop.gameObject.name, amount, quality, craftVariant, player.GetPlayerID(), player.GetPlayerName());
ItemDrop.ItemData addedItem = player.GetInventory().AddItem(itemDrop.gameObject.name, amount, quality, craftVariant, player.GetPlayerID(), player.GetPlayerName(), false);
if (addedItem == null)
{