public void OnTick() { m_Bobs++; PublicOverheadMessage(MessageType.Regular, 0, 1116364); //**bob** if (m_Owner != null && (!SpecialFishingNet.ValidateDeepWater(Map, X, Y) || m_Owner.Skills[SkillName.Fishing].Base >= 75.0)) { m_Owner.CheckSkill(SkillName.Fishing, 0, m_Owner.Skills[SkillName.Fishing].Cap); } if (!m_InUse) { EndTimer(null); return; } if (m_Bobs * 5 > Utility.Random(100)) { OnTrapLost(); return; } bool rare = true; double bump = m_Bobs / 100.0; Type type = FishInfo.GetSpecialItem(m_Owner, this, Location, bump, this is LavaLobsterTrap); if (type != null) { Item item = Loot.Construct(type); DropItem(item); if (item is RareCrabAndLobster && rare) { RareCrabAndLobster fish = (RareCrabAndLobster)item; fish.Fisher = m_Owner; fish.DateCaught = DateTime.UtcNow; fish.Weight = Utility.RandomMinMax(10, 200); fish.Stackable = false; } if (m_Owner != null) { m_Owner.SendMessage("It looks like you caught something!"); } CheckBait(); } else if (Utility.RandomBool()) { Item item; if (Utility.RandomBool()) { item = new Crab(); } else { item = new Lobster(); } if (m_Owner != null) { m_Owner.SendMessage("It looks like you caught something!"); } DropItem(item); CheckBait(); } }
public void OnTick() { m_Bobs++; PublicOverheadMessage(MessageType.Regular, 0, 1116364); //**bob** if (!m_InUse) { EndTimer(null); return; } if (m_Bobs * 5 > Utility.Random(100)) { OnTrapLost(); return; } bool rare = true; double bump = (double)m_Bobs / 100.0; Type type = FishInfo.GetSpecialItem(m_Owner, this, this.Location, bump, this is LavaLobsterTrap); if (type != null) { Item item = Loot.Construct(type); DropItem(item); if (item is RareCrabAndLobster && rare) { RareCrabAndLobster fish = (RareCrabAndLobster)item; fish.Fisher = m_Owner; fish.DateCaught = DateTime.UtcNow; fish.Weight = Utility.RandomMinMax(10, 200); fish.Stackable = false; } if (m_Owner != null) m_Owner.SendMessage("It looks like you caught something!"); CheckBait(); } else if (Utility.RandomBool()) { Item item; if (Utility.RandomBool()) item = new Crab(); else item = new Lobster(); if (m_Owner != null) m_Owner.SendMessage("It looks like you caught something!"); DropItem(item); CheckBait(); } }