Hammerhand

Member
I was hoping I could get this on my own, but apparently not. I'm trying to set up the ML quest system in a 2.3 server, but, as you can imagine, I ran into a few roadblocks (more like huge mountains). Anywho, here's a copy of the current error's..
Code:
Errors:
+ Engines/Community Collections/CollectionItem.cs:
	CS0117: Line 32: 'Server.Item' does not contain a definition for 'Measure'
	CS0117: Line 32: 'Server.Item' does not contain a definition for 'GetBitmap'
 
+ Engines/Quests/ML Quest system/Mondain's Legacy/BaseReward.cs:
	CS0246: Line 127: The type or namespace name 'BowRecipes' could not be found
(are you missing a using directive or an assembly reference?)
	CS0118: Line 163: 'Server.Engines.Quests.BaseReward.TailorRecipe()' is a 'me
thod' but is used like a 'type'
	CS0246: Line 182: The type or namespace name 'SmithRecipes' could not be fou
nd (are you missing a using directive or an assembly reference?)
	CS0246: Line 201: The type or namespace name 'TinkerRecipes' could not be fo
und (are you missing a using directive or an assembly reference?)
	CS0246: Line 206: The type or namespace name 'CarpRecipes' could not be foun
d (are you missing a using directive or an assembly reference?)
	CS0246: Line 228: The type or namespace name 'CookRecipes' could not be foun
d (are you missing a using directive or an assembly reference?)
+ Engines/Quests/ML Quest system/Peerless System/Bedlam/LadyMelisande.cs:
	CS1502: Line 66: The best overloaded method match for 'Server.Mobiles.BaseCr
eature.AddLoot(Server.LootPack, int)' has some invalid arguments
	CS1503: Line 66: Argument '1': cannot convert from 'Server.LootPackItem[]' t
o 'Server.LootPack'
+ Engines/Quests/ML Quest system/Peerless System/Prism of Light/ShimmeringEffus
ion.cs:
	CS1502: Line 54: The best overloaded method match for 'Server.Mobiles.BaseCr
eature.AddLoot(Server.LootPack, int)' has some invalid arguments
	CS1503: Line 54: Argument '1': cannot convert from 'Server.LootPackItem[]' t
o 'Server.LootPack'
+ Mobiles/AI/NecroMageAI.cs:
	CS0122: Line 897: 'Server.Spells.Necromancy.AnimateDeadSpell.InternalTarget'
is inaccessible due to its protection level
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.
I have searched for all signs of those recipes, but I guess I missed some. The LootPack errors are on the ParrotItem & the NecroMage error is... not really sure. I'm working with a 2.3 w/Neruns Distro, OWLTR 3.01, FSATS & Xanthos utilities. The ML files I'm using are from ForkUO pub. 54 (I think). Anyway, any help and or pointing in the right direction of would be greatly appreciated. I can post whatever files are needed.
 
can you please post copies of your scripts..


Baserewards.cs
CollectionIem.cs
LadyMelisande.cs
ShimmeringEffussion.cs
 
Also included LootPack.cs & Parrot.cs
 

Attachments

  • BaseReward.cs
    7.4 KB · Views: 3
  • CollectionItem.cs
    5.6 KB · Views: 1
  • LadyMelisande.cs
    10.7 KB · Views: 0
  • ShimmeringEffusion.cs
    6.4 KB · Views: 1
  • Parrot.cs
    3.9 KB · Views: 1
  • LootPack.cs
    32.9 KB · Views: 1
Ok im going to work through these for you and hopefully we can fix the problem..

You seem to be missing a few core edits i believe thats why your getting problems.

Server/Item.cs

Around line 1021 (in mine anyways)

Look for
Code:
private void SetFlag(ImplFlag flag, bool value)

above this add

Code:
#region Mondain's Legacy
public static Bitmap GetBitmap(int itemID)
{
try
{
return OpenUOSDK.ArtFactory.GetStatic<Bitmap>(itemID);
}
catch
{
Utility.PushColor(ConsoleColor.Red);
Console.WriteLine("Error: Not able to read client files.");
Utility.PopColor();
}
 
return null;
}
 
public static unsafe void Measure(Bitmap bmp, out int xMin, out int yMin, out int xMax, out int yMax)
{
xMin = yMin = 0;
xMax = yMax = -1;
 
if (bmp == null || bmp.Width <= 0 || bmp.Height <= 0)
{
return;
}
 
BitmapData bd = bmp.LockBits(
new Rectangle(0, 0, bmp.Width, bmp.Height), ImageLockMode.ReadOnly, PixelFormat.Format16bppArgb1555);
 
int delta = (bd.Stride >> 1) - bd.Width;
int lineDelta = bd.Stride >> 1;
 
var pBuffer = (ushort*)bd.Scan0;
var pLineEnd = pBuffer + bd.Width;
var pEnd = pBuffer + (bd.Height * lineDelta);
 
bool foundPixel = false;
 
int x = 0, y = 0;
 
while (pBuffer < pEnd)
{
while (pBuffer < pLineEnd)
{
ushort c = *pBuffer++;
 
if ((c & 0x8000) != 0)
{
if (!foundPixel)
{
foundPixel = true;
xMin = xMax = x;
yMin = yMax = y;
}
else
{
if (x < xMin)
{
xMin = x;
}
 
if (y < yMin)
{
yMin = y;
}
 
if (x > xMax)
{
xMax = x;
}
 
if (y > yMax)
{
yMax = y;
}
}
}
++x;
}
 
pBuffer += delta;
pLineEnd += lineDelta;
++y;
x = 0;
}
 
bmp.UnlockBits(bd);
}
#endregion

Should look like this once finished

Code:
public List<Item> AcquireItems()
{
if (this is Container)
{
Container cont = this as Container;
 
if (cont.m_Items == null)
{
cont.m_Items = new List<Item>();
}
 
return cont.m_Items;
}
 
CompactInfo info = AcquireCompactInfo();
 
if (info.m_Items == null)
{
info.m_Items = new List<Item>();
}
 
return info.m_Items;
}
 
#region Mondain's Legacy
public static Bitmap GetBitmap(int itemID)
{
try
{
return OpenUOSDK.ArtFactory.GetStatic<Bitmap>(itemID);
}
catch
{
Utility.PushColor(ConsoleColor.Red);
Console.WriteLine("Error: Not able to read client files.");
Utility.PopColor();
}
 
return null;
}
 
public static unsafe void Measure(Bitmap bmp, out int xMin, out int yMin, out int xMax, out int yMax)
{
xMin = yMin = 0;
xMax = yMax = -1;
 
if (bmp == null || bmp.Width <= 0 || bmp.Height <= 0)
{
return;
}
 
BitmapData bd = bmp.LockBits(
new Rectangle(0, 0, bmp.Width, bmp.Height), ImageLockMode.ReadOnly, PixelFormat.Format16bppArgb1555);
 
int delta = (bd.Stride >> 1) - bd.Width;
int lineDelta = bd.Stride >> 1;
 
var pBuffer = (ushort*)bd.Scan0;
var pLineEnd = pBuffer + bd.Width;
var pEnd = pBuffer + (bd.Height * lineDelta);
 
bool foundPixel = false;
 
int x = 0, y = 0;
 
while (pBuffer < pEnd)
{
while (pBuffer < pLineEnd)
{
ushort c = *pBuffer++;
 
if ((c & 0x8000) != 0)
{
if (!foundPixel)
{
foundPixel = true;
xMin = xMax = x;
yMin = yMax = y;
}
else
{
if (x < xMin)
{
xMin = x;
}
 
if (y < yMin)
{
yMin = y;
}
 
if (x > xMax)
{
xMax = x;
}
 
if (y > yMax)
{
yMax = y;
}
}
}
++x;
}
 
pBuffer += delta;
pLineEnd += lineDelta;
++y;
x = 0;
}
 
bmp.UnlockBits(bd);
}
#endregion
 
private void SetFlag(ImplFlag flag, bool value)
{
if (value)
{
m_Flags |= flag;
}
else
{
m_Flags &= ~flag;
}
}
 
