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

Added the vocation base id and the functions to manage it instead of the "client id" #11

Merged
merged 2 commits into from
Aug 30, 2021

Conversation

beats-dh
Copy link
Collaborator

New lua function: vocation:getBaseId()
New c++ function vocation->getBaseId()

The idea of the base id is that the "promotions" have the same id as the base vocation, so that it is not necessary to have repetitions of ifs and if a new vocation is added, it will also not be necessary to register them in the scripts that call the vocations , because the id is the same. This function should only be used in scripts that will be used by all base vocations.

For example, if a spell can be buy by the "knight" or "elite knight", then you can use vocation:getBaseId()
It is always preferable to use vocation:getBaseId() when possible.

New lua function: vocation:getBaseId()
New c++ function vocation->getBaseId()

The idea of the base id is that the "promotions" have the same id as the base vocation, so that it is not necessary to have repetitions of ifs and if a new vocation is added, it will also not be necessary to register them in the scripts that call the vocations , because the id is the same. This function should only be used in scripts that will be used by all base vocations.

For example, if a spell can be buy by the "knight" or "elite knight", then you can use vocation:getBaseId()
It is always preferable to use vocation:getBaseId() when possible.
@sonarcloud
Copy link

sonarcloud bot commented Aug 25, 2021

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 changed the title added the vocation base id and the functions to manage it instead of the "client id" Added the vocation base id and the functions to manage it instead of the "client id" Aug 30, 2021
@dudantas dudantas merged commit 8c53f1d into opentibiabr:master Aug 30, 2021
@Methemia Methemia mentioned this pull request Oct 15, 2021
4 tasks
@QuebradaZN QuebradaZN mentioned this pull request Dec 27, 2022
10 tasks
luan pushed a commit that referenced this pull request Jul 11, 2023
This change deals with the LuaScriptInterface decouple, being that totally organized and broken into files for each class. Totaling 105 new files properly organized.

There are also some bug fixes and file indentation.

Thanks and credits to @lgrossi and @foot, who helped with logic and how to decouple and fix all bugs.

Co-authored-by: lgrossi <lucas.ggrossi@gmail.com>
Co-authored-by: Renato Foot <costallat@hotmail.com>
luan pushed a commit that referenced this pull request Jul 11, 2023
…the "client id" (#11)

New lua function: vocation:getBaseId()
New c++ function vocation->getBaseId()

The idea of the base id is that the "promotions" have the same id as the base vocation, so that it is not necessary to have repetitions of ifs and if a new vocation is added, it will also not be necessary to register them in the scripts that call the vocations , because the id is the same. This function should only be used in scripts that will be used by all base vocations.

For example, if a spell can be buy by the "knight" or "elite knight", then you can use vocation:getBaseId()
It is always preferable to use vocation:getBaseId() when possible.
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.

2 participants