RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

[RunUO 2.0 Svn][OSI] Mondain's Legacy

Raider

Wanderer
Anybody got the fix where you suppose to transfer pet to the donation box in moonglow cause when i try to transfer does nothing in osi thats how its done.
 

Raider

Wanderer
Cheetah2003;677631 said:
Actually, that would always give the same reward. This fix might be better:

Code:
Type reward = m_Decorations[random > m_Decorations.Length - 1 ? m_Decorations.Length - 1 : random];
Got this error when adding yours.
Code:
Errors:
 + CustomScripts/Mondain's Legacy/Items/Aquarium/Aquarium.cs:
    CS0103: Line 531: The name 'random' does not exist in the current context
    CS0103: Line 531: The name 'random' does not exist in the current context
Scripts: One or more scripts failed to compile or no script files were found.
 

Cheetah2003

Wanderer
Raider;677641 said:
Got this error when adding yours.
Code:
Errors:
 + CustomScripts/Mondain's Legacy/Items/Aquarium/Aquarium.cs:
    CS0103: Line 531: The name 'random' does not exist in the current context
    CS0103: Line 531: The name 'random' does not exist in the current context
Scripts: One or more scripts failed to compile or no script files were found.

Compiles fine on mine, but see Kamuflaro's post. :p

Think I'll just change it to be totally random. :p

ie:
Code:
			Type reward = m_Decorations[Utility.Random(m_Decorations.Length)];
 

Mustapoa

Wanderer
Man i'm trying to make this release works.. but i'm getting this errors:

Error 1 'Server.Core' does not contain a definition for 'Set' C:\Documents and Settings\Burnout\Configurações locais\Dados de aplicativos\Temporary Projects\ConsoleApplication1\SRC\Item.cs 2962 9 ConsoleApplication1
Error 2 'Server.Network.NetState' does not contain a definition for 'IsUOTDClient' C:\Documents and Settings\Burnout\Configurações locais\Dados de aplicativos\Temporary Projects\ConsoleApplication1\SRC\Mobile.cs 3123 122 ConsoleApplication1
Error 3 'Server.Region' does not contain a definition for 'OnBeforeDeath' C:\Documents and Settings\Burnout\Configurações locais\Dados de aplicativos\Temporary Projects\ConsoleApplication1\SRC\Mobile.cs 3743 21 ConsoleApplication1
Error 4 The best overloaded method match for 'Server.Network.NetState.RemoveGump(int)' has some invalid arguments C:\Documents and Settings\Burnout\Configurações locais\Dados de aplicativos\Temporary Projects\ConsoleApplication1\SRC\Mobile.cs 6509 6 ConsoleApplication1
Error 5 Argument '1': cannot convert from 'Server.Gumps.Gump' to 'int' C:\Documents and Settings\Burnout\Configurações locais\Dados de aplicativos\Temporary Projects\ConsoleApplication1\SRC\Mobile.cs 6509 29 ConsoleApplication1
Error 6 'Server.Gumps.Gump' does not contain a definition for 'OnServerClose' C:\Documents and Settings\Burnout\Configurações locais\Dados de aplicativos\Temporary Projects\ConsoleApplication1\SRC\Mobile.cs 6511 11 ConsoleApplication1
Error 7 'Server.Network.NetState' does not contain a definition for 'ClearGumps' C:\Documents and Settings\Burnout\Configurações locais\Dados de aplicativos\Temporary Projects\ConsoleApplication1\SRC\Mobile.cs 6536 8 ConsoleApplication1
Error 8 'Server.Gumps.Gump' does not contain a definition for 'OnServerClose' C:\Documents and Settings\Burnout\Configurações locais\Dados de aplicativos\Temporary Projects\ConsoleApplication1\SRC\Mobile.cs 6541 11 ConsoleApplication1
Error 9 'Server.Core' does not contain a definition for 'Set' C:\Documents and Settings\Burnout\Configurações locais\Dados de aplicativos\Temporary Projects\ConsoleApplication1\SRC\Mobile.cs 9580 9 ConsoleApplication1

I fixed the errors with Drawning and Ultima.dll.. but this errors i have no tip how to fix. Please Help.

PS. Sorry for my english, i'm from Brazil and i dont speak english very well.
 

Surllio

Sorceror
I'm glad that this is being worked on.

