wpdev-commits Mailing List for Wolfpack Emu (Page 37)
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-20 00:06:23
|
Update of /cvsroot/wpdev/xmlscripts/scripts/system In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11522/system Modified Files: pages.py Log Message: page fix Index: pages.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/system/pages.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** pages.py 17 Sep 2004 18:19:46 -0000 1.3 --- pages.py 20 Sep 2004 00:06:13 -0000 1.4 *************** *** 154,158 **** gump.addText( 50, 160, "Message:", hue ) ! html = "<body text=\"#0000FF\" leftmargin=\"0\" topmargin=\"0\" marginwidth=\"0\" marginheight=\"0\">%s</body>" % "<br>".join(self.message) gump.addResizeGump( 45, 180, 0xBB8, 345, 84 ) gump.addHtmlGump( 50, 180, 340, 80, unicode(html) ) --- 154,158 ---- gump.addText( 50, 160, "Message:", hue ) ! html = u"<body text=\"#0000FF\" leftmargin=\"0\" topmargin=\"0\" marginwidth=\"0\" marginheight=\"0\">%s</body>" % u"<br>".join(unicode(self.message)) gump.addResizeGump( 45, 180, 0xBB8, 345, 84 ) gump.addHtmlGump( 50, 180, 340, 80, unicode(html) ) |
From: Sebastian H. <dar...@us...> - 2004-09-19 23:41:45
|
Update of /cvsroot/wpdev/wolfpack In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6803 Modified Files: ChangeLog Log Message: Fixed a stamina regeneration bug Index: ChangeLog =================================================================== RCS file: /cvsroot/wpdev/wolfpack/ChangeLog,v retrieving revision 1.65 retrieving revision 1.66 diff -C2 -d -r1.65 -r1.66 *** ChangeLog 19 Sep 2004 22:13:34 -0000 1.65 --- ChangeLog 19 Sep 2004 23:41:36 -0000 1.66 *************** *** 32,35 **** --- 32,36 ---- - Animals no longer flee from approaching players. - Fixed several python reference count issues. + - Fixed a stamina loss bug on damage. Wolfpack 12.9.10 Beta (10. September 2004) |
From: Sebastian H. <dar...@us...> - 2004-09-19 23:41:26
|
Update of /cvsroot/wpdev/wolfpack In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6752 Modified Files: player.cpp Log Message: Fixed a stamina regeneration bug Index: player.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/player.cpp,v retrieving revision 1.131 retrieving revision 1.132 diff -C2 -d -r1.131 -r1.132 *** player.cpp 17 Sep 2004 16:33:59 -0000 1.131 --- player.cpp 19 Sep 2004 23:41:17 -0000 1.132 *************** *** 1767,1770 **** --- 1767,1774 ---- unsigned int cPlayer::damage( eDamageType type, unsigned int amount, cUObject* source ) { + // Save the hitpoints for further calculation + unsigned int hitpoints = hitpoints_; + unsigned int stamina = stamina_; + amount = cBaseChar::damage(type, amount, source); *************** *** 1772,1776 **** // the more stamina we have, the more we loose // the more hitpoints we have, the less we loose ! int value = (int)(amount * (100.0 / hitpoints_) * (stamina_ / 100.0)) - 5; if (value > 0) { stamina_ = QMAX(0, stamina_ - value); --- 1776,1780 ---- // the more stamina we have, the more we loose // the more hitpoints we have, the less we loose ! int value = (int)(amount * (100.0 / hitpoints) * (stamina / 100.0)) - 5; if (value > 0) { stamina_ = QMAX(0, stamina_ - value); |
From: Richard M. <dr...@us...> - 2004-09-19 23:41:09
|
Update of /cvsroot/wpdev/wolfpack In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6634 Modified Files: basedef.cpp npc.cpp Log Message: Warning fixes, fear my newbie fixing skills! Index: basedef.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/basedef.cpp,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** basedef.cpp 18 Sep 2004 01:32:12 -0000 1.20 --- basedef.cpp 19 Sep 2004 23:41:00 -0000 1.21 *************** *** 45,49 **** } value = hex2dec(value); // Convert hexadecimal numbers accordingly ! bool ok; unsigned int intvalue = value.toInt(&ok); --- 45,49 ---- } value = hex2dec(value); // Convert hexadecimal numbers accordingly ! bool ok; unsigned int intvalue = value.toInt(&ok); *************** *** 54,58 **** intproperties.insert(name.lower(), intvalue, true); ! } } else if (node->name() == "strproperty") { QString name = node->getAttribute("name"); --- 54,58 ---- intproperties.insert(name.lower(), intvalue, true); ! } } else if (node->name() == "strproperty") { QString name = node->getAttribute("name"); *************** *** 61,65 **** if (value.isNull()) { value = node->text(); ! } properties.insert(name.lower(), value, true); } --- 61,65 ---- if (value.isNull()) { value = node->text(); ! } properties.insert(name.lower(), value, true); } *************** *** 237,241 **** QDomNode parent = document.namedItem("bodyinfo"); if (parent.isElement()) { ! for (int i = 0; i < parent.childNodes().count(); ++i) { QDomElement element = parent.childNodes().item(i).toElement(); --- 237,241 ---- QDomNode parent = document.namedItem("bodyinfo"); if (parent.isElement()) { ! for (unsigned int i = 0; i < parent.childNodes().count(); ++i) { QDomElement element = parent.childNodes().item(i).toElement(); *************** *** 243,247 **** QString id = hex2dec(element.attribute("id")); bool ok = false; ! stBodyInfo bodyinfo; --- 243,247 ---- QString id = hex2dec(element.attribute("id")); bool ok = false; ! stBodyInfo bodyinfo; *************** *** 423,427 **** applyDefinition( element ); } ! else { cBaseDef::processNode(node); --- 423,427 ---- applyDefinition( element ); } ! else { cBaseDef::processNode(node); Index: npc.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/npc.cpp,v retrieving revision 1.115 retrieving revision 1.116 diff -C2 -d -r1.115 -r1.116 *** npc.cpp 17 Sep 2004 23:28:16 -0000 1.115 --- npc.cpp 19 Sep 2004 23:41:00 -0000 1.116 *************** *** 184,188 **** void cNPC::save() ! { if ( changed_ ) { --- 184,188 ---- void cNPC::save() ! { if ( changed_ ) { *************** *** 206,210 **** saveFields; } ! cBaseChar::save(); } --- 206,210 ---- saveFields; } ! cBaseChar::save(); } *************** *** 945,949 **** Coord_cl cNPC::pathDestination( void ) const { ! if ( path_.empty() ) return Coord_cl( 0xFFFF, 0xFFFF, (SI08) 0xFF, 0 ); --- 945,949 ---- Coord_cl cNPC::pathDestination( void ) const { ! if ( path_.empty() ) return Coord_cl( 0xFFFF, 0xFFFF, (SI08) 0xFF, 0 ); *************** *** 1463,1465 **** unsigned int cNPC::maxWeight() { return 0; ! } \ No newline at end of file --- 1463,1465 ---- unsigned int cNPC::maxWeight() { return 0; ! } |
From: Richard M. <dr...@us...> - 2004-09-19 23:41:09
|
Update of /cvsroot/wpdev/wolfpack/unix In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6634/unix Modified Files: console_unix.cpp Log Message: Warning fixes, fear my newbie fixing skills! Index: console_unix.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/unix/console_unix.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** console_unix.cpp 14 Sep 2004 18:05:16 -0000 1.14 --- console_unix.cpp 19 Sep 2004 23:41:00 -0000 1.15 *************** *** 224,228 **** void cConsole::rollbackChars(unsigned int count) { ! for (int i = 0; i < count; ++i) { fprintf( stdout, "\b" ); } --- 224,228 ---- void cConsole::rollbackChars(unsigned int count) { ! for (unsigned int i = 0; i < count; ++i) { fprintf( stdout, "\b" ); } *************** *** 240,244 **** return; } ! // If a progress message is waiting, remove it. if ( !progress.isEmpty() ) --- 240,244 ---- return; } ! // If a progress message is waiting, remove it. if ( !progress.isEmpty() ) |
From: spddmn <xxx...@us...> - 2004-09-19 23:01:39
|
Update of /cvsroot/wpdev/wolfpack In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30513 Modified Files: walking.cpp Log Message: multi checking Index: walking.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/walking.cpp,v retrieving revision 1.149 retrieving revision 1.150 diff -C2 -d -r1.149 -r1.150 *** walking.cpp 19 Sep 2004 18:41:40 -0000 1.149 --- walking.cpp 19 Sep 2004 23:01:29 -0000 1.150 *************** *** 154,158 **** // TODO: Calculate the REAL average Z Value of that Map Tile here! Otherwise clients will have minor walking problems. map_st mapCell = Maps::instance()->seekMap( pos ); ! //mapBlock.z = mapCell.z;*/ land_st mapTile = TileCache::instance()->getLand( mapCell.id ); --- 154,158 ---- // TODO: Calculate the REAL average Z Value of that Map Tile here! Otherwise clients will have minor walking problems. map_st mapCell = Maps::instance()->seekMap( pos ); ! //mapBlock.z = mapCell.z; land_st mapTile = TileCache::instance()->getLand( mapCell.id ); *************** *** 201,243 **** } ! RegionIterator4Items iIter( pos, 0 ); for ( iIter.Begin(); !iIter.atEnd(); iIter++ ) { ! P_ITEM pItem = iIter.GetData(); if ( !pItem ) continue; ! ! if ( pItem->id() >= 0x4000 ) ! { ! MultiDefinition* def = MultiCache::instance()->getMulti( pItem->id() - 0x4000 ); ! if ( !def ) ! continue; ! QValueVector<multiItem_st> multi = def->getEntries(); ! unsigned int j; ! for ( j = 0; j < multi.size(); ++j ) ! { ! if ( multi[j].visible && ( pItem->pos().x + multi[j].x == pos.x ) && ( pItem->pos().y + multi[j].y == pos.y ) ) ! { ! tile_st tTile = TileCache::instance()->getTile( multi[j].tile ); ! if ( !( ( tTile.flag2 & 0x02 ) || ( tTile.flag1 & 0x40 ) || ( tTile.flag2 & 0x04 ) ) ) ! continue; ! ! stBlockItem blockItem; ! blockItem.height = tTile.height; ! blockItem.z = pItem->pos().z + multi[j].z; ! ! if ( ( tTile.flag2 & 0x02 ) && !( tTile.flag1 & 0x40 ) ) ! blockItem.walkable = true; ! else ! blockItem.walkable = checkWalkable( pChar, pItem->id() ); ! ! blockList.push_back( blockItem ); ! push_heap( blockList.begin(), blockList.end(), compareTiles() ); ! } ! } ! continue; ! } ! else if ( pChar && pChar->isDead() ) { // Doors can be passed by ghosts --- 201,220 ---- } ! ! // We are only interested in items at pos ! // todo: we could impliment blocking for items on the adjacent sides ! // during a diagonal move here, but this has yet to be decided. ! ! RegionIterator4Items iIter( pos, 0 ); ! ! P_ITEM pItem; for ( iIter.Begin(); !iIter.atEnd(); iIter++ ) { ! pItem = iIter.GetData(); if ( !pItem ) continue; ! ! if ( pChar && pChar->isDead() ) { // Doors can be passed by ghosts *************** *** 248,258 **** } - // They need to be at the same x,y,plane coords - if ( ( pItem->pos().x != pos.x ) || ( pItem->pos().y != pos.y ) || ( pItem->pos().map != pos.map ) ) - continue; tile_st tTile = TileCache::instance()->getTile( pItem->id() ); ! // Se above for what the flags mean if ( !( ( tTile.flag2 & 0x02 ) || ( tTile.flag1 & 0x40 ) || ( tTile.flag2 & 0x04 ) ) ) continue; --- 225,232 ---- } tile_st tTile = TileCache::instance()->getTile( pItem->id() ); ! // See above for what the flags mean if ( !( ( tTile.flag2 & 0x02 ) || ( tTile.flag1 & 0x40 ) || ( tTile.flag2 & 0x04 ) ) ) continue; *************** *** 271,283 **** push_heap( blockList.begin(), blockList.end(), compareTiles() ); } - // Now we need to evaluate dynamic items [...] (later) - // TODO: Multis here sort_heap( blockList.begin(), blockList.end(), compareTiles() ); return blockList; }; ! // May a character walk here ? // If yes we auto. set the new z value for pos bool mayWalk( P_CHAR pChar, Coord_cl& pos ) --- 245,295 ---- push_heap( blockList.begin(), blockList.end(), compareTiles() ); } + + + // deal with the multis now, or not. + cItemSectorIterator* iter = SectorMaps::instance()->findMultis( pos, 18 ); // 18 has been tested with castle sides and corners... + for ( pItem = iter->first(); pItem; pItem = iter->next() ) + { + MultiDefinition* def = MultiCache::instance()->getMulti( pItem->id() - 0x4000 ); + if ( !def ) + continue; + QValueVector<multiItem_st> multi = def->getEntries(); + unsigned int j; + for ( j = 0; j < multi.size(); ++j ) + { + if ( multi[j].visible && ( pItem->pos().x + multi[j].x == pos.x ) && ( pItem->pos().y + multi[j].y == pos.y ) ) + { + tile_st tTile = TileCache::instance()->getTile( multi[j].tile ); + if ( !( ( tTile.flag2 & 0x02 ) || ( tTile.flag1 & 0x40 ) || ( tTile.flag2 & 0x04 ) ) ) + continue; + + stBlockItem blockItem; + blockItem.height = tTile.height; + blockItem.z = pItem->pos().z + multi[j].z; + + if ( ( tTile.flag2 & 0x02 ) && !( tTile.flag1 & 0x40 ) ) + blockItem.walkable = true; + else + blockItem.walkable = checkWalkable( pChar, pItem->id() ); + + blockList.push_back( blockItem ); + push_heap( blockList.begin(), blockList.end(), compareTiles() ); + } + } + continue; + } + + delete iter; + + + // Now we need to evaluate dynamic items [...] (later) ?? sort_heap( blockList.begin(), blockList.end(), compareTiles() ); return blockList; + }; ! // May a character walk here ? // If yes we auto. set the new z value for pos bool mayWalk( P_CHAR pChar, Coord_cl& pos ) *************** *** 448,457 **** return false; - /* if( !isValidDirection( dir ) ) - { - pChar->setPathNum( pChar->pathnum() + PATHNUM ); - return; - }*/ - P_PLAYER player = dynamic_cast<P_PLAYER>( pChar ); --- 460,463 ---- *************** *** 496,507 **** } - // Check for Characters in our way - if ( !checkObstacles( pChar, newCoord, running ) ) - { - if ( player && player->socket() ) - player->socket()->denyMove( sequence ); - return false; - } - // Check if the char can move to those new coordinates // It is going to automatically calculate the new coords (!) --- 502,505 ---- *************** *** 598,602 **** bool cMovement::CheckForCharacterAtXYZ( P_CHAR pc, const Coord_cl& pos ) { ! RegionIterator4Chars ri( pos ); for ( ri.Begin(); !ri.atEnd(); ri++ ) { --- 596,605 ---- bool cMovement::CheckForCharacterAtXYZ( P_CHAR pc, const Coord_cl& pos ) { ! // again this seems to me like we are doing too much work. ! // why should we get all chars in the region using default (18), ! // and then loop through them ignoring all those not at exactly the spot we are going (now) on? ! // why not just get those on the one spot we care about anyways? ! ! RegionIterator4Chars ri( pos, 0 ); for ( ri.Begin(); !ri.atEnd(); ri++ ) { *************** *** 607,611 **** { // x=x,y=y, and distance btw z's <= MAX STEP ! if ( ( pc_i->pos().x == pos.x ) && ( pc_i->pos().y == pos.y ) && ( abs( pc_i->pos().z - pos.z ) <= P_M_MAX_Z_CLIMB ) ) { return true; --- 610,614 ---- { // x=x,y=y, and distance btw z's <= MAX STEP ! if ( abs( pc_i->pos().z - pos.z ) <= P_M_MAX_Z_CLIMB ) { return true; |
From: Sebastian H. <dar...@us...> - 2004-09-19 22:57:29
|
Update of /cvsroot/wpdev/xmlscripts/scripts/system In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29589/system Modified Files: loot.py Log Message: loot Index: loot.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/system/loot.py,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** loot.py 3 Sep 2004 16:03:04 -0000 1.16 --- loot.py 19 Sep 2004 22:57:18 -0000 1.17 *************** *** 26,35 **** # Common Loot Packs 'lootpack_poor': [ ! [1.0, 'eed', random.randint(11,20), 1], # Gold [0.0002, 'DEF_INSTRUMENTS', 1, 0 ] # Slayer Instruments #[0.0002, 'RANDOM_MAGIC_ITEM', 1, 0 ] # [0% -> 90%] 5 max properties ], 'lootpack_meager': [ ! [1.0, 'eed', random.randint(11,20), 1], # Gold [0.001, 'DEF_INSTRUMENTS', 1, 0 ] # Slayer Instruments #[0.01, 'RANDOM_MAGIC_ITEM', 1, 0 ], # [0% -> 10%] 2 max properties --- 26,35 ---- # Common Loot Packs 'lootpack_poor': [ ! [1.0, 'eed', [11, 20], 1], # Gold [0.0002, 'DEF_INSTRUMENTS', 1, 0 ] # Slayer Instruments #[0.0002, 'RANDOM_MAGIC_ITEM', 1, 0 ] # [0% -> 90%] 5 max properties ], 'lootpack_meager': [ ! [1.0, 'eed', [11, 20], 1], # Gold [0.001, 'DEF_INSTRUMENTS', 1, 0 ] # Slayer Instruments #[0.01, 'RANDOM_MAGIC_ITEM', 1, 0 ], # [0% -> 10%] 2 max properties *************** *** 37,41 **** ], 'lootpack_average': [ ! [1.0, 'eed', random.randint(55,100), 1], # Gold [0.004, 'DEF_INSTRUMENTS', 1, 0 ] # Slayer Instruments #[0.05, 'RANDOM_MAGIC_ITEM', 1, 0 ], # [0% -> 20%] 4 max properties --- 37,41 ---- ], 'lootpack_average': [ ! [1.0, 'eed', [55, 100], 1], # Gold [0.004, 'DEF_INSTRUMENTS', 1, 0 ] # Slayer Instruments #[0.05, 'RANDOM_MAGIC_ITEM', 1, 0 ], # [0% -> 20%] 4 max properties *************** *** 44,48 **** ], 'lootpack_rich': [ ! [1.0, 'eed', random.randint(160,250), 1], # Gold [0.01, 'DEF_INSTRUMENTS', 1, 0 ] # Slayer Instruments #[0.2, 'RANDOM_MAGIC_ITEM', 1, 0 ], # [0% -> 40%] 4 max properties --- 44,48 ---- ], 'lootpack_rich': [ ! [1.0, 'eed', [160, 250], 1], # Gold [0.01, 'DEF_INSTRUMENTS', 1, 0 ] # Slayer Instruments #[0.2, 'RANDOM_MAGIC_ITEM', 1, 0 ], # [0% -> 40%] 4 max properties *************** *** 51,55 **** ], 'lootpack_filthy_rich': [ ! [1.0, 'eed', random.randint(202,400), 1], # Gold [0.02, 'DEF_INSTRUMENTS', 1, 0 ] # Slayer Instruments #[0.33, 'RANDOM_MAGIC_ITEM', 1, 0 ], # [0% -> 50%] 4 max properties --- 51,55 ---- ], 'lootpack_filthy_rich': [ ! [1.0, 'eed', [202, 400], 1], # Gold [0.02, 'DEF_INSTRUMENTS', 1, 0 ] # Slayer Instruments #[0.33, 'RANDOM_MAGIC_ITEM', 1, 0 ], # [0% -> 50%] 4 max properties *************** *** 59,63 **** ], 'lootpack_ultra_rich': [ ! [1.0, 'eed', random.randint(505,1000), 1], # Gold [0.02, 'DEF_INSTRUMENTS', 1, 0 ] # Slayer Instruments #[1.0, 'RANDOM_MAGIC_ITEM', 1, 0 ], # [25% -> 100%] 5 max properties --- 59,63 ---- ], 'lootpack_ultra_rich': [ ! [1.0, 'eed', [505, 1000], 1], # Gold [0.02, 'DEF_INSTRUMENTS', 1, 0 ] # Slayer Instruments #[1.0, 'RANDOM_MAGIC_ITEM', 1, 0 ], # [25% -> 100%] 5 max properties *************** *** 68,72 **** ], 'lootpack_super_boss': [ ! [1.0, 'eed', random.randint(505,1000), 1], # Gold [0.02, 'DEF_INSTRUMENTS', 1, 0 ] # Slayer Instruments #[1.0, 'RANDOM_MAGIC_ITEM', 1, 0 ], # [25% -> 100%] 5 max properties --- 68,72 ---- ], 'lootpack_super_boss': [ ! [1.0, 'eed', [505, 1000], 1], # Gold [0.02, 'DEF_INSTRUMENTS', 1, 0 ] # Slayer Instruments #[1.0, 'RANDOM_MAGIC_ITEM', 1, 0 ], # [25% -> 100%] 5 max properties *************** *** 473,476 **** --- 473,478 ---- if type( packamount ) == str: amount = utilities.rolldice( packamount ) + elif type( packamount ) == list: + amount = random.randint( packamount[0], packamount[1] ) else: amount = int( packamount ) |
From: Sebastian H. <dar...@us...> - 2004-09-19 22:13:49
|
Update of /cvsroot/wpdev/wolfpack/python In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19784/python Modified Files: char.cpp global.cpp gump.h item.cpp socket.cpp target.cpp tempeffect.h Log Message: Fixes Index: global.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/python/global.cpp,v retrieving revision 1.159 retrieving revision 1.160 diff -C2 -d -r1.159 -r1.160 *** global.cpp 19 Sep 2004 16:50:41 -0000 1.159 --- global.cpp 19 Sep 2004 22:13:36 -0000 1.160 *************** *** 1602,1612 **** if ( result ) { ! Py_INCREF( Py_True ); ! return Py_True; } else { ! Py_INCREF( Py_False ); ! return Py_False; } } --- 1602,1610 ---- if ( result ) { ! Py_RETURN_TRUE; } else { ! Py_RETURN_FALSE; } } *************** *** 1678,1688 **** if ( result ) { ! Py_INCREF( Py_True ); ! return Py_True; } else { ! Py_INCREF( Py_False ); ! return Py_False; } } --- 1676,1684 ---- if ( result ) { ! Py_RETURN_TRUE; } else { ! Py_RETURN_FALSE; } } Index: char.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/python/char.cpp,v retrieving revision 1.195 retrieving revision 1.196 diff -C2 -d -r1.195 -r1.196 *** char.cpp 19 Sep 2004 16:23:43 -0000 1.195 --- char.cpp 19 Sep 2004 22:13:35 -0000 1.196 *************** *** 2392,2402 **** if ( self->pChar->hasScript( script ) ) { ! Py_INCREF( Py_True ); ! return Py_True; } else { ! Py_INCREF( Py_False ); ! return Py_False; } } --- 2392,2400 ---- if ( self->pChar->hasScript( script ) ) { ! Py_RETURN_TRUE; } else { ! Py_RETURN_FALSE; } } Index: item.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/python/item.cpp,v retrieving revision 1.132 retrieving revision 1.133 diff -C2 -d -r1.132 -r1.133 *** item.cpp 10 Sep 2004 04:10:37 -0000 1.132 --- item.cpp 19 Sep 2004 22:13:36 -0000 1.133 *************** *** 959,969 **** if ( self->pItem->hasScript( script ) ) { ! Py_INCREF( Py_True ); ! return Py_True; } else { ! Py_INCREF( Py_False ); ! return Py_False; } } --- 959,967 ---- if ( self->pItem->hasScript( script ) ) { ! Py_RETURN_TRUE; } else { ! Py_RETURN_FALSE; } } Index: target.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/python/target.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** target.cpp 16 Sep 2004 01:40:19 -0000 1.1 --- target.cpp 19 Sep 2004 22:13:37 -0000 1.2 *************** *** 131,134 **** --- 131,135 ---- PyObject* p_args = PyTuple_New( 3 ); PyTuple_SetItem( p_args, 0, PyGetCharObject( socket->player() ) ); + Py_INCREF(args); PyTuple_SetItem( p_args, 1, args ); PyTuple_SetItem( p_args, 2, PyGetTarget( target, socket->player()->pos().map ) ); Index: tempeffect.h =================================================================== RCS file: /cvsroot/wpdev/wolfpack/python/tempeffect.h,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** tempeffect.h 29 Aug 2004 14:05:17 -0000 1.30 --- tempeffect.h 19 Sep 2004 22:13:37 -0000 1.31 *************** *** 121,126 **** --- 121,128 ---- } + Py_INCREF(args); // PyTuple_SetItem steals a reference PyTuple_SetItem( p_args, 1, args ); PyTuple_SetItem( p_args, 2, PyGetCharObject( pSource ) ); + Py_INCREF(disp_args); PyTuple_SetItem( p_args, 3, disp_args ); *************** *** 163,169 **** else if ( isCharSerial( destSer ) ) PyTuple_SetItem( p_args, 0, PyGetCharObject( FindCharBySerial( destSer ) ) ); ! else ! PyTuple_SetItem( p_args, 0, PyFalse() ); PyTuple_SetItem( p_args, 1, args ); --- 165,174 ---- else if ( isCharSerial( destSer ) ) PyTuple_SetItem( p_args, 0, PyGetCharObject( FindCharBySerial( destSer ) ) ); ! else { ! Py_INCREF(Py_None); ! PyTuple_SetItem( p_args, 0, Py_None ); ! } + Py_INCREF(args); PyTuple_SetItem( p_args, 1, args ); Index: socket.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/python/socket.cpp,v retrieving revision 1.85 retrieving revision 1.86 diff -C2 -d -r1.85 -r1.86 *** socket.cpp 14 Sep 2004 03:56:44 -0000 1.85 --- socket.cpp 19 Sep 2004 22:13:36 -0000 1.86 *************** *** 663,673 **** if ( self->pSock->useItem( item ) ) { ! Py_INCREF( Py_True ); ! return Py_True; } else { ! Py_INCREF( Py_False ); ! return Py_False; } } --- 663,671 ---- if ( self->pSock->useItem( item ) ) { ! Py_RETURN_TRUE; } else { ! Py_RETURN_FALSE; } } Index: gump.h =================================================================== RCS file: /cvsroot/wpdev/wolfpack/python/gump.h,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** gump.h 5 Sep 2004 14:08:21 -0000 1.26 --- gump.h 19 Sep 2004 22:13:36 -0000 1.27 *************** *** 157,160 **** --- 157,161 ---- PyObject* p_args = PyTuple_New( 3 ); PyTuple_SetItem( p_args, 0, PyGetCharObject( socket->player() ) ); + Py_INCREF(args); PyTuple_SetItem( p_args, 1, args ); PyTuple_SetItem( p_args, 2, PyGetGumpResponse( choice ) ); |
From: Sebastian H. <dar...@us...> - 2004-09-19 22:13:48
|
Update of /cvsroot/wpdev/wolfpack/network In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19784/network Modified Files: asyncnetio.cpp Log Message: Fixes Index: asyncnetio.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/network/asyncnetio.cpp,v retrieving revision 1.53 retrieving revision 1.54 diff -C2 -d -r1.53 -r1.54 *** asyncnetio.cpp 19 Sep 2004 15:37:13 -0000 1.53 --- asyncnetio.cpp 19 Sep 2004 22:13:35 -0000 1.54 *************** *** 679,682 **** --- 679,685 ---- return; + // Before we continue, we should guarantee no one writes packets to the buffer. + QMutexLocker lock( &d->wmutex ); + // Encrypt new packets QByteArray *p = d->wba.first(); *************** *** 692,697 **** 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 ) { --- 695,698 ---- |
From: Sebastian H. <dar...@us...> - 2004-09-19 22:13:48
|
Update of /cvsroot/wpdev/wolfpack In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19784 Modified Files: ChangeLog Log Message: Fixes Index: ChangeLog =================================================================== RCS file: /cvsroot/wpdev/wolfpack/ChangeLog,v retrieving revision 1.64 retrieving revision 1.65 diff -C2 -d -r1.64 -r1.65 *** ChangeLog 19 Sep 2004 03:59:20 -0000 1.64 --- ChangeLog 19 Sep 2004 22:13:34 -0000 1.65 *************** *** 30,33 **** --- 30,35 ---- - Fixed persistency issue for dupe() and sql saves. - Fixed issues with large packet and encryption. + - Animals no longer flee from approaching players. + - Fixed several python reference count issues. Wolfpack 12.9.10 Beta (10. September 2004) |
From: Sebastian H. <dar...@us...> - 2004-09-19 22:13:48
|
Update of /cvsroot/wpdev/wolfpack/ai In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19784/ai Modified Files: ai.cpp ai_animals.cpp Log Message: Fixes Index: ai_animals.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/ai/ai_animals.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** ai_animals.cpp 10 Sep 2004 04:06:27 -0000 1.14 --- ai_animals.cpp 19 Sep 2004 22:13:35 -0000 1.15 *************** *** 65,68 **** --- 65,70 ---- float Animal_Wild_Flee::preCondition() { + return 0.0f; + /* * Fleeing from an approaching player has the following preconditions: Index: ai.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/ai/ai.cpp,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** ai.cpp 18 Sep 2004 21:10:40 -0000 1.30 --- ai.cpp 19 Sep 2004 22:13:35 -0000 1.31 *************** *** 296,300 **** --- 296,302 ---- PyObject* p_args = PyTuple_New( 3 ); PyTuple_SetItem( p_args, 0, PyGetCharObject( m_npc ) ); + Py_INCREF(Py_None); // SetItem steals a reference PyTuple_SetItem( p_args, 1, Py_None ); + Py_INCREF(Py_None); // SetItem steals a reference PyTuple_SetItem( p_args, 2, Py_None ); *************** *** 349,353 **** --- 351,357 ---- PyObject* p_args = PyTuple_New( 3 ); PyTuple_SetItem( p_args, 0, PyGetCharObject( m_npc ) ); + Py_INCREF(Py_None); PyTuple_SetItem( p_args, 1, Py_None ); + Py_INCREF(Py_None); PyTuple_SetItem( p_args, 2, Py_None ); *************** *** 402,406 **** --- 406,412 ---- PyObject* p_args = PyTuple_New( 3 ); PyTuple_SetItem( p_args, 0, PyGetCharObject( m_npc ) ); + Py_INCREF(Py_None); PyTuple_SetItem( p_args, 1, Py_None ); + Py_INCREF(Py_None); PyTuple_SetItem( p_args, 2, Py_None ); |
From: Correa <thi...@us...> - 2004-09-19 20:55:19
|
Update of /cvsroot/wpdev/wolfpack In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3108 Modified Files: platform.h Log Message: compile fix for freebsd5 Index: platform.h =================================================================== RCS file: /cvsroot/wpdev/wolfpack/platform.h,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** platform.h 2 Jun 2004 15:04:06 -0000 1.15 --- platform.h 19 Sep 2004 20:55:10 -0000 1.16 *************** *** 88,91 **** --- 88,96 ---- #endif + #ifdef Q_OS_FREEBSD + inline float ceilf(float _X) + {return ((float)ceil((double)_X)); } + #endif + //======================================================================== typedef unsigned long UI32; |
From: Sebastian H. <dar...@us...> - 2004-09-19 20:43:26
|
Update of /cvsroot/wpdev/xmlscripts/documentation/webroot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv407/webroot Modified Files: ChangeLog.wolfpack Log Message: implemented hit and defense boni for weapons and stuff Index: ChangeLog.wolfpack =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/documentation/webroot/ChangeLog.wolfpack,v retrieving revision 1.95 retrieving revision 1.96 diff -C2 -d -r1.95 -r1.96 *** ChangeLog.wolfpack 19 Sep 2004 03:59:41 -0000 1.95 --- ChangeLog.wolfpack 19 Sep 2004 20:43:13 -0000 1.96 *************** *** 37,40 **** --- 37,41 ---- - Added a say <text> command - Fixed add and craft menus for the 3d client. + - Added defense and hit bonus properties for items. * Misc. Changes: * Known Issues, Bugs, and Missing Features: |
From: Sebastian H. <dar...@us...> - 2004-09-19 20:39:55
|
Update of /cvsroot/wpdev/xmlscripts/scripts/combat In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32166/combat Modified Files: aos.py Log Message: implemented hit and defense boni for weapons and stuff Index: aos.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/combat/aos.py,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** aos.py 5 Sep 2004 21:02:54 -0000 1.16 --- aos.py 19 Sep 2004 20:39:46 -0000 1.17 *************** *** 86,94 **** # Calculate the hit chance bonus = 0 # Get the weapon "accuracy" status ! bonus += 0 # Get the attackers AttackChance bonus attackChance = (attackerValue + 20.0) * (100 + bonus) # Calculate the defense chance ! bonus = 0 # Get the defenders defend chance defendChance = (defenderValue + 20.0) * (100 + bonus) --- 86,94 ---- # Calculate the hit chance bonus = 0 # Get the weapon "accuracy" status ! bonus += properties.fromchar(attacker, HITBONUS) # Get the attackers AttackChance bonus attackChance = (attackerValue + 20.0) * (100 + bonus) # Calculate the defense chance ! bonus = properties.fromchar(defender, DEFENSEBONUS) # Get the defenders defend chance defendChance = (defenderValue + 20.0) * (100 + bonus) |
From: spddmn <xxx...@us...> - 2004-09-19 18:41:49
|
Update of /cvsroot/wpdev/wolfpack In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5641 Modified Files: walking.cpp Log Message: narrows item search criteria for mayWalk() item iterator to just the tile we are walking onto. should save alot of cpu for just walking. previously was using item iterator default of 18 tiles. I dunno if there is a good reason to iterate on items 18 tiles away when walking. Index: walking.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/walking.cpp,v retrieving revision 1.148 retrieving revision 1.149 diff -C2 -d -r1.148 -r1.149 *** walking.cpp 9 Sep 2004 02:36:24 -0000 1.148 --- walking.cpp 19 Sep 2004 18:41:40 -0000 1.149 *************** *** 201,205 **** } ! RegionIterator4Items iIter( pos ); for ( iIter.Begin(); !iIter.atEnd(); iIter++ ) { --- 201,205 ---- } ! RegionIterator4Items iIter( pos, 0 ); for ( iIter.Begin(); !iIter.atEnd(); iIter++ ) { |
From: Correa <thi...@us...> - 2004-09-19 16:51:22
|
Update of /cvsroot/wpdev/wolfpack In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15643 Modified Files: server.cpp world.cpp Log Message: - Fix crash under windows when the server terminates unexpectedly - Exceptions should always be caught by reference. Index: world.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/world.cpp,v retrieving revision 1.127 retrieving revision 1.128 diff -C2 -d -r1.127 -r1.128 *** world.cpp 14 Sep 2004 18:05:15 -0000 1.127 --- world.cpp 19 Sep 2004 16:50:41 -0000 1.128 *************** *** 451,455 **** object->load( reader ); objects.append(object); ! } catch (wpException e) { Console::instance()->log( LOG_WARNING, e.error() + "\n" ); } --- 451,455 ---- object->load( reader ); objects.append(object); ! } catch (wpException& e) { Console::instance()->log( LOG_WARNING, e.error() + "\n" ); } *************** *** 501,505 **** guild->load(reader, reader.version()); Guilds::instance()->registerGuild(guild); ! } catch (wpException e) { delete guild; } --- 501,505 ---- guild->load(reader, reader.version()); Guilds::instance()->registerGuild(guild); ! } catch (wpException& e) { delete guild; } Index: server.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/server.cpp,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** server.cpp 19 Sep 2004 16:25:36 -0000 1.24 --- server.cpp 19 Sep 2004 16:50:41 -0000 1.25 *************** *** 160,166 **** d->actionMutex.unlock(); ! try { action->execute(); ! } catch ( wpException e ) { Console::instance()->log( LOG_PYTHON, e.error() + "\n" ); } --- 160,169 ---- d->actionMutex.unlock(); ! try ! { action->execute(); ! } ! catch ( wpException& e ) ! { Console::instance()->log( LOG_PYTHON, e.error() + "\n" ); } *************** *** 256,260 **** setState( STARTUP ); ! QApplication app( argc, argv, false ); QTranslator translator( 0 ); --- 259,263 ---- setState( STARTUP ); ! new QApplication ( argc, argv, false ); QTranslator translator( 0 ); *************** *** 264,272 **** { Console::instance()->log( LOG_WARNING, "Your configuration file [wolfpack.xml] have just been created with default settings.\n"); ! #if !defined(Q_OS_WIN32) ! // We can only detect mul path under Windows. ! Console::instance()->log( LOG_ERROR, "Please setup the path to the *.mul files before continuing\n"); ! return false; ! #endif } --- 267,271 ---- { Console::instance()->log( LOG_WARNING, "Your configuration file [wolfpack.xml] have just been created with default settings.\n"); ! Console::instance()->log( LOG_WARNING, "You might have to change it accordingly before running again\n"); } *************** *** 280,291 **** setupConsole(); - // Load all subcomponents - try { - load(); - } catch(wpException &e) { - Console::instance()->log(LOG_ERROR, e.error() + "\n"); - return false; - } - // Start the QT translator QString languageFile = Config::instance()->getString( "General", "Language File", "", true ); --- 279,282 ---- *************** *** 300,303 **** --- 291,306 ---- } + // Load all subcomponents + try + { + load(); + } + catch(wpException &e) + { + Console::instance()->log(LOG_ERROR, e.error() + "\n"); + return false; + } + + try { // Open the Worldsave and Account Database drivers. *************** *** 375,379 **** Console::instance()->poll(); } ! catch ( wpException e ) { Console::instance()->log( LOG_PYTHON, e.error() + "\n" ); --- 378,382 ---- Console::instance()->poll(); } ! catch ( wpException& e ) { Console::instance()->log( LOG_PYTHON, e.error() + "\n" ); |
From: Correa <thi...@us...> - 2004-09-19 16:50:55
|
Update of /cvsroot/wpdev/wolfpack/win In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15643/win Modified Files: console_win.cpp Log Message: - Fix crash under windows when the server terminates unexpectedly - Exceptions should always be caught by reference. Index: console_win.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/win/console_win.cpp,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** console_win.cpp 19 Sep 2004 16:25:38 -0000 1.28 --- console_win.cpp 19 Sep 2004 16:50:44 -0000 1.29 *************** *** 581,587 **** QMemArray<pchar> argv( 8 ); /* ! Since Windows programs don't get passed the command name as the ! first argument, we need to fetch it explicitly. ! */ static char appFileName[256]; GetModuleFileNameA( 0, appFileName, sizeof( appFileName ) ); --- 581,587 ---- QMemArray<pchar> argv( 8 ); /* ! Since Windows programs don't get passed the command name as the ! first argument, we need to fetch it explicitly. ! */ static char appFileName[256]; GetModuleFileNameA( 0, appFileName, sizeof( appFileName ) ); *************** *** 643,647 **** if ( returnValue_ != 0 ) { ! Console::instance()->send( tr("\nThe server has been shut down. You can close this window now.\n") ); canClose = true; } --- 643,647 ---- if ( returnValue_ != 0 ) { ! Console::instance()->send( ("\nThe server has been shut down. You can close this window now.\n") ); canClose = true; } |
From: Correa <thi...@us...> - 2004-09-19 16:50:55
|
Update of /cvsroot/wpdev/wolfpack/python In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15643/python Modified Files: global.cpp Log Message: - Fix crash under windows when the server terminates unexpectedly - Exceptions should always be caught by reference. Index: global.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/python/global.cpp,v retrieving revision 1.158 retrieving revision 1.159 diff -C2 -d -r1.158 -r1.159 *** global.cpp 16 Sep 2004 18:45:02 -0000 1.158 --- global.cpp 19 Sep 2004 16:50:41 -0000 1.159 *************** *** 2261,2265 **** result = PersistentBroker::instance()->query( query ); } ! catch ( QString e ) { PyMem_Free( query ); --- 2261,2265 ---- result = PersistentBroker::instance()->query( query ); } ! catch ( QString& e ) { PyMem_Free( query ); |
From: Correa <thi...@us...> - 2004-09-19 16:25:50
|
Update of /cvsroot/wpdev/wolfpack In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10727 Modified Files: accounts.cpp action.cpp action.h console.cpp items.cpp server.cpp serverconfig.cpp typedefs.h Log Message: - Added missing copyright headers to some new files - Console will show if Python is UCS2 or UCS4 - Removed few lines of dead code - Some internationalization fixes Index: typedefs.h =================================================================== RCS file: /cvsroot/wpdev/wolfpack/typedefs.h,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** typedefs.h 10 Aug 2004 03:15:57 -0000 1.38 --- typedefs.h 19 Sep 2004 16:25:36 -0000 1.39 *************** *** 43,59 **** // Typedefs - typedef int GUILDID; - typedef unsigned int TIMERVAL; - typedef unsigned char LIGHTLEVEL; - typedef unsigned char SECONDS; typedef unsigned int SERIAL; typedef cItem* P_ITEM; - typedef const cItem* PC_ITEM; typedef cBaseChar* P_CHAR; - typedef const cBaseChar* PC_CHAR; typedef cNPC* P_NPC; - typedef const cNPC* PC_NPC; typedef cPlayer* P_PLAYER; - typedef const cPlayer* PC_PLAYER; typedef cUObject* P_OBJECT; --- 43,51 ---- Index: serverconfig.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/serverconfig.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** serverconfig.cpp 18 Sep 2004 21:10:40 -0000 1.9 --- serverconfig.cpp 19 Sep 2004 16:25:36 -0000 1.10 *************** *** 86,90 **** cConfig::cConfig() : Preferences( "wolfpack.xml", "Wolfpack", "1.0" ) { - readData(); } --- 86,89 ---- Index: server.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/server.cpp,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** server.cpp 18 Sep 2004 21:10:40 -0000 1.23 --- server.cpp 19 Sep 2004 16:25:36 -0000 1.24 *************** *** 259,262 **** --- 259,274 ---- QTranslator translator( 0 ); + // Load wolfpack.xml + Config::instance()->load(); + if ( !Config::instance()->fileState() ) + { + Console::instance()->log( LOG_WARNING, "Your configuration file [wolfpack.xml] have just been created with default settings.\n"); + #if !defined(Q_OS_WIN32) + // We can only detect mul path under Windows. + Console::instance()->log( LOG_ERROR, "Please setup the path to the *.mul files before continuing\n"); + return false; + #endif + } + // Start Python PythonEngine::instance()->load(); *************** *** 292,296 **** if ( Config::instance()->databaseDriver() != "binary" && !PersistentBroker::instance()->openDriver( Config::instance()->databaseDriver() ) ) { ! Console::instance()->log( LOG_ERROR, QString( "Unknown Worldsave Database Driver '%1', check your wolfpack.xml" ).arg( Config::instance()->databaseDriver() ) ); return 1; } --- 304,308 ---- if ( Config::instance()->databaseDriver() != "binary" && !PersistentBroker::instance()->openDriver( Config::instance()->databaseDriver() ) ) { ! Console::instance()->log( LOG_ERROR, tr( "Unknown Worldsave Database Driver '%1', check your wolfpack.xml" ).arg( Config::instance()->databaseDriver() ) ); return 1; } *************** *** 298,302 **** if ( !PersistentBroker::instance()->openDriver( Config::instance()->accountsDriver() ) ) { ! Console::instance()->log( LOG_ERROR, QString( "Unknown Account Database Driver '%1', check your wolfpack.xml" ).arg( Config::instance()->accountsDriver() ) ); return 1; } --- 310,314 ---- if ( !PersistentBroker::instance()->openDriver( Config::instance()->accountsDriver() ) ) { ! Console::instance()->log( LOG_ERROR, tr( "Unknown Account Database Driver '%1', check your wolfpack.xml" ).arg( Config::instance()->accountsDriver() ) ); return 1; } *************** *** 400,407 **** Console::instance()->send( "By using this software you agree to the license accompanying this release.\n" ); Console::instance()->send( "Compiled on " __DATE__ " " __TIME__ "\n" ); ! Console::instance()->send( "Compiled for QT " QT_VERSION_STR " (Using: " ); ! Console::instance()->send( qVersion() ); ! Console::instance()->send( qSharedBuild() ? " Shared" : " Static" ); ! Console::instance()->send( ")\n" ); QString pythonBuild = Py_GetVersion(); pythonBuild = pythonBuild.left( pythonBuild.find( ' ' ) ); --- 412,416 ---- Console::instance()->send( "By using this software you agree to the license accompanying this release.\n" ); Console::instance()->send( "Compiled on " __DATE__ " " __TIME__ "\n" ); ! Console::instance()->send( tr("Compiled for Qt %1 (Using: %2 %3)\n").arg(QT_VERSION_STR, qVersion(), qSharedBuild() ? " Shared" : " Static" ) ); QString pythonBuild = Py_GetVersion(); pythonBuild = pythonBuild.left( pythonBuild.find( ' ' ) ); *************** *** 413,421 **** #endif ! Console::instance()->send( "Compiled for Python " PY_VERSION " (Using: " ); ! Console::instance()->send( pythonBuild + ")\n" ); Console::instance()->send( "Compiled with SQLite " SQLITE_VERSION "\n" ); #if defined (MYSQL_DRIVER) ! Console::instance()->send( QString( "Compiled for MySQL " MYSQL_SERVER_VERSION " (Using: %1)\n" ).arg( mysql_get_client_info() ) ); #else Console::instance()->send( "MySQL Support: disabled\n" ); --- 422,434 ---- #endif ! #if defined(Py_UNICODE_WIDE) ! QString UnicodeType("UCS-4"); ! #else ! QString UnicodeType("UCS-2"); ! #endif ! Console::instance()->send( tr("Compiled for Python %1 %2 (Using: %3 )\n").arg(PY_VERSION, UnicodeType, pythonBuild) ); Console::instance()->send( "Compiled with SQLite " SQLITE_VERSION "\n" ); #if defined (MYSQL_DRIVER) ! Console::instance()->send( tr( "Compiled for MySQL %1 (Using: %2)\n" ).arg( MYSQL_SERVER_VERSION, mysql_get_client_info() ) ); #else Console::instance()->send( "MySQL Support: disabled\n" ); *************** *** 522,526 **** if ( !component->isSilent() ) { ! Console::instance()->sendProgress( QString( "Loading %1" ).arg( component->getName() ) ); } --- 535,539 ---- if ( !component->isSilent() ) { ! Console::instance()->sendProgress( tr( "Loading %1" ).arg( component->getName() ) ); } *************** *** 571,575 **** if ( !component->isSilent() ) { ! Console::instance()->sendProgress( QString( "Unloading %1" ).arg( component->getName() ) ); } --- 584,588 ---- if ( !component->isSilent() ) { ! Console::instance()->sendProgress( tr( "Unloading %1" ).arg( component->getName() ) ); } *************** *** 597,601 **** if ( !component->isSilent() ) { ! Console::instance()->sendProgress( QString( "Reloading %1" ).arg( component->getName() ) ); } --- 610,614 ---- if ( !component->isSilent() ) { ! Console::instance()->sendProgress( tr( "Reloading %1" ).arg( component->getName() ) ); } Index: accounts.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/accounts.cpp,v retrieving revision 1.104 retrieving revision 1.105 diff -C2 -d -r1.104 -r1.105 *** accounts.cpp 17 Sep 2004 23:32:58 -0000 1.104 --- accounts.cpp 19 Sep 2004 16:25:35 -0000 1.105 *************** *** 29,41 **** #include "accounts.h" #include "serverconfig.h" - #include "network/uosocket.h" #include "dbdriver.h" #include "console.h" #include "commands.h" #include "player.h" - #include "network/network.h" #include "persistentbroker.h" #include "world.h" #include "md5.h" // DB AutoCreation --- 29,41 ---- #include "accounts.h" #include "serverconfig.h" #include "dbdriver.h" #include "console.h" #include "commands.h" #include "player.h" #include "persistentbroker.h" #include "world.h" #include "md5.h" + #include "network/network.h" + #include "network/uosocket.h" // DB AutoCreation Index: action.h =================================================================== RCS file: /cvsroot/wpdev/wolfpack/action.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** action.h 31 Aug 2004 17:44:37 -0000 1.1 --- action.h 19 Sep 2004 16:25:35 -0000 1.2 *************** *** 1,2 **** --- 1,28 ---- + /* + * Wolfpack Emu (WP) + * UO Server Emulation Program + * + * Copyright 2001-2004 by holders identified in AUTHORS.txt + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Palace - Suite 330, Boston, MA 02111-1307, USA. + * + * In addition to that license, if you are running this program or modified + * versions of it on a public system you HAVE TO make the complete source of + * the version used by you available or provide people with a location to + * download it. + * + * Wolfpack Homepage: http://wpdev.sf.net/ + */ #if !defined(__ACTION_H__) Index: items.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/items.cpp,v retrieving revision 1.449 retrieving revision 1.450 diff -C2 -d -r1.449 -r1.450 *** items.cpp 18 Sep 2004 18:30:05 -0000 1.449 --- items.cpp 19 Sep 2004 16:25:36 -0000 1.450 *************** *** 1933,1937 **** if ( tile.weight == 255 && !isAllMovable() ) { ! if ( tile.flag3 & 0x20 == 0 ) return; } --- 1933,1937 ---- if ( tile.weight == 255 && !isAllMovable() ) { ! if ( ( tile.flag3 & 0x20 ) == 0 ) return; } Index: console.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/console.cpp,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** console.cpp 18 Sep 2004 21:10:40 -0000 1.25 --- console.cpp 19 Sep 2004 16:25:36 -0000 1.26 *************** *** 34,37 **** --- 34,38 ---- #include "world.h" #include "network/network.h" + #include "network/uosocket.h" #include "serverconfig.h" #include "player.h" *************** *** 148,152 **** case 'W': ! Console::instance()->send( "Current Users in the World:\n" ); mSock = Network::instance()->first(); --- 149,153 ---- case 'W': ! Console::instance()->send( tr("Current Users in the World:\n") ); mSock = Network::instance()->first(); Index: action.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/action.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** action.cpp 31 Aug 2004 17:44:37 -0000 1.1 --- action.cpp 19 Sep 2004 16:25:35 -0000 1.2 *************** *** 1,2 **** --- 1,28 ---- + /* + * Wolfpack Emu (WP) + * UO Server Emulation Program + * + * Copyright 2001-2004 by holders identified in AUTHORS.txt + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Palace - Suite 330, Boston, MA 02111-1307, USA. + * + * In addition to that license, if you are running this program or modified + * versions of it on a public system you HAVE TO make the complete source of + * the version used by you available or provide people with a location to + * download it. + * + * Wolfpack Homepage: http://wpdev.sf.net/ + */ #include "action.h" |
From: Correa <thi...@us...> - 2004-09-19 16:25:49
|
Update of /cvsroot/wpdev/wolfpack/win In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10727/win Modified Files: console_win.cpp Log Message: - Added missing copyright headers to some new files - Console will show if Python is UCS2 or UCS4 - Removed few lines of dead code - Some internationalization fixes Index: console_win.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/win/console_win.cpp,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** console_win.cpp 14 Sep 2004 18:05:17 -0000 1.27 --- console_win.cpp 19 Sep 2004 16:25:38 -0000 1.28 *************** *** 38,43 **** --- 38,45 ---- #include "../python/engine.h" #include "../network/network.h" + #include "../network/uosocket.h" #include "../player.h" #include "../server.h" + #include "../inlines.h" #define _WIN32_IE 0x0500 *************** *** 220,225 **** QString credits; ! credits += "Compiled: " __DATE__ " " __TIME__ "\n"; ! credits += QString( "QT: %1 %2 (Compiled: %3)\n" ).arg( qVersion() ).arg( qSharedBuild() ? "Shared" : "Static" ).arg( QT_VERSION_STR ); QString pythonBuild = Py_GetVersion(); --- 222,227 ---- QString credits; ! credits += tr("Compiled: %1 %2\n").arg( __DATE__, __TIME__ ); ! credits += tr( "Qt: %1 %2 (Compiled: %3)\n" ).arg( qVersion() ).arg( qSharedBuild() ? "Shared" : "Static" ).arg( QT_VERSION_STR ); QString pythonBuild = Py_GetVersion(); *************** *** 227,239 **** #if defined(Py_ENABLE_SHARED) ! credits += QString( "Python: %1 Shared (Compiled: %2)\n" ).arg( pythonBuild ).arg( PY_VERSION ); #else ! credits += QString( "Python: %1 Static (Compiled: %2)\n" ).arg( pythonBuild ).arg( PY_VERSION ); #endif ! credits += "Compiled with SQLite " SQLITE_VERSION "\n"; #if defined (MYSQL_DRIVER) ! credits += QString( "Compiled for MySQL " MYSQL_SERVER_VERSION " (Using: %1)\n" ).arg( mysql_get_client_info() ); #else ! credits += "MySQL Support: disabled\n"; #endif --- 229,241 ---- #if defined(Py_ENABLE_SHARED) ! credits += tr( "Python: %1 Shared (Compiled: %2)\n" ).arg( pythonBuild ).arg( PY_VERSION ); #else ! credits += tr( "Python: %1 Static (Compiled: %2)\n" ).arg( pythonBuild ).arg( PY_VERSION ); #endif ! credits += tr( "Compiled with SQLite %1\n" ).arg(SQLITE_VERSION); #if defined (MYSQL_DRIVER) ! credits += tr( "Compiled for MySQL %1 (Using: %2)\n" ).arg( MYSQL_SERVER_VERSION, mysql_get_client_info() ); #else ! credits += tr("MySQL Support: disabled\n"); #endif *************** *** 244,248 **** SendMessage( richtext, EM_REPLACESEL, FALSE, ( LPARAM ) credits.latin1() ); ! credits = "\nThis is an unsorted and not neccesarily complete list of people who contributed to Wolfpack:\n\n"; cr.cpMin = GetWindowTextLength( richtext ); --- 246,250 ---- SendMessage( richtext, EM_REPLACESEL, FALSE, ( LPARAM ) credits.latin1() ); ! credits = tr("\nThis is an unsorted and not neccesarily complete list of people who contributed to Wolfpack:\n\n"); cr.cpMin = GetWindowTextLength( richtext ); *************** *** 588,596 **** /* ! Parse the Windows command line string. If an argument begins with a ! double quote, then spaces are considered part of the argument until the ! next double quote. The argument terminates at the second quote. Note ! that this is different from the usual Unix semantics. ! */ char* p = cmdLine; --- 590,598 ---- /* ! Parse the Windows command line string. If an argument begins with a ! double quote, then spaces are considered part of the argument until the ! next double quote. The argument terminates at the second quote. Note ! that this is different from the usual Unix semantics. ! */ char* p = cmdLine; *************** *** 641,645 **** if ( returnValue_ != 0 ) { ! Console::instance()->send( "\nThe server has been shut down. You can close this window now.\n" ); canClose = true; } --- 643,647 ---- if ( returnValue_ != 0 ) { ! Console::instance()->send( tr("\nThe server has been shut down. You can close this window now.\n") ); canClose = true; } |
From: Correa <thi...@us...> - 2004-09-19 16:25:49
|
Update of /cvsroot/wpdev/wolfpack/network In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10727/network Modified Files: network.cpp network.h uopacket.cpp uosocket.cpp Log Message: - Added missing copyright headers to some new files - Console will show if Python is UCS2 or UCS4 - Removed few lines of dead code - Some internationalization fixes Index: network.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/network/network.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** network.cpp 19 Aug 2004 01:22:56 -0000 1.4 --- network.cpp 19 Sep 2004 16:25:36 -0000 1.5 *************** *** 44,62 **** // Library Includes #include <qstringlist.h> ! cNetwork::cNetwork() { - loginSockets.setAutoDelete( true ); - uoSockets.setAutoDelete( true ); - netIo_ = new cAsyncNetIO; - loginServer_ = 0; - gameServer_ = 0; } cNetwork::~cNetwork() { ! delete loginServer_; ! delete gameServer_; ! delete netIo_; } --- 44,85 ---- // Library Includes #include <qstringlist.h> + #include <qmutex.h> ! ! class cNetwork::cNetworkPrivate ! { ! public: ! QPtrList<cUOSocket> uoSockets; ! QPtrList<cUOSocket> loginSockets; ! cAsyncNetIO* netIo_; ! cListener* loginServer_; ! cListener* gameServer_; ! QMutex mutex; ! ! cNetworkPrivate() ! { ! loginSockets.setAutoDelete( true ); ! uoSockets.setAutoDelete( true ); ! netIo_ = new cAsyncNetIO; ! loginServer_ = 0; ! gameServer_ = 0; ! } ! ! ~cNetworkPrivate() ! { ! delete loginServer_; ! delete gameServer_; ! delete netIo_; ! } ! }; ! ! ! cNetwork::cNetwork() : d( new cNetworkPrivate ) { } cNetwork::~cNetwork() { ! delete d; } *************** *** 66,106 **** // Check for new Connections (LoginServer) ! if ( loginServer_ && loginServer_->haveNewConnection() ) { ! QSocketDevice* socket = loginServer_->getNewConnection(); ! netIo_->registerSocket( socket, true ); cUOSocket* uosocket = new cUOSocket( socket ); ! loginSockets.append( uosocket ); // Notify the admin ! uosocket->log( QString( "Client connected to login server (%1).\n" ).arg( socket->peerAddress().toString() ) ); } // Check for new Connections (GameServer) ! if ( gameServer_ && gameServer_->haveNewConnection() ) { ! QSocketDevice* socket = gameServer_->getNewConnection(); ! netIo_->registerSocket( socket, false ); cUOSocket* uosocket = new cUOSocket( socket ); ! loginSockets.append( uosocket ); // Notify the admin ! uosocket->log( QString( "Client connected to game server (%1).\n" ).arg( socket->peerAddress().toString() ) ); } // fast return ! if ( !uoSockets.isEmpty() || !loginSockets.isEmpty() ) { // Check for new Packets cUOSocket* uoSocket = 0; ! for ( uoSocket = uoSockets.first(); uoSocket; uoSocket = uoSockets.next() ) { // Check for disconnected sockets if ( uoSocket->socket()->error() != QSocketDevice::NoError || !uoSocket->socket()->isValid() || !uoSocket->socket()->isWritable() || uoSocket->socket()->isInactive() || !uoSocket->socket()->isOpen() ) { ! uoSocket->log( "Client disconnected.\n" ); uoSocket->disconnect(); ! netIo_->unregisterSocket( uoSocket->socket() ); ! uoSockets.remove( uoSocket ); } else --- 89,129 ---- // Check for new Connections (LoginServer) ! if ( d->loginServer_ && d->loginServer_->haveNewConnection() ) { ! QSocketDevice* socket = d->loginServer_->getNewConnection(); ! d->netIo_->registerSocket( socket, true ); cUOSocket* uosocket = new cUOSocket( socket ); ! d->loginSockets.append( uosocket ); // Notify the admin ! uosocket->log( tr( "Client connected to login server (%1).\n" ).arg( socket->peerAddress().toString() ) ); } // Check for new Connections (GameServer) ! if ( d->gameServer_ && d->gameServer_->haveNewConnection() ) { ! QSocketDevice* socket = d->gameServer_->getNewConnection(); ! d->netIo_->registerSocket( socket, false ); cUOSocket* uosocket = new cUOSocket( socket ); ! d->loginSockets.append( uosocket ); // Notify the admin ! uosocket->log( tr( "Client connected to game server (%1).\n" ).arg( socket->peerAddress().toString() ) ); } // fast return ! if ( !d->uoSockets.isEmpty() || !d->loginSockets.isEmpty() ) { // Check for new Packets cUOSocket* uoSocket = 0; ! for ( uoSocket = d->uoSockets.first(); uoSocket; uoSocket = d->uoSockets.next() ) { // Check for disconnected sockets if ( uoSocket->socket()->error() != QSocketDevice::NoError || !uoSocket->socket()->isValid() || !uoSocket->socket()->isWritable() || uoSocket->socket()->isInactive() || !uoSocket->socket()->isOpen() ) { ! uoSocket->log( tr("Client disconnected.\n") ); uoSocket->disconnect(); ! d->netIo_->unregisterSocket( uoSocket->socket() ); ! d->uoSockets.remove( uoSocket ); } else *************** *** 116,120 **** { uoSocket->log( LOG_PYTHON, e.error() + "\n" ); ! uoSocket->log( LOG_ERROR, "Disconnecting due to an unhandled exception.\n" ); uoSocket->disconnect(); } --- 139,143 ---- { uoSocket->log( LOG_PYTHON, e.error() + "\n" ); ! uoSocket->log( LOG_ERROR, tr("Disconnecting due to an unhandled exception.\n") ); uoSocket->disconnect(); } *************** *** 122,132 **** } ! for ( uoSocket = loginSockets.first(); uoSocket; uoSocket = loginSockets.next() ) { if ( uoSocket->socket()->error() != QSocketDevice::NoError || !uoSocket->socket()->isValid() || !uoSocket->socket()->isOpen() ) { ! uoSocket->log( "Client disconnected.\n" ); ! netIo_->unregisterSocket( uoSocket->socket() ); ! loginSockets.remove(); continue; } --- 145,155 ---- } ! for ( uoSocket = d->loginSockets.first(); uoSocket; uoSocket = d->loginSockets.next() ) { if ( uoSocket->socket()->error() != QSocketDevice::NoError || !uoSocket->socket()->isValid() || !uoSocket->socket()->isOpen() ) { ! uoSocket->log( tr("Client disconnected.\n") ); ! d->netIo_->unregisterSocket( uoSocket->socket() ); ! d->loginSockets.remove(); continue; } *************** *** 136,140 **** if ( uoSocket->state() == cUOSocket::InGame ) { ! uoSockets.append( loginSockets.take() ); } } --- 159,163 ---- if ( uoSocket->state() == cUOSocket::InGame ) { ! d->uoSockets.append( d->loginSockets.take() ); } } *************** *** 149,167 **** if ( Config::instance()->enableLogin() ) { ! loginServer_ = new cListener( Config::instance()->loginPort() ); ! loginServer_->start(); ! Console::instance()->send( QString( "LoginServer running on port %1\n" ).arg( Config::instance()->loginPort() ) ); if ( Config::instance()->serverList().size() < 1 ) ! Console::instance()->log( LOG_WARNING, "LoginServer enabled but there no Game server entries found\n Check your wolfpack.xml settings" ); } if ( Config::instance()->enableGame() ) { ! gameServer_ = new cListener( Config::instance()->gamePort() ); ! gameServer_->start(); ! Console::instance()->send( QString( "GameServer running on port %1\n" ).arg( Config::instance()->gamePort() ) ); } ! netIo_->start(); cComponent::load(); } --- 172,190 ---- if ( Config::instance()->enableLogin() ) { ! d->loginServer_ = new cListener( Config::instance()->loginPort() ); ! d->loginServer_->start(); ! Console::instance()->send( tr( "LoginServer running on port %1\n" ).arg( Config::instance()->loginPort() ) ); if ( Config::instance()->serverList().size() < 1 ) ! Console::instance()->log( LOG_WARNING, tr("LoginServer enabled but there no Game server entries found\n Check your wolfpack.xml settings") ); } if ( Config::instance()->enableGame() ) { ! d->gameServer_ = new cListener( Config::instance()->gamePort() ); ! d->gameServer_->start(); ! Console::instance()->send( tr( "GameServer running on port %1\n" ).arg( Config::instance()->gamePort() ) ); } ! d->netIo_->start(); cComponent::load(); } *************** *** 177,221 **** void cNetwork::unload() { ! if ( loginServer_ ) { ! loginServer_->cancel(); ! loginServer_->wait(); ! delete loginServer_; ! loginServer_ = 0; } ! if ( gameServer_ ) { ! gameServer_->cancel(); ! gameServer_->wait(); ! delete gameServer_; ! gameServer_ = 0; } // Disconnect all connected sockets cUOSocket* socket; ! for ( socket = uoSockets.first(); socket; socket = uoSockets.next() ) { socket->disconnect(); ! netIo_->unregisterSocket( socket->socket() ); } ! uoSockets.clear(); ! for ( socket = loginSockets.first(); socket; socket = loginSockets.next() ) { socket->disconnect(); ! netIo_->unregisterSocket( socket->socket() ); } ! loginSockets.clear(); ! netIo_->cancel(); ! netIo_->wait(); cComponent::unload(); } void cNetwork::broadcast( const QString& message, Q_UINT16 color, Q_UINT16 font ) { ! for ( cUOSocket*socket = uoSockets.first(); socket; socket = uoSockets.next() ) { socket->sysMessage( message, color, font ); --- 200,279 ---- void cNetwork::unload() { ! if ( d->loginServer_ ) { ! d->loginServer_->cancel(); ! d->loginServer_->wait(); ! delete d->loginServer_; ! d->loginServer_ = 0; } ! if ( d->gameServer_ ) { ! d->gameServer_->cancel(); ! d->gameServer_->wait(); ! delete d->gameServer_; ! d->gameServer_ = 0; } // Disconnect all connected sockets cUOSocket* socket; ! for ( socket = d->uoSockets.first(); socket; socket = d->uoSockets.next() ) { socket->disconnect(); ! d->netIo_->unregisterSocket( socket->socket() ); } ! d->uoSockets.clear(); ! for ( socket = d->loginSockets.first(); socket; socket = d->loginSockets.next() ) { socket->disconnect(); ! d->netIo_->unregisterSocket( socket->socket() ); } ! d->loginSockets.clear(); ! d->netIo_->cancel(); ! d->netIo_->wait(); cComponent::unload(); } + void cNetwork::lock() + { + d->mutex.lock(); + } + + void cNetwork::unlock() + { + d->mutex.unlock(); + } + + cAsyncNetIO* cNetwork::netIo() + { + return d->netIo_; + } + + cUOSocket* cNetwork::first() + { + return d->uoSockets.first(); + } + + cUOSocket* cNetwork::next() + { + return d->uoSockets.next(); + } + + Q_UINT32 cNetwork::count() + { + return d->uoSockets.count(); + } + + QPtrListIterator<cUOSocket> cNetwork::getIterator() + { + return QPtrListIterator<cUOSocket>( d->uoSockets ); + } + void cNetwork::broadcast( const QString& message, Q_UINT16 color, Q_UINT16 font ) { ! for ( cUOSocket*socket = d->uoSockets.first(); socket; socket = d->uoSockets.next() ) { socket->sysMessage( message, color, font ); Index: network.h =================================================================== RCS file: /cvsroot/wpdev/wolfpack/network/network.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** network.h 19 Aug 2004 01:22:56 -0000 1.3 --- network.h 19 Sep 2004 16:25:37 -0000 1.4 *************** *** 30,34 **** // Library Includes - #include <qmutex.h> #include <qptrlist.h> --- 30,33 ---- *************** *** 40,44 **** //Forward class Declaration - class cNetworkStuff; class cAsyncNetIO; class cListener; --- 39,42 ---- *************** *** 47,57 **** class cNetwork : public cComponent { ! QPtrList<cUOSocket> uoSockets; ! QPtrList<cUOSocket> loginSockets; ! cAsyncNetIO* netIo_; ! cListener* loginServer_; ! cListener* gameServer_; ! QMutex mutex; ! public: cNetwork(); --- 45,50 ---- class cNetwork : public cComponent { ! class cNetworkPrivate; ! cNetworkPrivate* d; public: cNetwork(); *************** *** 69,100 **** void poll( void ); // called by the main loop ! void lock() ! { ! mutex.lock(); ! } ! void unlock() ! { ! mutex.unlock(); ! } ! cAsyncNetIO* netIo() ! { ! return netIo_; ! } ! cUOSocket* first() ! { ! return uoSockets.first(); ! } ! cUOSocket* next() ! { ! return uoSockets.next(); ! } ! Q_UINT32 count() ! { ! return uoSockets.count(); ! } ! QPtrListIterator<cUOSocket> getIterator() ! { ! return QPtrListIterator<cUOSocket>( uoSockets ); ! } void broadcast( const QString& message, Q_UINT16 color = 0x84d, Q_UINT16 font = 0 ); --- 62,72 ---- void poll( void ); // called by the main loop ! void lock(); ! void unlock(); ! cAsyncNetIO* netIo(); ! cUOSocket* first(); ! cUOSocket* next(); ! Q_UINT32 count(); ! QPtrListIterator<cUOSocket> getIterator(); void broadcast( const QString& message, Q_UINT16 color = 0x84d, Q_UINT16 font = 0 ); Index: uosocket.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/network/uosocket.cpp,v retrieving revision 1.414 retrieving revision 1.415 diff -C2 -d -r1.414 -r1.415 *** uosocket.cpp 19 Sep 2004 04:00:35 -0000 1.414 --- uosocket.cpp 19 Sep 2004 16:25:37 -0000 1.415 *************** *** 816,820 **** _account = authRet; ! log( QString( "Automatically created account '%1'.\n" ).arg( username ) ); return true; } --- 816,820 ---- _account = authRet; ! log( tr( "Automatically created account '%1'.\n" ).arg( username ) ); return true; } *************** *** 823,836 **** break; case cAccounts::BadPassword: ! log( QString( "Failed to log in as '%1', wrong password\n" ).arg( username ) ); denyPacket.setReason( cUOTxDenyLogin::DL_BADPASSWORD ); break; case cAccounts::Wipped: case cAccounts::Banned: ! log( QString( "Failed to log in as '%1', Wipped/Banned account\n" ).arg( username ) ); denyPacket.setReason( cUOTxDenyLogin::DL_BLOCKED ); break; case cAccounts::AlreadyInUse: ! log( QString( "Failed to log in as '%1', account is already in use\n" ).arg( username ) ); denyPacket.setReason( cUOTxDenyLogin::DL_INUSE ); break; --- 823,836 ---- break; case cAccounts::BadPassword: ! log( tr( "Failed to log in as '%1', wrong password\n" ).arg( username ) ); denyPacket.setReason( cUOTxDenyLogin::DL_BADPASSWORD ); break; case cAccounts::Wipped: case cAccounts::Banned: ! log( tr( "Failed to log in as '%1', Wipped/Banned account\n" ).arg( username ) ); denyPacket.setReason( cUOTxDenyLogin::DL_BLOCKED ); break; case cAccounts::AlreadyInUse: ! log( tr( "Failed to log in as '%1', account is already in use\n" ).arg( username ) ); denyPacket.setReason( cUOTxDenyLogin::DL_INUSE ); break; *************** *** 839,848 **** }; ! log( QString( "Failed to log in as '%1'.\n" ).arg( username ) ); send( &denyPacket ); } else if ( error == cAccounts::NoError ) { ! log( QString( "Logged in as '%1'.\n" ).arg( username ) ); } --- 839,848 ---- }; ! log( tr( "Failed to log in as '%1'.\n" ).arg( username ) ); send( &denyPacket ); } else if ( error == cAccounts::NoError ) { ! log( tr( "Logged in as '%1'.\n" ).arg( username ) ); } Index: uopacket.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/network/uopacket.cpp,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** uopacket.cpp 10 Aug 2004 03:24:29 -0000 1.45 --- uopacket.cpp 19 Sep 2004 16:25:37 -0000 1.46 *************** *** 196,246 **** QByteArray temp( rawPacket.size() * 2 ); // worst case scenario for memory size - //#define OLDCOMPRESS - #ifdef OLDCOMPRESS - unsigned char * pIn = ( unsigned char * ) rawPacket.data(); - unsigned char * pOut = ( unsigned char * ) temp.data(); - - int actByte = 0; - int bitByte = 0; - int nrBits; - unsigned int value; - unsigned int len = rawPacket.size(); - - while ( len-- ) - { - nrBits = bitTable[*pIn].size; - value = bitTable[*pIn++].code; - - while ( nrBits-- ) - { - pOut[actByte] = ( pOut[actByte] << 1 ) | ( unsigned char ) ( ( value >> nrBits ) & 0x1 ); - bitByte = ( bitByte + 1 ) & 0x07; - if ( !bitByte ) - ++actByte; - } - } - - nrBits = bitTable[256].size; - value = bitTable[256].code; - - while ( nrBits-- ) - { - pOut[actByte] = ( pOut[actByte] << 1 ) | ( unsigned char ) ( ( value >> nrBits ) & 0x1 ); - - bitByte = ( bitByte + 1 ) & 0x07; - if ( !bitByte ) - ++actByte; - } - - if ( bitByte ) - { - while ( bitByte < 8 ) - { - pOut[actByte] <<= 1; - ++bitByte; - } - ++actByte; - } - #else int bufferSize = 0; // 32 bits buffer size (bits) Q_INT32 buffer32 = 0; // 32 bits buffer to store the compressed data until it's larger than 1 byte --- 196,199 ---- *************** *** 279,283 **** temp[actByte++] = ( unsigned char ) ( buffer32 << 8 - bufferSize ) & 0xFF;//& 31; } - #endif compressedBuffer.duplicate( temp.data(), actByte ); } --- 232,235 ---- |
From: Correa <thi...@us...> - 2004-09-19 16:25:48
|
Update of /cvsroot/wpdev/wolfpack/python In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10727/python Modified Files: pyaction.cpp pyaction.h Log Message: - Added missing copyright headers to some new files - Console will show if Python is UCS2 or UCS4 - Removed few lines of dead code - Some internationalization fixes Index: pyaction.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/python/pyaction.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** pyaction.cpp 31 Aug 2004 19:24:04 -0000 1.1 --- pyaction.cpp 19 Sep 2004 16:25:37 -0000 1.2 *************** *** 1,2 **** --- 1,28 ---- + /* + * Wolfpack Emu (WP) + * UO Server Emulation Program + * + * Copyright 2001-2004 by holders identified in AUTHORS.txt + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Palace - Suite 330, Boston, MA 02111-1307, USA. + * + * In addition to that license, if you are running this program or modified + * versions of it on a public system you HAVE TO make the complete source of + * the version used by you available or provide people with a location to + * download it. + * + * Wolfpack Homepage: http://wpdev.sf.net/ + */ #include "pyaction.h" Index: pyaction.h =================================================================== RCS file: /cvsroot/wpdev/wolfpack/python/pyaction.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** pyaction.h 31 Aug 2004 19:24:04 -0000 1.1 --- pyaction.h 19 Sep 2004 16:25:37 -0000 1.2 *************** *** 1,2 **** --- 1,28 ---- + /* + * Wolfpack Emu (WP) + * UO Server Emulation Program + * + * Copyright 2001-2004 by holders identified in AUTHORS.txt + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Palace - Suite 330, Boston, MA 02111-1307, USA. + * + * In addition to that license, if you are running this program or modified + * versions of it on a public system you HAVE TO make the complete source of + * the version used by you available or provide people with a location to + * download it. + * + * Wolfpack Homepage: http://wpdev.sf.net/ + */ #if !defined(__PYACTION_H__) |
From: Sebastian H. <dar...@us...> - 2004-09-19 16:23:52
|
Update of /cvsroot/wpdev/wolfpack/python In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10324/python Modified Files: char.cpp Log Message: another fix for canreach Index: char.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/python/char.cpp,v retrieving revision 1.194 retrieving revision 1.195 diff -C2 -d -r1.194 -r1.195 *** char.cpp 18 Sep 2004 18:41:55 -0000 1.194 --- char.cpp 19 Sep 2004 16:23:43 -0000 1.195 *************** *** 2014,2019 **** P_ITEM pItem = getWpItem(target); // Range -1 means that the item has to be on the char ! if (range == -1 && pItem->getOutmostChar() != self->pChar) { Py_RETURN_FALSE; } --- 2014,2025 ---- P_ITEM pItem = getWpItem(target); + P_CHAR pOutmost = pItem->getOutmostChar(); + + if (pOutmost == self->pChar) { + Py_RETURN_TRUE; + } + // Range -1 means that the item has to be on the char ! if (range == -1 && pOutmost != self->pChar) { Py_RETURN_FALSE; } |
From: Klaus M. <nad...@us...> - 2004-09-19 16:20:35
|
Update of /cvsroot/wpdev/xmlscripts/scripts/contextmenus In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9677/scripts/contextmenus Modified Files: petmenu.py Log Message: pet speech fix/intendation fix Index: petmenu.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/contextmenus/petmenu.py,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** petmenu.py 9 Sep 2004 17:28:11 -0000 1.8 --- petmenu.py 19 Sep 2004 16:20:11 -0000 1.9 *************** *** 24,36 **** if tag == 1: # Command: Kill ! attack(char, target, 0) elif tag == 2: # Command: Follow ! follow(char, target, 0) elif tag == 5: # Command: Stay ! stop(char, target, 0) elif tag == 7: # Transfer ! transfer(char, target) elif tag == 8: # Release ! release(char, target) # Disabled for now --- 24,36 ---- if tag == 1: # Command: Kill ! attack(char, target, 0) elif tag == 2: # Command: Follow ! follow(char, target, 0) elif tag == 5: # Command: Stay ! stop(char, target, 0) elif tag == 7: # Transfer ! transfer(char, target) elif tag == 8: # Release ! release(char, target) # Disabled for now |
From: Klaus M. <nad...@us...> - 2004-09-19 16:20:35
|
Update of /cvsroot/wpdev/xmlscripts/scripts/speech In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9677/scripts/speech Modified Files: pets.py Log Message: pet speech fix/intendation fix Index: pets.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/speech/pets.py,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** pets.py 14 Sep 2004 01:35:26 -0000 1.19 --- pets.py 19 Sep 2004 16:20:12 -0000 1.20 *************** *** 162,165 **** --- 162,167 ---- if not char.socket: return 0 + + text = text.lower() # Test Ownership / Allow GMs to control *************** *** 173,177 **** if all: - text = text.lower() #char.socket.sysmessage('zzz ALL') # begin all # --- 175,178 ---- |