1. We have added the ability to collapse/expand forum categories and widgets on forum home.
    Dismiss Notice
  2. All Civ avatars are brought back and available for selection in the Avatar Gallery! There are 945 avatars total.
    Dismiss Notice
  3. To make the site more secure, we have installed SSL certificates and enabled HTTPS for both the main site and forums.
    Dismiss Notice
  4. Civ6 is released! Order now! (Amazon US | Amazon UK | Amazon CA | Amazon DE | Amazon FR)
    Dismiss Notice
  5. Dismiss Notice
  6. Forum account upgrades are available for ad-free browsing.
    Dismiss Notice

Not sure if I found a bug from CyInfoInterface2

Discussion in 'Civ4 - Unofficial Patches' started by NotSoGood, Jan 30, 2010.

  1. NotSoGood

    NotSoGood Chieftain

    Jan 25, 2009
    While editing my mod's dll, I stumbled into this when adding a iHealth tag for improvements
    	python::class_<CvImprovementInfo, python::bases<CvInfoBase> >("CvImprovementInfo")
    		.def("getTilesPerGoody", &CvImprovementInfo::getTilesPerGoody, "int ()")
    		.def("getGoodyUniqueRange", &CvImprovementInfo::getGoodyUniqueRange, "int ()")
    		.def("getFeatureGrowthProbability", &CvImprovementInfo::getFeatureGrowthProbability, "int ()")
    		.def("getUpgradeTime", &CvImprovementInfo::getUpgradeTime, "int ()")
    		.def("getAirBombDefense", &CvImprovementInfo::getAirBombDefense, "int ()")
    		.def("getDefenseModifier", &CvImprovementInfo::getDefenseModifier, "int ()")
    		[COLOR="Red"].def("getHappiness", &CvImprovementInfo::[COLOR="Blue"]getDefenseModifier[/COLOR], "int ()")[/COLOR]
    		.def("getPillageGold", &CvImprovementInfo::getPillageGold, "int ()")
    		.def("getImprovementPillage", &CvImprovementInfo::getImprovementPillage, "int ()")
    		.def("getImprovementUpgrade", &CvImprovementInfo::getImprovementUpgrade, "int ()")
    I was just wondering, because every else has like "getHealth" and &CvImprovementInfo::getHealth, but somehow "getHappiness" has getDefenseModifier. I'm not even sure what these things do. This was from UP 1.4, so I'm sure it isn't fixed yet. Can anyone confirm if this is a bug or not?
  2. phungus420

    phungus420 Chieftain

    Mar 1, 2003
    That would definatly be a bug, yep. A typical cut and paste error, easy to do. The effect of which would be that when someone does a python call to see the Happiness from an improvement, the call will return the value of the defense modifier stored in the XML, instead of happiness.

Share This Page

Ebates: Get Paid to Shop