I was honestly hoping I could avoid any core edits... This is for a live server w/ an established player base & we were concerned about the saves no longer being valid if I have to do a core edit & recompile (I'm working on a copy obviously).
 
Did you have ML installed before on your live server?

If so then technically these core edits should already be in your live servers core.. If not im unsure how this will effect your saves..

But unfortunatly your gonna need some core edits and i think there might be more to do the futher i dig into your problems..
 
Its a RunUO 2.3 server... barely any ML. But the Region.cs in the core has all the ML areas in it oddly enough... for the music at least. lol I'll try a core recompile with a copy of my copy... w/ saves in place & see if anything explodes or not..
 
Turns out, it s mute point anyway.. The server was dl'd pre-compiled so the server folder doesnt even exist.
 
I'd suggest switching to Servuo it is actually merged with runuo 2.4 (Git Repository)

Plus it has ML complete and most of SA which will make it easier in the future to update as its beyond Runuo.
 
I know. I was attempting to use the quest system from it. But, as I said, its a live server & the owner doesnt want to mess with the saves.
 
I got the test server to load, only now after saving, I'm getting weapon deletions.. Guess I screwed up my BaseWeapon.cs Ser/Deser.. Can anyone see what I'm not? I figure its probably something stupid & I'll be kicking myself on it, but oh well.. Live~N~Learn (hopefully).
Serialize
Code:
		public override void Serialize(GenericWriter writer)
		{
			base.Serialize(writer);
 
			writer.Write((int)10); // version
 
			#region SF Imbuing
			writer.Write((int)m_TimesImbued);
			writer.Write((bool)m_DImodded);
			#endregion
 
			#region Mondain's Legacy
			writer.Write((int)this.m_Slayer3);
			#endregion
 
			#region Mondain's Legacy Sets
			SetFlag sflags = SetFlag.None;
 
			SetSaveFlag(ref sflags, SetFlag.Attributes, !this.m_SetAttributes.IsEmpty);
			SetSaveFlag(ref sflags, SetFlag.SkillBonuses, !this.m_SetSkillBonuses.IsEmpty);
			SetSaveFlag(ref sflags, SetFlag.Hue, this.m_SetHue != 0);
			SetSaveFlag(ref sflags, SetFlag.LastEquipped, this.m_LastEquipped);
			SetSaveFlag(ref sflags, SetFlag.SetEquipped, this.m_SetEquipped);
			SetSaveFlag(ref sflags, SetFlag.SetSelfRepair, this.m_SetSelfRepair != 0);
 
			writer.WriteEncodedInt((int)sflags);
 
			if (GetSaveFlag(sflags, SetFlag.Attributes))
				this.m_SetAttributes.Serialize(writer);
 
			if (GetSaveFlag(sflags, SetFlag.SkillBonuses))
				this.m_SetSkillBonuses.Serialize(writer);
 
			if (GetSaveFlag(sflags, SetFlag.Hue))
				writer.Write((int)this.m_SetHue);
 
			if (GetSaveFlag(sflags, SetFlag.LastEquipped))
				writer.Write((bool)this.m_LastEquipped);
 
			if (GetSaveFlag(sflags, SetFlag.SetEquipped))
				writer.Write((bool)this.m_SetEquipped);
 
			if (GetSaveFlag(sflags, SetFlag.SetSelfRepair))
				writer.WriteEncodedInt((int)this.m_SetSelfRepair);
			#endregion
 
			SaveFlag flags = SaveFlag.None;
 
			SetSaveFlag(ref flags, SaveFlag.DamageLevel, m_DamageLevel != WeaponDamageLevel.Regular);
			SetSaveFlag(ref flags, SaveFlag.AccuracyLevel, m_AccuracyLevel != WeaponAccuracyLevel.Regular);
			SetSaveFlag(ref flags, SaveFlag.DurabilityLevel, m_DurabilityLevel != WeaponDurabilityLevel.Regular);
			SetSaveFlag(ref flags, SaveFlag.Quality, m_Quality != WeaponQuality.Regular);
			SetSaveFlag(ref flags, SaveFlag.Hits, m_Hits != 0);
			SetSaveFlag(ref flags, SaveFlag.MaxHits, m_MaxHits != 0);
			SetSaveFlag(ref flags, SaveFlag.Slayer, m_Slayer != SlayerName.None);
			SetSaveFlag(ref flags, SaveFlag.Poison, m_Poison != null);
			SetSaveFlag(ref flags, SaveFlag.PoisonCharges, m_PoisonCharges != 0);
			SetSaveFlag(ref flags, SaveFlag.Crafter, m_Crafter != null);
			SetSaveFlag(ref flags, SaveFlag.Identified, m_Identified != false);
			SetSaveFlag(ref flags, SaveFlag.StrReq, m_StrReq != -1);
			SetSaveFlag(ref flags, SaveFlag.DexReq, m_DexReq != -1);
			SetSaveFlag(ref flags, SaveFlag.IntReq, m_IntReq != -1);
			SetSaveFlag(ref flags, SaveFlag.MinDamage, m_MinDamage != -1);
			SetSaveFlag(ref flags, SaveFlag.MaxDamage, m_MaxDamage != -1);
			SetSaveFlag(ref flags, SaveFlag.HitSound, m_HitSound != -1);
			SetSaveFlag(ref flags, SaveFlag.MissSound, m_MissSound != -1);
			SetSaveFlag(ref flags, SaveFlag.Speed, m_Speed != -1);
			SetSaveFlag(ref flags, SaveFlag.MaxRange, m_MaxRange != -1);
			SetSaveFlag(ref flags, SaveFlag.Skill, m_Skill != (SkillName)(-1));
			SetSaveFlag(ref flags, SaveFlag.Type, m_Type != (WeaponType)(-1));
			SetSaveFlag(ref flags, SaveFlag.Animation, m_Animation != (WeaponAnimation)(-1));
			SetSaveFlag(ref flags, SaveFlag.Resource, m_Resource != CraftResource.Iron);
			SetSaveFlag(ref flags, SaveFlag.xAttributes, !m_AosAttributes.IsEmpty);
			SetSaveFlag(ref flags, SaveFlag.xWeaponAttributes, !m_AosWeaponAttributes.IsEmpty);
			SetSaveFlag(ref flags, SaveFlag.PlayerConstructed, m_PlayerConstructed);
			SetSaveFlag(ref flags, SaveFlag.SkillBonuses, !m_AosSkillBonuses.IsEmpty);
			SetSaveFlag(ref flags, SaveFlag.Slayer2, m_Slayer2 != SlayerName.None);
			SetSaveFlag(ref flags, SaveFlag.ElementalDamages, !m_AosElementDamages.IsEmpty);
			SetSaveFlag(ref flags, SaveFlag.EngravedText, !String.IsNullOrEmpty(m_EngravedText));
 
			writer.Write((int)flags);
 
			if (GetSaveFlag(flags, SaveFlag.DamageLevel))
				writer.Write((int)m_DamageLevel);
 
			if (GetSaveFlag(flags, SaveFlag.AccuracyLevel))
				writer.Write((int)m_AccuracyLevel);
 
			if (GetSaveFlag(flags, SaveFlag.DurabilityLevel))
				writer.Write((int)m_DurabilityLevel);
 
			if (GetSaveFlag(flags, SaveFlag.Quality))
				writer.Write((int)m_Quality);
 
			if (GetSaveFlag(flags, SaveFlag.Hits))
				writer.Write((int)m_Hits);
 
			if (GetSaveFlag(flags, SaveFlag.MaxHits))
				writer.Write((int)m_MaxHits);
 
			if (GetSaveFlag(flags, SaveFlag.Slayer))
				writer.Write((int)m_Slayer);
 
			if (GetSaveFlag(flags, SaveFlag.Poison))
				Poison.Serialize(m_Poison, writer);
 
			if (GetSaveFlag(flags, SaveFlag.PoisonCharges))
				writer.Write((int)m_PoisonCharges);
 
			if (GetSaveFlag(flags, SaveFlag.Crafter))
				writer.Write((Mobile)m_Crafter);
 
			if (GetSaveFlag(flags, SaveFlag.StrReq))
				writer.Write((int)m_StrReq);
 
			if (GetSaveFlag(flags, SaveFlag.DexReq))
				writer.Write((int)m_DexReq);
 
			if (GetSaveFlag(flags, SaveFlag.IntReq))
				writer.Write((int)m_IntReq);
 
			if (GetSaveFlag(flags, SaveFlag.MinDamage))
				writer.Write((int)m_MinDamage);
 
			if (GetSaveFlag(flags, SaveFlag.MaxDamage))
				writer.Write((int)m_MaxDamage);
 
			if (GetSaveFlag(flags, SaveFlag.HitSound))
				writer.Write((int)m_HitSound);
 
			if (GetSaveFlag(flags, SaveFlag.MissSound))
				writer.Write((int)m_MissSound);
 
			if (GetSaveFlag(flags, SaveFlag.Speed))
				writer.Write((float)m_Speed);
 
			if (GetSaveFlag(flags, SaveFlag.MaxRange))
				writer.Write((int)m_MaxRange);
 
			if (GetSaveFlag(flags, SaveFlag.Skill))
				writer.Write((int)m_Skill);
 
			if (GetSaveFlag(flags, SaveFlag.Type))
				writer.Write((int)m_Type);
 
			if (GetSaveFlag(flags, SaveFlag.Animation))
				writer.Write((int)m_Animation);
 
			if (GetSaveFlag(flags, SaveFlag.Resource))
				writer.Write((int)m_Resource);
 
			if (GetSaveFlag(flags, SaveFlag.xAttributes))
				m_AosAttributes.Serialize(writer);
 
			if (GetSaveFlag(flags, SaveFlag.xWeaponAttributes))
				m_AosWeaponAttributes.Serialize(writer);
 
			if (GetSaveFlag(flags, SaveFlag.SkillBonuses))
				m_AosSkillBonuses.Serialize(writer);
 
			if (GetSaveFlag(flags, SaveFlag.Slayer2))
				writer.Write((int)m_Slayer2);
 
			if (GetSaveFlag(flags, SaveFlag.ElementalDamages))
				m_AosElementDamages.Serialize(writer);
 
			if (GetSaveFlag(flags, SaveFlag.EngravedText))
				writer.Write((string)m_EngravedText);
		}
 
		[Flags]
		private enum SaveFlag
		{
			None = 0x00000000,
			DamageLevel = 0x00000001,
			AccuracyLevel = 0x00000002,
			DurabilityLevel = 0x00000004,
			Quality = 0x00000008,
			Hits = 0x00000010,
			MaxHits = 0x00000020,
			Slayer = 0x00000040,
			Poison = 0x00000080,
			PoisonCharges = 0x00000100,
			Crafter = 0x00000200,
			Identified = 0x00000400,
			StrReq = 0x00000800,
			DexReq = 0x00001000,
			IntReq = 0x00002000,
			MinDamage = 0x00004000,
			MaxDamage = 0x00008000,
			HitSound = 0x00010000,
			MissSound = 0x00020000,
			Speed = 0x00040000,
			MaxRange = 0x00080000,
			Skill = 0x00100000,
			Type = 0x00200000,
			Animation = 0x00400000,
			Resource = 0x00800000,
			xAttributes = 0x01000000,
			xWeaponAttributes = 0x02000000,
			PlayerConstructed = 0x04000000,
			SkillBonuses = 0x08000000,
			Slayer2 = 0x10000000,
			ElementalDamages = 0x20000000,
			EngravedText = 0x40000000
		}
		#region Mondain's Legacy Sets
		private static void SetSaveFlag(ref SetFlag flags, SetFlag toSet, bool setIf)
		{
			if (setIf)
				flags |= toSet;
		}
 
		private static bool GetSaveFlag(SetFlag flags, SetFlag toGet)
		{
			return ((flags & toGet) != 0);
		}
 
		[Flags]
		private enum SetFlag
		{
			None = 0x00000000,
			Attributes = 0x00000001,
			WeaponAttributes = 0x00000002,
			SkillBonuses = 0x00000004,
			Hue = 0x00000008,
			LastEquipped = 0x00000010,
			SetEquipped = 0x00000020,
			SetSelfRepair = 0x00000040,
		}
		#endregion
Deserialize
Code:
		public override void Deserialize(GenericReader reader)
		{
			base.Deserialize(reader);
 
			int version = reader.ReadInt();
 
			switch (version)
			{
 
				case 10:
					{
						m_TimesImbued = reader.ReadInt();
						m_Slayer3 = (TalismanSlayerName)reader.ReadInt();
 
						SetFlag flags = (SetFlag)reader.ReadEncodedInt();
 
						if (GetSaveFlag(flags, SetFlag.Attributes))
							m_SetAttributes = new AosAttributes(this, reader);
						else
							m_SetAttributes = new AosAttributes(this);
 
						if (GetSaveFlag(flags, SetFlag.WeaponAttributes))
							m_SetSelfRepair = (new AosWeaponAttributes(this, reader)).SelfRepair;
 
						if (GetSaveFlag(flags, SetFlag.SkillBonuses))
							m_SetSkillBonuses = new AosSkillBonuses(this, reader);
						else
							m_SetSkillBonuses = new AosSkillBonuses(this);
 
						if (GetSaveFlag(flags, SetFlag.Hue))
							m_SetHue = reader.ReadInt();
 
						if (GetSaveFlag(flags, SetFlag.LastEquipped))
							m_LastEquipped = reader.ReadBool();
 
						if (GetSaveFlag(flags, SetFlag.SetEquipped))
							m_SetEquipped = reader.ReadBool();
 
						if (GetSaveFlag(flags, SetFlag.SetSelfRepair))
							m_SetSelfRepair = reader.ReadEncodedInt();
						goto case 5;
					}
 
				case 9:
				case 8:
				case 7:
				case 6:
				case 5:
					{
						SaveFlag flags = (SaveFlag)reader.ReadInt();
 
						if (GetSaveFlag(flags, SaveFlag.DamageLevel))
						{
							m_DamageLevel = (WeaponDamageLevel)reader.ReadInt();
 
							if (m_DamageLevel > WeaponDamageLevel.Vanq)
								m_DamageLevel = WeaponDamageLevel.Ruin;
						}
 
						if (GetSaveFlag(flags, SaveFlag.AccuracyLevel))
						{
							m_AccuracyLevel = (WeaponAccuracyLevel)reader.ReadInt();
 
							if (m_AccuracyLevel > WeaponAccuracyLevel.Supremely)
								m_AccuracyLevel = WeaponAccuracyLevel.Accurate;
						}
 
						if (GetSaveFlag(flags, SaveFlag.DurabilityLevel))
						{
							m_DurabilityLevel = (WeaponDurabilityLevel)reader.ReadInt();
 
							if (m_DurabilityLevel > WeaponDurabilityLevel.Indestructible)
								m_DurabilityLevel = WeaponDurabilityLevel.Durable;
						}
 
						if (GetSaveFlag(flags, SaveFlag.Quality))
							m_Quality = (WeaponQuality)reader.ReadInt();
						else
							m_Quality = WeaponQuality.Regular;
 
						if (GetSaveFlag(flags, SaveFlag.Hits))
							m_Hits = reader.ReadInt();
 
						if (GetSaveFlag(flags, SaveFlag.MaxHits))
							m_MaxHits = reader.ReadInt();
 
						if (GetSaveFlag(flags, SaveFlag.Slayer))
							m_Slayer = (SlayerName)reader.ReadInt();
 
						if (GetSaveFlag(flags, SaveFlag.Poison))
							m_Poison = Poison.Deserialize(reader);
 
						if (GetSaveFlag(flags, SaveFlag.PoisonCharges))
							m_PoisonCharges = reader.ReadInt();
 
						if (GetSaveFlag(flags, SaveFlag.Crafter))
							m_Crafter = reader.ReadMobile();
 
						if (GetSaveFlag(flags, SaveFlag.Identified))
							m_Identified = (version >= 6 || reader.ReadBool());
 
						if (GetSaveFlag(flags, SaveFlag.StrReq))
							m_StrReq = reader.ReadInt();
						else
							m_StrReq = -1;
 
						if (GetSaveFlag(flags, SaveFlag.DexReq))
							m_DexReq = reader.ReadInt();
						else
							m_DexReq = -1;
 
						if (GetSaveFlag(flags, SaveFlag.IntReq))
							m_IntReq = reader.ReadInt();
						else
							m_IntReq = -1;
 
						if (GetSaveFlag(flags, SaveFlag.MinDamage))
							m_MinDamage = reader.ReadInt();
						else
							m_MinDamage = -1;
 
						if (GetSaveFlag(flags, SaveFlag.MaxDamage))
							m_MaxDamage = reader.ReadInt();
						else
							m_MaxDamage = -1;
 
						if (GetSaveFlag(flags, SaveFlag.HitSound))
							m_HitSound = reader.ReadInt();
						else
							m_HitSound = -1;
 
						if (GetSaveFlag(flags, SaveFlag.MissSound))
							m_MissSound = reader.ReadInt();
						else
							m_MissSound = -1;
 
						if (GetSaveFlag(flags, SaveFlag.Speed))
						{
							if (version < 9)
								m_Speed = reader.ReadInt();
							else
								m_Speed = reader.ReadFloat();
						}
						else
							m_Speed = -1;
 
						if (GetSaveFlag(flags, SaveFlag.MaxRange))
							m_MaxRange = reader.ReadInt();
						else
							m_MaxRange = -1;
 
						if (GetSaveFlag(flags, SaveFlag.Skill))
							m_Skill = (SkillName)reader.ReadInt();
						else
							m_Skill = (SkillName)(-1);
 
						if (GetSaveFlag(flags, SaveFlag.Type))
							m_Type = (WeaponType)reader.ReadInt();
						else
							m_Type = (WeaponType)(-1);
 
						if (GetSaveFlag(flags, SaveFlag.Animation))
							m_Animation = (WeaponAnimation)reader.ReadInt();
						else
							m_Animation = (WeaponAnimation)(-1);
 
						if (GetSaveFlag(flags, SaveFlag.Resource))
							m_Resource = (CraftResource)reader.ReadInt();
						else
							m_Resource = CraftResource.Iron;
 
						if (GetSaveFlag(flags, SaveFlag.xAttributes))
							m_AosAttributes = new AosAttributes(this, reader);
						else
							m_AosAttributes = new AosAttributes(this);
 
						if (GetSaveFlag(flags, SaveFlag.xWeaponAttributes))
							m_AosWeaponAttributes = new AosWeaponAttributes(this, reader);
						else
							m_AosWeaponAttributes = new AosWeaponAttributes(this);
 
						if (UseSkillMod && m_AccuracyLevel != WeaponAccuracyLevel.Regular && Parent is Mobile)
						{
							m_SkillMod = new DefaultSkillMod(AccuracySkill, true, (int)m_AccuracyLevel * 5);
							((Mobile)Parent).AddSkillMod(m_SkillMod);
						}
 
						if (version < 7 && m_AosWeaponAttributes.MageWeapon != 0)
							m_AosWeaponAttributes.MageWeapon = 30 - m_AosWeaponAttributes.MageWeapon;
 
						if (Core.AOS && m_AosWeaponAttributes.MageWeapon != 0 && m_AosWeaponAttributes.MageWeapon != 30 && Parent is Mobile)
						{
							m_MageMod = new DefaultSkillMod(SkillName.Magery, true, -30 + m_AosWeaponAttributes.MageWeapon);
							((Mobile)Parent).AddSkillMod(m_MageMod);
						}
 
						if (GetSaveFlag(flags, SaveFlag.PlayerConstructed))
							m_PlayerConstructed = true;
 
						if (GetSaveFlag(flags, SaveFlag.SkillBonuses))
							m_AosSkillBonuses = new AosSkillBonuses(this, reader);
						else
							m_AosSkillBonuses = new AosSkillBonuses(this);
 
						if (GetSaveFlag(flags, SaveFlag.Slayer2))
							m_Slayer2 = (SlayerName)reader.ReadInt();
 
						if (GetSaveFlag(flags, SaveFlag.ElementalDamages))
							m_AosElementDamages = new AosElementAttributes(this, reader);
						else
							m_AosElementDamages = new AosElementAttributes(this);
 
						if (GetSaveFlag(flags, SaveFlag.EngravedText))
							m_EngravedText = reader.ReadString();
 
						break;
					}
				case 4:
					{
						m_Slayer = (SlayerName)reader.ReadInt();
 
						goto case 3;
					}
				case 3:
					{
						m_StrReq = reader.ReadInt();
						m_DexReq = reader.ReadInt();
						m_IntReq = reader.ReadInt();
 
						goto case 2;
					}
				case 2:
					{
						m_Identified = reader.ReadBool();
 
						goto case 1;
					}
				case 1:
					{
						m_MaxRange = reader.ReadInt();
 
						goto case 0;
					}
				case 0:
					{
						if (version == 0)
							m_MaxRange = 1; // default
 
						if (version < 5)
						{
							m_Resource = CraftResource.Iron;
							m_AosAttributes = new AosAttributes(this);
							m_AosWeaponAttributes = new AosWeaponAttributes(this);
							m_AosElementDamages = new AosElementAttributes(this);
							m_AosSkillBonuses = new AosSkillBonuses(this);
						}
 
						m_MinDamage = reader.ReadInt();
						m_MaxDamage = reader.ReadInt();
 
						m_Speed = reader.ReadInt();
 
						m_HitSound = reader.ReadInt();
						m_MissSound = reader.ReadInt();
 
						m_Skill = (SkillName)reader.ReadInt();
						m_Type = (WeaponType)reader.ReadInt();
						m_Animation = (WeaponAnimation)reader.ReadInt();
						m_DamageLevel = (WeaponDamageLevel)reader.ReadInt();
						m_AccuracyLevel = (WeaponAccuracyLevel)reader.ReadInt();
						m_DurabilityLevel = (WeaponDurabilityLevel)reader.ReadInt();
						m_Quality = (WeaponQuality)reader.ReadInt();
 
						m_Crafter = reader.ReadMobile();
 
						m_Poison = Poison.Deserialize(reader);
						m_PoisonCharges = reader.ReadInt();
 
						if (m_StrReq == OldStrengthReq)
							m_StrReq = -1;
 
						if (m_DexReq == OldDexterityReq)
							m_DexReq = -1;
 
						if (m_IntReq == OldIntelligenceReq)
							m_IntReq = -1;
 
						if (m_MinDamage == OldMinDamage)
							m_MinDamage = -1;
 
						if (m_MaxDamage == OldMaxDamage)
							m_MaxDamage = -1;
 
						if (m_HitSound == OldHitSound)
							m_HitSound = -1;
 
						if (m_MissSound == OldMissSound)
							m_MissSound = -1;
 
						if (m_Speed == OldSpeed)
							m_Speed = -1;
 
						if (m_MaxRange == OldMaxRange)
							m_MaxRange = -1;
 
						if (m_Skill == OldSkill)
							m_Skill = (SkillName)(-1);
 
						if (m_Type == OldType)
							m_Type = (WeaponType)(-1);
 
						if (m_Animation == OldAnimation)
							m_Animation = (WeaponAnimation)(-1);
 
						if (UseSkillMod && m_AccuracyLevel != WeaponAccuracyLevel.Regular && Parent is Mobile)
						{
							m_SkillMod = new DefaultSkillMod(AccuracySkill, true, (int)m_AccuracyLevel * 5);
							((Mobile)Parent).AddSkillMod(m_SkillMod);
						}
 
						break;
					}
			}
			#region Mondain's Legacy Sets
			if (m_SetAttributes == null)
				m_SetAttributes = new AosAttributes(this);
 
			if (m_SetSkillBonuses == null)
				m_SetSkillBonuses = new AosSkillBonuses(this);
			#endregion
			if (Core.AOS && Parent is Mobile)
				m_AosSkillBonuses.AddTo((Mobile)Parent);
 
			int strBonus = m_AosAttributes.BonusStr;
			int dexBonus = m_AosAttributes.BonusDex;
			int intBonus = m_AosAttributes.BonusInt;
 
			if (this.Parent is Mobile && (strBonus != 0 || dexBonus != 0 || intBonus != 0))
			{
				Mobile m = (Mobile)this.Parent;
 
				string modName = this.Serial.ToString();
 
				if (strBonus != 0)
					m.AddStatMod(new StatMod(StatType.Str, modName + "Str", strBonus, TimeSpan.Zero));
 
				if (dexBonus != 0)
					m.AddStatMod(new StatMod(StatType.Dex, modName + "Dex", dexBonus, TimeSpan.Zero));
 
				if (intBonus != 0)
					m.AddStatMod(new StatMod(StatType.Int, modName + "Int", intBonus, TimeSpan.Zero));
			}
 
			if (Parent is Mobile)
				((Mobile)Parent).CheckStatTimers();
 
			if (m_Hits <= 0 && m_MaxHits <= 0)
			{
				m_Hits = m_MaxHits = Utility.RandomMinMax(InitMinHits, InitMaxHits);
			}
 
			if (version < 6)
				m_PlayerConstructed = true; // we don't know, so, assume it's crafted
		}
 
There isn't technically anything wrong with it but your serilzation/dserilaztions are too big.

try this

Code:
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
 
writer.Write(11); // version
 
// Version 11
			#region SF Imbuing
			writer.Write((int)m_TimesImbued);
			writer.Write((bool)m_DImodded);
			#endregion

Code:
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
 
int version = reader.ReadInt();
 
switch (version)
{
				case 11:
					{
						#region SF Imbuing
 
						{
							m_TimesImbued = reader.ReadInt();
							m_DImodded = reader.ReadBool();
							goto case 10;
						}
case
10:
{
 
m_Slayer3 = (TalismanSlayerName)reader.ReadInt();
SetFlag flags = (SetFlag)reader.ReadEncodedInt();
if (GetSaveFlag(flags, SetFlag.Attributes)){
m_SetAttributes =
new AosAttributes(this, reader);}
else{
m_SetAttributes =
new AosAttributes(this);}
if (GetSaveFlag(flags, SetFlag.WeaponAttributes)){
m_SetSelfRepair = (
new AosWeaponAttributes(this, reader)).SelfRepair;}
if (GetSaveFlag(flags, SetFlag.SkillBonuses)){
m_SetSkillBonuses =
new AosSkillBonuses(this, reader);}
else{
m_SetSkillBonuses =
new AosSkillBonuses(this);}
if (GetSaveFlag(flags, SetFlag.Hue)){
m_SetHue = reader.ReadInt();
}
if (GetSaveFlag(flags, SetFlag.LastEquipped)){
m_LastEquipped = reader.ReadBool();
}
if (GetSaveFlag(flags, SetFlag.SetEquipped)){
m_SetEquipped = reader.ReadBool();
}
if (GetSaveFlag(flags, SetFlag.SetSelfRepair)){
m_SetSelfRepair = reader.ReadEncodedInt();
}
gotocase 5;}
						#endregion

I had a simular problem to you when i added Imbuing into servuo and spltting them up a bit fixed it..

Please try and let me know
 
oops didn't copy/paste right and regions messed up but im sure you can spot it and fix it..
 
Ya' know? When looking at it in the seperate windows, I thought that was the problem, but with having been at this all night, I'm starting to see double. I think I've managed to take care of the ML Quest issues w/o a core edit & recompile. Just trying to get back ON the tester to test them. lol
 
Ive done the same thing spent soo long looking at scripts that you miss the small problems and think its something big lol..

The amount of times i made myself look stupid when i forget to increase the amount in writer writer lol
 
Deleted those saves & used a backup set & got this..
Code:
RunUO - [www.runuo.com] Version 2.2, Build 4782.3756
Core: Running on .NET Framework Version 2.0.50727
Core: Running with arguments: -debug
Core: Optimizing for 4 64-bit processors
Scripts: Compiling C# scripts...done (cached)
Scripts: Skipping VB.NET Scripts...done (use -vb to enable)
Scripts: Verifying...done (7423 items, 1313 mobiles) (2.39 seconds)
Regions: Loading...Could not find Type 'CrystalField'
Could not find Type 'IcyRiver'
Could not find Type 'PoisonedTree'
Could not find Type 'AcidRiver'
Could not find Type 'CrystalField'
Could not find Type 'IcyRiver'
Could not find Type 'PoisonedTree'
Could not find Type 'AcidRiver'
Could not find Type 'PoisonedSemetery'
Could not find Type 'StygianAbyssRegion'
done
World: Loading...failed
Error: Type 'Server.Mobiles.MageDragonsFlameMage' was not found. Delete all of t
hose types? (y/n)
World: Loading...An error was encountered while loading a saved object
 - Type: Server.Items.Fists
 - Serial: 0x40000005
Delete the object? (y/n)
Delete all objects of that type? (y/n)
After pressing return an exception will be thrown and the server will terminate.
 
 
Error:
System.Exception: Load failed (items=True, mobiles=False, guilds=False, type=Ser
ver.Items.Fists, serial=0x40000005) ---> System.IO.EndOfStreamException: Unable
to read beyond the end of the stream.
   at System.IO.BinaryReader.FillBuffer(Int32 numBytes)
   at System.IO.BinaryReader.ReadInt32()
   at Server.BinaryFileReader.ReadInt()
   at Server.BaseAttributes..ctor(Item owner, GenericReader reader) in c:\Users\
Dave\Desktop\TSK SERVER2\Scripts\Misc\AOS.cs:line 1094
   at Server.AosAttributes..ctor(Item owner, GenericReader reader) in c:\Users\D
ave\Desktop\TSK SERVER2\Scripts\Misc\AOS.cs:line 260
   at Server.Items.BaseWeapon.Deserialize(GenericReader reader) in c:\Users\Dave
\Desktop\TSK SERVER2\Scripts\Items\Weapons\BaseWeapon.cs:line 3049
   at Server.Items.BaseMeleeWeapon.Deserialize(GenericReader reader) in c:\Users
\Dave\Desktop\TSK SERVER2\Scripts\Items\Weapons\BaseMeleeWeapon.cs:line 63
   at Server.Items.Fists.Deserialize(GenericReader reader) in c:\Users\Dave\Desk
top\TSK SERVER2\Scripts\Items\Weapons\Fists.cs:line 284
   at Server.World.Load()
   --- End of inner exception stack trace ---
   at Server.World.Load()
   at Server.Core.Main(String[] args)
This exception is fatal, press return to exit
 

Attachments

  • BaseWeapon.cs
    148.7 KB · Views: 1
'Server.Mobiles.MageDragonsFlameMage' ??

This is a mobile that should have no real serilaztion/deserilaztion..

Code:
 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();
		}
	}
}

Taken within dragonflamemage.cs
 
Not sure where they got the MageDragonsFlameMage.cs, but I removed it & replaced it with the DragonFlameMage which is why its deleting it. I just cant get on the tester to save so that goes away. Weapons keep deleting..
 
lol you should see my test server think i have over 3000 mobile scripts along without all the items the drop..
 
I added in the ML quest system (which I may have working on this 2.3 after all) along with all those mobiles, the armor suit sets, the works. lol
 
And it loaded! YES!! Oh yeah.. all thos emobiles & such got rid of all but 17 of the 178 bad spawns they had too. lol
 
Nice job on that one guys :) Now you get to see if you can crash the server Hammerhand :) J/k we use to joke about this all the time with our test servers :D
 
not sure what Milva is like at crashing but my record is 33 different crashes in a day although it was from the same system just different problems lol
 
Well I always thought that you have not learned any thing until you did crash the server :) You have me beat for sure Omni , but hey good way to figure out the problem!
 
I love it most when your Beta testing someone shard and you keep crashing it and they have a go at you for doing it too much lol
 
Milva & I worked with someone that would either break a script (possibly just by looking at it), or crash the server. We were kept rather busy..
 
I'm confused on this one..
Code:
World: Loading...An error was encountered while loading a saved object
 - Type: Server.Mobiles.WaterElemental
 - Serial: 0x00001480
Delete the object? (y/n)
Delete all objects of that type? (y/n)
After pressing return an exception will be thrown and the server will terminate.
 
 
Error:
System.Exception: Load failed (items=False, mobiles=True, guilds=False, type=Ser
ver.Mobiles.WaterElemental, serial=0x00001480) ---> System.Exception: ***** Bad
serialize on Server.Mobiles.WaterElemental *****
   at Server.World.Load()
   --- End of inner exception stack trace ---
   at Server.World.Load()
   at Server.Core.Main(String[] args)
Code:
using System;
using Server;
using Server.Items;
 
namespace Server.Mobiles
{
[CorpseName( "a water elemental corpse" )]
public class WaterElemental : BaseCreature
{
		private Boolean m_HasDecanter = true;
 
		[CommandProperty(AccessLevel.GameMaster)]
		public Boolean HasDecanter { get { return m_HasDecanter; } set { m_HasDecanter = value; } }
 
public override double DispelDifficulty{ get{ return 117.5; } }
public override double DispelFocus{ get{ return 45.0; } }
 
[Constructable]
public WaterElemental () : base( AIType.AI_Mage, FightMode.Closest, 10, 1, 0.2, 0.4 )
{
Name = "a water elemental";
Body = 16;
BaseSoundID = 278;
 
SetStr( 126, 155 );
SetDex( 66, 85 );
SetInt( 101, 125 );
 
SetHits( 76, 93 );
 
SetDamage( 7, 9 );
 
SetDamageType( ResistanceType.Physical, 100 );
 
SetResistance( ResistanceType.Physical, 35, 45 );
SetResistance( ResistanceType.Fire, 10, 25 );
SetResistance( ResistanceType.Cold, 10, 25 );
SetResistance( ResistanceType.Poison, 60, 70 );
SetResistance( ResistanceType.Energy, 5, 10 );
 
SetSkill( SkillName.EvalInt, 60.1, 75.0 );
SetSkill( SkillName.Magery, 60.1, 75.0 );
SetSkill( SkillName.MagicResist, 100.1, 115.0 );
SetSkill( SkillName.Tactics, 50.1, 70.0 );
SetSkill( SkillName.Wrestling, 50.1, 70.0 );
 
Fame = 4500;
Karma = -4500;
 
VirtualArmor = 40;
ControlSlots = 3;
CanSwim = true;
 
PackItem( new BlackPearl( 3 ) );
}
 
public override void GenerateLoot()
{
AddLoot( LootPack.Average );
AddLoot( LootPack.Meager );
AddLoot( LootPack.Potions );
}
 
public override bool BleedImmune{ get{ return true; } }
public override int TreasureMapLevel{ get{ return 2; } }
 
public WaterElemental( Serial serial ) : base( serial )
{
}
 
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 );
			writer.Write((Boolean)m_HasDecanter);
		}
 
		public override void Deserialize(GenericReader reader)
		{
			base.Deserialize(reader);
			int version = reader.ReadInt();
 
			switch (version)
			{
				case 0:
					break;
				case 1:
					m_HasDecanter = reader.ReadBool();
					break;
			}
}
}
}
 
