diff options
author | rud0lp20 <rud0lp20@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2013-01-13 17:06:39 +0000 |
---|---|---|
committer | rud0lp20 <rud0lp20@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2013-01-13 17:06:39 +0000 |
commit | b73e466ed5311a164749ab22e2d3fb1fb0dd6ff6 (patch) | |
tree | b7cf9bb84a044c7d789d3c565ba4205622564ac1 /src/map | |
parent | f6593616b3f8edfe0402051decc9071d3e9dadfa (diff) | |
download | hercules-b73e466ed5311a164749ab22e2d3fb1fb0dd6ff6.tar.gz hercules-b73e466ed5311a164749ab22e2d3fb1fb0dd6ff6.tar.bz2 hercules-b73e466ed5311a164749ab22e2d3fb1fb0dd6ff6.tar.xz hercules-b73e466ed5311a164749ab22e2d3fb1fb0dd6ff6.zip |
Follow up r17094.(bugreport:7173)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@17098 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/status.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/map/status.c b/src/map/status.c index 22094af4a..2c2c2ae83 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -5789,7 +5789,7 @@ struct status_data *status_get_status_data(struct block_list *bl) case BL_HOM: return &((TBL_HOM*)bl)->battle_status; case BL_MER: return &((TBL_MER*)bl)->battle_status; case BL_ELEM: return &((TBL_ELEM*)bl)->battle_status; - case BL_NPC: return &((TBL_NPC*)bl)->status; + case BL_NPC: return ((mobdb_checkid(((TBL_NPC*)bl)->class_) == 0) ? &((TBL_NPC*)bl)->status : &dummy_status); default: return &dummy_status; } @@ -5805,7 +5805,7 @@ struct status_data *status_get_base_status(struct block_list *bl) case BL_HOM: return &((TBL_HOM*)bl)->base_status; case BL_MER: return &((TBL_MER*)bl)->base_status; case BL_ELEM: return &((TBL_ELEM*)bl)->base_status; - case BL_NPC: return &((TBL_NPC*)bl)->status; + case BL_NPC: return ((mobdb_checkid(((TBL_NPC*)bl)->class_) == 0) ? &((TBL_NPC*)bl)->status : NULL); default: return NULL; } @@ -5823,6 +5823,8 @@ defType status_get_def(struct block_list *bl) { unsigned short status_get_speed(struct block_list *bl) { + if(bl->type==BL_NPC)//Only BL with speed data but no status_data [Skotlex] + return ((struct npc_data *)bl)->speed; return status_get_status_data(bl)->speed; } |