public void SpawnReaper(Mobile target) { int reap = 0; foreach (Mobile m in this.GetMobilesInRange(20)) { if (m is Reaper) { ++reap; } } if (reap < 5) { BaseCreature reaper = new Reaper(); Map map = target.Map; Point3D loc = this.Location; bool validLocation = false; for (int j = 0; !validLocation && j < 10; ++j) { int x = this.X + 5; int y = this.Y + 5; int z = map.GetAverageZ(x, y); } reaper.MoveToWorld(loc, map); } }
public void SpawnReaper( Mobile target ) { int reap = 0; foreach ( Mobile m in this.GetMobilesInRange( 20 ) ) { if ( m is Reaper ) ++reap; } if ( reap < 5 ) { BaseCreature reaper = new Reaper(); Map map = target.Map; Point3D loc = this.Location; bool validLocation = false; for ( int j = 0; !validLocation && j < 10; ++j ) { int x = this.X + 5; int y = this.Y + 5; int z = map.GetAverageZ( x, y ); } reaper.MoveToWorld( loc, map ); } }