def post_expire(self, psdue): """ Execute an action right before a spell expires """ from wouso.core import scoring if psdue.spell.name == 'top-disguise': psdue.player.points = scoring.real_points(psdue.player) psdue.player.save()
def post_expire(sender, **kwargs): """ Execute an action right before a spell expires """ try: psdue = kwargs['psdue'] except: return from wouso.core import scoring if psdue.spell.name == 'top-disguise': psdue.player.points = scoring.real_points(psdue.player) psdue.player.save()