Added ALL_THIRD, All_Upper, All_Baby, Both_Accessory, Both_Hand field (item_db.yml) (#5535)

* Updated the DB

Thanks to @Lemongrass3110 !
This commit is contained in:
Atemo 2020-11-19 16:03:27 +01:00 committed by GitHub
parent e50ce0224f
commit 3cddbd0487
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 2815 additions and 6088 deletions

File diff suppressed because it is too large Load Diff

View File

@ -2794,8 +2794,7 @@ Body:
Buy: 20
Weight: 10
Locations:
Right_Accessory: true
Left_Accessory: true
Both_Accessory: true
Flags:
BuyingStore: true
Script: |
@ -2855,8 +2854,7 @@ Body:
Buy: 20
Weight: 10
Locations:
Right_Accessory: true
Left_Accessory: true
Both_Accessory: true
Flags:
BuyingStore: true
Script: |
@ -2868,8 +2866,7 @@ Body:
Buy: 20
Weight: 10
Locations:
Right_Accessory: true
Left_Accessory: true
Both_Accessory: true
Flags:
BuyingStore: true
Script: |
@ -2929,8 +2926,7 @@ Body:
Buy: 20
Weight: 10
Locations:
Right_Accessory: true
Left_Accessory: true
Both_Accessory: true
Flags:
BuyingStore: true
Script: |
@ -2942,8 +2938,7 @@ Body:
Buy: 20
Weight: 10
Locations:
Right_Accessory: true
Left_Accessory: true
Both_Accessory: true
Flags:
BuyingStore: true
Script: |
@ -2967,8 +2962,7 @@ Body:
Buy: 20
Weight: 10
Locations:
Right_Accessory: true
Left_Accessory: true
Both_Accessory: true
Flags:
BuyingStore: true
Script: |
@ -3018,8 +3012,7 @@ Body:
Buy: 20
Weight: 10
Locations:
Right_Accessory: true
Left_Accessory: true
Both_Accessory: true
Flags:
BuyingStore: true
Script: |
@ -3069,8 +3062,7 @@ Body:
Buy: 20
Weight: 10
Locations:
Right_Accessory: true
Left_Accessory: true
Both_Accessory: true
Flags:
BuyingStore: true
Script: |
@ -3122,8 +3114,7 @@ Body:
Buy: 20
Weight: 10
Locations:
Right_Accessory: true
Left_Accessory: true
Both_Accessory: true
Flags:
BuyingStore: true
Script: |
@ -3159,8 +3150,7 @@ Body:
Buy: 20
Weight: 10
Locations:
Right_Accessory: true
Left_Accessory: true
Both_Accessory: true
Flags:
BuyingStore: true
Script: |
@ -3186,8 +3176,7 @@ Body:
Buy: 20
Weight: 10
Locations:
Right_Accessory: true
Left_Accessory: true
Both_Accessory: true
Flags:
BuyingStore: true
Script: |
@ -3319,8 +3308,7 @@ Body:
Buy: 20
Weight: 10
Locations:
Right_Accessory: true
Left_Accessory: true
Both_Accessory: true
Flags:
BuyingStore: true
Script: |
@ -3428,8 +3416,7 @@ Body:
Buy: 20
Weight: 10
Locations:
Right_Accessory: true
Left_Accessory: true
Both_Accessory: true
Flags:
BuyingStore: true
Script: |
@ -3477,8 +3464,7 @@ Body:
Buy: 20
Weight: 10
Locations:
Right_Accessory: true
Left_Accessory: true
Both_Accessory: true
Flags:
BuyingStore: true
Script: |
@ -3502,8 +3488,7 @@ Body:
Buy: 20
Weight: 10
Locations:
Right_Accessory: true
Left_Accessory: true
Both_Accessory: true
Flags:
BuyingStore: true
Script: |
@ -3563,8 +3548,7 @@ Body:
Buy: 20
Weight: 10
Locations:
Right_Accessory: true
Left_Accessory: true
Both_Accessory: true
Flags:
BuyingStore: true
Script: |
@ -3652,8 +3636,7 @@ Body:
Buy: 20
Weight: 10
Locations:
Right_Accessory: true
Left_Accessory: true
Both_Accessory: true
Flags:
BuyingStore: true
Script: |
@ -3677,8 +3660,7 @@ Body:
Buy: 20
Weight: 10
Locations:
Right_Accessory: true
Left_Accessory: true
Both_Accessory: true
Flags:
BuyingStore: true
Script: |
@ -3798,8 +3780,7 @@ Body:
Buy: 20
Weight: 10
Locations:
Right_Accessory: true
Left_Accessory: true
Both_Accessory: true
Flags:
BuyingStore: true
Script: |
@ -4243,8 +4224,7 @@ Body:
Buy: 20
Weight: 10
Locations:
Right_Accessory: true
Left_Accessory: true
Both_Accessory: true
Flags:
BuyingStore: true
Script: |
@ -4306,8 +4286,7 @@ Body:
Buy: 20
Weight: 10
Locations:
Right_Accessory: true
Left_Accessory: true
Both_Accessory: true
Flags:
BuyingStore: true
Script: |
@ -4319,8 +4298,7 @@ Body:
Buy: 20
Weight: 10
Locations:
Right_Accessory: true
Left_Accessory: true
Both_Accessory: true
Flags:
BuyingStore: true
Script: |
@ -4370,8 +4348,7 @@ Body:
Buy: 20
Weight: 10
Locations:
Right_Accessory: true
Left_Accessory: true
Both_Accessory: true
Flags:
BuyingStore: true
Script: |
@ -4407,8 +4384,7 @@ Body:
Buy: 20
Weight: 10
Locations:
Right_Accessory: true
Left_Accessory: true
Both_Accessory: true
Flags:
BuyingStore: true
Script: |
@ -4432,8 +4408,7 @@ Body:
Buy: 20
Weight: 10
Locations:
Right_Accessory: true
Left_Accessory: true
Both_Accessory: true
Flags:
BuyingStore: true
Script: |
@ -4693,8 +4668,7 @@ Body:
Buy: 20
Weight: 10
Locations:
Right_Accessory: true
Left_Accessory: true
Both_Accessory: true
Flags:
BuyingStore: true
Script: |
@ -4846,8 +4820,7 @@ Body:
Buy: 20
Weight: 10
Locations:
Right_Accessory: true
Left_Accessory: true
Both_Accessory: true
Flags:
BuyingStore: true
Script: |
@ -4885,8 +4858,7 @@ Body:
Buy: 20
Weight: 10
Locations:
Right_Accessory: true
Left_Accessory: true
Both_Accessory: true
Flags:
BuyingStore: true
Script: |
@ -4922,8 +4894,7 @@ Body:
Buy: 20
Weight: 10
Locations:
Right_Accessory: true
Left_Accessory: true
Both_Accessory: true
Flags:
BuyingStore: true
Script: |
@ -4961,8 +4932,7 @@ Body:
Buy: 20
Weight: 10
Locations:
Right_Accessory: true
Left_Accessory: true
Both_Accessory: true
Flags:
BuyingStore: true
Script: |
@ -5072,8 +5042,7 @@ Body:
Buy: 20
Weight: 10
Locations:
Right_Accessory: true
Left_Accessory: true
Both_Accessory: true
Flags:
BuyingStore: true
Script: |
@ -5123,8 +5092,7 @@ Body:
Buy: 20
Weight: 10
Locations:
Right_Accessory: true
Left_Accessory: true
Both_Accessory: true
Flags:
BuyingStore: true
Script: |
@ -5160,8 +5128,7 @@ Body:
Buy: 20
Weight: 10
Locations:
Right_Accessory: true
Left_Accessory: true
Both_Accessory: true
Flags:
BuyingStore: true
Script: |
@ -5197,8 +5164,7 @@ Body:
Buy: 20
Weight: 10
Locations:
Right_Accessory: true
Left_Accessory: true
Both_Accessory: true
Flags:
BuyingStore: true
Script: |
@ -5246,8 +5212,7 @@ Body:
Buy: 20
Weight: 10
Locations:
Right_Accessory: true
Left_Accessory: true
Both_Accessory: true
Flags:
BuyingStore: true
Script: |
@ -5309,8 +5274,7 @@ Body:
Buy: 20
Weight: 10
Locations:
Right_Accessory: true
Left_Accessory: true
Both_Accessory: true
Flags:
BuyingStore: true
Script: |
@ -5346,8 +5310,7 @@ Body:
Buy: 20
Weight: 10
Locations:
Right_Accessory: true
Left_Accessory: true
Both_Accessory: true
Flags:
BuyingStore: true
Script: |
@ -5359,8 +5322,7 @@ Body:
Buy: 20
Weight: 10
Locations:
Right_Accessory: true
Left_Accessory: true
Both_Accessory: true
Flags:
BuyingStore: true
Script: |
@ -5386,8 +5348,7 @@ Body:
Buy: 20
Weight: 10
Locations:
Right_Accessory: true
Left_Accessory: true
Both_Accessory: true
Flags:
BuyingStore: true
Script: |
@ -5411,8 +5372,7 @@ Body:
Buy: 20
Weight: 10
Locations:
Right_Accessory: true
Left_Accessory: true
Both_Accessory: true
Flags:
BuyingStore: true
Script: |
@ -5472,8 +5432,7 @@ Body:
Buy: 20
Weight: 10
Locations:
Right_Accessory: true
Left_Accessory: true
Both_Accessory: true
Flags:
BuyingStore: true
Script: |
@ -5485,8 +5444,7 @@ Body:
Buy: 20
Weight: 10
Locations:
Right_Accessory: true
Left_Accessory: true
Both_Accessory: true
Flags:
BuyingStore: true
Script: |
@ -5656,8 +5614,7 @@ Body:
Buy: 20
Weight: 10
Locations:
Right_Accessory: true
Left_Accessory: true
Both_Accessory: true
Flags:
BuyingStore: true
Script: |
@ -5705,8 +5662,7 @@ Body:
Buy: 20
Weight: 10
Locations:
Right_Accessory: true
Left_Accessory: true
Both_Accessory: true
Flags:
BuyingStore: true
Script: |
@ -5784,8 +5740,7 @@ Body:
Buy: 20
Weight: 10
Locations:
Right_Accessory: true
Left_Accessory: true
Both_Accessory: true
Flags:
BuyingStore: true
Script: |
@ -5811,8 +5766,7 @@ Body:
Buy: 20
Weight: 10
Locations:
Right_Accessory: true
Left_Accessory: true
Both_Accessory: true
Flags:
BuyingStore: true
Script: |
@ -5824,8 +5778,7 @@ Body:
Buy: 20
Weight: 10
Locations:
Right_Accessory: true
Left_Accessory: true
Both_Accessory: true
Flags:
BuyingStore: true
Script: |
@ -5913,8 +5866,7 @@ Body:
Buy: 20
Weight: 10
Locations:
Right_Accessory: true
Left_Accessory: true
Both_Accessory: true
Flags:
BuyingStore: true
Script: |
@ -6040,8 +5992,7 @@ Body:
Buy: 20
Weight: 10
Locations:
Right_Accessory: true
Left_Accessory: true
Both_Accessory: true
Flags:
BuyingStore: true
Script: |
@ -6053,8 +6004,7 @@ Body:
Buy: 20
Weight: 10
Locations:
Right_Accessory: true
Left_Accessory: true
Both_Accessory: true
Flags:
BuyingStore: true
Script: |
@ -6178,8 +6128,7 @@ Body:
Buy: 20
Weight: 10
Locations:
Right_Accessory: true
Left_Accessory: true
Both_Accessory: true
Flags:
BuyingStore: true
Script: |
@ -6191,8 +6140,7 @@ Body:
Buy: 20
Weight: 10
Locations:
Right_Accessory: true
Left_Accessory: true
Both_Accessory: true
Flags:
BuyingStore: true
Script: |
@ -6528,8 +6476,7 @@ Body:
Buy: 20
Weight: 10
Locations:
Right_Accessory: true
Left_Accessory: true
Both_Accessory: true
Flags:
BuyingStore: true
Script: |
@ -6589,8 +6536,7 @@ Body:
Buy: 20
Weight: 10
Locations:
Right_Accessory: true
Left_Accessory: true
Both_Accessory: true
Flags:
BuyingStore: true
Script: |
@ -6602,8 +6548,7 @@ Body:
Buy: 20
Weight: 10
Locations:
Right_Accessory: true
Left_Accessory: true
Both_Accessory: true
Flags:
BuyingStore: true
Script: |
@ -6655,8 +6600,7 @@ Body:
Buy: 20
Weight: 10
Locations:
Right_Accessory: true
Left_Accessory: true
Both_Accessory: true
Flags:
BuyingStore: true
Script: |
@ -6818,8 +6762,7 @@ Body:
Buy: 20
Weight: 10
Locations:
Right_Accessory: true
Left_Accessory: true
Both_Accessory: true
Flags:
BuyingStore: true
Script: |
@ -6857,8 +6800,7 @@ Body:
Buy: 20
Weight: 10
Locations:
Right_Accessory: true
Left_Accessory: true
Both_Accessory: true
Flags:
BuyingStore: true
Script: |
@ -6870,8 +6812,7 @@ Body:
Buy: 20
Weight: 10
Locations:
Right_Accessory: true
Left_Accessory: true
Both_Accessory: true
Flags:
BuyingStore: true
Script: |
@ -6883,8 +6824,7 @@ Body:
Buy: 20
Weight: 10
Locations:
Right_Accessory: true
Left_Accessory: true
Both_Accessory: true
Flags:
BuyingStore: true
Script: |
@ -6960,8 +6900,7 @@ Body:
Buy: 20
Weight: 10
Locations:
Right_Accessory: true
Left_Accessory: true
Both_Accessory: true
Flags:
BuyingStore: true
Script: |
@ -6973,8 +6912,7 @@ Body:
Buy: 20
Weight: 10
Locations:
Right_Accessory: true
Left_Accessory: true
Both_Accessory: true
Flags:
BuyingStore: true
Script: |
@ -7244,8 +7182,7 @@ Body:
Buy: 20
Weight: 10
Locations:
Right_Accessory: true
Left_Accessory: true
Both_Accessory: true
Flags:
BuyingStore: true
Script: |
@ -7333,8 +7270,7 @@ Body:
Buy: 20
Weight: 10
Locations:
Right_Accessory: true
Left_Accessory: true
Both_Accessory: true
Flags:
BuyingStore: true
Script: |
@ -7346,8 +7282,7 @@ Body:
Buy: 20
Weight: 10
Locations:
Right_Accessory: true
Left_Accessory: true
Both_Accessory: true
Flags:
BuyingStore: true
Script: |
@ -7397,8 +7332,7 @@ Body:
Buy: 20
Weight: 10
Locations:
Right_Accessory: true
Left_Accessory: true
Both_Accessory: true
Flags:
BuyingStore: true
Script: |
@ -7422,8 +7356,7 @@ Body:
Buy: 20
Weight: 10
Locations:
Right_Accessory: true
Left_Accessory: true
Both_Accessory: true
Flags:
BuyingStore: true
Script: |
@ -7717,8 +7650,7 @@ Body:
Buy: 20
Weight: 10
Locations:
Right_Accessory: true
Left_Accessory: true
Both_Accessory: true
Flags:
BuyingStore: true
Script: |
@ -7730,8 +7662,7 @@ Body:
Buy: 20
Weight: 10
Locations:
Right_Accessory: true
Left_Accessory: true
Both_Accessory: true
Flags:
BuyingStore: true
Script: |
@ -7755,8 +7686,7 @@ Body:
Buy: 20
Weight: 10
Locations:
Right_Accessory: true
Left_Accessory: true
Both_Accessory: true
Flags:
BuyingStore: true
Script: |
@ -7816,8 +7746,7 @@ Body:
Buy: 20
Weight: 10
Locations:
Right_Accessory: true
Left_Accessory: true
Both_Accessory: true
Flags:
BuyingStore: true
Script: |
@ -7829,8 +7758,7 @@ Body:
Buy: 20
Weight: 10
Locations:
Right_Accessory: true
Left_Accessory: true
Both_Accessory: true
Flags:
BuyingStore: true
Script: |
@ -7902,8 +7830,7 @@ Body:
Buy: 20
Weight: 10
Locations:
Right_Accessory: true
Left_Accessory: true
Both_Accessory: true
Flags:
BuyingStore: true
Script: |
@ -7939,8 +7866,7 @@ Body:
Buy: 20
Weight: 10
Locations:
Right_Accessory: true
Left_Accessory: true
Both_Accessory: true
Flags:
BuyingStore: true
Script: |
@ -7978,8 +7904,7 @@ Body:
Buy: 20
Weight: 10
Locations:
Right_Accessory: true
Left_Accessory: true
Both_Accessory: true
Flags:
BuyingStore: true
Script: |
@ -7991,8 +7916,7 @@ Body:
Buy: 20
Weight: 10
Locations:
Right_Accessory: true
Left_Accessory: true
Both_Accessory: true
Flags:
BuyingStore: true
Script: |

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -8051,9 +8051,7 @@ Body:
Jobs:
Blacksmith: true
Classes:
Third: true
Third_Upper: true
Third_Baby: true
All_Third: true
Flags:
BuyingStore: true
Script: |
@ -8067,9 +8065,7 @@ Body:
Jobs:
Blacksmith: true
Classes:
Third: true
Third_Upper: true
Third_Baby: true
All_Third: true
Flags:
BuyingStore: true
Script: |
@ -8083,9 +8079,7 @@ Body:
Jobs:
Blacksmith: true
Classes:
Third: true
Third_Upper: true
Third_Baby: true
All_Third: true
Flags:
BuyingStore: true
Script: |
@ -11833,9 +11827,7 @@ Body:
Jobs:
Knight: true
Classes:
Third: true
Third_Upper: true
Third_Baby: true
All_Third: true
Flags:
BuyingStore: true
Script: |
@ -11849,9 +11841,7 @@ Body:
Jobs:
Knight: true
Classes:
Third: true
Third_Upper: true
Third_Baby: true
All_Third: true
Flags:
BuyingStore: true
Script: |
@ -11865,9 +11855,7 @@ Body:
Jobs:
Knight: true
Classes:
Third: true
Third_Upper: true
Third_Baby: true
All_Third: true
Flags:
BuyingStore: true
Script: |
@ -11881,9 +11869,7 @@ Body:
Jobs:
Knight: true
Classes:
Third: true
Third_Upper: true
Third_Baby: true
All_Third: true
Flags:
BuyingStore: true
Script: |
@ -11897,9 +11883,7 @@ Body:
Jobs:
Knight: true
Classes:
Third: true
Third_Upper: true
Third_Baby: true
All_Third: true
Flags:
BuyingStore: true
Script: |
@ -43543,9 +43527,7 @@ Body:
Buy: 2
Weight: 10
Classes:
Third: true
Third_Upper: true
Third_Baby: true
All_Third: true
Delay:
Duration: 5000
Status: Reuse_Limit_Luxanima
@ -46342,9 +46324,7 @@ Body:
Jobs:
Blacksmith: true
Classes:
Third: true
Third_Upper: true
Third_Baby: true
All_Third: true
EquipLevelMin: 100
Delay:
Duration: 180000

View File

@ -155,6 +155,9 @@ Baby - Baby classes (no Third-Baby classes).
Third - Third classes (no Transcedent-Third or Third-Baby classes).
Third_Upper - Transcedent-Third classes.
Third_Baby - Third-Baby classes.
All_Upper - All Transcedent classes
All_Baby - All baby classes
All_Third - Applies to all Third classes.
---------------------------------------
@ -190,6 +193,9 @@ Shadow_Shoes - Shadow Shoes
Shadow_Right_Accessory - Shadow Accessory Right (Earring)
Shadow_Left_Accessory - Shadow Accessory Left (Pendant)
Both_Hand - Right_Hand + Left_Hand
Both_Accessory - Right_Accessory + Left_Accessory
---------------------------------------
WeaponLevel: Weapon level. Used for refinement.

View File

@ -227,6 +227,10 @@ enum e_item_job : uint16
ITEMJ_THIRD_BABY = 0x20,
ITEMJ_MAX = 0xFF,
ITEMJ_ALL_UPPER = ITEMJ_UPPER | ITEMJ_THIRD_UPPER,
ITEMJ_ALL_BABY = ITEMJ_BABY | ITEMJ_THIRD_BABY,
ITEMJ_ALL_THIRD = ITEMJ_THIRD | ITEMJ_THIRD_UPPER | ITEMJ_THIRD_BABY,
#ifdef RENEWAL
ITEMJ_ALL = ITEMJ_NORMAL | ITEMJ_UPPER | ITEMJ_BABY | ITEMJ_THIRD | ITEMJ_THIRD_UPPER | ITEMJ_THIRD_BABY,
#else

View File

@ -813,10 +813,12 @@
export_constant(EQP_ACC_RL);
export_constant(EQP_SHADOW_ACC_RL);
export_constant2("EQP_Both_Hand", EQP_ARMS);
export_constant2("EQP_Right_Hand", EQP_HAND_R);
export_constant2("EQP_Left_Hand", EQP_HAND_L);
export_constant2("EQP_Right_Accessory", EQP_ACC_R);
export_constant2("EQP_Left_Accessory", EQP_ACC_L);
export_constant2("EQP_Both_Accessory", EQP_ACC_RL);
export_constant2("EQP_Shadow_Right_Accessory", EQP_SHADOW_ACC_R);
export_constant2("EQP_Shadow_Left_Accessory", EQP_SHADOW_ACC_L);
@ -7965,6 +7967,9 @@
export_constant(ITEMJ_THIRD);
export_constant(ITEMJ_THIRD_UPPER);
export_constant(ITEMJ_THIRD_BABY);
export_constant(ITEMJ_ALL_UPPER);
export_constant(ITEMJ_ALL_BABY);
export_constant(ITEMJ_ALL_THIRD);
/* item drop effects */
export_constant(DROPEFFECT_NONE);

View File

@ -3171,6 +3171,18 @@ static bool itemdb_read_db(const char* file) {
} else {
body << YAML::Key << "Classes";
body << YAML::BeginMap;
if ((ITEMJ_THIRD & temp_class) && (ITEMJ_THIRD_UPPER & temp_class) && (ITEMJ_THIRD_BABY & temp_class)) {
temp_class &= ~ITEMJ_ALL_THIRD;
body << YAML::Key << "All_Third" << YAML::Value << "true";
}
if ((ITEMJ_UPPER & temp_class) && (ITEMJ_THIRD_UPPER & temp_class)) {
temp_class &= ~ITEMJ_ALL_UPPER;
body << YAML::Key << "All_Upper" << YAML::Value << "true";
}
if ((ITEMJ_BABY & temp_class) && (ITEMJ_THIRD_BABY & temp_class)) {
temp_class &= ~ITEMJ_ALL_BABY;
body << YAML::Key << "All_Baby" << YAML::Value << "true";
}
for (int32 i = ITEMJ_NONE; i <= ITEMJ_THIRD_BABY; i++) {
if (i & temp_class) {
const char* class_ = constant_lookup(i, "ITEMJ_");
@ -3199,6 +3211,14 @@ static bool itemdb_read_db(const char* file) {
body << YAML::Key << "Locations";
body << YAML::BeginMap;
if ((EQP_HAND_R & temp_loc) && (EQP_HAND_L & temp_loc)) {
temp_loc &= ~EQP_ARMS;
body << YAML::Key << "Both_Hand" << YAML::Value << "true";
}
if ((EQP_ACC_R & temp_loc) && (EQP_ACC_L & temp_loc)) {
temp_loc &= ~EQP_ACC_RL;
body << YAML::Key << "Both_Accessory" << YAML::Value << "true";
}
for (const auto &it : um_equipnames) {
if (it.second & temp_loc)
body << YAML::Key << it.first << YAML::Value << "true";

View File

@ -384,21 +384,65 @@ static bool item_db_yaml2sql(const std::string &file, const std::string &table)
const YAML::Node &classes = input["Classes"];
if (classes) {
std::string str_all_upper;
std::string str_all_baby;
if (classes["All_Upper"].IsDefined())
str_all_upper = string_trim(classes["All_Upper"].as<std::string>());
if (classes["All_Baby"].IsDefined())
str_all_baby = string_trim(classes["All_Baby"].as<std::string>());
if (appendEntry(classes["All"], value))
column.append("`class_all`,");
if (appendEntry(classes["Normal"], value))
column.append("`class_normal`,");
if (appendEntry(classes["Upper"], value))
column.append("`class_upper`,");
else if (!str_all_upper.empty()) {
value.append(str_all_upper);
value.append(",");
column.append("`class_upper`,");
}
if (appendEntry(classes["Baby"], value))
column.append("`class_baby`,");
else if (!str_all_baby.empty()) {
value.append(str_all_baby);
value.append(",");
column.append("`class_baby`,");
}
#ifdef RENEWAL
std::string str_all_third;
if (classes["All_Third"].IsDefined())
str_all_third = string_trim(classes["All_Third"].as<std::string>());
if (appendEntry(classes["Third"], value))
column.append("`class_third`,");
else if (!str_all_third.empty()) {
value.append(str_all_third);
value.append(",");
column.append("`class_third`,");
}
if (appendEntry(classes["Third_Upper"], value))
column.append("`class_third_upper`,");
else if (!str_all_upper.empty() || !str_all_third.empty()) {
if (!str_all_upper.empty())
value.append(str_all_upper);
else
value.append(str_all_third);
value.append(",");
column.append("`class_third_upper`,");
}
if (appendEntry(classes["Third_Baby"], value))
column.append("`class_third_baby`,");
else if (!str_all_baby.empty() || !str_all_third.empty()) {
if (!str_all_baby.empty())
value.append(str_all_baby);
else
value.append(str_all_third);
value.append(",");
column.append("`class_third_baby`,");
}
#endif
}
@ -416,18 +460,50 @@ static bool item_db_yaml2sql(const std::string &file, const std::string &table)
column.append("`location_head_low`,");
if (appendEntry(locations["Armor"], value))
column.append("`location_armor`,");
if (appendEntry(locations["Left_Hand"], value))
if (locations["Both_Hand"].IsDefined()) {
std::string tmp_value = string_trim(locations["Both_Hand"].as<std::string>());
if (!appendEntry(locations["Left_Hand"], value)) {
value.append(tmp_value);
value.append(",");
}
if (!appendEntry(locations["Right_Hand"], value)) {
value.append(tmp_value);
value.append(",");
}
column.append("`location_left_hand`,");
if (appendEntry(locations["Right_Hand"], value))
column.append("`location_right_hand`,");
}
else {
if (appendEntry(locations["Left_Hand"], value))
column.append("`location_left_hand`,");
if (appendEntry(locations["Right_Hand"], value))
column.append("`location_right_hand`,");
}
if (appendEntry(locations["Garment"], value))
column.append("`location_garment`,");
if (appendEntry(locations["Shoes"], value))
column.append("`location_shoes`,");
if (appendEntry(locations["Right_Accessory"], value))
if (locations["Both_Accessory"].IsDefined()) {
std::string tmp_value = string_trim(locations["Both_Accessory"].as<std::string>());
if (!appendEntry(locations["Right_Accessory"], value)) {
value.append(tmp_value);
value.append(",");
}
if (!appendEntry(locations["Left_Accessory"], value)) {
value.append(tmp_value);
value.append(",");
}
column.append("`location_right_accessory`,");
if (appendEntry(locations["Left_Accessory"], value))
column.append("`location_left_accessory`,");
}
else {
if (appendEntry(locations["Right_Accessory"], value))
column.append("`location_right_accessory`,");
if (appendEntry(locations["Left_Accessory"], value))
column.append("`location_left_accessory`,");
}
if (appendEntry(locations["Costume_Head_Top"], value))
column.append("`location_costume_head_top`,");
if (appendEntry(locations["Costume_Head_Mid"], value))