public void SpawnGreenGoo(Mobile target) { Map map = this.Map; if (map == null) { return; } int newGreenGoo = Utility.RandomMinMax(3, 6); for (int i = 0; i < newGreenGoo; ++i) { GooeyMaggots goo = new GooeyMaggots(); goo.Team = this.Team; goo.FightMode = FightMode.Closest; bool validLocation = false; Point3D loc = this.Location; for (int j = 0; !validLocation && j < 10; ++j) { int x = this.X + Utility.Random(3) - 1; int y = this.Y + Utility.Random(3) - 1; int z = map.GetAverageZ(x, y); if (validLocation = map.CanFit(x, y, this.Z, 16, false, false)) { loc = new Point3D(x, y, this.Z); } else if (validLocation = map.CanFit(x, y, z, 16, false, false)) { loc = new Point3D(x, y, z); } } goo.MoveToWorld(loc, map); goo.Combatant = target; } }
public InternalSelfDeleteTimer(Mobile p) : base(TimeSpan.FromMinutes(3)) { Priority = TimerPriority.FiveSeconds; creature = ((GooeyMaggots)p); }