Skip to content

CanCastFishingRod

Usage

  • No return behavior

Example Autogenerated

csharp
private void CanCastFishingRod(  )
{
    Puts( "CanCastFishingRod works!" );
}

Location

  • BaseFishingRod::Server_RequestCast(BaseEntity.RPCMessage msg)
csharp
//---
	if (!EvaluateFishingPosition(ref pos, ownerPlayer, out var reason, out surfaceBody))
	{
		FailedCast(reason);
		return;
	}
	object obj = Interface.CallHook("CanCastFishingRod", ownerPlayer, this, currentLure, pos);
	if (!(obj is bool) || (bool)obj)
	{
		FishingBobber component = base.gameManager.CreateEntity(FishingBobberRef.resourcePath, base.transform.position + Vector3.up * 2.8f + ownerPlayer.eyes.BodyForward() * 1.8f, GetOwnerPlayer().ServerRotation).GetComponent<FishingBobber>();
		component.transform.forward = GetOwnerPlayer().eyes.BodyForward();
		component.Spawn();
//---

Released under the MIT License.