Fixes casting checks
This commit is contained in:
parent
7ea00fbf4f
commit
03dd5f1926
431 changed files with 5616 additions and 6250 deletions
|
|
@ -119,7 +119,7 @@ namespace Server.SkillHandlers
|
|||
|
||||
public virtual void ResetPacify( object obj )
|
||||
{
|
||||
if( obj is BaseCreature )
|
||||
if ( obj is BaseCreature )
|
||||
{
|
||||
((BaseCreature)obj).BardPacified = true;
|
||||
}
|
||||
|
|
@ -192,7 +192,7 @@ namespace Server.SkillHandlers
|
|||
creature.PlaySound( creature.GetAngerSound() );
|
||||
creature.Direction = creature.GetDirectionTo( from );
|
||||
|
||||
if( creature.BardPacified && Utility.RandomDouble() > .24)
|
||||
if ( creature.BardPacified && Utility.RandomDouble() > .24)
|
||||
{
|
||||
Timer.DelayCall( TimeSpan.FromSeconds( 2.0 ), new TimerStateCallback( ResetPacify ), creature );
|
||||
}
|
||||
|
|
@ -400,7 +400,7 @@ namespace Server.SkillHandlers
|
|||
if ( p == null )
|
||||
return false;
|
||||
|
||||
if( m_Creature.InRange( new Point3D( p ), 1 ) )
|
||||
if ( m_Creature.InRange( new Point3D( p ), 1 ) )
|
||||
return true;
|
||||
|
||||
MovementPath path = new MovementPath( m_Creature, new Point3D( p ) );
|
||||
|
|
@ -409,4 +409,4 @@ namespace Server.SkillHandlers
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -93,9 +93,9 @@ namespace Server.SkillHandlers
|
|||
from.SendLocalizedMessage( 500353 ); // You are not certain...
|
||||
}
|
||||
}
|
||||
else if(targeted is BaseArmor)
|
||||
else if (targeted is BaseArmor)
|
||||
{
|
||||
if( from.CheckTargetSkill(SkillName.ArmsLore, targeted, 0, 100) )
|
||||
if ( from.CheckTargetSkill(SkillName.ArmsLore, targeted, 0, 100) )
|
||||
{
|
||||
BaseArmor arm = (BaseArmor)targeted;
|
||||
|
||||
|
|
@ -164,4 +164,4 @@ namespace Server.SkillHandlers
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -138,7 +138,7 @@ namespace Server.SkillHandlers
|
|||
|
||||
foreach ( Item item in Caster.GetItemsInRange( 3 ) )
|
||||
{
|
||||
if( item is Corpse && !( (Corpse)item ).Channeled )
|
||||
if ( item is Corpse && !( (Corpse)item ).Channeled )
|
||||
{
|
||||
toChannel = (Corpse)item;
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ namespace Server.SkillHandlers
|
|||
}
|
||||
#region Sigils
|
||||
else if ( toSteal is Sigil )
|
||||
{
|
||||
{
|
||||
PlayerState pl = PlayerState.Find( m_Thief );
|
||||
Faction faction = ( pl == null ? null : pl.Faction );
|
||||
|
||||
|
|
@ -116,9 +116,9 @@ namespace Server.SkillHandlers
|
|||
}
|
||||
else if ( !m_Thief.CanBeginAction( typeof( PolymorphSpell ) ) )
|
||||
{
|
||||
m_Thief.SendLocalizedMessage( 1010582 ); // You cannot steal the sigil while polymorphed
|
||||
m_Thief.SendLocalizedMessage( 1010582 ); // You cannot steal the sigil while polymorphed
|
||||
}
|
||||
else if( TransformationSpellHelper.UnderTransformation( m_Thief ) )
|
||||
else if ( TransformationSpellHelper.UnderTransformation( m_Thief ) )
|
||||
{
|
||||
m_Thief.SendLocalizedMessage( 1061622 ); // You cannot steal the sigil while in that form.
|
||||
}
|
||||
|
|
@ -299,7 +299,7 @@ namespace Server.SkillHandlers
|
|||
{
|
||||
root = ((Item)target).RootParent;
|
||||
stolen = TryStealItem( (Item)target, ref caught );
|
||||
}
|
||||
}
|
||||
else if ( target is Mobile )
|
||||
{
|
||||
Container pack = ((Mobile)target).Backpack;
|
||||
|
|
@ -311,8 +311,8 @@ namespace Server.SkillHandlers
|
|||
root = target;
|
||||
stolen = TryStealItem( pack.Items[randomIndex], ref caught );
|
||||
}
|
||||
}
|
||||
else
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Thief.SendLocalizedMessage( 502710 ); // You can't steal that!
|
||||
}
|
||||
|
|
@ -488,4 +488,4 @@ namespace Server.SkillHandlers
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ namespace Server.SkillHandlers
|
|||
|
||||
public static int GetArmorRating( Mobile m )
|
||||
{
|
||||
if( !Core.AOS )
|
||||
if ( !Core.AOS )
|
||||
return (int)m.ArmorRating;
|
||||
|
||||
int ar = 0;
|
||||
|
|
@ -41,16 +41,16 @@ namespace Server.SkillHandlers
|
|||
{
|
||||
BaseArmor armor = m.Items[i] as BaseArmor;
|
||||
|
||||
if( armor == null )
|
||||
if ( armor == null )
|
||||
continue;
|
||||
|
||||
int materialType = (int)armor.MaterialType;
|
||||
int bodyPosition = (int)armor.BodyPosition;
|
||||
|
||||
if( materialType >= m_ArmorTable.GetLength( 0 ) || bodyPosition >= m_ArmorTable.GetLength( 1 ) )
|
||||
if ( materialType >= m_ArmorTable.GetLength( 0 ) || bodyPosition >= m_ArmorTable.GetLength( 1 ) )
|
||||
continue;
|
||||
|
||||
if( armor.ArmorAttributes.MageArmor == 0 )
|
||||
if ( armor.ArmorAttributes.MageArmor == 0 )
|
||||
ar += m_ArmorTable[materialType, bodyPosition];
|
||||
}
|
||||
|
||||
|
|
@ -68,7 +68,7 @@ namespace Server.SkillHandlers
|
|||
m.SendLocalizedMessage( 502726 ); // You are not hidden well enough. Become better at hiding.
|
||||
m.RevealingAction();
|
||||
}
|
||||
else if( !m.CanBeginAction( typeof( Stealth ) ) )
|
||||
else if ( !m.CanBeginAction( typeof( Stealth ) ) )
|
||||
{
|
||||
m.SendLocalizedMessage( 1063086 ); // You cannot use this skill right now.
|
||||
m.RevealingAction();
|
||||
|
|
@ -77,23 +77,23 @@ namespace Server.SkillHandlers
|
|||
{
|
||||
int armorRating = GetArmorRating( m );
|
||||
|
||||
if( armorRating >= (Core.AOS ? 42 : 26) ) //I have a hunch '42' was chosen cause someone's a fan of DNA
|
||||
if ( armorRating >= (Core.AOS ? 42 : 26) ) //I have a hunch '42' was chosen cause someone's a fan of DNA
|
||||
{
|
||||
m.SendLocalizedMessage( 502727 ); // You could not hope to move quietly wearing this much armor.
|
||||
m.RevealingAction();
|
||||
}
|
||||
else if( m.CheckSkill( SkillName.Stealth, -20.0 + (armorRating * 2), (Core.AOS ? 60.0 : 80.0) + (armorRating * 2) ) )
|
||||
else if ( m.CheckSkill( SkillName.Stealth, -20.0 + (armorRating * 2), (Core.AOS ? 60.0 : 80.0) + (armorRating * 2) ) )
|
||||
{
|
||||
int steps = (int)(m.Skills[SkillName.Stealth].Value / (Core.AOS ? 5.0 : 10.0));
|
||||
|
||||
if( steps < 1 )
|
||||
if ( steps < 1 )
|
||||
steps = 1;
|
||||
|
||||
m.AllowedStealthSteps = steps;
|
||||
|
||||
PlayerMobile pm = m as PlayerMobile; // IsStealthing should be moved to Server.Mobiles
|
||||
|
||||
if( pm != null )
|
||||
if ( pm != null )
|
||||
pm.IsStealthing = true;
|
||||
|
||||
m.SendLocalizedMessage( 502730 ); // You begin to move quietly.
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ namespace Server.SkillHandlers
|
|||
|
||||
m_Table.Remove( tracker ); //Reset as of Pub 40, counting it as bug for Core.SE.
|
||||
|
||||
if( Core.ML )
|
||||
if ( Core.ML )
|
||||
return Math.Min( bonus, 10 + tracker.Skills.Tracking.Value/10 );
|
||||
|
||||
return bonus;
|
||||
|
|
@ -212,7 +212,7 @@ namespace Server.SkillHandlers
|
|||
int tracking = from.Skills[SkillName.Tracking].Fixed;
|
||||
int detectHidden = from.Skills[SkillName.DetectHidden].Fixed;
|
||||
|
||||
if( Core.ML && m.Race == Race.Elf )
|
||||
if ( Core.ML && m.Race == Race.Elf )
|
||||
tracking /= 2; //The 'Guide' says that it requires twice as Much tracking SKILL to track an elf. Not the total difficulty to track.
|
||||
|
||||
int hiding = m.Skills[SkillName.Hiding].Fixed;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue