ModernUO/Scripts/Misc/MondainsLegacy.cs
eos a0e13d5007 - 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.
2012-03-07 18:59:52 +00:00

85 lines
No EOL
2.7 KiB
C#

using System;
using Server;
using Server.Items;
using Server.Mobiles;
namespace Server
{
public static class MondainsLegacy
{
public static Type[] Artifacts { get { return m_Artifacts; } }
private static Type[] m_Artifacts = new Type[]
{
typeof( AegisOfGrace ), typeof( BladeDance ), typeof( BloodwoodSpirit ), typeof( Bonesmasher ),
typeof( Boomstick ), typeof( BrightsightLenses ), typeof( FeyLeggings ), typeof( FleshRipper ),
typeof( HelmOfSwiftness ), typeof( PadsOfTheCuSidhe ), typeof( QuiverOfRage ), typeof( QuiverOfElements ),
typeof( RaedsGlory ), typeof( RighteousAnger ), typeof( RobeOfTheEclipse ), typeof( RobeOfTheEquinox ),
typeof( SoulSeeker ), typeof( TalonBite ), typeof( TotemOfVoid ), typeof( WildfireBow ),
typeof( Windsong )
};
public static bool CheckArtifactChance( Mobile m, BaseCreature bc )
{
if ( !Core.ML )
return false;
return Paragon.CheckArtifactChance( m, bc );
}
public static void GiveArtifactTo( Mobile m )
{
Item item = Activator.CreateInstance( m_Artifacts[Utility.Random( m_Artifacts.Length )] ) as Item;
if ( item == null )
return;
if ( m.AddToBackpack( item ) )
{
m.SendLocalizedMessage( 1072223 ); // An item has been placed in your backpack.
m.SendLocalizedMessage( 1062317 ); // For your valor in combating the fallen beast, a special artifact has been bestowed on you.
}
else if ( m.BankBox.TryDropItem( m, item, false ) )
{
m.SendLocalizedMessage( 1072224 ); // An item has been placed in your bank box.
m.SendLocalizedMessage( 1062317 ); // For your valor in combating the fallen beast, a special artifact has been bestowed on you.
}
else
{
// Item was placed at feet by m.AddToBackpack
m.SendLocalizedMessage( 1072523 ); // You find an artifact, but your backpack and bank are too full to hold it.
}
}
public static bool CheckML( Mobile from )
{
return CheckML( from, true );
}
public static bool CheckML( Mobile from, bool message )
{
if ( from == null || from.NetState == null )
return false;
if ( from.NetState.SupportsExpansion( Expansion.ML ) )
return true;
if ( message )
from.SendLocalizedMessage( 1072791 ); // You must upgrade to Mondain's Legacy in order to use that item.
return false;
}
public static bool IsMLRegion( Region region )
{
return region.IsPartOf( "Twisted Weald" )
|| region.IsPartOf( "Sanctuary" )
|| region.IsPartOf( "Prism of Light" )
|| region.IsPartOf( "Citadel" )
|| region.IsPartOf( "Bedlam" )
|| region.IsPartOf( "Blighted Grove" )
|| region.IsPartOf( "Painted Caves" )
|| region.IsPartOf( "Palace of Paroxysmus" );
}
}
}