public override void GetProperties(ObjectPropertyList list) { base.GetProperties(list); if (Core.ML && this.m_IsRewardItem) { list.Add(RewardSystem.GetRewardYearLabel(this, new object[] { this.Hue, this.m_LabelNumber })); // X Year Veteran Reward } }
public override void OnDoubleClick(Mobile from) { if (m_IsRewardItem && !RewardSystem.CheckIsUsableBy(from, this, new object[] { Type })) { return; } base.OnDoubleClick(from); }
public override bool CanEquip(Mobile m) { if (!base.CanEquip(m)) { return(false); } return(!m_IsRewardItem || RewardSystem.CheckIsUsableBy(m, this, new object[] { Hue, m_LabelNumber })); }
public override void OnDoubleClick(Mobile from) { if (this.m_IsRewardItem && !RewardSystem.CheckIsUsableBy(from, this, null)) { return; } base.OnDoubleClick(from); }
public static int GetLuckBonus(Mobile from) { if (m_LuckTable.ContainsKey(from) && from.Account is Account account) { return(Math.Min(MaxLuckBonus, 200 + RewardSystem.GetRewardLevel(account) * 50)); } return(0); }
public override void OnDoubleClick(Mobile from) { if (m_IsRewardItem && !RewardSystem.CheckIsUsableBy(from, this, null)) { from.SendMessage("This does not belong to you!!"); return; } base.OnDoubleClick(from); }
public override bool OnEquip(Mobile from) { if (m_IsRewardItem && !RewardSystem.CheckIsUsableBy(from, this, null)) { from.SendMessage("This does not belong to you!!"); return(false); } return(base.OnEquip(from)); }
public override void OnDoubleClick(Mobile m) { if (m_IsRewardItem && !RewardSystem.CheckIsUsableBy(m, this, null)) { m.SendMessage("This does not belong to you!!"); return; } m.SendGump(new MasterRunebookGump(m, this)); }
public override bool OnDragDrop(Mobile from, Item dropped) { if (m_IsRewardItem && !RewardSystem.CheckIsUsableBy(from, this, null)) { from.SendMessage("This does not belong to you!!"); return(false); } return(OnDragDropInto(from, dropped, new Point3D(20, 100, 0))); }
public override void OnDoubleClick(Mobile from) { if (m_IsRewardItem && !RewardSystem.CheckIsUsableBy(from, this, null)) { return; } from.SendMessage("Select an object to rename"); // Select an object to engrave. from.Target = new TargetWeapon(this); }
public override void OnDoubleClick(Mobile from) { if (LinkedAccount == null || LinkedAccount != from.Account as Account) { from.SendLocalizedMessage(1154595); // Your account is not linked to this lighthouse. } else if (RewardSystem.CheckIsUsableBy(from, this, null)) { base.OnDoubleClick(from); } }
private void UpdateAllPlayerInfosWithRewards() { foreach (var entry in playerDatas) { var reward = RewardSystem.GetRewardsFor(entry.Value); var newShop = shop.RequestReroll(entry.Value.Level, entry.Value.Shop); entry.Value.AddReward(reward); entry.Value.UpdateShop(newShop); SendUpdatePlayerInfoPacket(entry.Key, entry.Value); } }
public override void GetProperties(ObjectPropertyList list) { base.GetProperties(list); if (Core.ML && m_IsRewardItem) { list.Add(RewardSystem.GetRewardYearLabel(this, new object[] { })); // X Year Veteran Reward } EtherealRetouchingTool.AddProperty(this, list); }
public override void OnDoubleClick( Mobile from ) { if ( m_IsRewardItem && !RewardSystem.CheckIsUsableBy( from, this, null ) ) return; if ( IsChildOf( from.Backpack ) ) { from.CloseGump( typeof( RewardOptionGump ) ); from.SendGump( new RewardOptionGump( this ) ); } else from.SendLocalizedMessage( 1062334 ); // This item must be in your backpack to be used. }
protected override void OnTarget(Mobile from, object targeted) { if (targeted is EtherealMount) { EtherealMount mount = targeted as EtherealMount; if (mount is GMEthereal) { from.SendMessage("You cannot use it on this!"); } else if (mount.IsChildOf(from.Backpack) && RewardSystem.CheckIsUsableBy(from, m_Tool, null)) { if (m_Table.ContainsKey(mount.GetType())) { EtherealEntry entry = m_Table[mount.GetType()]; if (mount.MountedID == entry.NormalID) { mount.MountedID = entry.TransparentID; from.SendLocalizedMessage(1113817); // Your ethereal mount's transparency has been restored. } else { mount.MountedID = entry.NormalID; from.SendLocalizedMessage(1113816); // Your ethereal mount's body has been solidified. } if (mount.EtherealHue != 0 && mount.Hue == 0) { mount.EtherealHue = 0; } } else { if (mount.EtherealHue != EtherealMount.DefaultEtherealHue) { mount.EtherealHue = EtherealMount.DefaultEtherealHue; from.SendLocalizedMessage(1113817); // Your ethereal mount's transparency has been restored. } else { mount.EtherealHue = mount.OriginalHue; from.SendLocalizedMessage(1113816); // Your ethereal mount's body has been solidified. } } mount.InvalidateProperties(); from.PlaySound(0x242); } } }
private void Awake() { CashEarnedToday = 0; RankedPointsEarnedToday = 0; if (Instance == null) { Instance = this; } else { Destroy(this.gameObject); } }
public override void GetProperties(ObjectPropertyList list) { base.GetProperties(list); if (m_IsDonationItem) { list.Add("Donation Ethereal"); list.Add("7.5 sec slower cast time if not a 9mo. Veteran"); } if (Core.ML && m_IsRewardItem) { list.Add(RewardSystem.GetRewardYearLabel(this, new object[] { })); // X Year Veteran Reward } }
public List <DailyReward> GetRewards(int level) { if (this.isBundle) { return(this.rewards); } UnityEngine.Random.InitState(RewardSystem.RandomSeed(level)); int index = UnityEngine.Random.Range(0, this.rewards.Count); return(new List <DailyReward> { this.rewards[index] }); }
public static int GetLuckBonus(Mobile from) { if (m_LuckTable.ContainsKey(from)) { Account account = from.Account as Account; if (account != null) { return(Math.Min(MaxLuckBonus, 200 + (RewardSystem.GetRewardLevel(account)) * 50)); } } return(0); }
// OVerride DoubleClick public override void OnDoubleClick(Mobile from) { if (m_IsRewardItem && !RewardSystem.CheckIsUsableBy(from, this, null)) { from.SendMessage("This does not belong to you!!"); return; } // Sanity, check for nulls if (from.Backpack == null || Parent != from.Backpack) { from.SendLocalizedMessage(1080058); // This must be in your backpack to use it. } else if (from.Account != null) { // Convert IAccount to Account Account acc = (Account)from.Account; // Get the tag and set up for reading the value. string tag = GetTag(from); int currentbonus = 0; // Convert can create an exception if the value cannot be converted to an integer. // so we throw it into Try/Catch to prevent the crash. try { currentbonus = Convert.ToInt32(acc.GetTag(tag)); } catch {} // Check bonus slots vs cap. if (currentbonus + m_BonusSlots > BonusCap) { from.SendMessage("You cannot use another one of these."); } else { from.SendMessage("You increase your maximum item limit for your bank."); currentbonus += m_BonusSlots; // More sanity, then set max items to default (125) + bonus. if (from.BankBox != null) { from.BankBox.MaxItems = from.BankBox.DefaultMaxItems + currentbonus; } // Remove the tag and readd it with the new value. acc.RemoveTag(tag); acc.AddTag(tag, currentbonus.ToString()); Delete(); } } }
public override void OnDoubleClick(Mobile from) { if (m_IsRewardItem && !RewardSystem.CheckIsUsableBy(from, this, null)) { return; } if (!IsChildOf(from.Backpack)) { from.SendLocalizedMessage(1042001); } else { from.SendGump(new BookCoverDeedgump(from, this)); } }
public override void GetProperties(ObjectPropertyList list) { base.GetProperties(list); if (_isRewardItem) { // X Year Veteran Reward list.Add( RewardSystem.GetRewardYearLabel( this, new object[] { Hue, _number } ) ); } }
public override bool OnDragDropInto(Mobile from, Item item, Point3D p) { if (m_IsRewardItem && !RewardSystem.CheckIsUsableBy(from, this, null)) { from.SendMessage("This does not belong to you!!"); return(false); } if (!base.OnDragDropInto(from, item, p)) { return(false); } item.LootType = LootType.Regular; from.SendMessage("Thee item becomes UnBlessed"); return(true); }
public virtual bool Validate(Mobile from) { if (Parent == null) { from.SayTo(from, 1010095); // This must be on your person to use. return(false); } else if (Parent != from.Backpack) { from.SendMessage("You cannot mount it unless it is in your main backpack!"); return(false); } else if (m_IsRewardItem && !RewardSystem.CheckIsUsableBy(from, this, null)) { } else if (!BaseMount.CheckMountAllowed(from, true)) { } else if (from.IsT2A) { from.SendMessage(61, "You cannot use this item in a T2A zone."); } else if (from.Mounted) { from.SendLocalizedMessage(1005583); // Please dismount first. } else if (from.IsBodyMod && !from.Body.IsHuman) { from.SendLocalizedMessage(1061628); // You can't do that while polymorphed. } else if (from.HasTrade) { from.SendLocalizedMessage(1042317, "", 0x41); // You may not ride at this time } else if ((from.Followers + FollowerSlots) > from.FollowersMax) { from.SendLocalizedMessage(1049679); // You have too many followers to summon your mount. } else if (!Multis.DesignContext.Check(from)) { } else { return(true); } return(false); }
public override void OnDoubleClick(Mobile from) { if (m_IsRewardItem && !RewardSystem.CheckIsUsableBy(from, this, null)) { return; } if (IsChildOf(from.Backpack)) { from.SendMenu(new RewardOptionMenu(this)); } else { from.SendLocalizedMessage("This item must be in your backpack to be used. "); // This item must be in your backpack to be used. } }
public override void OnDoubleClick(Mobile from) { if (m_IsRewardItem && !RewardSystem.CheckIsUsableBy(from, this, null)) { return; } if (IsChildOf(from.Backpack)) { from.SendMenu(new RewardOptionMenu(this)); } else { from.SendLocalizedMessage("You must have the object in your backpack to use it."); // You must have the object in your backpack to use it. } }
public override void OnDoubleClick(Mobile from) { if (m_IsRewardItem && !RewardSystem.CheckIsUsableBy(from, this, null)) { return; } if (!IsChildOf(from.Backpack)) { from.SendLocalizedMessage(1062334); // This item must be in your backpack to be used. } else { base.OnDoubleClick(from); } }
public override void OnDoubleClick(Mobile from) { if (m_IsRewardItem && !RewardSystem.CheckIsUsableBy(from, this, null)) { from.SendMessage("This does not belong to you!!"); return; } if (IsChildOf(from.Backpack)) { from.Target = new InternalTarget(this); } else { from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it. } }
public override void OnDoubleClick(Mobile from) { if (m_IsRewardItem && !RewardSystem.CheckIsUsableBy(from, this, null)) { return; } if (IsChildOf(from.Backpack)) { from.CloseGump(typeof(InternalGump)); from.SendGump(new InternalGump(this)); } else { from.SendLocalizedMessage(1042038); // You must have the object in your backpack to use it. } }
public override void GetProperties(ObjectPropertyList list) { base.GetProperties(list); if (Core.ML && this.m_IsRewardItem) { list.Add(RewardSystem.GetRewardYearLabel(this, new object[] { this.m_Type })); // X Year Veteran Reward } if (this.m_TurnedOn) { list.Add(502695); // turned on } else { list.Add(502696); // turned off } }