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-b93c2d0d6712
master
anmaster 2009-02-12 09:28:12 +00:00
parent ae645b58e3
commit 0c4149180d
1 changed files with 8 additions and 7 deletions

View File

@ -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.")