blaxxun-boop / Mining

2 stars 3 forks source link

Conflict with Rune Magic mod #1

Closed awdwyn closed 2 years ago

awdwyn commented 2 years ago

As reported on the Rune Magic nexus board (https://www.nexusmods.com/valheim/mods/1359?tab=bugs titled [v1.1.7 : blasting rune causes log error spam]), there is a conflict with this mod and that (specifically the blasting rune which destroys rocks).

Attaching that rune to a rock (in order to destroy it) causes the following errors to spam the bepinex log, only when this mod is also installed:

[Error : Unity Log] NullReferenceException: Object reference not set to an instance of an object Stack trace: Mining.Mining+SetMiningFlag.Prefix (MineRock5 __instance, HitData hit) (at :0) (wrapper dynamic-method) MineRock5.DMD(MineRock5,long,HitData,int) System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at :0) Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation. System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at :0) System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at :0) System.Delegate.DynamicInvokeImpl (System.Object[] args) (at :0) System.MulticastDelegate.DynamicInvokeImpl (System.Object[] args) (at :0) System.Delegate.DynamicInvoke (System.Object[] args) (at :0) RoutedMethod`2[T,U].Invoke (System.Int64 rpc, ZPackage pkg) (at :0) ZNetView.HandleRoutedRPC (ZRoutedRpc+RoutedRPCData rpcData) (at :0) ZRoutedRpc.HandleRoutedRPC (ZRoutedRpc+RoutedRPCData data) (at :0) ZRoutedRpc.InvokeRoutedRPC (System.Int64 targetPeerID, ZDOID targetZDO, System.String methodName, System.Object[] parameters) (at :0) ZNetView.InvokeRPC (System.String method, System.Object[] parameters) (at :0) (wrapper dynamic-method) MineRock5.DMD(MineRock5,HitData) ValheimMod.RockDestroyer.hitColliders (UnityEngine.Collider[] colliders, HitData+DamageTypes damage) (at <02b861475ca142baa14df7d9455eb904>:0) ValheimMod.RockDestroyer.destroyRockAOE (System.Single radius) (at <02b861475ca142baa14df7d9455eb904>:0) ValheimMod.RockDestroyer.Update () (at <02b861475ca142baa14df7d9455eb904>:0)

blaxxun-boop commented 2 years ago

Hey,

there shouldn't be any errors, if it's something other than a player mining the ore now.

Cheers.