* Fixed script command 'warpguild' looking for an attached player even when it is not needed (bugreport:4941, since r2674, related r14840).

- Documented special map names recognized by the command.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14841 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
ai4rei 2011-05-30 19:24:02 +00:00
parent ce70d39dbc
commit 9e4d7a1beb
3 changed files with 18 additions and 8 deletions

View File

@ -1,6 +1,8 @@
Date Added
2011/05/30
* Fixed script command 'warpguild' looking for an attached player even when it is not needed (bugreport:4941, since r2674, related r14840). [Ai4rei]
- Documented special map names recognized by the command.
* Fixed script command 'warpparty' looking for an attached player even when it is not needed (bugreport:4359, since r14311, related r2674 and r5592). [Ai4rei]
- This also resolves an issue, where the command fails when the attached player is on a map that has noreturn or nowarpto mapflags set.
2011/05/29

View File

@ -4,7 +4,7 @@
//= A reference manual for the eAthena scripting language.
//= Commands are sorted depending on their functionality.
//===== Version ===========================================
//= 3.43.20110529
//= 3.44.20110530
//=========================================================
//= 1.0 - First release, filled will as much info as I could
//= remember or figure out, most likely there are errors,
@ -177,6 +177,8 @@
//= 3.43.20110529
//= Updated 'npcshopitem', 'npcshopadditem' and 'npcshopdelitem' to support
//= cashshops as well. [Ai4rei]
//= 3.44.20110530
//= Documented special map names recognized by 'warpguild'. [Ai4rei]
//=========================================================
This document is a reference manual for all the scripting commands and functions
@ -3692,6 +3694,13 @@ warpchar "prontera",150,100,20000001;
Warps a guild to specified map and coordinate given the guild id, which you can get with
getcharid(2). You can also request another guild id given the member's name with getcharid(2,<player_name>).
You can use the following "map names" for special warping behavior:
Random: All party members are randomly warped in their current map (as if they
all used a fly wing)
SavePointAll: All party members are warped to their respective save point.
SavePoint: All party members are warped to the save point of the currently
attached player (will fail if there's no player attached).
Example:
warpguild "prontera",x,y,Guild_ID;

View File

@ -4641,7 +4641,7 @@ BUILDIN_FUNC(warpparty)
*------------------------------------------*/
BUILDIN_FUNC(warpguild)
{
TBL_PC *sd;
TBL_PC *sd = NULL;
TBL_PC *pl_sd;
struct guild* g;
struct s_mapiterator* iter;
@ -4652,21 +4652,20 @@ BUILDIN_FUNC(warpguild)
int y = script_getnum(st,4);
int gid = script_getnum(st,5);
sd=script_rid2sd(st);
if( sd == NULL )
return 0;
g = guild_search(gid);
if( g == NULL )
return 0;
if(map[sd->bl.m].flag.noreturn || map[sd->bl.m].flag.nowarpto)
return 0;
type = ( strcmp(str,"Random")==0 ) ? 0
: ( strcmp(str,"SavePointAll")==0 ) ? 1
: ( strcmp(str,"SavePoint")==0 ) ? 2
: 3;
if( type == 2 && ( sd = script_rid2sd(st) ) == NULL )
{// "SavePoint" uses save point of the currently attached player
return 0;
}
iter = mapit_getallusers();
for( pl_sd = (TBL_PC*)mapit_first(iter); mapit_exists(iter); pl_sd = (TBL_PC*)mapit_next(iter) )
{