diff options
author | momacabu <momacabu@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-11-27 22:39:58 +0000 |
---|---|---|
committer | momacabu <momacabu@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-11-27 22:39:58 +0000 |
commit | 7a47bd731bc00b373c6105baad685bd8edeedbf6 (patch) | |
tree | 343a1447afbf304c61b7b11b407c170dcd929f31 /src/map/atcommand.c | |
parent | 09fff394aa3ea58393967f346adb7c2ca4bdc198 (diff) | |
download | hercules-7a47bd731bc00b373c6105baad685bd8edeedbf6.tar.gz hercules-7a47bd731bc00b373c6105baad685bd8edeedbf6.tar.bz2 hercules-7a47bd731bc00b373c6105baad685bd8edeedbf6.tar.xz hercules-7a47bd731bc00b373c6105baad685bd8edeedbf6.zip |
- Don't recall the player if it is on the same place as the recaller;
- Fixed part 2 of bugreport:4337, homunculus experience received now share with party members.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16973 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/atcommand.c')
-rw-r--r-- | src/map/atcommand.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 395cb1cba..86c14dd29 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -2876,6 +2876,9 @@ ACMD_FUNC(recall) clif_displaymessage(fd, msg_txt(1020)); // You are not authorized to warp this player from their map. return -1; } + if (pl_sd->bl.m == sd->bl.m && pl_sd->bl.x == sd->bl.x && pl_sd->bl.y == sd->bl.y) { + return -1; + } pc_setpos(pl_sd, sd->mapindex, sd->bl.x, sd->bl.y, CLR_RESPAWN); sprintf(atcmd_output, msg_txt(46), pl_sd->status.name); // %s recalled! clif_displaymessage(fd, atcmd_output); @@ -3549,6 +3552,8 @@ ACMD_FUNC(recallall) iter = mapit_getallusers(); for (pl_sd = (TBL_PC *)mapit_first(iter); mapit_exists(iter); pl_sd = (TBL_PC *)mapit_next(iter)) { if (sd->status.account_id != pl_sd->status.account_id && pc_get_group_level(sd) >= pc_get_group_level(pl_sd)) { + if (pl_sd->bl.m == sd->bl.m && pl_sd->bl.x == sd->bl.x && pl_sd->bl.y == sd->bl.y) + continue; // Don't waste time warping the character to the same place. if (pl_sd->bl.m >= 0 && map[pl_sd->bl.m].flag.nowarp && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) count++; else { @@ -3607,7 +3612,7 @@ ACMD_FUNC(guildrecall) iter = mapit_getallusers(); for (pl_sd = (TBL_PC *)mapit_first(iter); mapit_exists(iter); pl_sd = (TBL_PC *)mapit_next(iter)) { if (sd->status.account_id != pl_sd->status.account_id && pl_sd->status.guild_id == g->guild_id) { - if (pc_get_group_level(pl_sd) > pc_get_group_level(sd)) + if (pc_get_group_level(pl_sd) > pc_get_group_level(sd) || (pl_sd->bl.m == sd->bl.m && pl_sd->bl.x == sd->bl.x && pl_sd->bl.y == sd->bl.y)) continue; //Skip GMs greater than you. if (pl_sd->bl.m >= 0 && map[pl_sd->bl.m].flag.nowarp && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) count++; @@ -3663,7 +3668,7 @@ ACMD_FUNC(partyrecall) iter = mapit_getallusers(); for (pl_sd = (TBL_PC *)mapit_first(iter); mapit_exists(iter); pl_sd = (TBL_PC *)mapit_next(iter)) { if (sd->status.account_id != pl_sd->status.account_id && pl_sd->status.party_id == p->party.party_id) { - if (pc_get_group_level(pl_sd) > pc_get_group_level(sd)) + if (pc_get_group_level(pl_sd) > pc_get_group_level(sd) || (pl_sd->bl.m == sd->bl.m && pl_sd->bl.x == sd->bl.x && pl_sd->bl.y == sd->bl.y)) continue; //Skip GMs greater than you. if (pl_sd->bl.m >= 0 && map[pl_sd->bl.m].flag.nowarp && !pc_has_permission(sd, PC_PERM_WARP_ANYWHERE)) count++; |