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

Expanded bg_get_data script command #2179

Merged
merged 3 commits into from Jun 30, 2017
Merged

Conversation

secretdataz
Copy link
Member

@secretdataz secretdataz commented May 31, 2017

  • 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.

* 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/
Copy link
Member

@Lemongrass3110 Lemongrass3110 left a 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.

@@ -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
Copy link
Member

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);
Copy link
Member

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!
@aleos89 aleos89 merged commit fa24b21 into master Jun 30, 2017
@aleos89 aleos89 deleted the feature/bg_get_data_expansion branch June 30, 2017 18:06
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.

None yet

3 participants