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()
|
aname = Crossfire.ScriptParameters()
|
||||||
atype = getattr(Crossfire.AttackTypeNumber, aname.upper())
|
atype = getattr(Crossfire.AttackTypeNumber, aname.upper())
|
||||||
player = changer
|
player = changer
|
||||||
while player.Archetype.Name != 'pl_dragon':
|
while player and player.Archetype.Name != 'pl_dragon':
|
||||||
player = player.Above
|
player = player.Above
|
||||||
force = player.CheckArchInventory('dragon_ability_force')
|
if player:
|
||||||
force.Exp = atype
|
force = player.CheckArchInventory('dragon_ability_force')
|
||||||
player.Anim = animations[atype]
|
force.Exp = atype
|
||||||
player.Face = faces[atype]
|
player.Anim = animations[atype]
|
||||||
player.Title = '%s hatchling' % aname
|
player.Face = faces[atype]
|
||||||
changer.Say("Your metabolism is now focused on me.")
|
player.Title = '%s hatchling' % aname
|
||||||
|
changer.Say("Your metabolism is now focused on me.")
|
||||||
|
|
Loading…
Reference in New Issue