diff options
author | shennetsind <ind@henn.et> | 2014-01-19 02:58:36 -0200 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2014-01-19 02:58:36 -0200 |
commit | acc992ac2838f6380ebf2b2f8a514e86c2b750d9 (patch) | |
tree | 9d06366b015de60c71280f92c48fadb024e04a0f /src/map/HPMmap.c | |
parent | c32a22c52b75ae8c3bc2064110318f4ad1d6954a (diff) | |
download | hercules-acc992ac2838f6380ebf2b2f8a514e86c2b750d9.tar.gz hercules-acc992ac2838f6380ebf2b2f8a514e86c2b750d9.tar.bz2 hercules-acc992ac2838f6380ebf2b2f8a514e86c2b750d9.tar.xz hercules-acc992ac2838f6380ebf2b2f8a514e86c2b750d9.zip |
HPM Custom Data Struct Expansion: map/instance/party/guild
As requested by the community in http://hercules.ws/board/topic/3832-hpm-custom-data-struct-for-instance-data-guild-data-and-party-data/
Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map/HPMmap.c')
-rw-r--r-- | src/map/HPMmap.c | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/src/map/HPMmap.c b/src/map/HPMmap.c index 9c09a7ad1..4b1338b8d 100644 --- a/src/map/HPMmap.c +++ b/src/map/HPMmap.c @@ -46,7 +46,7 @@ struct HPM_atcommand_list { struct HPM_atcommand_list *atcommand_list = NULL; unsigned int atcommand_list_items = 0; -void HPM_map_grabHPData(struct HPDataOperationStorage *ret, enum HPluginDataTypes type, void *ptr) { +bool HPM_map_grabHPData(struct HPDataOperationStorage *ret, enum HPluginDataTypes type, void *ptr) { /* record address */ switch( type ) { case HPDT_MSD: @@ -57,11 +57,26 @@ void HPM_map_grabHPData(struct HPDataOperationStorage *ret, enum HPluginDataType ret->HPDataSRCPtr = (void**)(&((struct npc_data *)ptr)->hdata); ret->hdatac = &((struct npc_data *)ptr)->hdatac; break; + case HPDT_MAP: + ret->HPDataSRCPtr = (void**)(&((struct map_data *)ptr)->hdata); + ret->hdatac = &((struct map_data *)ptr)->hdatac; + break; + case HPDT_PARTY: + ret->HPDataSRCPtr = (void**)(&((struct party_data *)ptr)->hdata); + ret->hdatac = &((struct party_data *)ptr)->hdatac; + break; + case HPDT_GUILD: + ret->HPDataSRCPtr = (void**)(&((struct guild *)ptr)->hdata); + ret->hdatac = &((struct guild *)ptr)->hdatac; + break; + case HPDT_INSTANCE: + ret->HPDataSRCPtr = (void**)(&((struct instance_data *)ptr)->hdata); + ret->hdatac = &((struct instance_data *)ptr)->hdatac; + break; default: - ret->HPDataSRCPtr = NULL; - ret->hdatac = NULL; - return; + return false; } + return true; } void HPM_map_plugin_load_sub(struct hplugin *plugin) { |