Start ep now an argument of max-ep

Syntax is `<max-ep value="500" start-value="250" />`
This commit is contained in:
Mike Hoffert 2014-07-19 09:15:53 -06:00
parent 31def0dc1a
commit f22c96e503
1 changed files with 2 additions and 3 deletions

View File

@ -249,10 +249,9 @@ void UnitType::loaddd(int id,const string &dir, const TechTree *techTree,
addItemToVault(&(this->epRegeneration),this->epRegeneration);
//startEp
if(parametersNode->hasChild("start-ep")) {
if(parametersNode->getChild("max-ep")->hasAttribute("start-value")) {
//checkItemInVault(&(this->startEp),this->startEp);
startEp= parametersNode->getChild("start-ep")->getAttribute("value")->getIntValue();
startEp= parametersNode->getChild("max-ep")->getAttribute("start-value")->getIntValue();
}
addItemToVault(&(this->startEp),this->startEp);