OrionVeteran
Deity
If you want to add a little more safety to the function AI_unitUpdate, may I suggest:
Not making those exclusions can cause problems under certain situations.
As for the function doInquisitorCore_AI, may I suggest you check out the OIM.py file in OGI 3.09 to get a few ideas on how to improve the safety on it as well.
Code:
def AI_unitUpdate(self,argsList):
pUnit = argsList[0]
# Absinthe: start Inquisitor AI from Charlemagne (based on SoI)
iOwner = pUnit.getOwner()
[COLOR="Blue"]AIpPlayer = gc.getPlayer(iOwner)
if not AIpPlayer.isNone() and not AIpPlayer.isBarbarian() and not AIpPlayer.isHuman() and AIpPlayer.isAlive():[/COLOR]
if pUnit.getUnitType() == xml.iProsecutor:
return self.doInquisitorCore_AI(pUnit)
# Absinthe: end
return False
Not making those exclusions can cause problems under certain situations.
As for the function doInquisitorCore_AI, may I suggest you check out the OIM.py file in OGI 3.09 to get a few ideas on how to improve the safety on it as well.





