This commit is contained in:
mark 2012-11-10 20:06:36 +00:00
parent 8ff1a903a0
commit 14873aaa3e
78 changed files with 360 additions and 231 deletions

View file

@ -1,6 +1,7 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using Server;
using Server.Items;
using Server.Targeting;
@ -904,7 +905,7 @@ namespace Server.Mobiles
public virtual bool DoActionCombat()
{
if ( CheckHerding() )
if ( Core.AOS && CheckHerding() )
{
m_Mobile.DebugSay( "Praise the shepherd!" );
}
@ -923,7 +924,7 @@ namespace Server.Mobiles
public virtual bool DoActionGuard()
{
if ( CheckHerding() )
if ( Core.AOS && CheckHerding() )
{
m_Mobile.DebugSay( "Praise the shepherd!" );
}
@ -1298,7 +1299,8 @@ namespace Server.Mobiles
else
{
m_Mobile.Warmode = false;
m_Mobile.CurrentSpeed = 0.1;
if ( Core.AOS )
m_Mobile.CurrentSpeed = 0.1;
}
}
}
@ -1467,7 +1469,8 @@ namespace Server.Mobiles
m_Mobile.DebugSay( "Nothing to guard from" );
m_Mobile.Warmode = false;
m_Mobile.CurrentSpeed = 0.1;
if ( Core.AOS )
m_Mobile.CurrentSpeed = 0.1;
WalkMobileRange( controlMaster, 1, false, 0, 1 );
}
@ -1484,8 +1487,13 @@ namespace Server.Mobiles
{
m_Mobile.DebugSay( "I think he might be dead. He's not anywhere around here at least. That's cool. I'm glad he's dead." );
m_Mobile.ControlTarget = m_Mobile.ControlMaster;
m_Mobile.ControlOrder = OrderType.Follow;
if ( Core.AOS ) {
m_Mobile.ControlTarget = m_Mobile.ControlMaster;
m_Mobile.ControlOrder = OrderType.Follow;
} else {
m_Mobile.ControlTarget = null;
m_Mobile.ControlOrder = OrderType.None;
}
if( m_Mobile.FightMode == FightMode.Closest || m_Mobile.FightMode == FightMode.Aggressor )
{
@ -1623,7 +1631,7 @@ namespace Server.Mobiles
Name = FriendlyNameAttribute.GetFriendlyNameFor( creature.GetType() ).ToString();
//(As Per OSI)No name. Normally, set by the ItemID of the Shrink Item unless we either explicitly set it with an Attribute, or, no lookup found
Hue = creature.Hue & 0x0FFF;
}
@ -1975,6 +1983,14 @@ namespace Server.Mobiles
if( delay < 0.0 )
delay = 0.0;
if ( double.IsNaN( delay ) ) {
using( StreamWriter op = new StreamWriter( "nan_transform.txt", true ) ) {
op.WriteLine( String.Format( "NaN in TransformMoveDelay: {0}, {1}, {2}, {3}", DateTime.Now, this.GetType().ToString(), m_Mobile == null ? "null" : m_Mobile.GetType().ToString(), m_Mobile.HitsMax ) );
}
return 1.0;
}
return delay;
}
@ -2520,7 +2536,7 @@ namespace Server.Mobiles
// Ignore players with activated honor
if ( m is PlayerMobile && ( (PlayerMobile)m ).HonorActive && !( m_Mobile.Combatant == m ))
continue;
if( acqType == FightMode.Aggressor || acqType == FightMode.Evil )
{
// Only acquire this mobile if it attacked us, or if it's evil.
@ -2542,7 +2558,7 @@ namespace Server.Mobiles
if( m is BaseCreature && ((BaseCreature)m).Controlled && ((BaseCreature)m).ControlMaster != null )
bValid = ( ((BaseCreature)m).ControlMaster.Karma < 0 );
else
bValid = ( m.Karma < 0 );
bValid = ( (Core.AOS || m.Player) && m.Karma < 0 );
}
if ( !bValid )

View file

