コード例 #1
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.ReadEncodedInt();

            m_Type = (PromotionalType)reader.ReadInt();
        }
コード例 #2
0
        public PromotionalToken(PromotionalType type) : base(0x2AAA)
        {
            m_Type = type;

            Light = LightType.Circle300;

            LootType = LootType.Blessed;

            Weight = 1.0;
        }
コード例 #3
0
ファイル: PromotionalToken.cs プロジェクト: Ravenwolfe/xrunuo
        public PromotionalToken( PromotionalType type )
            : base(0x2AAA)
        {
            Type = type;

            Light = LightType.Circle300;

            LootType = LootType.Blessed;

            Weight = 1.0;
        }
コード例 #4
0
        public PromotionMessageGump(bool success, PromotionalType type, string code) : base(0, 0)
        {
            m_Success = success;

            m_Type = type;

            m_Code = code;

            AddPage(0);

            AddButton(23, 40, 0x845, 0x846, 0, GumpButtonType.Reply, 0);

            AddLabel(0, 50, 0x2B, "Message");
        }
コード例 #5
0
        public PromotionFailureGump(Mobile m, PromotionalType type, string code) : base(0, 0)
        {
            from = m;

            m_Type = type;

            m_Code = code;

            AddBackground(50, 25, 540, 430, 0xA28);

            AddPage(0);

            AddHtmlLocalized(150, 40, 360, 40, 1062610, false, false);               // <CENTER><U>Ultima Online Help Response</U></CENTER>

            AddHtml(80, 90, 480, 290, String.Format("PROMO_AGENT tells {0}: Promotion redemption failed: specified promotion code is invalid. Please contact a Game Master if you need additional support.", from.Name), true, true);

            AddHtmlLocalized(80, 390, 480, 40, 1062611, false, false);               // Clicking the OKAY button will remove the response you have received.

            AddButton(400, 417, 0x81A, 0x81B, 1, GumpButtonType.Reply, 0);

            AddButton(475, 417, 0x819, 0x818, 0, GumpButtonType.Reply, 0);
        }
コード例 #6
0
        public override void OnResponse(NetState state, RelayInfo info)
        {
            Mobile from = state.Mobile;

            switch (info.ButtonID)
            {
            case 0:                                          // Close/Cancel
            {
                from.SendLocalizedMessage(501235, "", 0x35); // Help request aborted.

                break;
            }

            case 1:                     // OK
            {
                TextRelay entry = info.GetTextEntry(0);
                string    code  = (entry == null ? "" : entry.Text.Trim());

                if (code != "")
                {
                    from.SendLocalizedMessage(1062098);                                       // Your promotional code has been submitted.  We are processing your request.

                    PromotionalType type    = PromotionalType.None;
                    bool            success = false;
                    ((PlayerMobile)from).LastPromotionCode = code;

                    // TODO: Send query for inputed promo-code to database
                    // We must receive following results: bool success, PromotionalType type, string code

                    from.SendGump(new PromotionMessageGump(success, type, code));
                }

                break;
            }
            }
        }
コード例 #7
0
ファイル: PromotionalToken.cs プロジェクト: Ravenwolfe/xrunuo
        public override void Deserialize( GenericReader reader )
        {
            base.Deserialize( reader );

            /*int version = */
            reader.ReadEncodedInt();

            m_Type = (PromotionalType) reader.ReadInt();
        }
コード例 #8
0
        public PromotionMessageGump( bool success, PromotionalType type, string code )
            : base(0, 0)
        {
            m_Success = success;

            m_Type = type;

            m_Code = code;

            AddPage( 0 );

            AddButton( 23, 40, 0x845, 0x846, 0, GumpButtonType.Reply, 0 );

            AddLabel( 0, 50, 0x2B, "Message" );
        }
コード例 #9
0
        public PromotionFailureGump( Mobile m, PromotionalType type, string code )
            : base(0, 0)
        {
            from = m;

            m_Type = type;

            m_Code = code;

            AddBackground( 50, 25, 540, 430, 0xA28 );

            AddPage( 0 );

            AddHtmlLocalized( 150, 40, 360, 40, 1062610, false, false ); // <CENTER><U>Ultima Online Help Response</U></CENTER>

            AddHtml( 80, 90, 480, 290, String.Format( "PROMO_AGENT tells {0}: Promotion redemption failed: specified promotion code is invalid. Please contact a Game Master if you need additional support.", from.Name ), true, true );

            AddHtmlLocalized( 80, 390, 480, 40, 1062611, false, false ); // Clicking the OKAY button will remove the response you have received.

            AddButton( 400, 417, 0x81A, 0x81B, 1, GumpButtonType.Reply, 0 );

            AddButton( 475, 417, 0x819, 0x818, 0, GumpButtonType.Reply, 0 );
        }