Server Crash Report
===================

ServUO Version 0.5, Build 6983.12228
Operating System: Microsoft Windows NT 6.1.7601 Service Pack 1
.NET Framework: 4.0.30319.42000
Time: 2019/3/12 18:21:13
Mobiles: 44144
Items: 219808
Exception:
System.NullReferenceException: Object reference not set to an instance of an object.
at Server.Mobiles.BaseCreature.CanBeHarmful(IDamageable damageable, Boolean message, Boolean ignoreOurBlessedness)
at Server.Mobile.set_Combatant(IDamageable value)
at Server.Mobiles.BaseCreature.set_Combatant(IDamageable value)
at Server.Mobiles.MageAI.DoActionCombat()
at Server.Mobiles.BaseAI.DoOrderAttack()
at Server.Mobiles.BaseAI.AITimer.OnTick()
at Server.Timer.Slice()
at Server.Core.Main(String[] args)


When the pet attacked the lighthouse, it crashed.
 
This would be the Lighthouse in ServUO with no changes made? If so I can send this to bug reports
 
Agree. If you mean the InvasionBeacon, it is configured as "DamageableItem" not "IDamageableItem" which might be a problem if "CanBeHarmful" needs that.
 
I've found the problem.
There was a problem with the code I added to BaseCreature. CS

Problematic code
Code:
public override bool CanBeHarmful(IDamageable damageable, bool message, bool ignoreOurBlessedness)
        {
            Mobile target = damageable as Mobile;

            if (RecentSetControl && GetMaster() == target)
            {
                return false;
            }
           
            if ( this.Controlled && target.Playe)
            {
                return false;
            }

Modified code
Code:
public override bool CanBeHarmful(IDamageable damageable, bool message, bool ignoreOurBlessedness)
        {
            Mobile target = damageable as Mobile;

            if (RecentSetControl && GetMaster() == target)
            {
                return false;
            }
           
            if ( this.Controlled && target.Player && !Region.IsPartOf("BlackthornDungeon"))
            {
                return false;
            }
 
Back