[C++] [lua] [sql] Migrate Experience Points Calculations to Lua#10865
[C++] [lua] [sql] Migrate Experience Points Calculations to Lua#10865Skold177 wants to merge 1 commit into
Conversation
|
✨ Hello and thanks for the PR! ✨ 🤖: This is a friendly automated reminder that the maintainers won't look at your PR until you've properly completed all of the checkboxes in the pre-filled template. |
78ef5ad to
b958b8d
Compare
1f4a34a to
a2d6ae3
Compare
|
This needs a rebase now |
| const sol::object resultObj = result; | ||
| if (resultObj.get_type() != sol::type::table) | ||
| { | ||
| return; | ||
| } | ||
|
|
||
| exp = charutils::AddExpBonus(PMember, exp); | ||
| const sol::table calcResult = resultObj; |
There was a problem hiding this comment.
Was it actually necessary to redefine result as resultObj?
There was a problem hiding this comment.
Was it actually necessary to redefine
resultasresultObj?
no, you're right, we can just use it directly here , rebasing now as well
Migrates Experience Points Calculations to LUA and retires many experience points settings. Adds support for Sanction.
a2d6ae3 to
60120e7
Compare
| uint32 x = 0; | ||
| FOR_DB_MULTIPLE_RESULTS(rset) | ||
| // Base experience by level difference, from scripts/globals/experience_points.lua. | ||
| sol::table baseExpTable = lua["xi"]["experiencePoints"]["baseExpTable"]; |
There was a problem hiding this comment.
These bindings probably belong in in luautils, so we aren't reaching directly into the Lua state from far-flung areas of the code that don't need to be.
There was a problem hiding this comment.
These bindings probably belong in in luautils, so we aren't reaching directly into the Lua state from far-flung areas of the code that don't need to be.
oh i see what you're saying, i'll move them over
| "chainNumber", PMember->expChain.chainNumber, | ||
| "chainActive", chainActive); | ||
|
|
||
| const auto result = calculate(CLuaBaseEntity(PMember), CLuaBaseEntity(PMob), data); |
8b072be to
60120e7
Compare

I affirm:
What does this pull request do?
Testing Schedule - Complete! Tested and made sure everything was working on my local with debug prints using multiple clients.
[x] Party Share & Alliance Penalty
[x] Experience Points Chains (Brackets & Timers)
[x] Dedication Effects (EXP Rings)
[x] Corsairs Roll
[x] Signet Bonuses
[x] Sanction Bonuses
[x] RoV Bonuses
Steps to test these changes
Same as above!