Thanks, i've made the changes you showed here, i'll have to test it tomorrow night now as it's getting late.No, its all contained in the CvUnit.cpp file. You basically need to add the same experience code found in the code I previously sent you to the airStrike method. So after the following line:
Code:pDefender->setDamage(iUnitDamage, getOwnerINLINE());
you need to add this:
Code:int iExperience = pDefender->defenseXPValue(); iExperience = range(iExperience, GC.getDefineINT("MIN_EXPERIENCE_PER_COMBAT"), GC.getDefineINT("MAX_EXPERIENCE_PER_COMBAT")); changeExperience(iExperience, pDefender->maxXPValue(), true, pPlot->getOwnerINLINE() == getOwnerINLINE(), !pDefender->isBarbarian());
Huh, one last part... you will need to add code to get experience from air bombing cities too...
So in airBomb you need add after the line:
Code:gDLL->getInterfaceIFace()->addMessage(getOwnerINLINE(), true, GC.getEVENT_MESSAGE_TIME(), szBuffer, "AS2D_BOMBARD", MESSAGE_TYPE_INFO, NULL, (ColorTypes)GC.getInfoTypeForString("COLOR_GREEN"), pCity->getX_INLINE(), pCity->getY_INLINE());
you need to add this:
Code:int iExperience = attackXPValue(); iExperience = range(iExperience, GC.getDefineINT("MIN_EXPERIENCE_PER_COMBAT"), GC.getDefineINT("MAX_EXPERIENCE_PER_COMBAT")); changeExperience(iExperience, maxXPValue(), true, pPlot->getOwnerINLINE() == getOwnerINLINE(), !pCity->isBarbarian());
Its dirty but it should work
Thanks again.