First small follow up to 04cfe17
Only report duplicate Aegisname, if it is not the same item. When buy and sell price caused a possible zeny exploit the whole YAML node will be reported, since it could be from import and either Buy or Sell might not exist.
This commit is contained in:
parent
04cfe17b2b
commit
63e42dbd4b
@ -67,7 +67,9 @@ uint64 ItemDatabase::parseBodyNode(const YAML::Node &node) {
|
||||
if (!this->asString(node, "AegisName", name))
|
||||
return 0;
|
||||
|
||||
if (itemdb_search_aegisname(name.c_str())) {
|
||||
item_data* id = itemdb_search_aegisname(name.c_str());
|
||||
|
||||
if (id != nullptr && id->nameid != nameid) {
|
||||
this->invalidWarning(node["AegisName"], "Found duplicate item Aegis name for %s, skipping.\n", name.c_str());
|
||||
return 0;
|
||||
}
|
||||
@ -180,7 +182,7 @@ uint64 ItemDatabase::parseBodyNode(const YAML::Node &node) {
|
||||
}
|
||||
|
||||
if (item->value_buy / 124. < item->value_sell / 75.) {
|
||||
this->invalidWarning(node["Sell"], "Buying/Selling [%d/%d] price of %s (%hu) allows Zeny making exploit through buying/selling at discounted/overcharged prices! Defaulting Sell to 1 Zeny.\n", item->value_buy, item->value_sell, item->name.c_str(), nameid);
|
||||
this->invalidWarning(node, "Buying/Selling [%d/%d] price of %s (%hu) allows Zeny making exploit through buying/selling at discounted/overcharged prices! Defaulting Sell to 1 Zeny.\n", item->value_buy, item->value_sell, item->name.c_str(), nameid);
|
||||
item->value_sell = 1;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user