Let me ask you this though... is that built string:
Code:
szBuffer.Format(L"%d %s (%d) - [%d]", GC.getUnitCombatInfo(eUnitCombat).getDescription(), GC.getUnitInfo(eLoopUnit).getDescription(), iTurns, iI);
even used anywhere aside from to be what is saved as the unit is listed? The # of turns to completion will show up the same on multiple combat classes as it will on just one because it draws on data where the multiple combat classes have already been fully factored in.
If I could add a new line and display a breakdown for each and how the build modifiers are affecting the unit in each case individually it'd be worthwhile but without being able to use .append in that file (for whatever reason that is) it seems to me pointless that this string compile is even being used except to categorize the unit as one of those to be included in the list.
The lines
Code:
//gDLL->getInterfaceIFace()->popupAddGenericButton(pPopup, szBuffer, GET_PLAYER(pCity->getOwnerINLINE()).getUnitButton(eLoopUnit), iI, WIDGET_TRAIN, iI, pCity->getID(), true, POPUP_LAYOUT_STRETCH, DLL_FONT_LEFT_JUSTIFY );
//iNumBuilds++;
were suspiciously commented out at some point before I took a look at this last night and this would apparently indicate that the hover help (when you mouseover the particular selection) had been moved to a later point - muting the necessity of the built string in the first place.
So I look further down to find out where our szBuffer is being utilized later and I find, after what looks to be an employing of the szBuffer we built there to help 'sort' the list (perhaps by combat class then? - which would not really make any multiple combat class inclusion helpful since the unit can only be placed once in the list) the following:
Code:
if (pCity->canTrain(eLoopUnit))
{
int iTurns = pCity->getProductionTurnsLeft(eLoopUnit, 0);
szBuffer.Format(L"%s (%d)", GC.getUnitInfo(eLoopUnit).getDescription(), iTurns);
gDLL->getInterfaceIFace()->popupAddGenericButton(pPopup, szBuffer, GET_PLAYER(pCity->getOwnerINLINE()).getUnitButton(eLoopUnit), iOriginalIndex, WIDGET_TRAIN, iOriginalIndex, pCity->getID(), true, POPUP_LAYOUT_STRETCH, DLL_FONT_LEFT_JUSTIFY );
iNumBuilds++;
}
Which apparently re-formats the szBuffer entirely (overwriting the original) and sending up a hover pop display that differs completely from the original one that apparently was in use in VanillaBtS.
On the hover help you get when you're in the game, I can't see any reference to the unit combat classes in the hover text (except where the normal unit help creates them as a part of the hover) so it had already been removed, presumably, by this process.
So it
appears to me that it would be less than helpful to try to include all the unit's combat classes in this as its merely a sorting mechanism.
But I could be reading some of the code between these posted examples incorrectly as I'm not 100% clear on what all the lines there accomplish.