Ah your at my most common problem i get to lack of sleep BAD MATHS lol

look at line 74 and line 67

Serilaztion is set to 0 but deserilaztion is set to 1 change line 74 to 1 and problem fixed lol

Code:
public override void Serialize(GenericWriter writer)
		{
			base.Serialize(writer);
			writer.Write((int)1);
 
			writer.Write((Boolean)m_HasDecanter);
		}
 
		public override void Deserialize(GenericReader reader)
		{
			base.Deserialize(reader);
			int version = reader.ReadInt();
 
			switch (version)
			{
				case 0:
					break;
				case 1:
					m_HasDecanter = reader.ReadBool();
					break;
			}
		}
 
Another set of deletions that's getting me slightly irritated. This time I'm working with a copy of the live server, complete with saves... BaseClothing.cs Added in the CommunityCollections in hats, shirts, shoes & outer torso. Then added the ML armor sets stuff. I can post them if needed.
Ser
Code:
 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 );
}
 
[Flags]
private enum SaveFlag
{
None = 0x00000000,
Resource = 0x00000001,
Attributes = 0x00000002,
ClothingAttributes = 0x00000004,
SkillBonuses = 0x00000008,
Resistances = 0x00000010,
MaxHitPoints = 0x00000020,
HitPoints = 0x00000040,
PlayerConstructed = 0x00000080,
Crafter = 0x00000100,
Quality = 0x00000200,
			StrReq = 0x00000400,
			#region Imbuing
			TimesImbued = 0x12000000,
			#endregion
}
		#region Mondain's Legacy Sets
		private static void SetSaveFlag(ref SetFlag flags, SetFlag toSet, bool setIf)
		{
			if (setIf)
				flags |= toSet;
}
 
		private static bool GetSaveFlag(SetFlag flags, SetFlag toGet)
		{
			return ((flags & toGet) != 0);
		}
 
		[Flags]
		private enum SetFlag
		{
			None = 0x00000000,
			Attributes = 0x00000001,
			ArmorAttributes = 0x00000002,
			SkillBonuses = 0x00000004,
			PhysicalBonus = 0x00000008,
			FireBonus = 0x00000010,
			ColdBonus = 0x00000020,
			PoisonBonus = 0x00000040,
			EnergyBonus = 0x00000080,
			SetHue = 0x00000100,
			LastEquipped = 0x00000200,
			SetEquipped = 0x00000400,
			SetSelfRepair = 0x00000800,
		}
		#endregion
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
 
