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
Expanded bg_get_data script command #2179
Conversation
* Now able accept type parameter of 1 to list account IDs of battleground members. Originally implemented by @AnnieRuru at https://rathena.org/board/topic/72571-b/
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.
Please adjust it and then merge it to master.
doc/script_commands.txt
Outdated
@@ -8863,6 +8863,8 @@ Example: | |||
Retrieves data related to given Battle Group. Type can be one of the following: | |||
|
|||
0 - Amount of players currently belonging to the group. | |||
1 - Store GID of players in <Battle Group> in a temporary global array $@arenamembers |
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.
Adjust the indentation to match the 0 parameter please. Either both tabs or both blanks.
src/map/script.c
Outdated
case 1: | ||
for (i = 0; bg->members[i].sd != NULL; i++) | ||
mapreg_setreg(reference_uid(add_str("$@arenamembers"), i), bg->members[i].sd->bl.id); | ||
mapreg_setreg(reference_uid(add_str("$@arenamemberscount"), i), i); |
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.
Like this it will create an array for arenamembercount and will put the actual count value at index i.
See getpartymember: mapreg_setreg(add_str("$@partymembercount"),j);
* Corrected some documentation style. * Adjusted $@partymembercount to be stored as an integer and not an array. Thanks to @Lemongrass3110!
Addressed Issue(s): None
Server Mode: Both
Description of Pull Request:
Allows GID of players in certain battleground to be retrieved via the script engine by expanding
bg_get_data
script command.