diff options
author | AnnieRuru <jeankof@ymail.com> | 2014-09-20 03:49:45 +0800 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-12-19 19:17:56 +0300 |
commit | edbe66e718bca90f1da015a6db3284d840ba19cb (patch) | |
tree | 63e0e8084dfb3c52cc74af8c100f6b9426d3cc17 /src/map | |
parent | c4456ddbebccaca51ab040c60e3c586ed2cc0a10 (diff) | |
download | hercules-edbe66e718bca90f1da015a6db3284d840ba19cb.tar.gz hercules-edbe66e718bca90f1da015a6db3284d840ba19cb.tar.bz2 hercules-edbe66e718bca90f1da015a6db3284d840ba19cb.tar.xz hercules-edbe66e718bca90f1da015a6db3284d840ba19cb.zip |
Add struct item_data, mob_db and mob_data for plugins
http://hercules.ws/board/topic/7161-plugin-missing-hook-to-struct-item-data-and-mob-data/
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/HPMmap.c | 12 | ||||
-rw-r--r-- | src/map/itemdb.h | 4 | ||||
-rw-r--r-- | src/map/mob.h | 8 |
3 files changed, 24 insertions, 0 deletions
diff --git a/src/map/HPMmap.c b/src/map/HPMmap.c index a0701ae45..f1cdec538 100644 --- a/src/map/HPMmap.c +++ b/src/map/HPMmap.c @@ -101,6 +101,18 @@ bool HPM_map_grabHPData(struct HPDataOperationStorage *ret, enum HPluginDataType ret->HPDataSRCPtr = (void**)(&((struct instance_data *)ptr)->hdata); ret->hdatac = &((struct instance_data *)ptr)->hdatac; break; + case HPDT_MOBDB: + ret->HPDataSRCPtr = (void**)(&((struct mob_db *)ptr)->hdata); + ret->hdatac = &((struct mob_db *)ptr)->hdatac; + break; + case HPDT_MOBDATA: + ret->HPDataSRCPtr = (void**)(&((struct mob_data *)ptr)->hdata); + ret->hdatac = &((struct mob_data *)ptr)->hdatac; + break; + case HPDT_ITEMDATA: + ret->HPDataSRCPtr = (void**)(&((struct item_data *)ptr)->hdata); + ret->hdatac = &((struct item_data *)ptr)->hdatac; + break; default: return false; } diff --git a/src/map/itemdb.h b/src/map/itemdb.h index 23339790e..f65345cb9 100644 --- a/src/map/itemdb.h +++ b/src/map/itemdb.h @@ -434,6 +434,10 @@ struct item_data { /* TODO add a pointer to some sort of (struct extra) and gather all the not-common vals into it to save memory */ struct item_group *group; struct item_package *package; + + /* HPM Custom Struct */ + struct HPluginData **hdata; + unsigned int hdatac; }; struct item_combo { diff --git a/src/map/mob.h b/src/map/mob.h index f79b33804..133107143 100644 --- a/src/map/mob.h +++ b/src/map/mob.h @@ -126,6 +126,10 @@ struct mob_db { int maxskill; struct mob_skill skill[MAX_MOBSKILL]; struct spawn_info spawn[10]; + + /* HPM Custom Struct */ + struct HPluginData **hdata; + unsigned int hdatac; }; struct mob_data { @@ -197,6 +201,10 @@ struct mob_data { * MvP Tombstone NPC ID **/ int tomb_nid; + + /* HPM Custom Struct */ + struct HPluginData **hdata; + unsigned int hdatac; }; |