westamastaflash
Lord Commander
- Joined
- Nov 1, 2007
- Messages
- 933
Python Error with the Wonder Spell.
CyPlayer object doesn't have a isHasTrait function, I think it's supposed to be just hasTrait
Code:
if iRnd == 62:
iUnit = gc.getInfoTypeForString('UNIT_SPIDERKIN')
CyInterface().addMessage(caster.getOwner(),True,25,CyTranslator().getText("TXT_KEY_MESSAGE_WONDER_SPIDERKIN", ()),'',1,'Art/Interface/Buttons/Units/Spiderkin.dds',ColorTypes(8),pPlot.getX(),pPlot.getY(),True,True)
if iUnit != -1:
newUnit = pPlayer.initUnit(iUnit, pPlot.getX(), pPlot.getY(), UnitAITypes.NO_UNITAI, DirectionTypes.DIRECTION_SOUTH)
if [B]pPlayer.isHasTrait(gc.getInfoTypeForString('TRAIT_SUMMONER')):[/B]
newUnit.setDuration(3)
else:
newUnit.setDuration(1)