writer.Write( (int) 6 ); // version
 
			#region SF Imbuing
			writer.Write((int)m_TimesImbued); // Imbuing
 
			writer.Write((bool)Physical_Modded);
			writer.Write((bool)Fire_Modded);
			writer.Write((bool)Cold_Modded);
			writer.Write((bool)Poison_Modded);
			writer.Write((bool)Energy_Modded); 
			#endregion
			#region Mondain's Legacy Sets
			SetFlag sflags = SetFlag.None;
 
			SetSaveFlag(ref sflags, SetFlag.Attributes, !this.m_SetAttributes.IsEmpty);
			SetSaveFlag(ref sflags, SetFlag.SkillBonuses, !this.m_SetSkillBonuses.IsEmpty);
			SetSaveFlag(ref sflags, SetFlag.PhysicalBonus, this.m_SetPhysicalBonus != 0);
			SetSaveFlag(ref sflags, SetFlag.FireBonus, this.m_SetFireBonus != 0);
			SetSaveFlag(ref sflags, SetFlag.ColdBonus, this.m_SetColdBonus != 0);
			SetSaveFlag(ref sflags, SetFlag.PoisonBonus, this.m_SetPoisonBonus != 0);
			SetSaveFlag(ref sflags, SetFlag.EnergyBonus, this.m_SetEnergyBonus != 0);
			SetSaveFlag(ref sflags, SetFlag.SetHue, this.m_SetHue != 0);
			SetSaveFlag(ref sflags, SetFlag.LastEquipped, this.m_LastEquipped);
			SetSaveFlag(ref sflags, SetFlag.SetEquipped, this.m_SetEquipped);
			SetSaveFlag(ref sflags, SetFlag.SetSelfRepair, this.m_SetSelfRepair != 0);
 
			writer.WriteEncodedInt((int)sflags);
 
			if (GetSaveFlag(sflags, SetFlag.Attributes))
				this.m_SetAttributes.Serialize(writer);
 
			if (GetSaveFlag(sflags, SetFlag.SkillBonuses))
				this.m_SetSkillBonuses.Serialize(writer);
 
			if (GetSaveFlag(sflags, SetFlag.PhysicalBonus))
				writer.WriteEncodedInt((int)this.m_SetPhysicalBonus);
 
			if (GetSaveFlag(sflags, SetFlag.FireBonus))
				writer.WriteEncodedInt((int)this.m_SetFireBonus);
 
			if (GetSaveFlag(sflags, SetFlag.ColdBonus))
				writer.WriteEncodedInt((int)this.m_SetColdBonus);
 
			if (GetSaveFlag(sflags, SetFlag.PoisonBonus))
				writer.WriteEncodedInt((int)this.m_SetPoisonBonus);
 
			if (GetSaveFlag(sflags, SetFlag.EnergyBonus))
				writer.WriteEncodedInt((int)this.m_SetEnergyBonus);
 
			if (GetSaveFlag(sflags, SetFlag.SetHue))
				writer.WriteEncodedInt((int)this.m_SetHue);
 
			if (GetSaveFlag(sflags, SetFlag.LastEquipped))
				writer.Write((bool)this.m_LastEquipped);
 
			if (GetSaveFlag(sflags, SetFlag.SetEquipped))
				writer.Write((bool)this.m_SetEquipped);
 
			if (GetSaveFlag(sflags, SetFlag.SetSelfRepair))
				writer.WriteEncodedInt((int)this.m_SetSelfRepair);
			#endregion
 
			// Version 5
SaveFlag flags = SaveFlag.None;
 
			SetSaveFlag(ref flags, SaveFlag.Resource, this.m_Resource != this.DefaultResource);
			SetSaveFlag(ref flags, SaveFlag.Attributes, !this.m_AosAttributes.IsEmpty);
			SetSaveFlag(ref flags, SaveFlag.ClothingAttributes, !this.m_AosClothingAttributes.IsEmpty);
			SetSaveFlag(ref flags, SaveFlag.SkillBonuses, !this.m_AosSkillBonuses.IsEmpty);
			SetSaveFlag(ref flags, SaveFlag.Resistances, !this.m_AosResistances.IsEmpty);
			SetSaveFlag(ref flags, SaveFlag.MaxHitPoints, this.m_MaxHitPoints != 0);
			SetSaveFlag(ref flags, SaveFlag.HitPoints, this.m_HitPoints != 0);
			SetSaveFlag(ref flags, SaveFlag.PlayerConstructed, this.m_PlayerConstructed != false);
			SetSaveFlag(ref flags, SaveFlag.Crafter, this.m_Crafter != null);
			SetSaveFlag(ref flags, SaveFlag.Quality, this.m_Quality != ClothingQuality.Regular);
			SetSaveFlag(ref flags, SaveFlag.StrReq, this.m_StrReq != -1);
			#region Imbuing
			SetSaveFlag(ref flags, SaveFlag.TimesImbued, this.m_TimesImbued != 0);
			#endregion
 
writer.WriteEncodedInt( (int) flags );
 
if ( GetSaveFlag( flags, SaveFlag.Resource ) )
writer.WriteEncodedInt( (int) m_Resource );
 
if ( GetSaveFlag( flags, SaveFlag.Attributes ) )
m_AosAttributes.Serialize( writer );
 
if ( GetSaveFlag( flags, SaveFlag.ClothingAttributes ) )
m_AosClothingAttributes.Serialize( writer );
 
if ( GetSaveFlag( flags, SaveFlag.SkillBonuses ) )
m_AosSkillBonuses.Serialize( writer );
 
if ( GetSaveFlag( flags, SaveFlag.Resistances ) )
m_AosResistances.Serialize( writer );
 
if ( GetSaveFlag( flags, SaveFlag.MaxHitPoints ) )
writer.WriteEncodedInt( (int) m_MaxHitPoints );
 
if ( GetSaveFlag( flags, SaveFlag.HitPoints ) )
writer.WriteEncodedInt( (int) m_HitPoints );
 
if ( GetSaveFlag( flags, SaveFlag.Crafter ) )
writer.Write( (Mobile) m_Crafter );
 
if ( GetSaveFlag( flags, SaveFlag.Quality ) )
writer.WriteEncodedInt( (int) m_Quality );
 
if ( GetSaveFlag( flags, SaveFlag.StrReq ) )
writer.WriteEncodedInt( (int) m_StrReq );
}
Deser
Code:
 public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
 
int version = reader.ReadInt();
 
switch ( version )
{
				//SF Imbuing
				case 6:
					{
						#region SF Imbuing
						m_TimesImbued = reader.ReadInt();
 
							Physical_Modded = reader.ReadBool();
							Fire_Modded = reader.ReadBool();
							Cold_Modded = reader.ReadBool();
							Poison_Modded = reader.ReadBool();
							Energy_Modded = reader.ReadBool(); 
						#endregion
 
						#region Mondain's Legacy Sets
						SetFlag sflags = (SetFlag)reader.ReadEncodedInt();
 
						if (GetSaveFlag(sflags, SetFlag.Attributes))
							this.m_SetAttributes = new AosAttributes(this, reader);
						else
							this.m_SetAttributes = new AosAttributes(this);
 
					//	if (GetSaveFlag(sflags, SetFlag.ArmorAttributes))
					//		this.m_SetSelfRepair = (new AosArmorAttributes(this, reader)).SelfRepair;
 
						if (GetSaveFlag(sflags, SetFlag.SkillBonuses))
							this.m_SetSkillBonuses = new AosSkillBonuses(this, reader);
						else
							this.m_SetSkillBonuses = new AosSkillBonuses(this);
 
						if (GetSaveFlag(sflags, SetFlag.PhysicalBonus))
							this.m_SetPhysicalBonus = reader.ReadEncodedInt();
 
						if (GetSaveFlag(sflags, SetFlag.FireBonus))
							this.m_SetFireBonus = reader.ReadEncodedInt();
 
						if (GetSaveFlag(sflags, SetFlag.ColdBonus))
							this.m_SetColdBonus = reader.ReadEncodedInt();
 
						if (GetSaveFlag(sflags, SetFlag.PoisonBonus))
							this.m_SetPoisonBonus = reader.ReadEncodedInt();
 
						if (GetSaveFlag(sflags, SetFlag.EnergyBonus))
							this.m_SetEnergyBonus = reader.ReadEncodedInt();
 
						if (GetSaveFlag(sflags, SetFlag.SetHue))
							this.m_SetHue = reader.ReadEncodedInt();
 
						if (GetSaveFlag(sflags, SetFlag.LastEquipped))
							this.m_LastEquipped = reader.ReadBool();
 
						if (GetSaveFlag(sflags, SetFlag.SetEquipped))
							this.m_SetEquipped = reader.ReadBool();
 
						if (GetSaveFlag(sflags, SetFlag.SetSelfRepair))
							this.m_SetSelfRepair = reader.ReadEncodedInt();
						#endregion
						goto case 5;
					}
				case 5:
{
SaveFlag flags = (SaveFlag)reader.ReadEncodedInt();
 
if ( GetSaveFlag( flags, SaveFlag.Resource ) )
m_Resource = (CraftResource)reader.ReadEncodedInt();
else
m_Resource = DefaultResource;
 
if ( GetSaveFlag( flags, SaveFlag.Attributes ) )
m_AosAttributes = new AosAttributes( this, reader );
else
m_AosAttributes = new AosAttributes( this );
 
if ( GetSaveFlag( flags, SaveFlag.ClothingAttributes ) )
m_AosClothingAttributes = new AosArmorAttributes( this, reader );
else
m_AosClothingAttributes = new AosArmorAttributes( this );
 
if ( GetSaveFlag( flags, SaveFlag.SkillBonuses ) )
m_AosSkillBonuses = new AosSkillBonuses( this, reader );
else
m_AosSkillBonuses = new AosSkillBonuses( this );
 
if ( GetSaveFlag( flags, SaveFlag.Resistances ) )
m_AosResistances = new AosElementAttributes( this, reader );
else
m_AosResistances = new AosElementAttributes( this );
 
if ( GetSaveFlag( flags, SaveFlag.MaxHitPoints ) )
m_MaxHitPoints = reader.ReadEncodedInt();
 
if ( GetSaveFlag( flags, SaveFlag.HitPoints ) )
m_HitPoints = reader.ReadEncodedInt();
 
  if (GetSaveFlag(flags, SaveFlag.PlayerConstructed))
  m_PlayerConstructed = true;
 
  if (GetSaveFlag(flags, SaveFlag.Crafter))
  m_Crafter = reader.ReadMobile();
 
if ( GetSaveFlag( flags, SaveFlag.Quality ) )
m_Quality = (ClothingQuality)reader.ReadEncodedInt();
else
m_Quality = ClothingQuality.Regular;
 
if ( GetSaveFlag( flags, SaveFlag.StrReq ) )
m_StrReq = reader.ReadEncodedInt();
else
m_StrReq = -1;
 
 
break;
}
case 4:
{
m_Resource = (CraftResource)reader.ReadInt();
 
goto case 3;
}
case 3:
{
m_AosAttributes = new AosAttributes( this, reader );
m_AosClothingAttributes = new AosArmorAttributes( this, reader );
m_AosSkillBonuses = new AosSkillBonuses( this, reader );
m_AosResistances = new AosElementAttributes( this, reader );
 
goto case 2;
}
case 2:
{
m_PlayerConstructed = reader.ReadBool();
goto case 1;
}
case 1:
{
m_Crafter = reader.ReadMobile();
m_Quality = (ClothingQuality)reader.ReadInt();
break;
}
case 0:
{
m_Crafter = null;
m_Quality = ClothingQuality.Regular;
break;
}
}
			#region Mondain's Legacy Sets
			if (this.m_SetAttributes == null)
				this.m_SetAttributes = new AosAttributes(this);
 
			if (this.m_SetSkillBonuses == null)
				this.m_SetSkillBonuses = new AosSkillBonuses(this);
			#endregion
