Fixed ITEM_ENCHANTARMS and LG_SHIELDSPELL
Fixes #4604 Also fixes csv2yaml for highly customized skill databases. Thanks to @mazvi
This commit is contained in:
@@ -13277,6 +13277,27 @@ Body:
|
|||||||
IsNpc: true
|
IsNpc: true
|
||||||
Hit: Single
|
Hit: Single
|
||||||
HitCount: 1
|
HitCount: 1
|
||||||
|
Element:
|
||||||
|
- Level: 1
|
||||||
|
Element: Neutral
|
||||||
|
- Level: 2
|
||||||
|
Element: Water
|
||||||
|
- Level: 3
|
||||||
|
Element: Earth
|
||||||
|
- Level: 4
|
||||||
|
Element: Fire
|
||||||
|
- Level: 5
|
||||||
|
Element: Wind
|
||||||
|
- Level: 6
|
||||||
|
Element: Poison
|
||||||
|
- Level: 7
|
||||||
|
Element: Holy
|
||||||
|
- Level: 8
|
||||||
|
Element: Dark
|
||||||
|
- Level: 9
|
||||||
|
Element: Ghost
|
||||||
|
- Level: 10
|
||||||
|
Element: Undead
|
||||||
Duration1: 180000
|
Duration1: 180000
|
||||||
Requires:
|
Requires:
|
||||||
SpCost: 1
|
SpCost: 1
|
||||||
@@ -22168,6 +22189,13 @@ Body:
|
|||||||
Splash: true
|
Splash: true
|
||||||
Hit: Single
|
Hit: Single
|
||||||
HitCount: 1
|
HitCount: 1
|
||||||
|
Element:
|
||||||
|
- Level: 1
|
||||||
|
Element: Neutral
|
||||||
|
- Level: 2
|
||||||
|
Element: Holy
|
||||||
|
- Level: 3
|
||||||
|
Element: Neutral
|
||||||
Knockback:
|
Knockback:
|
||||||
- Level: 1
|
- Level: 1
|
||||||
Amount: 2
|
Amount: 2
|
||||||
|
|||||||
@@ -13872,6 +13872,27 @@ Body:
|
|||||||
IsNpc: true
|
IsNpc: true
|
||||||
Hit: Single
|
Hit: Single
|
||||||
HitCount: 1
|
HitCount: 1
|
||||||
|
Element:
|
||||||
|
- Level: 1
|
||||||
|
Element: Neutral
|
||||||
|
- Level: 2
|
||||||
|
Element: Water
|
||||||
|
- Level: 3
|
||||||
|
Element: Earth
|
||||||
|
- Level: 4
|
||||||
|
Element: Fire
|
||||||
|
- Level: 5
|
||||||
|
Element: Wind
|
||||||
|
- Level: 6
|
||||||
|
Element: Poison
|
||||||
|
- Level: 7
|
||||||
|
Element: Holy
|
||||||
|
- Level: 8
|
||||||
|
Element: Dark
|
||||||
|
- Level: 9
|
||||||
|
Element: Ghost
|
||||||
|
- Level: 10
|
||||||
|
Element: Undead
|
||||||
Duration1: 180000
|
Duration1: 180000
|
||||||
Requires:
|
Requires:
|
||||||
SpCost: 1
|
SpCost: 1
|
||||||
@@ -23278,6 +23299,13 @@ Body:
|
|||||||
Splash: true
|
Splash: true
|
||||||
Hit: Single
|
Hit: Single
|
||||||
HitCount: 1
|
HitCount: 1
|
||||||
|
Element:
|
||||||
|
- Level: 1
|
||||||
|
Element: Neutral
|
||||||
|
- Level: 2
|
||||||
|
Element: Holy
|
||||||
|
- Level: 3
|
||||||
|
Element: Neutral
|
||||||
Knockback:
|
Knockback:
|
||||||
- Level: 1
|
- Level: 1
|
||||||
Amount: 2
|
Amount: 2
|
||||||
|
|||||||
@@ -1584,15 +1584,17 @@ static bool skill_parse_row_skilldb(char* split[], int columns, int current) {
|
|||||||
body << YAML::EndMap;
|
body << YAML::EndMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (atoi(split[1]) != 0) {
|
memset(arr, 0, sizeof(arr));
|
||||||
memset(arr, 0, sizeof(arr));
|
arr_size = skill_split_atoi(split[1], arr);
|
||||||
arr_size = skill_split_atoi(split[1], arr);
|
|
||||||
|
|
||||||
body << YAML::Key << "Range";
|
|
||||||
|
|
||||||
|
if (arr_size != 0) {
|
||||||
if (arr_size == 1) {
|
if (arr_size == 1) {
|
||||||
body << YAML::Value << arr[0];
|
if (arr[0] != 0) {
|
||||||
|
body << YAML::Key << "Range";
|
||||||
|
body << YAML::Value << arr[0];
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
|
body << YAML::Key << "Range";
|
||||||
body << YAML::BeginSeq;
|
body << YAML::BeginSeq;
|
||||||
|
|
||||||
for (int i = 0; i < arr_size; i++) {
|
for (int i = 0; i < arr_size; i++) {
|
||||||
@@ -1612,15 +1614,17 @@ static bool skill_parse_row_skilldb(char* split[], int columns, int current) {
|
|||||||
body << YAML::Key << "Hit" << YAML::Value << name2Upper(constant);
|
body << YAML::Key << "Hit" << YAML::Value << name2Upper(constant);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (atoi(split[8]) != 0) {
|
memset(arr, 0, sizeof(arr));
|
||||||
memset(arr, 0, sizeof(arr));
|
arr_size = skill_split_atoi(split[8], arr);
|
||||||
arr_size = skill_split_atoi(split[8], arr);
|
|
||||||
|
|
||||||
body << YAML::Key << "HitCount";
|
|
||||||
|
|
||||||
|
if (arr_size != 0) {
|
||||||
if (arr_size == 1) {
|
if (arr_size == 1) {
|
||||||
body << YAML::Value << arr[0];
|
if (arr[0] != 0) {
|
||||||
|
body << YAML::Key << "HitCount";
|
||||||
|
body << YAML::Value << arr[0];
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
|
body << YAML::Key << "HitCount";
|
||||||
body << YAML::BeginSeq;
|
body << YAML::BeginSeq;
|
||||||
|
|
||||||
for (int i = 0; i < arr_size; i++) {
|
for (int i = 0; i < arr_size; i++) {
|
||||||
@@ -1634,25 +1638,28 @@ static bool skill_parse_row_skilldb(char* split[], int columns, int current) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (atoi(split[4]) != 0) {
|
memset(arr, 0, sizeof(arr));
|
||||||
memset(arr, 0, sizeof(arr));
|
arr_size = skill_split_atoi(split[4], arr);
|
||||||
arr_size = skill_split_atoi(split[4], arr);
|
|
||||||
|
|
||||||
body << YAML::Key << "Element";
|
|
||||||
|
|
||||||
|
if (arr_size != 0) {
|
||||||
if (arr_size == 1) {
|
if (arr_size == 1) {
|
||||||
if (arr[0] == -1)
|
if (arr[0] != 0){
|
||||||
body << YAML::Value << "Weapon";
|
body << YAML::Key << "Element";
|
||||||
else if (arr[0] == -2)
|
|
||||||
body << YAML::Value << "Endowed";
|
if (arr[0] == -1)
|
||||||
else if (arr[0] == -3)
|
body << YAML::Value << "Weapon";
|
||||||
body << YAML::Value << "Random";
|
else if (arr[0] == -2)
|
||||||
else {
|
body << YAML::Value << "Endowed";
|
||||||
constant = constant_lookup(arr[0], "ELE_");
|
else if (arr[0] == -3)
|
||||||
constant.erase(0, 4);
|
body << YAML::Value << "Random";
|
||||||
body << YAML::Value << name2Upper(constant);
|
else {
|
||||||
|
constant = constant_lookup(arr[0], "ELE_");
|
||||||
|
constant.erase(0, 4);
|
||||||
|
body << YAML::Value << name2Upper(constant);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
body << YAML::Key << "Element";
|
||||||
body << YAML::BeginSeq;
|
body << YAML::BeginSeq;
|
||||||
|
|
||||||
for (int i = 0; i < arr_size; i++) {
|
for (int i = 0; i < arr_size; i++) {
|
||||||
@@ -1676,15 +1683,17 @@ static bool skill_parse_row_skilldb(char* split[], int columns, int current) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (atoi(split[6]) != 0) {
|
memset(arr, 0, sizeof(arr));
|
||||||
memset(arr, 0, sizeof(arr));
|
arr_size = skill_split_atoi(split[6], arr);
|
||||||
arr_size = skill_split_atoi(split[6], arr);
|
|
||||||
|
|
||||||
body << YAML::Key << "SplashArea";
|
|
||||||
|
|
||||||
|
if (arr_size != 0) {
|
||||||
if (arr_size == 1) {
|
if (arr_size == 1) {
|
||||||
body << YAML::Value << arr[0];
|
if (arr[0] != 0) {
|
||||||
|
body << YAML::Key << "SplashArea";
|
||||||
|
body << YAML::Value << arr[0];
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
|
body << YAML::Key << "SplashArea";
|
||||||
body << YAML::BeginSeq;
|
body << YAML::BeginSeq;
|
||||||
|
|
||||||
for (int i = 0; i < arr_size; i++) {
|
for (int i = 0; i < arr_size; i++) {
|
||||||
@@ -1698,15 +1707,17 @@ static bool skill_parse_row_skilldb(char* split[], int columns, int current) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (atoi(split[12]) != 0) {
|
memset(arr, 0, sizeof(arr));
|
||||||
memset(arr, 0, sizeof(arr));
|
arr_size = skill_split_atoi(split[12], arr);
|
||||||
arr_size = skill_split_atoi(split[12], arr);
|
|
||||||
|
|
||||||
body << YAML::Key << "ActiveInstance";
|
|
||||||
|
|
||||||
|
if (arr_size != 0) {
|
||||||
if (arr_size == 1) {
|
if (arr_size == 1) {
|
||||||
body << YAML::Value << arr[0];
|
if (arr[0] != 0) {
|
||||||
|
body << YAML::Key << "ActiveInstance";
|
||||||
|
body << YAML::Value << arr[0];
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
|
body << YAML::Key << "ActiveInstance";
|
||||||
body << YAML::BeginSeq;
|
body << YAML::BeginSeq;
|
||||||
|
|
||||||
for (int i = 0; i < arr_size; i++) {
|
for (int i = 0; i < arr_size; i++) {
|
||||||
@@ -1720,15 +1731,17 @@ static bool skill_parse_row_skilldb(char* split[], int columns, int current) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (atoi(split[14]) != 0) {
|
memset(arr, 0, sizeof(arr));
|
||||||
memset(arr, 0, sizeof(arr));
|
arr_size = skill_split_atoi(split[14], arr);
|
||||||
arr_size = skill_split_atoi(split[14], arr);
|
|
||||||
|
|
||||||
body << YAML::Key << "Knockback";
|
|
||||||
|
|
||||||
|
if (arr_size != 0) {
|
||||||
if (arr_size == 1) {
|
if (arr_size == 1) {
|
||||||
body << YAML::Value << arr[0];
|
if (arr[0] != 0) {
|
||||||
|
body << YAML::Key << "Knockback";
|
||||||
|
body << YAML::Value << arr[0];
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
|
body << YAML::Key << "Knockback";
|
||||||
body << YAML::BeginSeq;
|
body << YAML::BeginSeq;
|
||||||
|
|
||||||
for (int i = 0; i < arr_size; i++) {
|
for (int i = 0; i < arr_size; i++) {
|
||||||
|
|||||||
Reference in New Issue
Block a user