luigilc
Lua Learner
Heya, I need to edit sources of acc manager so it only allows you to choose from voc 1 to 4, since I have diferent vocations that can only be obtained after completing certain chalenges.
My problem is that the acc manager allows you to pick any vocation from the vocations.xml and I want it to only allow you to choose 1-4.
I think it's somewhere in :
or maybe here:
anyone can help me out?
My problem is that the acc manager allows you to pick any vocation from the vocations.xml and I want it to only allow you to choose 1-4.
I think it's somewhere in :
Lua:
if(g_config.getBool(ConfigManager::START_CHOOSEVOC))
{
talkState[9] = false;
talkState[11] = true;
bool firstPart = true;
for(VocationsMap::iterator it = Vocations::getInstance()->getFirstVocation(); it != Vocations::getInstance()->getLastVocation(); ++it)
{
if(it->first == it->second->getFromVocation() && it->first != 0)
{
if(firstPart)
{
msg << "What do you want to be... " << it->second->getDescription();
firstPart = false;
}
else if(it->first - 1 != 0)
msg << ", " << it->second->getDescription();
else
msg << " or " << it->second->getDescription() << ".";
}
}
}
Lua:
else if(talkState[11])
{
for(VocationsMap::iterator it = Vocations::getInstance()->getFirstVocation(); it != Vocations::getInstance()->getLastVocation(); ++it)
{
std::string tmp = asLowerCaseString(it->second->getName());
if(checkText(text, tmp) && it != Vocations::getInstance()->getLastVocation() && it->first == it->second->getFromVocation() && it->first != 0)
{
msg << "So you would like to be " << it->second->getDescription() << "... are you sure?";
managerNumber2 = it->first;
talkState[11] = false;
talkState[12] = true;
}
}