- Future ML craftables added to the special repair list until the craft system is updated.

- Items can now be repaired while wearing them.
- Items can now be fortified while wearing them.
- Fixed repair deed messages not sending.
- Sound effect added to powder of fortifying.
- Map issue for fishing and SOSs fixed, where it would not allow fishing in empty resource banks when not on the target SOS map.
- Added proximity spawner.
- Improved spawner mouseover menu, now also shows types set on the spawner which are not yet spawned.
- Fixed spawners only deleting half of their spawned objects when deleted.
- Added the ability to set TextDefinition objects in the props gump.
- WaitTeleporters now round delays to nearest in the remaining time messages.
- Updated TextDefinition to be more usable; made it parsable from string and added safe serialization/deserialization methods.
- Improved checking whether a mobile can flee.
- Monsters that give ML minor artifacts will no longer flee when low on hits (like paragons).
- Monsters that give ML minor artifacts will no longer spawn as paragon.
- Fixed issue with pets not eating certain foods.
- AI and targeting fixes for Red Death, Pyre and Swoop.
- Fame and karma added to Rend.
- Swoop corrected to have 0 karma.
- Stat and skill tweaks for Putrefier.
- Changelings will no longer show their fame title when morphed.
- Added travel restrictions for ML dungeons.
- Fixed issue of travel restriction message displaying twice.
- Monster teleporting is no longer affected by region travel restrictions.
This commit is contained in:
eos 2012-03-07 18:59:52 +00:00
parent 4bcde77cc2
commit a0e13d5007
25 changed files with 432 additions and 140 deletions

View file

@ -556,29 +556,21 @@ namespace Server.Spells
new TravelValidator( IsLampRoom ),
new TravelValidator( IsGuardianRoom ),
new TravelValidator( IsHeartwood ),
new TravelValidator( IsMLDungeon )
};
private static bool[,] m_Rules = new bool[,]
{
/*T2A(Fel) Ilshenar Wind(Tram), Wind(Fel), Dungeons(Fel), Solen(Tram), Solen(Fel), CrystalCave(Malas), Gauntlet(Malas), Gauntlet(Ferry), Stronghold, ChampionSpawn, Dungeons(Tokuno[Malas]), LampRoom(Doom), GuardianRoom(Doom), Heartwood */
/* Recall From */ { false, true, true, false, false, true, false, false, false, false, true, false, true, false, false, false },
/* Recall To */ { false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false },
/* Gate From */ { false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false },
/* Gate To */ { false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false },
/* Mark In */ { false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false },
/* Tele From */ { true, true, true, true, true, true, true, false, true, true, false, true, true, true, true, false },
/* Tele To */ { true, true, true, true, true, true, true, false, true, false, false, true, true, true, true, false },
/*T2A(Fel) Ilshenar Wind(Tram), Wind(Fel), Dungeons(Fel), Solen(Tram), Solen(Fel), CrystalCave(Malas), Gauntlet(Malas), Gauntlet(Ferry), Stronghold, ChampionSpawn, Dungeons(Tokuno[Malas]), LampRoom(Doom), GuardianRoom(Doom), Heartwood, MLDungeons */
/* Recall From */ { false, true, true, false, false, true, false, false, false, false, true, false, true, false, false, false, false },
/* Recall To */ { false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false },
/* Gate From */ { false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false },
/* Gate To */ { false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false },
/* Mark In */ { false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false },
/* Tele From */ { true, true, true, true, true, true, true, false, true, true, false, true, true, true, true, false, true },
/* Tele To */ { true, true, true, true, true, true, true, false, true, false, false, true, true, true, true, false, false },
};
public static bool CheckTravel( Mobile caster, TravelCheckType type )
{
if( CheckTravel( caster, caster.Map, caster.Location, type ) )
return true;
SendInvalidMessage( caster, type );
return false;
}
public static void SendInvalidMessage( Mobile caster, TravelCheckType type )
{
if( type == TravelCheckType.RecallTo || type == TravelCheckType.GateTo )
@ -589,6 +581,11 @@ namespace Server.Spells
caster.SendLocalizedMessage( 501802 ); // Thy spell doth not appear to work...
}
public static bool CheckTravel( Mobile caster, TravelCheckType type )
{
return CheckTravel( caster, caster.Map, caster.Location, type );
}
public static bool CheckTravel( Map map, Point3D loc, TravelCheckType type )
{
return CheckTravel( null, map, loc, type );
@ -613,6 +610,15 @@ namespace Server.Spells
return false;
}
// Always allow monsters to teleport
if ( caster is BaseCreature && ( type == TravelCheckType.TeleportTo || type == TravelCheckType.TeleportFrom ) )
{
BaseCreature bc = (BaseCreature)caster;
if ( !bc.Controlled && !bc.Summoned )
return true;
}
m_TravelCaster = caster;
m_TravelType = type;
@ -689,17 +695,15 @@ namespace Server.Spells
public static bool IsCrystalCave( Map map, Point3D loc )
{
if( map != Map.Malas )
if( map != Map.Malas || loc.Z >= -80 )
return false;
int x = loc.X, y = loc.Y, z = loc.Z;
int x = loc.X, y = loc.Y;
bool r1 = (x >= 1182 && y >= 437 && x < 1211 && y < 470);
bool r2 = (x >= 1156 && y >= 470 && x < 1211 && y < 503);
bool r3 = (x >= 1176 && y >= 503 && x < 1208 && y < 509);
bool r4 = (x >= 1188 && y >= 509 && x < 1201 && y < 513);
return (z < -80 && (r1 || r2 || r3 || r4));
return ( x >= 1182 && y >= 437 && x < 1211 && y < 470 )
|| ( x >= 1156 && y >= 470 && x < 1211 && y < 503 )
|| ( x >= 1176 && y >= 503 && x < 1208 && y < 509 )
|| ( x >= 1188 && y >= 509 && x < 1201 && y < 513 );
}
public static bool IsFactionStronghold( Map map, Point3D loc )
@ -786,6 +790,11 @@ namespace Server.Spells
return (map == Map.Trammel || map == Map.Felucca) && (x >= 6911 && y >= 254 && x < 7167 && y < 511);
}
public static bool IsMLDungeon( Map map, Point3D loc )
{
return MondainsLegacy.IsMLRegion( Region.Find( loc, map ) );
}
public static bool IsInvalid( Map map, Point3D loc )
{
if( map == null || map == Map.Internal )