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

@ -14,7 +14,7 @@ namespace Server.Misc
public static void Initialize()
{
// Register our speech handler
if( Enabled )
if ( Enabled )
EventSink.Speech += new SpeechEventHandler( EventSink_Speech );
}
@ -22,7 +22,7 @@ namespace Server.Misc
{
if ( !args.Handled )
{
if( Insensitive.StartsWith( args.Speech, "set" ) )
if ( Insensitive.StartsWith( args.Speech, "set" ) )
{
Mobile from = args.Mobile;
@ -49,7 +49,7 @@ namespace Server.Misc
}
}
}
else if( Insensitive.Equals( args.Speech, "help" ) )
else if ( Insensitive.Equals( args.Speech, "help" ) )
{
args.Mobile.SendGump( new TCHelpGump() );
@ -122,7 +122,7 @@ namespace Server.Misc
{
SkillName index;
if( !Enum.TryParse( name, true, out index ) || (!Core.SE && (int)index > 51) || (!Core.AOS && (int)index > 48) )
if ( !Enum.TryParse( name, true, out index ) || (!Core.SE && (int)index > 51) || (!Core.AOS && (int)index > 48) )
{
from.SendLocalizedMessage( 1005631 ); // You have specified an invalid skill to set.
return;
@ -157,7 +157,7 @@ namespace Server.Misc
}
}
public class TCHelpGump : Gump
{
public TCHelpGump() : base( 40, 40 )
@ -233,4 +233,4 @@ namespace Server.Misc
}
}
}
}
}

View file

@ -48,14 +48,14 @@ namespace Server.Items
{
Container pack = from.Backpack;
if( pack != null && pack.ConsumeTotal( typeof( Gold ), 250 ) )
if ( pack != null && pack.ConsumeTotal( typeof( Gold ), 250 ) )
{
m_GamblePot += 150;
InvalidateProperties();
int roll = Utility.Random( 1200 );
if( roll == 0 ) // Jackpot
if ( roll == 0 ) // Jackpot
{
int maxCheck = 1000000;
@ -72,17 +72,17 @@ namespace Server.Items
m_GamblePot = 2500;
}
else if( roll <= 20 ) // Chance for a regbag
else if ( roll <= 20 ) // Chance for a regbag
{
from.SendMessage( 0x35, "You win a bag of reagents!" );
from.AddToBackpack( new BagOfReagents( 50 ) );
}
else if( roll <= 40 ) // Chance for gold
else if ( roll <= 40 ) // Chance for gold
{
from.SendMessage( 0x35, "You win 1500gp!" );
from.AddToBackpack( new BankCheck( 1500 ) );
}
else if( roll <= 100 ) // Another chance for gold
else if ( roll <= 100 ) // Another chance for gold
{
from.SendMessage( 0x35, "You win 1000gp!" );
from.AddToBackpack( new BankCheck( 1000 ) );
@ -129,4 +129,4 @@ namespace Server.Items
}
}
}
}
}