BOD book item counts corrected

http://www.uodemise.com/forum/showthread.php?t=121015

Discordance cool down timer
http://www.uodemise.com/forum/showthread.php?t=122146

Summoned Hoarde minions dont behave correctly
http://www.uodemise.com/forum/showthread.php?t=149555

Fame and karma rewards should be 30% higher in fel
http://www.uodemise.com/forum/showthread.php?t=146893

Incorrect skill requirement in tailoring
http://www.uodemise.com/forum/showthread.php?t=149095

Mined resources should stack
http://www.uodemise.com/forum/showthread.php?t=147055

Runebook behavior
http://www.uodemise.com/forum/showthread.php?t=146030

Correct allowed guild name length
http://www.uodemise.com/forum/showthread.php?t=148603

Corrections to wool/sheep
http://www.uodemise.com/forum/showthread.php?t=150988
This commit is contained in:
xavier 2010-09-19 14:41:01 +00:00
parent 4dbb400ce3
commit 4dec86b91d
15 changed files with 252 additions and 61 deletions

View file

@ -336,6 +336,13 @@ namespace Server.Engines.BulkOrders
m_From.SendLocalizedMessage(1045152); // The bulk order deed has been placed in your backpack.
m_Book.Entries.Remove(obj);
m_Book.InvalidateProperties();
if ( m_Book.Entries.Count / 5 < m_Book.ItemCount )
{
m_Book.ItemCount--;
m_Book.InvalidateItems();
}
if (m_Book.Entries.Count > 0)
{
m_Page = GetPageForIndex(index, sizeOfDroppedBod);

View file

@ -75,6 +75,12 @@ namespace Server.Engines.BulkOrders
pv.HoldGold += price;
m_From.AddToBackpack( item );
m_From.SendLocalizedMessage( 1045152 ); // The bulk order deed has been placed in your backpack.
if ( m_Book.Entries.Count / 5 < m_Book.ItemCount )
{
m_Book.ItemCount--;
m_Book.InvalidateItems();
}
if ( m_Book.Entries.Count > 0 )
m_From.SendGump( new BOBGump( m_From, m_Book, m_Page, null ) );

View file

@ -17,6 +17,7 @@ namespace Server.Engines.BulkOrders
private BOBFilter m_Filter;
private string m_BookName;
private SecureLevel m_Level;
private int m_ItemCount;
[CommandProperty( AccessLevel.GameMaster )]
public string BookName
@ -41,6 +42,12 @@ namespace Server.Engines.BulkOrders
{
get{ return m_Filter; }
}
public int ItemCount
{
get{ return m_ItemCount; }
set{ m_ItemCount = value; }
}
[Constructable]
public BulkOrderBook() : base( 0x2259 )
@ -94,44 +101,29 @@ namespace Server.Engines.BulkOrders
public override bool OnDragDrop( Mobile from, Item dropped )
{
if ( dropped is LargeBOD )
if ( dropped is LargeBOD || dropped is SmallBOD )
{
if ( !IsChildOf( from.Backpack ) )
{
from.SendLocalizedMessage( 1062385 ); // You must have the book in your backpack to add deeds to it.
return false;
}
else if ( !from.Backpack.CheckHold( from, dropped, true, true ) )
return false;
else if ( m_Entries.Count < 500 )
{
m_Entries.Add( new BOBLargeEntry( (LargeBOD)dropped ) );
InvalidateProperties();
from.PlaySound(0x42);
from.SendLocalizedMessage( 1062386 ); // Deed added to book.
if ( from is PlayerMobile )
from.SendGump( new BOBGump( (PlayerMobile)from, this ) );
dropped.Delete();
return true;
}
else
{
from.SendLocalizedMessage( 1062387 ); // The book is full of deeds.
return false;
}
}
else if ( dropped is SmallBOD )
{
if ( !IsChildOf( from.Backpack ) )
{
from.SendLocalizedMessage( 1062385 ); // You must have the book in your backpack to add deeds to it.
return false;
}
else if ( m_Entries.Count < 500 )
{
m_Entries.Add( new BOBSmallEntry( (SmallBOD)dropped ) );
if ( dropped is LargeBOD )
m_Entries.Add( new BOBLargeEntry( (LargeBOD)dropped ) );
else if ( dropped is SmallBOD ) // Sanity
m_Entries.Add( new BOBSmallEntry( (SmallBOD)dropped ) );
InvalidateProperties();
if ( m_Entries.Count / 5 > m_ItemCount )
{
m_ItemCount++;
InvalidateItems();
}
from.PlaySound(0x42);
from.SendLocalizedMessage( 1062386 ); // Deed added to book.
@ -140,6 +132,7 @@ namespace Server.Engines.BulkOrders
from.SendGump( new BOBGump( (PlayerMobile)from, this ) );
dropped.Delete();
return true;
}
else
@ -152,6 +145,38 @@ namespace Server.Engines.BulkOrders
from.SendLocalizedMessage( 1062388 ); // That is not a bulk order deed.
return false;
}
public override int GetTotal( TotalType type )
{
int total = base.GetTotal( type );
if ( type == TotalType.Items )
total = m_ItemCount;
return total;
}
public void InvalidateItems()
{
if ( RootParent is Mobile )
{
Mobile m = (Mobile) RootParent;
m.UpdateTotals();
InvalidateContainers( Parent );
}
}
public void InvalidateContainers( object parent )
{
if ( parent != null && parent is Container )
{
Container c = (Container)parent;
c.InvalidateProperties();
InvalidateContainers( c.Parent );
}
}
public BulkOrderBook( Serial serial ) : base( serial )
{
@ -161,7 +186,9 @@ namespace Server.Engines.BulkOrders
{
base.Serialize( writer );
writer.Write( (int) 1 ); // version
writer.Write( (int) 2 ); // version
writer.Write( (int) m_ItemCount );
writer.Write( (int) m_Level );
@ -200,6 +227,11 @@ namespace Server.Engines.BulkOrders
switch ( version )
{
case 2:
{
m_ItemCount = reader.ReadInt();
goto case 1;
}
case 1:
{
m_Level = (SecureLevel)reader.ReadInt();

View file

@ -32,6 +32,13 @@ namespace Server.Engines.Craft
if ( !(item is BaseArmor) && !(item is BaseWeapon) )
return EnhanceResult.BadItem;
if ( item is IArcaneEquip )
{
IArcaneEquip eq = (IArcaneEquip)item;
if ( eq.IsArcane )
return EnhanceResult.BadItem;
}
if ( CraftResources.IsStandard( resource ) )
return EnhanceResult.BadResource;

View file

@ -110,7 +110,7 @@ namespace Server.Engines.Craft
AddCraft( typeof( SkullCap ), 1011375, 1025444, 0.0, 25.0, typeof( Cloth ), 1044286, 2, 1044287 );
AddCraft( typeof( Bandana ), 1011375, 1025440, 0.0, 25.0, typeof( Cloth ), 1044286, 2, 1044287 );
AddCraft( typeof( FloppyHat ), 1011375, 1025907, 6.2, 31.2, typeof( Cloth ), 1044286, 11, 1044287 );
AddCraft( typeof( Cap ), 1011375, 1025909, -18.8, 6.2, typeof( Cloth ), 1044286, 11, 1044287 );
AddCraft( typeof( Cap ), 1011375, 1025909, 6.2, 31.2, typeof( Cloth ), 1044286, 11, 1044287 );
AddCraft( typeof( WideBrimHat ), 1011375, 1025908, 6.2, 31.2, typeof( Cloth ), 1044286, 12, 1044287 );
AddCraft( typeof( StrawHat ), 1011375, 1025911, 6.2, 31.2, typeof( Cloth ), 1044286, 10, 1044287 );
AddCraft( typeof( TallStrawHat ), 1011375, 1025910, 6.7, 31.7, typeof( Cloth ), 1044286, 13, 1044287 );