Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ALL CREDITS TO ONESHOT FROM XTIBIA https://www.xtibia.com/forum/topic/190356-op%C3%A7%C3%A3o-manager-no-vocationsxml/
- Em vocations.h, procure por:
- bool attackable, needPremium;
- Substitua:
- bool attackable, needPremium, manager;
- Procure por:
- bool isPremiumNeeded() const {return needPremium;}
- void setNeedPremium(bool v) {needPremium = v;}
- Adicione logo abaixo:
- bool isManagerOption() const {return manager;}
- void setAsManagerOption(bool v) {manager = v;}
- Agora em vocations.cpp, procure por:
- if(readXMLString(p, "needpremium", strValue))
- voc->setNeedPremium(booleanString(strValue));
- Logo abaixo adicione:
- if(readXMLString(p, "accountmanager", strValue) || readXMLString(p, "manager", strValue))
- voc->setAsManagerOption(booleanString(strValue));
- Procure por:
- needPremium = false;
- Adicione logo abaixo:
- manager = true;
- E finalmente em player.cpp, procure por:
- if(it->first == it->second->getFromVocation() && it->first != 0)
- Substitua por:
- if(it->first == it->second->getFromVocation() && it->first != 0 && it->second->isManagerOption() == true)
- Logo abaixo, procure por:
- if(checkText(text, tmp) && it != Vocations::getInstance()->getLastVocation() && it->first == it->second->getFromVocation() && it->first != 0)
- Substitua por:
- if(checkText(text, tmp) && it != Vocations::getInstance()->getLastVocation() && it->first == it->second->getFromVocation() && it->first != 0 && it->second->isManagerOption() == true)
- Compile e teste.
- on vocations.xml you need to add manager="0" to disable a vocation or manager="1" to enable it
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement