summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-11-06 21:23:31 -0200
committershennetsind <ind@henn.et>2013-11-06 21:23:31 -0200
commitd56017e3d1bf783cfdc67a702d2b70a0a27c8863 (patch)
treea47bd0ef6340ce1d011d198f430c7d96d620afe0 /src/map/skill.c
parent5c94e76753c0cdb4ffb7dabbd6e135f1f7d42ef2 (diff)
parent3a3d2297068809d25ca43e19fd2977f97b2728f5 (diff)
downloadhercules-d56017e3d1bf783cfdc67a702d2b70a0a27c8863.tar.gz
hercules-d56017e3d1bf783cfdc67a702d2b70a0a27c8863.tar.bz2
hercules-d56017e3d1bf783cfdc67a702d2b70a0a27c8863.tar.xz
hercules-d56017e3d1bf783cfdc67a702d2b70a0a27c8863.zip
Merge remote-tracking branch 'upstream/master'
Signed-off-by: shennetsind <ind@henn.et> Conflicts: src/map/pc.c
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index b70e58c46..c16ab832c 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -18027,7 +18027,7 @@ bool skill_parse_row_changematerialdb(char* split[], int columns, int current) {
* create_arrow_db.txt
* abra_db.txt
*------------------------------*/
-void skill_readdb(void) {
+void skill_readdb(bool minimal) {
// init skill db structures
db_clear(skill->name2id_db);
@@ -18050,6 +18050,10 @@ void skill_readdb(void) {
safestrncpy(skill->db[0].desc, "Unknown Skill", sizeof(skill->db[0].desc));
sv->readdb(map->db_path, DBPATH"skill_db.txt", ',', 17, 17, MAX_SKILL_DB, skill->parse_row_skilldb);
+
+ if (minimal)
+ return;
+
sv->readdb(map->db_path, DBPATH"skill_require_db.txt", ',', 32, 32, MAX_SKILL_DB, skill->parse_row_requiredb);
#ifdef RENEWAL_CAST
sv->readdb(map->db_path, "re/skill_cast_db.txt", ',', 8, 8, MAX_SKILL_DB, skill->parse_row_castdb);
@@ -18077,7 +18081,7 @@ void skill_reload (void) {
struct map_session_data *sd;
int i,c,k;
- skill->read_db();
+ skill->read_db(false);
//[Ind/Hercules] refresh index cache
for(c = 0; c < CLASS_COUNT; c++) {
@@ -18103,9 +18107,12 @@ void skill_reload (void) {
/*==========================================
*
*------------------------------------------*/
-int do_init_skill (void) {
+int do_init_skill(bool minimal) {
skill->name2id_db = strdb_alloc(DB_OPT_DUP_KEY|DB_OPT_RELEASE_DATA, MAX_SKILL_NAME_LENGTH);
- skill->read_db();
+ skill->read_db(minimal);
+
+ if (minimal)
+ return 0;
skill->group_db = idb_alloc(DB_OPT_BASE);
skill->unit_db = idb_alloc(DB_OPT_BASE);