summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/map/skill.c25
-rw-r--r--src/map/skill.h3
-rw-r--r--src/plugins/HPMHooking/HPMHooking.Defs.inc2
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc4
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc1
-rw-r--r--src/plugins/HPMHooking/HPMHooking_map.Hooks.inc27
6 files changed, 8 insertions, 54 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index 88a29b9a8..5f7d1a9f0 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -987,7 +987,7 @@ int can_copy (struct map_session_data *sd, uint16 skill_id, struct block_list* b
(skill_id >= GC_DARKCROW && skill_id <= SU_FRESHSHRIMP)))
return 0;
// Reproduce will only copy skills according on the list. [Jobbie]
- else if( sd->sc.data[SC__REPRODUCE] && !skill->dbs->reproduce_db[skill->get_index(skill_id)] )
+ else if (sd->sc.data[SC__REPRODUCE] && (skill->get_inf2(skill_id) & INF2_ALLOW_REPRODUCE) == 0)
return 0;
return 1;
@@ -19849,21 +19849,6 @@ bool skill_parse_row_magicmushroomdb(char* split[], int column, int current)
return true;
}
-bool skill_parse_row_reproducedb(char* split[], int column, int current)
-{
- uint16 skill_id;
- uint16 idx;
- nullpo_retr(false, split);
- skill_id = atoi(split[0]);
- idx = skill->get_index(skill_id);
- if( !idx )
- return false;
-
- skill->dbs->reproduce_db[idx] = true;
-
- return true;
-}
-
bool skill_parse_row_abradb(char* split[], int columns, int current)
{
// skill_id,DummyName,RequiredHocusPocusLevel,Rate
@@ -20168,6 +20153,12 @@ void skill_validate_skillinfo(struct config_setting_t *conf, struct s_skill_db *
} else {
sk->inf2 &= ~INF2_SHOW_SKILL_SCALE;
}
+ } else if (strcmpi(type, "AllowReproduce") == 0) {
+ if (on) {
+ sk->inf2 |= INF2_ALLOW_REPRODUCE;
+ } else {
+ sk->inf2 &= ~INF2_ALLOW_REPRODUCE;
+ }
} else if (strcmpi(type, "None") != 0) {
skilldb_invalid_error(type, config_setting_name(t), sk->nameid);
}
@@ -21280,7 +21271,6 @@ void skill_readdb(bool minimal)
sv->readdb(map->db_path, "spellbook_db.txt", ',', 3, 3, MAX_SKILL_SPELLBOOK_DB, skill->parse_row_spellbookdb);
//Guillotine Cross
sv->readdb(map->db_path, "magicmushroom_db.txt", ',', 1, 1, MAX_SKILL_MAGICMUSHROOM_DB, skill->parse_row_magicmushroomdb);
- sv->readdb(map->db_path, "skill_reproduce_db.txt", ',', 1, 1, MAX_SKILL_DB, skill->parse_row_reproducedb);
sv->readdb(map->db_path, "skill_improvise_db.txt", ',', 2, 2, MAX_SKILL_IMPROVISE_DB, skill->parse_row_improvisedb);
sv->readdb(map->db_path, "skill_changematerial_db.txt", ',', 4, 4+2*5, MAX_SKILL_PRODUCE_DB, skill->parse_row_changematerialdb);
}
@@ -21594,7 +21584,6 @@ void skill_defaults(void)
skill->parse_row_abradb = skill_parse_row_abradb;
skill->parse_row_spellbookdb = skill_parse_row_spellbookdb;
skill->parse_row_magicmushroomdb = skill_parse_row_magicmushroomdb;
- skill->parse_row_reproducedb = skill_parse_row_reproducedb;
skill->parse_row_improvisedb = skill_parse_row_improvisedb;
skill->parse_row_changematerialdb = skill_parse_row_changematerialdb;
skill->usave_add = skill_usave_add;
diff --git a/src/map/skill.h b/src/map/skill.h
index 1e00e488f..c494c0e83 100644
--- a/src/map/skill.h
+++ b/src/map/skill.h
@@ -123,6 +123,7 @@ enum e_skill_inf2 {
INF2_FREE_CAST_NORMAL = 0x08000,
INF2_FREE_CAST_REDUCED = 0x10000,
INF2_SHOW_SKILL_SCALE = 0x20000,
+ INF2_ALLOW_REPRODUCE = 0x40000,
};
@@ -1897,7 +1898,6 @@ BEGIN_ZEROED_BLOCK; // This block will be zeroed in skill_defaults() as well as
struct s_skill_improvise_db improvise_db[MAX_SKILL_IMPROVISE_DB];
struct s_skill_changematerial_db changematerial_db[MAX_SKILL_PRODUCE_DB];
struct s_skill_spellbook_db spellbook_db[MAX_SKILL_SPELLBOOK_DB];
- bool reproduce_db[MAX_SKILL_DB];
END_ZEROED_BLOCK;
struct s_skill_unit_layout unit_layout[MAX_SKILL_UNIT_LAYOUT];
};
@@ -2121,7 +2121,6 @@ struct skill_interface {
bool (*parse_row_abradb) (char* split[], int columns, int current);
bool (*parse_row_spellbookdb) (char* split[], int columns, int current);
bool (*parse_row_magicmushroomdb) (char* split[], int column, int current);
- bool (*parse_row_reproducedb) (char* split[], int column, int current);
bool (*parse_row_improvisedb) (char* split[], int columns, int current);
bool (*parse_row_changematerialdb) (char* split[], int columns, int current);
/* save new unit skill */
diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc
index 1a31cc287..1f51af1aa 100644
--- a/src/plugins/HPMHooking/HPMHooking.Defs.inc
+++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc
@@ -6736,8 +6736,6 @@ typedef bool (*HPMHOOK_pre_skill_parse_row_spellbookdb) (char **split[], int *co
typedef bool (*HPMHOOK_post_skill_parse_row_spellbookdb) (bool retVal___, char *split[], int columns, int current);
typedef bool (*HPMHOOK_pre_skill_parse_row_magicmushroomdb) (char **split[], int *column, int *current);
typedef bool (*HPMHOOK_post_skill_parse_row_magicmushroomdb) (bool retVal___, char *split[], int column, int current);
-typedef bool (*HPMHOOK_pre_skill_parse_row_reproducedb) (char **split[], int *column, int *current);
-typedef bool (*HPMHOOK_post_skill_parse_row_reproducedb) (bool retVal___, char *split[], int column, int current);
typedef bool (*HPMHOOK_pre_skill_parse_row_improvisedb) (char **split[], int *columns, int *current);
typedef bool (*HPMHOOK_post_skill_parse_row_improvisedb) (bool retVal___, char *split[], int columns, int current);
typedef bool (*HPMHOOK_pre_skill_parse_row_changematerialdb) (char **split[], int *columns, int *current);
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
index f1586b618..7a482a669 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc
@@ -5450,8 +5450,6 @@ struct {
struct HPMHookPoint *HP_skill_parse_row_spellbookdb_post;
struct HPMHookPoint *HP_skill_parse_row_magicmushroomdb_pre;
struct HPMHookPoint *HP_skill_parse_row_magicmushroomdb_post;
- struct HPMHookPoint *HP_skill_parse_row_reproducedb_pre;
- struct HPMHookPoint *HP_skill_parse_row_reproducedb_post;
struct HPMHookPoint *HP_skill_parse_row_improvisedb_pre;
struct HPMHookPoint *HP_skill_parse_row_improvisedb_post;
struct HPMHookPoint *HP_skill_parse_row_changematerialdb_pre;
@@ -11659,8 +11657,6 @@ struct {
int HP_skill_parse_row_spellbookdb_post;
int HP_skill_parse_row_magicmushroomdb_pre;
int HP_skill_parse_row_magicmushroomdb_post;
- int HP_skill_parse_row_reproducedb_pre;
- int HP_skill_parse_row_reproducedb_post;
int HP_skill_parse_row_improvisedb_pre;
int HP_skill_parse_row_improvisedb_post;
int HP_skill_parse_row_changematerialdb_pre;
diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
index 48be30437..3ba6a3f5b 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc
@@ -2789,7 +2789,6 @@ struct HookingPointData HookingPoints[] = {
{ HP_POP(skill->parse_row_abradb, HP_skill_parse_row_abradb) },
{ HP_POP(skill->parse_row_spellbookdb, HP_skill_parse_row_spellbookdb) },
{ HP_POP(skill->parse_row_magicmushroomdb, HP_skill_parse_row_magicmushroomdb) },
- { HP_POP(skill->parse_row_reproducedb, HP_skill_parse_row_reproducedb) },
{ HP_POP(skill->parse_row_improvisedb, HP_skill_parse_row_improvisedb) },
{ HP_POP(skill->parse_row_changematerialdb, HP_skill_parse_row_changematerialdb) },
{ HP_POP(skill->usave_add, HP_skill_usave_add) },
diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
index 3e41ae068..3b1281dad 100644
--- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
+++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc
@@ -72951,33 +72951,6 @@ bool HP_skill_parse_row_magicmushroomdb(char *split[], int column, int current)
}
return retVal___;
}
-bool HP_skill_parse_row_reproducedb(char *split[], int column, int current) {
- int hIndex = 0;
- bool retVal___ = false;
- if (HPMHooks.count.HP_skill_parse_row_reproducedb_pre > 0) {
- bool (*preHookFunc) (char **split[], int *column, int *current);
- *HPMforce_return = false;
- for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_reproducedb_pre; hIndex++) {
- preHookFunc = HPMHooks.list.HP_skill_parse_row_reproducedb_pre[hIndex].func;
- retVal___ = preHookFunc(&split, &column, &current);
- }
- if (*HPMforce_return) {
- *HPMforce_return = false;
- return retVal___;
- }
- }
- {
- retVal___ = HPMHooks.source.skill.parse_row_reproducedb(split, column, current);
- }
- if (HPMHooks.count.HP_skill_parse_row_reproducedb_post > 0) {
- bool (*postHookFunc) (bool retVal___, char *split[], int column, int current);
- for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_parse_row_reproducedb_post; hIndex++) {
- postHookFunc = HPMHooks.list.HP_skill_parse_row_reproducedb_post[hIndex].func;
- retVal___ = postHookFunc(retVal___, split, column, current);
- }
- }
- return retVal___;
-}
bool HP_skill_parse_row_improvisedb(char *split[], int columns, int current) {
int hIndex = 0;
bool retVal___ = false;