Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b6dec0efa6 |
@@ -20,12 +20,14 @@ namespace MxValheim.EventSystem
|
|||||||
Dictionary<int, float> biomeBase = new Dictionary<int, float>()
|
Dictionary<int, float> biomeBase = new Dictionary<int, float>()
|
||||||
{
|
{
|
||||||
{ 1, 1.0f },
|
{ 1, 1.0f },
|
||||||
{ 2, 1.5f },
|
{ 8, 1.5f },
|
||||||
{ 8, 2.0f },
|
{ 2, 2.0f },
|
||||||
{ 4, 2.5f },
|
{ 4, 2.5f },
|
||||||
{ 16, 3.0f },
|
{ 16, 3.0f },
|
||||||
{ 256, 3.5f },
|
{ 512, 4.0f },
|
||||||
{ 32, 4.0f },
|
{ 64, 2.5f },
|
||||||
|
{ 32, 5.0f },
|
||||||
|
{ 256, 1.0f },
|
||||||
};
|
};
|
||||||
|
|
||||||
float rewardExpMulti = biomeBase[((int)biome)];
|
float rewardExpMulti = biomeBase[((int)biome)];
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ using System;
|
|||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Reflection;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
@@ -199,6 +200,9 @@ namespace MxValheim.EventSystem
|
|||||||
Heightmap.Biome currentBiome = EnvMan.instance.GetCurrentBiome();
|
Heightmap.Biome currentBiome = EnvMan.instance.GetCurrentBiome();
|
||||||
int expFinal = ((int)(exp * Experience.CalculateExpMultiplier(currentBiome))) + Profiles.serverLevel;
|
int expFinal = ((int)(exp * Experience.CalculateExpMultiplier(currentBiome))) + Profiles.serverLevel;
|
||||||
Experience.AddExperience(expFinal);
|
Experience.AddExperience(expFinal);
|
||||||
|
Color magicPurple = new Color(0.921f, 0.475f, 0.990f);
|
||||||
|
Vector3 spawnPos = __instance.transform.position + Vector3.up * 1.0f;
|
||||||
|
DamageText.instance.ShowText(HitData.DamageModifier.Normal, spawnPos, expFinal, true);
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
int level = __instance.GetLevel();
|
int level = __instance.GetLevel();
|
||||||
@@ -210,6 +214,9 @@ namespace MxValheim.EventSystem
|
|||||||
Heightmap.Biome currentBiome = EnvMan.instance.GetCurrentBiome();
|
Heightmap.Biome currentBiome = EnvMan.instance.GetCurrentBiome();
|
||||||
int expFinal = ((int)(exp * Experience.CalculateExpMultiplier(currentBiome))) + Profiles.serverLevel;
|
int expFinal = ((int)(exp * Experience.CalculateExpMultiplier(currentBiome))) + Profiles.serverLevel;
|
||||||
Experience.AddExperience(expFinal);
|
Experience.AddExperience(expFinal);
|
||||||
|
Color magicPurple = new Color(0.921f, 0.475f, 0.990f);
|
||||||
|
Vector3 spawnPos = __instance.transform.position + Vector3.up * 1.0f;
|
||||||
|
DamageText.instance.ShowText(HitData.DamageModifier.Normal, spawnPos, expFinal, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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} {victimInternalName}</color><color=#32a852>{Localization.instance.Localize("$EventSystem_format_reward_Msg_GiveItemEnd")}</color>";
|
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>";
|
||||||
GameObject itemObj = ObjectDB.instance.GetItemPrefab(weaponPrefab);
|
GameObject itemObj = ObjectDB.instance.GetItemPrefab(weaponPrefab);
|
||||||
Sprite itemIcon = null;
|
Sprite itemIcon = null;
|
||||||
if (itemObj != null)
|
if (itemObj != null)
|
||||||
@@ -208,8 +208,8 @@ namespace MxValheim.KillFeed
|
|||||||
ItemDrop item = itemObj.GetComponent<ItemDrop>();
|
ItemDrop item = itemObj.GetComponent<ItemDrop>();
|
||||||
itemIcon = item?.m_itemData?.m_shared?.m_icons[0];
|
itemIcon = item?.m_itemData?.m_shared?.m_icons[0];
|
||||||
}
|
}
|
||||||
biomeSprite = itemIcon;
|
biomeSprite = LoadCustomSprite("eventsystem_reward.png");
|
||||||
weaponIcon = null;
|
weaponIcon = itemIcon;
|
||||||
}
|
}
|
||||||
|
|
||||||
lastVictimName = victim;
|
lastVictimName = victim;
|
||||||
@@ -368,6 +368,8 @@ namespace MxValheim.KillFeed
|
|||||||
}
|
}
|
||||||
string victimName = __instance.GetHoverName();
|
string victimName = __instance.GetHoverName();
|
||||||
|
|
||||||
|
if (victimName == null) return;
|
||||||
|
|
||||||
int type = 0;
|
int type = 0;
|
||||||
if (__instance.IsPlayer())
|
if (__instance.IsPlayer())
|
||||||
{
|
{
|
||||||
@@ -491,8 +493,8 @@ namespace MxValheim.KillFeed
|
|||||||
_weaponIconSlot = iconObj.GetComponent<Image>();
|
_weaponIconSlot = iconObj.GetComponent<Image>();
|
||||||
_weaponIconSlot.preserveAspect = true;
|
_weaponIconSlot.preserveAspect = true;
|
||||||
LayoutElement weaponLayout = iconObj.AddComponent<LayoutElement>();
|
LayoutElement weaponLayout = iconObj.AddComponent<LayoutElement>();
|
||||||
weaponLayout.preferredWidth = 24;
|
weaponLayout.preferredWidth = 32;
|
||||||
weaponLayout.preferredHeight = 24;
|
weaponLayout.preferredHeight = 32;
|
||||||
|
|
||||||
RectTransform iRect = iconObj.GetComponent<RectTransform>();
|
RectTransform iRect = iconObj.GetComponent<RectTransform>();
|
||||||
iRect.anchorMin = iRect.anchorMax = iRect.pivot = new Vector2(0, 0.5f);
|
iRect.anchorMin = iRect.anchorMax = iRect.pivot = new Vector2(0, 0.5f);
|
||||||
@@ -533,8 +535,8 @@ namespace MxValheim.KillFeed
|
|||||||
_victimIconSlot = victimObj.GetComponent<Image>();
|
_victimIconSlot = victimObj.GetComponent<Image>();
|
||||||
_victimIconSlot.preserveAspect = true;
|
_victimIconSlot.preserveAspect = true;
|
||||||
LayoutElement victimLayout = victimObj.AddComponent<LayoutElement>();
|
LayoutElement victimLayout = victimObj.AddComponent<LayoutElement>();
|
||||||
victimLayout.preferredWidth = 24;
|
victimLayout.preferredWidth = 32;
|
||||||
victimLayout.preferredHeight = 24;
|
victimLayout.preferredHeight = 32;
|
||||||
|
|
||||||
RectTransform vRect = victimObj.GetComponent<RectTransform>();
|
RectTransform vRect = victimObj.GetComponent<RectTransform>();
|
||||||
vRect.anchorMin = vRect.anchorMax = vRect.pivot = new Vector2(1, 0.5f);
|
vRect.anchorMin = vRect.anchorMax = vRect.pivot = new Vector2(1, 0.5f);
|
||||||
|
|||||||
@@ -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.9";
|
private const string ModVersion = "1.6.10";
|
||||||
|
|
||||||
public static ConfigEntry<bool> Config_DebugRandomEventInterval;
|
public static ConfigEntry<bool> Config_DebugRandomEventInterval;
|
||||||
public static ConfigEntry<float> Config_bowDrawSpeedBonusPerLevel;
|
public static ConfigEntry<float> Config_bowDrawSpeedBonusPerLevel;
|
||||||
|
|||||||
Reference in New Issue
Block a user