Пример #1
0
        public EleventhYearConfirmGump(EleventhYearToken token)
            : base(10, 10)
        {
            m_Token = token;

            AddPage(0);
            AddBackground(0, 0, 240, 135, 0x2422);

            AddHtmlLocalized(15, 15, 210, 75, 1070972, 0x0, true, false);               // Click "OKAY" to redeem the following promotional item:
            AddHtmlLocalized(15, 60, 210, 75, m_Token.Info.GumpArgument, 0x0, false, false);

            AddButton(160, 95, 0xF7, 0xF8, 1, GumpButtonType.Reply, 0);
            AddButton(90, 95, 0xF2, 0xF1, 0, GumpButtonType.Reply, 0);
        }
Пример #2
0
        public bool GiveReward( EleventhYearToken token, Mobile m )
        {
            for ( int i = 0; i < m_TokenTypes.Length; i++ )
            {
                Item reward = new EleventhYearToken( m_TokenTypes[i] );

                m.AddToBackpack( reward );
            }

            return true;
        }
Пример #3
0
        public bool GiveReward( EleventhYearToken token, Mobile m )
        {
            try
            {
                Gump gump = (Gump) Activator.CreateInstance( m_GumpType, new object[] { token } );

                m.CloseGump( m_GumpType );
                m.SendGump( gump );
            }
            catch
            {
            }

            return false;
        }
Пример #4
0
        public bool GiveReward( EleventhYearToken token, Mobile m )
        {
            try
            {
                Item reward = (Item) Activator.CreateInstance( m_ItemType );

                if ( !m.PlaceInBackpack( reward ) && !m.BankBox.TryDropItem( m, reward, false ) )
                    return false;

                return true;
            }
            catch
            {
                return false;
            }
        }
Пример #5
0
 public void GiveReward( EleventhYearToken token, Mobile m )
 {
     if ( m_RewardGiver.GiveReward( token, m ) )
         token.Delete();
 }