Assert Failed
File: CvInfos.cpp
Line: 2514
Expression: false
Message:
/*****************************************************************************************************/
/** Author: TheLadiesOgre **/
/** Date: 21.09.2009 **/
/** ModComp: TLOTags **/
/** Reason Added: New Tag Definition **/
/** Notes: **/
/*****************************************************************************************************/
bool CvPromotionInfo::readPass3()
{
if (m_aszExtraXMLforPass3.size() < 1)
{
[b]FAssert(false);[/b]
return false;
}
m_iCivicPrereq = GC.getInfoTypeForString(m_aszExtraXMLforPass3[0]);
m_aszExtraXMLforPass3.clear();
return true;
}
/*****************************************************************************************************/
/** TheLadiesOgre; 21.09.2009; TLOTags **/
/*****************************************************************************************************/
/*****************************************************************************************************/
/** Author: Xienwolf (Imported by TheLadiesOgre) **/
/** Date: 1.10.2009 **/
/** ModComp: TLOTags **/
/** Reason Added: Allow bAutoAcquire & bMustMaintain **/
/** Notes: This is a direct import of code from FallFurther. **/
/*****************************************************************************************************/
if (isHasPromotion((PromotionTypes)iI) && GC.getPromotionInfo((PromotionTypes)iI).isMustMaintain() && !canAcquirePromotion((PromotionTypes)iI) && !m_pUnitInfo->getFreePromotions(iI))
{
setHasPromotion(((PromotionTypes)iI), false);
}
if (GC.getPromotionInfo((PromotionTypes)iI).isAutoAcquire() && canPromote((PromotionTypes)iI, -1))
{
promote(((PromotionTypes)iI), -1);
}
/*****************************************************************************************************/
/** TheLadiesOgre; 01.10.2009; TLOTags **/
/*****************************************************************************************************/
//
// Mongoose PromotionRefundFix BEGIN
//
int iLevel = pUnit->getLevel();
for (int iI = 0; iI < GC.getNumPromotionInfos(); iI++)
{
if (pUnit->isHasPromotion((PromotionTypes)iI) && !m_pUnitInfo->getFreePromotions(iI) && ((PromotionTypes)iI != (PromotionTypes)GC.getInfoTypeForString("PROMOTION_AGGRESSION")) && ((PromotionTypes)iI != (PromotionTypes)GC.getInfoTypeForString("PROMOTION_TENACITY")) && ((PromotionTypes)iI != (PromotionTypes)GC.getInfoTypeForString("PROMOTION_SEAFARING")))
{
if (isPromotionValid((PromotionTypes)iI) || ((PromotionTypes)iI == (PromotionTypes)GC.getInfoTypeForString("PROMOTION_COMBAT_EVENT")) || ((PromotionTypes)iI == (PromotionTypes)GC.getInfoTypeForString("PROMOTION_SHOCK_EVENT")) || ((PromotionTypes)iI == (PromotionTypes)GC.getInfoTypeForString("PROMOTION_COVER_EVENT")) || ((PromotionTypes)iI == (PromotionTypes)GC.getInfoTypeForString("PROMOTION_PINCH_EVENT")) || ((PromotionTypes)iI == (PromotionTypes)GC.getInfoTypeForString("PROMOTION_CITY_RAIDER_EVENT")) || ((PromotionTypes)iI == (PromotionTypes)GC.getInfoTypeForString("PROMOTION_DRILL_EVENT")) || ((PromotionTypes)iI == (PromotionTypes)GC.getInfoTypeForString("PROMOTION_CITY_GARRISON_EVENT")) || ((PromotionTypes)iI == (PromotionTypes)GC.getInfoTypeForString("PROMOTION_FLANKING_EVENT")))
{
setHasPromotion((PromotionTypes)iI, true);
}
else
{
iLevel--;
}
}
}
setLevel(iLevel);
//
// Mongoose PromotionRefundFix END
//
1>CvUnit.cpp(11307) : error C2296: '>=' : illegal, left operand has type 'int (__thiscall CvUnit::* )(void) const'
void CvUnit::changeNoXPCount(int iChange)
{
m_iNoXPCount += iChange;
[B]FAssert(getNoXPCount >= 0);[/B]
}
you are adding so many things now... you should really merge it with the better bts ai sources. It becomes difficult now for other modders. its hard for me to merge CvUnitAI.cpp
always the () missing........ do you really compile it (a debug dll) yourself?
![]()
I guess it has something do to with your CIV4UnitSchema.xml or source code related to it.
Please release stable modcomps.![]()
Please release stable modcomps.![]()
Icky, Cybah, your DLL is hardcoded? You could just insert a Python callback there and handle it that way. Or generalize the functionality into an XML tag even. It appears that you are trying to make certain promotions NOT advance a unit's level, so a simple <bNoLevelUp> tag would accomplish that. Though such promotions can probably be modeled as bNoXP and AutoAcquire under this new system, just tossing in some Prereq fields to apply them at the proper moments.
Anyway, those snippets you asked about are used to apply or remove promotions which the unit is allowed to gain, or no longer allowed to keep, if the promotions are tagged. Your code would be ideally merged into the same loop over all promotions should you maintain it as written to save a loop, but otherwise they don't really interact much.
What's up mate? Still alive?
Found another bug in your modcomp (every city starts with +4 celebrity (without real +4 happy)) - do not know, what is causing this (your stock bbai modcomp without additions)