コード例 #1
0
/*
 *              public static int AdjustedSilverCost( int initialCost, Faction faction )
 *              {
 *                      return (int)(initialCost * (1.0 - 0.05 * faction.OwnedTowns));
 *              }
 */
        public FactionImbueGump(int quality, Item item, Mobile from, CraftSystem craftSystem, BaseTool tool, object notice, int availableSilver, Faction faction, FactionItemDefinition def) : base(100, 200)
        {
            m_Item        = item;
            m_Mobile      = from;
            m_Faction     = faction;
            m_CraftSystem = craftSystem;
            m_Tool        = tool;
            m_Notice      = notice;
            m_Quality     = quality;
            m_Definition  = def;

            AddPage(0);

            AddBackground(0, 0, 320, 270, 5054);
            AddBackground(10, 10, 300, 250, 3000);

            AddHtmlLocalized(20, 20, 210, 25, 1011569, false, false);               // Imbue with Faction properties?


            AddHtmlLocalized(20, 60, 170, 25, 1018302, false, false);               // Item quality:
            AddHtmlLocalized(175, 60, 100, 25, 1018305 - m_Quality, false, false);  //	Exceptional, Average, Low

            AddHtmlLocalized(20, 80, 170, 25, 1011572, false, false);               // Item Cost :

            //AddLabel( 175, 80, 0x34, AdjustedSilverCost(def.SilverCost, faction).ToString( "N0" ) ); // NOTE: Added 'N0'
            AddLabel(175, 80, 0x34, def.SilverCost.ToString("N0"));                 // NOTE: Added 'N0'

            AddHtmlLocalized(20, 100, 170, 25, 1011573, false, false);              // Your Silver :
            AddLabel(175, 100, 0x34, availableSilver.ToString("N0"));               // NOTE: Added 'N0'


            AddRadio(20, 140, 210, 211, true, 1);
            AddLabel(55, 140, m_Faction.Definition.HuePrimary - 1, "*****");
            AddHtmlLocalized(150, 140, 150, 25, 1011570, false, false);               // Primary Color

            AddRadio(20, 160, 210, 211, false, 2);
            AddLabel(55, 160, m_Faction.Definition.HueSecondary - 1, "*****");
            AddHtmlLocalized(150, 160, 150, 25, 1011571, false, false);               // Secondary Color


            AddHtmlLocalized(55, 200, 200, 25, 1011011, false, false);               // CONTINUE
            AddButton(20, 200, 4005, 4007, 1, GumpButtonType.Reply, 0);

            AddHtmlLocalized(55, 230, 200, 25, 1011012, false, false);               // CANCEL
            AddButton(20, 230, 4005, 4007, 0, GumpButtonType.Reply, 0);
        }
コード例 #2
0
/*
		public static int AdjustedSilverCost( int initialCost, Faction faction )
		{
			return (int)(initialCost * (1.0 - 0.05 * faction.OwnedTowns));
		}
*/
		public FactionImbueGump( int quality, Item item, Mobile from, CraftSystem craftSystem, IBaseTool tool, object notice, int availableSilver, Faction faction, FactionItemDefinition def ) : base( 100, 200 )
		{
			m_Item = item;
			m_Mobile = from;
			m_Faction = faction;
			m_CraftSystem = craftSystem;
			m_Tool = tool;
			m_Notice = notice;
			m_Quality = quality;
			m_Definition = def;

			AddPage( 0 );

			AddBackground( 0, 0, 320, 270, 5054 );
			AddBackground( 10, 10, 300, 250, 3000 );

			AddHtmlLocalized( 20, 20, 210, 25, 1011569, false, false ); // Imbue with Faction properties?


			AddHtmlLocalized( 20, 60, 170, 25, 1018302, false, false ); // Item quality:
			AddHtmlLocalized( 175, 60, 100, 25, 1018305 - m_Quality, false, false ); //	Exceptional, Average, Low

			AddHtmlLocalized( 20, 80, 170, 25, 1011572, false, false ); // Item Cost :

			//AddLabel( 175, 80, 0x34, AdjustedSilverCost(def.SilverCost, faction).ToString( "N0" ) ); // NOTE: Added 'N0'
			AddLabel( 175, 80, 0x34, def.SilverCost.ToString( "N0" ) ); // NOTE: Added 'N0'

			AddHtmlLocalized( 20, 100, 170, 25, 1011573, false, false ); // Your Silver :
			AddLabel( 175, 100, 0x34, availableSilver.ToString( "N0" ) ); // NOTE: Added 'N0'


			AddRadio( 20, 140, 210, 211, true, 1 );
			AddLabel( 55, 140, m_Faction.Definition.HuePrimary - 1, "*****" );
			AddHtmlLocalized( 150, 140, 150, 25, 1011570, false, false ); // Primary Color

			AddRadio( 20, 160, 210, 211, false, 2 );
			AddLabel( 55, 160, m_Faction.Definition.HueSecondary - 1, "*****" );
			AddHtmlLocalized( 150, 160, 150, 25, 1011571, false, false ); // Secondary Color


			AddHtmlLocalized( 55, 200, 200, 25, 1011011, false, false ); // CONTINUE
			AddButton( 20, 200, 4005, 4007, 1, GumpButtonType.Reply, 0 );

			AddHtmlLocalized( 55, 230, 200, 25, 1011012, false, false ); // CANCEL
			AddButton( 20, 230, 4005, 4007, 0, GumpButtonType.Reply, 0 );
		}