Skip to content
GitLab
    • Explore Projects Groups Snippets
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • 2 2006Scape
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 26
    • Issues 26
    • List
    • Boards
    • Service Desk
    • Milestones
    • Requirements
  • Merge requests 4
    • Merge requests 4
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Dark98
  • 2006Scape
  • Merge requests
  • !493

Fix Broken Game Sounds on Large ID NPCS

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Dark98 requested to merge gh-fdfcb80b/493/unknown/refs/pull/493/head into master 4 years ago
  • Overview 0
  • Commits 1
  • Pipelines 0
  • Changes 1
  • Replace get NPC name associate array method to indexed array method

The current code uses a GetNpcName method which incorrectly assumes that the NPC List is an associate array where the ID is the index. This is not the case as the index is actually incremental.

While I would have rather changed the NPC List to be an associate array, as in the future writing code like this is not scalable for thousands of people on each server with thousands of NPC's, however that would require a rewrite of other methods too.

I found this issue when I attempted to kill Giant Mole which has an ID of 3340 but an array index of 2773. There is no npc with the index of 3340 so it crashed the server.

image

Activity

Please register or sign in to reply
0 Assignees
None
Assign to
0 Reviewers
Request review from
Labels
0
None
0
None
    Assign labels
  • Manage project labels

Milestone
No milestone
None
None
Time tracking
Lock merge request
Unlocked
participants
Reference:
Source branch: gh-fdfcb80b/493/unknown/refs/pull/493/head

Menu

Explore Projects Groups Snippets