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

fix: quest system set container items attributes #948

Merged
merged 5 commits into from
Mar 23, 2023

Conversation

majestyotbr
Copy link
Contributor

@majestyotbr majestyotbr commented Mar 22, 2023

Description

The quest system added exactly the item that was inside the chest, however, if this item had an actionid, like a key, the player receive the key with actionid 0000. if there is a bag or backpack inside the chest, and if there are items inside the bag, the items are not added to the player.
This pull request fixes the issue and the chest give the key with actionid or a bag/backpack with items.
Fix by @anderkrox

Behaviour

Actual

Chest reward key with actionid 0000.
Chest reward item bag or backpack with items are not added to the player.

Expected

Chest reward key with actionid.
Chest reward item inside a bag or backpack.

Fixes

#941
#918

Type of change

Please delete options that are not relevant.

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

How Has This Been Tested

  • Test A
  • Open a chest with reward key e receive a key with the actionid.
  • Open a chest with reward bag or backpack with items and receive the reward.

Test Configuration:

  • Server Version: 12.91
  • Client: 12.91
  • 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

@majestyotbr majestyotbr changed the title fix: chest reward key fix: quest system Mar 22, 2023
@dudantas dudantas changed the title fix: quest system fix: quest system set attributes Mar 22, 2023
@dudantas dudantas changed the title fix: quest system set attributes fix: quest system set container items attributes Mar 22, 2023
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@dudantas dudantas merged commit aab24c6 into opentibiabr:main Mar 23, 2023
@majestyotbr majestyotbr deleted the fix-chest-reward-key branch March 23, 2023 01:26
PeachieDude added a commit to PeachieDude/canary that referenced this pull request Mar 23, 2023
A discord user, Aerwix, found that plain rates for magic/skills from config werent working, after changing the rates the output was the same no matter what.

i acme to look and found out that it were using staged configuration even with the rateUseStages set to false.

After some tests using training/exercise weapons against a dummy and using weapons against monsters, even magic, twas confirmed that setting rateUseStages were using staged.

Found out that there was no verification for skills and magic.

did change the code and we ran more tests, got consistent results and got it working as intended.

Now when you set rateUseStages = false it will use the rate set in config.lua

Now when you set rateUseStages = true it will use the stages from stages.lua

All tests were made using a brand-new char for every test, just to be sure.
Tests made using training/exercise weapons against dummy with rateUseStages false and true, got expected results

Tests made using weapons against monsters with rateUseStages false and true, got expected results

Tests made using spells with rateUseStages false and true, got expected result

IMHO the code has space for improvement, i didnt like the if/else but twas what i got working, tried other way but wasnt able to make work w/o getting an error.

Feel free to discard the PR and bring a better version if so.

Missing only 2 commits by the time this pr is being proposed and the said prs wont affect the change. 

opentibiabr#944
opentibiabr#948
@PeachieDude PeachieDude mentioned this pull request Mar 23, 2023
8 tasks
luan pushed a commit that referenced this pull request Jul 11, 2023
The quest system added exactly the item that was inside the chest, however, if this item had an actionid, like a key, the player receives the key with actionid 0000. If there is a bag or backpack inside the chest, and if there are items inside the bag, the items are not added to the player.
This fixes the issue and the chest give the key with actionid or a bag/backpack with items.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants