summaryrefslogtreecommitdiff
path: root/src/map/HPMmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/HPMmap.c')
-rw-r--r--src/map/HPMmap.c23
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) {