Fixes casting checks

This commit is contained in:
Kamron Batman 2018-08-19 01:38:55 +08:00
parent 7ea00fbf4f
commit 03dd5f1926
431 changed files with 5616 additions and 6250 deletions

View file

@ -155,15 +155,15 @@ namespace Server.Items
public override void OnDoubleClick( Mobile from )
{
if( from.Region.IsPartOf( typeof( Regions.Jail ) ) )
if ( from.Region.IsPartOf( typeof( Regions.Jail ) ) )
{
from.SendMessage( "You may not do that in jail." );
}
else if( !this.IsChildOf( from.Backpack ) )
else if ( !this.IsChildOf( from.Backpack ) )
{
MessageHelper.SendLocalizedMessageTo(this, from, 1062334, 0x59); // The bag of sending must be in your backpack.
}
else if( this.Charges == 0 )
else if ( this.Charges == 0 )
{
MessageHelper.SendLocalizedMessageTo( this, from, 1042544, 0x59 ); // This item is out of charges.
}
@ -187,11 +187,11 @@ namespace Server.Items
if ( m_Bag.Deleted )
return;
if( from.Region.IsPartOf( typeof( Regions.Jail ) ) )
if ( from.Region.IsPartOf( typeof( Regions.Jail ) ) )
{
from.SendMessage( "You may not do that in jail." );
}
else if( !m_Bag.IsChildOf( from.Backpack ) )
else if ( !m_Bag.IsChildOf( from.Backpack ) )
{
MessageHelper.SendLocalizedMessageTo(m_Bag, from, 1062334, 0x59); // The bag of sending must be in your backpack. 1054107 is gone from client, using generic response
}

View file

@ -154,7 +154,7 @@ namespace Server.Items
AnimalFormContext animalContext = AnimalForm.GetContext( from );
if( Core.ML && animalContext != null )
if ( Core.ML && animalContext != null )
{
from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1080073 ); // You cannot use a Crystal Ball of Pet Summoning while in animal form.
return;
@ -266,7 +266,7 @@ namespace Server.Items
}
else
{
if( Core.ML )
if ( Core.ML )
new PetSummoningSpell( this, from ).Cast();
else
SummonPet( from );
@ -436,7 +436,7 @@ namespace Server.Items
public override bool CheckDisturb( DisturbType type, bool checkFirst, bool resistable )
{
if( type == DisturbType.EquipRequest || type == DisturbType.UseRequest/* || type == DisturbType.Hurt*/ )
if ( type == DisturbType.EquipRequest || type == DisturbType.UseRequest/* || type == DisturbType.Hurt*/ )
return false;
return true;
@ -444,19 +444,19 @@ namespace Server.Items
public override void DoHurtFizzle()
{
if( !m_Stop )
if ( !m_Stop )
base.DoHurtFizzle();
}
public override void DoFizzle()
{
if( !m_Stop )
if ( !m_Stop )
base.DoFizzle();
}
public override void OnDisturb( DisturbType type, bool message )
{
if( message && !m_Stop )
if ( message && !m_Stop )
Caster.SendLocalizedMessage( 1080074 ); // You have been disrupted while attempting to summon your pet!
}