public TamingBOBLargeEntry( LargeMobileBOD bod ) { m_AmountMax = bod.AmountMax; m_Entries = new TamingBOBLargeSubEntry[bod.Entries.Length]; for ( int i = 0; i < m_Entries.Length; ++i ) m_Entries[i] = new TamingBOBLargeSubEntry( bod.Entries[i] ); }
public TamingBOBLargeEntry(LargeMobileBOD bod) { m_AmountMax = bod.AmountMax; m_Entries = new TamingBOBLargeSubEntry[bod.Entries.Length]; for (int i = 0; i < m_Entries.Length; ++i) { m_Entries[i] = new TamingBOBLargeSubEntry(bod.Entries[i]); } }
public Item Reconstruct() { LargeMobileBOD bod = null; bod = new LargeTamingBOD(m_AmountMax, ReconstructEntries()); for (int i = 0; bod != null && i < bod.Entries.Length; ++i) { bod.Entries[i].Owner = bod; } return(bod); }
public LargeMobileBulkEntry(LargeMobileBOD owner, GenericReader reader) { m_Owner = owner; m_Amount = reader.ReadInt(); Type realType = null; string type = reader.ReadString(); if (type != null) { realType = ScriptCompiler.FindTypeByFullName(type); } m_Details = new SmallMobileBulkEntry(realType, reader.ReadString(), reader.ReadInt()); }
public LargeMobileBulkEntry(LargeMobileBOD owner, SmallMobileBulkEntry details) { m_Owner = owner; m_Details = details; }
public LargeMobileBODTarget(LargeMobileBOD deed) : base(18, false, TargetFlags.None) { m_Deed = deed; }
public LargeMobileBODAcceptGump(Mobile from, LargeMobileBOD deed) : base(50, 50) { m_From = from; m_Deed = deed; m_From.CloseGump(typeof(LargeMobileBODAcceptGump)); m_From.CloseGump(typeof(SmallMobileBODAcceptGump)); LargeMobileBulkEntry[] entries = deed.Entries; AddPage(0); AddBackground(25, 10, 430, 240 + (entries.Length * 24), 5054); AddImageTiled(33, 20, 413, 221 + (entries.Length * 24), 2624); AddAlphaRegion(33, 20, 413, 221 + (entries.Length * 24)); AddImage(20, 5, 10460); AddImage(430, 5, 10460); AddImage(20, 225 + (entries.Length * 24), 10460); AddImage(430, 225 + (entries.Length * 24), 10460); AddHtmlLocalized(180, 25, 120, 20, 1045134, 0x7FFF, false, false); // A large bulk order AddHtmlLocalized(40, 48, 350, 20, 1045135, 0x7FFF, false, false); // Ah! Thanks for the goods! Would you help me out? AddLabel(40, 72, 1152, @"Amount to tame:"); // Amount to make: AddLabel(250, 72, 1152, deed.AmountMax.ToString()); AddHtmlLocalized(40, 96, 120, 20, 1045137, 0x7FFF, false, false); // Items requested: int y = 120; for (int i = 0; i < entries.Length; ++i, y += 24) { string s = entries[i].Details.AnimalName; int capsbreak = s.IndexOfAny("ABCDEFGHIJKLMNOPQRSTUVWXYZ".ToCharArray(), 1); if (capsbreak > -1) { string secondhalf = s.Substring(capsbreak); string firsthalf = s.Substring(0, capsbreak); string newname = firsthalf + " " + secondhalf; AddLabel(40, y, 1152, newname.ToString()); } else { AddLabel(40, y, 1152, entries[i].Details.AnimalName.ToString()); } } AddHtmlLocalized(40, 192 + (entries.Length * 24), 350, 20, 1045139, 0x7FFF, false, false); // Do you want to accept this order? AddButton(100, 216 + (entries.Length * 24), 4005, 4007, 1, GumpButtonType.Reply, 0); AddHtmlLocalized(135, 216 + (entries.Length * 24), 120, 20, 1006044, 0x7FFF, false, false); // Ok AddButton(275, 216 + (entries.Length * 24), 4005, 4007, 0, GumpButtonType.Reply, 0); AddHtmlLocalized(310, 216 + (entries.Length * 24), 120, 20, 1011012, 0x7FFF, false, false); // CANCEL }
public LargeMobileBODGump( Mobile from, LargeMobileBOD deed ) : base( 25, 25 ) { m_From = from; m_Deed = deed; m_From.CloseGump( typeof( LargeMobileBODGump ) ); m_From.CloseGump( typeof( SmallMobileBODGump ) ); LargeMobileBulkEntry[] entries = deed.Entries; AddPage( 0 ); AddBackground( 50, 10, 455, 236 + (entries.Length * 24), 5054 ); AddImageTiled( 58, 20, 438, 217 + (entries.Length * 24), 2624 ); AddAlphaRegion( 58, 20, 438, 217 + (entries.Length * 24) ); AddImage( 45, 5, 10460 ); AddImage( 480, 5, 10460 ); AddImage( 45, 221 + (entries.Length * 24), 10460 ); AddImage( 480, 221 + (entries.Length * 24), 10460 ); AddHtmlLocalized( 225, 25, 120, 20, 1045134, 0x7FFF, false, false ); // A large bulk order AddLabel( 75, 48, 0x480, @"Amount to tame:"); // Amount to make: AddLabel( 275, 48, 1152, deed.AmountMax.ToString() ); AddHtmlLocalized( 75, 72, 120, 20, 1045137, 0x7FFF, false, false ); // Items requested: AddHtmlLocalized( 275, 76, 200, 20, 1045153, 0x7FFF, false, false ); // Amount finished: int y = 96; for ( int i = 0; i < entries.Length; ++i ) { LargeMobileBulkEntry entry = entries[i]; SmallMobileBulkEntry details = entry.Details; string s = details.AnimalName; int capsbreak = s.IndexOfAny("ABCDEFGHIJKLMNOPQRSTUVWXYZ".ToCharArray(),1); if( capsbreak > -1 ) { string secondhalf = s.Substring( capsbreak ); string firsthalf = s.Substring(0, capsbreak ); string newname = firsthalf + " " + secondhalf; AddLabel( 75, y, 0x480, newname.ToString() ); AddLabel( 275, y, 0x480, entry.Amount.ToString() ); } else { AddLabel( 75, y, 0x480, details.AnimalName.ToString() ); AddLabel( 275, y, 0x480, entry.Amount.ToString() ); } y += 24; } AddButton( 125, 168 + (entries.Length * 24), 4005, 4007, 2, GumpButtonType.Reply, 0 ); AddHtmlLocalized( 160, 168 + (entries.Length * 24), 300, 20, 1045155, 0x7FFF, false, false ); // Combine this deed with another deed. AddButton( 125, 192 + (entries.Length * 24), 4005, 4007, 1, GumpButtonType.Reply, 0 ); AddHtmlLocalized( 160, 192 + (entries.Length * 24), 120, 20, 1011441, 0x7FFF, false, false ); // EXIT }
public LargeMobileBODAcceptGump( Mobile from, LargeMobileBOD deed ) : base( 50, 50 ) { m_From = from; m_Deed = deed; m_From.CloseGump( typeof( LargeMobileBODAcceptGump ) ); m_From.CloseGump( typeof( SmallMobileBODAcceptGump ) ); LargeMobileBulkEntry[] entries = deed.Entries; AddPage( 0 ); AddBackground( 25, 10, 430, 240 + (entries.Length * 24), 5054 ); AddImageTiled( 33, 20, 413, 221 + (entries.Length * 24), 2624 ); AddAlphaRegion( 33, 20, 413, 221 + (entries.Length * 24) ); AddImage( 20, 5, 10460 ); AddImage( 430, 5, 10460 ); AddImage( 20, 225 + (entries.Length * 24), 10460 ); AddImage( 430, 225 + (entries.Length * 24), 10460 ); AddHtmlLocalized( 180, 25, 120, 20, 1045134, 0x7FFF, false, false ); // A large bulk order AddHtmlLocalized( 40, 48, 350, 20, 1045135, 0x7FFF, false, false ); // Ah! Thanks for the goods! Would you help me out? AddLabel( 40, 72, 1152, @"Amount to tame:"); // Amount to make: AddLabel( 250, 72, 1152, deed.AmountMax.ToString() ); AddHtmlLocalized( 40, 96, 120, 20, 1045137, 0x7FFF, false, false ); // Items requested: int y = 120; for ( int i = 0; i < entries.Length; ++i, y += 24 ) { string s = entries[i].Details.AnimalName; int capsbreak = s.IndexOfAny("ABCDEFGHIJKLMNOPQRSTUVWXYZ".ToCharArray(),1); if( capsbreak > -1 ) { string secondhalf = s.Substring( capsbreak ); string firsthalf = s.Substring(0, capsbreak ); string newname = firsthalf + " " + secondhalf; AddLabel( 40, y, 1152, newname.ToString() ); } else { AddLabel( 40, y, 1152, entries[i].Details.AnimalName.ToString() ); } } AddHtmlLocalized( 40, 192 + (entries.Length * 24), 350, 20, 1045139, 0x7FFF, false, false ); // Do you want to accept this order? AddButton( 100, 216 + (entries.Length * 24), 4005, 4007, 1, GumpButtonType.Reply, 0 ); AddHtmlLocalized( 135, 216 + (entries.Length * 24), 120, 20, 1006044, 0x7FFF, false, false ); // Ok AddButton( 275, 216 + (entries.Length * 24), 4005, 4007, 0, GumpButtonType.Reply, 0 ); AddHtmlLocalized( 310, 216 + (entries.Length * 24), 120, 20, 1011012, 0x7FFF, false, false ); // CANCEL }
public static LargeMobileBulkEntry[] ConvertEntries( LargeMobileBOD owner, SmallMobileBulkEntry[] small ) { LargeMobileBulkEntry[] large = new LargeMobileBulkEntry[small.Length]; for ( int i = 0; i < small.Length; ++i ) large[i] = new LargeMobileBulkEntry( owner, small[i] ); return large; }
public LargeMobileBulkEntry( LargeMobileBOD owner, GenericReader reader ) { m_Owner = owner; m_Amount = reader.ReadInt(); Type realType = null; string type = reader.ReadString(); if ( type != null ) realType = ScriptCompiler.FindTypeByFullName( type ); m_Details = new SmallMobileBulkEntry( realType, reader.ReadString(), reader.ReadInt() ); }
public LargeMobileBulkEntry( LargeMobileBOD owner, SmallMobileBulkEntry details ) { m_Owner = owner; m_Details = details; }
public LargeMobileBODTarget( LargeMobileBOD deed ) : base( 18, false, TargetFlags.None ) { m_Deed = deed; }
public LargeMobileBODGump(Mobile from, LargeMobileBOD deed) : base(25, 25) { m_From = from; m_Deed = deed; m_From.CloseGump(typeof(LargeMobileBODGump)); m_From.CloseGump(typeof(SmallMobileBODGump)); LargeMobileBulkEntry[] entries = deed.Entries; AddPage(0); AddBackground(50, 10, 455, 236 + (entries.Length * 24), 5054); AddImageTiled(58, 20, 438, 217 + (entries.Length * 24), 2624); AddAlphaRegion(58, 20, 438, 217 + (entries.Length * 24)); AddImage(45, 5, 10460); AddImage(480, 5, 10460); AddImage(45, 221 + (entries.Length * 24), 10460); AddImage(480, 221 + (entries.Length * 24), 10460); AddHtmlLocalized(225, 25, 120, 20, 1045134, 0x7FFF, false, false); // A large bulk order AddLabel(75, 48, 0x480, @"Amount to tame:"); // Amount to make: AddLabel(275, 48, 1152, deed.AmountMax.ToString()); AddHtmlLocalized(75, 72, 120, 20, 1045137, 0x7FFF, false, false); // Items requested: AddHtmlLocalized(275, 76, 200, 20, 1045153, 0x7FFF, false, false); // Amount finished: int y = 96; for (int i = 0; i < entries.Length; ++i) { LargeMobileBulkEntry entry = entries[i]; SmallMobileBulkEntry details = entry.Details; string s = details.AnimalName; int capsbreak = s.IndexOfAny("ABCDEFGHIJKLMNOPQRSTUVWXYZ".ToCharArray(), 1); if (capsbreak > -1) { string secondhalf = s.Substring(capsbreak); string firsthalf = s.Substring(0, capsbreak); string newname = firsthalf + " " + secondhalf; AddLabel(75, y, 0x480, newname.ToString()); AddLabel(275, y, 0x480, entry.Amount.ToString()); } else { AddLabel(75, y, 0x480, details.AnimalName.ToString()); AddLabel(275, y, 0x480, entry.Amount.ToString()); } y += 24; } AddButton(125, 168 + (entries.Length * 24), 4005, 4007, 2, GumpButtonType.Reply, 0); AddHtmlLocalized(160, 168 + (entries.Length * 24), 300, 20, 1045155, 0x7FFF, false, false); // Combine this deed with another deed. AddButton(125, 192 + (entries.Length * 24), 4005, 4007, 1, GumpButtonType.Reply, 0); AddHtmlLocalized(160, 192 + (entries.Length * 24), 120, 20, 1011441, 0x7FFF, false, false); // EXIT }