1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
|
void MapHandlerChapter1::parseBuy (const xmlpp::Node *node, Npc *npc)
{
if (checkName (node, "buy") == true)
{
std::vector<MerchantObject *> list;
parseMerchant (node, list);
//Now add to selling
for (std::vector<MerchantObject *>::const_iterator it = list.begin (); it != list.end (); it++)
{
npc->addBuyItem (*it);
}
npc->addConversation ("buy", "We have nice items for you", BUY_CONVERSATION, true);
npc->addConversation ("nothing_buy", "Oh sorry you have nothing that interests us");
}
} |