Update of /cvsroot/wpdev/wolfpack
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7556
Modified Files:
items.cpp items.h world.cpp
Log Message:
items.magic is now items.movable like it should be...
I'm sure this is going to cause some headaches for people, but there is a Database Version constant that I increased. We should have a conversion patch ready for the release if we need it, but CVS users should be aware.
Index: items.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/items.cpp,v
retrieving revision 1.431
retrieving revision 1.432
diff -C2 -d -r1.431 -r1.432
*** items.cpp 12 Aug 2004 03:02:50 -0000 1.431
--- items.cpp 14 Aug 2004 03:40:36 -0000 1.432
***************
*** 204,208 ****
this->free = false;
this->hp_ = src.hp_;
! this->magic_ = src.magic_;
this->maxhp_ = src.maxhp_;
this->priv_ = src.priv_;
--- 204,208 ----
this->free = false;
this->hp_ = src.hp_;
! this->movable_ = src.movable_;
this->maxhp_ = src.maxhp_;
this->priv_ = src.priv_;
***************
*** 470,474 ****
writer.writeShort( hp_ );
writer.writeShort( maxhp_ );
! writer.writeByte( magic_ );
writer.writeInt( ownserial_ );
writer.writeByte( visible_ );
--- 470,474 ----
writer.writeShort( hp_ );
writer.writeShort( maxhp_ );
! writer.writeByte( movable_ );
writer.writeInt( ownserial_ );
writer.writeByte( visible_ );
***************
*** 493,497 ****
hp_ = reader.readShort();
maxhp_ = reader.readShort();
! magic_ = reader.readByte();
ownserial_ = reader.readInt();
visible_ = reader.readByte();
--- 493,497 ----
hp_ = reader.readShort();
maxhp_ = reader.readShort();
! movable_ = reader.readByte();
ownserial_ = reader.readInt();
visible_ = reader.readByte();
***************
*** 536,540 ****
addField( "hp", hp_ );
addField( "maxhp", maxhp_ );
! addField( "magic", magic_ );
addField( "owner", ownserial_ );
addField( "visible", visible_ );
--- 536,540 ----
addField( "hp", hp_ );
addField( "maxhp", maxhp_ );
! addField( "movable", movable_ );
addField( "owner", ownserial_ );
addField( "visible", visible_ );
***************
*** 625,629 ****
this->hp_ = 0; //Number of hit points an item has.
this->maxhp_ = 0; // Max number of hit points an item can have.
! this->magic_ = 0; // 0=Default as stored in client, 1=Always movable, 2=Never movable, 3=Owner movable.
this->setOwnSerialOnly( -1 );
this->visible_ = 0; // 0=Normally Visible, 1=Owner & GM Visible, 2=GM Visible
--- 625,629 ----
this->hp_ = 0; //Number of hit points an item has.
this->maxhp_ = 0; // Max number of hit points an item can have.
! this->movable_ = 0; // 0=Default as stored in client, 1=Always movable, 2=Never movable, 3=Owner movable.
this->setOwnSerialOnly( -1 );
this->visible_ = 0; // 0=Normally Visible, 1=Owner & GM Visible, 2=GM Visible
***************
*** 855,863 ****
// <immovable />
else if ( TagName == "movable" )
! this->magic_ = 1;
else if ( TagName == "immovable" )
! this->magic_ = 2;
else if ( TagName == "ownermovable" )
! this->magic_ = 3;
// <decay />
--- 855,863 ----
// <immovable />
else if ( TagName == "movable" )
! this->movable_ = 1;
else if ( TagName == "immovable" )
! this->movable_ = 2;
else if ( TagName == "ownermovable" )
! this->movable_ = 3;
// <decay />
***************
*** 963,970 ****
else
{
! /*int offset = Value.find( "%1" );
! QString left = Value.left( offset );
! QString right = Value.right( Value.length() - ( offset + 2 ) );
! name_ = left + name_ + right;*/
name_ = Value.arg( name_ );
}
--- 963,972 ----
else
{
! /*
! int offset = Value.find( "%1" );
! QString left = Value.left( offset );
! QString right = Value.right( Value.length() - ( offset + 2 ) );
! name_ = left + name_ + right;
! */
name_ = Value.arg( name_ );
}
***************
*** 1283,1300 ****
switch ( type )
{
! case 0x01:
! speechType = cUOTxUnicodeSpeech::Broadcast; break;
! case 0x06:
! speechType = cUOTxUnicodeSpeech::System; break;
! case 0x09:
! speechType = cUOTxUnicodeSpeech::Yell; break;
! case 0x02:
! speechType = cUOTxUnicodeSpeech::Emote; break;
! case 0x08:
! speechType = cUOTxUnicodeSpeech::Whisper; break;
! case 0x0A:
! speechType = cUOTxUnicodeSpeech::Spell; break;
! default:
! speechType = cUOTxUnicodeSpeech::Regular; break;
};
--- 1285,1302 ----
switch ( type )
{
! case 0x01:
! speechType = cUOTxUnicodeSpeech::Broadcast; break;
! case 0x06:
! speechType = cUOTxUnicodeSpeech::System; break;
! case 0x09:
! speechType = cUOTxUnicodeSpeech::Yell; break;
! case 0x02:
! speechType = cUOTxUnicodeSpeech::Emote; break;
! case 0x08:
! speechType = cUOTxUnicodeSpeech::Whisper; break;
! case 0x0A:
! speechType = cUOTxUnicodeSpeech::Spell; break;
! default:
! speechType = cUOTxUnicodeSpeech::Regular; break;
};
***************
*** 1464,1468 ****
hp_ = atoi( result[offset++] );
maxhp_ = atoi( result[offset++] );
! magic_ = atoi( result[offset++] );
ownserial_ = atoi( result[offset++] );
visible_ = atoi( result[offset++] );
--- 1466,1470 ----
hp_ = atoi( result[offset++] );
maxhp_ = atoi( result[offset++] );
! movable_ = atoi( result[offset++] );
ownserial_ = atoi( result[offset++] );
visible_ = atoi( result[offset++] );
***************
*** 1489,1493 ****
{
cUObject::buildSqlString( fields, tables, conditions );
! fields.push_back( "items.id,items.color,items.cont,items.layer,items.amount,items.hp,items.maxhp,items.magic,items.owner,items.visible,items.priv,items.baseid" );
tables.push_back( "items" );
conditions.push_back( "uobjectmap.serial = items.serial" );
--- 1491,1495 ----
{
cUObject::buildSqlString( fields, tables, conditions );
! fields.push_back( "items.id,items.color,items.cont,items.layer,items.amount,items.hp,items.maxhp,items.movable,items.owner,items.visible,items.priv,items.baseid" );
tables.push_back( "items" );
conditions.push_back( "uobjectmap.serial = items.serial" );
***************
*** 1865,1869 ****
*/
else
! SET_INT_PROPERTY( "movable", magic_ )
// Flags
--- 1867,1871 ----
*/
else
! SET_INT_PROPERTY( "movable", movable_ )
// Flags
***************
*** 2029,2033 ****
PY_PROPERTY( "visible", visible_ == 0 ? 1 : 0 )
PY_PROPERTY( "ownervisible", visible_ == 1 ? 1 : 0 )
- PY_PROPERTY( "magic", magic_ )
// Flags
PY_PROPERTY( "dye", dye() ? 1 : 0 )
--- 2031,2034 ----
***************
*** 2045,2049 ****
PY_PROPERTY( "visible", visible_ == 0 ? 1 : 0 )
PY_PROPERTY( "ownervisible", visible_ == 1 ? 1 : 0 )
! PY_PROPERTY( "movable", magic_ )
/*
\rproperty item.watersource This property indicates that this type of item is a source of
--- 2046,2050 ----
PY_PROPERTY( "visible", visible_ == 0 ? 1 : 0 )
PY_PROPERTY( "ownervisible", visible_ == 1 ? 1 : 0 )
! PY_PROPERTY( "movable", movable_ )
/*
\rproperty item.watersource This property indicates that this type of item is a source of
Index: items.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/items.h,v
retrieving revision 1.210
retrieving revision 1.211
diff -C2 -d -r1.210 -r1.211
*** items.h 12 Aug 2004 03:02:50 -0000 1.210
--- items.h 14 Aug 2004 03:40:36 -0000 1.211
***************
*** 287,293 ****
}
! uchar magic() const
{
! return magic_;
}
uchar visible() const
--- 287,293 ----
}
! uchar movable() const
{
! return movable_;
}
uchar visible() const
***************
*** 420,424 ****
void setMagic( uchar data )
{
! magic_ = data; flagChanged(); changed( TOOLTIP );
}
void setVisible( uchar d )
--- 420,424 ----
void setMagic( uchar data )
{
! movable_ = data; flagChanged(); changed( TOOLTIP );
}
void setVisible( uchar d )
***************
*** 482,514 ****
void setAllMovable()
{
! this->magic_ = 1; flagChanged();
} // set it all movable..
bool isAllMovable()
{
! return ( magic_ == 1 );
}
void setGMMovable()
{
! this->magic_ = 2; flagChanged();
} // set it GM movable.
bool isGMMovable()
{
! return ( magic_ == 2 );
}
void setOwnerMovable()
{
! this->magic_ = 3; flagChanged();
} // set it owner movable.
bool isOwnerMovable()
{
! return ( magic_ == 3 );
}
void setLockedDown()
{
! this->magic_ = 4; flagChanged();
} // set it locked down.
bool isLockedDown()
{
! return ( magic_ == 4 );
}
--- 482,514 ----
void setAllMovable()
{
! this->movable_ = 1; flagChanged();
} // set it all movable..
bool isAllMovable()
{
! return ( movable_ == 1 );
}
void setGMMovable()
{
! this->movable_ = 2; flagChanged();
} // set it GM movable.
bool isGMMovable()
{
! return ( movable_ == 2 );
}
void setOwnerMovable()
{
! this->movable_ = 3; flagChanged();
} // set it owner movable.
bool isOwnerMovable()
{
! return ( movable_ == 3 );
}
void setLockedDown()
{
! this->movable_ = 4; flagChanged();
} // set it locked down.
bool isLockedDown()
{
! return ( movable_ == 4 );
}
***************
*** 573,577 ****
4: This item has been locked down
*/
! unsigned char magic_ : 3;
SERIAL ownserial_; // This property specifies the owner of this item. If it is INVALID_SERIAL, this item has no owner
--- 573,577 ----
4: This item has been locked down
*/
! unsigned char movable_ : 3;
SERIAL ownserial_; // This property specifies the owner of this item. If it is INVALID_SERIAL, this item has no owner
Index: world.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/world.cpp,v
retrieving revision 1.109
retrieving revision 1.110
diff -C2 -d -r1.109 -r1.110
*** world.cpp 10 Aug 2004 03:15:57 -0000 1.109
--- world.cpp 14 Aug 2004 03:40:36 -0000 1.110
***************
*** 81,86 ****
//
// ONCE AGAIN, DON'T FORGET TO INCREASE THIS VALUE
! #define DATABASE_VERSION 6
! #define WP_DATABASE_VERSION "6"
// This is used for autocreating the tables
--- 81,86 ----
//
// ONCE AGAIN, DON'T FORGET TO INCREASE THIS VALUE
! #define DATABASE_VERSION 7
! #define WP_DATABASE_VERSION "7"
// This is used for autocreating the tables
***************
*** 195,199 ****
hp smallint(6) NOT NULL default '0',\
maxhp smallint(6) NOT NULL default '0',\
! magic tinyint(3) NOT NULL default '0',\
owner unsigned int(10) NOT NULL default '0',\
visible tinyint(3) NOT NULL default '0',\
--- 195,199 ----
hp smallint(6) NOT NULL default '0',\
maxhp smallint(6) NOT NULL default '0',\
! movable tinyint(3) NOT NULL default '0',\
owner unsigned int(10) NOT NULL default '0',\
visible tinyint(3) NOT NULL default '0',\
|