summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog-Trunk.txt2
-rw-r--r--src/map/chrif.c4
-rw-r--r--src/map/clif.c2
-rw-r--r--src/map/skill.c7
4 files changed, 11 insertions, 4 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 9fdbe6d02..7efb31fdc 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -4,6 +4,8 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2006/07/07
+ * Added a check to free a character from memory when changing map servers.
+ [Skotlex]
* Okay, added a chrif_save_ack packet to the char-server so now the map
server will know once a character was "final saved", and only then the
character will be removed from memory. On char-server reconnection, all
diff --git a/src/map/chrif.c b/src/map/chrif.c
index 0e11c6741..9e98b5eb9 100644
--- a/src/map/chrif.c
+++ b/src/map/chrif.c
@@ -382,6 +382,10 @@ int chrif_changemapserverack(int fd)
return 0;
}
clif_changemapserver(sd, (char*)mapindex_id2name(RFIFOW(fd,18)), RFIFOW(fd,20), RFIFOW(fd,22), RFIFOL(fd,24), RFIFOW(fd,28));
+
+ //Player has been saved already, remove him from memory. [Skotlex]
+ map_quit(sd);
+ map_quit_ack(sd);
return 0;
}
diff --git a/src/map/clif.c b/src/map/clif.c
index 69dabc00e..e0ddc6504 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -1774,7 +1774,7 @@ int clif_changemapserver(struct map_session_data *sd, char *mapname, int x, int
WFIFOL(fd,22) = ip;
WFIFOW(fd,26) = port;
WFIFOSET(fd, packet_len_table[0x92]);
-
+
return 0;
}
diff --git a/src/map/skill.c b/src/map/skill.c
index 5c020b76d..fea16d55f 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -3545,9 +3545,10 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
pc_delitem(sd, i, skill_db[skillid].amount[0], 0);
}
// 100% success rate at lv4 & 5, but lasts longer at lv5
- i = skilllv <4?(60+skilllv*10):100;
- i = sc_start(bl,type,i,skilllv,skill_get_time(skillid,skilllv));
- if(!i) {
+ if(!clif_skill_nodamage(src,bl,skillid,skilllv,
+ sc_start(bl,type,(60+skilllv*10),skilllv,
+ skill_get_time(skillid,skilllv)))
+ ) {
if (sd) clif_skill_fail(sd,skillid,0,0);
if (skill_break_equip(bl, EQP_WEAPON, 10000, BCT_PARTY) &&
sd && sd != dstsd)