if ( version < 2 )
m_PlayerConstructed = true; // we don't know, so, assume it's crafted
 
if ( version < 3 )
{
m_AosAttributes = new AosAttributes( this );
m_AosClothingAttributes = new AosArmorAttributes( this );
m_AosSkillBonuses = new AosSkillBonuses( this );
m_AosResistances = new AosElementAttributes( this );
}
 
if ( version < 4 )
m_Resource = DefaultResource;
 
if ( m_MaxHitPoints == 0 && m_HitPoints == 0 )
m_HitPoints = m_MaxHitPoints = Utility.RandomMinMax( InitMinHits, InitMaxHits );
 
Mobile parent = Parent as Mobile;
 
if ( parent != null )
{
if ( Core.AOS )
m_AosSkillBonuses.AddTo( parent );
 
AddStatBonuses( parent );
parent.CheckStatTimers();
}
}
 
looks like your calling imbuing twice in serilaztion

line 68 writer.Write((int)m_TimesImbued); // Imbuing

line 142 SetSaveFlag(ref flags, SaveFlag.TimesImbued, this.m_TimesImbued != 0);

As your using SF Imbuing id comment line 142 try this and let me know...
 
No go. Actually, its that way in ForkUO. The TimesImbued AND the SetSaveFlag lines. The TimesEmbued flag isn't in Deser though & when I tried to add it, it said it didn't exist.
 
here is how mine looks

Code:
		#region Serialization
		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);
		}
 
		[Flags]
		private enum SaveFlag
		{
			None = 0x00000000,
			Resource = 0x00000001,
			Attributes = 0x00000002,
			ClothingAttributes = 0x00000004,
			SkillBonuses = 0x00000008,
			Resistances = 0x00000010,
			MaxHitPoints = 0x00000020,
			HitPoints = 0x00000040,
			PlayerConstructed = 0x00000080,
			Crafter = 0x00000100,
			Quality = 0x00000200,
			StrReq = 0x00000400,
			#region Imbuing
			//TimesImbued = 0x12000000,
			#endregion
		}
 
		#region Mondain's Legacy Sets
		private static void SetSaveFlag(ref SetFlag flags, SetFlag toSet, bool setIf)
		{
			if (setIf)
				flags |= toSet;
		}
 
		private static bool GetSaveFlag(SetFlag flags, SetFlag toGet)
		{
			return ((flags & toGet) != 0);
		}
 
		[Flags]
		private enum SetFlag
		{
			None = 0x00000000,
			Attributes = 0x00000001,
			ArmorAttributes = 0x00000002,
			SkillBonuses = 0x00000004,
			PhysicalBonus = 0x00000008,
			FireBonus = 0x00000010,
			ColdBonus = 0x00000020,
			PoisonBonus = 0x00000040,
			EnergyBonus = 0x00000080,
			SetHue = 0x00000100,
			LastEquipped = 0x00000200,
			SetEquipped = 0x00000400,
			SetSelfRepair = 0x00000800,
		}
		#endregion
 
		public override void Serialize(GenericWriter writer)
		{
			base.Serialize(writer);
 
			writer.Write(6); // version
 
			// Version 6
			#region SF Imbuing
			writer.Write((int)m_TimesImbued); // Imbuing
 
			writer.Write((bool)Physical_Modded);
			writer.Write((bool)Fire_Modded);
			writer.Write((bool)Cold_Modded);
			writer.Write((bool)Poison_Modded);
			writer.Write((bool)Energy_Modded);
			#endregion
			writer.Write(this.m_BlessedBy);
 
			#region Mondain's Legacy Sets
			SetFlag sflags = SetFlag.None;
 
			SetSaveFlag(ref sflags, SetFlag.Attributes, !this.m_SetAttributes.IsEmpty);
			SetSaveFlag(ref sflags, SetFlag.SkillBonuses, !this.m_SetSkillBonuses.IsEmpty);
			SetSaveFlag(ref sflags, SetFlag.PhysicalBonus, this.m_SetPhysicalBonus != 0);
			SetSaveFlag(ref sflags, SetFlag.FireBonus, this.m_SetFireBonus != 0);
			SetSaveFlag(ref sflags, SetFlag.ColdBonus, this.m_SetColdBonus != 0);
			SetSaveFlag(ref sflags, SetFlag.PoisonBonus, this.m_SetPoisonBonus != 0);
			SetSaveFlag(ref sflags, SetFlag.EnergyBonus, this.m_SetEnergyBonus != 0);
			SetSaveFlag(ref sflags, SetFlag.SetHue, this.m_SetHue != 0);
			SetSaveFlag(ref sflags, SetFlag.LastEquipped, this.m_LastEquipped);
			SetSaveFlag(ref sflags, SetFlag.SetEquipped, this.m_SetEquipped);
			SetSaveFlag(ref sflags, SetFlag.SetSelfRepair, this.m_SetSelfRepair != 0);
 
			writer.WriteEncodedInt((int)sflags);
 
			if (GetSaveFlag(sflags, SetFlag.Attributes))
				this.m_SetAttributes.Serialize(writer);
 
			if (GetSaveFlag(sflags, SetFlag.SkillBonuses))
				this.m_SetSkillBonuses.Serialize(writer);
 
			if (GetSaveFlag(sflags, SetFlag.PhysicalBonus))
				writer.WriteEncodedInt((int)this.m_SetPhysicalBonus);
 
			if (GetSaveFlag(sflags, SetFlag.FireBonus))
				writer.WriteEncodedInt((int)this.m_SetFireBonus);
 
			if (GetSaveFlag(sflags, SetFlag.ColdBonus))
				writer.WriteEncodedInt((int)this.m_SetColdBonus);
 
			if (GetSaveFlag(sflags, SetFlag.PoisonBonus))
				writer.WriteEncodedInt((int)this.m_SetPoisonBonus);
 
			if (GetSaveFlag(sflags, SetFlag.EnergyBonus))
				writer.WriteEncodedInt((int)this.m_SetEnergyBonus);
 
			if (GetSaveFlag(sflags, SetFlag.SetHue))
				writer.WriteEncodedInt((int)this.m_SetHue);
 
			if (GetSaveFlag(sflags, SetFlag.LastEquipped))
				writer.Write((bool)this.m_LastEquipped);
 
			if (GetSaveFlag(sflags, SetFlag.SetEquipped))
				writer.Write((bool)this.m_SetEquipped);
 
			if (GetSaveFlag(sflags, SetFlag.SetSelfRepair))
				writer.WriteEncodedInt((int)this.m_SetSelfRepair);
			#endregion
 
			// Version 5
			SaveFlag flags = SaveFlag.None;
 
			SetSaveFlag(ref flags, SaveFlag.Resource, this.m_Resource != this.DefaultResource);
			SetSaveFlag(ref flags, SaveFlag.Attributes, !this.m_AosAttributes.IsEmpty);
			SetSaveFlag(ref flags, SaveFlag.ClothingAttributes, !this.m_AosClothingAttributes.IsEmpty);
			SetSaveFlag(ref flags, SaveFlag.SkillBonuses, !this.m_AosSkillBonuses.IsEmpty);
			SetSaveFlag(ref flags, SaveFlag.Resistances, !this.m_AosResistances.IsEmpty);
			SetSaveFlag(ref flags, SaveFlag.MaxHitPoints, this.m_MaxHitPoints != 0);
			SetSaveFlag(ref flags, SaveFlag.HitPoints, this.m_HitPoints != 0);
			SetSaveFlag(ref flags, SaveFlag.PlayerConstructed, this.m_PlayerConstructed != false);
			SetSaveFlag(ref flags, SaveFlag.Crafter, this.m_Crafter != null);
			SetSaveFlag(ref flags, SaveFlag.Quality, this.m_Quality != ClothingQuality.Regular);
			SetSaveFlag(ref flags, SaveFlag.StrReq, this.m_StrReq != -1);
			#region Imbuing
			//SetSaveFlag(ref flags, SaveFlag.TimesImbued, this.m_TimesImbued != 0);
			#endregion
 
			writer.WriteEncodedInt((int)flags);
 
			if (GetSaveFlag(flags, SaveFlag.Resource))
				writer.WriteEncodedInt((int)this.m_Resource);
 
			if (GetSaveFlag(flags, SaveFlag.Attributes))
				this.m_AosAttributes.Serialize(writer);
 
			if (GetSaveFlag(flags, SaveFlag.ClothingAttributes))
				this.m_AosClothingAttributes.Serialize(writer);
 
			if (GetSaveFlag(flags, SaveFlag.SkillBonuses))
				this.m_AosSkillBonuses.Serialize(writer);
 
			if (GetSaveFlag(flags, SaveFlag.Resistances))
				this.m_AosResistances.Serialize(writer);
 
			if (GetSaveFlag(flags, SaveFlag.MaxHitPoints))
				writer.WriteEncodedInt((int)this.m_MaxHitPoints);
 
			if (GetSaveFlag(flags, SaveFlag.HitPoints))
				writer.WriteEncodedInt((int)this.m_HitPoints);
 
			if (GetSaveFlag(flags, SaveFlag.Crafter))
				writer.Write((Mobile)this.m_Crafter);
 
			if (GetSaveFlag(flags, SaveFlag.Quality))
				writer.WriteEncodedInt((int)this.m_Quality);
 
			if (GetSaveFlag(flags, SaveFlag.StrReq))
				writer.WriteEncodedInt((int)this.m_StrReq);
		}
 
		public override void Deserialize(GenericReader reader)
		{
			base.Deserialize(reader);
 
			int version = reader.ReadInt();
 
			switch ( version )
			{
				case 6:
					{
						m_TimesImbued = reader.ReadInt();
 
						Physical_Modded = reader.ReadBool();
						Fire_Modded = reader.ReadBool();
						Cold_Modded = reader.ReadBool();
						Poison_Modded = reader.ReadBool();
						Energy_Modded = reader.ReadBool();
 
						this.m_BlessedBy = reader.ReadMobile();
 
						#region Mondain's Legacy Sets
						SetFlag sflags = (SetFlag)reader.ReadEncodedInt();
 
						if (GetSaveFlag(sflags, SetFlag.Attributes))
							this.m_SetAttributes = new AosAttributes(this, reader);
						else
							this.m_SetAttributes = new AosAttributes(this);
 
						if (GetSaveFlag(sflags, SetFlag.ArmorAttributes))
							this.m_SetSelfRepair = (new AosArmorAttributes(this, reader)).SelfRepair;
 
						if (GetSaveFlag(sflags, SetFlag.SkillBonuses))
							this.m_SetSkillBonuses = new AosSkillBonuses(this, reader);
						else
							this.m_SetSkillBonuses = new AosSkillBonuses(this);
 
						if (GetSaveFlag(sflags, SetFlag.PhysicalBonus))
							this.m_SetPhysicalBonus = reader.ReadEncodedInt();
 
						if (GetSaveFlag(sflags, SetFlag.FireBonus))
							this.m_SetFireBonus = reader.ReadEncodedInt();
 
						if (GetSaveFlag(sflags, SetFlag.ColdBonus))
							this.m_SetColdBonus = reader.ReadEncodedInt();
 
						if (GetSaveFlag(sflags, SetFlag.PoisonBonus))
							this.m_SetPoisonBonus = reader.ReadEncodedInt();
 
						if (GetSaveFlag(sflags, SetFlag.EnergyBonus))
							this.m_SetEnergyBonus = reader.ReadEncodedInt();
 
						if (GetSaveFlag(sflags, SetFlag.SetHue))
							this.m_SetHue = reader.ReadEncodedInt();
 
						if (GetSaveFlag(sflags, SetFlag.LastEquipped))
							this.m_LastEquipped = reader.ReadBool();
 
						if (GetSaveFlag(sflags, SetFlag.SetEquipped))
							this.m_SetEquipped = reader.ReadBool();
 
						if (GetSaveFlag(sflags, SetFlag.SetSelfRepair))
							this.m_SetSelfRepair = reader.ReadEncodedInt();
						#endregion
 
						goto case 5;
					}
				case 5:
					{
						SaveFlag flags = (SaveFlag)reader.ReadEncodedInt();
 
						if (GetSaveFlag(flags, SaveFlag.Resource))
							this.m_Resource = (CraftResource)reader.ReadEncodedInt();
						else
							this.m_Resource = this.DefaultResource;
 
						if (GetSaveFlag(flags, SaveFlag.Attributes))
							this.m_AosAttributes = new AosAttributes(this, reader);
						else
							this.m_AosAttributes = new AosAttributes(this);
 
						if (GetSaveFlag(flags, SaveFlag.ClothingAttributes))
							this.m_AosClothingAttributes = new AosArmorAttributes(this, reader);
						else
							this.m_AosClothingAttributes = new AosArmorAttributes(this);
 
						if (GetSaveFlag(flags, SaveFlag.SkillBonuses))
							this.m_AosSkillBonuses = new AosSkillBonuses(this, reader);
						else
							this.m_AosSkillBonuses = new AosSkillBonuses(this);
 
						if (GetSaveFlag(flags, SaveFlag.Resistances))
							this.m_AosResistances = new AosElementAttributes(this, reader);
						else
							this.m_AosResistances = new AosElementAttributes(this);
 
						if (GetSaveFlag(flags, SaveFlag.MaxHitPoints))
							this.m_MaxHitPoints = reader.ReadEncodedInt();
 
						if (GetSaveFlag(flags, SaveFlag.HitPoints))
							this.m_HitPoints = reader.ReadEncodedInt();
 
						if (GetSaveFlag(flags, SaveFlag.Crafter))
							this.m_Crafter = reader.ReadMobile();
 
						if (GetSaveFlag(flags, SaveFlag.Quality))
							this.m_Quality = (ClothingQuality)reader.ReadEncodedInt();
						else
							this.m_Quality = ClothingQuality.Regular;
 
						if (GetSaveFlag(flags, SaveFlag.StrReq))
							this.m_StrReq = reader.ReadEncodedInt();
						else
							this.m_StrReq = -1;
 
						if (GetSaveFlag(flags, SaveFlag.PlayerConstructed))
							this.m_PlayerConstructed = true;
 
						break;
					}
				case 4:
					{
						this.m_Resource = (CraftResource)reader.ReadInt();
 
						goto case 3;
					}
				case 3:
					{
						this.m_AosAttributes = new AosAttributes(this, reader);
						this.m_AosClothingAttributes = new AosArmorAttributes(this, reader);
						this.m_AosSkillBonuses = new AosSkillBonuses(this, reader);
						this.m_AosResistances = new AosElementAttributes(this, reader);
 
						goto case 2;
					}
				case 2:
					{
						this.m_PlayerConstructed = reader.ReadBool();
						goto case 1;
					}
				case 1:
					{
						this.m_Crafter = reader.ReadMobile();
						this.m_Quality = (ClothingQuality)reader.ReadInt();
						break;
					}
				case 0:
					{
						this.m_Crafter = null;
						this.m_Quality = ClothingQuality.Regular;
						break;
					}
			}
 
			#region Mondain's Legacy Sets
			if (this.m_SetAttributes == null)
				this.m_SetAttributes = new AosAttributes(this);
 
			if (this.m_SetSkillBonuses == null)
				this.m_SetSkillBonuses = new AosSkillBonuses(this);
			#endregion
 
			if (version < 2)
				this.m_PlayerConstructed = true; // we don't know, so, assume it's crafted
 
			if (version < 3)
			{
				this.m_AosAttributes = new AosAttributes(this);
				this.m_AosClothingAttributes = new AosArmorAttributes(this);
				this.m_AosSkillBonuses = new AosSkillBonuses(this);
				this.m_AosResistances = new AosElementAttributes(this);
			}
 
			if (version < 4)
				this.m_Resource = this.DefaultResource;
 
			if (this.m_MaxHitPoints == 0 && this.m_HitPoints == 0)
				this.m_HitPoints = this.m_MaxHitPoints = Utility.RandomMinMax(this.InitMinHits, this.InitMaxHits);
 
			Mobile parent = this.Parent as Mobile;
 
			if (parent != null)
			{
				if (Core.AOS)
					this.m_AosSkillBonuses.AddTo(parent);
 
				this.AddStatBonuses(parent);
				parent.CheckStatTimers();
			}
		}
 
		#endregion

so maybe comment line 28 aswel in serilzation
 
Ok, completely redid BaseClothing.cs, thought it was good & got a delete on clothing again... Heres the whole script. Maybe you or someone can see where it went wrong.
 

Attachments

  • BaseClothing.cs
    46.2 KB · Views: 2

Active Shards

Donations

Total amount
$0.00
Goal
$1,000.00
Back