Fixes code according to modern code style. Fixes a few expression bugs.

This commit is contained in:
Kamron Batman 2018-09-15 09:58:51 -07:00
parent 89eea25e5f
commit 970fd563b2
3324 changed files with 441118 additions and 433755 deletions

View file

@ -2,58 +2,58 @@ using Server.Gumps;
namespace Server.Engines.Quests
{
public class QuestItemInfo
{
public object Name { get; set; }
public class QuestItemInfo
{
public QuestItemInfo(object name, int itemID)
{
Name = name;
ItemID = itemID;
}
public int ItemID { get; set; }
public object Name{ get; set; }
public QuestItemInfo( object name, int itemID )
{
Name = name;
ItemID = itemID;
}
}
public int ItemID{ get; set; }
}
public class QuestItemInfoGump : BaseQuestGump
{
public QuestItemInfoGump( QuestItemInfo[] info ) : base( 485, 75 )
{
int height = 100 + (info.Length * 75);
public class QuestItemInfoGump : BaseQuestGump
{
public QuestItemInfoGump(QuestItemInfo[] info) : base(485, 75)
{
int height = 100 + info.Length * 75;
AddPage( 0 );
AddPage(0);
AddBackground( 5, 10, 145, height, 5054 );
AddBackground(5, 10, 145, height, 5054);
AddImageTiled( 13, 20, 125, 10, 2624 );
AddAlphaRegion( 13, 20, 125, 10 );
AddImageTiled(13, 20, 125, 10, 2624);
AddAlphaRegion(13, 20, 125, 10);
AddImageTiled( 13, height - 10, 128, 10, 2624 );
AddAlphaRegion( 13, height - 10, 128, 10 );
AddImageTiled(13, height - 10, 128, 10, 2624);
AddAlphaRegion(13, height - 10, 128, 10);
AddImageTiled( 13, 20, 10, height - 30, 2624 );
AddAlphaRegion( 13, 20, 10, height - 30 );
AddImageTiled(13, 20, 10, height - 30, 2624);
AddAlphaRegion(13, 20, 10, height - 30);
AddImageTiled( 131, 20, 10, height - 30, 2624 );
AddAlphaRegion( 131, 20, 10, height - 30 );
AddImageTiled(131, 20, 10, height - 30, 2624);
AddAlphaRegion(131, 20, 10, height - 30);
AddHtmlLocalized( 67, 35, 120, 20, 1011233, White, false, false ); // INFO
AddHtmlLocalized(67, 35, 120, 20, 1011233, White, false, false); // INFO
AddImage( 62, 52, 9157 );
AddImage( 72, 52, 9157 );
AddImage( 82, 52, 9157 );
AddImage(62, 52, 9157);
AddImage(72, 52, 9157);
AddImage(82, 52, 9157);
AddButton( 25, 31, 1209, 1210, 777, GumpButtonType.Reply, 0 );
AddButton(25, 31, 1209, 1210, 777, GumpButtonType.Reply, 0);
AddPage( 1 );
AddPage(1);
for ( int i = 0; i < info.Length; ++i )
{
QuestItemInfo cur = info[i];
for (int i = 0; i < info.Length; ++i)
{
QuestItemInfo cur = info[i];
AddHtmlObject( 25, 65 + (i * 75), 110, 20, cur.Name, 1153, false, false );
AddItem( 45, 85 + (i * 75), cur.ItemID );
}
}
}
AddHtmlObject(25, 65 + i * 75, 110, 20, cur.Name, 1153, false, false);
AddItem(45, 85 + i * 75, cur.ItemID);
}
}
}
}