summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-03-03 20:01:00 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-03-03 20:01:00 +0000
commite98da76049ed45fce2490b48e9d6418bd1ec1223 (patch)
tree934d988e6db3bc81e8bae5443d4fe12e533ee71d
parentd0241aaae2ee58987a5f65b4d69d2ee8d7408283 (diff)
downloadhercules-e98da76049ed45fce2490b48e9d6418bd1ec1223.tar.gz
hercules-e98da76049ed45fce2490b48e9d6418bd1ec1223.tar.bz2
hercules-e98da76049ed45fce2490b48e9d6418bd1ec1223.tar.xz
hercules-e98da76049ed45fce2490b48e9d6418bd1ec1223.zip
- Fixed compilation error on windows
- Strip sc's are now removed on logout. - Some cleanups git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5451 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--Changelog-Trunk.txt1
-rw-r--r--src/map/clif.c10
-rw-r--r--src/map/map.c8
-rw-r--r--src/map/skill.c2
4 files changed, 13 insertions, 8 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index fe5767bd8..fe80f4273 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -5,6 +5,7 @@ IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. EV
GOES INTO TRUNK AND WILL BE MERGED INTO STABLE BY VALARIS AND WIZPUTER. -- VALARIS
2006/03/03
+ * Strip status changes are now removed on logout. [Skotlex]
* Added a column in skill_cast_db for specifying can't walk delays. It's
all set to 0 currently, so someone get updating them! [Skotlex]
* Removed the apply walk-delay entry from skill_cast_nodex as the new walk
diff --git a/src/map/clif.c b/src/map/clif.c
index 376f15c6d..630d513d8 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -9440,13 +9440,10 @@ void clif_parse_Wis(int fd, struct map_session_data *sd) { // S 0096 <len>.w <ni
if(gm_command) aFree(gm_command);
return;
}
+ if(gm_command) aFree(gm_command);
if (sd->sc.count &&
(sd->sc.data[SC_BERSERK].timer!=-1 || sd->sc.data[SC_NOCHAT].timer != -1))
- {
- if(gm_command) aFree(gm_command);
return;
- }
- if(gm_command) aFree(gm_command);
//Chat Logging type 'W' / Whisper
if(log_config.chat&1 //we log everything then
@@ -9459,7 +9456,7 @@ void clif_parse_Wis(int fd, struct map_session_data *sd) { // S 0096 <len>.w <ni
// Lordalfa - Paperboy - To whisper NPC commands //
//-------------------------------------------------------//
if ((strncasecmp((const char*)RFIFOP(fd,4),"NPC:",4) == 0) && (strlen((const char*)RFIFOP(fd,4)) >4)) {
- whisper_tmp = (char*) RFIFOP(fd,4) + 4;
+ whisper_tmp = (char*) RFIFOP(fd,4) + 4;
if ((npc = npc_name2id(whisper_tmp)))
{
whisper_tmp=(char *)aCallocA(strlen((char *)(RFIFOP(fd,28))+1),sizeof(char));
@@ -9497,10 +9494,9 @@ if ((strncasecmp((const char*)RFIFOP(fd,4),"NPC:",4) == 0) && (strlen((const cha
sprintf(whisper_tmp, "%s::OnWhisperGlobal", npc->name);
npc_event(sd,whisper_tmp,0); // Calls the NPC label
- return;
aFree(whisper_tmp); //I rewrote it a little to use memory allocation, a bit more stable =P [Kevin]
- whisper_tmp = NULL;
+ return;
} //should have just removed the one below that was a my bad =P
}
diff --git a/src/map/map.c b/src/map/map.c
index 6d0adb509..ef67616c4 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -1575,6 +1575,14 @@ int map_quit(struct map_session_data *sd) {
status_change_end(&sd->bl,SC_BERSERK,-1);
if(sd->sc.data[SC_TRICKDEAD].timer!=-1)
status_change_end(&sd->bl,SC_TRICKDEAD,-1);
+ if(sd->sc.data[SC_STRIPWEAPON].timer!=-1)
+ status_change_end(&sd->bl,SC_STRIPWEAPON,-1);
+ if(sd->sc.data[SC_STRIPARMOR].timer!=-1)
+ status_change_end(&sd->bl,SC_STRIPARMOR,-1);
+ if(sd->sc.data[SC_STRIPSHIELD].timer!=-1)
+ status_change_end(&sd->bl,SC_STRIPSHIELD,-1);
+ if(sd->sc.data[SC_STRIPHELM].timer!=-1)
+ status_change_end(&sd->bl,SC_STRIPHELM,-1);
}
skill_clear_unitgroup(&sd->bl); // スキルユニットグル?プの削除
diff --git a/src/map/skill.c b/src/map/skill.c
index 3d56a13bc..b966fd5d7 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -11249,8 +11249,8 @@ int skill_readdb(void)
l=0;
while(fgets(line,1020,fp)){
- l++;
char *split[50];
+ l++;
memset(split,0,sizeof(split)); // [Valaris] thanks to fov
if(line[0]=='/' && line[1]=='/')
continue;