[PR #472] Fix call to NpcAggressive.isAggressive #14108

Closed
opened 2026-06-07 12:23:06 +00:00 by Dark98 · 0 comments
Owner

Original Pull Request: https://github.com/2006-Scape/2006Scape/pull/472

State: closed
Merged: Yes


Potential aggression regression :)

#416 appears to have overzealously changed NpcAggressive.isAggressive(i) to NpcAggressive.isAggressive(npcs[i].npcType).
This should not by needed because i within NpcAggressive.isAggressive is always passed into NpcHandler.npcs[i]
https://github.com/2006rebotted/2006rebotted/blob/12951be95407d172b91d06ff57e8376c8d71fb58/2006Redone%20Server/src/main/java/com/rebotted/game/content/combat/npcs/NpcAggressive.java#L22-L24
https://github.com/2006rebotted/2006rebotted/blob/12951be95407d172b91d06ff57e8376c8d71fb58/2006Redone%20Server/src/main/java/com/rebotted/game/content/minigames/FightCaves.java#L396-L397

As a sidenote, I noticed the issue within the Lumbridge cow field where some of the cows were aggresive on a local server current with master.

I wasn't sure if this resolves the need for try {} catch in NpcAggressive.isAggressive but suspect it may.

**Original Pull Request:** https://github.com/2006-Scape/2006Scape/pull/472 **State:** closed **Merged:** Yes --- Potential aggression regression :) #416 appears to have overzealously changed `NpcAggressive.isAggressive(i)` to `NpcAggressive.isAggressive(npcs[i].npcType)`. This should not by needed because `i` within `NpcAggressive.isAggressive` is always passed into `NpcHandler.npcs[i]` https://github.com/2006rebotted/2006rebotted/blob/12951be95407d172b91d06ff57e8376c8d71fb58/2006Redone%20Server/src/main/java/com/rebotted/game/content/combat/npcs/NpcAggressive.java#L22-L24 https://github.com/2006rebotted/2006rebotted/blob/12951be95407d172b91d06ff57e8376c8d71fb58/2006Redone%20Server/src/main/java/com/rebotted/game/content/minigames/FightCaves.java#L396-L397 As a sidenote, I noticed the issue within the Lumbridge cow field where some of the cows were aggresive on a local server current with master. I wasn't sure if this resolves the need for `try {} catch` in `NpcAggressive.isAggressive` but suspect it may.
Dark98 added the pull-request label 2026-06-07 12:23:06 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: 2006-Scape/2006Scape#14108