generated from Valheim-Modding/JotunnModStub
-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
305 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
{ | ||
"name": "ChebsMercenaries", | ||
"description": "Cheb's Mercenaries adds mercenaries to Valheim that you can purchase with gold and upgrade with materials to fight (warriors, archers) or perform work (lumberjacks, miners).", | ||
"version_number": "2.2.3", | ||
"version_number": "2.3.4", | ||
"website_url": "https://github.com/jpw1991/chebs-mercenaries", | ||
"dependencies": [ | ||
"ValheimModding-Jotunn-2.14.4" | ||
"ValheimModding-Jotunn-2.16.1" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
using ChebsMercenaries.PvP; | ||
using HarmonyLib; | ||
using Jotunn; | ||
|
||
// ReSharper disable InconsistentNaming | ||
// ReSharper disable UnusedParameter.Local | ||
|
||
// Harmony patching is very sensitive regarding parameter names. Everything in this region should be hand crafted | ||
// and not touched by well-meaning but clueless IDE optimizations. | ||
// eg. | ||
// * __instance MUST be named with exactly two underscores. | ||
// * ___m_drops MUST be named with exactly three underscores. | ||
// * Unused parameters must be left there because they must match the method to override | ||
// * All patch methods need to be static | ||
// | ||
// This is because all of this has a special meaning to Harmony. | ||
|
||
namespace ChebsMercenaries.Patches | ||
{ | ||
public class PlayerProfilePatches | ||
{ | ||
[HarmonyPatch(typeof(PlayerProfile))] | ||
class PlayerProfilePatch1 | ||
{ | ||
[HarmonyPatch(nameof(PlayerProfile.LoadPlayerData))] | ||
[HarmonyPostfix] | ||
static void Postfix(Player __instance) | ||
{ | ||
if (BasePlugin.HeavyLogging.Value) Logger.LogInfo($"PlayerProfile.LoadPlayerData postfix - update pvp friends list..."); | ||
PvPManager.UpdatePlayerFriendsDict(BasePlugin.PvPFriendsList.Value); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.