From e4046f9d18fcce6551d6aad6417550f519bd2b51 Mon Sep 17 00:00:00 2001 From: aleos Date: Sun, 9 Feb 2020 11:54:19 -0500 Subject: [PATCH] Fixes Duration1 and Duration2 negative values * Duration1 and Duration2 have potential -1 value to send infinite tick for statuses. Thanks to @teededung! --- db/pre-re/skill_db.yml | 23 +++++++++++++++++++++++ db/re/skill_db.yml | 24 ++++++++++++++++++++++++ src/tool/csv2yaml.cpp | 8 ++++---- 3 files changed, 51 insertions(+), 4 deletions(-) diff --git a/db/pre-re/skill_db.yml b/db/pre-re/skill_db.yml index 140d55e17f..1ce161b9aa 100644 --- a/db/pre-re/skill_db.yml +++ b/db/pre-re/skill_db.yml @@ -16088,6 +16088,7 @@ Body: Flags: IsNpc: true HitCount: 1 + Duration1: -1 - Id: 686 Name: NPC_INVINCIBLEOFF Description: Invincible off @@ -22500,6 +22501,7 @@ Body: Hit: Single HitCount: 1 SplashArea: 3 + Duration1: -1 Duration2: - Level: 1 Time: 2000 @@ -32835,6 +32837,7 @@ Body: HitCount: 1 Element: Fire Knockback: 2 + Duration1: -1 Requires: SpCost: 40 - Id: 8402 @@ -32846,6 +32849,7 @@ Body: NoDamage: true Hit: Single HitCount: 1 + Duration1: -1 Requires: SpCost: 60 - Id: 8403 @@ -32880,6 +32884,7 @@ Body: NoDamage: true Hit: Single HitCount: 1 + Duration1: -1 Requires: SpCost: 40 - Id: 8405 @@ -32891,6 +32896,7 @@ Body: NoDamage: true Hit: Single HitCount: 1 + Duration1: -1 Requires: SpCost: 60 - Id: 8406 @@ -32925,6 +32931,7 @@ Body: Hit: Single HitCount: 1 Knockback: 5 + Duration1: -1 Requires: SpCost: 40 - Id: 8408 @@ -32936,6 +32943,7 @@ Body: NoDamage: true Hit: Single HitCount: 1 + Duration1: -1 Requires: SpCost: 60 - Id: 8409 @@ -32968,6 +32976,7 @@ Body: NoDamage: true Hit: Single HitCount: 1 + Duration1: -1 Requires: SpCost: 40 - Id: 8411 @@ -32979,6 +32988,7 @@ Body: NoDamage: true Hit: Single HitCount: 1 + Duration1: -1 Requires: SpCost: 60 - Id: 8412 @@ -33011,6 +33021,7 @@ Body: NoDamage: true Hit: Single HitCount: 1 + Duration1: -1 Requires: SpCost: 1 - Id: 8414 @@ -33022,6 +33033,7 @@ Body: NoDamage: true Hit: Single HitCount: 1 + Duration1: -1 Requires: SpCost: 1 - Id: 8415 @@ -33033,6 +33045,7 @@ Body: NoDamage: true Hit: Single HitCount: 1 + Duration1: -1 Requires: SpCost: 1 - Id: 8416 @@ -33044,6 +33057,7 @@ Body: NoDamage: true Hit: Single HitCount: 1 + Duration1: -1 Requires: SpCost: 1 - Id: 8417 @@ -33055,6 +33069,7 @@ Body: NoDamage: true Hit: Single HitCount: 1 + Duration1: -1 Requires: SpCost: 1 - Id: 8418 @@ -33066,6 +33081,7 @@ Body: NoDamage: true Hit: Single HitCount: 1 + Duration1: -1 Requires: SpCost: 1 - Id: 8419 @@ -33077,6 +33093,7 @@ Body: NoDamage: true Hit: Single HitCount: 1 + Duration1: -1 Requires: SpCost: 1 - Id: 8420 @@ -33088,6 +33105,7 @@ Body: NoDamage: true Hit: Single HitCount: 1 + Duration1: -1 Requires: SpCost: 1 - Id: 8421 @@ -33099,6 +33117,7 @@ Body: NoDamage: true Hit: Single HitCount: 1 + Duration1: -1 Requires: SpCost: 1 - Id: 8422 @@ -33110,6 +33129,7 @@ Body: NoDamage: true Hit: Single HitCount: 1 + Duration1: -1 Requires: SpCost: 1 - Id: 8423 @@ -33121,6 +33141,7 @@ Body: NoDamage: true Hit: Single HitCount: 1 + Duration1: -1 Requires: SpCost: 1 - Id: 8424 @@ -33132,6 +33153,7 @@ Body: NoDamage: true Hit: Single HitCount: 1 + Duration1: -1 Requires: SpCost: 1 - Id: 8425 @@ -33247,6 +33269,7 @@ Body: HitCount: 1 Element: Water SplashArea: 1 + Duration1: -1 Requires: SpCost: 80 - Id: 8434 diff --git a/db/re/skill_db.yml b/db/re/skill_db.yml index f08a5dbcdd..d6f3c9f398 100644 --- a/db/re/skill_db.yml +++ b/db/re/skill_db.yml @@ -16802,6 +16802,7 @@ Body: Flags: IsNpc: true HitCount: 1 + Duration1: -1 FixedCastTime: -1 - Id: 686 Name: NPC_INVINCIBLEOFF @@ -23614,6 +23615,7 @@ Body: Hit: Single HitCount: 1 SplashArea: 3 + Duration1: -1 Duration2: - Level: 1 Time: 2000 @@ -31866,6 +31868,7 @@ Body: HitCount: 1 CastCancel: true AfterCastActDelay: 1000 + Duration1: -1 Cooldown: 15000 Requires: SpCost: 10 @@ -36084,6 +36087,7 @@ Body: HitCount: 1 Element: Fire Knockback: 2 + Duration1: -1 FixedCastTime: -1 Requires: SpCost: 40 @@ -36096,6 +36100,7 @@ Body: NoDamage: true Hit: Single HitCount: 1 + Duration1: -1 FixedCastTime: -1 Requires: SpCost: 60 @@ -36132,6 +36137,7 @@ Body: NoDamage: true Hit: Single HitCount: 1 + Duration1: -1 FixedCastTime: -1 Requires: SpCost: 40 @@ -36144,6 +36150,7 @@ Body: NoDamage: true Hit: Single HitCount: 1 + Duration1: -1 FixedCastTime: -1 Requires: SpCost: 60 @@ -36179,6 +36186,7 @@ Body: Hit: Single HitCount: 1 Knockback: 5 + Duration1: -1 FixedCastTime: -1 Requires: SpCost: 40 @@ -36191,6 +36199,7 @@ Body: NoDamage: true Hit: Single HitCount: 1 + Duration1: -1 FixedCastTime: -1 Requires: SpCost: 60 @@ -36225,6 +36234,7 @@ Body: NoDamage: true Hit: Single HitCount: 1 + Duration1: -1 FixedCastTime: -1 Requires: SpCost: 40 @@ -36237,6 +36247,7 @@ Body: NoDamage: true Hit: Single HitCount: 1 + Duration1: -1 FixedCastTime: -1 Requires: SpCost: 60 @@ -36271,6 +36282,7 @@ Body: NoDamage: true Hit: Single HitCount: 1 + Duration1: -1 FixedCastTime: -1 Requires: SpCost: 1 @@ -36283,6 +36295,7 @@ Body: NoDamage: true Hit: Single HitCount: 1 + Duration1: -1 FixedCastTime: -1 Requires: SpCost: 1 @@ -36295,6 +36308,7 @@ Body: NoDamage: true Hit: Single HitCount: 1 + Duration1: -1 FixedCastTime: -1 Requires: SpCost: 1 @@ -36307,6 +36321,7 @@ Body: NoDamage: true Hit: Single HitCount: 1 + Duration1: -1 FixedCastTime: -1 Requires: SpCost: 1 @@ -36319,6 +36334,7 @@ Body: NoDamage: true Hit: Single HitCount: 1 + Duration1: -1 FixedCastTime: -1 Requires: SpCost: 1 @@ -36331,6 +36347,7 @@ Body: NoDamage: true Hit: Single HitCount: 1 + Duration1: -1 FixedCastTime: -1 Requires: SpCost: 1 @@ -36343,6 +36360,7 @@ Body: NoDamage: true Hit: Single HitCount: 1 + Duration1: -1 FixedCastTime: -1 Requires: SpCost: 1 @@ -36355,6 +36373,7 @@ Body: NoDamage: true Hit: Single HitCount: 1 + Duration1: -1 FixedCastTime: -1 Requires: SpCost: 1 @@ -36367,6 +36386,7 @@ Body: NoDamage: true Hit: Single HitCount: 1 + Duration1: -1 FixedCastTime: -1 Requires: SpCost: 1 @@ -36379,6 +36399,7 @@ Body: NoDamage: true Hit: Single HitCount: 1 + Duration1: -1 FixedCastTime: -1 Requires: SpCost: 1 @@ -36391,6 +36412,7 @@ Body: NoDamage: true Hit: Single HitCount: 1 + Duration1: -1 FixedCastTime: -1 Requires: SpCost: 1 @@ -36403,6 +36425,7 @@ Body: NoDamage: true Hit: Single HitCount: 1 + Duration1: -1 FixedCastTime: -1 Requires: SpCost: 1 @@ -36519,6 +36542,7 @@ Body: HitCount: 1 Element: Water SplashArea: 1 + Duration1: -1 FixedCastTime: -1 Requires: SpCost: 80 diff --git a/src/tool/csv2yaml.cpp b/src/tool/csv2yaml.cpp index 179116e936..6e77c1e693 100644 --- a/src/tool/csv2yaml.cpp +++ b/src/tool/csv2yaml.cpp @@ -1894,14 +1894,14 @@ static bool skill_parse_row_skilldb(char* split[], int columns, int current) { } if (!isMultiLevel(it_cast->second.upkeep_time)) { - if (it_cast->second.upkeep_time[0] > 0) + if (it_cast->second.upkeep_time[0] != 0) body << YAML::Key << "Duration1" << YAML::Value << it_cast->second.upkeep_time[0]; } else { body << YAML::Key << "Duration1"; body << YAML::BeginSeq; for (size_t i = 0; i < ARRAYLENGTH(it_cast->second.upkeep_time); i++) { - if (it_cast->second.upkeep_time[i] > 0) { + if (it_cast->second.upkeep_time[i] != 0) { body << YAML::BeginMap; body << YAML::Key << "Level" << YAML::Value << i + 1; body << YAML::Key << "Time" << YAML::Value << it_cast->second.upkeep_time[i]; @@ -1913,14 +1913,14 @@ static bool skill_parse_row_skilldb(char* split[], int columns, int current) { } if (!isMultiLevel(it_cast->second.upkeep_time2)) { - if (it_cast->second.upkeep_time2[0] > 0) + if (it_cast->second.upkeep_time2[0] != 0) body << YAML::Key << "Duration2" << YAML::Value << it_cast->second.upkeep_time2[0]; } else { body << YAML::Key << "Duration2"; body << YAML::BeginSeq; for (size_t i = 0; i < ARRAYLENGTH(it_cast->second.upkeep_time2); i++) { - if (it_cast->second.upkeep_time2[i] > 0) { + if (it_cast->second.upkeep_time2[i] != 0) { body << YAML::BeginMap; body << YAML::Key << "Level" << YAML::Value << i + 1; body << YAML::Key << "Time" << YAML::Value << it_cast->second.upkeep_time2[i];