Corrects BuyingStore parsing (#5502)

* Fixes a label parse check when loading BuyingStore values for items.
Thanks to @inhyositsu!
This commit is contained in:
inhyositsu 2020-10-29 20:47:42 +08:00 committed by GitHub
parent c867d2f5b7
commit b61089093f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -534,14 +534,14 @@ uint64 ItemDatabase::parseBodyNode(const YAML::Node &node) {
if (this->nodeExists(node, "Flags")) {
const YAML::Node &flagNode = node["Flags"];
if (this->nodeExists(flagNode, "Buyingstore")) {
if (this->nodeExists(flagNode, "BuyingStore")) {
bool active;
if (!this->asBool(flagNode, "Buyingstore", active))
if (!this->asBool(flagNode, "BuyingStore", active))
return 0;
if (!itemdb_isstackable2(item.get()) && active) {
this->invalidWarning(flagNode["Buyingstore"], "Non-stackable item cannot be enabled for buying store.\n");
this->invalidWarning(flagNode["BuyingStore"], "Non-stackable item cannot be enabled for buying store.\n");
active = false;
}