public bool Roll(Mobile from, Type bait, bool enhanced, double bump) { var baitStr = GetBaitStrength(bait, from, enhanced); double baseChance = MagicalFishFinder.HasSchool(from) ? BaseChance * 10 : BaseChance; return((baseChance + bump) * baitStr > Utility.RandomDouble()); }
public static bool HasSchool(Mobile m) { if (m == null || !m.Alive || m.Backpack == null) { return(false); } MagicalFishFinder finder = m.Backpack.FindItemByType <MagicalFishFinder>(); if (finder != null && Schools.ContainsKey(m.Map)) { SchoolEntry entry = Schools[m.Map].FirstOrDefault(e => m.InRange(e.Location, SchoolRange)); if (entry != null) { entry.OnFish(); return(true); } } return(false); }
public bool Roll(Mobile from, double baitStr, double bump) { double baseChance = MagicalFishFinder.HasSchool(from) ? BaseChance * 10 : BaseChance; return((baseChance + bump) * baitStr > Utility.RandomDouble()); }
public void Expire() { MagicalFishFinder.ExpireSchool(Map, this); }