diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-02-14 01:54:34 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-02-14 02:42:36 +0300 |
commit | 388961002f81f1e8ddd5343c54d510af0ad5bdc6 (patch) | |
tree | b9ba33ddd0de676d9bd4f9edc19684b43e00b564 /src/emap/map.c | |
parent | 4bf7ac022dd4baf2ddca750971ecd2853979a40c (diff) | |
download | plugin-388961002f81f1e8ddd5343c54d510af0ad5bdc6.tar.gz plugin-388961002f81f1e8ddd5343c54d510af0ad5bdc6.tar.bz2 plugin-388961002f81f1e8ddd5343c54d510af0ad5bdc6.tar.xz plugin-388961002f81f1e8ddd5343c54d510af0ad5bdc6.zip |
Add support for item attribute MaxFloorOffset.
Change plugin version to 12.
Diffstat (limited to 'src/emap/map.c')
-rw-r--r-- | src/emap/map.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/emap/map.c b/src/emap/map.c index 67d279d..e08d31f 100644 --- a/src/emap/map.c +++ b/src/emap/map.c @@ -74,15 +74,18 @@ int emap_addflooritem_post(int retVal, int *flags __attribute__ ((unused))) { TBL_ITEM* fitem = (TBL_ITEM*)idb_get(map->id_db, retVal); - if (fitem && fitem->cleartimer != INVALID_TIMER) + if (fitem) { - int timeout = battle->bc->flooritem_lifetime; - struct ItemdExt *data = itemd_get_by_item(item); - if (data) - timeout = data->floorLifeTime; - timer->delete(fitem->cleartimer, map->clearflooritem_timer); - if (timeout >= 0) - fitem->cleartimer = timer->add(timer->gettick() + timeout, map->clearflooritem_timer, fitem->bl.id, 0); + if (fitem->cleartimer != INVALID_TIMER) + { + int timeout = battle->bc->flooritem_lifetime; + struct ItemdExt *data = itemd_get_by_item(item); + if (data) + timeout = data->floorLifeTime; + timer->delete(fitem->cleartimer, map->clearflooritem_timer); + if (timeout >= 0) + fitem->cleartimer = timer->add(timer->gettick() + timeout, map->clearflooritem_timer, fitem->bl.id, 0); + } } return retVal; } |