Tests for saving and loading shops
- Fix shop name not being loaded from the file - Fix skills in shops not storing the skill ID
This commit is contained in:
@@ -209,6 +209,7 @@ void cShop::replaceSpecial(size_t i, eShopItemType type, int n) {
|
||||
items[i].item = store_alchemy(n);
|
||||
else if(type == eShopItemType::SKILL) {
|
||||
items[i].item.graphic_num = 108;
|
||||
items[i].item.item_level = n;
|
||||
items[i].item.full_name = get_str("skills", n * 2 + 1);
|
||||
} else if(type == eShopItemType::TREASURE) {
|
||||
items[i].item.graphic_num = 45;
|
||||
|
@@ -554,7 +554,7 @@ static void readShopFromXml(ticpp::Element& data, cShop& shop) {
|
||||
}
|
||||
if(!reqs.empty())
|
||||
throw xMissingElem("special", *reqs.begin(), entry->Row(), entry->Column(), fname);
|
||||
shop.addSpecial(name, descr, icon, node, cost, amount);
|
||||
shop.addSpecial(title, descr, icon, node, cost, amount);
|
||||
} else {
|
||||
eShopItemType itype;
|
||||
int n = 0;
|
||||
|
Reference in New Issue
Block a user