Update of /cvsroot/wpdev/wolfpack
In directory sc8-pr-cvs1:/tmp/cvs-serv16366
Modified Files:
Timing.cpp basechar.cpp items.cpp items.h player.cpp
wolfpack.vcproj world.cpp wpdefmanager.cpp wpdefmanager.h
Log Message:
Removed some outdated properties and updated the vs.net project file. Started implementing the Base Definition property. Accessible via item.baseid in python you can now set and get the name of the definition this item was created from.
Index: Timing.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/Timing.cpp,v
retrieving revision 1.182
retrieving revision 1.183
diff -C2 -d -r1.182 -r1.183
*** Timing.cpp 23 Sep 2003 23:55:19 -0000 1.182
--- Timing.cpp 24 Nov 2003 02:36:09 -0000 1.183
***************
*** 230,271 ****
}
- static int check_house_decay()
- {
- int houses=0;
- int decayed_houses=0;
- unsigned long int timediff;
- unsigned long int ct=getNormalizedTime();
-
- cItemIterator iter_items;
- P_ITEM pi;
- for( pi = iter_items.first(); pi; pi = iter_items.next() )
- {
- if (!pi->free && IsHouse(pi->id()))
- {
- if (pi->time_unused>SrvParams->housedecay_secs()) // not used longer than max_unused time ? delete the house
- {
- decayed_houses++;
- (dynamic_cast< cHouse* >(pi))->remove();
- }
- else // house ok -> update unused-time-attribute
- {
- timediff=(ct-pi->timeused_last)/MY_CLOCKS_PER_SEC;
- pi->time_unused+=timediff; // might be over limit now, but it will be cought next check anyway
-
- pi->timeused_last=ct; // if we don't do that and housedecay is checked every 11 minutes,
- // it would add 11,22,33,... minutes. So now timeused_last should in fact
- // be called timeCHECKED_last. but as there is a new timer system coming up
- // that will make things like this much easier, I'm too lazy now to rename
- // it (Duke, 16.2.2001)
- }
-
- houses++;
- }
- }
-
- return decayed_houses;
- }
-
-
void checkPC( P_PLAYER pc, unsigned int currenttime )
{
--- 230,233 ----
***************
*** 446,487 ****
if( shoprestocktime == 0 )
shoprestocktime = currenttime + MY_CLOCKS_PER_SEC * 60 * 20;
-
- //static unsigned int repairworldtimer=0;
-
- if (housedecaytimer<=currenttime)
- {
- //////////////////////
- ///// check_houses
- /////////////////////
- if(SrvParams->housedecay_secs() != -1)
- check_house_decay();
-
- /* TODO: rewrite STABLEMASTER with python
- ////////////////////
- // check stabling
- ///////////////////
- unsigned long int diff;
- cCharIterator iter_char;
- for( P_CHAR pc = iter_char.first(); pc; pc = iter_char.next() )
- {
- if( pc->npc_type() == 1 )
- {
- vector<SERIAL> pets( stablesp.getData(pc->serial()) );
- unsigned int ci;
- for (ci = 0; ci < pets.size();ci++)
- {
- P_CHAR pc_pet = FindCharBySerial(pets[ci]);
- if (pc_pet != NULL)
- {
- diff = (getNormalizedTime() - pc_pet->timeused_last()) / MY_CLOCKS_PER_SEC;
- pc_pet->setTime_unused( pc_pet->time_unused() + diff );
- }
- }
- }
- }
- */
- housedecaytimer=uiCurrentTime+MY_CLOCKS_PER_SEC*60*30; // check only each 30 minutes
- }
-
if(checkspawnregions<=currenttime && SrvParams->spawnRegionCheckTime() != -1)//Regionspawns
--- 408,411 ----
Index: basechar.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/basechar.cpp,v
retrieving revision 1.47
retrieving revision 1.48
diff -C2 -d -r1.47 -r1.48
*** basechar.cpp 30 Sep 2003 15:06:29 -0000 1.47
--- basechar.cpp 24 Nov 2003 02:36:10 -0000 1.48
***************
*** 705,713 ****
if( !backpack )
{
! backpack = new cItem;
! backpack->Init();
! backpack->setId( 0xE75 );
backpack->setOwner( this );
- backpack->setType( 1 );
addItem( Backpack, backpack );
backpack->update();
--- 705,710 ----
if( !backpack )
{
! backpack = cItem::createFromScript( "e75" );
backpack->setOwner( this );
addItem( Backpack, backpack );
backpack->update();
Index: items.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/items.cpp,v
retrieving revision 1.358
retrieving revision 1.359
diff -C2 -d -r1.358 -r1.359
*** items.cpp 30 Oct 2003 10:46:16 -0000 1.358
--- items.cpp 24 Nov 2003 02:36:10 -0000 1.359
***************
*** 69,72 ****
--- 69,107 ----
#define DBGFILE "items.cpp"
+ /**
+ * Loads item definitions and transforms them into cItemBase instances.
+ */
+ cItemBases::cItemBases()
+ {
+ itembases.setAutoDelete( true );
+ }
+
+ void cItemBases::load()
+ {
+ // Clear all current ItemBases
+ itembases.clear();
+
+ QStringList sections = DefManager->getSections( WPDT_ITEM );
+
+ for( unsigned int i = 0; i < sections.size(); ++i )
+ {
+ const cElement *element = DefManager->getDefinition( WPDT_ITEM, sections[i] );
+ const QString &id = element->getAttribute( "id" );
+
+ if( id != QString::null )
+ {
+ cItemBase *itembase = new cItemBase;
+ itembase->id_ = id;
+
+ itembases.insert( id, itembase );
+ }
+ }
+ }
+
+ inline cItemBase *cItemBases::getItemBase( const QString &id )
+ {
+ return itembases.find( id );
+ }
+
/*****************************************************************************
cItem member functions
***************
*** 74,80 ****
// constructor
! cItem::cItem(): container_(0), totalweight_(0), incognito(false),
! timeused_last(0), sellprice_( 0 ),
! buyprice_( 0 ), restock_( 1 ), antispamtimer_( 0 )
{
spawnregion_ = QString::null;
--- 109,114 ----
// constructor
! cItem::cItem(): container_(0), totalweight_(0), sellprice_( 0 ),
! buyprice_( 0 ), restock_( 1 ), antispamtimer_( 0 ), base( 0 )
{
spawnregion_ = QString::null;
***************
*** 106,110 ****
this->hidamage_=src.hidamage_;
this->hp_ = src.hp_;
- this->incognito = src.incognito;
this->isPersistent = src.isPersistent;
this->layer_ = src.layer_;
--- 140,143 ----
***************
*** 119,125 ****
this->setOwnSerialOnly(src.ownSerial());
this->spawnregion_=src.spawnregion_;
! this->speed_=src.speed_;
! this->time_unused=src.time_unused;
! this->timeused_last=getNormalizedTime();
this->totalweight_ = src.totalweight_;
this->type2_ = src.type2_;
--- 152,156 ----
this->setOwnSerialOnly(src.ownSerial());
this->spawnregion_=src.spawnregion_;
! this->speed_=src.speed_;
this->totalweight_ = src.totalweight_;
this->type2_ = src.type2_;
***************
*** 127,130 ****
--- 158,162 ----
this->visible_=src.visible_;
this->weight_ = src.weight_;
+ this->base = src.base;
this->setTotalweight( amount_ * weight_ );
***************
*** 435,439 ****
addField("hidamage", hidamage_);
addField("lodamage", lodamage_);
- addField("time_unused", time_unused);
addField("weight", weight_);
addField("hp", hp_ );
--- 467,470 ----
***************
*** 525,529 ****
this->container_ = 0;
- this->incognito=false;//AntiChrist - incognito
this->setMultis( INVALID_SERIAL ); //Multi serial
--- 556,559 ----
***************
*** 549,554 ****
this->priv_ = 0; // Bit 0, nodecay off/on. Bit 1, newbie item off/on. Bit 2 Dispellable
this->poisoned_ = 0; //AntiChrist -- for poisoning skill
- this->time_unused = 0;
- this->timeused_last=getNormalizedTime();
}
--- 579,582 ----
***************
*** 826,859 ****
}
-
- /*!
- Retrieves the Item Information stored in Section and creates an item based on it
- */
- P_ITEM cItem::createFromScript( const QString& Section )
- {
- if( Section.length() == 0 )
- return NULL;
-
- P_ITEM nItem = NULL;
-
- // Get an Item and assign a serial to it
- const cElement* DefSection = DefManager->getDefinition( WPDT_ITEM, Section );
-
- if( !DefSection ) // section not found
- {
- Console::instance()->log( LOG_ERROR, QString( "Unable to create unscripted item: %1\n" ).arg( Section ) );
- return NULL;
- }
-
- nItem = new cItem;
- nItem->Init( true );
- nItem->applyDefinition( DefSection );
-
- nItem->onCreate( Section );
-
- return nItem;
- }
-
- // Added by DarkStorm
bool cItem::onSingleClick( P_PLAYER Viewer )
{
--- 854,857 ----
***************
*** 1859,1863 ****
hidamage_ = atoi( result[offset++] );
lodamage_ = atoi( result[offset++] );
- time_unused = atoi( result[offset++] );
weight_ = atoi( result[offset++] );
hp_ = atoi( result[offset++] );
--- 1857,1860 ----
***************
*** 1889,1893 ****
{
cUObject::buildSqlString( fields, tables, conditions );
! fields.push_back( "items.id,items.color,items.cont,items.layer,items.type,items.type2,items.amount,items.decaytime,items.def,items.hidamage,items.lodamage,items.time_unused,items.weight,items.hp,items.maxhp,items.speed,items.poisoned,items.magic,items.owner,items.visible,items.spawnregion,items.priv,items.sellprice,items.buyprice,items.restock" );
tables.push_back( "items" );
conditions.push_back( "uobjectmap.serial = items.serial" );
--- 1886,1890 ----
{
cUObject::buildSqlString( fields, tables, conditions );
! fields.push_back( "items.id,items.color,items.cont,items.layer,items.type,items.type2,items.amount,items.decaytime,items.def,items.hidamage,items.lodamage,items.weight,items.hp,items.maxhp,items.speed,items.poisoned,items.magic,items.owner,items.visible,items.spawnregion,items.priv,items.sellprice,items.buyprice,items.restock,items.baseid" );
tables.push_back( "items" );
conditions.push_back( "uobjectmap.serial = items.serial" );
***************
*** 2065,2068 ****
--- 2062,2070 ----
else SET_INT_PROPERTY( "color", color_ )
+ else if( name == "baseid" )
+ {
+ base = ItemBases::instance()->getItemBase( value.toString() );
+ }
+
// Amount needs weight handling
else if( name == "amount" )
***************
*** 2168,2174 ****
else SET_INT_PROPERTY( "restock", restock_ )
else SET_INT_PROPERTY( "poisoned", poisoned_ )
- else SET_INT_PROPERTY( "incognito", incognito )
- else SET_INT_PROPERTY( "timeunused", time_unused )
- else SET_INT_PROPERTY( "timeusedlast", timeused_last )
else SET_INT_PROPERTY( "magic", magic_ )
else SET_INT_PROPERTY( "visible", visible_ )
--- 2170,2173 ----
***************
*** 2242,2249 ****
{
GET_PROPERTY( "id", id_ )
else GET_PROPERTY( "color", color_ )
else GET_PROPERTY( "amount", amount_ )
else GET_PROPERTY( "layer", layer_ )
- // Flag properties are set elsewhere!!
else GET_PROPERTY( "type", type_ )
else GET_PROPERTY( "type2", type2_ )
--- 2241,2248 ----
{
GET_PROPERTY( "id", id_ )
+ else GET_PROPERTY( "baseid", ( base ? base->id() : QString::null ) )
else GET_PROPERTY( "color", color_ )
else GET_PROPERTY( "amount", amount_ )
else GET_PROPERTY( "layer", layer_ )
else GET_PROPERTY( "type", type_ )
else GET_PROPERTY( "type2", type2_ )
***************
*** 2284,2290 ****
else GET_PROPERTY( "restock", restock_ )
else GET_PROPERTY( "poisoned", (int)poisoned_ )
- else GET_PROPERTY( "incognito", incognito ? 1 : 0 )
- else GET_PROPERTY( "timeunused", (int)time_unused )
- else GET_PROPERTY( "timeusedlast", (int)timeused_last )
else GET_PROPERTY( "magic", magic_ )
--- 2283,2286 ----
***************
*** 2333,2336 ****
--- 2329,2367 ----
cUObject::sendTooltip( mSock );
+ }
+
+ /*!
+ Selects an item id from a list and creates it.
+ */
+ P_ITEM cItem::createFromList( const QString &id )
+ {
+ QString entry = DefManager->getRandomListEntry( id );
+ return createFromScript( entry);
+ }
+
+ /*!
+ Creates a new item and applies the specified definition section on it.
+ */
+ P_ITEM cItem::createFromScript( const QString& id )
+ {
+ P_ITEM nItem = 0;
+
+ // Get an Item and assign a serial to it
+ const cElement* section = DefManager->getDefinition( WPDT_ITEM, id );
+
+ if( section )
+ {
+ nItem = new cItem;
+ nItem->Init( true );
+ nItem->base = ItemBases::instance()->getItemBase( id );
+ nItem->applyDefinition( section );
+ nItem->onCreate( id );
+ }
+ else
+ {
+ Console::instance()->log( LOG_ERROR, QString( "Unable to create unscripted item: %1\n" ).arg( id ) );
+ }
+
+ return nItem;
}
Index: items.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/items.h,v
retrieving revision 1.179
retrieving revision 1.180
diff -C2 -d -r1.179 -r1.180
*** items.h 23 Sep 2003 11:53:31 -0000 1.179
--- items.h 24 Nov 2003 02:36:10 -0000 1.180
***************
*** 37,48 ****
--- 37,81 ----
#include "defines.h"
#include "network/uotxpackets.h"
+ #include "singleton.h"
// Library Includes
#include <qvaluevector.h>
+ #include <qdict.h>
// Forward Class declarations
class ISerialization;
class cUOSocket;
+ class cItemBases;
+
+ /**
+ * Provides properties to types of items. There is one instance of this
+ * class per item definition. There should be no thread issues as this is
+ * read only during runtime, except for the DefManager.
+ */
+ class cItemBase
+ {
+ friend class cItemBases;
+ private:
+ QString id_;
+ public:
+ inline const QString &id() const { return id_; }
+ };
+
+ /**
+ * Manages all cItemBase instances and provides an interface for
+ * cItem to retrieve pointers.
+ */
+ class cItemBases
+ {
+ protected:
+ QDict< cItemBase > itembases;
+
+ public:
+ cItemBases();
+ void load();
+ inline cItemBase *getItemBase( const QString &id );
+ };
+ typedef SingletonHolder< cItemBases > ItemBases;
class cItem : public cUObject
***************
*** 51,54 ****
--- 84,88 ----
bool changed_;
void flagChanged() { changed_ = true; } // easier to debug, compiler should make it inline;
+ cItemBase *base;
public:
***************
*** 159,168 ****
//*******************************************END ADDED SETTERS**********
- bool incognito; //AntiChrist - for items under incognito effect
- // ^^ NUTS !! - move that to priv
-
- uint time_unused; // LB -> used for house decay and possibly for more in future, gets saved
- uint timeused_last; // helper attribute for time_unused, doesnt get saved
-
virtual void Init( bool mkser = true );
void setSerial(SERIAL ser);
--- 193,196 ----
***************
*** 230,235 ****
////
virtual void flagUnchanged() { cItem::changed_ = false; cUObject::flagUnchanged(); }
! static P_ITEM createFromScript( const QString& Section );
! static P_ITEM createFromId( unsigned short id );
void respawn( unsigned int currenttime );
void decay( unsigned int currenttime );
--- 258,265 ----
////
virtual void flagUnchanged() { cItem::changed_ = false; cUObject::flagUnchanged(); }
!
! static P_ITEM createFromScript( const QString §ion );
! static P_ITEM createFromList( const QString &list );
! static P_ITEM createFromId( unsigned short id );
void respawn( unsigned int currenttime );
void decay( unsigned int currenttime );
Index: player.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/player.cpp,v
retrieving revision 1.46
retrieving revision 1.47
diff -C2 -d -r1.46 -r1.47
*** player.cpp 19 Nov 2003 13:11:42 -0000 1.46
--- player.cpp 24 Nov 2003 02:36:10 -0000 1.47
***************
*** 1054,1060 ****
while( total > 0 )
{
! P_ITEM pile = new cItem;
! pile->Init();
! pile->setId( 0xEED );
pile->setAmount( QMIN( total, static_cast<Q_UINT32>(65535) ) );
pCont->addItem( pile );
--- 1054,1058 ----
while( total > 0 )
{
! P_ITEM pile = cItem::createFromScript( "eed" );
pile->setAmount( QMIN( total, static_cast<Q_UINT32>(65535) ) );
pCont->addItem( pile );
***************
*** 1116,1237 ****
}
! void cPlayer::applyStartItemDefinition( const cElement *Tag )
{
! for( unsigned int i = 0; i < Tag->childCount(); ++i )
{
! const cElement *node = Tag->getChild( i );
! if( node->name() == "item" )
{
! P_ITEM pItem = NULL;
! const cElement *DefSection = DefManager->getDefinition( WPDT_ITEM, node->getAttribute( "id" ) );
! if( DefSection )
! {
! // books wont work without this
! pItem = cItem::createFromScript( node->getAttribute("id") );
! }
! else
{
! pItem = new cItem;
! pItem->Init( true );
}
! if( pItem )
! {
! pItem->applyDefinition( node );
! pItem->setNewbie( true ); // make it newbie
!
! if( pItem->id() <= 1 )
! pItem->remove();
! else
! {
! // Put it into the backpack
! P_ITEM backpack = getBackpack();
! if( backpack )
! backpack->addItem( pItem );
! else
! pItem->remove();
! }
! }
}
! else if( node->name() == "bankitem" )
{
! P_ITEM pItem = NULL;
! const cElement *DefSection = DefManager->getDefinition( WPDT_ITEM, node->getAttribute( "id" ) );
! if( DefSection )
! {
! // books wont work without this
! pItem = cItem::createFromScript( node->getAttribute("id") );
}
else
! {
! pItem = new cItem;
! pItem->Init( true );
! }
!
! if( pItem )
! {
! pItem->applyDefinition( node );
! pItem->setNewbie( true ); // make it newbie
!
! if( pItem->id() <= 1 )
! pItem->remove();
! else
{
! // Put it into the bankbox
! P_ITEM bankbox = getBankBox();
! if( bankbox )
! bankbox->addItem( pItem );
! else
! pItem->remove();
}
}
! }
! else if( node->name() == "equipment" )
! {
! P_ITEM pItem = NULL;
! const cElement *DefSection = DefManager->getDefinition( WPDT_ITEM, node->getAttribute( "id" ) );
! if( DefSection )
{
! // books wont work without this
! pItem = cItem::createFromScript( node->getAttribute("id") );
}
else
{
- pItem = new cItem;
- pItem->Init( true );
- }
-
- if( pItem )
- {
pItem->applyDefinition( node );
! pItem->setNewbie( true ); // make it newbie
! UINT16 mLayer = pItem->layer();
! pItem->setLayer( 0 );
! if( !mLayer )
{
! tile_st tile = TileCache::instance()->getTile( pItem->id() );
! mLayer = tile.layer;
}
! if( pItem->id() <= 1 || !mLayer )
! pItem->remove();
else
{
! // Put it onto the char
! this->addItem( static_cast<cBaseChar::enLayer>( mLayer ), pItem );
}
}
- }
- else if( node->name() == "gold" )
- {
- giveGold( node->getValue().toUInt() );
- }
- else if( node->name() == "inherit" )
- {
- const cElement* inheritNode = DefManager->getDefinition( WPDT_STARTITEMS, node->getAttribute("id") );
- if( inheritNode )
- applyStartItemDefinition( inheritNode );
}
}
--- 1114,1203 ----
}
! void cPlayer::applyStartItemDefinition( const cElement *element )
{
! for( unsigned int i = 0; i < element->childCount(); ++i )
{
! const cElement *node = element->getChild( i );
! // Apply another startitem definition
! if( node->name() == "inherit" )
{
! const cElement* inheritNode = DefManager->getDefinition( WPDT_STARTITEMS, node->getAttribute( "id" ) );
!
! if( inheritNode )
{
! applyStartItemDefinition( inheritNode );
}
+ }
! // Add gold to the players backpack
! else if( node->name() == "gold" )
! {
! giveGold( node->getValue().toUInt() );
}
!
! // Item related nodes
! else
{
! P_ITEM pItem = 0;
! const QString &id = node->getAttribute( "id" );
!
! if( id != QString::null )
! {
! pItem = cItem::createFromScript( id );
}
else
! {
! const QString &list = node->getAttribute( "list" );
!
! if( list != QString::null )
{
! pItem = cItem::createFromList( list );
}
}
!
! if( !pItem )
{
! Console::instance()->log( LOG_ERROR, QString( "Invalid item tag without id or list in startitem definition '%1'" ).arg( element->getAttribute( "id" ) ) );
}
else
{
pItem->applyDefinition( node );
! pItem->setNewbie( true );
! if( node->name() == "item" )
{
! pItem->toBackpack( this );
}
+ else if( node->name() == "bankitem" )
+ {
+ getBackpack()->addItem( pItem );
+ }
+ else if( node->name() == "equipment" )
+ {
+ unsigned char layer = pItem->layer();
+ pItem->setLayer( 0 );
! if( !layer )
! {
! tile_st tile = TileCache::instance()->getTile( pItem->id() );
! layer = tile.layer;
! }
!
! if( layer )
! {
! addItem( static_cast<cBaseChar::enLayer>( layer ), pItem );
! }
! else
! {
! Console::instance()->log( LOG_ERROR, QString( "Trying to equip invalid item (%1) in startitem definition '%2'" ).arg( pItem->id(), 0, 16 ).arg( element->getAttribute( "id" ) ) );
! }
! }
else
{
! pItem->remove();
! Console::instance()->log( LOG_ERROR, QString( "Unrecognized startitem tag '%1' in definition '%2'.").arg( node->name(), element->getAttribute( "id" ) ) );
}
}
}
}
Index: wolfpack.vcproj
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/wolfpack.vcproj,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** wolfpack.vcproj 23 Nov 2003 03:46:22 -0000 1.2
--- wolfpack.vcproj 24 Nov 2003 02:36:10 -0000 1.3
***************
*** 37,42 ****
BasicRuntimeChecks="3"
RuntimeLibrary="1"
RuntimeTypeInfo="1"
! AllOptions="/c /I "sqlite" /Zi /nologo /W1 /Wp64 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "QT_DLL" /D "QT_NO_STL" /D "QT_THREAD_SUPPORT" /D "_MBCS" /Gm /EHsc /RTC1 /MTd /GR /Fo"Debug/" /Fd"Debug/vc70.pdb" /FR"Debug/" /Gd /TP /GR"/>
</Tool>
<Tool
--- 37,44 ----
BasicRuntimeChecks="3"
RuntimeLibrary="1"
+ ForceConformanceInForLoopScope="0"
RuntimeTypeInfo="1"
! AllOptions="/c /I "sqlite" /Zi /nologo /W1 /Wp64 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "QT_DLL" /D "QT_NO_STL" /D "QT_THREAD_SUPPORT" /D "_MBCS" /Gm /EHsc /RTC1 /MTd /GR /Fo"Debug/" /Fd"Debug/vc70.pdb" /FR"Debug/" /Gd /TP /GR"
! MSOriginalAdditionalOptions="/GR"/>
</Tool>
<Tool
***************
*** 51,57 ****
ProgramDatabaseFile="$(OutDir)/wolfpack.pdb"
SubSystem="2"
! TargetMachine="1">
<IntelOptions
! AllOptions="/NOLOGO /OUT:"../wolfpack.exe" /INCREMENTAL qt-mt321.lib ws2_32.lib /DEBUG /PDB:"Debug/wolfpack.pdb" /SUBSYSTEM:WINDOWS /TLBID:1 /MACHINE:IX86 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib"/>
</Tool>
<Tool
--- 53,61 ----
ProgramDatabaseFile="$(OutDir)/wolfpack.pdb"
SubSystem="2"
! TargetMachine="1"
! AdditionalOptions="">
<IntelOptions
! AllOptions="/NOLOGO /OUT:"../wolfpack.exe" /INCREMENTAL qt-mt321.lib ws2_32.lib /DEBUG /PDB:"Debug/wolfpack.pdb" /SUBSYSTEM:WINDOWS /TLBID:1 /MACHINE:IX86 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib"
! MSOriginalAdditionalOptions=""/>
</Tool>
<Tool
***************
*** 94,98 ****
Detect64BitPortabilityProblems="TRUE"
DebugInformationFormat="3"
! CallingConvention="1">
<IntelOptions
Optimization="2"
--- 98,103 ----
Detect64BitPortabilityProblems="TRUE"
DebugInformationFormat="3"
! CallingConvention="1"
! AdditionalOptions="">
<IntelOptions
Optimization="2"
***************
*** 103,108 ****
BufferSecurityCheck="1"
EnableFunctionLevelLinking="1"
RuntimeTypeInfo="1"
! AllOptions="/c /Zi /nologo /W3 /Wp64 /O2 /Ob1 /Oy /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "QT_DLL" /D "QT_NO_STL" /D "QT_THREAD_SUPPORT" /D "_MBCS" /GF /FD /EHsc /ML /GS /Gy /GR /Fo"Release/" /Fd"Release/vc70.pdb" /FR"Release/" /Gr /TP"/>
</Tool>
<Tool
--- 108,115 ----
BufferSecurityCheck="1"
EnableFunctionLevelLinking="1"
+ ForceConformanceInForLoopScope="1"
RuntimeTypeInfo="1"
! AllOptions="/c /Zi /nologo /W3 /Wp64 /O2 /Ob1 /Oy /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "QT_DLL" /D "QT_NO_STL" /D "QT_THREAD_SUPPORT" /D "_MBCS" /GF /FD /EHsc /ML /GS /Gy /Zc:forScope /GR /Fo"Release/" /Fd"Release/vc70.pdb" /FR"Release/" /Gr /TP"
! MSOriginalAdditionalOptions=""/>
</Tool>
<Tool
***************
*** 118,124 ****
OptimizeReferences="2"
EnableCOMDATFolding="2"
! TargetMachine="1">
<IntelOptions
! AllOptions="/NOLOGO /OUT:"Release/wolfpack.exe" /INCREMENTAL:NO qt-mt321.lib ws2_32.lib /DEBUG /PDB:"Release/wolfpack.pdb" /SUBSYSTEM:WINDOWS /OPT:REF /OPT:ICF /TLBID:1 /MACHINE:IX86 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib"/>
</Tool>
<Tool
--- 125,133 ----
OptimizeReferences="2"
EnableCOMDATFolding="2"
! TargetMachine="1"
! AdditionalOptions="">
<IntelOptions
! AllOptions="/NOLOGO /OUT:"Release/wolfpack.exe" /INCREMENTAL:NO qt-mt321.lib ws2_32.lib /DEBUG /PDB:"Release/wolfpack.pdb" /SUBSYSTEM:WINDOWS /OPT:REF /OPT:ICF /TLBID:1 /MACHINE:IX86 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib"
! MSOriginalAdditionalOptions=""/>
</Tool>
<Tool
***************
*** 272,289 ****
RelativePath=".\makemenus.h"/>
<File
- RelativePath=".\maps.cpp"/>
- <File
- RelativePath=".\maps.h"/>
- <File
- RelativePath=".\mulstructs.h"/>
- <File
- RelativePath=".\multis.cpp"/>
- <File
- RelativePath=".\multis.h"/>
- <File
- RelativePath=".\multiscache.cpp"/>
- <File
- RelativePath=".\multiscache.h"/>
- <File
RelativePath=".\network.cpp"/>
<File
--- 281,284 ----
***************
*** 368,377 ****
RelativePath=".\territories.h"/>
<File
- RelativePath=".\tilecache.cpp"/>
- <File
- RelativePath=".\tilecache.h"/>
- <File
- RelativePath=".\tileflags.h"/>
- <File
RelativePath=".\Timing.cpp"/>
<File
--- 363,366 ----
***************
*** 570,573 ****
--- 559,586 ----
<File
RelativePath=".\twofish\twofish2.c"/>
+ </Filter>
+ <Filter
+ Name="MulReading"
+ Filter="">
+ <File
+ RelativePath=".\maps.cpp"/>
+ <File
+ RelativePath=".\maps.h"/>
+ <File
+ RelativePath=".\mulstructs.h"/>
+ <File
+ RelativePath=".\multis.cpp"/>
+ <File
+ RelativePath=".\multis.h"/>
+ <File
+ RelativePath=".\multiscache.cpp"/>
+ <File
+ RelativePath=".\multiscache.h"/>
+ <File
+ RelativePath=".\tilecache.cpp"/>
+ <File
+ RelativePath=".\tilecache.h"/>
+ <File
+ RelativePath=".\tileflags.h"/>
</Filter>
</Files>
Index: world.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/world.cpp,v
retrieving revision 1.50
retrieving revision 1.51
diff -C2 -d -r1.50 -r1.51
*** world.cpp 23 Nov 2003 15:09:46 -0000 1.50
--- world.cpp 24 Nov 2003 02:36:10 -0000 1.51
***************
*** 198,202 ****
hidamage smallint(6) NOT NULL default '0',\
lodamage smallint(6) NOT NULL default '0',\
- time_unused int(10) NOT NULL default '0',\
weight int(11) NOT NULL default '0',\
hp smallint(6) NOT NULL default '0',\
--- 198,201 ----
***************
*** 212,215 ****
--- 211,215 ----
buyprice int(11) NOT NULL default '0',\
restock smallint(5) NOT NULL default '0',\
+ baseid varchar(32) NOT NULL default '',\
PRIMARY KEY (serial)\
);" },
Index: wpdefmanager.cpp
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/wpdefmanager.cpp,v
retrieving revision 1.70
retrieving revision 1.71
diff -C2 -d -r1.70 -r1.71
*** wpdefmanager.cpp 23 Nov 2003 03:53:08 -0000 1.70
--- wpdefmanager.cpp 24 Nov 2003 02:36:10 -0000 1.71
***************
*** 47,50 ****
--- 47,51 ----
#include "contextmenu.h"
#include "skills.h"
+ #include "items.h"
#include "world.h"
#include "skills.h"
***************
*** 302,306 ****
MakeMenus::instance()->reload();
ContextMenus::instance()->reload();
! Skills->reload();
// Update the Regions
--- 303,307 ----
MakeMenus::instance()->reload();
ContextMenus::instance()->reload();
! Skills->reload();
// Update the Regions
***************
*** 374,377 ****
--- 375,379 ----
Commands::instance()->loadACLs();
BaseDefManager::instance()->load();
+ ItemBases::instance()->load();
}
Index: wpdefmanager.h
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/wpdefmanager.h,v
retrieving revision 1.32
retrieving revision 1.33
diff -C2 -d -r1.32 -r1.33
*** wpdefmanager.h 20 Sep 2003 12:01:44 -0000 1.32
--- wpdefmanager.h 24 Nov 2003 02:36:10 -0000 1.33
***************
*** 128,131 ****
--- 128,134 ----
class WPDefManager
{
+ private:
+ cDefManagerPrivate *impl;
+
public:
WPDefManager();
***************
*** 137,143 ****
bool ImportSections( const QString& FileName );
-
- cDefManagerPrivate *impl;
-
const cElement* getDefinition( eDefCategory Type, const QString& id ) const;
const QValueVector< cElement* > &getDefinitions( eDefCategory Type ) const;
--- 140,143 ----
|