Wolves attacking but no damage to zombiehorde

I updated the plugin and zombies are invulnerable to wolves even though they are trying to bite them.  Zombiehorde plugin itself is broken right now, and not respecting "Aniamls dont attack" config, but would like to at least make it so they do kill them while active.  Is there something extra needed added to config? 

hi, 
I installed a fresh copy of TruePVE and ZombieHorde
wolves are attacking zombies, and they kill them
zombies are not responding and just die.

I have the default rule anything can hurt npcs

you can use a plugin to prevent wolves from targeting zombies. you should delete this whenever zombiehorde is updated to fix the issue. I don't believe there's a hook for this yet, so I am using harmony to patch it.

save as NoWolfTargetZombieHorde.cs

using HarmonyLib;
using Rust.Ai.Gen2;

namespace Oxide.Plugins
{
    [Info("No Wolf Target Zombie Horde", "nivex", "0.1.1")]
    [Description("Prevents wolves from targeting zombie hordes.")]
    class NoWolfTargetZombieHorde : RustPlugin
    {
        private Harmony _harmony;

        private void Loaded()
        {
            _harmony = new Harmony(Name + "Patch");
            _harmony.PatchAll();
        }

        private void Unload()
        {
            _harmony.UnpatchAll(Name + "Patch");
        }

        [HarmonyPatch(typeof(SenseComponent), nameof(SenseComponent.CanTarget), typeof(BaseEntity))]
        internal class SenseComponent_CanTarget_Patch
        {
            [HarmonyPrefix]
            private static bool Prefix(BaseEntity entity, ref bool __result)
            {
                if (entity != null && entity.GetType().Name.Equals("ZombieNPC"))
                {
                    __result = false;
                    return false;
                }
                return true;
            }
        }
    }
}

Thank you

nivex

hi, 
I installed a fresh copy of TruePVE and ZombieHorde
wolves are attacking zombies, and they kill them
zombies are not responding and just die.

I have the default rule anything can hurt npcs

you can use a plugin to prevent wolves from targeting zombies. you should delete this whenever zombiehorde is updated to fix the issue. I don't believe there's a hook for this yet, so I am using harmony to patch it.

save as NoWolfTargetZombieHorde.cs

using HarmonyLib;
using Rust.Ai.Gen2;

namespace Oxide.Plugins
{
    [Info("No Wolf Target Zombie Horde", "nivex", "0.1.1")]
    [Description("Prevents wolves from targeting zombie hordes.")]
    class NoWolfTargetZombieHorde : RustPlugin
    {
        private Harmony _harmony;

        private void Loaded()
        {
            _harmony = new Harmony(Name + "Patch");
            _harmony.PatchAll();
        }

        private void Unload()
        {
            _harmony.UnpatchAll(Name + "Patch");
        }

        [HarmonyPatch(typeof(SenseComponent), nameof(SenseComponent.CanTarget), typeof(BaseEntity))]
        internal class SenseComponent_CanTarget_Patch
        {
            [HarmonyPrefix]
            private static bool Prefix(BaseEntity entity, ref bool __result)
            {
                if (entity != null && entity.GetType().Name.Equals("ZombieNPC"))
                {
                    __result = false;
                    return false;
                }
                return true;
            }
        }
    }
}

Thank you!