public void DoMaster() { Map map = this.Map; if (map == null) { return; } int newSpawned = 25; for (int i = 0; i < newSpawned; ++i) { ShadowMinion spawn = new ShadowMinion(); spawn.Team = this.Team; spawn.Map = map; bool validLocation = false; Point3D loc = this.Location; for (int j = 0; !validLocation && j < 10; ++j) { int x = X + Utility.Random(5); int y = Y + Utility.Random(5); int z = map.GetAverageZ(x, y); if (validLocation = map.CanFit(x, y, this.Z, 16, false, false)) { loc = new Point3D(x, y, Z); } else if (validLocation = map.CanFit(x, y, z, 16, false, false)) { loc = new Point3D(x, y, z); } } spawn.MoveToWorld(loc, map); } DarkMaster ethy = new DarkMaster(); ethy.Hits = this.Hits; ethy.Int = this.Int - 5000; ethy.Hidden = true; ethy.Team = this.Team; ethy.Blessed = true; ethy.Freeze(TimeSpan.FromSeconds(30.0)); ethy.MoveToWorld(this.Location, this.Map); m_MasterActive = true; this.Delete(); }
public static DarkMaster Spawn( Point3D platLoc, Map platMap ) { if ( IdolPedestal.DarkMasterActive() ) return null; SpawnEntry entry = m_Entries[Utility.Random( m_Entries.Length )]; DarkMaster darkmaster = new DarkMaster(); darkmaster.MoveToWorld( entry.m_Location, Map.Felucca ); darkmaster.m_GateItem = new DarkMasterGate( platLoc, platMap, entry.m_Entrance, Map.Felucca ); return darkmaster; }
public static DarkMaster Spawn(Point3D platLoc, Map platMap) { if (IdolPedestal.DarkMasterActive()) { return(null); } SpawnEntry entry = m_Entries[Utility.Random(m_Entries.Length)]; DarkMaster darkmaster = new DarkMaster(); darkmaster.MoveToWorld(entry.m_Location, Map.Felucca); darkmaster.m_GateItem = new DarkMasterGate(platLoc, platMap, entry.m_Entrance, Map.Felucca); return(darkmaster); }
public void DoMaster() { Map map = this.Map; if ( map == null ) return; int newSpawned = 25; for ( int i = 0; i < newSpawned; ++i ) { ShadowMinion spawn = new ShadowMinion(); spawn.Team = this.Team; spawn.Map = map; bool validLocation = false; Point3D loc = this.Location; for ( int j = 0; !validLocation && j < 10; ++j ) { int x = X + Utility.Random( 5 ); int y = Y + Utility.Random( 5 ); int z = map.GetAverageZ( x, y ); if ( validLocation = map.CanFit( x, y, this.Z, 16, false, false ) ) loc = new Point3D( x, y, Z ); else if ( validLocation = map.CanFit( x, y, z, 16, false, false ) ) loc = new Point3D( x, y, z ); } spawn.MoveToWorld( loc, map ); } DarkMaster ethy = new DarkMaster(); ethy.Hits = this.Hits; ethy.Int = this.Int - 5000; ethy.Hidden = true; ethy.Team = this.Team; ethy.Blessed = true; ethy.Freeze(TimeSpan.FromSeconds(30.0)); ethy.MoveToWorld( this.Location, this.Map ); this.Delete(); }