public override void OnResponse(GameClient sender, RelayInfo info) { if (info.ButtonID == 1 && !m_NewBalm.Deleted && m_NewBalm.IsChildOf(sender.Mobile.Backpack)) { BalmOrLotion.ReplaceBalmOrLotion(sender.Mobile, m_NewBalm); } }
public static void ReplaceBalmOrLotion(Mobile m, BalmOrLotion newBalm) { if (m_Table.ContainsKey(m)) { BalmOrLotionContext oldBalmContext = m_Table[m]; oldBalmContext.Item.RemoveBuff(m); oldBalmContext.ExpireTimer.Stop(); } newBalm.Use(m); }
public static void ReplaceBalmOrLotion( Mobile m, BalmOrLotion newBalm ) { if ( m_Table.ContainsKey( m ) ) { BalmOrLotionContext oldBalmContext = m_Table[m]; oldBalmContext.Item.RemoveBuff( m ); oldBalmContext.ExpireTimer.Stop(); } newBalm.Use( m ); }
public override void Apply(Mobile m) { if (m_HasBalm(m)) { BalmOrLotion.IncreaseDuration(m); m.SendLocalizedMessage(1113372); // The duration of your balm has been increased by an hour! } else { base.Apply(m); m.AddStatMod(new StatMod(m_Stat, "[FontOfFortune] Stat Offset", StatBoost, BlessingDuration)); } }
public ReplaceBalmOrLotionGump(BalmOrLotion newBalm) : base(340, 340) { m_NewBalm = newBalm; AddPage(0); AddBackground(0, 0, 291, 99, 0x13BE); AddImageTiled(5, 6, 280, 20, 0xA40); AddHtmlLocalized(9, 8, 280, 20, 1095145, 0x7FFF, false, false); // Replace active balm or lotion AddImageTiled(5, 31, 280, 40, 0xA40); AddHtmlLocalized(9, 35, 272, 40, 1095144, 0x7FFF, false, false); // Applying this will replace the effects currently active. Do you wish to proceed? AddButton(215, 73, 0xFB7, 0xFB8, 1, GumpButtonType.Reply, 0); AddHtmlLocalized(250, 75, 65, 20, 1006044, 0x7FFF, false, false); // OK AddButton(5, 73, 0xFB1, 0xFB2, 0, GumpButtonType.Reply, 0); AddHtmlLocalized(40, 75, 100, 20, 1060051, 0x7FFF, false, false); // CANCEL }
public BalmOrLotionContext(Timer expireTimer, BalmOrLotion item) { m_ExpireTimer = expireTimer; m_Item = item; }
public ReplaceBalmOrLotionGump( BalmOrLotion newBalm ) : base(340, 340) { m_NewBalm = newBalm; AddPage( 0 ); AddBackground( 0, 0, 291, 99, 0x13BE ); AddImageTiled( 5, 6, 280, 20, 0xA40 ); AddHtmlLocalized( 9, 8, 280, 20, 1095145, 0x7FFF, false, false ); // Replace active balm or lotion AddImageTiled( 5, 31, 280, 40, 0xA40 ); AddHtmlLocalized( 9, 35, 272, 40, 1095144, 0x7FFF, false, false ); // Applying this will replace the effects currently active. Do you wish to proceed? AddButton( 215, 73, 0xFB7, 0xFB8, 1, GumpButtonType.Reply, 0 ); AddHtmlLocalized( 250, 75, 65, 20, 1006044, 0x7FFF, false, false ); // OK AddButton( 5, 73, 0xFB1, 0xFB2, 0, GumpButtonType.Reply, 0 ); AddHtmlLocalized( 40, 75, 100, 20, 1060051, 0x7FFF, false, false ); // CANCEL }
public BalmOrLotionContext( Timer expireTimer, BalmOrLotion item ) { m_ExpireTimer = expireTimer; m_Item = item; }