I added an event handler to look at the "CityMadePurchase" event. Somewhere I determined that the parameters are:
function OnCityMadePurchase(owner:number, cityID:number, plotX:number, plotY:number, purchaseType, objectType)
I can see when I buy a unit the ObjectType == unitID (index) of the GameInfo.Units table.
The purchase type is large number that is not obvious what it is. Anytime I buy a unit I get the same number. Buying a tile I get a different number as expected.
Buying a building I get a 3rd number as expected.
The problem is I am unsure where these values came from and what to they represent.
Is it a reference to something? Is it an integer with different fields (subvalues)?
Anyone have a clue?
Thanks
function OnCityMadePurchase(owner:number, cityID:number, plotX:number, plotY:number, purchaseType, objectType)
I can see when I buy a unit the ObjectType == unitID (index) of the GameInfo.Units table.
The purchase type is large number that is not obvious what it is. Anytime I buy a unit I get the same number. Buying a tile I get a different number as expected.
Buying a building I get a 3rd number as expected.
The problem is I am unsure where these values came from and what to they represent.
Is it a reference to something? Is it an integer with different fields (subvalues)?
Anyone have a clue?
Thanks