Skip to content

Commit

Permalink
Update HPM hooks.
Browse files Browse the repository at this point in the history
  • Loading branch information
4144 committed Oct 20, 2015
1 parent fb7e288 commit 6074095
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
10 changes: 5 additions & 5 deletions src/common/HPMDataCheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,16 +144,16 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = {
#else
#define COMMON_HPMI_H
#endif // COMMON_HPMI_H
#ifdef COMMON_MALLOC_H
{ "malloc_interface", sizeof(struct malloc_interface), SERVER_TYPE_ALL },
#else
#define COMMON_MALLOC_H
#endif // COMMON_MALLOC_H
#ifdef COMMON_MAPINDEX_H
{ "mapindex_interface", sizeof(struct mapindex_interface), SERVER_TYPE_CHAR|SERVER_TYPE_MAP },
#else
#define COMMON_MAPINDEX_H
#endif // COMMON_MAPINDEX_H
#ifdef COMMON_MEMMGR_H
{ "malloc_interface", sizeof(struct malloc_interface), SERVER_TYPE_ALL },
#else
#define COMMON_MEMMGR_H
#endif // COMMON_MEMMGR_H
#ifdef COMMON_MMO_H
{ "auction_data", sizeof(struct auction_data), SERVER_TYPE_ALL },
{ "fame_list", sizeof(struct fame_list), SERVER_TYPE_ALL },
Expand Down
8 changes: 4 additions & 4 deletions src/common/HPMSymbols.inc.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,9 @@ struct loginif_interface *loginif;
#ifdef MAP_MAIL_H /* mail */
struct mail_interface *mail;
#endif // MAP_MAIL_H
#ifdef COMMON_MALLOC_H /* iMalloc */
#ifdef COMMON_MEMMGR_H /* iMalloc */
struct malloc_interface *iMalloc;
#endif // COMMON_MALLOC_H
#endif // COMMON_MEMMGR_H
#ifdef MAP_MAP_H /* map */
struct map_interface *map;
#endif // MAP_MAP_H
Expand Down Expand Up @@ -348,9 +348,9 @@ if ((server_type&(SERVER_TYPE_CHAR)) && !HPM_SYMBOL("loginif", loginif)) return
#ifdef MAP_MAIL_H /* mail */
if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("mail", mail)) return "mail";
#endif // MAP_MAIL_H
#ifdef COMMON_MALLOC_H /* iMalloc */
#ifdef COMMON_MEMMGR_H /* iMalloc */
if ((server_type&(SERVER_TYPE_ALL)) && !HPM_SYMBOL("iMalloc", iMalloc)) return "iMalloc";
#endif // COMMON_MALLOC_H
#endif // COMMON_MEMMGR_H
#ifdef MAP_MAP_H /* map */
if ((server_type&(SERVER_TYPE_MAP)) && !HPM_SYMBOL("map", map)) return "map";
#endif // MAP_MAP_H
Expand Down
12 changes: 6 additions & 6 deletions src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
Original file line number Diff line number Diff line change
Expand Up @@ -46001,29 +46001,29 @@ bool HP_mob_get_const(const config_setting_t *it, int *value) {
}
return retVal___;
}
int HP_mob_read_libconfig(const char *filename) {
int HP_mob_read_libconfig(const char *filename, bool ignore_missing) {
int hIndex = 0;
int retVal___ = 0;
if( HPMHooks.count.HP_mob_read_libconfig_pre ) {
int (*preHookFunc) (const char *filename);
int (*preHookFunc) (const char *filename, bool *ignore_missing);
*HPMforce_return = false;
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_libconfig_pre; hIndex++ ) {
preHookFunc = HPMHooks.list.HP_mob_read_libconfig_pre[hIndex].func;
retVal___ = preHookFunc(filename);
retVal___ = preHookFunc(filename, &ignore_missing);
}
if( *HPMforce_return ) {
*HPMforce_return = false;
return retVal___;
}
}
{
retVal___ = HPMHooks.source.mob.read_libconfig(filename);
retVal___ = HPMHooks.source.mob.read_libconfig(filename, ignore_missing);
}
if( HPMHooks.count.HP_mob_read_libconfig_post ) {
int (*postHookFunc) (int retVal___, const char *filename);
int (*postHookFunc) (int retVal___, const char *filename, bool *ignore_missing);
for(hIndex = 0; hIndex < HPMHooks.count.HP_mob_read_libconfig_post; hIndex++ ) {
postHookFunc = HPMHooks.list.HP_mob_read_libconfig_post[hIndex].func;
retVal___ = postHookFunc(retVal___, filename);
retVal___ = postHookFunc(retVal___, filename, &ignore_missing);
}
}
return retVal___;
Expand Down

2 comments on commit 6074095

@Jedzkie
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error 2 error LNK1120: 1 unresolved externals D:\Ragnarok\Test Server\Hercules\plugins\plugin-sample.dll plugin-sample
Error 4 error LNK1120: 1 unresolved externals D:\Ragnarok\Test Server\Hercules\plugins\HPMHooking_char.dll 1 1 plugin-HPMHooking_char
Error 6 error LNK1120: 1 unresolved externals D:\Ragnarok\Test Server\Hercules\plugins\HPMHooking_login.dll plugin-HPMHooking_login
Error 8 error LNK1120: 1 unresolved externals D:\Ragnarok\Test Server\Hercules\plugins\HPMHooking_map.dll 1 1 plugin-HPMHooking_map
Error 1 error LNK2001: unresolved external symbol _iMalloc D:\Ragnarok\Test Server\Hercules\vcproj-12\sample.obj plugin-sample
Error 3 error LNK2001: unresolved external symbol _iMalloc D:\Ragnarok\Test Server\Hercules\vcproj-12\HPMHooking.obj plugin-HPMHooking_char
Error 5 error LNK2001: unresolved external symbol _iMalloc D:\Ragnarok\Test Server\Hercules\vcproj-12\HPMHooking.obj plugin-HPMHooking_login
Error 7 error LNK2001: unresolved external symbol _iMalloc D:\Ragnarok\Test Server\Hercules\vcproj-12\HPMHooking.obj plugin-HPMHooking_map

@MishimaHaruna
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in b993924, thank you!

Please sign in to comment.