I can't wait to see the finished version of this so that we can start using it on my shard.
 
For painted caves and heartwood on felucca you need to change Regions.xml after
Code:
<Facet name="Felucca">
insert
Code:
		<!--Mondain's Legacy-->
		<region type="MondainTownRegion" priority="50" name="Heartwood">
			<rect x="6911" y="255" width="257" height="257" />
			<go x="6984" y="337" z="0" />
			<entrance x="535" y="995" />
			<music name="ElfCity" />
		</region>
		<region type="MondainRegion" priority="50" name="Painted Caves">
			<rect x="6248" y="845" width="80" height="80" />
			<go x="6309" y="892" z="0" />
			<entrance x="1716" y="2997" />
			<music name="Dungeon9" />
		</region>
		<!--End-->
 

MalGanis

Sorceror
I have some bad news. My motherboard went mental esterday and my comp stopped working. I got my laptop working, but its quite old ==> i can't fix anything until i get a new board. Btw anyone knows whats wrong if motherboard starts beeping (like an alarm) and theres nothing but a power supply connected to it?
 

Raider

Wanderer
Changed so you can't lore parrots
Just thought you know on osi you can lore the parrot its an animal so just thought i let everyone know i do have a osi account 7 years old and i got 6 parrots.
 

Gladius

Wanderer
MalGanis;677739 said:
I have some bad news. My motherboard went mental esterday and my comp stopped working. I got my laptop working, but its quite old ==> i can't fix anything until i get a new board. Btw anyone knows whats wrong if motherboard starts beeping (like an alarm) and theres nothing but a power supply connected to it?

Try to take out RAM and then put back.
 

Gladius

Wanderer
How to run 2 servers on one computer and on one ip?

I have a server which from 70 to 100 players online. And I parallel would do then test shard, on which people would test and in the case of exposure of errors, I would write them here.
 

Liacs

Sorceror
@Gladius:
Please ask those kind of questions in a new thread and not in the script release forum.
Sorry, I don't have an answer to this question.

Lia
 

arul

Sorceror
MalGanis;677739 said:
I have some bad news. My motherboard went mental esterday and my comp stopped working. I got my laptop working, but its quite old ==> i can't fix anything until i get a new board. Btw anyone knows whats wrong if motherboard starts beeping (like an alarm) and theres nothing but a power supply connected to it?

Count the amount of beeps, there are tabs on the net describing what which beep code means. (for example here: BiosCentral - AMI BIOS Beep Codes)

Should you have a question, feel free to PM me.
 

Cheetah2003

Wanderer
I found a bug in LootPack.cs...

Prior to loading my live shard save, I despawned the world. After loading successfully, I tried to respawn everything.

The IsMondain method crashed the server. Need an additional check at the start:

Code:
if (m == null) return false;
 

Raider

Wanderer
Found another issue on glasses
Code:
using System;
using Server;

namespace Server.Items
{
	public class MaceAndShieldGlasses : Glasses
	{
		public override int LabelNumber{ get{ return 1073381; } } // Mace and Shield Reading Glasses
	
		public override int BasePhysicalResistance{ get{ return 25; } }
		public override int BaseFireResistance{ get{ return 10; } }
		public override int BaseColdResistance{ get{ return 10; } }
		public override int BasePoisonResistance{ get{ return 10; } }
		public override int BaseEnergyResistance{ get{ return 10; } }

		public override int InitMinHits{ get{ return 255; } }
		public override int InitMaxHits{ get{ return 255; } }

		[Constructable]
		public MaceAndShieldGlasses() : base()
		{
			Hue = 0x1DD;
		
			Attributes.BonusStr = 10;
			Attributes.BonusDex = 5;
			
			WeaponAttributes.HitLowerDefend = 30;
		}

		public MaceAndShieldGlasses( Serial serial ) : base( serial )
		{
		}
		
		public override void Serialize( GenericWriter writer )
		{
			base.Serialize( writer );
			
			writer.Write( (int) 0 ); // version
		}
		
		public override void Deserialize(GenericReader reader)
		{
			base.Deserialize( reader );
			
			int version = reader.ReadInt();
		}
	}	
	
	public class GlassesOfTheArts : Glasses
	{
		public override int LabelNumber{ get{ return 1073363; } } // Reading Glasses of the Arts
	
