summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2017-12-08 17:38:21 +0100
committerGitHub <noreply@github.com>2017-12-08 17:38:21 +0100
commit85b71be7fd1134de6b45f9510006b84dc39975ac (patch)
tree274df4073757d0cbf04701af7c2ac4e7b3afc827 /src
parent52abec06442607fca319a8309d26674871b25b53 (diff)
parent952855644c1deaf2dc7d7880bcd14126e2d5f6bd (diff)
downloadhercules-85b71be7fd1134de6b45f9510006b84dc39975ac.tar.gz
hercules-85b71be7fd1134de6b45f9510006b84dc39975ac.tar.bz2
hercules-85b71be7fd1134de6b45f9510006b84dc39975ac.tar.xz
hercules-85b71be7fd1134de6b45f9510006b84dc39975ac.zip
Merge pull request #1898 from Asheraf/homunaf
implement homunculus autofeeding for 2017 clients
Diffstat (limited to 'src')
-rw-r--r--src/char/int_homun.c13
-rw-r--r--src/common/mmo.h1
-rw-r--r--src/map/battle.c1
-rw-r--r--src/map/battle.h2
-rw-r--r--src/map/clif.c38
-rw-r--r--src/map/clif.h14
-rw-r--r--src/map/homunculus.c7
-rw-r--r--src/map/packets.h2
-rw-r--r--src/plugins/HPMHooking/HPMHooking.Defs.inc8
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc16
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc4
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.Hooks.inc40
12 files changed, 89 insertions, 57 deletions
diff --git a/src/char/int_homun.c b/src/char/int_homun.c
index a15a095dd..edf737992 100644
--- a/src/char/int_homun.c
+++ b/src/char/int_homun.c
@@ -129,10 +129,10 @@ bool mapif_homunculus_create(struct s_homunculus *hd)
SQL->EscapeStringLen(inter->sql_handle, esc_name, hd->name, strnlen(hd->name, NAME_LENGTH));
if (SQL_ERROR == SQL->Query(inter->sql_handle, "INSERT INTO `%s` "
- "(`char_id`, `class`,`prev_class`,`name`,`level`,`exp`,`intimacy`,`hunger`, `str`, `agi`, `vit`, `int`, `dex`, `luk`, `hp`,`max_hp`,`sp`,`max_sp`,`skill_point`, `rename_flag`, `vaporize`) "
- "VALUES ('%d', '%d', '%d', '%s', '%d', '%u', '%u', '%d', '%d', %d, '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d')",
+ "(`char_id`, `class`,`prev_class`,`name`,`level`,`exp`,`intimacy`,`hunger`, `str`, `agi`, `vit`, `int`, `dex`, `luk`, `hp`,`max_hp`,`sp`,`max_sp`,`skill_point`, `rename_flag`, `vaporize`, `autofeed`) "
+ "VALUES ('%d', '%d', '%d', '%s', '%d', '%u', '%u', '%d', '%d', %d, '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d')",
homunculus_db, hd->char_id, hd->class_, hd->prev_class, esc_name, hd->level, hd->exp, hd->intimacy, hd->hunger, hd->str, hd->agi, hd->vit, hd->int_, hd->dex, hd->luk,
- hd->hp, hd->max_hp, hd->sp, hd->max_sp, hd->skillpts, hd->rename_flag, hd->vaporize)) {
+ hd->hp, hd->max_hp, hd->sp, hd->max_sp, hd->skillpts, hd->rename_flag, hd->vaporize, hd->autofeed)) {
Sql_ShowDebug(inter->sql_handle);
return false;
}
@@ -156,9 +156,9 @@ bool mapif_homunculus_save(const struct s_homunculus *hd)
SQL->EscapeStringLen(inter->sql_handle, esc_name, hd->name, strnlen(hd->name, NAME_LENGTH));
- if (SQL_ERROR == SQL->Query(inter->sql_handle, "UPDATE `%s` SET `char_id`='%d', `class`='%d',`prev_class`='%d',`name`='%s',`level`='%d',`exp`='%u',`intimacy`='%u',`hunger`='%d', `str`='%d', `agi`='%d', `vit`='%d', `int`='%d', `dex`='%d', `luk`='%d', `hp`='%d',`max_hp`='%d',`sp`='%d',`max_sp`='%d',`skill_point`='%d', `rename_flag`='%d', `vaporize`='%d' WHERE `homun_id`='%d'",
+ if (SQL_ERROR == SQL->Query(inter->sql_handle, "UPDATE `%s` SET `char_id`='%d', `class`='%d',`prev_class`='%d',`name`='%s',`level`='%d',`exp`='%u',`intimacy`='%u',`hunger`='%d', `str`='%d', `agi`='%d', `vit`='%d', `int`='%d', `dex`='%d', `luk`='%d', `hp`='%d',`max_hp`='%d',`sp`='%d',`max_sp`='%d',`skill_point`='%d', `rename_flag`='%d', `vaporize`='%d', `autofeed`='%d' WHERE `homun_id`='%d'",
homunculus_db, hd->char_id, hd->class_, hd->prev_class, esc_name, hd->level, hd->exp, hd->intimacy, hd->hunger, hd->str, hd->agi, hd->vit, hd->int_, hd->dex, hd->luk,
- hd->hp, hd->max_hp, hd->sp, hd->max_sp, hd->skillpts, hd->rename_flag, hd->vaporize, hd->hom_id)) {
+ hd->hp, hd->max_hp, hd->sp, hd->max_sp, hd->skillpts, hd->rename_flag, hd->vaporize, hd->autofeed, hd->hom_id)) {
Sql_ShowDebug(inter->sql_handle);
flag = false;
} else {
@@ -196,7 +196,7 @@ bool mapif_homunculus_load(int homun_id, struct s_homunculus* hd)
nullpo_ret(hd);
memset(hd, 0, sizeof(*hd));
- if( SQL_ERROR == SQL->Query(inter->sql_handle, "SELECT `homun_id`,`char_id`,`class`,`prev_class`,`name`,`level`,`exp`,`intimacy`,`hunger`, `str`, `agi`, `vit`, `int`, `dex`, `luk`, `hp`,`max_hp`,`sp`,`max_sp`,`skill_point`,`rename_flag`, `vaporize` FROM `%s` WHERE `homun_id`='%d'", homunculus_db, homun_id) )
+ if (SQL_ERROR == SQL->Query(inter->sql_handle, "SELECT `homun_id`,`char_id`,`class`,`prev_class`,`name`,`level`,`exp`,`intimacy`,`hunger`, `str`, `agi`, `vit`, `int`, `dex`, `luk`, `hp`,`max_hp`,`sp`,`max_sp`,`skill_point`,`rename_flag`, `vaporize`, `autofeed` FROM `%s` WHERE `homun_id`='%d'", homunculus_db, homun_id))
{
Sql_ShowDebug(inter->sql_handle);
return false;
@@ -236,6 +236,7 @@ bool mapif_homunculus_load(int homun_id, struct s_homunculus* hd)
SQL->GetData(inter->sql_handle, 19, &data, NULL); hd->skillpts = atoi(data);
SQL->GetData(inter->sql_handle, 20, &data, NULL); hd->rename_flag = atoi(data);
SQL->GetData(inter->sql_handle, 21, &data, NULL); hd->vaporize = atoi(data);
+ SQL->GetData(inter->sql_handle, 22, &data, NULL); hd->autofeed = atoi(data);
SQL->FreeResult(inter->sql_handle);
hd->intimacy = cap_value(hd->intimacy, 0, 100000);
diff --git a/src/common/mmo.h b/src/common/mmo.h
index 6a0e75ca5..3987ef48b 100644
--- a/src/common/mmo.h
+++ b/src/common/mmo.h
@@ -552,6 +552,7 @@ struct s_homunculus { //[orn]
int luk_value;
int8 spiritball; //for homun S [lighta]
+ int autofeed;
};
struct s_mercenary {
diff --git a/src/map/battle.c b/src/map/battle.c
index 8983e93c9..70ebc4a08 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -7308,6 +7308,7 @@ static const struct battle_data {
{ "boarding_halter_speed", &battle_config.boarding_halter_speed, 25, 0, 100, },
{ "features/rodex", &battle_config.feature_rodex, 1, 0, 1, },
{ "features/rodex_use_accountmail", &battle_config.feature_rodex_use_accountmail, 0, 0, 1, },
+ { "features/enable_homun_autofeed", &battle_config.feature_enable_homun_autofeed, 1, 0, 1, },
};
#ifndef STATS_OPT_OUT
/**
diff --git a/src/map/battle.h b/src/map/battle.h
index 3ab3e2ddd..429249dca 100644
--- a/src/map/battle.h
+++ b/src/map/battle.h
@@ -560,6 +560,8 @@ struct Battle_Config {
int feature_rodex;
int feature_rodex_use_accountmail;
+
+ int feature_enable_homun_autofeed;
};
/* criteria for battle_config.idletime_critera */
diff --git a/src/map/clif.c b/src/map/clif.c
index 95a2d8f5d..5f7cf3b5d 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -9043,14 +9043,15 @@ void clif_feel_hate_reset(struct map_session_data *sd)
clif->starskill(sd, "", 0, 0, 30);
}
-/// Equip window (un)tick ack (ZC_CONFIG).
+/// Send configurations (ZC_CONFIG).
/// 02d9 <type>.L <value>.L
/// type:
/// 0 = open equip window
+/// 3 = homunculus autofeeding
/// value:
/// 0 = disabled
/// 1 = enabled
-void clif_equiptickack(struct map_session_data* sd, int flag)
+void clif_zc_config(struct map_session_data* sd, int type, int flag)
{
int fd;
nullpo_retv(sd);
@@ -9058,7 +9059,7 @@ void clif_equiptickack(struct map_session_data* sd, int flag)
WFIFOHEAD(fd, packet_len(0x2d9));
WFIFOW(fd, 0) = 0x2d9;
- WFIFOL(fd, 2) = 0;
+ WFIFOL(fd, 2) = type;
WFIFOL(fd, 6) = flag;
WFIFOSET(fd, packet_len(0x2d9));
}
@@ -15942,19 +15943,32 @@ void clif_parse_ViewPlayerEquip(int fd, struct map_session_data* sd) {
clif->msgtable(sd, MSG_EQUIP_NOT_PUBLIC);
}
-void clif_parse_EquipTick(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
-/// Request to change equip window tick (CZ_CONFIG).
+void clif_parse_cz_config(int fd, struct map_session_data *sd) __attribute__((nonnull (2)));
+/// Receive configurations (CZ_CONFIG).
/// 02d8 <type>.L <value>.L
/// type:
/// 0 = open equip window
+/// 3 = homunculus autofeeding
/// value:
/// 0 = disabled
/// 1 = enabled
-void clif_parse_EquipTick(int fd, struct map_session_data* sd)
-{
- bool flag = (RFIFOL(fd,6) != 0) ? true : false;
- sd->status.show_equip = flag;
- clif->equiptickack(sd, flag);
+void clif_parse_cz_config(int fd, struct map_session_data *sd)
+{
+ int type = RFIFOL(fd, 2);
+ int flag = RFIFOL(fd, 6);
+
+ if (type == CZ_CONFIG_OPEN_EQUIPMENT_WINDOW) {
+ sd->status.show_equip = flag;
+ } else if (type == CZ_CONFIG_HOMUNCULUS_AUTOFEEDING) {
+ struct homun_data *hd;
+ hd = sd->hd;
+ nullpo_retv(hd);
+ hd->homunculus.autofeed = flag;
+ } else {
+ ShowWarning("clif_parse_cz_config: Unsupported type has been received (%d).", type);
+ return;
+ }
+ clif->zc_config(sd, type, flag);
}
void clif_parse_PartyTick(int fd, struct map_session_data* sd) __attribute__((nonnull (2)));
@@ -20344,7 +20358,7 @@ void clif_defaults(void) {
clif->mission_info = clif_mission_info;
clif->feel_hate_reset = clif_feel_hate_reset;
clif->partytickack = clif_partytickack;
- clif->equiptickack = clif_equiptickack;
+ clif->zc_config = clif_zc_config;
clif->viewequip_ack = clif_viewequip_ack;
clif->equpcheckbox = clif_equpcheckbox;
clif->displayexp = clif_displayexp;
@@ -20869,7 +20883,7 @@ void clif_defaults(void) {
clif->pAdopt_request = clif_parse_Adopt_request;
clif->pAdopt_reply = clif_parse_Adopt_reply;
clif->pViewPlayerEquip = clif_parse_ViewPlayerEquip;
- clif->pEquipTick = clif_parse_EquipTick;
+ clif->p_cz_config = clif_parse_cz_config;
clif->pquestStateAck = clif_parse_questStateAck;
clif->pmercenary_action = clif_parse_mercenary_action;
clif->pBattleChat = clif_parse_BattleChat;
diff --git a/src/map/clif.h b/src/map/clif.h
index 112db3dec..e348bbb08 100644
--- a/src/map/clif.h
+++ b/src/map/clif.h
@@ -563,7 +563,15 @@ enum clif_unittype {
CLUT_MERCNARY = 0x9,
CLUT_ELEMENTAL = 0xa,
};
-
+/**
+* Receive configuration types
+**/
+enum CZ_CONFIG {
+ CZ_CONFIG_OPEN_EQUIPMENT_WINDOW = 0,
+ // Unknown = 1,
+ CZ_CONFIG_PET_AUTOFEEDING = 2,
+ CZ_CONFIG_HOMUNCULUS_AUTOFEEDING = 3,
+};
/**
* Structures
**/
@@ -781,7 +789,7 @@ struct clif_interface {
void (*mission_info) (struct map_session_data *sd, int mob_id, unsigned char progress);
void (*feel_hate_reset) (struct map_session_data *sd);
void (*partytickack) (struct map_session_data* sd, bool flag);
- void (*equiptickack) (struct map_session_data* sd, int flag);
+ void (*zc_config) (struct map_session_data *sd, int type, int flag);
void (*viewequip_ack) (struct map_session_data* sd, struct map_session_data* tsd);
void (*equpcheckbox) (struct map_session_data* sd);
void (*displayexp) (struct map_session_data *sd, uint64 exp, char type, bool is_quest);
@@ -1302,7 +1310,7 @@ struct clif_interface {
void (*pAdopt_request) (int fd, struct map_session_data *sd);
void (*pAdopt_reply) (int fd, struct map_session_data *sd);
void (*pViewPlayerEquip) (int fd, struct map_session_data* sd);
- void (*pEquipTick) (int fd, struct map_session_data* sd);
+ void (*p_cz_config) (int fd, struct map_session_data *sd);
void (*pquestStateAck) (int fd, struct map_session_data * sd);
void (*pmercenary_action) (int fd, struct map_session_data* sd);
void (*pBattleChat) (int fd, struct map_session_data* sd);
diff --git a/src/map/homunculus.c b/src/map/homunculus.c
index ddaf3443a..9f5756885 100644
--- a/src/map/homunculus.c
+++ b/src/map/homunculus.c
@@ -683,7 +683,12 @@ int homunculus_hunger_timer(int tid, int64 tick, int id, intptr_t data) {
} else if(hd->homunculus.hunger == 75) {
clif->emotion(&hd->bl, E_OK);
}
-
+ if (battle_config.feature_enable_homun_autofeed != 0) {
+ if (hd->homunculus.autofeed) {
+ if (hd->homunculus.hunger < 30)
+ homun->feed(sd, hd);
+ }
+ }
if(hd->homunculus.hunger < 0) {
hd->homunculus.hunger = 0;
// Delete the homunculus if intimacy <= 100
diff --git a/src/map/packets.h b/src/map/packets.h
index 3fcf1648a..b95ae65cf 100644
--- a/src/map/packets.h
+++ b/src/map/packets.h
@@ -1151,7 +1151,7 @@ packet(0x96e,-1,clif->ackmergeitems);
packet(0x02d5,2);
packet(0x02d6,6,clif->pViewPlayerEquip,2);
packet(0x02d7,-1);
- packet(0x02d8,10,clif->pEquipTick,6);
+ packet(0x02d8,10,clif->p_cz_config,6);
packet(0x02d9,10);
packet(0x02da,3);
packet(0x02db,-1,clif->pBattleChat,2,4);
diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc
index 3948221c8..4204be2e4 100644
--- a/src/plugins/HPMHooking/HPMHooking.Defs.inc
+++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc
@@ -1174,8 +1174,8 @@ typedef void (*HPMHOOK_pre_clif_feel_hate_reset) (struct map_session_data **sd);
typedef void (*HPMHOOK_post_clif_feel_hate_reset) (struct map_session_data *sd);
typedef void (*HPMHOOK_pre_clif_partytickack) (struct map_session_data **sd, bool *flag);
typedef void (*HPMHOOK_post_clif_partytickack) (struct map_session_data *sd, bool flag);
-typedef void (*HPMHOOK_pre_clif_equiptickack) (struct map_session_data **sd, int *flag);
-typedef void (*HPMHOOK_post_clif_equiptickack) (struct map_session_data *sd, int flag);
+typedef void (*HPMHOOK_pre_clif_zc_config) (struct map_session_data **sd, int *type, int *flag);
+typedef void (*HPMHOOK_post_clif_zc_config) (struct map_session_data *sd, int type, int flag);
typedef void (*HPMHOOK_pre_clif_viewequip_ack) (struct map_session_data **sd, struct map_session_data **tsd);
typedef void (*HPMHOOK_post_clif_viewequip_ack) (struct map_session_data *sd, struct map_session_data *tsd);
typedef void (*HPMHOOK_pre_clif_equpcheckbox) (struct map_session_data **sd);
@@ -2132,8 +2132,8 @@ typedef void (*HPMHOOK_pre_clif_pAdopt_reply) (int *fd, struct map_session_data
typedef void (*HPMHOOK_post_clif_pAdopt_reply) (int fd, struct map_session_data *sd);
typedef void (*HPMHOOK_pre_clif_pViewPlayerEquip) (int *fd, struct map_session_data **sd);
typedef void (*HPMHOOK_post_clif_pViewPlayerEquip) (int fd, struct map_session_data *sd);
-typedef void (*HPMHOOK_pre_clif_pEquipTick) (int *fd, struct map_session_data **sd);
-typedef void (*HPMHOOK_post_clif_pEquipTick) (int fd, struct map_session_data *sd);
+typedef void (*HPMHOOK_pre_clif_p_cz_config) (int *fd, struct map_session_data **sd);
+typedef void (*HPMHOOK_post_clif_p_cz_config) (int fd, struct map_session_data *sd);
typedef void (*HPMHOOK_pre_clif_pquestStateAck) (int *fd, struct map_session_data **sd);
typedef void (*HPMHOOK_post_clif_pquestStateAck) (int fd, struct map_session_data *sd);
typedef void (*HPMHOOK_pre_clif_pmercenary_action) (int *fd, struct map_session_data **sd);
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
index 3f5d1096e..cc097aeae 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
@@ -810,8 +810,8 @@ struct {
struct HPMHookPoint *HP_clif_feel_hate_reset_post;
struct HPMHookPoint *HP_clif_partytickack_pre;
struct HPMHookPoint *HP_clif_partytickack_post;
- struct HPMHookPoint *HP_clif_equiptickack_pre;
- struct HPMHookPoint *HP_clif_equiptickack_post;
+ struct HPMHookPoint *HP_clif_zc_config_pre;
+ struct HPMHookPoint *HP_clif_zc_config_post;
struct HPMHookPoint *HP_clif_viewequip_ack_pre;
struct HPMHookPoint *HP_clif_viewequip_ack_post;
struct HPMHookPoint *HP_clif_equpcheckbox_pre;
@@ -1768,8 +1768,8 @@ struct {
struct HPMHookPoint *HP_clif_pAdopt_reply_post;
struct HPMHookPoint *HP_clif_pViewPlayerEquip_pre;
struct HPMHookPoint *HP_clif_pViewPlayerEquip_post;
- struct HPMHookPoint *HP_clif_pEquipTick_pre;
- struct HPMHookPoint *HP_clif_pEquipTick_post;
+ struct HPMHookPoint *HP_clif_p_cz_config_pre;
+ struct HPMHookPoint *HP_clif_p_cz_config_post;
struct HPMHookPoint *HP_clif_pquestStateAck_pre;
struct HPMHookPoint *HP_clif_pquestStateAck_post;
struct HPMHookPoint *HP_clif_pmercenary_action_pre;
@@ -7019,8 +7019,8 @@ struct {
int HP_clif_feel_hate_reset_post;
int HP_clif_partytickack_pre;
int HP_clif_partytickack_post;
- int HP_clif_equiptickack_pre;
- int HP_clif_equiptickack_post;
+ int HP_clif_zc_config_pre;
+ int HP_clif_zc_config_post;
int HP_clif_viewequip_ack_pre;
int HP_clif_viewequip_ack_post;
int HP_clif_equpcheckbox_pre;
@@ -7977,8 +7977,8 @@ struct {
int HP_clif_pAdopt_reply_post;
int HP_clif_pViewPlayerEquip_pre;
int HP_clif_pViewPlayerEquip_post;
- int HP_clif_pEquipTick_pre;
- int HP_clif_pEquipTick_post;
+ int HP_clif_p_cz_config_pre;
+ int HP_clif_p_cz_config_post;
int HP_clif_pquestStateAck_pre;
int HP_clif_pquestStateAck_post;
int HP_clif_pmercenary_action_pre;
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
index 7cc9086ba..7caf25de6 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
@@ -427,7 +427,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(clif->mission_info, HP_clif_mission_info) },
{ HP_POP(clif->feel_hate_reset, HP_clif_feel_hate_reset) },
{ HP_POP(clif->partytickack, HP_clif_partytickack) },
- { HP_POP(clif->equiptickack, HP_clif_equiptickack) },
+ { HP_POP(clif->zc_config, HP_clif_zc_config) },
{ HP_POP(clif->viewequip_ack, HP_clif_viewequip_ack) },
{ HP_POP(clif->equpcheckbox, HP_clif_equpcheckbox) },
{ HP_POP(clif->displayexp, HP_clif_displayexp) },
@@ -906,7 +906,7 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(clif->pAdopt_request, HP_clif_pAdopt_request) },
{ HP_POP(clif->pAdopt_reply, HP_clif_pAdopt_reply) },
{ HP_POP(clif->pViewPlayerEquip, HP_clif_pViewPlayerEquip) },
- { HP_POP(clif->pEquipTick, HP_clif_pEquipTick) },
+ { HP_POP(clif->p_cz_config, HP_clif_p_cz_config) },
{ HP_POP(clif->pquestStateAck, HP_clif_pquestStateAck) },
{ HP_POP(clif->pmercenary_action, HP_clif_pmercenary_action) },
{ HP_POP(clif->pBattleChat, HP_clif_pBattleChat) },
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
index 9625d3e52..4340f8dbd 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
@@ -10524,14 +10524,14 @@ void HP_clif_partytickack(struct map_session_data *sd, bool flag) {
}
return;
}
-void HP_clif_equiptickack(struct map_session_data *sd, int flag) {
+void HP_clif_zc_config(struct map_session_data *sd, int type, int flag) {
int hIndex = 0;
- if (HPMHooks.count.HP_clif_equiptickack_pre > 0) {
- void (*preHookFunc) (struct map_session_data **sd, int *flag);
+ if (HPMHooks.count.HP_clif_zc_config_pre > 0) {
+ void (*preHookFunc) (struct map_session_data **sd, int *type, int *flag);
*HPMforce_return = false;
- for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_equiptickack_pre; hIndex++) {
- preHookFunc = HPMHooks.list.HP_clif_equiptickack_pre[hIndex].func;
- preHookFunc(&sd, &flag);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_zc_config_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_zc_config_pre[hIndex].func;
+ preHookFunc(&sd, &type, &flag);
}
if (*HPMforce_return) {
*HPMforce_return = false;
@@ -10539,13 +10539,13 @@ void HP_clif_equiptickack(struct map_session_data *sd, int flag) {
}
}
{
- HPMHooks.source.clif.equiptickack(sd, flag);
+ HPMHooks.source.clif.zc_config(sd, type, flag);
}
- if (HPMHooks.count.HP_clif_equiptickack_post > 0) {
- void (*postHookFunc) (struct map_session_data *sd, int flag);
- for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_equiptickack_post; hIndex++) {
- postHookFunc = HPMHooks.list.HP_clif_equiptickack_post[hIndex].func;
- postHookFunc(sd, flag);
+ if (HPMHooks.count.HP_clif_zc_config_post > 0) {
+ void (*postHookFunc) (struct map_session_data *sd, int type, int flag);
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_zc_config_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_zc_config_post[hIndex].func;
+ postHookFunc(sd, type, flag);
}
}
return;
@@ -23005,13 +23005,13 @@ void HP_clif_pViewPlayerEquip(int fd, struct map_session_data *sd) {
}
return;
}
-void HP_clif_pEquipTick(int fd, struct map_session_data *sd) {
+void HP_clif_p_cz_config(int fd, struct map_session_data *sd) {
int hIndex = 0;
- if (HPMHooks.count.HP_clif_pEquipTick_pre > 0) {
+ if (HPMHooks.count.HP_clif_p_cz_config_pre > 0) {
void (*preHookFunc) (int *fd, struct map_session_data **sd);
*HPMforce_return = false;
- for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pEquipTick_pre; hIndex++) {
- preHookFunc = HPMHooks.list.HP_clif_pEquipTick_pre[hIndex].func;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_p_cz_config_pre; hIndex++) {
+ preHookFunc = HPMHooks.list.HP_clif_p_cz_config_pre[hIndex].func;
preHookFunc(&fd, &sd);
}
if (*HPMforce_return) {
@@ -23020,12 +23020,12 @@ void HP_clif_pEquipTick(int fd, struct map_session_data *sd) {
}
}
{
- HPMHooks.source.clif.pEquipTick(fd, sd);
+ HPMHooks.source.clif.p_cz_config(fd, sd);
}
- if (HPMHooks.count.HP_clif_pEquipTick_post > 0) {
+ if (HPMHooks.count.HP_clif_p_cz_config_post > 0) {
void (*postHookFunc) (int fd, struct map_session_data *sd);
- for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_pEquipTick_post; hIndex++) {
- postHookFunc = HPMHooks.list.HP_clif_pEquipTick_post[hIndex].func;
+ for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_p_cz_config_post; hIndex++) {
+ postHookFunc = HPMHooks.list.HP_clif_p_cz_config_post[hIndex].func;
postHookFunc(fd, sd);
}
}