summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/map/init.c1
-rw-r--r--src/map/pc.c16
-rw-r--r--src/map/pc.h2
3 files changed, 19 insertions, 0 deletions
diff --git a/src/map/init.c b/src/map/init.c
index 22bb403..90ecffb 100644
--- a/src/map/init.c
+++ b/src/map/init.c
@@ -110,6 +110,7 @@ HPExport void plugin_init (void)
addHookPre("pc->unequipitem_pos", epc_unequipitem_pos);
addHookPre("pc->can_attack", epc_can_attack);
addHookPre("pc->takeitem", epc_takeitem);
+ addHookPre("pc->validate_levels", epc_validate_levels);
addHookPre("npc->parse_unknown_mapflag", enpc_parse_unknown_mapflag);
addHookPre("npc->buysellsel", enpc_buysellsel);
addHookPre("npc->db_checkid", enpc_db_checkid);
diff --git a/src/map/pc.c b/src/map/pc.c
index fba2441..612393f 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -165,3 +165,19 @@ int epc_takeitem(struct map_session_data *sd __attribute__ ((unused)),
}
return 1;
}
+
+void epc_validate_levels(void)
+{
+ int i;
+ for (i = 0; i < 7; i++) {
+ if (!pc->db_checkid(i)) continue;
+ if (i == JOB_WEDDING || i == JOB_XMAS || i == JOB_SUMMER)
+ continue; //Classes that do not need exp tables.
+ int j = pc->class2idx(i);
+ if (!pc->max_level[j][0])
+ ShowWarning("Class %d does not has a base exp table.\n", i);
+ if (!pc->max_level[j][1])
+ ShowWarning("Class %d does not has a job exp table.\n", i);
+ }
+ hookStop();
+}
diff --git a/src/map/pc.h b/src/map/pc.h
index cfc37a0..429a74d 100644
--- a/src/map/pc.h
+++ b/src/map/pc.h
@@ -21,4 +21,6 @@ bool epc_can_attack (struct map_session_data *sd, int *target_id);
int epc_takeitem(struct map_session_data *sd, struct flooritem_data *fitem);
+void epc_validate_levels(void);
+
#endif // EVOL_MAP_PC