		public override int BasePhysicalResistance{ get{ return 10; } }
		public override int BaseFireResistance{ get{ return 8; } }
		public override int BaseColdResistance{ get{ return 8; } }
		public override int BasePoisonResistance{ get{ return 4; } }
		public override int BaseEnergyResistance{ get{ return 10; } }

		public override int InitMinHits{ get{ return 255; } }
		public override int InitMaxHits{ get{ return 255; } }

		[Constructable]
		public GlassesOfTheArts() : base()
		{
			Hue = 0x73;
		
			Attributes.BonusInt = 5;
			Attributes.BonusStr = 5;
			Attributes.BonusHits = 15;
		}

		public GlassesOfTheArts( Serial serial ) : base( serial )
		{
		}
		
		public override void Serialize( GenericWriter writer )
		{
			base.Serialize( writer );
			
			writer.Write( (int) 0 ); // version
		}
		
		public override void Deserialize(GenericReader reader)
		{
			base.Deserialize( reader );
			
			int version = reader.ReadInt();
		}
	}	
	
	public class FoldedSteelGlasses : Glasses
	{
		public override int LabelNumber{ get{ return 1073380; } } // Folded Steel Reading Glasses
	
		public override int BasePhysicalResistance{ get{ return 20; } }
		public override int BaseFireResistance{ get{ return 10; } }
		public override int BaseColdResistance{ get{ return 10; } }
		public override int BasePoisonResistance{ get{ return 10; } }
		public override int BaseEnergyResistance{ get{ return 10; } }

		public override int InitMinHits{ get{ return 255; } }
		public override int InitMaxHits{ get{ return 255; } }

		[Constructable]
		public FoldedSteelGlasses() : base()
		{
			Hue = 0x47E;
		
			Attributes.BonusStr = 8;
			Attributes.NightSight = 1;
			Attributes.DefendChance = 15;
		}

		public FoldedSteelGlasses( Serial serial ) : base( serial )
		{
		}
		
		public override void Serialize( GenericWriter writer )
		{
			base.Serialize( writer );
			
			writer.Write( (int) 0 ); // version
		}
		
		public override void Deserialize(GenericReader reader)
		{
			base.Deserialize( reader );
			
			int version = reader.ReadInt();
		}
	}	
	
	public class TradesGlasses : Glasses
	{
		public override int LabelNumber{ get{ return 1073362; } } // Reading Glasses of the Trades
	
		public override int BasePhysicalResistance{ get{ return 10; } }
		public override int BaseFireResistance{ get{ return 10; } }
		public override int BaseColdResistance{ get{ return 10; } }
		public override int BasePoisonResistance{ get{ return 10; } }
		public override int BaseEnergyResistance{ get{ return 10; } }

		public override int InitMinHits{ get{ return 255; } }
		public override int InitMaxHits{ get{ return 255; } }

		[Constructable]
		public TradesGlasses() : base()
		{
			Attributes.BonusStr = 10;
			Attributes.BonusInt = 10;
		}

		public TradesGlasses( Serial serial ) : base( serial )
		{
		}
		
		public override void Serialize( GenericWriter writer )
		{
			base.Serialize( writer );
			
			writer.Write( (int) 0 ); // version
		}
		
		public override void Deserialize(GenericReader reader)
		{
			base.Deserialize( reader );
			
			int version = reader.ReadInt();
		}
	}	
	
	public class LyricalGlasses : Glasses
	{
		public override int LabelNumber{ get{ return 1073382; } } // Lyrical Reading Glasses
	
		public override int BasePhysicalResistance{ get{ return 10; } }
		public override int BaseFireResistance{ get{ return 10; } }
		public override int BaseColdResistance{ get{ return 10; } }
		public override int BasePoisonResistance{ get{ return 10; } }
		public override int BaseEnergyResistance{ get{ return 10; } }

		public override int InitMinHits{ get{ return 255; } }
		public override int InitMaxHits{ get{ return 255; } }

		[Constructable]
		public LyricalGlasses() : base()
		{
			Hue = 0x47F;
		
			Attributes.ReflectPhysical = 15;
			Attributes.NightSight = 1;
			
			WeaponAttributes.HitLowerDefend = 20;
		}

		public LyricalGlasses( Serial serial ) : base( serial )
		{
		}
		