@ -41,7 +41,7 @@ namespace Server.Mobiles
public virtual bool IsNecromancer
{
get { return ( m_Mobile.Skills[ SkillName.Necromancy ].Value > 50 ); }
get { return ( Core.AOS && m_Mobile.Skills[ SkillName.Necromancy ].Value > 50 ); }
}
private const double HealChance = 0.10; // 10% chance to heal at gm magery
@ -385,7 +385,7 @@ namespace Server.Mobiles
}
case 5: // Paralyze them
{
if (m_Mobile.Skills[ SkillName.Magery ].Value <= 50.0)
if (c.Paralyzed || m_Mobile.Skills[ SkillName.Magery ].Value <= 50.0)
goto default;
m_Mobile.DebugSay( "Attempting to paralyze" );

View file

@ -142,7 +142,7 @@ namespace Server
typeof( FactionHenchman ), typeof( FactionMercenary ), typeof( FactionNecromancer ),
typeof( FactionSorceress ), typeof( FactionWizard ), typeof( FactionBerserker ),
typeof( FactionPaladin ), typeof( Leviathan ), typeof( FireBeetle ),
typeof( FanDancer )
typeof( FanDancer ), typeof( FactionDeathKnight )
} ),
/* Medium */
new SpeedInfo( 0.25, 0.5, new Type[]

View file

@ -187,8 +187,8 @@ namespace Server.Mobiles
if ( Core.AOS )
return;
//if ( animal.IsBonded || animal.IsDeadPet )
// return;
if ( animal.IsBonded || animal.IsDeadPet )
return;
Container pack = animal.Backpack;

View file

@ -57,7 +57,7 @@ namespace Server.Mobiles
case 8: PackItem( new BonePile() ); break;
case 9: PackItem( new BonePile() ); break;
}
if ( 0.025 > Utility.RandomDouble() )
PackItem( new GlacialStaff() );
}

View file

