Skip to content

Commit

Permalink
Add missing documentation for disable battleground respawn
Browse files Browse the repository at this point in the history
- fix a minor bug that bg_create_team should return -1, as mentioned in doc/script_commands.txt
  • Loading branch information
AnnieRuru committed Feb 26, 2019
1 parent d496d89 commit 76a336e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions doc/script_commands.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9616,6 +9616,11 @@ is run when they relog.
<On Death Event> refers to an NPC label that attaches to the character and
is run when they die. Can be "" for empty.

If "-" is supplied for <mapname>, this will remove the 1 second automatic
respawn on the battleground map. This allows for better manipulation of
<On Death Event>. The player will have to be warped to desired location
at the end of <On Death Event>.

Unlike the prior command, the latter will attach a GROUP in a waiting room
to the battleground, and sets the array $@arenamembers[0] where 0 holds
the IDs of the first group, and 1 holds the IDs of the second.
Expand Down Expand Up @@ -9747,6 +9752,8 @@ mapflag%TAB%<map_name>%TAB%battleground%TAB%2

This command will create a new BG Team.
When player dies, they will be respawned map_name,X,Y as mentioned.
If "-" is supplied for the map name, this will remove the 1 second automatic
respawn on the battleground map.

Command will return -1 if BG Creation is failed,
else it will return the BG ID(Also known as TeamID).
Expand Down
2 changes: 1 addition & 1 deletion src/map/script.c
Original file line number Diff line number Diff line change
Expand Up @@ -23687,7 +23687,7 @@ static BUILDIN(bg_create_team)
if( strcmp(map_name,"-") != 0 ) {
map_index = script->mapindexname2id(st,map_name);
if( map_index == 0 ) { // Invalid Map
script_pushint(st,0);
script_pushint(st, -1);
return true;
}
}
Expand Down

0 comments on commit 76a336e

Please sign in to comment.