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

[Enhancement] Rework of the imbuement system and conversion to c++ #164

Merged
merged 111 commits into from Dec 16, 2021

Conversation

dudantas
Copy link
Contributor

@dudantas dudantas commented Nov 23, 2021

Description

Thanks to @lgrossi for the reviews made and for helping to solve several problems.
Thanks to @hyresu for correcting some behaviors of the global and for the fix moving map deletion to outside the loop to avoid memory reference crash on Game::checkImbuements function

The system has been completely converted to c++
Fixed bugs and adapted the operation to be the same as global tibia
Possibility to imbue the equipped item
The imbuement of each item is now configured in items.xml in the following settings:

<attribute key="imbuementslot" value="3">
	<attribute key="elemental damage" value ="3"/>
	<attribute key="life leech" value ="3"/>
	<attribute key="mana leech" value ="3"/>
	<attribute key="critical hit" value ="3"/>
	<attribute key="elemental protection death" value ="3"/>
	<attribute key="elemental protection earth" value ="3"/>
	<attribute key="elemental protection fire" value ="3"/>
	<attribute key="elemental protection ice" value ="3"/>
	<attribute key="elemental protection energy" value ="3"/>
	<attribute key="elemental protection holy" value ="3"/>
	<attribute key="increase speed" value ="3"/>
	<attribute key="skillbost axe" value ="3"/>
	<attribute key="skillbost sword" value ="3"/>
	<attribute key="skillbost club" value ="3"/>
	<attribute key="skillbost shielding" value ="3"/>
	<attribute key="skillbost distance" value ="3"/>
	<attribute key="skillbost magic level" value ="3"/>
	<attribute key="increase capacity" value ="3"/>
</attribute>

Where the "imbuementslot" value is from 1 to 3 and the imbuement name values are also from 1 to 3, which is the imbuement level (basic, intricate or powerful), the name must be placed as above, as it is from the name that the value of each imbuement is called by ItemParse.

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

dudantas added a commit that referenced this pull request Dec 8, 2021
…optimized forgottenserver

NOTE: This commit request is necessary for the pull of imbuement rework and convert to c++: #164. If don't use this commit, the imbuement will crash!

ItemAttributes otimization, cherry-pick of saiyansking optimized forgottenserver, very thanks.
Co-authored by: @SaiyansKing.
dudantas added a commit that referenced this pull request Dec 8, 2021
…optimized forgottenserver

NOTE: This commit request is necessary for the pull of imbuement rework and convert to c++: #164. If don't use this commit, the imbuement will crash!

ItemAttributes otimization, cherry-pick of saiyansking optimized forgottenserver, very thanks.
Co-authored by: @SaiyansKing.
dudantas and others added 3 commits December 8, 2021 19:40
Duration of no agressive imbuements now decaying in protection zone
Fixed bug when the weapon has an elemental skill and is imbued, the imbuement doesn't work
Fixed bug to update imbuement attributes even when imbued in backpack, should only be done in slot
Clearing the imbuement will now remove the character's attribute.
Added imbuements "tiers" to items.xml

Co-Authored-By: hyresu <61813040+hyresu@users.noreply.github.com>
src/items/item.h Outdated Show resolved Hide resolved
@sonarcloud
Copy link

sonarcloud bot commented Dec 16, 2021

SonarCloud Quality Gate failed.    Quality Gate failed

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

0.0% 0.0% Coverage
8.4% 8.4% Duplication

@opentibiabr opentibiabr deleted a comment from github-actions bot Dec 16, 2021
@dudantas dudantas merged commit 3a68c29 into master Dec 16, 2021
@dudantas dudantas deleted the rework-imbuement-system branch December 16, 2021 01:02
@sebaz54321
Copy link

Hello, I have a problem with the weapon imbuing system, if the ibue weapon that has a dmg element, the weapon only deals physical damage

@dudantas
Copy link
Contributor Author

dudantas commented Jun 21, 2022

Hello, I have a problem with the weapon imbuing system, if the ibue weapon that has a dmg element, the weapon only deals physical damage

The pull request has already been closed and merged, if you are having a problem, be sure to test it with the most current server to ensure the problem is still occurring, if confirmed, you can open an issue reporting the error and we will correct.

luan pushed a commit that referenced this pull request Jul 11, 2023
…optimized forgottenserver

NOTE: This commit request is necessary for the pull of imbuement rework and convert to c++: #164. If don't use this commit, the imbuement will crash!

ItemAttributes otimization, cherry-pick of saiyansking optimized forgottenserver, very thanks.
Co-authored by: @SaiyansKing.
luan pushed a commit that referenced this pull request Jul 11, 2023
)

NOTE: The pull request of optimization and enhancement of ItemAttributes is needed for this commit: 59e8aaa. If don't use the "ItemAttributes enhancent" commit, the imbuement will crash!

Thanks to @lgrossi for the reviews made and for helping to solve several problems.
Thanks @Glatharth for provide the script for convert tables lua in items.xml: https://gist.github.com/dudantas/548fdbc3c521327c7d5320e27adba8fb

The system has been completely converted to c++
Fixed bugs and adapted the operation to be the same as global tibia
Possibility to imbue the equipped item
Added config.lua key for enable/disable the use of storages by the imbuement system (togleImbuementShrineStorage)

The imbuement of each item is now configured in items.xml in the following settings:
<attribute key="imbuementslot" value="3">
	<attribute key="elemental damage" value ="3"/>
	<attribute key="life leech" value ="3"/>
	<attribute key="mana leech" value ="3"/>
	<attribute key="critical hit" value ="3"/>
	<attribute key="elemental protection death" value ="3"/>
	<attribute key="elemental protection earth" value ="3"/>
	<attribute key="elemental protection fire" value ="3"/>
	<attribute key="elemental protection ice" value ="3"/>
	<attribute key="elemental protection energy" value ="3"/>
	<attribute key="elemental protection holy" value ="3"/>
	<attribute key="increase speed" value ="3"/>
	<attribute key="skillbost axe" value ="3"/>
	<attribute key="skillbost sword" value ="3"/>
	<attribute key="skillbost club" value ="3"/>
	<attribute key="skillbost shielding" value ="3"/>
	<attribute key="skillbost distance" value ="3"/>
	<attribute key="skillbost magic level" value ="3"/>
	<attribute key="increase capacity" value ="3"/>
</attribute>

Where the "imbuementslot" value is from 1 to 3 and the imbuement name values are also from 1 to 3, which is the imbuement level (basic, intricate or powerful), the name must be placed as above, as it is from the name that the value of each imbuement is called by ItemParse.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants