- Incognito spell won't change gender anymore

(http://www.uodemise.com/discussion/showthread.php?t=117148)
- Abyss Champion spawn has Greater Mongbats in tier 1 instead of Mongbats
(http://www.uodemise.com/discussion/showthread.php?t=125248)
- BOD books won't return to page 1 anymore when picking or dropping BODs
(http://www.uodemise.com/discussion/showthread.php?t=115354)
- Added Plague Beast Lords with relative puzzle; Plague Beasts release healty glands
(http://www.uodemise.com/discussion/showthread.php?t=116548)
- Arch Cure area effect will follow OSI rules in Felucca facet
(http://www.uodemise.com/discussion/showthread.php?t=115600)
- Solen Ants Holes can spawn randomly in forest
(http://www.uodemise.com/discussion/showthread.php?t=123899)
- Death Robes will decay after 60 seconds from dropping on the ground
(http://www.uodemise.com/discussion/showthread.php?t=121188)
- Weapon speeds are indicated in seconds of delay
(http://www.uodemise.com/discussion/showthread.php?t=123707)
This commit is contained in:
daedalus 2009-10-18 14:03:59 +00:00
parent 207be3f720
commit 123af436f9
99 changed files with 2341 additions and 75 deletions

View file

@ -139,6 +139,66 @@ namespace Server.Engines.BulkOrders
return count;
}
public int GetPageForIndex(int index, int sizeDropped)
{
if (index <= 0)
return 0;
int count = 0;
int add = 0;
int page = 0;
ArrayList list = m_List;
int i;
object obj;
for (i=0; (i < index) && (i < list.Count); i++)
{
obj = list[i];
if (CheckFilter(obj))
{
if (obj is BOBLargeEntry)
add = ((BOBLargeEntry)obj).Entries.Length;
else
add = 1;
count += add;
if (count > 10)
{
page++;
count = add;
}
}
}
/* now we are on the page of the bod preceeding the dropped one.
* next step: checking whether we have to remain where we are.
* The counter i needs to be incremented as the bod to this very moment
* has not yet been removed from m_List */
i++;
/* if, for instance, a big bod of size 6 has been removed, smaller bods
* might fall back into this page. Depending on their sizes, the page eeds
* to be adjusted accordingly. This is done now.
*/
if (count + sizeDropped > 10)
{
while ((i < list.Count) && (count <= 10))
{
obj = list[i];
if (CheckFilter(obj))
{
if (obj is BOBLargeEntry)
count += ((BOBLargeEntry)obj).Entries.Length;
else
count += 1;
}
i++;
}
if (count > 10)
page++;
}
return page;
}
public object GetMaterialName( BulkMaterialType mat, BODType type, Type itemType )
{
switch ( type )
@ -256,16 +316,35 @@ namespace Server.Engines.BulkOrders
if ( item != null )
{
m_From.AddToBackpack( item );
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 > 0 )
m_From.SendGump( new BOBGump( m_From, m_Book, 0, null ) );
Container pack = m_From.Backpack;
if ((pack == null) || ((pack != null) && (!pack.CheckHold(m_From, item, true, true, 0, item.PileWeight + item.TotalWeight))))
{
m_From.SendLocalizedMessage(503204); // You do not have room in your backpack for this
m_From.SendGump(new BOBGump(m_From, m_Book, m_Page, null));
}
else
m_From.SendLocalizedMessage( 1062381 ); // The book is empty.
{
if (m_Book.IsChildOf(m_From.Backpack))
{
int sizeOfDroppedBod;
if (obj is BOBLargeEntry)
sizeOfDroppedBod = ((BOBLargeEntry)obj).Entries.Length;
else
sizeOfDroppedBod = 1;
m_From.AddToBackpack(item);
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 > 0)
{
m_Page = GetPageForIndex(index, sizeOfDroppedBod);
m_From.SendGump(new BOBGump(m_From, m_Book, m_Page, null));
}
else
m_From.SendLocalizedMessage(1062381); // The book is empty.
}
}
}
else
{
@ -283,26 +362,37 @@ namespace Server.Engines.BulkOrders
else if ( m_Book.RootParent is PlayerVendor )
{
PlayerVendor pv = (PlayerVendor)m_Book.RootParent;
VendorItem vi = pv.GetVendorItem( m_Book );
int price = 0;
if ( vi != null && !vi.IsForSale )
if (vi != null && !vi.IsForSale)
{
if ( obj is BOBLargeEntry )
int sizeOfDroppedBod;
int price = 0;
if (obj is BOBLargeEntry)
{
price = ((BOBLargeEntry)obj).Price;
else if ( obj is BOBSmallEntry )
sizeOfDroppedBod = ((BOBLargeEntry)obj).Entries.Length;
}
else
{
price = ((BOBSmallEntry)obj).Price;
sizeOfDroppedBod = 1;
}
if (price == 0)
m_From.SendLocalizedMessage(1062382); // The deed selected is not available.
else
{
if (m_Book.Entries.Count > 0)
{
m_Page = GetPageForIndex(index, sizeOfDroppedBod);
m_From.SendGump(new BODBuyGump(m_From, m_Book, obj, m_Page, price));
}
else
m_From.SendLocalizedMessage(1062381); // The book is emptz
}
}
if ( price == 0 )
m_From.SendLocalizedMessage( 1062382 ); // The deed selected is not available.
else
m_From.SendGump( new BODBuyGump( m_From, m_Book, obj, price ) );
}
}
break;
}
}

View file

@ -12,6 +12,7 @@ namespace Server.Engines.BulkOrders
private BulkOrderBook m_Book;
private object m_Object;
private int m_Price;
private int m_Page;
public override void OnResponse( Server.Network.NetState sender, RelayInfo info )
{
@ -60,27 +61,31 @@ namespace Server.Engines.BulkOrders
Container pack = m_From.Backpack;
if ( (pack != null && pack.ConsumeTotal( typeof( Gold ), price )) || Banker.Withdraw( m_From, price ) )
if ( (pack == null) || ((pack != null) && (!pack.CheckHold(m_From, item, true, true, 0, item.PileWeight + item.TotalWeight)) ) )
{
m_Book.Entries.Remove( m_Object );
m_Book.InvalidateProperties();
pv.HoldGold += price;
if ( m_From.AddToBackpack( item ) )
m_From.SendLocalizedMessage( 1045152 ); // The bulk order deed has been placed in your backpack.
else
pv.SayTo( m_From, 503204 ); // You do not have room in your backpack for this.
if ( m_Book.Entries.Count > 0 )
m_From.SendGump( new BOBGump( m_From, m_Book ) );
else
m_From.SendLocalizedMessage( 1062381 ); // The book is empty.
pv.SayTo(m_From, 503204); // You do not have room in your backpack for this
m_From.SendGump(new BOBGump(m_From, m_Book, m_Page, null));
}
else
{
pv.SayTo( m_From, 503205 ); // You cannot afford this item.
item.Delete();
if ((pack != null && pack.ConsumeTotal( typeof( Gold ), price )) || Banker.Withdraw( m_From, price ) )
{
m_Book.Entries.Remove( m_Object );
m_Book.InvalidateProperties();
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 > 0 )
m_From.SendGump( new BOBGump( m_From, m_Book, m_Page, null ) );
else
m_From.SendLocalizedMessage( 1062381 ); // The book is empty.
}
else
{
pv.SayTo( m_From, 503205 ); // You cannot afford this item.
item.Delete();
}
}
}
}
@ -99,12 +104,13 @@ namespace Server.Engines.BulkOrders
}
}
public BODBuyGump( PlayerMobile from, BulkOrderBook book, object obj, int price ) : base( 100, 200 )
public BODBuyGump( PlayerMobile from, BulkOrderBook book, object obj, int page, int price ) : base( 100, 200 )
{
m_From = from;
m_Book = book;
m_Object = obj;
m_Price = price;
m_Page = page;
AddPage( 0 );

View file

@ -106,6 +106,7 @@ namespace Server.Engines.BulkOrders
m_Entries.Add( new BOBLargeEntry( (LargeBOD)dropped ) );
InvalidateProperties();
from.PlaySound(0x42);
from.SendLocalizedMessage( 1062386 ); // Deed added to book.
if ( from is PlayerMobile )
@ -132,6 +133,7 @@ namespace Server.Engines.BulkOrders
m_Entries.Add( new BOBSmallEntry( (SmallBOD)dropped ) );
InvalidateProperties();
from.PlaySound(0x42);
from.SendLocalizedMessage( 1062386 ); // Deed added to book.
if ( from is PlayerMobile )

View file

@ -41,7 +41,7 @@ namespace Server.Engines.CannedEvil
{
new ChampionSpawnInfo( "Abyss", typeof( Semidar ), new string[]{ "Foe", "Assassin", "Conqueror" }, new Type[][] // Abyss
{ // Abyss
new Type[]{ typeof( StrongMongbat ), typeof( Imp ) }, // Level 1
new Type[]{ typeof( GreaterMongbat ), typeof( Imp ) }, // Level 1
new Type[]{ typeof( Gargoyle ), typeof( Harpy ) }, // Level 2
new Type[]{ typeof( FireGargoyle ), typeof( StoneGargoyle ) }, // Level 3
new Type[]{ typeof( Daemon ), typeof( Succubus ) } // Level 4