-
Notifications
You must be signed in to change notification settings - Fork 758
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
getpartymember
upgrade
#3305
getpartymember
upgrade
#3305
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello, and thank you for sharing! Please do update the scripts when you have time to do so (in a separate commit).
I think it looks good. Even if still in draft, I went alread and added some review comments. Please have a look at them.
Co-authored-by: Haru <[email protected]>
Co-authored-by: Haru <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Will you update the scripts (luckily there aren't a lot of calls to this command, I only see 16) and the script_commands.txt documentation?
5a38450
into
HerculesWS:getpartymember
Pull Request Prelude
Changes Proposed
Hi, I'd like to share my version of the
getpartymember
script command, similar togetunits
.This updated version no longer uses global temporary variables, which are prone to being overwritten, especially when multiple players call the function simultaneously. Instead, it requires the scripter to declare an array as an argument in the 3rd parameter of the command.
Additionally, this change introduces the following constants:
PT_MEMBER_NAME
,PT_MEMBER_CHARID
, andPT_MEMBER_ACCID
. The function now also returns the size of the party.Sample usage:
The existing script will be deprecated, but I will gladly update all current NPC scripts to use this new version if approved. I can apply similar updates to
getguildmember
andgetmobdrops
as well.I think this approach aligns more closely with Herc's style.
Issues addressed:
Wrong data when multiple players call the command.