@ -136,7 +136,7 @@ namespace Server.Mobiles
{
base.Deserialize( reader );
int version = reader.ReadInt();
switch( version )
{
case 1:

View file

@ -137,7 +137,7 @@ namespace Server.Mobiles
{
base.Deserialize( reader );
int version = reader.ReadInt();
switch( version )
{
case 1:

View file

@ -136,7 +136,7 @@ namespace Server.Mobiles
{
base.Deserialize( reader );
int version = reader.ReadInt();
switch( version )
{
case 1:

View file

@ -136,7 +136,7 @@ namespace Server.Mobiles
{
base.Deserialize( reader );
int version = reader.ReadInt();
switch( version )
{
case 1:

View file

@ -46,7 +46,7 @@ namespace Server.Mobiles
Fame = 1000;
Karma = -1000;
PackReg( 10, 15 );
PackItem( new Bandage( Utility.RandomMinMax( 1, 15 ) ) );

View file

@ -40,7 +40,7 @@ namespace Server.Mobiles
Karma = -3000;
VirtualArmor = 40;
switch ( Utility.Random( 6 ) )
{
case 0: PackItem( new PlateArms() ); break;

View file

@ -37,7 +37,7 @@ namespace Server.Mobiles
Karma = -600;
VirtualArmor = 18;
switch ( Utility.Random( 10 ))
{
case 0: PackItem( new LeftArm() ); break;

View file

@ -97,7 +97,7 @@ namespace Server.Mobiles
while ( spirtsOrVortexes.Count > 6 )
{
int index = Utility.Random( spirtsOrVortexes.Count );
//TODO: Confim if it's the dispel with all the pretty effects or just a Deletion of it.
//TODO: Confirm if it's the dispel with all the pretty effects or just a deletion of it.
Dispel( ( (Mobile) spirtsOrVortexes[index] ) );
spirtsOrVortexes.RemoveAt( index );
}

View file

@ -8,9 +8,9 @@ namespace Server.Mobiles
public class WhiteWyrm : BaseCreature
{
[Constructable]
public WhiteWyrm () : base( AIType.AI_Mage, FightMode.Closest, 10, 1, 0.2, 0.4 )
public WhiteWyrm() : base( AIType.AI_Mage, FightMode.Closest, 10, 1, 0.2, 0.4 )
{
Body = (Utility.Random(1,2)==1) ? 180 : 49;
Body = Utility.RandomBool() ? 180 : 49;
Name = "a white wyrm";
BaseSoundID = 362;
@ -80,9 +80,6 @@ namespace Server.Mobiles
{
base.Deserialize( reader );
int version = reader.ReadInt();
if ( Core.AOS && Body == 49 )
Body = 180;
}
}
}

View file

@ -39,7 +39,7 @@ namespace Server.Mobiles
Karma = -4000;
VirtualArmor = 40;
PackItem( new LesserPoisonPotion() );
}

View file

@ -205,7 +205,10 @@ namespace Server.Mobiles
{
base.InitBody();
Hue = 0x83F4; // hue is not random
if ( BodyValue == 0x340 || BodyValue == 0x402 )
Hue = 0;
else
Hue = 0x83F4; // hue is not random
Container pack = this.Backpack;
@ -971,14 +974,16 @@ namespace Server.Mobiles
AddButton( 130, 120, 4005, 4007, GetButtonID( 5, 0 ), GumpButtonType.Reply, 0 );
AddHtml( 170, 120, 120, 20, "Title", false, false );
AddButton( 130, 200, 4005, 4007, GetButtonID( 5, 1 ), GumpButtonType.Reply, 0 );
AddHtml( 170, 200, 120, 20, "Appearance", false, false );
if ( m_Barkeeper.BodyValue != 0x340 && m_Barkeeper.BodyValue != 0x402 ) {
AddButton( 130, 200, 4005, 4007, GetButtonID( 5, 1 ), GumpButtonType.Reply, 0 );
AddHtml( 170, 200, 120, 20, "Appearance", false, false );
AddButton( 130, 280, 4005, 4007, GetButtonID( 5, 2 ), GumpButtonType.Reply, 0 );
AddHtml( 170, 280, 120, 20, "Male / Female", false, false );
AddButton( 130, 280, 4005, 4007, GetButtonID( 5, 2 ), GumpButtonType.Reply, 0 );
AddHtml( 170, 280, 120, 20, "Male / Female", false, false );
AddButton( 338, 437, 4014, 4016, 0, GumpButtonType.Page, 1 );
AddHtml( 290, 440, 35, 40, "Back", false, false );
AddButton( 338, 437, 4014, 4016, 0, GumpButtonType.Page, 1 );
AddHtml( 290, 440, 35, 40, "Back", false, false );
}
AddItem( 580, 44, 4033 );
}

View file

@ -44,7 +44,6 @@ namespace Server.Mobiles
Add( typeof( LeatherLegs ), 40 );
Add( typeof( LeatherCap ), 5 );
Add( typeof( FemaleLeatherChest ), 18 );
Add( typeof( FemaleStuddedChest ), 25 );
Add( typeof( LeatherShorts ), 14 );

View file

@ -26,7 +26,6 @@ namespace Server.Mobiles
Add( new GenericBuyInfo( typeof( HeaterShield ), 231, 20, 0x1B76, 0 ) );
Add( new GenericBuyInfo( typeof( WoodenKiteShield ), 70, 20, 0x1B78, 0 ) );
Add( new GenericBuyInfo( typeof( MetalShield ), 121, 20, 0x1B7B, 0 ) );
}
}

View file

@ -25,7 +25,6 @@ namespace Server.Mobiles
Add( new GenericBuyInfo( typeof( PlateLegs ), 218, 20, 0x1411, 0 ) );
Add( new GenericBuyInfo( typeof( PlateArms ), 188, 20, 0x1410, 0 ) );
Add( new GenericBuyInfo( typeof( PlateGloves ), 155, 20, 0x1414, 0 ) );
}
}

View file

@ -19,14 +19,14 @@ namespace Server.Mobiles
public class InternalBuyInfo : List<GenericBuyInfo>
{
public InternalBuyInfo()
{
{
Add( new GenericBuyInfo( typeof( RefreshPotion ), 15, 10, 0xF0B, 0 ) );
Add( new GenericBuyInfo( typeof( AgilityPotion ), 15, 10, 0xF08, 0 ) );
Add( new GenericBuyInfo( typeof( NightSightPotion ), 15, 10, 0xF06, 0 ) );
Add( new GenericBuyInfo( typeof( LesserHealPotion ), 15, 10, 0xF0C, 0 ) );
Add( new GenericBuyInfo( typeof( StrengthPotion ), 15, 10, 0xF09, 0 ) );
Add( new GenericBuyInfo( typeof( LesserPoisonPotion ), 15, 10, 0xF0A, 0 ) );
Add( new GenericBuyInfo( typeof( LesserCurePotion ), 15, 10, 0xF07, 0 ) );
Add( new GenericBuyInfo( typeof( LesserCurePotion ), 15, 10, 0xF07, 0 ) );
Add( new GenericBuyInfo( typeof( LesserExplosionPotion ), 21, 10, 0xF0D, 0 ) );
Add( new GenericBuyInfo( typeof( MortarPestle ), 8, 10, 0xE9B, 0 ) );
@ -43,10 +43,6 @@ namespace Server.Mobiles
Add( new GenericBuyInfo( typeof( HeatingStand ), 2, 100, 0x1849, 0 ) );
Add( new GenericBuyInfo( "1041060", typeof( HairDye ), 37, 10, 0xEFF, 0 ) );
Add( new GenericBuyInfo( typeof( HeatingStand ), 2, 100, 0x1849, 0 ) ); // This is on OSI :-P
}
}

View file

@ -36,7 +36,7 @@ namespace Server.Mobiles
Add( new AnimalBuyInfo( 1, typeof( TimberWolf ), 768, 10, 225, 0 ) );
Add( new AnimalBuyInfo( 1, typeof( Rat ), 107, 10, 238, 0 ) );
}
}
}

View file

@ -27,7 +27,7 @@ namespace Server.Mobiles
Add( new GenericBuyInfo( typeof( Muffins ), 3, 20, 0x9EA, 0 ) );
Add( new GenericBuyInfo( typeof( SackFlour ), 3, 20, 0x1039, 0 ) );
Add( new GenericBuyInfo( typeof( FrenchBread ), 5, 20, 0x98C, 0 ) );
Add( new GenericBuyInfo( typeof( Cookies ), 3, 20, 0x160b, 0 ) );
Add( new GenericBuyInfo( typeof( Cookies ), 3, 20, 0x160b, 0 ) );
Add( new GenericBuyInfo( typeof( CheesePizza ), 8, 10, 0x1040, 0 ) ); // OSI just has Pizza
Add( new GenericBuyInfo( typeof( JarHoney ), 3, 20, 0x9ec, 0 ) );
Add (new GenericBuyInfo( typeof( BowlFlour ), 7, 20, 0xA1E, 0 ) );

View file

@ -23,8 +23,7 @@ namespace Server.Mobiles
Add( new GenericBuyInfo( typeof( Drums ), 21, ( 10 ), 0x0E9C, 0 ) );
Add( new GenericBuyInfo( typeof( Tambourine ), 21, ( 10 ), 0x0E9E, 0 ) );
Add( new GenericBuyInfo( typeof( LapHarp ), 21, ( 10 ), 0x0EB2, 0 ) );
Add( new GenericBuyInfo( typeof( Lute ), 21, ( 10 ), 0x0EB3, 0 ) );
Add( new GenericBuyInfo( typeof( Lute ), 21, ( 10 ), 0x0EB3, 0 ) );
}
}

View file

@ -30,15 +30,6 @@ namespace Server.Mobiles
Add( new GenericBuyInfo( typeof( ButcherKnife ), 13, 20, 0x13F6, 0 ) );
Add( new GenericBuyInfo( typeof( Cleaver ), 13, 20, 0xEC3, 0 ) );
Add( new GenericBuyInfo( typeof( SkinningKnife ), 13, 20, 0xEC4, 0 ) );
}
}

