looking for some assistance on making this not target everyone around you unless in combat or hostel. it currently attacks everything including the owner
public void DrainLife()
{
ArrayList list = new ArrayList();
foreach (Mobile m in this.GetMobilesInRange(3))
{
if (m == this || !CanBeHarmful(m))
continue;
if (m is BaseCreature && (((BaseCreature)m).Controled || ((BaseCreature)m).Summoned || ((BaseCreature)m).Team != this.Team))
list.Add(m);
if (m is BaseCreature)
list.Add(m);
else if (m.Player)
list.Add(m);
}
foreach (Mobile m in list)
{
DoHarmful(m);
m.FixedParticles(0x374A, 10, 15, 5013, 0x496, 0, EffectLayer.Waist);
m.PlaySound(0x231);
m.SendMessage("He Sucks Your Life Out!");
int toDrain = Utility.RandomMinMax(30, 50);
Hits += toDrain;
m.Damage(toDrain, this);
}
}
public void DrainLife()
{
ArrayList list = new ArrayList();
foreach (Mobile m in this.GetMobilesInRange(3))
{
if (m == this || !CanBeHarmful(m))
continue;
if (m is BaseCreature && (((BaseCreature)m).Controled || ((BaseCreature)m).Summoned || ((BaseCreature)m).Team != this.Team))
list.Add(m);
if (m is BaseCreature)
list.Add(m);
else if (m.Player)
list.Add(m);
}
foreach (Mobile m in list)
{
DoHarmful(m);
m.FixedParticles(0x374A, 10, 15, 5013, 0x496, 0, EffectLayer.Waist);
m.PlaySound(0x231);
m.SendMessage("He Sucks Your Life Out!");
int toDrain = Utility.RandomMinMax(30, 50);
Hits += toDrain;
m.Damage(toDrain, this);
}
}