Fixes SpiritSphereCost negative values
* SphiritSphereCost has potential -1 value to remove all available spirit spheres. Thanks to @teededung!
This commit is contained in:
@@ -2203,14 +2203,14 @@ static bool skill_parse_row_skilldb(char* split[], int columns, int current) {
|
||||
}
|
||||
|
||||
if (!isMultiLevel(it_req->second.spiritball)) {
|
||||
if (it_req->second.spiritball[0] > 0)
|
||||
if (it_req->second.spiritball[0] != 0)
|
||||
body << YAML::Key << "SpiritSphereCost" << YAML::Value << it_req->second.spiritball[0];
|
||||
} else {
|
||||
body << YAML::Key << "SpiritSphereCost";
|
||||
body << YAML::BeginSeq;
|
||||
|
||||
for (size_t i = 0; i < ARRAYLENGTH(it_req->second.spiritball); i++) {
|
||||
if (it_req->second.spiritball[i] > 0) {
|
||||
if (it_req->second.spiritball[i] != 0) {
|
||||
body << YAML::BeginMap;
|
||||
body << YAML::Key << "Level" << YAML::Value << i + 1;
|
||||
body << YAML::Key << "Amount" << YAML::Value << it_req->second.spiritball[i];
|
||||
|
||||
Reference in New Issue
Block a user