Update of /cvsroot/wpdev/wolfpack
In directory sc8-pr-cvs1:/tmp/cvs-serv23381
Modified Files:
Trade.cpp ai.cpp basechar.cpp basechar.h boats.cpp chars.cpp
commands.cpp dbl_single_click.cpp encryption.cpp globals.cpp
globals.h items.cpp log.cpp log.h makemenus.cpp network.cpp
npc.cpp persistentbroker.cpp player.cpp progress.h
pythonscript.cpp resources.cpp scriptmanager.cpp sectors.cpp
skills.cpp spawnregions.cpp speech.cpp territories.cpp
tilecache.cpp typedefs.h wolf.dsp wolfpack.cpp wolfpack.h
wolfpack.pro world.cpp wpdefmanager.cpp
Log Message:
Trying out new console code.
Index: Trade.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/Trade.cpp,v
retrieving revision 1.88
retrieving revision 1.89
diff -C2 -d -r1.88 -r1.89
*** Trade.cpp 7 Sep 2003 19:07:46 -0000 1.88
--- Trade.cpp 8 Sep 2003 10:58:46 -0000 1.89
***************
*** 44,48 ****
#include "player.h"
#include "world.h"
! #include "wpconsole.h"
#include "network.h"
#include "items.h"
--- 44,48 ----
#include "player.h"
#include "world.h"
! #include "console.h"
#include "network.h"
#include "items.h"
***************
*** 222,226 ****
if( pChar->takeGold( totalValue, true ) < totalValue )
! clConsole.send( QString( "Player 0x%1 payed less than he should have to vendor 0x%2" ).arg( pChar->serial(), 8, 16 ).arg( pVendor->serial(), 8, 16 ) );
}
--- 222,226 ----
if( pChar->takeGold( totalValue, true ) < totalValue )
! Console::instance()->send( QString( "Player 0x%1 payed less than he should have to vendor 0x%2" ).arg( pChar->serial(), 8, 16 ).arg( pVendor->serial(), 8, 16 ) );
}
Index: ai.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/ai.cpp,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** ai.cpp 7 Sep 2003 19:07:46 -0000 1.17
--- ai.cpp 8 Sep 2003 10:58:46 -0000 1.18
***************
*** 41,45 ****
#include "itemid.h"
#include "items.h"
! #include "wpconsole.h"
#include "world.h"
--- 41,45 ----
#include "itemid.h"
#include "items.h"
! #include "console.h"
#include "world.h"
***************
*** 183,187 ****
}
else
! clConsole.send( "Action tag in ai definition must contain attributes for pre-,postcondition and execute at least\n" );
}
else if( TagName == "onspeech" )
--- 183,187 ----
}
else
! Console::instance()->send( "Action tag in ai definition must contain attributes for pre-,postcondition and execute at least\n" );
}
else if( TagName == "onspeech" )
Index: basechar.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/basechar.cpp,v
retrieving revision 1.40
retrieving revision 1.41
diff -C2 -d -r1.40 -r1.41
*** basechar.cpp 5 Sep 2003 00:03:44 -0000 1.40
--- basechar.cpp 8 Sep 2003 10:58:46 -0000 1.41
***************
*** 36,40 ****
#include "persistentbroker.h"
#include "dbdriver.h"
! #include "wpconsole.h"
#include "maps.h"
#include "chars.h"
--- 36,40 ----
#include "persistentbroker.h"
#include "dbdriver.h"
! #include "console.h"
#include "maps.h"
#include "chars.h"
***************
*** 337,341 ****
pc->setSkin( 0xF000 );
pc->setOrgSkin( 0xF000 );
! clConsole.send(QString("char/player: %1 : [%2] correted problematic skin hue\n").arg(pc->name()).arg( pc->serial(), 16 ) );
}
}
--- 337,341 ----
pc->setSkin( 0xF000 );
pc->setOrgSkin( 0xF000 );
! Console::instance()->send(QString("char/player: %1 : [%2] correted problematic skin hue\n").arg(pc->name()).arg( pc->serial(), 16 ) );
}
}
Index: basechar.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/basechar.h,v
retrieving revision 1.30
retrieving revision 1.31
diff -C2 -d -r1.30 -r1.31
*** basechar.h 5 Sep 2003 00:03:45 -0000 1.30
--- basechar.h 8 Sep 2003 10:58:46 -0000 1.31
***************
*** 47,59 ****
class cUOTxTooltipList;
- enum eLogLevel;
! enum eDamageType
! {
! DAMAGE_PHYSICAL = 0,
! DAMAGE_MAGICAL = 1,
! DAMAGE_GODLY = 2,
! DAMAGE_HUNGER = 3
! };
// This class is the base interface for all char objects.
--- 47,52 ----
class cUOTxTooltipList;
!
// This class is the base interface for all char objects.
Index: boats.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/boats.cpp,v
retrieving revision 1.113
retrieving revision 1.114
diff -C2 -d -r1.113 -r1.114
*** boats.cpp 7 Sep 2003 19:07:46 -0000 1.113
--- boats.cpp 8 Sep 2003 10:58:47 -0000 1.114
***************
*** 46,50 ****
#include "world.h"
#include "globals.h"
! #include "wpconsole.h"
#include "log.h"
#include "player.h"
--- 46,50 ----
#include "world.h"
#include "globals.h"
! #include "console.h"
#include "log.h"
#include "player.h"
***************
*** 690,694 ****
break;
default:
! clConsole.log( LOG_WARNING, QString( "cBoat::Move: invalid boatdirection caught (boatdir: %1, serial: %2), corrected to north boatdir!" ).arg( this->boatdir ).arg( this->serial() ) );
this->boatdir = 0;
dy -= moves_;
--- 690,694 ----
break;
default:
! Console::instance()->log( LOG_WARNING, QString( "cBoat::Move: invalid boatdirection caught (boatdir: %1, serial: %2), corrected to north boatdir!" ).arg( this->boatdir ).arg( this->serial() ) );
this->boatdir = 0;
dy -= moves_;
Index: chars.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/chars.cpp,v
retrieving revision 1.330
retrieving revision 1.331
diff -C2 -d -r1.330 -r1.331
*** chars.cpp 5 Sep 2003 00:03:45 -0000 1.330
--- chars.cpp 8 Sep 2003 10:58:47 -0000 1.331
***************
*** 44,48 ****
#include "sectors.h"
#include "wpdefmanager.h"
! #include "wpconsole.h"
#include "log.h"
--- 44,48 ----
#include "sectors.h"
#include "wpdefmanager.h"
! #include "console.h"
#include "log.h"
***************
*** 109,113 ****
if( !DefSection )
{
! clConsole.log( LOG_ERROR, QString( "Unable to create unscripted npc: %1\n" ).arg( section ) );
return NULL;
}
--- 109,113 ----
if( !DefSection )
{
! Console::instance()->log( LOG_ERROR, QString( "Unable to create unscripted npc: %1\n" ).arg( section ) );
return NULL;
}
Index: commands.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/commands.cpp,v
retrieving revision 1.198
retrieving revision 1.199
diff -C2 -d -r1.198 -r1.199
*** commands.cpp 7 Sep 2003 19:07:46 -0000 1.198
--- commands.cpp 8 Sep 2003 10:58:47 -0000 1.199
***************
*** 44,48 ****
#include "tilecache.h"
#include "chars.h"
! #include "wpconsole.h"
#include "wpdefmanager.h"
#include "scriptmanager.h"
--- 44,48 ----
#include "tilecache.h"
#include "chars.h"
! #include "console.h"
#include "wpdefmanager.h"
#include "scriptmanager.h"
***************
*** 129,135 ****
if( ScriptSections.isEmpty() )
{
! clConsole.ChangeColor( WPC_RED );
! clConsole.send( tr("WARNING: No ACLs for players, counselors, gms and admins defined!\n") );
! clConsole.ChangeColor( WPC_NORMAL );
return;
}
--- 129,135 ----
if( ScriptSections.isEmpty() )
{
! Console::instance()->ChangeColor( WPC_RED );
! Console::instance()->send( tr("WARNING: No ACLs for players, counselors, gms and admins defined!\n") );
! Console::instance()->ChangeColor( WPC_NORMAL );
return;
}
***************
*** 869,873 ****
if( subCommand == "python" )
{
! clConsole.send( "Reloading python scripts\n" );
ScriptManager->reload();
ContextMenus::instance()->reload();
--- 869,873 ----
if( subCommand == "python" )
{
! Console::instance()->send( "Reloading python scripts\n" );
ScriptManager->reload();
ContextMenus::instance()->reload();
***************
*** 875,879 ****
if( subCommand == "scripts" )
{
! clConsole.send( "Reloading definitions, scripts and wolfpack.xml\n" );
SrvParams->reload(); // Reload wolfpack.xml
--- 875,879 ----
if( subCommand == "scripts" )
{
! Console::instance()->send( "Reloading definitions, scripts and wolfpack.xml\n" );
SrvParams->reload(); // Reload wolfpack.xml
***************
*** 906,910 ****
if( subCommand == "all" )
{
! clConsole.send( "Reloading definitions, scripts and wolfpack.xml\n" );
SrvParams->reload(); // Reload wolfpack.xml
--- 906,910 ----
if( subCommand == "all" )
{
! Console::instance()->send( "Reloading definitions, scripts and wolfpack.xml\n" );
SrvParams->reload(); // Reload wolfpack.xml
Index: dbl_single_click.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/dbl_single_click.cpp,v
retrieving revision 1.221
retrieving revision 1.222
diff -C2 -d -r1.221 -r1.222
*** dbl_single_click.cpp 7 Sep 2003 19:07:46 -0000 1.221
--- dbl_single_click.cpp 8 Sep 2003 10:58:47 -0000 1.222
***************
*** 402,406 ****
// }
// else
! // clConsole.send("Unhandled guild item type named: %s with ID of: %X", pi->name().ascii(), pi->id());
return;
// End of guild stuff
--- 402,406 ----
// }
// else
! // Console::instance()->send("Unhandled guild item type named: %s with ID of: %X", pi->name().ascii(), pi->id());
return;
// End of guild stuff
Index: encryption.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/encryption.cpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** encryption.cpp 7 Sep 2003 19:07:46 -0000 1.13
--- encryption.cpp 8 Sep 2003 10:58:47 -0000 1.14
***************
*** 39,43 ****
#include "encryption.h"
#include "wpdefmanager.h"
! #include "wpconsole.h"
#include "globals.h"
#include "prototypes.h"
--- 39,43 ----
#include "encryption.h"
#include "wpdefmanager.h"
! #include "console.h"
#include "globals.h"
#include "prototypes.h"
Index: globals.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/globals.cpp,v
retrieving revision 1.100
retrieving revision 1.101
diff -C2 -d -r1.100 -r1.101
*** globals.cpp 7 Sep 2003 19:07:46 -0000 1.100
--- globals.cpp 8 Sep 2003 10:58:47 -0000 1.101
***************
*** 38,42 ****
#include "wptargetrequests.h"
#include "typedefs.h"
! #include "wpconsole.h"
#include "srvparams.h"
#include "skills.h"
--- 38,42 ----
#include "wptargetrequests.h"
#include "typedefs.h"
! #include "console.h"
#include "srvparams.h"
#include "skills.h"
***************
*** 56,60 ****
// Instantiate our console object
! WPConsole_cl clConsole;
time_t oldtime, newtime;
--- 56,60 ----
// Instantiate our console object
! cConsole clConsole;
time_t oldtime, newtime;
Index: globals.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/globals.h,v
retrieving revision 1.74
retrieving revision 1.75
diff -C2 -d -r1.74 -r1.75
*** globals.h 7 Sep 2003 19:07:46 -0000 1.74
--- globals.h 8 Sep 2003 10:58:47 -0000 1.75
***************
*** 52,57 ****
class cScriptManager;
class WPDefManager;
- class WPConsole_cl;
- //Wolfpack Includes
#include "structs.h"
--- 52,55 ----
***************
*** 60,66 ****
extern enServerState serverState;
-
- // Instantiate our console object
- extern WPConsole_cl clConsole;
extern unsigned int uiCurrentTime;
--- 58,61 ----
Index: items.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/items.cpp,v
retrieving revision 1.347
retrieving revision 1.348
diff -C2 -d -r1.347 -r1.348
*** items.cpp 7 Sep 2003 19:07:47 -0000 1.347
--- items.cpp 8 Sep 2003 10:58:47 -0000 1.348
***************
*** 60,64 ****
#include "globals.h"
#include "inlines.h"
! #include "wpconsole.h"
// System Includes
--- 60,64 ----
#include "globals.h"
#include "inlines.h"
! #include "console.h"
// System Includes
***************
*** 714,718 ****
if( !pSpawned )
{
! clConsole.send( tr( "Unable to spawn unscripted item: %1" ).arg( pItem->carve() ) );
break;
}
--- 714,718 ----
if( !pSpawned )
{
! Console::instance()->send( tr( "Unable to spawn unscripted item: %1" ).arg( pItem->carve() ) );
break;
}
***************
*** 854,858 ****
if( !DefSection ) // section not found
{
! clConsole.log( LOG_ERROR, QString( "Unable to create unscripted item: %1\n" ).arg( Section ) );
return NULL;
}
--- 854,858 ----
if( !DefSection ) // section not found
{
! Console::instance()->log( LOG_ERROR, QString( "Unable to create unscripted item: %1\n" ).arg( Section ) );
return NULL;
}
***************
*** 1971,1975 ****
if( pItem == this )
{
! clConsole.log( LOG_WARNING, QString( "Rejected putting an item into itself (%1)" ).arg( serial_, 0, 16 ) );
return;
}
--- 1971,1975 ----
if( pItem == this )
{
! Console::instance()->log( LOG_WARNING, QString( "Rejected putting an item into itself (%1)" ).arg( serial_, 0, 16 ) );
return;
}
Index: log.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/log.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** log.cpp 6 Sep 2003 16:12:33 -0000 1.2
--- log.cpp 8 Sep 2003 10:58:47 -0000 1.3
***************
*** 36,40 ****
#include "srvparams.h"
#include "network/uosocket.h"
! #include "wpconsole.h"
// QT Includes
--- 36,40 ----
#include "srvparams.h"
#include "network/uosocket.h"
! #include "console.h"
// QT Includes
***************
*** 69,73 ****
if ( !d.exists(path) )
{
! clConsole.send( QString("Warning: log path (%1) doesn't exist, creating\n").arg(path) );
QDir d;
d.mkdir( path );
--- 69,73 ----
if ( !d.exists(path) )
{
! Console::instance()->send( QString("Warning: log path (%1) doesn't exist, creating\n").arg(path) );
QDir d;
d.mkdir( path );
***************
*** 81,85 ****
if( !logfile.open( IO_WriteOnly | IO_Append | IO_Translate ) )
{
! clConsole.send( QString( "Couldn't open logfile '%1'\n" ).arg( path ) );
return false;
}
--- 81,85 ----
if( !logfile.open( IO_WriteOnly | IO_Append | IO_Translate ) )
{
! Console::instance()->send( QString( "Couldn't open logfile '%1'\n" ).arg( path ) );
return false;
}
***************
*** 157,166 ****
prelude.sprintf( "%02u:%02u:", now.hour(), now.minute() );
! clConsole.ChangeColor( WPC_WHITE );
! clConsole.send( prelude );
! clConsole.ChangeColor( WPC_NORMAL );
if( sock )
! clConsole.send( QString( "%1:" ).arg( sock->uniqueId(), 0, 16 ) );
}
--- 157,166 ----
prelude.sprintf( "%02u:%02u:", now.hour(), now.minute() );
! Console::instance()->ChangeColor( WPC_WHITE );
! Console::instance()->send( prelude );
! Console::instance()->ChangeColor( WPC_NORMAL );
if( sock )
! Console::instance()->send( QString( "%1:" ).arg( sock->uniqueId(), 0, 16 ) );
}
***************
*** 169,188 ****
{
case LOG_ERROR:
! clConsole.ChangeColor( WPC_RED );
! clConsole.send( "ERROR: " );
! clConsole.ChangeColor( WPC_NORMAL );
break;
case LOG_WARNING:
! clConsole.ChangeColor( WPC_YELLOW );
! clConsole.send( "WARNING: " );
! clConsole.ChangeColor( WPC_NORMAL );
break;
default:
if( !prelude.isEmpty() )
! clConsole.send( " " );
}
! clConsole.send( string );
}
--- 169,188 ----
{
case LOG_ERROR:
! Console::instance()->ChangeColor( WPC_RED );
! Console::instance()->send( "ERROR: " );
! Console::instance()->ChangeColor( WPC_NORMAL );
break;
case LOG_WARNING:
! Console::instance()->ChangeColor( WPC_YELLOW );
! Console::instance()->send( "WARNING: " );
! Console::instance()->ChangeColor( WPC_NORMAL );
break;
default:
if( !prelude.isEmpty() )
! Console::instance()->send( " " );
}
! Console::instance()->send( string );
}
Index: log.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/log.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** log.h 5 Sep 2003 00:03:46 -0000 1.1
--- log.h 8 Sep 2003 10:58:47 -0000 1.2
***************
*** 38,52 ****
// Wolfpack Includes
#include "singleton.h"
!
! // Log Levels
! enum eLogLevel
! {
! LOG_MESSAGE = 0,
! LOG_ERROR,
! LOG_WARNING,
! LOG_NOTICE,
! LOG_TRACE,
! LOG_DEBUG
! };
class cUOSocket;
--- 38,42 ----
// Wolfpack Includes
#include "singleton.h"
! #include "typedefs.h"
class cUOSocket;
Index: makemenus.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/makemenus.cpp,v
retrieving revision 1.58
retrieving revision 1.59
diff -C2 -d -r1.58 -r1.59
*** makemenus.cpp 7 Sep 2003 19:07:47 -0000 1.58
--- makemenus.cpp 8 Sep 2003 10:58:47 -0000 1.59
***************
*** 41,45 ****
#include "basics.h"
#include "network.h"
! #include "wpconsole.h"
// System Includes
--- 41,45 ----
#include "basics.h"
#include "network.h"
! #include "console.h"
// System Includes
***************
*** 2067,2071 ****
}
else
! clConsole.send( tr("WARNING: Missing %1 menu definition!").arg(section) );
}
--- 2067,2071 ----
}
else
! Console::instance()->send( tr("WARNING: Missing %1 menu definition!").arg(section) );
}
Index: network.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/network.cpp,v
retrieving revision 1.137
retrieving revision 1.138
diff -C2 -d -r1.137 -r1.138
*** network.cpp 5 Sep 2003 00:03:45 -0000 1.137
--- network.cpp 8 Sep 2003 10:58:47 -0000 1.138
***************
*** 37,41 ****
#include "srvparams.h"
#include "globals.h"
! #include "wpconsole.h"
#include "inlines.h"
#include "network/asyncnetio.h"
--- 37,41 ----
#include "srvparams.h"
#include "globals.h"
! #include "console.h"
#include "inlines.h"
#include "network/asyncnetio.h"
Index: npc.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/npc.cpp,v
retrieving revision 1.40
retrieving revision 1.41
diff -C2 -d -r1.40 -r1.41
*** npc.cpp 7 Sep 2003 19:07:47 -0000 1.40
--- npc.cpp 8 Sep 2003 10:58:47 -0000 1.41
***************
*** 1418,1426 ****
/* debug...
! clConsole.send( QString( "Pathfinding: %1 iterations\n" ).arg( iterations ) );
std::deque< Coord_cl >::const_iterator it = path_.begin();
while( it != path_.end() )
{
! clConsole.send( QString( "%1,%2\n" ).arg( (*it).x ).arg( (*it).y ) );
++it;
}
--- 1418,1426 ----
/* debug...
! Console::instance()->send( QString( "Pathfinding: %1 iterations\n" ).arg( iterations ) );
std::deque< Coord_cl >::const_iterator it = path_.begin();
while( it != path_.end() )
{
! Console::instance()->send( QString( "%1,%2\n" ).arg( (*it).x ).arg( (*it).y ) );
++it;
}
Index: persistentbroker.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/persistentbroker.cpp,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -d -r1.24 -r1.25
*** persistentbroker.cpp 5 Sep 2003 00:03:45 -0000 1.24
--- persistentbroker.cpp 8 Sep 2003 10:58:47 -0000 1.25
***************
*** 34,38 ****
#include "dbdriver.h"
! #include "wpconsole.h"
#include "globals.h"
#include "log.h"
--- 34,38 ----
#include "dbdriver.h"
! #include "console.h"
#include "globals.h"
#include "log.h"
***************
*** 171,178 ****
{
qWarning( query );
! clConsole.ChangeColor( WPC_RED );
! clConsole.send( "ERROR" );
! clConsole.ChangeColor( WPC_NORMAL );
! clConsole.send( ":" + connection->error() + "\n" );
}
return result;
--- 171,178 ----
{
qWarning( query );
! Console::instance()->ChangeColor( WPC_RED );
! Console::instance()->send( "ERROR" );
! Console::instance()->ChangeColor( WPC_NORMAL );
! Console::instance()->send( ":" + connection->error() + "\n" );
}
return result;
Index: player.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/player.cpp,v
retrieving revision 1.36
retrieving revision 1.37
diff -C2 -d -r1.36 -r1.37
*** player.cpp 7 Sep 2003 19:07:47 -0000 1.36
--- player.cpp 8 Sep 2003 10:58:47 -0000 1.37
***************
*** 34,38 ****
#include "globals.h"
#include "chars.h"
! #include "wpconsole.h"
#include "network.h"
#include "network/uosocket.h"
--- 34,38 ----
#include "globals.h"
#include "chars.h"
! #include "console.h"
#include "network.h"
#include "network/uosocket.h"
***************
*** 183,187 ****
{
pc->setBodyID(0x0190);
! clConsole.send("player: %s with bugged body-value detected, restored to male shape\n",pc->name().latin1());
}*/
}
--- 183,187 ----
{
pc->setBodyID(0x0190);
! Console::instance()->send("player: %s with bugged body-value detected, restored to male shape\n",pc->name().latin1());
}*/
}
***************
*** 1004,1008 ****
if( !pi )
{
! clConsole.log( LOG_ERROR, "cChar::canPickUp() - bad parm" );
return false;
}
--- 1004,1008 ----
if( !pi )
{
! Console::instance()->log( LOG_ERROR, "cChar::canPickUp() - bad parm" );
return false;
}
Index: progress.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/progress.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** progress.h 21 Aug 2003 05:04:35 -0000 1.5
--- progress.h 8 Sep 2003 10:58:47 -0000 1.6
***************
*** 21,27 ****
//#include <iostream>
! #include "wpconsole.h"
! extern WPConsole_cl clConsole;
class progress_display
--- 21,27 ----
//#include <iostream>
! #include "console.h"
! extern cConsole clConsole;
class progress_display
***************
*** 39,44 ****
_expected_count = expected_count;
! clConsole.send("\n0% 10 20 30 40 50 60 70 80 90 100%\n");
! clConsole.send("|----|----|----|----|----|----|----|----|----|----|\n");
if ( !_expected_count )
_expected_count = 1; // prevent divide by zero
--- 39,44 ----
_expected_count = expected_count;
! Console::instance()->send("\n0% 10 20 30 40 50 60 70 80 90 100%\n");
! Console::instance()->send("|----|----|----|----|----|----|----|----|----|----|\n");
if ( !_expected_count )
_expected_count = 1; // prevent divide by zero
***************
*** 70,74 ****
do
{
! clConsole.send("*");
}
while ( ++_tic < tics_needed );
--- 70,74 ----
do
{
! Console::instance()->send("*");
}
while ( ++_tic < tics_needed );
***************
*** 76,82 ****
if ( _count == _expected_count ) {
if ( _tic < 51 )
! clConsole.send("*\n");
else if( _tic == 51 )
! clConsole.send("\n");
}
} // display_tic
--- 76,82 ----
if ( _count == _expected_count ) {
if ( _tic < 51 )
! Console::instance()->send("*\n");
else if( _tic == 51 )
! Console::instance()->send("\n");
}
} // display_tic
Index: pythonscript.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/pythonscript.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** pythonscript.cpp 7 Sep 2003 19:07:47 -0000 1.8
--- pythonscript.cpp 8 Sep 2003 10:58:47 -0000 1.9
***************
*** 41,45 ****
#include "maps.h"
#include "network.h"
! #include "wpconsole.h"
// Library Includes
--- 41,45 ----
#include "maps.h"
#include "network.h"
! #include "console.h"
// Library Includes
***************
*** 140,150 ****
if( !codeModule )
{
! clConsole.ProgressFail();
if( PyErr_Occurred() )
PyErr_Print();
! clConsole.send( QString( "\nError while compiling module [" + moduleName + "]\n" ) );
! clConsole.PrepareProgress( "Continuing loading" );
return false;
}
--- 140,150 ----
if( !codeModule )
{
! Console::instance()->ProgressFail();
if( PyErr_Occurred() )
PyErr_Print();
! Console::instance()->send( QString( "\nError while compiling module [" + moduleName + "]\n" ) );
! Console::instance()->PrepareProgress( "Continuing loading" );
return false;
}
Index: resources.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/resources.cpp,v
retrieving revision 1.45
retrieving revision 1.46
diff -C2 -d -r1.45 -r1.46
*** resources.cpp 28 Aug 2003 20:56:16 -0000 1.45
--- resources.cpp 8 Sep 2003 10:58:47 -0000 1.46
***************
*** 43,47 ****
#include "srvparams.h"
#include "basics.h"
! #include "wpconsole.h"
#include "world.h"
--- 43,47 ----
#include "srvparams.h"
#include "basics.h"
! #include "console.h"
#include "world.h"
***************
*** 775,781 ****
{
if( vein > 0 )
! clConsole.send( tr("ERROR: Wrong vein-amount definition in resource def. %1 (item %2)!").arg(section_).arg(vein) );
else
! clConsole.send( tr("ERROR: Wrong amount definition in resource def. %1!").arg(section_) );
return;
}
--- 775,781 ----
{
if( vein > 0 )
! Console::instance()->send( tr("ERROR: Wrong vein-amount definition in resource def. %1 (item %2)!").arg(section_).arg(vein) );
else
! Console::instance()->send( tr("ERROR: Wrong amount definition in resource def. %1!").arg(section_) );
return;
}
***************
*** 1359,1363 ****
else
{
! clConsole.send( tr("ERROR: Resource definition %1 not found!").arg( resourcename_ ) );
return true;
}
--- 1359,1363 ----
else
{
! Console::instance()->send( tr("ERROR: Resource definition %1 not found!").arg( resourcename_ ) );
return true;
}
***************
*** 1451,1455 ****
else
{
! clConsole.send( tr("ERROR: Resource definition %1 not found!").arg( resourcename_ ) );
return true;
}
--- 1451,1455 ----
else
{
! Console::instance()->send( tr("ERROR: Resource definition %1 not found!").arg( resourcename_ ) );
return true;
}
Index: scriptmanager.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/scriptmanager.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** scriptmanager.cpp 7 Sep 2003 19:07:47 -0000 1.5
--- scriptmanager.cpp 8 Sep 2003 10:58:47 -0000 1.6
***************
*** 34,38 ****
#include "basechar.h"
#include "globals.h"
! #include "wpconsole.h"
#include "world.h"
#include "items.h"
--- 34,38 ----
#include "basechar.h"
#include "globals.h"
! #include "console.h"
#include "world.h"
#include "items.h"
***************
*** 100,104 ****
// assigned to scripted items and characters
// because all of them got invalidated while relaoding
! clConsole.PrepareProgress( "Recreating assigned Script-pointers" );
cItemIterator iter_items;
--- 100,104 ----
// assigned to scripted items and characters
// because all of them got invalidated while relaoding
! Console::instance()->PrepareProgress( "Recreating assigned Script-pointers" );
cItemIterator iter_items;
***************
*** 112,116 ****
pChar->recreateEvents();
! clConsole.ProgressDone();
serverState = RUNNING;
}
--- 112,116 ----
pChar->recreateEvents();
! Console::instance()->ProgressDone();
serverState = RUNNING;
}
***************
*** 134,138 ****
void cScriptManager::load()
{
! clConsole.PrepareProgress( "Loading Script Manager" );
// Load the XML Script
--- 134,138 ----
void cScriptManager::load()
{
! Console::instance()->PrepareProgress( "Loading Script Manager" );
// Load the XML Script
***************
*** 153,158 ****
}
! clConsole.ProgressDone();
! clConsole.send( QString("%1 Script(s) loaded\n").arg(ScriptsLoaded) );
}
--- 153,158 ----
}
! Console::instance()->ProgressDone();
! Console::instance()->send( QString("%1 Script(s) loaded\n").arg(ScriptsLoaded) );
}
Index: sectors.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/sectors.cpp,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** sectors.cpp 5 Sep 2003 00:03:45 -0000 1.15
--- sectors.cpp 8 Sep 2003 10:58:47 -0000 1.16
***************
*** 6,10 ****
#include "sectors.h"
#include "uobject.h"
! #include "wpconsole.h"
#include "globals.h"
#include "exceptions.h"
--- 6,10 ----
#include "sectors.h"
#include "uobject.h"
! #include "console.h"
#include "globals.h"
#include "exceptions.h"
***************
*** 71,75 ****
if( width == 0 || height == 0 )
{
! clConsole.log( LOG_ERROR, QString( "Invalid Sectormap boundaries (Width: %1, Height: %2)." ).arg( width ).arg( height ) );
return false;
}
--- 71,75 ----
if( width == 0 || height == 0 )
{
! Console::instance()->log( LOG_ERROR, QString( "Invalid Sectormap boundaries (Width: %1, Height: %2)." ).arg( width ).arg( height ) );
return false;
}
***************
*** 487,491 ****
if( it == itemmaps.end() )
{
! clConsole.log( LOG_ERROR, QString( "Couldn't find a map with the id %1. (cSectorMaps::findItems)" ).arg( map ) );
return new cItemSectorIterator( 0, 0 ); // Return an empty iterator
}
--- 487,491 ----
if( it == itemmaps.end() )
{
! Console::instance()->log( LOG_ERROR, QString( "Couldn't find a map with the id %1. (cSectorMaps::findItems)" ).arg( map ) );
return new cItemSectorIterator( 0, 0 ); // Return an empty iterator
}
***************
*** 500,504 ****
if( it == charmaps.end() )
{
! clConsole.log( LOG_ERROR, QString( "Couldn't find a map with the id %1. (cSectorMaps::findChars)" ).arg( map ) );
return new cCharSectorIterator( 0, 0 ); // Return an empty iterator
}
--- 500,504 ----
if( it == charmaps.end() )
{
! Console::instance()->log( LOG_ERROR, QString( "Couldn't find a map with the id %1. (cSectorMaps::findChars)" ).arg( map ) );
return new cCharSectorIterator( 0, 0 ); // Return an empty iterator
}
***************
*** 513,517 **...
[truncated message content] |