From 75d951eefe1ffa725e32cb0286bf5ec60346f788 Mon Sep 17 00:00:00 2001 From: mikx Date: Tue, 17 Mar 2026 02:07:05 -0400 Subject: [PATCH] (1.6.11) EventSystem Reward Rarity Tweaks --- MxValheim/EventSystem/Reward.cs | 10 +++++----- MxValheim/KillFeed/Patch.cs | 4 ++-- MxValheim/MxValheim.cs | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/MxValheim/EventSystem/Reward.cs b/MxValheim/EventSystem/Reward.cs index dc62b0a..ea7ba1c 100644 --- a/MxValheim/EventSystem/Reward.cs +++ b/MxValheim/EventSystem/Reward.cs @@ -229,20 +229,20 @@ namespace MxValheim.EventSystem string[] rarity = { }; switch (victim) { - case <= 1: + case < 1: rarity = ["Magic"]; break; - case > 1 and < 5: + case >= 1 and < 5: rarity = ["Rare"]; break; case >= 5 and <= 10: - rarity = ["Rare", "Epic"]; + rarity = ["Epic"]; break; case >= 11 and <= 20: - rarity = ["Rare", "Epic", "Legendary"]; + rarity = ["Epic", "Legendary"]; break; case >= 21: - rarity = ["Rare", "Epic", "Legendary", "Mythic"]; + rarity = ["Epic", "Legendary", "Mythic"]; break; } return rarity; diff --git a/MxValheim/KillFeed/Patch.cs b/MxValheim/KillFeed/Patch.cs index 00e8d7e..a3dc669 100644 --- a/MxValheim/KillFeed/Patch.cs +++ b/MxValheim/KillFeed/Patch.cs @@ -200,7 +200,7 @@ namespace MxValheim.KillFeed { int qty = Convert.ToInt32(victim); borderColor = new Color(0.0196f, 0.250f, 0.00750f); - finalMsg = $"{attacker.ToUpper()}{Localization.instance.Localize("$EventSystem_format_reward_Msg_GiveItem")}{qty} x {victimInternalName}{Localization.instance.Localize("$EventSystem_format_reward_Msg_GiveItemEnd")}"; + finalMsg = $"{attacker.ToUpper()}{Localization.instance.Localize("$EventSystem_format_reward_Msg_GiveItem")}{qty} x {victimInternalName}{Localization.instance.Localize("$EventSystem_format_reward_Msg_GiveItemEnd")}"; GameObject itemObj = ObjectDB.instance.GetItemPrefab(weaponPrefab); Sprite itemIcon = null; if (itemObj != null) @@ -368,7 +368,7 @@ namespace MxValheim.KillFeed } string victimName = __instance.GetHoverName(); - if (victimName == null) return; + if (victimName == null || victimName == "") return; int type = 0; if (__instance.IsPlayer()) diff --git a/MxValheim/MxValheim.cs b/MxValheim/MxValheim.cs index b73f903..40eb514 100644 --- a/MxValheim/MxValheim.cs +++ b/MxValheim/MxValheim.cs @@ -33,7 +33,7 @@ public class MxValheimMod : BaseUnityPlugin private const string ModGUID = "ovh.mxdev.mxvalheim"; private const string ModName = "MxValheim"; - private const string ModVersion = "1.6.10"; + private const string ModVersion = "1.6.11"; public static ConfigEntry Config_DebugRandomEventInterval; public static ConfigEntry Config_bowDrawSpeedBonusPerLevel;