public virtual bool AddFish(Mobile from, BaseFish fish) { if (fish == null) { return(false); } if (IsFull || m_LiveCreatures >= MaxLiveCreatures || fish.Dead) { if (from != null) { from.SendLocalizedMessage(1073633); // The aquarium can not hold the creature. } return(false); } AddItem(fish); fish.StopTimer(); m_LiveCreatures += 1; if (from != null) { from.SendLocalizedMessage(1073632, string.Format("#{0}", fish.LabelNumber)); // You add the following creature to your aquarium: ~1_FISH~ } InvalidateProperties(); return(true); }
protected override void FinishEffect(Point3D p, Map map, Mobile from) { if (from.Skills.Fishing.Value < 10) { from.SendLocalizedMessage(1074487); // The creatures are too quick for you! } else { BaseFish fish = this.GiveFish(from); FishBowl bowl = Aquarium.GetEmptyBowl(from); if (bowl != null) { fish.StopTimer(); bowl.AddItem(fish); from.SendLocalizedMessage(1074489); // A live creature jumps into the fish bowl in your pack! this.Delete(); return; } else { if (from.PlaceInBackpack(fish)) { from.PlaySound(0x5A2); from.SendLocalizedMessage(1074490); // A live creature flops around in your pack before running out of air. fish.Kill(); this.Delete(); return; } else { fish.Delete(); from.SendLocalizedMessage(1074488); // You could not hold the creature. } } } this.InUse = false; this.Movable = true; if (!from.PlaceInBackpack(this)) { if (from.Map == null || from.Map == Map.Internal) { this.Delete(); } else { this.MoveToWorld(from.Location, from.Map); } } }
private void FinishEffect(Point3D p) { BaseFish fish = GiveFish(m_Player.Skills.Fishing.Base / 100); if (fish != null) { Item[] items = m_Player.Backpack.FindItemsByType(typeof(FishBowl)); foreach (FishBowl bowl in items) { if (!bowl.Deleted && bowl.Empty) { bowl.AddItem(fish); bowl.InvalidateProperties(); m_Player.SendLocalizedMessage(1074489); // A live creature jumps into the fish bowl in your pack! fish.StopTimer(); Delete(); return; } } if (!m_Player.PlaceInBackpack(fish)) { m_Player.SendLocalizedMessage(500720); // You don't have enough room in your backpack! fish.MoveToWorld(m_Player.Location, m_Player.Map); } else { m_Player.SendLocalizedMessage(1074490); // A live creature flops around in your pack before running out of air. } fish.Kill(); Delete(); } else { Movable = true; if (!m_Player.PlaceInBackpack(this)) { MoveToWorld(m_Player.Location, m_Player.Map); } m_Player.SendLocalizedMessage(1074487); // The creatures are too quick for you! } }
public virtual bool AddFish(Mobile from, BaseFish fish) { if (fish == null) { return(false); } if ((m_LiveCreatures == MaxLiveCreatures && !IsFull) || fish.Dead) { from.SendLocalizedMessage(1073633); // The aquarium can not hold the creature. return(false); } AddItem(fish); fish.StopTimer(); m_LiveCreatures += 1; from.SendLocalizedMessage(1073632, "#" + fish.LabelNumber); // You add the following creature to your aquarium: ~1_FISH~ return(true); }
public virtual bool AddFish(Mobile from, BaseFish fish) { if (fish == null) return false; if (this.IsFull || this.m_LiveCreatures >= this.MaxLiveCreatures || fish.Dead) { if (from != null) from.SendLocalizedMessage(1073633); // The aquarium can not hold the creature. return false; } this.AddItem(fish); fish.StopTimer(); this.m_LiveCreatures += 1; if (from != null) from.SendLocalizedMessage(1073632, String.Format("#{0}", fish.LabelNumber)); // You add the following creature to your aquarium: ~1_FISH~ this.InvalidateProperties(); return true; }
public virtual bool AddFish( Mobile from, BaseFish fish ) { if ( fish == null ) return false; if ( ( m_LiveCreatures == MaxLiveCreatures && !IsFull ) || fish.Dead ) { from.SendLocalizedMessage( 1073633 ); // The aquarium can not hold the creature. return false; } AddItem( fish ); fish.StopTimer(); m_LiveCreatures += 1; from.SendLocalizedMessage( 1073632, "#" + fish.LabelNumber ); // You add the following creature to your aquarium: ~1_FISH~ return true; }