Ejemplo n.º 1
0
		public override void OnResponse(NetState state, RelayInfo info)
        {
            Mobile from = state.Mobile;

            switch (info.ButtonID)
            {
                case 0: //Close Gump 
                {
                    from.CloseGump(typeof(SoulstoneDeedGump));
                    break;
				}
                case 1: // Green Soulstone
                {
                    Item item = new SoulStone(from.Account.ToString());								
					from.BankBox.AddItem( item );
			        from.CloseGump( typeof( SoulstoneDeedGump ));
					from.SendMessage( "A green soulstone has been placed into your bankbox." );
			        m_Deed.Delete();
			        break;
                }
                case 2: // Red Soulstone
                {
					Item item = new RedSoulstone( from.Account.ToString() );								
					from.BankBox.AddItem( item );
			        from.CloseGump( typeof( SoulstoneDeedGump ));
					from.SendMessage( "A red soulstone has been placed into your bankbox." );
			        m_Deed.Delete();
			        break;
                }
                case 3: // Blue Soulstone
                {
					Item item = new BlueSoulstone( from.Account.ToString() );								
					from.BankBox.AddItem( item );
			        from.CloseGump( typeof( SoulstoneDeedGump ));
					from.SendMessage( "A blue soulstone has been placed into your bankbox." );
			        m_Deed.Delete();
			        break;
                }
            }
        }
Ejemplo n.º 2
0
        public override void OnResponse( GameClient sender, RelayInfo info )
        {
            PlayerMobile pm = from as PlayerMobile;

            if ( info.ButtonID == 1 )
            {
                BankBox bank = from.BankBox;

                if ( bank == null )
                    return;

                Accounting.Account acct = from.Account as Accounting.Account;

                switch ( token.Type )
                {
                    case PromotionalType.SoulStone:
                        {
                            SoulStone ss = new SoulStone( acct.Username );

                            bank.DropItem( ss );

                            from.SendLocalizedMessage( 1070743 ); // A Soulstone has been created in your bank box!

                            break;
                        }
                    case PromotionalType.BlueSoulstone:
                        {
                            SoulStone ss = new BlueSoulstone( acct.Username );

                            bank.DropItem( ss );

                            from.SendMessage( "A Blue Soulstone has been created in your bank box!" );

                            break;
                        }
                    case PromotionalType.SoulStoneFragment:
                        {
                            int offset = Utility.Random( 0, 8 );

                            SoulStoneFragment ssf = new SoulStoneFragment( 0x2AA1 + offset, acct.Username );

                            bank.DropItem( ssf );

                            from.SendLocalizedMessage( 1070976 ); // A soulstone fragment has been created in your bank box.

                            break;
                        }
                    case PromotionalType.AdvancedCharacter:
                        {
                            pm.SendGump( new AdvancedCharacterChoiceGump() );

                            pm.ACState = AdvancedCharacterState.InUse;

                            break;
                        }
                    case PromotionalType.SeventhAnniversary:
                        {
                            //Cerramos algún posible gump abierto (exploit arreglado)
                            if ( !pm.HasGump( typeof( SeventhAniversaryGump ) ) )
                                pm.SendGump( new SeventhAniversaryGump( token ) );

                            break;
                        }
                    case PromotionalType.EighthAnniversary:
                        {
                            //Cerramos algún posible gump abierto (exploit arreglado)
                            if ( !pm.HasGump( typeof( EighthAnniversaryGump ) ) )
                                pm.SendGump( new EighthAnniversaryGump( token ) );

                            break;
                        }
                    case PromotionalType.BrokenFurniture:
                        {
                            //Cerramos algún posible gump abierto (exploit arreglado)
                            if ( !pm.HasGump( typeof( BrokenFurnitureGump ) ) )
                                pm.SendGump( new BrokenFurnitureConfirmGump( token ) );

                            break;
                        }
                    case PromotionalType.HeritageItems:
                        {
                            //Cerramos algún posible gump abierto (exploit arreglado)
                            if ( !pm.HasGump( typeof( HeritageItemsGump ) ) )
                                pm.SendGump( new HeritageItemsConfirmGump( token ) );

                            break;
                        }
                    case PromotionalType.EvilHomeDecoration:
                        {
                            //Cerramos algún posible gump abierto (exploit arreglado)
                            if ( !pm.HasGump( typeof( EvilHomeDecorationGump ) ) )
                                pm.SendGump( new EvilHomeDecorationConfirmGump( token ) );

                            break;
                        }
                    // TODO: character transfer
                }

                if ( token.Type != PromotionalType.SeventhAnniversary &&
                     token.Type != PromotionalType.EighthAnniversary )
                    token.Delete();
            }
        }
