|
||
|
|
#1 (permalink) |
|
Forum Expert
|
Hiya, I was wondering if there's any way I can edit a Private variable outside of that class, forcibly or by any other means. The reason I'm actually asking this instead of just changing the scope of the variable because it's within the core. I've looked around, and seemingly couldn't find an exact answer. For the exact code I'm wanting to change without editing the core... See below.
Lines 2679-2682 in Mobile.cs Code:
private static TimeSpan m_WalkFoot = TimeSpan.FromSeconds( 0.4 );
private static TimeSpan m_RunFoot = TimeSpan.FromSeconds( 0.2 );
private static TimeSpan m_WalkMount = TimeSpan.FromSeconds( 0.2 );
private static TimeSpan m_RunMount = TimeSpan.FromSeconds( 0.1 );
__________________
|
|
|
|
|
|
#2 (permalink) |
|
Forum Expert
Join Date: Jul 2005
Location: Istanbul/Turkey
Age: 27
Posts: 425
|
well, when you have core files, it is really not necassary to use such a thing but here is what you can do:
Code:
Type mobileType = Type.GetType("Server.Mobile");
FieldInfo walkFoot = mobileType.GetField("m_WalkFoot", BindingFlags.NonPublic);
walkFoot.SetValue(null, newVal);
__________________
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." |
|
|
|
|
|
#3 (permalink) | |
|
ConnectUO Creator
Join Date: Jan 2004
Location: In your mom
Age: 27
Posts: 4,760
|
Quote:
__________________
Jeff Boulanger ConnectUO - Core Developer Want to help make ConnectUO better? Click here to submit your ideas/requests Use your talent to compete against other community members in RunUO hosted coding competitions If you know XNA (even if its just a little) or are a good artist(2d or 3d) and are interested in making games for a hobby send me a pm or drop by #xna in irc.runuo.com. I'm looking to put together a small game development team. Please do not pm me for support. If you are having issues please post in the appropriate forum. Thanks for your continued support of both ConnectUO and RunUO |
|
|
|
|
|
|
#4 (permalink) |
|
Master of the Internet
Join Date: Feb 2004
Location: NC/NC State Univ
Age: 23
Posts: 16,422
|
Ya gotta do what ya gotta do...
(I think really it's just the annoyance factor involved in changing it that keeps private relatively...well..."private".)
__________________
Goodbye, folks. |
|
|
|
|
|
#5 (permalink) |
|
Forum Expert
Join Date: Jul 2005
Location: Istanbul/Turkey
Age: 27
Posts: 425
|
there is no such a thing as private
![]() sometimes, changing a private value might mess up implementation, but here it is only cpu i guess ![]()
__________________
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." |
|
|
|
|
|
#6 (permalink) |
|
Master of the Internet
Join Date: Oct 2005
Age: 44
Posts: 6,283
|
Well, the issue I see with what I believe you are trying to do is that since the members are static, if you change the value, it will change the value for all instances of Mobile in the world, which I think was pretty much what noobie was getting at.
[EDIT] It also just occurred to me that since in BaseCreature, you can specify Active and Passive speed, there must be a way to change these values already in place since it seems that they corespond to same.
__________________
Why is it that I'm never as smart as I thought I was yesterday? My vast knowledge is only surpassed by my infinite ignorance. <TheOutkastDev> i might have to hire an assassin to killl mal so that i can jump in front of the bullet and piss on him Last edited by Malaperth; 02-27-2007 at 11:00 AM. |
|
|
|
|
|
#7 (permalink) | |
|
Forum Expert
|
Quote:
That's why I wanted to edit the mobile. I've had a few speculations about it being a static variable, and thus editing all of the mobiles in the world. Though I was also wondering about the PlayerMobiles little movement speed things, and if they would have any effect. So I was just gonna do a bit of trial & error ![]() At least once I get it to work the way I want it too... ![]() It did kind of strike me though that you can change privates like that. Very interesting.
__________________
|
|
|
|
|
|
|
#8 (permalink) |
|
Forum Expert
Join Date: Nov 2003
Location: Illinois, USA
Age: 21
Posts: 2,911
|
Yeah, noobie thats quite a trick, id ++ ya, but i cant
![]()
__________________
Useful links (Use them or die in a fire!!!): Ultimate Little Guide, C# Tutorials & Docs, RunUO Basic Scripts, Run UO How to..., Configure server for connections, Scripting for Dummies, Common Problem Solutions, FAQ Forum, RunUO Wiki, Basic Generics, Xml Tutorial |
|
|
|
|
|
#10 (permalink) |
|
Master of the Internet
Join Date: Oct 2005
Age: 44
Posts: 6,283
|
In the constructor of a BaseCreature, you specify the Active and Passive speed, which, strangely coincide with the values you mention wanting to change. That means that speed IS already changeable.
__________________
Why is it that I'm never as smart as I thought I was yesterday? My vast knowledge is only surpassed by my infinite ignorance. <TheOutkastDev> i might have to hire an assassin to killl mal so that i can jump in front of the bullet and piss on him |
|
|
|
|
|
#11 (permalink) | |
|
Forum Expert
|
Quote:
I wish it was as easy as BaseCreature. ![]()
__________________
|
|
|
|
|
|
|
#12 (permalink) |
|
Master of the Internet
Join Date: Oct 2005
Age: 44
Posts: 6,283
|
Right, however, BaseCreature inherits from Mobile, so between those two classes, somewhere in there must be a way to change the speed since it is done in BaseCreature, so the capability is already there, you just need to find it.
__________________
Why is it that I'm never as smart as I thought I was yesterday? My vast knowledge is only surpassed by my infinite ignorance. <TheOutkastDev> i might have to hire an assassin to killl mal so that i can jump in front of the bullet and piss on him |
|
|
|
|
|
#13 (permalink) | |
|
Forum Expert
|
Quote:
Edit: Can't find anything that looks like it'll change that. SpeedInfo was the only really "different" thing in there, and SpeedInfo.cs really has nothing that'll change the mobile speed (I believe it just gets it, and sets a base setting). PlayerMobile.cs already HAD something inside itself for editing speeds... It just didn't alter anything.
__________________
Last edited by IHaveRegistered; 02-28-2007 at 03:41 PM. |
|
|
|
|
|
|
#14 (permalink) |
|
Master of the Internet
Join Date: Oct 2005
Age: 44
Posts: 6,283
|
Well, from just a quick look at BaseCreature, I found this:
Code:
public BaseCreature(AIType ai, FightMode mode, int iRangePerception, int iRangeFight, double dActiveSpeed, double dPassiveSpeed) Code:
SpeedInfo.GetSpeeds( this, ref dActiveSpeed, ref dPassiveSpeed );
__________________
Why is it that I'm never as smart as I thought I was yesterday? My vast knowledge is only surpassed by my infinite ignorance. <TheOutkastDev> i might have to hire an assassin to killl mal so that i can jump in front of the bullet and piss on him |
|
|
|
|
|
#15 (permalink) | |
|
Forum Expert
|
Quote:
Code:
using System;
using System.Collections;
using Server;
using Server.Mobiles;
using Server.Factions;
namespace Server
{
public class SpeedInfo
{
// Should we use the new method of speeds?
private static bool Enabled = true;
private double m_ActiveSpeed;
private double m_PassiveSpeed;
private Type[] m_Types;
public double ActiveSpeed
{
get{ return m_ActiveSpeed; }
set{ m_ActiveSpeed = value; }
}
public double PassiveSpeed
{
get{ return m_PassiveSpeed; }
set{ m_PassiveSpeed = value; }
}
public Type[] Types
{
get{ return m_Types; }
set{ m_Types = value; }
}
public SpeedInfo( double activeSpeed, double passiveSpeed, Type[] types )
{
m_ActiveSpeed = activeSpeed;
m_PassiveSpeed = passiveSpeed;
m_Types = types;
}
public static bool Contains( object obj )
{
if ( !Enabled )
return false;
if ( m_Table == null )
LoadTable();
SpeedInfo sp = (SpeedInfo)m_Table[obj.GetType()];
return ( sp != null );
}
public static bool GetSpeeds( object obj, ref double activeSpeed, ref double passiveSpeed )
{
if ( !Enabled )
return false;
if ( m_Table == null )
LoadTable();
SpeedInfo sp = (SpeedInfo)m_Table[obj.GetType()];
if ( sp == null )
return false;
activeSpeed = sp.ActiveSpeed;
passiveSpeed = sp.PassiveSpeed;
return true;
}
private static void LoadTable()
{
m_Table = new Hashtable();
for ( int i = 0; i < m_Speeds.Length; ++i )
{
SpeedInfo info = m_Speeds[i];
Type[] types = info.Types;
for ( int j = 0; j < types.Length; ++j )
m_Table[types[j]] = info;
}
}
private static Hashtable m_Table;
private static SpeedInfo[] m_Speeds = new SpeedInfo[]
{
/* Slow */
new SpeedInfo( 0.3, 0.6, new Type[]
{
typeof( AntLion ), typeof( ArcticOgreLord ), typeof( BogThing ),
typeof( Bogle ), typeof( BoneKnight ), typeof( EarthElemental ),
typeof( Ettin ), typeof( FrostOoze ), typeof( FrostTroll ),
typeof( GazerLarva ), typeof( Ghoul ), typeof( Golem ),
typeof( HeadlessOne ), typeof( Jwilson ), typeof( Mummy ),
typeof( Ogre ), typeof( OgreLord ), typeof( PlagueBeast ),
typeof( Quagmire ), typeof( Rat ), typeof( RottingCorpse ),
typeof( Sewerrat ), typeof( Skeleton ), typeof( Slime ),
typeof( Zombie ), typeof( Walrus ), typeof( RestlessSoul ),
typeof( CrystalElemental ), typeof( DarknightCreeper ), typeof( MoundOfMaggots ),
typeof( Juggernaut )
} ),
/* Fast */
new SpeedInfo( 0.2, 0.4, new Type[]
{
typeof( LordOaks ), typeof( Silvani ), typeof( AirElemental ),
typeof( AncientWyrm ), typeof( Balron ), typeof( BladeSpirits ),
typeof( DreadSpider ), typeof( Efreet ), typeof( EtherealWarrior ),
typeof( Lich ), typeof( Nightmare ), typeof( OphidianArchmage ),
typeof( OphidianMage ), typeof( OphidianWarrior ), typeof( OphidianMatriarch ),
typeof( OphidianKnight ), typeof( PoisonElemental ), typeof( Revenant ),
typeof( SandVortex ), typeof( SavageRider ), typeof( SavageShaman ),
typeof( SnowElemental ), typeof( WhiteWyrm ), typeof( Wisp ),
typeof( SummonedAirElemental ), typeof( GiantBlackWidow ), typeof( DemonKnight )
} ),
/* Very Fast */
new SpeedInfo( 0.175, 0.350, new Type[]
{
typeof( Barracoon ), typeof( Mephitis ), typeof( Neira ),
typeof( Rikktor ), typeof( Semidar ), typeof( EnergyVortex ),
typeof( Beetle ), typeof( Pixie ), typeof( SilverSerpent ),
typeof( VorpalBunny ), typeof( FleshRenderer ), typeof( KhaldunRevenant ),
typeof( FactionDragoon ), typeof( FactionKnight ), typeof( FactionPaladin ),
typeof( FactionHenchman ), typeof( FactionMercenary ), typeof( FactionNecromancer ),
typeof( FactionSorceress ), typeof( FactionWizard ), typeof( FactionBerserker ),
typeof( FactionDeathKnight )
} ),
/* Medium */
new SpeedInfo( 0.25, 0.5, new Type[]
{
typeof( ToxicElemental ), typeof( Agapitebeast ), typeof( Alligator ),
typeof( AncientLich ), typeof( Betrayer ), typeof( Bird ),
typeof( BlackBear ), typeof( BlackSolenInfiltratorQueen ), typeof( BlackSolenInfiltratorWarrior ),
typeof( BlackSolenQueen ), typeof( BlackSolenWarrior ), typeof( BlackSolenWorker ),
typeof( BloodElemental ), typeof( Boar ), typeof( Bogling ),
typeof( BoneMagi ), typeof( Brigand ), typeof( Bronzebeast ),
typeof( BrownBear ), typeof( Bull ), typeof( BullFrog ),
typeof( Cat ), typeof( Centaur ), typeof( ChaosDaemon ),
typeof( Chicken ), typeof( GolemController ), typeof( Copperbeast ),
typeof( Copperbeast ), typeof( Cougar ), typeof( Cow ),
typeof( Cyclops ), typeof( Daemon ), typeof( DeepSeaSerpent ),
typeof( DesertOstard ), typeof( DireWolf ), typeof( Dog ),
typeof( Dolphin ), typeof( Dragon ), typeof( Drake ),
typeof( DullCopperbeast ), typeof( Eagle ), typeof( ElderGazer ),
typeof( EvilMage ), typeof( EvilMageLord ), typeof( Executioner ),
typeof( Savage ), typeof( FireElemental ), typeof( FireGargoyle ),
typeof( FireSteed ), typeof( ForestOstard ), typeof( FrenziedOstard ),
typeof( FrostSpider ), typeof( Gargoyle ), typeof( Gazer ),
typeof( IceSerpent ), typeof( GiantRat ), typeof( GiantSerpent ),
typeof( GiantSpider ), typeof( GiantToad ), typeof( Goat ),
typeof( Goldenbeast ), typeof( Gorilla ), typeof( GreatHart ),
typeof( GreyWolf ), typeof( GrizzlyBear ), typeof( Guardian ),
typeof( Harpy ), typeof( Harrower ), typeof( HellHound ),
typeof( Hind ), typeof( HordeMinion ), typeof( Horse ),
typeof( Horse ), typeof( IceElemental ), typeof( IceFiend ),
typeof( IceSnake ), typeof( Imp ), typeof( JackRabbit ),
typeof( Kirin ), typeof( Kraken ), typeof( PredatorHellCat ),
typeof( LavaLizard ), typeof( LavaSerpent ), typeof( LavaSnake ),
typeof( Lizardman ), typeof( Llama ), typeof( Mongbat ),
typeof( StrongMongbat ), typeof( MountainGoat ), typeof( Orc ),
typeof( OrcBomber ), typeof( OrcBrute ), typeof( OrcCaptain ),
typeof( OrcishLord ), typeof( OrcishMage ), typeof( PackHorse ),
typeof( PackLlama ), typeof( Panther ), typeof( Pig ),
typeof( PlagueSpawn ), typeof( PolarBear ), typeof( Rabbit ),
typeof( Ratman ), typeof( RatmanArcher ), typeof( RatmanMage ),
typeof( RedSolenInfiltratorQueen ), typeof( RedSolenInfiltratorWarrior ), typeof( RedSolenQueen ),
typeof( RedSolenWarrior ), typeof( RedSolenWorker ), typeof( RidableLlama ),
typeof( Ridgeback ), typeof( Scorpion ), typeof( SeaSerpent ),
typeof( SerpentineDragon ), typeof( Shade ), typeof( ShadowIronbeast ),
typeof( ShadowWisp ), typeof( ShadowWyrm ), typeof( Sheep ),
typeof( SilverSteed ), typeof( SkeletalDragon ), typeof( SkeletalMage ),
typeof( SkeletalMount ), typeof( HellCat ), typeof( Snake ),
typeof( SnowLeopard ), typeof( SpectralArmour ), typeof( Spectre ),
typeof( StoneGargoyle ), typeof( StoneHarpy ), typeof( SwampDragon ),
typeof( ScaledSwampDragon ), typeof( SwampTentacle ), typeof( TerathanAvenger ),
typeof( TerathanDrone ), typeof( TerathanMatriarch ), typeof( TerathanWarrior ),
typeof( TimberWolf ), typeof( Titan ), typeof( Troll ),
typeof( Unicorn ), typeof( Valoritebeast ), typeof( Veritebeast ),
typeof( CoMWarHorse ), typeof( MinaxWarHorse ), typeof( SLWarHorse ),
typeof( TBWarHorse ), typeof( WaterElemental ), typeof( WhippingVine ),
typeof( WhiteWolf ), typeof( Wraith ), typeof( Wyvern ),
typeof( KhaldunZealot ), typeof( KhaldunSummoner ), typeof( SavageRidgeback ),
typeof( LichLord ), typeof( SkeletalKnight ), typeof( SummonedDaemon ),
typeof( SummonedEarthElemental ), typeof( SummonedWaterElemental ), typeof( SummonedFireElemental ),
typeof( MeerWarrior ), typeof( MeerEternal ), typeof( MeerMage ),
typeof( MeerCaptain ), typeof( JukaLord ), typeof( JukaMage ),
typeof( JukaWarrior ), typeof( AbysmalHorror ), typeof( BoneDemon ),
typeof( Devourer ), typeof( FleshGolem ), typeof( Gibberling ),
typeof( GoreFiend ), typeof( Impaler ), typeof( PatchworkSkeleton ),
typeof( Ravager ), typeof( ShadowKnight ), typeof( SkitteringHopper ),
typeof( Treefellow ), typeof( VampireBat ), typeof( WailingBanshee ),
typeof( WandererOfTheVoid ), typeof( Cursed ), typeof( GrimmochDrummel ),
typeof( LysanderGathenwale), typeof( MorgBergen ), typeof( ShadowFiend ),
typeof( SpectralArmour ), typeof( TavaraSewel ), typeof( ArcaneDaemon ),
typeof( Doppleganger ), typeof( EnslavedGargoyle ), typeof( ExodusMinion ),
typeof( ExodusOverseer ), typeof( GargoyleDestroyer ), typeof( GargoyleEnforcer ),
typeof( Moloch )
} )
};
}
}
__________________
|
|
|
|
|
|
|
#16 (permalink) |
|
ConnectUO Creator
Join Date: Jan 2004
Location: In your mom
Age: 27
Posts: 4,760
|
Code:
public double ActiveSpeed
{
get{ return m_ActiveSpeed; }
set{ m_ActiveSpeed = value; }
}
public double PassiveSpeed
{
get{ return m_PassiveSpeed; }
set{ m_PassiveSpeed = value; }
}
__________________
Jeff Boulanger ConnectUO - Core Developer Want to help make ConnectUO better? Click here to submit your ideas/requests Use your talent to compete against other community members in RunUO hosted coding competitions If you know XNA (even if its just a little) or are a good artist(2d or 3d) and are interested in making games for a hobby send me a pm or drop by #xna in irc.runuo.com. I'm looking to put together a small game development team. Please do not pm me for support. If you are having issues please post in the appropriate forum. Thanks for your continued support of both ConnectUO and RunUO |
|
|
|
|
|
#18 (permalink) |
|
Master of the Internet
Join Date: Oct 2005
Age: 44
Posts: 6,283
|
All I know is that when you change the values passed in to the BaseCreature constructor, it does effect the mobile's speed, so there must be a way to do it even if I/we do not exactly know how.
__________________
Why is it that I'm never as smart as I thought I was yesterday? My vast knowledge is only surpassed by my infinite ignorance. <TheOutkastDev> i might have to hire an assassin to killl mal so that i can jump in front of the bullet and piss on him |
|
|
|
|
|
#19 (permalink) |
|
ConnectUO Creator
Join Date: Jan 2004
Location: In your mom
Age: 27
Posts: 4,760
|
Even when changed in [props it changes the mobiles movement speed.
__________________
Jeff Boulanger ConnectUO - Core Developer Want to help make ConnectUO better? Click here to submit your ideas/requests Use your talent to compete against other community members in RunUO hosted coding competitions If you know XNA (even if its just a little) or are a good artist(2d or 3d) and are interested in making games for a hobby send me a pm or drop by #xna in irc.runuo.com. I'm looking to put together a small game development team. Please do not pm me for support. If you are having issues please post in the appropriate forum. Thanks for your continued support of both ConnectUO and RunUO |
|
|
|
|
|
#20 (permalink) |
|
ConnectUO Creator
Join Date: Jan 2004
Location: In your mom
Age: 27
Posts: 4,760
|
wait just a min, YOUR movement speeds....thats client based....
__________________
Jeff Boulanger ConnectUO - Core Developer Want to help make ConnectUO better? Click here to submit your ideas/requests Use your talent to compete against other community members in RunUO hosted coding competitions If you know XNA (even if its just a little) or are a good artist(2d or 3d) and are interested in making games for a hobby send me a pm or drop by #xna in irc.runuo.com. I'm looking to put together a small game development team. Please do not pm me for support. If you are having issues please post in the appropriate forum. Thanks for your continued support of both ConnectUO and RunUO |
|
|
|
|
|
#21 (permalink) | |
|
Forum Expert
|
Hmm, I guess there's no easy way to go through that one eh? Only one thing I can think of is checking the [speedboost from the 2.0 core... But I think that just makes it act like you're on a mount... and i'm 1.0 ![]() Well that's just really a shame. I was looking forward to items with an EnhanceSpeed attribute or something like that. Edit: I attempted to use the following: Quote:
Code:
using System;
using System.IO;
using System.Net;
using System.Net.Sockets;
using System.Threading;
using System.Reflection;
using System.Collections;
using System.Diagnostics;
using Server;
using Server.Network;
using Server.Accounting;
using Server.Guilds;
using Server.Gumps;
using Server.Mobiles;
using Server.Items;
using System.Globalization;
namespace Server.Items
{
public class ZDSSpeedEditor : Item
{
private AccessLevel m_AccessLevelRequired = AccessLevel.Administrator;
private TimeSpan m_NewWalkFoot = TimeSpan.FromSeconds( 0.4 );
private TimeSpan m_NewRunFoot = TimeSpan.FromSeconds( 0.2 );
private TimeSpan m_NewWalkMount = TimeSpan.FromSeconds( 0.2 );
private TimeSpan m_NewRunMount = TimeSpan.FromSeconds( 0.1 );
private TimeSpan m_WalkFoot = TimeSpan.FromSeconds( 0.4 );
private TimeSpan m_RunFoot = TimeSpan.FromSeconds( 0.2 );
private TimeSpan m_WalkMount = TimeSpan.FromSeconds( 0.2 );
private TimeSpan m_RunMount = TimeSpan.FromSeconds( 0.1 );
[CommandProperty( AccessLevel.Administrator )]
public AccessLevel AccessLevelRequired { get{ return m_AccessLevelRequired; } set { m_AccessLevelRequired = value; } }
[CommandProperty( AccessLevel.Administrator )]
public TimeSpan NewWalkFoot { get{ return m_WalkFoot; } set { m_WalkFoot = value; } }
[CommandProperty( AccessLevel.Administrator )]
public TimeSpan NewRunFoot { get{ return m_RunFoot; } set { m_RunFoot = value; } }
[CommandProperty( AccessLevel.Administrator )]
public TimeSpan NewWalkMount { get{ return m_WalkMount; } set { m_WalkMount = value; } }
[CommandProperty( AccessLevel.Administrator )]
public TimeSpan NewRunMount { get{ return m_RunMount; } set { m_RunMount = value; } }
[Constructable]
public ZDSSpeedEditor() : base( 0xED4 )
{
Movable = false;
Name = "Zeratuls Downfall In-Game Mobile Speed Editor [Admin Only]";
Hue = 2243;
}
public override void OnDoubleClick( Mobile from )
{
if( (from != null) && (from.AccessLevel >= m_AccessLevelRequired) )
{
int ErrorLoc = 0;
string Comment = "//";
StreamWriter op = new StreamWriter( "MobileSpeedEditor.log", true );
StreamWriter op2 = new StreamWriter( "MobileSpeedEditorErrors.log", true );
try
{
from.SendMessage(94, "4. typeof(Server.Mobile): {0}", typeof(Server.Mobile).ToString());
ErrorLoc = 1;
FieldInfo myFieldInfoWF = typeof(Server.Mobile).GetField("m_WalkFoot", BindingFlags.Public);
ErrorLoc = 2;
FieldInfo myFieldInfoRF = typeof(Server.Mobile).GetField("m_RunFoot", BindingFlags.Public | BindingFlags.Instance);
ErrorLoc = 3;
FieldInfo myFieldInfoWM = typeof(Server.Mobile).GetField("m_WalkMount", BindingFlags.NonPublic); //was "m_WalkMount"
ErrorLoc = 4;
FieldInfo myFieldInfoRM = typeof(Server.Mobile).GetField("m_RunMount", BindingFlags.NonPublic | BindingFlags.Instance); //
ErrorLoc = 5;
int i = 0;
int j = 0;
int k = 0;
op.WriteLine( "{0}, ErrorLoc: {1}, myFieldInfoWF: {2}, i: {3}, j: {4}, k: {5} ({6}.{7}.{8})", Comment, ErrorLoc, myFieldInfoWF, i, j, k, i, j, k );
for( i = 0; i < 20; i++ )
{
if( i <= 9 )
{
object myObject = from;
if( i == 0 )
|