View file

@ -26,8 +26,7 @@ namespace Server.Mobiles
Add( new GenericBuyInfo( typeof( Nightshade ), 3, 20, 0xF88, 0 ) );
Add( new GenericBuyInfo( typeof( Bloodmoss ), 5, 20, 0xF7B, 0 ) );
Add( new GenericBuyInfo( typeof( MortarPestle ), 8, 20, 0xE9B, 0 ) );
Add( new GenericBuyInfo( typeof( Bottle ), 5, 20, 0xF0E, 0 ) );
Add( new GenericBuyInfo( typeof( Bottle ), 5, 20, 0xF0E, 0 ) );
}
}

View file

@ -23,7 +23,7 @@ namespace Server.Mobiles
Add( new GenericBuyInfo( typeof( BlankMap ), 5, 40, 0x14EC, 0 ) );
Add( new GenericBuyInfo( typeof( MapmakersPen ), 8, 20, 0x0FBF, 0 ) );
Add( new GenericBuyInfo( typeof( BlankScroll ), 12, 40, 0xEF3, 0 ) );
for ( int i = 0; i < PresetMapEntry.Table.Length; ++i )
Add( new PresetMapBuyInfo( PresetMapEntry.Table[i], Utility.RandomMinMax( 7, 10 ), 20 ) );
}

