RedBeard
Member
[Issues] Server Crash
My issues are when outside the region (Cemetary Region)
when player dies or if player suddenly changes to owner using the access level stone
I would also prefer //==Haunt current Target==// section not be subject to the return;
ie: he will still haunt you in the region as well
[Goal]
if pm dies, can't be found, or when mobs hitpoints drop to certain level it should teleport back to within
the region.
My issues are when outside the region (Cemetary Region)
when player dies or if player suddenly changes to owner using the access level stone
I would also prefer //==Haunt current Target==// section not be subject to the return;
ie: he will still haunt you in the region as well
[Goal]
if pm dies, can't be found, or when mobs hitpoints drop to certain level it should teleport back to within
the region.
Exception:
System.NullReferenceException: Object reference not set to an instance of an object.
at Server.Mobiles.GrimReaper.OnThink()
at Server.Mobiles.BaseAI.AITimer.OnTick()
at Server.Timer.Slice() in j:\Virtus Imperium v1.3.5\Server\Timer.cs:line 386
at Server.Core.Main(String[] args) in j:\Virtus Imperium v1.3.5\Server\Main.cs:line 621
Code:
#region OnThink
public override void OnThink()
{
if (init == false)
Start();
base.OnThink();
Mobile m = Combatant;
if (this.Region.IsPartOf(typeof(Regions.CemetaryRegion)) || (m.AccessLevel >= AccessLevel.Counselor))
{
return;
}
//==At approx. 33% Health or no combatant return home==//
if (this.Hits <= (this.HitsMax / 3) || (m == null) || m.Deleted || !m.Alive || !Alive || m.IsDeadBondedPet || !this.CanSee(m) || !this.InLOS(m) || (m.AccessLevel >= AccessLevel.Counselor))
{
Map = m.Map;
Location = this.InitialPos;
Effects.PlaySound(this.Location, this.Map, 0x1FE);
//this.Hits += 1000; //gets instant 1000 health replenished
}
//==Haunt current Target==//
if (m.AccessLevel == AccessLevel.Player && !this.InRange(m, 8) || !m.Deleted || m.Alive || this.InLOS(m) || this.CanSee(m))//|| !this.Region.IsPartOf(typeof(Regions.TownRegion)))
{
Map = m.Map;
Location = m.Location;
Combatant = m;
//Effects.PlaySound(this.Location, this.Map, 0x1FE);
}
}
#endregion