This commit is contained in:
mark 2009-06-07 04:21:58 +00:00
parent b2349aed25
commit d03acbffaf
15 changed files with 81 additions and 30 deletions

View file

@ -62,6 +62,24 @@ namespace Server.Spells.Seventh
return SpellHelper.CheckTravel( Caster, TravelCheckType.GateFrom );
}
private bool GateExistsAt(Map map, Point3D loc )
{
bool _gateFound = false;
IPooledEnumerable eable = map.GetItemsInRange( loc, 0 );
foreach ( Item item in eable )
{
if ( item is Moongate || item is PublicMoongate )
{
_gateFound = true;
break;
}
}
eable.Free();
return _gateFound;
}
public void Effect( Point3D loc, Map map, bool checkMulti )
{
if ( Factions.Sigil.ExistsOn( Caster ) )
@ -102,6 +120,10 @@ namespace Server.Spells.Seventh
{
Caster.SendLocalizedMessage( 501942 ); // That location is blocked.
}
else if ( Core.SE && ( GateExistsAt( map, loc ) || GateExistsAt( Caster.Map, Caster.Location ) ) ) // SE restricted stacking gates
{
Caster.SendLocalizedMessage( 1071242 ); // There is already a gate there.
}
else if ( CheckSequence() )
{
Caster.SendLocalizedMessage( 501024 ); // You open a magical gate to another location