OnCityPopulationChanged event fires for training units in GS ?!

Serp

King
Joined
Apr 1, 2015
Messages
666
Hi,

it seems the event CityPopulationChanged is fired everytime a new unit is created in Gathering Storm (at least if the city has at least 2 citizen). This does not happen for base game nor Rise and Fall.

I don't own GS, so I can not test further, but maybe someone knows what and why this was changed? How to know if it really was a population change in the city, versus a trained unit?
 
Can confirm this bug seems to be real for both Events.CityPopulationChanged and GameEvents.OnCityPopulationChanged

GameEvents.OnCityPopulationChanged will show a value of '0' for the iPopulationChange argument when it fires under this condition, tho.

GameEvents.OnCityPopulationChanged(iPlayer, iCityID, iPopulationChange)
Events.CityPopulationChanged(iPlayer, iCityId, iTotalCityPopulation)

So even with this bug GameEvents.OnCityPopulationChanged should be safe to use when sorting for whether the 3rd argument is recieving a value of '0' from the gamecore.
 
Back
Top Bottom