Skip to content

CanCatchFish ​

Usage ​

  • Return a non-null value to override default behavior

Example Autogenerated ​

csharp
private object CanCatchFish( BasePlayer ownerPlayer, BaseFishingRod instance, Item item )
{
    Puts( "CanCatchFish works!" );
    return null;
}

Location ​

  • BaseFishingRod::CatchProcessBudgeted()
csharp
//---
		CurrentState = CatchState.Caught;
		if (currentFishTarget != null)
		{
			Item item = ItemManager.Create(currentFishTarget, 1, 0uL, isServerSide: true, 0uL);
			item.SetItemOwnership(ownerPlayer, ItemOwnershipPhrases.Fishing);
			object obj = Interface.CallHook("CanCatchFish", ownerPlayer, this, item);
			if (obj is bool && !(bool)obj)
			{
				return;
			}
			object obj2 = Interface.CallHook("OnFishCatch", item, this, ownerPlayer);
//---

Released under the MIT License.