Skip to content

Supply ProfileID to LUA scripts instead of SoldierID#539

Merged
Asdow merged 1 commit into
masterfrom
lua-find-soldier-fix
Oct 11, 2025
Merged

Supply ProfileID to LUA scripts instead of SoldierID#539
Asdow merged 1 commit into
masterfrom
lua-find-soldier-fix

Conversation

@Asdow
Copy link
Copy Markdown
Contributor

@Asdow Asdow commented Oct 11, 2025

Fixes broken NPC quests among probably other things.

Lua scripts expect to receive the same profileID value back from l_FindSolderByProfileID() that is supplied to it on the script side. This is a bit suboptimal as we constantly keep searching for the correct soldier on different calls to C++ side with the way it works now.

A better solution in the future would be to change the other l_ side functions that depend on l_FindSolderByProfileID() to use SoldierID instead so we would need to search for the merc only once. As an example, ActionStopMerc() / l_EVENT_StopMerc() that gets called in lua side HandleMaryArrival() function.

Lua scripts expect to receive the same profileID value back from l_FindSolderByProfileID() that is supplied to it on the script side. This is a bit suboptimal as we constantly keep searching for the correct soldier on different calls to C++ side with the way it works now.
@Asdow Asdow merged commit 584f6b4 into master Oct 11, 2025
9 checks passed
@Asdow Asdow deleted the lua-find-soldier-fix branch October 11, 2025 08:43
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.

1 participant