Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass wsID to xi.weaponskills.takeWeaponskillDamage() #4614

Merged
merged 1 commit into from
Oct 24, 2023

Conversation

kelppo
Copy link
Contributor

@kelppo kelppo commented Oct 17, 2023

I affirm:

  • I understand that if I do not agree to the following points by completing the checkboxes my PR will be ignored.
  • I understand I should leave resolving conversations to the LandSandBoat team so that reviewers won't miss what was said.
  • I have read and understood the Contributing Guide and the Code of Conduct.
  • I have tested my code and the things my code has changed since the last commit in the PR and will test after any later commits.

What does this pull request do?

Before this patch, PUP's Automaton's ranged attack and weaponskill shows 0 damage done because of an error in xi.weaponskills.takeWeaponskillDamage():

[map][error] luautils::onUseWeaponSkill: ./scripts/globals/weaponskills.lua:1012: bad argument #1 to 'lshift' (number expected, got nil)

Strangely enough, Atonement still correctly shows its damage even though it causes the same error, fix this by passing wsID to xi.weaponskills.takeWeaponskillDamage() as expected.

Steps to test these changes

  1. Unlock PUP (I had to complete the PUP unlock quest to get the Automaton to be spawned correctly)
  2. !addallattachments
  3. Equip Sharpshot head and body
  4. Deploy Automaton to an enemy
  5. Observe how its ranged attack and weaponskill shows 0 damage (target HP is still correctly diminished)
  6. Apply this patch
  7. Observe how its ranged attack and weaponskill now shows the damage done

Before this patch, PUP's Automaton's ranged attack and weaponskill shows 0
damage done because of an error in xi.weaponskills.takeWeaponskillDamage():

[map][error] luautils::onUseWeaponSkill: ./scripts/globals/weaponskills.lua:1012: bad argument LandSandBoat#1 to 'lshift' (number expected, got nil)

Strangely enough, Atonement still correctly shows its damage even though
it causes the same error, fix this by passing wsID to xi.weaponskills.takeWeaponskillDamage()
as expected.
Copy link
Contributor

@TeoTwawki TeoTwawki left a comment

Choose a reason for hiding this comment

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

same issue we saw with spirits within because these don't pass through the "do" functions.

@kelppo
Copy link
Contributor Author

kelppo commented Oct 17, 2023

same issue we saw with spirits within because these don't pass through the "do" functions.

I looked through all the call sites and these seem to be the only ones not passing wsID.

@claywar claywar added enhancement New feature request and removed enhancement New feature request labels Oct 24, 2023
@claywar claywar merged commit 15f1d32 into LandSandBoat:base Oct 24, 2023
14 checks passed
@kelppo kelppo deleted the automaton-fix branch October 25, 2023 00:38
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.

5 participants