mirror of
https://github.com/glest/glest-source.git
synced 2025-08-19 14:41:23 +02:00
allow attack boost to apply to self via attribute include-self="true"
This commit is contained in:
@@ -112,6 +112,8 @@ public:
|
||||
|
||||
XmlAttribute *getAttribute(unsigned int i) const;
|
||||
XmlAttribute *getAttribute(const string &name,bool mustExist=true) const;
|
||||
bool hasAttribute(const string &name) const;
|
||||
|
||||
XmlNode *getChild(unsigned int i) const;
|
||||
XmlNode *getChild(const string &childName, unsigned int childIndex=0) const;
|
||||
vector<XmlNode *> getChildList(const string &childName) const;
|
||||
|
@@ -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()) {
|
||||
|
Reference in New Issue
Block a user