diff options
author | Valaris <Valaris@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-02-03 02:10:26 +0000 |
---|---|---|
committer | Valaris <Valaris@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-02-03 02:10:26 +0000 |
commit | 17f75d4a742e2a6860246ecadfcd974e3ad59064 (patch) | |
tree | 1debcefa69d64ad06aacbca19f40227b6b698f3d | |
parent | d0bc19a7b5eba41b14599bf92ad87912fd3f44fb (diff) | |
download | hercules-17f75d4a742e2a6860246ecadfcd974e3ad59064.tar.gz hercules-17f75d4a742e2a6860246ecadfcd974e3ad59064.tar.bz2 hercules-17f75d4a742e2a6860246ecadfcd974e3ad59064.tar.xz hercules-17f75d4a742e2a6860246ecadfcd974e3ad59064.zip |
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5169 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r-- | Changelog-Trunk.txt | 1 | ||||
-rw-r--r-- | src/map/status.c | 18 |
2 files changed, 19 insertions, 0 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index 21e5642a4..61c9a8af1 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/02/02
+ * Fixed crash in status_change_timer. For some reason the block type switch was removed. [Valaris]
* Crash fix in npc.c npc_timerevent.
was: struct timer_event_data *ted = (struct timer_event_data*)ted;
changed: struct timer_event_data *ted = (struct timer_event_data*)data;
diff --git a/src/map/status.c b/src/map/status.c index a85e42715..68a1838f0 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -3635,6 +3635,24 @@ int status_change_start(struct block_list *bl,int type,int val1,int val2,int val if (!sc || status_isdead(bl))
return 0;
+ switch (bl->type)
+ {
+ case BL_PC:
+ sd=(struct map_session_data *)bl;
+ break;
+ case BL_MOB:
+ if (((struct mob_data*)bl)->class_ == MOBID_EMPERIUM && type != SC_SAFETYWALL)
+ return 0; //Emperium can't be afflicted by status changes.
+ break;
+ case BL_PET: //Because pets can't have status changes.
+ case BL_SKILL: //These may happen by attacking traps or the like. [Skotlex]
+ return 0;
+ default:
+ if(battle_config.error_log)
+ ShowError("status_change_start: invalid source type (%d)!\n", bl->type);
+ return 0;
+ }
+
if(type < 0 || type >= SC_MAX) {
if(battle_config.error_log)
ShowError("status_change_start: invalid status change (%d)!\n", type);
|