From 6a23f2e22e6d62823e29a29b5dd25b44004be391 Mon Sep 17 00:00:00 2001 From: cavesomething Date: Tue, 8 Jun 2010 14:57:42 +0000 Subject: [PATCH] Improve the check for recording nobles git-svn-id: svn://svn.code.sf.net/p/crossfire/code/maps/trunk@13377 282e977c-c81d-0410-88c4-b93c2d0d6712 --- python/maps/scorn/castle_write.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/maps/scorn/castle_write.py b/python/maps/scorn/castle_write.py index 7b5359e83..d66546729 100644 --- a/python/maps/scorn/castle_write.py +++ b/python/maps/scorn/castle_write.py @@ -29,7 +29,7 @@ lastrecord = nobledata.get_record(player.Name) Crossfire.Log(Crossfire.LogDebug, "castle_write: previous record %s, new record %s." % (lastrecord, currentrecord)) if lastrecord == 0: lastrecord = { '#' : player.Name, 'rank' : -10, 'title' : 'The Default' } -if currentrecord['rank'] > 0 and currentrecord['rank'] == int(lastrecord['rank']) and currentrecord['title'] == lastrecord['title']: +if (currentrecord['rank'] == 0) or (currentrecord['rank'] == int(lastrecord['rank']) and currentrecord['title'] == lastrecord['title']): Crossfire.Log(Crossfire.LogDebug, "castle_write, no update needed for player %s." % player.Name) else: Crossfire.Log(Crossfire.LogDebug, "castle_write, updating player %s, old state %s, new state %d" %(player.Name, lastrecord['rank'], currentstep))