From ddbcb9712e219423cdc898082c5fe570ee64e3c5 Mon Sep 17 00:00:00 2001 From: WhiteFang Date: Wed, 3 Aug 2022 20:30:21 +0200 Subject: [PATCH] [ChestPvPProtection] Fixed an issue related to retrieving Inventories from the NetworkIdMapping; Bumped version to v1.0.1 --- CHANGELOG.md | 7 +++++++ ChestPvPProtection/ChestPvPProtection.csproj | 2 +- ChestPvPProtection/Hooks/InventoryHooks.cs | 12 ++++++------ Thunderstone/PvPPunishment/manifest.json | 2 +- 4 files changed, 15 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 93c70ee..732a76e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,3 +19,10 @@ ## PvP Punishment ### v1.0.0 * Initial release + +## Chest PvP Protection +### v1.0.1 +* Fixed an issue related to retrieving Inventories from the NetworkIdMapping causing the mod to crash/not work correctly + +### v1.0.0 +* Initial release \ No newline at end of file diff --git a/ChestPvPProtection/ChestPvPProtection.csproj b/ChestPvPProtection/ChestPvPProtection.csproj index 312cea9..6ee8a90 100644 --- a/ChestPvPProtection/ChestPvPProtection.csproj +++ b/ChestPvPProtection/ChestPvPProtection.csproj @@ -4,7 +4,7 @@ VMods.ChestPvPProtection VMods.ChestPvPProtection A mod that prevents looting of enemy player chests/workstations by players with the PvP Protection buff - 1.0.0 + 1.0.1 true latest False diff --git a/ChestPvPProtection/Hooks/InventoryHooks.cs b/ChestPvPProtection/Hooks/InventoryHooks.cs index 997424b..750a3b2 100644 --- a/ChestPvPProtection/Hooks/InventoryHooks.cs +++ b/ChestPvPProtection/Hooks/InventoryHooks.cs @@ -32,7 +32,7 @@ private static void MoveItemBetweenInventories(MoveItemBetweenInventoriesSystem var server = VWorld.Server; var entityManager = server.EntityManager; - var networkIdToEntityMap = __instance._NetworkIdSystem._NetworkIdToEntityMap; + var networkIdToEntityMap = server.GetExistingSystem()._NetworkIdToEntityMap; var entities = __instance._MoveItemBetweenInventoriesEventQuery.ToEntityArray(Allocator.Temp); foreach(var entity in entities) @@ -54,7 +54,7 @@ private static void MoveAllItemsBetweenInventories(MoveAllItemsBetweenInventorie var server = VWorld.Server; var entityManager = server.EntityManager; - var networkIdToEntityMap = __instance._NetworkIdSystem._NetworkIdToEntityMap; + var networkIdToEntityMap = server.GetExistingSystem()._NetworkIdToEntityMap; var entities = __instance.__MoveAllItemsJob_entityQuery.ToEntityArray(Allocator.Temp); foreach(var entity in entities) @@ -76,7 +76,7 @@ private static void DropInventoryItem(DropInventoryItemSystem __instance) var server = VWorld.Server; var entityManager = server.EntityManager; - var networkIdToEntityMap = __instance._NetworkIdSystem._NetworkIdToEntityMap; + var networkIdToEntityMap = server.GetExistingSystem()._NetworkIdToEntityMap; var entities = __instance.__DropInventoryItemJob_entityQuery.ToEntityArray(Allocator.Temp); foreach(var entity in entities) @@ -98,7 +98,7 @@ private static void SplitItem(SplitItemSystem __instance) var server = VWorld.Server; var entityManager = server.EntityManager; - var networkIdToEntityMap = __instance._NetworkIdSystem._NetworkIdToEntityMap; + var networkIdToEntityMap = server.GetExistingSystem()._NetworkIdToEntityMap; var entities = __instance._Query.ToEntityArray(Allocator.Temp); foreach(var entity in entities) @@ -120,7 +120,7 @@ private static void SortAllItems(SplitItemSystem __instance) var server = VWorld.Server; var entityManager = server.EntityManager; - var networkIdToEntityMap = __instance._NetworkIdSystem._NetworkIdToEntityMap; + var networkIdToEntityMap = server.GetExistingSystem()._NetworkIdToEntityMap; var entities = __instance._Query.ToEntityArray(Allocator.Temp); foreach(var entity in entities) @@ -142,7 +142,7 @@ private static void SmartMergeItemsBetweenInventories(SplitItemSystem __instance var server = VWorld.Server; var entityManager = server.EntityManager; - var networkIdToEntityMap = __instance._NetworkIdSystem._NetworkIdToEntityMap; + var networkIdToEntityMap = server.GetExistingSystem()._NetworkIdToEntityMap; var entities = __instance._Query.ToEntityArray(Allocator.Temp); foreach(var entity in entities) diff --git a/Thunderstone/PvPPunishment/manifest.json b/Thunderstone/PvPPunishment/manifest.json index 2453011..84711de 100644 --- a/Thunderstone/PvPPunishment/manifest.json +++ b/Thunderstone/PvPPunishment/manifest.json @@ -1,7 +1,7 @@ { "name": "VMods_PvP_Punishment", "description": "A mod that punishes low-level kills.", - "version_number": "1.0.0", + "version_number": "1.0.1", "dependencies": [ "BepInEx-BepInExPack_V_Rising-1.0.0", "molenzwiebel-Wetstone-1.1.0"