allow attack boost to apply to self via attribute include-self="true"

This commit is contained in:
Mark Vejvoda
2011-11-04 04:51:12 +00:00
parent cbdde66999
commit db91ca6b9e
4 changed files with 86 additions and 57 deletions

View File

@@ -314,6 +314,17 @@ XmlAttribute *XmlNode::getAttribute(const string &name,bool mustExist) const {
return NULL;
}
bool XmlNode::hasAttribute(const string &name) const {
bool result = false;
for(unsigned int i = 0; i < attributes.size(); ++i) {
if(attributes[i]->getName() == name) {
result = true;
break;
}
}
return result;
}
XmlNode *XmlNode::getChild(unsigned int i) const {
assert(!superNode);
if(i >= children.size()) {