Skip to content

fix: correct global variable reference in loot generation#2935

Closed
omarcopires wants to merge 3 commits intoopentibiabr:mainfrom
omarcopires:fix-loot
Closed

fix: correct global variable reference in loot generation#2935
omarcopires wants to merge 3 commits intoopentibiabr:mainfrom
omarcopires:fix-loot

Conversation

@omarcopires
Copy link
Copy Markdown

Description

Fixes the incorrect reference to a global variable (SoulWarQuest.bagYouDesireItemId) in the loot generation function, replacing it with the correct constant (BAG_YOU_DESIRE).

Fix

Interface: Scripts Interface
Script ID: E:\Repositorios Git\baiak-yurots\data/scripts\eventcallbacks\monster\ondroploot__base.lua:callback
Error Description: data/libs/functions/monstertype.lua:31: attempt to index global 'SoulWarQuest' (a nil value)
stack traceback:
        [C]: in function '__index'
        data/libs/functions/monstertype.lua:31: in function 'generateLootRoll'
        ...data/scripts\eventcallbacks\monster\ondroploot__base.lua:25: in function <...data/scripts\eventcallbacks\monster\ondroploot__base.lua:7>

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

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

@sonarqubecloud
Copy link
Copy Markdown

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant