Update of /cvsroot/wpdev/wolfpack
In directory sc8-pr-cvs1:/tmp/cvs-serv1069
Modified Files:
console_win.cpp items.cpp persistentbroker.cpp
persistentbroker.h
Log Message:
Several changes and fixes.
Fixed Python TempEffect Error Reporting and added correct line breaks to the windows console.
Index: console_win.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/console_win.cpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** console_win.cpp 20 Sep 2003 01:26:54 -0000 1.11
--- console_win.cpp 25 Sep 2003 03:05:58 -0000 1.12
***************
*** 97,101 ****
case WM_CREATE:
// Create Richedit Box
! logWindow = CreateWindow( RICHEDIT_CLASS, 0, ES_LEFT|ES_MULTILINE|ES_AUTOVSCROLL|ES_AUTOHSCROLL|ES_READONLY|WS_CHILD|WS_VISIBLE|WS_VSCROLL, 0, 0, 10, 10, hwnd, (HMENU)CONTROL_LOGWINDOW, appInstance, 0 );
if( logWindow == 0 )
--- 97,101 ----
case WM_CREATE:
// Create Richedit Box
! logWindow = CreateWindow( RICHEDIT_CLASS, 0, ES_LEFT|ES_MULTILINE|ES_AUTOVSCROLL|ES_READONLY|WS_CHILD|WS_VISIBLE|WS_VSCROLL, 0, 0, 10, 10, hwnd, (HMENU)CONTROL_LOGWINDOW, appInstance, 0 );
if( logWindow == 0 )
Index: items.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/items.cpp,v
retrieving revision 1.356
retrieving revision 1.357
diff -C2 -d -r1.356 -r1.357
*** items.cpp 23 Sep 2003 23:55:23 -0000 1.356
--- items.cpp 25 Sep 2003 03:05:58 -0000 1.357
***************
*** 409,441 ****
setTable( "items" );
! addField("serial", serial());
! addField("id", id());
! addField("color", color());
SERIAL contserial = INVALID_SERIAL;
if ( container_ )
contserial = container_->serial();
! addField("cont", contserial);
! addField("layer", layer_);
! addField("type", type_);
! addField("type2", type2_);
! addField("amount", amount_);
! addField("decaytime", (decaytime_ > uiCurrentTime) ? decaytime_ - uiCurrentTime : 0 );
! addField("def", def_);
addField("hidamage", hidamage_);
addField("lodamage", lodamage_);
! addField("time_unused", time_unused);
! addField("weight", weight_);
! addField("hp", hp_);
! addField("maxhp", maxhp_);
! addField("speed", speed_);
! addField("poisoned", poisoned_);
! addField("magic", magic_);
! addField("owner", ownserial_);
! addField("visible", visible_);
! addStrField("spawnregion", spawnregion_);
! addField("priv", priv_);
! addField("sellprice", sellprice_);
! addField("buyprice", buyprice_);
! addField("restock", restock_);
addCondition( "serial", serial() );
--- 409,441 ----
setTable( "items" );
! addField("serial", serial() );
! addField("id", id() );
! addField("color", color() );
SERIAL contserial = INVALID_SERIAL;
if ( container_ )
contserial = container_->serial();
! addField("cont", contserial);
! addField("layer", layer_);
! addField("type", type_);
! addField("type2", type2_);
! addField("amount", amount_);
! addField("decaytime", (decaytime_ > uiCurrentTime) ? decaytime_ - uiCurrentTime : 0 );
! addField("def", def_);
addField("hidamage", hidamage_);
addField("lodamage", lodamage_);
! addField("time_unused", time_unused);
! addField("weight", weight_);
! addField("hp", hp_ );
! addField("maxhp", maxhp_ );
! addField("speed", speed_ );
! addField("poisoned", poisoned_ );
! addField("magic", magic_ );
! addField("owner", ownserial_ );
! addField("visible", visible_ );
! addStrField("spawnregion", spawnregion_ );
! addField("priv", priv_ );
! addField("sellprice", sellprice_ );
! addField("buyprice", buyprice_ );
! addField("restock", restock_ );
addCondition( "serial", serial() );
***************
*** 1857,1861 ****
ownserial_ = atoi( result[offset++] );
visible_ = atoi( result[offset++] );
! spawnregion_ = atoi( result[offset++] );
priv_ = atoi( result[offset++] );
sellprice_ = atoi( result[offset++] );
--- 1857,1867 ----
ownserial_ = atoi( result[offset++] );
visible_ = atoi( result[offset++] );
!
! if( strlen( result[offset] ) == 0 )
! spawnregion_ = QString::null;
! else
! spawnregion_ = QString::fromUtf8( result[offset] );
! offset++;
!
priv_ = atoi( result[offset++] );
sellprice_ = atoi( result[offset++] );
Index: persistentbroker.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/persistentbroker.cpp,v
retrieving revision 1.30
retrieving revision 1.31
diff -C2 -d -r1.30 -r1.31
*** persistentbroker.cpp 24 Sep 2003 21:19:48 -0000 1.30
--- persistentbroker.cpp 25 Sep 2003 03:05:58 -0000 1.31
***************
*** 238,244 ****
QString PersistentBroker::quoteString( QString s )
{
if( d->sqlite )
! return s.replace( QRegExp("'"), "''" );
else
! return s.replace( QRegExp("'"), "\\'" );
}
--- 238,247 ----
QString PersistentBroker::quoteString( QString s )
{
+ if( s == QString::null )
+ return "";
+
if( d->sqlite )
! return s.replace( QRegExp("'"), "''" ).utf8().data();
else
! return s.replace( QRegExp("'"), "\\'" ).utf8().data();
}
Index: persistentbroker.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/persistentbroker.h,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** persistentbroker.h 24 Sep 2003 21:19:48 -0000 1.26
--- persistentbroker.h 25 Sep 2003 03:05:58 -0000 1.27
***************
*** 57,61 ****
void clearDeleteQueue();
void addToDeleteQueue( const QString &tables, const QString &conditions );
!
QString quoteString( QString d );
--- 57,61 ----
void clearDeleteQueue();
void addToDeleteQueue( const QString &tables, const QString &conditions );
!
QString quoteString( QString d );
***************
*** 96,100 ****
{ \
/* fields.push_back( name ); */ \
! values.push_back( "'" + ( value.isNull() ? QString( "" ) : persistentBroker->quoteString( value ) ) + "'" ); \
}
--- 96,100 ----
{ \
/* fields.push_back( name ); */ \
! values.push_back( "'" + persistentBroker->quoteString( value ) + "'" ); \
}
|