Ejemplo n.º 3
0
        public override void OnResponse(GameClient sender, RelayInfo info)
        {
            PlayerMobile pm = from as PlayerMobile;

            if (info.ButtonID == 1)
            {
                BankBox bank = from.BankBox;

                if (bank == null)
                {
                    return;
                }

                Accounting.Account acct = from.Account as Accounting.Account;

                switch (token.Type)
                {
                case PromotionalType.SoulStone:
                {
                    SoulStone ss = new SoulStone(acct.Username);

                    bank.DropItem(ss);

                    from.SendLocalizedMessage(1070743);                                       // A Soulstone has been created in your bank box!

                    break;
                }

                case PromotionalType.BlueSoulstone:
                {
                    SoulStone ss = new BlueSoulstone(acct.Username);

                    bank.DropItem(ss);

                    from.SendMessage("A Blue Soulstone has been created in your bank box!");

                    break;
                }

                case PromotionalType.SoulStoneFragment:
                {
                    int offset = Utility.Random(0, 8);

                    SoulStoneFragment ssf = new SoulStoneFragment(0x2AA1 + offset, acct.Username);

                    bank.DropItem(ssf);

                    from.SendLocalizedMessage(1070976);                                       // A soulstone fragment has been created in your bank box.

                    break;
                }

                case PromotionalType.AdvancedCharacter:
                {
                    pm.SendGump(new AdvancedCharacterChoiceGump());

                    pm.ACState = AdvancedCharacterState.InUse;

                    break;
                }

                case PromotionalType.SeventhAnniversary:
                {
                    //Cerramos algún posible gump abierto (exploit arreglado)
                    if (!pm.HasGump(typeof(SeventhAniversaryGump)))
                    {
                        pm.SendGump(new SeventhAniversaryGump(token));
                    }

                    break;
                }

                case PromotionalType.EighthAnniversary:
                {
                    //Cerramos algún posible gump abierto (exploit arreglado)
                    if (!pm.HasGump(typeof(EighthAnniversaryGump)))
                    {
                        pm.SendGump(new EighthAnniversaryGump(token));
                    }

                    break;
                }

                case PromotionalType.BrokenFurniture:
                {
                    //Cerramos algún posible gump abierto (exploit arreglado)
                    if (!pm.HasGump(typeof(BrokenFurnitureGump)))
                    {
                        pm.SendGump(new BrokenFurnitureConfirmGump(token));
                    }

                    break;
                }

                case PromotionalType.HeritageItems:
                {
                    //Cerramos algún posible gump abierto (exploit arreglado)
                    if (!pm.HasGump(typeof(HeritageItemsGump)))
                    {
                        pm.SendGump(new HeritageItemsConfirmGump(token));
                    }

                    break;
                }

                case PromotionalType.EvilHomeDecoration:
                {
                    //Cerramos algún posible gump abierto (exploit arreglado)
                    if (!pm.HasGump(typeof(EvilHomeDecorationGump)))
                    {
                        pm.SendGump(new EvilHomeDecorationConfirmGump(token));
                    }

                    break;
                }
                    // TODO: character transfer
                }

                if (token.Type != PromotionalType.SeventhAnniversary &&
                    token.Type != PromotionalType.EighthAnniversary)
                {
                    token.Delete();
                }
            }
        }