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
master
cavesomething 2010-06-08 14:57:42 +00:00
parent 83c7fcac20
commit 6a23f2e22e
1 changed files with 1 additions and 1 deletions

View File

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