This commit is contained in:
mark 2009-02-19 08:27:47 +00:00
parent e17e4c9304
commit 49b5e96850
9 changed files with 52 additions and 27 deletions

View file

@ -1,11 +1,11 @@
using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using Server;
using Server.Items;
using Server.Engines.Quests.Haven;
using Server.Engines.Quests.Necro;
using System.Collections.Generic;
namespace Server.Commands
{

View file

@ -145,7 +145,6 @@ namespace Server.Engines.Craft
SetNeededExpansion( index, Expansion.SE );
}
// Pants
#endregion
#region Pants

View file

@ -99,6 +99,8 @@ namespace Server
protector.SendLocalizedMessage( 1049436 ); // That player cannot be protected.
else if ( pm.JusticeProtectors.Count > 0 )
protector.SendLocalizedMessage( 1049369 ); // You cannot protect that player right now.
else if ( pm.HasGump( typeof( AcceptProtectorGump ) ) )
protector.SendLocalizedMessage( 1049369 ); // You cannot protect that player right now.
else
pm.SendGump( new AcceptProtectorGump( protector, pm ) );
}

View file

@ -1200,10 +1200,13 @@ namespace Server.Gumps
{
if ( isOwner && m_House.MovingCrate == null && m_House.InternalizedVendors.Count == 0 )
{
if( !Guilds.Guild.NewGuildSystem && m_House.FindGuildstone() != null )
if( !Guilds.Guild.NewGuildSystem && m_House.FindGuildstone() != null ) {
from.SendLocalizedMessage( 501389 ); // You cannot redeed a house with a guildstone inside.
else
}
else {
from.CloseGump( typeof( HouseDemolishGump ) );
from.SendGump( new HouseDemolishGump( from, m_House ) );
}
}
break;

View file

@ -156,7 +156,6 @@ namespace Server.Gumps
}
}
public class NewPolymorphGump : Gump
{
private static readonly PolymorphEntry[] m_Entries = new PolymorphEntry[]
@ -181,7 +180,6 @@ namespace Server.Gumps
PolymorphEntry.Daemon
};
private Mobile m_Caster;
private Item m_Scroll;

View file

@ -48,6 +48,11 @@ namespace Server.Gumps
{
}
public ResurrectGump( Mobile owner, Mobile healer, ResurrectMessage msg )
: this( owner, healer, msg, false )
{
}
public ResurrectGump( Mobile owner, Mobile healer, ResurrectMessage msg, bool fromSacrifice )
: this( owner, healer, msg, fromSacrifice, 0.0 )
{
@ -138,6 +143,8 @@ namespace Server.Gumps
{
Mobile from = state.Mobile;
from.CloseGump( typeof( ResurrectGump ) );
if( info.ButtonID == 1 || info.ButtonID == 2 )
{
if( from.Map == null || !from.Map.CanFit( from.Location, 16, false, false ) )
@ -241,4 +248,4 @@ namespace Server.Gumps
}
}
}
}
}

View file

@ -1719,4 +1719,4 @@ namespace Server.Mobiles
Timer.DelayCall( TimeSpan.Zero, new TimerCallback( Delete ) );
}
}
}
}

View file

@ -2833,20 +2833,6 @@ namespace Server.Multis
public override void OnDelete()
{
/*Map map = this.Map;
if ( map != null )
{
MultiComponentList mcl = Components;
IPooledEnumerable eable = map.GetItemsInBounds( new Rectangle2D( X + mcl.Min.X, Y + mcl.Min.Y, mcl.Width, mcl.Height ) );
foreach ( Item item in eable )
if ( item is Guildstone && Contains( item ) )
item.Delete();
eable.Free();
}*/
RestoreRelocatedEntities();
new FixColumnTimer( this ).Start();

View file

@ -2,7 +2,11 @@ using System;
using System.Collections;
using System.Collections.Generic;
using Server;
using Server.Guilds;
using Server.Items;
using Server.Misc;
using Server.Regions;
using Server.Spells;
namespace Server.Multis
{
@ -56,8 +60,8 @@ namespace Server.Multis
if ( from.AccessLevel >= AccessLevel.GameMaster )
return HousePlacementResult.Valid; // Staff can place anywhere
if ( map == Map.Ilshenar )
return HousePlacementResult.BadRegion; // No houses in Ilshenar
if ( map == Map.Ilshenar || SpellHelper.IsFeluccaT2A( map, center ) )
return HousePlacementResult.BadRegion; // No houses in Ilshenar/T2A
NoHousingRegion noHousingRegion = (NoHousingRegion) Region.Find( center, map ).GetRegion( typeof( NoHousingRegion ) );
@ -319,9 +323,36 @@ namespace Server.Multis
}
}
List<Sector> _sectors = new List<Sector>();
List<BaseHouse> _houses = new List<BaseHouse>();
for ( int i = 0; i < yard.Count; i++ ) {
Sector sector = map.GetSector( yard[i] );
if ( !_sectors.Contains( sector ) ) {
_sectors.Add( sector );
if ( sector.Multis != null ) {
for ( int j = 0; j < sector.Multis.Count; j++ ) {
if ( sector.Multis[j] is BaseHouse ) {
BaseHouse _house = (BaseHouse)sector.Multis[j];
if ( !_houses.Contains( _house ) ) {
_houses.Add( _house );
}
}
}
}
}
}
for ( int i = 0; i < yard.Count; ++i )
{
Point2D yardPoint = yard[i];
foreach ( BaseHouse b in _houses ) {
if ( b.Contains( yard[i] ) )
return HousePlacementResult.BadStatic; // Broke rule #3
}
/*Point2D yardPoint = yard[i];
IPooledEnumerable eable = map.GetMultiTilesAt( yardPoint.X, yardPoint.Y );
@ -337,11 +368,10 @@ namespace Server.Multis
}
}
eable.Free();
eable.Free();*/
}
return HousePlacementResult.Valid;
}
}
}