wpdev-commits Mailing List for Wolfpack Emu (Page 38)
Brought to you by:
rip,
thiagocorrea
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(14) |
Aug
(121) |
Sep
(256) |
Oct
(59) |
Nov
(73) |
Dec
(120) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(259) |
Feb
(381) |
Mar
(501) |
Apr
(355) |
May
(427) |
Jun
(270) |
Jul
(394) |
Aug
(412) |
Sep
(724) |
Oct
(578) |
Nov
(65) |
Dec
|
From: Sebastian H. <dar...@us...> - 2004-09-19 15:37:22
|
Update of /cvsroot/wpdev/wolfpack/network In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv504/network Modified Files: asyncnetio.cpp Log Message: fixfix Index: asyncnetio.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/network/asyncnetio.cpp,v retrieving revision 1.52 retrieving revision 1.53 diff -C2 -d -r1.52 -r1.53 *** asyncnetio.cpp 19 Sep 2004 15:34:29 -0000 1.52 --- asyncnetio.cpp 19 Sep 2004 15:37:13 -0000 1.53 *************** *** 272,275 **** --- 272,281 ---- bool cAsyncNetIOPrivate::consumeWriteBuf( Q_ULONG nbytes ) { + if ( nbytes > wsize ) + { + wsize = 0; + return false; + } + if ( nbytes <= 0 || nbytes > wsize ) return false; *************** *** 686,693 **** d->wba.setAutoDelete(TRUE); - if (d->ewba.count() == 0) { - return; - } - // Before we continue, we should guarantee no one writes packets to the buffer. QMutexLocker lock( &d->wmutex ); --- 692,695 ---- *************** *** 695,698 **** --- 697,705 ---- { QByteArray* a = d->ewba.first(); + + if (!a) { + break; + } + int nwritten; int i = 0; |
From: Sebastian H. <dar...@us...> - 2004-09-19 15:34:41
|
Update of /cvsroot/wpdev/wolfpack/network In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32489/network Modified Files: asyncnetio.cpp Log Message: Crashfix. Index: asyncnetio.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/network/asyncnetio.cpp,v retrieving revision 1.51 retrieving revision 1.52 diff -C2 -d -r1.51 -r1.52 *** asyncnetio.cpp 19 Sep 2004 04:00:35 -0000 1.51 --- asyncnetio.cpp 19 Sep 2004 15:34:29 -0000 1.52 *************** *** 685,688 **** --- 685,692 ---- d->wba.clear(); d->wba.setAutoDelete(TRUE); + + if (d->ewba.count() == 0) { + return; + } // Before we continue, we should guarantee no one writes packets to the buffer. |
From: Correa <thi...@us...> - 2004-09-19 05:07:14
|
Update of /cvsroot/wpdev/wolfpack In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7369 Modified Files: configure.py Log Message: Fixed typo for the freebsd platform Index: configure.py =================================================================== RCS file: /cvsroot/wpdev/wolfpack/configure.py,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** configure.py 10 Sep 2004 13:21:39 -0000 1.35 --- configure.py 19 Sep 2004 05:07:05 -0000 1.36 *************** *** 123,127 **** "/usr/local/include/mysql.h", \ "/usr/include/mysql.h" ] ! elif sys.platform == "freebsd4" or sys.platform == " freebsd5": MySQL_LIBSEARCHPATH = [ "/usr/local/lib/mysql/libmysqlclient*.so", \ "/usr/lib/mysql/libmysqlclient*.so", \ --- 123,127 ---- "/usr/local/include/mysql.h", \ "/usr/include/mysql.h" ] ! elif sys.platform == "freebsd4" or sys.platform == "freebsd5": MySQL_LIBSEARCHPATH = [ "/usr/local/lib/mysql/libmysqlclient*.so", \ "/usr/lib/mysql/libmysqlclient*.so", \ |
From: Sebastian H. <dar...@us...> - 2004-09-19 04:00:47
|
Update of /cvsroot/wpdev/wolfpack/network In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28823 Modified Files: asyncnetio.cpp uosocket.cpp Log Message: Network fixes Index: uosocket.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/network/uosocket.cpp,v retrieving revision 1.413 retrieving revision 1.414 diff -C2 -d -r1.413 -r1.414 *** uosocket.cpp 18 Sep 2004 04:26:26 -0000 1.413 --- uosocket.cpp 19 Sep 2004 04:00:35 -0000 1.414 *************** *** 169,173 **** // Once send, flush if in Debug mode #if defined(_DEBUG) ! Network::instance()->netIo()->flush( _socket ); #endif } --- 169,173 ---- // Once send, flush if in Debug mode #if defined(_DEBUG) ! //Network::instance()->netIo()->flush( _socket ); #endif } Index: asyncnetio.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/network/asyncnetio.cpp,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -d -r1.50 -r1.51 *** asyncnetio.cpp 19 Aug 2004 01:22:55 -0000 1.50 --- asyncnetio.cpp 19 Sep 2004 04:00:35 -0000 1.51 *************** *** 112,116 **** QSocketDevice* socket; // connection socket ! QPtrList<QByteArray> rba, wba; // list of read/write bufs Q_ULONG rsize, wsize; // read/write total buf size Q_ULONG rindex, windex; // read/write index --- 112,117 ---- QSocketDevice* socket; // connection socket ! // ewba is the encrypted write buffer ! QPtrList<QByteArray> rba, wba, ewba; // list of read/write bufs Q_ULONG rsize, wsize; // read/write total buf size Q_ULONG rindex, windex; // read/write index *************** *** 139,142 **** --- 140,144 ---- rba.setAutoDelete( TRUE ); wba.setAutoDelete( TRUE ); + ewba.setAutoDelete( TRUE ); } *************** *** 275,283 **** for ( ; ; ) { ! QByteArray* a = wba.first(); if ( windex + nbytes >= a->size() ) { nbytes -= a->size() - windex; ! wba.remove(); windex = 0; if ( nbytes == 0 ) --- 277,285 ---- for ( ; ; ) { ! QByteArray* a = ewba.first(); if ( windex + nbytes >= a->size() ) { nbytes -= a->size() - windex; ! ewba.remove(); windex = 0; if ( nbytes == 0 ) *************** *** 671,679 **** return; // Before we continue, we should guarantee no one writes packets to the buffer. QMutexLocker lock( &d->wmutex ); while ( !osBufferFull && d->wsize > 0 ) { ! QByteArray* a = d->wba.first(); int nwritten; int i = 0; --- 673,694 ---- return; + // Encrypt new packets + QByteArray *p = d->wba.first(); + while (p) { + // Encrypt the outgoing buffer + if ( d->encryption ) + d->encryption->serverEncrypt( p->data(), p->size() ); + d->ewba.append(p); + p = d->wba.next(); + } + d->wba.setAutoDelete(FALSE); + d->wba.clear(); + d->wba.setAutoDelete(TRUE); + // Before we continue, we should guarantee no one writes packets to the buffer. QMutexLocker lock( &d->wmutex ); while ( !osBufferFull && d->wsize > 0 ) { ! QByteArray* a = d->ewba.first(); int nwritten; int i = 0; *************** *** 697,708 **** j = 0; i += s; ! a = d->wba.next(); s = a ? a->size() : 0; } - // Encrypt the outgoing buffer - if ( d->encryption ) - d->encryption->serverEncrypt( out.data(), i ); - nwritten = d->socket->writeBlock( out.data(), i ); } --- 712,719 ---- j = 0; i += s; ! a = d->ewba.next(); s = a ? a->size() : 0; } nwritten = d->socket->writeBlock( out.data(), i ); } *************** *** 712,723 **** i = a->size() - d->windex; - // Encrypt the outgoing buffer - if ( d->encryption ) - d->encryption->serverEncrypt( a->data() + d->windex, i ); - nwritten = d->socket->writeBlock( a->data() + d->windex, i ); } ! if ( nwritten ) { if ( d->consumeWriteBuf( nwritten ) ) --- 723,730 ---- i = a->size() - d->windex; nwritten = d->socket->writeBlock( a->data() + d->windex, i ); } ! if ( nwritten > 0 ) { if ( d->consumeWriteBuf( nwritten ) ) |
From: Sebastian H. <dar...@us...> - 2004-09-19 04:00:05
|
Update of /cvsroot/wpdev/xmlscripts/scripts/system In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28549 Modified Files: makemenus.py Log Message: Fixes Index: makemenus.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/system/makemenus.py,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** makemenus.py 4 Sep 2004 15:15:47 -0000 1.26 --- makemenus.py 19 Sep 2004 03:59:46 -0000 1.27 *************** *** 162,166 **** gump.addTiledGump(10, 215, 150, 22, 2624) gump.addTiledGump(10, 300, 150, 22, 2624) ! gump.addCheckerTrans(10, 10, 510, 397) gump.addHtmlGump(10, 12, 510, 20, centerhtml % self.title) --- 162,166 ---- gump.addTiledGump(10, 215, 150, 22, 2624) gump.addTiledGump(10, 300, 150, 22, 2624) ! # gump.addCheckerTrans(10, 10, 510, 397) gump.addHtmlGump(10, 12, 510, 20, centerhtml % self.title) *************** *** 907,912 **** # Submenu ! elif response.button & 0x80000000: ! submenu = response.button & ~ 0x80000000 if submenu < len(self.submenus): self.submenus[submenu].send(player, arguments) --- 907,912 ---- # Submenu ! elif response.button & 0x01000000: ! submenu = response.button & ~ 0x01000000 if submenu < len(self.submenus): self.submenus[submenu].send(player, arguments) *************** *** 1045,1049 **** if actions + j < len(self.submenus): yoffset = 80 + 20 * j ! gump.addButton(15, yoffset, 4005, 4007, 0x80000000 | (actions + j)) gump.addText(50, yoffset + 3, self.submenus[actions + j].title, 0x480) actions += 9 --- 1045,1049 ---- if actions + j < len(self.submenus): yoffset = 80 + 20 * j ! gump.addButton(15, yoffset, 4005, 4007, 0x01000000 | (actions + j)) gump.addText(50, yoffset + 3, self.submenus[actions + j].title, 0x480) actions += 9 |
From: Sebastian H. <dar...@us...> - 2004-09-19 03:59:51
|
Update of /cvsroot/wpdev/xmlscripts/documentation/webroot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28532/webroot Modified Files: ChangeLog.wolfpack Log Message: issue fix Index: ChangeLog.wolfpack =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/documentation/webroot/ChangeLog.wolfpack,v retrieving revision 1.94 retrieving revision 1.95 diff -C2 -d -r1.94 -r1.95 *** ChangeLog.wolfpack 19 Sep 2004 01:47:45 -0000 1.94 --- ChangeLog.wolfpack 19 Sep 2004 03:59:41 -0000 1.95 *************** *** 36,39 **** --- 36,40 ---- - Fixed the trainmenu. - Added a say <text> command + - Fixed add and craft menus for the 3d client. * Misc. Changes: * Known Issues, Bugs, and Missing Features: |
From: Sebastian H. <dar...@us...> - 2004-09-19 03:59:30
|
Update of /cvsroot/wpdev/wolfpack In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28471 Modified Files: ChangeLog Log Message: issue fix Index: ChangeLog =================================================================== RCS file: /cvsroot/wpdev/wolfpack/ChangeLog,v retrieving revision 1.63 retrieving revision 1.64 diff -C2 -d -r1.63 -r1.64 *** ChangeLog 18 Sep 2004 21:10:39 -0000 1.63 --- ChangeLog 19 Sep 2004 03:59:20 -0000 1.64 *************** *** 29,32 **** --- 29,33 ---- - Complete LOS Rewrite (works much better and faster now) - Fixed persistency issue for dupe() and sql saves. + - Fixed issues with large packet and encryption. Wolfpack 12.9.10 Beta (10. September 2004) |
From: Sebastian H. <dar...@us...> - 2004-09-19 01:47:55
|
Update of /cvsroot/wpdev/xmlscripts/documentation/webroot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4407/webroot Modified Files: ChangeLog.wolfpack Log Message: hairstylist Index: ChangeLog.wolfpack =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/documentation/webroot/ChangeLog.wolfpack,v retrieving revision 1.93 retrieving revision 1.94 diff -C2 -d -r1.93 -r1.94 *** ChangeLog.wolfpack 18 Sep 2004 21:03:07 -0000 1.93 --- ChangeLog.wolfpack 19 Sep 2004 01:47:45 -0000 1.94 *************** *** 12,15 **** --- 12,16 ---- - Fishing now shows the success cliloc message correctly. - Fixed the dyable attribute for certain new items. + - Allowed more cloth resource types for tailoring. * Python Script Changes: - Removed weight from the info menu. *************** *** 31,34 **** --- 32,38 ---- - Fixed magic resistance penalty for the protection spell. - Fixed the mindamage/maxdamage for npcs. + - Fixed the barber vendor responding to all text. + - Rewrote the barber/hairstylist. + - Fixed the trainmenu. - Added a say <text> command * Misc. Changes: |
From: Sebastian H. <dar...@us...> - 2004-09-19 01:42:18
|
Update of /cvsroot/wpdev/xmlscripts/definitions/npcs/humans/vendors In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3540/npcs/humans/vendors Modified Files: barber.xml Log Message: hairstylist Index: barber.xml =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/definitions/npcs/humans/vendors/barber.xml,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** barber.xml 9 Sep 2004 03:19:38 -0000 1.6 --- barber.xml 19 Sep 2004 01:42:06 -0000 1.7 *************** *** 11,15 **** <npc id="barber_male"> <inherit>base_male</inherit> ! <title>the Barber</title> <basescript>speech.barber</basescript> <category>Vendors\Barber (Male)</category> --- 11,15 ---- <npc id="barber_male"> <inherit>base_male</inherit> ! <title>the Hairstylist</title> <basescript>speech.barber</basescript> <category>Vendors\Barber (Male)</category> *************** *** 19,23 **** <npc id="barber_female"> <inherit>base_female</inherit> ! <title>the Barber</title> <basescript>speech.barber</basescript> <category>Vendors\Barber (Female)</category> --- 19,23 ---- <npc id="barber_female"> <inherit>base_female</inherit> ! <title>the Hairstylist</title> <basescript>speech.barber</basescript> <category>Vendors\Barber (Female)</category> |
From: Sebastian H. <dar...@us...> - 2004-09-19 01:42:15
|
Update of /cvsroot/wpdev/xmlscripts/scripts/speech In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3491/speech Modified Files: barber.py Log Message: hairstylist Index: barber.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/speech/barber.py,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** barber.py 18 Sep 2004 15:02:45 -0000 1.14 --- barber.py 19 Sep 2004 01:42:01 -0000 1.15 *************** *** 13,463 **** import wolfpack.console ! prices = { ! # Remove ! 0x0000: 10, ! ! # Hair ! 0x203b: 10, ! 0x203c: 10, ! 0x203d: 10, ! 0x2044: 10, ! 0x2045: 10, ! 0x2046: 10, ! 0x2047: 10, ! 0x2048: 10, ! 0x2049: 10, ! 0x204a: 10, ! ! # Beards ! 0x203E: 10, ! 0x203F: 10, ! 0x2040: 10, ! 0x2041: 10, ! 0x204B: 10, ! 0x204C: 10, ! 0x204D: 10, ! #Hair dye ! 0x0e27: 50 ! } ! # 0x0171 *buy* ! def onSpeech( listener, speaker, text, keywords ): ! # Check if our name is in the beginning of the string ! if not text.lower().startswith( listener.name.lower() ) and not text.lower.startswith( 'vendor' ): ! return 0 ! if 369 not in keywords and 60 not in keywords: ! return 0 ! ! if ( speaker.distanceto( listener ) > 4 ): ! return 0 ! ! if ( abs( speaker.pos.z - listener.pos.z ) > 5 ): ! return 0 ! ! if speaker.id != 0x190 and speaker.id != 0x191: ! listener.say( "I can't cut your hair!" ) ! return 1 ! else: ! gump(listener, speaker ) ! ! # We only have one keyword ! def gump( listener, speaker ): ! gump = cGump( 0, 0, 0, 50, 50 ) ! gump.addBackground( 0x24a4, 425, 400 ) ! gump.startPage( 0 ) ! gump.addHtmlGump( 10, 30, 450, 20, '<basefont size="7" color="#336699"><center>Barber shop</center></basefont>' ) ! gump.addTilePic( 155, 31, 0xDFD ) ! ! gump.addPageButton( 40, 61, 0x4B9, 0x4BA, 0x11 ) ! gump.addHtmlGump( 60, 60, 100, 20, '<basefont color="#333333"><u>Hair</u></basefont>' ) ! ! gump.addPageButton( 40, 81, 0x4B9, 0x4BA, 0x31 ) ! gump.addHtmlGump( 60, 80, 100, 20, u'<basefont color="#333333"><u>Hair dye</u></basefont>' ) ! ! # Page Switches (only for men) ! if speaker.id == 0x190: ! gump.addPageButton( 190, 61, 0x4B9, 0x4BA, 0x21 ) ! gump.addHtmlGump( 210, 60, 100, 20, '<basefont color="#333333"><u>Beard</u></basefont>' ) ! ! # Hair ! addHairfarbePage( speaker, gump, 0x31, 0x0E27 ) # hair dye ! ! # Hair ! addHairPage( speaker, gump, 0x11, 0x203B ) # Short Hair ! addHairPage( speaker, gump, 0x12, 0x203C ) # Long Hair ! addHairPage( speaker, gump, 0x13, 0x203D ) # Ponytail ! addHairPage( speaker, gump, 0x14, 0x2044 ) # Mohawk ! addHairPage( speaker, gump, 0x15, 0x2045 ) # Pageboy ! addHairPage( speaker, gump, 0x16, 0x2046 ) # Buns hair ! addHairPage( speaker, gump, 0x17, 0x2047 ) # Afro ! addHairPage( speaker, gump, 0x18, 0x2048 ) # Receding hair ! addHairPage( speaker, gump, 0x19, 0x2049 ) # 2 pig-tails ! addHairPage( speaker, gump, 0x1A, 0x204a ) # Krisna Hair ! addHairPage( speaker, gump, 0x1B, 0x0000 ) # None ! ! if speaker.id == 0x190: ! # Beard ! gump.startPage( 0x21 ) ! ! # BEARDS ! addBeardPage( speaker, gump, 0x21, 0x203E ) # Long Beard ! addBeardPage( speaker, gump, 0x22, 0x203F ) # Short Beard ! addBeardPage( speaker, gump, 0x23, 0x2040 ) # Goatee ! addBeardPage( speaker, gump, 0x24, 0x2041 ) # Mustache ! addBeardPage( speaker, gump, 0x25, 0x204B ) # Med Short Beard ! addBeardPage( speaker, gump, 0x26, 0x204C ) # Med Long Beard ! addBeardPage( speaker, gump, 0x27, 0x204D ) # Vandyke ! addBeardPage( speaker, gump, 0x28, 0x0000 ) # None ! ! gump.startPage( 0 ) ! gump.addButton( 350, 335, 2119, 2120, 0 ) # Cancel ! ! gump.setCallback( "speech.barber.gump_callback" ) ! gump.setArgs( [ listener.serial ] ) ! gump.send( speaker ) ! ! return 1 ! ! def addHairfarbePage( char, gump, page, id ): ! gump.startPage( page ) ! addHairfarbeButtons( gump, page & 0x000F ) ! gump.addResizeGump( 200, 95, 0x2486, 190, 225 ) ! ! gump.addTilePic( 260, 200, 0x0E27 ) ! ! # Ok button for this page ! gump.addButton( 208, 292, 0x850, 0x851, id | 0x2000 ) ! gump.addHtmlGump( 275, 292, 150, 20, '<basefont color="#336699"><u>Price:</u><basefont color="#333333"> %i goldcoins</basefont></basefont>' % prices[ id ] ) ! ! ! ! def addHairPage( char, gump, page, id ): ! gump.startPage( page ) ! addHairButtons( gump, page & 0x000F ) ! gump.addResizeGump( 200, 95, 0x2486, 190, 225 ) ! ! haircolor = getHairColor( char ) ! ! # Add a colored base body ! if char.id == 0x190: ! gump.addGump( 200, 60, 0xC, char.skin ) ! gump.addGump( 200, 60, 0xC503 ) # Fancy Shirt ! gump.addGump( 200, 60, 0xC4FF ) # Long Pants ! gump.addGump( 200, 60, 0xC52D ) # Boots ! if id != 0: ! gump.addGump( 200, 60, getHairGump( id ), haircolor ) ! ! beard = char.itemonlayer( 16 ) ! if beard: ! gumpid = getBeardGump( beard.id ) ! if gumpid != 0: ! gump.addGump( 200, 60, gumpid, beard.color ) ! else: ! gump.addGump( 200, 60, 0xD, char.skin ) ! gump.addGump( 200, 60, 0xEC3D ) # Boots ! gump.addGump( 200, 60, 0xC511 ) # Skirt ! gump.addGump( 200, 60, 0xEC13 ) # Fancy Shirt ! ! if id != 0: ! gump.addGump( 200, 60, getHairGump( id )+10000, haircolor ) ! ! # Ok button for this page ! gump.addButton( 208, 292, 0x850, 0x851, id | 0x4000 ) # 0x4000 = Hair ! gump.addHtmlGump( 275, 292, 150, 20, '<basefont color="#336699"><u>Price:</u><basefont color="#333333"> %i goldcoins</basefont></basefont>' % prices[ id ] ) ! ! # Detail page for a certain beard ! def addBeardPage( char, gump, page, id ): ! gump.startPage( page ) ! addBeardButtons( gump, page & 0x000F ) ! gump.addResizeGump( 200, 95, 0x2486, 190, 225 ) ! ! beardcolor = getBeardColor( char ) ! ! # Add a colored base body ! gump.addGump( 200, 60, 0xC, char.skin ) ! gump.addGump( 200, 60, 0xC503 ) # Fancy Shirt ! gump.addGump( 200, 60, 0xC4FF ) # Long Pants ! gump.addGump( 200, 60, 0xC52D ) # Boots ! if id != 0: ! gump.addGump( 200, 60, getBeardGump( id ), beardcolor ) ! ! hair = char.itemonlayer( LAYER_HAIR ) ! if hair: ! gumpid = getHairGump( hair.id ) ! if gumpid != 0: ! gump.addGump( 200, 60, gumpid, hair.color ) ! ! # Ok button for this page ! gump.addButton( 208, 292, 0x850, 0x851, id | 0x8000 ) # 0x8000 = Beard ! gump.addHtmlGump( 275, 292, 150, 20, '<basefont color="#336699"><u>Price:</u><basefont color="#333333"> %i goldcoins</basefont></basefont>' % prices[ id ] ) ! ! # Get a valid hair color ! def getHairColor( char ): ! hair = char.itemonlayer( LAYER_HAIR ) ! if hair: ! return hair.color ! ! beard = char.itemonlayer( 16 ) ! if beard: ! return beard.color ! ! return 0 ! ! # Get a valid hair color ! def getBeardColor( char ): ! beard = char.itemonlayer( 16 ) ! if beard: ! return beard.color ! ! hair = char.itemonlayer( LAYER_HAIR ) ! if hair: ! return hair.color ! ! return 0 ! ! # Buttons for Haircolor Types ! def addHairfarbeButtons( gump, active=0 ): ! if active == 1: ! gump.addGump( 40, 101, 0x4BA ) ! else: ! gump.addPageButton( 40, 101, 0x4B9, 0x4BA, 0x31 ) ! gump.addHtmlGump( 60, 100, 100, 20, u'Hair dye' ) ! ! # Buttons for Hair Types ! def addHairButtons( gump, active=0 ): ! if active == 1: ! gump.addGump( 40, 101, 0x4BA ) ! else: ! gump.addPageButton( 40, 101, 0x4B9, 0x4BA, 0x11 ) ! gump.addHtmlGump( 60, 100, 100, 20, 'Short Hair' ) ! ! if active == 2: ! gump.addGump( 40, 121, 0x4BA ) ! else: ! gump.addPageButton( 40, 121, 0x4B9, 0x4BA, 0x12 ) ! gump.addHtmlGump( 60, 120, 100, 20, 'Long Hair' ) ! ! if active == 3: ! gump.addGump( 40, 141, 0x4BA ) ! else: ! gump.addPageButton( 40, 141, 0x4B9, 0x4BA, 0x13 ) ! gump.addHtmlGump( 60, 140, 100, 20, 'Ponytail' ) ! ! if active == 4: ! gump.addGump( 40, 161, 0x4BA ) ! else: ! gump.addPageButton( 40, 161, 0x4B9, 0x4BA, 0x14 ) ! gump.addHtmlGump( 60, 160, 100, 20, 'Mohawk' ) ! ! if active == 5: ! gump.addGump( 40, 181, 0x4BA ) ! else: ! gump.addPageButton( 40, 181, 0x4B9, 0x4BA, 0x15 ) ! gump.addHtmlGump( 60, 180, 100, 20, 'Pageboy' ) ! ! if active == 6: ! gump.addGump( 40, 201, 0x4BA ) ! else: ! gump.addPageButton( 40, 201, 0x4B9, 0x4BA, 0x16 ) ! gump.addHtmlGump( 60, 200, 100, 20, 'Buns hair' ) ! ! if active == 7: ! gump.addGump( 40, 221, 0x4BA ) ! else: ! gump.addPageButton( 40, 221, 0x4B9, 0x4BA, 0x17 ) ! gump.addHtmlGump( 60, 220, 100, 20, 'Afro' ) ! ! if active == 8: ! gump.addGump( 40, 241, 0x4BA ) ! else: ! gump.addPageButton( 40, 241, 0x4B9, 0x4BA, 0x18 ) ! gump.addHtmlGump( 60, 240, 100, 20, 'Receding hair' ) ! ! if active == 9: ! gump.addGump( 40, 261, 0x4BA ) else: ! gump.addPageButton( 40, 261, 0x4B9, 0x4BA, 0x19 ) ! gump.addHtmlGump( 60, 260, 100, 20, '2 pig-tails' ) ! if active == 10: ! gump.addGump( 40, 281, 0x4BA ) ! else: ! gump.addPageButton( 40, 281, 0x4B9, 0x4BA, 0x1A ) ! gump.addHtmlGump( 60, 280, 100, 20, 'Krisna Hair' ) ! if active == 11: ! gump.addGump( 40, 301, 0x4BA ) ! else: ! gump.addPageButton( 40, 301, 0x4B9, 0x4BA, 0x1B ) ! gump.addHtmlGump( 60, 300, 100, 20, 'None' ) ! # Buttons for Beard Types ! def addBeardButtons( gump, active=0 ): ! if active == 1: ! gump.addGump( 40, 101, 0x4BA ) ! else: ! gump.addPageButton( 40, 101, 0x4B9, 0x4BA, 0x21 ) ! gump.addHtmlGump( 60, 100, 100, 20, 'Long Beard' ) ! if active == 2: ! gump.addGump( 40, 121, 0x4BA ) ! else: ! gump.addPageButton( 40, 121, 0x4B9, 0x4BA, 0x22 ) ! gump.addHtmlGump( 60, 120, 100, 20, 'Short Beard' ) ! if active == 3: ! gump.addGump( 40, 141, 0x4BA ) else: ! gump.addPageButton( 40, 141, 0x4B9, 0x4BA, 0x23 ) ! gump.addHtmlGump( 60, 140, 100, 20, 'Goatee' ) ! if active == 4: ! gump.addGump( 40, 161, 0x4BA ) ! else: ! gump.addPageButton( 40, 161, 0x4B9, 0x4BA, 0x24 ) ! gump.addHtmlGump( 60, 160, 100, 20, 'Mustache' ) ! if active == 5: ! gump.addGump( 40, 181, 0x4BA ) else: ! gump.addPageButton( 40, 181, 0x4B9, 0x4BA, 0x25 ) ! gump.addHtmlGump( 60, 180, 100, 20, 'Med Short Beard' ) ! if active == 6: ! gump.addGump( 40, 201, 0x4BA ) else: ! gump.addPageButton( 40, 201, 0x4B9, 0x4BA, 0x26 ) ! gump.addHtmlGump( 60, 200, 100, 20, 'Med Long Beard' ) ! ! if active == 7: ! gump.addGump( 40, 221, 0x4BA ) else: ! gump.addPageButton( 40, 221, 0x4B9, 0x4BA, 0x27 ) ! gump.addHtmlGump( 60, 220, 100, 20, 'Vandyke' ) ! if active == 8: ! gump.addGump( 40, 241, 0x4BA ) else: ! gump.addPageButton( 40, 241, 0x4B9, 0x4BA, 0x28 ) ! gump.addHtmlGump( 60, 240, 100, 20, 'None' ) ! beards = { ! 0x203E: 0xC671, ! 0x203F: 0xC672, ! 0x2040: 0xC670, ! 0x2041: 0xC673, ! 0x204B: 0xC6D8, ! 0x204C: 0xC6D9, ! 0x204D: 0xC6DA ! } ! def getBeardGump( id ): ! if beards.has_key( id ): ! return beards[ id ] ! else: return 0 ! ! hairs = { ! 0x203B: 0xC60C, ! 0x203C: 0xC60D, ! 0x203D: 0xC60E, ! 0x2044: 0xC60F, ! 0x2045: 0xC616, ! 0x2046: 0xC618, ! 0x2047: 0xC6D4, ! 0x2048: 0xC6D5, ! 0x2049: 0xC6D6, ! 0x204A: 0xC6D7 ! } ! ! def getHairGump( id ): ! if hairs.has_key( id ): ! return hairs[ id ] ! else: return 0 ! ### Callback ! def gump_callback( char, args, response ): ! if response.button == 0: ! return ! # Check if the vendor is ok ! vendor = wolfpack.findchar( args[0] ) ! if not vendor: ! return ! if vendor.distanceto( char ) > 5: ! vendor.say( "I can't cut your hair from here!" ) ! char.socket.sysmessage( "You can't reach the vendor." ) ! return ! type = response.button & 0xF000 ! id = response.button & 0x0FFF ! if (id <> 0x0e27) and not id == 0x0000: ! id = id | 0x2000 ! if not prices.has_key( id ): ! vendor.say( "I can't cut your hair in this way!" ) return ! ! price = prices[ id ] ! ! if char.countresource( 0xeed, 0 ) < price: ! vendor.say( "You don't have enough money!" ) return ! ! char.useresource( price, 0xeed, 0 ) ! char.soundeffect( 0x37, 0 ) ! vendor.say( "That makes %i gold coins." % price ) ! ! color = 0 ! ! # Hairfarbe ! if type == 0x2000: ! backpack = char.getbackpack() ! item = wolfpack.additem( "e27" ) ! backpack.additem( item ) ! item.update() ! ! # Hair ! if type == 0x6000 or type == 0x4000: ! # Remove old hair ! color = getHairColor( char ) ! hair = char.itemonlayer( LAYER_HAIR ) ! if hair: ! hair.delete() ! ! # Beard ! elif type == 0xa000 or type == 0x8000: ! if char.id == 0x191: ! char.socket.sysmessage( "You can't get a beard." ) ! return ! ! # Remove old beard ! color = getBeardColor( char ) ! beard = char.itemonlayer( 16 ) ! if beard: ! beard.delete() ! ! else: return ! # None ! if id == 0: return ! ! item = wolfpack.additem( "%x" % id ) ! if not item: ! char.message( "Invalid defintion: %x\n" % id ) return ! ! item.color = color ! char.equip( item ) ! --- 13,386 ---- import wolfpack.console ! # Gump Types ! TYPE_BUYGUMP = 259823146 ! TYPE_CHANGEHAIR = 259823147 ! TYPE_CHANGEHUE = 259823148 ! REGULAR = [ ! [ "*****", 1602, 26 ], ! [ "*****", 1628, 27 ], ! [ "*****", 1502, 32 ], ! [ "*****", 1302, 32 ], ! [ "*****", 1402, 32 ], ! [ "*****", 1202, 24 ], ! [ "*****", 2402, 29 ], ! [ "*****", 2213, 6 ], ! [ "*****", 1102, 8 ], ! [ "*****", 1110, 8 ], ! [ "*****", 1118, 16 ], ! [ "*****", 1134, 16 ], ! ] ! BRIGHT = [ ! [ "*****", 12, 10 ], ! [ "*****", 32, 5 ], ! [ "*****", 38, 8 ], ! [ "*****", 54, 3 ], ! [ "*****", 62, 10 ], ! [ "*****", 81, 2 ], ! [ "*****", 89, 2 ], ! [ "*****", 1153, 2 ], ! ] ! def changeHairHue(vendor, char, item, args): ! char.socket.closegump(TYPE_BUYGUMP) ! char.socket.closegump(TYPE_CHANGEHAIR) ! char.socket.closegump(TYPE_CHANGEHUE) ! ! price = item[1] ! if args[0] == 'all': ! layers = [LAYER_HAIR, LAYER_BEARD] ! elif args[0] == 'hair': ! layers = [LAYER_HAIR] ! elif args[0] == 'facial': ! layers = [LAYER_BEARD] ! if args[1] == 'regular': ! entries = REGULAR else: ! entries = BRIGHT ! ! gump = wolfpack.gumps.cGump() ! gump.setType(TYPE_CHANGEHUE) ! ! gump.startPage(0) ! gump.addResizeGump( 100, 10, 2600, 350, 370 ) ! gump.addResizeGump( 120, 54, 5100, 110, 270 ) ! gump.addXmfHtmlGump( 155, 25, 240, 30, 1011013, False, False ) # <center>Hair Color Selection Menu</center> ! gump.addXmfHtmlGump( 150, 330, 220, 35, 1011014, False, False ) # // Dye my hair this color! ! gump.addButton( 380, 330, 4005, 4007, 1 ) ! ! for i in range(0, len(entries)): ! gump.addText(130, 59 + i * 22, entries[i][0], entries[i][1] - 1) ! gump.addPageButton( 207, 60 + i * 22, 5224, 5224, 1 + i ) ! ! for i in range(0, len(entries)): ! gump.startPage(i + 1) ! for j in range(0, entries[i][2]): ! gump.addText(278 + (j / 16) * 80, 52 + (j % 16) * 17, entries[i][0], entries[i][1] + j - 1) ! gump.addRadioButton( 255 + (j / 16) * 80, 52 + (j % 16) * 17, 210, 211, j * len(entries) + i, False ) ! ! gump.setCallback('speech.barber.changehairhue_response') ! gump.setArgs([vendor.serial, entries, layers, price]) ! gump.send(char) ! ! def changehairhue_response(char, arguments, response): ! (vendor, entries, layers, price) = arguments ! vendor = wolfpack.findchar(vendor) ! ! if not vendor: ! return ! ! if response.button == 0 or len(response.switches) == 0: ! vendor.say(1013009, "", "", False, vendor.saycolor, char.socket) ! return ! ! # Get the hair color ! index = int(response.switches[0] % len(entries)) ! offset = int(response.switches[0] / len(entries)) ! ! if index >= len(entries): ! vendor.say(1013009, "", "", False, vendor.saycolor, char.socket) ! return ! ! if offset >= entries[index][2]: ! vendor.say(1013009, "", "", False, vendor.saycolor, char.socket) ! return ! hue = entries[index][1] + offset ! gold = char.getbackpack().countitems(['eed']) ! gold += char.getbankbox().countitems(['eed']) ! ! if price > gold and not char.gm: ! vendor.say(1042293, "", "", False, vendor.saycolor, char.socket) ! return ! ! found = False ! items = [] ! for layer in layers: ! item = char.itemonlayer(layer) ! if item: ! found = True ! items.append(item) ! ! if not found: ! vendor.say(502623, "", "", False, vendor.saycolor, char.socket) ! return ! ! if not char.gm: ! rest = char.getbackpack().removeitems(['eed'], arguments[3]) ! if rest != 0: ! char.getbankbox().removeitems(['eed'], rest) ! ! for item in items: ! item.color = hue ! item.update() ! ! # Entries ! HAIR = [ ! [ 50700, 70 - 137, 20 - 60, '203b' ], ! [ 60710, 193 - 260, 18 - 60, '2045' ], ! [ 50703, 316 - 383, 25 - 60, '2044' ], ! [ 60708, 70 - 137, 75 - 125, '203c' ], ! [ 60900, 193 - 260, 85 - 125, '2047' ], ! [ 60713, 320 - 383, 85 - 125, '204a' ], ! [ 60702, 70 - 137, 140 - 190, '203d' ], ! [ 60707, 193 - 260, 140 - 190, '2049' ], ! [ 60901, 315 - 383, 150 - 190, '2048' ], ! [ 0, 0, 0, None ], ! ] ! ! BEARDS = [ ! [ 50800, 120 - 187, 30 - 80, '2040' ], ! [ 50904, 243 - 310, 33 - 80, '204b' ], ! [ 50906, 120 - 187, 100 - 150, '204d' ], ! [ 50801, 243 - 310, 95 - 150, '203e' ], ! [ 50802, 120 - 187, 173 - 220, '203f' ], ! [ 50905, 243 - 310, 165 - 220, '204c' ], ! [ 50808, 120 - 187, 242 - 290, '2041' ], ! [ 0, 0, 0, None ], ! ] ! def changeHairStyle(vendor, char, item, args): ! char.socket.closegump(TYPE_BUYGUMP) ! char.socket.closegump(TYPE_CHANGEHAIR) ! char.socket.closegump(TYPE_CHANGEHUE) ! ! facial = args[0] == 'facial' ! ! if facial: ! entries = BEARDS ! tableWidth = 2 ! tableHeight = int((len(entries) + tableWidth - 1) / tableWidth) ! offsetWidth = 123 ! offsetHeight = 70 ! else: ! entries = HAIR ! tableWidth = 3 ! tableHeight = int((len(entries) + tableWidth - 2) / tableWidth) ! offsetWidth = 123 ! offsetHeight = 65 ! gump = wolfpack.gumps.cGump() ! gump.setType(TYPE_CHANGEHAIR) ! ! gump.startPage(0) ! gump.addResizeGump(0, 0, 2600, 81 + tableWidth * offsetWidth, 105 + tableHeight * offsetHeight ) ! gump.addButton( 45, 45 + tableHeight * offsetHeight, 4005, 4007, 1 ) ! gump.addXmfHtmlGump(77 , 45 + tableHeight * offsetHeight, 90, 50, 1006044, False, False) # Ok ! gump.addButton( 81 + tableWidth * offsetWidth - 180, 45 + tableHeight * offsetHeight, 4005, 4007, 0) ! gump.addXmfHtmlGump(81 + tableWidth * offsetWidth - 148 , 45 + tableHeight * offsetHeight, 90, 50, 1006045, False, False) # Cancel ! if facial: ! gump.addXmfHtmlGump( 55, 15, 200, 20, 1018354, False, False) # New Beard else: ! gump.addXmfHtmlGump( 50, 15, 350, 20, 1018353, False, False) # New Hairstyle ! ! ! for i in range(0, len(entries)): ! xTable = i % tableWidth ! yTable = i / tableWidth ! ! if entries[i][0] != 0: ! gump.addRadioButton( 40 + xTable * offsetWidth, 70 + yTable * offsetHeight, 208, 209, i, False ) ! gump.addResizeGump( 87 + xTable * offsetWidth, 50 + yTable * offsetHeight, 2620, 50, 50) ! gump.addGump( 87 + xTable * offsetWidth + entries[i][1], 50 + yTable * offsetHeight + entries[i][2], entries[i][0] ) ! elif facial: ! gump.addRadioButton( 40 + xTable * offsetWidth, 70 + yTable * offsetHeight, 208, 209, i, False ) ! gump.addXmfHtmlGump( 65 + xTable * offsetWidth, 70 + yTable * offsetHeight, 85, 35, 1011064, False, False) # Bald ! else: ! gump.addRadioButton( 40 + (xTable + 1) * offsetWidth, 240, 208, 209, i, False ) ! gump.addXmfHtmlGump( 65 + (xTable + 1) * offsetWidth, 240, 85, 35, 1011064, False, False) # Bald ! gump.setCallback('speech.barber.hairstyle_response') ! gump.setArgs([vendor.serial, entries, facial, item[1]]) ! gump.send(char) ! ! def hairstyle_response(char, arguments, response): ! vendor = wolfpack.findchar(arguments[0]) ! if not vendor: ! return ! ! if response.button == 0 or len(response.switches) == 0 or response.switches[0] >= len(arguments[1]): ! vendor.say(1013009, "", "", False, vendor.saycolor, char.socket) ! return ! ! item = arguments[1][response.switches[0]] ! facial = arguments[2] ! ! oldcolor = 0 ! if facial: ! current = char.itemonlayer(LAYER_BEARD) else: ! current = char.itemonlayer(LAYER_HAIR) ! ! if current: ! oldcolor = current.color else: ! if facial: ! other = char.itemonlayer(LAYER_HAIR) ! else: ! other = char.itemonlayer(LAYER_BEARD) ! if other: ! oldcolor = other.color ! ! if not current and not item[3] or current and current.baseid == item[3]: ! return ! # Gold? ! female = char.id == 0x191 ! gold = char.getbackpack().countitems(['eed']) ! gold += char.getbankbox().countitems(['eed']) ! ! if female and facial: ! vendor.say(1010639, "", "", False, vendor.saycolor, char.socket) ! return ! ! # Check if we can afford it ! if arguments[3] > gold and not char.gm: ! vendor.say(1042293, "", "", False, vendor.saycolor, char.socket) ! return ! ! rest = char.getbackpack().removeitems(['eed'], arguments[3]) ! if rest != 0: ! char.getbankbox().removeitems(['eed'], rest) ! ! if item[3]: ! newhair = wolfpack.additem(item[3]) ! ! if newhair: ! newhair.color = oldcolor ! if current: ! current.delete() ! if facial: ! char.additem(LAYER_BEARD, newhair) ! else: ! char.additem(LAYER_HAIR, newhair) ! newhair.update() else: ! if current: ! current.delete() ! # Cliloc Id, Price, Beard (True/False), function pointer, arguments ! sellList = [ ! [1018357, 50000, False, changeHairStyle, ['hair']], ! [1018358, 50000, True, changeHairStyle, ['facial']], ! [1018359, 50, False, changeHairHue, ['all', 'regular']], ! [1018360, 500000, False, changeHairHue, ['all', 'bright']], ! [1018361, 30000, False, changeHairHue, ['hair', 'regular']], ! [1018362, 30000, True, changeHairHue, ['facial', 'regular']], ! [1018363, 500000, False, changeHairHue, ['hair', 'bright']], ! [1018364, 500000, True, changeHairHue, ['facial', 'bright']], ! ] ! def onSpeech( listener, speaker, text, keywords ): ! # Check if our name is in the beginning of the string ! if not text.lower().startswith( listener.name.lower() ) and not text.lower().startswith( 'vendor' ): return 0 ! ! if 369 not in keywords and 60 not in keywords: return 0 + if ( speaker.distanceto( listener ) > 4 ): + return 0 ! if ( abs( speaker.pos.z - listener.pos.z ) > 5 ): ! return 0 ! if speaker.id != 0x190 and speaker.id != 0x191: ! listener.say("I can't cut your hair!") ! else: ! gump(listener, speaker) ! ! return True ! def gump( listener, speaker ): ! speaker.socket.closegump(TYPE_BUYGUMP) ! speaker.socket.closegump(TYPE_CHANGEHAIR) ! speaker.socket.closegump(TYPE_CHANGEHUE) ! ! female = speaker.id == 0x191 ! gold = speaker.getbackpack().countitems(['eed']) ! gold += speaker.getbankbox().countitems(['eed']) ! ! count = 0 ! ! for i in range(0, len(sellList)): ! item = sellList[i] ! if speaker.gm or (gold >= item[1] and (not female or not item[2])): ! count += 1 ! gump = wolfpack.gumps.cGump() ! gump.addResizeGump(50, 10, 2600, 450, 100 + count * 25) ! gump.startPage(0) ! gump.addXmfHtmlGump( 100, 40, 350, 20, 1018356, False, False) # Choose your hairstyle change: ! offset = 0 ! for i in range(0, len(sellList)): ! item = sellList[i] ! if not speaker.gm and (gold < item[1] or (female and item[2])): ! continue ! ! gump.addXmfHtmlGump(140, 75 + offset * 25, 360, 20, item[0], False, False) # Choose your hairstyle change: ! gump.addButton( 100, 75 + offset * 25, 4005, 4007, 1 + i) ! ! offset += 1 ! gump.setType(TYPE_BUYGUMP) ! gump.setArgs([listener.serial]) ! gump.setCallback("speech.barber.gump_response") ! gump.send(speaker) ! def gump_response(char, arguments, response): ! vendor = wolfpack.findchar(arguments[0]) ! if not vendor or vendor.distanceto(char) > 4: return ! ! if response.button == 0: return ! ! if response.button > len(sellList): return + + item = sellList[response.button - 1] ! female = char.id == 0x191 ! gold = char.getbackpack().countitems(['eed']) ! gold += char.getbankbox().countitems(['eed']) ! ! # Check if we can afford it ! if female and item[2]: ! vendor.say(1010639, "", "", False, vendor.saycolor, char.socket) return ! ! if item[1] > gold and not char.gm: ! vendor.say(1042293, "", "", False, vendor.saycolor, char.socket) return ! ! item[3](vendor, char, item, item[4]) |
From: Sebastian H. <dar...@us...> - 2004-09-18 21:23:13
|
Update of /cvsroot/wpdev/wolfpack In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20627 Modified Files: profile.h wolfpack.pro Log Message: Unix Makefile fixes. Index: profile.h =================================================================== RCS file: /cvsroot/wpdev/wolfpack/profile.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** profile.h 18 Sep 2004 21:10:40 -0000 1.1 --- profile.h 18 Sep 2004 21:22:59 -0000 1.2 *************** *** 20,24 **** }; ! #define ENABLE_PROFILING 0 #if defined(ENABLE_PROFILING) --- 20,24 ---- }; ! //#define ENABLE_PROFILING 0 #if defined(ENABLE_PROFILING) Index: wolfpack.pro =================================================================== RCS file: /cvsroot/wpdev/wolfpack/wolfpack.pro,v retrieving revision 1.210 retrieving revision 1.211 diff -C2 -d -r1.210 -r1.211 *** wolfpack.pro 31 Aug 2004 17:44:37 -0000 1.210 --- wolfpack.pro 18 Sep 2004 21:23:00 -0000 1.211 *************** *** 99,102 **** --- 99,103 ---- player.h \ preferences.h \ + profile.h \ progress.h \ pythonscript.h \ *************** *** 153,156 **** --- 154,158 ---- player.cpp \ preferences.cpp \ + profile.cpp \ pythonscript.cpp \ scriptmanager.cpp \ |
From: Sebastian H. <dar...@us...> - 2004-09-18 21:10:50
|
Update of /cvsroot/wpdev/wolfpack In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17868 Modified Files: ChangeLog console.cpp server.cpp serverconfig.cpp timing.cpp wolfpack.vcproj Added Files: profile.cpp profile.h Log Message: fixes --- NEW FILE: profile.h --- #if !defined(__PROFILE_H__) #define __PROFILE_H__ enum eProfileKeys { PF_NICENESS = 0, PF_SPAWNCHECK, PF_DECAYCHECK, PF_WORLDSAVE, PF_UOTIMECHECK, PF_COMBATCHECK, PF_TIMERSCHECK, PF_AICHECK, PF_NPCCHECK, PF_PLAYERCHECK, PF_REGENERATION, PF_AICHECKFINDACTION, PF_AICHECKEXECUTEACTION, PF_COUNT, }; #define ENABLE_PROFILING 0 #if defined(ENABLE_PROFILING) void startProfiling(eProfileKeys key); void stopProfiling(eProfileKeys key); void dumpProfilingInfo(); void clearProfilingInfo(); #else #define startProfiling(key) #define stopProfiling(key) #define dumpProfilingInfo() #define clearProfilingInfo() #endif #endif Index: serverconfig.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/serverconfig.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** serverconfig.cpp 14 Sep 2004 04:20:23 -0000 1.8 --- serverconfig.cpp 18 Sep 2004 21:10:40 -0000 1.9 *************** *** 201,206 **** pathfind4Follow_ = getBool( "Path Finding", "Activate for Following", true, true ); pathfind4Combat_ = getBool( "Path Finding", "Activate for Combat", false, true ); ! pathfindMaxIterations_ = getNumber( "Path Finding", "Maximum Iterations during Calculation", 100, true ); ! pathfindMaxSteps_ = getNumber( "Path Finding", "Maximum Steps for Calculation", 20, true ); pathfindFollowRadius_ = getNumber( "Path Finding", "Follow Radius", 10, true ); pathfindFollowMinCost_ = getDouble( "Path Finding", "Follow min. estimated Cost", 1.5, true ); --- 201,206 ---- pathfind4Follow_ = getBool( "Path Finding", "Activate for Following", true, true ); pathfind4Combat_ = getBool( "Path Finding", "Activate for Combat", false, true ); ! pathfindMaxIterations_ = getNumber( "Path Finding", "Maximum Iterations during Calculation", 45, true ); ! pathfindMaxSteps_ = getNumber( "Path Finding", "Maximum Steps for Calculation", 15, true ); pathfindFollowRadius_ = getNumber( "Path Finding", "Follow Radius", 10, true ); pathfindFollowMinCost_ = getDouble( "Path Finding", "Follow min. estimated Cost", 1.5, true ); Index: server.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/server.cpp,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** server.cpp 14 Sep 2004 00:00:38 -0000 1.22 --- server.cpp 18 Sep 2004 21:10:40 -0000 1.23 *************** *** 56,59 **** --- 56,60 ---- #include "multi.h" #include "persistentbroker.h" + #include "profile.h" // System Includes *************** *** 310,318 **** unsigned char cycles = 0; ! while ( isRunning() ) ! { // Every 10th cycle we sleep for a while and give other threads processing time. if ( ++cycles == 10 ) { cycles = 0; _save = PyEval_SaveThread(); // Python threading - start --- 311,322 ---- unsigned char cycles = 0; ! clearProfilingInfo(); ! ! while ( isRunning() ) { // Every 10th cycle we sleep for a while and give other threads processing time. if ( ++cycles == 10 ) { + startProfiling(PF_NICENESS); + cycles = 0; _save = PyEval_SaveThread(); // Python threading - start *************** *** 345,348 **** --- 349,354 ---- qApp->processEvents( 40 ); PyEval_RestoreThread( _save ); // Python threading - end + + stopProfiling(PF_NICENESS); } *************** *** 363,366 **** --- 369,374 ---- } + dumpProfilingInfo(); + } catch (wpException &exception) { Console::instance()->log(LOG_ERROR, exception.error() + "\n" ); Index: ChangeLog =================================================================== RCS file: /cvsroot/wpdev/wolfpack/ChangeLog,v retrieving revision 1.62 retrieving revision 1.63 diff -C2 -d -r1.62 -r1.63 *** ChangeLog 18 Sep 2004 18:50:23 -0000 1.62 --- ChangeLog 18 Sep 2004 21:10:39 -0000 1.63 *************** *** 17,21 **** - Fixed bug #0000253. (Invalid drop sound for items dropped to ground) - Fixed bug #0000309. (Console in web administration caused endless loop) - - Completely rewrote line of sight. - Fixed a crashbug related to trying to remove basescripts from objects. - Fixed a crasbhug related to players being removed and the owner property of their --- 17,20 ---- *************** *** 26,29 **** --- 25,30 ---- - Fixed bug #0000317. (Server not refusing to load even when accounts db corrupt) - Fixed bug #0000187. (Land and Static targets on height -1 were broken) + - Resolved an issue with extreme lag and NPC ai. + - Added a rudimentary method for profiling parts of the code. - Complete LOS Rewrite (works much better and faster now) - Fixed persistency issue for dupe() and sql saves. Index: wolfpack.vcproj =================================================================== RCS file: /cvsroot/wpdev/wolfpack/wolfpack.vcproj,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -d -r1.49 -r1.50 *** wolfpack.vcproj 16 Sep 2004 16:43:27 -0000 1.49 --- wolfpack.vcproj 18 Sep 2004 21:10:40 -0000 1.50 *************** *** 457,460 **** --- 457,466 ---- </File> <File + RelativePath=".\profile.cpp"> + </File> + <File + RelativePath=".\profile.h"> + </File> + <File RelativePath=".\progress.h"> </File> --- NEW FILE: profile.cpp --- #include "profile.h" #include "console.h" #if defined(ENABLE_PROFILING) const char *profileNames[PF_COUNT] = { "Niceness/PythonThreads", "Spawnregion Checks", "DecayCheck", "WorldSave", "UO Time Check", "Combat Check", "Timers Check", "AI Check", "NPC Check", "Player Check", "Regeneration Check", "AI Check\\Search New Action", "AI Check\\Execute Action", }; // Time in MS spent in the given profile keys unsigned int profileData[PF_COUNT]; unsigned int profileStart[PF_COUNT]; // Time spent from first to last profiling unsigned int startTime = 0; void startProfiling(eProfileKeys key) { Server::instance()->refreshTime(); unsigned int time = Server::instance()->time(); // Let's just say this has been the server start if (!startTime) { startTime = time; } profileStart[key] = time; } void stopProfiling(eProfileKeys key) { Server::instance()->refreshTime(); unsigned int time = Server::instance()->time(); unsigned int diff = time - profileStart[key]; profileData[key] += diff; } void clearProfilingInfo() { Server::instance()->refreshTime(); startTime = Server::instance()->time(); for (int i = 0; i < PF_COUNT; ++i) { profileData[i] = 0; } } void dumpProfilingInfo() { Server::instance()->refreshTime(); unsigned int total = Server::instance()->time() - startTime; Console::instance()->send("PROFILING INFORMATION:\n"); Console::instance()->send("TOTAL TIME: " + QString::number(total) + "\n"); for (int i = 0; i < PF_COUNT; ++i) { Console::instance()->send(profileNames[i]); Console::instance()->send(QString(": %1\n").arg(profileData[i])); } // Clear Profiling Info clearProfilingInfo(); } #endif Index: timing.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/timing.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** timing.cpp 9 Sep 2004 03:19:58 -0000 1.14 --- timing.cpp 18 Sep 2004 21:10:40 -0000 1.15 *************** *** 30,33 **** --- 30,34 ---- #include "timing.h" + #include "profile.h" #include "basics.h" *************** *** 88,93 **** --- 89,96 ---- if ( nextSpawnRegionCheck <= time ) { + startProfiling(PF_SPAWNCHECK); SpawnRegions::instance()->check(); nextSpawnRegionCheck = time + Config::instance()->spawnRegionCheckTime() * MY_CLOCKS_PER_SEC; + stopProfiling(PF_SPAWNCHECK); } *************** *** 95,98 **** --- 98,102 ---- if ( nextItemCheck <= time ) { + startProfiling(PF_DECAYCHECK); QValueVector<SERIAL> toRemove; DecayIterator it = decayitems.begin(); *************** *** 121,125 **** } ! nextItemCheck += 5000; } --- 125,131 ---- } ! nextItemCheck = time + 5000; ! ! stopProfiling(PF_DECAYCHECK); } *************** *** 127,130 **** --- 133,138 ---- if ( Config::instance()->saveInterval() ) { + startProfiling(PF_WORLDSAVE); + // Calculate the next worldsave based on the last worldsave unsigned int nextSave = lastWorldsave() + Config::instance()->saveInterval() * MY_CLOCKS_PER_SEC; *************** *** 134,137 **** --- 142,147 ---- World::instance()->save(); } + + stopProfiling(PF_WORLDSAVE); } *************** *** 141,144 **** --- 151,156 ---- if ( nextUOTimeTick <= time ) { + startProfiling(PF_UOTIMECHECK); + unsigned char oldhour = UoTime::instance()->hour(); UoTime::instance()->setMinutes( UoTime::instance()->getMinutes() + 1 ); *************** *** 189,196 **** --- 201,212 ---- currentLevel = newLevel; } + + stopProfiling(PF_UOTIMECHECK); } if ( nextCombatCheck <= time ) { + startProfiling(PF_COMBATCHECK); + nextCombatCheck = time + 250; *************** *** 221,224 **** --- 237,242 ---- } } + + stopProfiling(PF_COMBATCHECK); } *************** *** 234,238 **** --- 252,259 ---- } + startProfiling(PF_PLAYERCHECK); socket->player()->poll( time, events ); + stopProfiling(PF_PLAYERCHECK); + checkRegeneration( socket->player(), time ); checkPlayer( socket->player(), time ); *************** *** 258,262 **** --- 279,285 ---- checkRegeneration( npc, time ); checkNpc( npc, time ); + startProfiling(PF_NPCCHECK); npc->poll( time, events ); + stopProfiling(PF_NPCCHECK); break; } *************** *** 283,287 **** --- 306,312 ---- // Check the Timers + startProfiling(PF_TIMERSCHECK); Timers::instance()->check(); + stopProfiling(PF_TIMERSCHECK); if ( nextHungerCheck <= time ) *************** *** 297,300 **** --- 322,327 ---- } + startProfiling(PF_REGENERATION); + if ( character->regenHitpointsTime() <= time ) { *************** *** 349,356 **** --- 376,387 ---- } } + + stopProfiling(PF_REGENERATION); } void cTiming::checkPlayer( P_PLAYER player, unsigned int time ) { + startProfiling(PF_PLAYERCHECK); + cUOSocket* socket = player->socket(); *************** *** 401,404 **** --- 432,437 ---- } } + + stopProfiling(PF_PLAYERCHECK); } *************** *** 418,423 **** if ( npc->ai() && npc->aiCheckTime() <= time ) { ! npc->setAICheckTime( ( uint )( time + Config::instance()->checkAITime() * MY_CLOCKS_PER_SEC ) ); npc->ai()->check(); } --- 451,459 ---- if ( npc->ai() && npc->aiCheckTime() <= time ) { ! startProfiling(PF_AICHECK); ! unsigned int delay = RandomNum(250, 750); ! npc->setAICheckTime( time + delay ); npc->ai()->check(); + stopProfiling(PF_AICHECK); } Index: console.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/console.cpp,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** console.cpp 19 Aug 2004 01:22:51 -0000 1.24 --- console.cpp 18 Sep 2004 21:10:40 -0000 1.25 *************** *** 30,33 **** --- 30,34 ---- #include "pythonscript.h" #include "log.h" + #include "profile.h" #include "world.h" *************** *** 142,145 **** --- 143,150 ---- break; + case 'P': + dumpProfilingInfo(); + break; + case 'W': Console::instance()->send( "Current Users in the World:\n" ); |
From: Sebastian H. <dar...@us...> - 2004-09-18 21:10:50
|
Update of /cvsroot/wpdev/wolfpack/ai In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17868/ai Modified Files: ai.cpp ai.h ai_monsters.cpp Log Message: fixes Index: ai.h =================================================================== RCS file: /cvsroot/wpdev/wolfpack/ai/ai.h,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** ai.h 17 Sep 2004 23:28:17 -0000 1.14 --- ai.h 18 Sep 2004 21:10:40 -0000 1.15 *************** *** 191,196 **** protected: ! void moveTo( const Coord_cl& pos ); ! void movePath( const Coord_cl& pos ); int waitForPathCalculation; }; --- 191,196 ---- protected: ! bool moveTo( const Coord_cl& pos ); ! bool movePath( const Coord_cl& pos ); int waitForPathCalculation; }; *************** *** 277,286 **** --- 277,290 ---- { protected: + unsigned int nextTry; + Monster_Aggr_MoveToTarget() : Action_Wander() { + nextTry = 0; } public: Monster_Aggr_MoveToTarget( P_NPC npc, AbstractAI* ai ) : Action_Wander( npc, ai ) { + nextTry = 0; } virtual void execute(); Index: ai.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/ai/ai.cpp,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** ai.cpp 17 Sep 2004 23:28:16 -0000 1.29 --- ai.cpp 18 Sep 2004 21:10:40 -0000 1.30 *************** *** 41,44 **** --- 41,45 ---- #include "../network/uosocket.h" #include "../targetrequests.h" + #include "../profile.h" // library includes *************** *** 130,133 **** --- 131,135 ---- #endif + startProfiling(PF_AICHECKFINDACTION); // If we have no current action or our action cant be executed, we must get a new one if ( !m_currentAction || ( m_currentAction && m_currentAction->preCondition() <= 0.0f ) ) *************** *** 151,154 **** --- 153,157 ---- } } + stopProfiling(PF_AICHECKFINDACTION); // Action is changing *************** *** 162,165 **** --- 165,169 ---- // Now we should have a current action set, else do nothing! + startProfiling(PF_AICHECKEXECUTEACTION); if ( m_currentAction ) { *************** *** 180,183 **** --- 184,188 ---- } } + stopProfiling(PF_AICHECKEXECUTEACTION); } *************** *** 587,596 **** { P_CHAR pTarget = m_npc->wanderFollowTarget(); ! if ( pTarget ) ! { ! movePath( pTarget->pos() ); } - if ( pTarget->dist( m_npc ) > 3 ) - m_npc->setAICheckTime( ( uint )( Server::instance()->time() + ( float ) m_npc->aiCheckInterval() * 0.0005f * MY_CLOCKS_PER_SEC ) ); } else --- 592,605 ---- { P_CHAR pTarget = m_npc->wanderFollowTarget(); ! if (pTarget) { ! if ( m_npc->dist(pTarget) < 4 ) { ! movePath( pTarget->pos() ); ! } else { ! moveTo( pTarget->pos()); ! } ! ! if ( pTarget->dist( m_npc ) > 3 ) ! m_npc->setAICheckTime( ( uint )( Server::instance()->time() + ( float ) m_npc->aiCheckInterval() * 0.0005f * MY_CLOCKS_PER_SEC ) ); } } else *************** *** 606,610 **** case enDestination: { ! movePath( m_npc->wanderDestination() ); break; } --- 615,623 ---- case enDestination: { ! if (m_npc->pos().distance( m_npc->wanderDestination() ) < 6 ) { ! movePath( m_npc->wanderDestination() ); ! } else { ! moveTo( m_npc->wanderDestination() ); ! } break; } *************** *** 612,616 **** } ! void Action_Wander::moveTo( const Coord_cl& pos ) { // simply move towards the target --- 625,629 ---- } ! bool Action_Wander::moveTo( const Coord_cl& pos ) { // simply move towards the target *************** *** 637,651 **** if ( !mayWalk( m_npc, newPos ) ) { ! return; } } } ! Movement::instance()->Walking( m_npc, dir, 0xFF ); } ! void Action_Wander::movePath( const Coord_cl& pos ) { ! if ( ( waitForPathCalculation <= 0 && !m_npc->hasPath() ) || pos != m_npc->pathDestination() ) { Q_UINT8 range = 1; --- 650,664 ---- if ( !mayWalk( m_npc, newPos ) ) { ! return false; } } } ! return Movement::instance()->Walking( m_npc, dir, 0xFF ); } ! bool Action_Wander::movePath( const Coord_cl& pos ) { ! if ( waitForPathCalculation <= 0 && !m_npc->hasPath() ) { Q_UINT8 range = 1; *************** *** 661,664 **** --- 674,678 ---- m_npc->findPath( pos, range == 1 ? 1.5f : ( float ) range ); + // dont return here! } *************** *** 666,671 **** { waitForPathCalculation--; ! moveTo( pos ); ! return; } --- 680,684 ---- { waitForPathCalculation--; ! return moveTo( pos ); } *************** *** 675,687 **** Coord_cl nextmove = m_npc->nextMove(); Q_UINT8 dir = m_npc->pos().direction( nextmove ); ! Movement::instance()->Walking( m_npc, dir, 0xFF ); m_npc->popMove(); ! return; } else { waitForPathCalculation = 3; ! moveTo( pos ); ! return; } } --- 688,699 ---- Coord_cl nextmove = m_npc->nextMove(); Q_UINT8 dir = m_npc->pos().direction( nextmove ); ! bool result = Movement::instance()->Walking( m_npc, dir, 0xFF ); m_npc->popMove(); ! return result; } else { waitForPathCalculation = 3; ! return moveTo( pos ); } } Index: ai_monsters.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/ai/ai_monsters.cpp,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** ai_monsters.cpp 17 Sep 2004 20:40:23 -0000 1.22 --- ai_monsters.cpp 18 Sep 2004 21:10:40 -0000 1.23 *************** *** 296,314 **** void Monster_Aggr_MoveToTarget::execute() { Monster_Aggressive* pAI = dynamic_cast<Monster_Aggressive*>( m_ai ); ! if ( !pAI || !pAI->currentVictim() ) return; // Even if the victim is zero, thats correct. ! if ( pAI && !m_npc->attackTarget() ) ! { ! m_npc->fight( pAI->currentVictim() ); } ! if ( Config::instance()->pathfind4Combat() ) ! movePath( pAI->currentVictim()->pos() ); else ! moveTo( pAI->currentVictim()->pos() ); } --- 296,329 ---- void Monster_Aggr_MoveToTarget::execute() { + // We failed several times to reach the target so we wait + if (nextTry > Server::instance()->time()) { + return; + } + Monster_Aggressive* pAI = dynamic_cast<Monster_Aggressive*>( m_ai ); + if ( !pAI ) + return; ! P_CHAR currentVictim = pAI->currentVictim(); ! ! if ( !currentVictim ) { return; + } // Even if the victim is zero, thats correct. ! if ( !m_npc->attackTarget() ) { ! m_npc->fight( currentVictim ); } ! if ( Config::instance()->pathfind4Combat() && m_npc->dist(currentVictim) < 5 ) ! { ! if (!movePath( currentVictim->pos() )) { ! nextTry = Server::instance()->time() + RandomNum(1250, 2250); ! } ! } else ! { ! moveTo( currentVictim->pos() ); ! } } |
From: Klaus M. <nad...@us...> - 2004-09-18 21:06:50
|
Update of /cvsroot/wpdev/xmlscripts/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17060/scripts Modified Files: moongate.py Log Message: fix for Jhelom moongate Index: moongate.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/moongate.py,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** moongate.py 9 Jul 2004 21:47:45 -0000 1.12 --- moongate.py 18 Sep 2004 21:06:41 -0000 1.13 *************** *** 236,240 **** coord = [ 771, 754, 4, numWorld ] elif( ( button == 17 ) or ( button == 25 ) ): ! coord = [ 771, 754, 4, numWorld ] elif( button == 26 ): coord = [ 1216, 468, -13, 2 ] --- 236,240 ---- coord = [ 771, 754, 4, numWorld ] elif( ( button == 17 ) or ( button == 25 ) ): ! coord = [ 1499, 3772, 5, numWorld ] elif( button == 26 ): coord = [ 1216, 468, -13, 2 ] |
From: Klaus M. <nad...@us...> - 2004-09-18 21:03:16
|
Update of /cvsroot/wpdev/xmlscripts/scripts/commands In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16480/scripts/commands Added Files: say.py Log Message: say command --- NEW FILE: say.py --- #===============================================================# # ) (\_ | WOLFPACK 13.0.0 Scripts # # (( _/{ "-; | Created by: Naddel # # )).-' {{ ;'` | Revised by: # # ( ( ;._ \\ ctr | Last Modification: Created # #===============================================================# # .say Command # #===============================================================# import wolfpack def say( socket, command, arguments ): if len(arguments) == 0: socket.sysmessage( "Usage '.say <blabla>'" ) return True socket.sysmessage( "What should say that?" ) socket.attachtarget( "commands.say.saytarget", [ arguments ] ) def saytarget( char, args, target ): if target.char: if target.char.socket: target.char.say( "%s" % unicode(args[0]) ) return True if target.item: char.socket.showspeech( target.item, "%s" % unicode(args[0]) ) else: char.socket.sysmessage( "That's not a valid object." ) def onLoad(): wolfpack.registercommand( "say", say ) """ \command say \description Let a char say the text or show the text over an item. \usage - <code>say text</code> The text is shown over the chosen char or item. If the target is a char, the speechcolor of that char will be used. """ |
From: Klaus M. <nad...@us...> - 2004-09-18 21:03:16
|
Update of /cvsroot/wpdev/xmlscripts/definitions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16480/definitions Modified Files: scripts.xml Log Message: say command Index: scripts.xml =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/definitions/scripts.xml,v retrieving revision 1.163 retrieving revision 1.164 diff -C2 -d -r1.163 -r1.164 *** scripts.xml 7 Sep 2004 23:47:58 -0000 1.163 --- scripts.xml 18 Sep 2004 21:03:07 -0000 1.164 *************** *** 110,113 **** --- 110,114 ---- <script>commands.resurrect</script> <script>commands.serverinfo</script> + <script>commands.say</script> <script>commands.skillinfo</script> <script>commands.skill</script> |
From: Klaus M. <nad...@us...> - 2004-09-18 21:03:15
|
Update of /cvsroot/wpdev/xmlscripts/documentation/webroot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16480/documentation/webroot Modified Files: ChangeLog.wolfpack Log Message: say command Index: ChangeLog.wolfpack =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/documentation/webroot/ChangeLog.wolfpack,v retrieving revision 1.92 retrieving revision 1.93 diff -C2 -d -r1.92 -r1.93 *** ChangeLog.wolfpack 16 Sep 2004 18:45:43 -0000 1.92 --- ChangeLog.wolfpack 18 Sep 2004 21:03:07 -0000 1.93 *************** *** 31,34 **** --- 31,35 ---- - Fixed magic resistance penalty for the protection spell. - Fixed the mindamage/maxdamage for npcs. + - Added a say <text> command * Misc. Changes: * Known Issues, Bugs, and Missing Features: |
From: Sebastian H. <dar...@us...> - 2004-09-18 19:53:45
|
Update of /cvsroot/wpdev/xmlscripts/scripts/contextmenus In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3364/contextmenus Modified Files: trainmenu.py Log Message: fixes Index: trainmenu.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/contextmenus/trainmenu.py,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** trainmenu.py 18 Sep 2004 19:52:34 -0000 1.9 --- trainmenu.py 18 Sep 2004 19:53:36 -0000 1.10 *************** *** 72,76 **** sum = 0 ! skills = dropper.skills for i in range(0, ALLSKILLS): sum += skills[i] --- 72,76 ---- sum = 0 ! skills = dropper.skill for i in range(0, ALLSKILLS): sum += skills[i] |
From: Sebastian H. <dar...@us...> - 2004-09-18 19:52:43
|
Update of /cvsroot/wpdev/xmlscripts/scripts/contextmenus In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3197/contextmenus Modified Files: trainmenu.py Log Message: fixes Index: trainmenu.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/contextmenus/trainmenu.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** trainmenu.py 2 Jul 2004 13:40:46 -0000 1.8 --- trainmenu.py 18 Sep 2004 19:52:34 -0000 1.9 *************** *** 71,75 **** cap = wolfpack.settings.getnumber("General", "SkillCap", 700) * 10 ! sum = skills.totalskills( dropper ) if ( sum >= cap ): --- 71,78 ---- cap = wolfpack.settings.getnumber("General", "SkillCap", 700) * 10 ! sum = 0 ! skills = dropper.skills ! for i in range(0, ALLSKILLS): ! sum += skills[i] if ( sum >= cap ): |
From: spddmn <xxx...@us...> - 2004-09-18 18:50:33
|
Update of /cvsroot/wpdev/wolfpack In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23733 Modified Files: ChangeLog Log Message: changelog update Index: ChangeLog =================================================================== RCS file: /cvsroot/wpdev/wolfpack/ChangeLog,v retrieving revision 1.61 retrieving revision 1.62 diff -C2 -d -r1.61 -r1.62 *** ChangeLog 18 Sep 2004 04:26:25 -0000 1.61 --- ChangeLog 18 Sep 2004 18:50:23 -0000 1.62 *************** *** 26,29 **** --- 26,31 ---- - Fixed bug #0000317. (Server not refusing to load even when accounts db corrupt) - Fixed bug #0000187. (Land and Static targets on height -1 were broken) + - Complete LOS Rewrite (works much better and faster now) + - Fixed persistency issue for dupe() and sql saves. Wolfpack 12.9.10 Beta (10. September 2004) |
From: Richard M. <dr...@us...> - 2004-09-18 18:42:04
|
Update of /cvsroot/wpdev/wolfpack/python In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21983/python Modified Files: char.cpp Log Message: Conversion warning fix. Index: char.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/python/char.cpp,v retrieving revision 1.193 retrieving revision 1.194 diff -C2 -d -r1.193 -r1.194 *** char.cpp 16 Sep 2004 01:40:19 -0000 1.193 --- char.cpp 18 Sep 2004 18:41:55 -0000 1.194 *************** *** 161,165 **** wpChar* returnVal = PyObject_New( wpChar, &wpCharType ); returnVal->pChar = pChar; ! returnVal->py_account = NULL; returnVal->py_region = NULL; --- 161,165 ---- wpChar* returnVal = PyObject_New( wpChar, &wpCharType ); returnVal->pChar = pChar; ! returnVal->py_account = NULL; returnVal->py_region = NULL; *************** *** 168,172 **** returnVal->py_skillcap = NULL; returnVal->py_skilllock = NULL; ! return ( PyObject * ) returnVal; } --- 168,172 ---- returnVal->py_skillcap = NULL; returnVal->py_skilllock = NULL; ! return ( PyObject * ) returnVal; } *************** *** 2035,2039 **** if (pItem) { ! pItem = pItem->getOutmostItem(); if (pItem->container() && pItem->container()->isChar()) { --- 2035,2039 ---- if (pItem) { ! pItem = pItem->getOutmostItem(); if (pItem->container() && pItem->container()->isChar()) { *************** *** 2047,2051 **** Py_RETURN_FALSE; } ! targetPos = pItem->pos().losItemPoint(pItem->id()); } --- 2047,2051 ---- Py_RETURN_FALSE; } ! targetPos = pItem->pos().losItemPoint(pItem->id()); } *************** *** 2078,2082 **** } ! if (pos.distance(targetPos) > range) { Py_RETURN_FALSE; } --- 2078,2082 ---- } ! if ( (int)pos.distance(targetPos) > range ) { Py_RETURN_FALSE; } *************** *** 2840,2844 **** else if ( PyFloat_Check( value ) ) val = cVariant( PyFloat_AsDouble( value ) ); ! else if ( value == Py_True ) val = cVariant( 1 ); // True else if ( value == Py_False ) --- 2840,2844 ---- else if ( PyFloat_Check( value ) ) val = cVariant( PyFloat_AsDouble( value ) ); ! else if ( value == Py_True ) val = cVariant( 1 ); // True else if ( value == Py_False ) *************** *** 2853,2857 **** } ! return 0; } --- 2853,2857 ---- } ! return 0; } |
From: Sebastian H. <dar...@us...> - 2004-09-18 18:35:50
|
Update of /cvsroot/wpdev/xmlscripts/definitions/menus/crafting In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20610/menus/crafting Modified Files: tailoring.xml Log Message: More cloth allowed for making tailoring items. Index: tailoring.xml =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/definitions/menus/crafting/tailoring.xml,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** tailoring.xml 26 May 2004 13:45:35 -0000 1.6 --- tailoring.xml 18 Sep 2004 18:35:38 -0000 1.7 *************** *** 23,75 **** <tailor definition="1543" name="Skull Cap"> <tailoring min="0" max="250" /> ! <material id="1765;1766;1767;1768" amount="2" name="Cloth" /> </tailor> <tailor definition="153f" name="Bandana"> <tailoring min="0" max="250" /> ! <material id="1765;1766;1767;1768" amount="2" name="Cloth" /> </tailor> <tailor definition="1713" name="Floppy Hat"> <tailoring min="62" max="312" /> ! <material id="1765;1766;1767;1768" amount="11" name="Cloth" /> </tailor> <tailor definition="1715" name="Cap"> <tailoring min="-188" max="62" /> ! <material id="1765;1766;1767;1768" amount="11" name="Cloth" /> </tailor> <tailor definition="1714" name="Wide Brim Hat"> <tailoring min="62" max="312" /> ! <material id="1765;1766;1767;1768" amount="12" name="Cloth" /> </tailor> <tailor definition="1717" name="Straw Hat"> <tailoring min="62" max="312" /> ! <material id="1765;1766;1767;1768" amount="10" name="Cloth" /> </tailor> <tailor definition="1716" name="Tall Straw Hat"> <tailoring min="67" max="317" /> ! <material id="1765;1766;1767;1768" amount="13" name="Cloth" /> </tailor> <tailor definition="1718" name="Wizards Hat"> <tailoring min="72" max="322" /> ! <material id="1765;1766;1767;1768" amount="15" name="Cloth" /> </tailor> <tailor definition="1719" name="Bonnet"> <tailoring min="62" max="312" /> ! <material id="1765;1766;1767;1768" amount="11" name="Cloth" /> </tailor> <tailor definition="171a" name="Feathered Hat"> <tailoring min="62" max="312" /> ! <material id="1765;1766;1767;1768" amount="12" name="Cloth" /> </tailor> <tailor definition="171b" name="Tricorne Hat"> <tailoring min="62" max="312" /> ! <material id="1765;1766;1767;1768" amount="12" name="Cloth" /> </tailor> <tailor definition="172e" name="Jesters Hat"> <tailoring min="72" max="322" /> ! <material id="1765;1766;1767;1768" amount="15" name="Cloth" /> </tailor> <tailor definition="2305" name="Flower Garland"> <tailoring min="100" max="350" /> ! <material id="1765;1766;1767;1768" amount="5" name="Cloth" /> </tailor> </menu> --- 23,75 ---- <tailor definition="1543" name="Skull Cap"> <tailoring min="0" max="250" /> ! <material id="175d;175e;175f;1760;1761;1762;1763;1764;1765;1766;1767;1768" amount="2" name="Cloth" /> </tailor> <tailor definition="153f" name="Bandana"> <tailoring min="0" max="250" /> ! <material id="175d;175e;175f;1760;1761;1762;1763;1764;1765;1766;1767;1768" amount="2" name="Cloth" /> </tailor> <tailor definition="1713" name="Floppy Hat"> <tailoring min="62" max="312" /> ! <material id="175d;175e;175f;1760;1761;1762;1763;1764;1765;1766;1767;1768" amount="11" name="Cloth" /> </tailor> <tailor definition="1715" name="Cap"> <tailoring min="-188" max="62" /> ! <material id="175d;175e;175f;1760;1761;1762;1763;1764;1765;1766;1767;1768" amount="11" name="Cloth" /> </tailor> <tailor definition="1714" name="Wide Brim Hat"> <tailoring min="62" max="312" /> ! <material id="175d;175e;175f;1760;1761;1762;1763;1764;1765;1766;1767;1768" amount="12" name="Cloth" /> </tailor> <tailor definition="1717" name="Straw Hat"> <tailoring min="62" max="312" /> ! <material id="175d;175e;175f;1760;1761;1762;1763;1764;1765;1766;1767;1768" amount="10" name="Cloth" /> </tailor> <tailor definition="1716" name="Tall Straw Hat"> <tailoring min="67" max="317" /> ! <material id="175d;175e;175f;1760;1761;1762;1763;1764;1765;1766;1767;1768" amount="13" name="Cloth" /> </tailor> <tailor definition="1718" name="Wizards Hat"> <tailoring min="72" max="322" /> ! <material id="175d;175e;175f;1760;1761;1762;1763;1764;1765;1766;1767;1768" amount="15" name="Cloth" /> </tailor> <tailor definition="1719" name="Bonnet"> <tailoring min="62" max="312" /> ! <material id="175d;175e;175f;1760;1761;1762;1763;1764;1765;1766;1767;1768" amount="11" name="Cloth" /> </tailor> <tailor definition="171a" name="Feathered Hat"> <tailoring min="62" max="312" /> ! <material id="175d;175e;175f;1760;1761;1762;1763;1764;1765;1766;1767;1768" amount="12" name="Cloth" /> </tailor> <tailor definition="171b" name="Tricorne Hat"> <tailoring min="62" max="312" /> ! <material id="175d;175e;175f;1760;1761;1762;1763;1764;1765;1766;1767;1768" amount="12" name="Cloth" /> </tailor> <tailor definition="172e" name="Jesters Hat"> <tailoring min="72" max="322" /> ! <material id="175d;175e;175f;1760;1761;1762;1763;1764;1765;1766;1767;1768" amount="15" name="Cloth" /> </tailor> <tailor definition="2305" name="Flower Garland"> <tailoring min="100" max="350" /> ! <material id="175d;175e;175f;1760;1761;1762;1763;1764;1765;1766;1767;1768" amount="5" name="Cloth" /> </tailor> </menu> *************** *** 78,130 **** <tailor definition="1f7b" name="Doublet"> <tailoring min="0" max="250" /> ! <material id="1765;1766;1767;1768" amount="8" name="Cloth" /> </tailor> <tailor definition="1517" name="Shirt"> <tailoring min="207" max="457" /> ! <material id="1765;1766;1767;1768" amount="8" name="Cloth" /> </tailor> <tailor definition="1efd" name="Fancy Shirt"> <tailoring min="248" max="498" /> ! <material id="1765;1766;1767;1768" amount="12" name="Cloth" /> </tailor> <tailor definition="1fa1" name="Tunic"> <tailoring min="0" max="250" /> ! <material id="1765;1766;1767;1768" amount="12" name="Cloth" /> </tailor> <tailor definition="1fa1" name="Surcoat"> <tailoring min="82" max="332" /> ! <material id="1765;1766;1767;1768" amount="14" name="Cloth" /> </tailor> <tailor definition="1f01" name="Plain Dress"> <tailoring min="124" max="374" /> ! <material id="1765;1766;1767;1768" amount="10" name="Cloth" /> </tailor> <tailor definition="1eff" name="Fancy Dress"> <tailoring min="331" max="581" /> ! <material id="1765;1766;1767;1768" amount="12" name="Cloth" /> </tailor> <tailor definition="1515" name="Cloak"> <tailoring min="414" max="664" /> ! <material id="1765;1766;1767;1768" amount="14" name="Cloth" /> </tailor> <tailor definition="1f03" name="Robe"> <tailoring min="539" max="789" /> ! <material id="1765;1766;1767;1768" amount="16" name="Cloth" /> </tailor> <tailor definition="1f9f" name="Jester Suit"> <tailoring min="82" max="332" /> ! <material id="1765;1766;1767;1768" amount="24" name="Cloth" /> </tailor> <tailor definition="2309" name="Fur Cape"> <tailoring min="350" max="600" /> ! <material id="1765;1766;1767;1768" amount="13" name="Cloth" /> </tailor> <tailor definition="230d" name="Gilded Dress"> <tailoring min="375" max="625" /> ! <material id="1765;1766;1767;1768" amount="16" name="Cloth" /> </tailor> <tailor definition="230f" name="Formal Shirt"> <tailoring min="260" max="510" /> ! <material id="1765;1766;1767;1768" amount="16" name="Cloth" /> </tailor> </menu> --- 78,130 ---- <tailor definition="1f7b" name="Doublet"> <tailoring min="0" max="250" /> ! <material id="175d;175e;175f;1760;1761;1762;1763;1764;1765;1766;1767;1768" amount="8" name="Cloth" /> </tailor> <tailor definition="1517" name="Shirt"> <tailoring min="207" max="457" /> ! <material id="175d;175e;175f;1760;1761;1762;1763;1764;1765;1766;1767;1768" amount="8" name="Cloth" /> </tailor> <tailor definition="1efd" name="Fancy Shirt"> <tailoring min="248" max="498" /> ! <material id="175d;175e;175f;1760;1761;1762;1763;1764;1765;1766;1767;1768" amount="12" name="Cloth" /> </tailor> <tailor definition="1fa1" name="Tunic"> <tailoring min="0" max="250" /> ! <material id="175d;175e;175f;1760;1761;1762;1763;1764;1765;1766;1767;1768" amount="12" name="Cloth" /> </tailor> <tailor definition="1fa1" name="Surcoat"> <tailoring min="82" max="332" /> ! <material id="175d;175e;175f;1760;1761;1762;1763;1764;1765;1766;1767;1768" amount="14" name="Cloth" /> </tailor> <tailor definition="1f01" name="Plain Dress"> <tailoring min="124" max="374" /> ! <material id="175d;175e;175f;1760;1761;1762;1763;1764;1765;1766;1767;1768" amount="10" name="Cloth" /> </tailor> <tailor definition="1eff" name="Fancy Dress"> <tailoring min="331" max="581" /> ! <material id="175d;175e;175f;1760;1761;1762;1763;1764;1765;1766;1767;1768" amount="12" name="Cloth" /> </tailor> <tailor definition="1515" name="Cloak"> <tailoring min="414" max="664" /> ! <material id="175d;175e;175f;1760;1761;1762;1763;1764;1765;1766;1767;1768" amount="14" name="Cloth" /> </tailor> <tailor definition="1f03" name="Robe"> <tailoring min="539" max="789" /> ! <material id="175d;175e;175f;1760;1761;1762;1763;1764;1765;1766;1767;1768" amount="16" name="Cloth" /> </tailor> <tailor definition="1f9f" name="Jester Suit"> <tailoring min="82" max="332" /> ! <material id="175d;175e;175f;1760;1761;1762;1763;1764;1765;1766;1767;1768" amount="24" name="Cloth" /> </tailor> <tailor definition="2309" name="Fur Cape"> <tailoring min="350" max="600" /> ! <material id="175d;175e;175f;1760;1761;1762;1763;1764;1765;1766;1767;1768" amount="13" name="Cloth" /> </tailor> <tailor definition="230d" name="Gilded Dress"> <tailoring min="375" max="625" /> ! <material id="175d;175e;175f;1760;1761;1762;1763;1764;1765;1766;1767;1768" amount="16" name="Cloth" /> </tailor> <tailor definition="230f" name="Formal Shirt"> <tailoring min="260" max="510" /> ! <material id="175d;175e;175f;1760;1761;1762;1763;1764;1765;1766;1767;1768" amount="16" name="Cloth" /> </tailor> </menu> *************** *** 133,153 **** <tailor definition="152e" name="Short Pants"> <tailoring min="248" max="498" /> ! <material id="1765;1766;1767;1768" amount="6" name="Cloth" /> </tailor> <tailor definition="1539" name="Long Pants"> <tailoring min="248" max="498" /> ! <material id="1765;1766;1767;1768" amount="8" name="Cloth" /> </tailor> <tailor definition="1537" name="Kilt"> <tailoring min="207" max="457" /> ! <material id="1765;1766;1767;1768" amount="8" name="Cloth" /> </tailor> <tailor definition="1516" name="Skirt"> <tailoring min="290" max="540" /> ! <material id="1765;1766;1767;1768" amount="10" name="Cloth" /> </tailor> <tailor definition="230b" name="Fur Sarong"> <tailoring min="350" max="600" /> ! <material id="1765;1766;1767;1768" amount="12" name="Cloth" /> </tailor> </menu> --- 133,153 ---- <tailor definition="152e" name="Short Pants"> <tailoring min="248" max="498" /> ! <material id="175d;175e;175f;1760;1761;1762;1763;1764;1765;1766;1767;1768" amount="6" name="Cloth" /> </tailor> <tailor definition="1539" name="Long Pants"> <tailoring min="248" max="498" /> ! <material id="175d;175e;175f;1760;1761;1762;1763;1764;1765;1766;1767;1768" amount="8" name="Cloth" /> </tailor> <tailor definition="1537" name="Kilt"> <tailoring min="207" max="457" /> ! <material id="175d;175e;175f;1760;1761;1762;1763;1764;1765;1766;1767;1768" amount="8" name="Cloth" /> </tailor> <tailor definition="1516" name="Skirt"> <tailoring min="290" max="540" /> ! <material id="175d;175e;175f;1760;1761;1762;1763;1764;1765;1766;1767;1768" amount="10" name="Cloth" /> </tailor> <tailor definition="230b" name="Fur Sarong"> <tailoring min="350" max="600" /> ! <material id="175d;175e;175f;1760;1761;1762;1763;1764;1765;1766;1767;1768" amount="12" name="Cloth" /> </tailor> </menu> *************** *** 156,168 **** <tailor definition="1541" name="Body Sash"> <tailoring min="41" max="291" /> ! <material id="1765;1766;1767;1768" amount="4" name="Cloth" /> </tailor> <tailor definition="153b" name="Half Apron"> <tailoring min="207" max="457" /> ! <material id="1765;1766;1767;1768" amount="6" name="Cloth" /> </tailor> <tailor definition="153d" name="Full Apron"> <tailoring min="290" max="540" /> ! <material id="1765;1766;1767;1768" amount="10" name="Cloth" /> </tailor> <!-- Oil Cloth --> --- 156,168 ---- <tailor definition="1541" name="Body Sash"> <tailoring min="41" max="291" /> ! <material id="175d;175e;175f;1760;1761;1762;1763;1764;1765;1766;1767;1768" amount="4" name="Cloth" /> </tailor> <tailor definition="153b" name="Half Apron"> <tailoring min="207" max="457" /> ! <material id="175d;175e;175f;1760;1761;1762;1763;1764;1765;1766;1767;1768" amount="6" name="Cloth" /> </tailor> <tailor definition="153d" name="Full Apron"> <tailoring min="290" max="540" /> ! <material id="175d;175e;175f;1760;1761;1762;1763;1764;1765;1766;1767;1768" amount="10" name="Cloth" /> </tailor> <!-- Oil Cloth --> *************** *** 172,176 **** <tailor definition="2307" name="Fur Boots"> <tailoring min="500" max="750" /> ! <material id="1765;1766;1767;1768" amount="12" name="Cloth" /> </tailor> <tailor definition="170d" name="Sandals"> --- 172,176 ---- <tailor definition="2307" name="Fur Boots"> <tailoring min="500" max="750" /> ! <material id="175d;175e;175f;1760;1761;1762;1763;1764;1765;1766;1767;1768" amount="12" name="Cloth" /> </tailor> <tailor definition="170d" name="Sandals"> |
From: spddmn <xxx...@us...> - 2004-09-18 18:30:17
|
Update of /cvsroot/wpdev/wolfpack In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19395 Modified Files: items.cpp Log Message: fixes bug with duped items not being saved. Index: items.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/items.cpp,v retrieving revision 1.448 retrieving revision 1.449 diff -C2 -d -r1.448 -r1.449 *** items.cpp 14 Sep 2004 23:03:06 -0000 1.448 --- items.cpp 18 Sep 2004 18:30:05 -0000 1.449 *************** *** 98,101 **** --- 98,102 ---- this->totalweight_ = amount_ * weight(); this->multi_ = 0; + this->isPersistent = false; moveTo( src.pos_, true ); } *************** *** 1089,1093 **** nItem->moveTo( pos_ ); } - return nItem; } --- 1090,1093 ---- |
From: Sebastian H. <dar...@us...> - 2004-09-18 15:21:11
|
Update of /cvsroot/wpdev/xmlscripts/scripts/commands In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12353 Modified Files: import.py Log Message: Fixed text import Index: import.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/commands/import.py,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** import.py 8 Aug 2004 17:55:31 -0000 1.9 --- import.py 18 Sep 2004 15:21:02 -0000 1.10 *************** *** 143,155 **** line = line.replace( "\n", "" ) ! ( baseid, id, x, y, z, map, color ) = line.split( ' ' ) - baseid = baseid id = hex2dec( id ) color = hex2dec( color ) x = int( x ) y = int( y ) z = int( z ) - map = int( map ) step2 = wolfpack.tickcount() --- 143,154 ---- line = line.replace( "\n", "" ) ! ( id, x, y, z, color ) = line.split( ' ' ) id = hex2dec( id ) + baseid = '%x' % id color = hex2dec( color ) x = int( x ) y = int( y ) z = int( z ) step2 = wolfpack.tickcount() |
From: Sebastian H. <dar...@us...> - 2004-09-18 15:02:54
|
Update of /cvsroot/wpdev/xmlscripts/scripts/speech In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8680/speech Modified Files: barber.py Log Message: Fixed the barber. Index: barber.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/speech/barber.py,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** barber.py 26 May 2004 13:07:25 -0000 1.13 --- barber.py 18 Sep 2004 15:02:45 -0000 1.14 *************** *** 46,54 **** def onSpeech( listener, speaker, text, keywords ): # Check if our name is in the beginning of the string ! #if not text.lower().startswith( listener.name.lower() ): ! # return 0 if ( speaker.distanceto( listener ) > 4 ): return 0 if ( abs( speaker.pos.z - listener.pos.z ) > 5 ): return 0 --- 46,58 ---- def onSpeech( listener, speaker, text, keywords ): # Check if our name is in the beginning of the string ! if not text.lower().startswith( listener.name.lower() ) and not text.lower.startswith( 'vendor' ): ! return 0 ! ! if 369 not in keywords and 60 not in keywords: ! return 0 if ( speaker.distanceto( listener ) > 4 ): return 0 + if ( abs( speaker.pos.z - listener.pos.z ) > 5 ): return 0 |