public void InstallLine(FishingLine fishingLine) { if (ItemCanBeInstalled) { if (CurrentRod.CurrentLine != null) { RaiseMessage(string.Format("{0} returned to Backpack", CurrentRod.CurrentLine.Name)); CurrentPlayer.AddItemToBackpack(CurrentRod.CurrentLine); } FishingLine line = fishingLine.BreakLine(50); if (fishingLine.Length == 0) { CurrentPlayer.RemoveItemFromBackpack(fishingLine); } CurrentRod.InstallLine(line); RaiseMessage(string.Format("You install {0}m of {1} on {2}", line.Length, line.OriginalName, CurrentRod.Name)); } else { RaiseMessage("Select rod first"); } }
public void InstallReel(Reel reel) { if (ItemCanBeInstalled) { if (CurrentRod.CurrentReel != null) { RaiseMessage(string.Format("{0} returned to Backpack", CurrentRod.CurrentReel.Name)); CurrentPlayer.AddItemToBackpack(CurrentRod.CurrentReel); } CurrentPlayer.RemoveItemFromBackpack(reel); CurrentRod.InstallReel(reel); RaiseMessage(string.Format("{0} installed on {1}", reel.Name, CurrentRod.Name)); } else { RaiseMessage("Select rod first"); } }