summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--db/pre-re/job_db.conf2
-rw-r--r--db/re/job_db.conf2
-rw-r--r--src/map/clif.c12
-rw-r--r--src/map/clif.h10
-rw-r--r--src/map/script.c6
-rw-r--r--src/map/status.c6
-rw-r--r--src/plugins/HPMHooking/HPMHooking.Defs.inc4
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.Hooks.inc6
8 files changed, 32 insertions, 16 deletions
diff --git a/db/pre-re/job_db.conf b/db/pre-re/job_db.conf
index ac4ad1582..af8cabf9a 100644
--- a/db/pre-re/job_db.conf
+++ b/db/pre-re/job_db.conf
@@ -31,6 +31,8 @@
************* Entry structure ********************************************
**************************************************************************
Job_Name: { // Job names as in src/map/pc.c (they are hardcoded at the moment so if you want to add a new job you should add it there)
+ BaseExpGroup: "Exp Group Name" (string) // Name of base exp group defined in exp_group_db.conf
+ JobExpGroup: "Exp Group Name" (string) // Name of job exp group defined in exp_group_db.conf
Inherit: ("Other_Job_Name") // Base job from which this job will inherit its max weight, base ASPD set and HP/SP table.
InheritHP: ("Other_Job_Name") // Base job from which this job will inherit its HP table (if different).
InheritSP: ("Other_Job_Name") // Base job from which this job will inherit its SP table (if different).
diff --git a/db/re/job_db.conf b/db/re/job_db.conf
index 93bab17e0..21ba3f4cc 100644
--- a/db/re/job_db.conf
+++ b/db/re/job_db.conf
@@ -31,6 +31,8 @@
************* Entry structure ********************************************
**************************************************************************
Job_Name: { // Job names as in src/map/pc.c (they are hardcoded at the moment so if you want to add a new job you should add it there)
+ BaseExpGroup: "Exp Group Name" (string) // Name of base exp group defined in exp_group_db.conf
+ JobExpGroup: "Exp Group Name" (string) // Name of job exp group defined in exp_group_db.conf
Inherit: ("Other_Job_Name") // Base job from which this job will inherit its max weight, base ASPD set and HP/SP table.
InheritHP: ("Other_Job_Name") // Base job from which this job will inherit its HP table (if different).
InheritSP: ("Other_Job_Name") // Base job from which this job will inherit its SP table (if different).
diff --git a/src/map/clif.c b/src/map/clif.c
index 154add232..73dbb5f7d 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -11081,7 +11081,7 @@ void clif_parse_CreateChatRoom(int fd, struct map_session_data* sd) __attribute_
/// 1 = public
void clif_parse_CreateChatRoom(int fd, struct map_session_data* sd)
{
- int len = RFIFOW(fd,2)-15;
+ int len = (int)RFIFOW(fd, 2) - 15;
int limit;
bool pub;
const char *password; //not zero-terminated
@@ -11137,7 +11137,7 @@ void clif_parse_ChatRoomStatusChange(int fd, struct map_session_data* sd) __attr
/// 1 = public
void clif_parse_ChatRoomStatusChange(int fd, struct map_session_data* sd)
{
- int len = RFIFOW(fd,2)-15;
+ int len = (int)RFIFOW(fd, 2) - 15;
int limit;
bool pub;
const char *password; // not zero-terminated
@@ -13148,12 +13148,12 @@ void clif_parse_OpenVending(int fd, struct map_session_data* sd) __attribute__((
/// 0 = canceled
/// 1 = open
void clif_parse_OpenVending(int fd, struct map_session_data* sd) {
- short len = (short)RFIFOW(fd,2) - 85;
+ int len = (int)RFIFOW(fd, 2) - 85;
const char *message;
bool flag;
const uint8 *data;
- if (len < 1)
+ if (len < 0)
return;
message = RFIFOP(fd,4);
@@ -20827,7 +20827,7 @@ void clif_parse_cz_req_style_change(int fd, struct map_session_data *sd)
if (p->BottomAccessory > 0)
clif->cz_req_style_change_sub(sd, LOOK_HEAD_BOTTOM, p->BottomAccessory, true);
- clif->style_change_response(sd, true);
+ clif->style_change_response(sd, STYLIST_SHOP_SUCCESS);
return;
}
@@ -20850,7 +20850,7 @@ void clif_cz_req_style_change_sub(struct map_session_data *sd, int type, int16 i
}
}
-void clif_style_change_response(struct map_session_data *sd, int8 flag)
+void clif_style_change_response(struct map_session_data *sd, enum stylist_shop flag)
{
#if PACKETVER >= 20151104
struct PACKET_ZC_STYLE_CHANGE_RES p;
diff --git a/src/map/clif.h b/src/map/clif.h
index 20ecf8e8d..67137f5d3 100644
--- a/src/map/clif.h
+++ b/src/map/clif.h
@@ -616,6 +616,14 @@ struct stylist_data_entry {
VECTOR_DECL(struct stylist_data_entry) stylist_data[MAX_STYLIST_TYPE];
/**
+* Stylist Shop Responds
+**/
+enum stylist_shop {
+ STYLIST_SHOP_SUCCESS,
+ STYLIST_SHOP_FAILURE
+};
+
+/**
* Clif.c Interface
**/
struct clif_interface {
@@ -1458,7 +1466,7 @@ struct clif_interface {
void (*stylist_send_rodexitem) (struct map_session_data *sd, int16 itemid);
void (*pReqStyleChange) (int fd, struct map_session_data *sd);
void (*cz_req_style_change_sub) (struct map_session_data *sd, int type, int16 idx, bool isitem);
- void (*style_change_response) (struct map_session_data *sd, int8 flag);
+ void (*style_change_response) (struct map_session_data *sd, enum stylist_shop flag);
};
#ifdef HERCULES_CORE
diff --git a/src/map/script.c b/src/map/script.c
index d9350081a..88d8095e5 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -11282,7 +11282,9 @@ BUILDIN(getunits)
if (not_server_variable(*name)) {
sd = script->rid2sd(st);
+
if (sd == NULL) {
+ script_pushint(st, 0);
return true; // player variable but no player attached
}
}
@@ -18157,7 +18159,7 @@ BUILDIN(setpcblock)
if ((type & PCBLOCK_IMMUNE) != 0)
sd->block_action.immune = state;
- if ((type & PCBLOCK_SITSTAND) != 0)
+ if ((type & PCBLOCK_SITSTAND) != 0)
sd->block_action.sitstand = state;
if ((type & PCBLOCK_COMMANDS) != 0)
@@ -25263,7 +25265,7 @@ void script_hardcoded_constants(void)
script->set_constant("MST_AROUND3", MST_AROUND3, false, false);
script->set_constant("MST_AROUND4", MST_AROUND4, false, false);
script->set_constant("MST_AROUND", MST_AROUND , false, false);
-
+
script->constdb_comment("pc block constants, use with *setpcblock* and *checkpcblock*");
script->set_constant("PCBLOCK_NONE", PCBLOCK_NONE, false, false);
script->set_constant("PCBLOCK_MOVE", PCBLOCK_MOVE, false, false);
diff --git a/src/map/status.c b/src/map/status.c
index bf48d2301..4e2724d61 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -13114,7 +13114,8 @@ void status_read_job_db_sub(int idx, const char *name, struct config_setting_t *
pc->dbs->class_exp_table[idx][CLASS_EXP_TABLE_BASE] = &VECTOR_INDEX(pc->class_exp_groups[CLASS_EXP_TABLE_BASE], i);
}
} else {
- ShowError("status_read_job_db: BaseExpGroup setting not found for entry '%s'\n", name);
+ ShowError("status_read_job_db: BaseExpGroup setting not found for entry '%s', skipping..\n", name);
+ return;
}
/**
@@ -13129,7 +13130,8 @@ void status_read_job_db_sub(int idx, const char *name, struct config_setting_t *
pc->dbs->class_exp_table[idx][CLASS_EXP_TABLE_JOB] = &VECTOR_INDEX(pc->class_exp_groups[CLASS_EXP_TABLE_JOB], i);
}
} else {
- ShowError("status_read_job_db: JobExpGroup setting not found for entry '%s'\n", name);
+ ShowError("status_read_job_db: JobExpGroup setting not found for entry '%s', skipping..\n", name);
+ return;
}
if ((temp = libconfig->setting_get_member(jdb, "Inherit"))) {
diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc
index 8f4f181fb..5126822af 100644
--- a/src/plugins/HPMHooking/HPMHooking.Defs.inc
+++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc
@@ -2448,8 +2448,8 @@ typedef void (*HPMHOOK_pre_clif_pReqStyleChange) (int *fd, struct map_session_da
typedef void (*HPMHOOK_post_clif_pReqStyleChange) (int fd, struct map_session_data *sd);
typedef void (*HPMHOOK_pre_clif_cz_req_style_change_sub) (struct map_session_data **sd, int *type, int16 *idx, bool *isitem);
typedef void (*HPMHOOK_post_clif_cz_req_style_change_sub) (struct map_session_data *sd, int type, int16 idx, bool isitem);
-typedef void (*HPMHOOK_pre_clif_style_change_response) (struct map_session_data **sd, int8 *flag);
-typedef void (*HPMHOOK_post_clif_style_change_response) (struct map_session_data *sd, int8 flag);
+typedef void (*HPMHOOK_pre_clif_style_change_response) (struct map_session_data **sd, enum stylist_shop *flag);
+typedef void (*HPMHOOK_post_clif_style_change_response) (struct map_session_data *sd, enum stylist_shop flag);
#endif // MAP_CLIF_H
#ifdef COMMON_CORE_H /* cmdline */
typedef void (*HPMHOOK_pre_cmdline_init) (void);
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
index d81042493..02da2a4dd 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
@@ -26623,10 +26623,10 @@ void HP_clif_cz_req_style_change_sub(struct map_session_data *sd, int type, int1
}
return;
}
-void HP_clif_style_change_response(struct map_session_data *sd, int8 flag) {
+void HP_clif_style_change_response(struct map_session_data *sd, enum stylist_shop flag) {
int hIndex = 0;
if (HPMHooks.count.HP_clif_style_change_response_pre > 0) {
- void (*preHookFunc) (struct map_session_data **sd, int8 *flag);
+ void (*preHookFunc) (struct map_session_data **sd, enum stylist_shop *flag);
*HPMforce_return = false;
for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_style_change_response_pre; hIndex++) {
preHookFunc = HPMHooks.list.HP_clif_style_change_response_pre[hIndex].func;
@@ -26641,7 +26641,7 @@ void HP_clif_style_change_response(struct map_session_data *sd, int8 flag) {
HPMHooks.source.clif.style_change_response(sd, flag);
}
if (HPMHooks.count.HP_clif_style_change_response_post > 0) {
- void (*postHookFunc) (struct map_session_data *sd, int8 flag);
+ void (*postHookFunc) (struct map_session_data *sd, enum stylist_shop flag);
for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_style_change_response_post; hIndex++) {
postHookFunc = HPMHooks.list.HP_clif_style_change_response_post[hIndex].func;
postHookFunc(sd, flag);