Skip to content

Conversation

@karuko24
Copy link

Bobbers were expiring immediately after splash due to duration calculation producing values shorter than the 5-second click window.

  • Add minimum duration validation (5 seconds) in SpellEffects.cpp
  • Fix splash timing operator (> to >=) for correct window
  • Always reset respawn time to now+6s on splash for consistency

This ensures players always have 6 seconds to click after splash while preserving random splash timing (3-13 seconds).

Changes Proposed:

This PR proposes changes to:

  • Core (units, players, creatures, game systems).
  • Scripts (bosses, spell scripts, creature scripts).
  • Database (SAI, creatures, etc).

AI-assisted Pull Requests

Important

While the use of AI tools when preparing pull requests is not prohibited, contributors must clearly disclose when such tools have been used and specify the model involved.

Contributors are also expected to fully understand the changes they are submitting and must be able to explain and justify those changes when requested by maintainers.

  • AI tools (e.g. ChatGPT, Claude, or similar) were used entirely or partially in preparing this pull request. Please specify which tools were used, if any.

These changes were created with the help of Claude Code.

Issues Addressed:

  • Closes

SOURCE:

The changes have been validated through:

  • Live research (checked on live servers, e.g Classic WotLK, Retail, etc.)
  • Sniffs (remember to share them with the open source community!)
  • Video evidence, knowledge databases or other public sources (e.g forums, Wowhead, etc.)
  • The changes promoted by this pull request come partially or entirely from another project (cherry-pick). Cherry-picks must be committed using the proper --author tag in order to be accepted, thus crediting the original authors, unless otherwise unable to be found

Tests Performed:

This PR has been:

  • Tested in-game by the author.
  • Tested in-game by other community members/someone else other than the author/has been live on production servers.
  • This pull request requires further testing and may have edge cases to be tested.

How to Test the Changes:

  • This pull request can be tested by following the reproduction steps provided in the linked issue
  • This pull request requires further testing. Provide steps to test your changes. If it requires any specific setup e.g multiple players please specify it as well.
  1. Set fishing skill if needed: .setskill 356 1
  2. Give a basic Fishing Pole if needed: .additem 6256
  3. Try fishing, there should be no cases where the bobber expires too quickly

Known Issues and TODO List:

  • [ ]
  • [ ]

How to Test AzerothCore PRs

When a PR is ready to be tested, it will be marked as [WAITING TO BE TESTED].

You can help by testing PRs and writing your feedback here on the PR's page on GitHub. Follow the instructions here:

http://www.azerothcore.org/wiki/How-to-test-a-PR

REMEMBER: when testing a PR that changes something generic (i.e. a part of code that handles more than one specific thing), the tester should not only check that the PR does its job (e.g. fixing spell XXX) but especially check that the PR does not cause any regression (i.e. introducing new bugs).

For example: if a PR fixes spell X by changing a part of code that handles spells X, Y, and Z, we should not only test X, but we should test Y and Z as well.

Bobbers were expiring immediately after splash due to duration
calculation producing values shorter than the 5-second click window.

- Add minimum duration validation (5 seconds) in SpellEffects.cpp
- Fix splash timing operator (> to >=) for correct window
- Always reset respawn time to now+6s on splash for consistency

This ensures players always have 6 seconds to click after splash
while preserving random splash timing (3-13 seconds).
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adjusts fishing bobber timing so that bobbers no longer expire immediately after splashing and players consistently have a reasonable click window, while preserving the random splash timing.

Changes:

  • Clamp the fishing bobber gameobject duration in SpellEffects.cpp so it never falls below FISHING_BOBBER_READY_TIME (5s), and add a diagnostic warning when the calculated duration would be too short.
  • Change the fishing node splash trigger from > to >= in GameObject.cpp so the splash occurs correctly at the intended threshold.
  • On bobber splash, reset the gameobject respawn time to now + FISHING_BOBBER_READY_TIME + 1 seconds to give a consistent post-splash click window and log when the previous respawn time was too close.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/server/game/Spells/SpellEffects.cpp Ensures fishing bobber duration is not shorter than the defined ready time, preventing negative/immediate splash and adding logging when duration had to be clamped.
src/server/game/Entities/GameObject/GameObject.cpp Adjusts fishing node update logic to trigger splash at the correct time and to reset respawn time after splash, with additional logging about potentially problematic respawn times.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +534 to +536
if (oldRespawnTime <= now + FISHING_BOBBER_READY_TIME)
{
LOG_WARN("entities.gameobject", "Fishing bobber respawn time {} was too close to current time {} (only {}s remaining). Reset to {} seconds from now.",
Copy link

Copilot AI Jan 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This warning condition will be true for every normal fishing bobber splash, so the log will fire on every cast instead of only when there’s an abnormal respawn time. Because Update only enters this branch when GameTime::GetGameTime().count() >= m_respawnTime - FISHING_BOBBER_READY_TIME, it is always the case that oldRespawnTime <= now + FISHING_BOBBER_READY_TIME, making the check redundant and the message misleading. To avoid spamming WARN-level logs and misreporting normal behavior as problematic, consider tightening the condition (for example, logging only when oldRespawnTime <= now or when the remaining time is below a much smaller threshold) or removing the warning entirely if it’s no longer needed after the duration clamp in SpellEffects.cpp.

Suggested change
if (oldRespawnTime <= now + FISHING_BOBBER_READY_TIME)
{
LOG_WARN("entities.gameobject", "Fishing bobber respawn time {} was too close to current time {} (only {}s remaining). Reset to {} seconds from now.",
if (oldRespawnTime <= now)
{
LOG_WARN("entities.gameobject", "Fishing bobber respawn time {} was not in the future relative to current time {} ({}s remaining). Reset to {} seconds from now.",

Copilot uses AI. Check for mistakes.
@karuko24
Copy link
Author

After some more testing, there is still a rare case where the bobber expires even before the splashing animation is triggered

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CORE Related to the core file-cpp Used to trigger the matrix build Ready to be Reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants