public static void BlizzardDamage_Callback(object state)
{
//Point3D loc = (Point3D)state;
object[] states = ((object[])state);
Mobile ag = states[0] as Mobile;
Point3D loc = ((Point3D)states[1]);
if (ag == null || !ag.Alive || ag.Map == Map.Internal)
{
return;
}
IPooledEnumerable eable = ag.Map.GetMobilesInRange(loc, 0);
foreach (Mobile m in eable)
{
if (m.Blessed || m == null || m.Map == Map.Internal || m.Map == null || !m.Alive || !ag.CanBeHarmful(m))
{
return;
}
else if (m is PlayerMobile)
{
PlayerMobile p = m as PlayerMobile;
if (p.AccessLevel == AccessLevel.Player)
{
AOS.Damage(p, ag, 100, 0, 0, 0, 100, 0);
}
else
{
p.SendMessage("With your godly powers you avoid the damage");
}
}
else if (m is BaseCreature)
{
BaseCreature b = m as BaseCreature;
if (b.IsEnemy(ag))
{
AOS.Damage(b, ag, 300, 0, 0, 0, 100, 0);
}
}
}
eable.Free();
}