		public override void Serialize( GenericWriter writer )
		{
			base.Serialize( writer );
			
			writer.Write( (int) 0 ); // version
		}
		
		public override void Deserialize(GenericReader reader)
		{
			base.Deserialize( reader );
			
			int version = reader.ReadInt();
		}
	}	
	
	public class AnthropomorphistGlasses : Glasses
	{
		public override int LabelNumber{ get{ return 1073379; } } // Anthropomorphist Reading Glasses
	
		public override int BasePhysicalResistance{ get{ return 5; } }
		public override int BaseFireResistance{ get{ return 5; } }
		public override int BaseColdResistance{ get{ return 10; } }
		public override int BasePoisonResistance{ get{ return 20; } }
		public override int BaseEnergyResistance{ get{ return 20; } }

		public override int InitMinHits{ get{ return 255; } }
		public override int InitMaxHits{ get{ return 255; } }

		[Constructable]
		public AnthropomorphistGlasses() : base()
		{
			Hue = 0x80;
		
			Attributes.BonusHits = 5;
			Attributes.RegenMana = 3;
		}

		public AnthropomorphistGlasses( Serial serial ) : base( serial )
		{
		}
		
		public override void Serialize( GenericWriter writer )
		{
			base.Serialize( writer );
			
			writer.Write( (int) 0 ); // version
		}
		
		public override void Deserialize(GenericReader reader)
		{
			base.Deserialize( reader );
			
			int version = reader.ReadInt();
		}
	}	
	
	public class LightOfWayGlasses : Glasses
	{
		public override int LabelNumber{ get{ return 1073378; } } // Light of Way Reading Glasses
	
		public override int BasePhysicalResistance{ get{ return 10; } }
		public override int BaseFireResistance{ get{ return 10; } }
		public override int BaseColdResistance{ get{ return 10; } }
		public override int BasePoisonResistance{ get{ return 10; } }
		public override int BaseEnergyResistance{ get{ return 10; } }

		public override int InitMinHits{ get{ return 255; } }
		public override int InitMaxHits{ get{ return 255; } }

		[Constructable]
		public LightOfWayGlasses() : base()
		{
			Hue = 0x256;
		
			Attributes.BonusStr = 7;
			Attributes.BonusInt = 5;
			Attributes.WeaponDamage = 30;
		}

		public LightOfWayGlasses( Serial serial ) : base( serial )
		{
		}
		
		public override void Serialize( GenericWriter writer )
		{
			base.Serialize( writer );
			
			writer.Write( (int) 0 ); // version
		}
		
		public override void Deserialize(GenericReader reader)
		{
			base.Deserialize( reader );
			
			int version = reader.ReadInt();
		}
	}	
	
	public class NecromanticGlasses : Glasses
	{
		public override int LabelNumber{ get{ return 1073377; } } // Necromantic Reading Glasses
	
		public override int BasePhysicalResistance{ get{ return 0; } }
		public override int BaseFireResistance{ get{ return 0; } }
		public override int BaseColdResistance{ get{ return 0; } }
		public override int BasePoisonResistance{ get{ return 0; } }
		public override int BaseEnergyResistance{ get{ return 0; } }

		public override int InitMinHits{ get{ return 255; } }
		public override int InitMaxHits{ get{ return 255; } }

		[Constructable]
		public NecromanticGlasses() : base()
		{
			Hue = 0x22D;
		
			Attributes.LowerRegCost = 30;
			Attributes.LowerManaCost = 12;
		}

		public NecromanticGlasses( Serial serial ) : base( serial )
		{
		}
		
		public override void Serialize( GenericWriter writer )
		{
			base.Serialize( writer );
			
			writer.Write( (int) 0 ); // version
		}
		
		public override void Deserialize(GenericReader reader)
		{
			base.Deserialize( reader );
			
			int version = reader.ReadInt();
		}
	}	
	
	public class WizardsCrystalGlasses : Glasses
	{
		public override int LabelNumber{ get{ return 1073374; } } // Wizard's Crystal Reading Glasses
	
		public override int BasePhysicalResistance{ get{ return 5; } }
		public override int BaseFireResistance{ get{ return 5; } }
		public override int BaseColdResistance{ get{ return 5; } }
		public override int BasePoisonResistance{ get{ return 5; } }
		public override int BaseEnergyResistance{ get{ return 5; } }