View file

@ -20,7 +20,7 @@ namespace Server.Mobiles
{
public InternalBuyInfo()
{
Add( new GenericBuyInfo( typeof( MonkRobe ), 136, 20, 0x2687, 0x21E ) );
if ( Core.AOS ) Add( new GenericBuyInfo( typeof( MonkRobe ), 136, 20, 0x2687, 0x21E ) );
}
}

View file

@ -20,7 +20,6 @@ namespace Server.Mobiles
{
public InternalBuyInfo()
{
Add( new GenericBuyInfo( typeof( SewingKit ), 3, 20, 0xF9D, 0 ) );
Add( new GenericBuyInfo( typeof( Scissors ), 11, 20, 0xF9F, 0 ) );
Add( new GenericBuyInfo( typeof( DyeTub ), 8, 20, 0xFAB, 0 ) );

View file

@ -51,7 +51,6 @@ namespace Server.Mobiles
Add( new GenericBuyInfo( typeof( SkinningKnife ), 15, 20, 0xEC4, 0 ) );
Add( new GenericBuyInfo( "1041279", typeof( TaxidermyKit ), 100000, 20, 0x1EBA, 0 ) );
}
}

View file

@ -20,7 +20,6 @@ namespace Server.Mobiles
{
public InternalBuyInfo()
{
Add( new GenericBuyInfo( typeof( Clock ), 22, 20, 0x104B, 0 ) );
Add( new GenericBuyInfo( typeof( Nails ), 3, 20, 0x102E, 0 ) );
Add( new GenericBuyInfo( typeof( ClockParts ), 3, 20, 0x104F, 0 ) );
@ -75,7 +74,6 @@ namespace Server.Mobiles
Add( new GenericBuyInfo( typeof( Tambourine ), 21, 20, 0x0E9E, 0 ) );
Add( new GenericBuyInfo( typeof( LapHarp ), 21, 20, 0x0EB2, 0 ) );
Add( new GenericBuyInfo( typeof( Lute ), 21, 20, 0x0EB3, 0 ) );
}
}

View file

@ -40,10 +40,6 @@ namespace Server.Mobiles
Add( new GenericBuyInfo( typeof( Tourmaline ), 75, 20, 0xF2D, 0 ) );
Add( new GenericBuyInfo( typeof( Amber ), 50, 20, 0xF25, 0 ) );
Add( new GenericBuyInfo( typeof( Diamond ), 200, 20, 0xF26, 0 ) );
Add( new GenericBuyInfo( typeof( Board ), 3, 20, 0x1BD7, 0 ) );
Add( new GenericBuyInfo( typeof( IronIngot ), 6, 20, 0x1BF2, 0 ) );
}
}