cyther
Lord of the Dance
Ok, I still can't get it to work. I did your changes Jean but then got this:
Here is my new code. Did I do anything wrong?
Code:
File "CvEventManager", line 23, in onEvent
File "CvEventManager", line 213, in handle Event
File "CvEventManager", line 1911, in onCorporationSpread
Argunent Error: python argument types in Cyplayer.initTriggeredData(CyPlayer,tuple)
did not match C++ signature:
initTriggereddata(classCyplayer{lvalue}, int, bool, int, int, int, int, int, int, int, int, int)
Here is my new code. Did I do anything wrong?
Code:
def onCorporationSpread(self, argsList):
'Corporation Has Spread to a City'
iCorporation, iOwner, pSpreadCity = argsList
player = PyPlayer(iOwner)
iDragon = gc.getInfoTypeForString('CORPORATION_CULT_OF_THE_DRAGON')
if iCorporation == iDragon:
pPlayer = gc.getPlayer(iOwner)
iEvent = CvUtil.findInfoTypeNum(gc.getEventTriggerInfo, gc.getNumEventTriggerInfos(),'EVENTTRIGGER_CULT_SPREAD_1')
triggerData = pSpreadCity.initTriggeredData((iEvent, true, -1, -1, -1, iOwner, -1, -1, -1, -1, -1))
CyInterface().addMessage(pSpreadCity.getOwner(),True,25,CyTranslator().getText("TXT_KEY_MESSAGE_CULT_SPREAD_1", ()),'',1,'Art/Interface/Buttons/Corporations/CultoftheDragon.dds',ColorTypes(8),pPlot.getX(),pPlot.getY(),True,True)
pPlayer.setHasTech(gc.getInfoTypeForString('TECH_DRAGON_CALL'))
if (not self.__LOG_RELIGIONSPREAD):
return
CvUtil.pyPrint('%s has spread to Player %d Civilization %s city of %s'
%(gc.getCorporationInfo(iCorporation).getDescription(), iOwner, player.getCivilizationName(), pSpreadCity.getName()))