Update of /cvsroot/wpdev/wolfpack
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23998
Modified Files:
basechar.h dragdrop.cpp guilds.h gumps.cpp pagesystem.h
player.cpp server.cpp skills.cpp spawnregions.cpp
territories.cpp uobject.cpp world.cpp world.h
Log Message:
clean ups
Index: world.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/world.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** world.h 16 Jul 2004 21:01:07 -0000 1.15
--- world.h 27 Jul 2004 06:35:22 -0000 1.16
***************
*** 87,92 ****
// For the "settings" table
! void getOption( const QString name, QString& value, const QString fallback, bool newconnection = true );
! void setOption( const QString name, const QString value, bool newconnection = true );
// Book-keeping functions
--- 87,92 ----
// For the "settings" table
! void getOption( const QString& name, QString& value, const QString fallback, bool newconnection = true );
! void setOption( const QString& name, const QString& value, bool newconnection = true );
// Book-keeping functions
Index: dragdrop.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/dragdrop.cpp,v
retrieving revision 1.236
retrieving revision 1.237
diff -C2 -d -r1.236 -r1.237
*** dragdrop.cpp 18 Jul 2004 19:57:01 -0000 1.236
--- dragdrop.cpp 27 Jul 2004 06:35:21 -0000 1.237
***************
*** 161,168 ****
QStringList keys = pItem->getTags();
QStringList::const_iterator it = keys.begin();
! while ( it != keys.end() )
{
splitItem->setTag( *it, pItem->getTag( *it ) );
- it++;
}
--- 161,167 ----
QStringList keys = pItem->getTags();
QStringList::const_iterator it = keys.begin();
! for ( ; it != keys.end(); ++it )
{
splitItem->setTag( *it, pItem->getTag( *it ) );
}
Index: gumps.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/gumps.cpp,v
retrieving revision 1.166
retrieving revision 1.167
diff -C2 -d -r1.166 -r1.167
*** gumps.cpp 5 Jul 2004 14:03:16 -0000 1.166
--- gumps.cpp 27 Jul 2004 06:35:21 -0000 1.167
***************
*** 83,87 ****
void cGump::addHtmlGump( INT32 x, INT32 y, INT32 width, INT32 height, const QString& html, bool hasBack, bool canScroll )
{
! QString layout = "{htmlgump %1 %2 %3 %4 %5 %6 %7}";
layout = layout.arg( x ).arg( y ).arg( width ).arg( height );
layout = layout.arg( addRawText( html ) ).arg( hasBack ? 1 : 0 ).arg( canScroll ? 1 : 0 );
--- 83,87 ----
void cGump::addHtmlGump( INT32 x, INT32 y, INT32 width, INT32 height, const QString& html, bool hasBack, bool canScroll )
{
! QString layout("{htmlgump %1 %2 %3 %4 %5 %6 %7}");
layout = layout.arg( x ).arg( y ).arg( width ).arg( height );
layout = layout.arg( addRawText( html ) ).arg( hasBack ? 1 : 0 ).arg( canScroll ? 1 : 0 );
***************
*** 91,95 ****
void cGump::addXmfHtmlGump( INT32 x, INT32 y, INT32 width, INT32 height, UINT32 clilocid, bool hasBack, bool canScroll )
{
! QString layout = "{xmfhtmlgump %1 %2 %3 %4 %5 %6 %7}";
layout = layout.arg( x ).arg( y ).arg( width ).arg( height );
layout = layout.arg( clilocid ).arg( hasBack ? 1 : 0 ).arg( canScroll ? 1 : 0 );
--- 91,95 ----
void cGump::addXmfHtmlGump( INT32 x, INT32 y, INT32 width, INT32 height, UINT32 clilocid, bool hasBack, bool canScroll )
{
! QString layout("{xmfhtmlgump %1 %2 %3 %4 %5 %6 %7}");
layout = layout.arg( x ).arg( y ).arg( width ).arg( height );
layout = layout.arg( clilocid ).arg( hasBack ? 1 : 0 ).arg( canScroll ? 1 : 0 );
***************
*** 99,103 ****
void cGump::addCheckertrans( INT32 x, INT32 y, INT32 width, INT32 height )
{
! QString layout = "{checkertrans %1 %2 %3 %4}";
layout = layout.arg( x ).arg( y ).arg( width ).arg( height );
layout_.push_back( layout );
--- 99,103 ----
void cGump::addCheckertrans( INT32 x, INT32 y, INT32 width, INT32 height )
{
! QString layout("{checkertrans %1 %2 %3 %4}");
layout = layout.arg( x ).arg( y ).arg( width ).arg( height );
layout_.push_back( layout );
***************
*** 106,110 ****
void cGump::addCroppedText( Q_INT32 textX, Q_INT32 textY, Q_UINT32 width, Q_UINT32 height, const QString& data, Q_UINT16 hue )
{
! QString layout = "{croppedtext %1 %2 %3 %4 %5 %6}";
layout = layout.arg( textX ).arg( textY ).arg( width ).arg( height ).arg( hue ).arg( addRawText( data ) );
layout_.push_back( layout );
--- 106,110 ----
void cGump::addCroppedText( Q_INT32 textX, Q_INT32 textY, Q_UINT32 width, Q_UINT32 height, const QString& data, Q_UINT16 hue )
{
! QString layout("{croppedtext %1 %2 %3 %4 %5 %6}");
layout = layout.arg( textX ).arg( textY ).arg( width ).arg( height ).arg( hue ).arg( addRawText( data ) );
layout_.push_back( layout );
***************
*** 156,160 ****
right = numrects - 1;
! QStringList rectangles = QStringList();
QStringList::const_iterator it = allrectangles.at( left );
while ( it != allrectangles.at( right + 1 ) )
--- 156,160 ----
right = numrects - 1;
! QStringList rectangles;
QStringList::const_iterator it = allrectangles.at( left );
while ( it != allrectangles.at( right + 1 ) )
Index: uobject.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/uobject.cpp,v
retrieving revision 1.168
retrieving revision 1.169
diff -C2 -d -r1.168 -r1.169
*** uobject.cpp 20 Jul 2004 11:35:37 -0000 1.168
--- uobject.cpp 27 Jul 2004 06:35:22 -0000 1.169
***************
*** 408,413 ****
void cUObject::processNode( const cElement* Tag )
{
! QString TagName = Tag->name();
! QString Value = Tag->value();
if ( TagName == "name" )
--- 408,413 ----
void cUObject::processNode( const cElement* Tag )
{
! QString TagName(Tag->name());
! QString Value(Tag->value());
if ( TagName == "name" )
***************
*** 695,699 ****
clearEvents();
QStringList list = QStringList::split( ",", value.toString() );
! for ( QStringList::const_iterator it = list.begin(); it != list.end(); ++it )
{
cPythonScript* script = ScriptManager::instance()->find( ( *it ).latin1() );
--- 695,699 ----
clearEvents();
QStringList list = QStringList::split( ",", value.toString() );
! for ( QStringList::const_iterator it(list.begin()); it != list.end(); ++it )
{
cPythonScript* script = ScriptManager::instance()->find( ( *it ).latin1() );
***************
*** 720,724 ****
if the object wasn't spawned or removed from the spawnregion.
*/
! PY_PROPERTY( "spawnregion", spawnregion_ ? spawnregion_->name() : "" )
PY_PROPERTY( "serial", serial_ )
PY_PROPERTY( "free", free ? 1 : 0 )
--- 720,724 ----
if the object wasn't spawned or removed from the spawnregion.
*/
! PY_PROPERTY( "spawnregion", spawnregion_ ? spawnregion_->name() : QString() )
PY_PROPERTY( "serial", serial_ )
PY_PROPERTY( "free", free ? 1 : 0 )
Index: spawnregions.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/spawnregions.cpp,v
retrieving revision 1.64
retrieving revision 1.65
diff -C2 -d -r1.64 -r1.65
*** spawnregions.cpp 27 Jul 2004 04:15:20 -0000 1.64
--- spawnregions.cpp 27 Jul 2004 06:35:22 -0000 1.65
***************
*** 82,87 ****
void cSpawnRegion::processNode( const cElement* Tag )
{
! QString TagName = Tag->name();
! QString Value = Tag->value();
//<npcs>
--- 82,87 ----
void cSpawnRegion::processNode( const cElement* Tag )
{
! QString TagName(Tag->name());
! QString Value(Tag->value());
//<npcs>
***************
*** 114,123 ****
QStringList NpcList = Definitions::instance()->getList( listSect );
! QStringList::iterator it = NpcList.begin();
! while ( it != NpcList.end() )
! {
this->npcSections_.push_back( *it );
- it++;
- }
}
}
--- 114,120 ----
QStringList NpcList = Definitions::instance()->getList( listSect );
! QStringList::const_iterator it(NpcList.begin());
! for ( ; it != NpcList.end(); ++it )
this->npcSections_.push_back( *it );
}
}
***************
*** 153,162 ****
QStringList itemList = Definitions::instance()->getList( listSect );
! QStringList::iterator it = itemList.begin();
! while ( it != itemList.end() )
! {
this->itemSections_.push_back( *it );
- it++;
- }
}
}
--- 150,156 ----
QStringList itemList = Definitions::instance()->getList( listSect );
! QStringList::const_iterator it(itemList.begin());
! for ( ; it != itemList.end(); ++it )
this->itemSections_.push_back( *it );
}
}
Index: skills.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/skills.cpp,v
retrieving revision 1.226
retrieving revision 1.227
diff -C2 -d -r1.226 -r1.227
*** skills.cpp 15 Jun 2004 02:44:45 -0000 1.226
--- skills.cpp 27 Jul 2004 06:35:22 -0000 1.227
***************
*** 127,131 ****
socket->attachTarget( targetRequest );
! if ( message )
pChar->message( message );
--- 127,131 ----
socket->attachTarget( targetRequest );
! if ( !message.isEmpty() )
pChar->message( message );
Index: pagesystem.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/pagesystem.h,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** pagesystem.h 19 Jun 2004 02:06:51 -0000 1.19
--- pagesystem.h 27 Jul 2004 06:35:21 -0000 1.20
***************
*** 225,229 ****
{
cPagesManager::iterator it = begin();
! while ( it != end() )
{
if ( ( *it ) == page )
--- 225,229 ----
{
cPagesManager::iterator it = begin();
! for ( ; it != end(); ++it )
{
if ( ( *it ) == page )
***************
*** 232,236 ****
break;
}
- it++;
}
push_front( page );
--- 232,235 ----
Index: territories.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/territories.cpp,v
retrieving revision 1.49
retrieving revision 1.50
diff -C2 -d -r1.49 -r1.50
*** territories.cpp 10 Jul 2004 23:03:29 -0000 1.49
--- territories.cpp 27 Jul 2004 06:35:22 -0000 1.50
***************
*** 83,88 ****
void cTerritory::processNode( const cElement* Tag )
{
! QString TagName = Tag->name();
! QString Value = Tag->value();
//<guards>
--- 83,88 ----
void cTerritory::processNode( const cElement* Tag )
{
! QString TagName(Tag->name());
! QString Value(Tag->value());
//<guards>
***************
*** 109,118 ****
{
QStringList NpcList = Definitions::instance()->getList( childNode->getAttribute( "id" ) );
! QStringList::iterator it = NpcList.begin();
! while ( it != NpcList.end() )
! {
this->guardSections_.push_back( *it );
- it++;
- }
}
}
--- 109,115 ----
{
QStringList NpcList = Definitions::instance()->getList( childNode->getAttribute( "id" ) );
! QStringList::const_iterator it(NpcList.begin());
! for ( ; it != NpcList.end(); ++it )
this->guardSections_.push_back( *it );
}
}
***************
*** 279,283 ****
return this->guardSections_[RandomNum( 0, this->guardSections_.size() - 1 )];
else
! return ( char * ) 0;
}
--- 276,280 ----
return this->guardSections_[RandomNum( 0, this->guardSections_.size() - 1 )];
else
! return QString();
}
Index: server.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/server.cpp,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** server.cpp 20 Jul 2004 12:03:38 -0000 1.12
--- server.cpp 27 Jul 2004 06:35:22 -0000 1.13
***************
*** 107,111 ****
unsigned int time;
QValueVector<enActionType> actionQueue;
! Private() : running( true ), secure( true ), state( STARTUP ), time( 0 )
{
}
--- 107,111 ----
unsigned int time;
QValueVector<enActionType> actionQueue;
! Private() : running( true ), state( STARTUP ), secure( true ), time( 0 )
{
}
***************
*** 463,471 ****
// Script NPC AI types
QStringList aiSections = Definitions::instance()->getSections( WPDT_AI );
! QStringList::const_iterator aiit = aiSections.begin();
! while ( aiit != aiSections.end() )
{
ScriptAI::registerInFactory( *aiit );
- ++aiit;
}
--- 463,470 ----
// Script NPC AI types
QStringList aiSections = Definitions::instance()->getSections( WPDT_AI );
! QStringList::const_iterator aiit(aiSections.begin());
! for ( ;aiit != aiSections.end(); ++aiit )
{
ScriptAI::registerInFactory( *aiit );
}
Index: player.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/player.cpp,v
retrieving revision 1.112
retrieving revision 1.113
diff -C2 -d -r1.112 -r1.113
*** player.cpp 20 Jul 2004 11:35:37 -0000 1.112
--- player.cpp 27 Jul 2004 06:35:22 -0000 1.113
***************
*** 243,247 ****
// Send equipment tooltips to other players as well
! for ( ItemContainer::const_iterator it = content_.begin(); it != content_.end(); ++it )
{
it.data()->sendTooltip( socket );
--- 243,247 ----
// Send equipment tooltips to other players as well
! for ( ItemContainer::const_iterator it(content_.begin()); it != content_.end(); ++it )
{
it.data()->sendTooltip( socket );
***************
*** 570,574 ****
charName.prepend( gender_ ? tr( "Lady " ) : tr( "Lord " ) );
! QString affix = "";
if ( !isIncognito() && guild_ && !guild_->abbreviation().isEmpty() )
--- 570,574 ----
charName.prepend( gender_ ? tr( "Lady " ) : tr( "Lord " ) );
! QString affix("");
if ( !isIncognito() && guild_ && !guild_->abbreviation().isEmpty() )
***************
*** 1624,1628 ****
cUObject::createTooltip( tooltip, player );
! QString affix = " ";
// Append the (frozen) tag
--- 1624,1628 ----
cUObject::createTooltip( tooltip, player );
! QString affix(" ");
// Append the (frozen) tag
Index: guilds.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/guilds.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** guilds.h 2 Jun 2004 15:04:05 -0000 1.6
--- guilds.h 27 Jul 2004 06:35:21 -0000 1.7
***************
*** 61,69 ****
public:
! MemberInfo()
{
- showSign_ = true;
- guildTitle_ = QString::null;
- joined_ = QDateTime::currentDateTime();
}
--- 61,66 ----
public:
! MemberInfo() : showSign_(true), guildTitle_(QString::null), joined_(QDateTime::currentDateTime())
{
}
Index: basechar.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/basechar.h,v
retrieving revision 1.74
retrieving revision 1.75
diff -C2 -d -r1.74 -r1.75
*** basechar.h 20 Jul 2004 11:35:36 -0000 1.74
--- basechar.h 27 Jul 2004 06:35:21 -0000 1.75
***************
*** 259,264 ****
void resurrect();
! void turnTo( cUObject* object );
! void turnTo( const Coord_cl& pos );
void wear( P_ITEM );
bool isHuman() const;
--- 259,264 ----
void resurrect();
! virtual void turnTo( cUObject* object );
! virtual void turnTo( const Coord_cl& pos );
void wear( P_ITEM );
bool isHuman() const;
Index: world.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/world.cpp,v
retrieving revision 1.105
retrieving revision 1.106
diff -C2 -d -r1.105 -r1.106
*** world.cpp 18 Jul 2004 19:52:15 -0000 1.105
--- world.cpp 27 Jul 2004 06:35:22 -0000 1.106
***************
*** 800,804 ****
* Gets a value from the settings table and returns the value
*/
! void cWorld::getOption( const QString name, QString& value, const QString fallback, bool newconnection )
{
if ( newconnection )
--- 800,804 ----
* Gets a value from the settings table and returns the value
*/
! void cWorld::getOption( const QString& name, QString& value, const QString fallback, bool newconnection )
{
if ( newconnection )
***************
*** 842,846 ****
* Sets a value in the settings table.
*/
! void cWorld::setOption( const QString name, const QString value, bool newconnection )
{
if ( newconnection )
--- 842,846 ----
* Sets a value in the settings table.
*/
! void cWorld::setOption( const QString& name, const QString& value, bool newconnection )
{
if ( newconnection )
|