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/common/HPM.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/common/HPM.c')
-rw-r--r-- | src/common/HPM.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/common/HPM.c b/src/common/HPM.c index cb70ddcd7..1edf24901 100644 --- a/src/common/HPM.c +++ b/src/common/HPM.c @@ -316,19 +316,21 @@ CPCMD(plugins) { void hplugins_grabHPData(struct HPDataOperationStorage *ret, enum HPluginDataTypes type, void *ptr) { /* record address */ switch( type ) { + /* core-handled */ case HPDT_SESSION: ret->HPDataSRCPtr = (void**)(&((struct socket_data *)ptr)->hdata); ret->hdatac = &((struct socket_data *)ptr)->hdatac; break; /* goes to sub */ - case HPDT_MSD: - case HPDT_NPCD: - if( HPM->grabHPDataSub ) - HPM->grabHPDataSub(ret,type,ptr); - else - ShowError("HPM:grabHPData failed, type %d needs sub-handler!\n",type); - break; default: + if( HPM->grabHPDataSub ) { + if( HPM->grabHPDataSub(ret,type,ptr) ) + return; + else { + ShowError("HPM:HPM:grabHPData failed, unknown type %d!\n",type); + } + } else + ShowError("HPM:grabHPData failed, type %d needs sub-handler!\n",type); ret->HPDataSRCPtr = NULL; ret->hdatac = NULL; return; |