		public override int InitMinHits{ get{ return 255; } }
		public override int InitMaxHits{ get{ return 255; } }

		[Constructable]
		public WizardsCrystalGlasses() : base()
		{
			Hue = 0x2B0;
		
			Attributes.BonusMana = 10;
			Attributes.RegenMana = 3;
			Attributes.SpellDamage = 15;
		}

		public WizardsCrystalGlasses( Serial serial ) : base( serial )
		{
		}
		
		public override void Serialize( GenericWriter writer )
		{
			base.Serialize( writer );
			
			writer.Write( (int) 0 ); // version
		}
		
		public override void Deserialize(GenericReader reader)
		{
			base.Deserialize( reader );
			
			int version = reader.ReadInt();
		}
	}	
	
	public class MaritimeGlasses : Glasses
	{
		public override int LabelNumber{ get{ return 1073364; } } // Maritime Reading Glasses
	
		public override int BasePhysicalResistance{ get{ return 3; } }
		public override int BaseFireResistance{ get{ return 4; } }
		public override int BaseColdResistance{ get{ return 30; } }
		public override int BasePoisonResistance{ get{ return 5; } }
		public override int BaseEnergyResistance{ get{ return 3; } }

		public override int InitMinHits{ get{ return 255; } }
		public override int InitMaxHits{ get{ return 255; } }

		[Constructable]
		public MaritimeGlasses() : base()
		{
			Hue = 0x581;
		
			Attributes.NightSight = 1;
			Attributes.Luck = 100;
			Attributes.ReflectPhysical = 20;
		}

		public MaritimeGlasses( Serial serial ) : base( serial )
		{
		}
		
		public override void Serialize( GenericWriter writer )
		{
			base.Serialize( writer );
			
			writer.Write( (int) 0 ); // version
		}
		
		public override void Deserialize(GenericReader reader)
		{
			base.Deserialize( reader );
			
			int version = reader.ReadInt();
		}
	}
	
	public class TreasuresAndTrinketsGlasses : Glasses
	{
		public override int LabelNumber{ get{ return 1073373; } } // Treasures and Trinkets Reading Glasses
	
		public override int BasePhysicalResistance{ get{ return 10; } }
		public override int BaseFireResistance{ get{ return 10; } }
		public override int BaseColdResistance{ get{ return 10; } }
		public override int BasePoisonResistance{ get{ return 10; } }
		public override int BaseEnergyResistance{ get{ return 10; } }

		public override int InitMinHits{ get{ return 255; } }
		public override int InitMaxHits{ get{ return 255; } }

		[Constructable]
		public TreasuresAndTrinketsGlasses() : base()
		{
			Hue = 0x5A6; // TODO check
		
			Attributes.BonusInt = 10;
			Attributes.BonusHits = 5;
			Attributes.SpellDamage = 10;
		}

		public TreasuresAndTrinketsGlasses( Serial serial ) : base( serial )
		{
		}
		
		public override void Serialize( GenericWriter writer )
		{
			base.Serialize( writer );
			
			writer.Write( (int) 0 ); // version
		}
		
		public override void Deserialize(GenericReader reader)
		{
			base.Deserialize( reader );
			
			int version = reader.ReadInt();
		}
	}
	
	public class PoisonedGlasses : Glasses
	{
		public override int LabelNumber{ get{ return 1073376; } } // Poisoned Reading Glasses
	
		public override int BasePhysicalResistance{ get{ return 10; } }
		public override int BaseFireResistance{ get{ return 10; } }
		public override int BaseColdResistance{ get{ return 10; } }
		public override int BasePoisonResistance{ get{ return 30; } }
		public override int BaseEnergyResistance{ get{ return 10; } }

		public override int InitMinHits{ get{ return 255; } }
		public override int InitMaxHits{ get{ return 255; } }

		[Constructable]
		public PoisonedGlasses() : base()
		{
			Hue = 0x55C; // TODO check
		
			Attributes.BonusStam = 3;
			Attributes.RegenStam = 4;
		}

		public PoisonedGlasses( Serial serial ) : base( serial )
		{
		}
		
		public override void Serialize( GenericWriter writer )
		{
			base.Serialize( writer );
			
			writer.Write( (int) 0 ); // version
		}
		
