Fix a bug causing tracebacks in /python/start/dragon_attune.py. If there was no player on the changer it ended up as None which resulted in a traceback.
git-svn-id: svn://svn.code.sf.net/p/crossfire/code/maps/trunk@11460 282e977c-c81d-0410-88c4-b93c2d0d6712master
parent
ae645b58e3
commit
0c4149180d
|
@ -39,11 +39,12 @@ changer = Crossfire.WhoAmI()
|
|||
aname = Crossfire.ScriptParameters()
|
||||
atype = getattr(Crossfire.AttackTypeNumber, aname.upper())
|
||||
player = changer
|
||||
while player.Archetype.Name != 'pl_dragon':
|
||||
while player and player.Archetype.Name != 'pl_dragon':
|
||||
player = player.Above
|
||||
force = player.CheckArchInventory('dragon_ability_force')
|
||||
force.Exp = atype
|
||||
player.Anim = animations[atype]
|
||||
player.Face = faces[atype]
|
||||
player.Title = '%s hatchling' % aname
|
||||
changer.Say("Your metabolism is now focused on me.")
|
||||
if player:
|
||||
force = player.CheckArchInventory('dragon_ability_force')
|
||||
force.Exp = atype
|
||||
player.Anim = animations[atype]
|
||||
player.Face = faces[atype]
|
||||
player.Title = '%s hatchling' % aname
|
||||
changer.Say("Your metabolism is now focused on me.")
|
||||
|
|
Loading…
Reference in New Issue