Skip to content

Conversation

@EGSilver
Copy link

@EGSilver EGSilver commented Sep 28, 2025

Description

Fixes a bug where boss kill counts for entries keyed at index 0 were never recorded.
In Lua, ipairs iterates only over consecutive integer keys starting from 1. Our taskBoss map includes a valid boss at key 0 ("the snapper"), so the loop skipped it.

Behaviour

Actual

When killing The Snapper, no storage is updated and the kill does not count towards the task.

Expected

When killing The Snapper, the corresponding storage is set (from 0 to 1) and the kill counts towards the task.

Fixes #issuenumber

#3708

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested

image

Test Configuration:

  • Server Version: canary 3.2.0
  • Client: mehah
  • Operating System: Windows

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I checked the PR checks reports
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works

@EGSilver EGSilver changed the title fix: #3708 - Killing in the name of - The Snapper fix: Killing in the name of - The Snapper Sep 28, 2025
@EGSilver EGSilver changed the title fix: Killing in the name of - The Snapper fix: killing in the name of - The Snapper Sep 28, 2025
Copilot AI review requested due to automatic review settings October 11, 2025 02:06
Copy link

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

Fixes a bug where boss kill counts for "The Snapper" (index 0 in the taskBoss map) were never recorded due to using ipairs instead of pairs for iteration. In Lua, ipairs only iterates over consecutive integer keys starting from 1, causing the boss at index 0 to be skipped.

  • Changed iteration from ipairs to pairs to include all boss entries
  • Ensures "The Snapper" kill counts are properly recorded in player storage

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@sonarqubecloud
Copy link

@github-actions
Copy link
Contributor

This PR is stale because it has been open 45 days with no activity.

@github-actions github-actions bot added the Stale No activity label Nov 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Stale No activity

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant