Skip to content

Commit

Permalink
[ChestPvPProtection] Fixed an issue related to retrieving Inventories…
Browse files Browse the repository at this point in the history
… from the NetworkIdMapping; Bumped version to v1.0.1
  • Loading branch information
WhiteFang5 committed Aug 3, 2022
1 parent f4e3a10 commit ddbcb97
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 8 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion ChestPvPProtection/ChestPvPProtection.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<AssemblyName>VMods.ChestPvPProtection</AssemblyName>
<RootNamespace>VMods.ChestPvPProtection</RootNamespace>
<Description>A mod that prevents looting of enemy player chests/workstations by players with the PvP Protection buff</Description>
<Version>1.0.0</Version>
<Version>1.0.1</Version>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<LangVersion>latest</LangVersion>
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>
Expand Down
12 changes: 6 additions & 6 deletions ChestPvPProtection/Hooks/InventoryHooks.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<NetworkIdSystem>()._NetworkIdToEntityMap;

var entities = __instance._MoveItemBetweenInventoriesEventQuery.ToEntityArray(Allocator.Temp);
foreach(var entity in entities)
Expand All @@ -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<NetworkIdSystem>()._NetworkIdToEntityMap;

var entities = __instance.__MoveAllItemsJob_entityQuery.ToEntityArray(Allocator.Temp);
foreach(var entity in entities)
Expand All @@ -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<NetworkIdSystem>()._NetworkIdToEntityMap;

var entities = __instance.__DropInventoryItemJob_entityQuery.ToEntityArray(Allocator.Temp);
foreach(var entity in entities)
Expand All @@ -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<NetworkIdSystem>()._NetworkIdToEntityMap;

var entities = __instance._Query.ToEntityArray(Allocator.Temp);
foreach(var entity in entities)
Expand All @@ -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<NetworkIdSystem>()._NetworkIdToEntityMap;

var entities = __instance._Query.ToEntityArray(Allocator.Temp);
foreach(var entity in entities)
Expand All @@ -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<NetworkIdSystem>()._NetworkIdToEntityMap;

var entities = __instance._Query.ToEntityArray(Allocator.Temp);
foreach(var entity in entities)
Expand Down
2 changes: 1 addition & 1 deletion Thunderstone/PvPPunishment/manifest.json
Original file line number Diff line number Diff line change
@@ -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"
Expand Down

0 comments on commit ddbcb97

Please sign in to comment.