[wpdev-commits] xmlscripts/scripts/commands who.py,1.8,1.9
Brought to you by:
rip,
thiagocorrea
From: Sebastian H. <dar...@us...> - 2004-10-04 18:25:54
|
Update of /cvsroot/wpdev/xmlscripts/scripts/commands In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27803/commands Modified Files: who.py Log Message: Skillgain and Who fixes Index: who.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/commands/who.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** who.py 4 Oct 2004 13:46:08 -0000 1.8 --- who.py 4 Oct 2004 18:24:32 -0000 1.9 *************** *** 45,48 **** --- 45,49 ---- # Player list increases by 22 pixels maxpages = (worldsocketcount + 9) / 10 + page = 0 serialcount = 0 *************** *** 56,62 **** gump.addPageButton( 240, 320, 0x0FC, 0x0FC, page - 1 ) upby = 22 ! skip = page * 10 skipped = 0 ! for serial in wholist[:]: if skipped < skip: skipped += 1 --- 57,64 ---- gump.addPageButton( 240, 320, 0x0FC, 0x0FC, page - 1 ) upby = 22 ! skip = (page - 1) * 10 skipped = 0 ! for serial in wholist: ! # Skip the first X players if skipped < skip: skipped += 1 *************** *** 65,72 **** --- 67,80 ---- if not serial: break + player = wolfpack.findchar( serial ) + if not player or not player.account or not player.socket: continue + # Skip invisible gms with a higher rank + if player.invisible and player.rank > socket.player.rank: + continue + # serialcount + 10 for callback, we will -10 there and look at wholist. gump.addButton( 20, 40 + upby, 0xFA5, 0xFA7, ( serialcount + 10 ) ) *************** *** 75,79 **** upby += 22 serialcount += 1 ! if serialcount == ((page * 10) - 1): break --- 83,87 ---- upby += 22 serialcount += 1 ! if serialcount >= 10: break |