wpdev-commits Mailing List for Wolfpack Emu (Page 166)
Brought to you by:
rip,
thiagocorrea
You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(14) |
Aug
(121) |
Sep
(256) |
Oct
(59) |
Nov
(73) |
Dec
(120) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(259) |
Feb
(381) |
Mar
(501) |
Apr
(355) |
May
(427) |
Jun
(270) |
Jul
(394) |
Aug
(412) |
Sep
(724) |
Oct
(578) |
Nov
(65) |
Dec
|
|
From: <dar...@pr...> - 2004-01-31 14:49:46
|
Update of /cvsroot/wpdev/wolfpack In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24359 Modified Files: player.cpp Log Message: Began cleaning up cPlayer::kill Index: player.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/player.cpp,v retrieving revision 1.57 retrieving revision 1.58 diff -C2 -d -r1.57 -r1.58 *** player.cpp 30 Jan 2004 23:28:42 -0000 1.57 --- player.cpp 31 Jan 2004 14:48:03 -0000 1.58 *************** *** 391,412 **** int ele; ! if( free ) ! return; ! ! if( isDead() || isInvulnerable() ) return; // Do this in the beginning ! setDead( true ); hitpoints_ = 0; ! if( isPolymorphed() ) ! { ! setBodyID( orgBodyID_ ); ! setPolymorphed( false ); } - orgBodyID_ = bodyID_; - setOrgSkin( skin() ); setMurdererSerial( INVALID_SERIAL ); // Reset previous murderer serial # to zero --- 391,408 ---- int ele; ! if (free || isDead() || isInvulnerable()) { return; + } // Do this in the beginning ! setDead(true); hitpoints_ = 0; ! if (isPolymorphed()) { ! setBodyID(orgBodyID_); ! setSkin(orgSkin_); ! setPolymorphed(false); } setMurdererSerial( INVALID_SERIAL ); // Reset previous murderer serial # to zero *************** *** 533,546 **** P_ITEM pHair = GetItemOnLayer( 11 ); ! if( pHair ) ! { ! corpse->setHairColor( pHair->color() ); ! corpse->setHairStyle( pHair->id() ); } P_ITEM pBeard = GetItemOnLayer( 16 ); ! if( pBeard ) ! { corpse->setBeardColor( pBeard->color() ); corpse->setBeardStyle( pBeard->id() ); --- 529,540 ---- P_ITEM pHair = GetItemOnLayer( 11 ); ! if (pHair) { ! corpse->setHairColor(pHair->color()); ! corpse->setHairStyle(pHair->id()); } P_ITEM pBeard = GetItemOnLayer( 16 ); ! if (pBeard) { corpse->setBeardColor( pBeard->color() ); corpse->setBeardStyle( pBeard->id() ); *************** *** 551,587 **** // Will display the right color if( isInnocent() ) ! corpse->setTag( "notority", cVariant( 1 ) ); else if( isCriminal() ) ! corpse->setTag( "notority", cVariant( 2 ) ); else if( isMurderer() ) ! corpse->setTag( "notority", cVariant( 3 ) ); ! corpse->setOwner( this ); corpse->setBodyId( orgBodyID_ ); ! corpse->setTag( "human", cVariant( isHuman() ? 1 : 0 ) ); ! corpse->setTag( "name", cVariant( name() ) ); ! corpse->moveTo( pos() ); ! corpse->setDirection( direction() ); // Set the ownerserial to the player's ! corpse->SetOwnSerial( serial() ); // stores the time and the murderer's name ! corpse->setMurderer( murderer ); corpse->setMurderTime(uiCurrentTime); ! std::vector< P_ITEM > equipment; ! // Check the Equipment and Unequip if neccesary cBaseChar::ItemContainer::const_iterator iter; ! for ( iter = content_.begin(); iter != content_.end(); iter++ ) ! { ! P_ITEM pi_j = iter.data(); ! ! if( pi_j ) ! equipment.push_back( pi_j ); } --- 545,577 ---- // Will display the right color if( isInnocent() ) ! corpse->setTag("notority", cVariant(1)); else if( isCriminal() ) ! corpse->setTag("notority", cVariant(2)); else if( isMurderer() ) ! corpse->setTag("notority", cVariant(3)); ! corpse->setOwner(this); corpse->setBodyId( orgBodyID_ ); ! corpse->setTag("human", cVariant(isHuman() ? 1 : 0)); ! corpse->setTag("name", cVariant(name())); ! corpse->moveTo(pos()); ! corpse->setDirection(direction()); // Set the ownerserial to the player's ! corpse->SetOwnSerial(serial()); // stores the time and the murderer's name ! corpse->setMurderer(murderer); corpse->setMurderTime(uiCurrentTime); ! std::vector<P_ITEM> equipment; ! // Check the Equipment and Unequip if neccesary cBaseChar::ItemContainer::const_iterator iter; ! for (iter = content_.begin(); iter != content_.end(); iter++) { ! equipment.push_back(iter.data()); } *************** *** 598,620 **** cItem::ContainerContent container = pi_j->content(); cItem::ContainerContent::const_iterator it2 = container.begin(); ! for ( ; it2 != container.end(); ++it2 ) ! { P_ITEM pi_k = *it2; - if( !pi_k ) - continue; - // put the item in the corpse only of we're sure it's not a newbie item or a spellbook ! if( !pi_k->newbie() && ( pi_k->type() != 9 ) ) ! { corpse->addItem( pi_k ); - - // Ripper...so order/chaos shields disappear when on corpse backpack. - if( pi_k->id() == 0x1BC3 || pi_k->id() == 0x1BC4 ) - { - soundEffect( 0x01FE ); - this->effect( 0x372A, 0x09, 0x06 ); - pi_k->remove(); - } } } --- 588,597 ---- cItem::ContainerContent container = pi_j->content(); cItem::ContainerContent::const_iterator it2 = container.begin(); ! for ( ; it2 != container.end(); ++it2 ) { P_ITEM pi_k = *it2; // put the item in the corpse only of we're sure it's not a newbie item or a spellbook ! if (!pi_k->newbie() && (pi_k->type() != 9)) { corpse->addItem( pi_k ); } } *************** *** 645,650 **** cUOTxDeathAction dAction; ! dAction.setSerial( serial() ); ! dAction.setCorpse( corpse->serial() ); cUOTxRemoveObject rObject; --- 622,627 ---- cUOTxDeathAction dAction; ! dAction.setSerial(serial()); ! dAction.setCorpse(corpse->serial()); cUOTxRemoveObject rObject; *************** *** 658,674 **** } ! resend( false ); ! P_ITEM pItem = cItem::createFromScript( "204e" ); ! if( pItem ) ! { ! this->addItem( cBaseChar::OuterTorso, pItem ); pItem->update(); } ! if( socket_ ) ! { cUOTxCharDeath cDeath; ! socket_->send( &cDeath ); } --- 635,649 ---- } ! resend(false); ! P_ITEM pItem = cItem::createFromScript("204e"); ! if (pItem) { ! this->addItem(cBaseChar::OuterTorso, pItem); pItem->update(); } ! if(socket_) { cUOTxCharDeath cDeath; ! socket_->send(&cDeath); } |
|
From: <dar...@pr...> - 2004-01-31 06:07:15
|
Update of /cvsroot/wpdev/wolfpack In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3042 Modified Files: world.cpp Log Message: Another fix for world saving. Index: world.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/world.cpp,v retrieving revision 1.58 retrieving revision 1.59 diff -C2 -d -r1.58 -r1.59 *** world.cpp 30 Jan 2004 09:18:05 -0000 1.58 --- world.cpp 30 Jan 2004 14:08:36 -0000 1.59 *************** *** 841,845 **** QString sql; ! if( !res.fetchrow() || !res.isValid() ) { sql = "INSERT INTO settings VALUES('%1','%2')"; --- 841,845 ---- QString sql; ! if( !res.isValid() || !res.fetchrow() ) { sql = "INSERT INTO settings VALUES('%1','%2')"; |
Update of /cvsroot/wpdev/wolfpack In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18287 Modified Files: basechar.cpp basechar.h items.cpp items.h persistentbroker.cpp uobject.cpp uobject.h Log Message: Redid parts of the tooltip implementation. Index: basechar.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/basechar.cpp,v retrieving revision 1.51 retrieving revision 1.52 diff -C2 -d -r1.51 -r1.52 *** basechar.cpp 25 Jan 2004 20:24:25 -0000 1.51 --- basechar.cpp 29 Jan 2004 23:56:31 -0000 1.52 *************** *** 2060,2061 **** --- 2060,2068 ---- } + void cBaseChar::createTooltip(cUOTxTooltipList &tooltip, cPlayer *player) { + cUObject::createTooltip(tooltip, player); + + if (!onShowTooltip(player, &tooltip)) { + tooltip.addLine( 0x1005bd, " \t" + name_ + "\t " ); + } + } Index: basechar.h =================================================================== RCS file: /cvsroot/wpdev/wolfpack/basechar.h,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** basechar.h 25 Jan 2004 20:24:26 -0000 1.39 --- basechar.h 29 Jan 2004 23:56:32 -0000 1.40 *************** *** 108,111 **** --- 108,112 ---- virtual void log( const QString &string ) = 0; unsigned int damage( eDamageType type, unsigned int amount, cUObject *source = 0 ); + void createTooltip(cUOTxTooltipList &tooltip, cPlayer *player); // other public methods Index: items.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/items.cpp,v retrieving revision 1.365 retrieving revision 1.366 diff -C2 -d -r1.365 -r1.366 *** items.cpp 26 Jan 2004 09:42:30 -0000 1.365 --- items.cpp 29 Jan 2004 23:56:32 -0000 1.366 *************** *** 2365,2366 **** --- 2365,2382 ---- return pItem; } + + void cItem::createTooltip(cUOTxTooltipList &tooltip, cPlayer *player) { + cUObject::createTooltip(tooltip, player); + + if (!onShowTooltip(player, &tooltip)) { + if (name_.isNull() || name_.isEmpty()) { + if (amount_ > 1) { + tooltip.addLine(0x1005bd, " \t#" + QString::number( 0xF9060 + id_ ) + "\t: " + QString::number(amount_)); + } else { + tooltip.addLine(0xF9060 + id_, ""); + } + } + else + tooltip.addLine( 0x1005bd, " \t" + name_ + "\t " ); + } + } Index: items.h =================================================================== RCS file: /cvsroot/wpdev/wolfpack/items.h,v retrieving revision 1.181 retrieving revision 1.182 diff -C2 -d -r1.181 -r1.182 *** items.h 26 Nov 2003 03:53:53 -0000 1.181 --- items.h 29 Jan 2004 23:56:33 -0000 1.182 *************** *** 246,249 **** --- 246,250 ---- P_CHAR getOutmostChar(); + void createTooltip(cUOTxTooltipList &tooltip, cPlayer *player); virtual stError *setProperty( const QString &name, const cVariant &value ); virtual stError *getProperty( const QString &name, cVariant &value ) const; Index: persistentbroker.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/persistentbroker.cpp,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** persistentbroker.cpp 22 Jan 2004 04:39:58 -0000 1.32 --- persistentbroker.cpp 29 Jan 2004 23:56:34 -0000 1.33 *************** *** 33,36 **** --- 33,37 ---- #include "persistentobject.h" + #include "exceptions.h" #include "dbdriver.h" #include "console.h" *************** *** 89,93 **** d->sqlite = false; #else ! throw QString( "Sorry, you have to define MYSQL_DRIVER to make wolfpack work with MySQL.\n" ); #endif } --- 90,94 ---- d->sqlite = false; #else ! throw wpException( "Sorry, you have to define MYSQL_DRIVER to make wolfpack work with MySQL.\n" ); #endif } Index: uobject.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/uobject.cpp,v retrieving revision 1.126 retrieving revision 1.127 diff -C2 -d -r1.126 -r1.127 *** uobject.cpp 26 Jan 2004 03:48:40 -0000 1.126 --- uobject.cpp 29 Jan 2004 23:56:34 -0000 1.127 *************** *** 750,754 **** } } else { ! // TODO: Tooltip implementation sucks... redo... } } --- 750,761 ---- } } else { ! cUOTxTooltipList tooltip; ! ! for (cUOSocket *s = cNetwork::instance()->first(); s; s = cNetwork::instance()->next()) { ! if (s->player() && s->player()->inRange(this, s->player()->visualRange())) { ! createTooltip(tooltip, s->player()); ! s->send(&tooltip); ! } ! } } } *************** *** 778,779 **** --- 785,792 ---- return result; } + + void cUObject::createTooltip(cUOTxTooltipList &tooltip, cPlayer *player) { + tooltip.resize(19); // Resize to the original size + tooltip.setSerial(serial_); + tooltip.setId(tooltip_); + } Index: uobject.h =================================================================== RCS file: /cvsroot/wpdev/wolfpack/uobject.h,v retrieving revision 1.79 retrieving revision 1.80 diff -C2 -d -r1.79 -r1.80 *** uobject.h 25 Jan 2004 20:24:26 -0000 1.79 --- uobject.h 29 Jan 2004 23:56:34 -0000 1.80 *************** *** 56,59 **** --- 56,60 ---- class QSqlQuery; class cItem; + class cUOTxTooltipList; struct stError; *************** *** 134,137 **** --- 135,139 ---- // Events virtual bool onCreate( const QString &definition ); + virtual void createTooltip(cUOTxTooltipList &tooltip, cPlayer *player); bool free; |
|
From: <dar...@pr...> - 2004-01-31 05:21:18
|
Update of /cvsroot/wpdev/wolfpack/network In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18287/network Modified Files: uosocket.cpp Log Message: Redid parts of the tooltip implementation. Index: uosocket.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/network/uosocket.cpp,v retrieving revision 1.304 retrieving revision 1.305 diff -C2 -d -r1.304 -r1.305 *** uosocket.cpp 28 Jan 2004 02:18:14 -0000 1.304 --- uosocket.cpp 29 Jan 2004 23:56:34 -0000 1.305 *************** *** 1091,1135 **** } ! void cUOSocket::handleToolTip( cUORxRequestToolTip *packet ) { ! P_CHAR pChar; ! P_ITEM pItem; ! cUOTxTooltipList tooltips; ! bool result; ! pItem = FindItemBySerial( packet->serial() ); ! if( pItem ) ! { ! tooltips.setSerial(pItem->serial()); ! tooltips.setId(pItem->getTooltip()); ! ! if(!pItem->onShowTooltip(this->player(),&tooltips)) // just for test if object haven't tooltip ! { ! if( pItem->name().isNull() || pItem->name().isEmpty() ) ! { ! if( pItem->amount() > 1 ) ! tooltips.addLine( 0x1005bd, " \t#" + QString::number( 0xF9060 + pItem->id() ) + "\t: " + QString::number( pItem->amount() ) ); ! else ! tooltips.addLine( 0xF9060 + pItem->id(), "" ); ! } ! else ! tooltips.addLine( 0x1005bd, " \t" + pItem->name() + "\t " ); ! ! this->send( &tooltips ); ! } ! } ! else ! { ! pChar = FindCharBySerial( packet->serial() ); ! if( !pChar ) ! return; ! ! tooltips.setSerial( pChar->serial() ); ! tooltips.setId( pChar->getTooltip() ); ! if( !pChar->onShowTooltip( this->player(), &tooltips ) ) ! { ! tooltips.addLine( 0x1005bd, " \t" + pChar->name() + "\t " ); ! this->send( &tooltips ); ! } } } --- 1091,1102 ---- } ! void cUOSocket::handleToolTip(cUORxRequestToolTip *packet) { ! cUOTxTooltipList tooltip; ! cUObject *object = World::instance()->findObject(packet->serial()); ! if (object && player()) { ! object->createTooltip(tooltip, player()); ! send(&tooltip); } } |
|
From: <thi...@pr...> - 2004-01-31 05:05:30
|
Update of /cvsroot/wpdev/xmlscripts/definitions/items/professions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17234 Modified Files: miner.xml Log Message: no message Index: miner.xml =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/definitions/items/professions/miner.xml,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** miner.xml 25 Jan 2004 01:25:57 -0000 1.7 --- miner.xml 29 Jan 2004 18:12:52 -0000 1.8 *************** *** 23,27 **** <id>0x1bf2</id> <color>0x973</color> ! <tag name="resname" value="iron" /> <category>Professions\Miner\Ingots\Colored\Dull Copper Ingot</category> </item> --- 23,27 ---- <id>0x1bf2</id> <color>0x973</color> ! <tag name="resname" value="dullcopper" /> <category>Professions\Miner\Ingots\Colored\Dull Copper Ingot</category> </item> |
|
From: <thi...@pr...> - 2004-01-31 04:38:04
|
Update of /cvsroot/wpdev/wolfpack/python In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17926/python Modified Files: char.cpp Log Message: no message Index: char.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/python/char.cpp,v retrieving revision 1.119 retrieving revision 1.120 diff -C2 -d -r1.119 -r1.120 *** char.cpp 30 Jan 2004 23:28:42 -0000 1.119 --- char.cpp 31 Jan 2004 04:36:20 -0000 1.120 *************** *** 563,584 **** return PyFalse; ! if( !checkArgInt( 0 ) ) ! { ! PyErr_BadArgument(); ! return 0; ! } ! ushort color = -1; ! uint cliloc = getArgInt( 0 ); ! ! if( checkArgInt( 1 ) ) ! color = getArgInt( 1 ); ! ! npc->talk( cliloc, 0, 1 ); return PyTrue; } else { ! INT16 color = -1; if( checkArgInt( 1 ) ) --- 563,581 ---- return PyFalse; ! uint id; ! char *clilocargs = 0; ! char *affix = 0; ! char prepend; ! uint color = self->pChar->saycolor(); ! if( !PyArg_ParseTuple( args, "i|ssbi:char.say( clilocid, [args], [affix], [prepend], [color] )", &id, &clilocargs, &affix, &prepend, &color ) ) ! return 0; ! ! npc->talk( id, clilocargs, affix, prepend, color ); return PyTrue; } else { ! ushort color = self->pChar->saycolor(); if( checkArgInt( 1 ) ) |
|
From: <thi...@pr...> - 2004-01-31 04:38:03
|
Update of /cvsroot/wpdev/wolfpack In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17926 Modified Files: Trade.cpp contextmenu.h npc.cpp npc.h targetrequests.h Log Message: no message Index: Trade.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/Trade.cpp,v retrieving revision 1.92 retrieving revision 1.93 diff -C2 -d -r1.92 -r1.93 *** Trade.cpp 28 Jan 2004 02:18:13 -0000 1.92 --- Trade.cpp 31 Jan 2004 04:36:20 -0000 1.93 *************** *** 188,192 **** if ( pChar->CountGold() < totalValue ) { ! pVendor->talk( 500192, 0, 0xFFFF, pChar->socket() ); //Begging thy pardon, but thou casnt afford that. return; } --- 188,192 ---- if ( pChar->CountGold() < totalValue ) { ! pVendor->talk( 500192, 0, 0, false, 0xFFFF, pChar->socket() ); //Begging thy pardon, but thou casnt afford that. return; } *************** *** 196,200 **** if ( pChar->CountBankGold() < totalValue ) { ! pVendor->talk( 500191, 0, 0xFFFF, pChar->socket() ); //Begging thy pardon, but thy bank account lacks these funds. return; } --- 196,200 ---- if ( pChar->CountBankGold() < totalValue ) { ! pVendor->talk( 500191, 0, 0, false, 0xFFFF, pChar->socket() ); //Begging thy pardon, but thy bank account lacks these funds. return; } *************** *** 205,209 **** { socket->send( &clearBuy ); ! pVendor->talk( 500190, 0, 0xFFFF, pChar->socket() ); // Thou hast bought nothing! return; } --- 205,209 ---- { socket->send( &clearBuy ); ! pVendor->talk( 500190, 0, 0, false, 0xFFFF, pChar->socket() ); // Thou hast bought nothing! return; } Index: contextmenu.h =================================================================== RCS file: /cvsroot/wpdev/wolfpack/contextmenu.h,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** contextmenu.h 28 Jan 2004 02:18:13 -0000 1.14 --- contextmenu.h 31 Jan 2004 04:36:20 -0000 1.15 *************** *** 59,63 **** cContextMenuEntry( ushort cliloc, ushort scriptTag, ushort color = 0, bool checkvisible = false, bool checkenabled = false ) : ! cliloc_( cliloc ), scriptTag_(scriptTag), flags_ ( 0 ), color_(0), checkvisible_(checkvisible_), checkenabled_(checkenabled) { flags_ |= ( color_ & 0xFFFF ) ? 32 : 0; --- 59,63 ---- cContextMenuEntry( ushort cliloc, ushort scriptTag, ushort color = 0, bool checkvisible = false, bool checkenabled = false ) : ! cliloc_( cliloc ), flags_ ( 0 ), color_(0), scriptTag_(scriptTag), checkvisible_(checkvisible_), checkenabled_(checkenabled) { flags_ |= ( color_ & 0xFFFF ) ? 32 : 0; *************** *** 65,69 **** bool isEnabled() const { return !(flags_ & 0x0001); } ! bool setEnabled( bool enable ) { flags_ = enable ? flags_ & ~0x0001 : flags_ | 0x0001; --- 65,69 ---- bool isEnabled() const { return !(flags_ & 0x0001); } ! void setEnabled( bool enable ) { flags_ = enable ? flags_ & ~0x0001 : flags_ | 0x0001; Index: npc.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/npc.cpp,v retrieving revision 1.58 retrieving revision 1.59 diff -C2 -d -r1.58 -r1.59 *** npc.cpp 30 Jan 2004 23:28:42 -0000 1.58 --- npc.cpp 31 Jan 2004 04:36:20 -0000 1.59 *************** *** 353,361 **** } ! void cNPC::talk( const UINT32 MsgID, const QString& params /*= 0*/, UI16 color /*= 0xFFFF*/, cUOSocket* socket /*= 0*/ ) { if ( socket ) { ! socket->clilocMessage( MsgID, params, color, 3, this ); } else --- 353,367 ---- } ! void cNPC::talk( const UINT32 MsgID, const QString& params /*= 0*/, const QString& affix /*= 0*/, bool prepend /*= false*/, UI16 color /*= 0xFFFF*/, cUOSocket* socket /*= 0*/ ) { + if ( color == 0xFFFF ) + color = saycolor_; + if ( socket ) { ! if ( affix.isEmpty() ) ! socket->clilocMessage( MsgID, params, color, 3, this ); ! else ! socket->clilocMessageAffix( MsgID, params, affix, color, 3, this, false, prepend ); } else *************** *** 366,370 **** if( mSock->player() && ( mSock->player()->dist( this ) < 18 ) ) { ! mSock->clilocMessage( MsgID, params, color, 3, this ); } } --- 372,379 ---- if( mSock->player() && ( mSock->player()->dist( this ) < 18 ) ) { ! if ( affix.isEmpty() ) ! mSock->clilocMessage( MsgID, params, color, 3, this ); ! else ! mSock->clilocMessageAffix( MsgID, params, affix, color, 3, this, false, prepend ); } } Index: npc.h =================================================================== RCS file: /cvsroot/wpdev/wolfpack/npc.h,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** npc.h 30 Jan 2004 22:11:52 -0000 1.30 --- npc.h 31 Jan 2004 04:36:20 -0000 1.31 *************** *** 93,97 **** virtual void resend( bool clean = true, bool excludeself = false ); virtual void talk( const QString &message, UI16 color = 0xFFFF, UINT8 type = 0, bool autospam = false, cUOSocket* socket = NULL ); ! void talk( const UINT32 MsgID, const QString& params = 0, UI16 color = 0xFFFF, cUOSocket* socket = 0 ); virtual UINT8 notority( P_CHAR pChar = NULL ); virtual void kill(); --- 93,97 ---- virtual void resend( bool clean = true, bool excludeself = false ); virtual void talk( const QString &message, UI16 color = 0xFFFF, UINT8 type = 0, bool autospam = false, cUOSocket* socket = NULL ); ! void talk( const UINT32 MsgID, const QString& params = 0, const QString& affix = 0, bool prepend = false, UI16 color = 0xFFFF, cUOSocket* socket = 0 ); virtual UINT8 notority( P_CHAR pChar = NULL ); virtual void kill(); Index: targetrequests.h =================================================================== RCS file: /cvsroot/wpdev/wolfpack/targetrequests.h,v retrieving revision 1.51 retrieving revision 1.52 diff -C2 -d -r1.51 -r1.52 *** targetrequests.h 22 Jan 2004 22:33:14 -0000 1.51 --- targetrequests.h 31 Jan 2004 04:36:20 -0000 1.52 *************** *** 52,56 **** bool nodecay; public: ! cAddItemTarget( const QString &item, bool _nodecay = false ) : nodecay( _nodecay ), item_(item) {} bool responsed( cUOSocket *socket, cUORxTarget *target ); }; --- 52,56 ---- bool nodecay; public: ! cAddItemTarget( const QString &item, bool _nodecay = false ) : item_(item), nodecay( _nodecay ) {} bool responsed( cUOSocket *socket, cUORxTarget *target ); }; *************** *** 70,74 **** SERIAL senderserial_; public: ! cBuildMultiTarget( const QString &multisection, SERIAL senderserial, SERIAL deedserial ) { multisection_ = multisection; senderserial_ = senderserial; deedserial_ = deedserial; }; bool responsed( cUOSocket *socket, cUORxTarget *target ); }; --- 70,78 ---- SERIAL senderserial_; public: ! cBuildMultiTarget( const QString &multisection, SERIAL senderserial, SERIAL deedserial ) : ! multisection_(multisection), deedserial_(deedserial), senderserial_(senderserial) ! { ! ! } bool responsed( cUOSocket *socket, cUORxTarget *target ); }; |
|
From: <dar...@pr...> - 2004-01-31 04:34:00
|
Update of /cvsroot/wpdev/wolfpack In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19521 Modified Files: world.cpp Log Message: Bugfix Index: world.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/world.cpp,v retrieving revision 1.55 retrieving revision 1.56 diff -C2 -d -r1.55 -r1.56 *** world.cpp 29 Jan 2004 15:34:44 -0000 1.55 --- world.cpp 30 Jan 2004 01:59:21 -0000 1.56 *************** *** 801,808 **** cDBResult res = persistentBroker->query( QString( "SELECT value FROM settings WHERE option = '%1'" ).arg( persistentBroker->quoteString( name ) ) ); ! if( !res.isValid() ) ! throw persistentBroker->lastError(); ! ! if( !res.fetchrow() ) { res.free(); --- 801,805 ---- cDBResult res = persistentBroker->query( QString( "SELECT value FROM settings WHERE option = '%1'" ).arg( persistentBroker->quoteString( name ) ) ); ! if( !res.isValid() || !res.fetchrow() ) { res.free(); |
|
From: <as...@pr...> - 2004-01-31 04:29:20
|
Update of /cvsroot/wpdev/wolfpack In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2524 Modified Files: world.cpp srvparams.cpp wolfpack.cpp world.h Log Message: uoTime will now be saved into db. wolfpack database version added. Index: world.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/world.cpp,v retrieving revision 1.54 retrieving revision 1.55 diff -C2 -d -r1.54 -r1.55 *** world.cpp 25 Jan 2004 18:58:31 -0000 1.54 --- world.cpp 29 Jan 2004 15:34:44 -0000 1.55 *************** *** 78,81 **** --- 78,84 ---- #endif + // Don't forget to change the version number before changing tableInfo! + #define WP_DATABASE_VERSION "1" + // This is used for autocreating the tables struct { *************** *** 84,87 **** --- 87,96 ---- } tableInfo[] = { + { "settings", "CREATE TABLE settings ( \ + option varchar(255) NOT NULL default NULL, \ + value varchar(255) NOT NULL default NULL, \ + PRIMARY KEY (option) \ + );" }, + { "boats", "CREATE TABLE boats ( \ serial int(11) NOT NULL default '0', \ *************** *** 198,202 **** hidamage smallint(6) NOT NULL default '0',\ lodamage smallint(6) NOT NULL default '0',\ ! weight int(11) NOT NULL default '0',\ hp smallint(6) NOT NULL default '0',\ maxhp smallint(6) NOT NULL default '0',\ --- 207,211 ---- hidamage smallint(6) NOT NULL default '0',\ lodamage smallint(6) NOT NULL default '0',\ ! weight float(11) NOT NULL default '0',\ hp smallint(6) NOT NULL default '0',\ maxhp smallint(6) NOT NULL default '0',\ *************** *** 447,450 **** --- 456,465 ---- { persistentBroker->executeQuery( tableInfo[i].create ); + + // create default settings + if( !strcmp( tableInfo[i].name, "settings" ) ) + { + setOption( "db_version", WP_DATABASE_VERSION ); + } } *************** *** 460,466 **** cDBResult res = persistentBroker->query( QString( "SELECT COUNT(*) FROM uobjectmap WHERE type = '%1'" ).arg( type ) ); ! // Find out how many objects of this type are available if( !res.isValid() ) ! throw persistentBroker->lastError(); res.fetchrow(); --- 475,481 ---- cDBResult res = persistentBroker->query( QString( "SELECT COUNT(*) FROM uobjectmap WHERE type = '%1'" ).arg( type ) ); ! // Find out how many objects of this type are available if( !res.isValid() ) ! throw persistentBroker->lastError(); res.fetchrow(); *************** *** 655,658 **** --- 670,683 ---- } + // load server time from db + Console::instance()->PrepareProgress( "Setting Worldtime" ); + QString db_time; + QString default_time = SrvParams->getString( "General", "UO Time", "0", true ); + getOption( "worldtime", db_time, default_time ); + uoTime.setTime_t( db_time.toInt() ); + Console::instance()->ProgressDone(); + + Console::instance()->send("Worldtime is " + uoTime.toString() + ".\n" ); + persistentBroker->disconnect(); *************** *** 736,739 **** --- 761,767 ---- } + // Save the Current Time + setOption( "worldtime", QString::number( uoTime.toTime_t() ) ); + // Save the accounts Accounts::instance()->save(); *************** *** 750,753 **** --- 778,869 ---- } + /* + * Gets a value from the settings table and returns the value + */ + void cWorld::getOption( const QString name, QString &value, const QString fallback ) + { + if( !persistentBroker->openDriver( SrvParams->databaseDriver() ) ) + { + Console::instance()->log( LOG_ERROR, QString( "Unknown Worldsave Database Driver '%1', check your wolfpack.xml").arg( SrvParams->databaseDriver() ) ); + return; + } + + try + { + persistentBroker->connect( SrvParams->databaseHost(), SrvParams->databaseName(), SrvParams->databaseUsername(), SrvParams->databasePassword() ); + } + catch( QString &e ) + { + Console::instance()->log( LOG_ERROR, QString( "Couldn't open the database: %1\n" ).arg( e ) ); + return; + } + + cDBResult res = persistentBroker->query( QString( "SELECT value FROM settings WHERE option = '%1'" ).arg( persistentBroker->quoteString( name ) ) ); + + if( !res.isValid() ) + throw persistentBroker->lastError(); + + if( !res.fetchrow() ) + { + res.free(); + value = fallback; + return; + } + + value = res.getString( 0 ); + + res.free(); + + persistentBroker->disconnect(); + } + + /* + * Sets a value in the settings table. + */ + void cWorld::setOption( const QString name, const QString value ) + { + if( !persistentBroker->openDriver( SrvParams->databaseDriver() ) ) + { + Console::instance()->log( LOG_ERROR, QString( "Unknown Worldsave Database Driver '%1', check your wolfpack.xml").arg( SrvParams->databaseDriver() ) ); + return; + } + + try + { + persistentBroker->connect( SrvParams->databaseHost(), SrvParams->databaseName(), SrvParams->databaseUsername(), SrvParams->databasePassword() ); + } + catch( QString &e ) + { + Console::instance()->log( LOG_ERROR, QString( "Couldn't open the database: %1\n" ).arg( e ) ); + return; + } + + // check if the option already exists + cDBResult res = persistentBroker->query( QString( "SELECT value FROM settings WHERE option = '%1'" ).arg( persistentBroker->quoteString( name ) ) ); + + if( !res.isValid() ) + throw persistentBroker->lastError(); + + QString sql; + + if( !res.fetchrow() ) + { + sql = "INSERT INTO settings VALUES('%1','%2')"; + sql = sql.arg( persistentBroker->quoteString( name ) ).arg( persistentBroker->quoteString( value ) ); + + } + else + { + sql = "UPDATE settings SET value='%1' WHERE option='%2'"; + sql = sql.arg( persistentBroker->quoteString( value ) ).arg( persistentBroker->quoteString( name ) ); + } + + res.free(); + + persistentBroker->executeQuery( sql ); + + persistentBroker->disconnect(); + } + void cWorld::registerObject( cUObject *object ) { Index: srvparams.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/srvparams.cpp,v retrieving revision 1.93 retrieving revision 1.94 diff -C2 -d -r1.93 -r1.94 *** srvparams.cpp 28 Jan 2004 23:21:27 -0000 1.93 --- srvparams.cpp 29 Jan 2004 15:34:44 -0000 1.94 *************** *** 169,179 **** showNpcTitles_ = getNumber("General", "Show Npc Titles", 1, true); - // We're saving the elapsed seconds since server-start (INGAME SECONDS!) - // fromString( QString::number(FIRST_YEAR) + "-" + getString("General", "Initial Date/Time", "01-18T01:00:00", true), Qt::ISODate); - /* - NOTE: This SHOULD be saved in the worldsave instead - */ - uoTime.setTime_t( getNumber( "General", "UO Time", 0, true ) ); - saveInterval_ = getNumber("General", "Save Interval", 900, true); mulPath_ = QDir::convertSeparators( getString("General", "MulPath", "./muls/", true) ); --- 169,172 ---- Index: wolfpack.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/wolfpack.cpp,v retrieving revision 1.481 retrieving revision 1.482 diff -C2 -d -r1.481 -r1.482 *** wolfpack.cpp 25 Jan 2004 18:48:33 -0000 1.481 --- wolfpack.cpp 29 Jan 2004 15:34:44 -0000 1.482 *************** *** 494,497 **** --- 494,498 ---- uiCurrentTime = getNormalizedTime(); + // network startup Console::instance()->PrepareProgress( "Starting up Network" ); cNetwork::startup(); Index: world.h =================================================================== RCS file: /cvsroot/wpdev/wolfpack/world.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** world.h 5 Jan 2004 06:25:37 -0000 1.5 --- world.h 29 Jan 2004 15:34:45 -0000 1.6 *************** *** 37,40 **** --- 37,43 ---- #include "singleton.h" + // Library Includes + #include <qvaluevector.h> + class cCharIterator { *************** *** 84,87 **** --- 87,94 ---- void save(); + // For the "settings" table + void getOption( const QString name, QString &value, const QString fallback ); + void setOption( const QString name, const QString value ); + // Book-keeping functions void registerObject( cUObject *object ); |
|
From: <dar...@pr...> - 2004-01-31 04:10:49
|
Update of /cvsroot/wpdev/wolfpack/network In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7541/network Modified Files: uopacket.cpp Log Message: Linux compile fix for debug mode. Index: uopacket.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/network/uopacket.cpp,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** uopacket.cpp 22 Dec 2003 11:01:56 -0000 1.38 --- uopacket.cpp 29 Jan 2004 23:41:56 -0000 1.39 *************** *** 422,426 **** { qWarning( "Warning: cUOPacket::getAsciiString() called with params out of bounds" ); ! return QString(); //#better return empty ? } #endif --- 422,426 ---- { qWarning( "Warning: cUOPacket::getAsciiString() called with params out of bounds" ); ! return QCString(); //#better return empty ? } #endif |
|
From: <dar...@pr...> - 2004-01-31 03:13:18
|
Update of /cvsroot/wpdev/xmlscripts/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24778 Modified Files: key.py Log Message: Modified the tooltip. Index: key.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/key.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** key.py 30 Jan 2004 00:02:23 -0000 1.6 --- key.py 30 Jan 2004 00:05:13 -0000 1.7 *************** *** 154,158 **** # The user defined name if len(item.name) > 0: ! tooltip.add(1050045, " \t" + item.name + "\t ") # Add the lock id for gms --- 154,158 ---- # The user defined name if len(item.name) > 0: ! tooltip.add(1050045, " \t" + "Unlocks: " + item.name + "\t ") # Add the lock id for gms *************** *** 168,170 **** # We still should apply the default handling return 1 - --- 168,169 ---- |
|
From: <dar...@pr...> - 2004-01-31 01:48:32
|
Update of /cvsroot/wpdev/xmlscripts/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24630 Modified Files: book.py Log Message: Fix for books Index: book.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/book.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** book.py 28 Jan 2004 02:09:46 -0000 1.3 --- book.py 29 Jan 2004 22:37:52 -0000 1.4 *************** *** 103,107 **** return ! if len( content.strip() ) == 0: item.deltag('page%u' % page) return --- 103,107 ---- return ! if not content or len(content.strip()) == 0: item.deltag('page%u' % page) return |
|
From: <dar...@pr...> - 2004-01-31 01:45:07
|
Update of /cvsroot/wpdev/wolfpack In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19307 Modified Files: preferences.cpp Log Message: Possible fix for wolfpack.xml loading. Index: preferences.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/preferences.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** preferences.cpp 28 Jan 2004 23:21:26 -0000 1.5 --- preferences.cpp 29 Jan 2004 21:43:23 -0000 1.6 *************** *** 276,280 **** QDomNodeList options; for ( uint n = 0; n < nodes.count(); ++n ) { ! if ( nodes.item(n).isElement() ) { processGroup( nodes.item(n).toElement() ); } --- 276,280 ---- QDomNodeList options; for ( uint n = 0; n < nodes.count(); ++n ) { ! if ( nodes.item(n).isElement() && !nodes.item(n).isComment() ) { processGroup( nodes.item(n).toElement() ); } *************** *** 291,296 **** for (unsigned n=0; n<options.count(); ++n) { if (options.item(n).isElement()) { ! elem = options.item(n).toElement(); ! setString(currentgroup_, elem.attribute("key"), elem.attribute("value")); } } --- 291,298 ---- for (unsigned n=0; n<options.count(); ++n) { if (options.item(n).isElement()) { ! if (!options.item(n).isComment()) { ! elem = options.item(n).toElement(); ! setString(currentgroup_, elem.attribute("key"), elem.attribute("value")); ! } } } |
|
From: <as...@pr...> - 2004-01-31 01:40:13
|
Update of /cvsroot/wpdev/wolfpack/network In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25713/network Modified Files: uosocket.cpp Log Message: added weight support to obsolete "stones". Index: uosocket.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/network/uosocket.cpp,v retrieving revision 1.307 retrieving revision 1.308 diff -C2 -d -r1.307 -r1.308 *** uosocket.cpp 30 Jan 2004 22:51:32 -0000 1.307 --- uosocket.cpp 31 Jan 2004 01:38:29 -0000 1.308 *************** *** 2142,2146 **** sendStats.setDexterity( pChar->dexterity() ); sendStats.setIntelligence( pChar->intelligence() ); ! sendStats.setWeight( pChar->weight() * 10 ); sendStats.setGold( _player->CountBankGold() + pChar->CountGold() ); sendStats.setArmor( pChar->calcDefense( ALLBODYPARTS ) ); --- 2142,2146 ---- sendStats.setDexterity( pChar->dexterity() ); sendStats.setIntelligence( pChar->intelligence() ); ! sendStats.setWeight( pChar->weight() ); sendStats.setGold( _player->CountBankGold() + pChar->CountGold() ); sendStats.setArmor( pChar->calcDefense( ALLBODYPARTS ) ); |
Update of /cvsroot/wpdev/wolfpack In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25713 Modified Files: basechar.cpp basechar.h dragdrop.cpp items.cpp items.h skills.cpp targetrequests.cpp tilecache.h uobject.h walking.cpp Log Message: added weight support to obsolete "stones". Index: basechar.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/basechar.cpp,v retrieving revision 1.57 retrieving revision 1.58 diff -C2 -d -r1.57 -r1.58 *** basechar.cpp 30 Jan 2004 23:28:34 -0000 1.57 --- basechar.cpp 31 Jan 2004 01:38:29 -0000 1.58 *************** *** 1373,1382 **** return 0; } ! else SET_INT_PROPERTY( "weight", weight_ ) ! else if( name == "stones" ) ! { ! weight_ = value.toInt() * 10; ! return 0; ! } else SET_INT_PROPERTY( "saycolor", saycolor_ ) else SET_INT_PROPERTY( "emotecolor", emoteColor_ ) --- 1373,1377 ---- return 0; } ! else SET_FLOAT_PROPERTY( "weight", weight_ ) else SET_INT_PROPERTY( "saycolor", saycolor_ ) else SET_INT_PROPERTY( "emotecolor", emoteColor_ ) *************** *** 1474,1478 **** else GET_PROPERTY( "meditating", isMeditating() ) else GET_PROPERTY( "weight", weight_ ) - else GET_PROPERTY( "stones", weight_ / 10 ) else GET_PROPERTY( "saycolor", saycolor_ ) else GET_PROPERTY( "emotecolor", emoteColor_ ) --- 1469,1472 ---- Index: basechar.h =================================================================== RCS file: /cvsroot/wpdev/wolfpack/basechar.h,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** basechar.h 29 Jan 2004 23:56:32 -0000 1.40 --- basechar.h 31 Jan 2004 01:38:29 -0000 1.41 *************** *** 48,51 **** --- 48,54 ---- #include "multis.h" + // include for ceilf() + #include <math.h> + class cMulti; class cUOTxTooltipList; *************** *** 226,230 **** SERIAL swingTarget() const; QString title() const; ! ushort weight() const; // bit flag getters bool isIncognito() const; --- 229,233 ---- SERIAL swingTarget() const; QString title() const; ! float weight() const; // bit flag getters bool isIncognito() const; *************** *** 306,310 **** void setSwingTarget(SERIAL data); void setTitle(const QString &data); ! void setWeight(ushort data); // bit flag setters void setIncognito(bool data); --- 309,313 ---- void setSwingTarget(SERIAL data); void setTitle(const QString &data); ! void setWeight(float data); // bit flag setters void setIncognito(bool data); *************** *** 391,395 **** // Weight of the char, including worn items. ! ushort weight_; // Base body armor value. --- 394,398 ---- // Weight of the char, including worn items. ! float weight_; // Base body armor value. *************** *** 1006,1017 **** } ! inline ushort cBaseChar::weight() const { ! return weight_; } ! inline void cBaseChar::setWeight(ushort data) { ! weight_ = data; changed_ = true; } --- 1009,1020 ---- } ! inline float cBaseChar::weight() const { ! return ( ceilf( weight_ * 100 ) / 100 ); } ! inline void cBaseChar::setWeight(float data) { ! weight_ = ceilf( data * 100 ) / 100; changed_ = true; } Index: dragdrop.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/dragdrop.cpp,v retrieving revision 1.211 retrieving revision 1.212 diff -C2 -d -r1.211 -r1.212 *** dragdrop.cpp 28 Jan 2004 02:12:20 -0000 1.211 --- dragdrop.cpp 31 Jan 2004 01:38:29 -0000 1.212 *************** *** 61,65 **** return; ! UINT32 weight = pChar->weight(); // Fetch the grab information --- 61,65 ---- return; ! float weight = pChar->weight(); // Fetch the grab information *************** *** 462,466 **** } ! UINT32 weight = pChar->weight(); // Item dropped on Ground --- 462,466 ---- } ! float weight = pChar->weight(); // Item dropped on Ground Index: items.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/items.cpp,v retrieving revision 1.368 retrieving revision 1.369 diff -C2 -d -r1.368 -r1.369 *** items.cpp 30 Jan 2004 23:28:35 -0000 1.368 --- items.cpp 31 Jan 2004 01:38:29 -0000 1.369 *************** *** 154,159 **** this->weight_ = src.weight_; this->base = src.base; - this->setTotalweight( amount_ * weight_ ); this->recreateEvents(); --- 154,159 ---- this->weight_ = src.weight_; this->base = src.base; + this->setTotalweight( ceilf( amount_ * weight_ * 100 ) / 100 ); this->recreateEvents(); *************** *** 462,466 **** addField("hidamage", hidamage_); addField("lodamage", lodamage_); ! addField("weight", weight_); addField("hp", hp_ ); addField("maxhp", maxhp_ ); --- 462,466 ---- addField("hidamage", hidamage_); addField("lodamage", lodamage_); ! addField("weight", ( ceilf( weight_ * 100 ) / 100 ) ); addField("hp", hp_ ); addField("maxhp", maxhp_ ); *************** *** 1095,1099 **** // <weight>10</weight> else if( TagName == "weight" ) ! this->setWeight( (UINT32)( Value.toFloat() * 10 ) ); // <durability>10</durabilty> --- 1095,1099 ---- // <weight>10</weight> else if( TagName == "weight" ) ! this->setWeight( Value.toFloat() ); // <durability>10</durabilty> *************** *** 1284,1290 **** { if( Value.contains(".") || Value.contains(",") ) ! setWeight( (INT32)ceil((float)weight() * Value.toFloat()) ); else ! setWeight( weight() + Value.toInt() ); } --- 1284,1290 ---- { if( Value.contains(".") || Value.contains(",") ) ! setWeight( ceilf( (float)weight() * Value.toFloat() * 100 ) / 100 ); else ! setWeight( (float)weight() + Value.toFloat() ); } *************** *** 1427,1436 **** if( type() == 1 || type() == 63 || type() == 65 || type() == 87 ) { ! UINT16 tWeight = totalweight_; if( weight_ == 255 ) tWeight -= 255; ! QString message = tr( "[%1 items, %2 stones]" ).arg( content_.size() ).arg( tWeight/10 ); socket->showSpeech( this, message, 0x3B2 ); --- 1427,1436 ---- if( type() == 1 || type() == 63 || type() == 65 || type() == 87 ) { ! float tWeight = totalweight_; if( weight_ == 255 ) tWeight -= 255; ! QString message = tr( "[%1 items, %2 stones]" ).arg( content_.size() ).arg( tWeight ); socket->showSpeech( this, message, 0x3B2 ); *************** *** 1610,1625 **** // Our weight has changed // Update the top-containers ! void cItem::setWeight( SI16 nValue ) { ! setTotalweight( totalweight_ - ( amount_ * weight_ ) ); changed( TOOLTIP ); flagChanged(); ! weight_ = nValue; ! setTotalweight( totalweight_ + ( amount_ * weight_ ) ); } // This subtracts the weight of the top-container // And then readds the new weight ! void cItem::setTotalweight( int data ) { //if( data < 0 ) --- 1610,1625 ---- // Our weight has changed // Update the top-containers ! void cItem::setWeight( float nValue ) { ! setTotalweight( ceilf( ( totalweight_ - ( amount_ * weight_ ) ) * 100 ) / 100 ); changed( TOOLTIP ); flagChanged(); ! weight_ = ceilf( nValue * 100 ) / 100; ! setTotalweight( ceilf( ( totalweight_ + ( amount_ * weight_ ) ) * 100 ) / 100 ); } // This subtracts the weight of the top-container // And then readds the new weight ! void cItem::setTotalweight( float data ) { //if( data < 0 ) *************** *** 1644,1648 **** changed( TOOLTIP ); flagChanged(); ! totalweight_ = data; // Completely ignore the container if the free flag is set --- 1644,1648 ---- changed( TOOLTIP ); flagChanged(); ! totalweight_ = ceilf( data * 100 ) / 100; // Completely ignore the container if the free flag is set *************** *** 1840,1844 **** hidamage_ = atoi( result[offset++] ); lodamage_ = atoi( result[offset++] ); ! weight_ = atoi( result[offset++] ); hp_ = atoi( result[offset++] ); maxhp_ = atoi( result[offset++] ); --- 1840,1844 ---- hidamage_ = atoi( result[offset++] ); lodamage_ = atoi( result[offset++] ); ! weight_ = (float)atof( result[offset++] ); hp_ = atoi( result[offset++] ); maxhp_ = atoi( result[offset++] ); *************** *** 1861,1865 **** // Their own weight should already be set. ! totalweight_ = amount_ * weight_; itemRegisterAfterLoading( this ); --- 1861,1865 ---- // Their own weight should already be set. ! totalweight_ = ceilf( amount_ * weight_ * 100 ) / 100; itemRegisterAfterLoading( this ); *************** *** 1996,2001 **** void cItem::setAmount( UI16 nValue ) { ! setTotalweight( totalweight_ + ( ( nValue - amount_ ) * weight_ ) ); ! amount_ = nValue; changed( TOOLTIP ); flagChanged(); --- 1996,2001 ---- void cItem::setAmount( UI16 nValue ) { ! setTotalweight( totalweight_ + ceilf( ( nValue - amount_ ) * weight_ * 100 ) / 100 ); ! amount_ = nValue; changed( TOOLTIP ); flagChanged(); *************** *** 2062,2066 **** int diff = val - amount_; ! setTotalweight( totalweight_ + diff * weight_ ); amount_ = val; return 0; --- 2062,2066 ---- int diff = val - amount_; ! setTotalweight( totalweight_ + ceilf( diff * weight_ * 100 ) / 100 ); amount_ = val; return 0; *************** *** 2073,2086 **** else SET_INT_PROPERTY( "lodamage", lodamage_ ) else SET_INT_PROPERTY( "hidamage", hidamage_ ) ! else if( name == "weight" ) ! { ! setWeight( value.toInt() ); ! return 0; ! } ! else if( name == "stones" ) ! { ! setWeight( value.toInt() * 10 ); ! return 0; ! } else SET_INT_PROPERTY( "health", hp_ ) else SET_INT_PROPERTY( "maxhealth", maxhp_ ) --- 2073,2077 ---- else SET_INT_PROPERTY( "lodamage", lodamage_ ) else SET_INT_PROPERTY( "hidamage", hidamage_ ) ! else SET_FLOAT_PROPERTY( "weight", weight_ ) else SET_INT_PROPERTY( "health", hp_ ) else SET_INT_PROPERTY( "maxhealth", maxhp_ ) *************** *** 2089,2093 **** else if( name == "totalweight" ) { ! setTotalweight( value.toInt() ); return 0; } --- 2080,2084 ---- else if( name == "totalweight" ) { ! setTotalweight( static_cast<QString>( value.toString() ).toFloat() ); return 0; } *************** *** 2233,2237 **** else GET_PROPERTY( "hidamage", hidamage_ ) else GET_PROPERTY( "weight", weight_ ) - else GET_PROPERTY( "stones", weight_ / 10 ) else GET_PROPERTY( "health", hp_ ) else GET_PROPERTY( "maxhealth", maxhp_ ) --- 2224,2227 ---- Index: items.h =================================================================== RCS file: /cvsroot/wpdev/wolfpack/items.h,v retrieving revision 1.182 retrieving revision 1.183 diff -C2 -d -r1.182 -r1.183 *** items.h 29 Jan 2004 23:56:33 -0000 1.182 --- items.h 31 Jan 2004 01:38:29 -0000 1.183 *************** *** 42,45 **** --- 42,46 ---- #include <qvaluevector.h> #include <qdict.h> + #include <math.h> // Forward Class declarations *************** *** 120,125 **** SI16 hidamage() const { return hidamage_; } // Maximum damage weapon inflicts bool wipe() const { return priv_&0x10; } // Should the item be wiped when affected by /WIPE ! SI16 weight() const { return weight_; } ! SI16 stones() const { return (SI16)( weight_ / 10 ); } // Weight transformed to UO Stones SI16 hp() const { return hp_; } // Number of hitpoints an item has SI16 maxhp() const { return maxhp_; } // Maximum number of hitpoints an item has --- 121,125 ---- SI16 hidamage() const { return hidamage_; } // Maximum damage weapon inflicts bool wipe() const { return priv_&0x10; } // Should the item be wiped when affected by /WIPE ! float weight() const { return ( ceilf( weight_ * 100 ) / 100 ); } SI16 hp() const { return hp_; } // Number of hitpoints an item has SI16 maxhp() const { return maxhp_; } // Maximum number of hitpoints an item has *************** *** 129,133 **** bool nodecay() const { return priv_&0x01; } // Is the item protected from decaying P_CHAR owner() const; ! int totalweight() const { return totalweight_; } cUObject* container() const { return container_; } int sellprice() const { return sellprice_; } // Price this item is being bought at by normal vendors --- 129,133 ---- bool nodecay() const { return priv_&0x01; } // Is the item protected from decaying P_CHAR owner() const; ! float totalweight() const { return ( ceilf( totalweight_ * 100 ) / 100 ); } cUObject* container() const { return container_; } int sellprice() const { return sellprice_; } // Price this item is being bought at by normal vendors *************** *** 160,164 **** void setWipe( bool nValue ) { ( nValue ) ? priv_ &= 0x10 : priv_ |= 0xEF; flagChanged();}; void setNoDecay( bool nValue ) { ( nValue ) ? priv_ |= 0x01 : priv_ &= ~0x01; flagChanged(); }; ! void setWeight( SI16 nValue ); void setHp( SI16 nValue ) { hp_ = nValue; flagChanged(); changed( TOOLTIP );}; void setMaxhp( SI16 nValue ) { maxhp_ = nValue; flagChanged(); changed( TOOLTIP );}; --- 160,164 ---- void setWipe( bool nValue ) { ( nValue ) ? priv_ &= 0x10 : priv_ |= 0xEF; flagChanged();}; void setNoDecay( bool nValue ) { ( nValue ) ? priv_ |= 0x01 : priv_ &= ~0x01; flagChanged(); }; ! void setWeight( float nValue ); void setHp( SI16 nValue ) { hp_ = nValue; flagChanged(); changed( TOOLTIP );}; void setMaxhp( SI16 nValue ) { maxhp_ = nValue; flagChanged(); changed( TOOLTIP );}; *************** *** 166,170 **** void setNewbie( bool nValue ) { ( nValue ) ? priv_ |= 0x02 : priv_ &= 0xFD; flagChanged(); changed( TOOLTIP );} void setOwner( P_CHAR nOwner ); ! void setTotalweight( int data ); void setSpawnRegion( const QString &data ) { spawnregion_ = data; flagChanged(); } --- 166,170 ---- void setNewbie( bool nValue ) { ( nValue ) ? priv_ |= 0x02 : priv_ &= 0xFD; flagChanged(); changed( TOOLTIP );} void setOwner( P_CHAR nOwner ); ! void setTotalweight( float data ); void setSpawnRegion( const QString &data ) { spawnregion_ = data; flagChanged(); } *************** *** 274,281 **** unsigned short hp_; // Amount of hitpoints this item has unsigned short maxhp_; // The maximum amount of hitpoints this item can have ! int totalweight_; // The weight of this item including all contained items ContainerContent content_; // The content of this item ! QString spawnregion_; // The name of the spawnregion this item was spawned into ! cUObject* container_; // The object this item is contained in unsigned char magic_; // Specifies in which manner this item can be moved. --- 274,281 ---- unsigned short hp_; // Amount of hitpoints this item has unsigned short maxhp_; // The maximum amount of hitpoints this item can have ! float totalweight_; // The weight of this item including all contained items ContainerContent content_; // The content of this item ! QString spawnregion_; // The name of the spawnregion this item was spawned into ! cUObject* container_; // The object this item is contained in unsigned char magic_; // Specifies in which manner this item can be moved. *************** *** 310,314 **** ushort type2_; SI16 speed_; ! SI16 weight_; uint def_; int sellprice_; --- 310,314 ---- ushort type2_; SI16 speed_; ! float weight_; uint def_; int sellprice_; Index: skills.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/skills.cpp,v retrieving revision 1.209 retrieving revision 1.210 diff -C2 -d -r1.209 -r1.210 *** skills.cpp 23 Sep 2003 12:40:18 -0000 1.209 --- skills.cpp 31 Jan 2004 01:38:29 -0000 1.210 *************** *** 388,392 **** } ! UINT16 maxWeight = QMIN( 1, pChar->skillValue( STEALING ) / 10 ); // We can steal max. 10 Stones when we are a GM // 1000 Skill == 100 Weight == 10 Stones --- 388,392 ---- } ! float maxWeight = (float)QMIN( 1, pChar->skillValue( STEALING ) ); // We can steal max. 10 Stones when we are a GM // 1000 Skill == 100 Weight == 10 Stones *************** *** 431,435 **** // The success of our Theft depends on the weight of the stolen item ! bool success = pChar->checkSkill( STEALING, 0, pToSteal->weight() * 10 ); bool caught = false; --- 431,435 ---- // The success of our Theft depends on the weight of the stolen item ! bool success = pChar->checkSkill( STEALING, 0, pToSteal->weight() ); bool caught = false; Index: targetrequests.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/targetrequests.cpp,v retrieving revision 1.82 retrieving revision 1.83 diff -C2 -d -r1.82 -r1.83 *** targetrequests.cpp 22 Jan 2004 20:39:18 -0000 1.82 --- targetrequests.cpp 31 Jan 2004 01:38:29 -0000 1.83 *************** *** 219,223 **** return true; } ! if( (pi->totalweight()/10) > cansteal ) // LB, bugfix, (no weight check) { socket->sysMessage( tr("That is too heavy.") ); --- 219,223 ---- return true; } ! if( (pi->totalweight()) > cansteal ) // LB, bugfix, (no weight check) { socket->sysMessage( tr("That is too heavy.") ); Index: tilecache.h =================================================================== RCS file: /cvsroot/wpdev/wolfpack/tilecache.h,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** tilecache.h 22 Jan 2004 04:48:12 -0000 1.14 --- tilecache.h 31 Jan 2004 01:38:29 -0000 1.15 *************** *** 51,55 **** char flag3; char flag4; ! UINT8 weight; char layer; short unknown1; --- 51,55 ---- char flag3; char flag4; ! float weight; char layer; short unknown1; Index: uobject.h =================================================================== RCS file: /cvsroot/wpdev/wolfpack/uobject.h,v retrieving revision 1.81 retrieving revision 1.82 diff -C2 -d -r1.81 -r1.82 *** uobject.h 30 Jan 2004 18:07:38 -0000 1.81 --- uobject.h 31 Jan 2004 01:38:29 -0000 1.82 *************** *** 247,250 **** --- 247,259 ---- } + #define SET_FLOAT_PROPERTY( id, setter ) if( name == id ) {\ + bool ok; \ + float data = static_cast<QString>( value.toString() ).toFloat( &ok ); \ + if( !ok ) \ + PROPERTY_ERROR( -2, "Float expected" ) \ + setter = data; \ + return 0; \ + } + #define SET_BOOL_PROPERTY( id, setter ) if( name == id ) {\ bool ok; \ Index: walking.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/walking.cpp,v retrieving revision 1.94 retrieving revision 1.95 diff -C2 -d -r1.94 -r1.95 *** walking.cpp 28 Jan 2004 20:33:01 -0000 1.94 --- walking.cpp 31 Jan 2004 01:38:29 -0000 1.95 *************** *** 1455,1463 **** // Weight percent ! UINT32 allowedWeight = ( pChar->strength() * WEIGHT_PER_STR ) + 30; ! UINT8 load = pChar->weight() / allowedWeight; if( running ) ! load *= 2; // 200% load is too much --- 1455,1463 ---- // Weight percent ! float allowedWeight = ( pChar->strength() * WEIGHT_PER_STR ) + 30; ! float load = ceilf( ( pChar->weight() / allowedWeight ) * 100) / 100; if( running ) ! load = ceilf( load * 200 ) / 100; // 200% load is too much *************** *** 1469,1473 **** // 20% overweight = ( 0.20 * 0.10 ) * (Weight carrying) = Stamina needed to move ! INT32 overweight = load - 100; // We're not overloaded so we dont need additional stamina --- 1469,1473 ---- // 20% overweight = ( 0.20 * 0.10 ) * (Weight carrying) = Stamina needed to move ! float overweight = load - 100; // We're not overloaded so we dont need additional stamina *************** *** 1475,1479 **** return true; ! INT32 requiredStamina = (INT32)((double)( (double)overweight * 0.10f ) * (double)pChar->weight()); if( pChar->stamina() < requiredStamina ) --- 1475,1479 ---- return true; ! float requiredStamina = ceilf( (float)((double)( (double)overweight * 0.10f ) * (double)pChar->weight()) * 100 ) / 100; if( pChar->stamina() < requiredStamina ) |
|
From: <as...@pr...> - 2004-01-31 01:35:01
|
Update of /cvsroot/wpdev/xmlscripts/scripts/wolfpack/commands In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21013/scripts/wolfpack/commands Modified Files: info.py cast.py Log Message: added weight support without "stone". Index: info.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/wolfpack/commands/info.py,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** info.py 22 Jan 2004 20:42:54 -0000 1.17 --- info.py 31 Jan 2004 01:33:18 -0000 1.18 *************** *** 10,13 **** --- 10,14 ---- import wolfpack import string + import math import wolfpack.gumps from wolfpack.gumps import * *************** *** 101,105 **** gump.addText( 50, 140, "ID: "+hex( model ), 0x834 ) gump.addText( 50, 160, "Position: "+str( pos.x )+","+str( pos.y )+","+str( pos.z ), 0x834 ) ! gump.addText( 50, 180, "Weight: "+str( tile['weight'] ), 0x834 ) gump.addText( 50, 200, "Height: "+str( tile['height'] ), 0x834 ) --- 102,106 ---- gump.addText( 50, 140, "ID: "+hex( model ), 0x834 ) gump.addText( 50, 160, "Position: "+str( pos.x )+","+str( pos.y )+","+str( pos.z ), 0x834 ) ! gump.addText( 50, 180, "Weight: "+str( math.ceil( tile['weight'] * 100 ) / 100 ), 0x834 ) gump.addText( 50, 200, "Height: "+str( tile['height'] ), 0x834 ) *************** *** 569,573 **** gump.addInputField( 200, 240, 200, 16, 0x834, 7, str( item.amount ) ) gump.addText( 50, 260, "Weight:", 0x834 ) ! gump.addInputField( 200, 260, 200, 16, 0x834, 8, str( item.weight ) ) gump.addText( 50, 280, "Layer:", 0x834 ) gump.addInputField( 200, 280, 200, 16, 0x834, 9, str( item.layer ) ) --- 570,574 ---- gump.addInputField( 200, 240, 200, 16, 0x834, 7, str( item.amount ) ) gump.addText( 50, 260, "Weight:", 0x834 ) ! gump.addInputField( 200, 260, 200, 16, 0x834, 8, str( math.ceil( item.weight * 100 ) / 100 ) ) gump.addText( 50, 280, "Layer:", 0x834 ) gump.addInputField( 200, 280, 200, 16, 0x834, 9, str( item.layer ) ) *************** *** 701,705 **** item.amount = int( hex2dec( textentries[ key ] ) ) elif key == 8: ! item.weight = int( hex2dec( textentries[ key ] ) ) elif key == 9: item.layer = int( hex2dec( textentries[ key ] ) ) --- 702,706 ---- item.amount = int( hex2dec( textentries[ key ] ) ) elif key == 8: ! item.weight = math.ceil( float( textentries[ key ] ) * 100 ) / 100 elif key == 9: item.layer = int( hex2dec( textentries[ key ] ) ) Index: cast.py =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/scripts/wolfpack/commands/cast.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** cast.py 22 Jan 2004 20:41:23 -0000 1.2 --- cast.py 31 Jan 2004 01:33:18 -0000 1.3 *************** *** 16,19 **** --- 16,20 ---- except: socket.sysmessage( "Usage: cast <spell-id>" ) + castSpell( socket.player, args, 1 ) |
Update of /cvsroot/wpdev/wolfpack In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25079 Modified Files: console_win.cpp res.rc resource.h wolfpack.vcproj world.cpp Added Files: icon_green.ico icon_red.ico Log Message: Eyecandy for the Windows version. --- NEW FILE: icon_green.ico --- (This appears to be a binary file; contents omitted.) --- NEW FILE: icon_red.ico --- (This appears to be a binary file; contents omitted.) Index: console_win.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/console_win.cpp,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** console_win.cpp 21 Jan 2004 22:14:07 -0000 1.23 --- console_win.cpp 30 Jan 2004 03:21:39 -0000 1.24 *************** *** 61,64 **** --- 61,65 ---- HMENU hmMainMenu; + HICON iconRed = 0, iconGreen = 0; HBITMAP hLogo = 0; HWND lblUptime = 0, bmpLogo; *************** *** 69,72 **** --- 70,74 ---- HINSTANCE appInstance = 0; // Application Instance HFONT font = 0; // The font we'll use + HFONT arialFont = 0; // ARIAL unsigned int inputHeight = 0; // For measuring the height of the input field unsigned int logLimit = 0; // How many characters fit into the log window *************** *** 205,213 **** dc = (HDC)wparam; ! SelectObject( dc, GetStockObject(ANSI_VAR_FONT) ); SetTextColor( dc, RGB( 0xAF, 0xAF, 0xAF ) ); SetBkMode( dc, TRANSPARENT ); ! SelectObject( dc, GetStockObject( SYSTEM_FONT ) ); return (LRESULT)hbBackground; } --- 207,215 ---- dc = (HDC)wparam; ! //SelectObject( dc, GetStockObject(ANSI_VAR_FONT) ); SetTextColor( dc, RGB( 0xAF, 0xAF, 0xAF ) ); SetBkMode( dc, TRANSPARENT ); ! //SelectObject( dc, GetStockObject( SYSTEM_FONT ) ); return (LRESULT)hbBackground; } *************** *** 234,238 **** logLimit = SendMessage( logWindow, EM_GETLIMITTEXT, 0, 0 ); ! // Set up the fonts we need ZeroMemory( &lfont, sizeof( LOGFONT ) ); qstrcpy( lfont.lfFaceName, "Fixedsys" ); --- 236,245 ---- logLimit = SendMessage( logWindow, EM_GETLIMITTEXT, 0, 0 ); ! // Set up the fonts we need ! ZeroMemory(&lfont, sizeof(LOGFONT)); ! qstrcpy(lfont.lfFaceName, "Arial"); ! lfont.lfQuality = ANTIALIASED_QUALITY; ! arialFont = CreateFontIndirect( &lfont ); ! ZeroMemory( &lfont, sizeof( LOGFONT ) ); qstrcpy( lfont.lfFaceName, "Fixedsys" ); *************** *** 267,270 **** --- 274,279 ---- lblUptime = CreateWindow( "STATIC", 0, WS_CHILD|WS_VISIBLE, 400, 15, 250, 25, hwnd, 0, appInstance, 0 ); + SendMessage( lblUptime, WM_SETFONT, (WPARAM)arialFont, 0 ); + // Set up our timer to refresh the nice Uptime Counter uptimeTimer = SetTimer( NULL, 0, 500, 0 ); *************** *** 354,357 **** --- 363,368 ---- DeleteObject( hbSeparator ); DeleteObject( hbBackground ); + DeleteObject( iconRed ); + DeleteObject( iconGreen ); keeprun = 0; PostQuitMessage( 0 ); *************** *** 456,463 **** hbSeparator = CreateSolidBrush( RGB( 0xAF, 0xAF, 0xAF ) ); hbBackground = CreateSolidBrush( RGB( 0, 64, 38 ) ); // Create the WindowClass ! WNDCLASS wpClass; ! ZeroMemory( &wpClass, sizeof( WNDCLASS ) ); wpClass.hInstance = hInstance; wpClass.lpfnWndProc = wpWindowProc; --- 467,477 ---- hbSeparator = CreateSolidBrush( RGB( 0xAF, 0xAF, 0xAF ) ); hbBackground = CreateSolidBrush( RGB( 0, 64, 38 ) ); + iconGreen = (HICON)LoadImage(appInstance, MAKEINTRESOURCE(IDI_ICONGREEN), IMAGE_ICON, 16, 16, 0); + iconRed = (HICON)LoadImage(appInstance, MAKEINTRESOURCE(IDI_ICONRED), IMAGE_ICON, 16, 16, 0); // Create the WindowClass ! WNDCLASSEX wpClass; ! ZeroMemory( &wpClass, sizeof( WNDCLASSEX ) ); ! wpClass.cbSize = sizeof(WNDCLASSEX); wpClass.hInstance = hInstance; wpClass.lpfnWndProc = wpWindowProc; *************** *** 466,472 **** wpClass.hbrBackground = hbBackground; wpClass.lpszClassName = WOLFPACK_CLASS; wpClass.style = CS_DBLCLKS | CS_VREDRAW | CS_HREDRAW; ! if (!RegisterClass(&wpClass)) { MessageBox(0, "Couldn't register Window Class.", "Window Class", MB_OK|MB_ICONERROR); --- 480,487 ---- wpClass.hbrBackground = hbBackground; wpClass.lpszClassName = WOLFPACK_CLASS; + wpClass.hIconSm = iconRed; wpClass.style = CS_DBLCLKS | CS_VREDRAW | CS_HREDRAW; ! if (!RegisterClassEx(&wpClass)) { MessageBox(0, "Couldn't register Window Class.", "Window Class", MB_OK|MB_ICONERROR); *************** *** 476,480 **** // Create the Window itself hmMainMenu = LoadMenu( appInstance, MAKEINTRESOURCE( IDR_MAINMENU ) ); - mainWindow = CreateWindow( WOLFPACK_CLASS, "Wolfpack", WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, 640, 480, NULL, hmMainMenu, hInstance, NULL ); --- 491,494 ---- *************** *** 520,523 **** --- 534,550 ---- sprintf( message, "Uptime: %u:%02u:%02u:%02u", days, hours, minutes, seconds ); SetWindowText( lblUptime, message ); + + // Update the icon + static unsigned int lastState = 0xFFFFFFFF; + + if (lastState != serverState) { + if (serverState == RUNNING) { + SendMessage(mainWindow, WM_SETICON, ICON_SMALL, (WPARAM)iconGreen); + } else { + SendMessage(mainWindow, WM_SETICON, ICON_SMALL, (WPARAM)iconRed); + } + } + + lastState = serverState; } Index: res.rc =================================================================== RCS file: /cvsroot/wpdev/wolfpack/res.rc,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** res.rc 13 Oct 2003 00:11:47 -0000 1.19 --- res.rc 30 Jan 2004 03:21:39 -0000 1.20 *************** *** 1,3 **** ! //Microsoft Developer Studio generated resource script. // #include "resource.h" --- 1,3 ---- ! // Microsoft Visual C++ generated resource script. // #include "resource.h" *************** *** 8,12 **** // Generated from the TEXTINCLUDE 2 resource. // ! ///////////////////////////////////////////////////////////////////////////// --- 8,12 ---- // Generated from the TEXTINCLUDE 2 resource. // ! #include "afxres.h" ///////////////////////////////////////////////////////////////////////////// *************** *** 14,20 **** ///////////////////////////////////////////////////////////////////////////// ! // Deutsch (Deutschland) resources #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_DEU) ///////////////////////////////////////////////////////////////////////////// --- 14,24 ---- ///////////////////////////////////////////////////////////////////////////// ! // German (Germany) resources #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_DEU) + #ifdef _WIN32 + LANGUAGE LANG_GERMAN, SUBLANG_GERMAN + #pragma code_page(1252) + #endif //_WIN32 ///////////////////////////////////////////////////////////////////////////// *************** *** 25,36 **** // Icon with lowest ID value placed first to ensure application icon // remains consistent on all systems. ! IDI_ICON1 ICON DISCARDABLE "icon2.ico" ! ! ///////////////////////////////////////////////////////////////////////////// ! // ! // Bitmap ! // ! ! IDB_LOGO BITMAP DISCARDABLE "logo.bmp" ///////////////////////////////////////////////////////////////////////////// --- 29,35 ---- // Icon with lowest ID value placed first to ensure application icon // remains consistent on all systems. ! IDI_ICON1 ICON "icon2.ico" ! IDI_ICONGREEN ICON "icon_green.ico" ! IDI_ICONRED ICON "icon_red.ico" ///////////////////////////////////////////////////////////////////////////// *************** *** 39,43 **** // ! IDR_MAINMENU MENU DISCARDABLE BEGIN POPUP "&File" --- 38,42 ---- // ! IDR_MAINMENU MENU BEGIN POPUP "&File" *************** *** 60,64 **** - #ifndef _MAC ///////////////////////////////////////////////////////////////////////////// // --- 59,62 ---- *************** *** 66,70 **** // ! VS_VERSION_INFO VERSIONINFO FILEVERSION 12,9,4,0 PRODUCTVERSION 13,0,0,0 --- 64,68 ---- // ! 1 VERSIONINFO FILEVERSION 12,9,4,0 PRODUCTVERSION 13,0,0,0 *************** *** 83,98 **** BLOCK "040904b0" BEGIN ! VALUE "Comments", "http://www.wpdev.org/\0" ! VALUE "CompanyName", "Wolfpack Development Team\0" ! VALUE "FileDescription", "Ultima Online Server Emulator\0" ! VALUE "FileVersion", "12, 9, 4, 0\0" ! VALUE "InternalName", "\0" ! VALUE "LegalCopyright", "© 2002-2003 Wolfpack Dev. Team\0" ! VALUE "LegalTrademarks", "\0" ! VALUE "OriginalFilename", "wolfpack.exe\0" ! VALUE "PrivateBuild", "\0" ! VALUE "ProductName", "Wolfpack Emu\0" ! VALUE "ProductVersion", "13, 0, 0, 0\0" ! VALUE "SpecialBuild", "\0" END END --- 81,92 ---- BLOCK "040904b0" BEGIN ! VALUE "Comments", "http://www.wpdev.org/" ! VALUE "CompanyName", "Wolfpack Development Team" ! VALUE "FileDescription", "Ultima Online Server Emulator" ! VALUE "FileVersion", "12, 9, 4, 0" ! VALUE "LegalCopyright", "© 2002-2003 Wolfpack Dev. Team" ! VALUE "OriginalFilename", "wolfpack.exe" ! VALUE "ProductName", "Wolfpack Emu" ! VALUE "ProductVersion", "13, 0, 0, 0" END END *************** *** 103,108 **** END - #endif // !_MAC - #ifdef APSTUDIO_INVOKED --- 97,100 ---- *************** *** 112,127 **** // ! 1 TEXTINCLUDE DISCARDABLE BEGIN "resource.h\0" END ! 2 TEXTINCLUDE DISCARDABLE BEGIN ! "\r\n" "\0" END ! 3 TEXTINCLUDE DISCARDABLE BEGIN "\r\n" --- 104,119 ---- // ! 1 TEXTINCLUDE BEGIN "resource.h\0" END ! 2 TEXTINCLUDE BEGIN ! "#include ""afxres.h""\r\n" "\0" END ! 3 TEXTINCLUDE BEGIN "\r\n" *************** *** 131,135 **** #endif // APSTUDIO_INVOKED ! #endif // Deutsch (Deutschland) resources ///////////////////////////////////////////////////////////////////////////// --- 123,134 ---- #endif // APSTUDIO_INVOKED ! ! ///////////////////////////////////////////////////////////////////////////// ! // ! // Bitmap ! // ! ! IDB_LOGO BITMAP "logo.bmp" ! #endif // German (Germany) resources ///////////////////////////////////////////////////////////////////////////// Index: resource.h =================================================================== RCS file: /cvsroot/wpdev/wolfpack/resource.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** resource.h 13 Oct 2003 00:11:47 -0000 1.11 --- resource.h 30 Jan 2004 03:21:39 -0000 1.12 *************** *** 1,9 **** //{{NO_DEPENDENCIES}} ! // Microsoft Developer Studio generated include file. // Used by res.rc // #define IDI_ICON1 101 - #define IDB_LOGO 102 #define IDR_MAINMENU 102 #define IDC_EXIT 40001 #define ID_RELOAD_ACCOUNTS 40002 --- 1,12 ---- //{{NO_DEPENDENCIES}} ! // Microsoft Visual C++ generated include file. // Used by res.rc // #define IDI_ICON1 101 #define IDR_MAINMENU 102 + #define IDB_LOGO 102 + #define IDI_ICONGREEN 105 + #define IDI_ICON3 106 + #define IDI_ICONRED 106 #define IDC_EXIT 40001 #define ID_RELOAD_ACCOUNTS 40002 *************** *** 18,22 **** #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS ! #define _APS_NEXT_RESOURCE_VALUE 105 #define _APS_NEXT_COMMAND_VALUE 40009 #define _APS_NEXT_CONTROL_VALUE 1000 --- 21,26 ---- #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS ! #define _APS_NO_MFC 1 ! #define _APS_NEXT_RESOURCE_VALUE 107 #define _APS_NEXT_COMMAND_VALUE 40009 #define _APS_NEXT_CONTROL_VALUE 1000 Index: wolfpack.vcproj =================================================================== RCS file: /cvsroot/wpdev/wolfpack/wolfpack.vcproj,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** wolfpack.vcproj 26 Jan 2004 03:48:40 -0000 1.8 --- wolfpack.vcproj 30 Jan 2004 03:21:39 -0000 1.9 *************** *** 533,536 **** --- 533,548 ---- UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"> <File + RelativePath=".\icon2.ico"> + </File> + <File + RelativePath=".\icon_green.ico"> + </File> + <File + RelativePath=".\icon_red.ico"> + </File> + <File + RelativePath=".\logo.bmp"> + </File> + <File RelativePath=".\res.rc"> </File> Index: world.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/world.cpp,v retrieving revision 1.56 retrieving revision 1.57 diff -C2 -d -r1.56 -r1.57 *** world.cpp 30 Jan 2004 01:59:21 -0000 1.56 --- world.cpp 30 Jan 2004 03:21:39 -0000 1.57 *************** *** 677,682 **** uoTime.setTime_t( db_time.toInt() ); Console::instance()->ProgressDone(); ! ! Console::instance()->send("Worldtime is " + uoTime.toString() + ".\n" ); persistentBroker->disconnect(); --- 677,682 ---- uoTime.setTime_t( db_time.toInt() ); Console::instance()->ProgressDone(); ! ! Console::instance()->send(QString("Worldtime is %1 on %3. %4 in year %5").arg(uoTime.time().toString()).arg(uoTime.date().day()).arg(QDate::monthName(uoTime.date().month())).arg(uoTime.date().year() - 1970) + ".\n" ); persistentBroker->disconnect(); |
|
From: <as...@pr...> - 2004-01-30 23:53:54
|
Update of /cvsroot/wpdev/wolfpack/python In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2524/python Modified Files: global.cpp Log Message: uoTime will now be saved into db. wolfpack database version added. Index: global.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/python/global.cpp,v retrieving revision 1.99 retrieving revision 1.100 diff -C2 -d -r1.99 -r1.100 *** global.cpp 22 Jan 2004 04:48:12 -0000 1.99 --- global.cpp 29 Jan 2004 15:34:42 -0000 1.100 *************** *** 721,725 **** PyDict_SetItemString( dict, "name", PyString_FromString( tile.name ) ); PyDict_SetItemString( dict, "height", PyInt_FromLong( tile.height ) ); ! PyDict_SetItemString( dict, "weight", PyInt_FromLong( tile.weight ) ); PyDict_SetItemString( dict, "layer", PyInt_FromLong( tile.layer ) ); PyDict_SetItemString( dict, "animation", PyInt_FromLong( tile.animation ) ); --- 721,725 ---- PyDict_SetItemString( dict, "name", PyString_FromString( tile.name ) ); PyDict_SetItemString( dict, "height", PyInt_FromLong( tile.height ) ); ! PyDict_SetItemString( dict, "weight", PyFloat_FromDouble( tile.weight ) ); PyDict_SetItemString( dict, "layer", PyInt_FromLong( tile.layer ) ); PyDict_SetItemString( dict, "animation", PyInt_FromLong( tile.animation ) ); *************** *** 1489,1492 **** --- 1489,1529 ---- }; + static PyObject* wpOptionsGetOption( PyObject* self, PyObject* args ) + { + Q_UNUSED(self); + + QString arg_key = getArgStr( 0 ); + QString arg_def = getArgStr( 1 ); + + QString value; + + World::instance()->getOption( arg_key, value, arg_def ); + + return PyString_FromString( value ); + } + + static PyObject* wpOptionsSetOption( PyObject* self, PyObject* args ) + { + Q_UNUSED(self); + + QString arg_key = getArgStr( 0 ); + QString arg_val = getArgStr( 1 ); + + World::instance()->setOption( arg_key, arg_val ); + + return PyTrue; + } + + /*! + wolfpack.options + config using the settings table + */ + static PyMethodDef wpOptions[] = + { + { "getOption", wpOptionsGetOption, METH_VARARGS, "Reads a string value from the database." }, + { "setOption", wpOptionsSetOption, METH_VARARGS, "Sets a string value and a key to the database." }, + { NULL, NULL, 0, NULL } // Terminator + }; + /*! *************** *** 1511,1513 **** --- 1548,1553 ---- PyObject *mSettings = Py_InitModule( "_wolfpack.settings", wpSettings ); PyObject_SetAttrString( wpNamespace, "settings", mSettings ); + + PyObject *mOptions = Py_InitModule( "_wolfpack.options", wpOptions ); + PyObject_SetAttrString( wpNamespace, "options", mOptions ); } |
Update of /cvsroot/wpdev/wolfpack In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8857 Modified Files: accounts.cpp basechar.cpp boats.cpp corpse.cpp customtags.cpp dbl_single_click.cpp gumps.cpp house.cpp items.cpp maps.cpp multis.cpp npc.cpp player.cpp pythonscript.cpp pythonscript.h resources.cpp srvparams.h uobject.cpp world.cpp Log Message: Fixes some compile warnings from gcc sqlite doesn't like the MySQL quotes. Index: accounts.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/accounts.cpp,v retrieving revision 1.80 retrieving revision 1.81 diff -C2 -d -r1.80 -r1.81 *** accounts.cpp 30 Jan 2004 22:11:51 -0000 1.80 --- accounts.cpp 30 Jan 2004 23:28:34 -0000 1.81 *************** *** 43,54 **** // DB AutoCreation ! const char *createSql = "CREATE TABLE `accounts` (\ ! `login` varchar(255) NOT NULL default '',\ ! `password` varchar(255) NOT NULL default '',\ ! `flags` int NOT NULL default '0',\ ! `acl` varchar(255) NOT NULL default 'player',\ ! `lastlogin` int NOT NULL default '',\ ! `blockuntil` int NOT NULL default '',\ ! PRIMARY KEY (`login`)\ );"; --- 43,54 ---- // DB AutoCreation ! const char *createSql = "CREATE TABLE accounts (\ ! login varchar(255) NOT NULL default '',\ ! password varchar(255) NOT NULL default '',\ ! flags int NOT NULL default '0',\ ! acl varchar(255) NOT NULL default 'player',\ ! lastlogin int NOT NULL default '',\ ! blockuntil int NOT NULL default '',\ ! PRIMARY KEY (login)\ );"; *************** *** 311,315 **** persistentBroker->executeQuery( "BEGIN;" ); ! persistentBroker->executeQuery( "DELETE FROM `accounts`;" ); iterator it = accounts.begin(); --- 311,315 ---- persistentBroker->executeQuery( "BEGIN;" ); ! persistentBroker->executeQuery( "DELETE FROM accounts;" ); iterator it = accounts.begin(); *************** *** 319,323 **** cAccount *account = it.data(); ! QString sql( "INSERT INTO `accounts` VALUES( '%1', '%2', %3, '%4', %5, %6 );" ); sql = sql.arg( account->login_.lower() ).arg( account->password_ ).arg( account->flags_ ).arg( account->aclName_ ).arg( !account->lastLogin_.isNull() ? account->lastLogin_.toTime_t() : 0 ).arg( !account->blockUntil.isNull() ? account->blockUntil.toTime_t() : 0 ); --- 319,323 ---- cAccount *account = it.data(); ! QString sql( "INSERT INTO accounts VALUES( '%1', '%2', %3, '%4', %5, %6 );" ); sql = sql.arg( account->login_.lower() ).arg( account->password_ ).arg( account->flags_ ).arg( account->aclName_ ).arg( !account->lastLogin_.isNull() ? account->lastLogin_.toTime_t() : 0 ).arg( !account->blockUntil.isNull() ? account->blockUntil.toTime_t() : 0 ); *************** *** 365,369 **** } ! cDBResult result = persistentBroker->query( "SELECT `login`,`password`,`flags`,`acl`,`lastlogin`,`blockuntil` FROM `accounts`;" ); // Clear Accounts HERE --- 365,369 ---- } ! cDBResult result = persistentBroker->query( "SELECT login,password,flags,acl,lastlogin,blockuntil FROM accounts;" ); // Clear Accounts HERE Index: basechar.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/basechar.cpp,v retrieving revision 1.56 retrieving revision 1.57 diff -C2 -d -r1.56 -r1.57 *** basechar.cpp 30 Jan 2004 22:51:32 -0000 1.56 --- basechar.cpp 30 Jan 2004 23:28:34 -0000 1.57 *************** *** 207,211 **** // Query the Skills for this character ! QString sql = "SELECT `skill`,`value`,`locktype`,`cap` FROM `skills` WHERE `serial` = '" + QString::number( serial() ) + "'"; cDBResult res = persistentBroker->query( sql ); --- 207,211 ---- // Query the Skills for this character ! QString sql = "SELECT skill,value,locktype,cap FROM skills WHERE serial = '" + QString::number( serial() ) + "'"; cDBResult res = persistentBroker->query( sql ); *************** *** 318,323 **** return false; // We didn't need to delete the object ! persistentBroker->addToDeleteQueue( "characters", QString( "`serial` = '%1'" ).arg( serial() ) ); ! persistentBroker->addToDeleteQueue( "skills", QString( "`serial` = '%1'" ).arg( serial() ) ); changed_ = true; return cUObject::del(); --- 318,323 ---- return false; // We didn't need to delete the object ! persistentBroker->addToDeleteQueue( "characters", QString( "serial = '%1'" ).arg( serial() ) ); ! persistentBroker->addToDeleteQueue( "skills", QString( "serial = '%1'" ).arg( serial() ) ); changed_ = true; return cUObject::del(); Index: boats.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/boats.cpp,v retrieving revision 1.118 retrieving revision 1.119 diff -C2 -d -r1.118 -r1.119 *** boats.cpp 30 Jan 2004 22:11:52 -0000 1.118 --- boats.cpp 30 Jan 2004 23:28:34 -0000 1.119 *************** *** 1201,1205 **** QStringList fields, tables, conditions; buildSqlString( fields, tables, conditions ); // Build our SQL string ! QString sqlString = QString( "SELECT %1 FROM `uobjectmap`,%2 WHERE uobjectmap.type = 'cBoat' AND %3" ).arg( fields.join( "," ) ).arg( tables.join( "," ) ).arg( conditions.join( " AND " ) ); UObjectFactory::instance()->registerType("cBoat", productCreator); UObjectFactory::instance()->registerSqlQuery( "cBoat", sqlString ); --- 1201,1205 ---- QStringList fields, tables, conditions; buildSqlString( fields, tables, conditions ); // Build our SQL string ! QString sqlString = QString( "SELECT %1 FROM uobjectmap,%2 WHERE uobjectmap.type = 'cBoat' AND %3" ).arg( fields.join( "," ) ).arg( tables.join( "," ) ).arg( conditions.join( " AND " ) ); UObjectFactory::instance()->registerType("cBoat", productCreator); UObjectFactory::instance()->registerSqlQuery( "cBoat", sqlString ); *************** *** 1229,1233 **** // Load the other tables ! QString sql = "SELECT `a`,`b`,`id` FROM `boats_itemids` WHERE `serial` = '" + QString::number( serial() ) + "'"; cDBResult res = persistentBroker->query( sql ); --- 1229,1233 ---- // Load the other tables ! QString sql = "SELECT a,b,id FROM boats_itemids WHERE serial = '" + QString::number( serial() ) + "'"; cDBResult res = persistentBroker->query( sql ); *************** *** 1253,1257 **** res.free(); ! sql = "SELECT `a`,`b`,`c`,`offset` FROM `boats_itemoffsets` WHERE `serial` = '" + QString::number( serial() ) + "'"; res = persistentBroker->query( sql ); --- 1253,1257 ---- res.free(); ! sql = "SELECT a,b,c,offset FROM boats_itemoffsets WHERE serial = '" + QString::number( serial() ) + "'"; res = persistentBroker->query( sql ); *************** *** 1347,1353 **** return false; ! persistentBroker->addToDeleteQueue( "boats", QString( "`serial` = '%1'" ).arg( serial() ) ); ! persistentBroker->addToDeleteQueue( "boats_itemoffsets", QString( "`serial` = '%1'" ).arg( serial() ) ); ! persistentBroker->addToDeleteQueue( "boats_itemids", QString( "`serial` = '%1'" ).arg( serial() ) ); return cMulti::del(); --- 1347,1353 ---- return false; ! persistentBroker->addToDeleteQueue( "boats", QString( "serial = '%1'" ).arg( serial() ) ); ! persistentBroker->addToDeleteQueue( "boats_itemoffsets", QString( "serial = '%1'" ).arg( serial() ) ); ! persistentBroker->addToDeleteQueue( "boats_itemids", QString( "serial = '%1'" ).arg( serial() ) ); return cMulti::del(); Index: corpse.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/corpse.cpp,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** corpse.cpp 30 Jan 2004 20:29:27 -0000 1.38 --- corpse.cpp 30 Jan 2004 23:28:34 -0000 1.39 *************** *** 56,60 **** QStringList fields, tables, conditions; buildSqlString( fields, tables, conditions ); // Build our SQL string ! QString sqlString = QString( "SELECT %1 FROM `uobjectmap`,%2 WHERE uobjectmap.type = 'cCorpse' AND %3" ).arg( fields.join( "," ) ).arg( tables.join( "," ) ).arg( conditions.join( " AND " ) ); UObjectFactory::instance()->registerType("cCorpse", productCreator); UObjectFactory::instance()->registerSqlQuery( "cCorpse", sqlString ); --- 56,60 ---- QStringList fields, tables, conditions; buildSqlString( fields, tables, conditions ); // Build our SQL string ! QString sqlString = QString( "SELECT %1 FROM uobjectmap,%2 WHERE uobjectmap.type = 'cCorpse' AND %3" ).arg( fields.join( "," ) ).arg( tables.join( "," ) ).arg( conditions.join( " AND " ) ); UObjectFactory::instance()->registerType("cCorpse", productCreator); UObjectFactory::instance()->registerSqlQuery( "cCorpse", sqlString ); *************** *** 79,83 **** // Get the corpse equipment ! QString sql = "SELECT `serial`,`layer`,`item` FROM `corpses_equipment` WHERE `serial` = '" + QString::number( serial() ) + "'"; cDBResult res = persistentBroker->query( sql ); --- 79,83 ---- // Get the corpse equipment ! QString sql = "SELECT serial,layer,item FROM corpses_equipment WHERE serial = '" + QString::number( serial() ) + "'"; cDBResult res = persistentBroker->query( sql ); *************** *** 111,119 **** if( isPersistent ) { ! persistentBroker->executeQuery( QString( "DELETE FROM `corpses_equipment` WHERE `serial` = '%1'" ).arg( serial() ) ); } for( map< UINT8, SERIAL >::iterator it = equipment_.begin(); it != equipment_.end(); ++it ) ! persistentBroker->executeQuery( QString( "REPLACE INTO `corpses_equipment` VALUES(%1,%2,%3)" ).arg( serial() ).arg( it->first ).arg( it->second ) ); cItem::save(); --- 111,119 ---- if( isPersistent ) { ! persistentBroker->executeQuery( QString( "DELETE FROM corpses_equipment WHERE serial = '%1'" ).arg( serial() ) ); } for( map< UINT8, SERIAL >::iterator it = equipment_.begin(); it != equipment_.end(); ++it ) ! persistentBroker->executeQuery( QString( "REPLACE INTO corpses_equipment VALUES(%1,%2,%3)" ).arg( serial() ).arg( it->first ).arg( it->second ) ); cItem::save(); *************** *** 125,130 **** return false; ! persistentBroker->addToDeleteQueue( "corpses", QString( "`serial` = '%1'" ).arg( serial() ) ); ! persistentBroker->addToDeleteQueue( "corpses_equipment", QString( "`serial` = '%1'" ).arg( serial() ) ); return cItem::del(); --- 125,130 ---- return false; ! persistentBroker->addToDeleteQueue( "corpses", QString( "serial = '%1'" ).arg( serial() ) ); ! persistentBroker->addToDeleteQueue( "corpses_equipment", QString( "serial = '%1'" ).arg( serial() ) ); return cItem::del(); Index: customtags.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/customtags.cpp,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** customtags.cpp 16 Dec 2003 14:33:48 -0000 1.36 --- customtags.cpp 30 Jan 2004 23:28:34 -0000 1.37 *************** *** 263,266 **** --- 263,267 ---- delete (Coord_cl*)value.ptr; break; + default: break; } Index: dbl_single_click.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/dbl_single_click.cpp,v retrieving revision 1.228 retrieving revision 1.229 diff -C2 -d -r1.228 -r1.229 *** dbl_single_click.cpp 30 Jan 2004 14:50:51 -0000 1.228 --- dbl_single_click.cpp 30 Jan 2004 23:28:34 -0000 1.229 *************** *** 72,77 **** void dbl_click_item(cUOSocket* socket, SERIAL target_serial) throw() { - unsigned int tempuint; - SERIAL serial = target_serial; P_PLAYER pc_currchar = socket->player(); --- 72,75 ---- Index: gumps.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/gumps.cpp,v retrieving revision 1.149 retrieving revision 1.150 diff -C2 -d -r1.149 -r1.150 *** gumps.cpp 22 Jan 2004 20:39:12 -0000 1.149 --- gumps.cpp 30 Jan 2004 23:28:34 -0000 1.150 *************** *** 49,55 **** #include <math.h> ! cGump::cGump() : noMove_( false ), noClose_( false ), ! noDispose_( false ), x_( 50 ), y_( 50 ), serial_( INVALID_SERIAL ), ! type_( 1 ) { } --- 49,55 ---- #include <math.h> ! cGump::cGump() : serial_( INVALID_SERIAL ), type_( 1 ), ! x_( 50 ), y_( 50 ), noMove_( false ), noClose_( false ), ! noDispose_( false ) { } *************** *** 435,439 **** for( cUOSocket *mSock = cNetwork::instance()->first(); mSock && !contains; mSock = cNetwork::instance()->next() ) { ! if( mSock = socket_ ) contains = true; } --- 435,439 ---- for( cUOSocket *mSock = cNetwork::instance()->first(); mSock && !contains; mSock = cNetwork::instance()->next() ) { ! if( mSock == socket_ ) contains = true; } Index: house.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/house.cpp,v retrieving revision 1.120 retrieving revision 1.121 diff -C2 -d -r1.120 -r1.121 *** house.cpp 30 Jan 2004 20:29:27 -0000 1.120 --- house.cpp 30 Jan 2004 23:28:35 -0000 1.121 *************** *** 128,136 **** const UI32 multiid = this->id() - 0x4000; - int j; MultiDefinition* def = MultiCache::instance()->getMulti( multiid ); if ( !def ) return false; QValueVector<multiItem_st> multi = def->getEntries(); SI08 mapz = 0; --- 128,136 ---- const UI32 multiid = this->id() - 0x4000; MultiDefinition* def = MultiCache::instance()->getMulti( multiid ); if ( !def ) return false; + uint j; QValueVector<multiItem_st> multi = def->getEntries(); SI08 mapz = 0; Index: items.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/items.cpp,v retrieving revision 1.367 retrieving revision 1.368 diff -C2 -d -r1.367 -r1.368 *** items.cpp 30 Jan 2004 20:29:28 -0000 1.367 --- items.cpp 30 Jan 2004 23:28:35 -0000 1.368 *************** *** 66,72 **** using namespace std; - #undef DBGFILE - #define DBGFILE "items.cpp" - /** * Loads item definitions and transforms them into cItemBase instances. --- 66,69 ---- *************** *** 492,496 **** return false; // We didn't need to delete the object ! persistentBroker->addToDeleteQueue( "items", QString( "`serial` = '%1'" ).arg( serial() ) ); flagChanged(); return cUObject::del(); --- 489,493 ---- return false; // We didn't need to delete the object ! persistentBroker->addToDeleteQueue( "items", QString( "serial = '%1'" ).arg( serial() ) ); flagChanged(); return cUObject::del(); *************** *** 1349,1354 **** if( element->name() == "item" ) { - P_ITEM pItem = 0; - if( element->hasAttribute( "id" ) ) { --- 1346,1349 ---- *************** *** 1772,1776 **** QPtrListIterator< cItem > pit( sublist ); P_ITEM pi; ! while( pi = pit.current() ) { itemlist.append( pi ); --- 1767,1771 ---- QPtrListIterator< cItem > pit( sublist ); P_ITEM pi; ! while( ( pi = pit.current() ) ) { itemlist.append( pi ); *************** *** 1806,1810 **** QStringList fields, tables, conditions; buildSqlString( fields, tables, conditions ); // Build our SQL string ! QString sqlString = QString( "SELECT %1 FROM `uobjectmap`,%2 WHERE uobjectmap.type = 'cItem' AND %3" ).arg( fields.join( "," ) ).arg( tables.join( "," ) ).arg( conditions.join( " AND " ) ); UObjectFactory::instance()->registerType("cItem", productCreator); UObjectFactory::instance()->registerSqlQuery( "cItem", sqlString ); --- 1801,1805 ---- QStringList fields, tables, conditions; buildSqlString( fields, tables, conditions ); // Build our SQL string ! QString sqlString = QString( "SELECT %1 FROM uobjectmap,%2 WHERE uobjectmap.type = 'cItem' AND %3" ).arg( fields.join( "," ) ).arg( tables.join( "," ) ).arg( conditions.join( " AND " ) ); UObjectFactory::instance()->registerType("cItem", productCreator); UObjectFactory::instance()->registerSqlQuery( "cItem", sqlString ); Index: maps.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/maps.cpp,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** maps.cpp 22 Jan 2004 04:48:12 -0000 1.25 --- maps.cpp 30 Jan 2004 23:28:42 -0000 1.26 *************** *** 373,377 **** { signed char top = ILLEGAL_Z; - unsigned long loopexit = 0; StaticsIterator msi = this->staticsIterator(pos); --- 373,376 ---- Index: multis.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/multis.cpp,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** multis.cpp 30 Jan 2004 20:29:30 -0000 1.37 --- multis.cpp 30 Jan 2004 23:28:42 -0000 1.38 *************** *** 77,81 **** // Load from two additional tables here ! QString sql = "SELECT `serial`,`ban` FROM `multis_bans` WHERE `serial` = '" + QString::number( serial() ) + "'"; cDBResult res = persistentBroker->query( sql ); --- 77,81 ---- // Load from two additional tables here ! QString sql = "SELECT serial,ban FROM multis_bans WHERE serial = '" + QString::number( serial() ) + "'"; cDBResult res = persistentBroker->query( sql ); *************** *** 93,97 **** res.free(); ! sql = "SELECT `serial`,`friend` FROM `multis_friends` WHERE `serial` = '" + QString::number( serial() ) + "'"; res = persistentBroker->query( sql ); --- 93,97 ---- res.free(); ! sql = "SELECT serial,friend FROM multis_friends WHERE serial = '" + QString::number( serial() ) + "'"; res = persistentBroker->query( sql ); *************** *** 125,130 **** if( isPersistent ) { ! persistentBroker->executeQuery( QString( "DELETE FROM `multis_bans` WHERE `serial` = '%1'" ).arg( serial() ) ); ! persistentBroker->executeQuery( QString( "DELETE FROM `multis_friends` WHERE `serial` = '%1'" ).arg( serial() ) ); } --- 125,130 ---- if( isPersistent ) { ! persistentBroker->executeQuery( QString( "DELETE FROM multis_bans WHERE serial = '%1'" ).arg( serial() ) ); ! persistentBroker->executeQuery( QString( "DELETE FROM multis_friends WHERE serial = '%1'" ).arg( serial() ) ); } *************** *** 132,139 **** INT32 i; for ( i = 0; i < bans_.size(); ++i ) ! persistentBroker->executeQuery( QString( "REPLACE INTO `multis_bans` VALUES(%1,%2)" ).arg( serial() ).arg( bans_[i] ) ); for ( i = 0; i < friends_.size(); ++i ) ! persistentBroker->executeQuery( QString( "REPLACE INTO `multis_friends` VALUES(%1,%2)" ).arg( serial() ).arg( friends_[i] ) ); cItem::save(); --- 132,139 ---- INT32 i; for ( i = 0; i < bans_.size(); ++i ) ! persistentBroker->executeQuery( QString( "REPLACE INTO multis_bans VALUES(%1,%2)" ).arg( serial() ).arg( bans_[i] ) ); for ( i = 0; i < friends_.size(); ++i ) ! persistentBroker->executeQuery( QString( "REPLACE INTO multis_friends VALUES(%1,%2)" ).arg( serial() ).arg( friends_[i] ) ); cItem::save(); *************** *** 145,151 **** return false; ! persistentBroker->addToDeleteQueue( "multis", QString( "`serial` = '%1'" ).arg( serial() ) ); ! persistentBroker->addToDeleteQueue( "multis_bans", QString( "`serial` = '%1'" ).arg( serial() ) ); ! persistentBroker->addToDeleteQueue( "multis_friends", QString( "`serial` = '%1'" ).arg( serial() ) ); return cItem::del(); --- 145,151 ---- return false; ! persistentBroker->addToDeleteQueue( "multis", QString( "serial = '%1'" ).arg( serial() ) ); ! persistentBroker->addToDeleteQueue( "multis_bans", QString( "serial = '%1'" ).arg( serial() ) ); ! persistentBroker->addToDeleteQueue( "multis_friends", QString( "serial = '%1'" ).arg( serial() ) ); return cItem::del(); Index: npc.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/npc.cpp,v retrieving revision 1.57 retrieving revision 1.58 diff -C2 -d -r1.57 -r1.58 *** npc.cpp 30 Jan 2004 22:51:32 -0000 1.57 --- npc.cpp 30 Jan 2004 23:28:42 -0000 1.58 *************** *** 102,106 **** QStringList fields, tables, conditions; buildSqlString( fields, tables, conditions ); // Build our SQL string ! QString sqlString = QString( "SELECT %1 FROM `uobjectmap`,%2 WHERE uobjectmap.type = 'cNPC' AND %3" ).arg( fields.join( "," ) ).arg( tables.join( "," ) ).arg( conditions.join( " AND " ) ); UObjectFactory::instance()->registerType( "cNPC", productCreator ); UObjectFactory::instance()->registerSqlQuery( "cNPC", sqlString ); --- 102,106 ---- QStringList fields, tables, conditions; buildSqlString( fields, tables, conditions ); // Build our SQL string ! QString sqlString = QString( "SELECT %1 FROM uobjectmap,%2 WHERE uobjectmap.type = 'cNPC' AND %3" ).arg( fields.join( "," ) ).arg( tables.join( "," ) ).arg( conditions.join( " AND " ) ); UObjectFactory::instance()->registerType( "cNPC", productCreator ); UObjectFactory::instance()->registerSqlQuery( "cNPC", sqlString ); *************** *** 195,199 **** return false; // We didn't need to delete the object ! persistentBroker->addToDeleteQueue( "npcs", QString( "`serial` = '%1'" ).arg( serial() ) ); changed_ = true; return cBaseChar::del(); --- 195,199 ---- return false; // We didn't need to delete the object ! persistentBroker->addToDeleteQueue( "npcs", QString( "serial = '%1'" ).arg( serial() ) ); changed_ = true; return cBaseChar::del(); Index: player.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/player.cpp,v retrieving revision 1.56 retrieving revision 1.57 diff -C2 -d -r1.56 -r1.57 *** player.cpp 30 Jan 2004 20:29:34 -0000 1.56 --- player.cpp 30 Jan 2004 23:28:42 -0000 1.57 *************** *** 91,95 **** QStringList fields, tables, conditions; buildSqlString( fields, tables, conditions ); // Build our SQL string ! QString sqlString = QString( "SELECT %1 FROM `uobjectmap`,%2 WHERE uobjectmap.type = 'cPlayer' AND %3" ).arg( fields.join( "," ) ).arg( tables.join( "," ) ).arg( conditions.join( " AND " ) ); UObjectFactory::instance()->registerType( "cPlayer", productCreator ); UObjectFactory::instance()->registerSqlQuery( "cPlayer", sqlString ); --- 91,95 ---- QStringList fields, tables, conditions; buildSqlString( fields, tables, conditions ); // Build our SQL string ! QString sqlString = QString( "SELECT %1 FROM uobjectmap,%2 WHERE uobjectmap.type = 'cPlayer' AND %3" ).arg( fields.join( "," ) ).arg( tables.join( "," ) ).arg( conditions.join( " AND " ) ); UObjectFactory::instance()->registerType( "cPlayer", productCreator ); UObjectFactory::instance()->registerSqlQuery( "cPlayer", sqlString ); *************** *** 155,159 **** return false; // We didn't need to delete the object ! persistentBroker->addToDeleteQueue( "players", QString( "`serial` = '%1'" ).arg( serial() ) ); changed_ = true; return cBaseChar::del(); --- 155,159 ---- return false; // We didn't need to delete the object ! persistentBroker->addToDeleteQueue( "players", QString( "serial = '%1'" ).arg( serial() ) ); changed_ = true; return cBaseChar::del(); Index: pythonscript.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/pythonscript.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** pythonscript.cpp 22 Jan 2004 01:09:27 -0000 1.13 --- pythonscript.cpp 30 Jan 2004 23:28:42 -0000 1.14 *************** *** 43,46 **** --- 43,90 ---- #include "python/target.h" + // Keep this in Synch with the Enum on the header file + static char *eventNames[] = + { + "onUse", + "onSingleClick", + "onCollide", + "onWalk", + "onCreate", + "onTalk", + "onWarModeToggle", + "onLogin", + "onLogout", + "onHelp", + "onChat", + "onSkillUse", + "onSkillGain", + "onStatGain", + "onShowPaperdoll", + "onShowSkillGump", + "onDeath", + "onShowPaperdollName", + "onContextEntry", + "onShowContextMenu", + "onShowTooltip", + "onCHLevelChange", + "onSpeech", + "onWearItem", + "onEquip", + "onUnequip", + "onDropOnChar", + "onDropOnItem", + "onDropOnGround", + "onPickup", + "onCommand", + "onBookUpdateInfo", + "onBookRequestPage", + "onBookUpdatePage", + "onDamage", + "onCastSpell", + "onTrade", + "onTradeStart", + 0 + }; + cPythonScript::cPythonScript() : loaded(false) { Index: pythonscript.h =================================================================== RCS file: /cvsroot/wpdev/wolfpack/pythonscript.h,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** pythonscript.h 22 Jan 2004 01:09:27 -0000 1.12 --- pythonscript.h 30 Jan 2004 23:28:42 -0000 1.13 *************** *** 86,133 **** }; - // Keep this in Synch with the Enum above - static char *eventNames[] = - { - "onUse", - "onSingleClick", - "onCollide", - "onWalk", - "onCreate", - "onTalk", - "onWarModeToggle", - "onLogin", - "onLogout", - "onHelp", - "onChat", - "onSkillUse", - "onSkillGain", - "onStatGain", - "onShowPaperdoll", - "onShowSkillGump", - "onDeath", - "onShowPaperdollName", - "onContextEntry", - "onShowContextMenu", - "onShowTooltip", - "onCHLevelChange", - "onSpeech", - "onWearItem", - "onEquip", - "onUnequip", - "onDropOnChar", - "onDropOnItem", - "onDropOnGround", - "onPickup", - "onCommand", - "onBookUpdateInfo", - "onBookRequestPage", - "onBookUpdatePage", - "onDamage", - "onCastSpell", - "onTrade", - "onTradeStart", - 0 - }; - class cElement; class cUOTxTooltipList; --- 86,89 ---- Index: resources.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/resources.cpp,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -d -r1.49 -r1.50 *** resources.cpp 30 Jan 2004 20:29:34 -0000 1.49 --- resources.cpp 30 Jan 2004 23:28:42 -0000 1.50 *************** *** 1464,1468 **** QStringList fields, tables, conditions; buildSqlString( fields, tables, conditions ); // Build our SQL string ! QString sqlString = QString( "SELECT %1 FROM `uobjectmap`,%2 WHERE uobjectmap.type = 'cResourceItem' AND %3" ).arg( fields.join( "," ) ).arg( tables.join( "," ) ).arg( conditions.join( " AND " ) ); UObjectFactory::instance()->registerType("cResourceItem", productCreator); UObjectFactory::instance()->registerSqlQuery( "cResourceItem", sqlString ); --- 1464,1468 ---- QStringList fields, tables, conditions; buildSqlString( fields, tables, conditions ); // Build our SQL string ! QString sqlString = QString( "SELECT %1 FROM uobjectmap,%2 WHERE uobjectmap.type = 'cResourceItem' AND %3" ).arg( fields.join( "," ) ).arg( tables.join( "," ) ).arg( conditions.join( " AND " ) ); UObjectFactory::instance()->registerType("cResourceItem", productCreator); UObjectFactory::instance()->registerSqlQuery( "cResourceItem", sqlString ); Index: srvparams.h =================================================================== RCS file: /cvsroot/wpdev/wolfpack/srvparams.h,v retrieving revision 1.60 retrieving revision 1.61 diff -C2 -d -r1.60 -r1.61 *** srvparams.h 28 Jan 2004 23:21:27 -0000 1.60 --- srvparams.h 30 Jan 2004 23:28:42 -0000 1.61 *************** *** 39,43 **** // Our own headers #include "structs.h" - #include "coord.h" #include "preferences.h" --- 39,42 ---- Index: uobject.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/uobject.cpp,v retrieving revision 1.129 retrieving revision 1.130 diff -C2 -d -r1.129 -r1.130 *** uobject.cpp 30 Jan 2004 20:29:34 -0000 1.129 --- uobject.cpp 30 Jan 2004 23:28:42 -0000 1.130 *************** *** 197,202 **** return false; // We didn't need to delete the object ! persistentBroker->addToDeleteQueue( "uobject", QString( "`serial` = '%1'" ).arg( serial_ ) ); ! persistentBroker->addToDeleteQueue( "uobjectmap", QString( "`serial` = '%1'" ).arg( serial_ ) ); if( tags_.size() > 0 ) --- 197,202 ---- return false; // We didn't need to delete the object ! persistentBroker->addToDeleteQueue( "uobject", QString( "serial = '%1'" ).arg( serial_ ) ); ! persistentBroker->addToDeleteQueue( "uobjectmap", QString( "serial = '%1'" ).arg( serial_ ) ); if( tags_.size() > 0 ) Index: world.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/world.cpp,v retrieving revision 1.62 retrieving revision 1.63 diff -C2 -d -r1.62 -r1.63 *** world.cpp 30 Jan 2004 20:29:34 -0000 1.62 --- world.cpp 30 Jan 2004 23:28:42 -0000 1.63 *************** *** 87,334 **** } tableInfo[] = { ! { "settings", "CREATE TABLE `settings` ( \ ! `option` varchar(255) NOT NULL default '', \ ! `value` varchar(255) NOT NULL default '', \ ! PRIMARY KEY (`option`) \ );" }, ! { "boats", "CREATE TABLE `boats` ( \ ! `serial` int(11) NOT NULL default '0', \ ! `autosail` tinyint(1) NOT NULL default '0', \ ! `boatdir` tinyint(1) NOT NULL default '0', \ ! `itemserial1` int(11) NOT NULL default '-1', \ ! `itemserial2` int(11) NOT NULL default '-1', \ ! `itemserial3` int(11) NOT NULL default '-1', \ ! `itemserial4` int(11) NOT NULL default '-1', \ ! `multi1` smallint(6) default '0', \ ! `multi2` smallint(6) default '0', \ ! `multi3` smallint(6) default '0', \ ! `multi4` smallint(6) default '0', \ ! PRIMARY KEY (`serial`) \ );" }, ! { "boats_itemids", "CREATE TABLE `boats_itemids` ( \ ! `serial` int(11) NOT NULL default '0', \ ! `a` tinyint(1) NOT NULL default '0', \ ! `b` tinyint(1) NOT NULL default '0', \ ! `id` smallint(6) default '0', \ ! PRIMARY KEY (`serial`) \ );" }, ! { "boats_itemoffsets", "CREATE TABLE `boats_itemoffsets` (\ ! `serial` int(11) NOT NULL default '0',\ ! `a` tinyint(1) NOT NULL default '0',\ ! `b` tinyint(1) NOT NULL default '0',\ ! `c` tinyint(1) NOT NULL default '0',\ ! `offset` smallint(6) default '0',\ ! PRIMARY KEY (`serial`)\ );" }, ! { "characters", "CREATE TABLE `characters` (\ ! `serial` int(11) NOT NULL default '0',\ ! `name` varchar(255) default NULL,\ ! `title` varchar(255) default NULL,\ ! `creationdate` varchar(255) default NULL,\ ! `body` smallint(5) NOT NULL default '0',\ ! `orgbody` smallint(5) NOT NULL default '0',\ ! `skin` smallint(5) NOT NULL default '0',\ ! `orgskin` smallint(5) NOT NULL default '0',\ ! `saycolor` smallint(5) NOT NULL default '0',\ ! `emotecolor` smallint(5) NOT NULL default '0',\ ! `strength` smallint(6) NOT NULL default '0',\ ! `strengthmod` smallint(6) NOT NULL default '0',\ ! `dexterity` smallint(6) NOT NULL default '0',\ ! `dexteritymod` smallint(6) NOT NULL default '0',\ ! `intelligence` smallint(6) NOT NULL default '0',\ ! `intelligencemod` smallint(6) NOT NULL default '0',\ ! `maxhitpoints` smallint(6) NOT NULL default '0',\ ! `hitpoints` smallint(6) NOT NULL default '0',\ ! `maxstamina` smallint(6) NOT NULL default '0',\ ! `stamina` smallint(6) NOT NULL default '0',\ ! `maxmana` smallint(6) default NULL,\ ! `mana` smallint(6) default NULL,\ ! `karma` int(11) NOT NULL default '0',\ ! `fame` int(11) NOT NULL default '0',\ ! `kills` int(10) NOT NULL default '0',\ ! `deaths` int(10) NOT NULL default '0',\ ! `def` int(10) NOT NULL default '0',\ ! `hunger` int(11) NOT NULL default '0',\ ! `poison` int(11) NOT NULL default '0',\ ! `poisoned` int(10) NOT NULL default '0',\ ! `murderertime` int(11) NOT NULL default '0',\ ! `criminaltime` int(11) NOT NULL default '0',\ ! `nutriment` int(10) NOT NULL default '0',\ ! `gender` tinyint(1) NOT NULL default '0',\ ! `propertyflags` int(11) NOT NULL default '0',\ ! `attacker` int(11) NOT NULL default '-1',\ ! `combattarget` int(11) NOT NULL default '-1',\ ! `murderer` int(11) NOT NULL default '-1',\ ! `guarding` int(11) NOT NULL default '-1',\ ! PRIMARY KEY (`serial`)\ );" }, ! { "corpses", "CREATE TABLE `corpses` (\ ! `serial` int(11) NOT NULL default '0',\ ! `bodyid` smallint(6) NOT NULL default '0',\ ! `hairstyle` smallint(6) NOT NULL default '0',\ ! `haircolor` smallint(6) NOT NULL default '0',\ ! `beardstyle` smallint(6) NOT NULL default '0',\ ! `beardcolor` smallint(6) NOT NULL default '0',\ ! PRIMARY KEY (`serial`)\ );" }, ! { "corpses_equipment", "CREATE TABLE `corpses_equipment` (\ ! `serial` int(11) NOT NULL default '0',\ ! `layer` tinyint(3) NOT NULL default '0',\ ! `item` int(11) NOT NULL default '-1', \ ! PRIMARY KEY (`serial`,`layer`)\ );" }, ! { "houses", "CREATE TABLE `houses` (\ ! `serial` int(11) NOT NULL default '0',\ ! `nokey` tinyint(1) NOT NULL default '0',\ ! `charpos_x` smallint(6) NOT NULL default '0',\ ! `charpos_y` smallint(6) NOT NULL default '0',\ ! `charpos_z` smallint(6) NOT NULL default '0',\ ! PRIMARY KEY (`serial`)\ );" }, ! { "items", "CREATE TABLE `items` (\ ! `serial` int(11) NOT NULL default '0',\ ! `id` smallint(5) NOT NULL default '0',\ ! `color` smallint(5) NOT NULL default '0',\ ! `cont` int(11) NOT NULL default '-1',\ ! `layer` tinyint(3) NOT NULL default '0',\ ! `type` smallint(5) NOT NULL default '0',\ ! `type2` smallint(5) NOT NULL default '0',\ ! `amount` smallint(5) NOT NULL default '0',\ ! `decaytime` int(10) NOT NULL default '0',\ ! `def` int(10) NOT NULL default '0',\ ! `hidamage` smallint(6) NOT NULL default '0',\ ! `lodamage` smallint(6) NOT NULL default '0',\ ! `weight` float NOT NULL default '0',\ ! `hp` smallint(6) NOT NULL default '0',\ ! `maxhp` smallint(6) NOT NULL default '0',\ ! `speed` int(11) NOT NULL default '0',\ ! `magic` tinyint(3) NOT NULL default '0',\ ! `owner` int(11) NOT NULL default '-1',\ ! `visible` tinyint(3) NOT NULL default '0',\ ! `spawnregion` varchar(255) default NULL,\ ! `priv` tinyint(3) NOT NULL default '0',\ ! `sellprice` int(11) NOT NULL default '0',\ ! `buyprice` int(11) NOT NULL default '0',\ ! `restock` smallint(5) NOT NULL default '0',\ ! `baseid` varchar(32) NOT NULL default '',\ ! PRIMARY KEY (`serial`)\ );" }, ! { "multis", "CREATE TABLE `multis` (\ ! `serial` int(11) NOT NULL default '0',\ ! `coowner` int(11) NOT NULL default '-1',\ ! `deedsection` varchar(255) NOT NULL default '',\ ! PRIMARY KEY (`serial`)\ );" }, ! { "multis_bans", "CREATE TABLE `multis_bans` (\ ! `serial` int(11) NOT NULL default '0',\ ! `ban` int(11) NOT NULL default '-1',\ ! PRIMARY KEY (`serial`,`ban`)\ );" }, ! { "multis_friends", "CREATE TABLE `multis_friends` (\ ! `serial` int(11) NOT NULL default '0',\ ! `friend` int(11) NOT NULL default '-1',\ ! PRIMARY KEY (`serial`,`friend`)\ );" }, ! { "npcs", "CREATE TABLE `npcs` (\ ! `serial` int(11) NOT NULL default '0',\ ! `mindamage` smallint(6) NOT NULL default '0',\ ! `maxdamage` smallint(6) NOT NULL default '0',\ ! `tamingminskill` smallint(6) NOT NULL default '0',\ ! `summontime` int(11) NOT NULL default '0',\ ! `additionalflags` int(11) NOT NULL default '0',\ ! `owner` int(11) NOT NULL default '-1',\ ! `carve` varchar(255) default NULL,\ ! `spawnregion varchar(255) default NULL,\ ! `stablemaster` int(11) NOT NULL default '-1',\ ! `lootlist` varchar(255) default NULL,\ ! `ai` varchar(255) default NULL,\ ! `wandertype` smallint(3) NOT NULL default '0',\ ! `wanderx1` smallint(6) NOT NULL default '0',\ ! `wanderx2` smallint(6) NOT NULL default '0',\ ! `wandery1` smallint(6) NOT NULL default '0',\ ! `wandery2` smallint(6) NOT NULL default '0',\ ! `wanderradius` smallint(6) NOT NULL default '0',\ ! `fleeat` smallint(3) NOT NULL default '10',\ ! `spellslow` int(11) NOT NULL default '0',\ ! `spellshigh` int(11) NOT NULL default '0',\ ! PRIMARY KEY (`serial`)\ );" }, ! { "players", "CREATE TABLE `players` (\ ! `serial` int(11) NOT NULL default '0',\ ! `account` varchar(255) default NULL,\ ! `additionalflags` int(10) NOT NULL default '0',\ ! `visualrange` tinyint(3) NOT NULL default '0',\ ! `profile` longtext,\ ! `fixedlight` tinyint(3) NOT NULL default '0',\ ! PRIMARY KEY (`serial`)\ );" }, ! { "skills", "CREATE TABLE `skills` (\ ! `serial` int(11) NOT NULL default '0',\ ! `skill` tinyint(3) NOT NULL default '0',\ ! `value` smallint(6) NOT NULL default '0',\ ! `locktype` tinyint(4) default '0',\ ! `cap` smallint(6) default '0',\ ! PRIMARY KEY (`serial`,`skill`)\ );" }, ! { "tags", "CREATE TABLE `tags` (\ ! `serial` int(11) NOT NULL default '0',\ ! `name` varchar(64) NOT NULL default '',\ ! `type` varchar(6) NOT NULL default '',\ ! `value` longtext NOT NULL,\ ! PRIMARY KEY (`serial`,`name`)\ );" }, ! { "uobject", "CREATE TABLE `uobject` (\ ! `name` varchar(255) default NULL,\ ! `serial` int(11) NOT NULL default '0',\ ! `multis` int(11) NOT NULL default '-1',\ ! `direction` char(1) NOT NULL default '0',\ ! `pos_x` smallint(6) NOT NULL default '0',\ ! `pos_y` smallint(6) NOT NULL default '0',\ ! `pos_z` smallint(6) NOT NULL default '0',\ ! `pos_map` tinyint(4) NOT NULL default '0', \ ! `events` varchar(255) default NULL,\ ! `bindmenu` varchar(255) default NULL,\ ! `havetags` tinyint(1) NOT NULL default '0',\ ! PRIMARY KEY (`serial`)\ );" }, ! { "uobjectmap", "CREATE TABLE `uobjectmap` (\ ! `serial` int(11) NOT NULL default '0',\ ! `type` varchar(80) NOT NULL default '',\ ! PRIMARY KEY (`serial`)\ );" }, ! { "effects", "CREATE TABLE `effects` (\ ! `id` int NOT NULL,\ ! `objectid` varchar(64) NOT NULL,\ ! `expiretime` int NOT NULL,\ ! `dispellable` tinyint NOT NULL default '0',\ ! `source` int NOT NULL default '-1',\ ! `destination` int NOT NULL default '-1',\ ! PRIMARY KEY (`id`)\ );" }, ! { "effects_properties", "CREATE TABLE `effects_properties` (\ ! `id` int NOT NULL,\ ! `keyname` varchar(64) NOT NULL,\ ! `type` varchar(64) NOT NULL,\ ! `value` text NOT NULL,\ ! PRIMARY KEY (`id`,`keyname`)\ );" }, --- 87,334 ---- } tableInfo[] = { ! { "settings", "CREATE TABLE settings ( \ ! option varchar(255) NOT NULL default '', \ ! value varchar(255) NOT NULL default '', \ ! PRIMARY KEY (option) \ );" }, ! { "boats", "CREATE TABLE boats ( \ ! serial int(11) NOT NULL default '0', \ ! autosail tinyint(1) NOT NULL default '0', \ ! boatdir tinyint(1) NOT NULL default '0', \ ! itemserial1 int(11) NOT NULL default '-1', \ ! itemserial2 int(11) NOT NULL default '-1', \ ! itemserial3 int(11) NOT NULL default '-1', \ ! itemserial4 int(11) NOT NULL default '-1', \ ! multi1 smallint(6) default '0', \ ! multi2 smallint(6) default '0', \ ! multi3 smallint(6) default '0', \ ! multi4 smallint(6) default '0', \ ! PRIMARY KEY (serial) \ );" }, ! { "boats_itemids", "CREATE TABLE boats_itemids ( \ ! serial int(11) NOT NULL default '0', \ ! a tinyint(1) NOT NULL default '0', \ ! b tinyint(1) NOT NULL default '0', \ ! id smallint(6) default '0', \ ! PRIMARY KEY (serial) \ );" }, ! { "boats_itemoffsets", "CREATE TABLE boats_itemoffsets (\ ! serial int(11) NOT NULL default '0',\ ! a tinyint(1) NOT NULL default '0',\ ! b tinyint(1) NOT NULL default '0',\ ! c tinyint(1) NOT NULL default '0',\ ! offset smallint(6) default '0',\ ! PRIMARY KEY (serial)\ );" }, ! { "characters", "CREATE TABLE characters (\ ! serial int(11) NOT NULL default '0',\ ! name varchar(255) default NULL,\ ! title varchar(255) default NULL,\ ! creationdate varchar(255) default NULL,\ ! body smallint(5) NOT NULL default '0',\ ! orgbody smallint(5) NOT NULL default '0',\ ! skin smallint(5) NOT NULL default '0',\ ! orgskin smallint(5) NOT NULL default '0',\ ! saycolor smallint(5) NOT NULL default '0',\ ! emotecolor smallint(5) NOT NULL default '0',\ ! strength smallint(6) NOT NULL default '0',\ ! strengthmod smallint(6) NOT NULL default '0',\ ! dexterity smallint(6) NOT NULL default '0',\ ! dexteritymod smallint(6) NOT NULL default '0',\ ! intelligence smallint(6) NOT NULL default '0',\ ! intelligencemod smallint(6) NOT NULL default '0',\ ! maxhitpoints smallint(6) NOT NULL default '0',\ ! hitpoints smallint(6) NOT NULL default '0',\ ! maxstamina smallint(6) NOT NULL default '0',\ ! stamina smallint(6) NOT NULL default '0',\ ! maxmana smallint(6) default NULL,\ ! mana smallint(6) default NULL,\ ! karma int(11) NOT NULL default '0',\ ! fame int(11) NOT NULL default '0',\ ! kills int(10) NOT NULL default '0',\ ! deaths int(10) NOT NULL default '0',\ ! def int(10) NOT NULL default '0',\ ! hunger int(11) NOT NULL default '0',\ ! poison int(11) NOT NULL default '0',\ ! poisoned int(10) NOT NULL default '0',\ ! murderertime int(11) NOT NULL default '0',\ ! criminaltime int(11) NOT NULL default '0',\ ! nutriment int(10) NOT NULL default '0',\ ! gender tinyint(1) NOT NULL default '0',\ ! propertyflags int(11) NOT NULL default '0',\ ! attacker int(11) NOT NULL default '-1',\ ! combattarget int(11) NOT NULL default '-1',\ ! murderer int(11) NOT NULL default '-1',\ ! guarding int(11) NOT NULL default '-1',\ ! PRIMARY KEY (serial)\ );" }, ! { "corpses", "CREATE TABLE corpses (\ ! serial int(11) NOT NULL default '0',\ ! bodyid smallint(6) NOT NULL default '0',\ ! hairstyle smallint(6) NOT NULL default '0',\ ! haircolor smallint(6) NOT NULL default '0',\ ! beardstyle smallint(6) NOT NULL default '0',\ ! beardcolor smallint(6) NOT NULL default '0',\ ! PRIMARY KEY (serial)\ );" }, ! { "corpses_equipment", "CREATE TABLE corpses_equipment (\ ! serial int(11) NOT NULL default '0',\ ! layer tinyint(3) NOT NULL default '0',\ ! item int(11) NOT NULL default '-1', \ ! PRIMARY KEY (serial,layer)\ );" }, ! { "houses", "CREATE TABLE houses (\ ! serial int(11) NOT NULL default '0',\ ! nokey tinyint(1) NOT NULL default '0',\ ! charpos_x smallint(6) NOT NULL default '0',\ ! charpos_y smallint(6) NOT NULL default '0',\ ! charpos_z smallint(6) NOT NULL default '0',\ ! PRIMARY KEY (serial)\ );" }, ! { "items", "CREATE TABLE items (\ ! serial int(11) NOT NULL default '0',\ ! id smallint(5) NOT NULL default '0',\ ! color smallint(5) NOT NULL default '0',\ ! cont int(11) NOT NULL default '-1',\ ! layer tinyint(3) NOT NULL default '0',\ ! type smallint(5) NOT NULL default '0',\ ! type2 smallint(5) NOT NULL default '0',\ ! amount smallint(5) NOT NULL default '0',\ ! decaytime int(10) NOT NULL default '0',\ ! def int(10) NOT NULL default '0',\ ! hidamage smallint(6) NOT NULL default '0',\ ! lodamage smallint(6) NOT NULL default '0',\ ! weight float NOT NULL default '0',\ ! hp smallint(6) NOT NULL default '0',\ ! maxhp smallint(6) NOT NULL default '0',\ ! speed int(11) NOT NULL default '0',\ ! magic tinyint(3) NOT NULL default '0',\ ! owner int(11) NOT NULL default '-1',\ ! visible tinyint(3) NOT NULL default '0',\ ! spawnregion varchar(255) default NULL,\ ! priv tinyint(3) NOT NULL default '0',\ ! sellprice int(11) NOT NULL default '0',\ ! buyprice int(11) NOT NULL default '0',\ ! restock smallint(5) NOT NULL default '0',\ ! baseid varchar(32) NOT NULL default '',\ ! PRIMARY KEY (serial)\ );" }, ! { "multis", "CREATE TABLE multis (\ ! serial int(11) NOT NULL default '0',\ ! coowner int(11) NOT NULL default '-1',\ ! deedsection varchar(255) NOT NULL default '',\ ! PRIMARY KEY (serial)\ );" }, ! { "multis_bans", "CREATE TABLE multis_bans (\ ! serial int(11) NOT NULL default '0',\ ! ban int(11) NOT NULL default '-1',\ ! PRIMARY KEY (serial,ban)\ );" }, ! { "multis_friends", "CREATE TABLE multis_friends (\ ! serial int(11) NOT NULL default '0',\ ! friend int(11) NOT NULL default '-1',\ ! PRIMARY KEY (serial,friend)\ );" }, ! { "npcs", "CREATE TABLE npcs (\ ! serial int(11) NOT NULL default '0',\ ! mindamage smallint(6) NOT NULL default '0',\ ! maxdamage smallint(6) NOT NULL default '0',\ ! tamingminskill smallint(6) NOT NULL default '0',\ ! summontime int(11) NOT NULL default '0',\ ! additionalflags int(11) NOT NULL default '0',\ ! owner int(11) NOT NULL default '-1',\ ! carve varchar(255) default NULL,\ ! spawnregion varchar(255) default NULL,\ ! stablemaster int(11) NOT NULL default '-1',\ ! lootlist varchar(255) default NULL,\ ! ai varchar(255) default NULL,\ ! wandertype smallint(3) NOT NULL default '0',\ ! wanderx1 smallint(6) NOT NULL default '0',\ ! wanderx2 smallint(6) NOT NULL default '0',\ ! wandery1 smallint(6) NOT NULL default '0',\ ! wandery2 smallint(6) NOT NULL default '0',\ ! wanderradius smallint(6) NOT NULL default '0',\ ! fleeat smallint(3) NOT NULL default '10',\ ! spellslow int(11) NOT NULL default '0',\ ! spellshigh int(11) NOT NULL default '0',\ ! PRIMARY KEY (serial)\ );" }, ! { "players", "CREATE TABLE players (\ ! serial int(11) NOT NULL default '0',\ ! account varchar(255) default NULL,\ ! additionalflags int(10) NOT NULL default '0',\ ! visualrange tinyint(3) NOT NULL default '0',\ ! profile longtext,\ ! fixedlight tinyint(3) NOT NULL default '0',\ ! PRIMARY KEY (serial)\ );" }, ! { "skills", "CREATE TABLE skills (\ ! serial int(11) NOT NULL default '0',\ ! skill tinyint(3) NOT NULL default '0',\ ! value smallint(6) NOT NULL default '0',\ ! locktype tinyint(4) default '0',\ ! cap smallint(6) default '0',\ ! PRIMARY KEY (serial,skill)\ );" }, ! { "tags", "CREATE TABLE tags (\ ! serial int(11) NOT NULL default '0',\ ! name varchar(64) NOT NULL default '',\ ! type varchar(6) NOT NULL default '',\ ! value longtext NOT NULL,\ ! PRIMARY KEY (serial,name)\ );" }, ! { "uobject", "CREATE TABLE uobject (\ ! name varchar(255) default NULL,\ ! serial int(11) NOT NULL default '0',\ ! multis int(11) NOT NULL default '-1',\ ! direction char(1) NOT NULL default '0',\ ! pos_x smallint(6) NOT NULL default '0',\ ! pos_y smallint(6) NOT NULL default '0',\ ! pos_z smallint(6) NOT NULL default '0',\ ! pos_map tinyint(4) NOT NULL default '0', \ ! events varchar(255) default NULL,\ ! bindmenu varchar(255) default NULL,\ ! havetags tinyint(1) NOT NULL default '0',\ ! PRIMARY KEY (serial)\ );" }, ! { "uobjectmap", "CREATE TABLE uobjectmap (\ ! serial int(11) NOT NULL default '0',\ ! type varchar(80) NOT NULL default '',\ ! PRIMARY KEY (serial)\ );" }, ! { "effects", "CREATE TABLE effects (\ ! id int NOT NULL,\ ! objectid varchar(64) NOT NULL,\ ! expiretime int NOT NULL,\ ! dispellable tinyint NOT NULL default '0',\ ! source int NOT NULL default '-1',\ ! destination int NOT NULL default '-1',\ ! PRIMARY KEY (id)\ );" }, ! { "effects_properties", "CREATE TABLE effects_properties (\ ! id int NOT NULL,\ ! keyname varchar(64) NOT NULL,\ ! type varchar(64) NOT NULL,\ ! value text NOT NULL,\ ! PRIMARY KEY (id,keyname)\ );" }, *************** *** 473,477 **** QString type = types[j]; ! cDBResult res = persistentBroker->query( QString( "SELECT COUNT(*) FROM `uobjectmap` WHERE `type` = '%1'" ).arg( type ) ); // Find out how many objects of this type are available --- 473,477 ---- QString type = types[j]; ! cDBResult res = persistentBroker->query( QString( "SELECT COUNT(*) FROM uobjectmap WHERE type = '%1'" ).arg( type ) ); // Find out how many objects of this type are available *************** *** 799,803 **** } ! cDBResult res = persistentBroker->query( QString( "SELECT `option`,`value` FROM `settings` WHERE `option` = '%1'" ).arg( persistentBroker->quoteString( name ) ) ); if( !res.isValid() || !res.fetchrow() ) --- 799,803 ---- } ! cDBResult res = persistentBroker->query( QString( "SELECT option,value FROM settings WHERE option = '%1'" ).arg( persistentBroker->quoteString( name ) ) ); if( !res.isValid() || !res.fetchrow() ) *************** *** 837,841 **** // check if the option already exists ! cDBResult res = persistentBroker->query( QString( "SELECT `option`,`value` FROM `settings` WHERE `option` = '%1'" ).arg( persistentBroker->quoteString( name ) ) ); QString sql; --- 837,841 ---- // check if the option already exists ! cDBResult res = persistentBroker->query( QString( "SELECT option,value FROM settings WHERE option = '%1'" ).arg( persistentBroker->quoteString( name ) ) ); QString sql; *************** *** 843,852 **** if( !res.isValid() || !res.fetchrow() ) { ! sql = "INSERT INTO `settings` VALUES('%1','%2')"; sql = sql.arg( persistentBroker->quoteString( name ) ).arg( persistentBroker->quoteString( value ) ); } else { ! sql = "UPDATE `settings` SET `value`='%1' WHERE `option`='%2'"; sql = sql.arg( persistentBroker->quoteString( value ) ).arg( persistentBroker->quoteString( name ) ); } --- 843,852 ---- if( !res.isValid() || !res.fetchrow() ) { ! sql = "INSERT INTO settings VALUES('%1','%2')"; sql = sql.arg( persistentBroker->quoteString( name ) ).arg( persistentBroker->quoteString( value ) ); } else { ! sql = "UPDATE settings SET value='%1' WHERE option='%2'"; sql = sql.arg( persistentBroker->quoteString( value ) ).arg( persistentBroker->quoteString( name ) ); } |
|
From: <thi...@pr...> - 2004-01-30 23:30:24
|
Update of /cvsroot/wpdev/wolfpack/python In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8857/python Modified Files: char.cpp Log Message: Fixes some compile warnings from gcc sqlite doesn't like the MySQL quotes. Index: char.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/python/char.cpp,v retrieving revision 1.118 retrieving revision 1.119 diff -C2 -d -r1.118 -r1.119 *** char.cpp 28 Jan 2004 20:08:41 -0000 1.118 --- char.cpp 30 Jan 2004 23:28:42 -0000 1.119 *************** *** 575,579 **** color = getArgInt( 1 ); ! npc->talk( cliloc, 0, color ); return PyTrue; } --- 575,579 ---- color = getArgInt( 1 ); ! npc->talk( cliloc, 0, 1 ); return PyTrue; } |
Update of /cvsroot/wpdev/wolfpack In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8828 Modified Files: accounts.cpp basechar.cpp boats.cpp chars.cpp combat.cpp customtags.h defines.h maps.h npc.h Log Message: Fixes some compile warnings from gcc Index: accounts.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/accounts.cpp,v retrieving revision 1.79 retrieving revision 1.80 diff -C2 -d -r1.79 -r1.80 *** accounts.cpp 30 Jan 2004 20:29:25 -0000 1.79 --- accounts.cpp 30 Jan 2004 22:11:51 -0000 1.80 *************** *** 57,62 **** *****************************************************************************/ ! cAccount::cAccount() ! : acl_(0), inUse_(false), flags_(0) { } --- 57,61 ---- *****************************************************************************/ ! cAccount::cAccount() : acl_(0), flags_(0), attempts_(0), inUse_(false) { } Index: basechar.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/basechar.cpp,v retrieving revision 1.54 retrieving revision 1.55 diff -C2 -d -r1.54 -r1.55 *** basechar.cpp 30 Jan 2004 20:29:25 -0000 1.54 --- basechar.cpp 30 Jan 2004 22:11:52 -0000 1.55 *************** *** 930,934 **** // To avoid division by zero if( min == max ) ! max += 0.1; // +100 means: *allways* a minimum of 10% for success --- 930,934 ---- // To avoid division by zero if( min == max ) ! max += 1; // +100 means: *allways* a minimum of 10% for success *************** *** 1637,1642 **** if( scriptChain ) { ! PyObject *args; ! if( dynamic_cast< P_CHAR >( source ) != 0 ) args = Py_BuildValue( "O&iiO&", PyGetCharObject, this, (unsigned int)type, amount, PyGetCharObject, source ); --- 1637,1641 ---- if( scriptChain ) { ! PyObject *args = 0; if( dynamic_cast< P_CHAR >( source ) != 0 ) args = Py_BuildValue( "O&iiO&", PyGetCharObject, this, (unsigned int)type, amount, PyGetCharObject, source ); Index: boats.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/boats.cpp,v retrieving revision 1.117 retrieving revision 1.118 diff -C2 -d -r1.117 -r1.118 *** boats.cpp 30 Jan 2004 20:29:26 -0000 1.117 --- boats.cpp 30 Jan 2004 22:11:52 -0000 1.118 *************** *** 628,632 **** cUOTxPause uoResume; uoResume.resume(); ! while( mSock = iter_sock.current() ) { pPortplank->update( mSock ); --- 628,632 ---- cUOTxPause uoResume; uoResume.resume(); ! while( ( mSock = iter_sock.current() ) ) { pPortplank->update( mSock ); Index: chars.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/chars.cpp,v retrieving revision 1.331 retrieving revision 1.332 diff -C2 -d -r1.331 -r1.332 *** chars.cpp 8 Sep 2003 10:58:47 -0000 1.331 --- chars.cpp 30 Jan 2004 22:11:52 -0000 1.332 *************** *** 61,65 **** return; - P_PLAYER pp_k = dynamic_cast<P_PLAYER>(pc_k); P_NPC pn_k = dynamic_cast<P_NPC>(pc_k); --- 61,64 ---- *************** *** 96,99 **** --- 95,103 ---- pc_k->removeFromView( false ); // Remove the character from all in-range sockets view MapObjects::instance()->remove( pc_k ); // taking it out of mapregions BEFORE x,y changed + + P_PLAYER pp_k = dynamic_cast<P_PLAYER>(pc_k); + if ( pp_k ) + if ( pp_k->account() ) + pp_k->account()->removeCharacter( pp_k ); World::instance()->deleteObject( pc_k ); Index: combat.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/combat.cpp,v retrieving revision 1.157 retrieving revision 1.158 diff -C2 -d -r1.157 -r1.158 *** combat.cpp 26 Nov 2003 03:53:52 -0000 1.157 --- combat.cpp 30 Jan 2004 22:11:52 -0000 1.158 *************** *** 89,104 **** default: ! switch( RandomNum( 0, 2 ) ) ! { ! case 0: ! id = 0x238; ! break; ! case 1: ! id = 0x239; ! break; ! case 2: ! id = 0x23a; ! break; ! } break; } --- 89,93 ---- default: ! id = RandomNum( 0x238, 0x23a ); break; } Index: customtags.h =================================================================== RCS file: /cvsroot/wpdev/wolfpack/customtags.h,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** customtags.h 26 Nov 2003 03:53:52 -0000 1.22 --- customtags.h 30 Jan 2004 22:11:52 -0000 1.23 *************** *** 133,137 **** { public: ! cCustomTags(): changed( false ), tags_( 0 ) {} cCustomTags( const cCustomTags& ); virtual ~cCustomTags(); --- 133,137 ---- { public: ! cCustomTags(): tags_( 0 ), changed( false ) {} cCustomTags( const cCustomTags& ); virtual ~cCustomTags(); Index: defines.h =================================================================== RCS file: /cvsroot/wpdev/wolfpack/defines.h,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** defines.h 6 Jan 2004 22:30:06 -0000 1.45 --- defines.h 30 Jan 2004 22:11:52 -0000 1.46 *************** *** 48,52 **** #define MaxZstep 5 ! #define ILLEGAL_Z 128 #define VISRANGE 18 // Visibility for normal items --- 48,52 ---- #define MaxZstep 5 ! #define ILLEGAL_Z 127 #define VISRANGE 18 // Visibility for normal items Index: maps.h =================================================================== RCS file: /cvsroot/wpdev/wolfpack/maps.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** maps.h 22 Jan 2004 04:48:12 -0000 1.8 --- maps.h 30 Jan 2004 22:11:52 -0000 1.9 *************** *** 73,77 **** QValueVector<staticrecord> staticArray; uint baseX, baseY; ! int pos; private: --- 73,77 ---- QValueVector<staticrecord> staticArray; uint baseX, baseY; ! uint pos; private: Index: npc.h =================================================================== RCS file: /cvsroot/wpdev/wolfpack/npc.h,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** npc.h 28 Jan 2004 02:18:13 -0000 1.29 --- npc.h 30 Jan 2004 22:11:52 -0000 1.30 *************** *** 66,72 **** stWanderType( enWanderTypes type_ ) : type( type_ ) {} stWanderType( UINT16 x1_, UINT16 x2_, UINT16 y1_, UINT16 y2_ ) : ! x1( x1_ ), x2( x2_ ), y1( y1_ ), y2( y2_ ), type( enRectangle ) {} stWanderType( UINT16 x_, UINT16 y_, UINT16 radius_ ) : ! x1( x_ ), y1( y_ ), radius( radius_ ), type( enCircle ) {} // attributes --- 66,72 ---- stWanderType( enWanderTypes type_ ) : type( type_ ) {} stWanderType( UINT16 x1_, UINT16 x2_, UINT16 y1_, UINT16 y2_ ) : ! type( enRectangle ), x1( x1_ ), x2( x2_ ), y1( y1_ ), y2( y2_ ) {} stWanderType( UINT16 x_, UINT16 y_, UINT16 radius_ ) : ! type( enCircle ), x1( x_ ), y1( y_ ), radius( radius_ ) {} // attributes |
|
From: <thi...@pr...> - 2004-01-30 22:13:37
|
Update of /cvsroot/wpdev/wolfpack/ai In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8828/ai Modified Files: ai.h Log Message: Fixes some compile warnings from gcc Index: ai.h =================================================================== RCS file: /cvsroot/wpdev/wolfpack/ai/ai.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ai.h 30 Jan 2004 14:50:51 -0000 1.2 --- ai.h 30 Jan 2004 22:11:52 -0000 1.3 *************** *** 56,60 **** public: AbstractAction( P_NPC npc, AbstractAI* ai ) : m_npc( npc ), m_ai( ai ) {} ! ~AbstractAction() {} // executes the action --- 56,60 ---- public: AbstractAction( P_NPC npc, AbstractAI* ai ) : m_npc( npc ), m_ai( ai ) {} ! virtual ~AbstractAction() {} // executes the action |
|
From: <dr...@pr...> - 2004-01-30 20:31:18
|
Update of /cvsroot/wpdev/wolfpack In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11602 Modified Files: accounts.cpp basechar.cpp boats.cpp corpse.cpp house.cpp items.cpp multis.cpp npc.cpp player.cpp resources.cpp uobject.cpp world.cpp Log Message: This doesn't appear to break anything... I've noticed that a lot of SQL queries don't have the ` for `field` `table` stuff, using them helps prevent errors and can also increase responce times with MySQL. By doing this, I seem to be getting slightly lower save times than before, about 5-40ms. Assuming this really doesn't break anything, might be good to do this with other mysql queries... Index: accounts.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/accounts.cpp,v retrieving revision 1.78 retrieving revision 1.79 diff -C2 -d -r1.78 -r1.79 *** accounts.cpp 30 Jan 2004 18:07:38 -0000 1.78 --- accounts.cpp 30 Jan 2004 20:29:25 -0000 1.79 *************** *** 43,55 **** // DB AutoCreation ! const char *createSql = "CREATE TABLE accounts (\ ! login varchar(255) NOT NULL default '',\ ! password varchar(255) NOT NULL default '',\ ! flags int NOT NULL default '0',\ ! acl varchar(255) NOT NULL default 'player',\ ! lastlogin int NOT NULL default '',\ ! blockuntil int NOT NULL default '',\ ! PRIMARY KEY (login)\ ! );"; /***************************************************************************** --- 43,55 ---- // DB AutoCreation ! const char *createSql = "CREATE TABLE `accounts` (\ ! `login` varchar(255) NOT NULL default '',\ ! `password` varchar(255) NOT NULL default '',\ ! `flags` int NOT NULL default '0',\ ! `acl` varchar(255) NOT NULL default 'player',\ ! `lastlogin` int NOT NULL default '',\ ! `blockuntil` int NOT NULL default '',\ ! PRIMARY KEY (`login`)\ ! );"; /***************************************************************************** *************** *** 237,241 **** iterator it = accounts.begin(); for (; it != accounts.end(); ++it) ! delete it.data(); } --- 237,241 ---- iterator it = accounts.begin(); for (; it != accounts.end(); ++it) ! delete it.data(); } *************** *** 249,253 **** // First we check for blocked account. if ( it.data()->isBlocked() ) ! { if( error ) *error = Banned; --- 249,253 ---- // First we check for blocked account. if ( it.data()->isBlocked() ) ! { if( error ) *error = Banned; *************** *** 262,266 **** } ! // Ok, let´s continue. if (it.data()->password() == password) { --- 262,266 ---- } ! // Ok, lets continue. if (it.data()->password() == password) { *************** *** 312,324 **** persistentBroker->executeQuery( "BEGIN;" ); ! persistentBroker->executeQuery( "DELETE FROM accounts;" ); iterator it = accounts.begin(); for (; it != accounts.end(); ++it) { ! // INSERT cAccount *account = it.data(); ! ! QString sql( "INSERT INTO accounts VALUES( '%1', '%2', %3, '%4', %5, %6 );" ); sql = sql.arg( account->login_.lower() ).arg( account->password_ ).arg( account->flags_ ).arg( account->aclName_ ).arg( !account->lastLogin_.isNull() ? account->lastLogin_.toTime_t() : 0 ).arg( !account->blockUntil.isNull() ? account->blockUntil.toTime_t() : 0 ); --- 312,324 ---- persistentBroker->executeQuery( "BEGIN;" ); ! persistentBroker->executeQuery( "DELETE FROM `accounts`;" ); iterator it = accounts.begin(); for (; it != accounts.end(); ++it) { ! // INSERT cAccount *account = it.data(); ! ! QString sql( "INSERT INTO `accounts` VALUES( '%1', '%2', %3, '%4', %5, %6 );" ); sql = sql.arg( account->login_.lower() ).arg( account->password_ ).arg( account->flags_ ).arg( account->aclName_ ).arg( !account->lastLogin_.isNull() ? account->lastLogin_.toTime_t() : 0 ).arg( !account->blockUntil.isNull() ? account->blockUntil.toTime_t() : 0 ); *************** *** 340,344 **** persistentBroker->executeQuery( "ROLLBACK;" ); Console::instance()->log( LOG_ERROR, "Unknown error while saving Accounts." ); ! } } --- 340,344 ---- persistentBroker->executeQuery( "ROLLBACK;" ); Console::instance()->log( LOG_ERROR, "Unknown error while saving Accounts." ); ! } } *************** *** 366,370 **** } ! cDBResult result = persistentBroker->query( "SELECT accounts.login,accounts.password,accounts.flags,accounts.acl,accounts.lastlogin,accounts.blockuntil FROM accounts;" ); // Clear Accounts HERE --- 366,370 ---- } ! cDBResult result = persistentBroker->query( "SELECT `login`,`password`,`flags`,`acl`,`lastlogin`,`blockuntil` FROM `accounts`;" ); // Clear Accounts HERE *************** *** 396,400 **** { Console::instance()->log( LOG_ERROR, "Unknown error while loading Accounts" ); ! } } --- 396,400 ---- { Console::instance()->log( LOG_ERROR, "Unknown error while loading Accounts" ); ! } } *************** *** 449,453 **** /*! Creates an account with \a login and \a password. If this is the first account ! on the system, it will be set with "admin" acl, otherwise, it will default to "player" acl. */ --- 449,453 ---- /*! Creates an account with \a login and \a password. If this is the first account ! on the system, it will be set with "admin" acl, otherwise, it will default to "player" acl. */ Index: basechar.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/basechar.cpp,v retrieving revision 1.53 retrieving revision 1.54 diff -C2 -d -r1.53 -r1.54 *** basechar.cpp 30 Jan 2004 15:28:49 -0000 1.53 --- basechar.cpp 30 Jan 2004 20:29:25 -0000 1.54 *************** *** 202,211 **** attackerSerial_ = atoi( result[offset++] ); combatTarget_ = atoi( result[offset++] ); ! murdererSerial_ = atoi( result[offset++] ); ser = atoi( result[offset++] ); guarding_ = dynamic_cast<P_PLAYER>(FindCharBySerial( ser )); ! // Query the Skills for this character ! QString sql = "SELECT skills.skill,skills.value,skills.locktype,skills.cap FROM skills WHERE serial = '" + QString::number( serial() ) + "'"; cDBResult res = persistentBroker->query( sql ); --- 202,211 ---- attackerSerial_ = atoi( result[offset++] ); combatTarget_ = atoi( result[offset++] ); ! murdererSerial_ = atoi( result[offset++] ); ser = atoi( result[offset++] ); guarding_ = dynamic_cast<P_PLAYER>(FindCharBySerial( ser )); ! // Query the Skills for this character ! QString sql = "SELECT `skill`,`value`,`locktype`,`cap` FROM `skills` WHERE `serial` = '" + QString::number( serial() ) + "'"; cDBResult res = persistentBroker->query( sql ); *************** *** 248,254 **** initSave; setTable( "characters" ); ! addField( "serial", serial() ); ! addStrField( "name", orgName_ ); addStrField( "title", title_ ); addStrField( "creationdate", creationDate_.toString() ); --- 248,254 ---- initSave; setTable( "characters" ); ! addField( "serial", serial() ); ! addStrField( "name", orgName_ ); addStrField( "title", title_ ); addStrField( "creationdate", creationDate_.toString() ); *************** *** 290,294 **** addCondition( "serial", serial() ); saveFields; ! QValueVector< stSkillValue >::const_iterator it; int i = 0; --- 290,294 ---- addCondition( "serial", serial() ); saveFields; ! QValueVector< stSkillValue >::const_iterator it; int i = 0; *************** *** 314,323 **** bool cBaseChar::del() ! { if( !isPersistent ) return false; // We didn't need to delete the object ! persistentBroker->addToDeleteQueue( "characters", QString( "serial = '%1'" ).arg( serial() ) ); ! persistentBroker->addToDeleteQueue( "skills", QString( "serial = '%1'" ).arg( serial() ) ); changed_ = true; return cUObject::del(); --- 314,323 ---- bool cBaseChar::del() ! { if( !isPersistent ) return false; // We didn't need to delete the object ! persistentBroker->addToDeleteQueue( "characters", QString( "`serial` = '%1'" ).arg( serial() ) ); ! persistentBroker->addToDeleteQueue( "skills", QString( "`serial` = '%1'" ).arg( serial() ) ); changed_ = true; return cUObject::del(); *************** *** 328,332 **** World::instance()->registerObject( pc ); pc->setRegion( AllTerritories::instance()->region( pc->pos().x, pc->pos().y, pc->pos().map ) ); ! if (pc->bodyID() <= 0x3e1) { --- 328,332 ---- World::instance()->registerObject( pc ); pc->setRegion( AllTerritories::instance()->region( pc->pos().x, pc->pos().y, pc->pos().map ) ); ! if (pc->bodyID() <= 0x3e1) { *************** *** 343,348 **** } } ! } ! UINT16 max_x = Map->mapTileWidth(pc->pos().map) * 8; UINT16 max_y = Map->mapTileHeight(pc->pos().map) * 8; --- 343,348 ---- } } ! } ! UINT16 max_x = Map->mapTileWidth(pc->pos().map) * 8; UINT16 max_y = Map->mapTileHeight(pc->pos().map) * 8; *************** *** 353,357 **** cCharStuff::DeleteChar( pc ); return; ! } } --- 353,357 ---- cCharStuff::DeleteChar( pc ); return; ! } } *************** *** 377,381 **** if( !pPlayer || !pPlayer->socket() || !pPlayer->inRange( this, pPlayer->visualRange() ) || ( isHidden() && !pPlayer->isGM() && this != pPlayer ) ) continue; ! pPlayer->socket()->updateHealth( this ); } --- 377,381 ---- if( !pPlayer || !pPlayer->socket() || !pPlayer->inRange( this, pPlayer->visualRange() ) || ( isHidden() && !pPlayer->isGM() && this != pPlayer ) ) continue; ! pPlayer->socket()->updateHealth( this ); } *************** *** 392,403 **** else if( mounted && ( id == 0x0D || id == 0x14 ) ) id = 0x1D; ! // Attack (1H,Side,Down) + Cast Directed else if( mounted && ( id == 0x09 || id == 0x0a ||id == 0x0b ||id == 0x10 ) ) id = 0x1A; ! // Bow + Salute + Eat else if( mounted && ( id == 0x13 || id == 0x20 || id == 0x21 || id == 0x22 ) ) ! id = 0x1C; else if( ( mounted || bodyID_ < 0x190 ) && ( bodyID_ == 0x22 ) ) --- 392,403 ---- else if( mounted && ( id == 0x0D || id == 0x14 ) ) id = 0x1D; ! // Attack (1H,Side,Down) + Cast Directed else if( mounted && ( id == 0x09 || id == 0x0a ||id == 0x0b ||id == 0x10 ) ) id = 0x1A; ! // Bow + Salute + Eat else if( mounted && ( id == 0x13 || id == 0x20 || id == 0x21 || id == 0x22 ) ) ! id = 0x1C; else if( ( mounted || bodyID_ < 0x190 ) && ( bodyID_ == 0x22 ) ) *************** *** 422,426 **** { // Check if we have something on our right hand ! P_ITEM rightHand = rightHandItem(); if( Combat::weaponSkill( rightHand ) != WRESTLING ) return rightHand; --- 422,426 ---- { // Check if we have something on our right hand ! P_ITEM rightHand = rightHandItem(); if( Combat::weaponSkill( rightHand ) != WRESTLING ) return rightHand; *************** *** 442,447 **** } ! void cBaseChar::setHairColor( UINT16 d) ! { changed_ = true; cItem* pHair = GetItemOnLayer( 11 ); --- 442,447 ---- } ! void cBaseChar::setHairColor( UINT16 d) ! { changed_ = true; cItem* pHair = GetItemOnLayer( 11 ); *************** *** 452,457 **** } ! void cBaseChar::setHairStyle( UINT16 d) ! { if( !isHair( d ) ) return; --- 452,457 ---- } ! void cBaseChar::setHairStyle( UINT16 d) ! { if( !isHair( d ) ) return; *************** *** 476,481 **** } ! void cBaseChar::setBeardColor( UINT16 d) ! { changed_ = true; cItem* pBeard = GetItemOnLayer( 16 ); --- 476,481 ---- } ! void cBaseChar::setBeardColor( UINT16 d) ! { changed_ = true; cItem* pBeard = GetItemOnLayer( 16 ); *************** *** 486,491 **** } ! void cBaseChar::setBeardStyle( UINT16 d) ! { if( !isBeard( d ) ) return; --- 486,491 ---- } ! void cBaseChar::setBeardStyle( UINT16 d) ! { if( !isBeard( d ) ) return; *************** *** 539,543 **** } ! // This should check soon if we are standing above our // corpse and if so, merge with our corpse instead of // just resurrecting --- 539,543 ---- } ! // This should check soon if we are standing above our // corpse and if so, merge with our corpse instead of // just resurrecting *************** *** 569,573 **** pRobe = cItem::createFromScript( "1f03" ); ! if( !pRobe ) return; --- 569,573 ---- pRobe = cItem::createFromScript( "1f03" ); ! if( !pRobe ) return; *************** *** 588,608 **** UINT8 nDir; ! if( xdif == 0 && ydif < 0 ) nDir = 0; ! else if( xdif > 0 && ydif < 0 ) nDir = 1; ! else if( xdif > 0 && ydif ==0 ) nDir = 2; ! else if( xdif > 0 && ydif > 0 ) nDir = 3; ! else if( xdif ==0 && ydif > 0 ) nDir = 4; ! else if( xdif < 0 && ydif > 0 ) nDir = 5; ! else if( xdif < 0 && ydif ==0 ) nDir = 6; ! else if( xdif < 0 && ydif < 0 ) nDir = 7; ! else return; --- 588,608 ---- UINT8 nDir; ! if( xdif == 0 && ydif < 0 ) nDir = 0; ! else if( xdif > 0 && ydif < 0 ) nDir = 1; ! else if( xdif > 0 && ydif ==0 ) nDir = 2; ! else if( xdif > 0 && ydif > 0 ) nDir = 3; ! else if( xdif ==0 && ydif > 0 ) nDir = 4; ! else if( xdif < 0 && ydif > 0 ) nDir = 5; ! else if( xdif < 0 && ydif ==0 ) nDir = 6; ! else if( xdif < 0 && ydif < 0 ) nDir = 7; ! else return; *************** *** 628,632 **** if( !pi->container() ) ! { pi->setLayer( 0 ); if( !layer ) --- 628,632 ---- if( !pi->container() ) ! { pi->setLayer( 0 ); if( !layer ) *************** *** 647,651 **** packet.fromItem( pi ); for ( cUOSocket* socket = cNetwork::instance()->first(); socket != 0; socket = cNetwork::instance()->next() ) ! if( socket->player() && socket->player()->inRange( this, socket->player()->visualRange() ) ) socket->send( &packet ); } --- 647,651 ---- packet.fromItem( pi ); for ( cUOSocket* socket = cNetwork::instance()->first(); socket != 0; socket = cNetwork::instance()->next() ) ! if( socket->player() && socket->player()->inRange( this, socket->player()->visualRange() ) ) socket->send( &packet ); } *************** *** 682,686 **** P_ITEM pi = getBackpack(); ! if( pi ) number = pi->CountItems( ID, col ); --- 682,686 ---- P_ITEM pi = getBackpack(); ! if( pi ) number = pi->CountItems( ID, col ); *************** *** 698,702 **** } ! P_ITEM cBaseChar::getBackpack() { P_ITEM backpack = atLayer( Backpack ); --- 698,702 ---- } ! P_ITEM cBaseChar::getBackpack() { P_ITEM backpack = atLayer( Backpack ); *************** *** 729,733 **** cUObject::setSerial( ser ); ! World::instance()->registerObject( this ); } --- 729,733 ---- cUObject::setSerial( ser ); ! World::instance()->registerObject( this ); } *************** *** 741,747 **** } ! bool cBaseChar::Wears(P_ITEM pi) ! { ! return (this == pi->container()); } --- 741,747 ---- } ! bool cBaseChar::Wears(P_ITEM pi) ! { ! return (this == pi->container()); } *************** *** 789,793 **** textSpeech.setColor( color ); textSpeech.setText( emote ); ! for( cUOSocket *mSock = cNetwork::instance()->first(); mSock; mSock = cNetwork::instance()->next() ) if( mSock->player() && mSock->player()->inRange( this, mSock->player()->visualRange() ) ) --- 789,793 ---- textSpeech.setColor( color ); textSpeech.setText( emote ); ! for( cUOSocket *mSock = cNetwork::instance()->first(); mSock; mSock = cNetwork::instance()->next() ) if( mSock->player() && mSock->player()->inRange( this, mSock->player()->visualRange() ) ) *************** *** 797,801 **** UI16 cBaseChar::calcDefense( enBodyParts bodypart, bool wearout ) { ! P_ITEM pHitItem = NULL; UI16 total = bodyArmor_; // the body armor is base value --- 797,801 ---- UI16 cBaseChar::calcDefense( enBodyParts bodypart, bool wearout ) { ! P_ITEM pHitItem = NULL; UI16 total = bodyArmor_; // the body armor is base value *************** *** 803,816 **** { P_ITEM pShield = leftHandItem(); ! ! // Displayed AR = ((Parrying Skill * Base AR of Shield) ÷ 200) + 1 if( pShield && IsShield( pShield->id() ) ) total += ( (UI16)( (float)( skillValue( PARRYING ) * pShield->def() ) / 200.0f ) + 1 ); ! } ! if( skillValue( PARRYING ) >= 1000 ) ! total += 5; // gm parry bonus. ! P_ITEM pi; ItemContainer::const_iterator it = content_.begin(); --- 803,816 ---- { P_ITEM pShield = leftHandItem(); ! ! // Displayed AR = ((Parrying Skill * Base AR of Shield) �200) + 1 if( pShield && IsShield( pShield->id() ) ) total += ( (UI16)( (float)( skillValue( PARRYING ) * pShield->def() ) / 200.0f ) + 1 ); ! } ! if( skillValue( PARRYING ) >= 1000 ) ! total += 5; // gm parry bonus. ! P_ITEM pi; ItemContainer::const_iterator it = content_.begin(); *************** *** 818,826 **** { pi = *it; ! if( pi && pi->layer() > 1 && pi->layer() < 25 ) ! { ! //blackwinds new stuff UI16 effdef = 0; ! if( pi->maxhp() > 0 ) effdef = (UI16)( (float)pi->hp() / (float)pi->maxhp() * (float)pi->def() ); --- 818,826 ---- { pi = *it; ! if( pi && pi->layer() > 1 && pi->layer() < 25 ) ! { ! //blackwinds new stuff UI16 effdef = 0; ! if( pi->maxhp() > 0 ) effdef = (UI16)( (float)pi->hp() / (float)pi->maxhp() * (float)pi->def() ); *************** *** 834,903 **** } } ! else ! { ! switch( pi->layer() ) ! { ! case 5: ! case 13: ! case 17: ! case 20: ! case 22: ! if( bodypart == BODY ) ! { ! total += effdef; ! pHitItem = pi; ! } ! break; ! case 19: ! if( bodypart == ARMS ) ! { ! total += effdef; ! pHitItem = pi; ! } ! break; ! case 6: ! if( bodypart == HEAD ) ! { ! total += effdef; ! pHitItem = pi; ! } ! break; ! case 3: ! case 4: ! case 12: ! case 23: ! case 24: if( bodypart == LEGS ) ! { ! total += effdef; ! pHitItem = pi; ! } ! break; ! case 10: ! if( bodypart == NECK ) ! { ! total += effdef; ! pHitItem = pi; ! } ! break; ! case 7: if( bodypart == HANDS ) ! { ! total += effdef; ! pHitItem = pi; ! } ! break; ! default: ! break; ! } } } ++it; ! } ! if( pHitItem ) ! { ! // don't damage hairs, beard and backpack ! // important! this sometimes cause backpack destroy! if( pHitItem->layer() != 0x0B && pHitItem->layer() != 0x10 && pHitItem->layer() != 0x15 ) { --- 834,903 ---- } } ! else ! { ! switch( pi->layer() ) ! { ! case 5: ! case 13: ! case 17: ! case 20: ! case 22: ! if( bodypart == BODY ) ! { ! total += effdef; ! pHitItem = pi; ! } ! break; ! case 19: ! if( bodypart == ARMS ) ! { ! total += effdef; ! pHitItem = pi; ! } ! break; ! case 6: ! if( bodypart == HEAD ) ! { ! total += effdef; ! pHitItem = pi; ! } ! break; ! case 3: ! case 4: ! case 12: ! case 23: ! case 24: if( bodypart == LEGS ) ! { ! total += effdef; ! pHitItem = pi; ! } ! break; ! case 10: ! if( bodypart == NECK ) ! { ! total += effdef; ! pHitItem = pi; ! } ! break; ! case 7: if( bodypart == HANDS ) ! { ! total += effdef; ! pHitItem = pi; ! } ! break; ! default: ! break; ! } } } ++it; ! } ! if( pHitItem ) ! { ! // don't damage hairs, beard and backpack ! // important! this sometimes cause backpack destroy! if( pHitItem->layer() != 0x0B && pHitItem->layer() != 0x10 && pHitItem->layer() != 0x15 ) { *************** *** 905,911 **** } } ! // Base AR ? ! /*if( total < 2 && bodypart == ALLBODYPARTS ) total = 2;*/ --- 905,911 ---- } } ! // Base AR ? ! /*if( total < 2 && bodypart == ALLBODYPARTS ) total = 2;*/ *************** *** 916,920 **** { bool success = false; ! // Maximum Value of 120 for checks // I disabled this so you can make skillchecks for grandmasters that are still tough --- 916,920 ---- { bool success = false; ! // Maximum Value of 120 for checks // I disabled this so you can make skillchecks for grandmasters that are still tough *************** *** 923,928 **** // How far is the players skill above the required minimum. ! int charrange = skillValue( skill ) - min; ! if( charrange < 0 ) charrange = 0; --- 923,928 ---- // How far is the players skill above the required minimum. ! int charrange = skillValue( skill ) - min; ! if( charrange < 0 ) charrange = 0; *************** *** 934,944 **** // +100 means: *allways* a minimum of 10% for success float chance = ( ( (float) charrange * 890.0f ) / (float)( max - min ) ) + 100.0f; ! ! if( chance > 990 ) chance = 990; // *allways* a 1% chance of failure ! if( chance >= RandomNum( 0, 1000 ) ) success = true; ! return success; } --- 934,944 ---- // +100 means: *allways* a minimum of 10% for success float chance = ( ( (float) charrange * 890.0f ) / (float)( max - min ) ) + 100.0f; ! ! if( chance > 990 ) chance = 990; // *allways* a 1% chance of failure ! if( chance >= RandomNum( 0, 1000 ) ) success = true; ! return success; } *************** *** 1007,1011 **** } ++iter; ! } } --- 1007,1011 ---- } ++iter; ! } } *************** *** 1021,1025 **** if( TagName == "bindmenu" ) { ! if( !Tag->getAttribute( "id" ).isNull() ) this->setBindmenu(Tag->getAttribute( "id" )); else --- 1021,1025 ---- if( TagName == "bindmenu" ) { ! if( !Tag->getAttribute( "id" ).isNull() ) this->setBindmenu(Tag->getAttribute( "id" )); else *************** *** 1102,1106 **** stamina_ = maxStamina_; } ! else if( TagName == "int" ) { --- 1102,1106 ---- stamina_ = maxStamina_; } ! else if( TagName == "int" ) { *************** *** 1194,1198 **** mLayer = tInfo.layer; } ! if( !mLayer ) pItem->remove(); --- 1194,1198 ---- mLayer = tInfo.layer; } ! if( !mLayer ) pItem->remove(); *************** *** 1221,1225 **** setSkillValue( skillId, Value.toInt() ); } ! } --- 1221,1225 ---- setSkillValue( skillId, Value.toInt() ); } ! } *************** *** 1228,1232 **** // DoubleEquip is *NOT* allowed if ( atLayer( layer ) != 0 ) ! { log( LOG_WARNING, QString( "Trying to put an item on layer %1 which is already occupied\n" ).arg( layer ) ); pi->setContainer( 0 ); --- 1228,1232 ---- // DoubleEquip is *NOT* allowed if ( atLayer( layer ) != 0 ) ! { log( LOG_WARNING, QString( "Trying to put an item on layer %1 which is already occupied\n" ).arg( layer ) ); pi->setContainer( 0 ); *************** *** 1239,1243 **** if( layer != Dragging ) pi->onEquip( this, layer ); ! pi->removeFromCont(); } --- 1239,1243 ---- if( layer != Dragging ) pi->onEquip( this, layer ); ! pi->removeFromCont(); } *************** *** 1516,1520 **** else GET_PROPERTY( "invisible", isInvisible() ) else GET_PROPERTY( "frozen", isFrozen() ) ! // skill. else if( name.left( 6 ) == "skill." ) --- 1516,1520 ---- else GET_PROPERTY( "invisible", isInvisible() ) else GET_PROPERTY( "frozen", isFrozen() ) ! // skill. else if( name.left( 6 ) == "skill." ) *************** *** 1638,1647 **** { PyObject *args; ! if( dynamic_cast< P_CHAR >( source ) != 0 ) args = Py_BuildValue( "O&iiO&", PyGetCharObject, this, (unsigned int)type, amount, PyGetCharObject, source ); else if( dynamic_cast< P_ITEM >( source ) ) args = Py_BuildValue( "O&iiO&", PyGetCharObject, this, (unsigned int)type, amount, PyGetItemObject, source ); ! PyObject *result = cPythonScript::callChainedEvent( EVENT_DAMAGE, scriptChain, args ); --- 1638,1647 ---- { PyObject *args; ! if( dynamic_cast< P_CHAR >( source ) != 0 ) args = Py_BuildValue( "O&iiO&", PyGetCharObject, this, (unsigned int)type, amount, PyGetCharObject, source ); else if( dynamic_cast< P_ITEM >( source ) ) args = Py_BuildValue( "O&iiO&", PyGetCharObject, this, (unsigned int)type, amount, PyGetItemObject, source ); ! PyObject *result = cPythonScript::callChainedEvent( EVENT_DAMAGE, scriptChain, args ); *************** *** 1675,1679 **** updateHealth(); Combat::playGetHitSoundEffect( this ); ! Combat::playGetHitAnimation( this ); } --- 1675,1679 ---- updateHealth(); Combat::playGetHitSoundEffect( this ); ! Combat::playGetHitAnimation( this ); } *************** *** 1717,1721 **** if( type == Bark_GetHit ) return; ! // Only Attack, Hit, GetHit and Death case 3: --- 1717,1721 ---- if( type == Bark_GetHit ) return; ! // Only Attack, Hit, GetHit and Death case 3: *************** *** 1844,1848 **** { bool result = false; ! if( scriptChain ) { --- 1844,1848 ---- { bool result = false; ! if( scriptChain ) { *************** *** 1858,1862 **** { bool result = false; ! if( scriptChain ) { --- 1858,1862 ---- { bool result = false; ! if( scriptChain ) { *************** *** 1872,1876 **** { bool result = false; ! if( scriptChain ) { --- 1872,1876 ---- { bool result = false; ! if( scriptChain ) { *************** *** 1886,1890 **** { bool result = false; ! if( scriptChain ) { --- 1886,1890 ---- { bool result = false; ! if( scriptChain ) { *************** *** 1902,1910 **** } ! bool cBaseChar::onSkillUse( unsigned char skill ) { cPythonScript *global = ScriptManager::instance()->getGlobalHook( EVENT_SKILLUSE ); bool result = false; ! if( scriptChain || global ) { --- 1902,1910 ---- } ! bool cBaseChar::onSkillUse( unsigned char skill ) { cPythonScript *global = ScriptManager::instance()->getGlobalHook( EVENT_SKILLUSE ); bool result = false; ! if( scriptChain || global ) { *************** *** 1925,1929 **** { bool result = false; ! if( scriptChain ) { --- 1925,1929 ---- { bool result = false; ! if( scriptChain ) { *************** *** 1967,1971 **** { bool result = false; ! if( scriptChain ) { --- 1967,1971 ---- { bool result = false; ! if( scriptChain ) { *************** *** 1981,1985 **** cPythonScript *global = ScriptManager::instance()->getGlobalHook( EVENT_CHLEVELCHANGE ); bool result = false; ! if( scriptChain || global ) { --- 1981,1985 ---- cPythonScript *global = ScriptManager::instance()->getGlobalHook( EVENT_CHLEVELCHANGE ); bool result = false; ! if( scriptChain || global ) { *************** *** 2001,2005 **** cPythonScript *global = ScriptManager::instance()->getGlobalHook( EVENT_SHOWTOOLTIP ); bool result = false; ! if( scriptChain || global ) { --- 2001,2005 ---- cPythonScript *global = ScriptManager::instance()->getGlobalHook( EVENT_SHOWTOOLTIP ); bool result = false; ! if( scriptChain || global ) { *************** *** 2021,2025 **** cPythonScript *global = ScriptManager::instance()->getGlobalHook( EVENT_SKILLGAIN ); bool result = false; ! if( scriptChain || global ) { --- 2021,2025 ---- cPythonScript *global = ScriptManager::instance()->getGlobalHook( EVENT_SKILLGAIN ); bool result = false; ! if( scriptChain || global ) { *************** *** 2041,2045 **** cPythonScript *global = ScriptManager::instance()->getGlobalHook( EVENT_STATGAIN ); bool result = false; ! if( scriptChain || global ) { --- 2041,2045 ---- cPythonScript *global = ScriptManager::instance()->getGlobalHook( EVENT_STATGAIN ); bool result = false; ! if( scriptChain || global ) { Index: boats.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/boats.cpp,v retrieving revision 1.116 retrieving revision 1.117 diff -C2 -d -r1.116 -r1.117 *** boats.cpp 24 Sep 2003 21:19:47 -0000 1.116 --- boats.cpp 30 Jan 2004 20:29:26 -0000 1.117 *************** *** 53,57 **** #undef DBGFILE ! #define DBGFILE "boats.cpp" cBoat::cBoat() : cMulti() --- 53,57 ---- #undef DBGFILE ! #define DBGFILE "boats.cpp" cBoat::cBoat() : cMulti() *************** *** 69,73 **** this->itemids[2][0] = this->itemids[0][2] = 0x3EB2; this->itemids[3][0] = this->itemids[1][2] = 0x3E85; ! this->itemids[0][1] = this->itemids[2][3] = 0x3ED5; this->itemids[1][1] = this->itemids[3][3] = 0x3E89; --- 69,73 ---- this->itemids[2][0] = this->itemids[0][2] = 0x3EB2; this->itemids[3][0] = this->itemids[1][2] = 0x3E85; ! this->itemids[0][1] = this->itemids[2][3] = 0x3ED5; this->itemids[1][1] = this->itemids[3][3] = 0x3E89; *************** *** 162,168 **** pTiller->setTag("gatetime", (int)(uiCurrentTime + (double)(SrvParams->boatSpeed()*MY_CLOCKS_PER_SEC))); } ! P_ITEM pPlankR = cItem::createFromId( this->itemids[0][ PORT_P_C ] ); ! if( !pPlankR ) siproblem = 1; else --- 162,168 ---- pTiller->setTag("gatetime", (int)(uiCurrentTime + (double)(SrvParams->boatSpeed()*MY_CLOCKS_PER_SEC))); } ! P_ITEM pPlankR = cItem::createFromId( this->itemids[0][ PORT_P_C ] ); ! if( !pPlankR ) siproblem = 1; else *************** *** 241,245 **** socket->send( &uoResume ); } ! this->SetOwnSerial( pc_currchar->serial() ); } --- 241,245 ---- socket->send( &uoResume ); } ! this->SetOwnSerial( pc_currchar->serial() ); } *************** *** 373,377 **** coord = Y; } ! if( coord < 0xFF ) { --- 373,377 ---- coord = Y; } ! if( coord < 0xFF ) { *************** *** 415,425 **** if( mapblocks ) return false; ! /* RegionIterator4Items ri( Coord_cl( multi.x + posx, multi.y + posy, pos().z, pos.map ) ); ! for( ri.Begin(); !ri.atEnd(); ri++ ) { P_ITEM pi = ri.GetData(); ! if( ( pi != NULL ) && ( pi->serial() != this->serial() ) && ( pi->pos().x == (multi.x + posx) ) && ( pi->pos().y == (multi.y + posy) ) ) return false; } --- 415,425 ---- if( mapblocks ) return false; ! /* RegionIterator4Items ri( Coord_cl( multi.x + posx, multi.y + posy, pos().z, pos.map ) ); ! for( ri.Begin(); !ri.atEnd(); ri++ ) { P_ITEM pi = ri.GetData(); ! if( ( pi != NULL ) && ( pi->serial() != this->serial() ) && ( pi->pos().x == (multi.x + posx) ) && ( pi->pos().y == (multi.y + posy) ) ) return false; } *************** *** 434,448 **** if( pTiller == NULL ) return; ! P_ITEM pPortplank = FindItemBySerial( this->itemserials[ PORT_PLANK ] ); ! if( pPortplank == NULL ) return; P_ITEM pStarplank = FindItemBySerial( this->itemserials[ STARB_PLANK ] ); ! if( pStarplank == NULL ) return; P_ITEM pHold = FindItemBySerial( this->itemserials[ HOLD ] ); ! if( pHold == NULL ) return; --- 434,448 ---- if( pTiller == NULL ) return; ! P_ITEM pPortplank = FindItemBySerial( this->itemserials[ PORT_PLANK ] ); ! if( pPortplank == NULL ) return; P_ITEM pStarplank = FindItemBySerial( this->itemserials[ STARB_PLANK ] ); ! if( pStarplank == NULL ) return; P_ITEM pHold = FindItemBySerial( this->itemserials[ HOLD ] ); ! if( pHold == NULL ) return; *************** *** 459,463 **** newboatdir+=2; } ! else if( turn < 0 ) { if( this->boatdir <= 1 ) --- 459,463 ---- newboatdir+=2; } ! else if( turn < 0 ) { if( this->boatdir <= 1 ) *************** *** 476,483 **** uoPacket.pause(); RegionIterator4Chars ri( pos() ); ! for( ri.Begin(); !ri.atEnd(); ri++ ) { P_PLAYER pc = dynamic_cast<P_PLAYER>(ri.GetData()); ! if( pc != NULL ) { cUOSocket* socket = pc->socket(); --- 476,483 ---- uoPacket.pause(); RegionIterator4Chars ri( pos() ); ! for( ri.Begin(); !ri.atEnd(); ri++ ) { P_PLAYER pc = dynamic_cast<P_PLAYER>(ri.GetData()); ! if( pc != NULL ) { cUOSocket* socket = pc->socket(); *************** *** 501,505 **** this->id_ = this->multiids_[ shortboatdir ]; this->boatdir = newboatdir; ! // turn all items and chars on the boat and send them QValueList< SERIAL > toremove; --- 501,505 ---- this->id_ = this->multiids_[ shortboatdir ]; this->boatdir = newboatdir; ! // turn all items and chars on the boat and send them QValueList< SERIAL > toremove; *************** *** 511,515 **** if( pc && pc->pos().x != 0 && pc->pos().y != 0 && pc->pos().z != 0 ) // dont move mounted animals, that were mounted when user was on boat { ! UI16 newx = pc->pos().x; UI16 newy = pc->pos().y; dx = this->pos().x - newx; --- 511,515 ---- if( pc && pc->pos().x != 0 && pc->pos().y != 0 && pc->pos().z != 0 ) // dont move mounted animals, that were mounted when user was on boat { ! UI16 newx = pc->pos().x; UI16 newy = pc->pos().y; dx = this->pos().x - newx; *************** *** 608,622 **** pPortplank->pos().z ); pPortplank->setId( itemids[shortboatdir][PORT_P_C] ); ! pStarplank->MoveTo( pos().x + itemoffsets[shortboatdir][STARB_PLANK][X], pos().y + itemoffsets[shortboatdir][STARB_PLANK][Y], pStarplank->pos().z ); pStarplank->setId( itemids[shortboatdir][STAR_P_C] ); ! pTiller->MoveTo( pos().x + itemoffsets[shortboatdir][TILLER][X], pos().y + itemoffsets[shortboatdir][TILLER][Y], pTiller->pos().z ); pTiller->setId( itemids[shortboatdir][TILLER_ID] ); ! pHold->MoveTo( pos().x + itemoffsets[shortboatdir][HOLD][X], pos().y + itemoffsets[shortboatdir][HOLD][Y], --- 608,622 ---- pPortplank->pos().z ); pPortplank->setId( itemids[shortboatdir][PORT_P_C] ); ! pStarplank->MoveTo( pos().x + itemoffsets[shortboatdir][STARB_PLANK][X], pos().y + itemoffsets[shortboatdir][STARB_PLANK][Y], pStarplank->pos().z ); pStarplank->setId( itemids[shortboatdir][STAR_P_C] ); ! pTiller->MoveTo( pos().x + itemoffsets[shortboatdir][TILLER][X], pos().y + itemoffsets[shortboatdir][TILLER][Y], pTiller->pos().z ); pTiller->setId( itemids[shortboatdir][TILLER_ID] ); ! pHold->MoveTo( pos().x + itemoffsets[shortboatdir][HOLD][X], pos().y + itemoffsets[shortboatdir][HOLD][Y], *************** *** 656,670 **** if( pTiller == NULL ) return false; ! P_ITEM pPortplank = FindItemBySerial( this->itemserials[ PORT_PLANK ] ); ! if( pPortplank == NULL ) return false; P_ITEM pStarplank = FindItemBySerial( this->itemserials[ STARB_PLANK ] ); ! if( pStarplank == NULL ) return false; P_ITEM pHold = FindItemBySerial( this->itemserials[ HOLD ] ); ! if( pHold == NULL ) return false; --- 656,670 ---- if( pTiller == NULL ) return false; ! P_ITEM pPortplank = FindItemBySerial( this->itemserials[ PORT_PLANK ] ); ! if( pPortplank == NULL ) return false; P_ITEM pStarplank = FindItemBySerial( this->itemserials[ STARB_PLANK ] ); ! if( pStarplank == NULL ) return false; P_ITEM pHold = FindItemBySerial( this->itemserials[ HOLD ] ); ! if( pHold == NULL ) return false; *************** *** 673,677 **** switch( this->boatdir ) { ! case 0: dx += shift_; dy -= moves_; --- 673,677 ---- switch( this->boatdir ) { ! case 0: dx += shift_; dy -= moves_; *************** *** 681,689 **** dy += shift_; break; ! case 4: dx -= shift_; dy += moves_; break; ! case 6: dx -= moves_; dy -= shift_; --- 681,689 ---- dy += shift_; break; ! case 4: dx -= shift_; dy += moves_; break; ! case 6: dx -= moves_; dy -= shift_; *************** *** 716,723 **** uoPacket.pause(); RegionIterator4Chars ri( pos() ); ! for( ri.Begin(); !ri.atEnd(); ri++ ) { P_PLAYER pc = dynamic_cast<P_PLAYER>(ri.GetData()); ! if( pc ) { cUOSocket* socket = pc->socket(); --- 716,723 ---- uoPacket.pause(); RegionIterator4Chars ri( pos() ); ! for( ri.Begin(); !ri.atEnd(); ri++ ) { P_PLAYER pc = dynamic_cast<P_PLAYER>(ri.GetData()); ! if( pc ) { cUOSocket* socket = pc->socket(); *************** *** 879,883 **** UI16 x, y; SI08 z; ! switch( this->boatdir ) { case 0: --- 879,883 ---- UI16 x, y; SI08 z; ! switch( this->boatdir ) { case 0: *************** *** 894,898 **** return; } ! z = pos().z + 3; pc_currchar->MoveTo( x, y, z ); --- 894,898 ---- return; } ! z = pos().z + 3; pc_currchar->MoveTo( x, y, z ); *************** *** 903,911 **** else { ! if( leave( socket, pplank ) ) { socket->sysMessage( tr("You left the boat.") ); ! } ! else { socket->sysMessage( tr("You cannot get off here!") ); --- 903,911 ---- else { ! if( leave( socket, pplank ) ) { socket->sysMessage( tr("You left the boat.") ); ! } ! else { socket->sysMessage( tr("You cannot get off here!") ); *************** *** 921,925 **** UI16 x, y, x0, y0, x1, y1; ! switch( this->boatdir ) { case 0: --- 921,925 ---- UI16 x, y, x0, y0, x1, y1; ! switch( this->boatdir ) { case 0: *************** *** 941,945 **** } UI16 tmp; ! if (x0 > x1) { tmp = x0; --- 941,945 ---- } UI16 tmp; ! if (x0 > x1) { tmp = x0; *************** *** 947,951 **** x1 = tmp; } ! if (y0 > y1) { tmp = y0; --- 947,951 ---- x1 = tmp; } ! if (y0 > y1) { tmp = y0; *************** *** 955,971 **** signed char sz, mz, z; bool check = false; ! for( x = x0; x <= x1; x++ ) { ! for( y = y0; y <= y1; y++) { sz = Map->staticTop( Coord_cl( x, y, 0, 0) ); mz = Map->mapElevation( Coord_cl( x, y, 0, 0) ); ! if( (sz == ILLEGAL_Z) && (mz != -5) ) { z = mz; check = true; break; ! } ! else if( (sz != ILLEGAL_Z) && (sz != -5) ) { z = sz; --- 955,971 ---- signed char sz, mz, z; bool check = false; ! for( x = x0; x <= x1; x++ ) { ! for( y = y0; y <= y1; y++) { sz = Map->staticTop( Coord_cl( x, y, 0, 0) ); mz = Map->mapElevation( Coord_cl( x, y, 0, 0) ); ! if( (sz == ILLEGAL_Z) && (mz != -5) ) { z = mz; check = true; break; ! } ! else if( (sz != ILLEGAL_Z) && (sz != -5) ) { z = sz; *************** *** 975,984 **** } ! if( check ) break; } ! if( !check ) return false; --- 975,984 ---- } ! if( check ) break; } ! if( !check ) return false; *************** *** 1009,1019 **** UI08 shortboatdir = this->boatdir / 2; if( pplank->id() == this->itemids[ shortboatdir ][PORT_P_C] ) ! pplank->setId( this->itemids[ shortboatdir ][PORT_P_O] ); else if( pplank->id() == this->itemids[ shortboatdir ][PORT_P_O] ) ! pplank->setId( this->itemids[ shortboatdir ][PORT_P_C] ); else if( pplank->id() == this->itemids[ shortboatdir ][STAR_P_C] ) ! pplank->setId( this->itemids[ shortboatdir ][STAR_P_O] ); else if( pplank->id() == this->itemids[ shortboatdir ][STAR_P_O] ) ! pplank->setId( this->itemids[ shortboatdir ][STAR_P_C] ); } --- 1009,1019 ---- UI08 shortboatdir = this->boatdir / 2; if( pplank->id() == this->itemids[ shortboatdir ][PORT_P_C] ) ! pplank->setId( this->itemids[ shortboatdir ][PORT_P_O] ); else if( pplank->id() == this->itemids[ shortboatdir ][PORT_P_O] ) ! pplank->setId( this->itemids[ shortboatdir ][PORT_P_C] ); else if( pplank->id() == this->itemids[ shortboatdir ][STAR_P_C] ) ! pplank->setId( this->itemids[ shortboatdir ][STAR_P_O] ); else if( pplank->id() == this->itemids[ shortboatdir ][STAR_P_O] ) ! pplank->setId( this->itemids[ shortboatdir ][STAR_P_C] ); } *************** *** 1022,1026 **** SERIAL serial; ! if( !socket || !socket->player() ) return 0; --- 1022,1026 ---- SERIAL serial; ! if( !socket || !socket->player() ) return 0; *************** *** 1029,1036 **** //get the tiller man's item # serial = this->itemserials[ TILLER ]; ! if ( serial == INVALID_SERIAL ) return 0; P_ITEM tiller = FindItemBySerial( serial ); ! if ( tiller == NULL ) return 0; --- 1029,1036 ---- //get the tiller man's item # serial = this->itemserials[ TILLER ]; ! if ( serial == INVALID_SERIAL ) return 0; P_ITEM tiller = FindItemBySerial( serial ); ! if ( tiller == NULL ) return 0; *************** *** 1130,1141 **** // khpae - make deed from a boat ! void cBoat::toDeed( cUOSocket* socket ) { P_PLAYER pc = socket->player(); ! if ( !pc ) return; // if player is in boat ! if ( inMulti( pc->pos() ) ) { socket->sysMessage ( tr("You must leave the boat to do this.") ); --- 1130,1141 ---- // khpae - make deed from a boat ! void cBoat::toDeed( cUOSocket* socket ) { P_PLAYER pc = socket->player(); ! if ( !pc ) return; // if player is in boat ! if ( inMulti( pc->pos() ) ) { socket->sysMessage ( tr("You must leave the boat to do this.") ); *************** *** 1145,1149 **** // check if the player has the boat key ! if ( !authorized( pc ) ) { socket->sysMessage ( tr("You are not allowed to do this!") ); --- 1145,1149 ---- // check if the player has the boat key ! if ( !authorized( pc ) ) { socket->sysMessage ( tr("You are not allowed to do this!") ); *************** *** 1151,1155 **** } ! if( items_.size() > 0 || chars_.size() > 0 ) { socket->sysMessage ( tr("The boat is not empty.") ); --- 1151,1155 ---- } ! if( items_.size() > 0 || chars_.size() > 0 ) { socket->sysMessage ( tr("The boat is not empty.") ); *************** *** 1163,1167 **** P_ITEM pDeed = cItem::createFromScript( this->deedsection_ ); ! if( !pDeed ) socket->sysMessage ( tr("An error occured. Send a bug report to the staff, please.") ); else --- 1163,1167 ---- P_ITEM pDeed = cItem::createFromScript( this->deedsection_ ); ! if( !pDeed ) socket->sysMessage ( tr("An error occured. Send a bug report to the staff, please.") ); else *************** *** 1174,1188 **** if( pTiller != NULL ) pTiller->remove(); ! P_ITEM pPortplank = FindItemBySerial( this->itemserials[ PORT_PLANK ] ); ! if( pPortplank != NULL ) pPortplank->remove(); P_ITEM pStarplank = FindItemBySerial( this->itemserials[ STARB_PLANK ] ); ! if( pStarplank != NULL ) pStarplank->remove(); P_ITEM pHold = FindItemBySerial( this->itemserials[ HOLD ] ); ! if( pHold != NULL ) pHold->remove(); --- 1174,1188 ---- if( pTiller != NULL ) pTiller->remove(); ! P_ITEM pPortplank = FindItemBySerial( this->itemserials[ PORT_PLANK ] ); ! if( pPortplank != NULL ) pPortplank->remove(); P_ITEM pStarplank = FindItemBySerial( this->itemserials[ STARB_PLANK ] ); ! if( pStarplank != NULL ) pStarplank->remove(); P_ITEM pHold = FindItemBySerial( this->itemserials[ HOLD ] ); ! if( pHold != NULL ) pHold->remove(); *************** *** 1201,1205 **** QStringList fields, tables, conditions; buildSqlString( fields, tables, conditions ); // Build our SQL string ! QString sqlString = QString( "SELECT %1 FROM uobjectmap,%2 WHERE uobjectmap.type = 'cBoat' AND %3" ).arg( fields.join( "," ) ).arg( tables.join( "," ) ).arg( conditions.join( " AND " ) ); UObjectFactory::instance()->registerType("cBoat", productCreator); UObjectFactory::instance()->registerSqlQuery( "cBoat", sqlString ); --- 1201,1205 ---- QStringList fields, tables, conditions; buildSqlString( fields, tables, conditions ); // Build our SQL string ! QString sqlString = QString( "SELECT %1 FROM `uobjectmap`,%2 WHERE uobjectmap.type = 'cBoat' AND %3" ).arg( fields.join( "," ) ).arg( tables.join( "," ) ).arg( conditions.join( " AND " ) ); UObjectFactory::instance()->registerType("cBoat", productCreator); UObjectFactory::instance()->registerSqlQuery( "cBoat", sqlString ); *************** *** 1217,1221 **** { cMulti::load( result, offset ); ! autosail_ = atoi( result[offset++] ); boatdir = atoi( result[offset++] ); --- 1217,1221 ---- { cMulti::load( result, offset ); ! autosail_ = atoi( result[offset++] ); boatdir = atoi( result[offset++] ); *************** *** 1229,1233 **** // Load the other tables ! QString sql = "SELECT boats_itemids.a,boats_itemids.b,boats_itemids.id FROM boats_itemids WHERE serial = '" + QString::number( serial() ) + "'"; cDBResult res = persistentBroker->query( sql ); --- 1229,1233 ---- // Load the other tables ! QString sql = "SELECT `a`,`b`,`id` FROM `boats_itemids` WHERE `serial` = '" + QString::number( serial() ) + "'"; cDBResult res = persistentBroker->query( sql ); *************** *** 1253,1260 **** res.free(); ! sql = "SELECT boats_itemoffsets.a,boats_itemoffsets.b,boats_itemoffsets.c,boats_itemoffsets.offset FROM boats_itemoffsets WHERE serial = '" + QString::number( serial() ) + "'"; res = persistentBroker->query( sql ); ! // Error Checking if( !res.isValid() ) throw persistentBroker->lastError(); --- 1253,1260 ---- res.free(); ! sql = "SELECT `a`,`b`,`c`,`offset` FROM `boats_itemoffsets` WHERE `serial` = '" + QString::number( serial() ) + "'"; res = persistentBroker->query( sql ); ! // Error Checking if( !res.isValid() ) throw persistentBroker->lastError(); *************** *** 1303,1307 **** saveFields; ! // Save the other tables as well for( i = 0; i < 4; i ++ ) { --- 1303,1307 ---- saveFields; ! // Save the other tables as well for( i = 0; i < 4; i ++ ) { *************** *** 1347,1353 **** return false; ! persistentBroker->addToDeleteQueue( "boats", QString( "serial = '%1'" ).arg( serial() ) ); ! persistentBroker->addToDeleteQueue( "boats_itemoffsets", QString( "serial = '%1'" ).arg( serial() ) ); ! persistentBroker->addToDeleteQueue( "boats_itemids", QString( "serial = '%1'" ).arg( serial() ) ); return cMulti::del(); --- 1347,1353 ---- return false; ! persistentBroker->addToDeleteQueue( "boats", QString( "`serial` = '%1'" ).arg( serial() ) ); ! persistentBroker->addToDeleteQueue( "boats_itemoffsets", QString( "`serial` = '%1'" ).arg( serial() ) ); ! persistentBroker->addToDeleteQueue( "boats_itemids", QString( "`serial` = '%1'" ).arg( serial() ) ); return cMulti::del(); Index: corpse.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/corpse.cpp,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** corpse.cpp 14 Sep 2003 16:31:48 -0000 1.37 --- corpse.cpp 30 Jan 2004 20:29:27 -0000 1.38 *************** *** 56,60 **** QStringList fields, tables, conditions; buildSqlString( fields, tables, conditions ); // Build our SQL string ! QString sqlString = QString( "SELECT %1 FROM uobjectmap,%2 WHERE uobjectmap.type = 'cCorpse' AND %3" ).arg( fields.join( "," ) ).arg( tables.join( "," ) ).arg( conditions.join( " AND " ) ); UObjectFactory::instance()->registerType("cCorpse", productCreator); UObjectFactory::instance()->registerSqlQuery( "cCorpse", sqlString ); --- 56,60 ---- QStringList fields, tables, conditions; buildSqlString( fields, tables, conditions ); // Build our SQL string ! QString sqlString = QString( "SELECT %1 FROM `uobjectmap`,%2 WHERE uobjectmap.type = 'cCorpse' AND %3" ).arg( fields.join( "," ) ).arg( tables.join( "," ) ).arg( conditions.join( " AND " ) ); UObjectFactory::instance()->registerType("cCorpse", productCreator); UObjectFactory::instance()->registerSqlQuery( "cCorpse", sqlString ); *************** *** 79,84 **** // Get the corpse equipment ! QString sql = "SELECT corpses_equipment.layer,corpses_equipment.item FROM corpses_equipment WHERE serial = '" + QString::number( serial() ) + "'"; ! cDBResult res = persistentBroker->query( sql ); --- 79,84 ---- // Get the corpse equipment ! QString sql = "SELECT `serial`,`layer`,`item` FROM `corpses_equipment` WHERE `serial` = '" + QString::number( serial() ) + "'"; ! cDBResult res = persistentBroker->query( sql ); *************** *** 97,101 **** initSave; setTable( "corpses" ); ! addField( "serial", serial() ); addField( "bodyid", bodyId_ ); --- 97,101 ---- initSave; setTable( "corpses" ); ! addField( "serial", serial() ); addField( "bodyid", bodyId_ ); *************** *** 111,119 **** if( isPersistent ) { ! persistentBroker->executeQuery( QString( "DELETE FROM corpses_equipment WHERE serial = '%1'" ).arg( serial() ) ); } for( map< UINT8, SERIAL >::iterator it = equipment_.begin(); it != equipment_.end(); ++it ) ! persistentBroker->executeQuery( QString( "REPLACE INTO corpses_equipment VALUES(%1,%2,%3)" ).arg( serial() ).arg( it->first ).arg( it->second ) ); cItem::save(); --- 111,119 ---- if( isPersistent ) { ! persistentBroker->executeQuery( QString( "DELETE FROM `corpses_equipment` WHERE `serial` = '%1'" ).arg( serial() ) ); } for( map< UINT8, SERIAL >::iterator it = equipment_.begin(); it != equipment_.end(); ++it ) ! persistentBroker->executeQuery( QString( "REPLACE INTO `corpses_equipment` VALUES(%1,%2,%3)" ).arg( serial() ).arg( it->first ).arg( it->second ) ); cItem::save(); *************** *** 125,130 **** return false; ! persistentBroker->addToDeleteQueue( "corpses", QString( "serial = '%1'" ).arg( serial() ) ); ! persistentBroker->addToDeleteQueue( "corpses_equipment", QString( "serial = '%1'" ).arg( serial() ) ); return cItem::del(); --- 125,130 ---- return false; ! persistentBroker->addToDeleteQueue( "corpses", QString( "`serial` = '%1'" ).arg( serial() ) ); ! persistentBroker->addToDeleteQueue( "corpses_equipment", QString( "`serial` = '%1'" ).arg( serial() ) ); return cItem::del(); *************** *** 155,159 **** corpseEquip.setSerial( serial() ); ! for( map< UINT8, SERIAL >::iterator it = equipment_.begin(); it != equipment_.end(); ++it ) { --- 155,159 ---- corpseEquip.setSerial( serial() ); ! for( map< UINT8, SERIAL >::iterator it = equipment_.begin(); it != equipment_.end(); ++it ) { *************** *** 205,209 **** mSock->send( &sendItem ); mSock->send( &corpseEquip ); ! mSock->send( &corpseContent ); } } --- 205,209 ---- mSock->send( &sendItem ); mSock->send( &corpseEquip ); ! mSock->send( &corpseContent ); } } Index: house.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/house.cpp,v retrieving revision 1.119 retrieving revision 1.120 diff -C2 -d -r1.119 -r1.120 *** house.cpp 22 Dec 2003 12:11:35 -0000 1.119 --- house.cpp 30 Jan 2004 20:29:27 -0000 1.120 *************** *** 64,68 **** { nItem = cItem::createFromScript( id ); ! } if( nItem ) --- 64,68 ---- { nItem = cItem::createFromScript( id ); ! } if( nItem ) *************** *** 81,85 **** { const cElement *childTag = Tag->getChild( i ); ! QString TagName = childTag->name(); QString Value = childTag->getValue(); --- 81,85 ---- { const cElement *childTag = Tag->getChild( i ); ! QString TagName = childTag->name(); QString Value = childTag->getValue(); *************** *** 147,151 **** if( mapTile.flag1 & 0x40 || mapTile.flag1 & 0x80 ) return false; ! StaticsIterator msi = Map->staticsIterator( multipos ); while( !msi.atEnd() ) --- 147,151 ---- if( mapTile.flag1 & 0x40 || mapTile.flag1 & 0x80 ) return false; ! StaticsIterator msi = Map->staticsIterator( multipos ); while( !msi.atEnd() ) *************** *** 156,162 **** ++msi; } ! RegionIterator4Items ri( multipos ); ! for( ri.Begin(); !ri.atEnd(); ri++ ) { P_ITEM pi = ri.GetData(); --- 156,162 ---- ++msi; } ! RegionIterator4Items ri( multipos ); ! for( ri.Begin(); !ri.atEnd(); ri++ ) { P_ITEM pi = ri.GetData(); *************** *** 242,246 **** si->update(); } ! pc_currchar->MoveTo( this->pos().x + charpos_.x, this->pos().y + charpos_.y, this->pos().z + charpos_.z ); pc_currchar->resend(); --- 242,246 ---- si->update(); } ! pc_currchar->MoveTo( this->pos().x + charpos_.x, this->pos().y + charpos_.y, this->pos().z + charpos_.z ); pc_currchar->resend(); *************** *** 298,302 **** this->remove(); ! if( this->deedsection_.isNull() || this->deedsection_.isEmpty() || !pBackpack ) { --- 298,302 ---- this->remove(); ! if( this->deedsection_.isNull() || this->deedsection_.isEmpty() || !pBackpack ) { *************** *** 306,310 **** P_ITEM pDeed = cItem::createFromScript( this->deedsection_ ); ! if( pDeed ) { pBackpack->addItem( pDeed ); --- 306,310 ---- P_ITEM pDeed = cItem::createFromScript( this->deedsection_ ); ! if( pDeed ) { pBackpack->addItem( pDeed ); *************** *** 336,340 **** initSave; setTable( "houses" ); ! addField( "serial", serial() ); addField( "nokey", nokey_ ); --- 336,340 ---- initSave; setTable( "houses" ); ! addField( "serial", serial() ); addField( "nokey", nokey_ ); *************** *** 354,358 **** return false; ! persistentBroker->addToDeleteQueue( "houses", QString( "serial = '%1'" ).arg( serial() ) ); return cMulti::del(); --- 354,358 ---- return false; ! persistentBroker->addToDeleteQueue( "houses", QString( "`serial` = '%1'" ).arg( serial() ) ); return cMulti::del(); *************** *** 368,372 **** QStringList fields, tables, conditions; buildSqlString( fields, tables, conditions ); // Build our SQL string ! QString sqlString = QString( "SELECT %1 FROM uobjectmap,%2 WHERE uobjectmap.type = 'cHouse' AND %3" ).arg( fields.join( "," ) ).arg( tables.join( "," ) ).arg( conditions.join( " AND " ) ); UObjectFactory::instance()->registerType("cHouse", productCreator); UObjectFactory::instance()->registerSqlQuery( "cHouse", sqlString ); --- 368,372 ---- QStringList fields, tables, conditions; buildSqlString( fields, tables, conditions ); // Build our SQL string ! QString sqlString = QString( "SELECT %1 FROM `uobjectmap`,%2 WHERE uobjectmap.type = 'cHouse' AND %3" ).arg( fields.join( "," ) ).arg( tables.join( "," ) ).arg( conditions.join( " AND " ) ); UObjectFactory::instance()->registerType("cHouse", productCreator); UObjectFactory::instance()->registerSqlQuery( "cHouse", sqlString ); *************** *** 384,393 **** cUOTxCustomHouse customhouse; customhouse.setSerial( this->serial() ); ! customhouse.setCompression( 0 ); customhouse.setRevision( this->revision() ); for( UINT32 i = 0; i < chtiles_.count(); i++ ) customhouse.addTile( chtiles_[i].model(), chtiles_[i].pos() ); ! socket->send( &deed ); socket->send( &customhouse ); --- 384,393 ---- cUOTxCustomHouse customhouse; customhouse.setSerial( this->serial() ); ! customhouse.setCompression( 0 ); customhouse.setRevision( this->revision() ); for( UINT32 i = 0; i < chtiles_.count(); i++ ) customhouse.addTile( chtiles_[i].model(), chtiles_[i].pos() ); ! socket->send( &deed ); socket->send( &customhouse ); Index: items.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/items.cpp,v retrieving revision 1.366 retrieving revision 1.367 diff -C2 -d -r1.366 -r1.367 *** items.cpp 29 Jan 2004 23:56:32 -0000 1.366 --- items.cpp 30 Jan 2004 20:29:28 -0000 1.367 *************** *** 93,97 **** cItemBase *itembase = new cItemBase; itembase->id_ = id; ! itembases.insert( id, itembase ); } --- 93,97 ---- cItemBase *itembase = new cItemBase; itembase->id_ = id; ! itembases.insert( id, itembase ); [...1025 lines suppressed...] else if( name == "corpse" ) --- 2211,2215 ---- else if( name == "dye" ) { ! setDye( value.toInt() != 0 ? true : false ); } else if( name == "corpse" ) *************** *** 2243,2247 **** else GET_PROPERTY( "owner", owner() ) else GET_PROPERTY( "totalweight", totalweight_ ) ! // container else if( name == "container" ) --- 2243,2247 ---- else GET_PROPERTY( "owner", owner() ) else GET_PROPERTY( "totalweight", totalweight_ ) ! // container else if( name == "container" ) Index: multis.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/multis.cpp,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** multis.cpp 8 Jan 2004 23:43:57 -0000 1.36 --- multis.cpp 30 Jan 2004 20:29:30 -0000 1.37 *************** *** 51,55 **** #undef DBGFILE ! #define DBGFILE "multis.cpp" cMulti::cMulti() --- 51,55 ---- #undef DBGFILE ! #define DBGFILE "multis.cpp" cMulti::cMulti() *************** *** 72,83 **** { cItem::load( result, offset ); ! coowner_ = atoi( result[offset++] ); deedsection_ = result[offset++]; // Load from two additional tables here ! QString sql = "SELECT multis_bans.serial,multis_bans.ban FROM multis_bans WHERE multis_bans.serial = '" + QString::number( serial() ) + "'"; ! cDBResult res = persistentBroker->query( sql ); while( res.fetchrow() ) --- 72,83 ---- { cItem::load( result, offset ); ! coowner_ = atoi( result[offset++] ); deedsection_ = result[offset++]; // Load from two additional tables here ! QString sql = "SELECT `serial`,`ban` FROM `multis_bans` WHERE `serial` = '" + QString::number( serial() ) + "'"; ! cDBResult res = persistentBroker->query( sql ); while( res.fetchrow() ) *************** *** 93,97 **** res.free(); ! sql = "SELECT multis_friends.serial,multis_friends.friend FROM multis_friends WHERE multis_friends.serial = '" + QString::number( serial() ) + "'"; res = persistentBroker->query( sql ); --- 93,97 ---- res.free(); ! sql = "SELECT `serial`,`friend` FROM `multis_friends` WHERE `serial` = '" + QString::number( serial() ) + "'"; res = persistentBroker->query( sql ); *************** *** 114,118 **** initSave; setTable( "multis" ); ! addField( "serial", serial() ); addField( "coowner", coowner_ ); --- 114,118 ---- initSave; setTable( "multis" ); ! addField( "serial", serial() ); addField( "coowner", coowner_ ); *************** *** 125,139 **** if( isPersistent ) { ! persistentBroker->executeQuery( QString( "DELETE FROM multis_bans WHERE serial = '%1'" ).arg( serial() ) ); ! persistentBroker->executeQuery( QString( "DELETE FROM multis_friends WHERE serial = '%1'" ).arg( serial() ) ); } ! // Friends + Bans INT32 i; for ( i = 0; i < bans_.size(); ++i ) ! persistentBroker->executeQuery( QString( "REPLACE INTO multis_bans VALUES(%1,%2)" ).arg( serial() ).arg( bans_[i] ) ); for ( i = 0; i < friends_.size(); ++i ) ! persistentBroker->executeQuery( QString( "REPLACE INTO multis_friends VALUES(%1,%2)" ).arg( serial() ).arg( friends_[i] ) ); cItem::save(); --- 125,139 ---- if( isPersistent ) { ! persistentBroker->executeQuery( QString( "DELETE FROM `multis_bans` WHERE `serial` = '%1'" ).arg( serial() ) ); ! persistentBroker->executeQuery( QString( "DELETE FROM `multis_friends` WHERE `serial` = '%1'" ).arg( serial() ) ); } ! // Friends + Bans INT32 i; for ( i = 0; i < bans_.size(); ++i ) ! persistentBroker->executeQuery( QString( "REPLACE INTO `multis_bans` VALUES(%1,%2)" ).arg( serial() ).arg( bans_[i] ) ); for ( i = 0; i < friends_.size(); ++i ) ! persistentBroker->executeQuery( QString( "REPLACE INTO `multis_friends` VALUES(%1,%2)" ).arg( serial() ).arg( friends_[i] ) ); cItem::save(); *************** *** 145,151 **** return false; ! persistentBroker->addToDeleteQueue( "multis", QString( "serial = '%1'" ).arg( serial() ) ); ! persistentBroker->addToDeleteQueue( "multis_bans", QString( "serial = '%1'" ).arg( serial() ) ); ! persistentBroker->add... [truncated message content] |
|
From: <dr...@pr...> - 2004-01-30 19:45:17
|
Update of /cvsroot/wpdev/wolfpack In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12357 Modified Files: world.cpp Log Message: Fixes an error in updating worldtime. Index: world.cpp =================================================================== RCS file: /cvsroot/wpdev/wolfpack/world.cpp,v retrieving revision 1.60 retrieving revision 1.61 diff -C2 -d -r1.60 -r1.61 *** world.cpp 30 Jan 2004 19:21:48 -0000 1.60 --- world.cpp 30 Jan 2004 19:43:42 -0000 1.61 *************** *** 473,477 **** QString type = types[j]; ! cDBResult res = persistentBroker->query( QString( "SELECT COUNT(*) FROM uobjectmap WHERE type = '%1'" ).arg( type ) ); // Find out how many objects of this type are available --- 473,477 ---- QString type = types[j]; ! cDBResult res = persistentBroker->query( QString( "SELECT COUNT(*) FROM `uobjectmap` WHERE `type` = '%1'" ).arg( type ) ); // Find out how many objects of this type are available *************** *** 837,841 **** // check if the option already exists ! cDBResult res = persistentBroker->query( QString( "SELECT value FROM settings WHERE option = '%1'" ).arg( persistentBroker->quoteString( name ) ) ); QString sql; --- 837,841 ---- // check if the option already exists ! cDBResult res = persistentBroker->query( QString( "SELECT `option`,`value` FROM `settings` WHERE `option` = '%1'" ).arg( persistentBroker->quoteString( name ) ) ); QString sql; *************** *** 843,852 **** if( !res.isValid() || !res.fetchrow() ) { ! sql = "INSERT INTO settings VALUES('%1','%2')"; sql = sql.arg( persistentBroker->quoteString( name ) ).arg( persistentBroker->quoteString( value ) ); } else { ! sql = "UPDATE settings SET value='%1' WHERE option='%2'"; sql = sql.arg( persistentBroker->quoteString( value ) ).arg( persistentBroker->quoteString( name ) ); } --- 843,852 ---- if( !res.isValid() || !res.fetchrow() ) { ! sql = "INSERT INTO `settings` VALUES('%1','%2')"; sql = sql.arg( persistentBroker->quoteString( name ) ).arg( persistentBroker->quoteString( value ) ); } else { ! sql = "UPDATE `settings` SET `value`='%1' WHERE `option`='%2'"; sql = sql.arg( persistentBroker->quoteString( value ) ).arg( persistentBroker->quoteString( name ) ); } |
|
From: <dr...@pr...> - 2004-01-30 19:24:00
|
Update of /cvsroot/wpdev/xmlscripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27350 Modified Files: wolfpack.sql Log Message: Added `setting` Index: wolfpack.sql =================================================================== RCS file: /cvsroot/wpdev/xmlscripts/wolfpack.sql,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** wolfpack.sql 28 Nov 2003 08:23:32 -0000 1.32 --- wolfpack.sql 30 Jan 2004 19:22:21 -0000 1.33 *************** *** 1,2 **** --- 1,8 ---- + CREATE TABLE `settings` ( + `option` varchar(255) NOT NULL default '', + `value` varchar(255) NOT NULL default '', + PRIMARY KEY (`option`) + ); + CREATE TABLE `boats` ( `serial` int(11) NOT NULL default '0', *************** *** 131,135 **** `hidamage` smallint(6) NOT NULL default '0', `lodamage` smallint(6) NOT NULL default '0', ! `weight` int(11) NOT NULL default '0', `hp` smallint(6) NOT NULL default '0', `maxhp` smallint(6) NOT NULL default '0', --- 137,141 ---- `hidamage` smallint(6) NOT NULL default '0', `lodamage` smallint(6) NOT NULL default '0', ! `weight` float NOT NULL default '0', `hp` smallint(6) NOT NULL default '0', `maxhp` smallint(6) NOT NULL default '0', |