Kr4ken-9 / NewEssentials

The Essential plugin for Unturned, built on OpenMod
GNU General Public License v3.0
13 stars 13 forks source link

3.22.15.0 Update broke kits #137

Closed gegtor closed 1 year ago

gegtor commented 1 year ago

Latest update 3.22.15.0 broke kits in NewEssentials OpenMod 3.3.2

[2022-09-02 15:52:37 INF][OpenMod.Core.Commands.CommandExecutor] Actor player/[Admin] Akos  has executed command "kit vip-house"
[2022-09-02 15:52:37 ERR][OpenMod.Core.Commands.CommandExecutor] Exception occured on command "kit vip-house" by actor player/[Admin] Akos 
System.TypeInitializationException: The type initializer for 'OpenMod.Unturned.Items.UnturnedClothingItem' threw an exception. ---> System.ArgumentException: StaticFieldRefAccess<SDG.Unturned.ClientInstanceMethod`3[System.Guid,System.Byte,System.Byte[]]> for SDG.Unturned.PlayerClothing, SendWearShirt caused an exception ---> System.ArgumentException: FieldRefAccess return type must be assignable from FieldType for reference types
  at HarmonyLib.Tools.ValidateFieldType[F] (System.Reflection.FieldInfo fieldInfo) [0x0006b] in <c7a451f026794280b32fd6e69b1cd981>:0 
  at HarmonyLib.Tools.StaticFieldRefAccess[F] (System.Reflection.FieldInfo fieldInfo) [0x00013] in <c7a451f026794280b32fd6e69b1cd981>:0 
  at HarmonyLib.AccessTools.StaticFieldRefAccess[F] (System.Type type, System.String fieldName) [0x00010] in <c7a451f026794280b32fd6e69b1cd981>:0 
   --- End of inner exception stack trace ---
  at HarmonyLib.AccessTools.StaticFieldRefAccess[F] (System.Type type, System.String fieldName) [0x00041] in <c7a451f026794280b32fd6e69b1cd981>:0 
  at HarmonyLib.AccessTools.StaticFieldRefAccess[T,F] (System.String fieldName) [0x00000] in <c7a451f026794280b32fd6e69b1cd981>:0 
  at OpenMod.Unturned.Items.UnturnedClothingItem..cctor () [0x00000] in /home/runner/work/openmod/openmod/unturned/OpenMod.Unturned/Items/UnturnedClothingItem.cs:15 
   --- End of inner exception stack trace ---
  at OpenMod.Unturned.Players.Clothing.Events.PlayerClothingEventsListener.Events_OnWearHat (SDG.Unturned.Player nativePlayer, SDG.Unturned.ItemClothingAsset asset, System.Byte quality, System.Byte[] state, System.Boolean& cancel) [0x00056] in /home/runner/work/openmod/openmod/unturned/OpenMod.Unturned/Players/Clothing/Events/PlayerClothingEventsListener.cs:133 
  at OpenMod.Unturned.Players.Clothing.Events.PlayerClothingEventsListener+Patches.AskWearHat (SDG.Unturned.PlayerClothing __instance, SDG.Unturned.ItemHatAsset asset, System.Byte quality, System.Byte[] state) [0x00002] in /home/runner/work/openmod/openmod/unturned/OpenMod.Unturned/Players/Clothing/Events/PlayerClothingEventsListener.cs:434 
  at (wrapper dynamic-method) SDG.Unturned.PlayerClothing.SDG.Unturned.PlayerClothing.askWearHat_Patch1(SDG.Unturned.PlayerClothing,SDG.Unturned.ItemHatAsset,byte,byte[],bool)
  at SDG.Unturned.PlayerClothing.askWearHat (System.UInt16 id, System.Byte quality, System.Byte[] state, System.Boolean playEffect) [0x0000d] in <fbf42d9aaa014c18b002e2b449d6c852>:0 
  at OpenMod.Unturned.Items.UnturnedItemSpawner.TryAddItem (SDG.Unturned.ItemAsset itemAsset, SDG.Unturned.Item item, OpenMod.Unturned.Items.UnturnedPlayerInventory playerInventory, SDG.Unturned.ItemJar& itemJar) [0x00127] in /home/runner/work/openmod/openmod/unturned/OpenMod.Unturned/Items/UnturnedItemSpawner.cs:121 
  at OpenMod.Unturned.Items.UnturnedItemSpawner+<>c__DisplayClass0_0+<<GiveItemAsync>g__GiveItemTask|0>d.MoveNext () [0x00128] in /home/runner/work/openmod/openmod/unturned/OpenMod.Unturned/Items/UnturnedItemSpawner.cs:40 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <695d1cc93cca45069c528c15c9fdd749>:0 
  at Cysharp.Threading.Tasks.CompilerServices.AsyncUniTask`2[TStateMachine,T].GetResult (System.Int16 token) [0x00000] in <b570aeb885074593be3f1a2137ad3fbd>:0 
  at Cysharp.Threading.Tasks.UniTaskExtensions+<>c__34`1[T].<AsTask>b__34_0 (System.Object state) [0x00016] in <b570aeb885074593be3f1a2137ad3fbd>:0 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <695d1cc93cca45069c528c15c9fdd749>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <695d1cc93cca45069c528c15c9fdd749>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <695d1cc93cca45069c528c15c9fdd749>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <695d1cc93cca45069c528c15c9fdd749>:0 
  at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () [0x00000] in <695d1cc93cca45069c528c15c9fdd749>:0 
  at NewEssentials.Commands.Kits.CKitRoot+<OnExecuteAsync>d__7.MoveNext () [0x00567] in <18c764960de14a349f6dd2ac34efd666>:0 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <695d1cc93cca45069c528c15c9fdd749>:0 
  at Cysharp.Threading.Tasks.CompilerServices.AsyncUniTask`1[TStateMachine].GetResult (System.Int16 token) [0x00000] in <b570aeb885074593be3f1a2137ad3fbd>:0 
  at Cysharp.Threading.Tasks.UniTaskExtensions+<>c.<AsTask>b__35_0 (System.Object state) [0x00016] in <b570aeb885074593be3f1a2137ad3fbd>:0 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <695d1cc93cca45069c528c15c9fdd749>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <695d1cc93cca45069c528c15c9fdd749>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <695d1cc93cca45069c528c15c9fdd749>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <695d1cc93cca45069c528c15c9fdd749>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.GetResult () [0x00000] in <695d1cc93cca45069c528c15c9fdd749>:0 
  at OpenMod.Core.Commands.CommandExecutor+<ExecuteAsync>d__7.MoveNext () [0x0034c] in /home/runner/work/openmod/openmod/framework/OpenMod.Core/Commands/CommandExecutor.cs:92 
Trojaner commented 1 year ago

Should be fixed, closing