This commit is contained in:
parent
b2349aed25
commit
d03acbffaf
15 changed files with 81 additions and 30 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue