public ConfirmRewardGump( IComunityCollection collection, Point3D location, CollectionItem item, int hue ) : base() { m_Collection = collection; m_Location = location; m_Item = item; m_Hue = hue; if ( m_Item != null ) AddItem( 150, 100, m_Item.ItemID, m_Item.Hue ); }
public virtual void Reward( PlayerMobile player, CollectionItem reward, int hue ) { Item item = QuestHelper.Construct( reward.Type ) as Item; if ( item != null && player.AddToBackpack( item ) ) { if ( hue > 0 ) item.Hue = hue; player.AddCollectionPoints( CollectionID, (int) reward.Points * -1 ); player.SendLocalizedMessage( 1073621 ); // Your reward has been placed in your backpack. player.PlaySound( 0x5A7 ); } else if ( item != null ) { player.SendLocalizedMessage( 1074361 ); // The reward could not be given. Make sure you have room in your pack. item.Delete(); } reward.OnGiveReward( player, this, hue ); player.SendGump( new ComunityCollectionGump( player, this, Location ) ); }
public virtual void Donate( PlayerMobile player, CollectionItem item, int amount ) { int points = (int) ( amount * item.Points ); player.AddCollectionPoints( CollectionID, points ); player.SendLocalizedMessage( 1072816 ); // Thank you for your donation! player.SendLocalizedMessage( 1072817, points.ToString() ); // You have earned ~1_POINTS~ reward points for this donation. player.SendLocalizedMessage( 1072818, points.ToString() ); // The Collection has been awarded ~1_POINTS~ points Points += points; InvalidateProperties(); }
public override void OnConfirmed(CollectionItem citem, int index) { base.OnConfirmed(citem, index); PointsSystem.Blackthorn.DeductPoints(User, citem.Points); }
public InternalPrompt( IComunityCollection collection, CollectionItem selected, Point3D location ) { m_Collection = collection; m_Selected = selected; m_Location = location; }
public ConfirmRewardGump( IComunityCollection collection, Point3D location, CollectionItem item ) : this( collection, location, item, 0 ) { }
public aConfirmRewardGump(Mobile owner, CollectionItem item, int index, Action<CollectionItem, int> callback) { Item = item; Index = index; Owner = owner; ConfirmCallback = callback; }
public virtual int GetItemHue(Item i, CollectionItem item) { int hue = 0x3E9; if (Points >= item.Points) hue = item.Hue; return hue; }
public virtual void OnConfirmed(CollectionItem citem, int index) { Item item = Activator.CreateInstance(citem.Type) as Item; if (item != null) { if (User.Backpack == null || !User.Backpack.TryDropItem(User, item, false)) { User.SendLocalizedMessage(1074361); // The reward could not be given. Make sure you have room in your pack. item.Delete(); } else { User.SendLocalizedMessage(1073621); // Your reward has been placed in your backpack. User.PlaySound(0x5A8); } } }
public override void OnConfirmed(CollectionItem citem, int index) { base.OnConfirmed(citem, index); PointsSystem.CleanUpBritannia.DeductPoints(User, citem.Points); }
public ConfirmRewardGump(Mobile owner, CollectionItem item, int index) { Item = item; Index = index; Owner = owner; }