// Main Aura Method
public static void Aura(Point3D location, Map map, Mobile from, int min, int max, ResistanceType type, int range, Poison poison, string text, bool scales, bool allownull, bool effects, int itemid, int hue)
{
if (from == null && !allownull)
{
return;
}
List <Mobile> targets = new List <Mobile>();
foreach (Mobile m in Map.AllMaps[map.MapID].GetMobilesInRange(location, range))
{
if (CanTarget(from, m, true, false, allownull))
{
targets.Add(m);
}
}
if (effects && from != null)
{
from.Animate(12, 5, 1, true, false, 0);
}
for (int i = 0; i < targets.Count; i++)
{
Mobile m = (Mobile)targets[i];
m.RevealingAction();
if (text != "")
{
m.SendMessage(text);
}
int auradamage = Utility.RandomMinMax(min, max);
if (scales)
{
auradamage = (int)((auradamage / GetDist(location, m.Location)) * range);
}
if (poison != null)
{
m.ApplyPoison((from == null) ? m : from, poison);
}
if (effects)
{
m.FixedParticles(itemid, 10, 15, 5030 /*what the hell does this number do?*/, hue, 0, EffectLayer.Waist);
}
switch (type)
{
case ResistanceType.Physical:
AOS.Damage(m, (from == null) ? m : from, auradamage, 100, 0, 0, 0, 0);
break;
case ResistanceType.Fire:
AOS.Damage(m, (from == null) ? m : from, auradamage, 0, 100, 0, 0, 0);
break;
case ResistanceType.Cold:
AOS.Damage(m, (from == null) ? m : from, auradamage, 0, 0, 100, 0, 0);
break;
case ResistanceType.Poison:
AOS.Damage(m, (from == null) ? m : from, auradamage, 0, 0, 0, 100, 0);
break;
case ResistanceType.Energy:
AOS.Damage(m, (from == null) ? m : from, auradamage, 0, 0, 0, 0, 100);
break;
}
}
targets.Clear();
}