diff options
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/HPM.h | 6 | ||||
-rw-r--r-- | src/common/HPMDataCheck.h | 3 | ||||
-rw-r--r-- | src/common/console.c | 5 | ||||
-rw-r--r-- | src/common/core.c | 11 | ||||
-rw-r--r-- | src/common/mmo.h | 1 |
5 files changed, 13 insertions, 13 deletions
diff --git a/src/common/HPM.h b/src/common/HPM.h index e55397022..efa5d8370 100644 --- a/src/common/HPM.h +++ b/src/common/HPM.h @@ -42,11 +42,7 @@ #define DLL HINSTANCE #else // ! WIN32 #include <dlfcn.h> - #ifdef RTLD_DEEPBIND // Certain linux distributions require this, but it's not available everywhere - #define plugin_open(x) dlopen((x),RTLD_NOW|RTLD_DEEPBIND) - #else // ! RTLD_DEEPBIND - #define plugin_open(x) dlopen((x),RTLD_NOW) - #endif // RTLD_DEEPBIND + #define plugin_open(x) dlopen((x), RTLD_NOW) #define plugin_import(x,y,z) (z)dlsym((x),(y)) #define plugin_close(x) dlclose(x) #define plugin_geterror(buf) ((void)buf, dlerror()) diff --git a/src/common/HPMDataCheck.h b/src/common/HPMDataCheck.h index 8df39df02..2370dfa8d 100644 --- a/src/common/HPMDataCheck.h +++ b/src/common/HPMDataCheck.h @@ -588,6 +588,7 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = { { "PACKET_CZ_ADD_ITEM_TO_MAIL", sizeof(struct PACKET_CZ_ADD_ITEM_TO_MAIL), SERVER_TYPE_MAP }, { "PACKET_CZ_CHECKNAME", sizeof(struct PACKET_CZ_CHECKNAME), SERVER_TYPE_MAP }, { "PACKET_CZ_OPEN_UI", sizeof(struct PACKET_CZ_OPEN_UI), SERVER_TYPE_MAP }, + { "PACKET_CZ_PET_EVOLUTION", sizeof(struct PACKET_CZ_PET_EVOLUTION), SERVER_TYPE_MAP }, { "PACKET_CZ_PRIVATE_AIRSHIP_REQUEST", sizeof(struct PACKET_CZ_PRIVATE_AIRSHIP_REQUEST), SERVER_TYPE_MAP }, { "PACKET_CZ_REQ_DELETE_MAIL", sizeof(struct PACKET_CZ_REQ_DELETE_MAIL), SERVER_TYPE_MAP }, { "PACKET_CZ_REQ_ITEM_FROM_MAIL", sizeof(struct PACKET_CZ_REQ_ITEM_FROM_MAIL), SERVER_TYPE_MAP }, @@ -696,6 +697,7 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = { { "packet_viewequip_ack", sizeof(struct packet_viewequip_ack), SERVER_TYPE_MAP }, { "packet_whisper_message", sizeof(struct packet_whisper_message), SERVER_TYPE_MAP }, { "packet_wis_end", sizeof(struct packet_wis_end), SERVER_TYPE_MAP }, + { "pet_evolution_items", sizeof(struct pet_evolution_items), SERVER_TYPE_MAP }, #else #define MAP_PACKETS_STRUCT_H #endif // MAP_PACKETS_STRUCT_H @@ -746,6 +748,7 @@ HPExport const struct s_HPMDataCheck HPMDataCheck[] = { #ifdef MAP_PET_H { "pet_bonus", sizeof(struct pet_bonus), SERVER_TYPE_MAP }, { "pet_data", sizeof(struct pet_data), SERVER_TYPE_MAP }, + { "pet_evolve_data", sizeof(struct pet_evolve_data), SERVER_TYPE_MAP }, { "pet_interface", sizeof(struct pet_interface), SERVER_TYPE_MAP }, { "pet_loot", sizeof(struct pet_loot), SERVER_TYPE_MAP }, { "pet_recovery", sizeof(struct pet_recovery), SERVER_TYPE_MAP }, diff --git a/src/common/console.c b/src/common/console.c index 0b0a900f6..e7edd7e1e 100644 --- a/src/common/console.c +++ b/src/common/console.c @@ -133,7 +133,10 @@ int console_parse_key_pressed(void) **/ CPCMD_C(exit, server) { - core->runflag = 0; + if (core->shutdown_callback != NULL) + core->shutdown_callback(); + else + core->runflag = CORE_ST_STOP; } /** diff --git a/src/common/core.c b/src/common/core.c index 1bd332eec..406bb7629 100644 --- a/src/common/core.c +++ b/src/common/core.c @@ -80,9 +80,6 @@ // And don't complain to us if the XYZ plugin you installed wiped your hard disk, or worse. // Note: This feature is deprecated, and should not be used. -/// Called when a terminate signal is received. -void (*shutdown_callback)(void) = NULL; - struct core_interface core_s; struct core_interface *core = &core_s; @@ -128,8 +125,8 @@ static BOOL WINAPI console_handler(DWORD c_event) case CTRL_CLOSE_EVENT: case CTRL_LOGOFF_EVENT: case CTRL_SHUTDOWN_EVENT: - if( shutdown_callback != NULL ) - shutdown_callback(); + if (core->shutdown_callback != NULL) + core->shutdown_callback(); else core->runflag = CORE_ST_STOP;// auto-shutdown break; @@ -158,8 +155,8 @@ static void sig_proc(int sn) case SIGTERM: if (++is_called > 3) exit(EXIT_SUCCESS); - if( shutdown_callback != NULL ) - shutdown_callback(); + if (core->shutdown_callback != NULL) + core->shutdown_callback(); else core->runflag = CORE_ST_STOP;// auto-shutdown break; diff --git a/src/common/mmo.h b/src/common/mmo.h index 74d48dd47..0b4ba4a45 100644 --- a/src/common/mmo.h +++ b/src/common/mmo.h @@ -544,6 +544,7 @@ struct s_pet { char name[NAME_LENGTH]; char rename_flag; char incubate; + int autofeed; }; struct s_homunculus { //[orn] |