vil->QueryFloatAttribute("x", &spawnx) != XML_NO_ERROR ?
randx : spawnx,
100,
- (char*)vil->Attribute("texture"),
- ptr);
+ vil->StrAttribute("texture"),
+ vil->StrAttribute("inside"));
tmp->addMerchant(0,100);
- if(!strcmp(name,"buy")){
- std::cout << "Buying";
- }else if(!strcmp(name,"sell")){
- std::cout << "Selling";
+ if(vil->FirstChildElement("buy")){
+ std::cout << "Buy" << std::endl;
+ /*bs.member = 0;
+ bs.cost.type = 0;
+ bs.cost.item = vil->FirstChildElement("buy")->Attribute("item");
+ bs.cost.price =vil->FirstChildElement("buy")->IntAttribute("cost");*/
+ tmp->merchant.back()->bsinv.push_back({0,"Dank MayMay",420});
+ }if(vil->FirstChildElement("sell")){
+ std::cout << "Sell" << std::endl;
+ }if(vil->FirstChildElement("trade")){
+ std::cout << "Trade" << std::endl;
}
strcpy(tmp->merchant.back()->name,"meme");