(1.6.11) EventSystem Reward Rarity Tweaks

This commit is contained in:
mikx
2026-03-17 02:07:05 -04:00
parent b6dec0efa6
commit 75d951eefe
3 changed files with 8 additions and 8 deletions

View File

@@ -229,20 +229,20 @@ namespace MxValheim.EventSystem
string[] rarity = { }; string[] rarity = { };
switch (victim) switch (victim)
{ {
case <= 1: case < 1:
rarity = ["Magic"]; rarity = ["Magic"];
break; break;
case > 1 and < 5: case >= 1 and < 5:
rarity = ["Rare"]; rarity = ["Rare"];
break; break;
case >= 5 and <= 10: case >= 5 and <= 10:
rarity = ["Rare", "Epic"]; rarity = ["Epic"];
break; break;
case >= 11 and <= 20: case >= 11 and <= 20:
rarity = ["Rare", "Epic", "Legendary"]; rarity = ["Epic", "Legendary"];
break; break;
case >= 21: case >= 21:
rarity = ["Rare", "Epic", "Legendary", "Mythic"]; rarity = ["Epic", "Legendary", "Mythic"];
break; break;
} }
return rarity; return rarity;

View File

@@ -200,7 +200,7 @@ namespace MxValheim.KillFeed
{ {
int qty = Convert.ToInt32(victim); int qty = Convert.ToInt32(victim);
borderColor = new Color(0.0196f, 0.250f, 0.00750f); borderColor = new Color(0.0196f, 0.250f, 0.00750f);
finalMsg = $"<color=#32a852>{attacker.ToUpper()}{Localization.instance.Localize("$EventSystem_format_reward_Msg_GiveItem")}</color><color=#ffd000>{qty}</color> <color=#32a852>x</color> <color=#ffd000>{victimInternalName}</color><color=#32a852>{Localization.instance.Localize("$EventSystem_format_reward_Msg_GiveItemEnd")}</color>"; finalMsg = $"<color=#ffd000>{attacker.ToUpper()}</color><color=#32a852>{Localization.instance.Localize("$EventSystem_format_reward_Msg_GiveItem")}</color><color=#ffd000>{qty}</color> <color=#32a852>x</color> <color=#ffd000>{victimInternalName}</color><color=#32a852>{Localization.instance.Localize("$EventSystem_format_reward_Msg_GiveItemEnd")}</color>";
GameObject itemObj = ObjectDB.instance.GetItemPrefab(weaponPrefab); GameObject itemObj = ObjectDB.instance.GetItemPrefab(weaponPrefab);
Sprite itemIcon = null; Sprite itemIcon = null;
if (itemObj != null) if (itemObj != null)
@@ -368,7 +368,7 @@ namespace MxValheim.KillFeed
} }
string victimName = __instance.GetHoverName(); string victimName = __instance.GetHoverName();
if (victimName == null) return; if (victimName == null || victimName == "") return;
int type = 0; int type = 0;
if (__instance.IsPlayer()) if (__instance.IsPlayer())

View File

@@ -33,7 +33,7 @@ public class MxValheimMod : BaseUnityPlugin
private const string ModGUID = "ovh.mxdev.mxvalheim"; private const string ModGUID = "ovh.mxdev.mxvalheim";
private const string ModName = "MxValheim"; private const string ModName = "MxValheim";
private const string ModVersion = "1.6.10"; private const string ModVersion = "1.6.11";
public static ConfigEntry<bool> Config_DebugRandomEventInterval; public static ConfigEntry<bool> Config_DebugRandomEventInterval;
public static ConfigEntry<float> Config_bowDrawSpeedBonusPerLevel; public static ConfigEntry<float> Config_bowDrawSpeedBonusPerLevel;