summaryrefslogtreecommitdiff
path: root/src/map/charcommand.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-03-06 14:37:44 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-03-06 14:37:44 +0000
commit7ada5312d478e4f56e8829779eb8c977877c99c2 (patch)
tree107125b7f161e95e1f520072d5a9ecc959dd0ce7 /src/map/charcommand.c
parent374f1656a59e2130ed4ee7bb7520ff5dc2bf6b82 (diff)
downloadhercules-7ada5312d478e4f56e8829779eb8c977877c99c2.tar.gz
hercules-7ada5312d478e4f56e8829779eb8c977877c99c2.tar.bz2
hercules-7ada5312d478e4f56e8829779eb8c977877c99c2.tar.xz
hercules-7ada5312d478e4f56e8829779eb8c977877c99c2.zip
- Fixed a debug message showing up on skill castend nodamage id when using a guild skill
- Fixed #save not working on maps not in the current map server. - Added battle config clear_skills_on_death to decide whether all ground-based skills should be removed when you die. Defaults to yes. - Changed Magic Crasher's element to -1 git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5472 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/charcommand.c')
-rw-r--r--src/map/charcommand.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/map/charcommand.c b/src/map/charcommand.c
index 51f6a7106..3f931e24a 100644
--- a/src/map/charcommand.c
+++ b/src/map/charcommand.c
@@ -614,15 +614,19 @@ int charcommand_save(
if ((pl_sd = map_nick2sd(character)) != NULL) {
if (pc_isGM(sd) >= pc_isGM(pl_sd)) { // you can change save point only to lower or same gm level
m = map_mapname2mapid(map_name);
- if (m < 0) {
+ if (m < 0 && !mapindex_name2id(map_name)) {
clif_displaymessage(fd, msg_table[1]); // Map not found.
return -1;
} else {
- if (map[m].flag.nowarpto && battle_config.any_warp_GM_min_level > pc_isGM(sd)) {
+ //FIXME: What do you do if the map is in another map server with the nowarpto flag?
+ if (m>=0 && map[m].flag.nosave && battle_config.any_warp_GM_min_level > pc_isGM(sd)) {
clif_displaymessage(fd, "You are not authorised to set this map as a save map.");
return -1;
}
- pc_setsavepoint(pl_sd, map[m].index, x, y);
+ if (m>=0)
+ pc_setsavepoint(pl_sd, map[m].index, x, y);
+ else
+ pc_setsavepoint(pl_sd, mapindex_name2id(map_name), x, y);
clif_displaymessage(fd, msg_table[57]); // Character's respawn point changed.
}
} else {