ModernUO/Scripts/Misc/MondainsLegacy.cs
eos 9023acf7b4 - Fixed HelpInfo not displaying the availability of the Global modifier.
- The Most Knowledge Person, The Robe Of Britannia "Ari" and Embroidered Oak Leaf Cloak can now be repaired.
- Added TimeoutTeleporter.
- Fixed weapon attributes on elven glasses not being counted.
- Added Labyrinth to the ML regions list.
- Fixed a bug in Ilhenir's StainedOoze causing the effect to never stop.
- StainedOoze will now only damage equipment until the equipment's hitpoints reaches single digits.
- Added an overhead message to the corrosive effect of StainedOoze.
- Remaining StainedOoze will now decay properly after a server reboot.
- General rewriting of the StainedOoze code.
- Fixed Changeling sounds.
- Fixed Irk, Guile and Spite morphing back into a paragon hue.
- Changeling cloned items are now deleted upon the Changeling's deletion, instead of being cleaned up at a server boot.
- Fixed talisman protection property.
2012-03-18 03:29:21 +00:00

86 lines
No EOL
2.8 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" )
|| region.IsPartOf( "Labyrinth" );
}
}
}