		public override void Deserialize(GenericReader reader)
		{
			base.Deserialize( reader );
			
			int version = reader.ReadInt();
		}
	}
}
thats part 1 heres part two of it
Code:
using System;
using Server;

namespace Server.Items
{
	public class Glasses : BaseArmor
	{
		public override int AosStrReq{ get{ return 45; } }
		public override int OldStrReq{ get{ return 40; } }

		public override int ArmorBase{ get{ return 30; } }

		public override ArmorMaterialType MaterialType{ get{ return ArmorMaterialType.Leather; } }		
		
		private AosWeaponAttributes m_AosWeaponAttributes;
		
		[CommandProperty( AccessLevel.GameMaster )]
		public AosWeaponAttributes WeaponAttributes
		{
			get{ return m_AosWeaponAttributes; }
		}

		[Constructable]
		public Glasses() : base( 0x2FB8 )
		{
			Weight = 2.0;
		}

		public Glasses( Serial serial ) : base( serial )
		{
		}
		
		public override bool CanEquip( Mobile m )
		{
			if ( !m.NetState.SupportsExpansion( Expansion.ML ) )
			{
				m.SendLocalizedMessage( 1072791 ); // You must upgrade to Mondain's Legacy in order to use that item.
				
				return false;
			}
			
			return true;
		}
		
		public override void AppendChildNameProperties( ObjectPropertyList list )
		{
			base.AppendChildNameProperties( list );
			
			list.Add( 1075085 ); // Requirement: Mondain's Legacy	
		}
		
		public override void AddResistanceProperties( ObjectPropertyList list )
		{
			int prop;

			if ( (prop = m_AosWeaponAttributes.HitColdArea) != 0 )
				list.Add( 1060416, prop.ToString() ); // hit cold area ~1_val~%

			if ( (prop = m_AosWeaponAttributes.HitDispel) != 0 )
				list.Add( 1060417, prop.ToString() ); // hit dispel ~1_val~%

			if ( (prop = m_AosWeaponAttributes.HitEnergyArea) != 0 )
				list.Add( 1060418, prop.ToString() ); // hit energy area ~1_val~%

			if ( (prop = m_AosWeaponAttributes.HitFireArea) != 0 )
				list.Add( 1060419, prop.ToString() ); // hit fire area ~1_val~%

			if ( (prop = m_AosWeaponAttributes.HitFireball) != 0 )
				list.Add( 1060420, prop.ToString() ); // hit fireball ~1_val~%

			if ( (prop = m_AosWeaponAttributes.HitHarm) != 0 )
				list.Add( 1060421, prop.ToString() ); // hit harm ~1_val~%

			if ( (prop = m_AosWeaponAttributes.HitLeechHits) != 0 )
				list.Add( 1060422, prop.ToString() ); // hit life leech ~1_val~%

			if ( (prop = m_AosWeaponAttributes.HitLightning) != 0 )
				list.Add( 1060423, prop.ToString() ); // hit lightning ~1_val~%

			if ( (prop = m_AosWeaponAttributes.HitLowerAttack) != 0 )
				list.Add( 1060424, prop.ToString() ); // hit lower attack ~1_val~%

			if ( (prop = m_AosWeaponAttributes.HitLowerDefend) != 0 )
				list.Add( 1060425, prop.ToString() ); // hit lower defense ~1_val~%

			if ( (prop = m_AosWeaponAttributes.HitMagicArrow) != 0 )
				list.Add( 1060426, prop.ToString() ); // hit magic arrow ~1_val~%

			if ( (prop = m_AosWeaponAttributes.HitLeechMana) != 0 )
				list.Add( 1060427, prop.ToString() ); // hit mana leech ~1_val~%

			if ( (prop = m_AosWeaponAttributes.HitPhysicalArea) != 0 )
				list.Add( 1060428, prop.ToString() ); // hit physical area ~1_val~%

			if ( (prop = m_AosWeaponAttributes.HitPoisonArea) != 0 )
				list.Add( 1060429, prop.ToString() ); // hit poison area ~1_val~%

			if ( (prop = m_AosWeaponAttributes.HitLeechStam) != 0 )
				list.Add( 1060430, prop.ToString() ); // hit stamina leech ~1_val~%
				
			base.AddResistanceProperties( list );
		}		
		
		private static void SetSaveFlag( ref SaveFlag flags, SaveFlag toSet, bool setIf )
		{
			if ( setIf )
				flags |= toSet;
		}

		private static bool GetSaveFlag( SaveFlag flags, SaveFlag toGet )
		{
			return ( (flags & toGet) != 0 );
		}
		
		private enum SaveFlag
		{
			None					= 0x00000000,
			WeaponAttributes		= 0x00000001,
		}
		
		public override void Serialize( GenericWriter writer )
		{
			base.Serialize( writer );
			
			writer.Write( (int) 0 ); // version			
			
			SaveFlag flags = SaveFlag.None;
			
			SetSaveFlag( ref flags, SaveFlag.WeaponAttributes,	!m_AosWeaponAttributes.IsEmpty );
			
			writer.Write( (int) flags );
			
			if ( GetSaveFlag( flags, SaveFlag.WeaponAttributes ) )
				m_AosWeaponAttributes.Serialize( writer );
		}
		
		public override void Deserialize(GenericReader reader)
		{
			base.Deserialize( reader );
			
			int version = reader.ReadInt();
			
			SaveFlag flags = (SaveFlag) reader.ReadInt();
			
			if ( GetSaveFlag( flags, SaveFlag.WeaponAttributes ) )
				m_AosWeaponAttributes = new AosWeaponAttributes( this, reader );
			else
				m_AosWeaponAttributes = new AosWeaponAttributes( this );
		}
	}
}
and when you try to add this one targets to drop but nothing shows and no crash but console gets nasty errors heres errors
Code:
26/04-08:45 System.Reflection.TargetInvocationException: Exception has been thro
wn by the target of an invocation. ---> System.NullReferenceException: Object re
ference not set to an instance of an object.
   at Server.Items.MaceAndShieldGlasses..ctor() in c:\Program Files\RunUO 2.0 SV
N 160\Scripts\MLTeleporter\Glasses1.cs:line 27
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle._InvokeConstructor(Object[] args, SignatureStru
ct& signature, IntPtr declaringType)
   at System.RuntimeMethodHandle.InvokeConstructor(Object[] args, SignatureStruc
t signature, RuntimeTypeHandle declaringType)
   at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, B
inder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.ConstructorInfo.Invoke(Object[] parameters)
   at Server.Commands.Add.Build(Mobile from, ConstructorInfo ctor, Object[] valu
es, String[,] props, PropertyInfo[] realProps, Boolean& sendError) in c:\Program
 Files\RunUO 2.0 SVN 160\Scripts\Commands\Add.cs:line 243
   at Server.Commands.Add.Build(Mobile from, Point3D start, Point3D end, Constru
ctorInfo ctor, Object[] values, String[,] props, PropertyInfo[] realProps, List`
1 packs) in c:\Program Files\RunUO 2.0 SVN 160\Scripts\Commands\Add.cs:line 312
Anybody got a fix for this.
 

Raider

Wanderer
Kamuflaro;677806 said:
m_AosWeaponAttributes = new AosWeaponAttributes( this );
put that in the ctor
Ok it complies now can add those glasses but wont show this -->WeaponAttributes.HitLowerDefend = 20;
when i highlight it.
 
Raider;677814 said:
Ok it complies now can add those glasses but wont show this -->WeaponAttributes.HitLowerDefend = 20;
when i highlight it.

it wont show but it works... copy the code from the GetProperties in BaseWeapon.cs I don't have the time to do it :)
 

GlаdiatoR

Wanderer
in PlayerMobile.cs find:

Code:
			if ( Talisman is BaseTalisman )
			{
				BaseTalisman talisman = (BaseTalisman) Talisman;
				
				if ( talisman.Protection != null && talisman.Protection.Type != null )
				{
					Type type = talisman.Protection.Type;
					
					if ( type == from.GetType() )
						amount *= 1 - (int) (((double) talisman.Protection.Amount) / 100);
				}
			}

and change to:

Code:
			if ( from != null && Talisman is BaseTalisman )
			{
				BaseTalisman talisman = (BaseTalisman) Talisman;
				
				if ( talisman.Protection != null && talisman.Protection.Type != null )
				{
					Type type = talisman.Protection.Type;
					
					if ( type.IsAssignableFrom( from.GetType() ) )
						amount *= 1 - (int) (((double) talisman.Protection.Amount) / 100);
				}
			}
 
Top